rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k | meta stringlengths 141 403 |
|---|---|---|---|
public void stateChanged(ChangeEvent e) { if (e.getSource() instanceof JTabbedPane) { JTabbedPane tab = (JTabbedPane) e.getSource(); Component c = tab.getSelectedComponent(); int index = tab.getSelectedIndex(); if (c instanceof DOInfo) { ... | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9794ffbd035a4de717ee211573b4844dd0eb3371/EditorControl.java/clean/SRC/org/openmicroscopy/shoola/agents/treeviewer/editors/EditorControl.java | ||
runtime.getModule("Kernel").callMethod(runtime.getCurrentContext(),"require",runtime.newSymbol("java")); | public void test() { IRuby runtime = Ruby.getDefaultInstance(); JavaClass javaClass = JavaClass.get(runtime, String.class); assertSame(javaClass, JavaClass.get(runtime, String.class)); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/f621b644a7b64cb12bdf5d848d9e284e023964f4/TestJavaClass.java/clean/test/org/jruby/javasupport/TestJavaClass.java | |
public void testXMLReportValidity() throws Exception { String[] args; ProjectData.saveGlobalProjectData(); String dataFileName = CoverageDataFileHandler.getDefaultDataFile() .getAbsolutePath(); args = new String[] { "-f", "xml", "--datafile", dataFileName, "-o", pathToTestOutput, "-s", pathToSourceCode }; net.sourc... | public void testXMLReportValidity() throws Exception { | public void testXMLReportValidity() throws Exception { String[] args; // Serialize the current coverage data to disk ProjectData.saveGlobalProjectData(); String dataFileName = CoverageDataFileHandler.getDefaultDataFile() .getAbsolutePath(); // Then we need to generate the XML report args = new String[] { "-f"... | 50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/12464e2c222b85c4fe40070c50e015403ce5acfe/XMLReportTest.java/buggy/cobertura/test/net/sourceforge/cobertura/reporting/xml/XMLReportTest.java |
if (userIndex != -1) annotatedByList.setSelectedIndex(userIndex); | void showAnnotations() { ExperimenterData userDetails = model.getUserDetails(); if (userDetails == null) return; Map annotations = model.getAnnotations(); if (annotations == null) return; String[] owners = new String[annotations.size()]; Iterator i = annotations.keySet()... | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/adfc1c6109de30a5fa2f263c29c3f0359c5d4601/DOAnnotation.java/clean/SRC/org/openmicroscopy/shoola/agents/treeviewer/editors/DOAnnotation.java | |
annotatedByList.clearSelection(); annotatedByList.setSelectedIndex(userIndex); | if (userIndex != -1) annotatedByList.setSelectedIndex(userIndex); | void showAnnotations() { ExperimenterData userDetails = model.getUserDetails(); if (userDetails == null) return; Map annotations = model.getAnnotations(); if (annotations == null) return; String[] owners = new String[annotations.size()]; Iterator i = annotations.keySet()... | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/adfc1c6109de30a5fa2f263c29c3f0359c5d4601/DOAnnotation.java/clean/SRC/org/openmicroscopy/shoola/agents/treeviewer/editors/DOAnnotation.java |
System.out.println("index "+index); | private void showSingleAnnotation() { int index = annotatedByList.getSelectedIndex(); view.handleAnnotationAreaInsert(); if (index == -1) { ExperimenterData details = model.getUserDetails(); addAnnotationText(DEFAULT_TEXT+details.getFirstName()+" "+ ... | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/adfc1c6109de30a5fa2f263c29c3f0359c5d4601/DOAnnotation.java/clean/SRC/org/openmicroscopy/shoola/agents/treeviewer/editors/DOAnnotation.java | |
isg = (pojos.ImageData) i.next(); | isg = (pojos.ImageData) i.next(); | Set getImagesDiff(pojos.DatasetData data, Map filters, Map complexFilters) { Set imagesDiff = new HashSet(); try { imagesDiff = getImportedImages(filters, complexFilters); pojos.ImageData isg; Iterator i = imagesDiff.iterator(); Set images = data.getImages(); ... | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/5d253e1d8b8b563bd79074b962fe0a01fca0a091/DataManager.java/buggy/SRC/org/openmicroscopy/shoola/agents/datamng/DataManager.java |
Set getImagesDiff(pojos.DatasetData data, Map filters, Map complexFilters) { Set imagesDiff = new HashSet(); try { imagesDiff = getImportedImages(filters, complexFilters); pojos.ImageData isg; Iterator i = imagesDiff.iterator(); Set images = data.getImages(); ... | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/5d253e1d8b8b563bd79074b962fe0a01fca0a091/DataManager.java/buggy/SRC/org/openmicroscopy/shoola/agents/datamng/DataManager.java | ||
PixelsService service = PixelsService.getInstance(); | PixelsService service = new PixelsService(PixelsService.ROOT_DEFAULT); | protected void setUp() { pixels = new Pixels(); pixels.setId(1L); pixels.setSizeX(1024); pixels.setSizeY(1024); pixels.setSizeZ(64); pixels.setSizeC(3); pixels.setSizeT(50); PixelsType type = new PixelsType(); pixels.setPixelsType(typ... | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/ae0b01fad17fcacba3ec0999ca1ad645f389b5f9/HugePixelBufferUnitTest.java/buggy/components/omeio-nio/test/ome/io/nio/utests/HugePixelBufferUnitTest.java |
_tl.interrupt(); | public void destroy() { // @@@ We should shut down TimeLoop too somehow _cache = null; } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/65c210c2e5230f99b78b769799e9e54e3fcce30a/SMapCacheManager.java/buggy/webmacro/src/org/webmacro/resource/SMapCacheManager.java | |
JTabbedPane tabs = new JTabbedPane(JTabbedPane.TOP, JTabbedPane.WRAP_TAB_LAYOUT); tabs.setAlignmentX(LEFT_ALIGNMENT); | private JPanel buildTabbedPanel(ROIAgtCtrl control, IconManager im, int sizeT, int sizeZ) { JTabbedPane tabs = new JTabbedPane(JTabbedPane.TOP, JTabbedPane.WRAP_TAB_LAYOUT); tabs.setAlignmentX(LEFT_ALIGNMENT); ResultsPer... | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/3db37517e6873d11567ee5822e769ab058e1abed/ROIResults.java/buggy/SRC/org/openmicroscopy/shoola/agents/roi/results/ROIResults.java | |
channel, channels.length, up, down); | channel, channels.length, up, down, roiIndex, length); | private JPanel buildTabbedPanel(ROIAgtCtrl control, IconManager im, int sizeT, int sizeZ) { JTabbedPane tabs = new JTabbedPane(JTabbedPane.TOP, JTabbedPane.WRAP_TAB_LAYOUT); tabs.setAlignmentX(LEFT_ALIGNMENT); ResultsPer... | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/3db37517e6873d11567ee5822e769ab058e1abed/ROIResults.java/buggy/SRC/org/openmicroscopy/shoola/agents/roi/results/ROIResults.java |
tabs.insertTab("ROI #"+roi.getIndex(), null, roiPane, null, c); listROIs[c] = "ROI #"+roi.getIndex(); | tabs.insertTab("ROI #"+roiIndex, null, roiPane, null, c); listROIs[c] = "ROI #"+roiIndex; | private JPanel buildTabbedPanel(ROIAgtCtrl control, IconManager im, int sizeT, int sizeZ) { JTabbedPane tabs = new JTabbedPane(JTabbedPane.TOP, JTabbedPane.WRAP_TAB_LAYOUT); tabs.setAlignmentX(LEFT_ALIGNMENT); ResultsPer... | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/3db37517e6873d11567ee5822e769ab058e1abed/ROIResults.java/buggy/SRC/org/openmicroscopy/shoola/agents/roi/results/ROIResults.java |
int sizeZ, int channel, int l, Icon up, Icon down) | int sizeZ, int channel, int l, Icon up, Icon down, int roiIndex, int length) | public StatsResultsPane(ROIResultsMng mng, ROIStats stats, int sizeT, int sizeZ, int channel, int l, Icon up, Icon down) { manager = new StatsResultsPaneMng(this, mng, sizeT, sizeZ, stats, l); table = new StatsTable(up, down); table.initTable(manager.getDataToDisp... | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/3db37517e6873d11567ee5822e769ab058e1abed/StatsResultsPane.java/buggy/SRC/org/openmicroscopy/shoola/agents/roi/results/stats/StatsResultsPane.java |
bar = new BottomBar(manager, mng.getRegistry()); | bar = new BottomBar(manager, mng.getRegistry(), length); | public StatsResultsPane(ROIResultsMng mng, ROIStats stats, int sizeT, int sizeZ, int channel, int l, Icon up, Icon down) { manager = new StatsResultsPaneMng(this, mng, sizeT, sizeZ, stats, l); table = new StatsTable(up, down); table.initTable(manager.getDataToDisp... | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/3db37517e6873d11567ee5822e769ab058e1abed/StatsResultsPane.java/buggy/SRC/org/openmicroscopy/shoola/agents/roi/results/stats/StatsResultsPane.java |
return input.readChar(); | return input.readUnsignedByte(); | public int read() throws IOException { return input.readChar(); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/e5bbece4f7bb6e057b0dbd1399cf47c6a0f44d4d/DataInputBridgeStream.java/buggy/src/org/jruby/util/DataInputBridgeStream.java |
JMenu menu = view.getWindowsMenu(); | JMenu menu = ImViewerFactory.getWindowsMenu(); | private void attachWindowListeners() { JMenu menu = view.getWindowsMenu(); menu.addMenuListener(new MenuListener() { public void menuSelected(MenuEvent e) { createWindowsMenuItems(); } /** * Required by I/F but not actually needed in our case, ... | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/8b5ed57b1a06841fc56344f3b4489a5dc633e6c0/ImViewerControl.java/buggy/SRC/org/openmicroscopy/shoola/agents/imviewer/view/ImViewerControl.java |
JMenu menu = view.getWindowsMenu(); | JMenu menu = ImViewerFactory.getWindowsMenu(); | private void createWindowsMenuItems() { Set viewers = ImViewerFactory.getViewers(); Iterator i = viewers.iterator(); JMenu menu = view.getWindowsMenu(); menu.removeAll(); ImViewer viewer; while (i.hasNext()) { viewer = (ImViewer) i.next(); //if (!(v... | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/8b5ed57b1a06841fc56344f3b4489a5dc633e6c0/ImViewerControl.java/buggy/SRC/org/openmicroscopy/shoola/agents/imviewer/view/ImViewerControl.java |
super(ruby, "$" + bean.name, null); | super(ruby, GlobalVariable.variableName(bean.name), null); | public BeanGlobalVariable(Ruby ruby, BSFDeclaredBean bean) { super(ruby, "$" + bean.name, null); this.bean = bean; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/fe90dd6c556fab30e7ced54beb6d47e382ea6ee0/JRubyEngine.java/buggy/src/org/jruby/javasupport/bsf/JRubyEngine.java |
ruby.undefineGlobalVar(bean.name); | ruby.undefineGlobalVar(GlobalVariable.variableName(bean.name)); | public void undeclareBean(BSFDeclaredBean bean) throws BSFException { ruby.undefineGlobalVar(bean.name); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/fe90dd6c556fab30e7ced54beb6d47e382ea6ee0/JRubyEngine.java/buggy/src/org/jruby/javasupport/bsf/JRubyEngine.java |
_q = (IQuery) applicationContext.getBean("queryService"); | _q = new ServiceFactory( (OmeroContext) applicationContext ).getQueryService(); | protected void onSetUp() throws Exception { _q = (IQuery) applicationContext.getBean("queryService"); po = new PojoOptions().exp(1L); ids = new HashSet<Integer>(Arrays.asList(new Integer[]{1,2,3,4,5,6,250,253,249,258})); m = new HashMap(); m.put("id_list",ids); m.put("exp",... | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/dc8dde051a1e2b716514b3964c9222ce006ebea9/PojosDaoTest.java/buggy/components/server/test/ome/server/itests/PojosDaoTest.java |
static List checkGettersAndSetters(Method[] methods) { List goodMethods = new ArrayList(); if (null == methods) return goodMethods; for (int i = 0; i < methods.length; i++) { boolean ok = true; Method method = methods[i]; int mod = method.getModifiers... | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9570ef74198a070d72e77c417c9d25244a942de2/ReflectionUtils.java/clean/components/common/src/org/openmicroscopy/omero/util/ReflectionUtils.java | ||
super.init(b,config); | public void init(Broker b, Properties config) throws InitException { _broker = b; _log = b.getLog("resource"); try { try { String cacheStr = config.getProperty("TemplateExpireTime"); _cacheDuration = Integer.valueOf(cacheStr).intValue(); } catch (Exception ee) {... | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/4f312fd00a74365a2671f796aeebcfbe9888b8cc/TemplateProvider.java/clean/webmacro/src/org/webmacro/resource/TemplateProvider.java | |
Object locale = null; try { Field f = Locale.class.getField(field); locale = f.get(null); } catch (Exception ne) { StringTokenizer st = new StringTokenizer(field,"_"); String[] parts = new String[] {"","",""}; try { for (int i=0; i<3; i++) { parts[i] = st.nextToken(); } } catch (NoSuchElementException e) {} locale =... | return buildLocale(field); | final public Object get(String field) { Object locale = null; try { Field f = Locale.class.getField(field); locale = f.get(null); } catch (Exception ne) { StringTokenizer st = new StringTokenizer(field,"_"); String[] parts = n... | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/c6a528c19767039b6640003266b3bd96a892994e/LocaleTool.java/clean/webmacro/src/org/webmacro/servlet/LocaleTool.java |
if (coberturaFile.isClass() && shouldInstrument(coberturaFile.pathname)) | if (coberturaFile.isClass() && shouldInstrument(coberturaFile.getPathname())) | private void addInstrumentation(CoberturaFile coberturaFile) { if (coberturaFile.isClass() && shouldInstrument(coberturaFile.pathname)) { addInstrumentationToSingleClass(coberturaFile); } else if (coberturaFile.isDirectory()) { String[] contents = coberturaFile.list(); for (int i = 0; i < contents.length; i... | 50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/73cd6cee6c47bb171b3c10fb87c9d986322605f8/Main.java/buggy/cobertura/src/net/sourceforge/cobertura/instrument/Main.java |
File relativeFile = new File(coberturaFile.pathname, contents[i]); CoberturaFile relativeCoberturaFile = new CoberturaFile(coberturaFile.baseDir, | File relativeFile = new File(coberturaFile.getPathname(), contents[i]); CoberturaFile relativeCoberturaFile = new CoberturaFile(coberturaFile.getBaseDir(), | private void addInstrumentation(CoberturaFile coberturaFile) { if (coberturaFile.isClass() && shouldInstrument(coberturaFile.pathname)) { addInstrumentationToSingleClass(coberturaFile); } else if (coberturaFile.isDirectory()) { String[] contents = coberturaFile.list(); for (int i = 0; i < contents.length; i... | 50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/73cd6cee6c47bb171b3c10fb87c9d986322605f8/Main.java/buggy/cobertura/src/net/sourceforge/cobertura/instrument/Main.java |
rs.setLexFileIo(true); | /*rs.setLexFileIo(true); | public Node compileFile(String f, RubyObject file, int start) { rs.setLexFileIo(true); rs.setLexInput(file); rs.setLexP(0); rs.setLexPEnd(0); ruby.setSourceLine(start - 1); return yycompile(f, start); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/d31a76ee29d5978a9bec41e3ac9134cee024bcab/DefaultRubyParser.java/buggy/org/jruby/parser/DefaultRubyParser.java |
rs.setLexPEnd(0); | rs.setLexPEnd(0);*/ | public Node compileFile(String f, RubyObject file, int start) { rs.setLexFileIo(true); rs.setLexInput(file); rs.setLexP(0); rs.setLexPEnd(0); ruby.setSourceLine(start - 1); return yycompile(f, start); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/d31a76ee29d5978a9bec41e3ac9134cee024bcab/DefaultRubyParser.java/buggy/org/jruby/parser/DefaultRubyParser.java |
rs.setLexFileIo(false); | /*rs.setLexFileIo(false); | public Node compileString(String f, RubyObject s, int line) { rs.setLexFileIo(false); rs.setLexGetsPtr(0); rs.setLexInput(s); rs.setLexP(0); rs.setLexPEnd(0); ruby.setSourceLine(line - 1); ph.setCompileForEval(ruby.getInEval()); return yycompile(f, line); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/d31a76ee29d5978a9bec41e3ac9134cee024bcab/DefaultRubyParser.java/buggy/org/jruby/parser/DefaultRubyParser.java |
rs.setLexPEnd(0); | rs.setLexPEnd(0);*/ | public Node compileString(String f, RubyObject s, int line) { rs.setLexFileIo(false); rs.setLexGetsPtr(0); rs.setLexInput(s); rs.setLexP(0); rs.setLexPEnd(0); ruby.setSourceLine(line - 1); ph.setCompileForEval(ruby.getInEval()); return yycompile(f, line); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/d31a76ee29d5978a9bec41e3ac9134cee024bcab/DefaultRubyParser.java/buggy/org/jruby/parser/DefaultRubyParser.java |
rs.setSource(new StringScannerSource(f, s.toString())); | public Node compileString(String f, RubyObject s, int line) { rs.setLexFileIo(false); rs.setLexGetsPtr(0); rs.setLexInput(s); rs.setLexP(0); rs.setLexPEnd(0); ruby.setSourceLine(line - 1); ph.setCompileForEval(ruby.getInEval()); return yycompile(f, line); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/d31a76ee29d5978a9bec41e3ac9134cee024bcab/DefaultRubyParser.java/buggy/org/jruby/parser/DefaultRubyParser.java | |
return getTemplate(name); | return getResource(name); | public URL getTemplate(String name) { if (_templatePrefix == null) return getTemplate(name); else { URL u = getResource(_templatePrefix + name); return (u != null) ? u : getResource(name); } } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/74225abbfc0a04f290f49f77d0f5c6ecf6286030/Servlet22Broker.java/clean/webmacro/src/org/webmacro/servlet/Servlet22Broker.java |
super(name); | super(name); | public TestRuby(String name) { super(name); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/774c5d3d592dfd020e3a8f961b73f629c4c55cf0/TestRuby.java/buggy/org/jruby/test/TestRuby.java |
assertTrue(iObj.isTrue()); | assertTrue(iObj.isTrue()); | private void assertTrue(RubyObject iObj) { assertTrue(iObj.isTrue()); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/774c5d3d592dfd020e3a8f961b73f629c4c55cf0/TestRuby.java/buggy/org/jruby/test/TestRuby.java |
ruby = Ruby.getDefaultInstance(GNURegexpAdapter.class); | ruby = Ruby.getDefaultInstance(GNURegexpAdapter.class); | public void setUp() { ruby = Ruby.getDefaultInstance(GNURegexpAdapter.class); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/774c5d3d592dfd020e3a8f961b73f629c4c55cf0/TestRuby.java/buggy/org/jruby/test/TestRuby.java |
super.tearDown(); | super.tearDown(); | public void tearDown() { super.tearDown(); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/774c5d3d592dfd020e3a8f961b73f629c4c55cf0/TestRuby.java/buggy/org/jruby/test/TestRuby.java |
ArrayList list = new ArrayList(); ruby.initLoad(list); list.clear(); File testFile = new File("fib.rb"); try { ruby.findFile(testFile); fail("should have thrown an exception, the file fib.rb is not in the search path"); } catch (Exception e) { } list.add("./samples"); ruby.initLoad(list); assertEquals(new File(".... | ArrayList list = new ArrayList(); ruby.initLoad(list); list.clear(); File testFile = new File("fib.rb"); try { ruby.findFile(testFile); fail("should have thrown an exception, the file fib.rb is not in the search path"); } catch (Exception e) { } list.add("./samples"); ruby.initLoad(list); assertEquals(new File(".... | public void testFindFile() { ArrayList list = new ArrayList(); ruby.initLoad(list); list.clear(); File testFile = new File("fib.rb"); try { ruby.findFile(testFile); fail("should have thrown an exception, the file fib.rb is not in the search path"); } catch (Exception e) { } list.add("./samples"); //now... | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/774c5d3d592dfd020e3a8f961b73f629c4c55cf0/TestRuby.java/buggy/org/jruby/test/TestRuby.java |
ArrayList list = new ArrayList(); list.add("toto"); ruby.initLoad(list); RubyObject lCol = ruby.getGlobalVar("$:"); RubyObject lI = ruby.getGlobalVar("$-I"); RubyObject lLoad = ruby.getGlobalVar("$LOAD_PATH"); assertTrue(lCol == lI && lI == lLoad && lLoad != null); RubyArray lLoadA = (RubyArray)lLoad; assertTrue(((R... | ArrayList list = new ArrayList(); System.setProperty("jruby.home", ""); list.add("toto"); ruby.initLoad(list); RubyObject lCol = ruby.getGlobalVar("$:"); RubyObject lI = ruby.getGlobalVar("$-I"); RubyObject lLoad = ruby.getGlobalVar("$LOAD_PATH"); assertTrue(lCol == lI && lI == lLoad && lLoad != null); RubyArray lLoa... | public void testInitLoad() { ArrayList list = new ArrayList(); //check without a RubyHome and with one parameter list.add("toto"); ruby.initLoad(list); //check that the global vars are correctly valuated RubyObject lCol = ruby.getGlobalVar("$:"); RubyObject lI = ruby.getGlobalVar("$-I"); RubyObject lLoad = ruby.get... | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/774c5d3d592dfd020e3a8f961b73f629c4c55cf0/TestRuby.java/buggy/org/jruby/test/TestRuby.java |
public void testVarAndMet() { ArrayList list = new ArrayList(); ruby.initLoad(list); eval("load './test/testVariableAndMethod.rb'"); assertEquals("Hello World", eval("puts($a)")); assertEquals("dlroW olleH", eval("puts $b")); assertEquals("Hello World", eval("puts $d.reverse, $c, $e.reverse")); assertEquals("135 20 3"... | public void testVarAndMet() { ArrayList list = new ArrayList(); ruby.initLoad(list); eval("load './test/testVariableAndMethod.rb'"); assertEquals("Hello World", eval("puts($a)")); assertEquals("dlroW olleH", eval("puts $b")); assertEquals("Hello World", eval("puts $d.reverse, $c, $e.reverse")); assertEquals("135 20 3",... | public void testVarAndMet() { ArrayList list = new ArrayList(); ruby.initLoad(list); eval("load './test/testVariableAndMethod.rb'"); assertEquals("Hello World", eval("puts($a)")); assertEquals("dlroW olleH", eval("puts $b")); assertEquals("Hello World", eval("puts $d.reverse, $c, $e.reverse")); assertEquals("135 ... | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/774c5d3d592dfd020e3a8f961b73f629c4c55cf0/TestRuby.java/buggy/org/jruby/test/TestRuby.java |
String errorText = "Set: Unable to set value: " + target; | String errorText = "#set: Unable to set value: " + target; | public void write(FastWriter out, Context context) throws ContextException, IOException { boolean done=false; try { if (result instanceof Macro) target.setValue(context, ((Macro) result).evaluate(context)); else target.setValue(context, result); } catch (ContextException e) { ... | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/3b361f35f3cd9fe5023b969ea9dd1ebdd30219a1/SetDirective.java/clean/webmacro/src/org/webmacro/directive/SetDirective.java |
"Required parameters missing from query:"+ | "Required parameters missing from query: "+ | protected void checkParameters(){ if (defs == null) throw new IllegalStateException( "Query parameter definitions not set."); if (qps == null) throw new IllegalArgumentException( "Null arrays "+ "are not va... | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/5a7691e42b193b6eb28c3405cac3380da0cd70ab/Query.java/buggy/components/server/src/ome/services/query/Query.java |
dumpString(marshaled.getValue()); | dumpString(marshaled.toString()); | private void userMarshal(IRubyObject value) throws IOException { out.write(TYPE_USERDEF); dumpObject(RubySymbol.newSymbol(runtime, value.getMetaClass().getName())); RubyString marshaled = (RubyString) value.callMethod("_dump", runtime.newFixnum(depthLimit)); dumpString(marshaled.getValu... | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/9f2efc63a858fa0507245b207025eab027840a04/MarshalStream.java/clean/src/org/jruby/runtime/marshal/MarshalStream.java |
String jid = ((ChatRoomImpl)chatRoom).getParticipantJID(); Presence presence = SparkManager.getConnection().getRoster().getPresence(jid); | if (chatRoom instanceof ChatRoomImpl) { String jid = ((ChatRoomImpl)chatRoom).getParticipantJID(); Presence presence = SparkManager.getConnection().getRoster().getPresence(jid); | private void checkForStaleRooms() { int delay = 1000; // delay for 1 minute int period = 60000; // repeat every 30 seconds. Timer timer = new Timer(); timer.scheduleAtFixedRate(new TimerTask() { public void run() { for (ChatRoom chatRoom : getStaleChatRooms()... | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/dc58eb5ce4764d1cb940501d26d4b3adb78a5813/ChatContainer.java/clean/src/java/org/jivesoftware/spark/ui/ChatContainer.java |
if (presence == null || presence.getType() == Presence.Type.unavailable) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_UNAVAILABLE_STALE_IMAGE)); } else if (presence != null) { Presence.Mode mode = presence.getMode(); if (mode == Presence.Mode.available) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_AVAILABLE_STALE... | if (presence == null || presence.getType() == Presence.Type.unavailable) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_UNAVAILABLE_STALE_IMAGE)); | private void checkForStaleRooms() { int delay = 1000; // delay for 1 minute int period = 60000; // repeat every 30 seconds. Timer timer = new Timer(); timer.scheduleAtFixedRate(new TimerTask() { public void run() { for (ChatRoom chatRoom : getStaleChatRooms()... | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/dc58eb5ce4764d1cb940501d26d4b3adb78a5813/ChatContainer.java/clean/src/java/org/jivesoftware/spark/ui/ChatContainer.java |
else if (mode == Presence.Mode.away) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_AWAY_STALE_IMAGE)); } else if (mode == Presence.Mode.chat) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_FREE_CHAT_STALE_IMAGE)); } else if (mode == Presence.Mode.dnd) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_DND_STALE_IMAGE))... | else if (presence != null) { Presence.Mode mode = presence.getMode(); if (mode == Presence.Mode.available) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_AVAILABLE_STALE_IMAGE)); } else if (mode == Presence.Mode.away) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_AWAY_STALE_IMAGE)); } else if (mode == Presence.Mode.... | private void checkForStaleRooms() { int delay = 1000; // delay for 1 minute int period = 60000; // repeat every 30 seconds. Timer timer = new Timer(); timer.scheduleAtFixedRate(new TimerTask() { public void run() { for (ChatRoom chatRoom : getStaleChatRooms()... | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/dc58eb5ce4764d1cb940501d26d4b3adb78a5813/ChatContainer.java/clean/src/java/org/jivesoftware/spark/ui/ChatContainer.java |
String jid = ((ChatRoomImpl)chatRoom).getParticipantJID(); Presence presence = SparkManager.getConnection().getRoster().getPresence(jid); | if (chatRoom instanceof ChatRoomImpl) { String jid = ((ChatRoomImpl)chatRoom).getParticipantJID(); Presence presence = SparkManager.getConnection().getRoster().getPresence(jid); | public void run() { for (ChatRoom chatRoom : getStaleChatRooms()) { // Turn tab gray int index = indexOfComponent(chatRoom); if (index == -1) { return; } SparkTab tab = getTab... | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/dc58eb5ce4764d1cb940501d26d4b3adb78a5813/ChatContainer.java/clean/src/java/org/jivesoftware/spark/ui/ChatContainer.java |
if (presence == null || presence.getType() == Presence.Type.unavailable) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_UNAVAILABLE_STALE_IMAGE)); } else if (presence != null) { Presence.Mode mode = presence.getMode(); if (mode == Presence.Mode.available) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_AVAILABLE_STALE... | if (presence == null || presence.getType() == Presence.Type.unavailable) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_UNAVAILABLE_STALE_IMAGE)); | public void run() { for (ChatRoom chatRoom : getStaleChatRooms()) { // Turn tab gray int index = indexOfComponent(chatRoom); if (index == -1) { return; } SparkTab tab = getTab... | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/dc58eb5ce4764d1cb940501d26d4b3adb78a5813/ChatContainer.java/clean/src/java/org/jivesoftware/spark/ui/ChatContainer.java |
else if (mode == Presence.Mode.away) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_AWAY_STALE_IMAGE)); } else if (mode == Presence.Mode.chat) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_FREE_CHAT_STALE_IMAGE)); } else if (mode == Presence.Mode.dnd) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_DND_STALE_IMAGE))... | else if (presence != null) { Presence.Mode mode = presence.getMode(); if (mode == Presence.Mode.available) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_AVAILABLE_STALE_IMAGE)); } else if (mode == Presence.Mode.away) { tab.setIcon(SparkRes.getImageIcon(SparkRes.IM_AWAY_STALE_IMAGE)); } else if (mode == Presence.Mode.... | public void run() { for (ChatRoom chatRoom : getStaleChatRooms()) { // Turn tab gray int index = indexOfComponent(chatRoom); if (index == -1) { return; } SparkTab tab = getTab... | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/dc58eb5ce4764d1cb940501d26d4b3adb78a5813/ChatContainer.java/clean/src/java/org/jivesoftware/spark/ui/ChatContainer.java |
setSelectedIndex(tabLocation); | if (tabLocation != -1) { setSelectedIndex(tabLocation); } | private void checkNotificationPreferences(final ChatRoom room) { LocalPreferences pref = SettingsManager.getLocalPreferences(); if (pref.getWindowTakesFocus()) { chatFrame.setState(Frame.NORMAL); chatFrame.setVisible(true); int tabLocation = indexOfComponent(room); ... | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/dc58eb5ce4764d1cb940501d26d4b3adb78a5813/ChatContainer.java/clean/src/java/org/jivesoftware/spark/ui/ChatContainer.java |
setSelectedIndex(tabLocation); | if (tabLocation != -1) { setSelectedIndex(tabLocation); } | public void actionPerformed(ActionEvent actionEvent) { chatFrame.setState(Frame.NORMAL); chatFrame.setVisible(true); int tabLocation = indexOfComponent(room); setSelectedIndex(tabLocation); } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/dc58eb5ce4764d1cb940501d26d4b3adb78a5813/ChatContainer.java/clean/src/java/org/jivesoftware/spark/ui/ChatContainer.java |
String dotPrefix = (prefix == null) ? "" : prefix + "."; while (e.hasMoreElements()) { String key = (String) e.nextElement(); if (prefix == null) p.setProperty(key, _servletContext.getInitParameter(key)); else if (key.startsWith(dotPrefix)) p.setProperty(key, _servletContext.getInitParameter(key) | if (e != null) { String dotPrefix = (prefix == null) ? "" : prefix + "."; while (e.hasMoreElements()) { String key = (String) e.nextElement(); if (prefix == null) p.setProperty(key, _servletContext.getInitParameter(key)); else if (key.startsWith(dotPrefix)) p.setProperty(key, _servletContext.getInitParameter(key) | protected void loadServletSettings(String prefix) throws InitException { Properties p = new Properties(); Enumeration e = _servletContext.getInitParameterNames(); String dotPrefix = (prefix == null) ? "" : prefix + "."; while (e.hasMoreElements()) { String key = (String) e.nextEleme... | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/72937f7eb4308e675d718b6b57fe64548fbe003f/Servlet22Broker.java/clean/webmacro/src/org/webmacro/servlet/Servlet22Broker.java |
protected void loadServletSettings(String prefix) throws InitException { Properties p = new Properties(); Enumeration e = _servletContext.getInitParameterNames(); String dotPrefix = (prefix == null) ? "" : prefix + "."; while (e.hasMoreElements()) { String key = (String) e.nextEleme... | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/72937f7eb4308e675d718b6b57fe64548fbe003f/Servlet22Broker.java/clean/webmacro/src/org/webmacro/servlet/Servlet22Broker.java | ||
BufferedImage getZoomedLensImage() { return lens.getZoomedImage(); } | BufferedImage getZoomedLensImage() { if (lens == null) return null; return lens.getZoomedImage(); } | BufferedImage getZoomedLensImage() { return lens.getZoomedImage(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/54a6dc1cc81e06c2190546075a6c5a04f18d9bb5/ImViewerUI.java/buggy/SRC/org/openmicroscopy/shoola/agents/imviewer/view/ImViewerUI.java |
void setChannelsSelection() { controlPane.setChannelsSelection(); } | void setChannelsSelection() { controlPane.setChannelsSelection(); } | void setChannelsSelection() { controlPane.setChannelsSelection(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/54a6dc1cc81e06c2190546075a6c5a04f18d9bb5/ImViewerUI.java/buggy/SRC/org/openmicroscopy/shoola/agents/imviewer/view/ImViewerUI.java |
void setImageZoomFactor(float factor) { lens.setImageZoomFactor(factor); } | void setImageZoomFactor(float factor) { if (lens == null) return; lens.setImageZoomFactor(factor); } | void setImageZoomFactor(float factor) { lens.setImageZoomFactor(factor); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/54a6dc1cc81e06c2190546075a6c5a04f18d9bb5/ImViewerUI.java/buggy/SRC/org/openmicroscopy/shoola/agents/imviewer/view/ImViewerUI.java |
if (lens == null) return; | void setLensPlaneImage(BufferedImage img) { lens.setPlaneImage(img); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/54a6dc1cc81e06c2190546075a6c5a04f18d9bb5/ImViewerUI.java/buggy/SRC/org/openmicroscopy/shoola/agents/imviewer/view/ImViewerUI.java | |
if (lens==null) lens = new LensComponent(this); if (b) { | if (lens == null) lens = new LensComponent(this); if (b) { | void setLensVisible(boolean b) { if (lens==null) lens = new LensComponent(this); if (b) { if (model.getMaxX() < lens.getLensUI().getWidth() || model.getMaxY() < lens.getLensUI().getHeight()) return; if (firstTimeLensShown) ... | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/54a6dc1cc81e06c2190546075a6c5a04f18d9bb5/ImViewerUI.java/buggy/SRC/org/openmicroscopy/shoola/agents/imviewer/view/ImViewerUI.java |
if (firstTimeLensShown) { | if (firstTimeLensShown) { | void setLensVisible(boolean b) { if (lens==null) lens = new LensComponent(this); if (b) { if (model.getMaxX() < lens.getLensUI().getWidth() || model.getMaxY() < lens.getLensUI().getHeight()) return; if (firstTimeLensShown) ... | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/54a6dc1cc81e06c2190546075a6c5a04f18d9bb5/ImViewerUI.java/buggy/SRC/org/openmicroscopy/shoola/agents/imviewer/view/ImViewerUI.java |
lens.setPlaneImage(model.getRenderedImage()); | lens.setPlaneImage(model.getDisplayedImage()); | void setLensVisible(boolean b) { if (lens==null) lens = new LensComponent(this); if (b) { if (model.getMaxX() < lens.getLensUI().getWidth() || model.getMaxY() < lens.getLensUI().getHeight()) return; if (firstTimeLensShown) ... | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/54a6dc1cc81e06c2190546075a6c5a04f18d9bb5/ImViewerUI.java/buggy/SRC/org/openmicroscopy/shoola/agents/imviewer/view/ImViewerUI.java |
this.repaint(); | repaint(); | void setLensVisible(boolean b) { if (lens==null) lens = new LensComponent(this); if (b) { if (model.getMaxX() < lens.getLensUI().getWidth() || model.getMaxY() < lens.getLensUI().getHeight()) return; if (firstTimeLensShown) ... | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/54a6dc1cc81e06c2190546075a6c5a04f18d9bb5/ImViewerUI.java/buggy/SRC/org/openmicroscopy/shoola/agents/imviewer/view/ImViewerUI.java |
if (menuID !=ImViewer.COLOR_PICKER_MENU) return; | if (menuID != ImViewer.COLOR_PICKER_MENU) return; | void showMenu(int menuID, Component source, Point location) { if (menuID !=ImViewer.COLOR_PICKER_MENU) return; ChannelMetadata[] data = model.getChannelData(); ChannelMetadata d; JPopupMenu menu = new JPopupMenu(); ChannelColorMenuItem item; for (int j = 0; j < data.length; j++) { d = data[j]; ... | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/54a6dc1cc81e06c2190546075a6c5a04f18d9bb5/ImViewerUI.java/buggy/SRC/org/openmicroscopy/shoola/agents/imviewer/view/ImViewerUI.java |
void showMenu(int menuID, Component source, Point location) { if (menuID !=ImViewer.COLOR_PICKER_MENU) return; ChannelMetadata[] data = model.getChannelData(); ChannelMetadata d; JPopupMenu menu = new JPopupMenu(); ChannelColorMenuItem item; for (int j = 0; j < data.length; j++) { d = data[j]; ... | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/54a6dc1cc81e06c2190546075a6c5a04f18d9bb5/ImViewerUI.java/buggy/SRC/org/openmicroscopy/shoola/agents/imviewer/view/ImViewerUI.java | ||
_log.debug("Looking for template: " + tFile); | final public Template getTemplate(String fileName) { for (int i=0; i < _templateDirectory.length; i++) { Template t; String dir = _templateDirectory[i]; File tFile = new File(dir,fileName); if (tFile.canRead()) { try { t = new FileTemplate(_broker,tFile)... | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/00af97f85c3f1eff849b9f47def81ab18c9841b1/TemplateProvider.java/buggy/webmacro/src/org/webmacro/resource/TemplateProvider.java | |
_log.info("Loading template: " + name); | final public TimedReference load(String name) throws NotFoundException { Template t = getTemplate(name); if (t == null) { throw new NotFoundException( this + " could not locate " + name + " on path " + _templatePath); } return new TimedReference(t, _cacheDuration); } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/00af97f85c3f1eff849b9f47def81ab18c9841b1/TemplateProvider.java/buggy/webmacro/src/org/webmacro/resource/TemplateProvider.java | |
private void addInstrumentation(File baseDir, String filename) { logger.debug("filename: " + filename); File file; if (baseDir == null) file = new File(filename); else file = new File(baseDir, filename); addInstrumentation(file); } | private void addInstrumentation(File file) { if (isClass(file)) { addInstrumentationToSingleClass(file); } else if (file.isDirectory()) { File[] contents = file.listFiles(); for (int i = 0; i < contents.length; i++) addInstrumentation(contents[i]); } else if (isArchive(file)) { addInstrumentationToArchive(file); } } | private void addInstrumentation(File baseDir, String filename) { logger.debug("filename: " + filename); File file; if (baseDir == null) file = new File(filename); else file = new File(baseDir, filename); addInstrumentation(file); } | 50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/12464e2c222b85c4fe40070c50e015403ce5acfe/Main.java/buggy/cobertura/src/net/sourceforge/cobertura/instrument/Main.java |
private void addInstrumentationToArchive(File archive) { logger.debug("Instrumenting archive " + archive.getAbsolutePath()); | private void addInstrumentationToArchive(ZipInputStream archive, ZipOutputStream output) throws Exception { ZipEntry entry; while ((entry = archive.getNextEntry()) != null) { try { ZipEntry outputEntry = new ZipEntry(entry.getName()); output.putNextEntry(outputEntry); | private void addInstrumentationToArchive(File archive) { logger.debug("Instrumenting archive " + archive.getAbsolutePath()); File outputFile = null; ZipInputStream input = null; ZipOutputStream output = null; try { // Open archive try { input = new ZipInputStream(new FileInputStream(archive)); } cat... | 50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/12464e2c222b85c4fe40070c50e015403ce5acfe/Main.java/buggy/cobertura/src/net/sourceforge/cobertura/instrument/Main.java |
File outputFile = null; ZipInputStream input = null; ZipOutputStream output = null; try { try { input = new ZipInputStream(new FileInputStream(archive)); } catch (FileNotFoundException e) { logger.warn("Cannot open archive file: " + archive.getAbsolutePath(), e); return; } | byte[] entryBytes = IOUtil .createByteArrayFromInputStream(archive); | private void addInstrumentationToArchive(File archive) { logger.debug("Instrumenting archive " + archive.getAbsolutePath()); File outputFile = null; ZipInputStream input = null; ZipOutputStream output = null; try { // Open archive try { input = new ZipInputStream(new FileInputStream(archive)); } cat... | 50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/12464e2c222b85c4fe40070c50e015403ce5acfe/Main.java/buggy/cobertura/src/net/sourceforge/cobertura/instrument/Main.java |
try { if (destinationDirectory != null) { outputFile = new File(destinationDirectory, archive .getName()); } else { outputFile = File.createTempFile( "CoberturaInstrumentedArchive", "jar"); outputFile.deleteOnExit(); } output = new ZipOutputStream(new FileOutputStream(outputFile)); } catch (IOException e) { logger.... | if (isClass(entry)) { ClassReader cr = new ClassReader(entryBytes); ClassWriter cw = new ClassWriter(true); ClassInstrumenter cv = new ClassInstrumenter(projectData, cw, ignoreRegexes); cr.accept(cv, false); | private void addInstrumentationToArchive(File archive) { logger.debug("Instrumenting archive " + archive.getAbsolutePath()); File outputFile = null; ZipInputStream input = null; ZipOutputStream output = null; try { // Open archive try { input = new ZipInputStream(new FileInputStream(archive)); } cat... | 50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/12464e2c222b85c4fe40070c50e015403ce5acfe/Main.java/buggy/cobertura/src/net/sourceforge/cobertura/instrument/Main.java |
try { addInstrumentationToArchive(input, output); } catch (Exception e) { logger.warn("Cannot instrument archive: " + archive.getAbsolutePath(), e); return; } } finally { if (input != null) { try { input.close(); } catch (IOException e) { } } if (output != null) { try { output.close(); } catch (IOException e) { } } } | if (cv.isInstrumented()) { logger.debug("Putting instrumeted entry: " + entry.getName()); entryBytes = cw.toByteArray(); } } | private void addInstrumentationToArchive(File archive) { logger.debug("Instrumenting archive " + archive.getAbsolutePath()); File outputFile = null; ZipInputStream input = null; ZipOutputStream output = null; try { // Open archive try { input = new ZipInputStream(new FileInputStream(archive)); } cat... | 50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/12464e2c222b85c4fe40070c50e015403ce5acfe/Main.java/buggy/cobertura/src/net/sourceforge/cobertura/instrument/Main.java |
if (destinationDirectory == null) { try { IOUtil.moveFile(outputFile, archive); } catch (IOException e) { logger.warn("Cannot instrument archive: " + archive.getAbsolutePath(), e); return; } } } | output.write(entryBytes); output.closeEntry(); archive.closeEntry(); } catch (Exception e) { logger.warn("Problems with archive entry: " + entry); throw e; } output.flush(); } } | private void addInstrumentationToArchive(File archive) { logger.debug("Instrumenting archive " + archive.getAbsolutePath()); File outputFile = null; ZipInputStream input = null; ZipOutputStream output = null; try { // Open archive try { input = new ZipInputStream(new FileInputStream(archive)); } cat... | 50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/12464e2c222b85c4fe40070c50e015403ce5acfe/Main.java/buggy/cobertura/src/net/sourceforge/cobertura/instrument/Main.java |
{ logger.debug("Instrumenting class " + file.getAbsolutePath()); | { logger.debug("Instrumenting class " + file.getAbsolutePath()); | private void addInstrumentationToSingleClass(File file) { logger.debug("Instrumenting class " + file.getAbsolutePath()); InputStream inputStream = null; ClassWriter cw; ClassInstrumenter cv; try { inputStream = new FileInputStream(file); ClassReader cr = new ClassReader(inputStream); cw = new ClassWriter(t... | 50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/12464e2c222b85c4fe40070c50e015403ce5acfe/Main.java/buggy/cobertura/src/net/sourceforge/cobertura/instrument/Main.java |
InputStream inputStream = null; ClassWriter cw; ClassInstrumenter cv; try { inputStream = new FileInputStream(file); ClassReader cr = new ClassReader(inputStream); cw = new ClassWriter(true); cv = new ClassInstrumenter(this.projectData, cw, this.ignoreRegexs); cr.accept(cv, false); } catch (Throwable t) { logger.warn("... | InputStream inputStream = null; ClassWriter cw; ClassInstrumenter cv; try { inputStream = new FileInputStream(file); ClassReader cr = new ClassReader(inputStream); cw = new ClassWriter(true); cv = new ClassInstrumenter(projectData, cw, ignoreRegexes); cr.accept(cv, false); } catch (Throwable t) { logger.warn("Unable to... | private void addInstrumentationToSingleClass(File file) { logger.debug("Instrumenting class " + file.getAbsolutePath()); InputStream inputStream = null; ClassWriter cw; ClassInstrumenter cv; try { inputStream = new FileInputStream(file); ClassReader cr = new ClassReader(inputStream); cw = new ClassWriter(t... | 50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/12464e2c222b85c4fe40070c50e015403ce5acfe/Main.java/buggy/cobertura/src/net/sourceforge/cobertura/instrument/Main.java |
OutputStream outputStream = null; try { if (cv.isInstrumented()) { File outputFile; if (destinationDirectory == null) outputFile = file; else outputFile = new File(destinationDirectory, cv .getClassName().replace('.', File.separatorChar) + ".class"); | OutputStream outputStream = null; try { if (cv.isInstrumented()) { File outputFile; if (destinationDirectory == null) outputFile = file; else outputFile = new File(destinationDirectory, cv .getClassName().replace('.', File.separatorChar) + ".class"); | private void addInstrumentationToSingleClass(File file) { logger.debug("Instrumenting class " + file.getAbsolutePath()); InputStream inputStream = null; ClassWriter cw; ClassInstrumenter cv; try { inputStream = new FileInputStream(file); ClassReader cr = new ClassReader(inputStream); cw = new ClassWriter(t... | 50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/12464e2c222b85c4fe40070c50e015403ce5acfe/Main.java/buggy/cobertura/src/net/sourceforge/cobertura/instrument/Main.java |
File parentFile = outputFile.getParentFile(); if (parentFile != null) { parentFile.mkdirs(); } | File parentFile = outputFile.getParentFile(); if (parentFile != null) { parentFile.mkdirs(); } | private void addInstrumentationToSingleClass(File file) { logger.debug("Instrumenting class " + file.getAbsolutePath()); InputStream inputStream = null; ClassWriter cw; ClassInstrumenter cv; try { inputStream = new FileInputStream(file); ClassReader cr = new ClassReader(inputStream); cw = new ClassWriter(t... | 50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/12464e2c222b85c4fe40070c50e015403ce5acfe/Main.java/buggy/cobertura/src/net/sourceforge/cobertura/instrument/Main.java |
byte[] instrumentedClass = cw.toByteArray(); outputStream = new FileOutputStream(outputFile); outputStream.write(instrumentedClass); } } catch (IOException e) { logger.warn("Unable to instrument file " + file.getAbsolutePath(), e); return; } finally { if (outputStream != null) { try { outputStream.close(); } catch (IOE... | byte[] instrumentedClass = cw.toByteArray(); outputStream = new FileOutputStream(outputFile); outputStream.write(instrumentedClass); } } catch (IOException e) { logger.warn("Unable to instrument file " + file.getAbsolutePath(), e); return; } finally { if (outputStream != null) { try { outputStream.close(); } catch (IOE... | private void addInstrumentationToSingleClass(File file) { logger.debug("Instrumenting class " + file.getAbsolutePath()); InputStream inputStream = null; ClassWriter cw; ClassInstrumenter cv; try { inputStream = new FileInputStream(file); ClassReader cr = new ClassReader(inputStream); cw = new ClassWriter(t... | 50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/12464e2c222b85c4fe40070c50e015403ce5acfe/Main.java/buggy/cobertura/src/net/sourceforge/cobertura/instrument/Main.java |
{ String name = file.getName(); return name.endsWith(".jar") || name.endsWith(".zip") || name.endsWith(".war") || name.endsWith(".ear") || name.endsWith(".sar"); } | { String name = file.getName(); return name.endsWith(".jar") || name.endsWith(".zip") || name.endsWith(".war") || name.endsWith(".ear") || name.endsWith(".sar"); } | private static boolean isArchive(File file) { String name = file.getName(); return name.endsWith(".jar") || name.endsWith(".zip") || name.endsWith(".war") || name.endsWith(".ear") || name.endsWith(".sar"); } | 50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/12464e2c222b85c4fe40070c50e015403ce5acfe/Main.java/buggy/cobertura/src/net/sourceforge/cobertura/instrument/Main.java |
{ return file.getName().endsWith(".class"); } | { return file.getName().endsWith(".class"); } | private static boolean isClass(File file) { return file.getName().endsWith(".class"); } | 50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/12464e2c222b85c4fe40070c50e015403ce5acfe/Main.java/buggy/cobertura/src/net/sourceforge/cobertura/instrument/Main.java |
{ long startTime = System.currentTimeMillis(); | { long startTime = System.currentTimeMillis(); | public static void main(String[] args) { long startTime = System.currentTimeMillis(); boolean hasCommandsFile = false; String commandsFileName = null; for (int i = 0; i < args.length; i++) { if (args[i].equals("--commandsfile")) { hasCommandsFile = true; commandsFileName = args[++i]; } } if (hasComm... | 50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/12464e2c222b85c4fe40070c50e015403ce5acfe/Main.java/buggy/cobertura/src/net/sourceforge/cobertura/instrument/Main.java |
boolean hasCommandsFile = false; String commandsFileName = null; for (int i = 0; i < args.length; i++) { if (args[i].equals("--commandsfile")) { hasCommandsFile = true; commandsFileName = args[++i]; } } | Main main = new Main(); | public static void main(String[] args) { long startTime = System.currentTimeMillis(); boolean hasCommandsFile = false; String commandsFileName = null; for (int i = 0; i < args.length; i++) { if (args[i].equals("--commandsfile")) { hasCommandsFile = true; commandsFileName = args[++i]; } } if (hasComm... | 50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/12464e2c222b85c4fe40070c50e015403ce5acfe/Main.java/buggy/cobertura/src/net/sourceforge/cobertura/instrument/Main.java |
if (hasCommandsFile) { List arglist = new ArrayList(); BufferedReader bufferedReader = null; | boolean hasCommandsFile = false; String commandsFileName = null; for (int i = 0; i < args.length; i++) { if (args[i].equals("--commandsfile")) { hasCommandsFile = true; commandsFileName = args[++i]; } } | public static void main(String[] args) { long startTime = System.currentTimeMillis(); boolean hasCommandsFile = false; String commandsFileName = null; for (int i = 0; i < args.length; i++) { if (args[i].equals("--commandsfile")) { hasCommandsFile = true; commandsFileName = args[++i]; } } if (hasComm... | 50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/12464e2c222b85c4fe40070c50e015403ce5acfe/Main.java/buggy/cobertura/src/net/sourceforge/cobertura/instrument/Main.java |
try { bufferedReader = new BufferedReader(new FileReader( commandsFileName)); String line; | if (hasCommandsFile) { List arglist = new ArrayList(); BufferedReader bufferedReader = null; | public static void main(String[] args) { long startTime = System.currentTimeMillis(); boolean hasCommandsFile = false; String commandsFileName = null; for (int i = 0; i < args.length; i++) { if (args[i].equals("--commandsfile")) { hasCommandsFile = true; commandsFileName = args[++i]; } } if (hasComm... | 50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/12464e2c222b85c4fe40070c50e015403ce5acfe/Main.java/buggy/cobertura/src/net/sourceforge/cobertura/instrument/Main.java |
while ((line = bufferedReader.readLine()) != null) arglist.add(line); | try { bufferedReader = new BufferedReader(new FileReader( commandsFileName)); String line; | public static void main(String[] args) { long startTime = System.currentTimeMillis(); boolean hasCommandsFile = false; String commandsFileName = null; for (int i = 0; i < args.length; i++) { if (args[i].equals("--commandsfile")) { hasCommandsFile = true; commandsFileName = args[++i]; } } if (hasComm... | 50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/12464e2c222b85c4fe40070c50e015403ce5acfe/Main.java/buggy/cobertura/src/net/sourceforge/cobertura/instrument/Main.java |
} catch (IOException e) { logger.fatal("Unable to read temporary commands file " + commandsFileName + "."); logger.info(e); } finally { if (bufferedReader != null) { try { bufferedReader.close(); } catch (IOException e) { } } } | while ((line = bufferedReader.readLine()) != null) arglist.add(line); | public static void main(String[] args) { long startTime = System.currentTimeMillis(); boolean hasCommandsFile = false; String commandsFileName = null; for (int i = 0; i < args.length; i++) { if (args[i].equals("--commandsfile")) { hasCommandsFile = true; commandsFileName = args[++i]; } } if (hasComm... | 50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/12464e2c222b85c4fe40070c50e015403ce5acfe/Main.java/buggy/cobertura/src/net/sourceforge/cobertura/instrument/Main.java |
args = (String[])arglist.toArray(new String[arglist.size()]); } | } catch (IOException e) { logger.fatal("Unable to read temporary commands file " + commandsFileName + "."); logger.info(e); } finally { if (bufferedReader != null) { try { bufferedReader.close(); } catch (IOException e) { } } } | public static void main(String[] args) { long startTime = System.currentTimeMillis(); boolean hasCommandsFile = false; String commandsFileName = null; for (int i = 0; i < args.length; i++) { if (args[i].equals("--commandsfile")) { hasCommandsFile = true; commandsFileName = args[++i]; } } if (hasComm... | 50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/12464e2c222b85c4fe40070c50e015403ce5acfe/Main.java/buggy/cobertura/src/net/sourceforge/cobertura/instrument/Main.java |
new Main(args); | args = (String[])arglist.toArray(new String[arglist.size()]); } | public static void main(String[] args) { long startTime = System.currentTimeMillis(); boolean hasCommandsFile = false; String commandsFileName = null; for (int i = 0; i < args.length; i++) { if (args[i].equals("--commandsfile")) { hasCommandsFile = true; commandsFileName = args[++i]; } } if (hasComm... | 50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/12464e2c222b85c4fe40070c50e015403ce5acfe/Main.java/buggy/cobertura/src/net/sourceforge/cobertura/instrument/Main.java |
long stopTime = System.currentTimeMillis(); System.out.println("Instrument time: " + (stopTime - startTime) + "ms"); } | main.parseArguments(args); long stopTime = System.currentTimeMillis(); System.out.println("Instrument time: " + (stopTime - startTime) + "ms"); } | public static void main(String[] args) { long startTime = System.currentTimeMillis(); boolean hasCommandsFile = false; String commandsFileName = null; for (int i = 0; i < args.length; i++) { if (args[i].equals("--commandsfile")) { hasCommandsFile = true; commandsFileName = args[++i]; } } if (hasComm... | 50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/12464e2c222b85c4fe40070c50e015403ce5acfe/Main.java/buggy/cobertura/src/net/sourceforge/cobertura/instrument/Main.java |
for (int i = 0; i < args.length; i++) { if (args[i] != null) { System.out.println(((RubyString)args[i].funcall(ruby.intern("to_s"))).getString()); } } return ruby.getNil(); | return recv.m_to_s(); | public RubyObject execute(RubyObject recv, RubyObject args[], Ruby ruby) { for (int i = 0; i < args.length; i++) { if (args[i] != null) { System.out.println(((RubyString)args[i].funcall(ruby.intern("to_s"))).getString()); ... | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/09d14a481cf7e28332c61c038c7d4b468854d38d/RBKernel.java/clean/org/jruby/core/RBKernel.java |
view.updateMenuItems(); | public void propertyChange(PropertyChangeEvent pce) { String name = pce.getPropertyName(); if (name == null) return; if (name.equals(TreeViewer.CANCEL_LOADING_PROPERTY)) { Browser browser = model.getSelectedBrowser(); if (browser != null) browser.cancel(); } else... | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/146920a8791fff71320ced0f240b9d8f3d319a13/TreeViewerControl.java/clean/SRC/org/openmicroscopy/shoola/agents/treeviewer/view/TreeViewerControl.java | |
rootAdmin.addGroups(user, user_other_group); | rootAdmin.addGroups(user, user_other_group, common_group); | public void createUsersAndGroups() throws Exception { init(); cname = UUID.randomUUID().toString(); gname = UUID.randomUUID().toString(); // shortcut for root service factory, created in super class r = rootServices; // create the common group common_group.setName(cname); common_group = new ExperimenterGro... | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/c94acf1ed28125ea3ec367725deb6b3896e87bd4/AbstractPermissionsTest.java/buggy/components/client/test/ome/client/itests/sec/AbstractPermissionsTest.java |
rootAdmin.addGroups(other, user_other_group); | rootAdmin.addGroups(other, user_other_group, common_group); | public void createUsersAndGroups() throws Exception { init(); cname = UUID.randomUUID().toString(); gname = UUID.randomUUID().toString(); // shortcut for root service factory, created in super class r = rootServices; // create the common group common_group.setName(cname); common_group = new ExperimenterGro... | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/c94acf1ed28125ea3ec367725deb6b3896e87bd4/AbstractPermissionsTest.java/buggy/components/client/test/ome/client/itests/sec/AbstractPermissionsTest.java |
list.add(name); | list.add(name.image); | final public Object[] FormalArgList() throws ParseException { ArrayList list=new ArrayList(); Token name; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LPAREN: jj_consume_token(LPAREN); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case DOLLAR: case WS: switch ((jj_ntk==-1)?jj_ntk():jj_ntk... | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/67f3bf2b9347218e8efc5ecece60bb5f03730152/WMParser_impl.java/buggy/webmacro/src/org/webmacro/parser/WMParser_impl.java |
BPalette zoomPalette = PaletteFactory.getZoomPalette(model,topModel); topModel.addPalette(UIConstants.ZOOM_PALETTE_NAME,zoomPalette); | public void loadDataset(int datasetID) { BrowserManager manager = env.getBrowserManager(); int index; if((index = manager.hasBrowser(datasetID)) != BrowserManager.NOT_FOUND) { manager.setActiveBrowser(index); return; } DataManagementServi... | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/913e45a73e803bf6a97dca24496a64546a51c9d5/BrowserAgent.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/BrowserAgent.java | |
zoomPalette.setOffset(0,0); optionPalette.setOffset(0,75); | optionPalette.setOffset(0,0); | public void loadDataset(int datasetID) { BrowserManager manager = env.getBrowserManager(); int index; if((index = manager.hasBrowser(datasetID)) != BrowserManager.NOT_FOUND) { manager.setActiveBrowser(index); return; } DataManagementServi... | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/913e45a73e803bf6a97dca24496a64546a51c9d5/BrowserAgent.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/BrowserAgent.java |
{ addLoaderThread(controller,this); final List thumbnails = new ArrayList(); int count = 1; int total = refList.size(); PlateLayoutMethod lm = new PlateLayoutMethod(refInfo.getNumRows(), refInfo.getNumCols()); model.setLayoutMethod(lm); CompletePlate plate = new CompletePlate(); for(Iterator iter = refPlateList.itera... | public void run() { addLoaderThread(controller,this); final List thumbnails = new ArrayList(); int count = 1; int total = refList.size(); PlateLayoutMethod lm = new PlateLayoutMethod(refInfo.getNumRows(), ... | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/913e45a73e803bf6a97dca24496a64546a51c9d5/BrowserAgent.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/BrowserAgent.java | |
}; SwingUtilities.invokeLater(addTask); count++; } catch(ImageServerException ise) { UserNotifier un = registry.getUserNotifier(); un.notifyError("ImageServer Error",ise.getMessage(),ise); status.processFailed("Error loading images."); return; } } else { Image[] images = new Image[sampleList.size()]; ThumbnailDataModel... | public void run() { addLoaderThread(controller,this); final List thumbnails = new ArrayList(); int count = 1; int total = refList.size(); PlateLayoutMethod lm = new PlateLayoutMethod(refInfo.getNumRows(), ... | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/913e45a73e803bf6a97dca24496a64546a51c9d5/BrowserAgent.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/BrowserAgent.java | |
Thumbnail[] ts = new Thumbnail[thumbnails.size()]; thumbnails.toArray(ts); model.addThumbnails(ts); | public void run() { model.addThumbnail(t); String message = ProgressMessageFormatter.format("Loaded image %n of %t...", theCount,theTotal); status.processAdvanced(message); } }; SwingUtilities.invokeLater(addTask); count++; } catch(ImageServerException ise) { UserNotifier un = registry.getUserNotifier(); un.notifyError... | public void run() { Thumbnail[] ts = new Thumbnail[thumbnails.size()]; thumbnails.toArray(ts); model.addThumbnails(ts); status.processSucceeded("All images loaded.")... | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/913e45a73e803bf6a97dca24496a64546a51c9d5/BrowserAgent.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/BrowserAgent.java |
}; SwingUtilities.invokeLater(finalTask); return; } removeLoaderThread(controller,this); } | public void run() { Thumbnail[] ts = new Thumbnail[thumbnails.size()]; thumbnails.toArray(ts); model.addThumbnails(ts); status.processSucceeded("All images loaded.")... | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/913e45a73e803bf6a97dca24496a64546a51c9d5/BrowserAgent.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/BrowserAgent.java | |
{ thumbnails.add(t); String message = ProgressMessageFormatter.format("Loaded image %n of %t...", theCount,theTotal); status.processAdvanced(message); } | { String message = ProgressMessageFormatter.format("Loaded image %n of %t...", theCount,theTotal); status.processAdvanced(message); thumbnails.add(t); } | public void run() { thumbnails.add(t); String message = ProgressMessageFormatter.format("Loaded image %n of %t...", ... | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/913e45a73e803bf6a97dca24496a64546a51c9d5/BrowserAgent.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/BrowserAgent.java |
{ String message = ProgressMessageFormatter.format("Loaded image %n of %t...", theCount,theTotal); status.processAdvanced(message); thumbnails.add(t); } | { Thumbnail[] ts = new Thumbnail[thumbnails.size()]; thumbnails.toArray(ts); model.addThumbnails(ts); status.processSucceeded("All images loaded."); } | public void run() { String message = ProgressMessageFormatter.format("Loaded image %n of %t...", theCount,theTot... | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/913e45a73e803bf6a97dca24496a64546a51c9d5/BrowserAgent.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/BrowserAgent.java |
{ addLoaderThread(controller,this); int count = 1; int total = refList.size(); for(Iterator iter = refList.iterator(); (iter.hasNext() && !kill);) { ImageSummary summary = (ImageSummary)iter.next(); try { Pixels pix = summary.getDefaultPixels().getPixels(); Image image = ps.getThumbnail(pix); ThumbnailDataModel tdm =... | public void run() { addLoaderThread(controller,this); int count = 1; int total = refList.size(); for(Iterator iter = refList.iterator(); (iter.hasNext() && !kill);) { ImageSummary summary... | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/913e45a73e803bf6a97dca24496a64546a51c9d5/BrowserAgent.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/BrowserAgent.java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.