rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
*/ | public TagScript createTagScript(String name, Attributes attributes) throws Exception { Project project = getProject(); // custom Ant tags if ( name.equals("fileScanner") ) { Tag tag = new FileScannerTag(new FileScanner(project)); return TagScript.newIn... | |
*/ | public TagScript createTagScript(String name, Attributes attributes) throws Exception { Project project = getProject(); // custom Ant tags if ( name.equals("fileScanner") ) { Tag tag = new FileScannerTag(new FileScanner(project)); return TagScript.newIn... | |
public TaskTag(Project project, String taskName) { super( project ); this.taskName = taskName; | public TaskTag() { | public TaskTag(Project project, String taskName) { super( project ); this.taskName = taskName; } |
"src/test/org/apache/commons/jelly | "src/test/org/apache/commons/jelly/jetty/defaultServer.jelly" | public void testDefaultServer() throws Exception { String text = evaluteScriptAsText( "src/test/org/apache/commons/jelly//jetty/defaultServer.jelly" ); assertEquals("Produces the correct output", "It works!", text); } |
"src/test/org/apache/commons/jelly | "src/test/org/apache/commons/jelly/jetty/httpContext.jelly" | public void testHttpContext() throws Exception { String text = evaluteScriptAsText( "src/test/org/apache/commons/jelly//jetty/httpContext.jelly" ); assertEquals("Produces the correct output", "It works!", text); } |
"src/test/org/apache/commons/jelly | "src/test/org/apache/commons/jelly/jetty/jellyResourceHandler.jelly" | public void testJellyResourceHandler() throws Exception { String text = evaluteScriptAsText( "src/test/org/apache/commons/jelly//jetty/jellyResourceHandler.jelly" ); assertEquals("Produces the correct output", "It works!", text); } |
assertEquals("Produces the correct output", "It works!", text); | assertEquals("jellyResourceHandler produces the correct output", "It works!", text); text = evaluteScriptAsText( "src/test/org/apache/commons/jelly/jetty/jellyResourceHandlerRequestBody.jelly" ); assertEquals("jellyResourceHandlerRequestBody produces the correct output", "It works!", text); | public void testJellyResourceHandler() throws Exception { String text = evaluteScriptAsText( "src/test/org/apache/commons/jelly//jetty/jellyResourceHandler.jelly" ); assertEquals("Produces the correct output", "It works!", text); } |
"src/test/org/apache/commons/jelly | "src/test/org/apache/commons/jelly/jetty/resourceHandler.jelly" | public void testResourceHandler() throws Exception { String text = evaluteScriptAsText( "src/test/org/apache/commons/jelly//jetty/resourceHandler.jelly" ); assertEquals("Produces the correct output", "It works!", text); } |
"src/test/org/apache/commons/jelly | "src/test/org/apache/commons/jelly/jetty/securityHandlerForbidden.jelly" | public void testSecurityHandler() throws Exception { String text = evaluteScriptAsText( "src/test/org/apache/commons/jelly//jetty/securityHandlerForbidden.jelly" ); assertEquals("Forbidden test produces the correct output", "It works!", text); text = evaluteScriptAsText( ... |
"src/test/org/apache/commons/jelly | "src/test/org/apache/commons/jelly/jetty/securityHandlerUnauthorized.jelly" | public void testSecurityHandler() throws Exception { String text = evaluteScriptAsText( "src/test/org/apache/commons/jelly//jetty/securityHandlerForbidden.jelly" ); assertEquals("Forbidden test produces the correct output", "It works!", text); text = evaluteScriptAsText( ... |
"src/test/org/apache/commons/jelly | "src/test/org/apache/commons/jelly/jetty/socketListener.jelly" | public void testSocketListener() throws Exception { String text = evaluteScriptAsText( "src/test/org/apache/commons/jelly//jetty/socketListener.jelly" ); assertEquals("Produces the correct output", "It works!", text); } |
logger.debug("selections length is: " + selections.length); if (selections.length != 1) { | if (selections == null || selections.length != 1) { | public void actionPerformed(ActionEvent evt) { if (evt.getActionCommand().equals(ArchitectSwingConstants.ACTION_COMMAND_SRC_PLAYPEN)) { List selection = pp.getSelectedItems(); if (selection.size() < 1) { JOptionPane.showMessageDialog(pp, "Select a table (by clicking on it) and try again."); } else if (select... |
w = (int)(origImage.getWidth()*imgScale); h = (int)(origImage.getHeight()*imgScale); | if ( xformImage == null ) { prepareXformImage(); } w = xformImage.getWidth(); h = xformImage.getHeight(); | public Dimension getPreferredSize() { int w = 0; int h = 0; if ( origImage != null ) { w = (int)(origImage.getWidth()*imgScale); h = (int)(origImage.getHeight()*imgScale); } return new Dimension( w, h ); } |
if ( scaledImage == null ) { prepareScaledImage(); | if ( xformImage == null ) { prepareXformImage(); | public void paint( Graphics g ) { if ( scaledImage == null ) { prepareScaledImage(); } Graphics2D g2 = (Graphics2D) g; g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); if ( scaledImage != null ) { g2.drawImage( scaledImage, new AffineTransform(1f,0f,0f,1f... |
if ( scaledImage != null ) { g2.drawImage( scaledImage, new AffineTransform(1f,0f,0f,1f,0,0), null ); | if ( xformImage != null ) { g2.drawImage( xformImage, new AffineTransform(1f,0f,0f,1f,0,0), null ); | public void paint( Graphics g ) { if ( scaledImage == null ) { prepareScaledImage(); } Graphics2D g2 = (Graphics2D) g; g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); if ( scaledImage != null ) { g2.drawImage( scaledImage, new AffineTransform(1f,0f,0f,1f... |
scaledImage = null; | xformImage = null; | public void setImage( BufferedImage img ) { origImage = img; scaledImage = null; repaint(); } |
scaledImage = null; repaint(); | xformImage = null; revalidate(); | public void setRotation( double newRot ) { imgRot = newRot; // Invalidate the existing transformed image scaledImage = null; repaint(); } |
scaledImage = null; repaint(); | xformImage = null; revalidate(); | public void setScale( float newValue ) { imgScale = newValue; // Invalidate the existing scaled image scaledImage = null; repaint(); } |
boolean hasPhotos = (photos.size() > 0 && !allRemoved ); | boolean hasPhotos = ((photos.size() > 0 || allAdded) && !allRemoved); | public String toString() { StringBuffer strbuf = new StringBuffer(); strbuf.append( "<html>" ); boolean hasPhotos = (photos.size() > 0 && !allRemoved ); boolean hasAllPhotos = ((photos.size() == model.length || allAdded) && !allRemoved ); if ( hasPhotos ) { strbuf.append( "<b>" ); if ( !hasAllPhotos ) { ... |
ArchitectFrame.getMainInstance().getProject().setModified(true); | public void actionPerformed(ActionEvent e) { SQLObject root = (SQLObject) getModel().getRoot(); try { // check to see if we've already seen this one if (dbcsAlreadyExists(dbcs)) { logger.warn("database already exists in this project."); JOptionPane.showMessageDialog(DBTree.this, "Can't add connectio... | |
else { ArchitectFrame.getMainInstance().getProject().setModified(true); } | public void actionPerformed(ActionEvent e) { dbcsPanel.applyChanges(); edittingDB.setDataSource(dbcsPanel.getDbcs()); // does not get called when setting Target if (panelHoldsNewDBCS) { // don't allow new duplicate connections to be added ArchitectDataSource dup = getDuplicateDbcs(edittingDB.getDataS... | |
T.add(getWelcomeLetterLink(welcome.getIdentifier().intValue()),topicID,welcome.getSubject()),5,row); | T.add(getWelcomeLetterLink(welcome.getIdentifier().intValue(),topicID,welcome.getSubject()),5,row); | public PresentationObject getTopicsOverView(IWContext iwc){ Table T = new Table(); int row = 1; T.add(getTopicLink(-1,iwrb.getLocalizedString("new_topic","New topic")),1,row); row++; T.add(tf.format(iwrb.getLocalizedString("name","Name"),tf.HEADER),1,row); T.add(tf.format(iwrb.getLocalizedString("category",... |
EM theEM = new EM(chromosomes,numTrios); | EM theEM = new EM(chromosomes,numTrios, extraTrioChromosomes); | public Haplotype[][] generateHaplotypes(Vector blocks, boolean storeEM) throws HaploViewException{ Haplotype[][] rawHaplotypes = new Haplotype[blocks.size()][]; for (int k = 0; k < blocks.size(); k++){ int[] preFiltBlock = (int[])blocks.elementAt(k); int[] theBlock; in... |
Vector indList = pedFile.getUnrelatedIndividuals(); Vector indsInTrio = new Vector(); | Vector allInds = pedFile.getAllIndividuals(); Vector unrelatedInds = pedFile.getUnrelatedIndividuals(); HashSet unrelatedHash = new HashSet(unrelatedInds); HashSet indsInTrio = new HashSet(); | public Vector linkageToChrom(File infile, int type) throws IllegalArgumentException, HaploViewException, PedFileException, IOException{ Vector pedFileStrings = new Vector(); Vector hapsDataStrings = new Vector(); BufferedReader reader = new BufferedReader(new FileReader(infile)); ... |
for(int x=0; x < indList.size(); x++){ currentInd = (Individual)indList.get(x); | for(int x=0; x < allInds.size(); x++){ currentInd = (Individual)allInds.get(x); | public Vector linkageToChrom(File infile, int type) throws IllegalArgumentException, HaploViewException, PedFileException, IOException{ Vector pedFileStrings = new Vector(); Vector hapsDataStrings = new Vector(); BufferedReader reader = new BufferedReader(new FileReader(infile)); ... |
if (indList.contains(mom) && indList.contains(dad)){ numMarkers = currentInd.getNumMarkers(); byte[] dadT = new byte[numMarkers]; byte[] dadU = new byte[numMarkers]; byte[] momT = new byte[numMarkers]; byte[] momU = new byte[numMarkers]; for (int i = 0; i < numMarkers; i++){ byte kid1, kid2; if (currentInd.getZeroed(i... | numMarkers = currentInd.getNumMarkers(); byte[] dadT = new byte[numMarkers]; byte[] dadU = new byte[numMarkers]; byte[] momT = new byte[numMarkers]; byte[] momU = new byte[numMarkers]; for (int i = 0; i < numMarkers; i++){ byte kid1, kid2; if (currentInd.getZeroed(i)){ kid1 = 0; kid2 = 0; }else{ kid1 = currentInd.getA... | public Vector linkageToChrom(File infile, int type) throws IllegalArgumentException, HaploViewException, PedFileException, IOException{ Vector pedFileStrings = new Vector(); Vector hapsDataStrings = new Vector(); BufferedReader reader = new BufferedReader(new FileReader(infile)); ... |
byte mom1,mom2; if (currentFamily.getMember(currentInd.getMomID()).getZeroed(i)){ mom1 = 0; mom2 = 0; }else{ mom1 = (currentFamily.getMember(currentInd.getMomID())).getAllele(i,0); mom2 = (currentFamily.getMember(currentInd.getMomID())).getAllele(i,1); | }else { if (kid1 == 0 || kid2 == 0) { if (dad1 == dad2) { dadT[i] = dad1; dadU[i] = dad1; } else if (dad1 != 0 && dad2 != 0) { dadT[i] = (byte)(4+dad1); dadU[i] = (byte)(4+dad2); } if (mom1 == mom2) { momT[i] = mom1; momU[i] = mom1; } else if (mom1 != 0 && mom2 != 0){ momT[i] = (byte)(4+mom1); momU[i] = (byte)(4+mom2... | public Vector linkageToChrom(File infile, int type) throws IllegalArgumentException, HaploViewException, PedFileException, IOException{ Vector pedFileStrings = new Vector(); Vector hapsDataStrings = new Vector(); BufferedReader reader = new BufferedReader(new FileReader(infile)); ... |
byte dad1,dad2; if (currentFamily.getMember(currentInd.getDadID()).getZeroed(i)){ dad1 = 0; dad2 = 0; }else{ dad1 = (currentFamily.getMember(currentInd.getDadID())).getAllele(i,0); dad2 = (currentFamily.getMember(currentInd.getDadID())).getAllele(i,1); } if(haploid) { if(kid1 == 0) { dadU[i] = dad1; if (mom1 == mom2... | } } if(unrelatedHash.contains(mom) && unrelatedHash.contains(dad) && unrelatedHash.contains(currentInd)){ | public Vector linkageToChrom(File infile, int type) throws IllegalArgumentException, HaploViewException, PedFileException, IOException{ Vector pedFileStrings = new Vector(); Vector hapsDataStrings = new Vector(); BufferedReader reader = new BufferedReader(new FileReader(infile)); ... |
for (int x=0; x<indList.size(); x++){ currentInd = (Individual)indList.get(x); | for (int x=0; x<unrelatedInds.size(); x++){ currentInd = (Individual)unrelatedInds.get(x); | public Vector linkageToChrom(File infile, int type) throws IllegalArgumentException, HaploViewException, PedFileException, IOException{ Vector pedFileStrings = new Vector(); Vector hapsDataStrings = new Vector(); BufferedReader reader = new BufferedReader(new FileReader(infile)); ... |
for(int i =0;i<sortHelpers.size();i++){ tempGenotype[i] = tempChrom.getUnfilteredGenotype(realPos[i]); } for(int i=0;i<sortHelpers.size();i++){ tempChrom.setGenotype(tempGenotype[i],i); } } for(int j=0;j<extraTrioChromosomes.size();j++) { Chromosome tempChrom = (Chromosome)extraTrioChromosomes.elementAt(j); | 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 ... | |
displayStrings = new String[5]; | public void mousePressed (MouseEvent e) { Rectangle blockselector = new Rectangle(clickXShift-boxRadius,clickYShift - boxRadius, (Chromosome.getFilteredSize()*boxSize), boxSize); //if users right clicks & holds, pop up the info if ((e.getModifiers() & InputEvent.BUTTON3_MASK) == ... | |
displayStrings = new String[5]; | public void mousePressed (MouseEvent e) { Rectangle blockselector = new Rectangle(clickXShift-boxRadius,clickYShift - boxRadius, (Chromosome.getFilteredSize()*boxSize), boxSize); //if users right clicks & holds, pop up the info if ((e.getModifiers() & InputEvent.BUTTON3_MASK) == ... | |
logger.debug("compoundEditStart with event: "+e.toString()); | logger.debug("compoundEditEnd with event: "+e.toString()); | public void compoundEditEnd(UndoCompoundEvent e) { if (logger.isDebugEnabled()) { logger.debug("compoundEditStart with event: "+e.toString()); } compoundGroupEnd(); } |
logger.debug("Adding compound edit to undo manager"); | private void returnToEditState() { if ( simulMoveCount != 0 || compoundEditStackCount !=0) throw new IllegalStateException("Both the move count ("+simulMoveCount+") and the compound edit stack ("+compoundEditStackCount+") should be 0"); if(ce!= null) { // make sure the edit is no longer in progress ce.e... | |
public XPathExpression(String text, Expression xpathExpr, TagScript tagScript) { this.text = text; this.xpathExpr = xpathExpr; Map namespaceContext = tagScript.getNamespaceContext(); this.uris = createUriMap(namespaceContext); | public XPathExpression() { | public XPathExpression(String text, Expression xpathExpr, TagScript tagScript) { this.text = text; this.xpathExpr = xpathExpr; Map namespaceContext = tagScript.getNamespaceContext(); this.uris = createUriMap(namespaceContext); } |
logger.debug("the connection thinks it is: " + con.getMetaData().getURL()); | public void run() { if (cancelled || finished) return; label.setText("Creating objects in target database..."); new ProgressWatcher(progressBar, this, label); stmtsTried = 0; stmtsCompleted = 0; SQLDatabase target = architectFrame.playpen.getDatabase(); Connection con; Statement stmt; try { con =... | |
public Tag createTag() { | public Tag createTag(String name, Attributes attributes) { | protected TagScript createStaticTag( final String namespaceURI, final String localName, final String qName, Attributes list) throws SAXException { try { StaticTag tag = new StaticTag( namespaceURI, localName, qName ); StaticTagScript script = new Stati... |
public Tag createTag() { | public Tag createTag(String name, Attributes attributes) { | public Tag createTag() { return new StaticTag( namespaceURI, localName, qName ); } |
script.setSaxAttributes(new AttributesImpl(list)); | protected TagScript createTag( String namespaceURI, String localName, Attributes list) throws SAXException { try { // use the URI to load a taglib TagLibrary taglib = context.getTagLibrary(namespaceURI); if (taglib == null) { if (nam... | |
tagScript.setLocalName(localName); | 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 ) { ... | |
out = new PrintWriter(System.out, true); | setOutputFile(new PrintWriter(System.out, true)); | public void setOutputFile(String fileName) throws IOException { if (fileName == null) { /* Set the output file back to System.out */ out = new PrintWriter(System.out, true); } else { File file = new File(fileName); setOutputFile(new PrintWriter(new FileWriter(file), true)); System.out.println("Output set t... |
if ( bean instanceof Component ) { Component component = (Component) bean; | Component component = getComponent(); if ( component != null ) { | public void doTag(XMLOutput output) throws Exception { // export the bean if required if ( var != null ) { context.setVariable(var, bean); } invokeBody(output); // now we should add this component to its parent... // This is currently quite simplistic. ... |
super.setAttribute(name, value); | Component component = getComponent(); if ( component != null ) { if ( name.equals( "location" ) ) { Point p = null; if ( value instanceof Point ) { p = (Point) value; } else if ( value != null) { p = (Point) ConvertUtils.convert( value.toString(), Point.class ); } component.setLocation(p); } else if ( name.equals( "siz... | public void setAttribute(String name, Object value) throws Exception { if (name.equals( "var" ) ) { this.var = value.toString(); } else { super.setAttribute(name, value); } } |
output.append("<div id=\"" + getId() + "\">"); | public final String draw(DashboardContext context) { String applicationId = context.getWebContext().getApplicationConfig().getApplicationId(); StringBuffer output = new StringBuffer(); if(event != null){ output.append("<script>"); output.append("addEventHandler(''"... | |
output.append("</div>"); | public final String draw(DashboardContext context) { String applicationId = context.getWebContext().getApplicationConfig().getApplicationId(); StringBuffer output = new StringBuffer(); if(event != null){ output.append("<script>"); output.append("addEventHandler(''"... | |
TaskTag tag = (TaskTag) findAncestorWithClass( Task.class ); | TaskTag tag = (TaskTag) findAncestorWithClass( TaskTag.class ); | public void compile() throws Exception { TaskTag tag = (TaskTag) findAncestorWithClass( Task.class ); if ( tag == null ) { throw new JellyException( "You should only use Ant DataType tags within an Ant Task" ); } Task task = tag.getTask(); Class taskClas... |
DateFormat df = new SimpleDateFormat( "MMMM" ); months = new String[12]; for ( int n = 0; n < 12; n++ ) { months[n] = df.format( createDate( 2005, n, 2, 0, 0, 0 ) ); } | public void setUp() { } | |
testConversionInvariance( "tammikuu 2005" ); testConversionInvariance( "helmikuu 2000" ); | testConversionInvariance( months[0] + " 2005" ); testConversionInvariance( months[1] + " 2000" ); | public void testConversionInvariances() { testConversionInvariance( "01.01.2005 12:34" ); testConversionInvariance( "01.01.2005" ); testConversionInvariance( "30.06.2005" ); testConversionInvariance( "wk 8 2000" ); testConversionInvariance( "wk 52 2000" ); testConversionInv... |
checkParsingBoundaries( "tammikuu 2005", createDate( 2005, 0, 1, 0, 0, 0), createDate( 2005, 1, 1, 0, 0, 0 ) ); checkParsingBoundaries( "helmikuu 2005", createDate( 2005, 1, 1, 0, 0, 0), createDate( 2005, 2, 1, 0, 0, 0 ) ); checkParsingBoundaries( "maaliskuu 2005", createDate( 2005, 2, 1, 0, 0, 0), createDate( 2005, 3,... | checkParsingBoundaries( months[0] + " 2005", createDate( 2005, 0, 1, 0, 0, 0), createDate( 2005, 1, 1, 0, 0, 0 ) ); checkParsingBoundaries( months[1] + " 2005", createDate( 2005, 1, 1, 0, 0, 0), createDate( 2005, 2, 1, 0, 0, 0 ) ); checkParsingBoundaries( months[2] + " 2005", createDate( 2005, 2, 1, 0, 0, 0), createDat... | public void testParseMonth() { Calendar cal = Calendar.getInstance(); checkParsingBoundaries( "tammikuu 2005", createDate( 2005, 0, 1, 0, 0, 0), createDate( 2005, 1, 1, 0, 0, 0 ) ); checkParsingBoundaries( "helmikuu 2005", createDate( 2005, 1, 1, 0, 0, 0), createDate( 2005, 2, 1, 0, 0, 0 ) ); ... |
System.out.println("output col=" + outputCol.getName() + " input col isnull? " + (inputCol==null?"yes":"no")); | public void exportXML(List<SQLTable> tablesToExport) throws IOException, ArchitectException, SQLException { PrintWriter out = null; final String encoding = "ISO-8859-1"; int indent = 0; out = new PrintWriter(file); Connection con = null; try { SQLDatabase reposit... | |
ctrl.setPhoto( photo ); | public PhotoInfoDlg( Frame owner, boolean modal, PhotoInfo photo ) { super( owner, DIALOG_TITLE, modal ); ctrl = new PhotoInfoController(); ctrl.setPhoto( photo ); createUI(); } | |
ctrl.setPhoto( photo ); | public PhotoInfoDlg( Frame owner, boolean modal, PhotoInfo photo ) { super( owner, DIALOG_TITLE, modal ); ctrl = new PhotoInfoController(); ctrl.setPhoto( photo ); createUI(); } | |
fieldCtrl.setModel( photos, true ); | fieldCtrl.setModel( photos, false ); | public void discard() { // Setting the model again causes all fields to reread field values from model Iterator fieldIter = modelFields.values().iterator(); while ( fieldIter.hasNext() ) { FieldController fieldCtrl = (FieldController) fieldIter.next(); fieldCtrl.setModel( photos, true ); } } |
super("Edit Column Properties...", | super("Column Properties...", | public EditColumnAction() { super("Edit Column Properties...", ASUtils.createIcon("ColumnProperties", "Edit Column Properties", ArchitectFrame.getMainInstance().sprefs.getInt(SwingUserSettings.ICON_SIZE, 24))); } |
"Edit Column Properties", | "Column Properties", | public EditColumnAction() { super("Edit Column Properties...", ASUtils.createIcon("ColumnProperties", "Edit Column Properties", ArchitectFrame.getMainInstance().sprefs.getInt(SwingUserSettings.ICON_SIZE, 24))); } |
putValue(SHORT_DESCRIPTION, "Column Properties"); | public EditColumnAction() { super("Edit Column Properties...", ASUtils.createIcon("ColumnProperties", "Edit Column Properties", ArchitectFrame.getMainInstance().sprefs.getInt(SwingUserSettings.ICON_SIZE, 24))); } | |
views = new Vector(); | public PhotoInfoController() { modelFields = new HashMap(); initModelFields(); } | |
Iterator iter = modelFields.values().iterator(); while( iter.hasNext() ) { FieldController fieldCtrl = (FieldController) iter.next(); fieldCtrl.setViews( views ); } | protected void initModelFields() { modelFields.put( PHOTOGRAPHER, new FieldController( photo ) { protected void setModelValue() { PhotoInfo obj = (PhotoInfo) model; obj.setPhotographer( (String) value ); } protected Object getModelValue() { if ( model == null ) { return null; } PhotoIn... | |
System.out.println(dPrimeScroller.getSize()); | void drawPicture(HaploData theData){ Container contents = getContentPane(); contents.removeAll(); //remember which tab we're in if they've already been set up int currentTabIndex = 0; if (!(tabs == null)){ currentTabIndex = tabs.getSelectedIndex(); } tabs ... | |
textData.prepareGenotypeInput(inputFile); | textData.prepareHapsInput(inputFile); | private void processTextOnly(){ try { String fileName; int outputType; long maxDistance; HaploData textData; File OutputFile; File inputFile; //we use this boolean to keep track of the type of file we're processing (haps or ped) ... |
theData.prepareGenotypeInput(new File(filenames[0])); | theData.prepareHapsInput(new File(filenames[0])); | void readPhasedGenotypes(String[] f){ //input is a 3 element array with //filenames[0] = haps file //filenames[1] = info file (null if none) //filenames[2] = max comparison distance (don't compute d' if markers are greater than this dist apart) filenames = f; theData = new ... |
public Marker(String chrom, String marker, long md, long pos){ | public Marker(String chrom, String marker, double md, long pos){ | public Marker(String chrom, String marker, long md, long pos){ chromosome = chrom; markerID = marker; morganDistance = md; position = pos; } |
Statement stmt = conn.createStatement(); | Statement stmt = con.createStatement(); | public static int newUid() { int uid = -1; Connection con = getConnection(); try { Statement stmt = conn.createStatement(); stmt.executeUpdate( "UPDATE sequence SET id = LAST_INSERT_ID( id+1 )" ); ResultSet rs = stmt.executeQuery( "SELECT LAST_INSERT_ID()" ); if ( rs.next() ) { uid = rs.getInt( 1 ... |
super("Edit Relationship", | super("Relationship Propertied", | public EditRelationshipAction() { super("Edit Relationship", ASUtils.createIcon("RelationshipProperties", "Create Table", ArchitectFrame.getMainInstance().sprefs.getInt(SwingUserSettings.ICON_SIZE, 24))); } |
"Create Table", | "Relationship Properties", | public EditRelationshipAction() { super("Edit Relationship", ASUtils.createIcon("RelationshipProperties", "Create Table", ArchitectFrame.getMainInstance().sprefs.getInt(SwingUserSettings.ICON_SIZE, 24))); } |
putValue(SHORT_DESCRIPTION, "Relationship Properties"); | public EditRelationshipAction() { super("Edit Relationship", ASUtils.createIcon("RelationshipProperties", "Create Table", ArchitectFrame.getMainInstance().sprefs.getInt(SwingUserSettings.ICON_SIZE, 24))); } | |
pkPanel.add(new JLabel("")); pkPanel.add(pkTypeOne = new JRadioButton("Exactly One")); pkTypeGroup.add(pkTypeOne); | public RelationshipEditPanel() { super(new BorderLayout()); JPanel topPanel = new JPanel(new FormLayout()); topPanel.add(new JLabel("Relationship Name")); topPanel.add(relationshipName = new JTextField()); topPanel.add(new JLabel("Relationship Type")); JPanel typePanel = new JPanel(); identifyingGroup = new But... | |
} else if (pkc == SQLRelationship.ONE) { pkTypeOne.setSelected(true); | protected void setRelationship(SQLRelationship r) { this.relationship = r; relationshipName.setText(r.getName()); pkTableName.setText(relationship.getPkTable().getName()); fkTableName.setText(relationship.getFkTable().getName()); if ( r.isIdentifying()){ identifyingButton.setSelected(true); } else { nonIdent... | |
} else if (pkTypeOne.isSelected()) { relationship.setPkCardinality(SQLRelationship.ONE); | public void applyChanges() { relationship.setName(relationshipName.getText()); relationship.setIdentifying(identifyingButton.isSelected()); if (pkTypeZeroOne.isSelected()) { relationship.setPkCardinality(SQLRelationship.ZERO | SQLRelationship.ONE); } else if (pkTypeZeroToMany.isSelected()) { relationship.setPk... | |
public void run(Context context, XMLOutput output) throws Exception { | public void run(JellyContext context, XMLOutput output) throws Exception { | public void run(Context context, XMLOutput output) throws Exception { if ( select != null ) { String text = select.valueOf( null ); output.write( text ); } } |
public void addVolume( VolumeBase volume ) { | public void addVolume( VolumeBase volume ) throws PhotovaultException { VolumeBase v = getVolume( volume.getName() ); if ( v != null ) { throw new PhotovaultException( "Volume with name " + volume.getName() + " already exists" ); } | public void addVolume( VolumeBase volume ) { volumes.add( volume ); } |
File testFile = new File( "c:\\java\\photovault\\testfiles\\test1.jpg" ); | File testFile = new File( testImgDir, "test1.jpg" ); | public void testNewPhotoCreation() { File testFile = new File( "c:\\java\\photovault\\testfiles\\test1.jpg" ); ctrl.createNewPhoto( testFile ); String photographer = "Test photographer"; ctrl.setField( PhotoInfoController.PHOTOGRAPHER, photographer ); assertEquals( photographer, ctrl.getField( PhotoInfoCont... |
try { setProject(new SwingUIProject("New Project")); } catch (Exception ex) { JOptionPane.showMessageDialog(ArchitectFrame.this, "Can't create new project: "+ex.getMessage()); logger.error("Got exception while creating new project", ex); } | System.exit(0); | public void actionPerformed(ActionEvent e) { try { setProject(new SwingUIProject("New Project")); } catch (Exception ex) { JOptionPane.showMessageDialog(ArchitectFrame.this, "Can't create new project: "+ex.getMessage()); logger.error("Got exception while creating new project", ex); ... |
JFileChooser chooser = new JFileChooser(); chooser.addChoosableFileFilter(ASUtils.architectFileFilter); int returnVal = chooser.showOpenDialog(ArchitectFrame.this); if (returnVal == JFileChooser.APPROVE_OPTION) { try { SwingUIProject project = new SwingUIProject("Loading..."); project.setFile(chooser.getSelectedFile())... | if (configFile == null) configFile = ConfigFile.getDefaultInstance(); try { sprefs.setInt(SwingUserSettings.DIVIDER_LOCATION, splitPane.getDividerLocation()); sprefs.setInt(SwingUserSettings.MAIN_FRAME_X, getLocation().x); sprefs.setInt(SwingUserSettings.MAIN_FRAME_Y, getLocation().y); sprefs.setInt(SwingUserSettings.M... | public void actionPerformed(ActionEvent e) { JFileChooser chooser = new JFileChooser(); chooser.addChoosableFileFilter(ASUtils.architectFileFilter); int returnVal = chooser.showOpenDialog(ArchitectFrame.this); if (returnVal == JFileChooser.APPROVE_OPTION) { try { SwingUIProject project = new Swi... |
saveOrSaveAs(false); | try { setProject(new SwingUIProject("New Project")); } catch (Exception ex) { JOptionPane.showMessageDialog(ArchitectFrame.this, "Can't create new project: "+ex.getMessage()); logger.error("Got exception while creating new project", ex); } | public void actionPerformed(ActionEvent e) { saveOrSaveAs(false); } |
saveOrSaveAs(true); } | JFileChooser chooser = new JFileChooser(); chooser.addChoosableFileFilter(ASUtils.architectFileFilter); int returnVal = chooser.showOpenDialog(ArchitectFrame.this); if (returnVal == JFileChooser.APPROVE_OPTION) { try { SwingUIProject project = new SwingUIProject("Loading..."); project.setFile(chooser.getSelectedFile())... | public void actionPerformed(ActionEvent e) { saveOrSaveAs(true); } |
System.exit(0); } | saveOrSaveAs(false); } | public void actionPerformed(ActionEvent e) { System.exit(0); } |
if (configFile == null) configFile = ConfigFile.getDefaultInstance(); try { sprefs.setInt(SwingUserSettings.DIVIDER_LOCATION, splitPane.getDividerLocation()); sprefs.setInt(SwingUserSettings.MAIN_FRAME_X, getLocation().x); sprefs.setInt(SwingUserSettings.MAIN_FRAME_Y, getLocation().y); sprefs.setInt(SwingUserSettings.M... | saveOrSaveAs(true); | public void actionPerformed(ActionEvent e) { if (configFile == null) configFile = ConfigFile.getDefaultInstance(); try { sprefs.setInt(SwingUserSettings.DIVIDER_LOCATION, splitPane.getDividerLocation()); sprefs.setInt(SwingUserSettings.MAIN_FRAME_X, getLocation().x); sprefs.setInt(SwingUserSettings... |
} | public void actionPerformed(ActionEvent e) { if (configFile == null) configFile = ConfigFile.getDefaultInstance(); try { sprefs.setInt(SwingUserSettings.DIVIDER_LOCATION, splitPane.getDividerLocation()); sprefs.setInt(SwingUserSettings.MAIN_FRAME_X, getLocation().x); sprefs.setInt(SwingUserSettings... | |
toolBar.add(new JButton(newProjectAction)); toolBar.add(new JButton(openProjectAction)); toolBar.add(new JButton(saveProjectAction)); toolBar.add(new JButton(createTableAction)); toolBar.add(new JButton(deleteTableAction)); toolBar.add(new JButton(editColumnAction)); toolBar.add(new JButton(insertColumnAction)); toolBa... | toolBar.add(newProjectAction); toolBar.add(openProjectAction); toolBar.add(saveProjectAction); toolBar.addSeparator(); toolBar.add(createTableAction); toolBar.add(deleteTableAction); toolBar.add(editColumnAction); toolBar.add(insertColumnAction); toolBar.add(deleteColumnAction); toolBar.add(createRelationshipAction); t... | public ArchitectFrame() throws ArchitectException { mainInstance = this; try { ConfigFile cf = ConfigFile.getDefaultInstance(); prefs = cf.read(); sprefs = prefs.getSwingSettings(); } catch (IOException e) { throw new ArchitectException("prefs.read", e); } Container cp = getContentPane(); cp.setLayout(ne... |
deleteRelationshipAction.setPlayPen(playpen); | protected void setupActions() { editColumnAction.setPlayPen(playpen); insertColumnAction.setPlayPen(playpen); deleteColumnAction.setPlayPen(playpen); editTableAction.setPlayPen(playpen); deleteTableAction.setPlayPen(playpen); createTableAction.setPlayPen(playpen); createRelationshipAction.setPlayPen(playpen); ... | |
super("Create Relationship", | super("New Relationship", | public CreateRelationshipAction() { super("Create Relationship", ASUtils.createIcon("NewRelationship", "Create Relationship", ArchitectFrame.getMainInstance().sprefs.getInt(SwingUserSettings.ICON_SIZE, 24))); setEnabled(false); } |
"Create Relationship", | "New Relationship", | public CreateRelationshipAction() { super("Create Relationship", ASUtils.createIcon("NewRelationship", "Create Relationship", ArchitectFrame.getMainInstance().sprefs.getInt(SwingUserSettings.ICON_SIZE, 24))); setEnabled(false); } |
putValue(SHORT_DESCRIPTION, "New Relationship"); | public CreateRelationshipAction() { super("Create Relationship", ASUtils.createIcon("NewRelationship", "Create Relationship", ArchitectFrame.getMainInstance().sprefs.getInt(SwingUserSettings.ICON_SIZE, 24))); setEnabled(false); } | |
System.out.println(java.awt.KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner()); | logger.debug(java.awt.KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner()); | public void run() { for (;;) { if (focusDebuggerStopping) break; System.out.println(java.awt.KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner()); try { Thread.sleep(1000); } catch (InterruptedException ex) { logger.warn("Interrupted in sleep"); } ... |
PropertyConfigurator.configure( "conf/log4j.properties" ); | public static void main( String [] args ) { Photovault app = new Photovault(); app.run(); } | |
String[] alleleMap = {"", "A","C","G","T"}; | String[] alleleMap = {"X", "A","C","G","T"}; | 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... |
if(appConfig.containsMBean(objectName.getCanonicalName())){ | MBeanConfig mbeanConfig = appConfig.findMBeanByObjectName(objectName.getCanonicalName()); if(mbeanConfig != null){ | public ActionForward execute(WebContext context, ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) throws Exception { ... |
if(clusterConfig != null && clusterConfig.containsMBean(objectName.getCanonicalName())){ | if(clusterConfig != null){ mbeanConfig = clusterConfig.findMBeanByObjectName(objectName.getCanonicalName()); } if(mbeanConfig != null){ | public ActionForward execute(WebContext context, ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) throws Exception { ... |
request.setAttribute("mbeanConfig", mbeanConfig); | public ActionForward execute(WebContext context, ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) throws Exception { ... | |
tSpec.setPlSchema(dbcs.getPlSchema()); tSpec.setPlDbType(dbcs.getPlDbType()); tSpec.setOdbcDsn(dbcs.getOdbcDsn()); | public void actionPerformed(ActionEvent e) { // make a new connection spec logger.debug("Performing setTargetDBCSAction..."); panelHoldsNewDBCS = false; // we are editing the Target Database dbcs, which has already been created edittingDB = ArchitectFrame.getMainInstance().getProject().getPlayPen().... | |
idType = properties.get(ID_TYPE); | public void init(Map<String, String> properties) { mbean = properties.get(MBEAN); assert mbean != null; attribute = properties.get(ATTRIBUTE); assert attribute != null; idResolverMBean = properties.get(ID_RESOLVER_MBEAN); idResolverOperation = properties.get(ID_RESOLVER_OPE... | |
new Object[]{id}, new String[]{"long"}); | new Object[]{id}, new String[]{idType}); | private String resolveId(ServerConnection connection, Object id){ Object resolvedId = id; if(idResolverMBean != null){ if(idResolverOperation != null){ Object output = connection.invoke(new ObjectName(idResolverMBean), idResolverOperation, new Object[]... |
public ViewerTag(Class tagClass, int style) { | public ViewerTag(Class tagClass) { | public ViewerTag(Class tagClass, int style) { super(tagClass); this.style = style; } |
this.style = style; | public ViewerTag(Class tagClass, int style) { super(tagClass); this.style = style; } | |
public JFaceWidgetTag(Class widgetClass, int style) { super(widgetClass, style); | public JFaceWidgetTag(Class widgetClass) { super(widgetClass); | public JFaceWidgetTag(Class widgetClass, int style) { super(widgetClass, style); } |
props.put("mail.smtp.host", server); | Object serverInput = this.server.evaluate(context); props.put("mail.smtp.host", serverInput.toString()); | public void doTag(XMLOutput xmlOutput) throws JellyTagException { Properties props = new Properties(); props.putAll(context.getVariables()); // if a server was set then configure the system property if (server != null) { props.put("mail.smtp.host", server); } el... |
String messageBody = message; if (message != null) { invokeBody(xmlOutput); } else { message = getBodyText(encodeXML); } | String messageBody = null; if (this.message != null) { messageBody = this.message.evaluate(context).toString(); } else { messageBody = getBodyText(encodeXML); } Object fromInput = this.from.evaluate(context); Object toInput = this.to.evaluate(context); | public void doTag(XMLOutput xmlOutput) throws JellyTagException { Properties props = new Properties(); props.putAll(context.getVariables()); // if a server was set then configure the system property if (server != null) { props.put("mail.smtp.host", server); } el... |
msg.setFrom(new InternetAddress(from)); | msg.setFrom(new InternetAddress(fromInput.toString())); | public void doTag(XMLOutput xmlOutput) throws JellyTagException { Properties props = new Properties(); props.putAll(context.getVariables()); // if a server was set then configure the system property if (server != null) { props.put("mail.smtp.host", server); } el... |
StringTokenizer st = new StringTokenizer(to, ";"); | StringTokenizer st = new StringTokenizer(toInput.toString(), ";"); | public void doTag(XMLOutput xmlOutput) throws JellyTagException { Properties props = new Properties(); props.putAll(context.getVariables()); // if a server was set then configure the system property if (server != null) { props.put("mail.smtp.host", server); } el... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.