rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
meta
stringlengths
141
403
c = new CommandlineParser(new String[] { "--version" }, outStream);
c = new CommandlineParser(new Main(System.in, out, err), new String[] { "--version" });
public void testParsing() { CommandlineParser c = new CommandlineParser(new String[] { "-e", "hello", "-e", "world" }, outStream); assertEquals("hello\nworld\n", c.inlineScript()); assertNull(c.getScriptFileName()); assertEquals("-e", c.displayedFileName()); c = new CommandlineParser(new String[] { "--version" }, outStream); assertTrue(c.isShowVersion()); c = new CommandlineParser(new String[] { "-n", "myfile.rb" }, outStream); assertTrue(c.isAssumeLoop()); assertEquals("myfile.rb", c.getScriptFileName()); assertEquals("myfile.rb", c.displayedFileName()); c = new CommandlineParser(new String[0], outStream); assertEquals("-", c.displayedFileName()); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/b4a189a27604d62c317938f16a124fb9dab1e94a/TestCommandlineParser.java/buggy/test/org/jruby/test/TestCommandlineParser.java
c = new CommandlineParser(new String[] { "-n", "myfile.rb" }, outStream);
c = new CommandlineParser(new Main(System.in, out, err), new String[] { "-n", "myfile.rb" });
public void testParsing() { CommandlineParser c = new CommandlineParser(new String[] { "-e", "hello", "-e", "world" }, outStream); assertEquals("hello\nworld\n", c.inlineScript()); assertNull(c.getScriptFileName()); assertEquals("-e", c.displayedFileName()); c = new CommandlineParser(new String[] { "--version" }, outStream); assertTrue(c.isShowVersion()); c = new CommandlineParser(new String[] { "-n", "myfile.rb" }, outStream); assertTrue(c.isAssumeLoop()); assertEquals("myfile.rb", c.getScriptFileName()); assertEquals("myfile.rb", c.displayedFileName()); c = new CommandlineParser(new String[0], outStream); assertEquals("-", c.displayedFileName()); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/b4a189a27604d62c317938f16a124fb9dab1e94a/TestCommandlineParser.java/buggy/test/org/jruby/test/TestCommandlineParser.java
c = new CommandlineParser(new String[0], outStream);
c = new CommandlineParser(new Main(System.in, out, err), new String[0]);
public void testParsing() { CommandlineParser c = new CommandlineParser(new String[] { "-e", "hello", "-e", "world" }, outStream); assertEquals("hello\nworld\n", c.inlineScript()); assertNull(c.getScriptFileName()); assertEquals("-e", c.displayedFileName()); c = new CommandlineParser(new String[] { "--version" }, outStream); assertTrue(c.isShowVersion()); c = new CommandlineParser(new String[] { "-n", "myfile.rb" }, outStream); assertTrue(c.isAssumeLoop()); assertEquals("myfile.rb", c.getScriptFileName()); assertEquals("myfile.rb", c.displayedFileName()); c = new CommandlineParser(new String[0], outStream); assertEquals("-", c.displayedFileName()); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/b4a189a27604d62c317938f16a124fb9dab1e94a/TestCommandlineParser.java/buggy/test/org/jruby/test/TestCommandlineParser.java
super(arguments, outStream); } protected void systemExit() { throw new IllegalStateException("Real CommandlineParser would perform " + "System.exit() because of a command line option error.");
super(new Main(System.in, out, err), arguments);
public void testParsingWithDashDash() { class TestableCommandlineParser extends CommandlineParser { public TestableCommandlineParser(String[] arguments) { super(arguments, outStream); } protected void systemExit() { throw new IllegalStateException("Real CommandlineParser would perform " + "System.exit() because of a command line option error."); } } CommandlineParser c = new TestableCommandlineParser(new String[] { "-I", "someLoadPath", "--", "simple.rb", "-v", "--version" }); assertEquals("someLoadPath", c.loadPaths().get(0)); assertEquals("simple.rb",c.getScriptFileName()); assertEquals("simple.rb", c.displayedFileName()); assertTrue("Should not be verbose. The -v flag should be a parameter to the script, not the jruby interpreter", !c.isVerbose()); assertEquals("Script should have two parameters",2,c.getScriptArguments().length); assertEquals("-v",c.getScriptArguments()[0]); assertEquals("--version",c.getScriptArguments()[1]); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/b4a189a27604d62c317938f16a124fb9dab1e94a/TestCommandlineParser.java/buggy/test/org/jruby/test/TestCommandlineParser.java
super(arguments, outStream);
super(new Main(System.in, out, err), arguments);
public TestableCommandlineParser(String[] arguments) { super(arguments, outStream); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/b4a189a27604d62c317938f16a124fb9dab1e94a/TestCommandlineParser.java/buggy/test/org/jruby/test/TestCommandlineParser.java
CommandlineParser parser = new CommandlineParser(args, outStream);
CommandlineParser parser = new CommandlineParser(new Main(System.in, out, err), args);
public void testPrintVersionDoesNotRunInterpreter() { String[] args = new String[] { "-v" }; CommandlineParser parser = new CommandlineParser(args, outStream); assertTrue(parser.isShowVersion()); assertFalse(parser.isShouldRunInterpreter()); args = new String[] { "--version" }; parser = new CommandlineParser(args, outStream); assertTrue(parser.isShowVersion()); assertFalse(parser.isShouldRunInterpreter()); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/b4a189a27604d62c317938f16a124fb9dab1e94a/TestCommandlineParser.java/buggy/test/org/jruby/test/TestCommandlineParser.java
parser = new CommandlineParser(args, outStream);
parser = new CommandlineParser(new Main(System.in, out, err), args);
public void testPrintVersionDoesNotRunInterpreter() { String[] args = new String[] { "-v" }; CommandlineParser parser = new CommandlineParser(args, outStream); assertTrue(parser.isShowVersion()); assertFalse(parser.isShouldRunInterpreter()); args = new String[] { "--version" }; parser = new CommandlineParser(args, outStream); assertTrue(parser.isShowVersion()); assertFalse(parser.isShouldRunInterpreter()); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/b4a189a27604d62c317938f16a124fb9dab1e94a/TestCommandlineParser.java/buggy/test/org/jruby/test/TestCommandlineParser.java
redirectURI.append(subjectParameterName); redirectURI.append("="); redirectURI.append(uri.getPathPart()); redirectURI.append("&");
String pathPart = uri.getPathPart(); if(pathPart!=null && !pathPart.equals("")){ redirectURI.append(subjectParameterName); redirectURI.append("="); redirectURI.append(pathPart); redirectURI.append("&"); }
public String getRedirectURI(IWActionURI uri) { //todo set to previewer or editor depending on action //todo register actions as subnodes of article String action = uri.getActionPart(); String subjectParameterName = ContentViewer.PARAMETER_CONTENT_RESOURCE; StringBuffer redirectURI = new StringBuffer(); redirectURI.append(uri.getContextURI()); redirectURI.append("workspace/content/article/"); redirectURI.append(action); redirectURI.append("/?"); redirectURI.append(subjectParameterName); redirectURI.append("="); redirectURI.append(uri.getPathPart()); redirectURI.append("&"); redirectURI.append(ContentViewer.PARAMETER_ACTION); redirectURI.append("="); redirectURI.append(action); String queryString = uri.getQueryString(); if(queryString!=null){ /*StringTokenizer tokenizer = new StringTokenizer(queryString,"&"); while(tokenizer.hasMoreTokens()){ String token = tokenizer.nextToken(); if(token.startsWith("?")){ token = token.substring(1,token.length()); } redirectURI.append("&"); redirectURI.append(token); }*/ if(!queryString.startsWith("&")){ if(queryString.startsWith("?")){ queryString = queryString.substring(1,queryString.length()); } redirectURI.append("&"); } redirectURI.append(queryString); } return redirectURI.toString(); }
57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/9dd8a7f9883fa3785baebfbed97ebf38eba1add9/ArticleActionURIHandler.java/clean/src/java/com/idega/block/article/business/ArticleActionURIHandler.java
this.crefStack = new UnsynchronizedStack();
public ThreadContext(IRuby runtime) { this.runtime = runtime; this.blockStack = new BlockStack(); this.dynamicVarsStack = new UnsynchronizedStack(); this.frameStack = new UnsynchronizedStack(); this.iterStack = new UnsynchronizedStack(); this.parentStack = new UnsynchronizedStack(); pushDynamicVars(); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a1b8fc1d456e3d5c6e01579b88773383068aa85c/ThreadContext.java/clean/src/org/jruby/runtime/ThreadContext.java
superClass = runtime.getObject();
superClass = runtime.getClass("Module");
public IRubyObject callSuper(IRubyObject[] args) { Frame frame = getCurrentFrame(); if (frame.getLastClass() == null) { throw runtime.newNameError("superclass method '" + frame.getLastFunc() + "' must be enabled by enableSuper()."); } iterStack.push(getCurrentIter().isNot() ? Iter.ITER_NOT : Iter.ITER_PRE); try { RubyClass superClass = frame.getLastClass().getSuperClass(); // Modules do not directly inherit Object so we have hacks like this if (superClass == null) { superClass = runtime.getObject(); } return frame.getSelf().callMethod(superClass, frame.getLastFunc(), args, CallType.SUPER); } finally { iterStack.pop(); } }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a1b8fc1d456e3d5c6e01579b88773383068aa85c/ThreadContext.java/clean/src/org/jruby/runtime/ThreadContext.java
popCRef();
public void postClassEval() { popDynamicVars(); popRubyClass(); popFrame(); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a1b8fc1d456e3d5c6e01579b88773383068aa85c/ThreadContext.java/clean/src/org/jruby/runtime/ThreadContext.java
unsetCRef();
public void postDefMethodInternalCall() { popRubyClass(); popDynamicVars(); popFrame(); popIter(); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a1b8fc1d456e3d5c6e01579b88773383068aa85c/ThreadContext.java/clean/src/org/jruby/runtime/ThreadContext.java
unsetCRef();
public void postExecuteUnder() { popFrame(); popRubyClass(); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a1b8fc1d456e3d5c6e01579b88773383068aa85c/ThreadContext.java/clean/src/org/jruby/runtime/ThreadContext.java
unsetCRef();
public void postNodeEval(RubyModule newWrapper) { popFrame(); popRubyClass(); setWrapper(newWrapper); popDynamicVars(); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a1b8fc1d456e3d5c6e01579b88773383068aa85c/ThreadContext.java/clean/src/org/jruby/runtime/ThreadContext.java
pushCRef(type);
public void preClassEval(List localNames, RubyModule type) { pushRubyClass(type); pushFrameCopy(); getCurrentFrame().newScope(localNames); pushDynamicVars(); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a1b8fc1d456e3d5c6e01579b88773383068aa85c/ThreadContext.java/clean/src/org/jruby/runtime/ThreadContext.java
public void preDefMethodInternalCall(RubyModule implementationClass, IRubyObject recv, String name, IRubyObject[] args, boolean noSuper) {
public void preDefMethodInternalCall(IRubyObject recv, String name, IRubyObject[] args, boolean noSuper, SinglyLinkedList cref) { RubyModule implementationClass = (RubyModule)cref.getValue(); setCRef(cref);
public void preDefMethodInternalCall(RubyModule implementationClass, IRubyObject recv, String name, IRubyObject[] args, boolean noSuper) { pushIter(getCurrentIter().isPre() ? Iter.ITER_CUR : Iter.ITER_NOT); pushFrame(recv, args, name, noSuper ? null : implementationClass); getCurrentFrame().newScope(null); pushDynamicVars(); pushRubyClass(implementationClass); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a1b8fc1d456e3d5c6e01579b88773383068aa85c/ThreadContext.java/clean/src/org/jruby/runtime/ThreadContext.java
pushRubyClass(implementationClass);
pushRubyClass(implementationClass);
public void preDefMethodInternalCall(RubyModule implementationClass, IRubyObject recv, String name, IRubyObject[] args, boolean noSuper) { pushIter(getCurrentIter().isPre() ? Iter.ITER_CUR : Iter.ITER_NOT); pushFrame(recv, args, name, noSuper ? null : implementationClass); getCurrentFrame().newScope(null); pushDynamicVars(); pushRubyClass(implementationClass); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a1b8fc1d456e3d5c6e01579b88773383068aa85c/ThreadContext.java/clean/src/org/jruby/runtime/ThreadContext.java
pushRubyClass(implementationClass.parentModule);
pushRubyClass((RubyModule)implementationClass.getCRef().getValue());
public void preDirectInvokeMethodInternalCall(RubyModule implementationClass, IRubyObject recv, String name, IRubyObject[] args, boolean noSuper) { pushRubyClass(implementationClass.parentModule); pushIter(getCurrentIter().isPre() ? Iter.ITER_CUR : Iter.ITER_NOT); pushFrame(recv, args, name, noSuper ? null : implementationClass); getCurrentFrame().setScope(getPreviousFrame().getScope()); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a1b8fc1d456e3d5c6e01579b88773383068aa85c/ThreadContext.java/clean/src/org/jruby/runtime/ThreadContext.java
setCRef(executeUnderClass.getCRef());
public void preExecuteUnder(RubyModule executeUnderClass) { Frame frame = getCurrentFrame(); pushRubyClass(executeUnderClass); pushFrame(null, frame.getArgs(), frame.getLastFunc(), frame.getLastClass()); getCurrentFrame().setScope(getPreviousFrame().getScope()); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a1b8fc1d456e3d5c6e01579b88773383068aa85c/ThreadContext.java/clean/src/org/jruby/runtime/ThreadContext.java
pushRubyClass(implementationClass.parentModule);
pushRubyClass((RubyModule)implementationClass.getCRef().getValue());
public void preMethodCall(RubyModule implementationClass, IRubyObject recv, String name, IRubyObject[] args, boolean noSuper) { pushRubyClass(implementationClass.parentModule); pushIter(getCurrentIter().isPre() ? Iter.ITER_CUR : Iter.ITER_NOT); pushFrame(recv, args, name, noSuper ? null : implementationClass); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a1b8fc1d456e3d5c6e01579b88773383068aa85c/ThreadContext.java/clean/src/org/jruby/runtime/ThreadContext.java
setCRef(rubyClass.getCRef());
public void preNodeEval(RubyModule newWrapper, RubyModule rubyClass, IRubyObject self) { pushDynamicVars(); setWrapper(newWrapper); pushRubyClass(rubyClass); pushFrame(self, IRubyObject.NULL_ARRAY, null, null); getCurrentFrame().newScope(null); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a1b8fc1d456e3d5c6e01579b88773383068aa85c/ThreadContext.java/clean/src/org/jruby/runtime/ThreadContext.java
pushRubyClass(implementationClass.parentModule);
pushRubyClass((RubyModule)implementationClass.getCRef().getValue());
public void preReflectedMethodInternalCall(RubyModule implementationClass, IRubyObject recv, String name, IRubyObject[] args, boolean noSuper) { pushRubyClass(implementationClass.parentModule); pushIter(getCurrentIter().isPre() ? Iter.ITER_CUR : Iter.ITER_NOT); pushFrame(recv, args, name, noSuper ? null : implementationClass); getCurrentFrame().setScope(getPreviousFrame().getScope()); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a1b8fc1d456e3d5c6e01579b88773383068aa85c/ThreadContext.java/clean/src/org/jruby/runtime/ThreadContext.java
resourcePath=null; avilableInRequestedLanguage=false;
public void clear() { // TODO Auto-generated method stub getLocalizedArticle().clear(); }
57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/5db26355cf68616cbd8859fa37cd6aa73d783808/ArticleItemBean.java/buggy/src/java/com/idega/block/article/bean/ArticleItemBean.java
private String getArticleDefaultLocalizedFileName(){ return getArticleDefaultLocalizedFileName(getLanguage());
private String getArticleDefaultLocalizedFileName(String language){ return language+ARTICLE_FILE_SUFFIX;
private String getArticleDefaultLocalizedFileName(){ return getArticleDefaultLocalizedFileName(getLanguage()); }
57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/5db26355cf68616cbd8859fa37cd6aa73d783808/ArticleItemBean.java/buggy/src/java/com/idega/block/article/bean/ArticleItemBean.java
System.out.println(parent);
public String getPassword(String title, String description, Icon icon, Component parent) { System.out.println(parent); passwordField = new JPasswordField(); TitlePanel titlePanel = new TitlePanel(title, description, icon, true); // Construct main panel w/ layout. final JPanel mainPanel = new JPanel(); mainPanel.setLayout(new BorderLayout()); mainPanel.add(titlePanel, BorderLayout.NORTH); final JPanel passwordPanel = new JPanel(new GridBagLayout()); JLabel passwordLabel = new JLabel("Enter Password:"); passwordPanel.add(passwordLabel, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); passwordPanel.add(passwordField, new GridBagConstraints(1, 0, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); // The user should only be able to close this dialog. final Object[] options = {Res.getString("ok"), Res.getString("cancel")}; optionPane = new JOptionPane(passwordPanel, JOptionPane.PLAIN_MESSAGE, JOptionPane.OK_CANCEL_OPTION, null, options, options[0]); mainPanel.add(optionPane, BorderLayout.CENTER); // Lets make sure that the dialog is modal. Cannot risk people // losing this dialog. JOptionPane p = new JOptionPane(); dialog = p.createDialog(parent, title); dialog.setModal(true); dialog.pack(); dialog.setSize(width, height); dialog.setContentPane(mainPanel); dialog.setLocationRelativeTo(parent); optionPane.addPropertyChangeListener(this); // Add Key Listener to Send Field passwordField.addKeyListener(new KeyAdapter() { public void keyPressed(KeyEvent e) { if (e.getKeyChar() == KeyEvent.VK_TAB) { optionPane.requestFocus(); } else if (e.getKeyChar() == KeyEvent.VK_ESCAPE) { dialog.dispose(); } } }); passwordField.requestFocus(); dialog.setVisible(true); return stringValue; }
52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/64167b93b841bd4a221dd80e076ac2fd148ee24f/PasswordDialog.java/clean/src/java/org/jivesoftware/spark/component/PasswordDialog.java
tokenBegin = -1;
tokenBeginPos = -1;
public final char BeginToken() throws java.io.IOException { tokenBegin = -1; char c = readChar(); tokenBuf = curBuf; tokenBegin = curBuf.curPos; return c; }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/24d9ef23d787da791b5e1f6fbf8aa3cd7d26224b/ASCII_CharStream.java/buggy/webmacro/src/org/webmacro/parser/ASCII_CharStream.java
tokenBuf = curBuf; tokenBegin = curBuf.curPos;
tokenBeginBuf = curBuf; tokenBeginPos = curBuf.curPos;
public final char BeginToken() throws java.io.IOException { tokenBegin = -1; char c = readChar(); tokenBuf = curBuf; tokenBegin = curBuf.curPos; return c; }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/24d9ef23d787da791b5e1f6fbf8aa3cd7d26224b/ASCII_CharStream.java/buggy/webmacro/src/org/webmacro/parser/ASCII_CharStream.java
if (tokenBegin >= 0 && ((tokenBuf == curBuf && tokenBegin < 2048) || tokenBuf != curBuf)) {
if (tokenBeginPos >= 0 && ((tokenBeginBuf == curBuf && tokenBeginPos < 2048) || tokenBeginBuf != curBuf)) {
private final void FillBuff() throws java.io.IOException { // Buffer fill logic: // If there is at least 2K left in this buffer, just read some more // Otherwise, if we're processing a token and it either // (a) starts in the other buffer (meaning it's filled both part of // the other buffer and some of this one, or // (b) starts in the first 2K of this buffer (meaning its taken up // most of this buffer // we expand this buffer. Otherwise, we swap buffers. // This guarantees we will be able to back up at least 2K characters. if (curBuf.size - curBuf.dataLen < 2048) { if (tokenBegin >= 0 && ((tokenBuf == curBuf && tokenBegin < 2048) || tokenBuf != curBuf)) { curBuf.expand(2048); } else { swapBuf(); curBuf.curPos = curBuf.dataLen = 0; } } try { int i = inputStream.read(curBuf.buffer, curBuf.dataLen, curBuf.size - curBuf.dataLen); if (i == -1) { inputStream.close(); throw new java.io.IOException(); } else curBuf.dataLen += i; return; } catch(java.io.IOException e) { --curBuf.curPos; if (tokenBegin == -1) { tokenBegin = curBuf.curPos; tokenBuf = curBuf; throw e; } } }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/24d9ef23d787da791b5e1f6fbf8aa3cd7d26224b/ASCII_CharStream.java/buggy/webmacro/src/org/webmacro/parser/ASCII_CharStream.java
--curBuf.curPos; if (tokenBegin == -1) { tokenBegin = curBuf.curPos; tokenBuf = curBuf;
if (curBuf.curPos > 0) --curBuf.curPos; if (tokenBeginPos == -1) { tokenBeginPos = curBuf.curPos; tokenBeginBuf = curBuf; }
private final void FillBuff() throws java.io.IOException { // Buffer fill logic: // If there is at least 2K left in this buffer, just read some more // Otherwise, if we're processing a token and it either // (a) starts in the other buffer (meaning it's filled both part of // the other buffer and some of this one, or // (b) starts in the first 2K of this buffer (meaning its taken up // most of this buffer // we expand this buffer. Otherwise, we swap buffers. // This guarantees we will be able to back up at least 2K characters. if (curBuf.size - curBuf.dataLen < 2048) { if (tokenBegin >= 0 && ((tokenBuf == curBuf && tokenBegin < 2048) || tokenBuf != curBuf)) { curBuf.expand(2048); } else { swapBuf(); curBuf.curPos = curBuf.dataLen = 0; } } try { int i = inputStream.read(curBuf.buffer, curBuf.dataLen, curBuf.size - curBuf.dataLen); if (i == -1) { inputStream.close(); throw new java.io.IOException(); } else curBuf.dataLen += i; return; } catch(java.io.IOException e) { --curBuf.curPos; if (tokenBegin == -1) { tokenBegin = curBuf.curPos; tokenBuf = curBuf; throw e; } } }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/24d9ef23d787da791b5e1f6fbf8aa3cd7d26224b/ASCII_CharStream.java/buggy/webmacro/src/org/webmacro/parser/ASCII_CharStream.java
}
private final void FillBuff() throws java.io.IOException { // Buffer fill logic: // If there is at least 2K left in this buffer, just read some more // Otherwise, if we're processing a token and it either // (a) starts in the other buffer (meaning it's filled both part of // the other buffer and some of this one, or // (b) starts in the first 2K of this buffer (meaning its taken up // most of this buffer // we expand this buffer. Otherwise, we swap buffers. // This guarantees we will be able to back up at least 2K characters. if (curBuf.size - curBuf.dataLen < 2048) { if (tokenBegin >= 0 && ((tokenBuf == curBuf && tokenBegin < 2048) || tokenBuf != curBuf)) { curBuf.expand(2048); } else { swapBuf(); curBuf.curPos = curBuf.dataLen = 0; } } try { int i = inputStream.read(curBuf.buffer, curBuf.dataLen, curBuf.size - curBuf.dataLen); if (i == -1) { inputStream.close(); throw new java.io.IOException(); } else curBuf.dataLen += i; return; } catch(java.io.IOException e) { --curBuf.curPos; if (tokenBegin == -1) { tokenBegin = curBuf.curPos; tokenBuf = curBuf; throw e; } } }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/24d9ef23d787da791b5e1f6fbf8aa3cd7d26224b/ASCII_CharStream.java/buggy/webmacro/src/org/webmacro/parser/ASCII_CharStream.java
if (tokenBuf == curBuf) return new String(curBuf.buffer, tokenBegin, curBuf.curPos - tokenBegin + 1);
if (tokenBeginBuf == curBuf) return new String(curBuf.buffer, tokenBeginPos, curBuf.curPos - tokenBeginPos + 1);
public final String GetImage() { if (tokenBuf == curBuf) return new String(curBuf.buffer, tokenBegin, curBuf.curPos - tokenBegin + 1); else return new String(otherBuf.buffer, tokenBegin, otherBuf.dataLen - tokenBegin) + new String(curBuf.buffer, 0, curBuf.curPos + 1); }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/24d9ef23d787da791b5e1f6fbf8aa3cd7d26224b/ASCII_CharStream.java/buggy/webmacro/src/org/webmacro/parser/ASCII_CharStream.java
return new String(otherBuf.buffer, tokenBegin, otherBuf.dataLen - tokenBegin)
return new String(otherBuf.buffer, tokenBeginPos, otherBuf.dataLen - tokenBeginPos)
public final String GetImage() { if (tokenBuf == curBuf) return new String(curBuf.buffer, tokenBegin, curBuf.curPos - tokenBegin + 1); else return new String(otherBuf.buffer, tokenBegin, otherBuf.dataLen - tokenBegin) + new String(curBuf.buffer, 0, curBuf.curPos + 1); }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/24d9ef23d787da791b5e1f6fbf8aa3cd7d26224b/ASCII_CharStream.java/buggy/webmacro/src/org/webmacro/parser/ASCII_CharStream.java
if (otherBuf != null)
if (otherBuf.dataLen >= len - curBuf.curPos - 1)
public final char[] GetSuffix(int len) { char[] ret = new char[len]; if ((curBuf.curPos + 1) >= len) System.arraycopy(curBuf.buffer, curBuf.curPos - len + 1, ret, 0, len); else { if (otherBuf != null) System.arraycopy(otherBuf.buffer, otherBuf.dataLen - (len - curBuf.curPos - 1), ret, 0, len - curBuf.curPos - 1); System.arraycopy(curBuf.buffer, 0, ret, len - curBuf.curPos - 1, curBuf.curPos + 1); } return null; }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/24d9ef23d787da791b5e1f6fbf8aa3cd7d26224b/ASCII_CharStream.java/buggy/webmacro/src/org/webmacro/parser/ASCII_CharStream.java
if (curBuf.curPos - amount < -1) {
if (curBuf.curPos - amount < 0) {
public final void backup(int amount) { backupChars += amount; if (curBuf.curPos - amount < -1) { int addlChars = amount - 1 - curBuf.curPos; curBuf.curPos = 0; swapBuf(); curBuf.curPos = curBuf.dataLen - addlChars - 1; if (curBuf.curPos < -1) { // Throw something // System.out.println("ASCII_CharStream: Attempt to back up too far"); } } else { curBuf.curPos -= amount; } }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/24d9ef23d787da791b5e1f6fbf8aa3cd7d26224b/ASCII_CharStream.java/buggy/webmacro/src/org/webmacro/parser/ASCII_CharStream.java
if (curBuf.curPos < -1) { }
public final void backup(int amount) { backupChars += amount; if (curBuf.curPos - amount < -1) { int addlChars = amount - 1 - curBuf.curPos; curBuf.curPos = 0; swapBuf(); curBuf.curPos = curBuf.dataLen - addlChars - 1; if (curBuf.curPos < -1) { // Throw something // System.out.println("ASCII_CharStream: Attempt to back up too far"); } } else { curBuf.curPos -= amount; } }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/24d9ef23d787da791b5e1f6fbf8aa3cd7d26224b/ASCII_CharStream.java/buggy/webmacro/src/org/webmacro/parser/ASCII_CharStream.java
return tokenBuf.bufcolumn[tokenBegin];
return tokenBeginBuf.bufcolumn[tokenBeginPos];
public final int getBeginColumn() { return tokenBuf.bufcolumn[tokenBegin]; }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/24d9ef23d787da791b5e1f6fbf8aa3cd7d26224b/ASCII_CharStream.java/buggy/webmacro/src/org/webmacro/parser/ASCII_CharStream.java
return tokenBuf.bufline[tokenBegin];
return tokenBeginBuf.bufline[tokenBeginPos];
public final int getBeginLine() { return tokenBuf.bufline[tokenBegin]; }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/24d9ef23d787da791b5e1f6fbf8aa3cd7d26224b/ASCII_CharStream.java/buggy/webmacro/src/org/webmacro/parser/ASCII_CharStream.java
if (++curBuf.curPos >= curBuf.dataLen) { if (backupChars > 0) swapBuf(); else FillBuff(); };
if (++curBuf.curPos >= curBuf.dataLen) { if (backupChars > 0) { --curBuf.curPos; swapBuf(); } else FillBuff(); };
public final char readChar() throws java.io.IOException { if (++curBuf.curPos >= curBuf.dataLen) { if (backupChars > 0) swapBuf(); else FillBuff(); }; char c = (char)((char)0xff & curBuf.buffer[curBuf.curPos]); // No need to update line numbers if we've already processed this char if (backupChars > 0) --backupChars; else UpdateLineColumn(c); return (c); }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/24d9ef23d787da791b5e1f6fbf8aa3cd7d26224b/ASCII_CharStream.java/buggy/webmacro/src/org/webmacro/parser/ASCII_CharStream.java
char c = (char)((char)0xff & curBuf.buffer[curBuf.curPos]);
char c = (char)((char)0xff & curBuf.buffer[curBuf.curPos]);
public final char readChar() throws java.io.IOException { if (++curBuf.curPos >= curBuf.dataLen) { if (backupChars > 0) swapBuf(); else FillBuff(); }; char c = (char)((char)0xff & curBuf.buffer[curBuf.curPos]); // No need to update line numbers if we've already processed this char if (backupChars > 0) --backupChars; else UpdateLineColumn(c); return (c); }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/24d9ef23d787da791b5e1f6fbf8aa3cd7d26224b/ASCII_CharStream.java/buggy/webmacro/src/org/webmacro/parser/ASCII_CharStream.java
if (backupChars > 0) --backupChars; else UpdateLineColumn(c); return (c);
if (backupChars > 0) --backupChars; else UpdateLineColumn(c); return (c);
public final char readChar() throws java.io.IOException { if (++curBuf.curPos >= curBuf.dataLen) { if (backupChars > 0) swapBuf(); else FillBuff(); }; char c = (char)((char)0xff & curBuf.buffer[curBuf.curPos]); // No need to update line numbers if we've already processed this char if (backupChars > 0) --backupChars; else UpdateLineColumn(c); return (c); }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/24d9ef23d787da791b5e1f6fbf8aa3cd7d26224b/ASCII_CharStream.java/buggy/webmacro/src/org/webmacro/parser/ASCII_CharStream.java
private void swapBuf() { if (otherBuf == null) { curBuf = bufB; otherBuf = bufA; } else { Buffer tmp = curBuf; curBuf = otherBuf; otherBuf = tmp; }
private final void swapBuf() { Buffer tmp = curBuf; curBuf = otherBuf; otherBuf = tmp;
private void swapBuf() { if (otherBuf == null) { curBuf = bufB; otherBuf = bufA; } else { Buffer tmp = curBuf; curBuf = otherBuf; otherBuf = tmp; } }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/24d9ef23d787da791b5e1f6fbf8aa3cd7d26224b/ASCII_CharStream.java/buggy/webmacro/src/org/webmacro/parser/ASCII_CharStream.java
public void nd_iter(NODE n) { u3 = n; }
public NODE nd_iter() { return (NODE)u3; }
public void nd_iter(NODE n) { u3 = n; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/f1e2c45b99e6f9a2be3f15f5fd7ad91c7e086a2c/NODE.java/buggy/org/jruby/original/NODE.java
}
}
public void execute(EvaluationState state, InstructionContext ctx) { LocalAsgnNode iVisited = (LocalAsgnNode)ctx; state.runtime.getCurrentContext().getCurrentScope().setValue(iVisited.getCount(), state.getResult()); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/145cff15d938188f5d32f56a3498aeb58147c842/EvaluateVisitor.java/buggy/src/org/jruby/evaluator/EvaluateVisitor.java
}
} else if (node instanceof Colon3Node) { enclosingModule = state.runtime.getObject(); }
private static RubyModule getEnclosingModule(EvaluationState state, Node node) { RubyModule enclosingModule = null; if (node instanceof Colon2Node) { state.begin(((Colon2Node) node).getLeftNode()); if (state.getResult() != null && !state.getResult().isNil()) { enclosingModule = (RubyModule) state.getResult(); } } if (enclosingModule == null) { enclosingModule = state.getThreadContext().getRubyClass(); } return enclosingModule; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/145cff15d938188f5d32f56a3498aeb58147c842/EvaluateVisitor.java/buggy/src/org/jruby/evaluator/EvaluateVisitor.java
fixture = new CreatePojosFixture( rootFactory );
fixture = CreatePojosFixture.withNewUser( rootFactory );
protected void setUp() throws Exception { data = (OMEData) factory.getContext().getBean("data"); iPojos = factory.getPojosService(); iQuery = factory.getQueryService(); iUpdate = factory.getUpdateService(); try { iQuery.get(Experimenter.class,0l); } catch (Throwable t){ // TODO no, no, really. This is ok. (And temporary) } iQuery.get(Experimenter.class,0l); // if this one fails, skip rest. Login rootLogin = (Login) factory.getContext().getBean("rootLogin"); ServiceFactory rootFactory = new ServiceFactory( rootLogin ); fixture = new CreatePojosFixture( rootFactory ); fixture.createAllPojos(); GROUP_FILTER = new PojoOptions().grp(fixture.g.getId()); OWNER_FILTER = new PojoOptions().exp(fixture.e.getId()); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/3dc405b5f110ef3a96fe6c7a1b789ed1d8f2c871/PojosServiceTest.java/clean/components/client/test/ome/adapters/pojos/itests/PojosServiceTest.java
if ((level >= LogSource.WARNING) && hasTargets()) {
if ((level >= LogSource.NOTICE) && !hasTargets()) {
protected void log(int level, String msg, Exception e) { super.log(level,msg,e); if ((level >= LogSource.WARNING) && hasTargets()) { _err.log("sys", LEVELS[level],msg,e); } }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/57c824ed8608bb26f776610098a41b19f76428eb/LogManager.java/buggy/webmacro/src/org/webmacro/util/LogManager.java
int num = Integer.parseInt(args[0]);
public static void main(String[] args) { //@START int num = Integer.parseInt(args[0]); System.out.println("Ack(3," + num + "): " + Ack(3, num)); //@END }
53330 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/53330/eb6c850277407b38bcaefb81155941da0f27b849/ackermann.java/clean/tests/shootout/java-start/ackermann.java
tec._lineNo = iter.getLineNo(); tec._columnNo = iter.getColNo();
tec._lineNo = ln[pos]; tec._columnNo = cn[pos++];
final public Object build(BuildContext bc) throws BuildException { ArrayList strings = new ArrayList((elements.size())); ArrayList macros = new ArrayList((elements.size())); int[] ln = new int[elements.size()]; int[] cn = new int[elements.size()]; Stack iterStack = new Stack(); StringBuffer s = new StringBuffer(); Context.TemplateEvaluationContext tec = bc.getTemplateEvaluationContext(); // flatten everything and view the content as being: // string (macro string)* string // store that as an array of strings and an array of // Macro objects and create a block. BlockIterator iter = new BBIterator(); tec._templateName = name; while (iter.hasNext()) { Object o = iter.next(); // track line/column numbers in the build context // so that bc.getCurrentLocation() stays current tec._lineNo = iter.getLineNo(); tec._columnNo = iter.getColNo(); if (o instanceof Builder) o = ((Builder) o).build(bc); if (o instanceof Block) { iterStack.push(iter); iter = ((Block) o).getBlockIterator(); } else { if (o instanceof Macro) { strings.add(s.toString()); s = new StringBuffer(); // do not reuse StringBuffer, // otherwise all strings will contain char[] of max length!! macros.add(o); // Now deal with the line numbers int size = macros.size(); if (ln.length < size) { ln = resizeIntArray(ln, ln.length * 2); cn = resizeIntArray(cn, cn.length * 2); } ln[size - 1] = iter.getLineNo(); cn[size - 1] = iter.getColNo(); } else if (o != null) { s.append(o.toString()); } } while (!iter.hasNext() && !iterStack.empty()) iter = (BlockIterator) iterStack.pop(); } strings.add(s.toString()); Macro finalMacros[] = (Macro[]) macros.toArray(mArray); String finalStrings[] = (String[]) strings.toArray(sArray); int finalLines[] = resizeIntArray(ln, macros.size()); int finalCols[] = resizeIntArray(cn, macros.size()); return new Block(name, finalStrings, finalMacros, finalLines, finalCols); }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/f15e311a785f546d404d153a1d1a26ea52d4b7d9/BlockBuilder.java/clean/webmacro/src/org/webmacro/engine/BlockBuilder.java
public <T extends IObject> Map findAnnotations(
public <T extends IObject> Map<Long, Set<? extends IObject>> findAnnotations(
public <T extends IObject> Map findAnnotations( @NotNull Class<T> rootNodeType, @NotNull @Validate(Long.class) Set<Long> rootNodeIds, @Validate(Long.class) Set<Long> annotatorIds, Map options);
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/dc049d0769f78d30527024bfadfcc7adcbdc82cb/IPojos.java/clean/components/common/src/ome/api/IPojos.java
throw je;
public void execute(EvaluationState state, InstructionContext ctx) { // now used as an interpreter event JumpException je = new JumpException(JumpException.JumpType.NextJump); je.setPrimaryData(state.getResult()); je.setSecondaryData(ctx); state.setCurrentException(je); throw je; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/ed5fe768829dd43ebf13861d9031b19571d6e898/EvaluateVisitor.java/buggy/src/org/jruby/evaluator/EvaluateVisitor.java
throw je;
state.setCurrentException(je);
public void execute(EvaluationState state, InstructionContext ctx) { // now used as an interpreter event JumpException je = new JumpException(JumpException.JumpType.RedoJump); je.setSecondaryData(ctx); throw je; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/ed5fe768829dd43ebf13861d9031b19571d6e898/EvaluateVisitor.java/buggy/src/org/jruby/evaluator/EvaluateVisitor.java
return "Category"+(attributeId==null ? ":Hash"+this.hashCode() : ":"+attributeId);
return "Category"+(attributeId==null ? ":Hash_"+this.hashCode() : ":Id_"+attributeId);
public String toString(){ return "Category"+(attributeId==null ? ":Hash"+this.hashCode() : ":"+attributeId); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/51a3c546dfc7a7a98b29771a459df19094fc5b51/Category.java/buggy/components/common/src/ome/model/Category.java
String[] beans=SpringHarness.ctx.getBeanDefinitionNames(); for (int i=0;i<beans.length;i++) { HessianProxyFactoryBean fb = (HessianProxyFactoryBean) SpringHarness.ctx.getBean(SpringHarness.ctx.FACTORY_BEAN_PREFIX+beans[i]); String oldUrl = fb.getServiceUrl(); String service = oldUrl.substring(oldUrl.lastIndexOf("/")); fb.setServiceUrl(url+service); try { fb.afterPropertiesSet(); } catch (MalformedURLException e) { throw new OmeroException("Improperly formed url.",e); } }
String[] beans=SpringHarness.ctx.getBeanDefinitionNames(); for (int i=0;i<beans.length;i++) { if (beans[i].endsWith("Facade")){ HessianProxyFactoryBean fb = (HessianProxyFactoryBean) SpringHarness.ctx.getBean(SpringHarness.ctx.FACTORY_BEAN_PREFIX+beans[i]); String oldUrl = fb.getServiceUrl(); String service = oldUrl.substring(oldUrl.lastIndexOf("/")); fb.setServiceUrl(url+service); try { fb.afterPropertiesSet(); } catch (MalformedURLException e) { throw new OmeroException("Improperly formed url.",e); } } }
private void resetAllFacades(String url){ String[] beans=SpringHarness.ctx.getBeanDefinitionNames(); for (int i=0;i<beans.length;i++) { HessianProxyFactoryBean fb = (HessianProxyFactoryBean) SpringHarness.ctx.getBean(SpringHarness.ctx.FACTORY_BEAN_PREFIX+beans[i]); String oldUrl = fb.getServiceUrl(); String service = oldUrl.substring(oldUrl.lastIndexOf("/")); fb.setServiceUrl(url+service); try { fb.afterPropertiesSet(); } catch (MalformedURLException e) { throw new OmeroException("Improperly formed url.",e); // TODO } } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b6382cda97f15631c059881b08c1708cc8b2b7d8/OmeroEntry.java/clean/components/shoola-adapter/src/org/openmicroscopy/omero/shoolaadapter/OmeroEntry.java
repaint();
public void addBackgroundPaintMethod(PaintMethod p) { if(p != null) { backgroundPaintMethods.add(p); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/90683ded676656b27eef88c8c5096a007442c06c/Thumbnail.java/clean/SRC/org/openmicroscopy/shoola/agents/browser/images/Thumbnail.java
repaint();
public void addForegroundPaintMethod(PaintMethod p) { if(p != null) { foregroundPaintMethods.add(p); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/90683ded676656b27eef88c8c5096a007442c06c/Thumbnail.java/clean/SRC/org/openmicroscopy/shoola/agents/browser/images/Thumbnail.java
repaint();
public void addMiddlePaintMethod(PaintMethod p) { if(p != null) { middlePaintMethods.add(p); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/90683ded676656b27eef88c8c5096a007442c06c/Thumbnail.java/clean/SRC/org/openmicroscopy/shoola/agents/browser/images/Thumbnail.java
repaint();
public void removeBackgroundPaintMethod(PaintMethod p) { if(p != null) { backgroundPaintMethods.remove(p); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/90683ded676656b27eef88c8c5096a007442c06c/Thumbnail.java/clean/SRC/org/openmicroscopy/shoola/agents/browser/images/Thumbnail.java
repaint();
public void removeForegroundPaintMethod(PaintMethod p) { if(p != null) { foregroundPaintMethods.remove(p); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/90683ded676656b27eef88c8c5096a007442c06c/Thumbnail.java/clean/SRC/org/openmicroscopy/shoola/agents/browser/images/Thumbnail.java
repaint();
public void removeMiddlePaintMethod(PaintMethod p) { if(p != null) { middlePaintMethods.remove(p); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/90683ded676656b27eef88c8c5096a007442c06c/Thumbnail.java/clean/SRC/org/openmicroscopy/shoola/agents/browser/images/Thumbnail.java
RGBBuffer buf = re.render(new PlaneDef(PlaneDef.XY, re.getDefaultT()));
PlaneDef pd = new PlaneDef(PlaneDef.XY, re.getDefaultT()); pd.setZ(re.getDefaultZ()); RGBBuffer buf = re.render(pd);
private BufferedImage createScaledImage(Pixels pixels, RenderingDef def, Integer sizeX, Integer sizeY) { // Original sizes and thumbnail metadata int origSizeX = pixels.getSizeX(); int origSizeY = pixels.getSizeY(); // Lookup user's rendering definition if one is not given to us if (def == null) def = getRenderingDef(pixels); // Retrieve our rendered data and translate to a buffered image initializeRenderingEngine(pixels, def); RGBBuffer buf = re.render(new PlaneDef(PlaneDef.XY, re.getDefaultT())); BufferedImage image = createBufferedImage(buf, origSizeX, origSizeY); // Finally, scale our image using scaling factors (percentage). log.info("Setting xScale factor: " + sizeX + "/" + origSizeX); float xScale = (float) sizeX / origSizeX; log.info("Setting yScale factor: " + sizeX + "/" + origSizeX); float yScale = (float) sizeY / origSizeY; return iScale.scaleBufferedImage(image, xScale, yScale); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/f9cdc8c71f1aeea035423b248d1dcb617415232b/ThumbImpl.java/buggy/components/server/src/ome/logic/ThumbImpl.java
currentLoader = new ImagesInContainerLoader(component, DatasetData.class, ids, true);
klass = DatasetData.class;
void fireFilteredImageDataLoading(Set nodes) { Set ids = new HashSet(nodes.size()); Iterator i = nodes.iterator(); if (filterType == Browser.IN_DATASET_FILTER) { while (i.hasNext()) ids.add(new Long(((DatasetData) i.next()).getId())); currentLoader = new ImagesInContainerLoader(component, DatasetData.class, ids, true); } else if (filterType == Browser.IN_CATEGORY_FILTER) { while (i.hasNext()) ids.add(new Long(((CategoryData) i.next()).getId())); currentLoader = new ImagesInContainerLoader(component, CategoryData.class, ids, true); } currentLoader.load(); state = Browser.LOADING_DATA; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/f55df2b5b71c0122a31a16e32e593ee35703ee52/BrowserModel.java/clean/SRC/org/openmicroscopy/shoola/agents/treeviewer/browser/BrowserModel.java
currentLoader = new ImagesInContainerLoader(component, CategoryData.class, ids, true);
klass = CategoryData.class;
void fireFilteredImageDataLoading(Set nodes) { Set ids = new HashSet(nodes.size()); Iterator i = nodes.iterator(); if (filterType == Browser.IN_DATASET_FILTER) { while (i.hasNext()) ids.add(new Long(((DatasetData) i.next()).getId())); currentLoader = new ImagesInContainerLoader(component, DatasetData.class, ids, true); } else if (filterType == Browser.IN_CATEGORY_FILTER) { while (i.hasNext()) ids.add(new Long(((CategoryData) i.next()).getId())); currentLoader = new ImagesInContainerLoader(component, CategoryData.class, ids, true); } currentLoader.load(); state = Browser.LOADING_DATA; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/f55df2b5b71c0122a31a16e32e593ee35703ee52/BrowserModel.java/clean/SRC/org/openmicroscopy/shoola/agents/treeviewer/browser/BrowserModel.java
state = Browser.LOADING_DATA;
void fireFilteredImageDataLoading(Set nodes) { Set ids = new HashSet(nodes.size()); Iterator i = nodes.iterator(); if (filterType == Browser.IN_DATASET_FILTER) { while (i.hasNext()) ids.add(new Long(((DatasetData) i.next()).getId())); currentLoader = new ImagesInContainerLoader(component, DatasetData.class, ids, true); } else if (filterType == Browser.IN_CATEGORY_FILTER) { while (i.hasNext()) ids.add(new Long(((CategoryData) i.next()).getId())); currentLoader = new ImagesInContainerLoader(component, CategoryData.class, ids, true); } currentLoader.load(); state = Browser.LOADING_DATA; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/f55df2b5b71c0122a31a16e32e593ee35703ee52/BrowserModel.java/clean/SRC/org/openmicroscopy/shoola/agents/treeviewer/browser/BrowserModel.java
Object ho = getLastSelectedDisplay().getUserObject();
TreeImageDisplay node = getLastSelectedDisplay(); if (node instanceof TreeImageNode) return; Object ho = node.getUserObject();
void fireLeavesLoading() { Object ho = getLastSelectedDisplay().getUserObject(); long id = 0; Class nodeType = null; if (ho instanceof DatasetData) { nodeType = DatasetData.class; id = ((DatasetData) ho).getId(); } else if (ho instanceof CategoryData) { nodeType = CategoryData.class; id = ((CategoryData) ho).getId(); } else throw new IllegalArgumentException("Not valid selected display"); state = Browser.LOADING_LEAVES; currentLoader = new ImagesInContainerLoader(component, nodeType, id); currentLoader.load(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/f55df2b5b71c0122a31a16e32e593ee35703ee52/BrowserModel.java/clean/SRC/org/openmicroscopy/shoola/agents/treeviewer/browser/BrowserModel.java
currentLoader = new ImagesInContainerLoader(component, nodeType, id);
currentLoader = new ImagesInContainerLoader(component, nodeType, id, (TreeImageSet) node);
void fireLeavesLoading() { Object ho = getLastSelectedDisplay().getUserObject(); long id = 0; Class nodeType = null; if (ho instanceof DatasetData) { nodeType = DatasetData.class; id = ((DatasetData) ho).getId(); } else if (ho instanceof CategoryData) { nodeType = CategoryData.class; id = ((CategoryData) ho).getId(); } else throw new IllegalArgumentException("Not valid selected display"); state = Browser.LOADING_LEAVES; currentLoader = new ImagesInContainerLoader(component, nodeType, id); currentLoader.load(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/f55df2b5b71c0122a31a16e32e593ee35703ee52/BrowserModel.java/clean/SRC/org/openmicroscopy/shoola/agents/treeviewer/browser/BrowserModel.java
if (d.getUserObject() instanceof ImageData) { ViewCmd cmd = new ViewCmd(parent);
Object o = d.getUserObject(); if (o instanceof ImageData) { ViewCmd cmd = new ViewCmd(parent, (ImageData) o);
void viewDataObject() { TreeImageDisplay d = getLastSelectedDisplay(); if (d == null) return; if (d.getUserObject() instanceof ImageData) { ViewCmd cmd = new ViewCmd(parent); cmd.execute(); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/f55df2b5b71c0122a31a16e32e593ee35703ee52/BrowserModel.java/clean/SRC/org/openmicroscopy/shoola/agents/treeviewer/browser/BrowserModel.java
component.addChangeListener(this);
void initialize(ClipBoardUI view, ClipBoardModel model) { if (view == null) throw new NullPointerException("No view."); if (model == null) throw new NullPointerException("No model."); this.view = view; this.model = model; model.getParentModel().addChangeListener(this); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/3feec30057da68977528d8509d07bff5c080fb40/ClipBoardControl.java/clean/SRC/org/openmicroscopy/shoola/agents/hiviewer/clipboard/ClipBoardControl.java
String propName = pce.getPropertyName(); if (propName.equals(Browser.SELECTED_DISPLAY_PROPERTY))
String name = pce.getPropertyName(); if (name.equals(Browser.SELECTED_DISPLAY_PROPERTY))
public void propertyChange(PropertyChangeEvent pce) { String propName = pce.getPropertyName(); if (propName.equals(Browser.SELECTED_DISPLAY_PROPERTY)) handleBrowserSelectedDisplay(pce); else if (propName.equals(ClipBoard.LOCALIZE_IMAGE_DISPLAY)) { ImageDisplay node = (ImageDisplay) pce.getNewValue(); ImageDisplay parent = node.getParentDisplay(); scrollToNode(node.getBounds(), parent, (parent.getParentDisplay() == null)); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/3feec30057da68977528d8509d07bff5c080fb40/ClipBoardControl.java/clean/SRC/org/openmicroscopy/shoola/agents/hiviewer/clipboard/ClipBoardControl.java
else if (propName.equals(ClipBoard.LOCALIZE_IMAGE_DISPLAY)) {
else if (name.equals(ClipBoard.LOCALIZE_IMAGE_DISPLAY)) {
public void propertyChange(PropertyChangeEvent pce) { String propName = pce.getPropertyName(); if (propName.equals(Browser.SELECTED_DISPLAY_PROPERTY)) handleBrowserSelectedDisplay(pce); else if (propName.equals(ClipBoard.LOCALIZE_IMAGE_DISPLAY)) { ImageDisplay node = (ImageDisplay) pce.getNewValue(); ImageDisplay parent = node.getParentDisplay(); scrollToNode(node.getBounds(), parent, (parent.getParentDisplay() == null)); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/3feec30057da68977528d8509d07bff5c080fb40/ClipBoardControl.java/clean/SRC/org/openmicroscopy/shoola/agents/hiviewer/clipboard/ClipBoardControl.java
} else if (source instanceof ClipBoard) { switch (model.getState()) { case ClipBoard.EDIT_ANNOTATIONS: case ClipBoard.LOADING_ANNOTATIONS: model.getLoadingWin().setOnScreen(); break; case ClipBoard.ANNOTATIONS_READY: case ClipBoard.DISCARDED_ANNOTATIONS: model.getLoadingWin().setClosed(true); break; }
public void stateChanged(ChangeEvent ce) { Object source = ce.getSource(); if (source instanceof HiViewer) { HiViewer parentModel = model.getParentModel(); if (parentModel.getState() == HiViewer.READY) { parentModel.getBrowser().addPropertyChangeListener( Browser.SELECTED_DISPLAY_PROPERTY, this); view.initListener(); } } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/3feec30057da68977528d8509d07bff5c080fb40/ClipBoardControl.java/clean/SRC/org/openmicroscopy/shoola/agents/hiviewer/clipboard/ClipBoardControl.java
return RubyFixnum.newFixnum(getRuby(), begin[(int) index.getValue()]);
return RubyFixnum.newFixnum(getRuby(), begin[(int) index.getLongValue()]);
public RubyObject begin(RubyFixnum index) { if (outOfBounds(index)) { return getRuby().getNil(); } return RubyFixnum.newFixnum(getRuby(), begin[(int) index.getValue()]); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/786cea08c1dd2092a02d1254b49fbee371ace5f9/RubyMatchData.java/buggy/org/jruby/RubyMatchData.java
return RubyFixnum.newFixnum(getRuby(), end[(int) index.getValue()]);
return RubyFixnum.newFixnum(getRuby(), end[(int) index.getLongValue()]);
public RubyObject end(RubyFixnum index) { if (outOfBounds(index)) { return getRuby().getNil(); } return RubyFixnum.newFixnum(getRuby(), end[(int) index.getValue()]); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/786cea08c1dd2092a02d1254b49fbee371ace5f9/RubyMatchData.java/buggy/org/jruby/RubyMatchData.java
permissionPanel.setLayout(new GridBagLayout());
permissionPanel.setLayout(new BorderLayout());
private JPanel builPermissionPanel() { permissionPanel = new JPanel(); permissionPanel.setLayout(new GridBagLayout()); return permissionPanel; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/464efde90db6bc5095c0a7e5952f51ad0f37ca86/EditorPaneUI.java/clean/SRC/org/openmicroscopy/shoola/agents/hiviewer/clipboard/editor/EditorPaneUI.java
int h = l.getFontMetrics(l.getFont()).getHeight()+5; layout.setRow(2, h);
layout.setRow(2, l.getFontMetrics(l.getFont()).getHeight()+5);
private JPanel buildContentPanel() { JPanel content = new JPanel(); double[][] tl = {{TableLayout.PREFERRED, TableLayout.FILL}, //columns {TableLayout.PREFERRED, 5, 0, 100} }; //rows TableLayout layout = new TableLayout(tl); content.setLayout(layout); content.setBorder(BorderFactory.createEmptyBorder(5, 10, 5, 10)); content.add(UIUtilities.setTextFont("Name"), "0, 0, l, c"); content.add(nameArea, "1, 0, f, c"); content.add(new JLabel(), "0, 1, 1, 1"); JLabel l = UIUtilities.setTextFont("Description"); int h = l.getFontMetrics(l.getFont()).getHeight()+5; layout.setRow(2, h); content.add(l, "0, 2, l, c"); JScrollPane pane = new JScrollPane(descriptionArea); content.add(pane, "1, 2, 1, 3"); return content; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/464efde90db6bc5095c0a7e5952f51ad0f37ca86/EditorPaneUI.java/clean/SRC/org/openmicroscopy/shoola/agents/hiviewer/clipboard/editor/EditorPaneUI.java
setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
setLayout(new BorderLayout());
private void buildGUI() { setBorder(new EmptyBorder(5, 5, 5, 5)); setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); setOpaque(true); add(UIUtilities.buildComponentPanel(titleLabel)); add(new JSeparator()); bodyPanel = buildContentPanel(); bodyPanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); add(bodyPanel); add(new JSeparator()); add(builPermissionPanel()); add(UIUtilities.buildComponentPanelRight(buildToolBar())); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/464efde90db6bc5095c0a7e5952f51ad0f37ca86/EditorPaneUI.java/clean/SRC/org/openmicroscopy/shoola/agents/hiviewer/clipboard/editor/EditorPaneUI.java
add(UIUtilities.buildComponentPanel(titleLabel)); add(new JSeparator()); bodyPanel = buildContentPanel(); bodyPanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); add(bodyPanel); add(new JSeparator()); add(builPermissionPanel()); add(UIUtilities.buildComponentPanelRight(buildToolBar()));
JPanel p = new JPanel(); p.setLayout(new BoxLayout(p, BoxLayout.Y_AXIS)); p.add(titleLabel); p.add(finishButton); add(UIUtilities.buildComponentPanel(p), BorderLayout.NORTH); tabs = new JTabbedPane(); tabs.addTab(PROPERTY, null, buildContentPanel()); tabs.addTab(PERMISSIONS, null, builPermissionPanel()); add(tabs, BorderLayout.CENTER);
private void buildGUI() { setBorder(new EmptyBorder(5, 5, 5, 5)); setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); setOpaque(true); add(UIUtilities.buildComponentPanel(titleLabel)); add(new JSeparator()); bodyPanel = buildContentPanel(); bodyPanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); add(bodyPanel); add(new JSeparator()); add(builPermissionPanel()); add(UIUtilities.buildComponentPanelRight(buildToolBar())); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/464efde90db6bc5095c0a7e5952f51ad0f37ca86/EditorPaneUI.java/clean/SRC/org/openmicroscopy/shoola/agents/hiviewer/clipboard/editor/EditorPaneUI.java
GridBagConstraints c = new GridBagConstraints(); c.anchor = GridBagConstraints.WEST; c.gridwidth = GridBagConstraints.REMAINDER; c.fill = GridBagConstraints.HORIZONTAL; c.weightx = 1.0;
void displayDetails(Map details, PermissionData permission) { permissionPanel.removeAll(); if (details != null) { GridBagConstraints c = new GridBagConstraints(); c.anchor = GridBagConstraints.WEST; c.gridwidth = GridBagConstraints.REMAINDER; //end row c.fill = GridBagConstraints.HORIZONTAL; c.weightx = 1.0; permissionPanel.add( new PermissionPane(this, model, details, permission), c); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/464efde90db6bc5095c0a7e5952f51ad0f37ca86/EditorPaneUI.java/clean/SRC/org/openmicroscopy/shoola/agents/hiviewer/clipboard/editor/EditorPaneUI.java
new PermissionPane(this, model, details, permission), c);
new PermissionPane(this, model, details, permission), BorderLayout.NORTH);
void displayDetails(Map details, PermissionData permission) { permissionPanel.removeAll(); if (details != null) { GridBagConstraints c = new GridBagConstraints(); c.anchor = GridBagConstraints.WEST; c.gridwidth = GridBagConstraints.REMAINDER; //end row c.fill = GridBagConstraints.HORIZONTAL; c.weightx = 1.0; permissionPanel.add( new PermissionPane(this, model, details, permission), c); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/464efde90db6bc5095c0a7e5952f51ad0f37ca86/EditorPaneUI.java/clean/SRC/org/openmicroscopy/shoola/agents/hiviewer/clipboard/editor/EditorPaneUI.java
permissionPanel.validate(); permissionPanel.repaint();
void displayDetails(Map details, PermissionData permission) { permissionPanel.removeAll(); if (details != null) { GridBagConstraints c = new GridBagConstraints(); c.anchor = GridBagConstraints.WEST; c.gridwidth = GridBagConstraints.REMAINDER; //end row c.fill = GridBagConstraints.HORIZONTAL; c.weightx = 1.0; permissionPanel.add( new PermissionPane(this, model, details, permission), c); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/464efde90db6bc5095c0a7e5952f51ad0f37ca86/EditorPaneUI.java/clean/SRC/org/openmicroscopy/shoola/agents/hiviewer/clipboard/editor/EditorPaneUI.java
bodyPanel.setVisible(!(name.equals("")));
tabs.setVisible(!(name.equals(""))); finishButton.setEnabled(!(name.equals("")));
void setAreas(String name, String description, String title, boolean isWritable) { nameArea.setEnabled(isWritable); nameArea.getDocument().removeDocumentListener(nameAreaListener); nameArea.setText(name); nameArea.getDocument().addDocumentListener(nameAreaListener); descriptionArea.setEnabled(isWritable); descriptionArea.getDocument().removeDocumentListener( descriptionAreaListener); descriptionArea.setText(description); descriptionArea.getDocument().addDocumentListener( descriptionAreaListener); bodyPanel.setVisible(!(name.equals(""))); titleLabel.setText(title); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/464efde90db6bc5095c0a7e5952f51ad0f37ca86/EditorPaneUI.java/clean/SRC/org/openmicroscopy/shoola/agents/hiviewer/clipboard/editor/EditorPaneUI.java
void setAreas(String name, String description, String title, boolean isWritable) { nameArea.setEnabled(isWritable); nameArea.getDocument().removeDocumentListener(nameAreaListener); nameArea.setText(name); nameArea.getDocument().addDocumentListener(nameAreaListener); descriptionArea.setEnabled(isWritable); descriptionArea.getDocument().removeDocumentListener( descriptionAreaListener); descriptionArea.setText(description); descriptionArea.getDocument().addDocumentListener( descriptionAreaListener); bodyPanel.setVisible(!(name.equals(""))); titleLabel.setText(title); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/464efde90db6bc5095c0a7e5952f51ad0f37ca86/EditorPaneUI.java/clean/SRC/org/openmicroscopy/shoola/agents/hiviewer/clipboard/editor/EditorPaneUI.java
public int getChannelFamily(int w)
public Family getChannelFamily(int w)
public int getChannelFamily(int w) { rwl.readLock().lock(); try { errorIfInvalidState(); ChannelBinding[] cb = renderer.getChannelBindings(); return QuantumFactory.convertFamilyType(cb[w].getFamily()); } finally { rwl.readLock().unlock(); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b2d1563defffc9fa654271400d754843f42e2810/RenderingEngineImpl.java/buggy/components/rendering/src/omeis/providers/re/RenderingEngineImpl.java
return QuantumFactory.convertFamilyType(cb[w].getFamily());
return cb[w].getFamily();
public int getChannelFamily(int w) { rwl.readLock().lock(); try { errorIfInvalidState(); ChannelBinding[] cb = renderer.getChannelBindings(); return QuantumFactory.convertFamilyType(cb[w].getFamily()); } finally { rwl.readLock().unlock(); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b2d1563defffc9fa654271400d754843f42e2810/RenderingEngineImpl.java/buggy/components/rendering/src/omeis/providers/re/RenderingEngineImpl.java
public int getModel()
public RenderingModel getModel()
public int getModel() { rwl.readLock().lock(); try { errorIfNullRenderingDef(); return RenderingDefConstants.convertType(rendDefObj.getModel()); } finally { rwl.readLock().unlock(); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b2d1563defffc9fa654271400d754843f42e2810/RenderingEngineImpl.java/buggy/components/rendering/src/omeis/providers/re/RenderingEngineImpl.java
return RenderingDefConstants.convertType(rendDefObj.getModel());
return rendDefObj.getModel();
public int getModel() { rwl.readLock().lock(); try { errorIfNullRenderingDef(); return RenderingDefConstants.convertType(rendDefObj.getModel()); } finally { rwl.readLock().unlock(); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b2d1563defffc9fa654271400d754843f42e2810/RenderingEngineImpl.java/buggy/components/rendering/src/omeis/providers/re/RenderingEngineImpl.java
public int[] getRGBA(int w) { rwl.readLock().lock(); try { errorIfInvalidState(); int[] rgba = new int[4]; ChannelBinding[] cb = renderer.getChannelBindings(); // int[] rgba = cb[w].getColor, copy = new int[rgba.length]; // System.arraycopy(rgba, 0, copy, 0, rgba.length); // return copy; // NOTE: The rgba is supposed to be read-only; however we make a // copy to be on the safe side. // TODO rgba[0] = cb[w].getColor().getRed().intValue(); rgba[1] = cb[w].getColor().getGreen().intValue(); rgba[2] = cb[w].getColor().getBlue().intValue(); rgba[3] = cb[w].getColor().getAlpha().intValue(); return rgba; } finally { rwl.readLock().unlock(); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b2d1563defffc9fa654271400d754843f42e2810/RenderingEngineImpl.java/buggy/components/rendering/src/omeis/providers/re/RenderingEngineImpl.java
public int[] getRGBA(int w) { rwl.readLock().lock(); try { errorIfInvalidState(); int[] rgba = new int[4]; ChannelBinding[] cb = renderer.getChannelBindings(); // int[] rgba = cb[w].getColor, copy = new int[rgba.length]; // System.arraycopy(rgba, 0, copy, 0, rgba.length); // return copy; // NOTE: The rgba is supposed to be read-only; however we make a // copy to be on the safe side. // TODO rgba[0] = cb[w].getColor().getRed().intValue(); rgba[1] = cb[w].getColor().getGreen().intValue(); rgba[2] = cb[w].getColor().getBlue().intValue(); rgba[3] = cb[w].getColor().getAlpha().intValue(); return rgba; } finally { rwl.readLock().unlock(); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b2d1563defffc9fa654271400d754843f42e2810/RenderingEngineImpl.java/buggy/components/rendering/src/omeis/providers/re/RenderingEngineImpl.java
/* if (rendDefObj == null) { this.rendDefObj = Helper.createDefaultRenderingDef(pixelsObj,pixelStats); pixelsObj.getSettings().add(rendDefObj); } */
public void load() { rwl.writeLock().lock(); try { errorIfNullPixels(); /* * TODO we could also allow for setting of the buffer! perhaps * better caching, etc. */ PixelBuffer buffer = pixDataSrv.getPixelBuffer(pixelsObj); StatsFactory sf = new StatsFactory(); // FIXME: This should be stripped out /* if (rendDefObj == null) { this.rendDefObj = Helper.createDefaultRenderingDef(pixelsObj,pixelStats); pixelsObj.getSettings().add(rendDefObj); } */ renderer = new Renderer(pixelsObj, rendDefObj, buffer); } finally { rwl.writeLock().unlock(); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b2d1563defffc9fa654271400d754843f42e2810/RenderingEngineImpl.java/buggy/components/rendering/src/omeis/providers/re/RenderingEngineImpl.java
if ( rendDefObj == null ) throw new ValidationException( "RenderingDef with id "+pixelsId+" not found.");
public void lookupRenderingDef(long pixelsId) { rwl.writeLock().lock(); try { this.rendDefObj = pixMetaSrv.retrieveRndSettings(pixelsId); this.renderer = null; } finally { rwl.writeLock().unlock(); } if (log.isDebugEnabled()) log.debug("lookupRenderingDef for id "+pixelsId+" succeeded: "+this.rendDefObj); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b2d1563defffc9fa654271400d754843f42e2810/RenderingEngineImpl.java/buggy/components/rendering/src/omeis/providers/re/RenderingEngineImpl.java
public void setModel(int model)
public void setModel(RenderingModel model)
public void setModel(int model) { rwl.writeLock().lock(); try { errorIfInvalidState(); renderer.setModel(model); } finally { rwl.writeLock().unlock(); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b2d1563defffc9fa654271400d754843f42e2810/RenderingEngineImpl.java/buggy/components/rendering/src/omeis/providers/re/RenderingEngineImpl.java
public void setQuantizationMap(int w, int family,
public void setQuantizationMap(int w, Family family,
public void setQuantizationMap(int w, int family, double coefficient, boolean noiseReduction) { rwl.writeLock().lock(); try { errorIfInvalidState(); renderer.setQuantizationMap(w, family, coefficient, noiseReduction); } finally { rwl.writeLock().unlock(); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b2d1563defffc9fa654271400d754843f42e2810/RenderingEngineImpl.java/buggy/components/rendering/src/omeis/providers/re/RenderingEngineImpl.java
fw.flush(); return os.toString("UTF8");
fw.flush(); return os.toString("UTF8");
public final Object evaluate(Context data) { try { ByteArrayOutputStream os = new ByteArrayOutputStream(512); FastWriter fw = new FastWriter(os, "UTF8"); write(fw,data); fw.flush(); return os.toString("UTF8"); } catch (IOException e) { _log.exception(e); _log.error("Template: Could not write to ByteArrayOutputStream!"); return null; } }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/0077ae511cd2628ca5fb91db85b8da2cd6c57117/WMTemplate.java/buggy/webmacro/src/org/webmacro/engine/WMTemplate.java
throws InvalidContextException
throws ContextException
final Object getValue(Context context) throws InvalidContextException { try { return context.getTool(_names); } catch (Exception e) { Engine.log.exception(e); String warning = "Variable: unable to access " + this + ";"; throw new InvalidContextException(warning); } }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/df66bff2e7e90a14ae25f0c5642fd5199b077ad4/ToolVariable.java/buggy/webmacro/src/org/webmacro/engine/ToolVariable.java
throw new InvalidContextException(warning);
throw new ContextException(warning);
final Object getValue(Context context) throws InvalidContextException { try { return context.getTool(_names); } catch (Exception e) { Engine.log.exception(e); String warning = "Variable: unable to access " + this + ";"; throw new InvalidContextException(warning); } }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/df66bff2e7e90a14ae25f0c5642fd5199b077ad4/ToolVariable.java/buggy/webmacro/src/org/webmacro/engine/ToolVariable.java
throws InvalidContextException
throws ContextException
final void setValue(Context context, Object newValue) throws InvalidContextException { try{ if (!context.setTool(_names,newValue)) { throw new InvalidContextException("No method to set \"" + _vname + "\" to type " + ((newValue == null) ? "null" : newValue.getClass().toString()) + " in supplied context (" + context.getClass() + ")"); } } catch (Exception e) { Engine.log.exception(e); String warning = "Variable.setValue: unable to access " + this + " (is it a public method/field?)"; throw new InvalidContextException(warning); } }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/df66bff2e7e90a14ae25f0c5642fd5199b077ad4/ToolVariable.java/buggy/webmacro/src/org/webmacro/engine/ToolVariable.java
throw new InvalidContextException("No method to set \"" + _vname +
throw new ContextException("No method to set \"" + _vname +
final void setValue(Context context, Object newValue) throws InvalidContextException { try{ if (!context.setTool(_names,newValue)) { throw new InvalidContextException("No method to set \"" + _vname + "\" to type " + ((newValue == null) ? "null" : newValue.getClass().toString()) + " in supplied context (" + context.getClass() + ")"); } } catch (Exception e) { Engine.log.exception(e); String warning = "Variable.setValue: unable to access " + this + " (is it a public method/field?)"; throw new InvalidContextException(warning); } }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/df66bff2e7e90a14ae25f0c5642fd5199b077ad4/ToolVariable.java/buggy/webmacro/src/org/webmacro/engine/ToolVariable.java
throw new InvalidContextException(warning);
throw new ContextException(warning);
final void setValue(Context context, Object newValue) throws InvalidContextException { try{ if (!context.setTool(_names,newValue)) { throw new InvalidContextException("No method to set \"" + _vname + "\" to type " + ((newValue == null) ? "null" : newValue.getClass().toString()) + " in supplied context (" + context.getClass() + ")"); } } catch (Exception e) { Engine.log.exception(e); String warning = "Variable.setValue: unable to access " + this + " (is it a public method/field?)"; throw new InvalidContextException(warning); } }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/df66bff2e7e90a14ae25f0c5642fd5199b077ad4/ToolVariable.java/buggy/webmacro/src/org/webmacro/engine/ToolVariable.java
fileTestModule.defineSingletonMethod("file?", callbackFactory.getSingletonMethod("file_p", RubyString.class)); fileTestModule.defineSingletonMethod("directory?", callbackFactory.getSingletonMethod("directory_p", RubyString.class)); fileTestModule.defineSingletonMethod("exist?", callbackFactory.getSingletonMethod("exist_p", RubyString.class)); fileTestModule.defineSingletonMethod("exists?", callbackFactory.getSingletonMethod("exist_p", RubyString.class)); fileTestModule.defineSingletonMethod("readable?", callbackFactory.getSingletonMethod("readable_p", RubyString.class)); fileTestModule.defineSingletonMethod("readable_real?", callbackFactory.getSingletonMethod("readable_p", RubyString.class)); fileTestModule.defineSingletonMethod("size", callbackFactory.getSingletonMethod("size", RubyString.class)); fileTestModule.defineSingletonMethod("writable?", callbackFactory.getSingletonMethod("writable_p", RubyString.class)); fileTestModule.defineSingletonMethod("writable_real?", callbackFactory.getSingletonMethod("writable_p", RubyString.class)); fileTestModule.defineSingletonMethod("zero?", callbackFactory.getSingletonMethod("zero_p", RubyString.class));
fileTestModule.defineSingletonMethod("file?", callbackFactory.getSingletonMethod("file_p", IRubyObject.class)); fileTestModule.defineSingletonMethod("directory?", callbackFactory.getSingletonMethod("directory_p", IRubyObject.class)); fileTestModule.defineSingletonMethod("exist?", callbackFactory.getSingletonMethod("exist_p", IRubyObject.class)); fileTestModule.defineSingletonMethod("exists?", callbackFactory.getSingletonMethod("exist_p", IRubyObject.class)); fileTestModule.defineSingletonMethod("readable?", callbackFactory.getSingletonMethod("readable_p", IRubyObject.class)); fileTestModule.defineSingletonMethod("readable_real?", callbackFactory.getSingletonMethod("readable_p", IRubyObject.class)); fileTestModule.defineSingletonMethod("size", callbackFactory.getSingletonMethod("size", IRubyObject.class)); fileTestModule.defineSingletonMethod("writable?", callbackFactory.getSingletonMethod("writable_p", IRubyObject.class)); fileTestModule.defineSingletonMethod("writable_real?", callbackFactory.getSingletonMethod("writable_p", IRubyObject.class)); fileTestModule.defineSingletonMethod("zero?", callbackFactory.getSingletonMethod("zero_p", IRubyObject.class));
public static RubyModule createFileTestModule(IRuby runtime) { RubyModule fileTestModule = runtime.defineModule("FileTest"); CallbackFactory callbackFactory = runtime.callbackFactory(RubyFileTest.class); fileTestModule.defineSingletonMethod("file?", callbackFactory.getSingletonMethod("file_p", RubyString.class)); fileTestModule.defineSingletonMethod("directory?", callbackFactory.getSingletonMethod("directory_p", RubyString.class)); fileTestModule.defineSingletonMethod("exist?", callbackFactory.getSingletonMethod("exist_p", RubyString.class)); fileTestModule.defineSingletonMethod("exists?", callbackFactory.getSingletonMethod("exist_p", RubyString.class)); fileTestModule.defineSingletonMethod("readable?", callbackFactory.getSingletonMethod("readable_p", RubyString.class)); fileTestModule.defineSingletonMethod("readable_real?", callbackFactory.getSingletonMethod("readable_p", RubyString.class)); fileTestModule.defineSingletonMethod("size", callbackFactory.getSingletonMethod("size", RubyString.class)); fileTestModule.defineSingletonMethod("writable?", callbackFactory.getSingletonMethod("writable_p", RubyString.class)); fileTestModule.defineSingletonMethod("writable_real?", callbackFactory.getSingletonMethod("writable_p", RubyString.class)); fileTestModule.defineSingletonMethod("zero?", callbackFactory.getSingletonMethod("zero_p", RubyString.class)); fileTestModule.defineMethod("file?", callbackFactory.getSingletonMethod("file_p", RubyString.class)); fileTestModule.defineMethod("directory?", callbackFactory.getSingletonMethod("directory_p", RubyString.class)); fileTestModule.defineMethod("exist?", callbackFactory.getSingletonMethod("exist_p", RubyString.class)); fileTestModule.defineMethod("exists?", callbackFactory.getSingletonMethod("exist_p", RubyString.class)); fileTestModule.defineMethod("readable?", callbackFactory.getSingletonMethod("readable_p", RubyString.class)); fileTestModule.defineMethod("readable_real?", callbackFactory.getSingletonMethod("readable_p", RubyString.class)); fileTestModule.defineMethod("size", callbackFactory.getSingletonMethod("size", RubyString.class)); fileTestModule.defineMethod("writable?", callbackFactory.getSingletonMethod("writable_p", RubyString.class)); fileTestModule.defineMethod("writable_real?", callbackFactory.getSingletonMethod("writable_p", RubyString.class)); fileTestModule.defineMethod("zero?", callbackFactory.getSingletonMethod("zero_p", RubyString.class)); return fileTestModule; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/418c30d7568bd7f3d82ef1d3a011ee39d958b8f6/RubyFileTest.java/buggy/src/org/jruby/RubyFileTest.java
fileTestModule.defineMethod("file?", callbackFactory.getSingletonMethod("file_p", RubyString.class)); fileTestModule.defineMethod("directory?", callbackFactory.getSingletonMethod("directory_p", RubyString.class)); fileTestModule.defineMethod("exist?", callbackFactory.getSingletonMethod("exist_p", RubyString.class)); fileTestModule.defineMethod("exists?", callbackFactory.getSingletonMethod("exist_p", RubyString.class)); fileTestModule.defineMethod("readable?", callbackFactory.getSingletonMethod("readable_p", RubyString.class)); fileTestModule.defineMethod("readable_real?", callbackFactory.getSingletonMethod("readable_p", RubyString.class)); fileTestModule.defineMethod("size", callbackFactory.getSingletonMethod("size", RubyString.class)); fileTestModule.defineMethod("writable?", callbackFactory.getSingletonMethod("writable_p", RubyString.class)); fileTestModule.defineMethod("writable_real?", callbackFactory.getSingletonMethod("writable_p", RubyString.class)); fileTestModule.defineMethod("zero?", callbackFactory.getSingletonMethod("zero_p", RubyString.class));
fileTestModule.defineMethod("file?", callbackFactory.getSingletonMethod("file_p", IRubyObject.class)); fileTestModule.defineMethod("directory?", callbackFactory.getSingletonMethod("directory_p", IRubyObject.class)); fileTestModule.defineMethod("exist?", callbackFactory.getSingletonMethod("exist_p", IRubyObject.class)); fileTestModule.defineMethod("exists?", callbackFactory.getSingletonMethod("exist_p", IRubyObject.class)); fileTestModule.defineMethod("readable?", callbackFactory.getSingletonMethod("readable_p", IRubyObject.class)); fileTestModule.defineMethod("readable_real?", callbackFactory.getSingletonMethod("readable_p", IRubyObject.class)); fileTestModule.defineMethod("size", callbackFactory.getSingletonMethod("size", IRubyObject.class)); fileTestModule.defineMethod("writable?", callbackFactory.getSingletonMethod("writable_p", IRubyObject.class)); fileTestModule.defineMethod("writable_real?", callbackFactory.getSingletonMethod("writable_p", IRubyObject.class)); fileTestModule.defineMethod("zero?", callbackFactory.getSingletonMethod("zero_p", IRubyObject.class));
public static RubyModule createFileTestModule(IRuby runtime) { RubyModule fileTestModule = runtime.defineModule("FileTest"); CallbackFactory callbackFactory = runtime.callbackFactory(RubyFileTest.class); fileTestModule.defineSingletonMethod("file?", callbackFactory.getSingletonMethod("file_p", RubyString.class)); fileTestModule.defineSingletonMethod("directory?", callbackFactory.getSingletonMethod("directory_p", RubyString.class)); fileTestModule.defineSingletonMethod("exist?", callbackFactory.getSingletonMethod("exist_p", RubyString.class)); fileTestModule.defineSingletonMethod("exists?", callbackFactory.getSingletonMethod("exist_p", RubyString.class)); fileTestModule.defineSingletonMethod("readable?", callbackFactory.getSingletonMethod("readable_p", RubyString.class)); fileTestModule.defineSingletonMethod("readable_real?", callbackFactory.getSingletonMethod("readable_p", RubyString.class)); fileTestModule.defineSingletonMethod("size", callbackFactory.getSingletonMethod("size", RubyString.class)); fileTestModule.defineSingletonMethod("writable?", callbackFactory.getSingletonMethod("writable_p", RubyString.class)); fileTestModule.defineSingletonMethod("writable_real?", callbackFactory.getSingletonMethod("writable_p", RubyString.class)); fileTestModule.defineSingletonMethod("zero?", callbackFactory.getSingletonMethod("zero_p", RubyString.class)); fileTestModule.defineMethod("file?", callbackFactory.getSingletonMethod("file_p", RubyString.class)); fileTestModule.defineMethod("directory?", callbackFactory.getSingletonMethod("directory_p", RubyString.class)); fileTestModule.defineMethod("exist?", callbackFactory.getSingletonMethod("exist_p", RubyString.class)); fileTestModule.defineMethod("exists?", callbackFactory.getSingletonMethod("exist_p", RubyString.class)); fileTestModule.defineMethod("readable?", callbackFactory.getSingletonMethod("readable_p", RubyString.class)); fileTestModule.defineMethod("readable_real?", callbackFactory.getSingletonMethod("readable_p", RubyString.class)); fileTestModule.defineMethod("size", callbackFactory.getSingletonMethod("size", RubyString.class)); fileTestModule.defineMethod("writable?", callbackFactory.getSingletonMethod("writable_p", RubyString.class)); fileTestModule.defineMethod("writable_real?", callbackFactory.getSingletonMethod("writable_p", RubyString.class)); fileTestModule.defineMethod("zero?", callbackFactory.getSingletonMethod("zero_p", RubyString.class)); return fileTestModule; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/418c30d7568bd7f3d82ef1d3a011ee39d958b8f6/RubyFileTest.java/buggy/src/org/jruby/RubyFileTest.java
public static RubyBoolean directory_p(IRubyObject recv, RubyString filename) {
public static RubyBoolean directory_p(IRubyObject recv, IRubyObject filename) {
public static RubyBoolean directory_p(IRubyObject recv, RubyString filename) { return recv.getRuntime().newBoolean(newFile(filename).isDirectory()); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/418c30d7568bd7f3d82ef1d3a011ee39d958b8f6/RubyFileTest.java/buggy/src/org/jruby/RubyFileTest.java