rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
setFkConnectionPoint(ui.closestEdgePoint(false, getFkConnectionPoint())); | setFkConnectionPoint(((RelationshipUI) getUI()).closestEdgePoint(false, getFkConnectionPoint())); | public void componentResized(PlayPenComponentEvent e) { logger.debug("Component "+e.getPPComponent().getName()+" changed size"); if (e.getPPComponent() == pkTable) { setPkConnectionPoint(ui.closestEdgePoint(true, getPkConnectionPoint())); // true == PK } if (e.getPPComponent() == fkTable) { setFkConnect... |
p = r.ui.closestEdgePoint(movingPk, p); | p = ((RelationshipUI) r.getUI()).closestEdgePoint(movingPk, p); | protected Point translatePoint(Point p) { if (movingPk) { p.x = p.x - r.getPkTable().getX(); p.y = p.y - r.getPkTable().getY(); p = r.ui.closestEdgePoint(movingPk, p); } else { p.x = p.x - r.getFkTable().getX(); p.y = p.y - r.getFkTable().getY(); p = r.ui.closestEdgePoint(movingPk, p); } ret... |
return ui.getFkConnectionPoint(); | return ((RelationshipUI) getUI()).getFkConnectionPoint(); | public Point getFkConnectionPoint() { return ui.getFkConnectionPoint(); } |
return ui.getPkConnectionPoint(); | return ((RelationshipUI) getUI()).getPkConnectionPoint(); | public Point getPkConnectionPoint() { return ui.getPkConnectionPoint(); } |
return ui.getPreferredLocation(); | return ((RelationshipUI) getUI()).getPreferredLocation(); | public Point getPreferredLocation() { return ui.getPreferredLocation(); } |
return ui.intersects(region); | return ((RelationshipUI) getUI()).intersects(region); | public boolean intersects(Rectangle region) { return ui.intersects(region); } |
ui.setFkConnectionPoint(p); | ((RelationshipUI) getUI()).setFkConnectionPoint(p); | public void setFkConnectionPoint(Point p) { ui.setFkConnectionPoint(p); revalidate(); } |
ui.setPkConnectionPoint(p); | ((RelationshipUI) getUI()).setPkConnectionPoint(p); | public void setPkConnectionPoint(Point p) { ui.setPkConnectionPoint(p); revalidate(); } |
public TDTResult() { | public TDTResult(SNP tempSNP) { | public TDTResult() { counts = new int[2][2]; } |
this.theSNP = tempSNP; | public TDTResult() { counts = new int[2][2]; } | |
public double getChiSq() { | public double getChiSq(int type) { | public double getChiSq() { if(!this.chiSet){ this.chiSqVal = Math.pow( (this.counts[0][0] - this.counts[0][1]),2) / (this.counts[0][0] + this.counts[0][1]); this.chiSqVal = Math.rint(this.chiSqVal*1000.0)/1000.0; this.chiSet = true; } return this.chiSqVal; } |
this.chiSqVal = Math.pow( (this.counts[0][0] - this.counts[0][1]),2) / (this.counts[0][0] + this.counts[0][1]); | if (type == 1){ this.chiSqVal = Math.pow( (this.counts[0][0] - this.counts[0][1]),2) / (this.counts[0][0] + this.counts[0][1]); }else{ int N = counts[0][0] + counts[0][1] + counts[1][0] + counts[1][1]; for (int i = 0; i < 2; i++){ for (int j = 0; j < 2; j++){ double nij = ((double)(counts[i][0] + counts[i][1])*(counts[... | public double getChiSq() { if(!this.chiSet){ this.chiSqVal = Math.pow( (this.counts[0][0] - this.counts[0][1]),2) / (this.counts[0][0] + this.counts[0][1]); this.chiSqVal = Math.rint(this.chiSqVal*1000.0)/1000.0; this.chiSet = true; } return this.chiSqVal; } |
public double getPValue() { | public String getPValue() { | public double getPValue() { double pval = 0; pval= MathUtil.gammq(.5,.5*getChiSq()); return Math.rint(pval*10000.0)/10000.0; } |
pval= MathUtil.gammq(.5,.5*getChiSq()); return Math.rint(pval*10000.0)/10000.0; | pval= MathUtil.gammq(.5,.5*this.chiSqVal); DecimalFormat df; if (pval < 0.0001){ df = new DecimalFormat("0.0000E0"); }else{ df = new DecimalFormat(); df.setMaximumFractionDigits(4); } String formattedNumber = df.format(pval, new StringBuffer(), new FieldPosition(NumberFormat.INTEGER_FIELD)).toString(); return format... | public double getPValue() { double pval = 0; pval= MathUtil.gammq(.5,.5*getChiSq()); return Math.rint(pval*10000.0)/10000.0; } |
public String getTURatio() { return this.counts[0][0] + ":" + this.counts[0][1]; | public String getTURatio(int type) { if (type == 1){ return this.counts[0][0] + ":" + this.counts[0][1]; }else{ return this.counts[0][0] + ":" + this.counts[0][1] + ", " + this.counts[1][0] + ":" + this.counts[1][1]; } | public String getTURatio() { return this.counts[0][0] + ":" + this.counts[0][1]; } |
InputStream in = new FileInputStream(name); Script script = parser.parse(in); script = script.compile(); log.info("Evaluating: " + script); script.run(parser.getContext(), output); | context.runScript(new File(name), output); | protected void runScript(String name) throws Exception { InputStream in = new FileInputStream(name); Script script = parser.parse(in); script = script.compile(); log.info("Evaluating: " + script); script.run(parser.getContext(), output); } |
runScript("src/test/org/apache/commons/jelly/define/babelfishTaglib.jelly"); | public void testParse() throws Exception { StringWriter buffer = new StringWriter(); output = XMLOutput.createXMLOutput(buffer); runScript("src/test/org/apache/commons/jelly/define/babelfishTaglib.jelly"); runScript("src/test/org/apache/commons/jelly/define/example.jelly"... | |
private static void displayExceptionDialog(Component parent, String message, Throwable throwable) { | private static void displayExceptionDialog(final Component parent, String message, final Throwable throwable) { JDialog dialog; | private static void displayExceptionDialog(Component parent, String message, Throwable throwable) { if (parent == null) { logger.error("displayExceptionDialog with null parent for message " + message); } else if (parent instanceof Frame) { dialog = new JDialog((Frame) parent, "Er... |
final StringWriter traceWriter = new StringWriter(); throwable.printStackTrace(new PrintWriter(traceWriter)); try { traceWriter.close(); } catch (IOException e1) { } | Throwable t = throwable; StringWriter stringWriter = new StringWriter(); final PrintWriter traceWriter = new PrintWriter(stringWriter); do { printStackTrace(t, traceWriter); t = t.getCause(); if (t != null) { traceWriter.println("Caused by:"); } } while (t != null); traceWriter.close(); | private static void displayExceptionDialog(Component parent, String message, Throwable throwable) { if (parent == null) { logger.error("displayExceptionDialog with null parent for message " + message); } else if (parent instanceof Frame) { dialog = new JDialog((Frame) parent, "Er... |
final JScrollPane detailScroller = new JScrollPane(new JTextArea(traceWriter.toString())); | final JScrollPane detailScroller = new JScrollPane(new JTextArea(stringWriter.toString())); | private static void displayExceptionDialog(Component parent, String message, Throwable throwable) { if (parent == null) { logger.error("displayExceptionDialog with null parent for message " + message); } else if (parent instanceof Frame) { dialog = new JDialog((Frame) parent, "Er... |
dialog.add(messageComponent, BorderLayout.CENTER); | finalDialogReference.add(messageComponent, BorderLayout.CENTER); | private static void displayExceptionDialog(Component parent, String message, Throwable throwable) { if (parent == null) { logger.error("displayExceptionDialog with null parent for message " + message); } else if (parent instanceof Frame) { dialog = new JDialog((Frame) parent, "Er... |
dialog.pack(); | finalDialogReference.pack(); | private static void displayExceptionDialog(Component parent, String message, Throwable throwable) { if (parent == null) { logger.error("displayExceptionDialog with null parent for message " + message); } else if (parent instanceof Frame) { dialog = new JDialog((Frame) parent, "Er... |
dialog.remove(messageComponent); | finalDialogReference.remove(messageComponent); | private static void displayExceptionDialog(Component parent, String message, Throwable throwable) { if (parent == null) { logger.error("displayExceptionDialog with null parent for message " + message); } else if (parent instanceof Frame) { dialog = new JDialog((Frame) parent, "Er... |
dialog.setSize(SIZE_NODETAILS); | finalDialogReference.setSize(SIZE_NODETAILS); | private static void displayExceptionDialog(Component parent, String message, Throwable throwable) { if (parent == null) { logger.error("displayExceptionDialog with null parent for message " + message); } else if (parent instanceof Frame) { dialog = new JDialog((Frame) parent, "Er... |
dialog.dispose(); dialog.setVisible(false); | finalDialogReference.dispose(); finalDialogReference.setVisible(false); | private static void displayExceptionDialog(Component parent, String message, Throwable throwable) { if (parent == null) { logger.error("displayExceptionDialog with null parent for message " + message); } else if (parent instanceof Frame) { dialog = new JDialog((Frame) parent, "Er... |
dialog.add(messageComponent, BorderLayout.CENTER); | finalDialogReference.add(messageComponent, BorderLayout.CENTER); | public void actionPerformed(ActionEvent e) { // System.out.println("showDetails=" + showDetails); if (showDetails) { dialog.add(messageComponent, BorderLayout.CENTER); detailsButton.setText("Hide Details"); dialog.pack();... |
dialog.pack(); | finalDialogReference.pack(); | public void actionPerformed(ActionEvent e) { // System.out.println("showDetails=" + showDetails); if (showDetails) { dialog.add(messageComponent, BorderLayout.CENTER); detailsButton.setText("Hide Details"); dialog.pack();... |
dialog.remove(messageComponent); | finalDialogReference.remove(messageComponent); | public void actionPerformed(ActionEvent e) { // System.out.println("showDetails=" + showDetails); if (showDetails) { dialog.add(messageComponent, BorderLayout.CENTER); detailsButton.setText("Hide Details"); dialog.pack();... |
dialog.setSize(SIZE_NODETAILS); | finalDialogReference.setSize(SIZE_NODETAILS); | public void actionPerformed(ActionEvent e) { // System.out.println("showDetails=" + showDetails); if (showDetails) { dialog.add(messageComponent, BorderLayout.CENTER); detailsButton.setText("Hide Details"); dialog.pack();... |
dialog.dispose(); dialog.setVisible(false); | finalDialogReference.dispose(); finalDialogReference.setVisible(false); | public void actionPerformed(ActionEvent e) { dialog.dispose(); dialog.setVisible(false); } |
label.paint(imageGraphics); | label.repaint(); | 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 =... |
photo.createThumbnail(); | public void testThumbnailCreateCorruptInstances() throws Exception { String testImgDir = "c:\\java\\photovault\\testfiles"; String fname = "test1.jpg"; File f = new File( testImgDir, fname ); PhotoInfo photo = null; try { photo = PhotoInfo.addToDB( f ); } catch ( PhotoNotFoundException e ) { fail( "Could n... | |
photo.createThumbnail(); | public void testThumbnailCreateCorruptInstances() throws Exception { String testImgDir = "c:\\java\\photovault\\testfiles"; String fname = "test1.jpg"; File f = new File( testImgDir, fname ); PhotoInfo photo = null; try { photo = PhotoInfo.addToDB( f ); } catch ( PhotoNotFoundException e ) { fail( "Could n... | |
new File(CoreUtils.getLogDir()).mkdirs(); | public static void main(String[] args) throws Exception{ UserManager userManager = UserManager.getInstance(); User user = null; char[] password = null; int invalidAttempts = 0; if(args.length == 1){ password = args[0].toCharArray(); user = userManager.verifyU... | |
theData.filteredDPrimeTable = theData.getFilteredTable(); | public void stateChanged(ChangeEvent e) { viewMenuItems[tabs.getSelectedIndex()].setSelected(true); if (checkPanel != null && checkPanel.changed){ window.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); JTable table = checkPanel.getTable(); ... | |
tdtPanel.refreshTable(); | public void stateChanged(ChangeEvent e) { viewMenuItems[tabs.getSelectedIndex()].setSelected(true); if (checkPanel != null && checkPanel.changed){ window.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); JTable table = checkPanel.getTable(); ... | |
e.getSQLSource().removeSQLObjectListener(this); try { ArchitectUtils.unlistenToHierarchy(this,((SQLTable)e.getSQLSource().getParent()).getColumnsFolder()); } catch (ArchitectException e1) { throw new ArchitectRuntimeException(e1); } | public void dbChildrenRemoved(SQLObjectEvent e) { logger.debug("dbChildrenRemoved event! parent="+e.getSource()+"; children="+e.getChildren()); SQLTable.Folder f = (SQLTable.Folder) e.getSource(); if (f.getType() == SQLTable.Folder.EXPORTED_KEYS) { SQLObject[] removedRels = e.getChildren(); int size = rem... | |
return expression.getExpression(); | return "${" + expression.getExpression() + "}"; | public String getExpressionText() { return expression.getExpression(); } |
ih.storeElement( project, parentObject, nested, tagName ); | ih.storeElement( project, parentObject, nested, tagName.toLowerCase() ); | public void doTag(XMLOutput output) throws JellyTagException { Project project = getAntProject(); String tagName = getTagName(); Object parentObject = findBeanAncestor(); Object parentTask = findParentTaskObject(); // lets assume that Task instances are not nested inside other Task in... |
private void putResult(ProfileResult profileResult) { | public void putResult(ProfileResult profileResult) { | private void putResult(ProfileResult profileResult) { if (logger.isDebugEnabled()) { logger.debug("[instance "+hashCode()+"]" + " Adding new profile result for "+profileResult.getProfiledObject().getName()+ " existing profile count: "+results.size()); }... |
final ObjectName objectName = context.getObjectName(); final ApplicationConfig appConfig = context.getApplicationConfig(); List applications = null; if(appConfig.isCluster()){ applications = appConfig.getApplications(); }else{ applications = new ArrayList(1); applications.add(appConfig); } for(Iterator it=applications.... | final String objectName = context.getObjectName().getCanonicalName(); final String appName = context.getApplicationConfig().getName(); MBeanService mbeanService = ServiceFactory.getMBeanService(); mbeanService.updateAttributes(Utils.getServiceContext(context), request, objectName, appName); | public ActionForward execute(WebContext context, ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) throws Exception { ... |
Collections.sort((List)value, xpCmp); | Collections.sort(list, xpCmp); } if(list.isEmpty()) { value = null; | public void doTag(XMLOutput output) throws MissingAttributeException, JellyTagException { if (var == null) { throw new MissingAttributeException( "var" ); } if (select == null) { throw new MissingAttributeException( "select" ); } Object xpathContext = getXPat... |
switch ( determineReturnType() ) { case RETURN_NODE_LIST: value = valueAsList(value); break; case RETURN_FIRST_NODE: value = valueAsSingle(value); break; case RETURN_STRING_LIST: value = nodeListToStringList(valueAsList(value)); break; case RETURN_DELIMITED_STRING_LIST: value = joinDelimitedElements(nodeListToStringLis... | if (single!=null) { if (single.booleanValue() == true) { if(value instanceof List) { List l = (List) value; if (l.size() == 0) value=null; else value=l.get(0); } } else { if(! (value instanceof List) ) { List l = null; if (value==null) { l = new ArrayList(0); } else { l = new ArrayList(1); l.add(value); } value = l; } ... | public void doTag(XMLOutput output) throws MissingAttributeException, JellyTagException { if (var == null) { throw new MissingAttributeException( "var" ); } if (select == null) { throw new MissingAttributeException( "select" ); } Object xpathContext = getXPat... |
if(asString != null && asString.booleanValue()) { if(value instanceof Node) { value = ((Node) value).getStringValue(); } else if(value instanceof List) { for(ListIterator it = ((List) value).listIterator(); it.hasNext(); ) { Object v = it.next(); if(v instanceof Node) { v = ((Node) v).getStringValue(); it.set(v); } } }... | public void doTag(XMLOutput output) throws MissingAttributeException, JellyTagException { if (var == null) { throw new MissingAttributeException( "var" ); } if (select == null) { throw new MissingAttributeException( "select" ); } Object xpathContext = getXPat... | |
this.delim = delim; | this.delimiter = delim; if( delim!=null ) { this.asString = Boolean.TRUE; } | public void setDelim(String delim) { this.delim = delim; } |
logger.debug("dbChildrenInserted SQLObjectEvent: "+e); | if (logger.isDebugEnabled()) { logger.debug("dbChildrenInserted SQLObjectEvent: "+e +"; tree path="+Arrays.asList(getPathToNode(e.getSQLSource()))); } | public void dbChildrenInserted(SQLObjectEvent e) { logger.debug("dbChildrenInserted SQLObjectEvent: "+e); try { SQLObject[] newEventSources = e.getChildren(); for (int i = 0; i < newEventSources.length; i++) { ArchitectUtils.listenToHierarchy(this, newEventSources[i]); } } catch (ArchitectException ex) { ... |
logger.debug("dbChildrenRemoved SQLObjectEvent: "+e); | if (logger.isDebugEnabled()) logger.debug("dbChildrenRemoved SQLObjectEvent: "+e); | public void dbChildrenRemoved(SQLObjectEvent e) { logger.debug("dbChildrenRemoved SQLObjectEvent: "+e); try { SQLObject[] oldEventSources = e.getChildren(); for (int i = 0; i < oldEventSources.length; i++) { ArchitectUtils.unlistenToHierarchy(this, oldEventSources[i]); } } catch (ArchitectException ex) { ... |
logger.debug("dbObjectChanged SQLObjectEvent: "+e); | if (logger.isDebugEnabled()) logger.debug("dbObjectChanged SQLObjectEvent: "+e); | public void dbObjectChanged(SQLObjectEvent e) { logger.debug("dbObjectChanged SQLObjectEvent: "+e); SQLObject source = e.getSQLSource(); fireTreeNodesChanged(new TreeModelEvent(this, getPathToNode(source))); } |
logger.debug("Firing treeNodesInserted event: "+e); | if (logger.isDebugEnabled()) logger.debug("Firing treeNodesInserted event: "+e); | protected void fireTreeNodesInserted(TreeModelEvent e) { logger.debug("Firing treeNodesInserted event: "+e); Iterator it = treeModelListeners.iterator(); while (it.hasNext()) { ((TreeModelListener) it.next()).treeNodesInserted(e); } } |
logger.debug("Firing treeNodesRemoved event "+e); | if (logger.isDebugEnabled()) logger.debug("Firing treeNodesRemoved event "+e); | protected void fireTreeNodesRemoved(TreeModelEvent e) { logger.debug("Firing treeNodesRemoved event "+e); Iterator it = treeModelListeners.iterator(); while (it.hasNext()) { ((TreeModelListener) it.next()).treeNodesRemoved(e); logger.debug("Sent a copy"); } } |
logger.debug("Sent a copy"); | if (logger.isDebugEnabled()) logger.debug("Sent a copy"); | protected void fireTreeNodesRemoved(TreeModelEvent e) { logger.debug("Firing treeNodesRemoved event "+e); Iterator it = treeModelListeners.iterator(); while (it.hasNext()) { ((TreeModelListener) it.next()).treeNodesRemoved(e); logger.debug("Sent a copy"); } } |
logger.debug("DBTreeModel.getChild("+parent+","+index+"): returning "+((SQLObject) parent).getChild(index)); | if (logger.isDebugEnabled()) logger.debug("DBTreeModel.getChild("+parent+","+index+"): returning "+((SQLObject) parent).getChild(index)); | public Object getChild(Object parent, int index) { try { logger.debug("DBTreeModel.getChild("+parent+","+index+"): returning "+((SQLObject) parent).getChild(index)); return ((SQLObject) parent).getChild(index); } catch (ArchitectException e) { //logger.error("Couldn't get child "+index+" of "+parent, e); //r... |
logger.debug("DBTreeModel.getChildCount("+parent+"): returning "+((SQLObject) parent).getChildCount()); | if (logger.isDebugEnabled()) logger.debug("DBTreeModel.getChildCount("+parent+"): returning "+((SQLObject) parent).getChildCount()); | public int getChildCount(Object parent) { try { logger.debug("DBTreeModel.getChildCount("+parent+"): returning "+((SQLObject) parent).getChildCount()); return ((SQLObject) parent).getChildCount(); } catch (ArchitectException e) { //logger.error("Couldn't get child count of "+parent, e); //return -1; throw ... |
logger.debug("DBTreeModel.getIndexOfChild("+parent+","+child+"): returning "+((SQLObject) parent).getChildren().indexOf(child)); | if (logger.isDebugEnabled()) logger.debug("DBTreeModel.getIndexOfChild("+parent+","+child+"): returning "+((SQLObject) parent).getChildren().indexOf(child)); | public int getIndexOfChild(Object parent, Object child) { try { logger.debug("DBTreeModel.getIndexOfChild("+parent+","+child+"): returning "+((SQLObject) parent).getChildren().indexOf(child)); return ((SQLObject) parent).getChildren().indexOf(child); } catch (ArchitectException e) { //logger.error("Couldn't ge... |
logger.debug("DBTreeModel.getRoot: returning "+root); | if (logger.isDebugEnabled()) logger.debug("DBTreeModel.getRoot: returning "+root); | public Object getRoot() { logger.debug("DBTreeModel.getRoot: returning "+root); return root; } |
logger.debug("DBTreeModel.isLeaf("+parent+"): returning "+!((SQLObject) parent).allowsChildren()); | if (logger.isDebugEnabled()) logger.debug("DBTreeModel.isLeaf("+parent+"): returning "+!((SQLObject) parent).allowsChildren()); | public boolean isLeaf(Object parent) { logger.debug("DBTreeModel.isLeaf("+parent+"): returning "+!((SQLObject) parent).allowsChildren()); return !((SQLObject) parent).allowsChildren(); } |
String appType = config.getType(); if (appType.equals("connector")) { create(config); | if (config.isCluster()) { List<ApplicationConfig> clusterApps = config.getApplications(); for(ApplicationConfig clusterConfig : clusterApps) { load(clusterConfig); } } else { load(config); | public static void load() throws Exception { List<ApplicationConfig> applications = ApplicationConfigManager.getApplications(); for(ApplicationConfig config : applications) { String appType = config.getType(); if (appType.equals("connector")) { create(config); ... |
String namespaceURI, String localName, String qName, | final String namespaceURI, final String localName, final String qName, | protected TagScript createStaticTag( String namespaceURI, String localName, String qName, Attributes list) throws SAXException { try { StaticTag tag = new StaticTag( namespaceURI, localName, qName); StaticTagScript script = new StaticTagScript(tag); ... |
StaticTag tag = new StaticTag( namespaceURI, localName, qName); StaticTagScript script = new StaticTagScript(tag); | StaticTag tag = new StaticTag( namespaceURI, localName, qName ); StaticTagScript script = new StaticTagScript( new TagFactory() { public Tag createTag() { return new StaticTag( namespaceURI, localName, qName ); } } ); | protected TagScript createStaticTag( String namespaceURI, String localName, String qName, Attributes list) throws SAXException { try { StaticTag tag = new StaticTag( namespaceURI, localName, qName); StaticTagScript script = new StaticTagScript(tag); ... |
int size = tagStack.size(); if ( size <= 0 ) { parentTag = null; } else { parentTag = (Tag) tagStack.remove( size - 1 ); } | if ( tagScriptStack.isEmpty() ) { tagScript = null; } else { tagScript = (TagScript) tagScriptStack.get(tagScriptStack.size() - 1); } | public void endElement(String namespaceURI, String localName, String qName) throws SAXException { try { tagScript = (TagScript) tagScriptStack.remove(tagScriptStack.size() - 1); if (tagScript != null) { if (textBuffer.length() > 0) { addTextScrip... |
parentTag = null; | public void startDocument() throws SAXException { script = new ScriptBlock(); textBuffer = new StringBuffer(); tagScript = null; parentTag = null; scriptStack.clear(); tagScriptStack.clear(); } | |
Tag tag = tagScript.getTag(); tag.setParent(parentTag); | tagScript.setParent(parentTagScript); | public void startElement( String namespaceURI, String localName, String qName, Attributes list) throws SAXException { try { // add check to ensure namespace URI is "" for no namespace if ( namespaceURI == null ) { ... |
if ( parentTag != null ) { tagStack.add( parentTag ); } parentTag = tag; | public void startElement( String namespaceURI, String localName, String qName, Attributes list) throws SAXException { try { // add check to ensure namespace URI is "" for no namespace if ( namespaceURI == null ) { ... | |
tag.setBody(script); | tagScript.setTagBody(script); | public void startElement( String namespaceURI, String localName, String qName, Attributes list) throws SAXException { try { // add check to ensure namespace URI is "" for no namespace if ( namespaceURI == null ) { ... |
System.out.println( "Created list: " + list + " with items: " + items ); | protected void processBean(String var, Object bean) throws Exception { super.processBean(var, bean); List list = getList(); System.out.println( "Created list: " + list + " with items: " + items ); // if the items variable is specified lets append all the items ... | |
Object value = attributes.remove("items"); System.out.println( "value: " + value ); | items = (Expression) attributes.remove("items"); | protected void setBeanProperties(Object bean, Map attributes) throws Exception { Object value = attributes.remove("items"); System.out.println( "value: " + value ); super.setBeanProperties(bean, attributes); // #### @todo use same algorithm as evaluateAsIterator() List lis... |
List list = getList(); if (value instanceof Iterator) { Iterator iter = (Iterator) value; while (iter.hasNext()) { list.add( iter.next() ); } } | protected void setBeanProperties(Object bean, Map attributes) throws Exception { Object value = attributes.remove("items"); System.out.println( "value: " + value ); super.setBeanProperties(bean, attributes); // #### @todo use same algorithm as evaluateAsIterator() List lis... | |
registerBeanFactory( "dialog", JDesktopPane.class ); | registerBeanFactory( "dialog", JDialog.class ); registerBeanFactory( "fileChooser", JFileChooser.class ); | protected void registerFactories() { registerBeanFactory( "button", JButton.class ); registerBeanFactory( "checkBox", JCheckBox.class ); registerBeanFactory( "checkBoxMenuItem", JCheckBoxMenuItem.class ); registerBeanFactory( "comboBox", JComboBox.class ); // how to add content there... |
root.addChild(root.getChildCount(), new SQLDatabase(dbcs)); | if (dbcsAlreadyExists(dbcs)) { logger.warn("database already exists in this project."); JOptionPane.showMessageDialog(DBTree.this, "Can't add connection, connection already exists in this project.", "Warning", JOptionPane.WARNING_MESSAGE); } else { root.addChild(root.getChildCount(), new SQLDatabase(dbcs)); } | public void actionPerformed(ActionEvent e) { SQLObject root = (SQLObject) getModel().getRoot(); try { root.addChild(root.getChildCount(), new SQLDatabase(dbcs)); } catch (ArchitectException ex) { logger.warn("Couldn't add new database to tree", ex); JOptionPane.showMessageDialog(DBTree.this, "Couldn't ... |
refreshDBCSMenu(); TreePath p = getPathForLocation(e.getX(), e.getY()); | TreePath p = getPathForLocation(e.getX(), e.getY()); refreshDBCSMenu(isTargetDatabaseNode(p)); | private void maybeShowPopup(MouseEvent e) { if (e.isPopupTrigger()) { refreshDBCSMenu(); TreePath p = getPathForLocation(e.getX(), e.getY()); if (p == null) { popup.getComponent(0).setVisible(true); popup.getComponent(1).setVisible(false); popup.getComponent(2).setVisible(false);... |
popup.getComponent(0).setVisible(true); popup.getComponent(1).setVisible(false); popup.getComponent(2).setVisible(false); | logger.debug("not over anything, so give NEW option"); popup.getComponent(0).setVisible(true); popup.getComponent(1).setVisible(false); | private void maybeShowPopup(MouseEvent e) { if (e.isPopupTrigger()) { refreshDBCSMenu(); TreePath p = getPathForLocation(e.getX(), e.getY()); if (p == null) { popup.getComponent(0).setVisible(true); popup.getComponent(1).setVisible(false); popup.getComponent(2).setVisible(false);... |
popup.getComponent(0).setVisible(true); popup.getComponent(1).setVisible(true); popup.getComponent(2).setVisible(true); | popup.getComponent(0).setVisible(isTargetDatabaseNode(p)); popup.getComponent(1).setVisible(true); | private void maybeShowPopup(MouseEvent e) { if (e.isPopupTrigger()) { refreshDBCSMenu(); TreePath p = getPathForLocation(e.getX(), e.getY()); if (p == null) { popup.getComponent(0).setVisible(true); popup.getComponent(1).setVisible(false); popup.getComponent(2).setVisible(false);... |
protected void refreshDBCSMenu() { popupDBCSMenu.removeAll(); popupDBCSMenu.add(new JMenuItem(newDBCSAction)); popupDBCSMenu.addSeparator(); | protected void refreshDBCSMenu(boolean suppressNew) { logger.debug("refreshDBCSMenu is being called."); popupDBCSMenu.removeAll(); if (!suppressNew) { popupDBCSMenu.add(new JMenuItem(newDBCSAction)); popupDBCSMenu.addSeparator(); } | protected void refreshDBCSMenu() { popupDBCSMenu.removeAll(); popupDBCSMenu.add(new JMenuItem(newDBCSAction)); popupDBCSMenu.addSeparator(); Iterator it = ArchitectFrame.getMainInstance().getUserSettings().getConnections().iterator(); while(it.hasNext()) { DBConnectionSpec dbcs = (DBConnectionSpec) it.next(); ... |
popupDBCSMenu.add(new JMenuItem(new AddDBCSAction(dbcs))); | if (!suppressNew) { popupDBCSMenu.setText("Add Connection"); popupDBCSMenu.add(new JMenuItem(new AddDBCSAction(dbcs))); } else { popupDBCSMenu.setText("Set Target Database"); popupDBCSMenu.add(new JMenuItem(new setTargetDBCSAction(dbcs))); } | protected void refreshDBCSMenu() { popupDBCSMenu.removeAll(); popupDBCSMenu.add(new JMenuItem(newDBCSAction)); popupDBCSMenu.addSeparator(); Iterator it = ArchitectFrame.getMainInstance().getUserSettings().getConnections().iterator(); while(it.hasNext()) { DBConnectionSpec dbcs = (DBConnectionSpec) it.next(); ... |
newMenu.add(popupDBCSMenu = new JMenu("Add Connection")); newMenu.addSeparator(); | newMenu.add(popupDBCSMenu = new JMenu("Add Connection")); | protected JPopupMenu setupPopupMenu() { JPopupMenu newMenu = new JPopupMenu(); newMenu.add(popupDBCSMenu = new JMenu("Add Connection")); newMenu.addSeparator(); // index 1 JMenuItem popupProperties = new JMenuItem(new DBCSPropertiesAction()); newMenu.add(popupProperties); // index 2 if (logger.isDebu... |
assertFalse(sourceLoadRadio.isEnabled()); | public void testDisableSourceDatabaseComponents() { JFrame frame = new JFrame(); frame.setContentPane(panel); frame.pack(); frame.setVisible(true); assertFalse(sourceDatabaseDropdown.isEnabled()); assertFalse(sourceNewConnButton.isEnabled()); assertFalse(sourceCatalogDropdown.isEnabled()); assertFalse(source... | |
String infoMaybe =""; | String infoMaybe =null; | private void doBatch() { Vector files; File batchFile; File dataFile; String line; StringTokenizer tok; String infoMaybe =""; files = new Vector(); if(batchFileName == null) { return; } batchFile = new File(this.batchFileName); ... |
infoMaybe = ""; | infoMaybe = null; | private void doBatch() { Vector files; File batchFile; File dataFile; String line; StringTokenizer tok; String infoMaybe =""; files = new Vector(); if(batchFileName == null) { return; } batchFile = new File(this.batchFileName); ... |
if ( answer == null ) { try { answer = System.getProperty(name); } catch (Throwable t) { } | } 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 ) { answer = parent.findVariable(name); // ### this is a hack - remove this when we have support for pluggable Scopes if ( answer == null ) ... |
registerTag("run", RunTestTag.class ); registerTag("case", TestCaseTag.class ); registerTag("suite", TestSuiteTag.class ); | registerTag("run", RunTag.class ); registerTag("case", CaseTag.class ); registerTag("suite", SuiteTag.class ); | public JUnitTagLibrary() { registerTag("assert", AssertTag.class); registerTag("assertEquals", AssertEqualsTag.class); registerTag("fail", FailTag.class); registerTag("run", RunTestTag.class ); registerTag("case", TestCaseTag.class ); registerTag("suite", TestSuiteTag.class... |
(!mFeatures.contains(MasterFeature.UPDATE_FULL))) | (!mFeatures.contains(MasterFeature.UPDATE_FULL)) && (!mFeatures.contains(MasterFeature.UPDATE_TXN))) | private void generateClass() throws SupportException { // Declare some types. final TypeDesc storableType = TypeDesc.forClass(Storable.class); final TypeDesc triggerSupportType = TypeDesc.forClass(TriggerSupport.class); final TypeDesc masterSupportType = TypeDesc.forClass(MasterSupport.c... |
int rColWidth = size.width - lColWidth - ins.left - ins.right; | int rColWidth = size.width - ins.left - lColWidth - hgap - ins.right; | public void layoutContainer(Container parent) { LeftRightHeight lrh = calcSizes(parent); Dimension size = parent.getSize(); Insets ins = parent.getInsets(); int lColWidth = Math.min(size.width, lrh.left); int rColWidth = size.width - lColWidth - ins.left - ins.right; int height = Math.min(size.height, lrh.heig... |
c.setBounds(lColWidth + ins.left + hgap, y, rColWidth, d.height); | int width = c.getPreferredSize().width; if (c instanceof JTextField) { width = rColWidth; } c.setBounds(lColWidth + ins.left + hgap, y, width, d.height); | public void layoutContainer(Container parent) { LeftRightHeight lrh = calcSizes(parent); Dimension size = parent.getSize(); Insets ins = parent.getInsets(); int lColWidth = Math.min(size.width, lrh.left); int rColWidth = size.width - lColWidth - ins.left - ins.right; int height = Math.min(size.height, lrh.heig... |
frame.dispose(); } | System.exit(0); } | public void windowClosing(WindowEvent e) { frame.dispose(); } |
final JFrame frame = new JFrame( "Photo properties" ); PhotoInfoController ctrl = new PhotoInfoController(); PhotoInfoEditor editor = new PhotoInfoEditor( ctrl ); ctrl.setPhoto( photo ); frame.getContentPane().add( editor, BorderLayout.CENTER ); frame.addWindowListener(new WindowAdapter() { public void windowClosing(Wi... | if (propertyDlg == null ) { propertyDlg = new PhotoInfoDlg( frame, true, photo ); } else { propertyDlg.setPhoto( photo ); } propertyDlg.showDialog(); | public void showSelectionPropsDialog() { PhotoInfo photo = getSelected(); if ( photo != null ) { // TODO: Change PhotoInfoEditor to a dialog!!! final JFrame frame = new JFrame( "Photo properties" ); PhotoInfoController ctrl = new PhotoInfoController(); PhotoInfoEditor editor = new PhotoInfoEditor( c... |
(int) (0.0000001 + Math.log(theData.markerInfo.size()) / Math.log(10)) + 1; | (int) (0.0000001 + Math.log(Chromosome.size()) / Math.log(10)) + 1; | public Dimension getPreferredSize() { int wide = BORDER*2; int high = BORDER*2; if (filteredHaplos == null) {return new Dimension(wide, high);} // height for the marker digits int markerDigits = (int) (0.0000001 + Math.log(theData.markerInfo.size()) / Math.log(10)) ... |
int markerCount = theData.markerInfo.size(); | int markerCount = Chromosome.size(); | public void paintComponent(Graphics graphics) { if (filteredHaplos == null){ super.paintComponent(graphics); return; } Graphics2D g = (Graphics2D) graphics; g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); ... |
if (getColumns().isEmpty()) return; boolean donePk = false; int i = 0; Iterator it = getColumns().iterator(); while (it.hasNext()) { SQLColumn col = (SQLColumn) it.next(); if (col.getPrimaryKeySeq() == null) donePk = true; if (!donePk) { col.primaryKeySeq = new Integer(i); } else { col.primaryKeySeq = null; } i++; } | startCompoundEdit("Normalizing Primary Key"); if (getColumns().isEmpty()) return; boolean donePk = false; int i = 0; Iterator it = getColumns().iterator(); while (it.hasNext()) { SQLColumn col = (SQLColumn) it.next(); if (col.getPrimaryKeySeq() == null) donePk = true; Integer oldValue = col.getPrimaryKeySeq(); Integer... | public void normalizePrimaryKey() { try { if (getColumns().isEmpty()) return; boolean donePk = false; int i = 0; Iterator it = getColumns().iterator(); while (it.hasNext()) { SQLColumn col = (SQLColumn) it.next(); if (col.getPrimaryKeySeq() == null) donePk = true; if (!donePk) { col.primaryKe... |
logger.warn("Unexpected ArchitectException in normalizePrimaryKey "+e); | logger.warn("Unexpected ArchitectException in normalizePrimaryKey "+e); } finally { endCompoundEdit("Normalizing Primary Key"); | public void normalizePrimaryKey() { try { if (getColumns().isEmpty()) return; boolean donePk = false; int i = 0; Iterator it = getColumns().iterator(); while (it.hasNext()) { SQLColumn col = (SQLColumn) it.next(); if (col.getPrimaryKeySeq() == null) donePk = true; if (!donePk) { col.primaryKe... |
getBody().run( context, output ); | invokeBody(output); | public void doTag(XMLOutput output) throws Exception { if (select == null) { throw new MissingAttributeException( "select" ); } Object xpathContext = getXPathContext(); if ( select.booleanValueOf(xpathContext) ) { getBody().run( context, output ); } ... |
if (!(args[a].startsWith("-"))){ args[a] = "\"" + args[a] + "\""; } | public static void main(String[] args) { int exitValue = 0; //String dir = System.getProperty("user.dir"); //String ver = System.getProperty("java.version"); String sep = System.getProperty("file.separator"); String javaHome = System.getProperty("java.home"); //TODO:do some... | |
Jimi.putImage("image/png", i, OutputFile.getName()); | Jimi.putImage("image/png", i, OutputFile.getAbsolutePath()); | 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 ... |
Object ret = call.invoke(new Object[]{getBodyText()}); | Object answer = call.invoke(params); | public void doTag(XMLOutput output) throws Exception { if (endpoint == null) { throw new MissingAttributeException("endpoint"); } if (namespace == null) { throw new MissingAttributeException("namespace"); } if (method == null) { throw new MissingAt... |
context.setVariable(var, ret); | context.setVariable(var, answer); | public void doTag(XMLOutput output) throws Exception { if (endpoint == null) { throw new MissingAttributeException("endpoint"); } if (namespace == null) { throw new MissingAttributeException("namespace"); } if (method == null) { throw new MissingAt... |
throw new JellyException( "Not implemented yet; should stream results as XML events. Results: " + ret ); | throw new JellyException( "Not implemented yet; should stream results as XML events. Results: " + answer ); | public void doTag(XMLOutput output) throws Exception { if (endpoint == null) { throw new MissingAttributeException("endpoint"); } if (namespace == null) { throw new MissingAttributeException("namespace"); } if (method == null) { throw new MissingAt... |
JellyInterpreter interpreter = BeanShellExpressionFactory.getInterpreter(context); | JellyInterpreter interpreter = new JellyInterpreter(); interpreter.setJellyContext(context); | public Object evaluate(JellyContext context) { try { JellyInterpreter interpreter = BeanShellExpressionFactory.getInterpreter(context); if ( log.isDebugEnabled() ) { log.debug( "Evaluating EL: " + text ); } return interpreter.... |
log.debug( "Evaluating EL: " + text ); | log.debug( "Evaluating beanshell: " + text ); | public Object evaluate(JellyContext context) { try { JellyInterpreter interpreter = BeanShellExpressionFactory.getInterpreter(context); if ( log.isDebugEnabled() ) { log.debug( "Evaluating EL: " + text ); } return interpreter.... |
iis.close(); | protected void createThumbnail( VolumeBase volume ) { log.debug( "Creating thumbnail for " + uid ); ODMGXAWrapper txw = new ODMGXAWrapper(); txw.lock( this, Transaction.WRITE ); // Maximum size of the thumbnail int maxThumbWidth = 100; int maxThumbHeight = 1... | |
context.registerTagLibrary( "jelly:ant", new AntTagLibrary(project) ); | context.registerTagLibrary( "jelly:ant", new AntTagLibrary() ); | public JellyContext getJellyContext() throws MalformedURLException { if (context == null) { // take off the name off the URL String text = getUrl().toString(); int idx = text.lastIndexOf('/'); text = text.substring(0, idx + 1); JellyContext parentContext... |
Class type = (Class) tags.get(name); Tag tag = (Tag) type.newInstance(); return TagScript.newInstance(tag); | Class type = (Class) tags.get(name); if ( type != null ) { Tag tag = (Tag) type.newInstance(); return TagScript.newInstance(tag); } return null; | public TagScript createTagScript(String name, Attributes attributes) throws Exception { Class type = (Class) tags.get(name); Tag tag = (Tag) type.newInstance(); return TagScript.newInstance(tag); } |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.