rem
stringlengths 0
477k
| add
stringlengths 0
313k
| context
stringlengths 6
599k
| meta
stringlengths 141
403
|
---|---|---|---|
if (ChainBuilderAgent.DEBUG) | if (ChainBuilderAgent.DEBUG_TIMING) | public Object getContents() { long modstart = System.currentTimeMillis(); if (ChainBuilderAgent.DEBUG) modstart = System.currentTimeMillis(); ChainDataManager chainDataManager = (ChainDataManager) dataManager; if (modData == null) { modData = new ModulesData(); long loadStart = System.currentTimeMillis(); // IT'S tempting to think here that one can grab the modules and work // back to infer the category tree, but that doesn't work. Since // categories need not contain modules, this approach might miss // thoese categories that only contain other categories. // It might be possible to just get the categories and work from their // down to the individual modules, but that would require painful // and ugly rewrite of the module category mapper, so I'll punt on // it for now, and hope a more robust solution is developed. Collection mods = chainDataManager.getModules(); Collection cats = chainDataManager.getModuleCategories(); long loadEnd; if (ChainBuilderAgent.DEBUG) { loadEnd= System.currentTimeMillis()-loadStart; System.err.println("time for get modules and get categories.."+loadEnd); } // find uncategorized modules Iterator iter = mods.iterator(); while (iter.hasNext()) { ChainModuleData m = (ChainModuleData) iter.next(); if (m.getModuleCategory()== null) modData.addUncategorizedModule(m); } // find root categories if (cats != null) { iter = cats.iterator(); while (iter.hasNext()) { ModuleCategoryData c = (ModuleCategoryData) iter.next(); if (c.getParentCategory() == null) modData.addRootModuleCategory(c); findCategoryModules(c,mods); findCategoryChildren(c,cats); } } } if (ChainBuilderAgent.DEBUG) { long modend = System.currentTimeMillis()-modstart; if (modend > 0) System.err.println("total time spent in module get contents.."+modend); } return modData; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/630a53d68f5d29c53d2485557b18599785befb83/ModuleLoader.java/buggy/SRC/org/openmicroscopy/shoola/agents/chainbuilder/data/ModuleLoader.java |
if (ChainBuilderAgent.DEBUG) { | if (ChainBuilderAgent.DEBUG_TIMING) { | public Object getContents() { long modstart = System.currentTimeMillis(); if (ChainBuilderAgent.DEBUG) modstart = System.currentTimeMillis(); ChainDataManager chainDataManager = (ChainDataManager) dataManager; if (modData == null) { modData = new ModulesData(); long loadStart = System.currentTimeMillis(); // IT'S tempting to think here that one can grab the modules and work // back to infer the category tree, but that doesn't work. Since // categories need not contain modules, this approach might miss // thoese categories that only contain other categories. // It might be possible to just get the categories and work from their // down to the individual modules, but that would require painful // and ugly rewrite of the module category mapper, so I'll punt on // it for now, and hope a more robust solution is developed. Collection mods = chainDataManager.getModules(); Collection cats = chainDataManager.getModuleCategories(); long loadEnd; if (ChainBuilderAgent.DEBUG) { loadEnd= System.currentTimeMillis()-loadStart; System.err.println("time for get modules and get categories.."+loadEnd); } // find uncategorized modules Iterator iter = mods.iterator(); while (iter.hasNext()) { ChainModuleData m = (ChainModuleData) iter.next(); if (m.getModuleCategory()== null) modData.addUncategorizedModule(m); } // find root categories if (cats != null) { iter = cats.iterator(); while (iter.hasNext()) { ModuleCategoryData c = (ModuleCategoryData) iter.next(); if (c.getParentCategory() == null) modData.addRootModuleCategory(c); findCategoryModules(c,mods); findCategoryChildren(c,cats); } } } if (ChainBuilderAgent.DEBUG) { long modend = System.currentTimeMillis()-modstart; if (modend > 0) System.err.println("total time spent in module get contents.."+modend); } return modData; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/630a53d68f5d29c53d2485557b18599785befb83/ModuleLoader.java/buggy/SRC/org/openmicroscopy/shoola/agents/chainbuilder/data/ModuleLoader.java |
if (ChainBuilderAgent.DEBUG) { | if (ChainBuilderAgent.DEBUG_TIMING) { | public Object getContents() { long modstart = System.currentTimeMillis(); if (ChainBuilderAgent.DEBUG) modstart = System.currentTimeMillis(); ChainDataManager chainDataManager = (ChainDataManager) dataManager; if (modData == null) { modData = new ModulesData(); long loadStart = System.currentTimeMillis(); // IT'S tempting to think here that one can grab the modules and work // back to infer the category tree, but that doesn't work. Since // categories need not contain modules, this approach might miss // thoese categories that only contain other categories. // It might be possible to just get the categories and work from their // down to the individual modules, but that would require painful // and ugly rewrite of the module category mapper, so I'll punt on // it for now, and hope a more robust solution is developed. Collection mods = chainDataManager.getModules(); Collection cats = chainDataManager.getModuleCategories(); long loadEnd; if (ChainBuilderAgent.DEBUG) { loadEnd= System.currentTimeMillis()-loadStart; System.err.println("time for get modules and get categories.."+loadEnd); } // find uncategorized modules Iterator iter = mods.iterator(); while (iter.hasNext()) { ChainModuleData m = (ChainModuleData) iter.next(); if (m.getModuleCategory()== null) modData.addUncategorizedModule(m); } // find root categories if (cats != null) { iter = cats.iterator(); while (iter.hasNext()) { ModuleCategoryData c = (ModuleCategoryData) iter.next(); if (c.getParentCategory() == null) modData.addRootModuleCategory(c); findCategoryModules(c,mods); findCategoryChildren(c,cats); } } } if (ChainBuilderAgent.DEBUG) { long modend = System.currentTimeMillis()-modstart; if (modend > 0) System.err.println("total time spent in module get contents.."+modend); } return modData; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/630a53d68f5d29c53d2485557b18599785befb83/ModuleLoader.java/buggy/SRC/org/openmicroscopy/shoola/agents/chainbuilder/data/ModuleLoader.java |
if (ChainBuilderAgent.DEBUG) | if (ChainBuilderAgent.DEBUG_TIMING) | public void contentComplete() { long start; if (ChainBuilderAgent.DEBUG) start= System.currentTimeMillis(); chainWindow.buildGUI(); long chainBuilt; if (ChainBuilderAgent.DEBUG) chainBuilt= System.currentTimeMillis()-start; overview.buildGUI(); if (ChainBuilderAgent.DEBUG) { long end = System.currentTimeMillis()-start; System.err.println("time for building chain palette "+chainBuilt); System.err.println("time for building chain palette + overview" +end); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/630a53d68f5d29c53d2485557b18599785befb83/UIManager.java/buggy/SRC/org/openmicroscopy/shoola/agents/chainbuilder/ui/UIManager.java |
if (ChainBuilderAgent.DEBUG) | if (ChainBuilderAgent.DEBUG_TIMING) | public void contentComplete() { long start; if (ChainBuilderAgent.DEBUG) start= System.currentTimeMillis(); chainWindow.buildGUI(); long chainBuilt; if (ChainBuilderAgent.DEBUG) chainBuilt= System.currentTimeMillis()-start; overview.buildGUI(); if (ChainBuilderAgent.DEBUG) { long end = System.currentTimeMillis()-start; System.err.println("time for building chain palette "+chainBuilt); System.err.println("time for building chain palette + overview" +end); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/630a53d68f5d29c53d2485557b18599785befb83/UIManager.java/buggy/SRC/org/openmicroscopy/shoola/agents/chainbuilder/ui/UIManager.java |
if (ChainBuilderAgent.DEBUG) { | if (ChainBuilderAgent.DEBUG_TIMING) { | public void contentComplete() { long start; if (ChainBuilderAgent.DEBUG) start= System.currentTimeMillis(); chainWindow.buildGUI(); long chainBuilt; if (ChainBuilderAgent.DEBUG) chainBuilt= System.currentTimeMillis()-start; overview.buildGUI(); if (ChainBuilderAgent.DEBUG) { long end = System.currentTimeMillis()-start; System.err.println("time for building chain palette "+chainBuilt); System.err.println("time for building chain palette + overview" +end); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/630a53d68f5d29c53d2485557b18599785befb83/UIManager.java/buggy/SRC/org/openmicroscopy/shoola/agents/chainbuilder/ui/UIManager.java |
public void unhighlightModules(ChainModuleData mod) { handler.unhighlightModules(mod); | public void unhighlightModules() { handler.unhighlightModules(); | public void unhighlightModules(ChainModuleData mod) { handler.unhighlightModules(mod); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/3de599409d6bfa12aaff68ea9a78d4db3ad3ff2c/ModulePaletteCanvas.java/buggy/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ModulePaletteCanvas.java |
mod.moveToFront(); mod.showDetails(); | public void highlightModule(ChainModuleData module) { handler.highlightModules(module); Collection result = layer.getAllNodes(); Iterator iter = result.iterator(); while (iter.hasNext()) { PNode node = (PNode) iter.next(); if (node instanceof ModuleView) { ModuleView mod = (ModuleView) node; if (mod.getModule() == module) { // zoom in to it. BufferedObject cBox = (BufferedObject) node; PBounds b = cBox.getBufferedBounds(); PCamera camera = getCamera(); camera.animateViewToCenterBounds(b,true,Constants.ANIMATION_DELAY); return; } } } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/3de599409d6bfa12aaff68ea9a78d4db3ad3ff2c/ModulePaletteCanvas.java/buggy/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ModulePaletteCanvas.java |
|
handler.setLastCategoryBox(cb); | public void highlightCategory(ModuleCategoryData category) { Collection result = layer.getAllNodes(); Iterator iter = result.iterator(); while (iter.hasNext()) { PNode node = (PNode) iter.next(); if (node instanceof CategoryBox) { CategoryBox cb = (CategoryBox)node; if (cb.isSameCategory(category) == true) { // zoom in to it. BufferedObject cBox = (BufferedObject) node; PBounds b = cBox.getBufferedBounds(); PCamera camera = getCamera(); camera.animateViewToCenterBounds(b,true,Constants.ANIMATION_DELAY); cb.setHighlighted(true); } else cb.setHighlighted(false); } } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/3de599409d6bfa12aaff68ea9a78d4db3ad3ff2c/ModulePaletteCanvas.java/buggy/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ModulePaletteCanvas.java |
|
public CategoryGroupLoader(HiViewer viewer, Set ids) | public CategoryGroupLoader(HiViewer viewer, Set ids, boolean refresh) | public CategoryGroupLoader(HiViewer viewer, Set ids) { super(viewer); this.ids = ids; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/fb3743d6f75abbf12f788b3b2925f4a6f4606dd6/CategoryGroupLoader.java/buggy/SRC/org/openmicroscopy/shoola/agents/hiviewer/CategoryGroupLoader.java |
this.refresh = refresh; | public CategoryGroupLoader(HiViewer viewer, Set ids) { super(viewer); this.ids = ids; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/fb3743d6f75abbf12f788b3b2925f4a6f4606dd6/CategoryGroupLoader.java/buggy/SRC/org/openmicroscopy/shoola/agents/hiviewer/CategoryGroupLoader.java |
|
viewer.setHierarchyRoots((Set) result, false); | viewer.setHierarchyRoots((Set) result, false, refresh); | public void handleResult(Object result) { if (viewer.getState() == HiViewer.DISCARDED) return; //Async cancel. viewer.setHierarchyRoots((Set) result, false); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/fb3743d6f75abbf12f788b3b2925f4a6f4606dd6/CategoryGroupLoader.java/buggy/SRC/org/openmicroscopy/shoola/agents/hiviewer/CategoryGroupLoader.java |
if (directory == null) { | if (baseDir == null) { | public void afterPropertiesSet() throws Exception { if (classLoader == null) { classLoader = getClass().getClassLoader(); } if (directory == null) { log.warn("No directory specified so using current directory"); directory = new File("."); } directory = directory.getAbsoluteFile(); log.info("Starting to load components from: " + directory); // lets load the deployment processDirectory(classLoader, "", directory); } | 52533 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52533/8c4b10c7539271fd58e482930eb1c78190efe56b/FileDeployer.java/buggy/server/src/main/java/org/apache/xbean/server/deployer/FileDeployer.java |
directory = new File("."); | baseDir = new File("."); | public void afterPropertiesSet() throws Exception { if (classLoader == null) { classLoader = getClass().getClassLoader(); } if (directory == null) { log.warn("No directory specified so using current directory"); directory = new File("."); } directory = directory.getAbsoluteFile(); log.info("Starting to load components from: " + directory); // lets load the deployment processDirectory(classLoader, "", directory); } | 52533 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52533/8c4b10c7539271fd58e482930eb1c78190efe56b/FileDeployer.java/buggy/server/src/main/java/org/apache/xbean/server/deployer/FileDeployer.java |
directory = directory.getAbsoluteFile(); log.info("Starting to load components from: " + directory); | baseDir = baseDir.getAbsoluteFile(); log.info("Starting to load components from: " + baseDir); | public void afterPropertiesSet() throws Exception { if (classLoader == null) { classLoader = getClass().getClassLoader(); } if (directory == null) { log.warn("No directory specified so using current directory"); directory = new File("."); } directory = directory.getAbsoluteFile(); log.info("Starting to load components from: " + directory); // lets load the deployment processDirectory(classLoader, "", directory); } | 52533 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52533/8c4b10c7539271fd58e482930eb1c78190efe56b/FileDeployer.java/buggy/server/src/main/java/org/apache/xbean/server/deployer/FileDeployer.java |
processDirectory(classLoader, "", directory); | processDirectory("", classLoader, applicationContext, baseDir); | public void afterPropertiesSet() throws Exception { if (classLoader == null) { classLoader = getClass().getClassLoader(); } if (directory == null) { log.warn("No directory specified so using current directory"); directory = new File("."); } directory = directory.getAbsoluteFile(); log.info("Starting to load components from: " + directory); // lets load the deployment processDirectory(classLoader, "", directory); } | 52533 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52533/8c4b10c7539271fd58e482930eb1c78190efe56b/FileDeployer.java/buggy/server/src/main/java/org/apache/xbean/server/deployer/FileDeployer.java |
protected void createServiceForFile(String name, File file, ClassLoader classLoader) throws ServiceAlreadyExistsException, ServiceRegistrationException, BeansException, IOException { String fileName = file.getName(); ServiceFactory serviceFactory = null; if (fileName.equalsIgnoreCase("spring.xml") || fileName.equalsIgnoreCase("xbean.xml")) { serviceFactory = createSpringService(name, file, classLoader); | protected void createServiceForFile(String name, File file, ClassLoader classLoader, ApplicationContext parentContext) throws ServiceAlreadyExistsException, ServiceRegistrationException, BeansException, IOException { if (isSpringConfigFile(file)) { System.setProperty("xbean.current.dir", file.getAbsolutePath()); ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader(); Thread.currentThread().setContextClassLoader(classLoader); log.debug("Loading file: " + file + " using classLoader: " + classLoader); try { SpringApplicationContext applicationContext = new ResourceXmlApplicationContext(new FileSystemResource(file), xmlPreprocessors, parentContext); applicationContext.setDisplayName(name); addBeanPostProcessors(applicationContext); ServiceFactory serviceFactory = new SpringConfigurationServiceFactory(applicationContext); log.info("Registering spring services service: " + name + " from: " + file.getAbsolutePath() + " into the Kernel"); kernel.registerService(new StringServiceName(name), serviceFactory, classLoader); } finally { Thread.currentThread().setContextClassLoader(oldClassLoader); } | protected void createServiceForFile(String name, File file, ClassLoader classLoader) throws ServiceAlreadyExistsException, ServiceRegistrationException, BeansException, IOException { String fileName = file.getName(); ServiceFactory serviceFactory = null; if (fileName.equalsIgnoreCase("spring.xml") || fileName.equalsIgnoreCase("xbean.xml")) { serviceFactory = createSpringService(name, file, classLoader); } else { log.info("Ignoring file: " + fileName + " in directory: " + file.getParent()); } if (serviceFactory != null) { log.info("Registering spring services service: " + name + " from: " + file.getAbsolutePath() + " into the Kernel"); kernel.registerService(new StringServiceName(name), serviceFactory, classLoader); } } | 52533 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52533/8c4b10c7539271fd58e482930eb1c78190efe56b/FileDeployer.java/buggy/server/src/main/java/org/apache/xbean/server/deployer/FileDeployer.java |
log.info("Ignoring file: " + fileName + " in directory: " + file.getParent()); } if (serviceFactory != null) { log.info("Registering spring services service: " + name + " from: " + file.getAbsolutePath() + " into the Kernel"); kernel.registerService(new StringServiceName(name), serviceFactory, classLoader); | if (showIgnoredFiles) { log.info("Ignoring file: " + file.getName() + " in directory: " + file.getParent()); } | protected void createServiceForFile(String name, File file, ClassLoader classLoader) throws ServiceAlreadyExistsException, ServiceRegistrationException, BeansException, IOException { String fileName = file.getName(); ServiceFactory serviceFactory = null; if (fileName.equalsIgnoreCase("spring.xml") || fileName.equalsIgnoreCase("xbean.xml")) { serviceFactory = createSpringService(name, file, classLoader); } else { log.info("Ignoring file: " + fileName + " in directory: " + file.getParent()); } if (serviceFactory != null) { log.info("Registering spring services service: " + name + " from: " + file.getAbsolutePath() + " into the Kernel"); kernel.registerService(new StringServiceName(name), serviceFactory, classLoader); } } | 52533 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52533/8c4b10c7539271fd58e482930eb1c78190efe56b/FileDeployer.java/buggy/server/src/main/java/org/apache/xbean/server/deployer/FileDeployer.java |
protected void processDirectory(ClassLoader classLoader, String parentName, File directory) throws ServiceAlreadyExistsException, ServiceRegistrationException, BeansException, IOException { | protected void processDirectory(String parentName, ClassLoader classLoader, ApplicationContext parentContext, File directory) throws ServiceAlreadyExistsException, ServiceRegistrationException, BeansException, IOException { log.debug("Processing directory: " + directory); | protected void processDirectory(ClassLoader classLoader, String parentName, File directory) throws ServiceAlreadyExistsException, ServiceRegistrationException, BeansException, IOException { File[] files = directory.listFiles(); if (files == null) { return; } // lets create a new classloader... for (int i = 0; i < files.length; i++) { File file = files[i]; if (isClassLoaderDirectory(file)) { classLoader = createChildClassLoader(parentName, file, classLoader); } } // now lets recurse through files or directories for (int i = 0; i < files.length; i++) { File file = files[i]; if (isClassLoaderDirectory(file)) { continue; } String name = getChildName(parentName, file); if (file.isDirectory()) { processDirectory(classLoader, name, file); } else { createServiceForFile(name, file, classLoader); } } } | 52533 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52533/8c4b10c7539271fd58e482930eb1c78190efe56b/FileDeployer.java/buggy/server/src/main/java/org/apache/xbean/server/deployer/FileDeployer.java |
if (isClassLoaderDirectory(file)) { continue; | if (!isClassLoaderDirectory(file) && !file.isDirectory()) { String name = getChildName(parentName, file); createServiceForFile(name, file, classLoader, parentContext); | protected void processDirectory(ClassLoader classLoader, String parentName, File directory) throws ServiceAlreadyExistsException, ServiceRegistrationException, BeansException, IOException { File[] files = directory.listFiles(); if (files == null) { return; } // lets create a new classloader... for (int i = 0; i < files.length; i++) { File file = files[i]; if (isClassLoaderDirectory(file)) { classLoader = createChildClassLoader(parentName, file, classLoader); } } // now lets recurse through files or directories for (int i = 0; i < files.length; i++) { File file = files[i]; if (isClassLoaderDirectory(file)) { continue; } String name = getChildName(parentName, file); if (file.isDirectory()) { processDirectory(classLoader, name, file); } else { createServiceForFile(name, file, classLoader); } } } | 52533 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52533/8c4b10c7539271fd58e482930eb1c78190efe56b/FileDeployer.java/buggy/server/src/main/java/org/apache/xbean/server/deployer/FileDeployer.java |
String name = getChildName(parentName, file); if (file.isDirectory()) { processDirectory(classLoader, name, file); } else { createServiceForFile(name, file, classLoader); | } for (int i = 0; i < files.length; i++) { File file = files[i]; if (!isClassLoaderDirectory(file) && file.isDirectory()) { String name = getChildName(parentName, file); processDirectory(name, classLoader, parentContext, file); | protected void processDirectory(ClassLoader classLoader, String parentName, File directory) throws ServiceAlreadyExistsException, ServiceRegistrationException, BeansException, IOException { File[] files = directory.listFiles(); if (files == null) { return; } // lets create a new classloader... for (int i = 0; i < files.length; i++) { File file = files[i]; if (isClassLoaderDirectory(file)) { classLoader = createChildClassLoader(parentName, file, classLoader); } } // now lets recurse through files or directories for (int i = 0; i < files.length; i++) { File file = files[i]; if (isClassLoaderDirectory(file)) { continue; } String name = getChildName(parentName, file); if (file.isDirectory()) { processDirectory(classLoader, name, file); } else { createServiceForFile(name, file, classLoader); } } } | 52533 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52533/8c4b10c7539271fd58e482930eb1c78190efe56b/FileDeployer.java/buggy/server/src/main/java/org/apache/xbean/server/deployer/FileDeployer.java |
processDirectory(classLoader, "", directory); | String name = ""; if (applicationContext != null) { name = applicationContext.getDisplayName(); } processDirectory(name, classLoader, applicationContext, baseDir); | public void run() { try { processDirectory(classLoader, "", directory); } catch (Exception e) { log.error("Failed to deploy services: " + e, e); } } | 52533 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52533/8c4b10c7539271fd58e482930eb1c78190efe56b/FileDeployer.java/buggy/server/src/main/java/org/apache/xbean/server/deployer/FileDeployer.java |
klass = ruby.getInterpreter().getRuby_class(); | klass = ruby.getInterpreter().getRubyClass(); | public void push(NODE v, NODE b, RubyObject newSelf) { RubyBlock oldBlock = new RubyBlock(var, body, self, frame, scope, klass, iter, vmode, flags, dynamicVars, origThread, prev, ruby); var = v; body = b; self = newSelf; frame = ruby.getInterpreter().getRubyFrame(); klass = ruby.getInterpreter().getRuby_class(); // _block.frame.file = ruby_sourcefile; // _block.frame.line = ruby_sourceline; scope = ruby.rubyScope; prev = oldBlock; iter = ruby.getInterpreter().getRubyIter().getIter(); vmode = ruby.getInterpreter().getActMethodScope(); flags = BLOCK_D_SCOPE; dynamicVars = ruby.getInterpreter().getDynamicVars(); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/8e00ad1c7ae96f50ae0bd521483380788f891b7b/RubyBlock.java/clean/org/jruby/interpreter/RubyBlock.java |
return "\"" + getValue() + "\""; | return getValue(); | public String toString() { return "\"" + getValue() + "\""; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/59743974f1f8d5a50153b05647dac2d75d510976/RubyString.java/buggy/org/jruby/RubyString.java |
public RubyIndexException(String msg) { super(msg); | public RubyIndexException() { | public RubyIndexException(String msg) { super(msg); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/9a05f18f2b6207bf93455d756436fe8f0002b542/RubyIndexException.java/buggy/org/jruby/exceptions/RubyIndexException.java |
public Wiki(String propertiesFilename) throws Exception { if (propertiesFilename == null) propertiesFilename = DEFAULT_PROPERTIES; create(propertiesFilename); _dateStarted = new Date(); | public Wiki() throws Exception { this (DEFAULT_PROPERTIES); | public Wiki(String propertiesFilename) throws Exception { if (propertiesFilename == null) propertiesFilename = DEFAULT_PROPERTIES; create(propertiesFilename); _dateStarted = new Date(); } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/4cf9c4e699250559dc6caa370c17e6b01fd41cdf/Wiki.java/clean/wiki/src/org/tcdi/opensource/wiki/Wiki.java |
c.createAlias("details.creationEvent", "create"); c.createAlias("details.updateEvent", "update"); | protected void buildQuery(Session session) throws HibernateException, SQLException { Criteria c = session.createCriteria(Image.class); c.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY); Criteria pix = c.createCriteria("defaultPixels",LEFT_JOIN); pix.createCriteria("pixelsType",LEFT_JOIN); pix.createCriteria("pixelsDimensions",LEFT_JOIN); Class klass = (Class) value(CLASS); Collection ids = (Collection) value(IDS); // see https://trac.openmicroscopy.org.uk/omero/ticket/296 if (Image.class.isAssignableFrom(klass)) { c.add(Restrictions.in("id",ids)); } else { // Add restrictions to the most distant criteria Criteria[] hy = Hierarchy.fetchParents(c,klass,Integer.MAX_VALUE); hy[hy.length-1].add(Restrictions.in("id",ids)); } setCriteria( c ); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/e7211bef67998900c29cd33507ee459182f5fe34/PojosGetImagesQueryDefinition.java/buggy/components/server/src/ome/services/query/PojosGetImagesQueryDefinition.java |
|
JUnitXMLHelper.validate(new File(PATH_TO_XML_REPORT)); | JUnitXMLHelper.readXmlFile(new File(PATH_TO_XML_REPORT), true); | public void testXMLReportValidity() throws Exception { String[] args; // Serialize the current coverage data to disk ProjectData.saveGlobalProjectData(); String dataFileName = CoverageDataFileHandler.getDefaultDataFile().getAbsolutePath(); // Then we need to generate the XML report args = new String[] { "--format", "xml", "--datafile", dataFileName, "--destination", PATH_TO_TEST_OUTPUT, PATH_TO_SOURCE_CODE }; net.sourceforge.cobertura.reporting.Main.main(args); JUnitXMLHelper.validate(new File(PATH_TO_XML_REPORT)); } | 50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/9a1f242cd64dfc68f804c44562c72e3200447563/XMLReportTest.java/clean/cobertura/test/net/sourceforge/cobertura/reporting/xml/XMLReportTest.java |
JUnitXMLHelper.validate(coverageFile); | JUnitXMLHelper.readXmlFile(coverageFile, true); | public void testXMLReportWithNonSourceLines() throws Exception { ProjectData projectData = new ProjectData(); // Adding line to the project data that hasn't been yet marked as source line ClassData cd = projectData.getOrCreateClassData(XMLReport.class.getName()); cd.touch(7777); File reportDir = File.createTempFile("XMLReportTest", ""); reportDir.delete(); reportDir.mkdir(); FileFinder fileFinder = new FileFinder(); ComplexityCalculator complexity = new ComplexityCalculator(fileFinder); new XMLReport(projectData, reportDir, fileFinder, complexity); File coverageFile = new File(reportDir, "coverage.xml"); JUnitXMLHelper.validate(coverageFile); coverageFile.delete(); reportDir.delete(); } | 50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/9a1f242cd64dfc68f804c44562c72e3200447563/XMLReportTest.java/clean/cobertura/test/net/sourceforge/cobertura/reporting/xml/XMLReportTest.java |
boolean done = fullClassNames.contains(name); ClassData classData = new ClassData(name); if (!done) { | ClassData classData = (ClassData)this.classes.get(name); if (classData == null) { classData = new ClassData(name); | public ClassData getOrCreateClassData(String name) { boolean done = fullClassNames.contains(name); ClassData classData = new ClassData(name); if (!done) { addClassData(classData); fullClassNames.add(name); } else { classData = getClassData(name); } return classData; } | 50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/2d04adc2554406c41824d5b965907076ecdceb80/ProjectData.java/buggy/cobertura/src/net/sourceforge/cobertura/coveragedata/ProjectData.java |
fullClassNames.add(name); } else { classData = getClassData(name); | public ClassData getOrCreateClassData(String name) { boolean done = fullClassNames.contains(name); ClassData classData = new ClassData(name); if (!done) { addClassData(classData); fullClassNames.add(name); } else { classData = getClassData(name); } return classData; } | 50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/2d04adc2554406c41824d5b965907076ecdceb80/ProjectData.java/buggy/cobertura/src/net/sourceforge/cobertura/coveragedata/ProjectData.java |
|
public XMLReport(Coverage coverage, File outputDir, File sourceDirectory) | public XMLReport(CoverageReport coverage, File outputDir, File sourceDirectory) | public XMLReport(Coverage coverage, File outputDir, File sourceDirectory) throws IOException { pw = new PrintWriter(new FileWriter(new File(outputDir, "coverage.xml"))); try { println("<?xml version=\"1.0\"?>"); if (sourceDirectory == null) { println("<coverage>"); } else { println("<coverage src=\"" + sourceDirectory + "\">"); } increaseIndentation(); dumpPackages(coverage); decreaseIndentation(); println("</coverage>"); } finally { pw.close(); } } | 50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/100512ee483a0d8eebc3eb78a5d8913b7b64ddb6/XMLReport.java/buggy/cobertura/src/net/sourceforge/cobertura/reporting/xml/XMLReport.java |
&& (obj.getClass().isAssignableFrom( context.getBroker().classForName(className))); | && (context.getBroker().classForName(className).isAssignableFrom( obj.getClass())); | public boolean isInstanceOf(Object obj, String className) { try { return (obj != null && className != null) && (obj.getClass().isAssignableFrom( context.getBroker().classForName(className))); } catch (ClassNotFoundException cnfe) { context.getBroker().getLog("VariableTool") .error ("VariableTool could not locate the class: /" + className + "/"); } catch (Exception e) { context.getBroker().getLog("VariableTool") .error ("An unexpected exception occured", e); } return false; } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/3ce6c66946026cd83ac5ee3e875584f836821bc7/VariableTool.java/clean/webmacro/src/org/webmacro/servlet/VariableTool.java |
return jjStartNfaWithStates_3(0, 23, 0); | jjmatchedKind = 23; return jjMoveStringLiteralDfa1_3(0x4000L); | private final int jjMoveStringLiteralDfa0_3(){ switch(curChar) { case 34: return jjStopAtPos(0, 24); case 35: return jjStartNfaWithStates_3(0, 23, 0); case 36: return jjStopAtPos(0, 20); case 39: return jjStopAtPos(0, 25); case 40: return jjStopAtPos(0, 31); case 41: return jjStopAtPos(0, 32); case 42: return jjStopAtPos(0, 45); case 43: return jjStopAtPos(0, 43); case 44: return jjStopAtPos(0, 50); case 45: return jjStopAtPos(0, 44); case 46: return jjStopAtPos(0, 35); case 47: return jjStopAtPos(0, 46); case 59: return jjStopAtPos(0, 51); case 60: jjmatchedKind = 36; return jjMoveStringLiteralDfa1_3(0x2000000000L); case 61: jjmatchedKind = 41; return jjMoveStringLiteralDfa1_3(0x10000000000L); case 62: jjmatchedKind = 38; return jjMoveStringLiteralDfa1_3(0x8000000000L); case 91: return jjStopAtPos(0, 33); case 92: return jjStartNfaWithStates_3(0, 22, 4); case 93: return jjStopAtPos(0, 34); case 102: return jjMoveStringLiteralDfa1_3(0x10000000L); case 110: return jjMoveStringLiteralDfa1_3(0x4000000L); case 116: return jjMoveStringLiteralDfa1_3(0x8000000L); default : return jjMoveNfa_3(2, 0); }} | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/4e88c3a52c24e9e3115286b7b792ccb08ca7a24a/WMParser_implTokenManager.java/buggy/webmacro/src/org/webmacro/parser/WMParser_implTokenManager.java |
case 123: return jjStopAtPos(0, 15); | private final int jjMoveStringLiteralDfa0_3(){ switch(curChar) { case 34: return jjStopAtPos(0, 24); case 35: return jjStartNfaWithStates_3(0, 23, 0); case 36: return jjStopAtPos(0, 20); case 39: return jjStopAtPos(0, 25); case 40: return jjStopAtPos(0, 31); case 41: return jjStopAtPos(0, 32); case 42: return jjStopAtPos(0, 45); case 43: return jjStopAtPos(0, 43); case 44: return jjStopAtPos(0, 50); case 45: return jjStopAtPos(0, 44); case 46: return jjStopAtPos(0, 35); case 47: return jjStopAtPos(0, 46); case 59: return jjStopAtPos(0, 51); case 60: jjmatchedKind = 36; return jjMoveStringLiteralDfa1_3(0x2000000000L); case 61: jjmatchedKind = 41; return jjMoveStringLiteralDfa1_3(0x10000000000L); case 62: jjmatchedKind = 38; return jjMoveStringLiteralDfa1_3(0x8000000000L); case 91: return jjStopAtPos(0, 33); case 92: return jjStartNfaWithStates_3(0, 22, 4); case 93: return jjStopAtPos(0, 34); case 102: return jjMoveStringLiteralDfa1_3(0x10000000L); case 110: return jjMoveStringLiteralDfa1_3(0x4000000L); case 116: return jjMoveStringLiteralDfa1_3(0x8000000L); default : return jjMoveNfa_3(2, 0); }} | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/4e88c3a52c24e9e3115286b7b792ccb08ca7a24a/WMParser_implTokenManager.java/buggy/webmacro/src/org/webmacro/parser/WMParser_implTokenManager.java |
|
return jjMoveStringLiteralDfa1_4(0x23000L); | return jjMoveStringLiteralDfa1_4(0x26000L); | private final int jjMoveStringLiteralDfa0_4(){ switch(curChar) { case 35: jjmatchedKind = 23; return jjMoveStringLiteralDfa1_4(0x23000L); case 36: return jjStopAtPos(0, 20); case 92: return jjStartNfaWithStates_4(0, 22, 2); case 123: return jjStopAtPos(0, 14); case 125: return jjStopAtPos(0, 15); default : return jjMoveNfa_4(1, 0); }} | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/4e88c3a52c24e9e3115286b7b792ccb08ca7a24a/WMParser_implTokenManager.java/buggy/webmacro/src/org/webmacro/parser/WMParser_implTokenManager.java |
return jjStopAtPos(0, 14); | return jjStopAtPos(0, 15); | private final int jjMoveStringLiteralDfa0_4(){ switch(curChar) { case 35: jjmatchedKind = 23; return jjMoveStringLiteralDfa1_4(0x23000L); case 36: return jjStopAtPos(0, 20); case 92: return jjStartNfaWithStates_4(0, 22, 2); case 123: return jjStopAtPos(0, 14); case 125: return jjStopAtPos(0, 15); default : return jjMoveNfa_4(1, 0); }} | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/4e88c3a52c24e9e3115286b7b792ccb08ca7a24a/WMParser_implTokenManager.java/buggy/webmacro/src/org/webmacro/parser/WMParser_implTokenManager.java |
return jjStopAtPos(0, 15); | return jjStopAtPos(0, 12); | private final int jjMoveStringLiteralDfa0_4(){ switch(curChar) { case 35: jjmatchedKind = 23; return jjMoveStringLiteralDfa1_4(0x23000L); case 36: return jjStopAtPos(0, 20); case 92: return jjStartNfaWithStates_4(0, 22, 2); case 123: return jjStopAtPos(0, 14); case 125: return jjStopAtPos(0, 15); default : return jjMoveNfa_4(1, 0); }} | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/4e88c3a52c24e9e3115286b7b792ccb08ca7a24a/WMParser_implTokenManager.java/buggy/webmacro/src/org/webmacro/parser/WMParser_implTokenManager.java |
case 98: return jjMoveStringLiteralDfa2_3(active0, 0x4000L); | private final int jjMoveStringLiteralDfa1_3(long active0){ try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_3(0, active0); return 1; } switch(curChar) { case 61: if ((active0 & 0x2000000000L) != 0L) return jjStopAtPos(1, 37); else if ((active0 & 0x8000000000L) != 0L) return jjStopAtPos(1, 39); else if ((active0 & 0x10000000000L) != 0L) return jjStopAtPos(1, 40); break; case 97: return jjMoveStringLiteralDfa2_3(active0, 0x10000000L); case 114: return jjMoveStringLiteralDfa2_3(active0, 0x8000000L); case 117: return jjMoveStringLiteralDfa2_3(active0, 0x4000000L); default : break; } return jjStartNfa_3(0, active0);} | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/4e88c3a52c24e9e3115286b7b792ccb08ca7a24a/WMParser_implTokenManager.java/buggy/webmacro/src/org/webmacro/parser/WMParser_implTokenManager.java |
|
return jjMoveStringLiteralDfa2_4(active0, 0x1000L); | return jjMoveStringLiteralDfa2_4(active0, 0x4000L); | private final int jjMoveStringLiteralDfa1_4(long active0){ try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_4(0, active0); return 1; } switch(curChar) { case 35: if ((active0 & 0x20000L) != 0L) return jjStopAtPos(1, 17); break; case 98: return jjMoveStringLiteralDfa2_4(active0, 0x1000L); case 101: return jjMoveStringLiteralDfa2_4(active0, 0x2000L); default : break; } return jjStartNfa_4(0, active0);} | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/4e88c3a52c24e9e3115286b7b792ccb08ca7a24a/WMParser_implTokenManager.java/buggy/webmacro/src/org/webmacro/parser/WMParser_implTokenManager.java |
case 101: return jjMoveStringLiteralDfa3_3(active0, 0x4000L); | private final int jjMoveStringLiteralDfa2_3(long old0, long active0){ if (((active0 &= old0)) == 0L) return jjStartNfa_3(0, old0); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_3(1, active0); return 2; } switch(curChar) { case 108: return jjMoveStringLiteralDfa3_3(active0, 0x14000000L); case 117: return jjMoveStringLiteralDfa3_3(active0, 0x8000000L); default : break; } return jjStartNfa_3(1, active0);} | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/4e88c3a52c24e9e3115286b7b792ccb08ca7a24a/WMParser_implTokenManager.java/buggy/webmacro/src/org/webmacro/parser/WMParser_implTokenManager.java |
|
return jjMoveStringLiteralDfa3_4(active0, 0x1000L); | return jjMoveStringLiteralDfa3_4(active0, 0x4000L); | private final int jjMoveStringLiteralDfa2_4(long old0, long active0){ if (((active0 &= old0)) == 0L) return jjStartNfa_4(0, old0); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_4(1, active0); return 2; } switch(curChar) { case 101: return jjMoveStringLiteralDfa3_4(active0, 0x1000L); case 110: return jjMoveStringLiteralDfa3_4(active0, 0x2000L); default : break; } return jjStartNfa_4(1, active0);} | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/4e88c3a52c24e9e3115286b7b792ccb08ca7a24a/WMParser_implTokenManager.java/buggy/webmacro/src/org/webmacro/parser/WMParser_implTokenManager.java |
case 103: return jjMoveStringLiteralDfa4_3(active0, 0x4000L); | private final int jjMoveStringLiteralDfa3_3(long old0, long active0){ if (((active0 &= old0)) == 0L) return jjStartNfa_3(1, old0); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_3(2, active0); return 3; } switch(curChar) { case 101: if ((active0 & 0x8000000L) != 0L) return jjStartNfaWithStates_3(3, 27, 29); break; case 108: if ((active0 & 0x4000000L) != 0L) return jjStartNfaWithStates_3(3, 26, 29); break; case 115: return jjMoveStringLiteralDfa4_3(active0, 0x10000000L); default : break; } return jjStartNfa_3(2, active0);} | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/4e88c3a52c24e9e3115286b7b792ccb08ca7a24a/WMParser_implTokenManager.java/buggy/webmacro/src/org/webmacro/parser/WMParser_implTokenManager.java |
|
return jjMoveStringLiteralDfa4_4(active0, 0x1000L); | return jjMoveStringLiteralDfa4_4(active0, 0x4000L); | private final int jjMoveStringLiteralDfa3_4(long old0, long active0){ if (((active0 &= old0)) == 0L) return jjStartNfa_4(1, old0); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_4(2, active0); return 3; } switch(curChar) { case 100: if ((active0 & 0x2000L) != 0L) return jjStopAtPos(3, 13); break; case 103: return jjMoveStringLiteralDfa4_4(active0, 0x1000L); default : break; } return jjStartNfa_4(2, active0);} | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/4e88c3a52c24e9e3115286b7b792ccb08ca7a24a/WMParser_implTokenManager.java/buggy/webmacro/src/org/webmacro/parser/WMParser_implTokenManager.java |
case 105: return jjMoveStringLiteralDfa5_3(active0, 0x4000L); | private final int jjMoveStringLiteralDfa4_3(long old0, long active0){ if (((active0 &= old0)) == 0L) return jjStartNfa_3(2, old0); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_3(3, active0); return 4; } switch(curChar) { case 101: if ((active0 & 0x10000000L) != 0L) return jjStartNfaWithStates_3(4, 28, 29); break; default : break; } return jjStartNfa_3(3, active0);} | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/4e88c3a52c24e9e3115286b7b792ccb08ca7a24a/WMParser_implTokenManager.java/buggy/webmacro/src/org/webmacro/parser/WMParser_implTokenManager.java |
|
return jjMoveStringLiteralDfa5_4(active0, 0x1000L); | return jjMoveStringLiteralDfa5_4(active0, 0x4000L); | private final int jjMoveStringLiteralDfa4_4(long old0, long active0){ if (((active0 &= old0)) == 0L) return jjStartNfa_4(2, old0); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_4(3, active0); return 4; } switch(curChar) { case 105: return jjMoveStringLiteralDfa5_4(active0, 0x1000L); default : break; } return jjStartNfa_4(3, active0);} | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/4e88c3a52c24e9e3115286b7b792ccb08ca7a24a/WMParser_implTokenManager.java/buggy/webmacro/src/org/webmacro/parser/WMParser_implTokenManager.java |
if ((active0 & 0x1000L) != 0L) return jjStopAtPos(5, 12); | if ((active0 & 0x4000L) != 0L) return jjStopAtPos(5, 14); | private final int jjMoveStringLiteralDfa5_4(long old0, long active0){ if (((active0 &= old0)) == 0L) return jjStartNfa_4(3, old0); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_4(4, active0); return 5; } switch(curChar) { case 110: if ((active0 & 0x1000L) != 0L) return jjStopAtPos(5, 12); break; default : break; } return jjStartNfa_4(4, active0);} | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/4e88c3a52c24e9e3115286b7b792ccb08ca7a24a/WMParser_implTokenManager.java/buggy/webmacro/src/org/webmacro/parser/WMParser_implTokenManager.java |
if ((active0 & 0x800000L) != 0L) | if ((active0 & 0x804000L) != 0L) | private final int jjStopStringLiteralDfa_3(int pos, long active0){ switch (pos) { case 0: if ((active0 & 0x800000L) != 0L) return 0; if ((active0 & 0x1c000000L) != 0L) { jjmatchedKind = 52; return 29; } if ((active0 & 0x3000000000L) != 0L) return 13; if ((active0 & 0x400000L) != 0L) return 4; return -1; case 1: if ((active0 & 0x1c000000L) != 0L) { jjmatchedKind = 52; jjmatchedPos = 1; return 29; } return -1; case 2: if ((active0 & 0x1c000000L) != 0L) { jjmatchedKind = 52; jjmatchedPos = 2; return 29; } return -1; case 3: if ((active0 & 0xc000000L) != 0L) return 29; if ((active0 & 0x10000000L) != 0L) { jjmatchedKind = 52; jjmatchedPos = 3; return 29; } return -1; default : return -1; }} | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/4e88c3a52c24e9e3115286b7b792ccb08ca7a24a/WMParser_implTokenManager.java/buggy/webmacro/src/org/webmacro/parser/WMParser_implTokenManager.java |
case 4: if ((active0 & 0x10000000L) != 0L) return 29; return -1; | private final int jjStopStringLiteralDfa_3(int pos, long active0){ switch (pos) { case 0: if ((active0 & 0x800000L) != 0L) return 0; if ((active0 & 0x1c000000L) != 0L) { jjmatchedKind = 52; return 29; } if ((active0 & 0x3000000000L) != 0L) return 13; if ((active0 & 0x400000L) != 0L) return 4; return -1; case 1: if ((active0 & 0x1c000000L) != 0L) { jjmatchedKind = 52; jjmatchedPos = 1; return 29; } return -1; case 2: if ((active0 & 0x1c000000L) != 0L) { jjmatchedKind = 52; jjmatchedPos = 2; return 29; } return -1; case 3: if ((active0 & 0xc000000L) != 0L) return 29; if ((active0 & 0x10000000L) != 0L) { jjmatchedKind = 52; jjmatchedPos = 3; return 29; } return -1; default : return -1; }} | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/4e88c3a52c24e9e3115286b7b792ccb08ca7a24a/WMParser_implTokenManager.java/buggy/webmacro/src/org/webmacro/parser/WMParser_implTokenManager.java |
|
public void loadScript(RubyString scriptName, RubyString source, boolean wrap) { RubyObject self = ruby.getRubyTopSelf(); CRefNode savedCRef = ruby.getCRef(); // TMP_PROTECT; if (wrap && ruby.getSecurityLevel() >= 4) { // Check_Type(fname, T_STRING); } else { // Check_SafeStr(fname); } // volatile ID last_func; // ruby_errinfo = Qnil; /* ensure */ RubyVarmap.push(ruby); ruby.pushClass(); RubyModule wrapper = ruby.getWrapper(); ruby.setCRef(ruby.getTopCRef()); if (!wrap) { ruby.secure(4); /* should alter global state */ ruby.setRubyClass(ruby.getClasses().getObjectClass()); ruby.setWrapper(null); } else { /* load in anonymous module as toplevel */ ruby.setWrapper(RubyModule.m_newModule(ruby)); ruby.setRubyClass(ruby.getWrapper()); self = ruby.getRubyTopSelf().m_clone(); self.extendObject(ruby.getRubyClass()); ruby.getCRef().push(ruby.getWrapper()); } ruby.getRubyFrame().push(); ruby.getRubyFrame().setLastFunc(null); ruby.getRubyFrame().setLastClass(null); ruby.getRubyFrame().setSelf(self); ruby.getRubyFrame().setCbase(new CRefNode(ruby.getRubyClass(), null)); ruby.getRubyScope().push(); /* default visibility is private at loading toplevel */ ruby.setActMethodScope(Constants.SCOPE_PRIVATE); RubyId last_func = ruby.getRubyFrame().getLastFunc(); try { // RubyId last_func = ruby.getRubyFrame().getLastFunc(); // DEFER_INTS; ruby.setInEval(ruby.getInEval() + 1); ruby.getRubyParser().compileString(scriptName.getValue(), source, 0); // --- ruby.setInEval(ruby.getInEval() - 1); // evalNode +++ if (ruby.getParserHelper().getEvalTreeBegin() != null) { self.eval(ruby.getParserHelper().getEvalTreeBegin()); ruby.getParserHelper().setEvalTreeBegin(null); } if (ruby.getParserHelper().getEvalTree() != null) { self.eval(ruby.getParserHelper().getEvalTree()); } // evalNode --- } catch (Exception excptn) { excptn.printStackTrace(); } ruby.getRubyFrame().setLastFunc(last_func); /*if (ruby.getRubyScope().getFlags() == SCOPE_ALLOCA && ruby.getRubyClass() == ruby.getClasses().getObjectClass()) { if (ruby_scope->local_tbl) free(ruby_scope->local_tbl); }*/ ruby.setCRef(savedCRef); ruby.getRubyScope().pop(); ruby.getRubyFrame().pop(); ruby.popClass(); RubyVarmap.pop(ruby); ruby.setWrapper(wrapper); /*if (ruby_nerrs > 0) { ruby_nerrs = 0; rb_exc_raise(ruby_errinfo); }*/ } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyRuntime.java/buggy/org/jruby/runtime/RubyRuntime.java |
||
ruby.secure(4); /* should alter global state */ | ruby.secure(4); /* should alter global state */ | public void loadScript(RubyString scriptName, RubyString source, boolean wrap) { RubyObject self = ruby.getRubyTopSelf(); CRefNode savedCRef = ruby.getCRef(); // TMP_PROTECT; if (wrap && ruby.getSecurityLevel() >= 4) { // Check_Type(fname, T_STRING); } else { // Check_SafeStr(fname); } // volatile ID last_func; // ruby_errinfo = Qnil; /* ensure */ RubyVarmap.push(ruby); ruby.pushClass(); RubyModule wrapper = ruby.getWrapper(); ruby.setCRef(ruby.getTopCRef()); if (!wrap) { ruby.secure(4); /* should alter global state */ ruby.setRubyClass(ruby.getClasses().getObjectClass()); ruby.setWrapper(null); } else { /* load in anonymous module as toplevel */ ruby.setWrapper(RubyModule.m_newModule(ruby)); ruby.setRubyClass(ruby.getWrapper()); self = ruby.getRubyTopSelf().m_clone(); self.extendObject(ruby.getRubyClass()); ruby.getCRef().push(ruby.getWrapper()); } ruby.getRubyFrame().push(); ruby.getRubyFrame().setLastFunc(null); ruby.getRubyFrame().setLastClass(null); ruby.getRubyFrame().setSelf(self); ruby.getRubyFrame().setCbase(new CRefNode(ruby.getRubyClass(), null)); ruby.getRubyScope().push(); /* default visibility is private at loading toplevel */ ruby.setActMethodScope(Constants.SCOPE_PRIVATE); RubyId last_func = ruby.getRubyFrame().getLastFunc(); try { // RubyId last_func = ruby.getRubyFrame().getLastFunc(); // DEFER_INTS; ruby.setInEval(ruby.getInEval() + 1); ruby.getRubyParser().compileString(scriptName.getValue(), source, 0); // --- ruby.setInEval(ruby.getInEval() - 1); // evalNode +++ if (ruby.getParserHelper().getEvalTreeBegin() != null) { self.eval(ruby.getParserHelper().getEvalTreeBegin()); ruby.getParserHelper().setEvalTreeBegin(null); } if (ruby.getParserHelper().getEvalTree() != null) { self.eval(ruby.getParserHelper().getEvalTree()); } // evalNode --- } catch (Exception excptn) { excptn.printStackTrace(); } ruby.getRubyFrame().setLastFunc(last_func); /*if (ruby.getRubyScope().getFlags() == SCOPE_ALLOCA && ruby.getRubyClass() == ruby.getClasses().getObjectClass()) { if (ruby_scope->local_tbl) free(ruby_scope->local_tbl); }*/ ruby.setCRef(savedCRef); ruby.getRubyScope().pop(); ruby.getRubyFrame().pop(); ruby.popClass(); RubyVarmap.pop(ruby); ruby.setWrapper(wrapper); /*if (ruby_nerrs > 0) { ruby_nerrs = 0; rb_exc_raise(ruby_errinfo); }*/ } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyRuntime.java/buggy/org/jruby/runtime/RubyRuntime.java |
public CRefNode(RubyObject classValue, Node nextNode) { super(Constants.NODE_CREF, classValue, null, nextNode); | public CRefNode(Node nextNode) { this(null, nextNode); | public CRefNode(RubyObject classValue, Node nextNode) { super(Constants.NODE_CREF, classValue, null, nextNode); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/9a05f18f2b6207bf93455d756436fe8f0002b542/CRefNode.java/buggy/org/jruby/nodes/CRefNode.java |
managementMenu.add(existingElement); | private JMenu createManagementMenu() { JMenu managementMenu = new JMenu(); initMenuItem(managementMenu, "Manage"); IconManager im = IconManager.getInstance(); managementMenu.setIcon(im.getIcon(IconManager.TRANSPARENT)); managementMenu.add(newElement); managementMenu.add(existingElement); managementMenu.add(copyElement); managementMenu.add(pasteElement); managementMenu.add(deleteElement); return managementMenu; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/83e42c21eb5c1f3394496ff33c72723a58274a2a/PopupMenu.java/buggy/SRC/org/openmicroscopy/shoola/agents/treeviewer/view/PopupMenu.java |
|
public RubyModule remove_method(IRubyObject name) { removeMethod(name.asSymbol()); | public RubyModule remove_method(IRubyObject[] args) { for(int i=0;i<args.length;i++) { removeMethod(args[i].asSymbol()); } | public RubyModule remove_method(IRubyObject name) { removeMethod(name.asSymbol()); return this; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/6f1403beec9694c559da08849101de395faccd1f/RubyModule.java/buggy/src/org/jruby/RubyModule.java |
List classList = (List) mappings.get(method); | Set classList = (Set) mappings.get(method); | public void add(ICallable method, RubyModule module) { List classList = (List) mappings.get(method); if (classList == null) { classList = new ArrayList(); mappings.put(method, classList); } classList.add(module); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/10276510af031579dfbae106606c2c69f5ab7459/CacheMap.java/buggy/src/org/jruby/runtime/CacheMap.java |
classList = new ArrayList(); | classList = new WeakHashSet(); | public void add(ICallable method, RubyModule module) { List classList = (List) mappings.get(method); if (classList == null) { classList = new ArrayList(); mappings.put(method, classList); } classList.add(module); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/10276510af031579dfbae106606c2c69f5ab7459/CacheMap.java/buggy/src/org/jruby/runtime/CacheMap.java |
List classList = (List) mappings.remove(method); | Set classList = (Set) mappings.remove(method); | public void remove(String name, ICallable method) { List classList = (List) mappings.remove(method); // Removed method has never been used so it has not been cached if (classList == null) { return; } for(Iterator iter = classList.iterator(); iter.hasNext();) { ((RubyModule) iter.next()).removeCachedMethod(name); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/10276510af031579dfbae106606c2c69f5ab7459/CacheMap.java/buggy/src/org/jruby/runtime/CacheMap.java |
((RubyModule) iter.next()).removeCachedMethod(name); | RubyModule module = (RubyModule) iter.next(); if (module != null) { module.removeCachedMethod(name); } | public void remove(String name, ICallable method) { List classList = (List) mappings.remove(method); // Removed method has never been used so it has not been cached if (classList == null) { return; } for(Iterator iter = classList.iterator(); iter.hasNext();) { ((RubyModule) iter.next()).removeCachedMethod(name); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/10276510af031579dfbae106606c2c69f5ab7459/CacheMap.java/buggy/src/org/jruby/runtime/CacheMap.java |
return evalUnder(mod, args[0], file, line); | Scope currentScope = runtime.getScope().current(); Visibility savedVisibility = currentScope.getVisibility(); currentScope.setVisibility(Visibility.PUBLIC); try { return evalUnder(mod, args[0], file, line); } finally { currentScope.setVisibility(savedVisibility); } | public IRubyObject specificEval(RubyModule mod, IRubyObject[] args) { if (getRuntime().isBlockGiven()) { if (args.length > 0) { throw new ArgumentError(getRuntime(), args.length, 0); } return yieldUnder(mod); } else { if (args.length == 0) { throw new ArgumentError(getRuntime(), "block not supplied"); } else if (args.length > 3) { String lastFuncName = runtime.getCurrentFrame().getLastFunc(); throw new ArgumentError( getRuntime(), "wrong # of arguments: " + lastFuncName + "(src) or " + lastFuncName + "{..}"); } /* if (ruby.getSecurityLevel() >= 4) { Check_Type(argv[0], T_STRING); } else { Check_SafeStr(argv[0]); } */ IRubyObject file = args.length > 1 ? args[1] : RubyString.newString(getRuntime(), "(eval)"); IRubyObject line = args.length > 2 ? args[2] : RubyFixnum.one(getRuntime()); return evalUnder(mod, args[0], file, line); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0044a3b88a0afa22dcced1c8213002b0fb16faf4/RubyObject.java/buggy/src/org/jruby/RubyObject.java |
model.getSelectedBrowser().activate(); | public void activate() { switch (model.getState()) { case NEW: view.setOnScreen(); model.getSelectedBrowser().activate(); break; case DISCARDED: throw new IllegalStateException( "This method can't be invoked in the DISCARDED state."); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/83e42c21eb5c1f3394496ff33c72723a58274a2a/TreeViewerComponent.java/clean/SRC/org/openmicroscopy/shoola/agents/treeviewer/view/TreeViewerComponent.java |
|
int editor = model.getEditorType(); removeEditor(); | public void onDataObjectSave(DataObject data, int operation) { int state = model.getState(); if (operation == REMOVE_OBJECT && state != SAVE) throw new IllegalStateException("This method can only be " + "invoked in the SAVE state"); switch (state) { case DISCARDED: throw new IllegalStateException("This method cannot be " + "invoked in the DISCARDED state"); } if (data == null) throw new IllegalArgumentException("No data object. "); switch (operation) { case CREATE_OBJECT: case UPDATE_OBJECT: case REMOVE_OBJECT: break; default: throw new IllegalArgumentException("Save operation not " + "supported."); } int editor = model.getEditorType(); removeEditor(); //remove the currently selected editor. if (operation == REMOVE_OBJECT) { model.setState(READY); fireStateChange(); } view.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); Browser browser = model.getSelectedBrowser(); browser.refreshEdition(data, operation); if (operation == UPDATE_OBJECT) { Map browsers = model.getBrowsers(); Iterator i = browsers.keySet().iterator(); while (i.hasNext()) { browser = (Browser) browsers.get(i.next()); if (!(browser.equals(model.getSelectedBrowser()))) browser.refreshEdition(data, operation); } } if (editor == CREATE_EDITOR) { PropertiesCmd cmd = new PropertiesCmd(this); cmd.execute(); } setStatus(false, "", true); view.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/83e42c21eb5c1f3394496ff33c72723a58274a2a/TreeViewerComponent.java/clean/SRC/org/openmicroscopy/shoola/agents/treeviewer/view/TreeViewerComponent.java |
|
if (editor == CREATE_EDITOR) { PropertiesCmd cmd = new PropertiesCmd(this); cmd.execute(); } | public void onDataObjectSave(DataObject data, int operation) { int state = model.getState(); if (operation == REMOVE_OBJECT && state != SAVE) throw new IllegalStateException("This method can only be " + "invoked in the SAVE state"); switch (state) { case DISCARDED: throw new IllegalStateException("This method cannot be " + "invoked in the DISCARDED state"); } if (data == null) throw new IllegalArgumentException("No data object. "); switch (operation) { case CREATE_OBJECT: case UPDATE_OBJECT: case REMOVE_OBJECT: break; default: throw new IllegalArgumentException("Save operation not " + "supported."); } int editor = model.getEditorType(); removeEditor(); //remove the currently selected editor. if (operation == REMOVE_OBJECT) { model.setState(READY); fireStateChange(); } view.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); Browser browser = model.getSelectedBrowser(); browser.refreshEdition(data, operation); if (operation == UPDATE_OBJECT) { Map browsers = model.getBrowsers(); Iterator i = browsers.keySet().iterator(); while (i.hasNext()) { browser = (Browser) browsers.get(i.next()); if (!(browser.equals(model.getSelectedBrowser()))) browser.refreshEdition(data, operation); } } if (editor == CREATE_EDITOR) { PropertiesCmd cmd = new PropertiesCmd(this); cmd.execute(); } setStatus(false, "", true); view.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/83e42c21eb5c1f3394496ff33c72723a58274a2a/TreeViewerComponent.java/clean/SRC/org/openmicroscopy/shoola/agents/treeviewer/view/TreeViewerComponent.java |
|
if (editorType == CREATE_EDITOR) onComponentStateChange(false); | if (editorType == CREATE_EDITOR) onComponentStateChange(false); | public void showProperties(DataObject object, int editorType) { switch (model.getState()) { case DISCARDED: case SAVE: throw new IllegalStateException( "This method cannot be invoked in the DISCARDED or SAVE " + "state."); } switch (editorType) { case PROPERTIES_EDITOR: case CREATE_EDITOR: break; default: throw new IllegalArgumentException("This method only " + "supports the PROPERTIES_EDITOR and CREATE_EDITOR."); } removeEditor(); model.setEditorType(editorType); Editor editor = EditorFactory.getEditor(this, object, editorType); editor.addPropertyChangeListener(controller); editor.activate(); if (editorType == CREATE_EDITOR) onComponentStateChange(false); view.addComponent(editor.getUI()); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/83e42c21eb5c1f3394496ff33c72723a58274a2a/TreeViewerComponent.java/clean/SRC/org/openmicroscopy/shoola/agents/treeviewer/view/TreeViewerComponent.java |
menuItems = new ArrayList(); | TreeViewerWin() { super(TITLE); //IconManager icons = IconManager.getInstance(); //setIconImage(icons.getImageIcon(IconManager.MANAGER_48).getImage()); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/146920a8791fff71320ced0f240b9d8f3d319a13/TreeViewerWin.java/buggy/SRC/org/openmicroscopy/shoola/agents/treeviewer/view/TreeViewerWin.java |
|
void initialize(TreeViewerControl controller, TreeViewerModel model) { this.controller = controller; this.model = model; statusBar = new StatusBar(controller); statusBar.addPropertyChangeListener(controller); toolBar = new ToolBar(controller); //popupMenu = new PopupMenu(controller); loadingWin = new LoadingWindow(this); loadingWin.addPropertyChangeListener(controller); initComponents(); setJMenuBar(createMenuBar()); buildGUI(); controller.attachUIListeners(tabs); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/146920a8791fff71320ced0f240b9d8f3d319a13/TreeViewerWin.java/buggy/SRC/org/openmicroscopy/shoola/agents/treeviewer/view/TreeViewerWin.java |
||
displayedNote.setTab(this); | public NoteTab(final CTabFolder parent, Listener l, DisplayedNote displayedNote) { this.displayedNote = displayedNote; tabItem = new CTabItem(parent, SWT.NONE); tabItem.setText(displayedNote.getName()); tabItem.setData(this); tabItem.addDisposeListener(this); text = new Text(parent, SWT.MULTI | SWT.WRAP); text.setText(displayedNote.getNote().getText()); tabItem.setControl(text); displayedNote.setTab(this); select(); } | 57508 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57508/a21e67d29e81a4038ecb2d55530f57396df4085c/NoteTab.java/buggy/trunk/src/de/berlios/koalanotes/display/NoteTab.java |
|
displayedNote.setTab(null); | displayedNote.tabDisposed(); | public void widgetDisposed(DisposeEvent e) { text.dispose(); displayedNote.setTab(null); } | 57508 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57508/a21e67d29e81a4038ecb2d55530f57396df4085c/NoteTab.java/buggy/trunk/src/de/berlios/koalanotes/display/NoteTab.java |
ImageAnnotation createImageAnnotation(String content) | ImageAnnotation createImageAnnotation(String content, int imageID) | ImageAnnotation createImageAnnotation(String content) { ImageAnnotation newAnnotation = null; try { SemanticTypesService sts = registry.getSemanticTypesService(); newAnnotation = (ImageAnnotation) sts.createAttribute(ANNOT_I); newAnnotation.setContent(content); } catch(DSAccessException dsae) { UserNotifier un = registry.getUserNotifier(); un.notifyError("Data Creation Failure", "Unable to the semantic type "+ANNOT_I, dsae); } catch(DSOutOfServiceException dsose) { ServiceActivationRequest request = new ServiceActivationRequest( ServiceActivationRequest.DATA_SERVICES); registry.getEventBus().post(request); } return newAnnotation; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/f5113c7a4ff99bcbee06e1b48554259a952e1a44/Annotator.java/clean/SRC/org/openmicroscopy/shoola/agents/annotator/Annotator.java |
newAnnotation = (ImageAnnotation) sts.createAttribute(ANNOT_I); | DataManagementService dms = registry.getDataManagementService(); newAnnotation = (ImageAnnotation) sts.createAttribute(ANNOT_I,imageID); | ImageAnnotation createImageAnnotation(String content) { ImageAnnotation newAnnotation = null; try { SemanticTypesService sts = registry.getSemanticTypesService(); newAnnotation = (ImageAnnotation) sts.createAttribute(ANNOT_I); newAnnotation.setContent(content); } catch(DSAccessException dsae) { UserNotifier un = registry.getUserNotifier(); un.notifyError("Data Creation Failure", "Unable to the semantic type "+ANNOT_I, dsae); } catch(DSOutOfServiceException dsose) { ServiceActivationRequest request = new ServiceActivationRequest( ServiceActivationRequest.DATA_SERVICES); registry.getEventBus().post(request); } return newAnnotation; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/f5113c7a4ff99bcbee06e1b48554259a952e1a44/Annotator.java/clean/SRC/org/openmicroscopy/shoola/agents/annotator/Annotator.java |
dsose.printStackTrace(); | ImageAnnotation createImageAnnotation(String content) { ImageAnnotation newAnnotation = null; try { SemanticTypesService sts = registry.getSemanticTypesService(); newAnnotation = (ImageAnnotation) sts.createAttribute(ANNOT_I); newAnnotation.setContent(content); } catch(DSAccessException dsae) { UserNotifier un = registry.getUserNotifier(); un.notifyError("Data Creation Failure", "Unable to the semantic type "+ANNOT_I, dsae); } catch(DSOutOfServiceException dsose) { ServiceActivationRequest request = new ServiceActivationRequest( ServiceActivationRequest.DATA_SERVICES); registry.getEventBus().post(request); } return newAnnotation; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/f5113c7a4ff99bcbee06e1b48554259a952e1a44/Annotator.java/clean/SRC/org/openmicroscopy/shoola/agents/annotator/Annotator.java |
|
newAnnotationList = new ArrayList(); | public ImageAnnotationCtrl(Annotator annotator, AnnotateImage triggeringEvent) { if(annotator == null || triggeringEvent == null) { throw new IllegalArgumentException("Cannot construct an" + " ImageAnnotationCtrl with null parameters"); } this.annotator = annotator; this.imageID = triggeringEvent.getID(); this.imageName = triggeringEvent.getName(); this.requestEvent = triggeringEvent; List theList = annotator.getImageAnnotations(imageID); if(theList == null) { annotationList = new ArrayList(); } else { annotationList = new ArrayList(theList); } attributeList = null; // do not use this for attributes yet (if ever) } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/f5113c7a4ff99bcbee06e1b48554259a952e1a44/ImageAnnotationCtrl.java/buggy/SRC/org/openmicroscopy/shoola/agents/annotator/ImageAnnotationCtrl.java |
|
public LayoutLinkData() {} | public LayoutLinkData(AnalysisChainData chain,AnalysisNodeData fromNode,FormalOutputData fromOutput,AnalysisNodeData toNode, FormalInputData toInput) { super(chain,fromNode,fromOutput,toNode,toInput); setFromNode(fromNode); setToNode(toNode); } | public LayoutLinkData() {} | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/0bdc921792c7139d580b54ae90ba3bc7ebbd383a/LayoutLinkData.java/clean/SRC/org/openmicroscopy/shoola/agents/chainbuilder/data/layout/LayoutLinkData.java |
int sz = nodes.size(); nodes.setElementAt((LayoutNodeData) node,sz-1); | nodes.add(node); | public void setToNode(AnalysisNodeData node) { super.setToNode(node); int sz = nodes.size(); nodes.setElementAt((LayoutNodeData) node,sz-1); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/0bdc921792c7139d580b54ae90ba3bc7ebbd383a/LayoutLinkData.java/clean/SRC/org/openmicroscopy/shoola/agents/chainbuilder/data/layout/LayoutLinkData.java |
public void setValues(IRubyObject[] values, boolean specialVarsToo) { | public void setValues(IRubyObject[] values, int count, boolean specialVarsToo) { | public void setValues(IRubyObject[] values, boolean specialVarsToo) { if (specialVarsToo) { assert values.length == localValues.length; localValues = values; } else { System.arraycopy(values, 0, localValues, 2, values.length); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/dc464e41f4cc61e7250cbd6b2013e49cf87db7f2/Scope.java/clean/src/org/jruby/runtime/Scope.java |
assert values.length == localValues.length; localValues = values; | System.arraycopy(values, 0, localValues, 0, count); | public void setValues(IRubyObject[] values, boolean specialVarsToo) { if (specialVarsToo) { assert values.length == localValues.length; localValues = values; } else { System.arraycopy(values, 0, localValues, 2, values.length); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/dc464e41f4cc61e7250cbd6b2013e49cf87db7f2/Scope.java/clean/src/org/jruby/runtime/Scope.java |
System.arraycopy(values, 0, localValues, 2, values.length); | System.arraycopy(values, 0, localValues, 2, count); | public void setValues(IRubyObject[] values, boolean specialVarsToo) { if (specialVarsToo) { assert values.length == localValues.length; localValues = values; } else { System.arraycopy(values, 0, localValues, 2, values.length); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/dc464e41f4cc61e7250cbd6b2013e49cf87db7f2/Scope.java/clean/src/org/jruby/runtime/Scope.java |
valueList = ruby.getScope().getLocalValues(); | valueList = null; | public RubyObject call(Ruby ruby, RubyObject recv, String id, RubyPointer args, boolean noSuper) { if (args == null) { args = new RubyPointer(); } CRefNode savedCref = null; // +++ = null; List valueList = null; ruby.getScope().push(); CRefNode lRefValue = getRefValue(); if (lRefValue != null) { savedCref = ruby.getCRef(); // s.a. ruby.setCRef(lRefValue); ruby.getRubyFrame().setCbase(lRefValue); } if (getTable() != null) { valueList = new ArrayList(Collections.nCopies(getTable().size(), ruby.getNil())); ruby.getScope().setLocalValues(valueList); ruby.getScope().setLocalNames(getTable()); } else { valueList = ruby.getScope().getLocalValues(); ruby.getScope().setLocalValues(null); ruby.getScope().setLocalNames(null); } Node callBody = getNextNode(); Node callNode = null; if (callBody.getType() == Constants.NODE_ARGS) { callNode = callBody; callBody = null; } else if (callBody.getType() == Constants.NODE_BLOCK) { callNode = callBody.getHeadNode(); callBody = callBody.getNextNode(); } RubyVarmap.push(ruby); // PUSH_TAG(PROT_FUNC); try { if (callNode != null) { //if (call_node.getType() != Constants.NODE_ARGS) { // rb_bug("no argument-node"); //} int i = callNode.getCount(); if (i > (args != null ? args.size() : 0)) { int size = 0; if (args != null) size = args.size(); throw new RubyArgumentException(ruby, getFile() + ":" + getLine() +"wrong # of arguments(" + size + " for " + i + ")"); } if (callNode.getRest() == -1) { int opt = i; Node optNode = callNode.getOptNode(); while (optNode != null) { opt++; optNode = optNode.getNextNode(); } if (opt < (args != null ? args.size() : 0)) { throw new RubyArgumentException(ruby, "wrong # of arguments(" + args.size() + " for " + opt + ")"); } // +++ ruby.getRubyFrame().setArgs(valueList != null ? new DelegateList(valueList, 2, valueList.size()) : null); // --- } if (valueList != null) { if (i > 0) { for (int j = 0; j < i; j++) { valueList.set(j + 2, args.get(j)); } } args.inc(i); if (callNode.getOptNode() != null) { Node optNode = callNode.getOptNode(); while (optNode != null && args.size() != 0) { ((AssignableNode) optNode.getHeadNode()).assign(ruby, recv, args.getRuby(0), true); args.inc(1); optNode = optNode.getNextNode(); } recv.eval(optNode); } if (callNode.getRest() >= 0) { RubyArray array = null; if (args.size() > 0) { array = RubyArray.newArray(ruby, args); } else { array = RubyArray.newArray(ruby, 0); } valueList.set(callNode.getRest(), array); } } } return recv.eval(callBody); } catch (ReturnException rExcptn) { // +++ jpetersen return ((RubyArray) rExcptn.getReturnValue()).pop(); // --- } finally { RubyVarmap.pop(ruby); ruby.getScope().pop(); if (savedCref != null) { ruby.setCRef(savedCref); } } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/2f13ba47385b7584839c7f6f6f1abfee251cbe53/ScopeNode.java/clean/org/jruby/nodes/ScopeNode.java |
return (RubyGlobalEntry)u2; | return (RubyGlobalEntry)u3; | public RubyGlobalEntry getEntry() { return (RubyGlobalEntry)u2; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/9a05f18f2b6207bf93455d756436fe8f0002b542/Node.java/buggy/org/jruby/nodes/Node.java |
p.setLayout(new BoxLayout(p, BoxLayout.Y_AXIS)); p.add(new JLabel(PANEL_NOTE)); p.add(new JLabel(PANEL_SUBNOTE)); | p.setLayout(new BoxLayout(p, BoxLayout.X_AXIS)); p.add(UIUtilities.buildComponentPanel(labels)); | private void buildGUI() { setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); JPanel p = new JPanel(); p.setLayout(new BoxLayout(p, BoxLayout.Y_AXIS)); p.add(new JLabel(PANEL_NOTE)); p.add(new JLabel(PANEL_SUBNOTE)); p.add(createToolBar()); add(UIUtilities.buildComponentPanel(p), BorderLayout.NORTH); add(new JScrollPane(treeDisplay), BorderLayout.CENTER); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/464efde90db6bc5095c0a7e5952f51ad0f37ca86/DOClassification.java/buggy/SRC/org/openmicroscopy/shoola/agents/treeviewer/editors/DOClassification.java |
JToolBar bar = new JToolBar(); | JPanel bar = new JPanel(); | private JPanel createToolBar() { JToolBar bar = new JToolBar(); bar.setBorder(null); bar.setRollover(true); bar.setFloatable(false); bar.add(refreshButton); return UIUtilities.buildComponentPanel(bar); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/464efde90db6bc5095c0a7e5952f51ad0f37ca86/DOClassification.java/buggy/SRC/org/openmicroscopy/shoola/agents/treeviewer/editors/DOClassification.java |
bar.setRollover(true); bar.setFloatable(false); | private JPanel createToolBar() { JToolBar bar = new JToolBar(); bar.setBorder(null); bar.setRollover(true); bar.setFloatable(false); bar.add(refreshButton); return UIUtilities.buildComponentPanel(bar); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/464efde90db6bc5095c0a7e5952f51ad0f37ca86/DOClassification.java/buggy/SRC/org/openmicroscopy/shoola/agents/treeviewer/editors/DOClassification.java |
|
UIUtilities.unifiedButtonLookAndFeel(refreshButton); | private void initComponents() { refreshButton = new JButton("Refresh"); UIUtilities.unifiedButtonLookAndFeel(refreshButton); refreshButton.setEnabled(false); refreshButton.setToolTipText( UIUtilities.formatToolTipText("Reload data.")); refreshButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { refreshButton.setEnabled(false); controller.loadClassifications(); } }); treeDisplay = new JTree(); treeDisplay.setRootVisible(false); treeDisplay.setCellRenderer(new TreeCellRenderer(false)); treeDisplay.setShowsRootHandles(true); treeDisplay.putClientProperty("JTree.lineStyle", "Angled"); treeDisplay.getSelectionModel().setSelectionMode( TreeSelectionModel.SINGLE_TREE_SELECTION); TreeImageSet root = new TreeImageSet(ROOT); treeDisplay.setModel(new DefaultTreeModel(root)); treeDisplay.expandPath(new TreePath(root.getPath())); //Add Listeners treeDisplay.addMouseListener(new MouseAdapter() { public void mousePressed(MouseEvent e) { onClick(e); } public void mouseReleased(MouseEvent e) { onClick(e); } }); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/464efde90db6bc5095c0a7e5952f51ad0f37ca86/DOClassification.java/buggy/SRC/org/openmicroscopy/shoola/agents/treeviewer/editors/DOClassification.java |
|
finishButton = new JButton("Finish"); | finishButton = new JButton("Save"); | private void initComponents() { titleLabel = new JLabel(getMessage(null)); titleLabelDefaultfont = titleLabel.getFont(); //TitleBar finishButton = new JButton("Finish"); finishButton.setEnabled(false); finishButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { model.finish(); } }); nameArea = new JTextField(); setTextAreaDefault(nameArea); descriptionArea = new MultilineLabel(); setTextAreaDefault(descriptionArea); nameAreaListener = new DocumentListener() { /** * Updates the editor's controls when some text is inserted. * @see DocumentListener#insertUpdate(DocumentEvent) */ public void insertUpdate(DocumentEvent de) { handleNameAreaInsert(); } /** * Displays an error message when the data object has no name. * @see DocumentListener#removeUpdate(DocumentEvent) */ public void removeUpdate(DocumentEvent de) { handleNameAreaRemove(de.getDocument().getLength()); } /** * Required by I/F but no-op implementation in our case. * @see DocumentListener#changedUpdate(DocumentEvent) */ public void changedUpdate(DocumentEvent de) {} }; nameArea.getDocument().addDocumentListener(nameAreaListener); descriptionAreaListener = new DocumentListener() { /** Handles text insertion. */ public void insertUpdate(DocumentEvent de) { handleDescriptionAreaInsert(); } /** Handles text insertion. */ public void removeUpdate(DocumentEvent de) { handleDescriptionAreaInsert(); } /** * Required by I/F but no-op implementation in our case. * @see DocumentListener#removeUpdate(DocumentEvent) */ public void changedUpdate(DocumentEvent de) {} }; descriptionArea.getDocument().addDocumentListener( descriptionAreaListener); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/5d2b77e68841d9071e6e57e49a20dcdbae14b54e/EditorPaneUI.java/buggy/SRC/org/openmicroscopy/shoola/agents/hiviewer/clipboard/editor/EditorPaneUI.java |
if (name.length() > 255) { UserNotifier un = HiViewerAgent.getRegistry().getUserNotifier(); un.notifyInfo("Editor", "The name is too long. Cannot be more " + "than 255 characters long."); uiDelegate.resetName(); return; } | void finish() { if (!(uiDelegate.isEdit())) return; String name = uiDelegate.getObjectName(); if (name == null || name.length() == 0) return; DataObject object = fillDataObject(); if (object == null) return; model.saveObject(object); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/39bb6f0c93c9752d3daacd9753b8402e6d393a78/EditorPane.java/buggy/SRC/org/openmicroscopy/shoola/agents/hiviewer/clipboard/editor/EditorPane.java |
|
statusBar.setStatusIcon("graphx/server_disconn16.png", | statusBar.setStatusIcon("resources/graphx/server_disconn16.png", | void createAdminActions() { try { adminActions = new AdminActions(loginHandler.getMetadataStore(), loginHandler.getUsername()); this.add(adminActions, BorderLayout.CENTER); } catch(Exception e) { statusBar.setStatusIcon("graphx/server_disconn16.png", "Not connected to Server. Cannot get iAdmin interface, " + "Is server running?"); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/c24ebf508ce40c35b2c509bdba29698588ce1204/MainPanel.java/buggy/components/tools/admin/src/adminTool/main/MainPanel.java |
statusBar.setStatusIcon("graphx/server_disconn16.png", | statusBar.setStatusIcon("resources/graphx/server_disconn16.png", | void createStatusBar() { statusBar = new StatusBar(); statusBar.setStatusIcon("graphx/server_disconn16.png", "Not connected to Server. Please login for administration options."); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/c24ebf508ce40c35b2c509bdba29698588ce1204/MainPanel.java/buggy/components/tools/admin/src/adminTool/main/MainPanel.java |
statusBar.setStatusIcon("graphx/server_trying16.png", | statusBar.setStatusIcon("resources/graphx/server_trying16.png", | public void startLogin() { statusBar.setStatusIcon("graphx/server_trying16.png", "Trying to connect."); loginHandler = new LoginHandler(this); if(loggedIn) { createAdminActions(); } window.setSize(800,500); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/c24ebf508ce40c35b2c509bdba29698588ce1204/MainPanel.java/buggy/components/tools/admin/src/adminTool/main/MainPanel.java |
ResourceUtils.resLabel(usernameLabel, usernameField, SparkRes.getString(SparkRes.LOGIN_DIALOG_USERNAME)); ResourceUtils.resLabel(passwordLabel, passwordField, SparkRes.getString(SparkRes.LOGIN_DIALOG_PASSWORD)); | ResourceUtils.resLabel(usernameLabel, usernameField, Res.getString("label.username")); ResourceUtils.resLabel(passwordLabel, passwordField, Res.getString("label.password")); | LoginPanel() { //setBorder(BorderFactory.createTitledBorder("Sign In Now")); ResourceUtils.resButton(savePasswordBox, Res.getString("checkbox.save.password")); ResourceUtils.resButton(autoLoginBox, Res.getString("checkbox.auto.login")); ResourceUtils.resLabel(serverLabel, serverField, Res.getString("label.server")); ResourceUtils.resButton(createAccountButton, Res.getString("label.accounts")); savePasswordBox.setOpaque(false); autoLoginBox.setOpaque(false); setLayout(GRIDBAGLAYOUT); add(usernameLabel, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(15, 5, 5, 5), 0, 0)); add(usernameField, new GridBagConstraints(1, 1, 2, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(15, 5, 5, 5), 0, 0)); add(passwordField, new GridBagConstraints(1, 2, 2, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 5, 5, 5), 0, 0)); add(passwordLabel, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 5, 5, 5), 5, 0)); // Add Server Field Properties add(serverField, new GridBagConstraints(1, 4, 2, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 5, 5, 5), 0, 0)); add(serverLabel, new GridBagConstraints(0, 4, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 5, 5, 5), 5, 0)); add(savePasswordBox, new GridBagConstraints(1, 5, 2, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 5, 5, 5), 0, 0)); add(autoLoginBox, new GridBagConstraints(1, 6, 2, 1, 1.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.HORIZONTAL, new Insets(0, 5, 5, 5), 0, 0)); // Add button but disable the login button initially savePasswordBox.addActionListener(this); autoLoginBox.addActionListener(this); buttonPanel.add(quitButton, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 0, 5, 0), 0, 0)); if (!"true".equals(Default.getString(Default.ACCOUNT_DISABLED))) { buttonPanel.add(createAccountButton, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.HORIZONTAL, new Insets(5, 0, 5, 0), 0, 0)); } buttonPanel.add(connectionButton, new GridBagConstraints(2, 0, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.HORIZONTAL, new Insets(5, 0, 5, 0), 0, 0)); buttonPanel.add(loginButton, new GridBagConstraints(3, 0, 4, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 0), 0, 0)); cardPanel.add(buttonPanel, BUTTON_PANEL); cardPanel.setOpaque(false); buttonPanel.setOpaque(false); progressBar.setHorizontalAlignment(JLabel.CENTER); cardPanel.add(progressBar, PROGRESS_BAR); add(cardPanel, new GridBagConstraints(0, 7, 4, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); loginButton.setEnabled(false); // Add KeyListener usernameField.addKeyListener(this); passwordField.addKeyListener(this); serverField.addKeyListener(this); passwordField.addFocusListener(this); usernameField.addFocusListener(this); serverField.addFocusListener(this); // Add ActionListener quitButton.addActionListener(this); loginButton.addActionListener(this); connectionButton.addActionListener(this); // Make same size GraphicUtils.makeSameSize(new JComponent[]{usernameField, passwordField}); // Set progress bar description progressBar.setText(SparkRes.getString(SparkRes.LOGIN_DIALOG_AUTHENTICATING)); //progressBar.setStringPainted(true); // Set Resources ResourceUtils.resLabel(usernameLabel, usernameField, SparkRes.getString(SparkRes.LOGIN_DIALOG_USERNAME)); ResourceUtils.resLabel(passwordLabel, passwordField, SparkRes.getString(SparkRes.LOGIN_DIALOG_PASSWORD)); ResourceUtils.resButton(quitButton, SparkRes.getString(SparkRes.LOGIN_DIALOG_QUIT)); ResourceUtils.resButton(loginButton, SparkRes.getString(SparkRes.LOGIN_DIALOG_LOGIN)); ResourceUtils.resButton(connectionButton, Res.getString("button.advanced")); // Load previous instances String userProp = localPref.getUsername(); String serverProp = localPref.getServer(); if (userProp != null && serverProp != null) { usernameField.setText(userProp); serverField.setText(serverProp); } // Check Settings if (localPref.isSavePassword()) { String encryptedPassword = localPref.getPassword(); if (encryptedPassword != null) { String password = Encryptor.decrypt(encryptedPassword); passwordField.setText(password); } savePasswordBox.setSelected(true); loginButton.setEnabled(true); } autoLoginBox.setSelected(localPref.isAutoLogin()); if (autoLoginBox.isSelected()) { savePasswordBox.setEnabled(false); autoLoginBox.setEnabled(false); validateLogin(); return; } // Handle arguments String username = Spark.getArgumentValue("username"); String password = Spark.getArgumentValue("password"); String server = Spark.getArgumentValue("server"); if (username != null) { usernameField.setText(username); } if (password != null) { passwordField.setText(password); } if (server != null) { serverField.setText(server); } if (username != null && server != null && password != null) { savePasswordBox.setEnabled(false); autoLoginBox.setEnabled(false); validateLogin(); } createAccountButton.addActionListener(this); final String lockedDownURL = Default.getString(Default.HOST_NAME); if (ModelUtil.hasLength(lockedDownURL)) { serverField.setEnabled(false); serverField.setText(lockedDownURL); } } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/19e17d68c2c9589c1eea9caba87ba9f18813b1c4/LoginDialog.java/buggy/src/java/org/jivesoftware/LoginDialog.java |
ResourceUtils.resButton(loginButton, SparkRes.getString(SparkRes.LOGIN_DIALOG_LOGIN)); | ResourceUtils.resButton(loginButton, Res.getString("title.login")); | LoginPanel() { //setBorder(BorderFactory.createTitledBorder("Sign In Now")); ResourceUtils.resButton(savePasswordBox, Res.getString("checkbox.save.password")); ResourceUtils.resButton(autoLoginBox, Res.getString("checkbox.auto.login")); ResourceUtils.resLabel(serverLabel, serverField, Res.getString("label.server")); ResourceUtils.resButton(createAccountButton, Res.getString("label.accounts")); savePasswordBox.setOpaque(false); autoLoginBox.setOpaque(false); setLayout(GRIDBAGLAYOUT); add(usernameLabel, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(15, 5, 5, 5), 0, 0)); add(usernameField, new GridBagConstraints(1, 1, 2, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(15, 5, 5, 5), 0, 0)); add(passwordField, new GridBagConstraints(1, 2, 2, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 5, 5, 5), 0, 0)); add(passwordLabel, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 5, 5, 5), 5, 0)); // Add Server Field Properties add(serverField, new GridBagConstraints(1, 4, 2, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 5, 5, 5), 0, 0)); add(serverLabel, new GridBagConstraints(0, 4, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 5, 5, 5), 5, 0)); add(savePasswordBox, new GridBagConstraints(1, 5, 2, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 5, 5, 5), 0, 0)); add(autoLoginBox, new GridBagConstraints(1, 6, 2, 1, 1.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.HORIZONTAL, new Insets(0, 5, 5, 5), 0, 0)); // Add button but disable the login button initially savePasswordBox.addActionListener(this); autoLoginBox.addActionListener(this); buttonPanel.add(quitButton, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 0, 5, 0), 0, 0)); if (!"true".equals(Default.getString(Default.ACCOUNT_DISABLED))) { buttonPanel.add(createAccountButton, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.HORIZONTAL, new Insets(5, 0, 5, 0), 0, 0)); } buttonPanel.add(connectionButton, new GridBagConstraints(2, 0, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.HORIZONTAL, new Insets(5, 0, 5, 0), 0, 0)); buttonPanel.add(loginButton, new GridBagConstraints(3, 0, 4, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 0), 0, 0)); cardPanel.add(buttonPanel, BUTTON_PANEL); cardPanel.setOpaque(false); buttonPanel.setOpaque(false); progressBar.setHorizontalAlignment(JLabel.CENTER); cardPanel.add(progressBar, PROGRESS_BAR); add(cardPanel, new GridBagConstraints(0, 7, 4, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); loginButton.setEnabled(false); // Add KeyListener usernameField.addKeyListener(this); passwordField.addKeyListener(this); serverField.addKeyListener(this); passwordField.addFocusListener(this); usernameField.addFocusListener(this); serverField.addFocusListener(this); // Add ActionListener quitButton.addActionListener(this); loginButton.addActionListener(this); connectionButton.addActionListener(this); // Make same size GraphicUtils.makeSameSize(new JComponent[]{usernameField, passwordField}); // Set progress bar description progressBar.setText(SparkRes.getString(SparkRes.LOGIN_DIALOG_AUTHENTICATING)); //progressBar.setStringPainted(true); // Set Resources ResourceUtils.resLabel(usernameLabel, usernameField, SparkRes.getString(SparkRes.LOGIN_DIALOG_USERNAME)); ResourceUtils.resLabel(passwordLabel, passwordField, SparkRes.getString(SparkRes.LOGIN_DIALOG_PASSWORD)); ResourceUtils.resButton(quitButton, SparkRes.getString(SparkRes.LOGIN_DIALOG_QUIT)); ResourceUtils.resButton(loginButton, SparkRes.getString(SparkRes.LOGIN_DIALOG_LOGIN)); ResourceUtils.resButton(connectionButton, Res.getString("button.advanced")); // Load previous instances String userProp = localPref.getUsername(); String serverProp = localPref.getServer(); if (userProp != null && serverProp != null) { usernameField.setText(userProp); serverField.setText(serverProp); } // Check Settings if (localPref.isSavePassword()) { String encryptedPassword = localPref.getPassword(); if (encryptedPassword != null) { String password = Encryptor.decrypt(encryptedPassword); passwordField.setText(password); } savePasswordBox.setSelected(true); loginButton.setEnabled(true); } autoLoginBox.setSelected(localPref.isAutoLogin()); if (autoLoginBox.isSelected()) { savePasswordBox.setEnabled(false); autoLoginBox.setEnabled(false); validateLogin(); return; } // Handle arguments String username = Spark.getArgumentValue("username"); String password = Spark.getArgumentValue("password"); String server = Spark.getArgumentValue("server"); if (username != null) { usernameField.setText(username); } if (password != null) { passwordField.setText(password); } if (server != null) { serverField.setText(server); } if (username != null && server != null && password != null) { savePasswordBox.setEnabled(false); autoLoginBox.setEnabled(false); validateLogin(); } createAccountButton.addActionListener(this); final String lockedDownURL = Default.getString(Default.HOST_NAME); if (ModelUtil.hasLength(lockedDownURL)) { serverField.setEnabled(false); serverField.setText(lockedDownURL); } } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/19e17d68c2c9589c1eea9caba87ba9f18813b1c4/LoginDialog.java/buggy/src/java/org/jivesoftware/LoginDialog.java |
return usernameField.getText(); | return StringUtils.escapeNode(usernameField.getText().toLowerCase()); | public String getUsername() { return usernameField.getText(); } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/78464cb447e4e3046a3cf7c554642f9e12b07fef/AccountCreationWizard.java/buggy/src/java/org/jivesoftware/AccountCreationWizard.java |
if (child == null) setParentSizeForMultiView(tf.getParent()); | if (child == null) { setParentSizeForMultiView(tf.getParent()); contentPane.validate(); contentPane.repaint(); } | void setChildView(Component child) { Component oldChild = getChildView(); if (oldChild != null) { //Return it to the internal desktop. singleViewDesktop.remove(oldChild); desktopPane.add(oldChild); oldChild.setBounds(childViewBounds); if (oldChild instanceof TinyFrame) { TinyFrame tf = (TinyFrame) oldChild; tf.setTitleBarType(childViewTitleBarType); tf.setCollapsed(childViewCollapsed); if (child == null) setParentSizeForMultiView(tf.getParent()); } } if (isChild(child)) { //We've got a new child to display. desktopPane.remove(child); singleViewDesktop.add(child); childViewBounds = child.getBounds(); singleViewDesktop.setPreferredSize( new Dimension(childViewBounds.width, childViewBounds.height) ); child.setLocation(2, 2); child.setSize(child.getPreferredSize()); if (child instanceof TinyFrame) { TinyFrame tf = (TinyFrame) child; childViewTitleBarType = tf.getTitleBarType(); childViewCollapsed = tf.isCollapsed(); tf.setTitleBarType(TinyFrame.HEADER_BAR); tf.setCollapsed(false); setParentSizeForSingleView(tf.getParent()); } } contentPane.validate(); contentPane.repaint(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/894c438ad07806d312ac2e114ecc2ef05e768787/TinyFrameModel.java/buggy/SRC/org/openmicroscopy/shoola/agents/hiviewer/tframe/TinyFrameModel.java |
singleViewDesktop.setPreferredSize( new Dimension(childViewBounds.width, childViewBounds.height) ); child.setLocation(2, 2); child.setSize(child.getPreferredSize()); | singleViewDesktop.setPreferredSize(child.getPreferredSize()); | void setChildView(Component child) { Component oldChild = getChildView(); if (oldChild != null) { //Return it to the internal desktop. singleViewDesktop.remove(oldChild); desktopPane.add(oldChild); oldChild.setBounds(childViewBounds); if (oldChild instanceof TinyFrame) { TinyFrame tf = (TinyFrame) oldChild; tf.setTitleBarType(childViewTitleBarType); tf.setCollapsed(childViewCollapsed); if (child == null) setParentSizeForMultiView(tf.getParent()); } } if (isChild(child)) { //We've got a new child to display. desktopPane.remove(child); singleViewDesktop.add(child); childViewBounds = child.getBounds(); singleViewDesktop.setPreferredSize( new Dimension(childViewBounds.width, childViewBounds.height) ); child.setLocation(2, 2); child.setSize(child.getPreferredSize()); if (child instanceof TinyFrame) { TinyFrame tf = (TinyFrame) child; childViewTitleBarType = tf.getTitleBarType(); childViewCollapsed = tf.isCollapsed(); tf.setTitleBarType(TinyFrame.HEADER_BAR); tf.setCollapsed(false); setParentSizeForSingleView(tf.getParent()); } } contentPane.validate(); contentPane.repaint(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/894c438ad07806d312ac2e114ecc2ef05e768787/TinyFrameModel.java/buggy/SRC/org/openmicroscopy/shoola/agents/hiviewer/tframe/TinyFrameModel.java |
contentPane.validate(); contentPane.repaint(); | void setChildView(Component child) { Component oldChild = getChildView(); if (oldChild != null) { //Return it to the internal desktop. singleViewDesktop.remove(oldChild); desktopPane.add(oldChild); oldChild.setBounds(childViewBounds); if (oldChild instanceof TinyFrame) { TinyFrame tf = (TinyFrame) oldChild; tf.setTitleBarType(childViewTitleBarType); tf.setCollapsed(childViewCollapsed); if (child == null) setParentSizeForMultiView(tf.getParent()); } } if (isChild(child)) { //We've got a new child to display. desktopPane.remove(child); singleViewDesktop.add(child); childViewBounds = child.getBounds(); singleViewDesktop.setPreferredSize( new Dimension(childViewBounds.width, childViewBounds.height) ); child.setLocation(2, 2); child.setSize(child.getPreferredSize()); if (child instanceof TinyFrame) { TinyFrame tf = (TinyFrame) child; childViewTitleBarType = tf.getTitleBarType(); childViewCollapsed = tf.isCollapsed(); tf.setTitleBarType(TinyFrame.HEADER_BAR); tf.setCollapsed(false); setParentSizeForSingleView(tf.getParent()); } } contentPane.validate(); contentPane.repaint(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/894c438ad07806d312ac2e114ecc2ef05e768787/TinyFrameModel.java/buggy/SRC/org/openmicroscopy/shoola/agents/hiviewer/tframe/TinyFrameModel.java |
|
if (parent instanceof TinyFrame) | if (parent instanceof TinyFrame) | private void setParentSizeForMultiView(Container parent) { if (parent instanceof TinyFrame) parent.setSize(parent.getPreferredSize()); else setParentSizeForMultiView(parent.getParent()); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/894c438ad07806d312ac2e114ecc2ef05e768787/TinyFrameModel.java/buggy/SRC/org/openmicroscopy/shoola/agents/hiviewer/tframe/TinyFrameModel.java |
private void setParentSizeForSingleView(Container parent) { if (parent instanceof TinyFrame) { Dimension d = ((TinyFrame) parent).getTitleBar().getPreferredSize(); Dimension dDesktop = singleViewDesktop.getPreferredSize(); parent.setSize(d.width+dDesktop.width, d.height+dDesktop.height+4); } else setParentSizeForSingleView(parent.getParent()); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/894c438ad07806d312ac2e114ecc2ef05e768787/TinyFrameModel.java/buggy/SRC/org/openmicroscopy/shoola/agents/hiviewer/tframe/TinyFrameModel.java |
||
data[i][0] = (ImageData) images[i]; | data[i][0] = ((ImageData) images[i]).getName(); | private ImagesTableModel(Set imagesDiff) { images = imagesDiff.toArray(); data = new Object[images.length][2]; for (int i = 0; i < images.length; i++) { data[i][0] = (ImageData) images[i]; data[i][1] = Boolean.FALSE; } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1ed79437fda6d8f6b2566c6fe677bfaaf3352055/DatasetImagesDiffPane.java/clean/SRC/org/openmicroscopy/shoola/agents/datamng/editors/dataset/DatasetImagesDiffPane.java |
runtime.getLoadService().init(runtime, new ArrayList()); | runtime.getLoadService().init(new ArrayList()); | public void testVarAndMet() throws Exception { runtime.getLoadService().init(runtime, new ArrayList()); eval("load './test/testVariableAndMethod.rb'"); assertEquals("Hello World", eval("puts($a)")); assertEquals("dlroW olleH", eval("puts $b")); assertEquals("Hello World", eval("puts $d.reverse, $c, $e.reverse")); assertEquals("135 20 3", eval("puts $f, \" \", $g, \" \", $h")); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/61503e7396c70acb6ed9f50922ff044d1fcc4bcc/TestRuby.java/clean/test/org/jruby/test/TestRuby.java |
browser.setSelectedDisplay(browser.getLastSelectedDisplay()); | public void onDataObjectSave(List nodes) { switch (model.getState()) { case DISCARDED: case NEW: case LOADING_THUMBNAILS: return; default: break; } if ( nodes == null) { model.onDataObjectSave(); fireStateChange(); return; } view.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); DataSaveVisitor visitor = new DataSaveVisitor(this, nodes); Browser browser = model.getBrowser(); browser.accept(visitor); browser.getUI().repaint(); if (model.getTreeView() != null) model.getTreeView().repaint(); model.onDataObjectSave(); view.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); fireStateChange(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/bbd964029121f2811ba2b7cf47a392087032888c/HiViewerComponent.java/buggy/SRC/org/openmicroscopy/shoola/agents/hiviewer/view/HiViewerComponent.java |
|
throw new BuildException("dependent: " + e); | Engine.log.exception(t); throw new BuildException("failure during build: " + t); | public final Object build(BuildContext rc) throws BuildException { // collect the arguments Object args[] = new Object[_buildArgs]; { int i = 0; args[i++] = rc; if ( hasCondition() ) { Object cond = (_condition instanceof Builder) ? ((Builder) _condition).build(rc) : _condition; if (cond instanceof Condition) { args[i++] = cond; } else { args[i++] = new ConstantCondition(cond); } } if ( hasTarget() ) { args[i++] = _target; } if ( hasArguments() ) { args[i++] = getArguments(rc); } if ( isContainer() ) { args[i++] = _contents; } if ( isParser() ) { args[i++] = _text; } if ( isMulti() ) { args[i++] = _dependent; } } // build the arguments for (int i = 0; i < args.length; i++) { Object arg = args[i]; if ((arg != null) && (arg instanceof Builder)) { args[i] = ((Builder) arg).build(rc); } } // build the directive Object self; try { self = _build.invoke(null,args); } catch (InvocationTargetException e) { Throwable t = e.getTargetException(); if (t instanceof BuildException) { throw (BuildException) t; } else { throw new BuildException("dependent: " + e); } } catch (Exception e) { throw new BuildException("dependent: " + e); } return self; } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/b9aa11c88aa91e9043d6504a59b31aee8d1ad8c7/DirectiveBuilder.java/clean/webmacro/src/org/webmacro/engine/DirectiveBuilder.java |
throw new BuildException("dependent: " + e); | throw new BuildException("failed to build: " + e); | public final Object build(BuildContext rc) throws BuildException { // collect the arguments Object args[] = new Object[_buildArgs]; { int i = 0; args[i++] = rc; if ( hasCondition() ) { Object cond = (_condition instanceof Builder) ? ((Builder) _condition).build(rc) : _condition; if (cond instanceof Condition) { args[i++] = cond; } else { args[i++] = new ConstantCondition(cond); } } if ( hasTarget() ) { args[i++] = _target; } if ( hasArguments() ) { args[i++] = getArguments(rc); } if ( isContainer() ) { args[i++] = _contents; } if ( isParser() ) { args[i++] = _text; } if ( isMulti() ) { args[i++] = _dependent; } } // build the arguments for (int i = 0; i < args.length; i++) { Object arg = args[i]; if ((arg != null) && (arg instanceof Builder)) { args[i] = ((Builder) arg).build(rc); } } // build the directive Object self; try { self = _build.invoke(null,args); } catch (InvocationTargetException e) { Throwable t = e.getTargetException(); if (t instanceof BuildException) { throw (BuildException) t; } else { throw new BuildException("dependent: " + e); } } catch (Exception e) { throw new BuildException("dependent: " + e); } return self; } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/b9aa11c88aa91e9043d6504a59b31aee8d1ad8c7/DirectiveBuilder.java/clean/webmacro/src/org/webmacro/engine/DirectiveBuilder.java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.