rem
stringlengths 0
477k
| add
stringlengths 0
313k
| context
stringlengths 6
599k
| meta
stringlengths 141
403
|
---|---|---|---|
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/Colon3Node.java/buggy/src/org/jruby/ast/Colon3Node.java |
public RubyArray(Ruby ruby) { this(ruby, new ArrayList()); | public RubyArray(final Ruby ruby, final ArrayList list) { super(ruby, ruby.getClasses().getArrayClass()); this.list = list; | public RubyArray(Ruby ruby) { this(ruby, new ArrayList()); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a42a5780d9d19f5b3f27bdc079684319c5596e54/RubyArray.java/buggy/org/jruby/RubyArray.java |
public static RubyArray create(Ruby ruby, RubyObject recv, RubyObject[] args) { RubyArray array = newArray(ruby, Arrays.asList(args)); | public final static RubyArray create(final Ruby ruby, final RubyObject recv, final RubyObject[] args) { final RubyArray array = newArray(ruby, args); | public static RubyArray create(Ruby ruby, RubyObject recv, RubyObject[] args) { RubyArray array = newArray(ruby, Arrays.asList(args)); array.setRubyClass((RubyClass) recv); return array; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a42a5780d9d19f5b3f27bdc079684319c5596e54/RubyArray.java/buggy/org/jruby/RubyArray.java |
public static RubyArray newArray(Ruby ruby, long len) { | public final static RubyArray newArray(final Ruby ruby, final long len) { | public static RubyArray newArray(Ruby ruby, long len) { return new RubyArray(ruby, new ArrayList((int) len)); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a42a5780d9d19f5b3f27bdc079684319c5596e54/RubyArray.java/buggy/org/jruby/RubyArray.java |
return new RubyArray(ruby) { | return new RubyArray(ruby, null) { | public static RubyArray nilArray(Ruby ruby) { return new RubyArray(ruby) { public boolean isNil() { return true; } }; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a42a5780d9d19f5b3f27bdc079684319c5596e54/RubyArray.java/buggy/org/jruby/RubyArray.java |
public RubyObject subseq(long beg, long len) { int length = getLength(); | public final RubyObject subseq(final long beg, long len) { final int length = getLength(); | public RubyObject subseq(long beg, long len) { int length = getLength(); if (beg > length) { return getRuby().getNil(); } if (beg < 0 || len < 0) { return getRuby().getNil(); } if (beg + len > length) { len = length - beg; } if (len < 0) { len = 0; } if (len == 0) { return newArray(getRuby(), 0); } RubyArray ary2 = newArray(getRuby(), list.subList((int) beg, (int) (len + beg))); return ary2; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a42a5780d9d19f5b3f27bdc079684319c5596e54/RubyArray.java/buggy/org/jruby/RubyArray.java |
if (beg > length) { return getRuby().getNil(); } if (beg < 0 || len < 0) { | if (beg > length || beg < 0 || len < 0) { | public RubyObject subseq(long beg, long len) { int length = getLength(); if (beg > length) { return getRuby().getNil(); } if (beg < 0 || len < 0) { return getRuby().getNil(); } if (beg + len > length) { len = length - beg; } if (len < 0) { len = 0; } if (len == 0) { return newArray(getRuby(), 0); } RubyArray ary2 = newArray(getRuby(), list.subList((int) beg, (int) (len + beg))); return ary2; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a42a5780d9d19f5b3f27bdc079684319c5596e54/RubyArray.java/buggy/org/jruby/RubyArray.java |
if (len < 0) { len = 0; } if (len == 0) { | if (len <= 0) { | public RubyObject subseq(long beg, long len) { int length = getLength(); if (beg > length) { return getRuby().getNil(); } if (beg < 0 || len < 0) { return getRuby().getNil(); } if (beg + len > length) { len = length - beg; } if (len < 0) { len = 0; } if (len == 0) { return newArray(getRuby(), 0); } RubyArray ary2 = newArray(getRuby(), list.subList((int) beg, (int) (len + beg))); return ary2; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a42a5780d9d19f5b3f27bdc079684319c5596e54/RubyArray.java/buggy/org/jruby/RubyArray.java |
RubyArray ary2 = newArray(getRuby(), list.subList((int) beg, (int) (len + beg))); | RubyArray ary2 = newArray(getRuby(), new ArrayList(list.subList((int) beg, (int) (len + beg)))); | public RubyObject subseq(long beg, long len) { int length = getLength(); if (beg > length) { return getRuby().getNil(); } if (beg < 0 || len < 0) { return getRuby().getNil(); } if (beg + len > length) { len = length - beg; } if (len < 0) { len = 0; } if (len == 0) { return newArray(getRuby(), 0); } RubyArray ary2 = newArray(getRuby(), list.subList((int) beg, (int) (len + beg))); return ary2; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a42a5780d9d19f5b3f27bdc079684319c5596e54/RubyArray.java/buggy/org/jruby/RubyArray.java |
localQuery = (LocalQuery) applicationContext.getBean(IQuery.class.getName()); localUpdate = (LocalUpdate) applicationContext.getBean(IUpdate.class.getName()); | public void create() { applicationContext = OmeroContext.getManagedServerContext(); serviceFactory = new ServiceFactory( applicationContext ); eventContext = (EventContext) applicationContext.getBean("eventContext"); log.debug("Created:\n"+getLogString()); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/bfcb48d728436e30c2268bb790693dc55abf5340/AbstractBean.java/buggy/components/ejb/src/ome/ro/ejb/AbstractBean.java |
|
int status = 0; | private static int runInterpreter(Reader reader, String filename) { Ruby runtime = Ruby.getDefaultInstance(); int status = 0; try { initializeRuntime(runtime, filename); Node parsedScript = getParsedScript(runtime, reader, filename); runtime.eval(parsedScript); } catch (RaiseException rExcptn) { runtime.printError(rExcptn.getException()); status = 1; } catch (ThrowJump throwJump) { runtime.printError(throwJump.getNameError()); status = 1; } runtime.tearDown(); return status; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/b23daaf392467ac2ccb6e6201c1cff058e788c40/Main.java/clean/src/org/jruby/Main.java |
|
initializeRuntime(runtime, filename); Node parsedScript = getParsedScript(runtime, reader, filename); runtime.eval(parsedScript); | runInterpreter(runtime, reader, filename); return 0; } catch (SystemExit e) { RubyFixnum status = (RubyFixnum)e.getException().getInstanceVariable("status"); return RubyNumeric.fix2int(status); | private static int runInterpreter(Reader reader, String filename) { Ruby runtime = Ruby.getDefaultInstance(); int status = 0; try { initializeRuntime(runtime, filename); Node parsedScript = getParsedScript(runtime, reader, filename); runtime.eval(parsedScript); } catch (RaiseException rExcptn) { runtime.printError(rExcptn.getException()); status = 1; } catch (ThrowJump throwJump) { runtime.printError(throwJump.getNameError()); status = 1; } runtime.tearDown(); return status; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/b23daaf392467ac2ccb6e6201c1cff058e788c40/Main.java/clean/src/org/jruby/Main.java |
status = 1; | return 1; | private static int runInterpreter(Reader reader, String filename) { Ruby runtime = Ruby.getDefaultInstance(); int status = 0; try { initializeRuntime(runtime, filename); Node parsedScript = getParsedScript(runtime, reader, filename); runtime.eval(parsedScript); } catch (RaiseException rExcptn) { runtime.printError(rExcptn.getException()); status = 1; } catch (ThrowJump throwJump) { runtime.printError(throwJump.getNameError()); status = 1; } runtime.tearDown(); return status; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/b23daaf392467ac2ccb6e6201c1cff058e788c40/Main.java/clean/src/org/jruby/Main.java |
status = 1; | return 1; | private static int runInterpreter(Reader reader, String filename) { Ruby runtime = Ruby.getDefaultInstance(); int status = 0; try { initializeRuntime(runtime, filename); Node parsedScript = getParsedScript(runtime, reader, filename); runtime.eval(parsedScript); } catch (RaiseException rExcptn) { runtime.printError(rExcptn.getException()); status = 1; } catch (ThrowJump throwJump) { runtime.printError(throwJump.getNameError()); status = 1; } runtime.tearDown(); return status; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/b23daaf392467ac2ccb6e6201c1cff058e788c40/Main.java/clean/src/org/jruby/Main.java |
runtime.tearDown(); return status; | private static int runInterpreter(Reader reader, String filename) { Ruby runtime = Ruby.getDefaultInstance(); int status = 0; try { initializeRuntime(runtime, filename); Node parsedScript = getParsedScript(runtime, reader, filename); runtime.eval(parsedScript); } catch (RaiseException rExcptn) { runtime.printError(rExcptn.getException()); status = 1; } catch (ThrowJump throwJump) { runtime.printError(throwJump.getNameError()); status = 1; } runtime.tearDown(); return status; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/b23daaf392467ac2ccb6e6201c1cff058e788c40/Main.java/clean/src/org/jruby/Main.java |
|
dirClass.defineSingletonMethod("open", CallbackFactory.getOptSingletonMethod(RubyDir.class, "open", RubyString.class)); | dirClass.defineSingletonMethod("open", CallbackFactory.getSingletonMethod(RubyDir.class, "open", RubyString.class)); | public static RubyClass createDirClass(Ruby ruby) { RubyClass dirClass = ruby.defineClass("Dir", ruby.getClasses().getObjectClass()); dirClass.includeModule(ruby.getRubyModule("Enumerable")); dirClass.defineSingletonMethod("new", CallbackFactory.getOptSingletonMethod(RubyDir.class, "newInstance")); dirClass.defineSingletonMethod("glob", CallbackFactory.getSingletonMethod(RubyDir.class, "glob", RubyString.class)); dirClass.defineSingletonMethod("[]", CallbackFactory.getSingletonMethod(RubyDir.class, "glob", RubyString.class)); // dirClass.defineAlias("[]", "glob"); dirClass.defineSingletonMethod("chdir", CallbackFactory.getSingletonMethod(RubyDir.class, "chdir", RubyString.class)); dirClass.defineSingletonMethod("chroot", CallbackFactory.getSingletonMethod(RubyDir.class, "chroot", RubyString.class)); dirClass.defineSingletonMethod("delete", CallbackFactory.getSingletonMethod(RubyDir.class, "delete", RubyString.class)); dirClass.defineSingletonMethod("foreach", CallbackFactory.getSingletonMethod(RubyDir.class, "foreach", RubyString.class)); dirClass.defineSingletonMethod("getwd", CallbackFactory.getSingletonMethod(RubyDir.class, "getwd")); dirClass.defineSingletonMethod("pwd", CallbackFactory.getSingletonMethod(RubyDir.class, "getwd")); // dirClass.defineAlias("pwd", "getwd"); dirClass.defineSingletonMethod("mkdir", CallbackFactory.getOptSingletonMethod(RubyDir.class, "mkdir")); dirClass.defineSingletonMethod("open", CallbackFactory.getOptSingletonMethod(RubyDir.class, "open", RubyString.class)); dirClass.defineSingletonMethod("rmdir", CallbackFactory.getSingletonMethod(RubyDir.class, "rmdir", RubyString.class)); dirClass.defineSingletonMethod("unlink", CallbackFactory.getSingletonMethod(RubyDir.class, "rmdir", RubyString.class)); dirClass.defineSingletonMethod("delete", CallbackFactory.getSingletonMethod(RubyDir.class, "rmdir", RubyString.class)); // dirClass.defineAlias("unlink", "rmdir"); // dirClass.defineAlias("delete", "rmdir"); dirClass.defineMethod("close", CallbackFactory.getMethod(RubyDir.class, "close")); dirClass.defineMethod("each", CallbackFactory.getMethod(RubyDir.class, "each")); dirClass.defineMethod("tell", CallbackFactory.getMethod(RubyDir.class, "tell")); dirClass.defineAlias("pos", "tell"); dirClass.defineMethod("seek", CallbackFactory.getMethod(RubyDir.class, "seek", RubyInteger.class)); dirClass.defineAlias("pos=", "seek"); dirClass.defineMethod("read", CallbackFactory.getMethod(RubyDir.class, "read")); dirClass.defineMethod("rewind", CallbackFactory.getMethod(RubyDir.class, "rewind")); dirClass.defineMethod("initialize", CallbackFactory.getMethod(RubyDir.class, "initialize", RubyString.class)); return dirClass; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/8c092e5bd528424763aecdc0db8bb50133807907/RubyDir.java/clean/org/jruby/RubyDir.java |
dirClass.defineMethod("seek", CallbackFactory.getMethod(RubyDir.class, "seek", RubyInteger.class)); | dirClass.defineMethod("seek", CallbackFactory.getMethod(RubyDir.class, "seek", RubyFixnum.class)); | public static RubyClass createDirClass(Ruby ruby) { RubyClass dirClass = ruby.defineClass("Dir", ruby.getClasses().getObjectClass()); dirClass.includeModule(ruby.getRubyModule("Enumerable")); dirClass.defineSingletonMethod("new", CallbackFactory.getOptSingletonMethod(RubyDir.class, "newInstance")); dirClass.defineSingletonMethod("glob", CallbackFactory.getSingletonMethod(RubyDir.class, "glob", RubyString.class)); dirClass.defineSingletonMethod("[]", CallbackFactory.getSingletonMethod(RubyDir.class, "glob", RubyString.class)); // dirClass.defineAlias("[]", "glob"); dirClass.defineSingletonMethod("chdir", CallbackFactory.getSingletonMethod(RubyDir.class, "chdir", RubyString.class)); dirClass.defineSingletonMethod("chroot", CallbackFactory.getSingletonMethod(RubyDir.class, "chroot", RubyString.class)); dirClass.defineSingletonMethod("delete", CallbackFactory.getSingletonMethod(RubyDir.class, "delete", RubyString.class)); dirClass.defineSingletonMethod("foreach", CallbackFactory.getSingletonMethod(RubyDir.class, "foreach", RubyString.class)); dirClass.defineSingletonMethod("getwd", CallbackFactory.getSingletonMethod(RubyDir.class, "getwd")); dirClass.defineSingletonMethod("pwd", CallbackFactory.getSingletonMethod(RubyDir.class, "getwd")); // dirClass.defineAlias("pwd", "getwd"); dirClass.defineSingletonMethod("mkdir", CallbackFactory.getOptSingletonMethod(RubyDir.class, "mkdir")); dirClass.defineSingletonMethod("open", CallbackFactory.getOptSingletonMethod(RubyDir.class, "open", RubyString.class)); dirClass.defineSingletonMethod("rmdir", CallbackFactory.getSingletonMethod(RubyDir.class, "rmdir", RubyString.class)); dirClass.defineSingletonMethod("unlink", CallbackFactory.getSingletonMethod(RubyDir.class, "rmdir", RubyString.class)); dirClass.defineSingletonMethod("delete", CallbackFactory.getSingletonMethod(RubyDir.class, "rmdir", RubyString.class)); // dirClass.defineAlias("unlink", "rmdir"); // dirClass.defineAlias("delete", "rmdir"); dirClass.defineMethod("close", CallbackFactory.getMethod(RubyDir.class, "close")); dirClass.defineMethod("each", CallbackFactory.getMethod(RubyDir.class, "each")); dirClass.defineMethod("tell", CallbackFactory.getMethod(RubyDir.class, "tell")); dirClass.defineAlias("pos", "tell"); dirClass.defineMethod("seek", CallbackFactory.getMethod(RubyDir.class, "seek", RubyInteger.class)); dirClass.defineAlias("pos=", "seek"); dirClass.defineMethod("read", CallbackFactory.getMethod(RubyDir.class, "read")); dirClass.defineMethod("rewind", CallbackFactory.getMethod(RubyDir.class, "rewind")); dirClass.defineMethod("initialize", CallbackFactory.getMethod(RubyDir.class, "initialize", RubyString.class)); return dirClass; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/8c092e5bd528424763aecdc0db8bb50133807907/RubyDir.java/clean/org/jruby/RubyDir.java |
public static RubyArray glob(IRubyObject recv, RubyString pat) { // FIXME this is only a small subset of the functionallity of this function String pattern = pat.toString(); /*if (pattern.indexOf("**") != -1 || pattern.indexOf("?") != -1) { throw new NotImplementedError(); }*/ String[] files = new Glob(pattern).getNames(); // new File(".").list(new GlobFilenameFilter(pattern)); return RubyArray.newArray(recv.getRuntime(), JavaUtil.convertJavaArrayToRuby(recv.getRuntime(), files)); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/8c092e5bd528424763aecdc0db8bb50133807907/RubyDir.java/clean/org/jruby/RubyDir.java |
||
/*if (pattern.indexOf("**") != -1 || pattern.indexOf("?") != -1) { throw new NotImplementedError(); }*/ | public static RubyArray glob(IRubyObject recv, RubyString pat) { // FIXME this is only a small subset of the functionallity of this function String pattern = pat.toString(); /*if (pattern.indexOf("**") != -1 || pattern.indexOf("?") != -1) { throw new NotImplementedError(); }*/ String[] files = new Glob(pattern).getNames(); // new File(".").list(new GlobFilenameFilter(pattern)); return RubyArray.newArray(recv.getRuntime(), JavaUtil.convertJavaArrayToRuby(recv.getRuntime(), files)); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/8c092e5bd528424763aecdc0db8bb50133807907/RubyDir.java/clean/org/jruby/RubyDir.java |
|
public static RubyArray glob(IRubyObject recv, RubyString pat) { // FIXME this is only a small subset of the functionallity of this function String pattern = pat.toString(); /*if (pattern.indexOf("**") != -1 || pattern.indexOf("?") != -1) { throw new NotImplementedError(); }*/ String[] files = new Glob(pattern).getNames(); // new File(".").list(new GlobFilenameFilter(pattern)); return RubyArray.newArray(recv.getRuntime(), JavaUtil.convertJavaArrayToRuby(recv.getRuntime(), files)); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/8c092e5bd528424763aecdc0db8bb50133807907/RubyDir.java/clean/org/jruby/RubyDir.java |
||
return new RubyString(getRuntime(), snapshot[pos++]); | pos++; if (pos >= snapshot.length) { return RubyString.nilString(runtime); } return new RubyString(getRuntime(), snapshot[pos]); | public RubyString read() { return new RubyString(getRuntime(), snapshot[pos++]); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/8c092e5bd528424763aecdc0db8bb50133807907/RubyDir.java/clean/org/jruby/RubyDir.java |
getBlock().push(null, new IterateMethod(blockMethod, data2), getRubyTopSelf()); | getBlockStack().push(null, new IterateMethod(blockMethod, data2), getRubyTopSelf()); | public RubyObject iterate(Callback iterateMethod, RubyObject data1, Callback blockMethod, RubyObject data2) { // VALUE self = ruby_top_self; getIterStack().push(Iter.ITER_PRE); getBlock().push(null, new IterateMethod(blockMethod, data2), getRubyTopSelf()); try { while (true) { try { return iterateMethod.execute(data1, null, this); } catch (BreakJump bExcptn) { return getNil(); } catch (ReturnException rExcptn) { return rExcptn.getReturnValue(); } catch (RetryException rExcptn) { } } } finally { getIterStack().pop(); getBlock().pop(); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/8db42974495981011f558bcce15e2dfc28681a76/Ruby.java/clean/org/jruby/Ruby.java |
getBlock().pop(); | getBlockStack().pop(); | public RubyObject iterate(Callback iterateMethod, RubyObject data1, Callback blockMethod, RubyObject data2) { // VALUE self = ruby_top_self; getIterStack().push(Iter.ITER_PRE); getBlock().push(null, new IterateMethod(blockMethod, data2), getRubyTopSelf()); try { while (true) { try { return iterateMethod.execute(data1, null, this); } catch (BreakJump bExcptn) { return getNil(); } catch (ReturnException rExcptn) { return rExcptn.getReturnValue(); } catch (RetryException rExcptn) { } } } finally { getIterStack().pop(); getBlock().pop(); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/8db42974495981011f558bcce15e2dfc28681a76/Ruby.java/clean/org/jruby/Ruby.java |
AndFilter presenceFilter = new AndFilter(new PacketTypeFilter(Presence.class), new FromContainsFilter(this.participantJID)); | AndFilter presenceFilter = new AndFilter(new PacketTypeFilter(Presence.class), new BareAddressFilter(participantJID)); | public ChatRoomImpl(final String participantJID, String participantNickname, String title) { this.participantJID = participantJID; this.participantNickname = participantNickname; AndFilter presenceFilter = new AndFilter(new PacketTypeFilter(Presence.class), new FromContainsFilter(this.participantJID)); // Register PacketListeners AndFilter messageFilter = new AndFilter(new PacketTypeFilter(Message.class), new FromContainsFilter(participantJID)); SparkManager.getConnection().addPacketListener(this, messageFilter); SparkManager.getConnection().addPacketListener(this, presenceFilter); // The roomname will be the participantJID this.roomname = participantJID; // Use the agents username as the Tab Title this.tabTitle = title; // The name of the room will be the node of the user jid + conversation. final SimpleDateFormat formatter = new SimpleDateFormat("h:mm a"); this.roomTitle = participantNickname; // Add RoomInfo this.getSplitPane().setRightComponent(null); getSplitPane().setDividerSize(0); roster = SparkManager.getConnection().getRoster(); presence = roster.getPresence(participantJID); RosterEntry entry = roster.getEntry(participantJID); tabIcon = SparkManager.getUserManager().getTabIconForPresence(presence); PacketFilter filter = new AndFilter(new PacketTypeFilter(Presence.class), new FromContainsFilter(participantJID)); SparkManager.getConnection().addPacketListener(new PacketListener() { public void processPacket(Packet packet) { presence = (Presence)packet; } }, filter); // Create toolbar buttons. ChatRoomButton infoButton = new ChatRoomButton("", SparkRes.getImageIcon(SparkRes.PROFILE_IMAGE_24x24)); infoButton.setToolTipText(Res.getString("message.view.information.about.this.user")); // Create basic toolbar. getToolBar().addChatRoomButton(infoButton); // If the user is not in the roster, then allow user to add them. if (entry == null && !StringUtils.parseResource(participantJID).equals(participantNickname)) { ChatRoomButton addToRosterButton = new ChatRoomButton("", SparkRes.getImageIcon(SparkRes.ADD_IMAGE_24x24)); addToRosterButton.setToolTipText(Res.getString("message.add.this.user.to.your.roster")); getToolBar().addChatRoomButton(addToRosterButton); addToRosterButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { RosterDialog rosterDialog = new RosterDialog(); rosterDialog.setDefaultJID(participantJID); rosterDialog.setDefaultNickname(getParticipantNickname()); rosterDialog.showRosterDialog(SparkManager.getChatManager().getChatContainer().getChatFrame()); } }); } // Show VCard. infoButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { VCardManager vcard = SparkManager.getVCardManager(); vcard.viewProfile(participantJID, SparkManager.getChatManager().getChatContainer()); } }); // If this is a private chat from a group chat room, do not show toolbar. if (StringUtils.parseResource(participantJID).equals(participantNickname)) { getToolBar().setVisible(false); } typingTimer = new Timer(2000, new ActionListener() { public void actionPerformed(ActionEvent e) { if(!sendTypingNotification) { return; } long now = System.currentTimeMillis(); if (now - lastTypedCharTime > 2000) { if (!sendNotification) { // send cancel SparkManager.getMessageEventManager().sendCancelledNotification(getParticipantJID(), threadID); sendNotification = true; } } } }); typingTimer.start(); lastActivity = System.currentTimeMillis(); // Add VCard Panel final VCardPanel vcardPanel = new VCardPanel(participantJID); getToolBar().add(vcardPanel, new GridBagConstraints(0, 1, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/51b0677cc8acdda79d63621852ba4cf2b2ae690b/ChatRoomImpl.java/clean/src/java/org/jivesoftware/spark/ui/rooms/ChatRoomImpl.java |
AndFilter messageFilter = new AndFilter(new PacketTypeFilter(Message.class), new FromContainsFilter(participantJID)); | AndFilter messageFilter = new AndFilter(new PacketTypeFilter(Message.class), new BareAddressFilter(participantJID)); | public ChatRoomImpl(final String participantJID, String participantNickname, String title) { this.participantJID = participantJID; this.participantNickname = participantNickname; AndFilter presenceFilter = new AndFilter(new PacketTypeFilter(Presence.class), new FromContainsFilter(this.participantJID)); // Register PacketListeners AndFilter messageFilter = new AndFilter(new PacketTypeFilter(Message.class), new FromContainsFilter(participantJID)); SparkManager.getConnection().addPacketListener(this, messageFilter); SparkManager.getConnection().addPacketListener(this, presenceFilter); // The roomname will be the participantJID this.roomname = participantJID; // Use the agents username as the Tab Title this.tabTitle = title; // The name of the room will be the node of the user jid + conversation. final SimpleDateFormat formatter = new SimpleDateFormat("h:mm a"); this.roomTitle = participantNickname; // Add RoomInfo this.getSplitPane().setRightComponent(null); getSplitPane().setDividerSize(0); roster = SparkManager.getConnection().getRoster(); presence = roster.getPresence(participantJID); RosterEntry entry = roster.getEntry(participantJID); tabIcon = SparkManager.getUserManager().getTabIconForPresence(presence); PacketFilter filter = new AndFilter(new PacketTypeFilter(Presence.class), new FromContainsFilter(participantJID)); SparkManager.getConnection().addPacketListener(new PacketListener() { public void processPacket(Packet packet) { presence = (Presence)packet; } }, filter); // Create toolbar buttons. ChatRoomButton infoButton = new ChatRoomButton("", SparkRes.getImageIcon(SparkRes.PROFILE_IMAGE_24x24)); infoButton.setToolTipText(Res.getString("message.view.information.about.this.user")); // Create basic toolbar. getToolBar().addChatRoomButton(infoButton); // If the user is not in the roster, then allow user to add them. if (entry == null && !StringUtils.parseResource(participantJID).equals(participantNickname)) { ChatRoomButton addToRosterButton = new ChatRoomButton("", SparkRes.getImageIcon(SparkRes.ADD_IMAGE_24x24)); addToRosterButton.setToolTipText(Res.getString("message.add.this.user.to.your.roster")); getToolBar().addChatRoomButton(addToRosterButton); addToRosterButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { RosterDialog rosterDialog = new RosterDialog(); rosterDialog.setDefaultJID(participantJID); rosterDialog.setDefaultNickname(getParticipantNickname()); rosterDialog.showRosterDialog(SparkManager.getChatManager().getChatContainer().getChatFrame()); } }); } // Show VCard. infoButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { VCardManager vcard = SparkManager.getVCardManager(); vcard.viewProfile(participantJID, SparkManager.getChatManager().getChatContainer()); } }); // If this is a private chat from a group chat room, do not show toolbar. if (StringUtils.parseResource(participantJID).equals(participantNickname)) { getToolBar().setVisible(false); } typingTimer = new Timer(2000, new ActionListener() { public void actionPerformed(ActionEvent e) { if(!sendTypingNotification) { return; } long now = System.currentTimeMillis(); if (now - lastTypedCharTime > 2000) { if (!sendNotification) { // send cancel SparkManager.getMessageEventManager().sendCancelledNotification(getParticipantJID(), threadID); sendNotification = true; } } } }); typingTimer.start(); lastActivity = System.currentTimeMillis(); // Add VCard Panel final VCardPanel vcardPanel = new VCardPanel(participantJID); getToolBar().add(vcardPanel, new GridBagConstraints(0, 1, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/51b0677cc8acdda79d63621852ba4cf2b2ae690b/ChatRoomImpl.java/clean/src/java/org/jivesoftware/spark/ui/rooms/ChatRoomImpl.java |
ruby = Ruby.getDefaultInstance(null); | if (ruby == null) { ruby = Ruby.getDefaultInstance(null); } | public void setUp() { ruby = Ruby.getDefaultInstance(null); rubyTime = ruby.getClasses().getTimeClass(); RubyObject[] args = new RubyObject[1]; args[0] = RubyFixnum.newFixnum(ruby, 18000000); nineTeenSeventy = RubyTime.s_at(ruby, rubyTime, args); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/68ea79c613972391a1d5009c8c9590b9b87d509a/TestRubyTime.java/buggy/org/jruby/test/TestRubyTime.java |
Thread.sleep(1000); | Thread.sleep(100); | public void testTimeNow() { RubyTime myTime = RubyTime.s_new(ruby, rubyTime); try { Thread.sleep(1000); } catch (InterruptedException e) { fail("Unexpected InterruptedException"); } Date now = new Date(); assertTrue(now.after(myTime.getJavaDate())); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/68ea79c613972391a1d5009c8c9590b9b87d509a/TestRubyTime.java/buggy/org/jruby/test/TestRubyTime.java |
createWindowsMenu(); | ImViewerUI(String title) { super(title); loadingWindow = new LoadingWindow(this); createWindowsMenu(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/8b5ed57b1a06841fc56344f3b4489a5dc633e6c0/ImViewerUI.java/clean/SRC/org/openmicroscopy/shoola/agents/imviewer/view/ImViewerUI.java |
|
TaskBar tb = ImViewerAgent.getRegistry().getTaskBar(); tb.addToMenu(TaskBar.WINDOW_MENU, windowsMenu); | private JMenuBar createMenuBar() { JMenuBar menuBar = new JMenuBar(); menuBar.add(createControlsMenu()); menuBar.add(createZoomMenu()); menuBar.add(createRatingMenu()); //menuBar.add(windowsMenu); //Adds windows menu to the task bar menu. TaskBar tb = ImViewerAgent.getRegistry().getTaskBar(); tb.addToMenu(TaskBar.WINDOW_MENU, windowsMenu); return menuBar; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/8b5ed57b1a06841fc56344f3b4489a5dc633e6c0/ImViewerUI.java/clean/SRC/org/openmicroscopy/shoola/agents/imviewer/view/ImViewerUI.java |
|
public String onPrepareStatement(String sql) { // start StringBuilder sb = new StringBuilder(); String[] first = sql.split("\\sfrom\\s"); sb.append(first[0]); if (first.length == 1) { return sb.toString(); } else if (first.length == 2) { // from sb.append("\n from "); String[] second = first[1].split("\\swhere\\s"); sb.append(second[0]); if (second.length == 1) { return sb.toString(); } else if (second.length == 2) { // where sb.append("\n where "); sb.append(second[1]); return sb.toString(); } } throw new InternalException("Assumptions about the number of " + "\"froms\" and \"wheres\" in sql query failed. "); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/eb1076fdd0ffc70d64cfdf60fab495fd57a62014/OmeroInterceptor.java/clean/components/server/src/ome/tools/hibernate/OmeroInterceptor.java |
||
if (first.length == 1) { return sb.toString(); } else if (first.length == 2) { | for (int i = 1; i < first.length; i++) { | public String onPrepareStatement(String sql) { // start StringBuilder sb = new StringBuilder(); String[] first = sql.split("\\sfrom\\s"); sb.append(first[0]); if (first.length == 1) { return sb.toString(); } else if (first.length == 2) { // from sb.append("\n from "); String[] second = first[1].split("\\swhere\\s"); sb.append(second[0]); if (second.length == 1) { return sb.toString(); } else if (second.length == 2) { // where sb.append("\n where "); sb.append(second[1]); return sb.toString(); } } throw new InternalException("Assumptions about the number of " + "\"froms\" and \"wheres\" in sql query failed. "); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/eb1076fdd0ffc70d64cfdf60fab495fd57a62014/OmeroInterceptor.java/clean/components/server/src/ome/tools/hibernate/OmeroInterceptor.java |
String[] second = first[1].split("\\swhere\\s"); sb.append(second[0]); if (second.length == 1) { return sb.toString(); } else if (second.length == 2) { sb.append("\n where "); sb.append(second[1]); return sb.toString(); } | sb.append(first[i]); | public String onPrepareStatement(String sql) { // start StringBuilder sb = new StringBuilder(); String[] first = sql.split("\\sfrom\\s"); sb.append(first[0]); if (first.length == 1) { return sb.toString(); } else if (first.length == 2) { // from sb.append("\n from "); String[] second = first[1].split("\\swhere\\s"); sb.append(second[0]); if (second.length == 1) { return sb.toString(); } else if (second.length == 2) { // where sb.append("\n where "); sb.append(second[1]); return sb.toString(); } } throw new InternalException("Assumptions about the number of " + "\"froms\" and \"wheres\" in sql query failed. "); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/eb1076fdd0ffc70d64cfdf60fab495fd57a62014/OmeroInterceptor.java/clean/components/server/src/ome/tools/hibernate/OmeroInterceptor.java |
throw new InternalException("Assumptions about the number of " + "\"froms\" and \"wheres\" in sql query failed. "); | String[] second = sb.toString().split("\\swhere\\s"); sb = new StringBuilder(); sb.append(second[0]); for (int j = 1; j < second.length; j++) { sb.append("\n where "); sb.append(second[j]); } return sb.toString(); | public String onPrepareStatement(String sql) { // start StringBuilder sb = new StringBuilder(); String[] first = sql.split("\\sfrom\\s"); sb.append(first[0]); if (first.length == 1) { return sb.toString(); } else if (first.length == 2) { // from sb.append("\n from "); String[] second = first[1].split("\\swhere\\s"); sb.append(second[0]); if (second.length == 1) { return sb.toString(); } else if (second.length == 2) { // where sb.append("\n where "); sb.append(second[1]); return sb.toString(); } } throw new InternalException("Assumptions about the number of " + "\"froms\" and \"wheres\" in sql query failed. "); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/eb1076fdd0ffc70d64cfdf60fab495fd57a62014/OmeroInterceptor.java/clean/components/server/src/ome/tools/hibernate/OmeroInterceptor.java |
wData = Helper.createPlane(planeDef, i, metadata, pixels); | wData = PlaneFactory.createPlane(planeDef, i, metadata, pixels); | RGBBuffer render(Renderer ctx, PlaneDef planeDef) throws IOException, QuantizationException { //Set the context and retrieve objects we're gonna use. renderer = ctx; QuantumManager qManager = renderer.getQuantumManager(); PixelBuffer pixels = renderer.getPixels(); Pixels metadata = renderer.getMetadata(); ChannelBinding[] cBindings = renderer.getChannelBindings(); RenderingStats performanceStats = renderer.getStats(); //Initialize sizeX1 and sizeX2 according to the plane definition and //create the RGB buffer. initAxesSize(planeDef, metadata); performanceStats.startMalloc(); log.info("Creating RGBBuffer of size " + sizeX1 + "x" + sizeX2); RGBBuffer renderedDataBuf = new RGBBuffer(sizeX1, sizeX2); performanceStats.endMalloc(); //Process the first active wavelength. Plane2D wData; for (int i = 0; i < cBindings.length; i++) { if (cBindings[i].getActive().booleanValue()) { //Get the raw data. performanceStats.startIO(i); wData = Helper.createPlane(planeDef, i, metadata, pixels); performanceStats.endIO(i); try { //Transform it into an RGB image. performanceStats.startRendering(); renderWave(renderedDataBuf, wData, cBindings[i].getColor(), qManager.getStrategyFor(i)); performanceStats.endRendering(); } catch (QuantizationException e) { e.setWavelength(i); throw e; } break; } } //Done. return renderedDataBuf; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b2d1563defffc9fa654271400d754843f42e2810/GreyScaleStrategy.java/buggy/components/rendering/src/omeis/providers/re/GreyScaleStrategy.java |
System.err.println("Render wave."); | private void renderWave(RGBBuffer dataBuf, Plane2D plane, Color color, QuantumStrategy qs) throws QuantizationException { CodomainChain cc = renderer.getCodomainChain(); int x1, x2, discreteValue, pixelIndex; byte value; float alpha = color.getAlpha().floatValue()/255; byte[] red = dataBuf.getRedBand(), green = dataBuf.getGreenBand(), blue = dataBuf.getBlueBand(); for (x2 = 0; x2 < sizeX2; ++x2) { for (x1 = 0; x1 < sizeX1; ++x1) { pixelIndex = sizeX1*x2+x1; discreteValue = qs.quantize(plane.getPixelValue(x1, x2)); discreteValue = cc.transform(discreteValue); value = (byte) (discreteValue*alpha); red[pixelIndex] = value; green[pixelIndex] = value; blue[pixelIndex] = value; } } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b2d1563defffc9fa654271400d754843f42e2810/GreyScaleStrategy.java/buggy/components/rendering/src/omeis/providers/re/GreyScaleStrategy.java |
|
public StatusItem getItemFromPresence(Presence presence) { // Handle offline presence if (presence == null) { return null; } Iterator statusItemIterator = dndList.iterator(); while (statusItemIterator.hasNext()) { StatusItem item = (StatusItem)statusItemIterator.next(); if ((presence.getMode() == item.getPresence().getMode()) && (presence.getType() == item.getPresence().getType())) { return item; } } return null; } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/fea468feedc212a5d28808907b5dfa7da841d129/StatusBar.java/buggy/src/java/org/jivesoftware/spark/ui/status/StatusBar.java |
||
dndList.add(phone); | private void populateDndList() { final ImageIcon availableIcon = SparkRes.getImageIcon(SparkRes.GREEN_BALL); final ImageIcon awayIcon = SparkRes.getImageIcon(SparkRes.IM_AWAY); final ImageIcon dndIcon = SparkRes.getImageIcon(SparkRes.IM_DND); StatusItem online = new StatusItem(new Presence(Presence.Type.available, "Online", -1, Presence.Mode.available), availableIcon); StatusItem freeToChat = new StatusItem(new Presence(Presence.Type.available, "Free To Chat", -1, Presence.Mode.chat), SparkRes.getImageIcon(SparkRes.FREE_TO_CHAT_IMAGE)); StatusItem away = new StatusItem(new Presence(Presence.Type.available, "Away", -1, Presence.Mode.away), awayIcon); StatusItem dnd = new StatusItem(new Presence(Presence.Type.available, "Do Not Disturb", -1, Presence.Mode.dnd), dndIcon); StatusItem extendedAway = new StatusItem(new Presence(Presence.Type.available, "Extended Away", -1, Presence.Mode.xa), awayIcon); dndList.add(freeToChat); dndList.add(online); dndList.add(away); dndList.add(extendedAway); dndList.add(dnd); // Set default presence icon (Avaialble) statusPanel.setIcon(availableIcon); } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/fea468feedc212a5d28808907b5dfa7da841d129/StatusBar.java/buggy/src/java/org/jivesoftware/spark/ui/status/StatusBar.java |
|
public void setNickname(String nickname){ | public void setNickname(String nickname) { | public void setNickname(String nickname){ nicknameLabel.setText(nickname); } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/fea468feedc212a5d28808907b5dfa7da841d129/StatusBar.java/buggy/src/java/org/jivesoftware/spark/ui/status/StatusBar.java |
if (!failure) | if (!failure && !(arg0.getThis() instanceof StatefulServiceInterface) ) | public Object invoke(MethodInvocation arg0) throws Throwable { secSys.setCurrentDetails(); Boolean readOnly = (Boolean) ht.execute(new CheckReadOnlyAction(secSys)); if ( readOnly != null && readOnly.booleanValue()) { if (log.isDebugEnabled()) { log.debug("Tx readonly. Not saving current event."); } } else { secSys.setCurrentEvent((Event)ht.merge(secSys.getCurrentEvent())); } log.info(String.format("Auth:\tuser=%s,group=%s,event=%s(%s)", secSys.currentUserId(),secSys.currentGroup().getId(), secSys.currentEvent().getId(),secSys.currentEvent().getType())); boolean failure = false; try { ht.execute(new EnableFilterAction(secSys)); Object retVal = arg0.proceed(); return retVal; } catch (Exception ex){ failure = true; throw ex; } finally { try { if (!failure) { ht.flush(); ht.execute(new CheckDirtyAction(secSys)); ht.execute(new DisableFilterAction(secSys)); } } finally { secSys.clearCurrentDetails(); } } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9f81640b646007bc314d887c6a377cb96911b12c/EventHandler.java/clean/components/server/src/ome/tools/hibernate/EventHandler.java |
{ tabs = new JTabbedPane(JTabbedPane.TOP, JTabbedPane.WRAP_TAB_LAYOUT); tabs.setAlignmentX(LEFT_ALIGNMENT); tabs.insertTab("Mapping", im.getIcon(IconManager.MAPPING), mappingPanel, null, POS_MAPPING); tabs.insertTab(control.getModelType()+" Model", im.getIcon(IconManager.GREYSCALE), modelPane, null, POS_MODEL); tabs.insertTab("Options", im.getIcon(IconManager.CODOMAIN), quantumPane.getCodomainPane(), null, POS_CD); getContentPane().setLayout(new BorderLayout(0, 0)); getContentPane().add(new ToolBar(control, registry), BorderLayout.NORTH); getContentPane().add(tabs, BorderLayout.CENTER); } | { tabs = new JTabbedPane(JTabbedPane.TOP, JTabbedPane.WRAP_TAB_LAYOUT); tabs.setAlignmentX(LEFT_ALIGNMENT); tabs.insertTab("Mapping", im.getIcon(IconManager.MAPPING), mappingPanel, null, POS_MAPPING); tabs.insertTab(control.getModelType()+" Model", control.getModelIcon(), modelPane, null, POS_MODEL); tabs.insertTab("Options", im.getIcon(IconManager.CODOMAIN), quantumPane.getCodomainPane(), null, POS_CD); getContentPane().setLayout(new BorderLayout(0, 0)); getContentPane().add(new ToolBar(control, registry), BorderLayout.NORTH); getContentPane().add(tabs, BorderLayout.CENTER); } | private void buildGUI() { //create and initialize the tabs tabs = new JTabbedPane(JTabbedPane.TOP, JTabbedPane.WRAP_TAB_LAYOUT); tabs.setAlignmentX(LEFT_ALIGNMENT); tabs.insertTab("Mapping", im.getIcon(IconManager.MAPPING), mappingPanel, null, POS_MAPPING); tabs.insertTab(control.getModelType()+" Model", im.getIcon(IconManager.GREYSCALE), modelPane, null, POS_MODEL); tabs.insertTab("Options", im.getIcon(IconManager.CODOMAIN), quantumPane.getCodomainPane(), null, POS_CD); getContentPane().setLayout(new BorderLayout(0, 0)); getContentPane().add(new ToolBar(control, registry), BorderLayout.NORTH); getContentPane().add(tabs, BorderLayout.CENTER); //setIconImage(IconManager.getOMEImageIcon()); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1722ebf9ac60fc8e45cdc8d0049e85db5b86715c/RenderingAgtUIF.java/clean/SRC/org/openmicroscopy/shoola/agents/rnd/RenderingAgtUIF.java |
{ mappingPanel.setLayout(new BorderLayout(0, 0)); mappingPanel.add(quantumPane.getGRPane(), BorderLayout.NORTH); mappingPanel.add(quantumPane.getDomainPane(), BorderLayout.CENTER); } | { mappingPanel.setLayout(new BorderLayout(0, 0)); mappingPanel.add(quantumPane.getGRPane(), BorderLayout.NORTH); mappingPanel.add(quantumPane.getDomainPane(), BorderLayout.CENTER); } | private void buildMappingPanel() { mappingPanel.setLayout(new BorderLayout(0, 0)); mappingPanel.add(quantumPane.getGRPane(), BorderLayout.NORTH); mappingPanel.add(quantumPane.getDomainPane(), BorderLayout.CENTER); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1722ebf9ac60fc8e45cdc8d0049e85db5b86715c/RenderingAgtUIF.java/clean/SRC/org/openmicroscopy/shoola/agents/rnd/RenderingAgtUIF.java |
{ JMenu menu = new JMenu("Controls"); /* JMenuItem menuItem = new JMenuItem("Save", im.getIcon(IconManager.SAVE_SETTINGS)); control.setMenuItemListener(menuItem, RenderingAgtCtrl.SAVE); menu.add(menuItem); */ JMenuItem menuItem = new JMenuItem("Reset defaults", im.getIcon(IconManager.RESET_DEFAULTS)); control.setMenuItemListener(menuItem, RenderingAgtCtrl.RESET_DEFAULTS); menu.add(menuItem); return menu; } | { JMenu menu = new JMenu("Controls"); JMenuItem menuItem = new JMenuItem("Save", im.getIcon(IconManager.SAVE_SETTINGS)); control.setMenuItemListener(menuItem, RenderingAgtCtrl.SAVE); menu.add(menuItem); menuItem = new JMenuItem("Reset defaults", im.getIcon(IconManager.RESET_DEFAULTS)); control.setMenuItemListener(menuItem, RenderingAgtCtrl.RESET_DEFAULTS); menu.add(menuItem); return menu; } | private JMenu createMenu() { JMenu menu = new JMenu("Controls"); /* JMenuItem menuItem = new JMenuItem("Save", im.getIcon(IconManager.SAVE_SETTINGS)); control.setMenuItemListener(menuItem, RenderingAgtCtrl.SAVE); menu.add(menuItem); */ JMenuItem menuItem = new JMenuItem("Reset defaults", im.getIcon(IconManager.RESET_DEFAULTS)); control.setMenuItemListener(menuItem, RenderingAgtCtrl.RESET_DEFAULTS); menu.add(menuItem); return menu; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1722ebf9ac60fc8e45cdc8d0049e85db5b86715c/RenderingAgtUIF.java/clean/SRC/org/openmicroscopy/shoola/agents/rnd/RenderingAgtUIF.java |
{ JMenuBar menuBar = new JMenuBar(); menuBar.add(createModelMenu()); menuBar.add(createMenu()); return menuBar; } | { JMenuBar menuBar = new JMenuBar(); menuBar.add(createModelMenu()); menuBar.add(createMenu()); return menuBar; } | private JMenuBar createMenuBar() { JMenuBar menuBar = new JMenuBar(); menuBar.add(createModelMenu()); menuBar.add(createMenu()); return menuBar; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1722ebf9ac60fc8e45cdc8d0049e85db5b86715c/RenderingAgtUIF.java/clean/SRC/org/openmicroscopy/shoola/agents/rnd/RenderingAgtUIF.java |
{ JMenu menu = new JMenu("Model"); JMenuItem menuItem = new JMenuItem("GreyScale", im.getIcon(IconManager.GREYSCALE)); control.setMenuItemListener(menuItem, RenderingAgtCtrl.GREY); menu.add(menuItem); menuItem = new JMenuItem("RGB", im.getIcon(IconManager.RGB)); control.setMenuItemListener(menuItem, RenderingAgtCtrl.RGB); menu.add(menuItem); menuItem = new JMenuItem("HSB", im.getIcon(IconManager.HSB)); control.setMenuItemListener(menuItem, RenderingAgtCtrl.HSB); menu.add(menuItem); return menu; } | { JMenu menu = new JMenu("Model"); JMenuItem menuItem = new JMenuItem("GreyScale", im.getIcon(IconManager.GREYSCALE)); control.setMenuItemListener(menuItem, RenderingAgtCtrl.GREY); menu.add(menuItem); menuItem = new JMenuItem("RGB", im.getIcon(IconManager.RGB)); control.setMenuItemListener(menuItem, RenderingAgtCtrl.RGB); menu.add(menuItem); menuItem = new JMenuItem("HSB", im.getIcon(IconManager.HSB)); control.setMenuItemListener(menuItem, RenderingAgtCtrl.HSB); menu.add(menuItem); return menu; } | private JMenu createModelMenu() { JMenu menu = new JMenu("Model"); JMenuItem menuItem = new JMenuItem("GreyScale", im.getIcon(IconManager.GREYSCALE)); control.setMenuItemListener(menuItem, RenderingAgtCtrl.GREY); menu.add(menuItem); menuItem = new JMenuItem("RGB", im.getIcon(IconManager.RGB)); control.setMenuItemListener(menuItem, RenderingAgtCtrl.RGB); menu.add(menuItem); menuItem = new JMenuItem("HSB", im.getIcon(IconManager.HSB)); control.setMenuItemListener(menuItem, RenderingAgtCtrl.HSB); menu.add(menuItem); return menu; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1722ebf9ac60fc8e45cdc8d0049e85db5b86715c/RenderingAgtUIF.java/clean/SRC/org/openmicroscopy/shoola/agents/rnd/RenderingAgtUIF.java |
{ quantumPane = new QuantumPane(control); modelPane = control.getModelPane(); modelPane.buildComponent(); mappingPanel = new JPanel(); mappingPanel.setLayout(new BorderLayout(0, 10)); } | { quantumPane = new QuantumPane(control); modelPane = control.getModelPane(); modelPane.buildComponent(); mappingPanel = new JPanel(); mappingPanel.setLayout(new BorderLayout(0, 10)); } | private void initPanes() { quantumPane = new QuantumPane(control); modelPane = control.getModelPane(); modelPane.buildComponent(); mappingPanel = new JPanel(); mappingPanel.setLayout(new BorderLayout(0, 10)); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1722ebf9ac60fc8e45cdc8d0049e85db5b86715c/RenderingAgtUIF.java/clean/SRC/org/openmicroscopy/shoola/agents/rnd/RenderingAgtUIF.java |
public ChannelButton(String text, Color color, int index, boolean selected) | public ChannelButton(String text, Color color, int index, boolean selected) | public ChannelButton(String text, Color color, int index, boolean selected) { super(text, color); if (color == null) throw new IllegalArgumentException("No color."); this.index = index; setSelected(selected); addMouseListener(new MouseAdapter() { public void mousePressed(MouseEvent e) { onClick(e); } public void mouseReleased(MouseEvent e) { onReleased(e); } }); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b6a2f767451d338dea7821d39df96ac7151387a5/ChannelButton.java/clean/SRC/org/openmicroscopy/shoola/agents/imviewer/util/ChannelButton.java |
if (color == null) throw new IllegalArgumentException("No color."); | public ChannelButton(String text, Color color, int index, boolean selected) { super(text, color); if (color == null) throw new IllegalArgumentException("No color."); this.index = index; setSelected(selected); addMouseListener(new MouseAdapter() { public void mousePressed(MouseEvent e) { onClick(e); } public void mouseReleased(MouseEvent e) { onReleased(e); } }); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b6a2f767451d338dea7821d39df96ac7151387a5/ChannelButton.java/clean/SRC/org/openmicroscopy/shoola/agents/imviewer/util/ChannelButton.java |
|
if (!e.isPopupTrigger()) setChannelSelected(); | if (!e.isMetaDown()) setChannelSelected(); | private void onClick(MouseEvent e) { onReleased(e); if (!e.isPopupTrigger()) setChannelSelected(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b6a2f767451d338dea7821d39df96ac7151387a5/ChannelButton.java/clean/SRC/org/openmicroscopy/shoola/agents/imviewer/util/ChannelButton.java |
private void onReleased(MouseEvent e) { if (e.isPopupTrigger()) { if (popupMenu == null) popupMenu = new ChannelButtonPopupMenu(this); popupMenu.show(this, e.getX(), e.getY()); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b6a2f767451d338dea7821d39df96ac7151387a5/ChannelButton.java/clean/SRC/org/openmicroscopy/shoola/agents/imviewer/util/ChannelButton.java |
||
void showInfo() { firePropertyChange(INFO_PROPERTY, null, new Integer(index)); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b6a2f767451d338dea7821d39df96ac7151387a5/ChannelButton.java/clean/SRC/org/openmicroscopy/shoola/agents/imviewer/util/ChannelButton.java |
||
BaseModelUtils u = o.getUtils(); | public Object getById(final Class klazz, final int id) { return getHibernateTemplate().execute(new HibernateCallback() { public Object doInHibernate(Session session) throws HibernateException { OMEModel o = (OMEModel) session.load(klazz,id); BaseModelUtils u = o.getUtils(); return o; } }); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/51a3c546dfc7a7a98b29771a459df19094fc5b51/GenericDaoHibernate.java/buggy/components/server/src/ome/dao/hibernate/GenericDaoHibernate.java |
|
BaseModelUtils u = o.getUtils(); | public Object doInHibernate(Session session) throws HibernateException { OMEModel o = (OMEModel) session.load(klazz,id); BaseModelUtils u = o.getUtils(); return o; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/51a3c546dfc7a7a98b29771a459df19094fc5b51/GenericDaoHibernate.java/buggy/components/server/src/ome/dao/hibernate/GenericDaoHibernate.java |
|
QuantumFactory.convertFamilyType(waves[w].getFamily()), | waves[w].getFamily(), | void initStrategies(QuantumDef qd, PixelsType type, ChannelBinding[] waves) { QuantumStrategy stg; double gMin, gMax; List channels = this.metadata.getChannels(); int w = 0; Channel channel; for (Iterator i = channels.iterator(); i.hasNext();) { channel = (Channel) i.next(); stg = QuantumFactory.getStrategy(qd,type); gMin = channel.getStatsInfo().getGlobalMin().doubleValue(); gMax = channel.getStatsInfo().getGlobalMax().doubleValue(); stg.setExtent(gMin, gMax); stg.setMapping( QuantumFactory.convertFamilyType(waves[w].getFamily()), waves[w].getCoefficient().doubleValue(), waves[w].getNoiseReduction().booleanValue()); if (wavesStg[w] == null) stg.setWindow(waves[w].getInputStart().intValue(), waves[w].getInputEnd().intValue()); else stg.setWindow(wavesStg[w].getWindowStart(), wavesStg[w].getWindowEnd()); wavesStg[w] = stg; } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b2d1563defffc9fa654271400d754843f42e2810/QuantumManager.java/buggy/components/rendering/src/omeis/providers/re/QuantumManager.java |
public void accept(NodeVisitor iVisitor) { iVisitor.visitForNode(this); } | public void accept(NodeVisitor iVisitor) { iVisitor.visitForNode(this); } | public void accept(NodeVisitor iVisitor) { iVisitor.visitForNode(this); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/2f13ba47385b7584839c7f6f6f1abfee251cbe53/ForNode.java/clean/org/jruby/nodes/ForNode.java |
public RubyObject eval(Ruby ruby, RubyObject self) { RubyObject result; ruby.getBlock().push(getVarNode(), getBodyNode(), self); ruby.getIter().push(RubyIter.ITER_PRE); while (true) { try { String file = ruby.getSourceFile(); int line = ruby.getSourceLine(); ruby.getBlock().flags &= ~RubyBlock.BLOCK_D_SCOPE; RubyBlock tmpBlock = ArgsUtil.beginCallArgs(ruby); RubyObject recv = getIterNode().eval(ruby, self); ArgsUtil.endCallArgs(ruby, tmpBlock); ruby.setSourceFile(file); ruby.setSourceLine(line); result = recv.getRubyClass().call(recv, "each", null, 0); break; } catch (RetryException rExcptn) { } catch (ReturnException rExcptn) { result = rExcptn.getReturnValue(); break; } catch (BreakException bExcptn) { result = ruby.getNil(); break; } } ruby.getIter().pop(); ruby.getBlock().pop(); return result; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/2f13ba47385b7584839c7f6f6f1abfee251cbe53/ForNode.java/clean/org/jruby/nodes/ForNode.java |
||
while (true) { try { String file = ruby.getSourceFile(); int line = ruby.getSourceLine(); ruby.getBlock().flags &= ~RubyBlock.BLOCK_D_SCOPE; RubyBlock tmpBlock = ArgsUtil.beginCallArgs(ruby); RubyObject recv = getIterNode().eval(ruby, self); ArgsUtil.endCallArgs(ruby, tmpBlock); ruby.setSourceFile(file); ruby.setSourceLine(line); result = recv.getRubyClass().call(recv, "each", null, 0); break; } catch (RetryException rExcptn) { } catch (ReturnException rExcptn) { result = rExcptn.getReturnValue(); break; } catch (BreakException bExcptn) { result = ruby.getNil(); break; | try { while (true) { try { String file = ruby.getSourceFile(); int line = ruby.getSourceLine(); ruby.getBlock().flags &= ~RubyBlock.BLOCK_D_SCOPE; RubyBlock tmpBlock = ArgsUtil.beginCallArgs(ruby); RubyObject recv = getIterNode().eval(ruby, self); ArgsUtil.endCallArgs(ruby, tmpBlock); ruby.setSourceFile(file); ruby.setSourceLine(line); return recv.getRubyClass().call(recv, "each", null, 0); } catch (RetryException rExcptn) { } | public RubyObject eval(Ruby ruby, RubyObject self) { RubyObject result; ruby.getBlock().push(getVarNode(), getBodyNode(), self); ruby.getIter().push(RubyIter.ITER_PRE); while (true) { try { String file = ruby.getSourceFile(); int line = ruby.getSourceLine(); ruby.getBlock().flags &= ~RubyBlock.BLOCK_D_SCOPE; RubyBlock tmpBlock = ArgsUtil.beginCallArgs(ruby); RubyObject recv = getIterNode().eval(ruby, self); ArgsUtil.endCallArgs(ruby, tmpBlock); ruby.setSourceFile(file); ruby.setSourceLine(line); result = recv.getRubyClass().call(recv, "each", null, 0); break; } catch (RetryException rExcptn) { } catch (ReturnException rExcptn) { result = rExcptn.getReturnValue(); break; } catch (BreakException bExcptn) { result = ruby.getNil(); break; } } ruby.getIter().pop(); ruby.getBlock().pop(); return result; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/2f13ba47385b7584839c7f6f6f1abfee251cbe53/ForNode.java/clean/org/jruby/nodes/ForNode.java |
ruby.getIter().pop(); ruby.getBlock().pop(); return result; | public RubyObject eval(Ruby ruby, RubyObject self) { RubyObject result; ruby.getBlock().push(getVarNode(), getBodyNode(), self); ruby.getIter().push(RubyIter.ITER_PRE); while (true) { try { String file = ruby.getSourceFile(); int line = ruby.getSourceLine(); ruby.getBlock().flags &= ~RubyBlock.BLOCK_D_SCOPE; RubyBlock tmpBlock = ArgsUtil.beginCallArgs(ruby); RubyObject recv = getIterNode().eval(ruby, self); ArgsUtil.endCallArgs(ruby, tmpBlock); ruby.setSourceFile(file); ruby.setSourceLine(line); result = recv.getRubyClass().call(recv, "each", null, 0); break; } catch (RetryException rExcptn) { } catch (ReturnException rExcptn) { result = rExcptn.getReturnValue(); break; } catch (BreakException bExcptn) { result = ruby.getNil(); break; } } ruby.getIter().pop(); ruby.getBlock().pop(); return result; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/2f13ba47385b7584839c7f6f6f1abfee251cbe53/ForNode.java/clean/org/jruby/nodes/ForNode.java |
|
public LoadService() { | public LoadService(Ruby runtime) { | public LoadService() { super(); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/5d81c9b241cfde36fd62602eb41786ab5a0cd134/LoadService.java/clean/org/jruby/internal/runtime/load/LoadService.java |
this.runtime = runtime; | public LoadService() { super(); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/5d81c9b241cfde36fd62602eb41786ab5a0cd134/LoadService.java/clean/org/jruby/internal/runtime/load/LoadService.java |
|
this.runtime = runtime; | public void init(Ruby runtime, List additionalDirectories) { this.runtime = runtime; for (Iterator iter = additionalDirectories.iterator(); iter.hasNext();) { loadPath.add(RubyString.newString(runtime, (String)iter.next())); } if (runtime.getSafeLevel() == 0) { loadPath.add(RubyString.newString(runtime, System.getProperty("jruby.lib"))); } String rubyDir = System.getProperty("jruby.home") + File.separatorChar + "lib" + File.separatorChar + "ruby" + File.separatorChar; loadPath.add(RubyString.newString(runtime, rubyDir + "site_ruby" + File.separatorChar + Constants.RUBY_MAJOR_VERSION)); loadPath.add(RubyString.newString(runtime, rubyDir + "site_ruby" + File.separatorChar + Constants.RUBY_MAJOR_VERSION + File.separatorChar + "java")); loadPath.add(RubyString.newString(runtime, rubyDir + "site_ruby")); loadPath.add(RubyString.newString(runtime, rubyDir + Constants.RUBY_MAJOR_VERSION)); loadPath.add(RubyString.newString(runtime, rubyDir + Constants.RUBY_MAJOR_VERSION + File.separatorChar + "java")); if (runtime.getSafeLevel() == 0) { loadPath.add(RubyString.newString(runtime, ".")); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/5d81c9b241cfde36fd62602eb41786ab5a0cd134/LoadService.java/clean/org/jruby/internal/runtime/load/LoadService.java |
|
if (!loadedFeatures.contains(file)) { | RubyString name = RubyString.newString(runtime, file); if (!loadedFeatures.contains(name)) { | public boolean require(String file) { if (!loadedFeatures.contains(file)) { if (load(file)) { loadedFeatures.add(file); return true; } } return false; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/5d81c9b241cfde36fd62602eb41786ab5a0cd134/LoadService.java/clean/org/jruby/internal/runtime/load/LoadService.java |
loadedFeatures.add(file); | loadedFeatures.add(name); | public boolean require(String file) { if (!loadedFeatures.contains(file)) { if (load(file)) { loadedFeatures.add(file); return true; } } return false; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/5d81c9b241cfde36fd62602eb41786ab5a0cd134/LoadService.java/clean/org/jruby/internal/runtime/load/LoadService.java |
p.setAcquisitionContext(new AcquisitionContext(-1l)); | AcquisitionContext ac = new AcquisitionContext(); ac.setId(-1l); p.setAcquisitionContext(ac); | public void testUnloadedEntityFieldOnDetachedPixels() throws Exception { // PREPARE ------------------------------------------------- // TODO or bool flag? p.setAcquisitionContext(new AcquisitionContext(-1l)); _up.saveAndReturnObject(p); flush(); clear(); // TEST ------------------------------------------------- assertNotNull("should be back.", p.getAcquisitionContext()); assertTrue("and it should have a valid id.", p.getAcquisitionContext() .getId().longValue() > 0); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/50ff3a771581d9f58121b05f50819d8474d33b6c/DetachedPixelsGraphTest.java/clean/components/server/test/ome/server/itests/update/DetachedPixelsGraphTest.java |
public RubyString findClassPath() { return null; | public RubyObject findClassPath() { FindClassPathResult arg = new FindClassPathResult(); arg.klass = this; arg.track = getRuby().getObjectClass(); arg.prev = null; if (getRuby().getObjectClass().getInstanceVariables() != null) { getRuby().getObjectClass().getInstanceVariables().foreach(new FindClassPathMapMethod(), arg); } if (arg.name == null) { getRuby().getClassMap().foreach(new FindClassPathMapMethod(), arg); } if (arg.name != null) { getInstanceVariables().put(getRuby().intern("__classpath__"), arg.path); return arg.path; } return getRuby().getNil(); | public RubyString findClassPath() { return null; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/12847c6fd28fea4e223d132ced46eb1b4cb9de9a/RubyModule.java/buggy/org/jruby/RubyModule.java |
if (path != null) { | if (path == null) { | public RubyString getClassname() { RubyString path = null; RubyModule rbModule = this; while (rbModule.isIncluded() || rbModule.isSingleton()) { rbModule = ((RubyClass)rbModule).getSuperClass(); } if (rbModule == null) { rbModule = getRuby().getObjectClass(); } path = (RubyString)getInstanceVariables().get("__classpath__"); if (path != null) { if (getInstanceVariables().get("__classid__") != null) { path = RubyString.m_newString(getRuby(), ((RubyId)getInstanceVariables().get("__classid__")).toName()); // todo: convert from symbol to string getInstanceVariables().put("__classpath__", path); getInstanceVariables().remove("__classid__"); } } if (path == null) { path = rbModule.findClassPath(); /* if (path.isNil()) { return null; }*/ return path; } /*if (!(path instanceof RubyString)) { throw new RubyBugException("class path is not set properly"); }*/ return path; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/12847c6fd28fea4e223d132ced46eb1b4cb9de9a/RubyModule.java/buggy/org/jruby/RubyModule.java |
path = rbModule.findClassPath(); | RubyObject tmp = rbModule.findClassPath(); | public RubyString getClassname() { RubyString path = null; RubyModule rbModule = this; while (rbModule.isIncluded() || rbModule.isSingleton()) { rbModule = ((RubyClass)rbModule).getSuperClass(); } if (rbModule == null) { rbModule = getRuby().getObjectClass(); } path = (RubyString)getInstanceVariables().get("__classpath__"); if (path != null) { if (getInstanceVariables().get("__classid__") != null) { path = RubyString.m_newString(getRuby(), ((RubyId)getInstanceVariables().get("__classid__")).toName()); // todo: convert from symbol to string getInstanceVariables().put("__classpath__", path); getInstanceVariables().remove("__classid__"); } } if (path == null) { path = rbModule.findClassPath(); /* if (path.isNil()) { return null; }*/ return path; } /*if (!(path instanceof RubyString)) { throw new RubyBugException("class path is not set properly"); }*/ return path; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/12847c6fd28fea4e223d132ced46eb1b4cb9de9a/RubyModule.java/buggy/org/jruby/RubyModule.java |
/* if (path.isNil()) { | if (tmp.isNil()) { | public RubyString getClassname() { RubyString path = null; RubyModule rbModule = this; while (rbModule.isIncluded() || rbModule.isSingleton()) { rbModule = ((RubyClass)rbModule).getSuperClass(); } if (rbModule == null) { rbModule = getRuby().getObjectClass(); } path = (RubyString)getInstanceVariables().get("__classpath__"); if (path != null) { if (getInstanceVariables().get("__classid__") != null) { path = RubyString.m_newString(getRuby(), ((RubyId)getInstanceVariables().get("__classid__")).toName()); // todo: convert from symbol to string getInstanceVariables().put("__classpath__", path); getInstanceVariables().remove("__classid__"); } } if (path == null) { path = rbModule.findClassPath(); /* if (path.isNil()) { return null; }*/ return path; } /*if (!(path instanceof RubyString)) { throw new RubyBugException("class path is not set properly"); }*/ return path; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/12847c6fd28fea4e223d132ced46eb1b4cb9de9a/RubyModule.java/buggy/org/jruby/RubyModule.java |
}*/ | } | public RubyString getClassname() { RubyString path = null; RubyModule rbModule = this; while (rbModule.isIncluded() || rbModule.isSingleton()) { rbModule = ((RubyClass)rbModule).getSuperClass(); } if (rbModule == null) { rbModule = getRuby().getObjectClass(); } path = (RubyString)getInstanceVariables().get("__classpath__"); if (path != null) { if (getInstanceVariables().get("__classid__") != null) { path = RubyString.m_newString(getRuby(), ((RubyId)getInstanceVariables().get("__classid__")).toName()); // todo: convert from symbol to string getInstanceVariables().put("__classpath__", path); getInstanceVariables().remove("__classid__"); } } if (path == null) { path = rbModule.findClassPath(); /* if (path.isNil()) { return null; }*/ return path; } /*if (!(path instanceof RubyString)) { throw new RubyBugException("class path is not set properly"); }*/ return path; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/12847c6fd28fea4e223d132ced46eb1b4cb9de9a/RubyModule.java/buggy/org/jruby/RubyModule.java |
return path; | return (RubyString)tmp; | public RubyString getClassname() { RubyString path = null; RubyModule rbModule = this; while (rbModule.isIncluded() || rbModule.isSingleton()) { rbModule = ((RubyClass)rbModule).getSuperClass(); } if (rbModule == null) { rbModule = getRuby().getObjectClass(); } path = (RubyString)getInstanceVariables().get("__classpath__"); if (path != null) { if (getInstanceVariables().get("__classid__") != null) { path = RubyString.m_newString(getRuby(), ((RubyId)getInstanceVariables().get("__classid__")).toName()); // todo: convert from symbol to string getInstanceVariables().put("__classpath__", path); getInstanceVariables().remove("__classid__"); } } if (path == null) { path = rbModule.findClassPath(); /* if (path.isNil()) { return null; }*/ return path; } /*if (!(path instanceof RubyString)) { throw new RubyBugException("class path is not set properly"); }*/ return path; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/12847c6fd28fea4e223d132ced46eb1b4cb9de9a/RubyModule.java/buggy/org/jruby/RubyModule.java |
public void execute() | public void execute(PInputEvent e) | public static PiccoloAction getZoomTo200Action(final BrowserModel model) { PiccoloAction action = new PiccoloAction() { public void execute() { model.setCurrentMode(BrowserModel.ZOOM_MODE_NAME, BrowserMode.ZOOM_200_MODE); } }; return action; }; | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9ad2d2709e2cdefc9a414f2e51f6a883a2403c7a/PiccoloActionFactory.java/clean/SRC/org/openmicroscopy/shoola/agents/browser/events/PiccoloActionFactory.java |
public void execute() | public void execute(PInputEvent e) | public void execute() { model.setCurrentMode(BrowserModel.ZOOM_MODE_NAME, BrowserMode.ZOOM_200_MODE); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9ad2d2709e2cdefc9a414f2e51f6a883a2403c7a/PiccoloActionFactory.java/clean/SRC/org/openmicroscopy/shoola/agents/browser/events/PiccoloActionFactory.java |
public void execute() | public void execute(PInputEvent e) | public static PiccoloAction getZoomTo50Action(final BrowserModel model) { PiccoloAction action = new PiccoloAction() { public void execute() { model.setCurrentMode(BrowserModel.ZOOM_MODE_NAME, BrowserMode.ZOOM_50_MODE); } }; return action; }; | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9ad2d2709e2cdefc9a414f2e51f6a883a2403c7a/PiccoloActionFactory.java/clean/SRC/org/openmicroscopy/shoola/agents/browser/events/PiccoloActionFactory.java |
public void execute() | public void execute(PInputEvent e) | public void execute() { model.setCurrentMode(BrowserModel.ZOOM_MODE_NAME, BrowserMode.ZOOM_50_MODE); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9ad2d2709e2cdefc9a414f2e51f6a883a2403c7a/PiccoloActionFactory.java/clean/SRC/org/openmicroscopy/shoola/agents/browser/events/PiccoloActionFactory.java |
public void execute() | public void execute(PInputEvent e) | public static PiccoloAction getZoomTo75Action(final BrowserModel model) { PiccoloAction action = new PiccoloAction() { public void execute() { model.setCurrentMode(BrowserModel.ZOOM_MODE_NAME, BrowserMode.ZOOM_75_MODE); } }; return action; }; | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9ad2d2709e2cdefc9a414f2e51f6a883a2403c7a/PiccoloActionFactory.java/clean/SRC/org/openmicroscopy/shoola/agents/browser/events/PiccoloActionFactory.java |
System.err.println("75%"); | public static PiccoloAction getZoomTo75Action(final BrowserModel model) { PiccoloAction action = new PiccoloAction() { public void execute() { model.setCurrentMode(BrowserModel.ZOOM_MODE_NAME, BrowserMode.ZOOM_75_MODE); } }; return action; }; | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9ad2d2709e2cdefc9a414f2e51f6a883a2403c7a/PiccoloActionFactory.java/clean/SRC/org/openmicroscopy/shoola/agents/browser/events/PiccoloActionFactory.java |
|
public void execute() | public void execute(PInputEvent e) | public void execute() { model.setCurrentMode(BrowserModel.ZOOM_MODE_NAME, BrowserMode.ZOOM_75_MODE); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9ad2d2709e2cdefc9a414f2e51f6a883a2403c7a/PiccoloActionFactory.java/clean/SRC/org/openmicroscopy/shoola/agents/browser/events/PiccoloActionFactory.java |
System.err.println("75%"); | public void execute() { model.setCurrentMode(BrowserModel.ZOOM_MODE_NAME, BrowserMode.ZOOM_75_MODE); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9ad2d2709e2cdefc9a414f2e51f6a883a2403c7a/PiccoloActionFactory.java/clean/SRC/org/openmicroscopy/shoola/agents/browser/events/PiccoloActionFactory.java |
|
public void execute() | public void execute(PInputEvent e) | public static PiccoloAction getZoomToActualAction(final BrowserModel model) { PiccoloAction action = new PiccoloAction() { public void execute() { model.setCurrentMode(BrowserModel.ZOOM_MODE_NAME, BrowserMode.ZOOM_ACTUAL_MODE); } }; return action; }; | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9ad2d2709e2cdefc9a414f2e51f6a883a2403c7a/PiccoloActionFactory.java/clean/SRC/org/openmicroscopy/shoola/agents/browser/events/PiccoloActionFactory.java |
public void execute() | public void execute(PInputEvent e) | public void execute() { model.setCurrentMode(BrowserModel.ZOOM_MODE_NAME, BrowserMode.ZOOM_ACTUAL_MODE); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9ad2d2709e2cdefc9a414f2e51f6a883a2403c7a/PiccoloActionFactory.java/clean/SRC/org/openmicroscopy/shoola/agents/browser/events/PiccoloActionFactory.java |
public void execute() | public void execute(PInputEvent e) | public static PiccoloAction getZoomToFitAction(final BrowserModel model) { PiccoloAction action = new PiccoloAction() { public void execute() { model.setCurrentMode(BrowserModel.ZOOM_MODE_NAME, BrowserMode.ZOOM_TO_FIT_MODE); } }; return action; }; | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9ad2d2709e2cdefc9a414f2e51f6a883a2403c7a/PiccoloActionFactory.java/clean/SRC/org/openmicroscopy/shoola/agents/browser/events/PiccoloActionFactory.java |
public void execute() | public void execute(PInputEvent e) | public void execute() { model.setCurrentMode(BrowserModel.ZOOM_MODE_NAME, BrowserMode.ZOOM_TO_FIT_MODE); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9ad2d2709e2cdefc9a414f2e51f6a883a2403c7a/PiccoloActionFactory.java/clean/SRC/org/openmicroscopy/shoola/agents/browser/events/PiccoloActionFactory.java |
return null; | return jid; | public String getUserNicknameFromJID(String jid) { ContactList contactList = SparkManager.getWorkspace().getContactList(); ContactItem item = contactList.getContactItemByJID(jid); if (item != null) { return item.getNickname(); } return null; } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/60b668500341a207c2b3902c27fd2e197a87eeee/UserManager.java/clean/src/java/org/jivesoftware/spark/UserManager.java |
_log = bc.getLog("IncludeDirective"); | public final Object build(DirectiveBuilder builder, BuildContext bc) throws BuildException { Broker broker = bc.getBroker(); // build configuration key names, since they're based // on the configured name of this directive _directiveName = builder.getName(); TEMPLATE_EXTENSIONS_NAME = _directiveName + TEMPLATE_EXTENSIONS_NAME; // determine what type of file we need to deal with if (builder.getArg(PARSE_TEXT_K, bc) != null) { _type = TYPE_TEXT; } else if (builder.getArg(PARSE_TEMPLATE_K, bc) != null) { _type = TYPE_TEMPLATE; } else if (builder.getArg(PARSE_MACRO_K, bc) != null) { _type = TYPE_MACRO; } else { _type = TYPE_DYNAMIC; } // if the filename passed to us was a Macro (needs to be evaluated later) // then store it as _macFilename. Otherwise, assume it's a String // and we'll just use that string as the filename Object o = builder.getArg(PARSE_FILENAME, bc); if (o instanceof Macro) { if (_type == TYPE_TEXT || _type == TYPE_MACRO) { broker.getLog("IncludeDirective") .warning("Included a 'static' file type using a dynamic filename." + "File will be included, but any included #macro's will not."); } _macFilename = (Macro) o; } else { _strFilename = o.toString(); if (_strFilename == null || _strFilename.length() == 0) throw makeBuildException("Filename cannot be null or empty"); if (_type == TYPE_TEXT) { // we're a static type, need to // include the file (by returning it) now, // during build time try { return getThingToInclude(broker, _type, _strFilename); } catch (Exception e) { throw makeBuildException("Unable to include as text", e); } } else if (_type == TYPE_MACRO) { // we're a template type. ned to get the template (already parsed) // and merge its macros into our build context. // then we return the template so its contents can also be included Template t = null; try { t = getTemplate(broker, _strFilename); bc.mergeConstants(t); } catch (Exception e) { throw makeBuildException("Unable to include as macro", e); } return t; } else if (_type == TYPE_DYNAMIC) { // being dynamic means we need to guess the // file type based on the file's extension // and take care of finding the file during runtime _type = guessType(broker, _strFilename); } } // we are configured to be lazy, or we couldn't determine the filename // during the build() process (b/c it is a Macro) return this; } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/3a2bd2c87dfec90fe1c78333d2dcc78e5cd3fe03/IncludeDirective.java/clean/webmacro/src/org/webmacro/directive/IncludeDirective.java |
|
if (context.getCurrentLocation().indexOf(_strFilename) > -1) { String warning = context.getCurrentLocation() + " includes itself."; writeWarning(warning, context, out); | if (_log.loggingDebug() && context.getCurrentLocation().indexOf(_strFilename) > -1) { _log.warning(context.getCurrentLocation() + " includes itself."); | public void write(FastWriter out, Context context) throws PropertyException, IOException { Broker broker = context.getBroker(); // the filename arg passed to us was a Macro, so // evaluate and check it now if (_macFilename != null) { _strFilename = _macFilename.evaluate(context).toString(); if (_strFilename == null || _strFilename.length() == 0) { throw makePropertyException("Filename cannot be null or empty"); } } // make sure we're not trying to include ourself. // maybe there is a better way to handle this? if (context.getCurrentLocation().indexOf(_strFilename) > -1) { String warning = context.getCurrentLocation() + " includes itself."; writeWarning(warning, context, out); } // this should only be true if StrictCompatibility is set to false // and "as <something>" wasn't specified in the arg list if (_type == TYPE_DYNAMIC) _type = guessType(broker, _strFilename); Object toInclude = getThingToInclude(broker, _type, _strFilename); switch (_type) { case TYPE_MACRO: // during runtime evaluation of a template, // a TYPE_MACRO doesn't really work as expected. // we logged a warning above in build(), but // we still need to write it out as a template // so just fall through case TYPE_TEMPLATE: ((Template) toInclude).write(out, context); break; case TYPE_TEXT: // static types are strings out.write(toInclude.toString()); break; default: // should never happen throw makePropertyException("Unrecognized file type: " + _type); } } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/3a2bd2c87dfec90fe1c78333d2dcc78e5cd3fe03/IncludeDirective.java/clean/webmacro/src/org/webmacro/directive/IncludeDirective.java |
if (_log.loggingDebug()) { _log.debug("Including '" + _strFilename + "' as " + (_type == TYPE_MACRO) ? "MACRO" : (_type == TYPE_TEMPLATE) ? "TEMPLATE" : (_type == TYPE_TEXT) ? "TEXT" : "UNKNOWN. Throwing exceptin"); } | public void write(FastWriter out, Context context) throws PropertyException, IOException { Broker broker = context.getBroker(); // the filename arg passed to us was a Macro, so // evaluate and check it now if (_macFilename != null) { _strFilename = _macFilename.evaluate(context).toString(); if (_strFilename == null || _strFilename.length() == 0) { throw makePropertyException("Filename cannot be null or empty"); } } // make sure we're not trying to include ourself. // maybe there is a better way to handle this? if (context.getCurrentLocation().indexOf(_strFilename) > -1) { String warning = context.getCurrentLocation() + " includes itself."; writeWarning(warning, context, out); } // this should only be true if StrictCompatibility is set to false // and "as <something>" wasn't specified in the arg list if (_type == TYPE_DYNAMIC) _type = guessType(broker, _strFilename); Object toInclude = getThingToInclude(broker, _type, _strFilename); switch (_type) { case TYPE_MACRO: // during runtime evaluation of a template, // a TYPE_MACRO doesn't really work as expected. // we logged a warning above in build(), but // we still need to write it out as a template // so just fall through case TYPE_TEMPLATE: ((Template) toInclude).write(out, context); break; case TYPE_TEXT: // static types are strings out.write(toInclude.toString()); break; default: // should never happen throw makePropertyException("Unrecognized file type: " + _type); } } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/3a2bd2c87dfec90fe1c78333d2dcc78e5cd3fe03/IncludeDirective.java/clean/webmacro/src/org/webmacro/directive/IncludeDirective.java |
|
availableCategories.setConverter(new IntegerConverter()); | private UIComponent getCategoryEditContainer() { String ref = ARTICLE_ITEM_BEAN_ID + "."; String bref = WFPage.CONTENT_BUNDLE + "."; HtmlPanelGrid p = WFPanelUtil.getFormPanel(3); p.setId(CATEGORY_EDITOR_ID); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "available_categories"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.getText(" ")); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "categories_for_this_article"), WFUtil.getText(":"))); WFContainer c = new WFContainer(); HtmlSelectManyListbox availableCategories = WFUtil.getSelectManyListbox(AVAILABLE_CATEGORIES_ID, ref + "availableCategories", ref + "selectedAvailableCategories"); availableCategories.setStyle("width:200px;height:160px;"); availableCategories.setConverter(new IntegerConverter()); c.add(availableCategories); c.add(WFUtil.getBreak(2)); c.add(WFUtil.getButtonVB(CATEGORY_BACK_ID, bref + "back", this)); p.getChildren().add(c); c = new WFContainer(); c.add(WFUtil.getBreak()); c.add(WFUtil.getButton(ADD_CATEGORIES_ID, ">", this)); c.add(WFUtil.getBreak(2)); c.add(WFUtil.getButton(SUB_CATEGORIES_ID, "<", this)); p.getChildren().add(c); HtmlSelectManyListbox articleCategories = WFUtil.getSelectManyListbox(ARTICLE_CATEGORIES_ID, ref + "categories", ref + "selectedCategories"); articleCategories.setStyle("width:200px;height:160px;"); articleCategories.setConverter(new IntegerConverter()); p.getChildren().add(articleCategories); return p; } | 57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/8d70e4da4fa13f2a274766be3657c947b48dfbeb/EditArticleBlock.java/clean/src/java/com/idega/block/article/component/EditArticleBlock.java |
|
articleCategories.setConverter(new IntegerConverter()); | private UIComponent getCategoryEditContainer() { String ref = ARTICLE_ITEM_BEAN_ID + "."; String bref = WFPage.CONTENT_BUNDLE + "."; HtmlPanelGrid p = WFPanelUtil.getFormPanel(3); p.setId(CATEGORY_EDITOR_ID); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "available_categories"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.getText(" ")); p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "categories_for_this_article"), WFUtil.getText(":"))); WFContainer c = new WFContainer(); HtmlSelectManyListbox availableCategories = WFUtil.getSelectManyListbox(AVAILABLE_CATEGORIES_ID, ref + "availableCategories", ref + "selectedAvailableCategories"); availableCategories.setStyle("width:200px;height:160px;"); availableCategories.setConverter(new IntegerConverter()); c.add(availableCategories); c.add(WFUtil.getBreak(2)); c.add(WFUtil.getButtonVB(CATEGORY_BACK_ID, bref + "back", this)); p.getChildren().add(c); c = new WFContainer(); c.add(WFUtil.getBreak()); c.add(WFUtil.getButton(ADD_CATEGORIES_ID, ">", this)); c.add(WFUtil.getBreak(2)); c.add(WFUtil.getButton(SUB_CATEGORIES_ID, "<", this)); p.getChildren().add(c); HtmlSelectManyListbox articleCategories = WFUtil.getSelectManyListbox(ARTICLE_CATEGORIES_ID, ref + "categories", ref + "selectedCategories"); articleCategories.setStyle("width:200px;height:160px;"); articleCategories.setConverter(new IntegerConverter()); p.getChildren().add(articleCategories); return p; } | 57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/8d70e4da4fa13f2a274766be3657c947b48dfbeb/EditArticleBlock.java/clean/src/java/com/idega/block/article/component/EditArticleBlock.java |
|
removeEditor(); | public void onSelectedDisplay() { switch (model.getState()) { case DISCARDED: case SAVE: throw new IllegalStateException("This method cannot be " + "invoked in the DISCARDED, SAVE state."); } int editor = model.getEditorType(); if (editor != TreeViewer.CREATE_EDITOR) { removeEditor(); PropertiesCmd cmd = new PropertiesCmd(this); cmd.execute(); } else { Browser browser = model.getSelectedBrowser(); if (browser != null) { TreeImageDisplay d = browser.getLastSelectedDisplay(); if (d != null && (d.getUserObject() instanceof ImageData)) { int index = EditorFactory.getEditorSelectedPane(); if (index == Editor.INFO_INDEX) EditorFactory.setEditorSelectedPane( Editor.PROPERTIES_INDEX); } } removeEditor(); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/fb3743d6f75abbf12f788b3b2925f4a6f4606dd6/TreeViewerComponent.java/buggy/SRC/org/openmicroscopy/shoola/agents/treeviewer/view/TreeViewerComponent.java |
|
} else { Browser browser = model.getSelectedBrowser(); if (browser != null) { TreeImageDisplay d = browser.getLastSelectedDisplay(); if (d != null && (d.getUserObject() instanceof ImageData)) { int index = EditorFactory.getEditorSelectedPane(); if (index == Editor.INFO_INDEX) EditorFactory.setEditorSelectedPane( Editor.PROPERTIES_INDEX); } } removeEditor(); | public void onSelectedDisplay() { switch (model.getState()) { case DISCARDED: case SAVE: throw new IllegalStateException("This method cannot be " + "invoked in the DISCARDED, SAVE state."); } int editor = model.getEditorType(); if (editor != TreeViewer.CREATE_EDITOR) { removeEditor(); PropertiesCmd cmd = new PropertiesCmd(this); cmd.execute(); } else { Browser browser = model.getSelectedBrowser(); if (browser != null) { TreeImageDisplay d = browser.getLastSelectedDisplay(); if (d != null && (d.getUserObject() instanceof ImageData)) { int index = EditorFactory.getEditorSelectedPane(); if (index == Editor.INFO_INDEX) EditorFactory.setEditorSelectedPane( Editor.PROPERTIES_INDEX); } } removeEditor(); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/fb3743d6f75abbf12f788b3b2925f4a6f4606dd6/TreeViewerComponent.java/buggy/SRC/org/openmicroscopy/shoola/agents/treeviewer/view/TreeViewerComponent.java |
|
/* Editor editor = model.getEditor(); if (editor != null) { if (editor.hasDataToSave()) { IconManager icons = IconManager.getInstance(); EditorSaverDialog d = new EditorSaverDialog(view, icons.getIcon(IconManager.QUESTION)); d.addPropertyChangeListener( EditorSaverDialog.SAVING_DATA_EDITOR_PROPERTY, controller); UIUtilities.centerAndShow(d); return; } } */ | public void removeEditor() { switch (model.getState()) { case DISCARDED: //case SAVE: throw new IllegalStateException("This method cannot be " + "invoked in the DISCARDED, SAVE state."); } /* Editor editor = model.getEditor(); if (editor != null) { if (editor.hasDataToSave()) { IconManager icons = IconManager.getInstance(); EditorSaverDialog d = new EditorSaverDialog(view, icons.getIcon(IconManager.QUESTION)); d.addPropertyChangeListener( EditorSaverDialog.SAVING_DATA_EDITOR_PROPERTY, controller); UIUtilities.centerAndShow(d); return; } } */ if (editorDialog != null) editorDialog.close(); model.setEditorType(NO_EDITOR); view.removeAllFromWorkingPane(); firePropertyChange(REMOVE_EDITOR_PROPERTY, Boolean.FALSE, Boolean.TRUE); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/fb3743d6f75abbf12f788b3b2925f4a6f4606dd6/TreeViewerComponent.java/buggy/SRC/org/openmicroscopy/shoola/agents/treeviewer/view/TreeViewerComponent.java |
|
"Confirmation", JOptionPane.YES_NO_OPTION); | "Confirmation", JOptionPane.YES_NO_OPTION); | public void closeActiveRoom() { ChatRoom room = null; try { room = getActiveChatRoom(); } catch (ChatRoomNotFoundException e1) { // AgentLog.logError("Chat room not found", e1); } // Confirm end session boolean isGroupChat = room.getChatType() == Message.Type.GROUP_CHAT; if (isGroupChat) { String message = "Would you like to end this session?"; final int ok = JOptionPane.showConfirmDialog(chatFrame, message, "Confirmation", JOptionPane.YES_NO_OPTION); if (ok == JOptionPane.OK_OPTION) { room.closeChatRoom(); return; } } else { room.closeChatRoom(); return; } } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/2b67e7302b05b2cf189de97bd46023342930e7c6/ChatContainer.java/buggy/src/java/org/jivesoftware/spark/ui/ChatContainer.java |
Icon icon = room.getTabIcon(); | final ChatRoomImpl chatRoomImpl = (ChatRoomImpl)room; Presence presence = chatRoomImpl.getPresence(); Icon icon = SparkManager.getUserManager().getIconFromPresence(presence); | public void useTabDefault(final ChatRoom room) { // Check if room is stale boolean containsRoom = getStaleChatRooms().contains(room); if (containsRoom) { return; } final int index = indexOfComponent(room); if (index != -1) { SparkTab tab = getTabAt(index); Font defaultFont = tab.getDefaultFont(); final JLabel titleLabel = tab.getTitleLabel(); if (room instanceof ChatRoomImpl) { Icon icon = room.getTabIcon(); tab.setIcon(icon); } titleLabel.setForeground(Color.black); titleLabel.setFont(defaultFont); } } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/2b67e7302b05b2cf189de97bd46023342930e7c6/ChatContainer.java/buggy/src/java/org/jivesoftware/spark/ui/ChatContainer.java |
{ control = new RenderingAgtCtrl(this); presentation = new RenderingAgtUIF(control, registry, imageName); control.setPresentation(presentation); } | { control = new RenderingAgtCtrl(this); presentation = new RenderingAgtUIF(control, registry, imageName); control.setPresentation(presentation); } | private void buildPresentation(String imageName) { control = new RenderingAgtCtrl(this); presentation = new RenderingAgtUIF(control, registry, imageName); control.setPresentation(presentation); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1722ebf9ac60fc8e45cdc8d0049e85db5b86715c/RenderingAgt.java/clean/SRC/org/openmicroscopy/shoola/agents/rnd/RenderingAgt.java |
{ for (int i = 0; i < pxsDims.sizeW; i++) channelData[i] = new ChannelData(i, i, i, "Wavelenth "+i, i, null); canUpdate = false; } | { for (int i = 0; i < pxsDims.sizeW; i++) channelData[i] = new ChannelData(i, i, i, "Wavelenth "+i, i, null); canUpdate = false; } | private void defaultInitChannelData() { for (int i = 0; i < pxsDims.sizeW; i++) channelData[i] = new ChannelData(i, i, i, "Wavelenth "+i, i, null); canUpdate = false; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1722ebf9ac60fc8e45cdc8d0049e85db5b86715c/RenderingAgt.java/clean/SRC/org/openmicroscopy/shoola/agents/rnd/RenderingAgt.java |
{ if (e instanceof ImageLoaded) handleImageLoaded((ImageLoaded) e); else if (e instanceof DisplayRendering) presentation.deIconify(); } | { if (e instanceof ImageLoaded) handleImageLoaded((ImageLoaded) e); else if (e instanceof DisplayRendering) presentation.deIconify(); } | public void eventFired(AgentEvent e) { if (e instanceof ImageLoaded) handleImageLoaded((ImageLoaded) e); else if (e instanceof DisplayRendering) presentation.deIconify(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1722ebf9ac60fc8e45cdc8d0049e85db5b86715c/RenderingAgt.java/clean/SRC/org/openmicroscopy/shoola/agents/rnd/RenderingAgt.java |
{ LoadImage request = (LoadImage) response.getACT(); renderingControl = response.getProxy(); pxsDims = renderingControl.getPixelsDims(); pxsStats = renderingControl.getPixelsStats(); curImageID = request.getImageID(); curPixelsID = request.getPixelsID(); initChannelData(); if (presentation != null) removePresentation(); buildPresentation(request.getImageName()); } | { LoadImage request = (LoadImage) response.getACT(); renderingControl = response.getProxy(); pxsDims = renderingControl.getPixelsDims(); pxsStats = renderingControl.getPixelsStats(); curImageID = request.getImageID(); curPixelsID = request.getPixelsID(); initChannelData(); if (presentation != null) removePresentation(); buildPresentation(request.getImageName()); } | private void handleImageLoaded(ImageLoaded response) { LoadImage request = (LoadImage) response.getACT(); renderingControl = response.getProxy(); pxsDims = renderingControl.getPixelsDims(); pxsStats = renderingControl.getPixelsStats(); curImageID = request.getImageID(); curPixelsID = request.getPixelsID(); initChannelData(); if (presentation != null) removePresentation(); buildPresentation(request.getImageName()); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1722ebf9ac60fc8e45cdc8d0049e85db5b86715c/RenderingAgt.java/clean/SRC/org/openmicroscopy/shoola/agents/rnd/RenderingAgt.java |
{ try { DataManagementService ds = registry.getDataManagementService(); channelData = ds.getChannelData(curImageID); if (channelData == null) defaultInitChannelData(); else { if (channelData.length != pxsDims.sizeW) defaultInitChannelData(); } } catch(DSAccessException dsae) { String s = "Can't retrieve the channel data for "+curImageID+"."; registry.getLogger().error(this, s+" Error: "+dsae); registry.getUserNotifier().notifyError("Data Retrieval Failure", s, dsae); defaultInitChannelData(); } catch(DSOutOfServiceException dsose) { ServiceActivationRequest request = new ServiceActivationRequest( ServiceActivationRequest.DATA_SERVICES); registry.getEventBus().post(request); | { try { DataManagementService ds = registry.getDataManagementService(); channelData = ds.getChannelData(curImageID); if (channelData.length != pxsDims.sizeW || channelData == null) defaultInitChannelData(); } catch(DSAccessException dsae) { String s = "Can't retrieve the channel data for "+curImageID+"."; registry.getLogger().error(this, s+" Error: "+dsae); registry.getUserNotifier().notifyError("Data Retrieval Failure", s, dsae); | void initChannelData() { try { DataManagementService ds = registry.getDataManagementService(); channelData = ds.getChannelData(curImageID); if (channelData == null) defaultInitChannelData(); else { if (channelData.length != pxsDims.sizeW) defaultInitChannelData(); } } catch(DSAccessException dsae) { String s = "Can't retrieve the channel data for "+curImageID+"."; registry.getLogger().error(this, s+" Error: "+dsae); registry.getUserNotifier().notifyError("Data Retrieval Failure", s, dsae); defaultInitChannelData(); } catch(DSOutOfServiceException dsose) { ServiceActivationRequest request = new ServiceActivationRequest( ServiceActivationRequest.DATA_SERVICES); registry.getEventBus().post(request); defaultInitChannelData(); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1722ebf9ac60fc8e45cdc8d0049e85db5b86715c/RenderingAgt.java/clean/SRC/org/openmicroscopy/shoola/agents/rnd/RenderingAgt.java |
} } | } catch(DSOutOfServiceException dsose) { ServiceActivationRequest request = new ServiceActivationRequest( ServiceActivationRequest.DATA_SERVICES); registry.getEventBus().post(request); } } | void initChannelData() { try { DataManagementService ds = registry.getDataManagementService(); channelData = ds.getChannelData(curImageID); if (channelData == null) defaultInitChannelData(); else { if (channelData.length != pxsDims.sizeW) defaultInitChannelData(); } } catch(DSAccessException dsae) { String s = "Can't retrieve the channel data for "+curImageID+"."; registry.getLogger().error(this, s+" Error: "+dsae); registry.getUserNotifier().notifyError("Data Retrieval Failure", s, dsae); defaultInitChannelData(); } catch(DSOutOfServiceException dsose) { ServiceActivationRequest request = new ServiceActivationRequest( ServiceActivationRequest.DATA_SERVICES); registry.getEventBus().post(request); defaultInitChannelData(); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1722ebf9ac60fc8e45cdc8d0049e85db5b86715c/RenderingAgt.java/clean/SRC/org/openmicroscopy/shoola/agents/rnd/RenderingAgt.java |
{ RenderImage event = new RenderImage(curPixelsID); registry.getEventBus().post(event); } | { RenderImage event = new RenderImage(curPixelsID); registry.getEventBus().post(event); } | private void refreshImage() { RenderImage event = new RenderImage(curPixelsID); registry.getEventBus().post(event); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1722ebf9ac60fc8e45cdc8d0049e85db5b86715c/RenderingAgt.java/clean/SRC/org/openmicroscopy/shoola/agents/rnd/RenderingAgt.java |
{ control.disposeDialogs(); presentation.dispose(); control = null; presentation = null; } | { control.disposeDialogs(); presentation.dispose(); control = null; presentation = null; } | private void removePresentation() { control.disposeDialogs(); presentation.dispose(); control = null; presentation = null; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1722ebf9ac60fc8e45cdc8d0049e85db5b86715c/RenderingAgt.java/clean/SRC/org/openmicroscopy/shoola/agents/rnd/RenderingAgt.java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.