rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
testDir = new File( "c:\\java\\photovault\\tests\\images\\photovault\\image\\ImageXform" ); | testDir = new File( refImgDir, "photovault/image/ImageXform" ); | public void setUp() { File f = new File( "c:\\java\\photovault\\testfiles\\test1.jpg" ); try { source = ImageIO.read( f ); } catch ( IOException e ) { System.err.println( "Error reading image: " + e.getMessage() ); return; } testDir = new File( "c:\\java\\photovault\\tests\\images\\photovault\\image\\Im... |
fakeHaplos[j][k] = new Haplotype(new int[0],haplotypes[j][k].getPercentage(),null); | fakeHaplos[j][k] = new Haplotype(haplotypes[j][k].getGeno(),haplotypes[j][k].getPercentage(), haplotypes[j][k].getMarkers()); | public void doPermutations() { stopProcessing = false; Vector curResults = null; Haplotype[][] haplotypes = new Haplotype[testSet.getHaplotypeAssociationResults().size()][]; Iterator hitr = testSet.getHaplotypeAssociationResults().iterator(); int count = 0; while (hitr.hasN... |
AssociationTestSet ats = new AssociationTestSet(fakeHaplos, null); | AssociationTestSet ats = null; if (testSet.getFilterAlleles() == null){ ats = new AssociationTestSet(fakeHaplos, null); }else{ try{ ats = new AssociationTestSet(fakeHaplos,null,testSet.getFilterAlleles()); }catch (HaploViewException hve){ } } | public void doPermutations() { stopProcessing = false; Vector curResults = null; Haplotype[][] haplotypes = new Haplotype[testSet.getHaplotypeAssociationResults().size()][]; Iterator hitr = testSet.getHaplotypeAssociationResults().iterator(); int count = 0; while (hitr.hasN... |
public BufferedImage export(int start, int stop){ | public BufferedImage export(int start, int stop, boolean compress){ | public BufferedImage export(int start, int stop){ forExport = true; exportStart = start; if (exportStart < 0){ exportStart = 0; } exportStop = stop; if (exportStop > theData.filteredDPrimeTable.length){ exportStop = theData.filteredDPrimeTable.length; ... |
boxSize = startBS; boxRadius = startBR; printDetails = startPD; | public BufferedImage export(int start, int stop){ forExport = true; exportStart = start; if (exportStart < 0){ exportStart = 0; } exportStop = stop; if (exportStop > theData.filteredDPrimeTable.length){ exportStop = theData.filteredDPrimeTable.length; ... | |
g.setFont(markerNameFont); FontMetrics fm = g.getFontMetrics(); if (printDetails){ blockDispHeight = boxSize/3 + fm.getAscent(); }else{ blockDispHeight = boxSize/3; | if (g != null){ g.setFont(markerNameFont); FontMetrics fm = g.getFontMetrics(); if (printDetails){ blockDispHeight = boxSize/3 + fm.getAscent(); }else{ blockDispHeight = boxSize/3; } | public Dimension getPreferredSize() { //loop through table to find deepest non-null comparison PairwiseLinkage[][] dPrimeTable = theData.filteredDPrimeTable; int upLim, loLim; if (forExport){ loLim = exportStart; upLim = exportStop; }else{ loLim = ... |
if (zoomLevel == 0){ printDetails = true; } else{ printDetails = false; } | public void paintComponent(Graphics g){ PairwiseLinkage[][] dPrimeTable = theData.filteredDPrimeTable; Vector blocks = theData.blocks; Rectangle visRect = getVisibleRect(); //deal with zooming if (chartSize.getWidth() > (3*visRect.width)){ showWM = true; }else{ ... | |
if (zoomLevel == 0){ printDetails = true; } else{ printDetails = false; } | public void zoom(int type){ int diff = type - zoomLevel; zoomLevel = type; int x=0, y=0; int oldX = getVisibleRect().x; int oldY = getVisibleRect().y; int oldWidth = getVisibleRect().width; int oldHeight = getVisibleRect().height; if (diff > 0){ //w... | |
txw.commit(); | protected void cleanupInstances() { Criteria crit = new Criteria(); crit.addEqualTo( "instances.volumeId", volume.getName() ); Criteria dateCrit = new Criteria(); dateCrit.addIsNull( "instances.checkTime" ); Criteria cutoffDateCrit = new Criteria(); cutoffDateCrit.addLessTh... | |
ImageInstance instance = (ImageInstance) instances.get( 0 ); | ImageInstance instance = null; if ( instances != null && instances.size() > 0 ) { instance = (ImageInstance) instances.get( 0 ); } | public static ImageInstance retrieve( VolumeBase volume, String fname ) throws PhotoNotFoundException { String oql = "select instance from " + ImageInstance.class.getName() + " where volumeId = \"" + volume.getName() + "\" and fname = \"" + fname + "\""; List instances = null; // Get transaction context ODMGXAW... |
tp.getModel().removeChild(idx); | tp.getModel().removeColumn(idx); | public void actionPerformed(ActionEvent evt) { Selectable invoker = pp.getSelection(); if (invoker instanceof TablePane) { TablePane tp = (TablePane) invoker; int idx; while ( (idx = tp.getSelectedColumnIndex()) >= 0) { tp.getModel().removeChild(idx); } } else { JOptionPane.showMessageDialog((JComponen... |
String folderName = f.getName(); if ( folderName.length() > PhotoFolder.NAME_LENGTH ) { folderName = folderName.substring( 0, PhotoFolder.NAME_LENGTH ); } | void indexDirectory( File dir, PhotoFolder folder, int startPercent, int endPercent ) { log.debug( "entry: indexDirectory " + dir.getAbsolutePath() ); /** Maintain information how many instances for the photos that were previously added to the folder is found */ HashMap... | |
manager.undo(); | if (logger.isDebugEnabled()) { logger.debug(manager); int choice = JOptionPane.showConfirmDialog(null, "Undo manager state dumped to logger." + "\n\n" + "Proceed with undo?"); if (choice == JOptionPane.YES_OPTION) { manager.undo(); } } else { manager.undo(); } | public void actionPerformed(ActionEvent evt ) { manager.undo(); } |
value = parent.findVariable( name ); | value = parent.getVariable( name ); | public Object getVariable(String name) { Object value = variables.get(name); if ( value == null && isInherit() ) { JellyContext parent = getParent(); if (parent != null) { value = parent.findVariable( name ); } } return valu... |
config.setURL(appForm.getURL()); | public ActionForward execute(WebContext context, ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) throws Exception { ... | |
permTests.cat(blockTestSet); | if(blockTestSet != null) { permTests.cat(blockTestSet); } | private void processFile(String fileName, int fileType, String infoFileName){ try { HaploData textData; File OutputFile; File inputFile; AssociationTestSet customAssocSet; if(!quietMode && fileName != null){ System.out.println("Using data ... |
exportPLTransAction = new ExportPLTransAction(); | exportPLTransAction = new ExportPLTransAction() { @Override public void actionPerformed(ActionEvent e) { try { setExportingTables(getProject().getTargetDatabase().getTables()); super.actionPerformed(e); } catch (ArchitectException ex) { ASUtils.showExceptionDialog( ArchitectFrame.this, "Error Creating List of Tables to... | private void init() throws ArchitectException { int accelMask = Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(); prefs = PrefsUtils.getUserPrefsNode(architectSession); CoreUserSettings us; // must be done right away, because a static // initializer in this class effects BeanUtils // behaviour wh... |
final MappingReport mr ; final List<SQLTable> selectedTables; if (playpen.getSelectedTables().size() == 0) { selectedTables = new ArrayList(playpen.getTables()); | ExportCSV export = new ExportCSV(getProject().getPlayPen().getDatabase().getTables()); File file = null; JFileChooser fileDialog = new JFileChooser(); fileDialog.setSelectedFile(new File("map.csv")); if (fileDialog.showSaveDialog(ArchitectFrame.getMainInstance()) == JFileChooser.APPROVE_OPTION){ file = fileDialog.ge... | public void actionPerformed(ActionEvent e) { try { final MappingReport mr ; final List<SQLTable> selectedTables; if (playpen.getSelectedTables().size() == 0) { selectedTables = new ArrayList(playpen.getTables()); ... |
if (JOptionPane.YES_OPTION == JOptionPane.showConfirmDialog(ArchitectFrame.getMainInstance(),"View only the "+playpen.getSelectedTables().size()+" selected tables","Show Mapping",JOptionPane.YES_NO_OPTION)) { selectedTables = new ArrayList<SQLTable>(); for(TablePane tp: playpen.getSelectedTables()) { selectedTables.add... | return; | public void actionPerformed(ActionEvent e) { try { final MappingReport mr ; final List<SQLTable> selectedTables; if (playpen.getSelectedTables().size() == 0) { selectedTables = new ArrayList(playpen.getTables()); ... |
mr = new MappingReport(selectedTables); | public void actionPerformed(ActionEvent e) { try { final MappingReport mr ; final List<SQLTable> selectedTables; if (playpen.getSelectedTables().size() == 0) { selectedTables = new ArrayList(playpen.getTables()); ... | |
final JFrame f = new JFrame("Mapping Report"); JPanel mrPanel = new JPanel() { protected void paintComponent(java.awt.Graphics g) { super.paintComponent(g); try { mr.drawHighLevelReport((Graphics2D) g,null); } catch (ArchitectException e1) { logger.error("ArchitectException while generating mapping diagram", e1); AS... | FileWriter output = null; output = new FileWriter(file); output.write(export.getCSVMapping()); output.flush(); } catch (IOException e1) { throw new RuntimeException(e1); | public void actionPerformed(ActionEvent e) { try { final MappingReport mr ; final List<SQLTable> selectedTables; if (playpen.getSelectedTables().size() == 0) { selectedTables = new ArrayList(playpen.getTables()); ... |
f.setVisible(false); | try { ExportCSV export = new ExportCSV(selectedTables); File file = null; JFileChooser fileDialog = new JFileChooser(); fileDialog.setSelectedFile(new File("map.csv")); if (fileDialog.showSaveDialog(ArchitectFrame.getMainInstance()) == JFileChooser.APPROVE_OPTION){ file = fileDialog.getSelectedFile(); } else { retur... | public void actionPerformed(ActionEvent e) { f.setVisible(false); } |
ExportCSV export = new ExportCSV(getProject().getPlayPen().getDatabase().getTables()); File file = null; JFileChooser fileDialog = new JFileChooser(); fileDialog.setSelectedFile(new File("map.csv")); if (fileDialog.showSaveDialog(ArchitectFrame.getMainInstance()) == JFileChooser.APPROVE_OPTION){ file = fileDialog.ge... | setExportingTables(getProject().getTargetDatabase().getTables()); super.actionPerformed(e); } catch (ArchitectException ex) { ASUtils.showExceptionDialog( ArchitectFrame.this, "Error Creating List of Tables to Export", ex); | public void actionPerformed(ActionEvent e) { try { ExportCSV export = new ExportCSV(getProject().getPlayPen().getDatabase().getTables()); File file = null; JFileChooser fileDialog = new JFileChooser(); fileDialog.setS... |
try { lastSaveOpSuccessful = false; project.setSaveInProgress(true); project.save(finalSeparateThread ? pm : null); lastSaveOpSuccessful = true; JOptionPane.showMessageDialog(ArchitectFrame.this, "Save successful"); } catch (Exception ex) { lastSaveOpSuccessful = false; JOptionPane.showMessageDialog (ArchitectFrame.thi... | Thread.setDefaultUncaughtExceptionHandler(new ExceptionHandler()); logger.debug("current motion threshold is: " + System.getProperty("awt.dnd.drag.threshold")); System.setProperty("awt.dnd.drag.threshold","10"); logger.debug("new motion threshold is: " + System.getProperty("awt.dnd.drag.threshold")); getMainInstance... | public void run() { try { lastSaveOpSuccessful = false; project.setSaveInProgress(true); project.save(finalSeparateThread ? pm : null); lastSaveOpSuccessful = true; JOptionPane.showMessageDialog(ArchitectFrame.this, "Save successful"); } catch (Exception ex) { lastSaveOpSuccessful = fal... |
displayStrings[0] = new String ("(" +((SNP)markers.elementAt(boxX)).getName() + ", " + ((SNP)markers.elementAt(boxY)).getName() + ")"); | displayStrings[0] = new String ("(" +Chromosome.getMarker(boxX).getName() + ", " + Chromosome.getMarker(boxY).getName() + ")"); | public void mousePressed (MouseEvent e) { if ((e.getModifiers() & InputEvent.BUTTON3_MASK) == InputEvent.BUTTON3_MASK){ final int clickX = e.getX(); final int clickY = e.getY(); double dboxX = (double)(clickX - clickXShift - (clickY-clic... |
displayStrings[0] = new String("(" + (boxX+1) + ", " + (boxY+1) + ")"); | displayStrings[0] = new String("(" + (Chromosome.realIndex[boxX]+1) + ", " + (Chromosome.realIndex[boxY]+1) + ")"); | public void mousePressed (MouseEvent e) { if ((e.getModifiers() & InputEvent.BUTTON3_MASK) == InputEvent.BUTTON3_MASK){ final int clickX = e.getX(); final int clickY = e.getY(); double dboxX = (double)(clickX - clickXShift - (clickY-clic... |
displayStrings[0] = new String ("(" +((SNP)markers.elementAt(boxX)).getName() + ", " + ((SNP)markers.elementAt(boxY)).getName() + ")"); | displayStrings[0] = new String ("(" +Chromosome.getMarker(boxX).getName() + ", " + Chromosome.getMarker(boxY).getName() + ")"); | public Object construct(){ final int leftMargin = 12; String[] displayStrings = new String[5]; if (markersLoaded){ displayStrings[0] = new String ("(" +((SNP)marker... |
displayStrings[0] = new String("(" + (boxX+1) + ", " + (boxY+1) + ")"); | displayStrings[0] = new String("(" + (Chromosome.realIndex[boxX]+1) + ", " + (Chromosome.realIndex[boxY]+1) + ")"); | public Object construct(){ final int leftMargin = 12; String[] displayStrings = new String[5]; if (markersLoaded){ displayStrings[0] = new String ("(" +((SNP)marker... |
DPrimeDisplay(PairwiseLinkage[][] t, boolean b, Vector v){ | DPrimeDisplay(PairwiseLinkage[][] t, boolean b){ | DPrimeDisplay(PairwiseLinkage[][] t, boolean b, Vector v){ markersLoaded = b; dPrimeTable = t; markers = v; this.setDoubleBuffered(true); addMouseListener(new PopMouseListener(this)); } |
markers = v; | DPrimeDisplay(PairwiseLinkage[][] t, boolean b, Vector v){ markersLoaded = b; dPrimeTable = t; markers = v; this.setDoubleBuffered(true); addMouseListener(new PopMouseListener(this)); } | |
public void loadMarkers(Vector v){ | public void loadMarkers(){ | public void loadMarkers(Vector v){ markersLoaded = true; markers = v; repaint(); } |
markers = v; | public void loadMarkers(Vector v){ markersLoaded = true; markers = v; repaint(); } | |
long minpos = ((SNP)markers.elementAt(0)).getPosition(); long maxpos = ((SNP)markers.elementAt(markers.size()-1)).getPosition(); | long minpos = Chromosome.getMarker(0).getPosition(); long maxpos = Chromosome.getMarker(Chromosome.size()-1).getPosition(); | public void paintComponent(Graphics g){ Graphics2D g2 = (Graphics2D) g; Dimension size = getSize(); Dimension pref = getPreferredSize(); clipRect = (Rectangle)g.getClip(); //first paint grab the cliprect for the whole viewport if (viewRect.width == 0){viewRect=clipRect;} ... |
for (int i = 0; i < markers.size(); i++) { double pos = (((SNP)markers.elementAt(i)).getPosition() - minpos) / spanpos; | for (int i = 0; i < Chromosome.size(); i++) { double pos = (Chromosome.getMarker(i).getPosition() - minpos) / spanpos; | public void paintComponent(Graphics g){ Graphics2D g2 = (Graphics2D) g; Dimension size = getSize(); Dimension pref = getPreferredSize(); clipRect = (Rectangle)g.getClip(); //first paint grab the cliprect for the whole viewport if (viewRect.width == 0){viewRect=clipRect;} ... |
widestMarkerName = metrics.stringWidth(((SNP)markers.elementAt(0)).getName()); | widestMarkerName = metrics.stringWidth(Chromosome.getMarker(0).getName()); | public void paintComponent(Graphics g){ Graphics2D g2 = (Graphics2D) g; Dimension size = getSize(); Dimension pref = getPreferredSize(); clipRect = (Rectangle)g.getClip(); //first paint grab the cliprect for the whole viewport if (viewRect.width == 0){viewRect=clipRect;} ... |
int thiswide = metrics.stringWidth(((SNP)markers.elementAt(x)).getName()); | int thiswide = metrics.stringWidth(Chromosome.getMarker(x).getName()); | public void paintComponent(Graphics g){ Graphics2D g2 = (Graphics2D) g; Dimension size = getSize(); Dimension pref = getPreferredSize(); clipRect = (Rectangle)g.getClip(); //first paint grab the cliprect for the whole viewport if (viewRect.width == 0){viewRect=clipRect;} ... |
g2.drawString(((SNP)markers.elementAt(x)).getName(),TEXT_NUMBER_GAP, x*boxSize + ascent/3); | g2.drawString(Chromosome.getMarker(x).getName(),TEXT_NUMBER_GAP, x*boxSize + ascent/3); | public void paintComponent(Graphics g){ Graphics2D g2 = (Graphics2D) g; Dimension size = getSize(); Dimension pref = getPreferredSize(); clipRect = (Rectangle)g.getClip(); //first paint grab the cliprect for the whole viewport if (viewRect.width == 0){viewRect=clipRect;} ... |
String mark = String.valueOf(x + 1); | String mark = String.valueOf(Chromosome.realIndex[x] + 1); | public void paintComponent(Graphics g){ Graphics2D g2 = (Graphics2D) g; Dimension size = getSize(); Dimension pref = getPreferredSize(); clipRect = (Rectangle)g.getClip(); //first paint grab the cliprect for the whole viewport if (viewRect.width == 0){viewRect=clipRect;} ... |
try{ filteredHaplos = theData.generateCrossovers(filteredHaplos); }catch (HaploViewException e){ JOptionPane.showMessageDialog(this.getParent(), e.getMessage(), "Error", JOptionPane.ERROR_MESSAGE); } multidprimeArray = theData.getMultiDprime(); | filteredHaplos = theData.orderByCrossing(filteredHaplos); theData.pickTags(filteredHaplos); multidprimeArray = theData.computeMultiDprime(filteredHaplos); | public void adjustDisplay(){ //this is called when the controller wants to change the haps //displayed, instead of directly repainting so that none of this math //is done when the screen repaints for other reasons (resizing, focus change, etc) //first filter haps on displaythresh ... |
Haplotype[][] haplos = theData.generateHaplotypes(theData.blocks,false); | orderedHaplos = theData.generateHaplotypes(theData.blocks,false); | public void getHaps() throws HaploViewException{ if (theData.blocks == null) {return;} Haplotype[][] haplos = theData.generateHaplotypes(theData.blocks,false); orderedHaplos = new Haplotype[haplos.length][]; for (int i = 0; i < haplos.length; i++) { Vector orderedHaps = new Ve... |
orderedHaplos = new Haplotype[haplos.length][]; for (int i = 0; i < haplos.length; i++) { Vector orderedHaps = new Vector(); for (int hapCount = 0; hapCount < haplos[i].length; hapCount++) { if (orderedHaps.size() == 0) { orderedHaps.add(haplos[i][hapCount]); } else { for (int j = 0; j < orderedHaps.size(); j++) { if ... | public void getHaps() throws HaploViewException{ if (theData.blocks == null) {return;} Haplotype[][] haplos = theData.generateHaplotypes(theData.blocks,false); orderedHaplos = new Haplotype[haplos.length][]; for (int i = 0; i < haplos.length; i++) { Vector orderedHaps = new Ve... | |
} else if (parent instanceof Decorations) { Decorations item = (Decorations) parent; item.setImage(image); | public void doTag(XMLOutput output) throws JellyTagException { // invoke by body just in case some nested tag configures me invokeBody(output); Widget parent = getParentWidget(); if (parent == null) { throw new JellyTagException("This tag must be nested within a widget"); ... | |
public void testForObjectCompareToNull(){ | public void testForObjectCompareToNull() throws ArchitectException{ | public void testForObjectCompareToNull(){ SQLTable t = new SQLTable(); t.setName("Testing"); assertEquals (1, comparator.compare(t, null)); assertEquals (-1, comparator.compare(null, t)); } |
public void testForObjectCompareToObject(){ | public void testForObjectCompareToObject() throws ArchitectException{ | public void testForObjectCompareToObject(){ SQLTable t1 = new SQLTable(); SQLTable t2 = new SQLTable(); t1.setName("cow"); t2.setName("pigs"); assertTrue( comparator.compare(t1,t2) < 0); } |
public void testWithNullName() { | public void testWithNullName() throws ArchitectException { | public void testWithNullName() { SQLTable t1 = new SQLTable(); SQLTable t2 = new SQLTable(); assertEquals(0, comparator.compare(t1,t2)); } |
public void testWithSameName(){ | public void testWithSameName() throws ArchitectException{ | public void testWithSameName(){ SQLTable t1 = new SQLTable(); SQLTable t2 = new SQLTable(); t1.setName("cow"); t2.setName("cow"); assertEquals( 0, comparator.compare(t1,t2)); } |
draggingTablePanes = true; | public void mousePressed(MouseEvent evt) { requestFocus(); maybeShowPopup(evt); Point p = evt.getPoint(); unzoomPoint(p); PlayPenComponent c = contentPane.getComponentAt(p); if (c != null) p.translate(-c.getX(), -c.getY()); if (c instanceof Relationship) { if ((evt.getModifiersEx() & MouseEven... | |
logger.debug("Discarding drag on titlebar (handled by mousePressed())"); draggingTablePanes = true; | throw new UnsupportedOperationException("We don't use DnD for dragging table panes"); | public void dragGestureRecognized(DragGestureEvent dge) { PlayPenComponent c = contentPane.getComponentAt( unzoomPoint(((MouseEvent) dge.getTriggerEvent()).getPoint())); if ( c instanceof TablePane ) { TablePane tp = (TablePane) c; int colIndex = TablePane.COLUMN_INDEX_NONE; Point dragOrigin =... |
setLayout(null); | setLayout(new PlayPenLayout()); | public PlayPen() { zoom = 1.0; setBackground(java.awt.Color.white); contentPane = new PlayPenContentPane(this); setLayout(null); setName("Play Pen"); setMinimumSize(new Dimension(1,1)); dt = new DropTarget(this, new PlayPenDropListener()); bringToFrontAction = new BringToFrontAction(this); sendToBackAction = ... |
playpen.setZoom(playpen.getZoom() + zoomStep); | playpen.setZoom(playpen.getZoom() * Math.pow(2,zoomStep)); | public void actionPerformed(ActionEvent e) { logger.debug("oldZoom="+playpen.getZoom()+",zoomStep="+zoomStep); playpen.setZoom(playpen.getZoom() + zoomStep); logger.debug("newZoom="+playpen.getZoom()); Rectangle scrollTo = null; Iterator it = playpen.getSelectedItems().iterator(); while (it.hasNext()) { Rectan... |
if ("zoom".equals(e.getPropertyName())) { if (playpen.getZoom() + zoomStep < 0.1) { setEnabled(false); } else { setEnabled(true); } } | public void propertyChange(PropertyChangeEvent e) { if ("zoom".equals(e.getPropertyName())) { if (playpen.getZoom() + zoomStep < 0.1) { setEnabled(false); } else { setEnabled(true); } } } | |
return true; | MimeMultipart mimeMultipart; try { mimeMultipart = new MimeMultipart(message.getDataHandler().getDataSource()); } catch (MessagingException e) { return false; } int textPartSize = MailMatchingUtils.getMimePartSize(mimeMultipart, "text/plain"); record.setByteReceivedText(textPartSize); int binaryPartSize = MailMatchin... | public boolean validate(Message message, MailProcessingRecord record) { return true; } |
final PhotoInfoDlg staticThis = this; | protected void createUI() { editor = new PhotoInfoEditor( ctrl ); getContentPane().add( editor, BorderLayout.NORTH ); JButton okBtn = new JButton( "OK" ); okBtn.addActionListener( new ActionListener() { public void actionPerformed( ActionEvent e ) { try { ctrl.save(); photoChanged = true; } cat... | |
public void actionPerformed( ActionEvent e ) { try { ctrl.save(); photoChanged = true; } catch ( Exception ex ) { log.warn( "problem while saving changes: " + ex.getMessage() ); } | public void actionPerformed( ActionEvent e ) { try { ctrl.save(); photoChanged = true; | protected void createUI() { editor = new PhotoInfoEditor( ctrl ); getContentPane().add( editor, BorderLayout.NORTH ); JButton okBtn = new JButton( "OK" ); okBtn.addActionListener( new ActionListener() { public void actionPerformed( ActionEvent e ) { try { ctrl.save(); photoChanged = true; } cat... |
} } ); | } catch ( Exception ex ) { JOptionPane.showMessageDialog( staticThis, "Error while saving changes: \n" + ex.getMessage(), "Error saving changes", JOptionPane.ERROR_MESSAGE, null ); log.warn( "problem while saving changes: " + ex.getMessage() ); } } } ); | protected void createUI() { editor = new PhotoInfoEditor( ctrl ); getContentPane().add( editor, BorderLayout.NORTH ); JButton okBtn = new JButton( "OK" ); okBtn.addActionListener( new ActionListener() { public void actionPerformed( ActionEvent e ) { try { ctrl.save(); photoChanged = true; } cat... |
JButton applyBtn = new JButton( "Apply" ); applyBtn.addActionListener( new ActionListener() { public void actionPerformed( ActionEvent e ) { try { ctrl.save(); photoChanged = true; } catch ( Exception ex ) { log.warn( "problem while saving changes: " + ex.getMessage() ); } } } ); | JButton applyBtn = new JButton( "Apply" ); applyBtn.addActionListener( new ActionListener() { public void actionPerformed( ActionEvent e ) { try { ctrl.save(); photoChanged = true; } catch ( Exception ex ) { JOptionPane.showMessageDialog( staticThis, "Error while saving changes: \n" + ex.getMessage(), "Error saving cha... | protected void createUI() { editor = new PhotoInfoEditor( ctrl ); getContentPane().add( editor, BorderLayout.NORTH ); JButton okBtn = new JButton( "OK" ); okBtn.addActionListener( new ActionListener() { public void actionPerformed( ActionEvent e ) { try { ctrl.save(); photoChanged = true; } cat... |
try { ctrl.save(); photoChanged = true; } catch ( Exception ex ) { log.warn( "problem while saving changes: " + ex.getMessage() ); } | try { ctrl.save(); photoChanged = true; | public void actionPerformed( ActionEvent e ) { try { ctrl.save(); photoChanged = true; } catch ( Exception ex ) { log.warn( "problem while saving changes: " + ex.getMessage() ); } setVisible( false ); } |
} | } catch ( Exception ex ) { JOptionPane.showMessageDialog( staticThis, "Error while saving changes: \n" + ex.getMessage(), "Error saving changes", JOptionPane.ERROR_MESSAGE, null ); log.warn( "problem while saving changes: " + ex.getMessage() ); } } | public void actionPerformed( ActionEvent e ) { try { ctrl.save(); photoChanged = true; } catch ( Exception ex ) { log.warn( "problem while saving changes: " + ex.getMessage() ); } setVisible( false ); } |
try { ctrl.save(); photoChanged = true; } catch ( Exception ex ) { log.warn( "problem while saving changes: " + ex.getMessage() ); } } | try { ctrl.save(); photoChanged = true; } catch ( Exception ex ) { JOptionPane.showMessageDialog( staticThis, "Error while saving changes: \n" + ex.getMessage(), "Error saving changes", JOptionPane.ERROR_MESSAGE, null ); log.warn( "problem while saving changes: " + ex.getMessage() ); } } | public void actionPerformed( ActionEvent e ) { try { ctrl.save(); photoChanged = true; } catch ( Exception ex ) { log.warn( "problem while saving changes: " + ex.getMessage() ); } } |
public void saveDprimeToText(String[][] dPrimeTable, String infile) throws IOException{ File dumpDprimeFile = new File(infile); | public void saveDprimeToText(String[][] dPrimeTable, File dumpDprimeFile) throws IOException{ | public void saveDprimeToText(String[][] dPrimeTable, String infile) throws IOException{ File dumpDprimeFile = new File(infile); FileWriter saveDprimeWriter = new FileWriter(dumpDprimeFile); saveDprimeWriter.write("L1\tL2\tD'\tLOD\tr^2\tCIlow\tCIhi\n"); for (int i = 0; i < dPrimeTable.length; i++){ for (int j = ... |
public void saveHapsToText(Haplotype[][] finishedHaplos, String saveName) throws IOException{ | public void saveHapsToText(Haplotype[][] finishedHaplos, File saveHapsFile) throws IOException{ | public void saveHapsToText(Haplotype[][] finishedHaplos, String saveName) throws IOException{ NumberFormat nf = NumberFormat.getInstance(); nf.setMinimumFractionDigits(3); nf.setMaximumFractionDigits(3); //open file for saving haps text File saveHapsFile = new File(saveName); FileWriter saveHapsWriter = new FileWr... |
File saveHapsFile = new File(saveName); | public void saveHapsToText(Haplotype[][] finishedHaplos, String saveName) throws IOException{ NumberFormat nf = NumberFormat.getInstance(); nf.setMinimumFractionDigits(3); nf.setMaximumFractionDigits(3); //open file for saving haps text File saveHapsFile = new File(saveName); FileWriter saveHapsWriter = new FileWr... | |
logWriter = new LogWriter(ArchitectSession.getInstance().getUserSettings().getETLUserSettings().getString( | logWriter = new LogWriter(ArchitectSessionImpl.getInstance().getUserSettings().getETLUserSettings().getString( | public void export(List<SQLTable> tablesToExport) throws SQLException, ArchitectException { logger.debug("Starting export of tables: "+tablesToExport); finished = false; hasStarted = true; Connection con = null; // repository connection Connection tCon = null; // target db connect... |
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.... | |
if (numStrong/(numStrong + numRec) > 0.95){ | if ((double)numStrong/(double)(numStrong + numRec) > 0.95){ | 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.... |
Script script = parser.parse(getUrl().openStream()); | Script script = parser.parse(getUrl().toString()); | protected Script compileScript() throws Exception { XMLParser parser = new XMLParser(); parser.setContext(getJellyContext()); Script script = parser.parse(getUrl().openStream()); script = script.compile(); if (log.isDebugEnabled()) { log.debug("Compiled script: " + getU... |
caller.doTDT = this.doTDT.isSelected(); | 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 == BROWSE_GENO){ browse(GENO); }else if (command == BROWSE_INFO)... | |
}else if (command == "tdt"){ if(this.doTDT.isSelected()){ trioButton.setEnabled(true); ccButton.setEnabled(true); }else{ trioButton.setEnabled(false); ccButton.setEnabled(false); } | 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 == BROWSE_GENO){ browse(GENO); }else if (command == BROWSE_INFO)... | |
JPanel tdtPanel = new JPanel(); tdtPanel.add(new JLabel("Run family trio TDT? ")); tdtPanel.add(doTDT); contents.add(tdtPanel); | JPanel tdtOptsPanel = new JPanel(); JPanel tdtCheckBoxPanel = new JPanel(); tdtCheckBoxPanel.add(doTDT); tdtCheckBoxPanel.add(new JLabel("Do association test?")); tdtOptsPanel.add(trioButton); tdtOptsPanel.add(ccButton); contents.add(tdtCheckBoxPanel); contents.add(tdtOptsPanel); | void load(int ft){ fileType = ft; JPanel contents = new JPanel(); contents.setLayout(new BoxLayout(contents, BoxLayout.Y_AXIS)); JPanel filePanel = new JPanel(); filePanel.setLayout(new BoxLayout(filePanel, BoxLayout.Y_AXIS)); JPanel topFilePanel = new JPanel(); JPan... |
pageContext.getOut().println(componentDisplay); | pageContext.getOut().println("<div id=\""+getId()+"\">"+componentDisplay+""); | public int doStartTag() throws JspException{ HttpServletRequest request = (HttpServletRequest)pageContext.getRequest(); WebContext context = null; try{ context = WebContext.get(request); ApplicationConfig appConfig = context.getApplicationConfig(); ... |
public TagScript createCustomTagScript(final String name, Attributes attributes) throws Exception { | public TagScript createCustomTagScript(String name, Attributes attributes) throws Exception { | public TagScript createCustomTagScript(final String name, Attributes attributes) throws Exception { // custom Ant tags if ( name.equals("fileScanner") ) { return new TagScript( new TagFactory() { public Tag createTag() throws Exception { ... |
public Tag createTag() throws Exception { | public Tag createTag(String name, Attributes attributes) throws Exception { | public TagScript createCustomTagScript(final String name, Attributes attributes) throws Exception { // custom Ant tags if ( name.equals("fileScanner") ) { return new TagScript( new TagFactory() { public Tag createTag() throws Exception { ... |
public Tag createTag() throws Exception { | public Tag createTag(String name, Attributes attributes) throws Exception { | public Tag createTag() throws Exception { return new FileScannerTag(new FileScanner()); } |
public Tag createTag() throws Exception { | public Tag createTag(String name, Attributes attributes) throws Exception { | public Tag createTag() throws Exception { return new SetPropertyTag(); } |
public Tag createTag(String name) throws Exception { | public Tag createTag(String name, Attributes attributes) throws Exception { | public Tag createTag(String name) throws Exception { AntTag tag = new AntTag( name ); if ( name.equals( "echo" ) ) { tag.setTrim(false); } return tag; } |
public TagScript createTagScript(final String name, Attributes attributes) throws Exception { | public TagScript createTagScript(String name, Attributes attributes) throws Exception { | public TagScript createTagScript(final String name, Attributes attributes) throws Exception { TagScript answer = createCustomTagScript(name, attributes); if ( answer == null ) { answer = new TagScript( new TagFactory() { public Tag createTag() throws Except... |
public Tag createTag() throws Exception { return AntTagLibrary.this.createTag(name); | public Tag createTag(String name, Attributes attributes) throws Exception { return AntTagLibrary.this.createTag(name, attributes); | public TagScript createTagScript(final String name, Attributes attributes) throws Exception { TagScript answer = createCustomTagScript(name, attributes); if ( answer == null ) { answer = new TagScript( new TagFactory() { public Tag createTag() throws Except... |
public Tag createTag() throws Exception { return AntTagLibrary.this.createTag(name); | public Tag createTag(String name, Attributes attributes) throws Exception { return AntTagLibrary.this.createTag(name, attributes); | public Tag createTag() throws Exception { return AntTagLibrary.this.createTag(name); } |
BufferedReader bufferedReader = new BufferedReader(reader); while (true) { String line = bufferedReader.readLine(); if (line == null) { break; } else { buffer.append(line); buffer.append('\n'); } } return buffer.toString(); | try { BufferedReader bufferedReader = new BufferedReader(reader); while (true) { String line = bufferedReader.readLine(); if (line == null) { break; } else { buffer.append(line); buffer.append('\n'); } } return buffer.toString(); } finally { try { reader.close(); } catch (Exception e) { log.error( "Caught exception clo... | protected String loadText(Reader reader) throws Exception { StringBuffer buffer = new StringBuffer(); // @todo its probably more efficient to use a fixed char[] buffer instead BufferedReader bufferedReader = new BufferedReader(reader); while (true) { String line = buff... |
System.out.println("Running pl"); | logger.debug("Running pl"); | public void actionPerformed(ActionEvent e) { File plEngine = new File(ArchitectFrame.getMainInstance().getUserSettings().getETLUserSettings().getString(ETLUserSettings.PROP_PL_ENGINE_PATH,"")); File plDir = plEngine.getParentFile(); File engineExe = new File(plDir, "PowerLoade... |
return (name.hashCode() + (int)(position ^ (position >>> 32))); | if (name != null){ return (name.hashCode() + (int)(position ^ (position >>> 32))); }else{ return (int)position; } | public int hashCode() { //uses idea from Long hashcode to hash position return (name.hashCode() + (int)(position ^ (position >>> 32))); } |
while (--index > 0) { | while (--index >= 0) { | public void trimEndWhitespace() { int index = text.length(); while (--index > 0) { char ch = text.charAt(index); if (!Character.isWhitespace(ch)) { break; } } index++; if ( index < text.length() ) { this.text = text.substr... |
db.addVolume( vol ); | try { db.addVolume( vol ); } catch (PhotovaultException ex) { } | private boolean createDatabase() { // Ask for the admin password try { PVDatabase db = new PVDatabase(); db.setName( nameFld.getText() ); PhotovaultSettings settings = PhotovaultSettings.getSettings(); settings.addDatabase( db ); String user = "";... |
System.out.println( "SQL_FILE_FILTER:"+ ((FileExtensionFilter) ASUtils.SQL_FILE_FILTER).toString()); | logger.info( "SQL_FILE_FILTER:"+ ((FileExtensionFilter) ASUtils.SQL_FILE_FILTER).toString()); | private JPanel buildPanel() { FormLayout sqlLayout = new FormLayout( "4dlu, min:grow, 4dlu", //columns "pref, 4dlu, pref, 6dlu, fill:300dlu:grow,6dlu, pref, 6dlu, pref"); //rows CellConstraints cc = new CellConstraints(); sqlDoc = new DefaultStyledDocument(); SimpleAttributeSet att = new SimpleAttrib... |
System.out.println( "SQL_FILE_FILTER:"+ ((FileExtensionFilter) ASUtils.SQL_FILE_FILTER).toString()); | logger.info( "SQL_FILE_FILTER:"+ ((FileExtensionFilter) ASUtils.SQL_FILE_FILTER).toString()); | public void actionPerformed(ActionEvent e) { System.out.println( "SQL_FILE_FILTER:"+ ((FileExtensionFilter) ASUtils.SQL_FILE_FILTER).toString()); SaveDocument sd = new SaveDocument(parent,sqlDoc, (FileExtensionFilter) ASUtils.SQL_FILE_FILTER ); } |
"Do not which source to compare from"); | "Do not know which source to compare from"); | public SQLObject getObjectToCompare() throws ArchitectException, IOException { SQLObject o; if (playPenRadio.isSelected()) { o = ArchitectFrame.getMainInstance().playpen.getDatabase(); } else if (physicalRadio.isSelected()) { if (schemaDropdown.getSelectedItem() != null) { o = (SQLObject) schemaDro... |
table.getColumnModel().getColumn(8).setPreferredWidth(100); | public PlinkResultsPanel(HaploView h, Vector results, Vector colNames, Vector filters){ hv = h; setLayout(new GridBagLayout()); plinkTableModel = new PlinkTableModel(colNames,results); sorter = new TableSorter(plinkTableModel); table = new JTable(sorter); table.setSelection... | |
this.webContext = webContext; this.dashboardConfig = dashboardConfig; this.request = request; setServerPath(); | this(webContext, dashboardConfig, request, false); | public DashboardContextImpl(WebContext webContext, DashboardConfig dashboardConfig, HttpServletRequest request){ this.webContext = webContext; this.dashboardConfig = dashboardConfig; this.request = request; setServerPath(); } |
typeMap.put(new Integer(Types.LONGVARCHAR), new GenericTypeDescriptor("TEXT", Types.LONGVARCHAR, 4000000000L, "'", "'", DatabaseMetaData.columnNullable, true, false)); | typeMap.put(new Integer(Types.LONGVARCHAR), new GenericTypeDescriptor("TEXT", Types.LONGVARCHAR, 4000000000L, "'", "'", DatabaseMetaData.columnNullable, false, false)); | protected void createTypeMap() throws SQLException { typeMap = new HashMap(); typeMap.put(new Integer(Types.BIGINT), new GenericTypeDescriptor("NUMERIC", Types.BIGINT, 1000, null, null, DatabaseMetaData.columnNullable, true, false)); typeMap.put(new Integer(Types.BINARY), new GenericTypeDescriptor("BYTEA", Types.... |
return name.replace(' ','_').toUpperCase(); | return name.replace(' ','_').toLowerCase(); | public String toIdentifier(String name) { return name.replace(' ','_').toUpperCase(); } |
logger.debug("SQLTable.Folder["+getName()+"]: populate finished"); | public void populate() throws ArchitectException { if (populated) return; try { if (type == COLUMNS) { parent.populateColumns(); } else if (type == IMPORTED_KEYS) { parent.populateColumns(); parent.populateRelationships(); } else if (type == EXPORTED_KEYS) { ResultSet rs = null; try {... | |
logger.debug("SQLTable: populate is a no-op"); | public void populate() throws ArchitectException {// populateColumns();// populateRelationships(); } | |
logger.debug("SQLTable: column populate finished"); | private synchronized void populateColumns() throws ArchitectException { if (columnsFolder.isPopulated()) return; if (columnsFolder.children.size() > 0) throw new IllegalStateException("Can't populate table because it already contains columns"); try { SQLColumn.addColumnsToTable(this, getCatalogName(), ... | |
logger.debug("SQLTable: relationship populate finished"); | private synchronized void populateRelationships() throws ArchitectException { if (!columnsFolder.isPopulated()) throw new IllegalStateException("Table must be populated before relationships are added"); if (importedKeysFolder.isPopulated()) return; int oldSize = importedKeysFolder.children.size(); /* this must com... | |
if ( db.getSchemaVersion() < PVDatabase.CURRENT_SCHEMA_VERSION ) { SchemaUpdateAction updater = new SchemaUpdateAction( db ); updater.upgradeDatabase(); } | private JUnitOJBManager() { System.setProperty( "photovault.configfile", "conf/junittest_config.xml" ); log.error( "Initializing OB for JUnit tests" ); PhotovaultSettings settings = PhotovaultSettings.getSettings(); settings.setConfiguration( "pv_junit" ); PVDatabase db = settings.getDat... | |
for (int i = 0; i < entries.length; i++) { | for (int i = 0; entries != null && i < entries.length; i++) { | private void findAllMatchingTestMail(String username) throws SamplingException { try { org.apache.commons.net.pop3.POP3Client pop3Client = openConnection(username); // retrieve all messages POP3MessageInfo[] entries = null; try { entries = pop3Client... |
log.debug( "ImageFile = " + imageFile + " volume = " + volume.getName() + " base dir = " + volume.getBaseDir() ); | public File getImageFile() { ODMGXAWrapper txw = new ODMGXAWrapper(); txw.lock( this, Transaction.READ ); txw.commit(); return imageFile; } | |
if(!infoFileName.equals("")) { File infoFile = new File(infoFileName); if(infoFile.exists()) { textData.prepareMarkerInput(infoFile,maxDistance,null); if(!arg_quiet){ System.out.println("Using marker file " + infoFile.getName()); } textData.infoKnown = true; } else if(!this.arg_quiet) { System.out.println("info file " ... | File infoFile; if(infoFileName.equals("")) { infoFile = null; }else{ infoFile = new File(infoFileName); | private void processFile(String fileName,int fileType,String infoFileName){ try { int outputType; long maxDistance; long negMaxDistance; HaploData textData; File OutputFile; File inputFile; inputFile = new File(fileName); ... |
textData.generateDPrimeTable(maxDistance); | textData.generateDPrimeTable(); | private void processFile(String fileName,int fileType,String infoFileName){ try { int outputType; long maxDistance; long negMaxDistance; HaploData textData; File OutputFile; File inputFile; inputFile = new File(fileName); ... |
Thumbnail thumb = photo.getThumbnail(); | Thumbnail thumb = null; while ( thumb == null ) { try { thumb = photo.getThumbnail(); } catch ( Throwable e ) { log.warn( "Out of memory while creating thumbnail" ); try { sleep( 5 * 1000 ); } catch ( InterruptedException e1 ) { } } } | public void run() { synchronized ( this ) { while ( true ) { try { log.debug( "Waiting..." ); wait(); log.debug( "Waited..." ); if ( photo != null ) { log.debug( "Creating thumbnail for " + photo.getUid() ); Thumbnail thumb = photo.getThumbnail(); log.debug( "Done!" ); final PhotoIn... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.