rem
stringlengths 0
477k
| add
stringlengths 0
313k
| context
stringlengths 6
599k
| meta
stringlengths 141
403
|
---|---|---|---|
view.getMovieT().setSelected(true); | view.movieT.setSelected(true); | private void handleIndexChanged(int index) { if (maxT == 0) { view.getMovieZ().setSelected(true); UserNotifier un = registry.getUserNotifier(); un.notifyInfo("Invalid selection", "The selected image has only one timepoint. "); } if (maxZ == 0) { view.getMovieT().setSelected(true); UserNotifier un = registry.getUserNotifier(); un.notifyInfo("Invalid selection", "The selected image has only one z-section. "); } if (maxZ != 0 && maxT != 0) setMovieIndex(index); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/ba2070eeb46c459cbb8ad43439d3f9ab12cf63e3/MoviePaneMng.java/clean/SRC/org/openmicroscopy/shoola/agents/viewer/movie/pane/MoviePaneMng.java |
setMovieStart(view.getSliderT().getStartValue()); | setMovieStart(view.sliderT.getStartValue()); | private void handleSliderTStateChanged(ChangeEventSlider e) { if (e.isStart()) setMovieStart(view.getSliderT().getStartValue()); else setMovieEnd(view.getSliderT().getEndValue()); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/ba2070eeb46c459cbb8ad43439d3f9ab12cf63e3/MoviePaneMng.java/clean/SRC/org/openmicroscopy/shoola/agents/viewer/movie/pane/MoviePaneMng.java |
setMovieEnd(view.getSliderT().getEndValue()); | setMovieEnd(view.sliderT.getEndValue()); | private void handleSliderTStateChanged(ChangeEventSlider e) { if (e.isStart()) setMovieStart(view.getSliderT().getStartValue()); else setMovieEnd(view.getSliderT().getEndValue()); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/ba2070eeb46c459cbb8ad43439d3f9ab12cf63e3/MoviePaneMng.java/clean/SRC/org/openmicroscopy/shoola/agents/viewer/movie/pane/MoviePaneMng.java |
setMovieStart(view.getSliderZ().getStartValue()); | setMovieStart(view.sliderZ.getStartValue()); | private void handleSliderZStateChanged(ChangeEventSlider e) { if (e.isStart()) setMovieStart(view.getSliderZ().getStartValue()); else setMovieEnd(view.getSliderZ().getEndValue()); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/ba2070eeb46c459cbb8ad43439d3f9ab12cf63e3/MoviePaneMng.java/clean/SRC/org/openmicroscopy/shoola/agents/viewer/movie/pane/MoviePaneMng.java |
setMovieEnd(view.getSliderZ().getEndValue()); | setMovieEnd(view.sliderZ.getEndValue()); | private void handleSliderZStateChanged(ChangeEventSlider e) { if (e.isStart()) setMovieStart(view.getSliderZ().getStartValue()); else setMovieEnd(view.getSliderZ().getEndValue()); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/ba2070eeb46c459cbb8ad43439d3f9ab12cf63e3/MoviePaneMng.java/clean/SRC/org/openmicroscopy/shoola/agents/viewer/movie/pane/MoviePaneMng.java |
view.getSliderT().setEndValue(val); | view.sliderT.setEndValue(val); | private void movieEndActionHandler(JTextField start, JTextField end) { boolean valid = false; int val = 0; int valStart = 0; try { val = Integer.parseInt(end.getText()); valStart = Integer.parseInt(start.getText()); if (valStart < val && val <= max) valid = true; } catch(NumberFormatException nfe) {} if (!valid) { end.selectAll(); UserNotifier un = registry.getUserNotifier(); int v = valStart+1; un.notifyInfo("Invalid end point", "Please enter a value between "+ v+" and "+max); } else { if (movieIndex == Player.MOVIE_T) { curEndT = val; view.getSliderT().setEndValue(val); } else { curEndZ = val; view.getSliderZ().setEndValue(val); } } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/ba2070eeb46c459cbb8ad43439d3f9ab12cf63e3/MoviePaneMng.java/clean/SRC/org/openmicroscopy/shoola/agents/viewer/movie/pane/MoviePaneMng.java |
view.getSliderZ().setEndValue(val); | view.sliderZ.setEndValue(val); | private void movieEndActionHandler(JTextField start, JTextField end) { boolean valid = false; int val = 0; int valStart = 0; try { val = Integer.parseInt(end.getText()); valStart = Integer.parseInt(start.getText()); if (valStart < val && val <= max) valid = true; } catch(NumberFormatException nfe) {} if (!valid) { end.selectAll(); UserNotifier un = registry.getUserNotifier(); int v = valStart+1; un.notifyInfo("Invalid end point", "Please enter a value between "+ v+" and "+max); } else { if (movieIndex == Player.MOVIE_T) { curEndT = val; view.getSliderT().setEndValue(val); } else { curEndZ = val; view.getSliderZ().setEndValue(val); } } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/ba2070eeb46c459cbb8ad43439d3f9ab12cf63e3/MoviePaneMng.java/clean/SRC/org/openmicroscopy/shoola/agents/viewer/movie/pane/MoviePaneMng.java |
playerUIMng.setEndMovie(val); | private void movieEndActionHandler(JTextField start, JTextField end) { boolean valid = false; int val = 0; int valStart = 0; try { val = Integer.parseInt(end.getText()); valStart = Integer.parseInt(start.getText()); if (valStart < val && val <= max) valid = true; } catch(NumberFormatException nfe) {} if (!valid) { end.selectAll(); UserNotifier un = registry.getUserNotifier(); int v = valStart+1; un.notifyInfo("Invalid end point", "Please enter a value between "+ v+" and "+max); } else { if (movieIndex == Player.MOVIE_T) { curEndT = val; view.getSliderT().setEndValue(val); } else { curEndZ = val; view.getSliderZ().setEndValue(val); } } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/ba2070eeb46c459cbb8ad43439d3f9ab12cf63e3/MoviePaneMng.java/clean/SRC/org/openmicroscopy/shoola/agents/viewer/movie/pane/MoviePaneMng.java |
|
view.getSliderT().setStartValue(val); | view.sliderT.setStartValue(val); | private void movieStartActionHandler(JTextField start, JTextField end) { boolean valid = false; int val = 0; int valEnd = max; try { val = Integer.parseInt(start.getText()); valEnd = Integer.parseInt(end.getText()); if (0 <= val && val < valEnd) valid = true; } catch(NumberFormatException nfe) {} if (!valid) { int v = valEnd-1; start.selectAll(); UserNotifier un = registry.getUserNotifier(); un.notifyInfo("Invalid start point", "Please enter a value between 0 and "+v); } else { if (movieIndex == Player.MOVIE_T) { curStartT = val; view.getSliderT().setStartValue(val); } else { curStartZ = val; view.getSliderZ().setStartValue(val); } } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/ba2070eeb46c459cbb8ad43439d3f9ab12cf63e3/MoviePaneMng.java/clean/SRC/org/openmicroscopy/shoola/agents/viewer/movie/pane/MoviePaneMng.java |
view.getSliderZ().setStartValue(val); | view.sliderZ.setStartValue(val); | private void movieStartActionHandler(JTextField start, JTextField end) { boolean valid = false; int val = 0; int valEnd = max; try { val = Integer.parseInt(start.getText()); valEnd = Integer.parseInt(end.getText()); if (0 <= val && val < valEnd) valid = true; } catch(NumberFormatException nfe) {} if (!valid) { int v = valEnd-1; start.selectAll(); UserNotifier un = registry.getUserNotifier(); un.notifyInfo("Invalid start point", "Please enter a value between 0 and "+v); } else { if (movieIndex == Player.MOVIE_T) { curStartT = val; view.getSliderT().setStartValue(val); } else { curStartZ = val; view.getSliderZ().setStartValue(val); } } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/ba2070eeb46c459cbb8ad43439d3f9ab12cf63e3/MoviePaneMng.java/clean/SRC/org/openmicroscopy/shoola/agents/viewer/movie/pane/MoviePaneMng.java |
playerUIMng.setStartMovie(val); | private void movieStartActionHandler(JTextField start, JTextField end) { boolean valid = false; int val = 0; int valEnd = max; try { val = Integer.parseInt(start.getText()); valEnd = Integer.parseInt(end.getText()); if (0 <= val && val < valEnd) valid = true; } catch(NumberFormatException nfe) {} if (!valid) { int v = valEnd-1; start.selectAll(); UserNotifier un = registry.getUserNotifier(); un.notifyInfo("Invalid start point", "Please enter a value between 0 and "+v); } else { if (movieIndex == Player.MOVIE_T) { curStartT = val; view.getSliderT().setStartValue(val); } else { curStartZ = val; view.getSliderZ().setStartValue(val); } } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/ba2070eeb46c459cbb8ad43439d3f9ab12cf63e3/MoviePaneMng.java/clean/SRC/org/openmicroscopy/shoola/agents/viewer/movie/pane/MoviePaneMng.java |
|
view.getSliderT().attachMouseListeners(); view.getSliderZ().removeMouseListeners(); | view.sliderT.attachMouseListeners(); view.sliderZ.removeMouseListeners(); | private void setMovieIndex(int index) { movieIndex = index; int start = Integer.parseInt(startTField.getText()); int end = Integer.parseInt(endTField.getText()); if (movieIndex == Player.MOVIE_T) { max = maxT; view.getSliderT().attachMouseListeners(); view.getSliderZ().removeMouseListeners(); setTFieldsEnabled(true); setZFieldsEnabled(false); } else { start = Integer.parseInt(startZField.getText()); end = Integer.parseInt(endZField.getText()); max = maxZ; view.getSliderT().removeMouseListeners(); view.getSliderZ().attachMouseListeners(); setTFieldsEnabled(false); setZFieldsEnabled(true); } playerUIMng.setIndex(movieIndex, max, start, end); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/ba2070eeb46c459cbb8ad43439d3f9ab12cf63e3/MoviePaneMng.java/clean/SRC/org/openmicroscopy/shoola/agents/viewer/movie/pane/MoviePaneMng.java |
view.getSliderT().removeMouseListeners(); view.getSliderZ().attachMouseListeners(); | view.sliderT.removeMouseListeners(); view.sliderZ.attachMouseListeners(); | private void setMovieIndex(int index) { movieIndex = index; int start = Integer.parseInt(startTField.getText()); int end = Integer.parseInt(endTField.getText()); if (movieIndex == Player.MOVIE_T) { max = maxT; view.getSliderT().attachMouseListeners(); view.getSliderZ().removeMouseListeners(); setTFieldsEnabled(true); setZFieldsEnabled(false); } else { start = Integer.parseInt(startZField.getText()); end = Integer.parseInt(endZField.getText()); max = maxZ; view.getSliderT().removeMouseListeners(); view.getSliderZ().attachMouseListeners(); setTFieldsEnabled(false); setZFieldsEnabled(true); } playerUIMng.setIndex(movieIndex, max, start, end); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/ba2070eeb46c459cbb8ad43439d3f9ab12cf63e3/MoviePaneMng.java/clean/SRC/org/openmicroscopy/shoola/agents/viewer/movie/pane/MoviePaneMng.java |
if (source == view.getSliderT()) | if (source == view.sliderT) | public void stateChanged(ChangeEvent e) { GraphicSlider source = (GraphicSlider) e.getSource(); if (source == view.getSliderT()) handleSliderTStateChanged((ChangeEventSlider) e); else handleSliderZStateChanged((ChangeEventSlider) e); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/ba2070eeb46c459cbb8ad43439d3f9ab12cf63e3/MoviePaneMng.java/clean/SRC/org/openmicroscopy/shoola/agents/viewer/movie/pane/MoviePaneMng.java |
if (!playerManager.isPlaying()) playerManager.setEndMovie(v); | stop(); setBorderPlay(false); playerManager.setEndMovie(v); | void setEndMovie(int v) { if (!playerManager.isPlaying()) playerManager.setEndMovie(v); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/ba2070eeb46c459cbb8ad43439d3f9ab12cf63e3/PlayerUIMng.java/buggy/SRC/org/openmicroscopy/shoola/agents/viewer/movie/pane/PlayerUIMng.java |
if (!playerManager.isPlaying()) playerManager.setStartMovie(v); | stop(); setBorderPlay(false); playerManager.setStartMovie(v); | void setStartMovie(int v) { if (!playerManager.isPlaying()) playerManager.setStartMovie(v); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/ba2070eeb46c459cbb8ad43439d3f9ab12cf63e3/PlayerUIMng.java/buggy/SRC/org/openmicroscopy/shoola/agents/viewer/movie/pane/PlayerUIMng.java |
if (extended) { pattern = unextend(pattern); } | if (extended) { pattern = unextend(pattern); } | public void compile(Ruby ruby, String pattern) throws RubyRegexpException { if (extended) { pattern = unextend(pattern); } try { this.re = new RE(pattern, cflags); } catch (REException e) { throw new RubyRegexpException(ruby, e.getMessage()); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/GNURegexpAdapter.java/clean/org/jruby/regexp/GNURegexpAdapter.java |
try { this.re = new RE(pattern, cflags); } catch (REException e) { throw new RubyRegexpException(ruby, e.getMessage()); } } | try { this.re = new RE(pattern, cflags); } catch (REException e) { throw new RubyRegexpException(ruby, e.getMessage()); } } | public void compile(Ruby ruby, String pattern) throws RubyRegexpException { if (extended) { pattern = unextend(pattern); } try { this.re = new RE(pattern, cflags); } catch (REException e) { throw new RubyRegexpException(ruby, e.getMessage()); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/GNURegexpAdapter.java/clean/org/jruby/regexp/GNURegexpAdapter.java |
return (cflags & RE.REG_ICASE) > 0; } | return (cflags & RE.REG_ICASE) > 0; } | public boolean getCasefold() { return (cflags & RE.REG_ICASE) > 0; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/GNURegexpAdapter.java/clean/org/jruby/regexp/GNURegexpAdapter.java |
REMatch match = re.getMatch(target, startPos, eflags); if (match != null) { int count = re.getNumSubs() + 1; int[] begin = new int[count]; int[] end = new int[count]; for (int i = 0; i < count; i++) { begin[i] = match.getStartIndex(i); end[i] = match.getEndIndex(i); } return new RubyMatchData(ruby, target, begin, end); } return ruby.getNil(); } | REMatch match = re.getMatch(target, startPos, eflags); if (match != null) { int count = re.getNumSubs() + 1; int[] begin = new int[count]; int[] end = new int[count]; for (int i = 0; i < count; i++) { begin[i] = match.getStartIndex(i); end[i] = match.getEndIndex(i); } return new RubyMatchData(ruby, target, begin, end); } return ruby.getNil(); } | public RubyObject search(Ruby ruby, String target, int startPos) { REMatch match = re.getMatch(target, startPos, eflags); if (match != null) { int count = re.getNumSubs() + 1; int[] begin = new int[count]; int[] end = new int[count]; for (int i = 0; i < count; i++) { begin[i] = match.getStartIndex(i); end[i] = match.getEndIndex(i); } return new RubyMatchData(ruby, target, begin, end); } return ruby.getNil(); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/GNURegexpAdapter.java/clean/org/jruby/regexp/GNURegexpAdapter.java |
if (set) { cflags |= RE.REG_ICASE; } else { cflags &= ~RE.REG_ICASE; } } | if (set) { cflags |= RE.REG_ICASE; } else { cflags &= ~RE.REG_ICASE; } } | public void setCasefold(boolean set) { if (set) { cflags |= RE.REG_ICASE; } else { cflags &= ~RE.REG_ICASE; } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/GNURegexpAdapter.java/clean/org/jruby/regexp/GNURegexpAdapter.java |
extended = set; } | extended = set; } | public void setExtended(boolean set) { extended = set; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/GNURegexpAdapter.java/clean/org/jruby/regexp/GNURegexpAdapter.java |
if (set) { cflags |= RE.REG_DOT_NEWLINE; } else { cflags &= ~RE.REG_DOT_NEWLINE; } } | if (set) { cflags |= RE.REG_DOT_NEWLINE; } else { cflags &= ~RE.REG_DOT_NEWLINE; } } | public void setMultiline(boolean set) { if (set) { cflags |= RE.REG_DOT_NEWLINE; } else { cflags &= ~RE.REG_DOT_NEWLINE; } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/GNURegexpAdapter.java/clean/org/jruby/regexp/GNURegexpAdapter.java |
modelPane.removeAll(); | 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/8a4d5e12d87798c81c0e8de88f3ca3fd97e8a6cc/RenderingAgtUIF.java/buggy/SRC/org/openmicroscopy/shoola/agents/rnd/RenderingAgtUIF.java |
|
throw getRuntime().newNameError(name + " is not struct member"); | throw notStructMemberError(name); | public IRubyObject get() { String name = getRuntime().getCurrentContext().getFrameLastFunc(); RubyArray member = (RubyArray) getInstanceVariable(classOf(), "__member__"); assert !member.isNil() : "uninitialized struct"; for (int i = 0; i < member.getLength(); i++) { if (member.entry(i).asSymbol().equals(name)) { return values[i]; } } throw getRuntime().newNameError(name + " is not struct member"); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/1278c5bb3507a052d150d814f15453542ae41aed/RubyStruct.java/buggy/src/org/jruby/RubyStruct.java |
throw getRuntime().newNameError(name + " is not struct member"); | throw notStructMemberError(name); | private IRubyObject getByName(String name) { RubyArray member = (RubyArray) getInstanceVariable(classOf(), "__member__"); assert !member.isNil() : "uninitialized struct"; for (int i = 0; i < member.getLength(); i++) { if (member.entry(i).asSymbol().equals(name)) { return values[i]; } } throw getRuntime().newNameError(name + " is not struct member"); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/1278c5bb3507a052d150d814f15453542ae41aed/RubyStruct.java/buggy/src/org/jruby/RubyStruct.java |
IRubyObject variable = type.getInstanceVariable(name); | IRubyObject variable = type.getInstanceVariable(name); | private static IRubyObject getInstanceVariable(RubyClass type, String name) { RubyClass structClass = type.getRuntime().getClass("Struct"); while (type != null && type != structClass) { IRubyObject variable = type.getInstanceVariable(name); if (variable != null) { return variable; } type = type.getSuperClass(); } return type.getRuntime().getNil(); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/1278c5bb3507a052d150d814f15453542ae41aed/RubyStruct.java/buggy/src/org/jruby/RubyStruct.java |
testFrozen("Struct is frozen"); | testFrozen("Struct is frozen"); | private void modify() { testFrozen("Struct is frozen"); if (!isTaint() && getRuntime().getSafeLevel() >= 4) { throw getRuntime().newSecurityError("Insecure: can't modify struct"); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/1278c5bb3507a052d150d814f15453542ae41aed/RubyStruct.java/buggy/src/org/jruby/RubyStruct.java |
throw recv.getRuntime().newNameError("identifier " + name + " needs to be constant"); | throw recv.getRuntime().newNameError("identifier " + name + " needs to be constant", name); | public static RubyClass newInstance(IRubyObject recv, IRubyObject[] args) { String name = null; if (args.length > 0 && args[0] instanceof RubyString) { name = args[0].toString(); } RubyArray member = recv.getRuntime().newArray(); for (int i = name == null ? 0 : 1; i < args.length; i++) { member.append(RubySymbol.newSymbol(recv.getRuntime(), args[i].asSymbol())); } RubyClass newStruct; if (name == null) { newStruct = new RubyClass((RubyClass) recv); } else { if (!IdUtil.isConstant(name)) { throw recv.getRuntime().newNameError("identifier " + name + " needs to be constant"); } newStruct = ((RubyClass) recv).defineClassUnder(name, (RubyClass) recv); } newStruct.setInstanceVariable("__size__", member.length()); newStruct.setInstanceVariable("__member__", member); CallbackFactory callbackFactory = recv.getRuntime().callbackFactory(RubyStruct.class); newStruct.defineSingletonMethod("new", callbackFactory.getOptSingletonMethod("newStruct")); newStruct.defineSingletonMethod("[]", callbackFactory.getOptSingletonMethod("newStruct")); newStruct.defineSingletonMethod("members", callbackFactory.getSingletonMethod("members")); // define access methods. for (int i = name == null ? 0 : 1; i < args.length; i++) { String memberName = args[i].asSymbol(); newStruct.defineMethod(memberName, callbackFactory.getMethod("get")); newStruct.defineMethod(memberName + "=", callbackFactory.getMethod("set", IRubyObject.class)); } return newStruct; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/1278c5bb3507a052d150d814f15453542ae41aed/RubyStruct.java/buggy/src/org/jruby/RubyStruct.java |
newStruct.defineSingletonMethod("new", callbackFactory.getOptSingletonMethod("newStruct")); | newStruct.defineSingletonMethod("new", callbackFactory.getOptSingletonMethod("newStruct")); | public static RubyClass newInstance(IRubyObject recv, IRubyObject[] args) { String name = null; if (args.length > 0 && args[0] instanceof RubyString) { name = args[0].toString(); } RubyArray member = recv.getRuntime().newArray(); for (int i = name == null ? 0 : 1; i < args.length; i++) { member.append(RubySymbol.newSymbol(recv.getRuntime(), args[i].asSymbol())); } RubyClass newStruct; if (name == null) { newStruct = new RubyClass((RubyClass) recv); } else { if (!IdUtil.isConstant(name)) { throw recv.getRuntime().newNameError("identifier " + name + " needs to be constant"); } newStruct = ((RubyClass) recv).defineClassUnder(name, (RubyClass) recv); } newStruct.setInstanceVariable("__size__", member.length()); newStruct.setInstanceVariable("__member__", member); CallbackFactory callbackFactory = recv.getRuntime().callbackFactory(RubyStruct.class); newStruct.defineSingletonMethod("new", callbackFactory.getOptSingletonMethod("newStruct")); newStruct.defineSingletonMethod("[]", callbackFactory.getOptSingletonMethod("newStruct")); newStruct.defineSingletonMethod("members", callbackFactory.getSingletonMethod("members")); // define access methods. for (int i = name == null ? 0 : 1; i < args.length; i++) { String memberName = args[i].asSymbol(); newStruct.defineMethod(memberName, callbackFactory.getMethod("get")); newStruct.defineMethod(memberName + "=", callbackFactory.getMethod("set", IRubyObject.class)); } return newStruct; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/1278c5bb3507a052d150d814f15453542ae41aed/RubyStruct.java/buggy/src/org/jruby/RubyStruct.java |
public IRubyObject rbClone() { RubyStruct clone = new RubyStruct(getRuntime(), getMetaClass()); clone.values = new IRubyObject[values.length]; System.arraycopy(values, 0, clone.values, 0, values.length); clone.setFrozen(this.isFrozen()); clone.setTaint(this.isTaint()); return clone; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/1278c5bb3507a052d150d814f15453542ae41aed/RubyStruct.java/buggy/src/org/jruby/RubyStruct.java |
||
public IRubyObject rbClone() { RubyStruct clone = new RubyStruct(getRuntime(), getMetaClass()); clone.values = new IRubyObject[values.length]; System.arraycopy(values, 0, clone.values, 0, values.length); clone.setFrozen(this.isFrozen()); clone.setTaint(this.isTaint()); return clone; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/1278c5bb3507a052d150d814f15453542ae41aed/RubyStruct.java/buggy/src/org/jruby/RubyStruct.java |
||
throw getRuntime().newNameError(name + " is not struct member"); | throw notStructMemberError(name); | public IRubyObject set(IRubyObject value) { String name = getRuntime().getCurrentContext().getFrameLastFunc(); if (name.endsWith("=")) { name = name.substring(0, name.length() - 1); } RubyArray member = (RubyArray) getInstanceVariable(classOf(), "__member__"); assert !member.isNil() : "uninitialized struct"; modify(); for (int i = 0; i < member.getLength(); i++) { if (member.entry(i).asSymbol().equals(name)) { return values[i] = value; } } throw getRuntime().newNameError(name + " is not struct member"); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/1278c5bb3507a052d150d814f15453542ae41aed/RubyStruct.java/buggy/src/org/jruby/RubyStruct.java |
throw getRuntime().newNameError(name + " is not struct member"); | throw notStructMemberError(name); | private IRubyObject setByName(String name, IRubyObject value) { RubyArray member = (RubyArray) getInstanceVariable(classOf(), "__member__"); assert !member.isNil() : "uninitialized struct"; modify(); for (int i = 0; i < member.getLength(); i++) { if (member.entry(i).asSymbol().equals(name)) { return values[i] = value; } } throw getRuntime().newNameError(name + " is not struct member"); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/1278c5bb3507a052d150d814f15453542ae41aed/RubyStruct.java/buggy/src/org/jruby/RubyStruct.java |
throw runtime.newNameError("uninitialized constant " + className); | throw runtime.newNameError("uninitialized constant " + className, className.asSymbol()); | public static RubyStruct unmarshalFrom(UnmarshalStream input) throws java.io.IOException { IRuby runtime = input.getRuntime(); RubySymbol className = (RubySymbol) input.unmarshalObject(); RubyClass rbClass = pathToClass(runtime, className.asSymbol()); if (rbClass == null) { throw runtime.newNameError("uninitialized constant " + className); } int size = input.unmarshalInt(); IRubyObject[] values = new IRubyObject[size]; for (int i = 0; i < size; i++) { input.unmarshalObject(); // Read and discard a Symbol, which is the name values[i] = input.unmarshalObject(); } RubyStruct result = newStruct(rbClass, values); input.registerLinkTarget(result); return result; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/1278c5bb3507a052d150d814f15453542ae41aed/RubyStruct.java/buggy/src/org/jruby/RubyStruct.java |
public void adaptSetUp() throws Exception { super.setUp(); } | public void adaptSetUp() throws Exception{setUp();} | public void adaptSetUp() throws Exception { super.setUp(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/59b11883b95c926d6706e6d30b4cdb898088683c/AbstractManagedContextTest.java/clean/components/server/test/ome/server/itests/AbstractManagedContextTest.java |
public void adaptTearDown() throws Exception { super.tearDown(); } | public void adaptTearDown() throws Exception{tearDown();} | public void adaptTearDown() throws Exception { super.tearDown(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/59b11883b95c926d6706e6d30b4cdb898088683c/AbstractManagedContextTest.java/clean/components/server/test/ome/server/itests/AbstractManagedContextTest.java |
getLog().debug( "excludedClasses" + excludedClasses ); | getLog().debug( "excludedClasses[" + excludedClasses + "]"); | public void execute() throws MojoExecutionException, MojoFailureException { getLog().debug( " ======= XBeanMojo settings =======" ); getLog().debug( "namespace[" + namespace + "]" ); getLog().debug( "srcDir[" + srcDir + "]" ); getLog().debug( "schema[" + schema + "]" ); getLog().debug( "excludedClasses" + excludedClasses ); getLog().debug( "outputDir[" + outputDir + "]" ); getLog().debug( "propertyEditorPaths[" + propertyEditorPaths + "]" ); getLog().debug( "schemaAsArtifact[" + schemaAsArtifact + "]"); if (schema == null) { schema = new File(outputDir, project.getArtifactId() + ".xsd"); } if (propertyEditorPaths != null) { List editorSearchPath = new LinkedList(Arrays.asList(PropertyEditorManager.getEditorSearchPath())); StringTokenizer paths = new StringTokenizer(propertyEditorPaths, " ,"); editorSearchPath.addAll(Collections.list(paths)); PropertyEditorManager.setEditorSearchPath((String[]) editorSearchPath.toArray(new String[editorSearchPath.size()])); } ClassLoader oldCL = Thread.currentThread().getContextClassLoader(); Thread.currentThread().setContextClassLoader(getClass().getClassLoader()); try { schema.getParentFile().mkdirs(); String[] excludedClasses = null; if (this.excludedClasses != null) { excludedClasses = this.excludedClasses.split(" *, *"); } MappingLoader mappingLoader = new QdoxMappingLoader(namespace, new File[] { srcDir }, excludedClasses); GeneratorPlugin[] plugins = new GeneratorPlugin[]{ new XmlMetadataGenerator(outputDir.getAbsolutePath(), schema), new DocumentationGenerator(schema), new XsdGenerator(schema), new WikiDocumentationGenerator(schema), }; // load the mappings Set namespaces = mappingLoader.loadNamespaces(); if (namespaces.isEmpty()) { System.out.println("Warning: no namespaces found!"); } // generate the files for (Iterator iterator = namespaces.iterator(); iterator.hasNext();) { NamespaceMapping namespaceMapping = (NamespaceMapping) iterator.next(); for (int i = 0; i < plugins.length; i++) { GeneratorPlugin plugin = plugins[i]; plugin.setLog(this); plugin.generate(namespaceMapping); } for (Iterator iter = generatorPlugins.iterator(); iter.hasNext();) { GeneratorPlugin plugin = (GeneratorPlugin) iter.next(); plugin.setLog(this); plugin.generate(namespaceMapping); } } // Attach them as artifacts if (schemaAsArtifact) { projectHelper.attachArtifact(project, "xsd", null, schema); projectHelper.attachArtifact(project, "html", "schema", new File(schema.getAbsolutePath() + ".html")); } Resource res = new Resource(); res.setDirectory(outputDir.toString()); project.addResource(res); log("...done."); } catch (Exception e) { throw new BuildException(e); } finally { Thread.currentThread().setContextClassLoader(oldCL); } } | 52533 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52533/9f90eebc67f355ad2317511299a2ec9134b97fb5/XBeanMojo.java/clean/maven-xbean-plugin/src/main/java/org/apache/xbean/maven/XBeanMojo.java |
enum = e; | enumeration = e; | public EnumIterator (Enumeration e) { enum = e; hasNext = e.hasMoreElements(); } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/66b6fa23bd4cbc41e75a36f1705ebb0db3d2f013/EnumIterator.java/buggy/webmacro/src/org/webmacro/util/EnumIterator.java |
this.signed = PlaneFactory.isTypeSigned(type); | protected Plane2D(PlaneDef pDef, Pixels pixels, MappedByteBuffer data) { this.planeDef = pDef; this.sizeX = pixels.getSizeX(); this.sizeY = pixels.getSizeY(); this.data = data; // FIXME: Hack for now while we're still using pixel data from the old // OMEIS repository! There really should be a configuration option for // this or potentially usage of an endianness flag on the Pixels set. this.data.order(ByteOrder.LITTLE_ENDIAN); // Grab the pixel type from the pixels set PixelsType type = pixels.getPixelsType(); this.bytesPerPixel = PlaneFactory.bytesPerPixel(type); this.javaType = PlaneFactory.javaType(type); log.info("Created Plane2D with dimensions " + sizeX + "x" + sizeY + "x" + bytesPerPixel); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/f41604d91107df56e80e8e276692c376fbf201fa/Plane2D.java/clean/components/rendering/src/omeis/providers/re/data/Plane2D.java |
|
switch(javaType) | if (signed) | public double getPixelValue(int x1, int x2) { int offset = calculateOffset(x1, x2); switch(javaType) { case PlaneFactory.BYTE: return data.get(offset); case PlaneFactory.SHORT: return data.getShort(offset); case PlaneFactory.INT: return data.getInt(offset); case PlaneFactory.FLOAT: return data.getFloat(offset); case PlaneFactory.DOUBLE: return data.getDouble(offset); } throw new RuntimeException("Unknown pixel type."); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/f41604d91107df56e80e8e276692c376fbf201fa/Plane2D.java/clean/components/rendering/src/omeis/providers/re/data/Plane2D.java |
case PlaneFactory.BYTE: return data.get(offset); case PlaneFactory.SHORT: return data.getShort(offset); case PlaneFactory.INT: return data.getInt(offset); case PlaneFactory.FLOAT: return data.getFloat(offset); case PlaneFactory.DOUBLE: return data.getDouble(offset); } | switch(javaType) { case PlaneFactory.BYTE: return data.get(offset); case PlaneFactory.SHORT: return data.getShort(offset); case PlaneFactory.INT: return data.getInt(offset); case PlaneFactory.FLOAT: return data.getFloat(offset); case PlaneFactory.DOUBLE: return data.getDouble(offset); } } else { switch(javaType) { case PlaneFactory.BYTE: return (short) (data.get(offset) & 0xff); case PlaneFactory.SHORT: return (int) (data.getShort(offset) & 0xffff); case PlaneFactory.INT: return (long) (data.getInt(offset) & 0xffffffffL); } } | public double getPixelValue(int x1, int x2) { int offset = calculateOffset(x1, x2); switch(javaType) { case PlaneFactory.BYTE: return data.get(offset); case PlaneFactory.SHORT: return data.getShort(offset); case PlaneFactory.INT: return data.getInt(offset); case PlaneFactory.FLOAT: return data.getFloat(offset); case PlaneFactory.DOUBLE: return data.getDouble(offset); } throw new RuntimeException("Unknown pixel type."); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/f41604d91107df56e80e8e276692c376fbf201fa/Plane2D.java/clean/components/rendering/src/omeis/providers/re/data/Plane2D.java |
break; case 0: case 4: if ((0xffffff6fffffdbffL & l) == 0L) break; if (kind > 56) kind = 56; jjCheckNAdd(4); | private final int jjMoveNfa_0(int startState, int curPos){ int[] nextStates; int startsAt = 0; jjnewStateCnt = 5; int i = 1; jjstateSet[0] = startState; int j, kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << curChar; MatchLoop: do { switch(jjstateSet[--i]) { case 1: if ((0xfc00ffffffffffffL & l) != 0L) { if (kind > 21) kind = 21; } if (curChar == 13) jjstateSet[jjnewStateCnt++] = 2; break; case 0: case 4: if ((0xffffff6fffffdbffL & l) == 0L) break; if (kind > 56) kind = 56; jjCheckNAdd(4); break; case 2: if (curChar == 10 && kind > 21) kind = 21; break; case 3: if (curChar == 13) jjstateSet[jjnewStateCnt++] = 2; break; default : break; } } while(i != startsAt); } else if (curChar < 128) { long l = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: if ((0xf8000001f8000001L & l) != 0L && kind > 21) kind = 21; break; case 0: if ((0xffffffffefffffffL & l) != 0L) { if (kind > 56) kind = 56; jjCheckNAdd(4); } else if (curChar == 92) jjAddStates(2, 3); break; case 4: if ((0xffffffffefffffffL & l) == 0L) break; if (kind > 56) kind = 56; jjCheckNAdd(4); break; default : break; } } while(i != startsAt); } else { int hiByte = (int)(curChar >> 8); int i1 = hiByte >> 6; long l1 = 1L << (hiByte & 077); int i2 = (curChar & 0xff) >> 6; long l2 = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 21) kind = 21; break; case 0: case 4: if (!jjCanMove_0(hiByte, i1, i2, l1, l2)) break; if (kind > 56) kind = 56; jjCheckNAdd(4); break; default : break; } } while(i != startsAt); } if (kind != 0x7fffffff) { jjmatchedKind = kind; jjmatchedPos = curPos; kind = 0x7fffffff; } ++curPos; if ((i = jjnewStateCnt) == (startsAt = 5 - (jjnewStateCnt = startsAt))) return curPos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return curPos; } }} | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/126c8b01768c9be523a6baffb01538d1aba40e1e/WMParser_implTokenManager.java/buggy/webmacro/src/org/webmacro/parser/WMParser_implTokenManager.java |
|
case 1: if ((0xf8000001f8000001L & l) != 0L && kind > 21) kind = 21; break; | private final int jjMoveNfa_0(int startState, int curPos){ int[] nextStates; int startsAt = 0; jjnewStateCnt = 5; int i = 1; jjstateSet[0] = startState; int j, kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << curChar; MatchLoop: do { switch(jjstateSet[--i]) { case 1: if ((0xfc00ffffffffffffL & l) != 0L) { if (kind > 21) kind = 21; } if (curChar == 13) jjstateSet[jjnewStateCnt++] = 2; break; case 0: case 4: if ((0xffffff6fffffdbffL & l) == 0L) break; if (kind > 56) kind = 56; jjCheckNAdd(4); break; case 2: if (curChar == 10 && kind > 21) kind = 21; break; case 3: if (curChar == 13) jjstateSet[jjnewStateCnt++] = 2; break; default : break; } } while(i != startsAt); } else if (curChar < 128) { long l = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: if ((0xf8000001f8000001L & l) != 0L && kind > 21) kind = 21; break; case 0: if ((0xffffffffefffffffL & l) != 0L) { if (kind > 56) kind = 56; jjCheckNAdd(4); } else if (curChar == 92) jjAddStates(2, 3); break; case 4: if ((0xffffffffefffffffL & l) == 0L) break; if (kind > 56) kind = 56; jjCheckNAdd(4); break; default : break; } } while(i != startsAt); } else { int hiByte = (int)(curChar >> 8); int i1 = hiByte >> 6; long l1 = 1L << (hiByte & 077); int i2 = (curChar & 0xff) >> 6; long l2 = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 21) kind = 21; break; case 0: case 4: if (!jjCanMove_0(hiByte, i1, i2, l1, l2)) break; if (kind > 56) kind = 56; jjCheckNAdd(4); break; default : break; } } while(i != startsAt); } if (kind != 0x7fffffff) { jjmatchedKind = kind; jjmatchedPos = curPos; kind = 0x7fffffff; } ++curPos; if ((i = jjnewStateCnt) == (startsAt = 5 - (jjnewStateCnt = startsAt))) return curPos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return curPos; } }} | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/126c8b01768c9be523a6baffb01538d1aba40e1e/WMParser_implTokenManager.java/buggy/webmacro/src/org/webmacro/parser/WMParser_implTokenManager.java |
|
jjAddStates(2, 3); | jjAddStates(0, 1); break; case 1: if ((0xf8000001f8000001L & l) != 0L && kind > 21) kind = 21; | private final int jjMoveNfa_0(int startState, int curPos){ int[] nextStates; int startsAt = 0; jjnewStateCnt = 5; int i = 1; jjstateSet[0] = startState; int j, kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << curChar; MatchLoop: do { switch(jjstateSet[--i]) { case 1: if ((0xfc00ffffffffffffL & l) != 0L) { if (kind > 21) kind = 21; } if (curChar == 13) jjstateSet[jjnewStateCnt++] = 2; break; case 0: case 4: if ((0xffffff6fffffdbffL & l) == 0L) break; if (kind > 56) kind = 56; jjCheckNAdd(4); break; case 2: if (curChar == 10 && kind > 21) kind = 21; break; case 3: if (curChar == 13) jjstateSet[jjnewStateCnt++] = 2; break; default : break; } } while(i != startsAt); } else if (curChar < 128) { long l = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: if ((0xf8000001f8000001L & l) != 0L && kind > 21) kind = 21; break; case 0: if ((0xffffffffefffffffL & l) != 0L) { if (kind > 56) kind = 56; jjCheckNAdd(4); } else if (curChar == 92) jjAddStates(2, 3); break; case 4: if ((0xffffffffefffffffL & l) == 0L) break; if (kind > 56) kind = 56; jjCheckNAdd(4); break; default : break; } } while(i != startsAt); } else { int hiByte = (int)(curChar >> 8); int i1 = hiByte >> 6; long l1 = 1L << (hiByte & 077); int i2 = (curChar & 0xff) >> 6; long l2 = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 21) kind = 21; break; case 0: case 4: if (!jjCanMove_0(hiByte, i1, i2, l1, l2)) break; if (kind > 56) kind = 56; jjCheckNAdd(4); break; default : break; } } while(i != startsAt); } if (kind != 0x7fffffff) { jjmatchedKind = kind; jjmatchedPos = curPos; kind = 0x7fffffff; } ++curPos; if ((i = jjnewStateCnt) == (startsAt = 5 - (jjnewStateCnt = startsAt))) return curPos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return curPos; } }} | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/126c8b01768c9be523a6baffb01538d1aba40e1e/WMParser_implTokenManager.java/buggy/webmacro/src/org/webmacro/parser/WMParser_implTokenManager.java |
case 1: if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 21) kind = 21; break; | private final int jjMoveNfa_0(int startState, int curPos){ int[] nextStates; int startsAt = 0; jjnewStateCnt = 5; int i = 1; jjstateSet[0] = startState; int j, kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << curChar; MatchLoop: do { switch(jjstateSet[--i]) { case 1: if ((0xfc00ffffffffffffL & l) != 0L) { if (kind > 21) kind = 21; } if (curChar == 13) jjstateSet[jjnewStateCnt++] = 2; break; case 0: case 4: if ((0xffffff6fffffdbffL & l) == 0L) break; if (kind > 56) kind = 56; jjCheckNAdd(4); break; case 2: if (curChar == 10 && kind > 21) kind = 21; break; case 3: if (curChar == 13) jjstateSet[jjnewStateCnt++] = 2; break; default : break; } } while(i != startsAt); } else if (curChar < 128) { long l = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: if ((0xf8000001f8000001L & l) != 0L && kind > 21) kind = 21; break; case 0: if ((0xffffffffefffffffL & l) != 0L) { if (kind > 56) kind = 56; jjCheckNAdd(4); } else if (curChar == 92) jjAddStates(2, 3); break; case 4: if ((0xffffffffefffffffL & l) == 0L) break; if (kind > 56) kind = 56; jjCheckNAdd(4); break; default : break; } } while(i != startsAt); } else { int hiByte = (int)(curChar >> 8); int i1 = hiByte >> 6; long l1 = 1L << (hiByte & 077); int i2 = (curChar & 0xff) >> 6; long l2 = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 21) kind = 21; break; case 0: case 4: if (!jjCanMove_0(hiByte, i1, i2, l1, l2)) break; if (kind > 56) kind = 56; jjCheckNAdd(4); break; default : break; } } while(i != startsAt); } if (kind != 0x7fffffff) { jjmatchedKind = kind; jjmatchedPos = curPos; kind = 0x7fffffff; } ++curPos; if ((i = jjnewStateCnt) == (startsAt = 5 - (jjnewStateCnt = startsAt))) return curPos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return curPos; } }} | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/126c8b01768c9be523a6baffb01538d1aba40e1e/WMParser_implTokenManager.java/buggy/webmacro/src/org/webmacro/parser/WMParser_implTokenManager.java |
|
break; case 1: if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 21) kind = 21; | private final int jjMoveNfa_0(int startState, int curPos){ int[] nextStates; int startsAt = 0; jjnewStateCnt = 5; int i = 1; jjstateSet[0] = startState; int j, kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << curChar; MatchLoop: do { switch(jjstateSet[--i]) { case 1: if ((0xfc00ffffffffffffL & l) != 0L) { if (kind > 21) kind = 21; } if (curChar == 13) jjstateSet[jjnewStateCnt++] = 2; break; case 0: case 4: if ((0xffffff6fffffdbffL & l) == 0L) break; if (kind > 56) kind = 56; jjCheckNAdd(4); break; case 2: if (curChar == 10 && kind > 21) kind = 21; break; case 3: if (curChar == 13) jjstateSet[jjnewStateCnt++] = 2; break; default : break; } } while(i != startsAt); } else if (curChar < 128) { long l = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: if ((0xf8000001f8000001L & l) != 0L && kind > 21) kind = 21; break; case 0: if ((0xffffffffefffffffL & l) != 0L) { if (kind > 56) kind = 56; jjCheckNAdd(4); } else if (curChar == 92) jjAddStates(2, 3); break; case 4: if ((0xffffffffefffffffL & l) == 0L) break; if (kind > 56) kind = 56; jjCheckNAdd(4); break; default : break; } } while(i != startsAt); } else { int hiByte = (int)(curChar >> 8); int i1 = hiByte >> 6; long l1 = 1L << (hiByte & 077); int i2 = (curChar & 0xff) >> 6; long l2 = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 21) kind = 21; break; case 0: case 4: if (!jjCanMove_0(hiByte, i1, i2, l1, l2)) break; if (kind > 56) kind = 56; jjCheckNAdd(4); break; default : break; } } while(i != startsAt); } if (kind != 0x7fffffff) { jjmatchedKind = kind; jjmatchedPos = curPos; kind = 0x7fffffff; } ++curPos; if ((i = jjnewStateCnt) == (startsAt = 5 - (jjnewStateCnt = startsAt))) return curPos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return curPos; } }} | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/126c8b01768c9be523a6baffb01538d1aba40e1e/WMParser_implTokenManager.java/buggy/webmacro/src/org/webmacro/parser/WMParser_implTokenManager.java |
|
break; case 0: case 4: if ((0xffffffebffffdbffL & l) == 0L) break; if (kind > 55) kind = 55; jjCheckNAdd(4); | private final int jjMoveNfa_1(int startState, int curPos){ int[] nextStates; int startsAt = 0; jjnewStateCnt = 5; int i = 1; jjstateSet[0] = startState; int j, kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << curChar; MatchLoop: do { switch(jjstateSet[--i]) { case 1: if ((0xfc00ffffffffffffL & l) != 0L) { if (kind > 21) kind = 21; } if (curChar == 13) jjstateSet[jjnewStateCnt++] = 2; break; case 0: case 4: if ((0xffffffebffffdbffL & l) == 0L) break; if (kind > 55) kind = 55; jjCheckNAdd(4); break; case 2: if (curChar == 10 && kind > 21) kind = 21; break; case 3: if (curChar == 13) jjstateSet[jjnewStateCnt++] = 2; break; default : break; } } while(i != startsAt); } else if (curChar < 128) { long l = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: if ((0xf8000001f8000001L & l) != 0L && kind > 21) kind = 21; break; case 0: if ((0xffffffffefffffffL & l) != 0L) { if (kind > 55) kind = 55; jjCheckNAdd(4); } else if (curChar == 92) jjAddStates(2, 3); break; case 4: if ((0xffffffffefffffffL & l) == 0L) break; if (kind > 55) kind = 55; jjCheckNAdd(4); break; default : break; } } while(i != startsAt); } else { int hiByte = (int)(curChar >> 8); int i1 = hiByte >> 6; long l1 = 1L << (hiByte & 077); int i2 = (curChar & 0xff) >> 6; long l2 = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 21) kind = 21; break; case 0: case 4: if (!jjCanMove_0(hiByte, i1, i2, l1, l2)) break; if (kind > 55) kind = 55; jjCheckNAdd(4); break; default : break; } } while(i != startsAt); } if (kind != 0x7fffffff) { jjmatchedKind = kind; jjmatchedPos = curPos; kind = 0x7fffffff; } ++curPos; if ((i = jjnewStateCnt) == (startsAt = 5 - (jjnewStateCnt = startsAt))) return curPos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return curPos; } }} | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/126c8b01768c9be523a6baffb01538d1aba40e1e/WMParser_implTokenManager.java/buggy/webmacro/src/org/webmacro/parser/WMParser_implTokenManager.java |
|
case 1: if ((0xf8000001f8000001L & l) != 0L && kind > 21) kind = 21; break; | private final int jjMoveNfa_1(int startState, int curPos){ int[] nextStates; int startsAt = 0; jjnewStateCnt = 5; int i = 1; jjstateSet[0] = startState; int j, kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << curChar; MatchLoop: do { switch(jjstateSet[--i]) { case 1: if ((0xfc00ffffffffffffL & l) != 0L) { if (kind > 21) kind = 21; } if (curChar == 13) jjstateSet[jjnewStateCnt++] = 2; break; case 0: case 4: if ((0xffffffebffffdbffL & l) == 0L) break; if (kind > 55) kind = 55; jjCheckNAdd(4); break; case 2: if (curChar == 10 && kind > 21) kind = 21; break; case 3: if (curChar == 13) jjstateSet[jjnewStateCnt++] = 2; break; default : break; } } while(i != startsAt); } else if (curChar < 128) { long l = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: if ((0xf8000001f8000001L & l) != 0L && kind > 21) kind = 21; break; case 0: if ((0xffffffffefffffffL & l) != 0L) { if (kind > 55) kind = 55; jjCheckNAdd(4); } else if (curChar == 92) jjAddStates(2, 3); break; case 4: if ((0xffffffffefffffffL & l) == 0L) break; if (kind > 55) kind = 55; jjCheckNAdd(4); break; default : break; } } while(i != startsAt); } else { int hiByte = (int)(curChar >> 8); int i1 = hiByte >> 6; long l1 = 1L << (hiByte & 077); int i2 = (curChar & 0xff) >> 6; long l2 = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 21) kind = 21; break; case 0: case 4: if (!jjCanMove_0(hiByte, i1, i2, l1, l2)) break; if (kind > 55) kind = 55; jjCheckNAdd(4); break; default : break; } } while(i != startsAt); } if (kind != 0x7fffffff) { jjmatchedKind = kind; jjmatchedPos = curPos; kind = 0x7fffffff; } ++curPos; if ((i = jjnewStateCnt) == (startsAt = 5 - (jjnewStateCnt = startsAt))) return curPos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return curPos; } }} | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/126c8b01768c9be523a6baffb01538d1aba40e1e/WMParser_implTokenManager.java/buggy/webmacro/src/org/webmacro/parser/WMParser_implTokenManager.java |
|
jjAddStates(2, 3); | jjAddStates(0, 1); break; case 1: if ((0xf8000001f8000001L & l) != 0L && kind > 21) kind = 21; | private final int jjMoveNfa_1(int startState, int curPos){ int[] nextStates; int startsAt = 0; jjnewStateCnt = 5; int i = 1; jjstateSet[0] = startState; int j, kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << curChar; MatchLoop: do { switch(jjstateSet[--i]) { case 1: if ((0xfc00ffffffffffffL & l) != 0L) { if (kind > 21) kind = 21; } if (curChar == 13) jjstateSet[jjnewStateCnt++] = 2; break; case 0: case 4: if ((0xffffffebffffdbffL & l) == 0L) break; if (kind > 55) kind = 55; jjCheckNAdd(4); break; case 2: if (curChar == 10 && kind > 21) kind = 21; break; case 3: if (curChar == 13) jjstateSet[jjnewStateCnt++] = 2; break; default : break; } } while(i != startsAt); } else if (curChar < 128) { long l = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: if ((0xf8000001f8000001L & l) != 0L && kind > 21) kind = 21; break; case 0: if ((0xffffffffefffffffL & l) != 0L) { if (kind > 55) kind = 55; jjCheckNAdd(4); } else if (curChar == 92) jjAddStates(2, 3); break; case 4: if ((0xffffffffefffffffL & l) == 0L) break; if (kind > 55) kind = 55; jjCheckNAdd(4); break; default : break; } } while(i != startsAt); } else { int hiByte = (int)(curChar >> 8); int i1 = hiByte >> 6; long l1 = 1L << (hiByte & 077); int i2 = (curChar & 0xff) >> 6; long l2 = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 21) kind = 21; break; case 0: case 4: if (!jjCanMove_0(hiByte, i1, i2, l1, l2)) break; if (kind > 55) kind = 55; jjCheckNAdd(4); break; default : break; } } while(i != startsAt); } if (kind != 0x7fffffff) { jjmatchedKind = kind; jjmatchedPos = curPos; kind = 0x7fffffff; } ++curPos; if ((i = jjnewStateCnt) == (startsAt = 5 - (jjnewStateCnt = startsAt))) return curPos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return curPos; } }} | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/126c8b01768c9be523a6baffb01538d1aba40e1e/WMParser_implTokenManager.java/buggy/webmacro/src/org/webmacro/parser/WMParser_implTokenManager.java |
case 1: if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 21) kind = 21; break; | private final int jjMoveNfa_1(int startState, int curPos){ int[] nextStates; int startsAt = 0; jjnewStateCnt = 5; int i = 1; jjstateSet[0] = startState; int j, kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << curChar; MatchLoop: do { switch(jjstateSet[--i]) { case 1: if ((0xfc00ffffffffffffL & l) != 0L) { if (kind > 21) kind = 21; } if (curChar == 13) jjstateSet[jjnewStateCnt++] = 2; break; case 0: case 4: if ((0xffffffebffffdbffL & l) == 0L) break; if (kind > 55) kind = 55; jjCheckNAdd(4); break; case 2: if (curChar == 10 && kind > 21) kind = 21; break; case 3: if (curChar == 13) jjstateSet[jjnewStateCnt++] = 2; break; default : break; } } while(i != startsAt); } else if (curChar < 128) { long l = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: if ((0xf8000001f8000001L & l) != 0L && kind > 21) kind = 21; break; case 0: if ((0xffffffffefffffffL & l) != 0L) { if (kind > 55) kind = 55; jjCheckNAdd(4); } else if (curChar == 92) jjAddStates(2, 3); break; case 4: if ((0xffffffffefffffffL & l) == 0L) break; if (kind > 55) kind = 55; jjCheckNAdd(4); break; default : break; } } while(i != startsAt); } else { int hiByte = (int)(curChar >> 8); int i1 = hiByte >> 6; long l1 = 1L << (hiByte & 077); int i2 = (curChar & 0xff) >> 6; long l2 = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 21) kind = 21; break; case 0: case 4: if (!jjCanMove_0(hiByte, i1, i2, l1, l2)) break; if (kind > 55) kind = 55; jjCheckNAdd(4); break; default : break; } } while(i != startsAt); } if (kind != 0x7fffffff) { jjmatchedKind = kind; jjmatchedPos = curPos; kind = 0x7fffffff; } ++curPos; if ((i = jjnewStateCnt) == (startsAt = 5 - (jjnewStateCnt = startsAt))) return curPos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return curPos; } }} | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/126c8b01768c9be523a6baffb01538d1aba40e1e/WMParser_implTokenManager.java/buggy/webmacro/src/org/webmacro/parser/WMParser_implTokenManager.java |
|
break; case 1: if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 21) kind = 21; | private final int jjMoveNfa_1(int startState, int curPos){ int[] nextStates; int startsAt = 0; jjnewStateCnt = 5; int i = 1; jjstateSet[0] = startState; int j, kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << curChar; MatchLoop: do { switch(jjstateSet[--i]) { case 1: if ((0xfc00ffffffffffffL & l) != 0L) { if (kind > 21) kind = 21; } if (curChar == 13) jjstateSet[jjnewStateCnt++] = 2; break; case 0: case 4: if ((0xffffffebffffdbffL & l) == 0L) break; if (kind > 55) kind = 55; jjCheckNAdd(4); break; case 2: if (curChar == 10 && kind > 21) kind = 21; break; case 3: if (curChar == 13) jjstateSet[jjnewStateCnt++] = 2; break; default : break; } } while(i != startsAt); } else if (curChar < 128) { long l = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: if ((0xf8000001f8000001L & l) != 0L && kind > 21) kind = 21; break; case 0: if ((0xffffffffefffffffL & l) != 0L) { if (kind > 55) kind = 55; jjCheckNAdd(4); } else if (curChar == 92) jjAddStates(2, 3); break; case 4: if ((0xffffffffefffffffL & l) == 0L) break; if (kind > 55) kind = 55; jjCheckNAdd(4); break; default : break; } } while(i != startsAt); } else { int hiByte = (int)(curChar >> 8); int i1 = hiByte >> 6; long l1 = 1L << (hiByte & 077); int i2 = (curChar & 0xff) >> 6; long l2 = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 21) kind = 21; break; case 0: case 4: if (!jjCanMove_0(hiByte, i1, i2, l1, l2)) break; if (kind > 55) kind = 55; jjCheckNAdd(4); break; default : break; } } while(i != startsAt); } if (kind != 0x7fffffff) { jjmatchedKind = kind; jjmatchedPos = curPos; kind = 0x7fffffff; } ++curPos; if ((i = jjnewStateCnt) == (startsAt = 5 - (jjnewStateCnt = startsAt))) return curPos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return curPos; } }} | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/126c8b01768c9be523a6baffb01538d1aba40e1e/WMParser_implTokenManager.java/buggy/webmacro/src/org/webmacro/parser/WMParser_implTokenManager.java |
|
jjAddStates(4, 5); | jjAddStates(2, 3); | private final int jjMoveNfa_3(int startState, int curPos){ int[] nextStates; int startsAt = 0; jjnewStateCnt = 31; int i = 1; jjstateSet[0] = startState; int j, kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << curChar; MatchLoop: do { switch(jjstateSet[--i]) { case 4: if ((0xfc00ffffffffffffL & l) != 0L) { if (kind > 21) kind = 21; } if (curChar == 13) jjstateSet[jjnewStateCnt++] = 5; break; case 2: if ((0x3ff000000000000L & l) != 0L) { if (kind > 53) kind = 53; jjCheckNAdd(30); } else if ((0x2400L & l) != 0L) { if (kind > 30) kind = 30; } else if ((0x100000200L & l) != 0L) { if (kind > 29) kind = 29; jjCheckNAdd(7); } else if (curChar == 33) { if (kind > 49) kind = 49; } else if (curChar == 38) jjstateSet[jjnewStateCnt++] = 15; else if (curChar == 60) jjstateSet[jjnewStateCnt++] = 13; else if (curChar == 35) jjstateSet[jjnewStateCnt++] = 0; if (curChar == 33) jjstateSet[jjnewStateCnt++] = 11; else if (curChar == 13) jjstateSet[jjnewStateCnt++] = 8; break; case 0: if (curChar != 35) break; if (kind > 16) kind = 16; jjCheckNAdd(1); break; case 1: if ((0xffffffffffffdbffL & l) == 0L) break; if (kind > 16) kind = 16; jjCheckNAdd(1); break; case 5: if (curChar == 10 && kind > 21) kind = 21; break; case 6: if (curChar == 13) jjstateSet[jjnewStateCnt++] = 5; break; case 7: if ((0x100000200L & l) == 0L) break; if (kind > 29) kind = 29; jjCheckNAdd(7); break; case 8: if (curChar == 10 && kind > 30) kind = 30; break; case 9: if (curChar == 13) jjstateSet[jjnewStateCnt++] = 8; break; case 10: if ((0x2400L & l) != 0L && kind > 30) kind = 30; break; case 11: if (curChar == 61 && kind > 42) kind = 42; break; case 12: if (curChar == 33) jjstateSet[jjnewStateCnt++] = 11; break; case 13: if (curChar == 62 && kind > 42) kind = 42; break; case 14: if (curChar == 60) jjstateSet[jjnewStateCnt++] = 13; break; case 15: if (curChar == 38 && kind > 47) kind = 47; break; case 16: if (curChar == 38) jjstateSet[jjnewStateCnt++] = 15; break; case 24: if (curChar == 33 && kind > 49) kind = 49; break; case 29: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 52) kind = 52; jjstateSet[jjnewStateCnt++] = 29; break; case 30: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 53) kind = 53; jjCheckNAdd(30); break; default : break; } } while(i != startsAt); } else if (curChar < 128) { long l = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 4: if ((0xf8000001f8000001L & l) != 0L && kind > 21) kind = 21; break; case 2: if ((0x7fffffe07fffffeL & l) != 0L) { if (kind > 52) kind = 52; jjCheckNAdd(29); } else if (curChar == 124) jjstateSet[jjnewStateCnt++] = 20; else if (curChar == 92) jjAddStates(4, 5); if (curChar == 78) jjstateSet[jjnewStateCnt++] = 26; else if (curChar == 79) jjstateSet[jjnewStateCnt++] = 22; else if (curChar == 65) jjstateSet[jjnewStateCnt++] = 18; break; case 1: if (kind > 16) kind = 16; jjstateSet[jjnewStateCnt++] = 1; break; case 3: if (curChar == 92) jjAddStates(4, 5); break; case 17: if (curChar == 68 && kind > 47) kind = 47; break; case 18: if (curChar == 78) jjstateSet[jjnewStateCnt++] = 17; break; case 19: if (curChar == 65) jjstateSet[jjnewStateCnt++] = 18; break; case 20: if (curChar == 124 && kind > 48) kind = 48; break; case 21: if (curChar == 124) jjstateSet[jjnewStateCnt++] = 20; break; case 22: if (curChar == 82 && kind > 48) kind = 48; break; case 23: if (curChar == 79) jjstateSet[jjnewStateCnt++] = 22; break; case 25: if (curChar == 84 && kind > 49) kind = 49; break; case 26: if (curChar == 79) jjstateSet[jjnewStateCnt++] = 25; break; case 27: if (curChar == 78) jjstateSet[jjnewStateCnt++] = 26; break; case 28: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 52) kind = 52; jjCheckNAdd(29); break; case 29: if ((0x7fffffe87fffffeL & l) == 0L) break; if (kind > 52) kind = 52; jjCheckNAdd(29); break; default : break; } } while(i != startsAt); } else { int hiByte = (int)(curChar >> 8); int i1 = hiByte >> 6; long l1 = 1L << (hiByte & 077); int i2 = (curChar & 0xff) >> 6; long l2 = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 4: if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 21) kind = 21; break; case 1: if (!jjCanMove_0(hiByte, i1, i2, l1, l2)) break; if (kind > 16) kind = 16; jjstateSet[jjnewStateCnt++] = 1; break; default : break; } } while(i != startsAt); } if (kind != 0x7fffffff) { jjmatchedKind = kind; jjmatchedPos = curPos; kind = 0x7fffffff; } ++curPos; if ((i = jjnewStateCnt) == (startsAt = 31 - (jjnewStateCnt = startsAt))) return curPos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return curPos; } }} | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/126c8b01768c9be523a6baffb01538d1aba40e1e/WMParser_implTokenManager.java/buggy/webmacro/src/org/webmacro/parser/WMParser_implTokenManager.java |
jjAddStates(4, 5); | jjAddStates(2, 3); | private final int jjMoveNfa_3(int startState, int curPos){ int[] nextStates; int startsAt = 0; jjnewStateCnt = 31; int i = 1; jjstateSet[0] = startState; int j, kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << curChar; MatchLoop: do { switch(jjstateSet[--i]) { case 4: if ((0xfc00ffffffffffffL & l) != 0L) { if (kind > 21) kind = 21; } if (curChar == 13) jjstateSet[jjnewStateCnt++] = 5; break; case 2: if ((0x3ff000000000000L & l) != 0L) { if (kind > 53) kind = 53; jjCheckNAdd(30); } else if ((0x2400L & l) != 0L) { if (kind > 30) kind = 30; } else if ((0x100000200L & l) != 0L) { if (kind > 29) kind = 29; jjCheckNAdd(7); } else if (curChar == 33) { if (kind > 49) kind = 49; } else if (curChar == 38) jjstateSet[jjnewStateCnt++] = 15; else if (curChar == 60) jjstateSet[jjnewStateCnt++] = 13; else if (curChar == 35) jjstateSet[jjnewStateCnt++] = 0; if (curChar == 33) jjstateSet[jjnewStateCnt++] = 11; else if (curChar == 13) jjstateSet[jjnewStateCnt++] = 8; break; case 0: if (curChar != 35) break; if (kind > 16) kind = 16; jjCheckNAdd(1); break; case 1: if ((0xffffffffffffdbffL & l) == 0L) break; if (kind > 16) kind = 16; jjCheckNAdd(1); break; case 5: if (curChar == 10 && kind > 21) kind = 21; break; case 6: if (curChar == 13) jjstateSet[jjnewStateCnt++] = 5; break; case 7: if ((0x100000200L & l) == 0L) break; if (kind > 29) kind = 29; jjCheckNAdd(7); break; case 8: if (curChar == 10 && kind > 30) kind = 30; break; case 9: if (curChar == 13) jjstateSet[jjnewStateCnt++] = 8; break; case 10: if ((0x2400L & l) != 0L && kind > 30) kind = 30; break; case 11: if (curChar == 61 && kind > 42) kind = 42; break; case 12: if (curChar == 33) jjstateSet[jjnewStateCnt++] = 11; break; case 13: if (curChar == 62 && kind > 42) kind = 42; break; case 14: if (curChar == 60) jjstateSet[jjnewStateCnt++] = 13; break; case 15: if (curChar == 38 && kind > 47) kind = 47; break; case 16: if (curChar == 38) jjstateSet[jjnewStateCnt++] = 15; break; case 24: if (curChar == 33 && kind > 49) kind = 49; break; case 29: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 52) kind = 52; jjstateSet[jjnewStateCnt++] = 29; break; case 30: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 53) kind = 53; jjCheckNAdd(30); break; default : break; } } while(i != startsAt); } else if (curChar < 128) { long l = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 4: if ((0xf8000001f8000001L & l) != 0L && kind > 21) kind = 21; break; case 2: if ((0x7fffffe07fffffeL & l) != 0L) { if (kind > 52) kind = 52; jjCheckNAdd(29); } else if (curChar == 124) jjstateSet[jjnewStateCnt++] = 20; else if (curChar == 92) jjAddStates(4, 5); if (curChar == 78) jjstateSet[jjnewStateCnt++] = 26; else if (curChar == 79) jjstateSet[jjnewStateCnt++] = 22; else if (curChar == 65) jjstateSet[jjnewStateCnt++] = 18; break; case 1: if (kind > 16) kind = 16; jjstateSet[jjnewStateCnt++] = 1; break; case 3: if (curChar == 92) jjAddStates(4, 5); break; case 17: if (curChar == 68 && kind > 47) kind = 47; break; case 18: if (curChar == 78) jjstateSet[jjnewStateCnt++] = 17; break; case 19: if (curChar == 65) jjstateSet[jjnewStateCnt++] = 18; break; case 20: if (curChar == 124 && kind > 48) kind = 48; break; case 21: if (curChar == 124) jjstateSet[jjnewStateCnt++] = 20; break; case 22: if (curChar == 82 && kind > 48) kind = 48; break; case 23: if (curChar == 79) jjstateSet[jjnewStateCnt++] = 22; break; case 25: if (curChar == 84 && kind > 49) kind = 49; break; case 26: if (curChar == 79) jjstateSet[jjnewStateCnt++] = 25; break; case 27: if (curChar == 78) jjstateSet[jjnewStateCnt++] = 26; break; case 28: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 52) kind = 52; jjCheckNAdd(29); break; case 29: if ((0x7fffffe87fffffeL & l) == 0L) break; if (kind > 52) kind = 52; jjCheckNAdd(29); break; default : break; } } while(i != startsAt); } else { int hiByte = (int)(curChar >> 8); int i1 = hiByte >> 6; long l1 = 1L << (hiByte & 077); int i2 = (curChar & 0xff) >> 6; long l2 = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 4: if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 21) kind = 21; break; case 1: if (!jjCanMove_0(hiByte, i1, i2, l1, l2)) break; if (kind > 16) kind = 16; jjstateSet[jjnewStateCnt++] = 1; break; default : break; } } while(i != startsAt); } if (kind != 0x7fffffff) { jjmatchedKind = kind; jjmatchedPos = curPos; kind = 0x7fffffff; } ++curPos; if ((i = jjnewStateCnt) == (startsAt = 31 - (jjnewStateCnt = startsAt))) return curPos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return curPos; } }} | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/126c8b01768c9be523a6baffb01538d1aba40e1e/WMParser_implTokenManager.java/buggy/webmacro/src/org/webmacro/parser/WMParser_implTokenManager.java |
case 1: case 0: if ((0xffffffe7ffffffffL & l) == 0L) break; if (kind > 11) kind = 11; jjCheckNAdd(0); break; | private final int jjMoveNfa_4(int startState, int curPos){ int[] nextStates; int startsAt = 0; jjnewStateCnt = 5; int i = 1; jjstateSet[0] = startState; int j, kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << curChar; MatchLoop: do { switch(jjstateSet[--i]) { case 1: case 0: if ((0xffffffe7ffffffffL & l) == 0L) break; if (kind > 11) kind = 11; jjCheckNAdd(0); break; case 2: if ((0xfc00ffffffffffffL & l) != 0L) { if (kind > 21) kind = 21; } if (curChar == 13) jjstateSet[jjnewStateCnt++] = 3; break; case 3: if (curChar == 10 && kind > 21) kind = 21; break; case 4: if (curChar == 13) jjstateSet[jjnewStateCnt++] = 3; break; default : break; } } while(i != startsAt); } else if (curChar < 128) { long l = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: if ((0xd7ffffffefffffffL & l) != 0L) { if (kind > 11) kind = 11; jjCheckNAdd(0); } else if (curChar == 92) jjAddStates(0, 1); break; case 2: if ((0xf8000001f8000001L & l) != 0L && kind > 21) kind = 21; break; case 0: if ((0xd7ffffffefffffffL & l) == 0L) break; if (kind > 11) kind = 11; jjCheckNAdd(0); break; default : break; } } while(i != startsAt); } else { int hiByte = (int)(curChar >> 8); int i1 = hiByte >> 6; long l1 = 1L << (hiByte & 077); int i2 = (curChar & 0xff) >> 6; long l2 = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: case 0: if (!jjCanMove_0(hiByte, i1, i2, l1, l2)) break; if (kind > 11) kind = 11; jjCheckNAdd(0); break; case 2: if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 21) kind = 21; break; default : break; } } while(i != startsAt); } if (kind != 0x7fffffff) { jjmatchedKind = kind; jjmatchedPos = curPos; kind = 0x7fffffff; } ++curPos; if ((i = jjnewStateCnt) == (startsAt = 5 - (jjnewStateCnt = startsAt))) return curPos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return curPos; } }} | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/126c8b01768c9be523a6baffb01538d1aba40e1e/WMParser_implTokenManager.java/buggy/webmacro/src/org/webmacro/parser/WMParser_implTokenManager.java |
|
jjAddStates(0, 1); break; case 2: if ((0xf8000001f8000001L & l) != 0L && kind > 21) kind = 21; | jjAddStates(4, 5); | private final int jjMoveNfa_4(int startState, int curPos){ int[] nextStates; int startsAt = 0; jjnewStateCnt = 5; int i = 1; jjstateSet[0] = startState; int j, kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << curChar; MatchLoop: do { switch(jjstateSet[--i]) { case 1: case 0: if ((0xffffffe7ffffffffL & l) == 0L) break; if (kind > 11) kind = 11; jjCheckNAdd(0); break; case 2: if ((0xfc00ffffffffffffL & l) != 0L) { if (kind > 21) kind = 21; } if (curChar == 13) jjstateSet[jjnewStateCnt++] = 3; break; case 3: if (curChar == 10 && kind > 21) kind = 21; break; case 4: if (curChar == 13) jjstateSet[jjnewStateCnt++] = 3; break; default : break; } } while(i != startsAt); } else if (curChar < 128) { long l = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: if ((0xd7ffffffefffffffL & l) != 0L) { if (kind > 11) kind = 11; jjCheckNAdd(0); } else if (curChar == 92) jjAddStates(0, 1); break; case 2: if ((0xf8000001f8000001L & l) != 0L && kind > 21) kind = 21; break; case 0: if ((0xd7ffffffefffffffL & l) == 0L) break; if (kind > 11) kind = 11; jjCheckNAdd(0); break; default : break; } } while(i != startsAt); } else { int hiByte = (int)(curChar >> 8); int i1 = hiByte >> 6; long l1 = 1L << (hiByte & 077); int i2 = (curChar & 0xff) >> 6; long l2 = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: case 0: if (!jjCanMove_0(hiByte, i1, i2, l1, l2)) break; if (kind > 11) kind = 11; jjCheckNAdd(0); break; case 2: if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 21) kind = 21; break; default : break; } } while(i != startsAt); } if (kind != 0x7fffffff) { jjmatchedKind = kind; jjmatchedPos = curPos; kind = 0x7fffffff; } ++curPos; if ((i = jjnewStateCnt) == (startsAt = 5 - (jjnewStateCnt = startsAt))) return curPos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return curPos; } }} | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/126c8b01768c9be523a6baffb01538d1aba40e1e/WMParser_implTokenManager.java/buggy/webmacro/src/org/webmacro/parser/WMParser_implTokenManager.java |
break; case 2: if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 21) kind = 21; | private final int jjMoveNfa_4(int startState, int curPos){ int[] nextStates; int startsAt = 0; jjnewStateCnt = 5; int i = 1; jjstateSet[0] = startState; int j, kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << curChar; MatchLoop: do { switch(jjstateSet[--i]) { case 1: case 0: if ((0xffffffe7ffffffffL & l) == 0L) break; if (kind > 11) kind = 11; jjCheckNAdd(0); break; case 2: if ((0xfc00ffffffffffffL & l) != 0L) { if (kind > 21) kind = 21; } if (curChar == 13) jjstateSet[jjnewStateCnt++] = 3; break; case 3: if (curChar == 10 && kind > 21) kind = 21; break; case 4: if (curChar == 13) jjstateSet[jjnewStateCnt++] = 3; break; default : break; } } while(i != startsAt); } else if (curChar < 128) { long l = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: if ((0xd7ffffffefffffffL & l) != 0L) { if (kind > 11) kind = 11; jjCheckNAdd(0); } else if (curChar == 92) jjAddStates(0, 1); break; case 2: if ((0xf8000001f8000001L & l) != 0L && kind > 21) kind = 21; break; case 0: if ((0xd7ffffffefffffffL & l) == 0L) break; if (kind > 11) kind = 11; jjCheckNAdd(0); break; default : break; } } while(i != startsAt); } else { int hiByte = (int)(curChar >> 8); int i1 = hiByte >> 6; long l1 = 1L << (hiByte & 077); int i2 = (curChar & 0xff) >> 6; long l2 = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: case 0: if (!jjCanMove_0(hiByte, i1, i2, l1, l2)) break; if (kind > 11) kind = 11; jjCheckNAdd(0); break; case 2: if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 21) kind = 21; break; default : break; } } while(i != startsAt); } if (kind != 0x7fffffff) { jjmatchedKind = kind; jjmatchedPos = curPos; kind = 0x7fffffff; } ++curPos; if ((i = jjnewStateCnt) == (startsAt = 5 - (jjnewStateCnt = startsAt))) return curPos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return curPos; } }} | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/126c8b01768c9be523a6baffb01538d1aba40e1e/WMParser_implTokenManager.java/buggy/webmacro/src/org/webmacro/parser/WMParser_implTokenManager.java |
|
if ((active0 & 0x400000L) != 0L) return 4; | private final int jjStopStringLiteralDfa_3(int pos, long active0){ switch (pos) { case 0: if ((active0 & 0x400000L) != 0L) return 4; if ((active0 & 0x804000L) != 0L) return 0; if ((active0 & 0x1c000000L) != 0L) { jjmatchedKind = 52; return 29; } if ((active0 & 0x3000000000L) != 0L) return 13; return -1; case 1: if ((active0 & 0x1c000000L) != 0L) { jjmatchedKind = 52; jjmatchedPos = 1; return 29; } return -1; case 2: if ((active0 & 0x1c000000L) != 0L) { jjmatchedKind = 52; jjmatchedPos = 2; return 29; } return -1; case 3: if ((active0 & 0x10000000L) != 0L) { jjmatchedKind = 52; jjmatchedPos = 3; return 29; } if ((active0 & 0xc000000L) != 0L) return 29; return -1; case 4: if ((active0 & 0x10000000L) != 0L) return 29; return -1; default : return -1; }} | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/126c8b01768c9be523a6baffb01538d1aba40e1e/WMParser_implTokenManager.java/buggy/webmacro/src/org/webmacro/parser/WMParser_implTokenManager.java |
|
if ((active0 & 0xc000000L) != 0L) return 29; | private final int jjStopStringLiteralDfa_3(int pos, long active0){ switch (pos) { case 0: if ((active0 & 0x400000L) != 0L) return 4; if ((active0 & 0x804000L) != 0L) return 0; if ((active0 & 0x1c000000L) != 0L) { jjmatchedKind = 52; return 29; } if ((active0 & 0x3000000000L) != 0L) return 13; return -1; case 1: if ((active0 & 0x1c000000L) != 0L) { jjmatchedKind = 52; jjmatchedPos = 1; return 29; } return -1; case 2: if ((active0 & 0x1c000000L) != 0L) { jjmatchedKind = 52; jjmatchedPos = 2; return 29; } return -1; case 3: if ((active0 & 0x10000000L) != 0L) { jjmatchedKind = 52; jjmatchedPos = 3; return 29; } if ((active0 & 0xc000000L) != 0L) return 29; return -1; case 4: if ((active0 & 0x10000000L) != 0L) return 29; return -1; default : return -1; }} | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/126c8b01768c9be523a6baffb01538d1aba40e1e/WMParser_implTokenManager.java/buggy/webmacro/src/org/webmacro/parser/WMParser_implTokenManager.java |
|
THEMES_DIRECTORY = new File("c:\\xtra\\themes"); | private ThemeManager() { emoticonManager = EmoticonManager.getInstance(); BrowserEngineManager bem = BrowserEngineManager.instance(); //specific engine if you want and the engine you specified will return bem.setActiveEngine(BrowserEngineManager.MOZILLA); //IBrowserEngine be = bem.setActiveEngine(...); IBrowserEngine be = bem.getActiveEngine();//default or specified engine is returned // Note that the install directory is my name for temporary files and // not about mozilla. Me love Mozilla. be.setEnginePath("C:\\crapola\\mozilla\\mozilla.exe"); THEMES_DIRECTORY = new File(Spark.getBinDirectory().getParent(), "xtra/themes").getAbsoluteFile(); // For Testing THEMES_DIRECTORY = new File("c:\\xtra\\themes"); expandNewThemes(); final LocalPreferences pref = SettingsManager.getLocalPreferences(); String themeName = pref.getTheme(); File theme = new File(THEMES_DIRECTORY, themeName); try { setTheme(theme); } catch (Exception e) { e.printStackTrace(); } // Add Preference SparkManager.getPreferenceManager().addPreference(new ThemePreference()); } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/9b831b48e4ac69d0c64a3a0ec6ea919bcbf01020/ThemeManager.java/clean/src/java/org/jivesoftware/spark/ui/themes/ThemeManager.java |
|
Collections.sort(contactItems, itemComparator); | List<ContactItem> tempItems = getContactItems(); | public synchronized void addContactItem(ContactItem item) { if (model.getSize() == 1 && model.getElementAt(0) == noContacts) { model.remove(0); } if ("Offline Group".equals(groupName)) { item.getNicknameLabel().setFont(new Font("Dialog", Font.PLAIN, 11)); item.getNicknameLabel().setForeground(Color.GRAY); } item.setGroupName(getGroupName()); contactItems.add(item); Collections.sort(contactItems, itemComparator); int index = contactItems.indexOf(item); Object[] objs = list.getSelectedValues(); model.insertElementAt(item, index); int[] intList = new int[objs.length]; for (int i = 0; i < objs.length; i++) { ContactItem contact = (ContactItem)objs[i]; intList[i] = model.indexOf(contact); } if (intList.length > 0) { list.setSelectedIndices(intList); } fireContactItemAdded(item); } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/cb97330c0ef37366d8cf915153ed494df0754801/ContactGroup.java/buggy/src/java/org/jivesoftware/spark/ui/ContactGroup.java |
int index = contactItems.indexOf(item); | Collections.sort(tempItems, itemComparator); int index = tempItems.indexOf(item); | public synchronized void addContactItem(ContactItem item) { if (model.getSize() == 1 && model.getElementAt(0) == noContacts) { model.remove(0); } if ("Offline Group".equals(groupName)) { item.getNicknameLabel().setFont(new Font("Dialog", Font.PLAIN, 11)); item.getNicknameLabel().setForeground(Color.GRAY); } item.setGroupName(getGroupName()); contactItems.add(item); Collections.sort(contactItems, itemComparator); int index = contactItems.indexOf(item); Object[] objs = list.getSelectedValues(); model.insertElementAt(item, index); int[] intList = new int[objs.length]; for (int i = 0; i < objs.length; i++) { ContactItem contact = (ContactItem)objs[i]; intList[i] = model.indexOf(contact); } if (intList.length > 0) { list.setSelectedIndices(intList); } fireContactItemAdded(item); } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/cb97330c0ef37366d8cf915153ed494df0754801/ContactGroup.java/buggy/src/java/org/jivesoftware/spark/ui/ContactGroup.java |
return runtimeError; } | return runtimeError; } | public RubyClass getRuntimeError() { return runtimeError; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyExceptions.java/buggy/org/jruby/runtime/RubyExceptions.java |
public void openInternal(String newPath, IOModes newModes) { this.path = newPath; this.modes = newModes; try { handler = new IOHandlerSeekable(getRuntime(), newPath, newModes); registerIOHandler(handler); } catch (InvalidValueException e) { throw getRuntime().newErrnoEINVALError(); } catch (FileNotFoundException e) { throw getRuntime().newErrnoENOENTError(); } catch (IOException e) { throw getRuntime().newIOError(e.getMessage()); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/24fc00ac9f647542a77f440ea686cea2d209f347/RubyFile.java/buggy/src/org/jruby/RubyFile.java |
||
handler = new IOHandlerSeekable(getRuntime(), newPath, newModes); | if (newPath.equals("/dev/null")) { handler = new IOHandlerNull(getRuntime(), newModes); } else { handler = new IOHandlerSeekable(getRuntime(), newPath, newModes); } | public void openInternal(String newPath, IOModes newModes) { this.path = newPath; this.modes = newModes; try { handler = new IOHandlerSeekable(getRuntime(), newPath, newModes); registerIOHandler(handler); } catch (InvalidValueException e) { throw getRuntime().newErrnoEINVALError(); } catch (FileNotFoundException e) { throw getRuntime().newErrnoENOENTError(); } catch (IOException e) { throw getRuntime().newIOError(e.getMessage()); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/24fc00ac9f647542a77f440ea686cea2d209f347/RubyFile.java/buggy/src/org/jruby/RubyFile.java |
runtime.getCurrentContext().getCurrentFrame().setArgs(args); | } int count = expectedArgsCount; if (argsNode.getOptArgs() != null) { count += argsNode.getOptArgs().size(); } ArrayList allArgs = new ArrayList(); for (int i = 0; i < count && i < args.length; i++) { allArgs.add(args[i]); | private void prepareArguments(IRuby runtime, Scope scope, IRubyObject receiver, IRubyObject[] args) { int expectedArgsCount = argsNode.getArgsCount(); if (expectedArgsCount > args.length) { throw runtime.newArgumentError("Wrong # of arguments(" + args.length + " for " + expectedArgsCount + ")"); } if (argsNode.getRestArg() == -1 && argsNode.getOptArgs() != null) { int opt = expectedArgsCount + argsNode.getOptArgs().size(); if (opt < args.length) { throw runtime.newArgumentError("wrong # of arguments(" + args.length + " for " + opt + ")"); } runtime.getCurrentContext().getCurrentFrame().setArgs(args); } if (scope.hasLocalVariables()) { if (expectedArgsCount > 0) { for (int i = 0; i < expectedArgsCount; i++) { scope.setValue(i + 2, args[i]); } } if (argsNode.getOptArgs() != null) { ListNode optArgs = argsNode.getOptArgs(); Iterator iter = optArgs.iterator(); for (int i = expectedArgsCount; i < args.length && iter.hasNext(); i++) { //new AssignmentVisitor(new EvaluationState(runtime, receiver)).assign((Node)iter.next(), args[i], true);// in-frame EvalState should already have receiver set as self, continue to use it new AssignmentVisitor(runtime.getCurrentContext().getCurrentFrame().getEvalState()).assign((Node)iter.next(), args[i], true);; expectedArgsCount++; } // assign the default values. while (iter.hasNext()) { //new EvaluationState(runtime, receiver).begin((Node)iter.next()); //EvaluateVisitor.getInstance().eval(receiver.getRuntime(), receiver, (Node)iter.next()); // in-frame EvalState should already have receiver set as self, continue to use it runtime.getCurrentContext().getCurrentFrame().getEvalState().begin((Node)iter.next()); } } if (argsNode.getRestArg() >= 0) { RubyArray array = runtime.newArray(args.length - expectedArgsCount); for (int i = expectedArgsCount; i < args.length; i++) { array.append(args[i]); } scope.setValue(argsNode.getRestArg(), array); } } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/16914196e47e6cb8b99f2a309bb95bbc7a48f10d/DefaultMethod.java/clean/src/org/jruby/internal/runtime/methods/DefaultMethod.java |
new AssignmentVisitor(runtime.getCurrentContext().getCurrentFrame().getEvalState()).assign((Node)iter.next(), args[i], true);; | new AssignmentVisitor(runtime.getCurrentContext().getCurrentFrame().getEvalState()).assign((Node)iter.next(), args[i], true); | private void prepareArguments(IRuby runtime, Scope scope, IRubyObject receiver, IRubyObject[] args) { int expectedArgsCount = argsNode.getArgsCount(); if (expectedArgsCount > args.length) { throw runtime.newArgumentError("Wrong # of arguments(" + args.length + " for " + expectedArgsCount + ")"); } if (argsNode.getRestArg() == -1 && argsNode.getOptArgs() != null) { int opt = expectedArgsCount + argsNode.getOptArgs().size(); if (opt < args.length) { throw runtime.newArgumentError("wrong # of arguments(" + args.length + " for " + opt + ")"); } runtime.getCurrentContext().getCurrentFrame().setArgs(args); } if (scope.hasLocalVariables()) { if (expectedArgsCount > 0) { for (int i = 0; i < expectedArgsCount; i++) { scope.setValue(i + 2, args[i]); } } if (argsNode.getOptArgs() != null) { ListNode optArgs = argsNode.getOptArgs(); Iterator iter = optArgs.iterator(); for (int i = expectedArgsCount; i < args.length && iter.hasNext(); i++) { //new AssignmentVisitor(new EvaluationState(runtime, receiver)).assign((Node)iter.next(), args[i], true);// in-frame EvalState should already have receiver set as self, continue to use it new AssignmentVisitor(runtime.getCurrentContext().getCurrentFrame().getEvalState()).assign((Node)iter.next(), args[i], true);; expectedArgsCount++; } // assign the default values. while (iter.hasNext()) { //new EvaluationState(runtime, receiver).begin((Node)iter.next()); //EvaluateVisitor.getInstance().eval(receiver.getRuntime(), receiver, (Node)iter.next()); // in-frame EvalState should already have receiver set as self, continue to use it runtime.getCurrentContext().getCurrentFrame().getEvalState().begin((Node)iter.next()); } } if (argsNode.getRestArg() >= 0) { RubyArray array = runtime.newArray(args.length - expectedArgsCount); for (int i = expectedArgsCount; i < args.length; i++) { array.append(args[i]); } scope.setValue(argsNode.getRestArg(), array); } } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/16914196e47e6cb8b99f2a309bb95bbc7a48f10d/DefaultMethod.java/clean/src/org/jruby/internal/runtime/methods/DefaultMethod.java |
private void prepareArguments(IRuby runtime, Scope scope, IRubyObject receiver, IRubyObject[] args) { int expectedArgsCount = argsNode.getArgsCount(); if (expectedArgsCount > args.length) { throw runtime.newArgumentError("Wrong # of arguments(" + args.length + " for " + expectedArgsCount + ")"); } if (argsNode.getRestArg() == -1 && argsNode.getOptArgs() != null) { int opt = expectedArgsCount + argsNode.getOptArgs().size(); if (opt < args.length) { throw runtime.newArgumentError("wrong # of arguments(" + args.length + " for " + opt + ")"); } runtime.getCurrentContext().getCurrentFrame().setArgs(args); } if (scope.hasLocalVariables()) { if (expectedArgsCount > 0) { for (int i = 0; i < expectedArgsCount; i++) { scope.setValue(i + 2, args[i]); } } if (argsNode.getOptArgs() != null) { ListNode optArgs = argsNode.getOptArgs(); Iterator iter = optArgs.iterator(); for (int i = expectedArgsCount; i < args.length && iter.hasNext(); i++) { //new AssignmentVisitor(new EvaluationState(runtime, receiver)).assign((Node)iter.next(), args[i], true);// in-frame EvalState should already have receiver set as self, continue to use it new AssignmentVisitor(runtime.getCurrentContext().getCurrentFrame().getEvalState()).assign((Node)iter.next(), args[i], true);; expectedArgsCount++; } // assign the default values. while (iter.hasNext()) { //new EvaluationState(runtime, receiver).begin((Node)iter.next()); //EvaluateVisitor.getInstance().eval(receiver.getRuntime(), receiver, (Node)iter.next()); // in-frame EvalState should already have receiver set as self, continue to use it runtime.getCurrentContext().getCurrentFrame().getEvalState().begin((Node)iter.next()); } } if (argsNode.getRestArg() >= 0) { RubyArray array = runtime.newArray(args.length - expectedArgsCount); for (int i = expectedArgsCount; i < args.length; i++) { array.append(args[i]); } scope.setValue(argsNode.getRestArg(), array); } } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/16914196e47e6cb8b99f2a309bb95bbc7a48f10d/DefaultMethod.java/clean/src/org/jruby/internal/runtime/methods/DefaultMethod.java |
||
runtime.getCurrentContext().getCurrentFrame().getEvalState().begin((Node)iter.next()); | allArgs.add(runtime.getCurrentContext().getCurrentFrame().getEvalState().begin((Node)iter.next())); | private void prepareArguments(IRuby runtime, Scope scope, IRubyObject receiver, IRubyObject[] args) { int expectedArgsCount = argsNode.getArgsCount(); if (expectedArgsCount > args.length) { throw runtime.newArgumentError("Wrong # of arguments(" + args.length + " for " + expectedArgsCount + ")"); } if (argsNode.getRestArg() == -1 && argsNode.getOptArgs() != null) { int opt = expectedArgsCount + argsNode.getOptArgs().size(); if (opt < args.length) { throw runtime.newArgumentError("wrong # of arguments(" + args.length + " for " + opt + ")"); } runtime.getCurrentContext().getCurrentFrame().setArgs(args); } if (scope.hasLocalVariables()) { if (expectedArgsCount > 0) { for (int i = 0; i < expectedArgsCount; i++) { scope.setValue(i + 2, args[i]); } } if (argsNode.getOptArgs() != null) { ListNode optArgs = argsNode.getOptArgs(); Iterator iter = optArgs.iterator(); for (int i = expectedArgsCount; i < args.length && iter.hasNext(); i++) { //new AssignmentVisitor(new EvaluationState(runtime, receiver)).assign((Node)iter.next(), args[i], true);// in-frame EvalState should already have receiver set as self, continue to use it new AssignmentVisitor(runtime.getCurrentContext().getCurrentFrame().getEvalState()).assign((Node)iter.next(), args[i], true);; expectedArgsCount++; } // assign the default values. while (iter.hasNext()) { //new EvaluationState(runtime, receiver).begin((Node)iter.next()); //EvaluateVisitor.getInstance().eval(receiver.getRuntime(), receiver, (Node)iter.next()); // in-frame EvalState should already have receiver set as self, continue to use it runtime.getCurrentContext().getCurrentFrame().getEvalState().begin((Node)iter.next()); } } if (argsNode.getRestArg() >= 0) { RubyArray array = runtime.newArray(args.length - expectedArgsCount); for (int i = expectedArgsCount; i < args.length; i++) { array.append(args[i]); } scope.setValue(argsNode.getRestArg(), array); } } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/16914196e47e6cb8b99f2a309bb95bbc7a48f10d/DefaultMethod.java/clean/src/org/jruby/internal/runtime/methods/DefaultMethod.java |
runtime.getCurrentContext().getCurrentFrame().setArgs((IRubyObject[])allArgs.toArray(new IRubyObject[allArgs.size()])); | private void prepareArguments(IRuby runtime, Scope scope, IRubyObject receiver, IRubyObject[] args) { int expectedArgsCount = argsNode.getArgsCount(); if (expectedArgsCount > args.length) { throw runtime.newArgumentError("Wrong # of arguments(" + args.length + " for " + expectedArgsCount + ")"); } if (argsNode.getRestArg() == -1 && argsNode.getOptArgs() != null) { int opt = expectedArgsCount + argsNode.getOptArgs().size(); if (opt < args.length) { throw runtime.newArgumentError("wrong # of arguments(" + args.length + " for " + opt + ")"); } runtime.getCurrentContext().getCurrentFrame().setArgs(args); } if (scope.hasLocalVariables()) { if (expectedArgsCount > 0) { for (int i = 0; i < expectedArgsCount; i++) { scope.setValue(i + 2, args[i]); } } if (argsNode.getOptArgs() != null) { ListNode optArgs = argsNode.getOptArgs(); Iterator iter = optArgs.iterator(); for (int i = expectedArgsCount; i < args.length && iter.hasNext(); i++) { //new AssignmentVisitor(new EvaluationState(runtime, receiver)).assign((Node)iter.next(), args[i], true);// in-frame EvalState should already have receiver set as self, continue to use it new AssignmentVisitor(runtime.getCurrentContext().getCurrentFrame().getEvalState()).assign((Node)iter.next(), args[i], true);; expectedArgsCount++; } // assign the default values. while (iter.hasNext()) { //new EvaluationState(runtime, receiver).begin((Node)iter.next()); //EvaluateVisitor.getInstance().eval(receiver.getRuntime(), receiver, (Node)iter.next()); // in-frame EvalState should already have receiver set as self, continue to use it runtime.getCurrentContext().getCurrentFrame().getEvalState().begin((Node)iter.next()); } } if (argsNode.getRestArg() >= 0) { RubyArray array = runtime.newArray(args.length - expectedArgsCount); for (int i = expectedArgsCount; i < args.length; i++) { array.append(args[i]); } scope.setValue(argsNode.getRestArg(), array); } } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/16914196e47e6cb8b99f2a309bb95bbc7a48f10d/DefaultMethod.java/clean/src/org/jruby/internal/runtime/methods/DefaultMethod.java |
|
throw runtime.newArgumentError( "wrong # of arguments(" + args.length + " for " + required() + ")"); | throw runtime.newArgumentError("wrong number of arguments(" + args.length + " for " + required() + ")"); | public void checkArity(Ruby runtime, IRubyObject[] args) { if (isFixed()) { if (args.length != required()) { throw runtime.newArgumentError( "wrong # of arguments(" + args.length + " for " + required() + ")"); } } else { if (args.length < required()) { throw runtime.newArgumentError("wrong # of arguments(at least " + required() + ")"); } } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/765ab8f2eeed4e7c0c131b35b7ecadb0ee2855fd/Arity.java/buggy/src/org/jruby/runtime/Arity.java |
throw runtime.newArgumentError("wrong # of arguments(at least " + required() + ")"); | throw runtime.newArgumentError("wrong number of arguments(" + args.length + " for " + required() + ")"); | public void checkArity(Ruby runtime, IRubyObject[] args) { if (isFixed()) { if (args.length != required()) { throw runtime.newArgumentError( "wrong # of arguments(" + args.length + " for " + required() + ")"); } } else { if (args.length < required()) { throw runtime.newArgumentError("wrong # of arguments(at least " + required() + ")"); } } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/765ab8f2eeed4e7c0c131b35b7ecadb0ee2855fd/Arity.java/buggy/src/org/jruby/runtime/Arity.java |
return list == null ? Collections.EMPTY_LIST.iterator() : list.iterator(); | return list == null ? EMPTY_LIST.iterator() : list.iterator(); | public Iterator iterator() { return list == null ? Collections.EMPTY_LIST.iterator() : list.iterator(); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/b1293eda8454686e846e2a9837b348e2983bb423/ListNode.java/buggy/src/org/jruby/ast/ListNode.java |
return dndList; | return statusList; | public Collection getStatusList() { return dndList; } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/91bb3d356ac7e36b1815118359b4af3a4c14abed/StatusBar.java/clean/src/java/org/jivesoftware/spark/ui/status/StatusBar.java |
dndList.add(freeToChat); dndList.add(online); dndList.add(away); dndList.add(phone); dndList.add(extendedAway); dndList.add(dnd); | statusList.add(freeToChat); statusList.add(online); statusList.add(away); statusList.add(phone); statusList.add(extendedAway); statusList.add(dnd); | 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); final ImageIcon phoneIcon = SparkRes.getImageIcon(SparkRes.ON_PHONE_IMAGE); 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 phone = new StatusItem(new Presence(Presence.Type.available, "On Phone", -1, Presence.Mode.away), phoneIcon); 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(phone); 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/91bb3d356ac7e36b1815118359b4af3a4c14abed/StatusBar.java/clean/src/java/org/jivesoftware/spark/ui/status/StatusBar.java |
Iterator statusIterator = dndList.iterator(); while (statusIterator.hasNext()) { final StatusItem statusItem = (StatusItem)statusIterator.next(); | for(final StatusItem statusItem : statusList){ | public void showPopup(MouseEvent e) { final JPopupMenu popup = new JPopupMenu(); List custom = CustomMessages.load(); if (custom == null) { custom = new ArrayList(); } // Build menu from dndList Iterator statusIterator = dndList.iterator(); while (statusIterator.hasNext()) { final StatusItem statusItem = (StatusItem)statusIterator.next(); final Action statusAction = new AbstractAction() { public void actionPerformed(ActionEvent actionEvent) { final String text = statusItem.getText(); final StatusItem si = getStatusItem(text); if (si == null) { // Custom status return; } SwingWorker worker = new SwingWorker() { public Object construct() { SparkManager.getSessionManager().changePresence(si.getPresence()); return "ok"; } public void finished() { setStatus(text); } }; worker.start(); } }; statusAction.putValue(Action.NAME, statusItem.getText()); statusAction.putValue(Action.SMALL_ICON, statusItem.getIcon()); // Has Children boolean hasChildren = false; Iterator customItemIterator = custom.iterator(); while (customItemIterator.hasNext()) { final CustomStatusItem cItem = (CustomStatusItem)customItemIterator.next(); String type = cItem.getType(); if (type.equals(statusItem.getText())) { hasChildren = true; } } if (!hasChildren) { // Add as Menu Item popup.add(statusAction); } else { final JMenu mainStatusItem = new JMenu(statusAction); popup.add(mainStatusItem); // Add Custom Messages customItemIterator = custom.iterator(); while (customItemIterator.hasNext()) { final CustomStatusItem customItem = (CustomStatusItem)customItemIterator.next(); String type = customItem.getType(); if (type.equals(statusItem.getText())) { // Add Child Menu Action action = new AbstractAction() { public void actionPerformed(ActionEvent actionEvent) { final String text = mainStatusItem.getText(); final StatusItem si = getStatusItem(text); if (si == null) { // Custom status return; } SwingWorker worker = new SwingWorker() { public Object construct() { Presence oldPresence = si.getPresence(); Presence presence = copyPresence(oldPresence); presence.setStatus(customItem.getStatus()); presence.setPriority(customItem.getPriority()); SparkManager.getSessionManager().changePresence(presence); return "ok"; } public void finished() { String status = customItem.getType() + " - " + customItem.getStatus(); setStatus(status); } }; worker.start(); } }; action.putValue(Action.NAME, customItem.getStatus()); action.putValue(Action.SMALL_ICON, statusItem.getIcon()); mainStatusItem.add(action); } } // If menu has children, allow it to still be clickable. mainStatusItem.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent mouseEvent) { statusAction.actionPerformed(null); popup.setVisible(false); } }); } } // Add change message final JMenuItem changeStatusMenu = new JMenuItem(Res.getString("menuitem.set.status.message"), SparkRes.getImageIcon(SparkRes.BLANK_IMAGE)); popup.addSeparator(); popup.add(changeStatusMenu); changeStatusMenu.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { CustomMessages.addCustomMessage(); } }); Action editMessagesAction = new AbstractAction() { public void actionPerformed(ActionEvent actionEvent) { CustomMessages.editCustomMessages(); } }; editMessagesAction.putValue(Action.NAME, Res.getString("menuitem.edit.status.message")); popup.add(editMessagesAction); popup.show(statusPanel, 0, statusPanel.getHeight()); } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/91bb3d356ac7e36b1815118359b4af3a4c14abed/StatusBar.java/clean/src/java/org/jivesoftware/spark/ui/status/StatusBar.java |
personalPanel.showJID(false); | public void showProfile(JComponent parent) { final JTabbedPane tabbedPane = new JTabbedPane(); personalPanel = new PersonalPanel(); tabbedPane.addTab("Personal", personalPanel); businessPanel = new BusinessPanel(); tabbedPane.addTab("Business", businessPanel); homePanel = new HomePanel(); tabbedPane.addTab("Home", homePanel); avatarPanel = new AvatarPanel(); tabbedPane.addTab("Avatar", avatarPanel); loadVCard(SparkManager.getSessionManager().getJID()); final JOptionPane pane; final JDialog dlg; TitlePanel titlePanel; ImageIcon icon = getAvatarIcon(); if (icon == null) { icon = SparkRes.getImageIcon(SparkRes.BLANK_24x24); } // Create the title panel for this dialog titlePanel = new TitlePanel("Edit Profile Information", "To save changes to your profile, click Save.", icon, true); // Construct main panel w/ layout. final JPanel mainPanel = new JPanel(); mainPanel.setLayout(new BorderLayout()); mainPanel.add(titlePanel, BorderLayout.NORTH); // The user should only be able to close this dialog. Object[] options = {"Save", "Cancel"}; pane = new JOptionPane(tabbedPane, JOptionPane.PLAIN_MESSAGE, JOptionPane.OK_CANCEL_OPTION, null, options, options[0]); mainPanel.add(pane, BorderLayout.CENTER); JOptionPane p = new JOptionPane(); dlg = p.createDialog(parent, "Profile Information"); dlg.setModal(false); dlg.pack(); dlg.setSize(600, 400); dlg.setResizable(true); dlg.setContentPane(mainPanel); dlg.setLocationRelativeTo(parent); PropertyChangeListener changeListener = new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent e) { String value = (String)pane.getValue(); if ("Cancel".equals(value)) { pane.removePropertyChangeListener(this); dlg.dispose(); } else if ("Save".equals(value)) { pane.removePropertyChangeListener(this); dlg.dispose(); saveVCard(); } } }; pane.addPropertyChangeListener(changeListener); dlg.setVisible(true); dlg.toFront(); dlg.requestFocus(); personalPanel.focus(); } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/0807e1b794eeaa6c07d31a5c351697146a85040b/VCardManager.java/buggy/src/java/org/jivesoftware/sparkimpl/profile/VCardManager.java |
|
isName = false; | CategoryEditorManager(CategoryEditor view, DataManagerCtrl agentCtrl, CategoryData model) { this.view = view; this.agentCtrl = agentCtrl; this.model = model; nameChange = false; isName = false; imagesToRemove = new ArrayList(); imagesToAdd = new ArrayList(); imagesToAddToRemove = new ArrayList(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/5d253e1d8b8b563bd79074b962fe0a01fca0a091/CategoryEditorManager.java/clean/SRC/org/openmicroscopy/shoola/agents/datamng/editors/category/CategoryEditorManager.java |
|
nameField.addMouseListener(this); | void initListeners() { //buttons attachButtonListener(view.getViewButton(), VIEW); attachButtonListener(view.getSaveButton(), SAVE); attachButtonListener(view.getAddButton(), ADD); attachButtonListener(view.getRemoveButton(), REMOVE); attachButtonListener(view.getResetButton(), RESET); attachButtonListener(view.getRemoveToAddButton(), REMOVE_ADDED); attachButtonListener(view.getResetToAddButton(), RESET_ADDED); //textfields JTextArea nameField = view.getNameField(); nameField.getDocument().addDocumentListener(this); nameField.addMouseListener(this); JTextArea descriptionArea = view.getDescriptionArea(); descriptionArea.getDocument().addDocumentListener(this); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/5d253e1d8b8b563bd79074b962fe0a01fca0a091/CategoryEditorManager.java/clean/SRC/org/openmicroscopy/shoola/agents/datamng/editors/category/CategoryEditorManager.java |
|
view.getSaveButton().setEnabled(isName); | view.getSaveButton().setEnabled(true); | public void insertUpdate(DocumentEvent e) { view.getSaveButton().setEnabled(isName); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/5d253e1d8b8b563bd79074b962fe0a01fca0a091/CategoryEditorManager.java/clean/SRC/org/openmicroscopy/shoola/agents/datamng/editors/category/CategoryEditorManager.java |
view.getSaveButton().setEnabled(isName); | view.getSaveButton().setEnabled(true); | public void removeUpdate(DocumentEvent e) { view.getSaveButton().setEnabled(isName); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/5d253e1d8b8b563bd79074b962fe0a01fca0a091/CategoryEditorManager.java/clean/SRC/org/openmicroscopy/shoola/agents/datamng/editors/category/CategoryEditorManager.java |
Timestamp t1 = i1.getInserted(); Timestamp t2 = i2.getInserted(); | Timestamp t1, t2; try { t1 = i1.getInserted(); } catch (Exception e) { t1 = null; } try { t2 = i2.getInserted(); } catch (Exception e) { t2 = null; } | private List sort(List nodes, final boolean ascending) { Comparator c; switch (sortType) { case Browser.SORT_NODES_BY_DATE: c = new Comparator() { public int compare(Object o1, Object o2) { ImageData i1 = (ImageData) (((TreeImageDisplay) o1).getUserObject()); ImageData i2 = (ImageData) (((TreeImageDisplay) o2).getUserObject()); Timestamp t1 = i1.getInserted(); Timestamp t2 = i2.getInserted(); if (t1 == null) t1 = TreeViewerTranslator.getDefaultTimestamp(); if (t2 == null) t2 = TreeViewerTranslator.getDefaultTimestamp(); int r = t1.compareTo(t2); int v = 0; if (r < 0) v = -1; else if (r > 0) v = 1; if (ascending) return v; return -v; } }; break; case Browser.SORT_NODES_BY_NAME: default: c = new Comparator() { public int compare(Object o1, Object o2) { String s1 = o1.toString().toLowerCase(); String s2 = o2.toString().toLowerCase(); int result = s1.compareTo(s2); int v = 0; if (result < 0) v = -1; else if (result > 0) v = 1; if (ascending) return v; return -v; } }; } Collections.sort(nodes, c); return nodes; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/8ee85e8d2bef6eb60791ee8f6963648315be38ab/SortCmd.java/clean/SRC/org/openmicroscopy/shoola/agents/treeviewer/cmd/SortCmd.java |
Timestamp t1 = i1.getInserted(); Timestamp t2 = i2.getInserted(); | Timestamp t1, t2; try { t1 = i1.getInserted(); } catch (Exception e) { t1 = null; } try { t2 = i2.getInserted(); } catch (Exception e) { t2 = null; } | public int compare(Object o1, Object o2) { ImageData i1 = (ImageData) (((TreeImageDisplay) o1).getUserObject()); ImageData i2 = (ImageData) (((TreeImageDisplay) o2).getUserObject()); Timestamp t1 = i1.getInserted(); Timestamp t2 = i2.getInserted(); if (t1 == null) t1 = TreeViewerTranslator.getDefaultTimestamp(); if (t2 == null) t2 = TreeViewerTranslator.getDefaultTimestamp(); int r = t1.compareTo(t2); int v = 0; if (r < 0) v = -1; else if (r > 0) v = 1; if (ascending) return v; return -v; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/8ee85e8d2bef6eb60791ee8f6963648315be38ab/SortCmd.java/clean/SRC/org/openmicroscopy/shoola/agents/treeviewer/cmd/SortCmd.java |
if (javaClass.isArray()) { Class arrayClass = javaClass.getComponentType(); int len = Array.getLength(object); RubyObject[] items = new RubyObject[len]; for (int i = 0; i < len; i++) { items[i] = convertJavaToRuby(ruby, Array.get(object, i), arrayClass); } return RubyArray.m_create(ruby, items); } | public static RubyObject convertJavaToRuby(Ruby ruby, Object object, Class javaClass) { if (object == null) { return ruby.getNil(); } if (javaClass == Boolean.TYPE || javaClass == Boolean.class) { return RubyBoolean.m_newBoolean(ruby, ((Boolean)object).booleanValue()); } if (javaClass == Integer.TYPE || javaClass == Integer.class || javaClass == Long.TYPE || javaClass == Long.class) { return RubyFixnum.m_newFixnum(ruby, ((Number)object).intValue()); } if (javaClass == Float.TYPE || javaClass == Float.class || javaClass == Double.TYPE || javaClass == Double.class) { return RubyFloat.m_newFloat(ruby, ((Number)object).doubleValue()); } if (javaClass == String.class) { return RubyString.m_newString(ruby, object.toString()); } return new RubyJavaObject(ruby, RubyJavaObject.getRubyClass(ruby, javaClass), object); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/086abcd7e5107a6e6813ecb64810deff5780af95/JavaUtil.java/buggy/org/jruby/javasupport/JavaUtil.java |
|
} if (javaClass.isArray()) { try { Class arrayClass = javaClass.getComponentType(); int len = (int)((RubyArray)rubyObject).length(); Object javaObject = Array.newInstance(arrayClass, len); for (int i = 0; i < len; i++) { Object item = convertRubyToJava(ruby, ((RubyArray)rubyObject).entry(i), arrayClass); Array.set(javaObject, i, item); } return javaObject; } catch (NegativeArraySizeException ex) { } } if (javaClass == Object.class) { javaClass = rubyObject.getJavaClass(); | public static Object convertRubyToJava(Ruby ruby, RubyObject rubyObject, Class javaClass) { if (rubyObject == ruby.getNil()) { return null; } if (javaClass == Boolean.TYPE || javaClass == Boolean.class) { return new Boolean(rubyObject.isTrue()); } if (javaClass == Integer.TYPE || javaClass == Integer.class) { return new Integer((int)((RubyFixnum)rubyObject).getLongValue()); } if (javaClass == Long.TYPE || javaClass == Long.class) { return new Long(((RubyFixnum)rubyObject).getLongValue()); } if (javaClass == Float.TYPE || javaClass == Float.class) { return new Float((float)((RubyFloat)rubyObject).getDoubleValue()); } if (javaClass == Double.TYPE || javaClass == Double.class) { return new Double(((RubyFloat)rubyObject).getDoubleValue()); } if (javaClass == String.class) { return ((RubyString)rubyObject).getString(); } return ((RubyJavaObject)rubyObject).getValue(); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/086abcd7e5107a6e6813ecb64810deff5780af95/JavaUtil.java/buggy/org/jruby/javasupport/JavaUtil.java |
|
if (javaClass == Boolean.TYPE || javaClass == Boolean.class) { return arg instanceof RubyBoolean; | if (javaClass.isArray()) { if (!(arg instanceof RubyArray)) { return false; } Class arrayClass = javaClass.getComponentType(); for (int i = 0; i < ((RubyArray)arg).length(); i++) { if (!isCompatible(((RubyArray)arg).entry(i), arrayClass)) { return false; } } return true; | public static boolean isCompatible(RubyObject arg, Class javaClass) { if (arg.isNil()) { return true; } if (javaClass == Boolean.TYPE || javaClass == Boolean.class) { return arg instanceof RubyBoolean; } if (javaClass == Integer.TYPE || javaClass == Integer.class || javaClass == Long.TYPE || javaClass == Long.class) { return arg instanceof RubyFixnum; } if (javaClass == Float.TYPE || javaClass == Float.class || javaClass == Double.TYPE || javaClass == Double.class) { return arg instanceof RubyFloat; } if (javaClass == String.class) { return arg instanceof RubyString; } return javaClass.isAssignableFrom(((RubyJavaObject)arg).getValue().getClass()); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/086abcd7e5107a6e6813ecb64810deff5780af95/JavaUtil.java/buggy/org/jruby/javasupport/JavaUtil.java |
if (javaClass == Integer.TYPE || javaClass == Integer.class || javaClass == Long.TYPE || javaClass == Long.class) { return arg instanceof RubyFixnum; | if (javaClass == Object.class) { return arg.getJavaClass() != RubyObject.class; | public static boolean isCompatible(RubyObject arg, Class javaClass) { if (arg.isNil()) { return true; } if (javaClass == Boolean.TYPE || javaClass == Boolean.class) { return arg instanceof RubyBoolean; } if (javaClass == Integer.TYPE || javaClass == Integer.class || javaClass == Long.TYPE || javaClass == Long.class) { return arg instanceof RubyFixnum; } if (javaClass == Float.TYPE || javaClass == Float.class || javaClass == Double.TYPE || javaClass == Double.class) { return arg instanceof RubyFloat; } if (javaClass == String.class) { return arg instanceof RubyString; } return javaClass.isAssignableFrom(((RubyJavaObject)arg).getValue().getClass()); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/086abcd7e5107a6e6813ecb64810deff5780af95/JavaUtil.java/buggy/org/jruby/javasupport/JavaUtil.java |
if (javaClass == Float.TYPE || javaClass == Float.class || javaClass == Double.TYPE || javaClass == Double.class) { return arg instanceof RubyFloat; } if (javaClass == String.class) { return arg instanceof RubyString; } return javaClass.isAssignableFrom(((RubyJavaObject)arg).getValue().getClass()); | return javaClass.isAssignableFrom(arg.getJavaClass()); | public static boolean isCompatible(RubyObject arg, Class javaClass) { if (arg.isNil()) { return true; } if (javaClass == Boolean.TYPE || javaClass == Boolean.class) { return arg instanceof RubyBoolean; } if (javaClass == Integer.TYPE || javaClass == Integer.class || javaClass == Long.TYPE || javaClass == Long.class) { return arg instanceof RubyFixnum; } if (javaClass == Float.TYPE || javaClass == Float.class || javaClass == Double.TYPE || javaClass == Double.class) { return arg instanceof RubyFloat; } if (javaClass == String.class) { return arg instanceof RubyString; } return javaClass.isAssignableFrom(((RubyJavaObject)arg).getValue().getClass()); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/086abcd7e5107a6e6813ecb64810deff5780af95/JavaUtil.java/buggy/org/jruby/javasupport/JavaUtil.java |
Logger.logError(e.getMessage(), e); | Log.error(e.getMessage(), e); | public void messageReceived(final ChatRoom room, final Message message) { if (!SparkManager.getMainWindow().isFocused()) { SwingUtilities.invokeLater(new Runnable() { public void run() { try { String name = SparkManager.getUserManager().getUserNicknameFromJID(message.getFrom()); // Since it looks the method can return null do this in case if (name == null) { name = StringUtils.parseName(message.getFrom()); } VCard vCard = null; try { vCard = SparkManager.getVCardManager().getVCard( StringUtils.parseBareAddress(message.getFrom())); } catch (Exception e) { // vcard can time out so ignore } NSImage image = null; if (vCard != null) { byte[] bytes = vCard.getAvatar(); if (bytes != null) { try { NSData data = new NSData(bytes); image = new NSImage(data); } catch (Exception e) { // just incase there is an error i didn't intend } } } if (image == null) { image = getImage("/images/message-32x32.png"); } growl.notifyGrowlOf("Message Received", image, name, message.getBody(), null); } catch (Exception e) { Logger.logError(e.getMessage(), e); } } }); } } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/52759215c21088ce2b912baccc6c22912bf4bd0d/GrowlMessageListener.java/buggy/src/plugins/growl/src/com/jivesoftware/spark/plugin/growl/GrowlMessageListener.java |
Logger.logError(e.getMessage(), e); | Log.error(e.getMessage(), e); | public void run() { try { String name = SparkManager.getUserManager().getUserNicknameFromJID(message.getFrom()); // Since it looks the method can return null do this in case if (name == null) { name = StringUtils.parseName(message.getFrom()); } VCard vCard = null; try { vCard = SparkManager.getVCardManager().getVCard( StringUtils.parseBareAddress(message.getFrom())); } catch (Exception e) { // vcard can time out so ignore } NSImage image = null; if (vCard != null) { byte[] bytes = vCard.getAvatar(); if (bytes != null) { try { NSData data = new NSData(bytes); image = new NSImage(data); } catch (Exception e) { // just incase there is an error i didn't intend } } } if (image == null) { image = getImage("/images/message-32x32.png"); } growl.notifyGrowlOf("Message Received", image, name, message.getBody(), null); } catch (Exception e) { Logger.logError(e.getMessage(), e); } } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/52759215c21088ce2b912baccc6c22912bf4bd0d/GrowlMessageListener.java/buggy/src/plugins/growl/src/com/jivesoftware/spark/plugin/growl/GrowlMessageListener.java |
if (h != 0 && s != 0) | if ( s != 0) | void findPuck() { float h = (control.getHue()*360.0f); float s = (control.getSaturation()); double x = s*Math.cos(Math.toRadians(h)); double y = s*Math.sin(Math.toRadians(h)); if (h != 0 && s != 0) { puck.x1 = x*radius+radius; puck.x2 = y*radius+radius; } else { puck.x1 = radius; puck.x2 = radius; } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/a2a21d76a209874f3fbc606dd5d78ce4ddf85319/HSVWheel.java/buggy/SRC/org/openmicroscopy/shoola/util/ui/colourpicker/HSVWheel.java |
if (dist<r2) | if (dist<=r2) | boolean picked(int x, int y) { float dx = (x-radius); float dx2 = dx*dx; float dy = (y-radius); float dy2 = dy*dy; float dist = dx2+dy2; float r2 = radius*radius; if (dist<r2) { puck = new PlanePoint(x,y); return true; } return false; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/a2a21d76a209874f3fbc606dd5d78ce4ddf85319/HSVWheel.java/buggy/SRC/org/openmicroscopy/shoola/util/ui/colourpicker/HSVWheel.java |
if (start < globalMin || globalMax < end) throw new IllegalArgumentException("Wrong interval definition"); | if (start < globalMin) throw new IllegalArgumentException("'" + start + " less than global minimum: '" + globalMin + "'"); if (globalMax < end) throw new IllegalArgumentException("'" + end + " greater than global maximum: '" + globalMax + "'"); | public void setWindow(double start, double end) { if (start < globalMin || globalMax < end) throw new IllegalArgumentException("Wrong interval definition"); verifyInterval(start, end); windowStart = start; windowEnd = end; onWindowChange(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/79a840e814598e78717947e317f85f49fa7de784/QuantumStrategy.java/buggy/components/rendering/src/omeis/providers/re/quantum/QuantumStrategy.java |
public static Family getFamily(String value) | public static Family getFamily(IPixels iPixels, String value) | public static Family getFamily(String value) { OmeroContext ctx = OmeroContext.getManagedServerContext(); IQuery iQuery = (IQuery) ctx.getBean("internal:ome.api.IQuery"); return (Family) iQuery.findByString(Family.class, "value", value); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/64e6d912272b039f986c1a36d1ca930cc5578578/QuantumFactory.java/buggy/components/rendering/src/omeis/providers/re/quantum/QuantumFactory.java |
OmeroContext ctx = OmeroContext.getManagedServerContext(); IQuery iQuery = (IQuery) ctx.getBean("internal:ome.api.IQuery"); return (Family) iQuery.findByString(Family.class, "value", value); | return (Family) iPixels.getEnumeration(Family.class, value); | public static Family getFamily(String value) { OmeroContext ctx = OmeroContext.getManagedServerContext(); IQuery iQuery = (IQuery) ctx.getBean("internal:ome.api.IQuery"); return (Family) iQuery.findByString(Family.class, "value", value); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/64e6d912272b039f986c1a36d1ca930cc5578578/QuantumFactory.java/buggy/components/rendering/src/omeis/providers/re/quantum/QuantumFactory.java |
System.out.println("First if"); | public RubyObject getConstant(RubyId id) { boolean mod_retry = false; RubyModule tmp = this; while (true) { while (tmp != null) { if (tmp.getInstanceVariables().get(id) != null) {System.out.println("First if"); return (RubyObject) tmp.getInstanceVariables().get(id); } if (tmp == getRuby().getClasses().getObjectClass() && getRuby().getTopConstant(id) != null) {System.out.println("Second if"); return getRuby().getTopConstant(id); } tmp = tmp.getSuperClass(); } if (!mod_retry && isModule()) {System.out.println("First if outside while tmp!= null"); mod_retry = true; tmp = getRuby().getClasses().getObjectClass(); continue; }System.out.println("Outside all ifs"); break; } /* Uninitialized constant */ if (this != getRuby().getClasses().getObjectClass()) { throw new RubyNameException(getRuby(), "uninitialized constant " + id.toName() + " at " + getClassPath().getValue()); } else { throw new RubyNameException(getRuby(), "uninitialized constant " + id.toName() + " at " + getClassPath().getValue()); //throw new RubyNameException(getRuby(), "uninitialized constant " + id.toName()); } // return getRuby().getNil(); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/ec719ef82be7ea6956b3d139a2ce2d236eed4568/RubyModule.java/clean/org/jruby/RubyModule.java |
|
System.out.println("Second if"); | public RubyObject getConstant(RubyId id) { boolean mod_retry = false; RubyModule tmp = this; while (true) { while (tmp != null) { if (tmp.getInstanceVariables().get(id) != null) {System.out.println("First if"); return (RubyObject) tmp.getInstanceVariables().get(id); } if (tmp == getRuby().getClasses().getObjectClass() && getRuby().getTopConstant(id) != null) {System.out.println("Second if"); return getRuby().getTopConstant(id); } tmp = tmp.getSuperClass(); } if (!mod_retry && isModule()) {System.out.println("First if outside while tmp!= null"); mod_retry = true; tmp = getRuby().getClasses().getObjectClass(); continue; }System.out.println("Outside all ifs"); break; } /* Uninitialized constant */ if (this != getRuby().getClasses().getObjectClass()) { throw new RubyNameException(getRuby(), "uninitialized constant " + id.toName() + " at " + getClassPath().getValue()); } else { throw new RubyNameException(getRuby(), "uninitialized constant " + id.toName() + " at " + getClassPath().getValue()); //throw new RubyNameException(getRuby(), "uninitialized constant " + id.toName()); } // return getRuby().getNil(); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/ec719ef82be7ea6956b3d139a2ce2d236eed4568/RubyModule.java/clean/org/jruby/RubyModule.java |
|
System.out.println("First if outside while tmp!= null"); | public RubyObject getConstant(RubyId id) { boolean mod_retry = false; RubyModule tmp = this; while (true) { while (tmp != null) { if (tmp.getInstanceVariables().get(id) != null) {System.out.println("First if"); return (RubyObject) tmp.getInstanceVariables().get(id); } if (tmp == getRuby().getClasses().getObjectClass() && getRuby().getTopConstant(id) != null) {System.out.println("Second if"); return getRuby().getTopConstant(id); } tmp = tmp.getSuperClass(); } if (!mod_retry && isModule()) {System.out.println("First if outside while tmp!= null"); mod_retry = true; tmp = getRuby().getClasses().getObjectClass(); continue; }System.out.println("Outside all ifs"); break; } /* Uninitialized constant */ if (this != getRuby().getClasses().getObjectClass()) { throw new RubyNameException(getRuby(), "uninitialized constant " + id.toName() + " at " + getClassPath().getValue()); } else { throw new RubyNameException(getRuby(), "uninitialized constant " + id.toName() + " at " + getClassPath().getValue()); //throw new RubyNameException(getRuby(), "uninitialized constant " + id.toName()); } // return getRuby().getNil(); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/ec719ef82be7ea6956b3d139a2ce2d236eed4568/RubyModule.java/clean/org/jruby/RubyModule.java |
|
System.out.println("Outside all ifs"); | public RubyObject getConstant(RubyId id) { boolean mod_retry = false; RubyModule tmp = this; while (true) { while (tmp != null) { if (tmp.getInstanceVariables().get(id) != null) {System.out.println("First if"); return (RubyObject) tmp.getInstanceVariables().get(id); } if (tmp == getRuby().getClasses().getObjectClass() && getRuby().getTopConstant(id) != null) {System.out.println("Second if"); return getRuby().getTopConstant(id); } tmp = tmp.getSuperClass(); } if (!mod_retry && isModule()) {System.out.println("First if outside while tmp!= null"); mod_retry = true; tmp = getRuby().getClasses().getObjectClass(); continue; }System.out.println("Outside all ifs"); break; } /* Uninitialized constant */ if (this != getRuby().getClasses().getObjectClass()) { throw new RubyNameException(getRuby(), "uninitialized constant " + id.toName() + " at " + getClassPath().getValue()); } else { throw new RubyNameException(getRuby(), "uninitialized constant " + id.toName() + " at " + getClassPath().getValue()); //throw new RubyNameException(getRuby(), "uninitialized constant " + id.toName()); } // return getRuby().getNil(); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/ec719ef82be7ea6956b3d139a2ce2d236eed4568/RubyModule.java/clean/org/jruby/RubyModule.java |
|
this.bodyNode = bodyNode; } | this.bodyNode = bodyNode; } | public void setBodyNode(Node bodyNode) { this.bodyNode = bodyNode; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyMethod.java/buggy/org/jruby/RubyMethod.java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.