rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
return null; | MockJDBCResultSet rs = new MockJDBCResultSet(null, 1); rs.setColumnName(1, "TABLE_TYPE"); rs.updateObject(1, "TABLE"); rs.beforeFirst(); return rs; | public ResultSet getTableTypes() throws SQLException { // TODO Auto-generated method stub return null; } |
String catalogList = connection.getProperties().getProperty("catalogs"); String schemaList = connection.getProperties().getProperty("schemas"); String tableList = connection.getProperties().getProperty("tables"); | if (logger.isDebugEnabled()) { logger.debug("getTables: Searching for:"); logger.debug(" catalog '"+catalogNamePattern+"' (pattern "+catalogPattern+")"); logger.debug(" schema '"+schemaNamePattern+"' (pattern "+schemaPattern+")"); logger.debug(" table '"+tableNamePattern+"' (pattern "+tablePattern+")"); } ... | public ResultSet getTables(String catalogNamePattern, String schemaNamePattern, String tableNamePattern, String[] types) throws SQLException { MockJDBCResultSet rs = new MockJDBCResultSet(null, 10); rs.setColumnName(1, "TABLE_CAT"); rs.setColumnName(2, "TABLE_SCHEM"); rs.setColumnName(3, "TABLE_NAME"); rs.set... |
Map<String,List<String>> schemas = new TreeMap<String,List<String>>(); if (getSchemaTerm() != null) { for (String cat : catalogs) { String schemaList; if (cat == NO_CATALOG) { schemaList = connection.getProperties().getProperty("schemas"); } else { schemaList = connection.getProperties().getProperty("schemas."+cat); } ... | public ResultSet getTables(String catalogNamePattern, String schemaNamePattern, String tableNamePattern, String[] types) throws SQLException { MockJDBCResultSet rs = new MockJDBCResultSet(null, 10); rs.setColumnName(1, "TABLE_CAT"); rs.setColumnName(2, "TABLE_SCHEM"); rs.setColumnName(3, "TABLE_NAME"); rs.set... | |
registerTag( "extend", ExtendTag.class ); registerTag( "super", SuperTag.class ); | public DefineTagLibrary() { registerTag( "taglib", TaglibTag.class ); registerTag( "tag", TagTag.class ); registerTag( "bean", BeanTag.class ); registerTag( "dynaBean", DynaBeanTag.class ); registerTag( "jellybean", JellyBeanTag.class ); registerTag( "attribute", AttributeT... | |
theHV.blockMenuItems[BLOX_CUSTOM].setSelected(true); | theHV.changeBlocks(BLOX_CUSTOM); | public void mouseClicked(MouseEvent e) { if ((e.getModifiers() & InputEvent.BUTTON1_MASK) == InputEvent.BUTTON1_MASK) { int clickX = e.getX(); int clickY = e.getY(); if (showWM && wmInteriorRect.contains(clickX,clickY)){ //convert a click on the ... |
theHV.blockMenuItems[BLOX_CUSTOM].setSelected(true); | theHV.changeBlocks(BLOX_CUSTOM); | public void mouseReleased(MouseEvent e) { //remove popped up window if ((e.getModifiers() & InputEvent.BUTTON3_MASK) == InputEvent.BUTTON3_MASK){ popupExists = false; repaint(); //resize window once user has ceased dragging } else if ((e.getModifiers(... |
void makeDialog(SQLTable st, int colIdx) throws ArchitectException { | private void makeDialog(SQLTable st, int colIdx) throws ArchitectException { | void makeDialog(SQLTable st, int colIdx) throws ArchitectException { if (editDialog != null) { columnEditPanel.setModel(st); columnEditPanel.selectColumn(colIdx); editDialog.setTitle("Column Properties of "+st.getName()); editDialog.setVisible(true); editDialog.requestFocus(); } else { JPanel panel = new... |
columnEditPanel.editColumn(colIdx); | void makeDialog(SQLTable st, int colIdx) throws ArchitectException { if (editDialog != null) { columnEditPanel.setModel(st); columnEditPanel.selectColumn(colIdx); editDialog.setTitle("Column Properties of "+st.getName()); editDialog.setVisible(true); editDialog.requestFocus(); } else { JPanel panel = new... | |
for (index = begin; iter.hasNext() && index < end; index += step) { | for (index = 0; index < begin && iter.hasNext(); index++ ) { iter.next(); } while (iter.hasNext() && index < end) { | 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... |
index++; for ( int i = 1; i < step; i++, index++ ) { if ( ! iter.hasNext() ) { return; } iter.next(); } | 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... | |
manager.redo(); | if (logger.isDebugEnabled()) { logger.debug(manager); int choice = JOptionPane.showConfirmDialog(null, "Undo manager state dumped to logger." + "\n\n" + "Proceed with redo?"); if (choice == JOptionPane.YES_OPTION) { manager.redo(); } } else { manager.redo(); } | public void actionPerformed(ActionEvent evt ) { manager.redo(); } |
return parent.findVariable(name); | answer = parent.findVariable(name); if ( answer == null ) { try { answer = System.getProperty(name); } catch (Throwable t) { } } | public Object findVariable(String name) { Object answer = variables.get(name); if ( answer == null && parent != null ) { return parent.findVariable(name); } return answer; } |
} if (tabNum == VIEW_TDT_NUM){ JTabbedPane metaAssoc= (JTabbedPane)tabs.getComponentAt(tabNum); HaploTDTPanel htp = (HaploTDTPanel) metaAssoc.getComponent(1); if (htp.initialHaplotypeDisplayThreshold != Options.getHaplotypeDisplayThreshold()){ metaAssoc.remove(1); metaAssoc.add("Haplotypes", new HaploTDTPanel(theDat... | 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... | |
Options.setAssocTest(0); | Options.setAssocTest(ASSOC_NONE); Options.setHaplotypeDisplayThreshold(1); Options.setMaxDistance(500); | public HaploView(){ //set defaults Options.setMissingThreshold(1.0); Options.setSpacingThreshold(0.0); Options.setAssocTest(0); try{ fc = new JFileChooser(System.getProperty("user.dir")); }catch(NullPointerException n){ try{ UIManager.se... |
String[] inputArray = new String[3]; | String[] inputArray = new String[2]; | public static void main(String[] args) { boolean nogui = false; //HaploView window; for(int i = 0;i<args.length;i++) { if(args[i].equals("-n") || args[i].equals("-h") || args[i].equals("-help")) { nogui = true; } } if(nogui) { HaploT... |
inputArray[2] = String.valueOf(Options.getMaxDistance()); | public static void main(String[] args) { boolean nogui = false; //HaploView window; for(int i = 0;i<args.length;i++) { if(args[i].equals("-n") || args[i].equals("-h") || args[i].equals("-help")) { nogui = true; } } if(nogui) { HaploT... | |
if (inputOptions[2].equals("")){ inputOptions[2] = "0"; } maxCompDist = Long.parseLong(inputOptions[2])*1000; | void readGenotypes(String[] inputOptions, int type){ //input is a 3 element array with //inputOptions[0] = ped file //inputOptions[1] = info file (null if none) //inputOptions[2] = max comparison distance (don't compute d' if markers are greater than this dist apart) //type is eit... | |
Options.setAssocTest(0); | Options.setAssocTest(ASSOC_NONE); | void readGenotypes(String[] inputOptions, int type){ //input is a 3 element array with //inputOptions[0] = ped file //inputOptions[1] = info file (null if none) //inputOptions[2] = max comparison distance (don't compute d' if markers are greater than this dist apart) //type is eit... |
if(Options.getAssocTest() > 0) { | if(Options.getAssocTest() != ASSOC_NONE) { | void readGenotypes(String[] inputOptions, int type){ //input is a 3 element array with //inputOptions[0] = ped file //inputOptions[1] = info file (null if none) //inputOptions[2] = max comparison distance (don't compute d' if markers are greater than this dist apart) //type is eit... |
tabs.addTab(viewItems[VIEW_TDT_NUM], tdtPanel); | metaAssoc.add(viewItems[VIEW_TDT_NUM], tdtPanel); HaploTDTPanel htp = new HaploTDTPanel(theData.getHaplotypes()); metaAssoc.add("Haplotypes", htp); tabs.addTab("Association Results", metaAssoc); | void readGenotypes(String[] inputOptions, int type){ //input is a 3 element array with //inputOptions[0] = ped file //inputOptions[1] = info file (null if none) //inputOptions[2] = max comparison distance (don't compute d' if markers are greater than this dist apart) //type is eit... |
if(Options.getAssocTest() > 0) { | if(Options.getAssocTest() != ASSOC_NONE) { | public Object construct(){ dPrimeDisplay=null; changeKey(1); theData.generateDPrimeTable(); theData.guessBlocks(BLOX_GABRIEL); //theData.guessBlocks(BLOX_NONE); //for debugging, doesn't call blocks at first ... |
tabs.addTab(viewItems[VIEW_TDT_NUM], tdtPanel); | metaAssoc.add(viewItems[VIEW_TDT_NUM], tdtPanel); HaploTDTPanel htp = new HaploTDTPanel(theData.getHaplotypes()); metaAssoc.add("Haplotypes", htp); tabs.addTab("Association Results", metaAssoc); | public Object construct(){ dPrimeDisplay=null; changeKey(1); theData.generateDPrimeTable(); theData.guessBlocks(BLOX_GABRIEL); //theData.guessBlocks(BLOX_NONE); //for debugging, doesn't call blocks at first ... |
ProgressMonitor pm = new ProgressMonitor(null, | ProgressMonitor pm = new ProgressMonitor(panel, | public boolean applyChanges() { wizard.addSourceDatabases(wizard.getSourceTables()); Map ddlGeneratorMap = ArchitectUtils.getDriverDDLGeneratorMap(); Class selectedGeneratorClass = (Class) ddlGeneratorMap.get( wizard.getPlExport().getTargetDataSource().getDriverClass()); if (selectedGeneratorClass == null) { ... |
public void fakeStructureChanged(String string) { fireDbStructureChanged(string); | public void fakeStructureChanged() { fireDbStructureChanged(); | public void fakeStructureChanged(String string) { fireDbStructureChanged(string); } |
((SQLObjectImpl)target).fakeStructureChanged("george"); | ((SQLObjectImpl)target).fakeStructureChanged(); | public final void testSQLObjectListenerHandling() throws ArchitectException { SQLObjectListener t = new TestListener(); TestListener tt = (TestListener)t; target.addSQLObjectListener(t); allowsChildren = true; tt.setChildInserted(false); final SQLObjectImpl objectImpl = new SQLObjectImpl(); target.addChild(... |
List<String> driverJarNameList = session.getDriverJarList(); | public UserSettings read(ArchitectSession session) throws IOException { Preferences prefs = ArchitectFrame.getMainInstance().getPrefs(); UserSettings userSettings = new UserSettings(); List<String> driverJarNameList = session.getDriverJarList(); int i; for (i = 0; i <= 99; i++) { String jarName = prefs.get(... | |
if (!driverJarNameList.contains(jarName)) { driverJarNameList.add(jarName); } | logger.debug("Adding JarName: " + jarName); session.addDriverJar(jarName); | public UserSettings read(ArchitectSession session) throws IOException { Preferences prefs = ArchitectFrame.getMainInstance().getPrefs(); UserSettings userSettings = new UserSettings(); List<String> driverJarNameList = session.getDriverJarList(); int i; for (i = 0; i <= 99; i++) { String jarName = prefs.get(... |
logger.debug("Pruning dead jar entry " + i); | public UserSettings read(ArchitectSession session) throws IOException { Preferences prefs = ArchitectFrame.getMainInstance().getPrefs(); UserSettings userSettings = new UserSettings(); List<String> driverJarNameList = session.getDriverJarList(); int i; for (i = 0; i <= 99; i++) { String jarName = prefs.get(... | |
for (int i = 0 ; i <= 99 && it.hasNext(); i++) { String name = it.next(); prefs.put(jarFilePrefName(i), name); | for (int i = 0 ; i <= 99; i++) { if (it.hasNext()) { String name = it.next(); logger.debug("Putting JAR " + i + " " + name); prefs.put(jarFilePrefName(i), name); } else { prefs.remove(jarFilePrefName(i)); } | public void write(ArchitectSession session) throws ArchitectException { Preferences prefs = ArchitectFrame.getMainInstance().getPrefs(); UserSettings userSettings = session.getUserSettings(); List<String> driverJarList = session.getDriverJarList(); Iterator<String> it = driverJarList.iterator(); for (int i = ... |
try { prefs.flush(); } catch (BackingStoreException e) { throw new ArchitectException("Unable to flush Java preferences", e); } | public void write(ArchitectSession session) throws ArchitectException { Preferences prefs = ArchitectFrame.getMainInstance().getPrefs(); UserSettings userSettings = session.getUserSettings(); List<String> driverJarList = session.getDriverJarList(); Iterator<String> it = driverJarList.iterator(); for (int i = ... | |
m_reader = new BufferedReader(new InputStreamReader(m_telnetClient.getInputStream())); | m_reader = new BufferedReader(new InputStreamReader(new BufferedInputStream(m_telnetClient.getInputStream(), 1024), "ASCII")); | public boolean login() { m_telnetClient = new TelnetClient(); try { m_telnetClient.connect(m_host, m_port); m_reader = new BufferedReader(new InputStreamReader(m_telnetClient.getInputStream())); m_writer = new OutputStreamWriter(m_telnetClient.getOutputStream()); ... |
delay(); | public boolean login() { m_telnetClient = new TelnetClient(); try { m_telnetClient.connect(m_host, m_port); m_reader = new BufferedReader(new InputStreamReader(m_telnetClient.getInputStream())); m_writer = new OutputStreamWriter(m_telnetClient.getOutputStream()); ... | |
long startTime = System.currentTimeMillis(); try { while (!m_reader.ready() && startTime + 100 > System.currentTimeMillis()) { try { Thread.sleep(20); } catch (InterruptedException e) { break; } } if (!m_reader.ready()) return null; } catch (IOException e) { return null; } StringBuffer stringBuffer = new StringBuffer(... | return readAnswer(0); | public List readAnswer() { long startTime = System.currentTimeMillis(); try { while (!m_reader.ready() && startTime + 100 > System.currentTimeMillis()) { try { Thread.sleep(20); } catch (InterruptedException e) { break; ... |
logger.debug("starting width is: " + width); | public Dimension getPreferredSize(JComponent jc) { TablePane c = (TablePane) jc; SQLTable table = c.getModel(); if (table == null) return null; int height = 0; int width = 0; try { Insets insets = c.getInsets(); java.util.List columnList = table.getColumns(); int cols = columnList.size(); Font font = c.g... | |
width = Math.max(width, metrics.stringWidth(columnIt.next().toString())); | String theColumn = columnIt.next().toString(); width = Math.max(width, metrics.stringWidth(theColumn)); logger.debug("new width is: " + width); | public Dimension getPreferredSize(JComponent jc) { TablePane c = (TablePane) jc; SQLTable table = c.getModel(); if (table == null) return null; int height = 0; int width = 0; try { Insets insets = c.getInsets(); java.util.List columnList = table.getColumns(); int cols = columnList.size(); Font font = c.g... |
if (path == null) { | if (containmentPath == null) { | public boolean contains(JComponent c, int x, int y) { if (path == null) { return false; } else { Point loc = relationship.getLocation(); return path.intersects(x - radius + loc.x, y - radius + loc.y, radius*2, radius*2); } } |
return path.intersects(x - radius + loc.x, y - radius + loc.y, radius*2, radius*2); | return containmentPath.intersects(x - radius + loc.x, y - radius + loc.y, radius*2, radius*2); | public boolean contains(JComponent c, int x, int y) { if (path == null) { return false; } else { Point loc = relationship.getLocation(); return path.intersects(x - radius + loc.x, y - radius + loc.y, radius*2, radius*2); } } |
return path.intersects(region.x, region.y, region.width, region.height); | return containmentPath.intersects(region.x, region.y, region.width, region.height); | public boolean intersects(Rectangle region) { return path.intersects(region.x, region.y, region.width, region.height); } |
if (path == null) { path = new GeneralPath(GeneralPath.WIND_NON_ZERO, 5); } else { path.reset(); } | containmentPath = new GeneralPath(GeneralPath.WIND_NON_ZERO, 10); | public void paint(Graphics g, JComponent c) { logger.debug("BasicRelationshipUI is painting"); Relationship r = (Relationship) c; Graphics2D g2 = (Graphics2D) g; g2.translate(c.getX() * -1, c.getY() * -1); // playpen coordinate space if (logger.isDebugEnabled()) { g2.setColor(c.getBackground()); Rectangle ... |
path.moveTo(start.x, start.y); path.lineTo(start.x, start.y + getTerminationLength() * 2); path.lineTo(end.x - getTerminationLength() * 2, start.y + getTerminationLength() * 2); path.lineTo(end.x - getTerminationLength() * 2, end.y); path.lineTo(end.x, end.y); | containmentPath.moveTo(start.x, start.y); containmentPath.lineTo(start.x, start.y + getTerminationLength() * 2); containmentPath.lineTo(end.x - getTerminationLength() * 2, start.y + getTerminationLength() * 2); containmentPath.lineTo(end.x - getTerminationLength() * 2, end.y); containmentPath.lineTo(end.x, end.y); path... | public void paint(Graphics g, JComponent c) { logger.debug("BasicRelationshipUI is painting"); Relationship r = (Relationship) c; Graphics2D g2 = (Graphics2D) g; g2.translate(c.getX() * -1, c.getY() * -1); // playpen coordinate space if (logger.isDebugEnabled()) { g2.setColor(c.getBackground()); Rectangle ... |
path.moveTo(start.x, start.y); path.lineTo(midx, start.y); path.lineTo(midx, end.y); path.lineTo(end.x, end.y); | containmentPath.moveTo(start.x, start.y); containmentPath.lineTo(midx, start.y); containmentPath.lineTo(midx, end.y); containmentPath.lineTo(end.x, end.y); path = new GeneralPath(containmentPath); | public void paint(Graphics g, JComponent c) { logger.debug("BasicRelationshipUI is painting"); Relationship r = (Relationship) c; Graphics2D g2 = (Graphics2D) g; g2.translate(c.getX() * -1, c.getY() * -1); // playpen coordinate space if (logger.isDebugEnabled()) { g2.setColor(c.getBackground()); Rectangle ... |
path.lineTo(midx, end.y); path.lineTo(midx, start.y); | containmentPath.lineTo(midx, end.y); containmentPath.lineTo(midx, start.y); containmentPath.moveTo(start.x, start.y); | public void paint(Graphics g, JComponent c) { logger.debug("BasicRelationshipUI is painting"); Relationship r = (Relationship) c; Graphics2D g2 = (Graphics2D) g; g2.translate(c.getX() * -1, c.getY() * -1); // playpen coordinate space if (logger.isDebugEnabled()) { g2.setColor(c.getBackground()); Rectangle ... |
path.moveTo(start.x, start.y); path.lineTo(start.x, midy); path.lineTo(end.x, midy); path.lineTo(end.x, end.y); | containmentPath.moveTo(start.x, start.y); containmentPath.lineTo(start.x, midy); containmentPath.lineTo(end.x, midy); containmentPath.lineTo(end.x, end.y); path = new GeneralPath(containmentPath); | public void paint(Graphics g, JComponent c) { logger.debug("BasicRelationshipUI is painting"); Relationship r = (Relationship) c; Graphics2D g2 = (Graphics2D) g; g2.translate(c.getX() * -1, c.getY() * -1); // playpen coordinate space if (logger.isDebugEnabled()) { g2.setColor(c.getBackground()); Rectangle ... |
path.lineTo(end.x, midy); path.lineTo(start.x, midy); | containmentPath.lineTo(end.x, midy); containmentPath.lineTo(start.x, midy); containmentPath.moveTo(start.x, start.y); | public void paint(Graphics g, JComponent c) { logger.debug("BasicRelationshipUI is painting"); Relationship r = (Relationship) c; Graphics2D g2 = (Graphics2D) g; g2.translate(c.getX() * -1, c.getY() * -1); // playpen coordinate space if (logger.isDebugEnabled()) { g2.setColor(c.getBackground()); Rectangle ... |
path.moveTo(start.x, start.y); path.lineTo(end.x, start.y); path.lineTo(end.x, end.y); | containmentPath.moveTo(start.x, start.y); containmentPath.lineTo(end.x, start.y); containmentPath.lineTo(end.x, end.y); path = new GeneralPath(containmentPath); | public void paint(Graphics g, JComponent c) { logger.debug("BasicRelationshipUI is painting"); Relationship r = (Relationship) c; Graphics2D g2 = (Graphics2D) g; g2.translate(c.getX() * -1, c.getY() * -1); // playpen coordinate space if (logger.isDebugEnabled()) { g2.setColor(c.getBackground()); Rectangle ... |
path.lineTo(end.x, start.y); | containmentPath.lineTo(end.x, start.y); containmentPath.moveTo(start.x, start.y); | public void paint(Graphics g, JComponent c) { logger.debug("BasicRelationshipUI is painting"); Relationship r = (Relationship) c; Graphics2D g2 = (Graphics2D) g; g2.translate(c.getX() * -1, c.getY() * -1); // playpen coordinate space if (logger.isDebugEnabled()) { g2.setColor(c.getBackground()); Rectangle ... |
path.moveTo(start.x, start.y); path.lineTo(start.x, end.y); path.lineTo(end.x, end.y); | containmentPath.moveTo(start.x, start.y); containmentPath.lineTo(start.x, end.y); containmentPath.lineTo(end.x, end.y); path = new GeneralPath(containmentPath); | public void paint(Graphics g, JComponent c) { logger.debug("BasicRelationshipUI is painting"); Relationship r = (Relationship) c; Graphics2D g2 = (Graphics2D) g; g2.translate(c.getX() * -1, c.getY() * -1); // playpen coordinate space if (logger.isDebugEnabled()) { g2.setColor(c.getBackground()); Rectangle ... |
path.lineTo(start.x, end.y); | containmentPath.lineTo(start.x, end.y); containmentPath.moveTo(start.x, start.y); | public void paint(Graphics g, JComponent c) { logger.debug("BasicRelationshipUI is painting"); Relationship r = (Relationship) c; Graphics2D g2 = (Graphics2D) g; g2.translate(c.getX() * -1, c.getY() * -1); // playpen coordinate space if (logger.isDebugEnabled()) { g2.setColor(c.getBackground()); Rectangle ... |
path.moveTo(start.x, start.y); path.lineTo(end.x, end.y); | containmentPath.moveTo(start.x, start.y); containmentPath.lineTo(end.x, end.y); path = new GeneralPath(containmentPath); | public void paint(Graphics g, JComponent c) { logger.debug("BasicRelationshipUI is painting"); Relationship r = (Relationship) c; Graphics2D g2 = (Graphics2D) g; g2.translate(c.getX() * -1, c.getY() * -1); // playpen coordinate space if (logger.isDebugEnabled()) { g2.setColor(c.getBackground()); Rectangle ... |
return (String)info[series].get(new Double(dataset.getXValue(series,item))); | return (String)info[seriesKeys[series]-1].get(new Double(dataset.getXValue(series,item))); | public String generateToolTip(XYDataset dataset, int series, int item){ return (String)info[series].get(new Double(dataset.getXValue(series,item))); } |
seriesKeys[seriesIndex] = i; seriesIndex++; | public XYSeriesCollection makeDataSet(int col){ int numRows = table.getRowCount(); long[] maxPositions = new long[25]; for (int i = 0; i < numRows; i++){ String chrom = (String)table.getValueAt(i,0); int chr = 0; if (chrom.equalsIgnoreCase("X")){ ... | |
protected void handleException(Exception e) throws Exception { | protected void handleException(JellyException e) throws Exception { | protected void handleException(Exception e) throws Exception { log.error( "Caught exception: " + e, e ); if ( e instanceof JellyException ) { e.fillInStackTrace(); throw e; } if ( e instanceof InvocationTargetException) { throw new JellyExce... |
if ( e instanceof JellyException ) { e.fillInStackTrace(); throw e; | if (e.getLineNumber() == -1) { e.setColumnNumber(columnNumber); e.setLineNumber(lineNumber); | protected void handleException(Exception e) throws Exception { log.error( "Caught exception: " + e, e ); if ( e instanceof JellyException ) { e.fillInStackTrace(); throw e; } if ( e instanceof InvocationTargetException) { throw new JellyExce... |
if ( e instanceof InvocationTargetException) { throw new JellyException( ((InvocationTargetException)e).getTargetException(), fileName, elementName, columnNumber, lineNumber ); | if ( e.getFileName() == null ) { e.setFileName( fileName ); | protected void handleException(Exception e) throws Exception { log.error( "Caught exception: " + e, e ); if ( e instanceof JellyException ) { e.fillInStackTrace(); throw e; } if ( e instanceof InvocationTargetException) { throw new JellyExce... |
throw new JellyException(e, fileName, elementName, columnNumber, lineNumber); | if ( e.getElementName() == null ) { e.setElementName( elementName ); } throw e; | protected void handleException(Exception e) throws Exception { log.error( "Caught exception: " + e, e ); if ( e instanceof JellyException ) { e.fillInStackTrace(); throw e; } if ( e instanceof InvocationTargetException) { throw new JellyExce... |
if ((evt.getModifiersEx() & InputEvent.BUTTON1_DOWN_MASK) != 0) { | if ((evt.getModifiersEx() & InputEvent.BUTTON1_DOWN_MASK) != 0 && !evt.isPopupTrigger()) { | 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... |
final LoginDlg dlg = this; | protected void createUI() { GridBagConstraints labelConstraints = new GridBagConstraints(); labelConstraints.insets = new Insets( 2, 20, 2, 2 ); labelConstraints.anchor = GridBagConstraints.EAST; labelConstraints.gridwidth = GridBagConstraints.RELATIVE; //next-to-last labelConstraints.fill = GridBagConstrain... | |
task.init(); if ( "echo".equals( task.getTaskName() ) ) { Echo echoTask = (Echo) task; echoTask.addText( getBodyText() ); echoTask.perform(); echoTask.setMessage( "" ); } else { getBody().run(context, output); task.perform(); } | task.perform(); | public void doTag(XMLOutput output) throws Exception { task.init(); if ( "echo".equals( task.getTaskName() ) ) { Echo echoTask = (Echo) task; echoTask.addText( getBodyText() ); echoTask.perform(); echoTask.setMessage( "" ); } ... |
public Task getTask() { | public Task getTask() throws Exception { if ( task == null ) { task = (Task) taskType.newInstance(); task.setProject(project); task.setTaskName(taskName); task.init(); setDynaBean( new ConvertingWrapDynaBean(task) ); } | public Task getTask() { return task; } |
public Object getTaskObject() { return task; | public Object getTaskObject() throws Exception { return getTask(); | public Object getTaskObject() { return task; } |
public long getMorganDistance(){ | public double getMorganDistance(){ | public long getMorganDistance(){ return morganDistance; } |
Object[] arguments = { parent, new Integer(style)}; return constructor.newInstance(arguments); | if (types[0].isAssignableFrom(parent.getClass())) { Object[] arguments = { parent, new Integer(style)}; return constructor.newInstance(arguments); } | protected Object createWidget(Class theClass, Widget parent, int style) throws Exception { if (theClass == null) { throw new JellyException( "No Class available to create the new widget"); } if (parent == null) { // lets try call a constructor with a single style ... |
DBTree dbtree = ArchitectFrame.getMainInstance().dbTree; | public void drop(DropTargetDropEvent dtde) { if (tpTarget != null) { tpTarget.getDropTarget().drop(dtde); return; } Transferable t = dtde.getTransferable(); PlayPen c = (PlayPen) dtde.getDropTargetContext().getComponent(); DataFlavor importFlavor = bestImportFlavor(c, t.getTransferDataFlavors()); if... | |
Iterator pathIt = paths.iterator(); Point dropLoc = c.unzoomPoint(new Point(dtde.getLocation())); while (pathIt.hasNext()) { Object someData = dbtree.getNodeForDnDPath((int[]) pathIt.next()); if (someData instanceof SQLTable) { TablePane tp = c.importTableCopy((SQLTable) someData, dropLoc); dropLoc.x += tp.getPreferre... | Point dropLoc = c.unzoomPoint(new Point(dtde.getLocation())); c.addObjects(paths, dropLoc); | public void drop(DropTargetDropEvent dtde) { if (tpTarget != null) { tpTarget.getDropTarget().drop(dtde); return; } Transferable t = dtde.getTransferable(); PlayPen c = (PlayPen) dtde.getDropTargetContext().getComponent(); DataFlavor importFlavor = bestImportFlavor(c, t.getTransferDataFlavors()); if... |
setDynaBean( new WrapDynaBean(propertyBean) ); | setDynaBean( new ConvertingWrapDynaBean(propertyBean) ); | public void compile() throws Exception { TaskTag tag = (TaskTag) findAncestorWithClass( TaskTag.class ); if ( tag == null ) { throw new JellyException( "You should only use Ant DataType tags within an Ant Task" ); } Task task = tag.getTask(); Class taskC... |
if (currentInd.getGender() == 2 || !Chromosome.getDataChrom().equals("chrx")){ | if (currentInd.getGender() == 2 || !Chromosome.getDataChrom().equalsIgnoreCase("chrx")){ | private void buildCCSet(PedFile pf, Vector affectedStatus, TreeSet snpsToBeTested){ ArrayList results = new ArrayList(); int numMarkers = Chromosome.getUnfilteredSize(); Vector indList = pf.getUnrelatedIndividuals(); int numInds = indList.size(); if(affectedStatus == null || affec... |
public void doTag(XMLOutput xmlOutput) throws Exception { | public void doTag(XMLOutput xmlOutput) throws JellyTagException { | public void doTag(XMLOutput xmlOutput) throws Exception { HttpContextTag httpContext = (HttpContextTag) findAncestorWithClass( HttpContextTag.class); if ( httpContext == null ) { throw new JellyTagException( "<notFoundHandler> tag must be enclosed inside a <httpContext> tag" ); ... |
logger.debug("getting physical name for: " + logicalName); String ident = logicalName.replace(' ','_').toUpperCase(); logger.debug("after replace of spaces: " + ident); | if (logger.isDebugEnabled()) logger.debug("getting physical name for: " + logicalName); String ident = logicalName.replace(' ','_').toLowerCase(); if (logger.isDebugEnabled()) logger.debug("after replace of spaces: " + ident); | public String toIdentifier(String logicalName, String physicalName) { // replace spaces with underscores if (logicalName == null) return null; logger.debug("getting physical name for: " + logicalName); String ident = logicalName.replace(' ','_').toUpperCase(); logger.debug("after replace of spaces: " + ident); /... |
logger.debug("identifiers must start with letter, appending X: " + ident); | if (logger.isDebugEnabled()) logger.debug("identifiers must start with letter; prepending X: " + ident); | public String toIdentifier(String logicalName, String physicalName) { // replace spaces with underscores if (logicalName == null) return null; logger.debug("getting physical name for: " + logicalName); String ident = logicalName.replace(' ','_').toUpperCase(); logger.debug("after replace of spaces: " + ident); /... |
logger.debug("identifier was reserved word, appending X: " + ident); | if (logger.isDebugEnabled()) logger.debug("identifier was reserved word, prepending X: " + ident); | public String toIdentifier(String logicalName, String physicalName) { // replace spaces with underscores if (logicalName == null) return null; logger.debug("getting physical name for: " + logicalName); String ident = logicalName.replace(' ','_').toUpperCase(); logger.debug("after replace of spaces: " + ident); /... |
String tempString = ident; Pattern p2 = Pattern.compile("[^a-xA-Z0-9_$]"); Matcher m2 = p2.matcher(ident); while (m2.find()) { tempString = tempString.replace(m2.group(),"_"); } | ident = ident.replaceAll("[^a-zA-Z0-9_$]", "_"); | public String toIdentifier(String logicalName, String physicalName) { // replace spaces with underscores if (logicalName == null) return null; logger.debug("getting physical name for: " + logicalName); String ident = logicalName.replace(' ','_').toUpperCase(); logger.debug("after replace of spaces: " + ident); /... |
if (ident.length() < 129) { | if (ident.length() <= 63) { | public String toIdentifier(String logicalName, String physicalName) { // replace spaces with underscores if (logicalName == null) return null; logger.debug("getting physical name for: " + logicalName); String ident = logicalName.replace(' ','_').toUpperCase(); logger.debug("after replace of spaces: " + ident); /... |
logger.debug("truncating identifier: " + ident); String base = ident.substring(0,125); | if (logger.isDebugEnabled()) logger.debug("truncating identifier: " + ident); String base = ident.substring(0, 60); | public String toIdentifier(String logicalName, String physicalName) { // replace spaces with underscores if (logicalName == null) return null; logger.debug("getting physical name for: " + logicalName); String ident = logicalName.replace(' ','_').toUpperCase(); logger.debug("after replace of spaces: " + ident); /... |
logger.debug("new identifier: " + base + tiebreaker); | if (logger.isDebugEnabled()) logger.debug("new identifier: " + base + tiebreaker); | public String toIdentifier(String logicalName, String physicalName) { // replace spaces with underscores if (logicalName == null) return null; logger.debug("getting physical name for: " + logicalName); String ident = logicalName.replace(' ','_').toUpperCase(); logger.debug("after replace of spaces: " + ident); /... |
logger.debug("physical identifier is not unique, regenerating: " + physicalName); | if (logger.isDebugEnabled()) logger.debug("physical identifier is not unique, regenerating: " + physicalName); | public String toIdentifier(String logicalName, String physicalName) { // replace spaces with underscores if (logicalName == null) return null; logger.debug("getting physical name for: " + logicalName); String ident = logicalName.replace(' ','_').toUpperCase(); logger.debug("after replace of spaces: " + ident); /... |
if (ident.length() > 125) { base = ident.substring(0,125); | if (ident.length() > 63) { base = ident.substring(0, 60); | public String toIdentifier(String logicalName, String physicalName) { // replace spaces with underscores if (logicalName == null) return null; logger.debug("getting physical name for: " + logicalName); String ident = logicalName.replace(' ','_').toUpperCase(); logger.debug("after replace of spaces: " + ident); /... |
logger.debug("regenerated identifier is: " + (base + tiebreaker)); | if (logger.isDebugEnabled()) logger.debug("regenerated identifier is: " + (base + tiebreaker)); | public String toIdentifier(String logicalName, String physicalName) { // replace spaces with underscores if (logicalName == null) return null; logger.debug("getting physical name for: " + logicalName); String ident = logicalName.replace(' ','_').toUpperCase(); logger.debug("after replace of spaces: " + ident); /... |
out.println("-- Created by SQLPower DB2 DDL Generator "+GENERATOR_VERSION+" --"); | println("-- Created by SQLPower DB2 DDL Generator "+GENERATOR_VERSION+" --"); | public void writeHeader() { out.println("-- Created by SQLPower DB2 DDL Generator "+GENERATOR_VERSION+" --"); } |
JButton okButton = new JButton(ArchitectPanelBuilder.OK_BUTTON_LABEL); | JDefaultButton okButton = new JDefaultButton(ArchitectPanelBuilder.OK_BUTTON_LABEL); | public void actionPerformed(ActionEvent e) { // ArchitectPanelBuilder cannot handle this because of the // wizard-style buttons (right-justified FlowLayout). final JDialog d = new JDialog(frame,title ); JPanel plr = new JPanel(new BorderLayout(12,12)); plr.setBorder(BorderFactory.createEmptyBorder(12,12,12,12... |
return (Project) context.getVariable( "org.apache.commons.jelly.werkz.Project" ); | return (Project) context.findVariable( "org.apache.commons.jelly.werkz.Project" ); | protected Project getProject() { ProjectTag tag = (ProjectTag) findAncestorWithClass(ProjectTag.class); if ( tag != null) { return tag.getProject(); } return (Project) context.getVariable( "org.apache.commons.jelly.werkz.Project" ); } |
dbcsPanel.setDbcs(new ArchitectDataSource()); | dbcsPanel.setDbcs(dbcs); | public void actionPerformed(ActionEvent e) { TreePath p = getSelectionPath(); if (p == null) { return; } Object [] pathArray = p.getPath(); int ii = 0; SQLDatabase sd = null; while (ii < pathArray.length && sd == null) { if (pathArray[ii] instanceof SQLDatabase) { sd = (SQLDatabase) pathArr... |
DBCS_OkAction okButton = new DBCS_OkAction(dbcsPanel,true); | DBCS_OkAction okButton = new DBCS_OkAction(dbcsPanel,false); | public void actionPerformed(ActionEvent e) { TreePath p = getSelectionPath(); if (p == null) { return; } Object [] pathArray = p.getPath(); int ii = 0; SQLDatabase sd = null; while (ii < pathArray.length && sd == null) { if (pathArray[ii] instanceof SQLDatabase) { sd = (SQLDatabase) pathArr... |
finally { if ( ! context.isCacheTags() ) { clearTag(); } } | public void run(JellyContext context, XMLOutput output) throws Exception { Tag tag = getTag(); if ( tag == null ) { return; } tag.setContext(context); // initialize all the properties of the tag before its used // if there is a problem abort this tag ... | |
maf = Math.rint(100.0*(numa1/(numa1+numa2)))/100.0; | maf = Math.rint(100.0*(numa2/(numa1+numa2)))/100.0; | void prepareMarkerInput(File infile, String[][] hapmapGoodies) throws IOException, HaploViewException{ //this method is called to gather data about the markers used. //It is assumed that the input file is two columns, the first being //the name and the second the absolute position. the maxdist ... |
testRefImageDir = new File( "c:\\java\\photovault\\tests\\images\\photovault\\swingui\\TestThumbnailView\\" ); | testRefImageDir = new File( "/home/harri/projects/photovault/tests/images/photovault/swingui/TestThumbnailView/" ); | public Test_ThumbnailView() { testRefImageDir = new File( "c:\\java\\photovault\\tests\\images\\photovault\\swingui\\TestThumbnailView\\" ); testRefImageDir.mkdirs(); } |
File f = new File( "c:\\temp\\errorFile.png" ); | File f = new File( "/tmp/errorFile.png" ); | private boolean compareImgToFile( BufferedImage img, File file ) { if ( file.exists() ) { log.debug( "File exists" ); BufferedImage fImg = null; try { fImg = ImageIO.read( file ); log.debug( "Read image" ); } catch ( IOException e ) { log.warn( "Error reading image: " + e.getMessage() ); retu... |
File f = new File("c:\\java\\photovault\\testfiles\\test1.jpg" ); | File f = new File(testImgDir, "test1.jpg" ); | protected void setUp() { // Create a frame with the test instance name as the title frame = new JFrame(getName()); pane = (JPanel)frame.getContentPane(); pane.setLayout(new FlowLayout()); pane.setBorder(new EmptyBorder(50, 50, 50, 50)); tester = ComponentTester.getT... |
public void registerBeanTag(String name, BeanTag tag) { templates.put(name, tag); | public void registerBeanTag(String name, TagFactory factory) { templates.put(name, factory); | public void registerBeanTag(String name, BeanTag tag) { templates.put(name, tag); } |
log.warn( "Creating thumbnail" ); | log.debug( "Creating thumbnail" ); | protected void createThumbnail( Volume volume ) { log.warn( "Creating thumbnail" ); ODMGXAWrapper txw = new ODMGXAWrapper(); txw.lock( this, Transaction.WRITE ); // Find the original image to use as a staring point ImageInstance original = null; for ( int n = 0; n < instances.size(); n++ ) { ImageInstance inst... |
log.debug( "Finding thumbnail for " + uid ); | log.debug( "getThumbnail: Finding thumbnail for " + uid ); | public Thumbnail getThumbnail() { log.debug( "Finding thumbnail for " + uid ); if ( thumbnail == null ) { // First try to find an instance from existing instances ImageInstance original = null; for ( int n = 0; n < instances.size(); n++ ) { ImageInstance instance = (ImageInstance) instances.get( n ); ... |
log.debug( "No thumbnail found, creating" ); | public Thumbnail getThumbnail() { log.debug( "Finding thumbnail for " + uid ); if ( thumbnail == null ) { // First try to find an instance from existing instances ImageInstance original = null; for ( int n = 0; n < instances.size(); n++ ) { ImageInstance instance = (ImageInstance) instances.get( n ); ... | |
log.debug( "Finding thumbnail for " + uid ); | log.debug( "hasThumbnail: Finding thumbnail for " + uid ); | public boolean hasThumbnail() { log.debug( "Finding thumbnail for " + uid ); if ( thumbnail == null ) { // First try to find an instance from existing instances ImageInstance original = null; for ( int n = 0; n < instances.size(); n++ ) { ImageInstance instance = (ImageInstance) instances.get( n ); if... |
exportMenuItems[2].setEnabled(false); | exportMenuItems[3].setEnabled(false); | public void stateChanged(ChangeEvent e) { if (tabs.getSelectedIndex() != -1){ window.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); String title = tabs.getTitleAt(tabs.getSelectedIndex()); if (title.equals(VIEW_DPRIME) || title.equals(VIEW_HAPL... |
return -left; | return -1; | public int getPreciseMarkerAt(double pos){ int where = Arrays.binarySearch(alignedPositions,pos); if (where >= 0){ return where; }else{ int left = -where-2; int right = -where-1; if (left < 0){ left = 0; right = 1; ... |
displayStrings = new Vector(); currentSelection = new String ("Last Selection: "); if (theData.infoKnown){ displayStrings.add(new String (Chromosome.getMarker(marker).getDisplayName())); currentSelection += Chromosome.getMarker(marker).getName(); }else{ displayStrings.add(new String("Marker " + (Chromosome.realIndex[m... | if (theData.infoKnown){ displayStrings.add(new String (Chromosome.getMarker(marker).getDisplayName())); currentSelection += Chromosome.getMarker(marker).getName(); }else{ displayStrings.add(new String("Marker " + (Chromosome.realIndex[marker]+1))); currentSelection += new String("Marker " + (Chromosome.realIndex[marker... | 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... |
displayStrings.add(new String ("MAF: " + Chromosome.getMarker(marker).getMAF())); if (Chromosome.getMarker(marker).getExtra() != null) displayStrings.add(new String (Chromosome.getMarker(marker).getExtra())); currentSelection += new String (", MAF: " + Chromosome.getMarker(marker).getMAF()); | 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... | |
currentSelection = null; | public void mouseReleased(MouseEvent e) { if ((e.getModifiers() & InputEvent.BUTTON3_MASK) == InputEvent.BUTTON3_MASK){ //remove popped up window popupDrawRect = null; //cache last selection. lastSelection = currentSelection; repaint(); ... | |
Color green = new Color(0, 127, 0); | Color green = new Color(0, 170, 0); | public void paintComponent(Graphics g){ DPrimeTable dPrimeTable = theData.dpTable; if (Chromosome.getSize() < 2){ //if there zero or only one valid marker return; } Vector blocks = theData.blocks; Rectangle visRect = getVisibleRect(); //deal with zoomi... |
float cornerx = (float)xx-12.0f; float cornery = top-2; float xpoints[] = {cornerx,cornerx+24.0f,cornerx+4.6f,cornerx+12.0f,cornerx+19.4f}; float ypoints[] = {cornery,cornery,cornery+14.1f,cornery-8.7f,cornery+14.1f}; GeneralPath star = new GeneralPath(GeneralPath.WIND_NON_ZERO,xpoints.length); star.moveTo(xpoints[0],y... | float cornerx = (float)xx-10; float cornery = top; float xpoints[] = {cornerx,cornerx+20,cornerx+10}; float ypoints[] = {cornery,cornery,cornery-10}; GeneralPath triangle = new GeneralPath(GeneralPath.WIND_NON_ZERO,xpoints.length); triangle.moveTo(xpoints[0],ypoints[0]); | public void paintComponent(Graphics g){ DPrimeTable dPrimeTable = theData.dpTable; if (Chromosome.getSize() < 2){ //if there zero or only one valid marker return; } Vector blocks = theData.blocks; Rectangle visRect = getVisibleRect(); //deal with zoomi... |
star.lineTo(xpoints[index],ypoints[index]); | triangle.lineTo(xpoints[index],ypoints[index]); | public void paintComponent(Graphics g){ DPrimeTable dPrimeTable = theData.dpTable; if (Chromosome.getSize() < 2){ //if there zero or only one valid marker return; } Vector blocks = theData.blocks; Rectangle visRect = getVisibleRect(); //deal with zoomi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.