rem
stringlengths 0
477k
| add
stringlengths 0
313k
| context
stringlengths 6
599k
| meta
stringlengths 141
403
|
---|---|---|---|
loadTools("Tools"); | loadTools("ContextTools"); | protected void init () throws InitException { String eehClass; // Initialize the property operator cache _propertyOperators.init(this, _config); // Write out our properties as debug records if (_log.loggingDebug()) { String[] properties = _config.getKeys(); Arrays.sort(properties); for (int i = 0; i < properties.length; i++) { _log.debug("Property " + properties[i] + ": " + _config.getSetting(properties[i])); } } // set up profiling ProfileSystem ps = ProfileSystem.getInstance(); int pRate = _config.getIntegerSetting("Profile.rate", 0); int pTime = _config.getIntegerSetting("Profile.time", 60000); _log.debug("Profiling rate=" + pRate + " time=" + pTime); if ((pRate != 0) && (pTime != 0)) { _prof = ps.newProfileCategory(_name, pRate, pTime); _log.debug("ProfileSystem.newProfileCategory: " + _prof); } else { _prof = null; } if (_prof != null) { _log.notice("Profiling started: " + _prof); } else { _log.info("Profiling not started."); } // set up providers _config.processListSetting("Providers", new ProviderSettingHandler()); if (_providers.size() == 0) { _log.error("No Providers specified"); throw new InitException("No Providers specified in configuration"); } // load tools loadTools("Tools"); loadTools("WebContextTools"); eehClass = _config.getSetting("ExceptionHandler"); if (eehClass != null && !eehClass.equals("")) { try { _eeHandler = (EvaluationExceptionHandler) classForName(eehClass).newInstance(); } catch (Exception e) { _log.warning("Unable to instantiate exception handler of class " + eehClass + "; " + e); } } if (_eeHandler == null) { _eeHandler = new DefaultEvaluationExceptionHandler(); } _eeHandler.init(this, _config); // Initialize function map SubSettings fnSettings = new SubSettings(_config, "Functions"); String[] fns = fnSettings.getKeys(); for (int i = 0; fns != null && i < fns.length; i++) { String fn = fns[i]; String fnSetting = fnSettings.getSetting(fn); int lastDot = fnSetting.lastIndexOf('.'); if (lastDot == -1) { throw new IllegalArgumentException("Bad function declaration for " + fn + ": " + fnSetting + ". This setting must include full class name followed by a '.' and method name"); } String fnClassName = fnSetting.substring(0, lastDot); String fnMethName = fnSetting.substring(lastDot + 1); // function type may be static, instance, or factory. Default is static String fnType = _config.getSetting("Function." + fn + ".type", "static"); Object[] args = null; if ("factory".equals(fnType)) { //TODO: implement this!!! // get function from a factory method // declared class/method is the factory class/instance method // get the factory class method name //String factoryMeth = _config.getSetting("Function." + fn + ".factory.method"); } if (!"static".equals(fnType)) { // get arg string String argString = _config.getSetting("Function." + fn + ".args"); if (argString != null) { if (!argString.startsWith("[")) { argString = "[" + argString + "]"; } org.webmacro.engine.StringTemplate tmpl = new org.webmacro.engine.StringTemplate(this, "#set $args=" + argString); Context argContext = new Context(this); try { tmpl.evaluateAsString(argContext); } catch (Exception e) { _log.error("Unable to evaluate arguments to function " + fn + ". The specified string was " + argString + ".", e); } args = (Object[]) argContext.get("args"); _log.debug("Args for function " + fn + ": " + Arrays.asList(args)); } } Class c = null; try { c = Class.forName(fnClassName); } catch (Exception e) { _log.error("Unable to load class " + fnClassName + " for function " + fn, e); } Object o = c; try { if (c != null) { if ("instance".equals(fnType)) { // instantiate the class o = IntrospectionUtils.instantiate(c, args); } } MethodWrapper mw = new MethodWrapper(o, fnMethName); _functionMap.put(fn, mw); } catch (Exception e) { _log.error("Unable to instantiate the function " + fn + " using the supplied configuration.", e); } } } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/86f22592a0a5ea1975eed1be0d1773078688457f/Broker.java/buggy/webmacro/src/org/webmacro/Broker.java |
saveTimer = new SaveTimer(); Runtime.getRuntime().addShutdownHook(new Thread(saveTimer)); | saveTimer = new SaveTimer(); Runtime.getRuntime().addShutdownHook(new Thread(saveTimer)); | public static ProjectData getGlobalProjectData() { if (globalProjectData != null) return globalProjectData; File dataFile = CoverageDataFileHandler.getDefaultDataFile(); // Read projectData from the serialized file. if (dataFile.isFile()) { //System.out.println("Cobertura: Loading global project data from " + dataFile.getAbsolutePath()); globalProjectData = CoverageDataFileHandler .loadCoverageData(dataFile); } if (globalProjectData == null) { // We could not read from the serialized file, so create a new object. System.out.println("Cobertura: Coverage data file " + dataFile.getAbsolutePath() + " either does not exist or is not readable. Creating a new data file."); globalProjectData = new ProjectData(); // Add a hook to save the data when the JVM exits saveTimer = new SaveTimer(); Runtime.getRuntime().addShutdownHook(new Thread(saveTimer)); // Possibly also save the coverage data every x seconds? //Timer timer = new Timer(true); //timer.schedule(saveTimer, 100); } return globalProjectData; } | 50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/474ef1a282117464c8f840f2d11adc10aa2dba27/ProjectData.java/clean/cobertura/src/net/sourceforge/cobertura/coveragedata/ProjectData.java |
} | public static ProjectData getGlobalProjectData() { if (globalProjectData != null) return globalProjectData; File dataFile = CoverageDataFileHandler.getDefaultDataFile(); // Read projectData from the serialized file. if (dataFile.isFile()) { //System.out.println("Cobertura: Loading global project data from " + dataFile.getAbsolutePath()); globalProjectData = CoverageDataFileHandler .loadCoverageData(dataFile); } if (globalProjectData == null) { // We could not read from the serialized file, so create a new object. System.out.println("Cobertura: Coverage data file " + dataFile.getAbsolutePath() + " either does not exist or is not readable. Creating a new data file."); globalProjectData = new ProjectData(); // Add a hook to save the data when the JVM exits saveTimer = new SaveTimer(); Runtime.getRuntime().addShutdownHook(new Thread(saveTimer)); // Possibly also save the coverage data every x seconds? //Timer timer = new Timer(true); //timer.schedule(saveTimer, 100); } return globalProjectData; } | 50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/474ef1a282117464c8f840f2d11adc10aa2dba27/ProjectData.java/clean/cobertura/src/net/sourceforge/cobertura/coveragedata/ProjectData.java |
|
private RubyTime(IRuby runtime, RubyClass rubyClass) { | public RubyTime(IRuby runtime, RubyClass rubyClass) { | private RubyTime(IRuby runtime, RubyClass rubyClass) { super(runtime, rubyClass); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/70d0ac3914a10ee21018f230c9b0bbf1910d47a3/RubyTime.java/buggy/src/org/jruby/RubyTime.java |
return getRuntime().newArray(new IRubyObject[] { sec(), min(), hour(), mday(), month(), year(), wday(), yday(), isdst(), zone() }); | return getRuntime().newArray(new IRubyObject[] { sec(), min(), hour(), mday(), month(), year(), wday(), yday(), isdst(), zone() }); | public RubyArray to_a() { return getRuntime().newArray(new IRubyObject[] { sec(), min(), hour(), mday(), month(), year(), wday(), yday(), isdst(), zone() }); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/70d0ac3914a10ee21018f230c9b0bbf1910d47a3/RubyTime.java/buggy/src/org/jruby/RubyTime.java |
public static void main(String[] args) throws Exception { // lame hard coded log initialization Logger root = Logger.getRootLogger(); root.addAppender(new ConsoleAppender(new PatternLayout("%d{ABSOLUTE} %-5p [%c{1}] %m%n"))); root.setLevel(Level.INFO); log.info("Server startup begun"); List editorSearchPath = new LinkedList(Arrays.asList(PropertyEditorManager.getEditorSearchPath())); editorSearchPath.add("org.gbean.propertyeditor"); PropertyEditorManager.setEditorSearchPath((String[]) editorSearchPath.toArray(new String[editorSearchPath.size()])); try { // Determine the gbean installation directory // guess from the location of the jar URL url = Daemon.class.getClassLoader().getResource("META-INF/startup-jar"); String location; int configStart; File baseDirectory; if (url != null) { try { JarURLConnection jarConnection = (JarURLConnection) url.openConnection(); url = jarConnection.getJarFileURL(); URI baseURI = new URI(url.toString()).resolve(".."); baseDirectory = new File(baseURI); Manifest manifest; manifest = jarConnection.getManifest(); Attributes mainAttributes = manifest.getMainAttributes(); String defaultLocation = mainAttributes.getValue(DEFAULT_LOCATION); location = new File(baseDirectory, defaultLocation).getAbsolutePath(); configStart = 0; } catch (Exception ignored) { log.error("Error while determining the gbean installation directory", ignored); System.err.println("Could not determine gbean installation directory"); System.exit(1); throw new AssertionError(); } } else { String dir = System.getProperty("gbean.base.dir", System.getProperty("user.dir")); baseDirectory = new File(dir); location = args[0]; configStart = 1; } System.setProperty("gbean.base.dir", baseDirectory.getAbsolutePath()); System.setProperty("geronimo.base.dir", baseDirectory.getAbsolutePath()); ClassLoader classLoader = Daemon.class.getClassLoader(); // create the kernel // create a geronimo kernel bridge so services needing a geronio kernel can get one final KernelBridge kernelBridge = new KernelBridge("geronimo.server"); // boot the kernel try { kernelBridge.boot(); } catch (Exception e) { e.printStackTrace(); System.exit(2); throw new AssertionError(); } // Get the gbean kernel Kernel kernel = kernelBridge.getKernel(); // load the bootstrap repositories List repositories = BootstrapRepository.loadRepositories(kernel, classLoader); for (Iterator iterator = repositories.iterator(); iterator.hasNext();) { ObjectName objectName = (ObjectName) iterator.next(); log.info("Loaded bootstrap repository " + objectName); } Loader loader = new SpringLoader(); ObjectName rootConfigurationName = loader.load(kernel, location); kernel.startRecursiveService(rootConfigurationName); // add our shutdown hook Runtime.getRuntime().addShutdownHook(new Thread("Shutdown Thread") { public void run() { log.info("Server shutdown begun"); kernelBridge.shutdown(); log.info("Server shutdown completed"); } }); // get a list of the configuration uris from the command line List configs = new ArrayList(); for (int i = configStart; i < args.length; i++) { try { configs.add(new URI(args[i])); } catch (URISyntaxException e) { System.err.println("Invalid configuration-id: " + args[i]); e.printStackTrace(); System.exit(1); throw new AssertionError(); } } if (configs.isEmpty()) { // nothing explicit, see what was running before Set configLists = kernelBridge.listGBeans(PERSISTENT_CONFIGURATION_LIST_NAME_QUERY); for (Iterator i = configLists.iterator(); i.hasNext();) { ObjectName configListName = (ObjectName) i.next(); try { configs.addAll((List) kernelBridge.invoke(configListName, "restore")); } catch (IOException e) { System.err.println("Unable to restore last known configurations"); e.printStackTrace(); kernel.shutdown(); System.exit(3); throw new AssertionError(); } } } // load the rest of the configurations try { ConfigurationManager configurationManager = ConfigurationUtil.getConfigurationManager(kernelBridge); for (Iterator i = configs.iterator(); i.hasNext();) { URI configID = (URI) i.next(); List list = configurationManager.loadRecursive(configID); for (Iterator iterator = list.iterator(); iterator.hasNext();) { ObjectName name = (ObjectName) iterator.next(); kernelBridge.startRecursiveGBean(name); } } } catch (Exception e) { System.err.println("Exception caught when starting configurations, starting kernel shutdown"); e.printStackTrace(); try { kernel.shutdown(); } catch (Exception e1) { System.err.println("Exception caught during kernel shutdown"); e1.printStackTrace(); } System.exit(3); throw new AssertionError(); } // Tell every persistent configuration list that the kernel is now fully started Set configLists = kernel.listServices(PERSISTENT_CONFIGURATION_LIST_NAME_QUERY); for (Iterator i = configLists.iterator(); i.hasNext();) { ObjectName configListName = (ObjectName) i.next(); kernelBridge.setAttribute(configListName, "kernelFullyStarted", Boolean.TRUE); } Set allServices = kernel.listServices(ServiceName.createName("*:*")); for (Iterator iterator = allServices.iterator(); iterator.hasNext();) { ObjectName objectName = (ObjectName) iterator.next(); int state = kernel.getServiceState(objectName); if (state != ServiceState.RUNNING_INDEX) { log.info("Service " + objectName + " is not running. Current state: " + ServiceState.fromIndex(state).getName()); } } log.info("Server startup completed"); // capture this thread until the kernel is ready to exit while (kernelBridge.isRunning()) { try { synchronized (kernelBridge) { kernelBridge.wait(); } } catch (InterruptedException e) { // continue } } } catch (Exception e) { e.printStackTrace(); System.exit(3); throw new AssertionError(); } } | 52533 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52533/6a661ce4fbc3261ed4b3a744b1e1919df53cbbf7/Daemon.java/buggy/kernel/src/java/org/gbean/geronimo/Daemon.java |
||
while (o instanceof Macro) | while (o instanceof Macro && o != UndefinedMacro.getInstance()) | public Object evaluate (Context context) throws PropertyException { Object o = _object; // evaluate the _object reference down to its base object while (o instanceof Macro) o = ((Macro) o).evaluate(context); if (o == null) { // the Variable to check isn't in the Context. if (_required) { // but it should be throw new PropertyException .NoSuchVariableException(_object.getName()); } else { // but it's not required to be there, so get out now // can't check the type of a null object return null; } } // check it and throw if requried class isn't compatible // with class of specified object if (!_class.isAssignableFrom(o.getClass())) throw new PropertyException.InvalidTypeException(_object.getName(), _class); return null; } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/5551b1eeb5a1072aee091b3feb6697a1c6d3ef11/TypeDirective.java/clean/webmacro/src/org/webmacro/directive/TypeDirective.java |
if (o == null) | if (o == null || o == UndefinedMacro.getInstance()) | public Object evaluate (Context context) throws PropertyException { Object o = _object; // evaluate the _object reference down to its base object while (o instanceof Macro) o = ((Macro) o).evaluate(context); if (o == null) { // the Variable to check isn't in the Context. if (_required) { // but it should be throw new PropertyException .NoSuchVariableException(_object.getName()); } else { // but it's not required to be there, so get out now // can't check the type of a null object return null; } } // check it and throw if requried class isn't compatible // with class of specified object if (!_class.isAssignableFrom(o.getClass())) throw new PropertyException.InvalidTypeException(_object.getName(), _class); return null; } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/5551b1eeb5a1072aee091b3feb6697a1c6d3ef11/TypeDirective.java/clean/webmacro/src/org/webmacro/directive/TypeDirective.java |
case M_HASH: return hash(); | public RubyObject callIndexed(int index, RubyObject[] args) { switch (index) { case M_CLONE: return rbClone(); case M_DUP: return dup(); case M_OP_CMP: return op_cmp(args[0]); case M_EQUAL: return equal(args[0]); case M_OP_PLUS: return op_plus(args[0]); case M_FORMAT: return format(args[0]); case M_LENGTH: return length(); case M_EMPTY: return empty(); case M_MATCH: return match(args[0]); case M_MATCH2: return match2(); case M_SUCC: return succ(); case M_SUCC_BANG: return succ_bang(); case M_UPTO: return upto(args[0]); case M_REPLACE: return replace(args[0]); case M_TO_I: return to_i(); case M_TO_F: return to_f(); case M_INSPECT: return inspect(); case M_CONCAT: return concat(args[0]); case M_INTERN: return intern(); } Asserts.assertNotReached(); return null; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/7f0907240b4b4a4379424377e971ed0ca23f1dcb/RubyString.java/buggy/org/jruby/RubyString.java |
|
stringClass.defineMethod("hash", IndexedCallback.create(M_HASH, 0)); | public static RubyClass createStringClass(Ruby ruby) { RubyClass stringClass = ruby.defineClass("String", ruby.getClasses().getObjectClass()); stringClass.includeModule(ruby.getClasses().getComparableModule()); stringClass.includeModule(ruby.getClasses().getEnumerableModule()); stringClass.defineSingletonMethod("new", CallbackFactory.getOptSingletonMethod(RubyString.class, "newInstance")); stringClass.defineMethod("initialize", IndexedCallback.create(M_REPLACE, 1)); stringClass.defineMethod("clone", IndexedCallback.create(M_CLONE, 0)); stringClass.defineMethod("dup", IndexedCallback.create(M_DUP, 0)); stringClass.defineMethod("<=>", IndexedCallback.create(M_OP_CMP, 1)); stringClass.defineMethod("==", IndexedCallback.create(M_EQUAL, 1)); stringClass.defineMethod("===", IndexedCallback.create(M_EQUAL, 1)); stringClass.defineMethod("eql?", IndexedCallback.create(M_EQUAL, 1)); stringClass.defineMethod("+", IndexedCallback.create(M_OP_PLUS, 1)); stringClass.defineMethod("*", CallbackFactory.getMethod(RubyString.class, "op_mul", RubyInteger.class)); stringClass.defineMethod("%", IndexedCallback.create(M_FORMAT, 1)); stringClass.defineMethod("[]", CallbackFactory.getOptMethod(RubyString.class, "aref")); stringClass.defineMethod("[]=", CallbackFactory.getOptMethod(RubyString.class, "aset")); stringClass.defineMethod("length", IndexedCallback.create(M_LENGTH, 0)); stringClass.defineMethod("size", IndexedCallback.create(M_LENGTH, 0)); stringClass.defineMethod("empty?", IndexedCallback.create(M_EMPTY, 0)); stringClass.defineMethod("=~", IndexedCallback.create(M_MATCH, 1)); stringClass.defineMethod("~", IndexedCallback.create(M_MATCH2, 0)); stringClass.defineMethod("succ", IndexedCallback.create(M_SUCC, 0)); stringClass.defineMethod("succ!", IndexedCallback.create(M_SUCC_BANG, 0)); stringClass.defineMethod("next", IndexedCallback.create(M_SUCC, 0)); stringClass.defineMethod("next!", IndexedCallback.create(M_SUCC_BANG, 0)); stringClass.defineMethod("upto", IndexedCallback.create(M_UPTO, 1)); stringClass.defineMethod("index", CallbackFactory.getOptMethod(RubyString.class, "index")); stringClass.defineMethod("rindex", CallbackFactory.getOptMethod(RubyString.class, "rindex")); stringClass.defineMethod("replace", IndexedCallback.create(M_REPLACE, 1)); stringClass.defineMethod("to_i", IndexedCallback.create(M_TO_I, 0)); stringClass.defineMethod("to_f", IndexedCallback.create(M_TO_F, 0)); stringClass.defineMethod("to_s", CallbackFactory.getSelfMethod(0)); stringClass.defineMethod("to_str", CallbackFactory.getSelfMethod(0)); stringClass.defineMethod("inspect", IndexedCallback.create(M_INSPECT, 0)); stringClass.defineMethod("dump", CallbackFactory.getMethod(RubyString.class, "dump")); stringClass.defineMethod("upcase", CallbackFactory.getMethod(RubyString.class, "upcase")); stringClass.defineMethod("downcase", CallbackFactory.getMethod(RubyString.class, "downcase")); stringClass.defineMethod("capitalize", CallbackFactory.getMethod(RubyString.class, "capitalize")); stringClass.defineMethod("swapcase", CallbackFactory.getMethod(RubyString.class, "swapcase")); stringClass.defineMethod("upcase!", CallbackFactory.getMethod(RubyString.class, "upcase_bang")); stringClass.defineMethod("downcase!", CallbackFactory.getMethod(RubyString.class, "downcase_bang")); stringClass.defineMethod("capitalize!", CallbackFactory.getMethod(RubyString.class, "capitalize_bang")); stringClass.defineMethod("swapcase!", CallbackFactory.getMethod(RubyString.class, "swapcase_bang")); stringClass.defineMethod("hex", CallbackFactory.getMethod(RubyString.class, "hex")); stringClass.defineMethod("oct", CallbackFactory.getMethod(RubyString.class, "oct")); stringClass.defineMethod("split", CallbackFactory.getOptMethod(RubyString.class, "split")); stringClass.defineMethod("reverse", CallbackFactory.getMethod(RubyString.class, "reverse")); stringClass.defineMethod("reverse!", CallbackFactory.getMethod(RubyString.class, "reverse_bang")); stringClass.defineMethod("concat", IndexedCallback.create(M_CONCAT, 1)); stringClass.defineMethod("<<", IndexedCallback.create(M_CONCAT, 1)); // rb_define_method(rb_cString, "crypt", rb_str_crypt, 1); stringClass.defineMethod("intern", IndexedCallback.create(M_INTERN, 0)); stringClass.defineMethod("include?", CallbackFactory.getMethod(RubyString.class, "include", RubyObject.class)); stringClass.defineMethod("scan", CallbackFactory.getMethod(RubyString.class, "scan", RubyObject.class)); stringClass.defineMethod("ljust", CallbackFactory.getMethod(RubyString.class, "ljust", RubyObject.class)); stringClass.defineMethod("rjust", CallbackFactory.getMethod(RubyString.class, "rjust", RubyObject.class)); stringClass.defineMethod("center", CallbackFactory.getMethod(RubyString.class, "center", RubyObject.class)); stringClass.defineMethod("sub", CallbackFactory.getOptMethod(RubyString.class, "sub")); stringClass.defineMethod("gsub", CallbackFactory.getOptMethod(RubyString.class, "gsub")); stringClass.defineMethod("chop", CallbackFactory.getMethod(RubyString.class, "chop")); stringClass.defineMethod("chomp", CallbackFactory.getOptMethod(RubyString.class, "chomp")); stringClass.defineMethod("strip", CallbackFactory.getMethod(RubyString.class, "strip")); stringClass.defineMethod("sub!", CallbackFactory.getOptMethod(RubyString.class, "sub_bang")); stringClass.defineMethod("gsub!", CallbackFactory.getOptMethod(RubyString.class, "gsub_bang")); stringClass.defineMethod("chop!", CallbackFactory.getMethod(RubyString.class, "chop_bang")); stringClass.defineMethod("chomp!", CallbackFactory.getOptMethod(RubyString.class, "chomp_bang")); stringClass.defineMethod("strip!", CallbackFactory.getMethod(RubyString.class, "strip_bang")); stringClass.defineMethod("tr", CallbackFactory.getOptMethod(RubyString.class, "tr")); stringClass.defineMethod("tr_s", CallbackFactory.getOptMethod(RubyString.class, "tr_s")); stringClass.defineMethod("delete", CallbackFactory.getOptMethod(RubyString.class, "delete")); stringClass.defineMethod("squeeze", CallbackFactory.getOptMethod(RubyString.class, "squeeze")); stringClass.defineMethod("count", CallbackFactory.getOptMethod(RubyString.class, "count")); stringClass.defineMethod("tr!", CallbackFactory.getOptMethod(RubyString.class, "tr_bang")); stringClass.defineMethod("tr_s!", CallbackFactory.getOptMethod(RubyString.class, "tr_s_bang")); stringClass.defineMethod("delete!", CallbackFactory.getOptMethod(RubyString.class, "delete_bang")); stringClass.defineMethod("squeeze!", CallbackFactory.getOptMethod(RubyString.class, "squeeze_bang")); stringClass.defineMethod("each_line", CallbackFactory.getOptMethod(RubyString.class, "each_line")); stringClass.defineMethod("each", CallbackFactory.getOptMethod(RubyString.class, "each_line")); stringClass.defineMethod("each_byte", CallbackFactory.getMethod(RubyString.class, "each_byte")); // rb_define_method(rb_cString, "sum", rb_str_sum, -1); stringClass.defineMethod("slice", CallbackFactory.getOptMethod(RubyString.class, "aref")); stringClass.defineMethod("slice!", CallbackFactory.getOptMethod(RubyString.class, "slice_bang")); // id_to_s = rb_intern("to_s"); // rb_fs = Qnil; // rb_define_hooked_variable("$;", &rb_fs, 0, rb_str_setter); // rb_define_hooked_variable("$-F", &rb_fs, 0, rb_str_setter); stringClass.defineMethod("unpack", CallbackFactory.getMethod(RubyString.class, "unpack", RubyString.class)); return stringClass; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/7f0907240b4b4a4379424377e971ed0ca23f1dcb/RubyString.java/buggy/org/jruby/RubyString.java |
|
Connection conn, String sql, int maxRows) throws SQLException | Connection conn, String sql) throws SQLException | public static ResultSetDataTable create( Connection conn, String sql, int maxRows) throws SQLException { return create(conn, sql, maxRows, 0); } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/5729b41ccfce450fabc642c0d322460672dd0ddb/ResultSetDataTable.java/buggy/contrib/DataTable/org/webmacro/datatable/ResultSetDataTable.java |
return create(conn, sql, maxRows, 0); | return create(conn, sql, DEFAULT_MAX_ROWS, 0); | public static ResultSetDataTable create( Connection conn, String sql, int maxRows) throws SQLException { return create(conn, sql, maxRows, 0); } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/5729b41ccfce450fabc642c0d322460672dd0ddb/ResultSetDataTable.java/buggy/contrib/DataTable/org/webmacro/datatable/ResultSetDataTable.java |
delegate.parseCustomElement(root, false); | try { try { Method m = BeanDefinitionParserDelegate.class.getMethod("parseCustomElement", new Class[] { Element.class }); m.invoke(delegate, new Object[] { root }); } catch (NoSuchMethodException e) { try { Method m = BeanDefinitionParserDelegate.class.getMethod("parseCustomElement", new Class[] { Element.class, boolean.class }); m.invoke(delegate, new Object[] { root, Boolean.FALSE }); } catch (NoSuchMethodException e2) { throw new IllegalStateException(e); } } } catch (IllegalAccessException e) { throw new RuntimeException(e); } catch (IllegalArgumentException e) { throw new RuntimeException(e); } catch (InvocationTargetException e) { if (e.getCause() instanceof RuntimeException) { throw (RuntimeException) e.getCause(); } throw new RuntimeException(e); } | protected void parseBeanDefinitions(Element root, BeanDefinitionParserDelegate delegate) { String namespaceUri = root.getNamespaceURI(); if (!DomUtils.nodeNameEquals(root, "beans") && !delegate.isDefaultNamespace(namespaceUri)) { delegate.parseCustomElement(root, false); } else { super.parseBeanDefinitions(root, delegate); } } | 52533 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52533/229fabc3f6789bc24d41b0cf252788ec82e9d725/XBeanBeanDefinitionDocumentReader.java/clean/xbean-spring-v2/src/main/java/org/apache/xbean/spring/context/v2/XBeanBeanDefinitionDocumentReader.java |
e.getCamera().addChild(semanticNode); | PCamera camera = e.getCamera(); for(int i=0; i<camera.getChildrenCount();i++) { Object child = camera.getChild(i); if(child instanceof SemanticZoomNode) { camera.removeChild((SemanticZoomNode)child); i = camera.getChildrenCount(); } } camera.addChild(0,semanticNode); | public void execute(PInputEvent e) { if(e.getCamera().getViewScale() < 1) { Thumbnail t = (Thumbnail)e.getPickedNode(); Image image = t.getImage(); SemanticZoomNode semanticNode = new SemanticZoomNode(t); Point2D point = new Point2D.Double(t.getOffset().getX()+ t.getBounds().getCenter2D().getX(), t.getOffset().getY()+ t.getBounds().getCenter2D().getY()); Point2D dummyPoint = new Point2D.Double(point.getX(),point.getY()); Dimension2D size = t.getBounds().getSize(); Point2D viewPoint = e.getCamera().viewToLocal(dummyPoint); semanticNode.setOffset(viewPoint.getX()-size.getWidth()/2, viewPoint.getY()-size.getHeight()/2); e.getCamera().addChild(semanticNode); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/a1f87afb3571b02f52d0f463a29be7fc2083f1d4/PiccoloActions.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/events/PiccoloActions.java |
return Collections.EMPTY_LIST; | return EMPTY_LIST; | public List childNodes() { return Collections.EMPTY_LIST; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/b1293eda8454686e846e2a9837b348e2983bb423/SymbolNode.java/clean/src/org/jruby/ast/SymbolNode.java |
semanticLayer.nodeExited(); semanticLayer.hideSemanticNode(getCamera()); | private void init(BrowserTopModel topModel) { env = BrowserEnvironment.getInstance(); setBackground(new Color(192,192,192)); backgroundNode = new BackgroundNode(); foregroundNode = new ForegroundNode(); getLayer().addChild(backgroundNode); getLayer().addChild(foregroundNode); layoutMap = new HashMap(); footprint = new Rectangle2D.Double(0,0,0,0); hoverSensitive = new HashSet(); regionSensitive = new HashSet(); zoomParamListeners = new HashSet(); oldModeMap = new HashMap(); removeInputEventListener(getZoomEventHandler()); removeInputEventListener(getPanEventHandler()); // default panning mode (may replace this, but probably not) overlayCamera = new BrowserCamera(topModel,getCamera()); hoverSensitive.add(overlayCamera); regionSensitive.add(overlayCamera); browserViewListeners = new HashSet(); scaleToShow = true; addMouseListener(new MouseAdapter() { public void mouseEntered(MouseEvent me) { for(Iterator iter = hoverSensitive.iterator(); iter.hasNext();) { HoverSensitive hover = (HoverSensitive)iter.next(); hover.contextEntered(); } } public void mouseExited(MouseEvent me) { for(Iterator iter = hoverSensitive.iterator(); iter.hasNext();) { HoverSensitive hover = (HoverSensitive)iter.next(); hover.contextExited(); } } }); // OK, now, dispatch to the underlying nodes addInputEventListener(BrowserViewEventDispatcher.getDefaultMouseHandler()); addInputEventListener(BrowserViewEventDispatcher.getDefaultDragHandler()); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/0e4e3c4b5f21d2217fc02b1e6846dac6de60570f/BrowserView.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/ui/BrowserView.java |
|
semanticLayer.nodeExited(); semanticLayer.hideSemanticNode(getCamera()); | public void mouseExited(MouseEvent me) { for(Iterator iter = hoverSensitive.iterator(); iter.hasNext();) { HoverSensitive hover = (HoverSensitive)iter.next(); hover.contextExited(); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/0e4e3c4b5f21d2217fc02b1e6846dac6de60570f/BrowserView.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/ui/BrowserView.java |
|
PiccoloActionFactory.getSemanticEnterAction(this,semanticLayer); | PiccoloActionFactory.getSemanticEnterAction(browserModel, this,semanticLayer); | private void initActions(BrowserModel targetModel) { // theoretically shouldn't happen if(targetModel == null) { return; } defaultTDownActions = new MouseDownActions(); defaultTOverActions = new MouseOverActions(); selectThumbnailAction = PiccoloActionFactory.getSelectThumbnailAction(targetModel); popupMenuAction = PiccoloActionFactory.getPopupMenuAction(targetModel); defaultTDownActions.setMouseClickAction(PiccoloModifiers.NORMAL, selectThumbnailAction); defaultTDownActions.setMouseDoubleClickAction(PiccoloModifiers.NORMAL, PiccoloActions.OPEN_IMAGE_ACTION); defaultTDownActions.setMouseClickAction(PiccoloModifiers.POPUP, popupMenuAction); semanticLayer = new HoverManager(this); semanticHoverThumbnailAction = PiccoloActionFactory.getSemanticEnterAction(this,semanticLayer); semanticExitThumbnailAction = PiccoloActionFactory.getOverlayExitAction(this,semanticLayer); hoverThumbnailAction = PiccoloActionFactory.getImageEnterAction(this); exitThumbnailAction = PiccoloActionFactory.getImageExitAction(this); defaultTOverActions.setMouseEnterAction(PiccoloModifiers.NORMAL, semanticHoverThumbnailAction); defaultTOverActions.setMouseExitAction(PiccoloModifiers.NORMAL, semanticExitThumbnailAction); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/0e4e3c4b5f21d2217fc02b1e6846dac6de60570f/BrowserView.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/ui/BrowserView.java |
PiccoloActionFactory.getSemanticEnterAction(this,semanticLayer); | PiccoloActionFactory.getSemanticEnterAction(browserModel, this,semanticLayer); | public void modeChanged(String className, BrowserMode mode) { // boooooo. if(className == null) { return; } else if(className.equals(BrowserModel.PAN_MODE_NAME)) { if(mode == BrowserMode.HAND_MODE) { // TODO: change drag listener here } else if(mode == BrowserMode.NO_HAND_MODE) { // TODO: change back. } } else if(className.equals(BrowserModel.MAJOR_UI_MODE_NAME)) { if(mode == BrowserMode.DEFAULT_MODE) { // TODO: fill this in } } else if(className.equals(BrowserModel.SELECT_MODE_NAME)) { if(mode == BrowserMode.SELECTING_MODE) { selectionInProgress = true; oldModeMap.put(BrowserModel.SEMANTIC_MODE_NAME, browserModel.getCurrentMode(BrowserModel.SEMANTIC_MODE_NAME)); browserModel.setCurrentMode(BrowserModel.SEMANTIC_MODE_NAME, BrowserMode.NOOP_MODE); repaint(); } else { selectionInProgress = false; browserModel.setCurrentMode(BrowserModel.SEMANTIC_MODE_NAME, (BrowserMode)oldModeMap.remove(BrowserModel.SEMANTIC_MODE_NAME)); repaint(); } } else if(className.equals(BrowserModel.ZOOM_MODE_NAME)) { if(mode == BrowserMode.ZOOM_TO_FIT_MODE) { setZoomToScale(true); } else if(mode == BrowserMode.ZOOM_ACTUAL_MODE) { setZoomToScale(false); setZoomLevel(1); } else if(mode == BrowserMode.ZOOM_50_MODE) { setZoomToScale(false); setZoomLevel(0.5); } else if(mode == BrowserMode.ZOOM_75_MODE) { setZoomToScale(false); setZoomLevel(0.75); } else if(mode == BrowserMode.ZOOM_200_MODE) { setZoomToScale(false); setZoomLevel(2); } } else if(className.equals(BrowserModel.SEMANTIC_MODE_NAME)) { if(mode == BrowserMode.NOOP_MODE) { defaultTOverActions.setMouseEnterAction(PiccoloModifiers.NORMAL, PiccoloAction.PNOOP_ACTION); defaultTOverActions.setMouseExitAction(PiccoloModifiers.NORMAL, PiccoloAction.PNOOP_ACTION); setThumbnailOverActions(defaultTOverActions); } if(mode == BrowserMode.IMAGE_NAME_MODE) { defaultTOverActions.setMouseEnterAction(PiccoloModifiers.NORMAL, hoverThumbnailAction); defaultTOverActions.setMouseExitAction(PiccoloModifiers.NORMAL, exitThumbnailAction); setThumbnailOverActions(defaultTOverActions); } else if(mode == BrowserMode.SEMANTIC_ZOOMING_MODE) { semanticHoverThumbnailAction = PiccoloActionFactory.getSemanticEnterAction(this,semanticLayer); defaultTOverActions.setMouseEnterAction(PiccoloModifiers.NORMAL, semanticHoverThumbnailAction); defaultTOverActions.setMouseExitAction(PiccoloModifiers.NORMAL, semanticExitThumbnailAction); setThumbnailOverActions(defaultTOverActions); } } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/0e4e3c4b5f21d2217fc02b1e6846dac6de60570f/BrowserView.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/ui/BrowserView.java |
System.err.println("repainting..."); | public void paintComponent(Graphics g) { Graphics2D g2 = (Graphics2D)g; // cheapo hack to prevent apparent delay in annotation loading if(firstTimeShown) { Font font = new Font(null,Font.PLAIN,10); AttributedString str = new AttributedString("hi"); g2.setFont(font); FontRenderContext frc = g2.getFontRenderContext(); LineBreakMeasurer measurer = new LineBreakMeasurer(str.getIterator(),frc); firstTimeShown = false; } g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR); super.paintComponent(g2); System.err.println("repainting..."); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/0e4e3c4b5f21d2217fc02b1e6846dac6de60570f/BrowserView.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/ui/BrowserView.java |
|
registerEditor("java.util.Date", "org.apache.xbean.spring.context.impl.DateEditor"); | public static void registerCustomEditors() { registerEditor("java.io.File", "org.apache.xbean.spring.context.impl.FileEditor"); registerEditor("java.net.URI", "org.apache.xbean.spring.context.impl.URIEditor"); registerEditor("javax.management.ObjectName", "org.apache.xbean.spring.context.impl.ObjectNameEditor"); } | 52533 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52533/9f35d4961058296b13ca19f649a5cf27df03d5e9/PropertyEditorHelper.java/buggy/xbean-spring-common/src/main/java/org/apache/xbean/spring/context/impl/PropertyEditorHelper.java |
|
if ((0x87ffe06000000000L & l) == 0L) | if ((0xa7ffe06000000000L & l) == 0L) | private final int jjMoveNfa_0(int startState, int curPos){ int[] nextStates; int startsAt = 0; jjnewStateCnt = 48; int i = 1; jjstateSet[0] = startState; int j, kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << curChar; MatchLoop: do { switch(jjstateSet[--i]) { case 10: case 9: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 15) kind = 15; jjCheckNAdd(9); break; case 7: if ((0xfc00ffffffffffffL & l) != 0L) { if (kind > 32) kind = 32; } else if ((0x3ff000000000000L & l) != 0L) jjCheckNAddStates(0, 3); if ((0x3ff000000000000L & l) != 0L) { if (kind > 23) kind = 23; jjCheckNAddStates(4, 8); } else if ((0x100000200L & l) != 0L) { if (kind > 27) kind = 27; } else if (curChar == 13) jjAddStates(9, 10); else if (curChar == 10) { if (kind > 25) kind = 25; jjCheckNAddTwoStates(42, 44); } if (curChar == 32) jjstateSet[jjnewStateCnt++] = 14; break; case 49: case 1: jjCheckNAddStates(11, 13); break; case 48: jjCheckNAddStates(11, 13); break; case 3: jjCheckNAddStates(14, 16); break; case 6: jjCheckNAddStates(17, 20); break; case 11: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 16) kind = 16; jjstateSet[jjnewStateCnt++] = 11; break; case 13: if (curChar == 32) jjstateSet[jjnewStateCnt++] = 14; break; case 14: if (curChar == 32 && kind > 26) kind = 26; break; case 15: if ((0x100000200L & l) != 0L && kind > 27) kind = 27; break; case 16: if ((0xfc00ffffffffffffL & l) != 0L && kind > 32) kind = 32; break; case 17: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 23) kind = 23; jjCheckNAddStates(4, 8); break; case 18: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(18, 19); break; case 20: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(20, 21); break; case 21: if (curChar == 46) jjstateSet[jjnewStateCnt++] = 22; break; case 22: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 19) kind = 19; jjCheckNAdd(23); break; case 23: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 19) kind = 19; jjCheckNAddStates(21, 23); break; case 24: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(24, 25); break; case 25: if (curChar == 58) jjstateSet[jjnewStateCnt++] = 26; break; case 26: if ((0x87ffe06000000000L & l) == 0L) break; if (kind > 20) kind = 20; jjCheckNAddStates(24, 26); break; case 27: if ((0x87ffe06000000000L & l) == 0L) break; if (kind > 20) kind = 20; jjCheckNAdd(27); break; case 28: if ((0x87ffe06000000000L & l) != 0L) jjCheckNAddTwoStates(28, 29); break; case 29: if (curChar == 40) jjCheckNAdd(30); break; case 30: if ((0xfffffdffffffdbffL & l) != 0L) jjCheckNAddTwoStates(30, 31); break; case 31: if (curChar == 41 && kind > 20) kind = 20; break; case 32: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 23) kind = 23; jjCheckNAdd(32); break; case 33: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddStates(0, 3); break; case 34: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(34, 35); break; case 35: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 21) kind = 21; jjCheckNAddTwoStates(35, 36); break; case 36: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 21) kind = 21; jjCheckNAddStates(27, 29); break; case 37: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(37, 38); break; case 38: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddStates(30, 32); break; case 40: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddStates(33, 36); break; case 41: if (curChar != 10) break; if (kind > 25) kind = 25; jjCheckNAddTwoStates(42, 44); break; case 42: case 43: if (curChar == 10 && kind > 24) kind = 24; break; case 44: if (curChar == 13) jjstateSet[jjnewStateCnt++] = 43; break; case 45: if (curChar == 13) jjAddStates(9, 10); break; case 46: if (curChar == 10) jjCheckNAddTwoStates(42, 44); break; case 47: if (curChar == 10 && kind > 25) kind = 25; break; default : break; } } while(i != startsAt); } else if (curChar < 128) { long l = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 10: if ((0x7fffffe07fffffeL & l) != 0L) { if (kind > 15) kind = 15; jjCheckNAdd(9); } else if (curChar == 64) { if (kind > 16) kind = 16; jjCheckNAdd(11); } break; case 7: if ((0x7fffffe07fffffeL & l) != 0L) { if (kind > 23) kind = 23; jjCheckNAddStates(4, 8); } else if ((0xf8000001f8000001L & l) != 0L) { if (kind > 32) kind = 32; } if ((0x7fffffeL & l) != 0L) jjCheckNAddStates(0, 3); else if (curChar == 94) jjstateSet[jjnewStateCnt++] = 10; else if (curChar == 91) jjstateSet[jjnewStateCnt++] = 0; if (curChar == 94) jjCheckNAdd(9); break; case 49: if ((0xffffffffdfffffffL & l) != 0L) jjCheckNAddStates(11, 13); else if (curChar == 93) jjstateSet[jjnewStateCnt++] = 4; if (curChar == 93) jjstateSet[jjnewStateCnt++] = 3; break; case 48: if ((0xffffffffdfffffffL & l) != 0L) jjCheckNAddStates(11, 13); else if (curChar == 93) jjstateSet[jjnewStateCnt++] = 3; break; case 0: if (curChar == 91) jjCheckNAddTwoStates(1, 2); break; case 1: if ((0xffffffffdfffffffL & l) != 0L) jjCheckNAddStates(11, 13); break; case 2: if (curChar == 93) jjstateSet[jjnewStateCnt++] = 3; break; case 3: if ((0xffffffffdfffffffL & l) != 0L) jjCheckNAddStates(14, 16); break; case 4: if (curChar == 93 && kind > 9) kind = 9; break; case 5: if (curChar == 93) jjstateSet[jjnewStateCnt++] = 4; break; case 6: if ((0xffffffffdfffffffL & l) != 0L) jjCheckNAddStates(17, 20); break; case 8: if (curChar == 94) jjCheckNAdd(9); break; case 9: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 15) kind = 15; jjCheckNAdd(9); break; case 11: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 16) kind = 16; jjCheckNAdd(11); break; case 12: if (curChar == 94) jjstateSet[jjnewStateCnt++] = 10; break; case 16: if ((0xf8000001f8000001L & l) != 0L && kind > 32) kind = 32; break; case 17: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 23) kind = 23; jjCheckNAddStates(4, 8); break; case 18: if ((0x7fffffe07fffffeL & l) != 0L) jjCheckNAddTwoStates(18, 19); break; case 19: if (curChar == 64) jjCheckNAdd(20); break; case 20: if ((0x7fffffe07fffffeL & l) != 0L) jjCheckNAddTwoStates(20, 21); break; case 22: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 19) kind = 19; jjCheckNAdd(23); break; case 23: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 19) kind = 19; jjCheckNAddStates(21, 23); break; case 24: if ((0x7fffffe07fffffeL & l) != 0L) jjCheckNAddTwoStates(24, 25); break; case 26: if ((0x47fffffe87ffffffL & l) == 0L) break; if (kind > 20) kind = 20; jjCheckNAddStates(24, 26); break; case 27: if ((0x47fffffe87ffffffL & l) == 0L) break; if (kind > 20) kind = 20; jjCheckNAdd(27); break; case 28: if ((0x47fffffe87ffffffL & l) != 0L) jjCheckNAddTwoStates(28, 29); break; case 30: jjAddStates(37, 38); break; case 32: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 23) kind = 23; jjCheckNAdd(32); break; case 33: if ((0x7fffffeL & l) != 0L) jjCheckNAddStates(0, 3); break; case 34: if ((0x7fffffeL & l) != 0L) jjCheckNAddTwoStates(34, 35); break; case 35: if ((0x7fffffe00000000L & l) == 0L) break; if (kind > 21) kind = 21; jjCheckNAddTwoStates(35, 36); break; case 36: if ((0x7fffffeL & l) == 0L) break; if (kind > 21) kind = 21; jjCheckNAddStates(27, 29); break; case 37: if ((0x7fffffeL & l) != 0L) jjCheckNAddTwoStates(37, 38); break; case 38: if ((0x7fffffe00000000L & l) != 0L) jjCheckNAddStates(30, 32); break; case 39: if (curChar == 96 && kind > 22) kind = 22; break; case 40: if ((0x7fffffeL & l) != 0L) jjCheckNAddStates(33, 36); break; default : break; } } while(i != startsAt); } else { int i2 = (curChar & 0xff) >> 6; long l2 = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 7: if ((jjbitVec0[i2] & l2) != 0L && kind > 32) kind = 32; break; case 49: case 1: if ((jjbitVec0[i2] & l2) != 0L) jjCheckNAddStates(11, 13); break; case 48: if ((jjbitVec0[i2] & l2) != 0L) jjCheckNAddStates(11, 13); break; case 3: if ((jjbitVec0[i2] & l2) != 0L) jjCheckNAddStates(14, 16); break; case 6: if ((jjbitVec0[i2] & l2) != 0L) jjCheckNAddStates(17, 20); break; case 30: if ((jjbitVec0[i2] & l2) != 0L) jjAddStates(37, 38); break; default : break; } } while(i != startsAt); } if (kind != 0x7fffffff) { jjmatchedKind = kind; jjmatchedPos = curPos; kind = 0x7fffffff; } ++curPos; if ((i = jjnewStateCnt) == (startsAt = 48 - (jjnewStateCnt = startsAt))) return curPos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return curPos; } }} | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/d78b2ad470cfc8d62a44e3115f3d7ec7fd49b132/WikiParserTokenManager.java/buggy/wiki/src/org/tcdi/opensource/wiki/parser/WikiParserTokenManager.java |
if ((0x87ffe06000000000L & l) == 0L) | if ((0xa7ffe06000000000L & l) == 0L) | private final int jjMoveNfa_0(int startState, int curPos){ int[] nextStates; int startsAt = 0; jjnewStateCnt = 48; int i = 1; jjstateSet[0] = startState; int j, kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << curChar; MatchLoop: do { switch(jjstateSet[--i]) { case 10: case 9: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 15) kind = 15; jjCheckNAdd(9); break; case 7: if ((0xfc00ffffffffffffL & l) != 0L) { if (kind > 32) kind = 32; } else if ((0x3ff000000000000L & l) != 0L) jjCheckNAddStates(0, 3); if ((0x3ff000000000000L & l) != 0L) { if (kind > 23) kind = 23; jjCheckNAddStates(4, 8); } else if ((0x100000200L & l) != 0L) { if (kind > 27) kind = 27; } else if (curChar == 13) jjAddStates(9, 10); else if (curChar == 10) { if (kind > 25) kind = 25; jjCheckNAddTwoStates(42, 44); } if (curChar == 32) jjstateSet[jjnewStateCnt++] = 14; break; case 49: case 1: jjCheckNAddStates(11, 13); break; case 48: jjCheckNAddStates(11, 13); break; case 3: jjCheckNAddStates(14, 16); break; case 6: jjCheckNAddStates(17, 20); break; case 11: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 16) kind = 16; jjstateSet[jjnewStateCnt++] = 11; break; case 13: if (curChar == 32) jjstateSet[jjnewStateCnt++] = 14; break; case 14: if (curChar == 32 && kind > 26) kind = 26; break; case 15: if ((0x100000200L & l) != 0L && kind > 27) kind = 27; break; case 16: if ((0xfc00ffffffffffffL & l) != 0L && kind > 32) kind = 32; break; case 17: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 23) kind = 23; jjCheckNAddStates(4, 8); break; case 18: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(18, 19); break; case 20: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(20, 21); break; case 21: if (curChar == 46) jjstateSet[jjnewStateCnt++] = 22; break; case 22: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 19) kind = 19; jjCheckNAdd(23); break; case 23: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 19) kind = 19; jjCheckNAddStates(21, 23); break; case 24: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(24, 25); break; case 25: if (curChar == 58) jjstateSet[jjnewStateCnt++] = 26; break; case 26: if ((0x87ffe06000000000L & l) == 0L) break; if (kind > 20) kind = 20; jjCheckNAddStates(24, 26); break; case 27: if ((0x87ffe06000000000L & l) == 0L) break; if (kind > 20) kind = 20; jjCheckNAdd(27); break; case 28: if ((0x87ffe06000000000L & l) != 0L) jjCheckNAddTwoStates(28, 29); break; case 29: if (curChar == 40) jjCheckNAdd(30); break; case 30: if ((0xfffffdffffffdbffL & l) != 0L) jjCheckNAddTwoStates(30, 31); break; case 31: if (curChar == 41 && kind > 20) kind = 20; break; case 32: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 23) kind = 23; jjCheckNAdd(32); break; case 33: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddStates(0, 3); break; case 34: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(34, 35); break; case 35: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 21) kind = 21; jjCheckNAddTwoStates(35, 36); break; case 36: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 21) kind = 21; jjCheckNAddStates(27, 29); break; case 37: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(37, 38); break; case 38: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddStates(30, 32); break; case 40: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddStates(33, 36); break; case 41: if (curChar != 10) break; if (kind > 25) kind = 25; jjCheckNAddTwoStates(42, 44); break; case 42: case 43: if (curChar == 10 && kind > 24) kind = 24; break; case 44: if (curChar == 13) jjstateSet[jjnewStateCnt++] = 43; break; case 45: if (curChar == 13) jjAddStates(9, 10); break; case 46: if (curChar == 10) jjCheckNAddTwoStates(42, 44); break; case 47: if (curChar == 10 && kind > 25) kind = 25; break; default : break; } } while(i != startsAt); } else if (curChar < 128) { long l = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 10: if ((0x7fffffe07fffffeL & l) != 0L) { if (kind > 15) kind = 15; jjCheckNAdd(9); } else if (curChar == 64) { if (kind > 16) kind = 16; jjCheckNAdd(11); } break; case 7: if ((0x7fffffe07fffffeL & l) != 0L) { if (kind > 23) kind = 23; jjCheckNAddStates(4, 8); } else if ((0xf8000001f8000001L & l) != 0L) { if (kind > 32) kind = 32; } if ((0x7fffffeL & l) != 0L) jjCheckNAddStates(0, 3); else if (curChar == 94) jjstateSet[jjnewStateCnt++] = 10; else if (curChar == 91) jjstateSet[jjnewStateCnt++] = 0; if (curChar == 94) jjCheckNAdd(9); break; case 49: if ((0xffffffffdfffffffL & l) != 0L) jjCheckNAddStates(11, 13); else if (curChar == 93) jjstateSet[jjnewStateCnt++] = 4; if (curChar == 93) jjstateSet[jjnewStateCnt++] = 3; break; case 48: if ((0xffffffffdfffffffL & l) != 0L) jjCheckNAddStates(11, 13); else if (curChar == 93) jjstateSet[jjnewStateCnt++] = 3; break; case 0: if (curChar == 91) jjCheckNAddTwoStates(1, 2); break; case 1: if ((0xffffffffdfffffffL & l) != 0L) jjCheckNAddStates(11, 13); break; case 2: if (curChar == 93) jjstateSet[jjnewStateCnt++] = 3; break; case 3: if ((0xffffffffdfffffffL & l) != 0L) jjCheckNAddStates(14, 16); break; case 4: if (curChar == 93 && kind > 9) kind = 9; break; case 5: if (curChar == 93) jjstateSet[jjnewStateCnt++] = 4; break; case 6: if ((0xffffffffdfffffffL & l) != 0L) jjCheckNAddStates(17, 20); break; case 8: if (curChar == 94) jjCheckNAdd(9); break; case 9: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 15) kind = 15; jjCheckNAdd(9); break; case 11: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 16) kind = 16; jjCheckNAdd(11); break; case 12: if (curChar == 94) jjstateSet[jjnewStateCnt++] = 10; break; case 16: if ((0xf8000001f8000001L & l) != 0L && kind > 32) kind = 32; break; case 17: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 23) kind = 23; jjCheckNAddStates(4, 8); break; case 18: if ((0x7fffffe07fffffeL & l) != 0L) jjCheckNAddTwoStates(18, 19); break; case 19: if (curChar == 64) jjCheckNAdd(20); break; case 20: if ((0x7fffffe07fffffeL & l) != 0L) jjCheckNAddTwoStates(20, 21); break; case 22: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 19) kind = 19; jjCheckNAdd(23); break; case 23: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 19) kind = 19; jjCheckNAddStates(21, 23); break; case 24: if ((0x7fffffe07fffffeL & l) != 0L) jjCheckNAddTwoStates(24, 25); break; case 26: if ((0x47fffffe87ffffffL & l) == 0L) break; if (kind > 20) kind = 20; jjCheckNAddStates(24, 26); break; case 27: if ((0x47fffffe87ffffffL & l) == 0L) break; if (kind > 20) kind = 20; jjCheckNAdd(27); break; case 28: if ((0x47fffffe87ffffffL & l) != 0L) jjCheckNAddTwoStates(28, 29); break; case 30: jjAddStates(37, 38); break; case 32: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 23) kind = 23; jjCheckNAdd(32); break; case 33: if ((0x7fffffeL & l) != 0L) jjCheckNAddStates(0, 3); break; case 34: if ((0x7fffffeL & l) != 0L) jjCheckNAddTwoStates(34, 35); break; case 35: if ((0x7fffffe00000000L & l) == 0L) break; if (kind > 21) kind = 21; jjCheckNAddTwoStates(35, 36); break; case 36: if ((0x7fffffeL & l) == 0L) break; if (kind > 21) kind = 21; jjCheckNAddStates(27, 29); break; case 37: if ((0x7fffffeL & l) != 0L) jjCheckNAddTwoStates(37, 38); break; case 38: if ((0x7fffffe00000000L & l) != 0L) jjCheckNAddStates(30, 32); break; case 39: if (curChar == 96 && kind > 22) kind = 22; break; case 40: if ((0x7fffffeL & l) != 0L) jjCheckNAddStates(33, 36); break; default : break; } } while(i != startsAt); } else { int i2 = (curChar & 0xff) >> 6; long l2 = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 7: if ((jjbitVec0[i2] & l2) != 0L && kind > 32) kind = 32; break; case 49: case 1: if ((jjbitVec0[i2] & l2) != 0L) jjCheckNAddStates(11, 13); break; case 48: if ((jjbitVec0[i2] & l2) != 0L) jjCheckNAddStates(11, 13); break; case 3: if ((jjbitVec0[i2] & l2) != 0L) jjCheckNAddStates(14, 16); break; case 6: if ((jjbitVec0[i2] & l2) != 0L) jjCheckNAddStates(17, 20); break; case 30: if ((jjbitVec0[i2] & l2) != 0L) jjAddStates(37, 38); break; default : break; } } while(i != startsAt); } if (kind != 0x7fffffff) { jjmatchedKind = kind; jjmatchedPos = curPos; kind = 0x7fffffff; } ++curPos; if ((i = jjnewStateCnt) == (startsAt = 48 - (jjnewStateCnt = startsAt))) return curPos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return curPos; } }} | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/d78b2ad470cfc8d62a44e3115f3d7ec7fd49b132/WikiParserTokenManager.java/buggy/wiki/src/org/tcdi/opensource/wiki/parser/WikiParserTokenManager.java |
if ((0x87ffe06000000000L & l) != 0L) | if ((0xa7ffe06000000000L & l) != 0L) | private final int jjMoveNfa_0(int startState, int curPos){ int[] nextStates; int startsAt = 0; jjnewStateCnt = 48; int i = 1; jjstateSet[0] = startState; int j, kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << curChar; MatchLoop: do { switch(jjstateSet[--i]) { case 10: case 9: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 15) kind = 15; jjCheckNAdd(9); break; case 7: if ((0xfc00ffffffffffffL & l) != 0L) { if (kind > 32) kind = 32; } else if ((0x3ff000000000000L & l) != 0L) jjCheckNAddStates(0, 3); if ((0x3ff000000000000L & l) != 0L) { if (kind > 23) kind = 23; jjCheckNAddStates(4, 8); } else if ((0x100000200L & l) != 0L) { if (kind > 27) kind = 27; } else if (curChar == 13) jjAddStates(9, 10); else if (curChar == 10) { if (kind > 25) kind = 25; jjCheckNAddTwoStates(42, 44); } if (curChar == 32) jjstateSet[jjnewStateCnt++] = 14; break; case 49: case 1: jjCheckNAddStates(11, 13); break; case 48: jjCheckNAddStates(11, 13); break; case 3: jjCheckNAddStates(14, 16); break; case 6: jjCheckNAddStates(17, 20); break; case 11: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 16) kind = 16; jjstateSet[jjnewStateCnt++] = 11; break; case 13: if (curChar == 32) jjstateSet[jjnewStateCnt++] = 14; break; case 14: if (curChar == 32 && kind > 26) kind = 26; break; case 15: if ((0x100000200L & l) != 0L && kind > 27) kind = 27; break; case 16: if ((0xfc00ffffffffffffL & l) != 0L && kind > 32) kind = 32; break; case 17: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 23) kind = 23; jjCheckNAddStates(4, 8); break; case 18: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(18, 19); break; case 20: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(20, 21); break; case 21: if (curChar == 46) jjstateSet[jjnewStateCnt++] = 22; break; case 22: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 19) kind = 19; jjCheckNAdd(23); break; case 23: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 19) kind = 19; jjCheckNAddStates(21, 23); break; case 24: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(24, 25); break; case 25: if (curChar == 58) jjstateSet[jjnewStateCnt++] = 26; break; case 26: if ((0x87ffe06000000000L & l) == 0L) break; if (kind > 20) kind = 20; jjCheckNAddStates(24, 26); break; case 27: if ((0x87ffe06000000000L & l) == 0L) break; if (kind > 20) kind = 20; jjCheckNAdd(27); break; case 28: if ((0x87ffe06000000000L & l) != 0L) jjCheckNAddTwoStates(28, 29); break; case 29: if (curChar == 40) jjCheckNAdd(30); break; case 30: if ((0xfffffdffffffdbffL & l) != 0L) jjCheckNAddTwoStates(30, 31); break; case 31: if (curChar == 41 && kind > 20) kind = 20; break; case 32: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 23) kind = 23; jjCheckNAdd(32); break; case 33: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddStates(0, 3); break; case 34: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(34, 35); break; case 35: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 21) kind = 21; jjCheckNAddTwoStates(35, 36); break; case 36: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 21) kind = 21; jjCheckNAddStates(27, 29); break; case 37: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(37, 38); break; case 38: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddStates(30, 32); break; case 40: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddStates(33, 36); break; case 41: if (curChar != 10) break; if (kind > 25) kind = 25; jjCheckNAddTwoStates(42, 44); break; case 42: case 43: if (curChar == 10 && kind > 24) kind = 24; break; case 44: if (curChar == 13) jjstateSet[jjnewStateCnt++] = 43; break; case 45: if (curChar == 13) jjAddStates(9, 10); break; case 46: if (curChar == 10) jjCheckNAddTwoStates(42, 44); break; case 47: if (curChar == 10 && kind > 25) kind = 25; break; default : break; } } while(i != startsAt); } else if (curChar < 128) { long l = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 10: if ((0x7fffffe07fffffeL & l) != 0L) { if (kind > 15) kind = 15; jjCheckNAdd(9); } else if (curChar == 64) { if (kind > 16) kind = 16; jjCheckNAdd(11); } break; case 7: if ((0x7fffffe07fffffeL & l) != 0L) { if (kind > 23) kind = 23; jjCheckNAddStates(4, 8); } else if ((0xf8000001f8000001L & l) != 0L) { if (kind > 32) kind = 32; } if ((0x7fffffeL & l) != 0L) jjCheckNAddStates(0, 3); else if (curChar == 94) jjstateSet[jjnewStateCnt++] = 10; else if (curChar == 91) jjstateSet[jjnewStateCnt++] = 0; if (curChar == 94) jjCheckNAdd(9); break; case 49: if ((0xffffffffdfffffffL & l) != 0L) jjCheckNAddStates(11, 13); else if (curChar == 93) jjstateSet[jjnewStateCnt++] = 4; if (curChar == 93) jjstateSet[jjnewStateCnt++] = 3; break; case 48: if ((0xffffffffdfffffffL & l) != 0L) jjCheckNAddStates(11, 13); else if (curChar == 93) jjstateSet[jjnewStateCnt++] = 3; break; case 0: if (curChar == 91) jjCheckNAddTwoStates(1, 2); break; case 1: if ((0xffffffffdfffffffL & l) != 0L) jjCheckNAddStates(11, 13); break; case 2: if (curChar == 93) jjstateSet[jjnewStateCnt++] = 3; break; case 3: if ((0xffffffffdfffffffL & l) != 0L) jjCheckNAddStates(14, 16); break; case 4: if (curChar == 93 && kind > 9) kind = 9; break; case 5: if (curChar == 93) jjstateSet[jjnewStateCnt++] = 4; break; case 6: if ((0xffffffffdfffffffL & l) != 0L) jjCheckNAddStates(17, 20); break; case 8: if (curChar == 94) jjCheckNAdd(9); break; case 9: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 15) kind = 15; jjCheckNAdd(9); break; case 11: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 16) kind = 16; jjCheckNAdd(11); break; case 12: if (curChar == 94) jjstateSet[jjnewStateCnt++] = 10; break; case 16: if ((0xf8000001f8000001L & l) != 0L && kind > 32) kind = 32; break; case 17: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 23) kind = 23; jjCheckNAddStates(4, 8); break; case 18: if ((0x7fffffe07fffffeL & l) != 0L) jjCheckNAddTwoStates(18, 19); break; case 19: if (curChar == 64) jjCheckNAdd(20); break; case 20: if ((0x7fffffe07fffffeL & l) != 0L) jjCheckNAddTwoStates(20, 21); break; case 22: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 19) kind = 19; jjCheckNAdd(23); break; case 23: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 19) kind = 19; jjCheckNAddStates(21, 23); break; case 24: if ((0x7fffffe07fffffeL & l) != 0L) jjCheckNAddTwoStates(24, 25); break; case 26: if ((0x47fffffe87ffffffL & l) == 0L) break; if (kind > 20) kind = 20; jjCheckNAddStates(24, 26); break; case 27: if ((0x47fffffe87ffffffL & l) == 0L) break; if (kind > 20) kind = 20; jjCheckNAdd(27); break; case 28: if ((0x47fffffe87ffffffL & l) != 0L) jjCheckNAddTwoStates(28, 29); break; case 30: jjAddStates(37, 38); break; case 32: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 23) kind = 23; jjCheckNAdd(32); break; case 33: if ((0x7fffffeL & l) != 0L) jjCheckNAddStates(0, 3); break; case 34: if ((0x7fffffeL & l) != 0L) jjCheckNAddTwoStates(34, 35); break; case 35: if ((0x7fffffe00000000L & l) == 0L) break; if (kind > 21) kind = 21; jjCheckNAddTwoStates(35, 36); break; case 36: if ((0x7fffffeL & l) == 0L) break; if (kind > 21) kind = 21; jjCheckNAddStates(27, 29); break; case 37: if ((0x7fffffeL & l) != 0L) jjCheckNAddTwoStates(37, 38); break; case 38: if ((0x7fffffe00000000L & l) != 0L) jjCheckNAddStates(30, 32); break; case 39: if (curChar == 96 && kind > 22) kind = 22; break; case 40: if ((0x7fffffeL & l) != 0L) jjCheckNAddStates(33, 36); break; default : break; } } while(i != startsAt); } else { int i2 = (curChar & 0xff) >> 6; long l2 = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 7: if ((jjbitVec0[i2] & l2) != 0L && kind > 32) kind = 32; break; case 49: case 1: if ((jjbitVec0[i2] & l2) != 0L) jjCheckNAddStates(11, 13); break; case 48: if ((jjbitVec0[i2] & l2) != 0L) jjCheckNAddStates(11, 13); break; case 3: if ((jjbitVec0[i2] & l2) != 0L) jjCheckNAddStates(14, 16); break; case 6: if ((jjbitVec0[i2] & l2) != 0L) jjCheckNAddStates(17, 20); break; case 30: if ((jjbitVec0[i2] & l2) != 0L) jjAddStates(37, 38); break; default : break; } } while(i != startsAt); } if (kind != 0x7fffffff) { jjmatchedKind = kind; jjmatchedPos = curPos; kind = 0x7fffffff; } ++curPos; if ((i = jjnewStateCnt) == (startsAt = 48 - (jjnewStateCnt = startsAt))) return curPos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return curPos; } }} | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/d78b2ad470cfc8d62a44e3115f3d7ec7fd49b132/WikiParserTokenManager.java/buggy/wiki/src/org/tcdi/opensource/wiki/parser/WikiParserTokenManager.java |
t.blowup(false,new PojoOptions().exp(1)); | t.blowup(false,new PojoOptions().exp(1L)); | public void testGetUserImages(Map options) { T t = new T(IllegalArgumentException.class){ @Override public void doTest(Object[] arg) { manager.getUserImages((Map)arg[0]); } }; t.blowup(true,new PojoOptions().allExps()); t.blowup(false,new PojoOptions().exp(1)); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/0b36a8e77f5bacb7e122d76ffce01866205b09d7/PojosConstraintsTest.java/clean/components/server/test/ome/server/utests/PojosConstraintsTest.java |
IObject model = source.asIObject(this); target2model.put(source,model); return model; | IObject model = source.newIObject(); target2model.put( source, model ); source.fillIObject( model, this ); return model; | public IObject map(ModelBased source){ if (source == null) { return null; } else if (target2model.containsKey(source)){ return (IObject) target2model.get(source); } else { IObject model = source.asIObject(this); target2model.put(source,model); return model; } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/5f68082026bcb57849846aaa0e4de7e32b6ebf72/ReverseModelMapper.java/buggy/components/common/src/ome/util/ReverseModelMapper.java |
resultArray.append(self.getRuntime().yield(blockArg).toRubyObject()); | resultArray.append(self.getRuntime().yield(blockArg)); | public static IRubyObject grep_iter_i(IRubyObject blockArg, IRubyObject arg1, IRubyObject self) { IRubyObject matcher = ((RubyArray) arg1).entry(0); RubyArray resultArray = (RubyArray) ((RubyArray) arg1).entry(1); if (matcher.callMethod("===", blockArg).isTrue()) { resultArray.append(self.getRuntime().yield(blockArg).toRubyObject()); } return self.getRuntime().getNil(); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/f235ab756f32ea9496f8f880066b46ad95ebb692/RubyEnumerable.java/buggy/org/jruby/RubyEnumerable.java |
} else if (RubyFixnum.fix2int(self.getRuntime().yield(RubyArray.newArray(self.getRuntime(), blockArg, maxItem)).toRubyObject()) > 0) { | } else if (RubyFixnum.fix2int(self.getRuntime().yield(RubyArray.newArray(self.getRuntime(), blockArg, maxItem))) > 0) { | public static IRubyObject max_iter_i(IRubyObject blockArg, IRubyObject arg1, IRubyObject self) { IRubyObject maxItem = ((RubyArray) arg1).pop(); if (maxItem.isNil()) { ((RubyArray) arg1).append(blockArg); } else if (RubyFixnum.fix2int(self.getRuntime().yield(RubyArray.newArray(self.getRuntime(), blockArg, maxItem)).toRubyObject()) > 0) { ((RubyArray) arg1).append(blockArg); } else { ((RubyArray) arg1).append(maxItem); } return self.getRuntime().getNil(); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/f235ab756f32ea9496f8f880066b46ad95ebb692/RubyEnumerable.java/buggy/org/jruby/RubyEnumerable.java |
} else if (RubyFixnum.fix2int(self.getRuntime().yield(RubyArray.newArray(self.getRuntime(), blockArg, maxItem)).toRubyObject()) < 0) { | } else if (RubyFixnum.fix2int(self.getRuntime().yield(RubyArray.newArray(self.getRuntime(), blockArg, maxItem))) < 0) { | public static IRubyObject min_iter_i(IRubyObject blockArg, IRubyObject arg1, IRubyObject self) { IRubyObject maxItem = ((RubyArray) arg1).pop(); if (maxItem.isNil()) { ((RubyArray) arg1).append(blockArg); } else if (RubyFixnum.fix2int(self.getRuntime().yield(RubyArray.newArray(self.getRuntime(), blockArg, maxItem)).toRubyObject()) < 0) { ((RubyArray) arg1).append(blockArg); } else { ((RubyArray) arg1).append(maxItem); } return self.getRuntime().getNil(); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/f235ab756f32ea9496f8f880066b46ad95ebb692/RubyEnumerable.java/buggy/org/jruby/RubyEnumerable.java |
HttpMethodBase method = null; | HttpMethod method = null; | public void exchange(Request out, Reply in) throws ImageServiceException, IOException { //Sanity checks. if (out == null) throw new NullPointerException("No request."); if (in == null) throw new NullPointerException("No reply."); //Build HTTP request, send it, and wait for response. //Then read the response into the Reply object. HttpClient comLink = getCommunicationLink(); HttpMethodBase method = null; try { method = out.marshal(); method.setPath(getRequestPath()); comLink.executeMethod(method); in.unmarshal(method, this); } finally { //Required by Http Client library. if (method != null) method.releaseConnection(); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/c0ee67611abddaf7c5a898ad8033ca4845e9d8fe/HttpChannel.java/buggy/SRC/org/openmicroscopy/shoola/omeis/transport/HttpChannel.java |
initTxtWidth(); | public ToolBar(ViewerCtrl control, Registry registry, int sizeT, int sizeZ, int t, int z) { initMovieComponents(registry, sizeT-1); initTextFields(t, z, sizeT, sizeZ); manager = new ToolBarManager(control, this, sizeT, t, sizeZ, z); manager.attachListeners(); buildToolBar(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/d646a60de63aef44547d7dc82610c8b0687c5f66/ToolBar.java/buggy/SRC/org/openmicroscopy/shoola/agents/viewer/controls/ToolBar.java |
|
tb.addSeparator(); | private JToolBar buildMovieBar() { JToolBar tb = new JToolBar(); tb.setFloatable(false); tb.add(play); tb.add(pause); tb.add(stop); tb.add(rewind); tb.add(forward); tb.addSeparator(); JLabel label = new JLabel(" Rate "); tb.add(label); tb.add(fps); return tb; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/d646a60de63aef44547d7dc82610c8b0687c5f66/ToolBar.java/buggy/SRC/org/openmicroscopy/shoola/agents/viewer/controls/ToolBar.java |
|
tb.addSeparator(); | private JToolBar buildMovieBar() { JToolBar tb = new JToolBar(); tb.setFloatable(false); tb.add(play); tb.add(pause); tb.add(stop); tb.add(rewind); tb.add(forward); tb.addSeparator(); JLabel label = new JLabel(" Rate "); tb.add(label); tb.add(fps); return tb; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/d646a60de63aef44547d7dc82610c8b0687c5f66/ToolBar.java/buggy/SRC/org/openmicroscopy/shoola/agents/viewer/controls/ToolBar.java |
|
tb.add(inspector); tb.addSeparator(); tb.add(saveAs); | private JToolBar buildRenderingBar() { JToolBar tb = new JToolBar(); tb.setFloatable(false); tb.add(render); tb.addSeparator(); tb.add(inspector); tb.addSeparator(); tb.add(saveAs); return tb; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/d646a60de63aef44547d7dc82610c8b0687c5f66/ToolBar.java/buggy/SRC/org/openmicroscopy/shoola/agents/viewer/controls/ToolBar.java |
|
JLabel label = new JLabel(" Z "); label.setForeground(STEELBLUE); tb.add(label); tb.add(zField); tb.add(zLabel); | tb.add(zPanel); tb.add(tPanel); | private JToolBar buildTextFieldBar() { JToolBar tb = new JToolBar(); tb.setFloatable(false); JLabel label = new JLabel(" Z "); label.setForeground(STEELBLUE); tb.add(label); tb.add(zField); tb.add(zLabel); tb.addSeparator(); label = new JLabel(" T "); label.setForeground(STEELBLUE); tb.add(label); tb.add(tField); tb.add(tLabel); return tb; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/d646a60de63aef44547d7dc82610c8b0687c5f66/ToolBar.java/buggy/SRC/org/openmicroscopy/shoola/agents/viewer/controls/ToolBar.java |
label = new JLabel(" T "); label.setForeground(STEELBLUE); tb.add(label); tb.add(tField); tb.add(tLabel); | private JToolBar buildTextFieldBar() { JToolBar tb = new JToolBar(); tb.setFloatable(false); JLabel label = new JLabel(" Z "); label.setForeground(STEELBLUE); tb.add(label); tb.add(zField); tb.add(zLabel); tb.addSeparator(); label = new JLabel(" T "); label.setForeground(STEELBLUE); tb.add(label); tb.add(tField); tb.add(tLabel); return tb; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/d646a60de63aef44547d7dc82610c8b0687c5f66/ToolBar.java/buggy/SRC/org/openmicroscopy/shoola/agents/viewer/controls/ToolBar.java |
|
addSeparator(SEPARATOR); add(buildRenderingBar()); addSeparator(SEPARATOR); add(buildMovieBar()); addSeparator(SEPARATOR_END); | addSeparator(Viewer.SEPARATOR_END); | private void buildToolBar() { setFloatable(false); setLayout(new BoxLayout(this, BoxLayout.X_AXIS)); add(buildTextFieldBar()); addSeparator(SEPARATOR); add(buildRenderingBar()); addSeparator(SEPARATOR); add(buildMovieBar()); addSeparator(SEPARATOR_END); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/d646a60de63aef44547d7dc82610c8b0687c5f66/ToolBar.java/buggy/SRC/org/openmicroscopy/shoola/agents/viewer/controls/ToolBar.java |
editor.setEnabled(b); | editor.setEnabled(b); | private void initMovieComponents(Registry registry, int maxT) { //buttons IconManager im = IconManager.getInstance(registry); saveAs = new JButton(im.getIcon(IconManager.SAVEAS)); saveAs.setToolTipText( UIUtilities.formatToolTipText("Bring up the save image window.")); inspector = new JButton(im.getIcon(IconManager.INSPECTOR)); inspector.setToolTipText( UIUtilities.formatToolTipText("Bring up the inspector panel.")); render = new JButton(im.getIcon(IconManager.RENDER)); render.setToolTipText( UIUtilities.formatToolTipText("Bring up the rendering panel.")); play = new JButton(im.getIcon(IconManager.MOVIE)); play.setToolTipText( UIUtilities.formatToolTipText("Play movie from current timepoint.")); stop = new JButton(im.getIcon(IconManager.STOP)); stop.setToolTipText(UIUtilities.formatToolTipText("Stop movie.")); rewind = new JButton(im.getIcon(IconManager.REWIND)); rewind.setToolTipText( UIUtilities.formatToolTipText("Go to the first timepoint.")); forward = new JButton(im.getIcon(IconManager.FORWARD)); forward.setToolTipText( UIUtilities.formatToolTipText("Go to the last timepoint.")); pause = new JButton(im.getIcon(IconManager.PLAYER_PAUSE)); pause.setToolTipText( UIUtilities.formatToolTipText("Stop the movie.")); //Spinner timepoint granularity is 1, so must be stepSize //fps = new JSpinner(new SpinnerNumberModel(12, 0, sizeT, 1)); fps = new JSpinner(new SpinnerNumberModel(12, 12, 12, 1)); editor = new JTextField("12", (""+maxT).length()); String s = "Select or enter the movie playback rate " + "(frames per second)."; editor.setToolTipText(UIUtilities.formatToolTipText(s)); fps.setEditor(editor); //only one timepoint. boolean b; if (maxT == 0) b = false; else b = true; play.setEnabled(b); rewind.setEnabled(b); stop.setEnabled(b); pause.setEnabled(b); forward.setEnabled(b); fps.setEnabled(b); editor.setEnabled(b); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/d646a60de63aef44547d7dc82610c8b0687c5f66/ToolBar.java/buggy/SRC/org/openmicroscopy/shoola/agents/viewer/controls/ToolBar.java |
tField.setForeground(STEELBLUE); | tField.setForeground(Viewer.STEELBLUE); | private void initTextFields(int t, int z, int maxT, int maxZ) { zLabel = new JLabel("/"+maxZ); tLabel = new JLabel("/"+maxT); tField = new JTextField(); tField = new JTextField(""+t, (""+maxT).length()); if (maxT-1 == 0) tField.setEditable(false); tField.setForeground(STEELBLUE); tField.setToolTipText( UIUtilities.formatToolTipText("Enter a timepoint.")); zField = new JTextField(""+z, (""+maxZ).length()); zField.setForeground(STEELBLUE); zField.setToolTipText( UIUtilities.formatToolTipText("Enter a Z point")); if (maxZ-1 == 0) zField.setEditable(false); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/d646a60de63aef44547d7dc82610c8b0687c5f66/ToolBar.java/buggy/SRC/org/openmicroscopy/shoola/agents/viewer/controls/ToolBar.java |
zField.setForeground(STEELBLUE); | zField.setForeground(Viewer.STEELBLUE); | private void initTextFields(int t, int z, int maxT, int maxZ) { zLabel = new JLabel("/"+maxZ); tLabel = new JLabel("/"+maxT); tField = new JTextField(); tField = new JTextField(""+t, (""+maxT).length()); if (maxT-1 == 0) tField.setEditable(false); tField.setForeground(STEELBLUE); tField.setToolTipText( UIUtilities.formatToolTipText("Enter a timepoint.")); zField = new JTextField(""+z, (""+maxZ).length()); zField.setForeground(STEELBLUE); zField.setToolTipText( UIUtilities.formatToolTipText("Enter a Z point")); if (maxZ-1 == 0) zField.setEditable(false); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/d646a60de63aef44547d7dc82610c8b0687c5f66/ToolBar.java/buggy/SRC/org/openmicroscopy/shoola/agents/viewer/controls/ToolBar.java |
JLabel label = new JLabel(" Z "); zPanel = TextFieldPanel(label, zField, zLabel, ("/"+maxZ).length()); label = new JLabel(" T "); tPanel = TextFieldPanel(label, tField, tLabel, ("/"+maxT).length()); | private void initTextFields(int t, int z, int maxT, int maxZ) { zLabel = new JLabel("/"+maxZ); tLabel = new JLabel("/"+maxT); tField = new JTextField(); tField = new JTextField(""+t, (""+maxT).length()); if (maxT-1 == 0) tField.setEditable(false); tField.setForeground(STEELBLUE); tField.setToolTipText( UIUtilities.formatToolTipText("Enter a timepoint.")); zField = new JTextField(""+z, (""+maxZ).length()); zField.setForeground(STEELBLUE); zField.setToolTipText( UIUtilities.formatToolTipText("Enter a Z point")); if (maxZ-1 == 0) zField.setEditable(false); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/d646a60de63aef44547d7dc82610c8b0687c5f66/ToolBar.java/buggy/SRC/org/openmicroscopy/shoola/agents/viewer/controls/ToolBar.java |
|
public DatasetSummary createDataset(List projectSummaries, List imageSummaries, DatasetData retVal, DatasetSummary dProto) throws DSOutOfServiceException, DSAccessException { //Make a new proto if none was provided. if (dProto == null) dProto = new DatasetSummary(); //Create a new project Object Criteria c = UserMapper.getUserStateCriteria(); Dataset d = (Dataset) gateway.createNewData(Dataset.class); d.setName(retVal.getName()); d.setDescription(retVal.getDescription()); d.setOwner(gateway.getCurrentUser(c)); gateway.markForUpdate(d); gateway.updateMarkedData(); //prepare list for Manager. List pIds = new ArrayList(), iIds = new ArrayList(); if (projectSummaries != null) { Iterator i = projectSummaries.iterator(); while (i.hasNext()) pIds.add(new Integer(((ProjectSummary) i.next()).getID())); } if (imageSummaries != null) { Iterator j = imageSummaries.iterator(); while (j.hasNext()) iIds.add(new Integer(((ImageSummary) j.next()).getID())); } if (pIds.size() != 0) gateway.addDatasetToProjects(d.getID(), pIds); if (iIds.size() != 0) gateway.addImagesToDataset(d.getID(), iIds); //fill in the proto dProto.setID(d.getID()); dProto.setName(d.getName()); return dProto; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/a43ad78503af4e7f39a04cb20cfba13e1c78b806/DMSAdapter.java/buggy/SRC/org/openmicroscopy/shoola/env/data/DMSAdapter.java |
||
public List retrieveImages(int datasetID) | public List retrieveImages(int datasetID, ImageSummary retVal) | public List retrieveImages(int datasetID) throws DSOutOfServiceException, DSAccessException { //Define the criteria by which the object graph is pulled out. Criteria c = DatasetMapper.buildImagesCriteria(datasetID); //Load the graph defined by criteria. Dataset dataset = (Dataset) gateway.retrieveData(Dataset.class, c); //List of image summary object. List images = null; if (dataset != null) //Put the server data into the corresponding client object. images = DatasetMapper.fillListImages(dataset); return images; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/a43ad78503af4e7f39a04cb20cfba13e1c78b806/DMSAdapter.java/buggy/SRC/org/openmicroscopy/shoola/env/data/DMSAdapter.java |
{ | { if (retVal == null) retVal = new ImageSummary(); | public List retrieveImages(int datasetID) throws DSOutOfServiceException, DSAccessException { //Define the criteria by which the object graph is pulled out. Criteria c = DatasetMapper.buildImagesCriteria(datasetID); //Load the graph defined by criteria. Dataset dataset = (Dataset) gateway.retrieveData(Dataset.class, c); //List of image summary object. List images = null; if (dataset != null) //Put the server data into the corresponding client object. images = DatasetMapper.fillListImages(dataset); return images; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/a43ad78503af4e7f39a04cb20cfba13e1c78b806/DMSAdapter.java/buggy/SRC/org/openmicroscopy/shoola/env/data/DMSAdapter.java |
Criteria c = DatasetMapper.buildImagesCriteria(datasetID); | Criteria c = DatasetMapper.buildImagesCriteria(datasetID); | public List retrieveImages(int datasetID) throws DSOutOfServiceException, DSAccessException { //Define the criteria by which the object graph is pulled out. Criteria c = DatasetMapper.buildImagesCriteria(datasetID); //Load the graph defined by criteria. Dataset dataset = (Dataset) gateway.retrieveData(Dataset.class, c); //List of image summary object. List images = null; if (dataset != null) //Put the server data into the corresponding client object. images = DatasetMapper.fillListImages(dataset); return images; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/a43ad78503af4e7f39a04cb20cfba13e1c78b806/DMSAdapter.java/buggy/SRC/org/openmicroscopy/shoola/env/data/DMSAdapter.java |
List images = null; if (dataset != null) images = DatasetMapper.fillListImages(dataset); return images; } | List images = null; if (dataset != null) images = DatasetMapper.fillListImages(dataset, retVal); return images; } | public List retrieveImages(int datasetID) throws DSOutOfServiceException, DSAccessException { //Define the criteria by which the object graph is pulled out. Criteria c = DatasetMapper.buildImagesCriteria(datasetID); //Load the graph defined by criteria. Dataset dataset = (Dataset) gateway.retrieveData(Dataset.class, c); //List of image summary object. List images = null; if (dataset != null) //Put the server data into the corresponding client object. images = DatasetMapper.fillListImages(dataset); return images; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/a43ad78503af4e7f39a04cb20cfba13e1c78b806/DMSAdapter.java/buggy/SRC/org/openmicroscopy/shoola/env/data/DMSAdapter.java |
if (getConditionNode().eval(ruby, self).isTrue()) { | if (x.eval(ruby, self).isTrue()) { | public RubyObject eval(Ruby ruby, RubyObject self) { ruby.setSourceLine(getLine()); Node x = getConditionNode(); if (getConditionNode().eval(ruby, self).isTrue()) { return self.eval(getBodyNode()); } else { return self.eval(getElseNode()); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/beb697e8a074dd8aaf511daca2ed5f004100855d/IfNode.java/clean/org/jruby/nodes/IfNode.java |
if (getScope().hasLocalValues()) { | if (getScope().hasLocalVariables()) { | public IRubyObject getBackref() { if (getScope().hasLocalValues()) { return getScope().getValue(1); } return getNil(); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/6e143e1ded2275ed4da3449d4a13446b099f800d/Ruby.java/clean/src/org/jruby/Ruby.java |
if (getScope().hasLocalValues()) { | if (getScope().hasLocalVariables()) { | public IRubyObject getLastline() { if (getScope().hasLocalValues()) { return getScope().getValue(0); } return RubyString.nilString(this); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/6e143e1ded2275ed4da3449d4a13446b099f800d/Ruby.java/clean/src/org/jruby/Ruby.java |
if (! getScope().hasLocalValues()) { getScope().setLocalNames(new ArrayList(Arrays.asList(new String[] { "_", "~" }))); | if (! getScope().hasLocalVariables()) { getScope().resetLocalVariables(new ArrayList(Arrays.asList(new String[] { "_", "~" }))); | public void setBackref(IRubyObject match) { if (! getScope().hasLocalValues()) { getScope().setLocalNames(new ArrayList(Arrays.asList(new String[] { "_", "~" }))); } getScope().setValue(1, match); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/6e143e1ded2275ed4da3449d4a13446b099f800d/Ruby.java/clean/src/org/jruby/Ruby.java |
if (! getScope().hasLocalValues()) { getScope().setLocalNames(new ArrayList(Arrays.asList(new String[] { "_", "~" }))); | if (! getScope().hasLocalVariables()) { getScope().resetLocalVariables(new ArrayList(Arrays.asList(new String[] { "_", "~" }))); | public void setLastline(IRubyObject value) { if (! getScope().hasLocalValues()) { getScope().setLocalNames(new ArrayList(Arrays.asList(new String[] { "_", "~" }))); } getScope().setValue(0, value); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/6e143e1ded2275ed4da3449d4a13446b099f800d/Ruby.java/clean/src/org/jruby/Ruby.java |
rubyClass.getSingletonClass().includeModule(ruby.getWrapper()); | rubyClass.extendObject(ruby.getWrapper()); | public RubyObject eval(Ruby ruby, RubyObject self) { if (ruby.getRubyClass() == null) { throw new TypeError(ruby, "no outer class/module"); } RubyModule superClass = null; if (getSuperNode() != null) { superClass = getSuperClass(ruby, self, getSuperNode()); } RubyClass rubyClass = null; // if ((ruby_class == getRuby().getObjectClass()) && rb_autoload_defined(node.nd_cname())) { // rb_autoload_load(node.nd_cname()); // } if (ruby.getRubyClass().isConstantDefined(getClassNameId())) { rubyClass = (RubyClass)ruby.getRubyClass().getConstant(getClassNameId()); } if (rubyClass != null) { if (!rubyClass.isClass()) { throw new TypeError(ruby, getClassNameId() + " is not a class"); } if (superClass != null) { RubyModule tmp = rubyClass.getSuperClass(); if (tmp.isSingleton()) { tmp = tmp.getSuperClass(); } while (tmp.isIncluded()) { tmp = tmp.getSuperClass(); } if (tmp != superClass) { superClass = tmp; //goto override_class; if (superClass == null) { superClass = ruby.getClasses().getObjectClass(); } rubyClass = ruby.defineClass(getClassNameId(), (RubyClass)superClass); ruby.getRubyClass().setConstant(getClassNameId(), rubyClass); rubyClass.setClassPath(ruby.getRubyClass(), getClassNameId()); // end goto } } if (ruby.getSafeLevel() >= 4) { throw new RubySecurityException(ruby, "extending class prohibited"); } // rb_clear_cache(); } else { //override_class: if (superClass == null) { superClass = ruby.getClasses().getObjectClass(); } rubyClass = ruby.defineClass(getClassNameId(), (RubyClass)superClass); ruby.getRubyClass().setConstant(getClassNameId(), rubyClass); rubyClass.setClassPath(ruby.getRubyClass(), getClassNameId()); } if (ruby.getWrapper() != null) { rubyClass.getSingletonClass().includeModule(ruby.getWrapper()); rubyClass.includeModule(ruby.getWrapper()); } return ((ScopeNode)getBodyNode()).setupModule(ruby, rubyClass); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/d31a76ee29d5978a9bec41e3ac9134cee024bcab/ClassNode.java/buggy/org/jruby/nodes/ClassNode.java |
return JavaObject.wrap(getRuntime(), socket.getRemoteSocketAddress()); | if (socketChannel instanceof SocketChannel) { return JavaObject.wrap(getRuntime(), ((SocketChannel) socketChannel).socket().getRemoteSocketAddress()); } else { throw getRuntime().newIOError("Not Supported"); } | public IRubyObject getpeername() { return JavaObject.wrap(getRuntime(), socket.getRemoteSocketAddress()); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/54e6b8da799629e0b7db879c45149399878f5f84/RubyBasicSocket.java/clean/src/org/jruby/RubyBasicSocket.java |
return JavaObject.wrap(getRuntime(), socket.getLocalSocketAddress()); | if (socketChannel instanceof SocketChannel) { return JavaObject.wrap(getRuntime(), ((SocketChannel) socketChannel).socket().getLocalSocketAddress()); } else if (socketChannel instanceof ServerSocketChannel) { return JavaObject.wrap(getRuntime(), ((ServerSocketChannel) socketChannel).socket().getLocalSocketAddress()); } else { throw getRuntime().newIOError("Not Supported"); } | public IRubyObject getsockname() { return JavaObject.wrap(getRuntime(), socket.getLocalSocketAddress()); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/54e6b8da799629e0b7db879c45149399878f5f84/RubyBasicSocket.java/clean/src/org/jruby/RubyBasicSocket.java |
socket = extractSocket(arg); | socketChannel = extractSocketChannel(arg); | public IRubyObject initialize(IRubyObject arg) { socket = extractSocket(arg); try { handler = new IOHandlerSocket(getRuntime(), socket.getInputStream(), socket.getOutputStream()); } catch (IOException e) { throw getRuntime().newIOError(e.getMessage()); } registerIOHandler(handler); modes = handler.getModes(); return this; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/54e6b8da799629e0b7db879c45149399878f5f84/RubyBasicSocket.java/clean/src/org/jruby/RubyBasicSocket.java |
handler = new IOHandlerSocket(getRuntime(), socket.getInputStream(), socket.getOutputStream()); | handler = new IOHandlerNio(getRuntime(), socketChannel); | public IRubyObject initialize(IRubyObject arg) { socket = extractSocket(arg); try { handler = new IOHandlerSocket(getRuntime(), socket.getInputStream(), socket.getOutputStream()); } catch (IOException e) { throw getRuntime().newIOError(e.getMessage()); } registerIOHandler(handler); modes = handler.getModes(); return this; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/54e6b8da799629e0b7db879c45149399878f5f84/RubyBasicSocket.java/clean/src/org/jruby/RubyBasicSocket.java |
return getRuntime().newString(((IOHandlerSocket) handler).recv(RubyNumeric.fix2int(args[0]))); | return getRuntime().newString(((IOHandlerNio) handler).recv(RubyNumeric.fix2int(args[0]))); | public IRubyObject recv(IRubyObject[] args) { try { return getRuntime().newString(((IOHandlerSocket) handler).recv(RubyNumeric.fix2int(args[0]))); } catch (IOHandler.BadDescriptorException e) { throw getRuntime().newErrnoEBADFError(); } catch (EOFException e) { // recv returns nil on EOF return getRuntime().getNil(); } catch (IOException e) { // All errors to sysread should be SystemCallErrors, but on a closed stream // Ruby returns an IOError. Java throws same exception for all errors so // we resort to this hack... if ("Socket not open".equals(e.getMessage())) { throw getRuntime().newIOError(e.getMessage()); } throw getRuntime().newSystemCallError(e.getMessage()); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/54e6b8da799629e0b7db879c45149399878f5f84/RubyBasicSocket.java/clean/src/org/jruby/RubyBasicSocket.java |
int how = args.length > 0 ? RubyNumeric.fix2int(args[0]) : SHUTDOWN_BOTH; if (how != SHUTDOWN_RECEIVER && how != SHUTDOWN_SENDER && how != SHUTDOWN_BOTH) { | int how = 2; if (args.length > 0) { how = RubyNumeric.fix2int(args[0]); } if (how < 0 || 2 < how) { | public IRubyObject shutdown(IRubyObject[] args) { if (getRuntime().getSafeLevel() >= 4 && tainted().isFalse()) { throw getRuntime().newSecurityError("Insecure: can't shutdown socket"); } int how = args.length > 0 ? RubyNumeric.fix2int(args[0]) : SHUTDOWN_BOTH; if (how != SHUTDOWN_RECEIVER && how != SHUTDOWN_SENDER && how != SHUTDOWN_BOTH) { throw getRuntime().newArgumentError("`how' should be either 0, 1, 2"); } if (how != SHUTDOWN_BOTH) { throw getRuntime().newNotImplementedError("Shutdown currently only works with how=2"); } return close(); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/54e6b8da799629e0b7db879c45149399878f5f84/RubyBasicSocket.java/clean/src/org/jruby/RubyBasicSocket.java |
if (how != SHUTDOWN_BOTH) { | if (how != 2) { | public IRubyObject shutdown(IRubyObject[] args) { if (getRuntime().getSafeLevel() >= 4 && tainted().isFalse()) { throw getRuntime().newSecurityError("Insecure: can't shutdown socket"); } int how = args.length > 0 ? RubyNumeric.fix2int(args[0]) : SHUTDOWN_BOTH; if (how != SHUTDOWN_RECEIVER && how != SHUTDOWN_SENDER && how != SHUTDOWN_BOTH) { throw getRuntime().newArgumentError("`how' should be either 0, 1, 2"); } if (how != SHUTDOWN_BOTH) { throw getRuntime().newNotImplementedError("Shutdown currently only works with how=2"); } return close(); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/54e6b8da799629e0b7db879c45149399878f5f84/RubyBasicSocket.java/clean/src/org/jruby/RubyBasicSocket.java |
connection = new XMPPConnection(serverName); | connection = new SSLXMPPConnection(serverName); | private boolean login() { final SessionManager sessionManager = SparkManager.getSessionManager(); boolean hasErrors = false; String errorMessage = null; // Handle specifyed Workgroup String serverName = getServerName(); if (!hasErrors) { localPref = SettingsManager.getLocalPreferences(); SmackConfiguration.setPacketReplyTimeout(localPref.getTimeOut() * 1000); // Get connection try { int port = localPref.getXmppPort(); int checkForPort = serverName.indexOf(":"); if (checkForPort != -1) { String portString = serverName.substring(checkForPort + 1); if (ModelUtil.hasLength(portString)) { // Set new port. port = Integer.valueOf(portString).intValue(); } } boolean useSSL = localPref.isSSL(); boolean hostPortConfigured = localPref.isHostAndPortConfigured(); if (useSSL) { if (!hostPortConfigured) { connection = new XMPPConnection(serverName); } else { connection = new XMPPConnection(localPref.getXmppHost(), port, serverName); } } else { if (!hostPortConfigured) { connection = new XMPPConnection(serverName); } else { connection = new XMPPConnection(localPref.getXmppHost(), port, serverName); } } connection.connect(); String resource = localPref.getResource(); if (!ModelUtil.hasLength(resource)) { resource = "spark"; } connection.login(getUsername(), getPassword(), resource, false); // Subscriptions are always manual Roster roster = connection.getRoster(); roster.setSubscriptionMode(Roster.SubscriptionMode.manual); sessionManager.setServerAddress(connection.getServiceName()); sessionManager.initializeSession(connection, getUsername(), getPassword()); final String jid = getUsername() + '@' + sessionManager.getServerAddress() + "/" + resource; sessionManager.setJID(jid); } catch (Exception xee) { if (!loginDialog.isVisible()) { loginDialog.setVisible(true); } if (xee instanceof XMPPException) { XMPPException xe = (XMPPException)xee; final XMPPError error = xe.getXMPPError(); int errorCode = 0; if (error != null) { errorCode = error.getCode(); } if (errorCode == 401) { errorMessage = SparkRes.getString(SparkRes.INVALID_USERNAME_PASSWORD); } else if (errorCode == 502 || errorCode == 504) { errorMessage = SparkRes.getString(SparkRes.SERVER_UNAVAILABLE); } else { errorMessage = SparkRes.getString(SparkRes.UNRECOVERABLE_ERROR); } } else { errorMessage = SparkRes.getString(SparkRes.UNRECOVERABLE_ERROR); } // Log Error Log.warning("Exception in Login:", xee); hasErrors = true; } } if (hasErrors) { progressBar.setVisible(false); //progressBar.setIndeterminate(false); // Show error dialog if (loginDialog.isVisible()) { JOptionPane.showMessageDialog(loginDialog, errorMessage, SparkRes.getString(SparkRes.ERROR_DIALOG_TITLE), JOptionPane.ERROR_MESSAGE); } setEnabled(true); return false; } // Since the connection and workgroup are valid. Add a ConnectionListener connection.addConnectionListener(SparkManager.getSessionManager()); // Persist information localPref.setUsername(getUsername()); String encodedPassword = null; try { encodedPassword = Encryptor.encrypt(getPassword()); } catch (Exception e) { Log.error("Error encrypting password.", e); } localPref.setPassword(encodedPassword); localPref.setSavePassword(savePasswordBox.isSelected()); localPref.setAutoLogin(autoLoginBox.isSelected()); localPref.setServer(serverField.getText()); SettingsManager.saveSettings(); return !hasErrors; } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/945d1e9320b8d07743672b585a318e9c18b70101/LoginDialog.java/buggy/src/java/org/jivesoftware/LoginDialog.java |
connection = new XMPPConnection(localPref.getXmppHost(), port, serverName); | connection = new SSLXMPPConnection(localPref.getXmppHost(), port, serverName); | private boolean login() { final SessionManager sessionManager = SparkManager.getSessionManager(); boolean hasErrors = false; String errorMessage = null; // Handle specifyed Workgroup String serverName = getServerName(); if (!hasErrors) { localPref = SettingsManager.getLocalPreferences(); SmackConfiguration.setPacketReplyTimeout(localPref.getTimeOut() * 1000); // Get connection try { int port = localPref.getXmppPort(); int checkForPort = serverName.indexOf(":"); if (checkForPort != -1) { String portString = serverName.substring(checkForPort + 1); if (ModelUtil.hasLength(portString)) { // Set new port. port = Integer.valueOf(portString).intValue(); } } boolean useSSL = localPref.isSSL(); boolean hostPortConfigured = localPref.isHostAndPortConfigured(); if (useSSL) { if (!hostPortConfigured) { connection = new XMPPConnection(serverName); } else { connection = new XMPPConnection(localPref.getXmppHost(), port, serverName); } } else { if (!hostPortConfigured) { connection = new XMPPConnection(serverName); } else { connection = new XMPPConnection(localPref.getXmppHost(), port, serverName); } } connection.connect(); String resource = localPref.getResource(); if (!ModelUtil.hasLength(resource)) { resource = "spark"; } connection.login(getUsername(), getPassword(), resource, false); // Subscriptions are always manual Roster roster = connection.getRoster(); roster.setSubscriptionMode(Roster.SubscriptionMode.manual); sessionManager.setServerAddress(connection.getServiceName()); sessionManager.initializeSession(connection, getUsername(), getPassword()); final String jid = getUsername() + '@' + sessionManager.getServerAddress() + "/" + resource; sessionManager.setJID(jid); } catch (Exception xee) { if (!loginDialog.isVisible()) { loginDialog.setVisible(true); } if (xee instanceof XMPPException) { XMPPException xe = (XMPPException)xee; final XMPPError error = xe.getXMPPError(); int errorCode = 0; if (error != null) { errorCode = error.getCode(); } if (errorCode == 401) { errorMessage = SparkRes.getString(SparkRes.INVALID_USERNAME_PASSWORD); } else if (errorCode == 502 || errorCode == 504) { errorMessage = SparkRes.getString(SparkRes.SERVER_UNAVAILABLE); } else { errorMessage = SparkRes.getString(SparkRes.UNRECOVERABLE_ERROR); } } else { errorMessage = SparkRes.getString(SparkRes.UNRECOVERABLE_ERROR); } // Log Error Log.warning("Exception in Login:", xee); hasErrors = true; } } if (hasErrors) { progressBar.setVisible(false); //progressBar.setIndeterminate(false); // Show error dialog if (loginDialog.isVisible()) { JOptionPane.showMessageDialog(loginDialog, errorMessage, SparkRes.getString(SparkRes.ERROR_DIALOG_TITLE), JOptionPane.ERROR_MESSAGE); } setEnabled(true); return false; } // Since the connection and workgroup are valid. Add a ConnectionListener connection.addConnectionListener(SparkManager.getSessionManager()); // Persist information localPref.setUsername(getUsername()); String encodedPassword = null; try { encodedPassword = Encryptor.encrypt(getPassword()); } catch (Exception e) { Log.error("Error encrypting password.", e); } localPref.setPassword(encodedPassword); localPref.setSavePassword(savePasswordBox.isSelected()); localPref.setAutoLogin(autoLoginBox.isSelected()); localPref.setServer(serverField.getText()); SettingsManager.saveSettings(); return !hasErrors; } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/945d1e9320b8d07743672b585a318e9c18b70101/LoginDialog.java/buggy/src/java/org/jivesoftware/LoginDialog.java |
this.name = RubyString.newString(ruby, name); this.script = RubyString.newString(ruby, script); } | this.name = RubyString.newString(ruby, name); this.script = RubyString.newString(ruby, script); } | EvalThread(String name, String script) { this.name = RubyString.newString(ruby, name); this.script = RubyString.newString(ruby, script); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/774c5d3d592dfd020e3a8f961b73f629c4c55cf0/TestRubyBase.java/clean/org/jruby/test/TestRubyBase.java |
ruby.getRuntime().loadScript(name, script, false); out.close(); } | ruby.getRuntime().loadScript(name, script, false); out.close(); } | public void run() { ruby.getRuntime().loadScript(name, script, false); out.close(); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/774c5d3d592dfd020e3a8f961b73f629c4c55cf0/TestRubyBase.java/clean/org/jruby/test/TestRubyBase.java |
int NUM = Integer.parseInt(args[0]); | public static void main(String args[]) { //@START int NUM = Integer.parseInt(args[0]); boolean [] flags = new boolean[8192 + 1]; int count = 0; while (NUM-- > 0) { count = 0; for (int i=2; i <= 8192; i++) { flags[i] = true; } for (int i=2; i <= 8192; i++) { if (flags[i]) { // remove all multiples of prime: i for (int k=i+i; k <= 8192; k+=i) { flags[k] = false; } count++; } } } System.out.print("Count: " + count + "\n"); //@END } | 53330 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/53330/eb6c850277407b38bcaefb81155941da0f27b849/sieve.java/buggy/tests/shootout/java-start/sieve.java |
|
if (selectedDisplay.getParentDisplay() == null) browser.accept(visitor); else selectedDisplay.accept(visitor); | if (selectedDisplay.getParentDisplay() == null) return; selectedDisplay.accept(visitor); if (selectedDisplay instanceof ImageSet) { Layout layout = LayoutFactory.createLayout( LayoutFactory.SQUARY_LAYOUT); layout.visit((ImageSet) selectedDisplay); } | public void execute() { ZoomVisitor visitor = new ZoomVisitor(model); Browser browser = model.getBrowser(); ImageDisplay selectedDisplay = browser.getSelectedDisplay(); if (selectedDisplay.getParentDisplay() == null) //root browser.accept(visitor); else selectedDisplay.accept(visitor); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/7a8e3ab291f958036f1839046f37dbdab1ea19a9/ZoomCmd.java/clean/SRC/org/openmicroscopy/shoola/agents/hiviewer/cmd/ZoomCmd.java |
int datasetID = actionTarget.getDataset().getID(); String name = actionTarget.getDataset().getName(); agent.loadCategories(datasetID,name); | ColorMapManager manager = env.getColorMapManager(); ColorMapUI ui = manager.getUI(); ui.setClosable(true); ui.setIconifiable(true); ui.setResizable(false); ui.setMaximizable(false); if(!ui.isShowing()) { tf.addToDesktop(ui,TopFrame.PALETTE_LAYER); ui.show(); } else { try { ui.setSelected(true); } catch(PropertyVetoException ex) {} } | public void actionPerformed(ActionEvent ae) { int datasetID = actionTarget.getDataset().getID(); String name = actionTarget.getDataset().getName(); agent.loadCategories(datasetID,name); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/f82d914fe97ef0c74bef944bf12ae4961776c814/BrowserMenuBar.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/ui/BrowserMenuBar.java |
if(e.getStateChange() == ItemEvent.SELECTED) | if(e.getStateChange() == ItemEvent.DESELECTED) | public void itemStateChanged(ItemEvent e) { if(e.getStateChange() == ItemEvent.SELECTED) { PiccoloAction magnifierOnAction = PiccoloActionFactory.getMagnifyOnAction(actionTarget); magnifierOnAction.execute(); } else if(e.getStateChange() == ItemEvent.DESELECTED) { PiccoloAction magnifierOffAction = PiccoloActionFactory.getMagnifyOffAction(actionTarget); magnifierOffAction.execute(); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/f82d914fe97ef0c74bef944bf12ae4961776c814/BrowserMenuBar.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/ui/BrowserMenuBar.java |
PiccoloAction magnifierOnAction = PiccoloActionFactory.getMagnifyOnAction(actionTarget); magnifierOnAction.execute(); | public void itemStateChanged(ItemEvent e) { if(e.getStateChange() == ItemEvent.SELECTED) { PiccoloAction magnifierOnAction = PiccoloActionFactory.getMagnifyOnAction(actionTarget); magnifierOnAction.execute(); } else if(e.getStateChange() == ItemEvent.DESELECTED) { PiccoloAction magnifierOffAction = PiccoloActionFactory.getMagnifyOffAction(actionTarget); magnifierOffAction.execute(); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/f82d914fe97ef0c74bef944bf12ae4961776c814/BrowserMenuBar.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/ui/BrowserMenuBar.java |
|
else if(e.getStateChange() == ItemEvent.DESELECTED) | else if(e.getStateChange() == ItemEvent.SELECTED) | public void itemStateChanged(ItemEvent e) { if(e.getStateChange() == ItemEvent.SELECTED) { PiccoloAction magnifierOnAction = PiccoloActionFactory.getMagnifyOnAction(actionTarget); magnifierOnAction.execute(); } else if(e.getStateChange() == ItemEvent.DESELECTED) { PiccoloAction magnifierOffAction = PiccoloActionFactory.getMagnifyOffAction(actionTarget); magnifierOffAction.execute(); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/f82d914fe97ef0c74bef944bf12ae4961776c814/BrowserMenuBar.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/ui/BrowserMenuBar.java |
PiccoloAction magnifierOffAction = PiccoloActionFactory.getMagnifyOffAction(actionTarget); magnifierOffAction.execute(); | public void itemStateChanged(ItemEvent e) { if(e.getStateChange() == ItemEvent.SELECTED) { PiccoloAction magnifierOnAction = PiccoloActionFactory.getMagnifyOnAction(actionTarget); magnifierOnAction.execute(); } else if(e.getStateChange() == ItemEvent.DESELECTED) { PiccoloAction magnifierOffAction = PiccoloActionFactory.getMagnifyOffAction(actionTarget); magnifierOffAction.execute(); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/f82d914fe97ef0c74bef944bf12ae4961776c814/BrowserMenuBar.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/ui/BrowserMenuBar.java |
|
ColorMapManager manager = env.getColorMapManager(); ColorMapUI ui = manager.getUI(); | HeatMapManager manager = env.getHeatMapManager(); HeatMapUI ui = manager.getUI(); | public void actionPerformed(ActionEvent ae) { ColorMapManager manager = env.getColorMapManager(); ColorMapUI ui = manager.getUI(); ui.setClosable(true); ui.setIconifiable(true); ui.setResizable(false); ui.setMaximizable(false); if(!ui.isShowing()) { tf.addToDesktop(ui,TopFrame.PALETTE_LAYER); ui.show(); } else { try { ui.setSelected(true); } catch(PropertyVetoException ex) {} } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/f82d914fe97ef0c74bef944bf12ae4961776c814/BrowserMenuBar.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/ui/BrowserMenuBar.java |
actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); | actionTarget.removePaintMethod(PaintMethods.DRAW_WELLNO_METHOD, Thumbnail.FOREGROUND_PAINT_METHOD); | public void itemStateChanged(ItemEvent e) { if(e.getStateChange() == ItemEvent.DESELECTED) { actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); } else if(e.getStateChange() == ItemEvent.SELECTED) { actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/f82d914fe97ef0c74bef944bf12ae4961776c814/BrowserMenuBar.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/ui/BrowserMenuBar.java |
actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); | actionTarget.addPaintMethod(PaintMethods.DRAW_WELLNO_METHOD, Thumbnail.FOREGROUND_PAINT_METHOD); | public void itemStateChanged(ItemEvent e) { if(e.getStateChange() == ItemEvent.DESELECTED) { actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); } else if(e.getStateChange() == ItemEvent.SELECTED) { actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/f82d914fe97ef0c74bef944bf12ae4961776c814/BrowserMenuBar.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/ui/BrowserMenuBar.java |
actionTarget.removeOverlayMethod(OverlayMethods.ANNOTATION_METHOD); | public void itemStateChanged(ItemEvent e) { if(e.getStateChange() == ItemEvent.DESELECTED) { // TODO add multidimension paint method } else if(e.getStateChange() == ItemEvent.SELECTED) { // TODO add multidimension paint method } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/f82d914fe97ef0c74bef944bf12ae4961776c814/BrowserMenuBar.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/ui/BrowserMenuBar.java |
|
actionTarget.addOverlayMethod(OverlayMethods.ANNOTATION_METHOD); | public void itemStateChanged(ItemEvent e) { if(e.getStateChange() == ItemEvent.DESELECTED) { // TODO add multidimension paint method } else if(e.getStateChange() == ItemEvent.SELECTED) { // TODO add multidimension paint method } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/f82d914fe97ef0c74bef944bf12ae4961776c814/BrowserMenuBar.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/ui/BrowserMenuBar.java |
|
thumbnailImages[i] = agent.getResizedThumbnail(pix,compositeWidth, compositeHeight); | if(pix != null) { thumbnailImages[i] = agent.getResizedThumbnail(pix,compositeWidth, compositeHeight); } | public void loadCompositeImages() { BrowserEnvironment env = BrowserEnvironment.getInstance(); BrowserAgent agent = env.getBrowserAgent(); if(!multipleModeOn) { ThumbnailDataModel model = parentThumbnail.getModel(); Pixels pix = (Pixels)model.getAttributeMap().getAttribute("Pixels"); setImage(agent.getResizedThumbnail(pix,compositeWidth, compositeHeight)); setBounds(border); } else { ThumbnailDataModel[] models = parentThumbnail.getMultipleModels(); for(int i=0;i<models.length;i++) { Pixels pix = (Pixels)models[i].getAttributeMap().getAttribute("Pixels"); thumbnailImages[i] = agent.getResizedThumbnail(pix,compositeWidth, compositeHeight); } setImage(thumbnailImages[parentThumbnail.getMultipleImageIndex()]); setBounds(border); } repaint(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/ad867bc3f360d4a9ce481731c0723126b9112b54/SemanticZoomNode.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/ui/SemanticZoomNode.java |
if (o instanceof DataObject) { | if (o instanceof ImageData) { | void viewDataObject() { TreeImageDisplay d = getLastSelectedDisplay(); if (d == null) return; Object o = d.getUserObject(); if (o instanceof DataObject) { ViewCmd cmd = new ViewCmd(parent, (DataObject) o); cmd.execute(); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/38a31e9c570bc8c0bbfb871c8b12b0e52420f22c/BrowserModel.java/clean/SRC/org/openmicroscopy/shoola/agents/treeviewer/browser/BrowserModel.java |
public void mousePressed(MouseEvent me) { ThumbWinPopupMenu.hideMenu(); } | public void mousePressed(MouseEvent me) { ThumbWinPopupMenu.hideMenu(); onClick(me); } | public void mousePressed(MouseEvent me) { ThumbWinPopupMenu.hideMenu(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/aa0097eff23f798d820afd9d111c6a0ad5d3a62c/ThumbWin.java/clean/SRC/org/openmicroscopy/shoola/agents/hiviewer/view/ThumbWin.java |
public void mouseReleased(MouseEvent me) { if (me.isPopupTrigger()) { popupPoint = me.getPoint(); ThumbWinPopupMenu.showMenuFor(this); } } | public void mouseReleased(MouseEvent me) { onClick(me); } | public void mouseReleased(MouseEvent me) { if (me.isPopupTrigger()) { popupPoint = me.getPoint(); ThumbWinPopupMenu.showMenuFor(this); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/aa0097eff23f798d820afd9d111c6a0ad5d3a62c/ThumbWin.java/clean/SRC/org/openmicroscopy/shoola/agents/hiviewer/view/ThumbWin.java |
Log.error(e); | public void initialize() { ProviderManager.addExtensionProvider("phone-event", "http://jivesoftware.com/xmlns/phone", new PhoneEventPacketExtensionProvider()); ProviderManager.addIQProvider("phone-action", "http://jivesoftware.com/xmlns/phone", new PhoneActionIQProvider()); final XMPPConnection con = SparkManager.getConnection(); SwingWorker worker = new SwingWorker() { public Object construct() { try { phoneClient = new PhoneClient(con); // Add BaseListener phoneClient.addEventListener(new PhoneListener()); } catch (Exception e) { // Ignore because the user does not have support. //Log.error(e); } return phoneClient; } public void finished() { if (phoneClient != null) { setupPhoneSystem(); } } }; worker.start(); } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/caf8563cc06ab68f1c251d173654deb6b4b1a77c/PhonePlugin.java/clean/src/java/org/jivesoftware/sparkimpl/plugin/phone/PhonePlugin.java |
|
Log.error(e); | public Object construct() { try { phoneClient = new PhoneClient(con); // Add BaseListener phoneClient.addEventListener(new PhoneListener()); } catch (Exception e) { // Ignore because the user does not have support. //Log.error(e); } return phoneClient; } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/caf8563cc06ab68f1c251d173654deb6b4b1a77c/PhonePlugin.java/clean/src/java/org/jivesoftware/sparkimpl/plugin/phone/PhonePlugin.java |
|
abstraction.activate(); | showPresentation(); | public void actionPerformed(ActionEvent e) { String s = (String) e.getActionCommand(); try { int index = Integer.parseInt(s); switch (index) { case DM_VISIBLE: abstraction.activate(); break; case PROJECT_ITEM: createProject(); break; case DATASET_ITEM: createDataset(); break; }// end switch } catch(NumberFormatException nfe) { //impossible if IDs are set correctly throw nfe; //just to be on the safe side... } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/e717f628b707987e5b693ea9d57b6ef34b300679/DataManagerCtrl.java/clean/SRC/org/openmicroscopy/shoola/agents/datamng/DataManagerCtrl.java |
debug = falseObject; | private void init() { ThreadContext tc = getCurrentContext(); nilObject = new RubyNil(this); trueObject = new RubyBoolean(this, true); falseObject = new RubyBoolean(this, false); verbose = falseObject; javaSupport = new JavaSupport(this); initLibraries(); tc.preInitCoreClasses(); initCoreClasses(); RubyGlobal.createGlobals(this); topSelf = TopSelfFactory.createTopSelf(this); tc.preInitBuiltinClasses(objectClass, topSelf); initBuiltinClasses(); getObject().defineConstant("TOPLEVEL_BINDING", newBinding()); // Load additional definitions and hacks from etc.rb getLoadService().smartLoad("builtin/etc.rb"); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a5d41074f98a47c0108b1a75c44775c0f6e4e87b/Ruby.java/buggy/src/org/jruby/Ruby.java |
|
for (Transport transport : TransportManager.getTransports()) { if (TransportManager.isRegistered(SparkManager.getConnection(), transport)) { | for (Transport transport : TransportUtils.getTransports()) { if (TransportUtils.isRegistered(SparkManager.getConnection(), transport)) { | public List<AccountItem> getAccounts() { List<AccountItem> list = new ArrayList<AccountItem>(); for (Transport transport : TransportManager.getTransports()) { if (TransportManager.isRegistered(SparkManager.getConnection(), transport)) { AccountItem item = new AccountItem(transport.getIcon(), transport.getName(), transport); list.add(item); } } return list; } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/d039de56513c7dd0e3c5c2762f184ca886fb4900/RosterDialog.java/buggy/src/java/org/jivesoftware/spark/ui/RosterDialog.java |
} | } model.setEditor(null); | 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); } } //onComponentStateChange(true); // if (editor == CREATE_EDITOR) { onSelectedDisplay(); // } setStatus(false, "", true); view.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/d6f445a04c526e987440c318c5240c4fad04549a/TreeViewerComponent.java/buggy/SRC/org/openmicroscopy/shoola/agents/treeviewer/view/TreeViewerComponent.java |
model.setEditor(null); | public void onNodesRemoved() { if (model.getState()!= SAVE) throw new IllegalStateException("This method can only be " + "invoked in the SAVE state"); model.setState(READY); fireStateChange(); view.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); Map browsers = model.getBrowsers(); Browser browser; Iterator i = browsers.keySet().iterator(); while (i.hasNext()) { browser = (Browser) browsers.get(i.next()); browser.refreshTree(); } onSelectedDisplay(); setStatus(false, "", true); view.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/d6f445a04c526e987440c318c5240c4fad04549a/TreeViewerComponent.java/buggy/SRC/org/openmicroscopy/shoola/agents/treeviewer/view/TreeViewerComponent.java |
|
try { final PipedInputStream pipeIn = new PipedInputStream(); final PipedOutputStream out = new PipedOutputStream(pipeIn); final PipedInputStream in = new PipedInputStream(); final PipedOutputStream pipeOut = new PipedOutputStream(in); final IRuby runtime = Ruby.newInstance(pipeIn, new PrintStream(pipeOut), new PrintStream(pipeOut), false); runtime.defineGlobalConstant("ARGV", runtime.newArray(new IRubyObject[] { runtime.newString("-f"), runtime.newString("--noreadline"), runtime.newString("--prompt-mode"), runtime.newString("simple") })); runtime.getLoadService().init(new ArrayList(0)); final JTextArea text = new JTextArea(); text.setLineWrap(true); text.setWrapStyleWord(false); text.setEditable(false); text.getCaret().setBlinkRate(500); text.setCaretColor(Color.GRAY); text.setBackground(Color.WHITE); text.setForeground(Color.GRAY); final JScrollPane pane = new JScrollPane(); pane.setViewportView(text); add(pane); pane.setPreferredSize(getSize()); this.validate(); Thread t = new Thread() { public void run() { byte[] buffer = new byte[256]; try { while (true) { int len = in.read(buffer); text.append(new String(buffer, 0, len)); text.setCaretPosition(text.getText().length()); } } catch (IOException ioe) { ioe.printStackTrace(); } } }; t.start(); text.addKeyListener(new KeyListener() { StringBuffer line = new StringBuffer(); public void keyPressed(KeyEvent e) { text.getCaret().setVisible(true); } public void keyReleased(KeyEvent e) { text.getCaret().setVisible(true); } public void keyTyped(KeyEvent e) { switch (e.getKeyChar()) { case 8: if (line.length() > 0) { text.setText(text.getText().substring(0, text.getText().length() - 1)); line.setLength(line.length() - 1); } break; case 10: try { text.append("\n"); out.write(line.append("\n").toString().getBytes()); Thread.yield(); } catch (IOException ioe) { ioe.printStackTrace(); } line.setLength(0); break; default: text.append(String.valueOf(e.getKeyChar())); line.append(String.valueOf(e.getKeyChar())); } text.setCaretPosition(text.getText().length()); text.getCaret().setVisible(true); } }); text.addMouseListener(new MouseListener() { public void mouseClicked(MouseEvent e) { text.setCaretPosition(text.getText().length()); text.getCaret().setVisible(true); } public void mouseEntered(MouseEvent e) { } public void mouseExited(MouseEvent e) { } public void mousePressed(MouseEvent e) { } public void mouseReleased(MouseEvent e) { text.getCaret().setVisible(true); } }); text.append("*** Welcome to Ruby for the Web! ***\n"); text.getDocument().addDocumentListener(new DocumentListener() { public void changedUpdate(DocumentEvent e) { text.setCaretPosition(text.getText().length()); text.getCaret().setVisible(true); } public void insertUpdate(DocumentEvent e) { text.setCaretPosition(text.getText().length()); text.getCaret().setVisible(true); } public void removeUpdate(DocumentEvent e) { text.setCaretPosition(text.getText().length()); text.getCaret().setVisible(true); } }); Thread t2 = new Thread() { public void run() { runtime.evalScript("require 'irb'; IRB.start"); } }; t2.start(); } catch (IOException ioe) { ioe.printStackTrace(); } | final PipedInputStream pipeIn = new PipedInputStream(); setLayout(new BorderLayout()); JEditorPane text = new JTextPane(); text.setMargin(new Insets(8,8,8,8)); text.setCaretColor(new Color(0xa4, 0x00, 0x00)); text.setBackground(new Color(0xf2, 0xf2, 0xf2)); text.setForeground(new Color(0xa4, 0x00, 0x00)); Font font = findFont("Monospaced", Font.PLAIN, 14, new String[] {"Monaco", "Andale Mono"}); text.setFont(font); JScrollPane pane = new JScrollPane(); pane.setViewportView(text); pane.setBorder(BorderFactory.createLineBorder(Color.darkGray)); add(pane); this.validate(); TextAreaReadline tar = new TextAreaReadline(text, " Welcome to JRuby for the Web! \n\n"); final IRuby runtime = Ruby.newInstance(pipeIn, new PrintStream(tar), new PrintStream(tar), false); runtime.defineGlobalConstant("ARGV", runtime.newArray(new IRubyObject[] { runtime.newString("-f") })); runtime.getLoadService().init(new ArrayList(0)); tar.hookIntoRuntime(runtime); Thread t2 = new Thread() { public void run() { runtime.evalScript("require 'irb'; require 'irb/completion'; IRB.start"); } }; t2.start(); | public void start() { super.start(); try { final PipedInputStream pipeIn = new PipedInputStream(); final PipedOutputStream out = new PipedOutputStream(pipeIn); final PipedInputStream in = new PipedInputStream(); final PipedOutputStream pipeOut = new PipedOutputStream(in); final IRuby runtime = Ruby.newInstance(pipeIn, new PrintStream(pipeOut), new PrintStream(pipeOut), false); runtime.defineGlobalConstant("ARGV", runtime.newArray(new IRubyObject[] { runtime.newString("-f"), runtime.newString("--noreadline"), runtime.newString("--prompt-mode"), runtime.newString("simple") })); runtime.getLoadService().init(new ArrayList(0)); final JTextArea text = new JTextArea(); text.setLineWrap(true); text.setWrapStyleWord(false); text.setEditable(false); text.getCaret().setBlinkRate(500); text.setCaretColor(Color.GRAY); text.setBackground(Color.WHITE); text.setForeground(Color.GRAY); final JScrollPane pane = new JScrollPane(); pane.setViewportView(text); add(pane); pane.setPreferredSize(getSize()); this.validate(); Thread t = new Thread() { public void run() { byte[] buffer = new byte[256]; try { while (true) { int len = in.read(buffer); text.append(new String(buffer, 0, len)); text.setCaretPosition(text.getText().length()); } } catch (IOException ioe) { ioe.printStackTrace(); } } }; t.start(); text.addKeyListener(new KeyListener() { StringBuffer line = new StringBuffer(); public void keyPressed(KeyEvent e) { text.getCaret().setVisible(true); } public void keyReleased(KeyEvent e) { text.getCaret().setVisible(true); } public void keyTyped(KeyEvent e) { switch (e.getKeyChar()) { case 8: if (line.length() > 0) { text.setText(text.getText().substring(0, text.getText().length() - 1)); line.setLength(line.length() - 1); } break; case 10: try { text.append("\n"); out.write(line.append("\n").toString().getBytes()); Thread.yield(); } catch (IOException ioe) { ioe.printStackTrace(); } line.setLength(0); break; default: text.append(String.valueOf(e.getKeyChar())); line.append(String.valueOf(e.getKeyChar())); } text.setCaretPosition(text.getText().length()); text.getCaret().setVisible(true); } }); text.addMouseListener(new MouseListener() { public void mouseClicked(MouseEvent e) { text.setCaretPosition(text.getText().length()); text.getCaret().setVisible(true); } public void mouseEntered(MouseEvent e) { } public void mouseExited(MouseEvent e) { } public void mousePressed(MouseEvent e) { } public void mouseReleased(MouseEvent e) { text.getCaret().setVisible(true); } }); text.append("*** Welcome to Ruby for the Web! ***\n"); text.getDocument().addDocumentListener(new DocumentListener() { public void changedUpdate(DocumentEvent e) { text.setCaretPosition(text.getText().length()); text.getCaret().setVisible(true); } public void insertUpdate(DocumentEvent e) { text.setCaretPosition(text.getText().length()); text.getCaret().setVisible(true); } public void removeUpdate(DocumentEvent e) { text.setCaretPosition(text.getText().length()); text.getCaret().setVisible(true); } }); Thread t2 = new Thread() { public void run() { runtime.evalScript("require 'irb'; IRB.start"); } }; t2.start(); } catch (IOException ioe) { ioe.printStackTrace(); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/d38821551a58969cd2593b463d93df5f32bf3c14/IRBApplet.java/clean/src/org/jruby/demo/IRBApplet.java |
byte[] buffer = new byte[256]; try { while (true) { int len = in.read(buffer); text.append(new String(buffer, 0, len)); text.setCaretPosition(text.getText().length()); } } catch (IOException ioe) { ioe.printStackTrace(); } } | runtime.evalScript("require 'irb'; require 'irb/completion'; IRB.start"); } | public void run() { byte[] buffer = new byte[256]; try { while (true) { int len = in.read(buffer); text.append(new String(buffer, 0, len)); text.setCaretPosition(text.getText().length()); } } catch (IOException ioe) { ioe.printStackTrace(); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/d38821551a58969cd2593b463d93df5f32bf3c14/IRBApplet.java/clean/src/org/jruby/demo/IRBApplet.java |
ds = (DatasetData) datasets[i]; | ds = (DatasetData) datasets[i]; | private DatasetsAddTableModel() { DatasetData ds; for (int i = 0; i < datasets.length; i++) { ds = (DatasetData) datasets[i]; data[i][0] = ds.getName(); data[i][1] = new Boolean(dats.contains(ds)); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1ed79437fda6d8f6b2566c6fe677bfaaf3352055/ProjectDatasetsPane.java/buggy/SRC/org/openmicroscopy/shoola/agents/datamng/editors/project/ProjectDatasetsPane.java |
System.err.println("value extracted ok"); | public static double[] extractValues(Attribute[] attributes, String elementName) throws IllegalArgumentException { if(attributes == null || elementName == null) { throw new IllegalArgumentException("Null parameters at " + "AbstractHeatMapMode.extractValues(Attribute[],String)"); } double[] values = new double[attributes.length]; for(int i=0;i<attributes.length;i++) { values[i] = parseElement(attributes[i],elementName); } return values; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b50398c0db3353156748a8d1155216615e5ba5d0/HeatMapUtils.java/clean/SRC/org/openmicroscopy/shoola/agents/browser/heatmap/HeatMapUtils.java |
|
System.err.println("getting attribute ("+attribute+")"); | public static double parseElement(Attribute attribute, String elementName) throws IllegalArgumentException { if(attribute == null || elementName == null) { throw new IllegalArgumentException("Null parameters at " + "AbstractHeatMapMode.parseElement(Attribute,String)"); } int index = 0; while((index = elementName.indexOf(".")) != -1) { String child = elementName.substring(0,index); attribute = attribute.getAttributeElement(child); elementName = elementName.substring(index+1); } try { double val = attribute.getDoubleElement(elementName).doubleValue(); return val; } catch(NullPointerException npe) { System.err.println("invalid element parsed: "+elementName); return Double.NaN; // might not be the right thing to do } catch(ClassCastException cce) { System.err.println("invalid element parsed:"+elementName); return Double.NaN; // might not be the right thing to do } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b50398c0db3353156748a8d1155216615e5ba5d0/HeatMapUtils.java/clean/SRC/org/openmicroscopy/shoola/agents/browser/heatmap/HeatMapUtils.java |
|
Rectangle r = new Rectangle(Math.min(prevX, x), Math.min(prevY, y), Math.abs(x - prevX), Math.abs(y - prevY)); g.drawRect(r.x, r.y, r.width, r.height); Color c = new Color(228, 228, 205); g.setPaint(c); g.fill(r); g.setPaint(Color.BLACK); g.draw(r); rect = r; | if (prevX != x && prevY != y) { Rectangle r = new Rectangle(Math.min(prevX, x), Math.min(prevY, y), Math.abs(x - prevX), Math.abs(y - prevY)); g.drawRect(r.x, r.y, r.width, r.height); Color c = new Color(228, 228, 205); g.setPaint(c); g.fill(r); g.setPaint(Color.BLACK); g.draw(r); rect = r; } | public void mouseDragged(MouseEvent evt) { if (dragging == false) return; int x = Math.min(evt.getX(), getSize().width - 1); x = Math.max(x, 0); int y = Math.min(evt.getY(), getSize().height - 1); y = Math.max(y, 0); paintComponent(g); Rectangle r = new Rectangle(Math.min(prevX, x), Math.min(prevY, y), Math.abs(x - prevX), Math.abs(y - prevY)); g.drawRect(r.x, r.y, r.width, r.height); Color c = new Color(228, 228, 205); g.setPaint(c); g.fill(r); g.setPaint(Color.BLACK); g.draw(r); rect = r; } | 52128 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52128/28c96f60591c1b90a990f7b2c1b87a91b077bc68/RectangleDrawerPanel.java/clean/RectangleOverlapSolver/placement/RectangleDrawerPanel.java |
rectangles.add(rect); | if (rect != null) rectangles.add(rect); | public void mouseReleased(MouseEvent evt) { if (dragging == false) return; dragging = false; g.dispose(); g = null; rectangles.add(rect); rect = null; } | 52128 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52128/28c96f60591c1b90a990f7b2c1b87a91b077bc68/RectangleDrawerPanel.java/clean/RectangleOverlapSolver/placement/RectangleDrawerPanel.java |
public void paintComponent(Graphics g) { // create the hardware accelerated image. createBackBuffer(); // Main rendering loop. Volatile images may lose their contents. // This loop will continually render to (and produce if neccessary) volatile images // until the rendering was completed successfully. do { // Validate the volatile image for the graphics configuration of this // component. If the volatile image doesn't apply for this graphics configuration // (in other words, the hardware acceleration doesn't apply for the new device) // then we need to re-create it. GraphicsConfiguration gc = this.getGraphicsConfiguration(); int valCode = volatileImg.validate(gc); // This means the device doesn't match up to this hardware accelerated image. if (valCode == VolatileImage.IMAGE_INCOMPATIBLE) { createBackBuffer(); // recreate the hardware accelerated image. } Graphics2D offscreenGraphics = (Graphics2D) volatileImg .getGraphics(); render(getWidth(), getHeight(), offscreenGraphics); // call core paint method. // paint back buffer to main graphics g.drawImage(volatileImg, 0, 0, this); // Test if content is lost } while (volatileImg.contentsLost()); } | 52128 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52128/28c96f60591c1b90a990f7b2c1b87a91b077bc68/RectangleDrawerPanel.java/clean/RectangleOverlapSolver/placement/RectangleDrawerPanel.java |
||
public void paintComponent(Graphics g) { // create the hardware accelerated image. createBackBuffer(); // Main rendering loop. Volatile images may lose their contents. // This loop will continually render to (and produce if neccessary) volatile images // until the rendering was completed successfully. do { // Validate the volatile image for the graphics configuration of this // component. If the volatile image doesn't apply for this graphics configuration // (in other words, the hardware acceleration doesn't apply for the new device) // then we need to re-create it. GraphicsConfiguration gc = this.getGraphicsConfiguration(); int valCode = volatileImg.validate(gc); // This means the device doesn't match up to this hardware accelerated image. if (valCode == VolatileImage.IMAGE_INCOMPATIBLE) { createBackBuffer(); // recreate the hardware accelerated image. } Graphics2D offscreenGraphics = (Graphics2D) volatileImg .getGraphics(); render(getWidth(), getHeight(), offscreenGraphics); // call core paint method. // paint back buffer to main graphics g.drawImage(volatileImg, 0, 0, this); // Test if content is lost } while (volatileImg.contentsLost()); } | 52128 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52128/28c96f60591c1b90a990f7b2c1b87a91b077bc68/RectangleDrawerPanel.java/clean/RectangleOverlapSolver/placement/RectangleDrawerPanel.java |
||
public void paintComponent(Graphics g) { // create the hardware accelerated image. createBackBuffer(); // Main rendering loop. Volatile images may lose their contents. // This loop will continually render to (and produce if neccessary) volatile images // until the rendering was completed successfully. do { // Validate the volatile image for the graphics configuration of this // component. If the volatile image doesn't apply for this graphics configuration // (in other words, the hardware acceleration doesn't apply for the new device) // then we need to re-create it. GraphicsConfiguration gc = this.getGraphicsConfiguration(); int valCode = volatileImg.validate(gc); // This means the device doesn't match up to this hardware accelerated image. if (valCode == VolatileImage.IMAGE_INCOMPATIBLE) { createBackBuffer(); // recreate the hardware accelerated image. } Graphics2D offscreenGraphics = (Graphics2D) volatileImg .getGraphics(); render(getWidth(), getHeight(), offscreenGraphics); // call core paint method. // paint back buffer to main graphics g.drawImage(volatileImg, 0, 0, this); // Test if content is lost } while (volatileImg.contentsLost()); } | 52128 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52128/28c96f60591c1b90a990f7b2c1b87a91b077bc68/RectangleDrawerPanel.java/clean/RectangleOverlapSolver/placement/RectangleDrawerPanel.java |
||
render(getWidth(), getHeight(), offscreenGraphics); | render(getWidth(), getHeight(), offscreenGraphics); | public void paintComponent(Graphics g) { // create the hardware accelerated image. createBackBuffer(); // Main rendering loop. Volatile images may lose their contents. // This loop will continually render to (and produce if neccessary) volatile images // until the rendering was completed successfully. do { // Validate the volatile image for the graphics configuration of this // component. If the volatile image doesn't apply for this graphics configuration // (in other words, the hardware acceleration doesn't apply for the new device) // then we need to re-create it. GraphicsConfiguration gc = this.getGraphicsConfiguration(); int valCode = volatileImg.validate(gc); // This means the device doesn't match up to this hardware accelerated image. if (valCode == VolatileImage.IMAGE_INCOMPATIBLE) { createBackBuffer(); // recreate the hardware accelerated image. } Graphics2D offscreenGraphics = (Graphics2D) volatileImg .getGraphics(); render(getWidth(), getHeight(), offscreenGraphics); // call core paint method. // paint back buffer to main graphics g.drawImage(volatileImg, 0, 0, this); // Test if content is lost } while (volatileImg.contentsLost()); } | 52128 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52128/28c96f60591c1b90a990f7b2c1b87a91b077bc68/RectangleDrawerPanel.java/clean/RectangleOverlapSolver/placement/RectangleDrawerPanel.java |
public void paintComponent(Graphics g) { // create the hardware accelerated image. createBackBuffer(); // Main rendering loop. Volatile images may lose their contents. // This loop will continually render to (and produce if neccessary) volatile images // until the rendering was completed successfully. do { // Validate the volatile image for the graphics configuration of this // component. If the volatile image doesn't apply for this graphics configuration // (in other words, the hardware acceleration doesn't apply for the new device) // then we need to re-create it. GraphicsConfiguration gc = this.getGraphicsConfiguration(); int valCode = volatileImg.validate(gc); // This means the device doesn't match up to this hardware accelerated image. if (valCode == VolatileImage.IMAGE_INCOMPATIBLE) { createBackBuffer(); // recreate the hardware accelerated image. } Graphics2D offscreenGraphics = (Graphics2D) volatileImg .getGraphics(); render(getWidth(), getHeight(), offscreenGraphics); // call core paint method. // paint back buffer to main graphics g.drawImage(volatileImg, 0, 0, this); // Test if content is lost } while (volatileImg.contentsLost()); } | 52128 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52128/28c96f60591c1b90a990f7b2c1b87a91b077bc68/RectangleDrawerPanel.java/clean/RectangleOverlapSolver/placement/RectangleDrawerPanel.java |
||
constraints = ((QPRectanglePlacement) p).constraintGenerator.getConstraints(); | constraints = ((QPRectanglePlacement) p).constraintGenerator .getConstraints(); | public void update(Observable p, Object arg1) { constraints = ((QPRectanglePlacement) p).constraintGenerator.getConstraints(); paintComponent(getGraphics()); } | 52128 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52128/28c96f60591c1b90a990f7b2c1b87a91b077bc68/RectangleDrawerPanel.java/clean/RectangleOverlapSolver/placement/RectangleDrawerPanel.java |
configureMenu(); | buildMenu(); | private MainWindow(String title, ImageIcon icon) { // Initialize and dock the menus configureMenu(); // Add Workspace Container getContentPane().setLayout(new BorderLayout()); // Add menubar this.setJMenuBar(mainWindowBar); this.getContentPane().add(topBar, BorderLayout.NORTH); setTitle(title + " - " + SparkManager.getSessionManager().getUsername()); setIconImage(icon.getImage()); // Setup WindowListener to be the proxy to the actual window listener // which cannot normally be used outside of the Window component because // of protected access. addWindowListener(new WindowAdapter() { /** * This event fires when the window has become active. * * @param e WindowEvent is not used. */ public void windowActivated(WindowEvent e) { fireWindowActivated(); } /** * Invoked when a window is de-activated. */ public void windowDeactivated(WindowEvent e) { } /** * This event fires whenever a user minimizes the window * from the toolbar. * * @param e WindowEvent is not used. */ public void windowIconified(WindowEvent e) { } /** * This event fires when the application is closing. * This allows Plugins to do any persistence or other * work before exiting. * * @param e WindowEvent is never used. */ public void windowClosing(WindowEvent e) { setVisible(false); // Show confirmation about hiding. // SparkManager.getNotificationsEngine().confirmHidingIfNecessary(); } }); this.addWindowFocusListener(new MainWindowFocusListener()); } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/97917d876023996dcd3bd220e88b62b3f6dcb7fc/MainWindow.java/buggy/src/java/org/jivesoftware/MainWindow.java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.