rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
public String makeDropForeignKeySQL(String fkCatalog, String fkSchema, String fkTable, String fkName) { | public String makeDropForeignKeySQL(String fkTable, String fkName) { | public String makeDropForeignKeySQL(String fkCatalog, String fkSchema, String fkTable, String fkName) { return "\n ALTER TABLE ONLY " +DDLUtils.toQualifiedName(fkCatalog, fkSchema, fkTable) +" DROP CONSTRAINT " +fkName; } |
+DDLUtils.toQualifiedName(fkCatalog, fkSchema, fkTable) +" DROP CONSTRAINT " +fkName; | + toQualifiedName(fkTable) + " DROP CONSTRAINT " + fkName; | public String makeDropForeignKeySQL(String fkCatalog, String fkSchema, String fkTable, String fkName) { return "\n ALTER TABLE ONLY " +DDLUtils.toQualifiedName(fkCatalog, fkSchema, fkTable) +" DROP CONSTRAINT " +fkName; } |
public void modifyColumn(SQLColumn c) throws ArchitectDiffException { | public void modifyColumn(SQLColumn c) { | public void modifyColumn(SQLColumn c) throws ArchitectDiffException { Map colNameMap = new HashMap(); SQLTable t = c.getParentTable(); print("\n ALTER TABLE ONLY "); print( toQualifiedName(t) ); print(" ALTER COLUMN "); // Column name String columnPhysName =... |
public String toIdentifier(String logicalName, String physicalName) { | private String toIdentifier(String logicalName, String physicalName) { | public String toIdentifier(String logicalName, String physicalName) { // replace spaces with underscores if (logicalName == null) return null; if (logger.isDebugEnabled()) logger.debug("getting physical name for: " + logicalName); String ident = logicalName.replace(' ','_').toLowerCase(); if (logger.isDebugEnable... |
if (currentInd.getIsTyped()){ byte[] markers = currentInd.getMarker(loc); allele1 = markers[0]; allele2 = markers[1]; String familyID = currentInd.getFamilyID(); if(numindivs.containsKey(familyID)){ int value = ((Integer)numindivs.get(familyID)).intValue() +1; numindivs.put(familyID, new Integer(value)); } else{ nu... | byte[] markers = currentInd.getMarker(loc); allele1 = markers[0]; allele2 = markers[1]; String familyID = currentInd.getFamilyID(); if(numindivs.containsKey(familyID)){ int value = ((Integer)numindivs.get(familyID)).intValue() +1; numindivs.put(familyID, new Integer(value)); } else{ numindivs.put(familyID, new Inte... | private MarkerResult checkMarker(int loc)throws PedFileException{ MarkerResult result = new MarkerResult(); Individual currentInd; //int indivgeno=0, int missing=0, parenthet=0, mendErrNum=0; int allele1=0, allele2=0, hom=0, het=0; //Hashtable allgenos = new Hashtable(); ... |
if (allele1 != momAllele1 && allele2 != momAllele1){ | if (allele1 == allele2) { | private MarkerResult checkMarker(int loc)throws PedFileException{ MarkerResult result = new MarkerResult(); Individual currentInd; //int indivgeno=0, int missing=0, parenthet=0, mendErrNum=0; int allele1=0, allele2=0, hom=0, het=0; //Hashtable allgenos = new Hashtable(); ... |
if (dadAllele1 == dadAllele2){ if(allele1 != dadAllele1 && allele2 != dadAllele1){ mendErrNum++; currentInd.zeroOutMarker(loc); currentFamily.getMember(currentInd.getMomID()).zeroOutMarker(loc); currentFamily.getMember(currentInd.getDadID()).zeroOutMarker(loc); } | if (allele1 != momAllele1 && allele2 != momAllele1){ mendErrNum++; currentInd.zeroOutMarker(loc); currentFamily.getMember(currentInd.getMomID()).zeroOutMarker(loc); currentFamily.getMember(currentInd.getDadID()).zeroOutMarker(loc); | private MarkerResult checkMarker(int loc)throws PedFileException{ MarkerResult result = new MarkerResult(); Individual currentInd; //int indivgeno=0, int missing=0, parenthet=0, mendErrNum=0; int allele1=0, allele2=0, hom=0, het=0; //Hashtable allgenos = new Hashtable(); ... |
if (currentInd.getIsTyped()){ byte[] markers; byte[] zeroArray = {0,0}; if (currentInd.getZeroed(loc)){ markers = zeroArray; }else{ markers = currentInd.getMarker(loc); } allele1 = markers[0]; allele2 = markers[1]; String familyID = currentInd.getFamilyID(); if(numindivs.containsKey(familyID)){ int value = ((Intege... | byte[] markers; byte[] zeroArray = {0,0}; if (currentInd.getZeroed(loc)){ markers = zeroArray; }else{ markers = currentInd.getMarker(loc); } allele1 = markers[0]; allele2 = markers[1]; String familyID = currentInd.getFamilyID(); if(numindivs.containsKey(familyID)){ int value = ((Integer)numindivs.get(familyID)).int... | private MarkerResult checkMarker(int loc)throws PedFileException{ MarkerResult result = new MarkerResult(); Individual currentInd; //int indivgeno=0, int missing=0, parenthet=0, mendErrNum=0; int allele1=0, allele2=0, hom=0, het=0; //Hashtable allgenos = new Hashtable(); ... |
super(c,d); | columnNames=c; data=d; | public CheckDataTableModel(Vector c, Vector d, int[] r, int[] dups){ super(c,d); ratings = r; this.dups = dups; } |
Method method = taskClass.getMethod( methodName, emptyParameterTypes ); | Method method = MethodUtils.getAccessibleMethod( taskClass, methodName, emptyParameterTypes ); | 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... |
registerTag("image", ImageTag.class); | public SwtTagLibrary() { // widgets registerWidgetTag( "button", Button.class, SWT.BORDER | SWT.PUSH | SWT.CENTER ); registerWidgetTag( "canvas", Canvas.class ); registerWidgetTag( "caret", Caret.class ); registerWidgetTag( "combo", Combo.class, SWT.DROP_DOWN ); registerWid... | |
if (args[a].equals("-n")){ | if (args[a].equals("-n") || args[a].equalsIgnoreCase("-nogui")){ | public static void main(String[] args) { int exitValue = 0; String dir = System.getProperty("user.dir"); String sep = System.getProperty("file.separator"); String ver = System.getProperty("java.version"); System.out.println(ver); String jarfile = System.getProperty("java.cl... |
PairwiseLinkage[][] dPrimeTable = theData.getFilteredTable(); | PairwiseLinkage[][] dPrimeTable = theData.filteredDPrimeTable; | public void mousePressed (MouseEvent e) { //if users right clicks & holds, pop up the info if ((e.getModifiers() & InputEvent.BUTTON3_MASK) == InputEvent.BUTTON3_MASK){ PairwiseLinkage[][] dPrimeTable = theData.getFilteredTable(); final int clickX = e.getX(); ... |
Tag tag = getTag(); if ( tag == null ) { return; } | public void run(JellyContext context, XMLOutput output) throws Exception { tag.setContext(context); // initialize all the properties of the tag before its used // if there is a problem abort this tag for (int i = 0, size = expressions.length; i < size; i++) { Expressio... | |
else { String varName = var; if ( varName == null ) { varName = indexVar; } for (index = begin; index < end; index += step ) { if (varName != null) { Object value = new Integer(index); context.setVariable(varName, value); } invokeBody(output); } } | public void doTag(XMLOutput output) throws Exception { if (log.isDebugEnabled()) { log.debug("running with items: " + items); } if (items != null) { Iterator iter = items.evaluateAsIterator(context); if (log.isDebugEnabled()) { log.debug("Iteratin... | |
getBody().run(context, output); | invokeBody(output); | public void doTag(XMLOutput output) throws Exception { value = false; if ( test != null ) { if ( test.evaluateAsBoolean( context ) ) { value = true; getBody().run(context, output); } } } |
} else if (StorableTestBasic.class.isAssignableFrom(mType)) { indexes = new StorableIndex[] { makeIndex(mType, "id").unique(true).clustered(true), makeIndex(mType, "stringProp", "doubleProp").unique(true), makeIndex(mType, "-stringProp", "-intProp", "~id").unique(true), makeIndex(mType, "+intProp", "stringProp", "~id")... | public Collection<StorableIndex<S>> getAllIndexes() { StorableIndex<S>[] indexes; if (Address.class.isAssignableFrom(mType)) { indexes = new StorableIndex[] { makeIndex(mType, "addressID"), makeIndex(mType, "addressState") ... | |
this.addSeparator(); JMenuItem clearItem = new JMenuItem("Clear Recent Files"); clearItem.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { clear(); } }); recentFileNames.add("Clear Recent Items"); this.add(clearItem); | private void loadRecentMenu() { setEnabled(false); // Clear out both all menu items and List in memory for (int i = getMenuComponentCount() - 1; i >= 0; i--) { remove(0); } recentFileNames.clear(); // Copy from Prefs into Menu JMenuItem mi; for (int i = 0; i < maxRecentFiles; i++) { String f = prefs.get(PR... | |
pageContext.getOut().println("<div id=\""+getId()+"\">"+componentDisplay+""); | pageContext.getOut().println(componentDisplay); | public int doStartTag() throws JspException{ HttpServletRequest request = (HttpServletRequest)pageContext.getRequest(); WebContext context = null; try{ context = WebContext.get(request); ApplicationConfig appConfig = context.getApplicationConfig(); ... |
this.request = request; | this.request = request; setServerPath(); | public DashboardContextImpl(WebContext webContext, DashboardConfig dashboardConfig, HttpServletRequest request){ this.webContext = webContext; this.dashboardConfig = dashboardConfig; this.request = request; } |
log.info( "Setting url to: "+ jdbcURL ); | public void setUrl(String jdbcURL) { log.info( "Setting url to: "+ jdbcURL ); this.jdbcURL = jdbcURL; } | |
this.computePreferredSize(theHV.getGraphics()); | DPrimeDisplay(HaploView h){ theData=h.theData; theHV = h; this.colorDPrime(STD_SCHEME); this.setDoubleBuffered(true); addMouseListener(this); addMouseMotionListener(this); this.setAutoscrolls(true); } | |
public JeezTagLibrary(org.apache.tools.ant.Project antProject) { this.coreTagLib = new CoreTagLibrary(); this.antTagLib = new AntTagLibrary( antProject ); this.werkzTagLib = new WerkzTagLibrary(); | public JeezTagLibrary(Project antProject) { this.project = antProject; this.runtimeTasks = new HashSet(); this.antTagLib = new AntTagLibrary( antProject ); this.werkzTagLib = new WerkzTagLibrary(); | public JeezTagLibrary(org.apache.tools.ant.Project antProject) { this.coreTagLib = new CoreTagLibrary(); this.antTagLib = new AntTagLibrary( antProject ); this.werkzTagLib = new WerkzTagLibrary(); registerTag( "target", TargetTag.class ); } |
script = this.coreTagLib.createTagScript( name, attrs ); | public TagScript createTagScript(String name, Attributes attrs) throws Exception { TagScript script = super.createTagScript( name, attrs ); if ( script == null ) { script = this.coreTagLib.createTagScript( name, attrs ); if ( script ... | |
script = this.antTagLib.createTagScript( name, attrs ); | if ( isRuntimeTask( name ) ) { if ( ! project.getTaskDefinitions().containsKey( name ) ) { script = this.antTagLib.createRuntimeTaskTagScript( name, attrs ); } else { this.runtimeTasks.remove( name ); } } if ( script == null ) { script = this.antTagLib.createTagScript( name, attrs ); } if ( name.equals( "taskdef" ) )... | public TagScript createTagScript(String name, Attributes attrs) throws Exception { TagScript script = super.createTagScript( name, attrs ); if ( script == null ) { script = this.coreTagLib.createTagScript( name, attrs ); if ( script ... |
server in the list */ | server in the list (could be further down in the list, if the first server(s) is down */ | public ActionForward execute(WebContext context, ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) throws Exception { ... |
} if(objInfo == null){ throw new ConnectionFailedException(null); | public ActionForward execute(WebContext context, ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) throws Exception { ... | |
caller = h; setTitle(title); | super(h, title); | public ReadDataDialog(String title, HaploView h){ caller = h; setTitle(title); JPanel contents = new JPanel(); JButton hapmapButton = new JButton(HAPMAP_DATA); hapmapButton.addActionListener(this); //hapmap isn't ready yet hapmapButton.setEnabled(false); JButt... |
this.setLocation(caller.getX() + 100, caller.getY() + 100); | this.setLocation(this.getParent().getX() + 100, this.getParent().getY() + 100); | public ReadDataDialog(String title, HaploView h){ caller = h; setTitle(title); JPanel contents = new JPanel(); JButton hapmapButton = new JButton(HAPMAP_DATA); hapmapButton.addActionListener(this); //hapmap isn't ready yet hapmapButton.setEnabled(false); JButt... |
HaploView caller = (HaploView)this.getParent(); | public void actionPerformed(ActionEvent e) { String command = e.getActionCommand(); if (command==RAW_DATA){ load(PED); }else if (command == PHASED_DATA){ load(HAPS); }else if (command == BROWSE_GENO){ browse(GENO); }else if (command == BROWSE_INFO)... | |
genoFileField.requestFocus(); genoFileField.dispatchEvent( | try{ SwingUtilities.invokeLater( new Runnable(){ public void run() { genoFileField.requestFocus(); }}); }catch (RuntimeException re){ } /*genoFileField.dispatchEvent( | void load(int ft){ fileType = ft; JPanel contents = new JPanel(); contents.setLayout(new BoxLayout(contents, BoxLayout.Y_AXIS)); JPanel filePanel = new JPanel(); filePanel.setLayout(new BoxLayout(filePanel, BoxLayout.Y_AXIS)); JPanel topFilePanel = new JPanel(); JPan... |
); | );*/ | void load(int ft){ fileType = ft; JPanel contents = new JPanel(); contents.setLayout(new BoxLayout(contents, BoxLayout.Y_AXIS)); JPanel filePanel = new JPanel(); filePanel.setLayout(new BoxLayout(filePanel, BoxLayout.Y_AXIS)); JPanel topFilePanel = new JPanel(); JPan... |
hapMapTranslate.put("NA06993.dup", "dup NA06993.dup 0 0 1 0"); | public PedFile(){ //hardcoded hapmap info this.families = new Hashtable(); hapMapTranslate = new Hashtable(90,1); hapMapTranslate.put("NA10846", "1334 NA10846 NA12144 NA12145 1 0" ); hapMapTranslate.put("NA12144", "1334 NA12144 0 0 1 0"); hapMapTranslate.put("NA12145", "133... | |
hapMapTranslate.put("NA11993.dup", "dup NA11993.dup 0 0 2 0"); | public PedFile(){ //hardcoded hapmap info this.families = new Hashtable(); hapMapTranslate = new Hashtable(90,1); hapMapTranslate.put("NA10846", "1334 NA10846 NA12144 NA12145 1 0" ); hapMapTranslate.put("NA12144", "1334 NA12144 0 0 1 0"); hapMapTranslate.put("NA12145", "133... | |
hapMapTranslate.put("NA12156.dup", "dup NA12156.dup 0 0 2 0"); | public PedFile(){ //hardcoded hapmap info this.families = new Hashtable(); hapMapTranslate = new Hashtable(90,1); hapMapTranslate.put("NA10846", "1334 NA10846 NA12144 NA12145 1 0" ); hapMapTranslate.put("NA12144", "1334 NA12144 0 0 1 0"); hapMapTranslate.put("NA12145", "133... | |
hapMapTranslate.put("NA12248.dup", "dup NA1248.dup 0 0 1 0"); | public PedFile(){ //hardcoded hapmap info this.families = new Hashtable(); hapMapTranslate = new Hashtable(90,1); hapMapTranslate.put("NA10846", "1334 NA10846 NA12144 NA12145 1 0" ); hapMapTranslate.put("NA12144", "1334 NA12144 0 0 1 0"); hapMapTranslate.put("NA12145", "133... | |
hapMapTranslate.put("NA12003.dup", "dup NA12003.dup 0 0 1 0"); | public PedFile(){ //hardcoded hapmap info this.families = new Hashtable(); hapMapTranslate = new Hashtable(90,1); hapMapTranslate.put("NA10846", "1334 NA10846 NA12144 NA12145 1 0" ); hapMapTranslate.put("NA12144", "1334 NA12144 0 0 1 0"); hapMapTranslate.put("NA12145", "133... | |
Vector namesIncludingDups = new Vector(); | public void parseHapMap(Vector rawLines) throws PedFileException { int colNum = -1; int numLines = rawLines.size(); Individual ind; this.order = new Vector(); //sort first Vector lines = new Vector(); Hashtable sortHelp = new Hashtable(numLines-1,1.0f); long[]... | |
String alleles = tokenizer.nextToken(); | public void parseHapMap(Vector rawLines) throws PedFileException { int colNum = -1; int numLines = rawLines.size(); Individual ind; this.order = new Vector(); //sort first Vector lines = new Vector(); Hashtable sortHelp = new Hashtable(numLines-1,1.0f); long[]... | |
public AddObjectsTask(List sqlObjects, | public AddObjectsTask(List<SQLObject> sqlObjects, | public AddObjectsTask(List sqlObjects, Point preferredLocation, ProgressMonitor pm, JDialog parentDialog) { this.sqlObjects = sqlObjects; this.preferredLocation = preferredLocation; this.parentDialog = parentDialog; finished = false; new ProgressWatcher(pm, this); } |
Component c = ArchitectFrame.getMainInstance(); if (parentDialog != null) { c = parentDialog; } JOptionPane.showMessageDialog(c, errorMessage, "Error Dropping Tables into Playpen", JOptionPane.ERROR_MESSAGE); | JOptionPane.showMessageDialog(parentDialog, errorMessage, "Error Dropping Tables into Playpen", JOptionPane.ERROR_MESSAGE); | public void cleanup() { if (errorMessage != null) { Component c = ArchitectFrame.getMainInstance(); if (parentDialog != null) { c = parentDialog; } JOptionPane.showMessageDialog(c, errorMessage, "Error Dropping Tables into Playpen", JOptionPane.ERROR_MESSAGE); if (getNextProcess() != null) { ... |
ArchitectFrame.getMainInstance().getProject().getPlayPen().fireUndoCompoundEvent(new UndoCompoundEvent(this,EventTypes.MULTI_SELECT_START,"Starting multi-select")); try { Iterator<SQLObject> soIt = sqlObjects.iterator(); while (soIt.hasNext() && !isCancelled()) { SQLObject someData = soIt.next(); someData.fireDbStr... | public void cleanup() { if (errorMessage != null) { Component c = ArchitectFrame.getMainInstance(); if (parentDialog != null) { c = parentDialog; } JOptionPane.showMessageDialog(c, errorMessage, "Error Dropping Tables into Playpen", JOptionPane.ERROR_MESSAGE); if (getNextProcess() != null) { ... | |
ArchitectFrame.getMainInstance().getProject().getPlayPen().fireUndoCompoundEvent(new UndoCompoundEvent(this,EventTypes.MULTI_SELECT_START,"Starting multi-select")); if ( !isCancelled()){ | logger.info("AddObjectsTask starting on thread "+Thread.currentThread().getName()); try { | public void doStuff () { ArchitectFrame.getMainInstance().getProject().getPlayPen().fireUndoCompoundEvent(new UndoCompoundEvent(this,EventTypes.MULTI_SELECT_START,"Starting multi-select")); if ( !isCancelled()){ hasStarted = true; logger.info("AddObjectsTask starting on thread "+Thread.currentThread().getNa... |
logger.info("AddObjectsTask starting on thread "+Thread.currentThread().getName()); | int pmMax = 0; | public void doStuff () { ArchitectFrame.getMainInstance().getProject().getPlayPen().fireUndoCompoundEvent(new UndoCompoundEvent(this,EventTypes.MULTI_SELECT_START,"Starting multi-select")); if ( !isCancelled()){ hasStarted = true; logger.info("AddObjectsTask starting on thread "+Thread.currentThread().getNa... |
try { int pmMax = 0; Iterator soIt = sqlObjects.iterator(); while (soIt.hasNext()) { pmMax += ArchitectUtils.countTablesSnapshot((SQLObject)soIt.next()); } jobSize = new Integer(pmMax); soIt = sqlObjects.iterator(); while (soIt.hasNext() && !isCancelled()) { Object someData = soIt.next(); if (someData instanceof... | Iterator<SQLObject> soIt = sqlObjects.iterator(); while (soIt.hasNext() && !isCancelled()) { pmMax += ArchitectUtils.countTablesSnapshot(soIt.next()); } jobSize = new Integer(pmMax); ensurePopulated(sqlObjects); } catch (ArchitectException e) { logger.error("Unexpected exception during populate", e); errorMessage = "... | public void doStuff () { ArchitectFrame.getMainInstance().getProject().getPlayPen().fireUndoCompoundEvent(new UndoCompoundEvent(this,EventTypes.MULTI_SELECT_START,"Starting multi-select")); if ( !isCancelled()){ hasStarted = true; logger.info("AddObjectsTask starting on thread "+Thread.currentThread().getNa... |
logger.info("AddObjectsTask done"); | public void doStuff () { ArchitectFrame.getMainInstance().getProject().getPlayPen().fireUndoCompoundEvent(new UndoCompoundEvent(this,EventTypes.MULTI_SELECT_START,"Starting multi-select")); if ( !isCancelled()){ hasStarted = true; logger.info("AddObjectsTask starting on thread "+Thread.currentThread().getNa... | |
logger.log(Level.FINE, "Failed to connect", exception); | public ActionForward execute(Exception exception, ExceptionConfig exConfig, ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws ServletException { Ac... | |
addMouseListener(new popMouseListener(this)); | addMouseListener(new PopMouseListener(this)); | DPrimeDisplay(PairwiseLinkage[][] t, boolean b, Vector v){ markersLoaded = b; dPrimeTable = t; markers = v; this.setDoubleBuffered(true); addMouseListener(new popMouseListener(this)); } |
try { pval= MathUtil.gammq(.5,.5*getChiSq()); } catch(CheckDataException e) {} | pval= MathUtil.gammq(.5,.5*getChiSq()); | public double getPValue() { double pval = 0; try { pval= MathUtil.gammq(.5,.5*getChiSq()); } catch(CheckDataException e) {} return Math.rint(pval*10000.0)/10000.0; } |
public void run(Context context, XMLOutput output) { | public void run(JellyContext context, XMLOutput output) { | public void run(Context context, XMLOutput output) { if ( var == null ) { throw new IllegalArgumentException( "The var attribute cannot be null" ); } if ( select != null ) { Object value = select.evaluate( null ); context.setVariable( var, value ); } } |
public DashboardContextImpl(WebContext webContext, HttpServletRequest request){ | public DashboardContextImpl(WebContext webContext, DashboardConfig dashboardConfig, HttpServletRequest request){ | public DashboardContextImpl(WebContext webContext, HttpServletRequest request){ this.webContext = webContext; this.request = request; } |
this.request = request; | this.dashboardConfig = dashboardConfig; this.request = request; | public DashboardContextImpl(WebContext webContext, HttpServletRequest request){ this.webContext = webContext; this.request = request; } |
tdtPanel = new TDTPanel(theData.getPedFile(), assocTest); | try{ tdtPanel = new TDTPanel(theData.getPedFile(), assocTest); } catch(PedFileException e) { JOptionPane.showMessageDialog(window, e.getMessage(), "Error", JOptionPane.ERROR_MESSAGE); } | void readGenotypes(String[] inputOptions, int type){ //input is a 3 element array with //inputOptions[0] = ped file //inputOptions[1] = info file ("" if none) //inputOptions[2] = max comparison distance (don't compute d' if markers are greater than this dist apart) //type is eithe... |
tdtPanel = new TDTPanel(theData.getPedFile(), assocTest); | try{ tdtPanel = new TDTPanel(theData.getPedFile(), assocTest); } catch(PedFileException e) { JOptionPane.showMessageDialog(window, e.getMessage(), "Error", JOptionPane.ERROR_MESSAGE); } | public Object construct(){ dPrimeDisplay=null; changeKey(1); theData.generateDPrimeTable(); theData.guessBlocks(BLOX_GABRIEL); //theData.guessBlocks(BLOX_NONE); //for debugging, doesn't call blocks at first ... |
photo.setOrigFname( imgFile.getName() ); | String fname = imgFile.getName(); if ( fname.length() > ORIG_FNAME_LENGTH ) { fname = fname.substring( 0, ORIG_FNAME_LENGTH ); } photo.setOrigFname( fname ); | public static PhotoInfo addToDB( File imgFile ) throws PhotoNotFoundException { VolumeBase vol = null; try { vol = VolumeBase.getVolumeOfFile( imgFile ); } catch (IOException ex) { throw new PhotoNotFoundException(); } // Determine the fle that will ... |
checkStringProperty( "Camera", v, CAMERA_LENGTH ); | public void setCamera(String v) { ODMGXAWrapper txw = new ODMGXAWrapper(); txw.lock( this, Transaction.WRITE ); this.camera = v; modified(); txw.commit(); } | |
checkStringProperty( "Film", v, FILM_LENGTH ); | public void setFilm(String v) { ODMGXAWrapper txw = new ODMGXAWrapper(); txw.lock( this, Transaction.WRITE ); this.film = v; modified(); txw.commit(); } | |
checkStringProperty( "Lens", v, LENS_LENGTH ); | public void setLens(String v) { ODMGXAWrapper txw = new ODMGXAWrapper(); txw.lock( this, Transaction.WRITE ); this.lens = v; modified(); txw.commit(); } | |
checkStringProperty( "OrigFname", newFname, ORIG_FNAME_LENGTH ); | public final void setOrigFname(final String newFname) { ODMGXAWrapper txw = new ODMGXAWrapper(); txw.lock( this, Transaction.WRITE ); this.origFname = newFname; modified(); txw.commit(); } | |
checkStringProperty( "Photographer", v, this.PHOTOGRAPHER_LENGTH ); | public void setPhotographer(String v) { ODMGXAWrapper txw = new ODMGXAWrapper(); txw.lock( this, Transaction.WRITE ); this.photographer = v; modified(); txw.commit(); } | |
checkStringProperty( "Shooting place", v, SHOOTING_PLACE_LENGTH ); | public void setShootingPlace(String v) { ODMGXAWrapper txw = new ODMGXAWrapper(); txw.lock( this, Transaction.WRITE ); this.shootingPlace = v; modified(); txw.commit(); } | |
setCamera( maker + " " + model ); | StringBuffer cameraBuf = new StringBuffer( maker ); cameraBuf.append( " "). append( model ); String camera = cameraBuf.toString(); if ( cameraBuf.length() > CAMERA_LENGTH ) { camera = cameraBuf.substring( 0, CAMERA_LENGTH ); } setCamera( camera ); | void updateFromFileMetadata( File f ) { ExifDirectory exif = null; try { Metadata metadata = JpegMetadataReader.readMetadata(f); if ( metadata.containsDirectory( ExifDirectory.class ) ) { try { exif = (ExifDirectory) metadata.getDirectory( ExifD... |
public ScriptTag(BSFEngine engine) { | public ScriptTag(BSFEngine engine, BSFManager manager) { | public ScriptTag(BSFEngine engine) { this.engine = engine; } |
this.manager = manager; | public ScriptTag(BSFEngine engine) { this.engine = engine; } | |
log.debug(text); try { engine.eval(fileName, lineNumber, columnNumber, text); | log.debug(text); synchronized (getRegistry()) { getRegistry().setJellyContext(context); try { for ( Iterator iter = context.getVariableNames(); iter.hasNext(); ) { String name = (String) iter.next(); Object value = context.getVariable( name ); manager.declareBean( name, value, value.getClass() ); } engine.exec(f... | public void doTag(XMLOutput output) throws MissingAttributeException, JellyTagException { String text = getBodyText(); log.debug(text); try { engine.eval(fileName, lineNumber, columnNumber, text); } catch (BSFException e) { throw new JellyTagExcepti... |
catch (BSFException e) { throw new JellyTagException("Error occurred with script: " + e, e); } | public void doTag(XMLOutput output) throws MissingAttributeException, JellyTagException { String text = getBodyText(); log.debug(text); try { engine.eval(fileName, lineNumber, columnNumber, text); } catch (BSFException e) { throw new JellyTagExcepti... | |
System.out.println("addCreateDing: " + messages[i++]); | System.out.println("createDing: " + messages[i++]); | public Thingy createDing() { System.out.println("addCreateDing: " + messages[i++]); return new Thingy(); } |
logger.error("adding table: " + ((SQLTable)lastObj).getName()); | logger.debug("adding table: " + ((SQLTable)lastObj).getName()); | public boolean applyChanges() { // make a list of SQLTable objects and put them into // the wizard TreePath [] paths = dbTree.getSelectionPaths(); if (paths == null || paths.length == 0) { JOptionPane.showMessageDialog(getPanel(), "You must select at least one table or view.", "Error", JOptionPane.ERROR_MESSAGE... |
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 ( var == null ) { throw new JellyException( "<define:script> must have a var attribute" ); } context.setVariable( var, getBody() ); } |
getBody().run(context, output) | invokeBody(output) | public void doTag(XMLOutput output) throws Exception { // ### should probably use HttpClient instead/* HttpClient client = getHttpClient(); client.startSession( getUrl() ); try { // must use inner tags to extract the output.... getBody().run(context,... |
CommandHandler handler = null; | CommandHandler handler; | private boolean execute0(HandlerContext context) throws InvalidCommandException { String[] args = context.getCommand().getArgs(); if(args.length == 1){ /* print long help for given command */ CommandHandler handler = null; try { handler = CommandH... |
for(Iterator it=commandNames.iterator(); it.hasNext();){ String commandName = (String)it.next(); | for (Object commandName1 : commandNames) { String commandName = (String) commandName1; | private boolean execute0(HandlerContext context) throws InvalidCommandException { String[] args = context.getCommand().getArgs(); if(args.length == 1){ /* print long help for given command */ CommandHandler handler = null; try { handler = CommandH... |
Out.println("[Important! : Any space within a command argument should be replaced with \"~\" character.]"); | private boolean execute0(HandlerContext context) throws InvalidCommandException { String[] args = context.getCommand().getArgs(); if(args.length == 1){ /* print long help for given command */ CommandHandler handler = null; try { handler = CommandH... | |
if (e.getComponent() == pkTable || e.getComponent() == fkTable) { revalidate(); | if (e.getComponent() == pkTable) { setPkConnectionPoint(ui.closestEdgePoint(true, getPkConnectionPoint())); } if (e.getComponent() == fkTable) { setFkConnectionPoint(ui.closestEdgePoint(false, getFkConnectionPoint())); | public void componentResized(ComponentEvent e) { logger.debug("Component "+e.getComponent().getName()+" changed size"); if (e.getComponent() == pkTable || e.getComponent() == fkTable) { revalidate(); } } |
mi.setActionCommand(ArchitectSwingConstants.ACTION_COMMAND_SRC_PLAYPEN); | protected void createPopup() { ArchitectFrame af = ArchitectFrame.getMainInstance(); popup = new JPopupMenu(); JMenuItem mi; mi = new JMenuItem(af.editRelationshipAction); popup.add(mi); mi = new JMenuItem(af.deleteSelectedAction); popup.add(mi); } | |
public void testChangeSFifthColumnIdxToSecond() throws ArchitectException{ | public void testChangeSFifthColumnIdxToSecond() throws Exception { EventLogger l = new EventLogger(); TableSnapshot original = l.makeTableSnapshot(table); ArchitectUtils.listenToHierarchy(l, table); | public void testChangeSFifthColumnIdxToSecond() throws ArchitectException{ table.changeColumnIndex(4, 1, true); assertEquals(4, table.getPkSize()); assertEquals(0, table.getColumnIndex(table.getColumnByName("one"))); assertEquals(1, table.getColumnIndex(table.getColumnByN... |
System.out.println("Event log:\n"+l); TableSnapshot afterChange = l.makeTableSnapshot(table); System.out.println("Original: "+original); System.out.println("After: "+afterChange); l.rollBack(afterChange); assertEquals(original.toString(), afterChange.toString()); | public void testChangeSFifthColumnIdxToSecond() throws ArchitectException{ table.changeColumnIndex(4, 1, true); assertEquals(4, table.getPkSize()); assertEquals(0, table.getColumnIndex(table.getColumnByName("one"))); assertEquals(1, table.getColumnIndex(table.getColumnByN... | |
if(!config.isCluster()){ EventSystem.getInstance().fireEvent(new NewApplicationEvent(config)); } | public static void addApplication(ApplicationConfig config) throws DuplicateApplicationNameException { synchronized(writeLock){ // validate the application name validateAppName(config.getName(), null); applicationConfigs.add(config); saveConfig(); } ... | |
Factory factory = getFactory( name ); | final Factory factory = getFactory( name ); | public TagScript createTagScript(String name, Attributes attributes) throws Exception { TagScript answer = super.createTagScript(name, attributes); if ( answer == null ) { Factory factory = getFactory( name ); if ( factory != null ) { ComponentTag tag = new Compone... |
ComponentTag tag = new ComponentTag(factory); answer = TagScript.newInstance(tag); | return new DynaTagScript( new TagFactory() { public Tag createTag() throws Exception { return new ComponentTag(factory); } } ); | public TagScript createTagScript(String name, Attributes attributes) throws Exception { TagScript answer = super.createTagScript(name, attributes); if ( answer == null ) { Factory factory = getFactory( name ); if ( factory != null ) { ComponentTag tag = new Compone... |
setLayout(new GridBagLayout()); folderTree = new JTree( ); | GridBagLayout layout = new GridBagLayout(); setLayout( layout ); folderTree = new JTree(); | void createUI() { setLayout(new GridBagLayout()); folderTree = new JTree( ); folderTree.setRootVisible( true ); folderTree.setShowsRootHandles( false ); folderTree.setEditable( true ); folderTree.setCellEditor( new FolderNodeEditor( this ) ); folderTree.setCellRenderer( new FolderNodeEditor( this ) ... |
add( scrollPane, c ); JButton addFolderBtn = new JButton( "Add to folder..." ); addFolderBtn.setActionCommand( ADD_ALL_TO_FOLDER_CMD ); addFolderBtn.addActionListener( this ); c = new GridBagConstraints(); c.gridx = 1; c.gridy = 0; add( addFolderBtn, c ); | void createUI() { setLayout(new GridBagLayout()); folderTree = new JTree( ); folderTree.setRootVisible( true ); folderTree.setShowsRootHandles( false ); folderTree.setEditable( true ); folderTree.setCellEditor( new FolderNodeEditor( this ) ); folderTree.setCellRenderer( new FolderNodeEditor( this ) ... | |
PhotoCollectionChangeEvent e = new PhotoCollectionChangeEvent( f ); treeModel.photoCollectionChanged( e ); | public void addAllToFolder( PhotoFolder f ) { addedToFolders.add( f ); removedFromFolders.remove( f ); FolderNode fn = (FolderNode)nodeMapper.mapFolderToNode( f ); fn.addAllPhotos(); // Notify the tree model that representation of this node may // be changed; PhotoCollectionChangeEvent e = new PhotoCollecti... | |
fn.removeAllPhotos(); PhotoCollectionChangeEvent e = new PhotoCollectionChangeEvent( f ); treeModel.photoCollectionChanged( e ); | fn.removeAllPhotos(); | public void removeAllFromFolder( PhotoFolder f ) { addedToFolders.remove( f ); removedFromFolders.add( f ); FolderNode fn = (FolderNode) nodeMapper.mapFolderToNode( f ); fn.removeAllPhotos(); PhotoCollectionChangeEvent e = new PhotoCollectionChangeEvent( f ); treeModel.photoCollectionCh... |
logger.debug("getting physical name for: " + logicalName); | if (logger.isDebugEnabled()) logger.debug("getting physical name for: " + logicalName); | public String toIdentifier(String logicalName, String physicalName) { // replace spaces with underscores if (logicalName == null) return null; logger.debug("getting physical name for: " + logicalName); String ident = logicalName.replace(' ','_').toUpperCase(); logger.debug("after replace of spaces: " + ident); /... |
logger.debug("after replace of spaces: " + ident); | if (logger.isDebugEnabled()) logger.debug("after replace of spaces: " + ident); | public String toIdentifier(String logicalName, String physicalName) { // replace spaces with underscores if (logicalName == null) return null; logger.debug("getting physical name for: " + logicalName); String ident = logicalName.replace(' ','_').toUpperCase(); logger.debug("after replace of spaces: " + ident); /... |
logger.debug("identifiers must start with letter, appending X: " + ident); | if (logger.isDebugEnabled()) logger.debug("identifiers must start with letter, appending X: " + ident); | public String toIdentifier(String logicalName, String physicalName) { // replace spaces with underscores if (logicalName == null) return null; logger.debug("getting physical name for: " + logicalName); String ident = logicalName.replace(' ','_').toUpperCase(); logger.debug("after replace of spaces: " + ident); /... |
logger.debug("identifier was reserved word, appending X: " + ident); | if (logger.isDebugEnabled()) logger.debug("identifier was reserved word, appending X: " + ident); | public String toIdentifier(String logicalName, String physicalName) { // replace spaces with underscores if (logicalName == null) return null; logger.debug("getting physical name for: " + logicalName); String ident = logicalName.replace(' ','_').toUpperCase(); logger.debug("after replace of spaces: " + ident); /... |
String tempString = ident; Pattern p2 = Pattern.compile("[^a-xA-Z0-9_]"); Matcher m2 = p2.matcher(ident); while (m2.find()) { tempString = tempString.replace(m2.group(),"_"); } ident = tempString; | ident = ident.replaceAll("[^a-zA-Z0-9_]", "_"); | public String toIdentifier(String logicalName, String physicalName) { // replace spaces with underscores if (logicalName == null) return null; logger.debug("getting physical name for: " + logicalName); String ident = logicalName.replace(' ','_').toUpperCase(); logger.debug("after replace of spaces: " + ident); /... |
logger.debug("truncating identifier: " + ident); | if (logger.isDebugEnabled()) logger.debug("truncating identifier: " + ident); | public String toIdentifier(String logicalName, String physicalName) { // replace spaces with underscores if (logicalName == null) return null; logger.debug("getting physical name for: " + logicalName); String ident = logicalName.replace(' ','_').toUpperCase(); logger.debug("after replace of spaces: " + ident); /... |
logger.debug("new identifier: " + base + tiebreaker); | if (logger.isDebugEnabled()) logger.debug("new identifier: " + base + tiebreaker); | public String toIdentifier(String logicalName, String physicalName) { // replace spaces with underscores if (logicalName == null) return null; logger.debug("getting physical name for: " + logicalName); String ident = logicalName.replace(' ','_').toUpperCase(); logger.debug("after replace of spaces: " + ident); /... |
logger.debug("physical idenfier is not unique, regenerating: " + physicalName); | if (logger.isDebugEnabled()) logger.debug("physical idenfier is not unique, regenerating: " + physicalName); | public String toIdentifier(String logicalName, String physicalName) { // replace spaces with underscores if (logicalName == null) return null; logger.debug("getting physical name for: " + logicalName); String ident = logicalName.replace(' ','_').toUpperCase(); logger.debug("after replace of spaces: " + ident); /... |
logger.debug("regenerated identifier is: " + (base + tiebreaker)); | if (logger.isDebugEnabled()) logger.debug("regenerated identifier is: " + (base + tiebreaker)); | public String toIdentifier(String logicalName, String physicalName) { // replace spaces with underscores if (logicalName == null) return null; logger.debug("getting physical name for: " + logicalName); String ident = logicalName.replace(' ','_').toUpperCase(); logger.debug("after replace of spaces: " + ident); /... |
return connection.getAttributes(objectName, attributeNames); | List attributeList = new LinkedList(); for(int i=0; i<attributeNames.length; i++){ attributeList.add(getAttribute(objectName, attributeNames[i])); } return attributeList; | public List getAttributes(ObjectName objectName, String[] attributeNames) { final ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader(); try { /* temporarily change the thread context classloader */ Thread.currentThread().setContex... |
if ( ! context.isCacheTags() ) { clearTag(); } | public void run(JellyContext context, XMLOutput output) throws JellyTagException { URL rootURL = context.getRootURL(); URL currentURL = context.getCurrentURL(); try { Tag tag = getTag(context); if ( tag == null ) { return; } tag.setCont... | |
*/ | public void testResolver() throws Exception { TagLibrary library = resolver.resolveTagLibrary("jelly:test-library" ); assertTrue( "Found a tag library", library != null ); assertEquals( "Tag library is of the correct type", "org.apache.commons.jelly.test.impl.DummyTagLibrary", library.g... | |
suite.addTestSuite(TestDeleteSelectedAction.class); | public static Test suite() { TestSuite suite = new TestSuite("Test for Architect's Swing GUI"); //$JUnit-BEGIN$ suite.addTestSuite(TestSwingUIProject.class); suite.addTestSuite(TestArchitectFrame.class); suite.addTestSuite(TestAutoLayoutAction.class); suite.addTestSuite(TestPlayPen.class); suite.addTestSuite(... | |
while (node != null) { path.add(0, node); node = node.getParent(); | if (! (node instanceof DBTreeRoot)) { while (node != null) { path.add(0, node); node = node.getParent(); } | public SQLObject[] getPathToNode(SQLObject node) { LinkedList path = new LinkedList(); while (node != null) { path.add(0, node); node = node.getParent(); } path.add(0, root); return (SQLObject[]) path.toArray(new SQLObject[path.size()]); } |
schemaLabel.setText(((SQLSchema)(finalSchemaParent.getChild(0))).getNativeTerm()); | public void cleanup() throws ArchitectException { setCleanupExceptionMessage("Could not populate catalog dropdown!"); catalogDropdown.removeAllItems(); catalogDropdown.setEnabled(false); // This is either a database, a catalog, or null depending on // how db is structured SQLObject schemaParent; ... | |
schemaLabel.setText(((SQLSchema)(finalSchemaParent.getChild(0))).getNativeTerm()); | public void cleanup() throws ArchitectException { setCleanupExceptionMessage("Could not populate schema dropdown!"); for (SQLObject item : (List<SQLObject>) finalSchemaParent .getChildren()) { schemaDropdown.addItem(item); } if (schemaDropdown.getItemCount() > 0) { sc... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.