bugged stringlengths 6 599k | fixed stringlengths 10 599k | __index_level_0__ int64 0 1.13M |
|---|---|---|
public Vector findTags() { tags = new Vector(); untagged = new Vector(); taggedSoFar = 0; //potentialTagsHash stores the PotentialTag objects keyed on the corresponding sequences Hashtable potentialTagHash = new Hashtable(); PotentialTagComparator ptcomp = new PotentialTagC... | public Vector findTags() { tags = new Vector(); untagged = new Vector(); taggedSoFar = 0; //potentialTagsHash stores the PotentialTag objects keyed on the corresponding sequences Hashtable potentialTagHash = new Hashtable(); PotentialTagComparator ptcomp = new PotentialTagC... | 1,109,197 |
public Vector findTags() { tags = new Vector(); untagged = new Vector(); taggedSoFar = 0; //potentialTagsHash stores the PotentialTag objects keyed on the corresponding sequences Hashtable potentialTagHash = new Hashtable(); PotentialTagComparator ptcomp = new PotentialTagC... | public Vector findTags() { tags = new Vector(); untagged = new Vector(); taggedSoFar = 0; //potentialTagsHash stores the PotentialTag objects keyed on the corresponding sequences Hashtable potentialTagHash = new Hashtable(); PotentialTagComparator ptcomp = new PotentialTagC... | 1,109,198 |
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... | 1,109,199 |
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... | 1,109,200 |
public TaskTag(Project project, String taskName) { super( project ); this.taskName = taskName; } | public TaskTag(Project project, String taskName) { super( project ); this.taskName = taskName; } | 1,109,202 |
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); } | public void testDefaultServer() throws Exception { String text = evaluteScriptAsText( "src/test/org/apache/commons/jelly/jetty/defaultServer.jelly"//jetty/defaultServer.jelly" ); assertEquals("Produces the correct output", "It works!", text); } | 1,109,203 |
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); } | public void testHttpContext() throws Exception { String text = evaluteScriptAsText( "src/test/org/apache/commons/jelly/jetty/httpContext.jelly"//jetty/httpContext.jelly" ); assertEquals("Produces the correct output", "It works!", text); } | 1,109,204 |
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); } | public void testJellyResourceHandler() throws Exception { String text = evaluteScriptAsText( "src/test/org/apache/commons/jelly/jetty/jellyResourceHandler.jelly"//jetty/jellyResourceHandler.jelly" ); assertEquals("Produces the correct output", "It works!", text); } | 1,109,205 |
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); } | public void testJellyResourceHandler() throws Exception { String text = evaluteScriptAsText( "src/test/org/apache/commons/jelly//jetty/jellyResourceHandler.jelly" ); assertEquals("jellyResourceHandler produces the correct output", "It works!", text); text = evaluteScriptAsText( "src... | 1,109,206 |
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); } | public void testResourceHandler() throws Exception { String text = evaluteScriptAsText( "src/test/org/apache/commons/jelly/jetty/resourceHandler.jelly"//jetty/resourceHandler.jelly" ); assertEquals("Produces the correct output", "It works!", text); } | 1,109,207 |
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( ... | public void testSecurityHandler() throws Exception { String text = evaluteScriptAsText( "src/test/org/apache/commons/jelly/jetty/securityHandlerForbidden.jelly"//jetty/securityHandlerForbidden.jelly" ); assertEquals("Forbidden test produces the correct output", "It works!", text); ... | 1,109,208 |
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( ... | public void testSecurityHandler() throws Exception { String text = evaluteScriptAsText( "src/test/org/apache/commons/jelly/jetty/securityHandlerUnauthorized.jelly"//jetty/securityHandlerForbidden.jelly" ); assertEquals("Forbidden test produces the correct output", "It works!", text);... | 1,109,209 |
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); } | public void testSocketListener() throws Exception { String text = evaluteScriptAsText( "src/test/org/apache/commons/jelly/jetty/socketListener.jelly"//jetty/socketListener.jelly" ); assertEquals("Produces the correct output", "It works!", text); } | 1,109,210 |
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... | 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... | 1,109,211 |
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 ); } | 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 ); } | 1,109,212 |
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... | 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... | 1,109,213 |
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... | 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... | 1,109,214 |
public void setImage( BufferedImage img ) { origImage = img; scaledImage = null; repaint(); } | public void setImage( BufferedImage img ) { origImage = img; xformImage = null; repaint(); } | 1,109,215 |
public void setRotation( double newRot ) { imgRot = newRot; // Invalidate the existing transformed image scaledImage = null; repaint(); } | public void setRotation( double newRot ) { imgRot = newRot; // Invalidate the existing transformed image scaledImage = null; repaint(); } | 1,109,216 |
public void setScale( float newValue ) { imgScale = newValue; // Invalidate the existing scaled image scaledImage = null; repaint(); } | public void setScale( float newValue ) { imgScale = newValue; // Invalidate the existing scaled image scaledImage = null; repaint(); } | 1,109,217 |
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 ) { ... | public String toString() { StringBuffer strbuf = new StringBuffer(); strbuf.append( "<html>" ); boolean hasPhotos = ((photos.size() > 0 || allAdded) && !allRemoved); boolean hasAllPhotos = ((photos.size() == model.length || allAdded) && !allRemoved ); if ( hasPhotos ) { strbuf.append( "<b>" ); if ( !hasA... | 1,109,218 |
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",... | 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",... | 1,109,221 |
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... | 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... | 1,109,222 |
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)); ... | 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)); ... | 1,109,223 |
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)); ... | 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)); ... | 1,109,224 |
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)); ... | 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)); ... | 1,109,225 |
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)); ... | 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)); ... | 1,109,226 |
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)); ... | 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)); ... | 1,109,227 |
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)); ... | 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)); ... | 1,109,228 |
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) == ... | 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) == ... | 1,109,230 |
public void compoundEditEnd(UndoCompoundEvent e) { if (logger.isDebugEnabled()) { logger.debug("compoundEditStart with event: "+e.toString()); } compoundGroupEnd(); } | public void compoundEditEnd(UndoCompoundEvent e) { if (logger.isDebugEnabled()) { logger.debug("compoundEditEnd with event: "+e.toString()); } compoundGroupEnd(); } | 1,109,232 |
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... | 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... | 1,109,233 |
public XPathExpression(String text, Expression xpathExpr, TagScript tagScript) { this.text = text; this.xpathExpr = xpathExpr; Map namespaceContext = tagScript.getNamespaceContext(); this.uris = createUriMap(namespaceContext); } | public XPathExpression(String text, Expression xpathExpr, TagScript tagScript) { this.text = text; this.xpathExpr = xpathExpr; Map namespaceContext = tagScript.getNamespaceContext(); this.uris = createUriMap(namespaceContext); } | 1,109,234 |
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... | 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... | 1,109,236 |
public Tag createTag() { return new StaticTag( namespaceURI, localName, qName ); } | public Tag createTag(String name, Attributes attributes) { return new StaticTag( namespaceURI, localName, qName ); } | 1,109,237 |
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... | public void setOutputFile(String fileName) throws IOException { if (fileName == null) { /* Set the output file back to System.out */ setOutputFile(new PrintWriter(System.out, true)); } else { File file = new File(fileName); setOutputFile(new PrintWriter(new FileWriter(file), true)); System.out.println("Out... | 1,109,240 |
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. ... | 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. ... | 1,109,241 |
public void setAttribute(String name, Object value) throws Exception { if (name.equals( "var" ) ) { this.var = value.toString(); } else { super.setAttribute(name, value); } } | public void setAttribute(String name, Object value) throws Exception { if (name.equals( "var" ) ) { this.var = value.toString(); } else { Component component = getComponent(); if ( component != null ) { if ( name.equals( "location" ) ) { Point p = null; if ( value ... | 1,109,242 |
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... | 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... | 1,109,245 |
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... | 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... | 1,109,247 |
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 ) ); ... | 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 ) ); ... | 1,109,248 |
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... | 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... | 1,109,249 |
public PhotoInfoDlg( Frame owner, boolean modal, PhotoInfo photo ) { super( owner, DIALOG_TITLE, modal ); ctrl = new PhotoInfoController(); ctrl.setPhoto( photo ); createUI(); } | public PhotoInfoDlg( Frame owner, boolean modal, PhotoInfo photo ) { super( owner, DIALOG_TITLE, modal ); ctrl = new PhotoInfoController(); createUI(); } | 1,109,250 |
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 ); } } | 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, false ); } } | 1,109,252 |
public EditColumnAction() { super("Edit Column Properties...", ASUtils.createIcon("ColumnProperties", "Edit Column Properties", ArchitectFrame.getMainInstance().sprefs.getInt(SwingUserSettings.ICON_SIZE, 24))); } | public EditColumnAction() { super("Column Properties...", ASUtils.createIcon("ColumnProperties", "Edit Column Properties", ArchitectFrame.getMainInstance().sprefs.getInt(SwingUserSettings.ICON_SIZE, 24))); } | 1,109,253 |
public EditColumnAction() { super("Edit Column Properties...", ASUtils.createIcon("ColumnProperties", "Edit Column Properties", ArchitectFrame.getMainInstance().sprefs.getInt(SwingUserSettings.ICON_SIZE, 24))); } | public EditColumnAction() { super("Edit Column Properties...", ASUtils.createIcon("ColumnProperties", "Column Properties", ArchitectFrame.getMainInstance().sprefs.getInt(SwingUserSettings.ICON_SIZE, 24))); } | 1,109,254 |
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) ... | 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) ... | 1,109,259 |
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 ... | 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 ... | 1,109,260 |
public Marker(String chrom, String marker, long md, long pos){ chromosome = chrom; markerID = marker; morganDistance = md; position = pos; } | public Marker(String chrom, String marker, double md, long pos){ chromosome = chrom; markerID = marker; morganDistance = md; position = pos; } | 1,109,261 |
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 ... | public static int newUid() { int uid = -1; Connection con = getConnection(); try { Statement stmt = con.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 )... | 1,109,262 |
public EditRelationshipAction() { super("Edit Relationship", ASUtils.createIcon("RelationshipProperties", "Create Table", ArchitectFrame.getMainInstance().sprefs.getInt(SwingUserSettings.ICON_SIZE, 24))); } | public EditRelationshipAction() { super("Relationship Propertied", ASUtils.createIcon("RelationshipProperties", "Create Table", ArchitectFrame.getMainInstance().sprefs.getInt(SwingUserSettings.ICON_SIZE, 24))); } | 1,109,263 |
public EditRelationshipAction() { super("Edit Relationship", ASUtils.createIcon("RelationshipProperties", "Create Table", ArchitectFrame.getMainInstance().sprefs.getInt(SwingUserSettings.ICON_SIZE, 24))); } | public EditRelationshipAction() { super("Edit Relationship", ASUtils.createIcon("RelationshipProperties", "Relationship Properties", ArchitectFrame.getMainInstance().sprefs.getInt(SwingUserSettings.ICON_SIZE, 24))); } | 1,109,264 |
public void run(Context context, XMLOutput output) throws Exception { if ( select != null ) { String text = select.valueOf( null ); output.write( text ); } } | public void run(JellyContext context, XMLOutput output) throws Exception { if ( select != null ) { String text = select.valueOf( null ); output.write( text ); } } | 1,109,269 |
public void addVolume( VolumeBase volume ) { volumes.add( 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" ); } volumes.add( volume ); } | 1,109,270 |
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... | public void testNewPhotoCreation() { File testFile = new File( testImgDir, "test1.jpg" ); ctrl.createNewPhoto( testFile ); String photographer = "Test photographer"; ctrl.setField( PhotoInfoController.PHOTOGRAPHER, photographer ); assertEquals( photographer, ctrl.getField( PhotoInfoController.PHOTOGRAPHER )... | 1,109,271 |
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); ... | 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); ... | 1,109,272 |
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... | 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... | 1,109,273 |
public void actionPerformed(ActionEvent e) { saveOrSaveAs(false); } | 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); } } | 1,109,274 |
public void actionPerformed(ActionEvent e) { saveOrSaveAs(true); } | public void actionPerformed(ActionEvent e) { saveOrSaveAs(true); } | 1,109,275 |
public void actionPerformed(ActionEvent e) { System.exit(0); } | public void actionPerformed(ActionEvent e) { System.exit(0); } | 1,109,276 |
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... | 1,109,277 |
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... | 1,109,278 |
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... | 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... | 1,109,279 |
public CreateRelationshipAction() { super("Create Relationship", ASUtils.createIcon("NewRelationship", "Create Relationship", ArchitectFrame.getMainInstance().sprefs.getInt(SwingUserSettings.ICON_SIZE, 24))); setEnabled(false); } | public CreateRelationshipAction() { super("New Relationship", ASUtils.createIcon("NewRelationship", "Create Relationship", ArchitectFrame.getMainInstance().sprefs.getInt(SwingUserSettings.ICON_SIZE, 24))); setEnabled(false); } | 1,109,281 |
public CreateRelationshipAction() { super("Create Relationship", ASUtils.createIcon("NewRelationship", "Create Relationship", ArchitectFrame.getMainInstance().sprefs.getInt(SwingUserSettings.ICON_SIZE, 24))); setEnabled(false); } | public CreateRelationshipAction() { super("New Relationship", ASUtils.createIcon("NewRelationship", "New Relationship", ArchitectFrame.getMainInstance().sprefs.getInt(SwingUserSettings.ICON_SIZE, 24))); setEnabled(false); } | 1,109,282 |
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"); } ... | public void run() { for (;;) { if (focusDebuggerStopping) break; logger.debug(java.awt.KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner()); try { Thread.sleep(1000); } catch (InterruptedException ex) { logger.warn("Interrupted in sleep"); } } ... | 1,109,284 |
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... | 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... | 1,109,286 |
public ActionForward execute(WebContext context, ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) throws Exception { ... | public ActionForward execute(WebContext context, ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) throws Exception { ... | 1,109,287 |
public ActionForward execute(WebContext context, ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) throws Exception { ... | public ActionForward execute(WebContext context, ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) throws Exception { ... | 1,109,288 |
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[]... | 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[]... | 1,109,292 |
public ViewerTag(Class tagClass, int style) { super(tagClass); this.style = style; } | public ViewerTag(Class tagClass) { super(tagClass); this.style = style; } | 1,109,293 |
public ViewerTag(Class tagClass, int style) { super(tagClass); this.style = style; } | public ViewerTag(Class tagClass, int style) { super(tagClass); } | 1,109,294 |
public JFaceWidgetTag(Class widgetClass, int style) { super(widgetClass, style); } | public JFaceWidgetTag(Class widgetClass, int style) { super(widgetClass, style); } | 1,109,295 |
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... | 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) { Object serverInput = this.server.evaluate(context); prop... | 1,109,296 |
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... | 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... | 1,109,297 |
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... | 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... | 1,109,298 |
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... | 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... | 1,109,299 |
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... | 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... | 1,109,300 |
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... | 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... | 1,109,301 |
public void setCC(String cc) { this.cc = cc; } | public void setCC(Expression cc) { this.cc = cc; } | 1,109,302 |
public void setFrom(String from) { this.from = from; } | public void setFrom(Expression from) { this.from = from; } | 1,109,303 |
public void setMessage(String message) { this.message = message; } | public void setMessage(Expression message) { this.message = message; } | 1,109,304 |
public void setServer(String server) { this.server = server; } | public void setServer(Expression server) { this.server = server; } | 1,109,305 |
public void setSubject(String subject) { this.subject = subject; } | public void setSubject(Expression subject) { this.subject = subject; } | 1,109,306 |
public void setTo(String to) { this.to = to; } | public void setTo(Expression to) { this.to = to; } | 1,109,307 |
public void doTag(XMLOutput output) throws Exception { // for use by inner classes this.output = output; Stylesheet stylesheet = getStylesheet(); stylesheet.clear(); // run the body to add the rules getBody().run(context, output); stylesheet.setModeName(getMode()); if (var != null) { context.setVariable(var,... | public void doTag(XMLOutput output) throws Exception { // for use by inner classes this.output = output; Stylesheet stylesheet = getStylesheet(); stylesheet.clear(); // run the body to add the rules invokeBody(output); stylesheet.setModeName(getMode()); if (var != null) { context.setVariable(var, stylesheet)... | 1,109,309 |
private boolean login( LoginDlg ld ) { boolean success = false; String user = ld.getUsername(); String passwd = ld.getPassword(); String dbName = ld.getDb(); log.debug( "Using configuration " + dbName ); settings.setConfiguration( dbName ); PVDatabase db = settings.getDatabase( dbName ); String... | private void login( LoginDlg ld ) throws PhotovaultException { boolean success = false; String user = ld.getUsername(); String passwd = ld.getPassword(); String dbName = ld.getDb(); log.debug( "Using configuration " + dbName ); settings.setConfiguration( dbName ); PVDatabase db = settings.getDatabase(... | 1,109,310 |
private boolean login( LoginDlg ld ) { boolean success = false; String user = ld.getUsername(); String passwd = ld.getPassword(); String dbName = ld.getDb(); log.debug( "Using configuration " + dbName ); settings.setConfiguration( dbName ); PVDatabase db = settings.getDatabase( dbName ); String... | private boolean login( LoginDlg ld ) { boolean success = false; String user = ld.getUsername(); String passwd = ld.getPassword(); String dbName = ld.getDb(); log.debug( "Using configuration " + dbName ); settings.setConfiguration( dbName ); PVDatabase db = settings.getDatabase( dbName ); String... | 1,109,311 |
private boolean login( LoginDlg ld ) { boolean success = false; String user = ld.getUsername(); String passwd = ld.getPassword(); String dbName = ld.getDb(); log.debug( "Using configuration " + dbName ); settings.setConfiguration( dbName ); PVDatabase db = settings.getDatabase( dbName ); String... | private boolean login( LoginDlg ld ) { boolean success = false; String user = ld.getUsername(); String passwd = ld.getPassword(); String dbName = ld.getDb(); log.debug( "Using configuration " + dbName ); settings.setConfiguration( dbName ); PVDatabase db = settings.getDatabase( dbName ); String... | 1,109,312 |
private boolean login( LoginDlg ld ) { boolean success = false; String user = ld.getUsername(); String passwd = ld.getPassword(); String dbName = ld.getDb(); log.debug( "Using configuration " + dbName ); settings.setConfiguration( dbName ); PVDatabase db = settings.getDatabase( dbName ); String... | private boolean login( LoginDlg ld ) { boolean success = false; String user = ld.getUsername(); String passwd = ld.getPassword(); String dbName = ld.getDb(); log.debug( "Using configuration " + dbName ); settings.setConfiguration( dbName ); PVDatabase db = settings.getDatabase( dbName ); String... | 1,109,313 |
void run() { checkSystem(); PhotovaultSettings settings = PhotovaultSettings.getSettings(); Collection databases = settings.getDatabases(); if ( databases.size() == 0 ) { DbSettingsDlg dlg = new DbSettingsDlg( null, true ); if ( dlg.showDialog() != dlg.APPROVE_OPTIO... | void run() { checkSystem(); PhotovaultSettings settings = PhotovaultSettings.getSettings(); Collection databases = settings.getDatabases(); if ( databases.size() == 0 ) { DbSettingsDlg dlg = new DbSettingsDlg( null, true ); if ( dlg.showDialog() != dlg.APPROVE_OPTIO... | 1,109,314 |
void run() { checkSystem(); PhotovaultSettings settings = PhotovaultSettings.getSettings(); Collection databases = settings.getDatabases(); if ( databases.size() == 0 ) { DbSettingsDlg dlg = new DbSettingsDlg( null, true ); if ( dlg.showDialog() != dlg.APPROVE_OPTIO... | void run() { checkSystem(); PhotovaultSettings settings = PhotovaultSettings.getSettings(); Collection databases = settings.getDatabases(); if ( databases.size() == 0 ) { DbSettingsDlg dlg = new DbSettingsDlg( null, true ); if ( dlg.showDialog() != dlg.APPROVE_OPTIO... | 1,109,315 |
public void setExportingTables(List<SQLTable> exportingTables) { tables = exportingTables; } | public void setExportingTables(List<SQLTable> exportingTables) { logger.debug("setExportingTables(): got new list of tables to export: "+exportingTables); tables = new ArrayList<SQLTable>(exportingTables); } | 1,109,317 |
public synchronized void setupDialog() { logger.debug("running setupDialog()"); if (plexp == null) { throw new NullPointerException("setupDialog: plexp was null"); } // always refresh Target Database (it might have changed) plexp.setTargetDataSource(ArchitectFrame.getMainInstance().getProject().getTargetDatabas... | public synchronized void setupDialog() { logger.debug("running setupDialog()"); if (plexp == null) { throw new NullPointerException("setupDialog: plexp was null"); } // always refresh Target Database (it might have changed) plexp.setTargetDataSource(ArchitectFrame.getMainInstance().getProject().getTargetDatabas... | 1,109,318 |
public synchronized void setupDialog() { logger.debug("running setupDialog()"); if (plexp == null) { throw new NullPointerException("setupDialog: plexp was null"); } // always refresh Target Database (it might have changed) plexp.setTargetDataSource(ArchitectFrame.getMainInstance().getProject().getTargetDatabas... | public synchronized void setupDialog() { logger.debug("running setupDialog()"); if (plexp == null) { throw new NullPointerException("setupDialog: plexp was null"); } // always refresh Target Database (it might have changed) plexp.setTargetDataSource(ArchitectFrame.getMainInstance().getProject().getTargetDatabas... | 1,109,319 |
public synchronized void setupDialog() { logger.debug("running setupDialog()"); if (plexp == null) { throw new NullPointerException("setupDialog: plexp was null"); } // always refresh Target Database (it might have changed) plexp.setTargetDataSource(ArchitectFrame.getMainInstance().getProject().getTargetDatabas... | public synchronized void setupDialog() { logger.debug("running setupDialog()"); if (plexp == null) { throw new NullPointerException("setupDialog: plexp was null"); } // always refresh Target Database (it might have changed) plexp.setTargetDataSource(ArchitectFrame.getMainInstance().getProject().getTargetDatabas... | 1,109,320 |
public void actionPerformed(ActionEvent evt) { if (!plPanel.applyChanges()) { return; } try { List targetTables = tables; List targetDBWarnings = listMissingTargetTables(targetTables); if (!targetDBWarnings.isEmpty()) { // modal dialog (hold things up until the user says YES or N... | public void actionPerformed(ActionEvent evt) { if (!plPanel.applyChanges()) { return; } try { List targetTables = tables; List targetDBWarnings = listMissingTargetTables(targetTables); if (!targetDBWarnings.isEmpty()) { // modal dialog (hold things up until the user says YES or N... | 1,109,321 |
public void actionPerformed(ActionEvent evt) { if (!plPanel.applyChanges()) { return; } try { List targetTables = tables; List targetDBWarnings = listMissingTargetTables(targetTables); if (!targetDBWarnings.isEmpty()) { // modal dialog (hold things up until the user says YES or N... | public void actionPerformed(ActionEvent evt) { if (!plPanel.applyChanges()) { return; } try { List targetTables = tables; List targetDBWarnings = listMissingTargetTables(targetTables); if (!targetDBWarnings.isEmpty()) { // modal dialog (hold things up until the user says YES or N... | 1,109,322 |
public void actionPerformed(ActionEvent evt) { if (!plPanel.applyChanges()) { return; } try { List targetTables = tables; List targetDBWarnings = listMissingTargetTables(targetTables); if (!targetDBWarnings.isEmpty()) { // modal dialog (hold things up until the user says YES or N... | public void actionPerformed(ActionEvent evt) { if (!plPanel.applyChanges()) { return; } try { List targetTables = tables; List targetDBWarnings = listMissingTargetTables(targetTables); if (!targetDBWarnings.isEmpty()) { // modal dialog (hold things up until the user says YES or N... | 1,109,323 |
HaploData(){ assocTest = 0; } | HaploData(){ assocTest = 0; } | 1,109,324 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.