rem
stringlengths 0
477k
| add
stringlengths 0
313k
| context
stringlengths 6
599k
| meta
stringlengths 141
403
|
---|---|---|---|
"Item X24", null); | null, null, "Item X24", null, null); | public void addMenuContribution() { if (!PlatformUI.isWorkbenchRunning()) { return; } IMenuService menuService = (IMenuService) PlatformUI.getWorkbench() .getService(IMenuService.class); viewMenuAddition = new AbstractContributionFactory("menu:org.eclipse.ui.tests.api.MenuTestHarness?after=additions") { public void createContributionItems(IMenuService menuService, List additions) { CommandContributionItem item = new CommandContributionItem( "org.eclipse.ui.tests.menus.itemX20", "org.eclipse.ui.tests.menus.enabledWorld", null, null, "Item X20", null); additions.add(item); MenuManager submenu = new MenuManager("Menu X21", "org.eclipse.ui.tests.menus.menuX21"); item = new CommandContributionItem( "org.eclipse.ui.tests.menus.itemX22", "org.eclipse.ui.tests.menus.updateWorld", null, null, "Item X22", null); submenu.add(item); item = new CommandContributionItem( "org.eclipse.ui.tests.menus.itemX23", "org.eclipse.ui.tests.menus.enabledWorld", null, null, "Item X23", null); submenu.add(item); additions.add(submenu); item = new CommandContributionItem( "org.eclipse.ui.tests.menus.itemX24", "org.eclipse.ui.tests.menus.enabledWorld", null, null, "Item X24", null); additions.add(item); } public void releaseContributionItems(IMenuService menuService, List items) { // for us this is a no-op } }; menuService.addContributionFactory(viewMenuAddition); viewToolbarAddition = new AbstractContributionFactory("toolbar:org.eclipse.ui.tests.api.MenuTestHarness") { public void createContributionItems(IMenuService menuService, List additions) { CommandContributionItem item = new CommandContributionItem( "org.eclipse.ui.tests.menus.itemX25", "org.eclipse.ui.tests.menus.updateWorld", null, null, "Item X25", null); additions.add(item); WidgetContributionItem widget = new WidgetContributionItem( "org.eclipse.ui.tests.menus.itemX26") { public IWorkbenchWidget createWidget() { return new TextWidget(); } }; additions.add(widget); } public void releaseContributionItems(IMenuService menuService, List items) { // for us this is a no-op } }; menuService.addContributionFactory(viewToolbarAddition); } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/bfd6eb25a2e56f373b64dbce6d194d946bbcc597/TestPlugin.java/buggy/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/TestPlugin.java |
public void releaseContributionItems(IMenuService menuService, List items) { | public void releaseContributionItems(IMenuService menuService, List items) { | public void addMenuContribution() { if (!PlatformUI.isWorkbenchRunning()) { return; } IMenuService menuService = (IMenuService) PlatformUI.getWorkbench() .getService(IMenuService.class); viewMenuAddition = new AbstractContributionFactory("menu:org.eclipse.ui.tests.api.MenuTestHarness?after=additions") { public void createContributionItems(IMenuService menuService, List additions) { CommandContributionItem item = new CommandContributionItem( "org.eclipse.ui.tests.menus.itemX20", "org.eclipse.ui.tests.menus.enabledWorld", null, null, "Item X20", null); additions.add(item); MenuManager submenu = new MenuManager("Menu X21", "org.eclipse.ui.tests.menus.menuX21"); item = new CommandContributionItem( "org.eclipse.ui.tests.menus.itemX22", "org.eclipse.ui.tests.menus.updateWorld", null, null, "Item X22", null); submenu.add(item); item = new CommandContributionItem( "org.eclipse.ui.tests.menus.itemX23", "org.eclipse.ui.tests.menus.enabledWorld", null, null, "Item X23", null); submenu.add(item); additions.add(submenu); item = new CommandContributionItem( "org.eclipse.ui.tests.menus.itemX24", "org.eclipse.ui.tests.menus.enabledWorld", null, null, "Item X24", null); additions.add(item); } public void releaseContributionItems(IMenuService menuService, List items) { // for us this is a no-op } }; menuService.addContributionFactory(viewMenuAddition); viewToolbarAddition = new AbstractContributionFactory("toolbar:org.eclipse.ui.tests.api.MenuTestHarness") { public void createContributionItems(IMenuService menuService, List additions) { CommandContributionItem item = new CommandContributionItem( "org.eclipse.ui.tests.menus.itemX25", "org.eclipse.ui.tests.menus.updateWorld", null, null, "Item X25", null); additions.add(item); WidgetContributionItem widget = new WidgetContributionItem( "org.eclipse.ui.tests.menus.itemX26") { public IWorkbenchWidget createWidget() { return new TextWidget(); } }; additions.add(widget); } public void releaseContributionItems(IMenuService menuService, List items) { // for us this is a no-op } }; menuService.addContributionFactory(viewToolbarAddition); } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/bfd6eb25a2e56f373b64dbce6d194d946bbcc597/TestPlugin.java/buggy/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/TestPlugin.java |
viewToolbarAddition = new AbstractContributionFactory("toolbar:org.eclipse.ui.tests.api.MenuTestHarness") { public void createContributionItems(IMenuService menuService, List additions) { | viewToolbarAddition = new AbstractContributionFactory( "toolbar:org.eclipse.ui.tests.api.MenuTestHarness") { public void createContributionItems(IMenuService menuService, List additions) { | public void addMenuContribution() { if (!PlatformUI.isWorkbenchRunning()) { return; } IMenuService menuService = (IMenuService) PlatformUI.getWorkbench() .getService(IMenuService.class); viewMenuAddition = new AbstractContributionFactory("menu:org.eclipse.ui.tests.api.MenuTestHarness?after=additions") { public void createContributionItems(IMenuService menuService, List additions) { CommandContributionItem item = new CommandContributionItem( "org.eclipse.ui.tests.menus.itemX20", "org.eclipse.ui.tests.menus.enabledWorld", null, null, "Item X20", null); additions.add(item); MenuManager submenu = new MenuManager("Menu X21", "org.eclipse.ui.tests.menus.menuX21"); item = new CommandContributionItem( "org.eclipse.ui.tests.menus.itemX22", "org.eclipse.ui.tests.menus.updateWorld", null, null, "Item X22", null); submenu.add(item); item = new CommandContributionItem( "org.eclipse.ui.tests.menus.itemX23", "org.eclipse.ui.tests.menus.enabledWorld", null, null, "Item X23", null); submenu.add(item); additions.add(submenu); item = new CommandContributionItem( "org.eclipse.ui.tests.menus.itemX24", "org.eclipse.ui.tests.menus.enabledWorld", null, null, "Item X24", null); additions.add(item); } public void releaseContributionItems(IMenuService menuService, List items) { // for us this is a no-op } }; menuService.addContributionFactory(viewMenuAddition); viewToolbarAddition = new AbstractContributionFactory("toolbar:org.eclipse.ui.tests.api.MenuTestHarness") { public void createContributionItems(IMenuService menuService, List additions) { CommandContributionItem item = new CommandContributionItem( "org.eclipse.ui.tests.menus.itemX25", "org.eclipse.ui.tests.menus.updateWorld", null, null, "Item X25", null); additions.add(item); WidgetContributionItem widget = new WidgetContributionItem( "org.eclipse.ui.tests.menus.itemX26") { public IWorkbenchWidget createWidget() { return new TextWidget(); } }; additions.add(widget); } public void releaseContributionItems(IMenuService menuService, List items) { // for us this is a no-op } }; menuService.addContributionFactory(viewToolbarAddition); } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/bfd6eb25a2e56f373b64dbce6d194d946bbcc597/TestPlugin.java/buggy/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/TestPlugin.java |
"Item X25", null); | null, null, "Item X25", null, null); | public void addMenuContribution() { if (!PlatformUI.isWorkbenchRunning()) { return; } IMenuService menuService = (IMenuService) PlatformUI.getWorkbench() .getService(IMenuService.class); viewMenuAddition = new AbstractContributionFactory("menu:org.eclipse.ui.tests.api.MenuTestHarness?after=additions") { public void createContributionItems(IMenuService menuService, List additions) { CommandContributionItem item = new CommandContributionItem( "org.eclipse.ui.tests.menus.itemX20", "org.eclipse.ui.tests.menus.enabledWorld", null, null, "Item X20", null); additions.add(item); MenuManager submenu = new MenuManager("Menu X21", "org.eclipse.ui.tests.menus.menuX21"); item = new CommandContributionItem( "org.eclipse.ui.tests.menus.itemX22", "org.eclipse.ui.tests.menus.updateWorld", null, null, "Item X22", null); submenu.add(item); item = new CommandContributionItem( "org.eclipse.ui.tests.menus.itemX23", "org.eclipse.ui.tests.menus.enabledWorld", null, null, "Item X23", null); submenu.add(item); additions.add(submenu); item = new CommandContributionItem( "org.eclipse.ui.tests.menus.itemX24", "org.eclipse.ui.tests.menus.enabledWorld", null, null, "Item X24", null); additions.add(item); } public void releaseContributionItems(IMenuService menuService, List items) { // for us this is a no-op } }; menuService.addContributionFactory(viewMenuAddition); viewToolbarAddition = new AbstractContributionFactory("toolbar:org.eclipse.ui.tests.api.MenuTestHarness") { public void createContributionItems(IMenuService menuService, List additions) { CommandContributionItem item = new CommandContributionItem( "org.eclipse.ui.tests.menus.itemX25", "org.eclipse.ui.tests.menus.updateWorld", null, null, "Item X25", null); additions.add(item); WidgetContributionItem widget = new WidgetContributionItem( "org.eclipse.ui.tests.menus.itemX26") { public IWorkbenchWidget createWidget() { return new TextWidget(); } }; additions.add(widget); } public void releaseContributionItems(IMenuService menuService, List items) { // for us this is a no-op } }; menuService.addContributionFactory(viewToolbarAddition); } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/bfd6eb25a2e56f373b64dbce6d194d946bbcc597/TestPlugin.java/buggy/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/TestPlugin.java |
public void addMenuContribution() { if (!PlatformUI.isWorkbenchRunning()) { return; } IMenuService menuService = (IMenuService) PlatformUI.getWorkbench() .getService(IMenuService.class); viewMenuAddition = new AbstractContributionFactory("menu:org.eclipse.ui.tests.api.MenuTestHarness?after=additions") { public void createContributionItems(IMenuService menuService, List additions) { CommandContributionItem item = new CommandContributionItem( "org.eclipse.ui.tests.menus.itemX20", "org.eclipse.ui.tests.menus.enabledWorld", null, null, "Item X20", null); additions.add(item); MenuManager submenu = new MenuManager("Menu X21", "org.eclipse.ui.tests.menus.menuX21"); item = new CommandContributionItem( "org.eclipse.ui.tests.menus.itemX22", "org.eclipse.ui.tests.menus.updateWorld", null, null, "Item X22", null); submenu.add(item); item = new CommandContributionItem( "org.eclipse.ui.tests.menus.itemX23", "org.eclipse.ui.tests.menus.enabledWorld", null, null, "Item X23", null); submenu.add(item); additions.add(submenu); item = new CommandContributionItem( "org.eclipse.ui.tests.menus.itemX24", "org.eclipse.ui.tests.menus.enabledWorld", null, null, "Item X24", null); additions.add(item); } public void releaseContributionItems(IMenuService menuService, List items) { // for us this is a no-op } }; menuService.addContributionFactory(viewMenuAddition); viewToolbarAddition = new AbstractContributionFactory("toolbar:org.eclipse.ui.tests.api.MenuTestHarness") { public void createContributionItems(IMenuService menuService, List additions) { CommandContributionItem item = new CommandContributionItem( "org.eclipse.ui.tests.menus.itemX25", "org.eclipse.ui.tests.menus.updateWorld", null, null, "Item X25", null); additions.add(item); WidgetContributionItem widget = new WidgetContributionItem( "org.eclipse.ui.tests.menus.itemX26") { public IWorkbenchWidget createWidget() { return new TextWidget(); } }; additions.add(widget); } public void releaseContributionItems(IMenuService menuService, List items) { // for us this is a no-op } }; menuService.addContributionFactory(viewToolbarAddition); } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/bfd6eb25a2e56f373b64dbce6d194d946bbcc597/TestPlugin.java/buggy/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/TestPlugin.java |
||
public void releaseContributionItems(IMenuService menuService, List items) { | public void releaseContributionItems(IMenuService menuService, List items) { | public void addMenuContribution() { if (!PlatformUI.isWorkbenchRunning()) { return; } IMenuService menuService = (IMenuService) PlatformUI.getWorkbench() .getService(IMenuService.class); viewMenuAddition = new AbstractContributionFactory("menu:org.eclipse.ui.tests.api.MenuTestHarness?after=additions") { public void createContributionItems(IMenuService menuService, List additions) { CommandContributionItem item = new CommandContributionItem( "org.eclipse.ui.tests.menus.itemX20", "org.eclipse.ui.tests.menus.enabledWorld", null, null, "Item X20", null); additions.add(item); MenuManager submenu = new MenuManager("Menu X21", "org.eclipse.ui.tests.menus.menuX21"); item = new CommandContributionItem( "org.eclipse.ui.tests.menus.itemX22", "org.eclipse.ui.tests.menus.updateWorld", null, null, "Item X22", null); submenu.add(item); item = new CommandContributionItem( "org.eclipse.ui.tests.menus.itemX23", "org.eclipse.ui.tests.menus.enabledWorld", null, null, "Item X23", null); submenu.add(item); additions.add(submenu); item = new CommandContributionItem( "org.eclipse.ui.tests.menus.itemX24", "org.eclipse.ui.tests.menus.enabledWorld", null, null, "Item X24", null); additions.add(item); } public void releaseContributionItems(IMenuService menuService, List items) { // for us this is a no-op } }; menuService.addContributionFactory(viewMenuAddition); viewToolbarAddition = new AbstractContributionFactory("toolbar:org.eclipse.ui.tests.api.MenuTestHarness") { public void createContributionItems(IMenuService menuService, List additions) { CommandContributionItem item = new CommandContributionItem( "org.eclipse.ui.tests.menus.itemX25", "org.eclipse.ui.tests.menus.updateWorld", null, null, "Item X25", null); additions.add(item); WidgetContributionItem widget = new WidgetContributionItem( "org.eclipse.ui.tests.menus.itemX26") { public IWorkbenchWidget createWidget() { return new TextWidget(); } }; additions.add(widget); } public void releaseContributionItems(IMenuService menuService, List items) { // for us this is a no-op } }; menuService.addContributionFactory(viewToolbarAddition); } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/bfd6eb25a2e56f373b64dbce6d194d946bbcc597/TestPlugin.java/buggy/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/TestPlugin.java |
public void createContributionItems(IMenuService menuService, List additions) { | public void createContributionItems(IMenuService menuService, List additions) { | public void createContributionItems(IMenuService menuService, List additions) { CommandContributionItem item = new CommandContributionItem( "org.eclipse.ui.tests.menus.itemX20", "org.eclipse.ui.tests.menus.enabledWorld", null, null, "Item X20", null); additions.add(item); MenuManager submenu = new MenuManager("Menu X21", "org.eclipse.ui.tests.menus.menuX21"); item = new CommandContributionItem( "org.eclipse.ui.tests.menus.itemX22", "org.eclipse.ui.tests.menus.updateWorld", null, null, "Item X22", null); submenu.add(item); item = new CommandContributionItem( "org.eclipse.ui.tests.menus.itemX23", "org.eclipse.ui.tests.menus.enabledWorld", null, null, "Item X23", null); submenu.add(item); additions.add(submenu); item = new CommandContributionItem( "org.eclipse.ui.tests.menus.itemX24", "org.eclipse.ui.tests.menus.enabledWorld", null, null, "Item X24", null); additions.add(item); } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/bfd6eb25a2e56f373b64dbce6d194d946bbcc597/TestPlugin.java/buggy/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/TestPlugin.java |
"Item X20", null); | null, null, "Item X20", null, null); | public void createContributionItems(IMenuService menuService, List additions) { CommandContributionItem item = new CommandContributionItem( "org.eclipse.ui.tests.menus.itemX20", "org.eclipse.ui.tests.menus.enabledWorld", null, null, "Item X20", null); additions.add(item); MenuManager submenu = new MenuManager("Menu X21", "org.eclipse.ui.tests.menus.menuX21"); item = new CommandContributionItem( "org.eclipse.ui.tests.menus.itemX22", "org.eclipse.ui.tests.menus.updateWorld", null, null, "Item X22", null); submenu.add(item); item = new CommandContributionItem( "org.eclipse.ui.tests.menus.itemX23", "org.eclipse.ui.tests.menus.enabledWorld", null, null, "Item X23", null); submenu.add(item); additions.add(submenu); item = new CommandContributionItem( "org.eclipse.ui.tests.menus.itemX24", "org.eclipse.ui.tests.menus.enabledWorld", null, null, "Item X24", null); additions.add(item); } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/bfd6eb25a2e56f373b64dbce6d194d946bbcc597/TestPlugin.java/buggy/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/TestPlugin.java |
"Item X22", null); | null, null, "Item X22", null, null); | public void createContributionItems(IMenuService menuService, List additions) { CommandContributionItem item = new CommandContributionItem( "org.eclipse.ui.tests.menus.itemX20", "org.eclipse.ui.tests.menus.enabledWorld", null, null, "Item X20", null); additions.add(item); MenuManager submenu = new MenuManager("Menu X21", "org.eclipse.ui.tests.menus.menuX21"); item = new CommandContributionItem( "org.eclipse.ui.tests.menus.itemX22", "org.eclipse.ui.tests.menus.updateWorld", null, null, "Item X22", null); submenu.add(item); item = new CommandContributionItem( "org.eclipse.ui.tests.menus.itemX23", "org.eclipse.ui.tests.menus.enabledWorld", null, null, "Item X23", null); submenu.add(item); additions.add(submenu); item = new CommandContributionItem( "org.eclipse.ui.tests.menus.itemX24", "org.eclipse.ui.tests.menus.enabledWorld", null, null, "Item X24", null); additions.add(item); } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/bfd6eb25a2e56f373b64dbce6d194d946bbcc597/TestPlugin.java/buggy/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/TestPlugin.java |
"Item X23", null); | null, null, "Item X23", null, null); | public void createContributionItems(IMenuService menuService, List additions) { CommandContributionItem item = new CommandContributionItem( "org.eclipse.ui.tests.menus.itemX20", "org.eclipse.ui.tests.menus.enabledWorld", null, null, "Item X20", null); additions.add(item); MenuManager submenu = new MenuManager("Menu X21", "org.eclipse.ui.tests.menus.menuX21"); item = new CommandContributionItem( "org.eclipse.ui.tests.menus.itemX22", "org.eclipse.ui.tests.menus.updateWorld", null, null, "Item X22", null); submenu.add(item); item = new CommandContributionItem( "org.eclipse.ui.tests.menus.itemX23", "org.eclipse.ui.tests.menus.enabledWorld", null, null, "Item X23", null); submenu.add(item); additions.add(submenu); item = new CommandContributionItem( "org.eclipse.ui.tests.menus.itemX24", "org.eclipse.ui.tests.menus.enabledWorld", null, null, "Item X24", null); additions.add(item); } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/bfd6eb25a2e56f373b64dbce6d194d946bbcc597/TestPlugin.java/buggy/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/TestPlugin.java |
"Item X24", null); | null, null, "Item X24", null, null); | public void createContributionItems(IMenuService menuService, List additions) { CommandContributionItem item = new CommandContributionItem( "org.eclipse.ui.tests.menus.itemX20", "org.eclipse.ui.tests.menus.enabledWorld", null, null, "Item X20", null); additions.add(item); MenuManager submenu = new MenuManager("Menu X21", "org.eclipse.ui.tests.menus.menuX21"); item = new CommandContributionItem( "org.eclipse.ui.tests.menus.itemX22", "org.eclipse.ui.tests.menus.updateWorld", null, null, "Item X22", null); submenu.add(item); item = new CommandContributionItem( "org.eclipse.ui.tests.menus.itemX23", "org.eclipse.ui.tests.menus.enabledWorld", null, null, "Item X23", null); submenu.add(item); additions.add(submenu); item = new CommandContributionItem( "org.eclipse.ui.tests.menus.itemX24", "org.eclipse.ui.tests.menus.enabledWorld", null, null, "Item X24", null); additions.add(item); } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/bfd6eb25a2e56f373b64dbce6d194d946bbcc597/TestPlugin.java/buggy/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/TestPlugin.java |
public void releaseContributionItems(IMenuService menuService, List items) { | public void releaseContributionItems(IMenuService menuService, List items) { | public void releaseContributionItems(IMenuService menuService, List items) { // for us this is a no-op } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/bfd6eb25a2e56f373b64dbce6d194d946bbcc597/TestPlugin.java/buggy/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/TestPlugin.java |
public void createContributionItems(IMenuService menuService, List additions) { | public void createContributionItems(IMenuService menuService, List additions) { | public void createContributionItems(IMenuService menuService, List additions) { CommandContributionItem item = new CommandContributionItem( "org.eclipse.ui.tests.menus.itemX25", "org.eclipse.ui.tests.menus.updateWorld", null, null, "Item X25", null); additions.add(item); WidgetContributionItem widget = new WidgetContributionItem( "org.eclipse.ui.tests.menus.itemX26") { public IWorkbenchWidget createWidget() { return new TextWidget(); } }; additions.add(widget); } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/bfd6eb25a2e56f373b64dbce6d194d946bbcc597/TestPlugin.java/buggy/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/TestPlugin.java |
"Item X25", null); | null, null, "Item X25", null, null); | public void createContributionItems(IMenuService menuService, List additions) { CommandContributionItem item = new CommandContributionItem( "org.eclipse.ui.tests.menus.itemX25", "org.eclipse.ui.tests.menus.updateWorld", null, null, "Item X25", null); additions.add(item); WidgetContributionItem widget = new WidgetContributionItem( "org.eclipse.ui.tests.menus.itemX26") { public IWorkbenchWidget createWidget() { return new TextWidget(); } }; additions.add(widget); } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/bfd6eb25a2e56f373b64dbce6d194d946bbcc597/TestPlugin.java/buggy/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/TestPlugin.java |
public void createContributionItems(IMenuService menuService, List additions) { CommandContributionItem item = new CommandContributionItem( "org.eclipse.ui.tests.menus.itemX25", "org.eclipse.ui.tests.menus.updateWorld", null, null, "Item X25", null); additions.add(item); WidgetContributionItem widget = new WidgetContributionItem( "org.eclipse.ui.tests.menus.itemX26") { public IWorkbenchWidget createWidget() { return new TextWidget(); } }; additions.add(widget); } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/bfd6eb25a2e56f373b64dbce6d194d946bbcc597/TestPlugin.java/buggy/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/TestPlugin.java |
||
public void releaseContributionItems(IMenuService menuService, List items) { | public void releaseContributionItems(IMenuService menuService, List items) { | public void releaseContributionItems(IMenuService menuService, List items) { // for us this is a no-op } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/bfd6eb25a2e56f373b64dbce6d194d946bbcc597/TestPlugin.java/buggy/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/TestPlugin.java |
String arg = ((RubyString) args[0]).getValue(); | String arg = ((RubyString) args[0].convertToString()).getValue(); | public static IRubyObject open(IRubyObject recv, IRubyObject[] args) { String arg = ((RubyString) args[0]).getValue(); // Should this logic be pushed into RubyIO Somewhere? if (arg.startsWith("|")) { String command = arg.substring(1); // exec process, create IO with process try { // TODO: may need to part cli parms out ourself? Process p = Runtime.getRuntime().exec(command); RubyIO io = new RubyIO(recv.getRuntime(), p); if (recv.getRuntime().isBlockGiven()) { try { recv.getRuntime().yield(io); return recv.getRuntime().getNil(); } finally { io.close(); } } return io; } catch (IOException ioe) { throw new IOError(recv.getRuntime(), ioe.getMessage()); } } return RubyFile.open(recv.getRuntime().getClass("File"), args); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/ae3178fbb3656e01c3d379a6255e1af956725271/RubyKernel.java/clean/src/org/jruby/RubyKernel.java |
boolean wasDirty = isDirty(); | public void markDirty() { boolean wasDirty = isDirty(); super.markDirty(); // optimization: if already dirty, assume all parents are already dirty too if (!wasDirty) { IContributionManager parent = getParent(); if (parent != null) { parent.markDirty(); } } } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/67bffe850ff41143da832bdcd39d45e036b08c5b/MenuManager.java/clean/bundles/org.eclipse.jface/src/org/eclipse/jface/action/MenuManager.java |
|
if (!wasDirty) { IContributionManager parent = getParent(); if (parent != null) { parent.markDirty(); } | IContributionManager parent = getParent(); if (parent != null) { parent.markDirty(); | public void markDirty() { boolean wasDirty = isDirty(); super.markDirty(); // optimization: if already dirty, assume all parents are already dirty too if (!wasDirty) { IContributionManager parent = getParent(); if (parent != null) { parent.markDirty(); } } } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/67bffe850ff41143da832bdcd39d45e036b08c5b/MenuManager.java/clean/bundles/org.eclipse.jface/src/org/eclipse/jface/action/MenuManager.java |
protected Rectangle getContentAreaEdge(int left, int top, CssContext cssCtx) { | public Rectangle getContentAreaEdge(int left, int top, CssContext cssCtx) { | protected Rectangle getContentAreaEdge(int left, int top, CssContext cssCtx) { RectPropertySet margin = getStyle().getMarginWidth(cssCtx); RectPropertySet border = getStyle().getCalculatedStyle().getBorder(cssCtx); RectPropertySet padding = getStyle().getPaddingWidth(cssCtx); Rectangle result = new Rectangle( left + (int)margin.left() + (int)border.left() + (int)padding.left(), top + (int)margin.top() + (int)border.top() + (int)padding.top(), getWidth() - (int)margin.width() - (int)border.width() - (int)padding.width(), getHeight() - (int) margin.height() - (int) border.height() - (int) padding.height()); return result; } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/2d0418135baea38113aec4c619576083cc381df4/Box.java/buggy/src/java/org/xhtmlrenderer/render/Box.java |
history = new HistoryManager(); | public BrowserStartup() { logger.info("starting up"); history = new HistoryManager(); } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/21b69ea7acabe2f6fd080b8c1cf9278bd83848a8/BrowserStartup.java/clean/demos/browser/src/java/org/xhtmlrenderer/demo/browser/BrowserStartup.java |
|
panel.loadPage("demo:demos/splash/splash.html"); | public void init() { logger.info("creating UI"); actions = new BrowserActions(this); actions.init(); panel = new BrowserPanel(this, new FrameBrowserPanelListener()); panel.init(); panel.createLayout(); panel.createActions(); menu = new BrowserMenuBar(this); menu.init(); menu.createLayout(); menu.createActions(); try { //panel.loadPage("demo:demos/splash/splash.html"); //panel.loadPage("demo:demos/paragraph.xhtml"); panel.loadPage("demo:demos/layout/multicol/glish/nested-float.xhtml"); } catch (Exception ex) { Uu.p(ex); } } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/21b69ea7acabe2f6fd080b8c1cf9278bd83848a8/BrowserStartup.java/clean/demos/browser/src/java/org/xhtmlrenderer/demo/browser/BrowserStartup.java |
|
panel.loadPage("demo:demos/layout/multicol/glish/nested-float.xhtml"); | public void init() { logger.info("creating UI"); actions = new BrowserActions(this); actions.init(); panel = new BrowserPanel(this, new FrameBrowserPanelListener()); panel.init(); panel.createLayout(); panel.createActions(); menu = new BrowserMenuBar(this); menu.init(); menu.createLayout(); menu.createActions(); try { //panel.loadPage("demo:demos/splash/splash.html"); //panel.loadPage("demo:demos/paragraph.xhtml"); panel.loadPage("demo:demos/layout/multicol/glish/nested-float.xhtml"); } catch (Exception ex) { Uu.p(ex); } } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/21b69ea7acabe2f6fd080b8c1cf9278bd83848a8/BrowserStartup.java/clean/demos/browser/src/java/org/xhtmlrenderer/demo/browser/BrowserStartup.java |
|
if(GeneralUtil.isMacOSX()) { System.setProperty("apple.laf.useScreenMenuBar", "true"); System.setProperty("com.apple.mrj.application.apple.menu.about.name","FS Browser"); } JFrame frame = new JFrame(); | if (GeneralUtil.isMacOSX()) { System.setProperty("apple.laf.useScreenMenuBar", "true"); System.setProperty("com.apple.mrj.application.apple.menu.about.name", "FS Browser"); } JFrame frame = new JFrame(); | public static void main(String[] args) throws Exception { if(GeneralUtil.isMacOSX()) { System.setProperty("apple.laf.useScreenMenuBar", "true"); System.setProperty("com.apple.mrj.application.apple.menu.about.name","FS Browser"); } //System.out.println(new URI("images/Stop24.gif")); JFrame frame = new JFrame(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); final BrowserStartup bs = new BrowserStartup(); bs.frame = frame; bs.init(); frame.setJMenuBar(bs.menu); frame.getContentPane().add(bs.panel); frame.pack(); frame.setSize(600, 700); frame.addComponentListener( new ComponentAdapter() { public void componentResized( ComponentEvent e ) { bs.panel.view.relayout(); } } ); frame.show(); if (args.length > 0) { bs.panel.loadPage(args[0]); } } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/21b69ea7acabe2f6fd080b8c1cf9278bd83848a8/BrowserStartup.java/clean/demos/browser/src/java/org/xhtmlrenderer/demo/browser/BrowserStartup.java |
frame.addComponentListener( new ComponentAdapter() { public void componentResized( ComponentEvent e ) { bs.panel.view.relayout(); } } ); | frame.addComponentListener(new ComponentAdapter() { public void componentResized(ComponentEvent e) { bs.panel.view.relayout(); } }); | public static void main(String[] args) throws Exception { if(GeneralUtil.isMacOSX()) { System.setProperty("apple.laf.useScreenMenuBar", "true"); System.setProperty("com.apple.mrj.application.apple.menu.about.name","FS Browser"); } //System.out.println(new URI("images/Stop24.gif")); JFrame frame = new JFrame(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); final BrowserStartup bs = new BrowserStartup(); bs.frame = frame; bs.init(); frame.setJMenuBar(bs.menu); frame.getContentPane().add(bs.panel); frame.pack(); frame.setSize(600, 700); frame.addComponentListener( new ComponentAdapter() { public void componentResized( ComponentEvent e ) { bs.panel.view.relayout(); } } ); frame.show(); if (args.length > 0) { bs.panel.loadPage(args[0]); } } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/21b69ea7acabe2f6fd080b8c1cf9278bd83848a8/BrowserStartup.java/clean/demos/browser/src/java/org/xhtmlrenderer/demo/browser/BrowserStartup.java |
public void componentResized( ComponentEvent e ) { bs.panel.view.relayout(); } | public void componentResized(ComponentEvent e) { bs.panel.view.relayout(); } | public void componentResized( ComponentEvent e ) { bs.panel.view.relayout(); } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/21b69ea7acabe2f6fd080b8c1cf9278bd83848a8/BrowserStartup.java/clean/demos/browser/src/java/org/xhtmlrenderer/demo/browser/BrowserStartup.java |
createSysErr(IErrno.ECONNRESET, "ECONNRESET"); | private void initErrnoErrors() { createSysErr(IErrno.ENOTEMPTY, "ENOTEMPTY"); createSysErr(IErrno.ERANGE, "ERANGE"); createSysErr(IErrno.ESPIPE, "ESPIPE"); createSysErr(IErrno.ENFILE, "ENFILE"); createSysErr(IErrno.EXDEV, "EXDEV"); createSysErr(IErrno.ENOMEM, "ENOMEM"); createSysErr(IErrno.E2BIG, "E2BIG"); createSysErr(IErrno.ENOENT, "ENOENT"); createSysErr(IErrno.ENOSYS, "ENOSYS"); createSysErr(IErrno.EDOM, "EDOM"); createSysErr(IErrno.ENOSPC, "ENOSPC"); createSysErr(IErrno.EINVAL, "EINVAL"); createSysErr(IErrno.EEXIST, "EEXIST"); createSysErr(IErrno.EAGAIN, "EAGAIN"); createSysErr(IErrno.ENXIO, "ENXIO"); createSysErr(IErrno.EILSEQ, "EILSEQ"); createSysErr(IErrno.ENOLCK, "ENOLCK"); createSysErr(IErrno.EPIPE, "EPIPE"); createSysErr(IErrno.EFBIG, "EFBIG"); createSysErr(IErrno.EISDIR, "EISDIR"); createSysErr(IErrno.EBUSY, "EBUSY"); createSysErr(IErrno.ECHILD, "ECHILD"); createSysErr(IErrno.EIO, "EIO"); createSysErr(IErrno.EPERM, "EPERM"); createSysErr(IErrno.EDEADLOCK, "EDEADLOCK"); createSysErr(IErrno.ENAMETOOLONG, "ENAMETOOLONG"); createSysErr(IErrno.EMLINK, "EMLINK"); createSysErr(IErrno.ENOTTY, "ENOTTY"); createSysErr(IErrno.ENOTDIR, "ENOTDIR"); createSysErr(IErrno.EFAULT, "EFAULT"); createSysErr(IErrno.EBADF, "EBADF"); createSysErr(IErrno.EINTR, "EINTR"); createSysErr(IErrno.EWOULDBLOCK, "EWOULDBLOCK"); createSysErr(IErrno.EDEADLK, "EDEADLK"); createSysErr(IErrno.EROFS, "EROFS"); createSysErr(IErrno.EMFILE, "EMFILE"); createSysErr(IErrno.ENODEV, "ENODEV"); createSysErr(IErrno.EACCES, "EACCES"); createSysErr(IErrno.ENOEXEC, "ENOEXEC"); createSysErr(IErrno.ESRCH, "ESRCH"); createSysErr(IErrno.ECONNREFUSED, "ECONNREFUSED"); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/d5575d355e0fd55a836cdf150a5d77214e63c79c/Ruby.java/buggy/src/org/jruby/Ruby.java |
|
String servletClass = config.getInitParameter("servlet-class"); | _config = config; | public void init(ServletConfig config) throws ServletException { String servletClass = config.getInitParameter("servlet-class"); ClassLoader classLoader = PortalClassLoaderUtil.getClassLoader(); try { _servlet = (HttpServlet)classLoader.loadClass( servletClass).newInstance(); } catch (ClassNotFoundException cnfe) { throw new ServletException(cnfe.getMessage()); } catch (IllegalAccessException iae) { throw new ServletException(iae.getMessage()); } catch (InstantiationException ie) { throw new ServletException(ie.getMessage()); } _servlet.init(config); } | 57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/c26c278b568cc398e3f9799f5354d071a7fcb4ef/PortalServletWrapper.java/buggy/portal-shared/src/com/liferay/portal/shared/servlet/PortalServletWrapper.java |
ClassLoader classLoader = PortalClassLoaderUtil.getClassLoader(); try { _servlet = (HttpServlet)classLoader.loadClass( servletClass).newInstance(); } catch (ClassNotFoundException cnfe) { throw new ServletException(cnfe.getMessage()); } catch (IllegalAccessException iae) { throw new ServletException(iae.getMessage()); } catch (InstantiationException ie) { throw new ServletException(ie.getMessage()); } _servlet.init(config); | PortalInitableUtil.init(this); | public void init(ServletConfig config) throws ServletException { String servletClass = config.getInitParameter("servlet-class"); ClassLoader classLoader = PortalClassLoaderUtil.getClassLoader(); try { _servlet = (HttpServlet)classLoader.loadClass( servletClass).newInstance(); } catch (ClassNotFoundException cnfe) { throw new ServletException(cnfe.getMessage()); } catch (IllegalAccessException iae) { throw new ServletException(iae.getMessage()); } catch (InstantiationException ie) { throw new ServletException(ie.getMessage()); } _servlet.init(config); } | 57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/c26c278b568cc398e3f9799f5354d071a7fcb4ef/PortalServletWrapper.java/buggy/portal-shared/src/com/liferay/portal/shared/servlet/PortalServletWrapper.java |
AbstractUIPlugin uiPlugin = (AbstractUIPlugin) Platform.getPlugin(PlatformUI.PLUGIN_ID); String newValue = uiPlugin.getPreferenceStore().getString( IWorkbenchPreferenceConstants.DEFAULT_PERSPECTIVE_ID); workbench.getPerspectiveRegistry().setDefaultPerspective(newValue); | workbench.getPerspectiveRegistry().setDefaultPerspective((String) event.getNewValue()); | public void propertyChange(PropertyChangeEvent event) { String propertyName = event.getProperty(); if (IPreferenceConstants.ENABLED_DECORATORS.equals(propertyName)) WorkbenchPlugin .getDefault() .getDecoratorManager() .restoreListeners(); if (IWorkbenchPreferenceConstants .DEFAULT_PERSPECTIVE_ID .equals(propertyName)) { IWorkbench workbench = WorkbenchPlugin.getDefault().getWorkbench(); AbstractUIPlugin uiPlugin = (AbstractUIPlugin) Platform.getPlugin(PlatformUI.PLUGIN_ID); String newValue = uiPlugin.getPreferenceStore().getString( IWorkbenchPreferenceConstants.DEFAULT_PERSPECTIVE_ID); workbench.getPerspectiveRegistry().setDefaultPerspective(newValue); } //Collect the names if required if (defaultCheckNames == null) { initializeFontNames(); } if (defaultCheckNames.contains(propertyName)) { processDefaultsTo(propertyName); } if (fontNames.contains(propertyName)) { FontData[] newSetting; Object newValue = event.getNewValue(); //The preference change can come as as a String or a FontData[] //so make sure we have the right type if(newValue instanceof String) newSetting = PreferenceConverter.readFontData((String) newValue); else newSetting = (FontData[]) newValue; JFaceResources.getFontRegistry().put(propertyName, newSetting); } } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/d8d581e771d0a03074fd3175fc0747caca7d53e0/PlatformUIPreferenceListener.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PlatformUIPreferenceListener.java |
layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN); | layout.marginLeft = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN); layout.marginWidth = 0; | protected Control createButtonBar(Composite parent) { Composite composite = new Composite(parent, SWT.NULL); GridLayout layout = new GridLayout(); if (fStatusLineAboveButtons) { layout.numColumns = 1; } else { layout.numColumns = 2; } layout.marginHeight = 0; layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN); composite.setLayout(layout); composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); fStatusLine = new MessageLine(composite); fStatusLine.setAlignment(SWT.LEFT); fStatusLine.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); fStatusLine.setErrorStatus(null); applyDialogFont(composite); super.createButtonBar(composite); return composite; } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/35de73822e9cac20595428405e9ac324f5da58c8/StatusDialog.java/buggy/bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/StatusDialog.java |
fStatusLine.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); | GridData statusData = new GridData(GridData.FILL_HORIZONTAL); | protected Control createButtonBar(Composite parent) { Composite composite = new Composite(parent, SWT.NULL); GridLayout layout = new GridLayout(); if (fStatusLineAboveButtons) { layout.numColumns = 1; } else { layout.numColumns = 2; } layout.marginHeight = 0; layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN); composite.setLayout(layout); composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); fStatusLine = new MessageLine(composite); fStatusLine.setAlignment(SWT.LEFT); fStatusLine.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); fStatusLine.setErrorStatus(null); applyDialogFont(composite); super.createButtonBar(composite); return composite; } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/35de73822e9cac20595428405e9ac324f5da58c8/StatusDialog.java/buggy/bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/StatusDialog.java |
setHelpAvailable(helpAvailable); | protected Control createButtonBar(Composite parent) { Composite composite = new Composite(parent, SWT.NULL); GridLayout layout = new GridLayout(); if (fStatusLineAboveButtons) { layout.numColumns = 1; } else { layout.numColumns = 2; } layout.marginHeight = 0; layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN); composite.setLayout(layout); composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); fStatusLine = new MessageLine(composite); fStatusLine.setAlignment(SWT.LEFT); fStatusLine.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); fStatusLine.setErrorStatus(null); applyDialogFont(composite); super.createButtonBar(composite); return composite; } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/35de73822e9cac20595428405e9ac324f5da58c8/StatusDialog.java/buggy/bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/StatusDialog.java |
|
ThreadContext context = getRuntime().getCurrentContext(); for (Iterator iter = entryIterator(); iter.hasNext();) { checkRehashing(); Map.Entry entry = (Map.Entry) iter.next(); context.yield(getRuntime().newArray((IRubyObject)entry.getKey(), (IRubyObject)entry.getValue())); } return this; } | return eachInternal(false); } | public RubyHash each() { ThreadContext context = getRuntime().getCurrentContext(); for (Iterator iter = entryIterator(); iter.hasNext();) { checkRehashing(); Map.Entry entry = (Map.Entry) iter.next(); context.yield(getRuntime().newArray((IRubyObject)entry.getKey(), (IRubyObject)entry.getValue())); } return this; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a156e647330f19640b43fcb7db007b07c3dfd38e/RubyHash.java/buggy/src/org/jruby/RubyHash.java |
if (shoppingCart.isNew() || shoppingCart.isModified()) { session = openSession(); if (shoppingCart.isNew()) { ShoppingCart shoppingCartModel = new ShoppingCart(); shoppingCartModel.setCartId(shoppingCart.getCartId()); shoppingCartModel.setGroupId(shoppingCart.getGroupId()); shoppingCartModel.setCompanyId(shoppingCart.getCompanyId()); shoppingCartModel.setUserId(shoppingCart.getUserId()); shoppingCartModel.setUserName(shoppingCart.getUserName()); shoppingCartModel.setCreateDate(shoppingCart.getCreateDate()); shoppingCartModel.setModifiedDate(shoppingCart.getModifiedDate()); shoppingCartModel.setItemIds(shoppingCart.getItemIds()); shoppingCartModel.setCouponIds(shoppingCart.getCouponIds()); shoppingCartModel.setAltShipping(shoppingCart.getAltShipping()); shoppingCartModel.setInsure(shoppingCart.getInsure()); session.save(shoppingCartModel); session.flush(); } else { ShoppingCart shoppingCartModel = (ShoppingCart)session.get(ShoppingCart.class, shoppingCart.getPrimaryKey()); if (shoppingCartModel != null) { shoppingCartModel.setGroupId(shoppingCart.getGroupId()); shoppingCartModel.setCompanyId(shoppingCart.getCompanyId()); shoppingCartModel.setUserId(shoppingCart.getUserId()); shoppingCartModel.setUserName(shoppingCart.getUserName()); shoppingCartModel.setCreateDate(shoppingCart.getCreateDate()); shoppingCartModel.setModifiedDate(shoppingCart.getModifiedDate()); shoppingCartModel.setItemIds(shoppingCart.getItemIds()); shoppingCartModel.setCouponIds(shoppingCart.getCouponIds()); shoppingCartModel.setAltShipping(shoppingCart.getAltShipping()); shoppingCartModel.setInsure(shoppingCart.getInsure()); session.flush(); } else { shoppingCartModel = new ShoppingCart(); shoppingCartModel.setCartId(shoppingCart.getCartId()); shoppingCartModel.setGroupId(shoppingCart.getGroupId()); shoppingCartModel.setCompanyId(shoppingCart.getCompanyId()); shoppingCartModel.setUserId(shoppingCart.getUserId()); shoppingCartModel.setUserName(shoppingCart.getUserName()); shoppingCartModel.setCreateDate(shoppingCart.getCreateDate()); shoppingCartModel.setModifiedDate(shoppingCart.getModifiedDate()); shoppingCartModel.setItemIds(shoppingCart.getItemIds()); shoppingCartModel.setCouponIds(shoppingCart.getCouponIds()); shoppingCartModel.setAltShipping(shoppingCart.getAltShipping()); shoppingCartModel.setInsure(shoppingCart.getInsure()); session.save(shoppingCartModel); session.flush(); } } shoppingCart.setNew(false); shoppingCart.setModified(false); } | session = openSession(); session.saveOrUpdate(shoppingCart); session.flush(); shoppingCart.setNew(false); | public com.liferay.portlet.shopping.model.ShoppingCart update( com.liferay.portlet.shopping.model.ShoppingCart shoppingCart) throws SystemException { Session session = null; try { if (shoppingCart.isNew() || shoppingCart.isModified()) { session = openSession(); if (shoppingCart.isNew()) { ShoppingCart shoppingCartModel = new ShoppingCart(); shoppingCartModel.setCartId(shoppingCart.getCartId()); shoppingCartModel.setGroupId(shoppingCart.getGroupId()); shoppingCartModel.setCompanyId(shoppingCart.getCompanyId()); shoppingCartModel.setUserId(shoppingCart.getUserId()); shoppingCartModel.setUserName(shoppingCart.getUserName()); shoppingCartModel.setCreateDate(shoppingCart.getCreateDate()); shoppingCartModel.setModifiedDate(shoppingCart.getModifiedDate()); shoppingCartModel.setItemIds(shoppingCart.getItemIds()); shoppingCartModel.setCouponIds(shoppingCart.getCouponIds()); shoppingCartModel.setAltShipping(shoppingCart.getAltShipping()); shoppingCartModel.setInsure(shoppingCart.getInsure()); session.save(shoppingCartModel); session.flush(); } else { ShoppingCart shoppingCartModel = (ShoppingCart)session.get(ShoppingCart.class, shoppingCart.getPrimaryKey()); if (shoppingCartModel != null) { shoppingCartModel.setGroupId(shoppingCart.getGroupId()); shoppingCartModel.setCompanyId(shoppingCart.getCompanyId()); shoppingCartModel.setUserId(shoppingCart.getUserId()); shoppingCartModel.setUserName(shoppingCart.getUserName()); shoppingCartModel.setCreateDate(shoppingCart.getCreateDate()); shoppingCartModel.setModifiedDate(shoppingCart.getModifiedDate()); shoppingCartModel.setItemIds(shoppingCart.getItemIds()); shoppingCartModel.setCouponIds(shoppingCart.getCouponIds()); shoppingCartModel.setAltShipping(shoppingCart.getAltShipping()); shoppingCartModel.setInsure(shoppingCart.getInsure()); session.flush(); } else { shoppingCartModel = new ShoppingCart(); shoppingCartModel.setCartId(shoppingCart.getCartId()); shoppingCartModel.setGroupId(shoppingCart.getGroupId()); shoppingCartModel.setCompanyId(shoppingCart.getCompanyId()); shoppingCartModel.setUserId(shoppingCart.getUserId()); shoppingCartModel.setUserName(shoppingCart.getUserName()); shoppingCartModel.setCreateDate(shoppingCart.getCreateDate()); shoppingCartModel.setModifiedDate(shoppingCart.getModifiedDate()); shoppingCartModel.setItemIds(shoppingCart.getItemIds()); shoppingCartModel.setCouponIds(shoppingCart.getCouponIds()); shoppingCartModel.setAltShipping(shoppingCart.getAltShipping()); shoppingCartModel.setInsure(shoppingCart.getInsure()); session.save(shoppingCartModel); session.flush(); } } shoppingCart.setNew(false); shoppingCart.setModified(false); } return shoppingCart; } catch (HibernateException he) { throw new SystemException(he); } finally { closeSession(session); } } | 57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/f4d6afc6707f57fd84bf6b624f0c119657b0a766/ShoppingCartPersistence.java/clean/portal-ejb/src/com/liferay/portlet/shopping/service/persistence/ShoppingCartPersistence.java |
editor.dispose(); | disposePart(editor); | public boolean closeAllEditors(boolean save) { // If part is added / removed always unzoom. if (isZoomed()) zoomOut(); // Save part. if (save && !getEditorManager().saveAll(true, true)) return false; // Deactivate part. boolean deactivate = activePart instanceof IEditorPart; if (deactivate) setActivePart(null); lastActiveEditor = null; actionSwitcher.updateTopEditor(null); // Close all editors. IEditorReference[] editors = getEditorManager().getEditors(); getEditorManager().closeAll(); for (int i = 0; i < editors.length; i ++) { IEditorPart editor = (IEditorPart)editors[i].getPart(false); if(editor != null) { firePartClosed(editor); editor.dispose(); } } activationList.removeEditors(); if (deactivate) activate(activationList.getActive()); // Notify interested listeners window.firePerspectiveChanged(this, getPerspective(), CHANGE_EDITOR_CLOSE); // Return true on success. return true;} | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/ba484401ea8e4eb6a4c631278c22df3db654324b/WorkbenchPage.java/clean/bundles/org.eclipse.ui/Eclipse UI/org/eclipse/ui/internal/WorkbenchPage.java |
part.dispose(); | disposePart(part); | public boolean closeAllSavedEditors() { // If part is added / removed always unzoom. if (isZoomed()) zoomOut(); boolean deactivated = false; // Close all editors. IEditorReference editors[] = getEditorReferences(); for (int i = 0; i < editors.length; i ++) { IEditorReference editor = editors[i]; IWorkbenchPart part = editor.getPart(false); if(!editor.isDirty()) { if (part == activePart) { deactivated = true; setActivePart(null); } else if (lastActiveEditor == part) { lastActiveEditor = null; actionSwitcher.updateTopEditor(null); } getEditorManager().closeEditor(editor); activationList.remove(editor); if(part != null) { firePartClosed(part); part.dispose(); } } } if (deactivated) activate(activationList.getActive()); // Notify interested listeners window.firePerspectiveChanged(this, getPerspective(), CHANGE_EDITOR_CLOSE); // Return true on success. return true;} | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/ba484401ea8e4eb6a4c631278c22df3db654324b/WorkbenchPage.java/clean/bundles/org.eclipse.ui/Eclipse UI/org/eclipse/ui/internal/WorkbenchPage.java |
RubyClass result = runtime.defineClass("Bignum", runtime.getClasses().getIntegerClass()); | RubyClass result = runtime.defineClass("Bignum", runtime.getClass("Integer")); | public static RubyClass createBignumClass(Ruby runtime) { RubyClass result = runtime.defineClass("Bignum", runtime.getClasses().getIntegerClass()); CallbackFactory callbackFactory = runtime.callbackFactory(RubyBignum.class); result.defineMethod("~", callbackFactory.getMethod("op_invert")); result.defineMethod("&", callbackFactory.getMethod("op_and", IRubyObject.class)); result.defineMethod("<<", callbackFactory.getMethod("op_lshift", IRubyObject.class)); result.defineMethod("%", callbackFactory.getMethod("op_mod", IRubyObject.class)); result.defineMethod("+", callbackFactory.getMethod("op_plus", IRubyObject.class)); result.defineMethod("*", callbackFactory.getMethod("op_mul", IRubyObject.class)); result.defineMethod("**", callbackFactory.getMethod("op_pow", IRubyObject.class)); result.defineMethod("-", callbackFactory.getMethod("op_minus", IRubyObject.class)); result.defineMethod("modulo", callbackFactory.getMethod("op_mod", IRubyObject.class)); result.defineMethod("/", callbackFactory.getMethod("op_div", IRubyObject.class)); result.defineMethod(">>", callbackFactory.getMethod("op_rshift", IRubyObject.class)); result.defineMethod("|", callbackFactory.getMethod("op_or", IRubyObject.class)); result.defineMethod("^", callbackFactory.getMethod("op_xor", IRubyObject.class)); result.defineMethod("-@", callbackFactory.getMethod("op_uminus")); result.defineMethod("[]", callbackFactory.getMethod("aref", IRubyObject.class)); result.defineMethod("coerce", callbackFactory.getMethod("coerce", IRubyObject.class)); result.defineMethod("remainder", callbackFactory.getMethod("remainder", IRubyObject.class)); result.defineMethod("hash", callbackFactory.getMethod("hash")); result.defineMethod("size", callbackFactory.getMethod("size")); result.defineMethod("quo", callbackFactory.getMethod("quo", IRubyObject.class)); result.defineMethod("to_f", callbackFactory.getMethod("to_f")); result.defineMethod("to_i", callbackFactory.getMethod("to_i")); result.defineMethod("to_s", callbackFactory.getMethod("to_s")); return result; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/ca6b16e996ea9af83ce593594b9c69b9364a9924/RubyBignum.java/clean/src/org/jruby/RubyBignum.java |
ib = getDeepestHover(ib); | private void restyle(Box ib) { //Uu.p("under cursor = " + ib); boolean needRepaint = false; // return this box or one if it's parents to find the deepest hovered element. // if none then just return null ib = getDeepestHover(ib); //Uu.p("deepest hover = " + ib); if (prev == ib) { return; } if (ib == null) panel.hovered_element = null; else panel.hovered_element = ib.element; // if moved out of the old block then unstyle it if (prev != null) { boolean restyled = panel.getSharedContext().getCss().isHoverStyled(prev.element); if (restyled) { prev.restyle = true;//notify rendering to restyle the box //prev.hover = false; needRepaint = true; } } // return if no new hovered block; if (ib != null) { //System.out.println("Using: " + ib); /* if the box is an inline box and if it is a text only box, meaning it does not have it's own element but is merely a child of an enclosing box. is inline element */ // Uu.p("real element = " + ib.getRealElement()); // skip it if it's just a text child of a block. we should // do the block instead //if (ib.isInlineElement() || !(ib instanceof InlineBox)) { boolean restyled = panel.getSharedContext().getCss().isHoverStyled(ib.element); //Uu.p("was styled = " + ib); // if the block isn't a hover then go up to the parent. // if the block has a hover style then restyle it if (restyled) { ib.restyle = true; //ib.hover = true; needRepaint = true; } //} } prev = ib; if (needRepaint) panel.repaint(); } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/64c3183c146f6b53b2057df9750f030a3b20c4b2/HoverListener.java/clean/src/java/org/xhtmlrenderer/swing/HoverListener.java |
|
if (prev == ib) { | if (hovered_element == panel.hovered_element) { | private void restyle(Box ib) { //Uu.p("under cursor = " + ib); boolean needRepaint = false; // return this box or one if it's parents to find the deepest hovered element. // if none then just return null ib = getDeepestHover(ib); //Uu.p("deepest hover = " + ib); if (prev == ib) { return; } if (ib == null) panel.hovered_element = null; else panel.hovered_element = ib.element; // if moved out of the old block then unstyle it if (prev != null) { boolean restyled = panel.getSharedContext().getCss().isHoverStyled(prev.element); if (restyled) { prev.restyle = true;//notify rendering to restyle the box //prev.hover = false; needRepaint = true; } } // return if no new hovered block; if (ib != null) { //System.out.println("Using: " + ib); /* if the box is an inline box and if it is a text only box, meaning it does not have it's own element but is merely a child of an enclosing box. is inline element */ // Uu.p("real element = " + ib.getRealElement()); // skip it if it's just a text child of a block. we should // do the block instead //if (ib.isInlineElement() || !(ib instanceof InlineBox)) { boolean restyled = panel.getSharedContext().getCss().isHoverStyled(ib.element); //Uu.p("was styled = " + ib); // if the block isn't a hover then go up to the parent. // if the block has a hover style then restyle it if (restyled) { ib.restyle = true; //ib.hover = true; needRepaint = true; } //} } prev = ib; if (needRepaint) panel.repaint(); } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/64c3183c146f6b53b2057df9750f030a3b20c4b2/HoverListener.java/clean/src/java/org/xhtmlrenderer/swing/HoverListener.java |
if (ib == null) panel.hovered_element = null; else panel.hovered_element = ib.element; | Element previousHoveredElement = panel.hovered_element; panel.hovered_element = hovered_element; | private void restyle(Box ib) { //Uu.p("under cursor = " + ib); boolean needRepaint = false; // return this box or one if it's parents to find the deepest hovered element. // if none then just return null ib = getDeepestHover(ib); //Uu.p("deepest hover = " + ib); if (prev == ib) { return; } if (ib == null) panel.hovered_element = null; else panel.hovered_element = ib.element; // if moved out of the old block then unstyle it if (prev != null) { boolean restyled = panel.getSharedContext().getCss().isHoverStyled(prev.element); if (restyled) { prev.restyle = true;//notify rendering to restyle the box //prev.hover = false; needRepaint = true; } } // return if no new hovered block; if (ib != null) { //System.out.println("Using: " + ib); /* if the box is an inline box and if it is a text only box, meaning it does not have it's own element but is merely a child of an enclosing box. is inline element */ // Uu.p("real element = " + ib.getRealElement()); // skip it if it's just a text child of a block. we should // do the block instead //if (ib.isInlineElement() || !(ib instanceof InlineBox)) { boolean restyled = panel.getSharedContext().getCss().isHoverStyled(ib.element); //Uu.p("was styled = " + ib); // if the block isn't a hover then go up to the parent. // if the block has a hover style then restyle it if (restyled) { ib.restyle = true; //ib.hover = true; needRepaint = true; } //} } prev = ib; if (needRepaint) panel.repaint(); } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/64c3183c146f6b53b2057df9750f030a3b20c4b2/HoverListener.java/clean/src/java/org/xhtmlrenderer/swing/HoverListener.java |
boolean restyled = panel.getSharedContext().getCss().isHoverStyled(prev.element); if (restyled) { prev.restyle = true; needRepaint = true; } | needRepaint = true; restyleElementChildBoxes(previousHoveredElement, prev); prev = null; | private void restyle(Box ib) { //Uu.p("under cursor = " + ib); boolean needRepaint = false; // return this box or one if it's parents to find the deepest hovered element. // if none then just return null ib = getDeepestHover(ib); //Uu.p("deepest hover = " + ib); if (prev == ib) { return; } if (ib == null) panel.hovered_element = null; else panel.hovered_element = ib.element; // if moved out of the old block then unstyle it if (prev != null) { boolean restyled = panel.getSharedContext().getCss().isHoverStyled(prev.element); if (restyled) { prev.restyle = true;//notify rendering to restyle the box //prev.hover = false; needRepaint = true; } } // return if no new hovered block; if (ib != null) { //System.out.println("Using: " + ib); /* if the box is an inline box and if it is a text only box, meaning it does not have it's own element but is merely a child of an enclosing box. is inline element */ // Uu.p("real element = " + ib.getRealElement()); // skip it if it's just a text child of a block. we should // do the block instead //if (ib.isInlineElement() || !(ib instanceof InlineBox)) { boolean restyled = panel.getSharedContext().getCss().isHoverStyled(ib.element); //Uu.p("was styled = " + ib); // if the block isn't a hover then go up to the parent. // if the block has a hover style then restyle it if (restyled) { ib.restyle = true; //ib.hover = true; needRepaint = true; } //} } prev = ib; if (needRepaint) panel.repaint(); } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/64c3183c146f6b53b2057df9750f030a3b20c4b2/HoverListener.java/clean/src/java/org/xhtmlrenderer/swing/HoverListener.java |
if (ib != null) { /* if the box is an inline box and if it is a text only box, meaning it does not have it's own element but is merely a child of an enclosing box. is inline element */ boolean restyled = panel.getSharedContext().getCss().isHoverStyled(ib.element); if (restyled) { ib.restyle = true; needRepaint = true; } | if (hovered_element != null) { needRepaint = true; restyleElementChildBoxes(hovered_element, ib); prev = ib; | private void restyle(Box ib) { //Uu.p("under cursor = " + ib); boolean needRepaint = false; // return this box or one if it's parents to find the deepest hovered element. // if none then just return null ib = getDeepestHover(ib); //Uu.p("deepest hover = " + ib); if (prev == ib) { return; } if (ib == null) panel.hovered_element = null; else panel.hovered_element = ib.element; // if moved out of the old block then unstyle it if (prev != null) { boolean restyled = panel.getSharedContext().getCss().isHoverStyled(prev.element); if (restyled) { prev.restyle = true;//notify rendering to restyle the box //prev.hover = false; needRepaint = true; } } // return if no new hovered block; if (ib != null) { //System.out.println("Using: " + ib); /* if the box is an inline box and if it is a text only box, meaning it does not have it's own element but is merely a child of an enclosing box. is inline element */ // Uu.p("real element = " + ib.getRealElement()); // skip it if it's just a text child of a block. we should // do the block instead //if (ib.isInlineElement() || !(ib instanceof InlineBox)) { boolean restyled = panel.getSharedContext().getCss().isHoverStyled(ib.element); //Uu.p("was styled = " + ib); // if the block isn't a hover then go up to the parent. // if the block has a hover style then restyle it if (restyled) { ib.restyle = true; //ib.hover = true; needRepaint = true; } //} } prev = ib; if (needRepaint) panel.repaint(); } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/64c3183c146f6b53b2057df9750f030a3b20c4b2/HoverListener.java/clean/src/java/org/xhtmlrenderer/swing/HoverListener.java |
prev = ib; | private void restyle(Box ib) { //Uu.p("under cursor = " + ib); boolean needRepaint = false; // return this box or one if it's parents to find the deepest hovered element. // if none then just return null ib = getDeepestHover(ib); //Uu.p("deepest hover = " + ib); if (prev == ib) { return; } if (ib == null) panel.hovered_element = null; else panel.hovered_element = ib.element; // if moved out of the old block then unstyle it if (prev != null) { boolean restyled = panel.getSharedContext().getCss().isHoverStyled(prev.element); if (restyled) { prev.restyle = true;//notify rendering to restyle the box //prev.hover = false; needRepaint = true; } } // return if no new hovered block; if (ib != null) { //System.out.println("Using: " + ib); /* if the box is an inline box and if it is a text only box, meaning it does not have it's own element but is merely a child of an enclosing box. is inline element */ // Uu.p("real element = " + ib.getRealElement()); // skip it if it's just a text child of a block. we should // do the block instead //if (ib.isInlineElement() || !(ib instanceof InlineBox)) { boolean restyled = panel.getSharedContext().getCss().isHoverStyled(ib.element); //Uu.p("was styled = " + ib); // if the block isn't a hover then go up to the parent. // if the block has a hover style then restyle it if (restyled) { ib.restyle = true; //ib.hover = true; needRepaint = true; } //} } prev = ib; if (needRepaint) panel.repaint(); } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/64c3183c146f6b53b2057df9750f030a3b20c4b2/HoverListener.java/clean/src/java/org/xhtmlrenderer/swing/HoverListener.java |
|
return (RubyString)runtime.getGlobalVariables().get("$FILENAME"); | return (RubyString)getRuntime().getGlobalVariables().get("$FILENAME"); | public RubyString filename() { return (RubyString)runtime.getGlobalVariables().get("$FILENAME"); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubyArgsFile.java/buggy/src/org/jruby/RubyArgsFile.java |
extendObject(runtime.getModule("Enumerable")); | extendObject(getRuntime().getModule("Enumerable")); | public void initArgsFile() { extendObject(runtime.getModule("Enumerable")); runtime.defineReadonlyVariable("$<", this); runtime.defineGlobalConstant("ARGF", this); defineSingletonMethod("each", callbackFactory().getOptMethod(RubyArgsFile.class, "each_line")); defineSingletonMethod("each_line", callbackFactory().getOptMethod(RubyArgsFile.class, "each_line")); defineSingletonMethod("filename", callbackFactory().getMethod(RubyArgsFile.class, "filename"));// defineSingletonMethod("gets", callbackFactory().getOptSingletonMethod(RubyGlobal.class, "gets"));// defineSingletonMethod("readline", callbackFactory().getOptSingletonMethod(RubyGlobal.class, "readline")); //defineSingletonMethod("readlines", callbackFactory().getOptSingletonMethod(RubyGlobal.class, "readlines")); // defineSingletonMethod("to_a", callbackFactory().getOptSingletonMethod(RubyGlobal.class, "readlines")); defineSingletonMethod("to_s", callbackFactory().getMethod(RubyArgsFile.class, "filename")); runtime.defineReadonlyVariable("$FILENAME", RubyString.newString(runtime, "-")); // This is ugly. nextArgsFile both checks existence of another // file and the setup of any files. On top of that it handles // the logic for figuring out stdin versus a list of files. // I hacked this to make a null currentFile indicate that things // have not been set up yet. This seems fragile, but it at least // it passes tests now. //currentFile = (RubyIO) runtime.getGlobalVariables().get("$stdin"); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubyArgsFile.java/buggy/src/org/jruby/RubyArgsFile.java |
runtime.defineReadonlyVariable("$<", this); runtime.defineGlobalConstant("ARGF", this); | getRuntime().defineReadonlyVariable("$<", this); getRuntime().defineGlobalConstant("ARGF", this); | public void initArgsFile() { extendObject(runtime.getModule("Enumerable")); runtime.defineReadonlyVariable("$<", this); runtime.defineGlobalConstant("ARGF", this); defineSingletonMethod("each", callbackFactory().getOptMethod(RubyArgsFile.class, "each_line")); defineSingletonMethod("each_line", callbackFactory().getOptMethod(RubyArgsFile.class, "each_line")); defineSingletonMethod("filename", callbackFactory().getMethod(RubyArgsFile.class, "filename"));// defineSingletonMethod("gets", callbackFactory().getOptSingletonMethod(RubyGlobal.class, "gets"));// defineSingletonMethod("readline", callbackFactory().getOptSingletonMethod(RubyGlobal.class, "readline")); //defineSingletonMethod("readlines", callbackFactory().getOptSingletonMethod(RubyGlobal.class, "readlines")); // defineSingletonMethod("to_a", callbackFactory().getOptSingletonMethod(RubyGlobal.class, "readlines")); defineSingletonMethod("to_s", callbackFactory().getMethod(RubyArgsFile.class, "filename")); runtime.defineReadonlyVariable("$FILENAME", RubyString.newString(runtime, "-")); // This is ugly. nextArgsFile both checks existence of another // file and the setup of any files. On top of that it handles // the logic for figuring out stdin versus a list of files. // I hacked this to make a null currentFile indicate that things // have not been set up yet. This seems fragile, but it at least // it passes tests now. //currentFile = (RubyIO) runtime.getGlobalVariables().get("$stdin"); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubyArgsFile.java/buggy/src/org/jruby/RubyArgsFile.java |
runtime.defineReadonlyVariable("$FILENAME", RubyString.newString(runtime, "-")); | getRuntime().defineReadonlyVariable("$FILENAME", getRuntime().newString("-")); | public void initArgsFile() { extendObject(runtime.getModule("Enumerable")); runtime.defineReadonlyVariable("$<", this); runtime.defineGlobalConstant("ARGF", this); defineSingletonMethod("each", callbackFactory().getOptMethod(RubyArgsFile.class, "each_line")); defineSingletonMethod("each_line", callbackFactory().getOptMethod(RubyArgsFile.class, "each_line")); defineSingletonMethod("filename", callbackFactory().getMethod(RubyArgsFile.class, "filename"));// defineSingletonMethod("gets", callbackFactory().getOptSingletonMethod(RubyGlobal.class, "gets"));// defineSingletonMethod("readline", callbackFactory().getOptSingletonMethod(RubyGlobal.class, "readline")); //defineSingletonMethod("readlines", callbackFactory().getOptSingletonMethod(RubyGlobal.class, "readlines")); // defineSingletonMethod("to_a", callbackFactory().getOptSingletonMethod(RubyGlobal.class, "readlines")); defineSingletonMethod("to_s", callbackFactory().getMethod(RubyArgsFile.class, "filename")); runtime.defineReadonlyVariable("$FILENAME", RubyString.newString(runtime, "-")); // This is ugly. nextArgsFile both checks existence of another // file and the setup of any files. On top of that it handles // the logic for figuring out stdin versus a list of files. // I hacked this to make a null currentFile indicate that things // have not been set up yet. This seems fragile, but it at least // it passes tests now. //currentFile = (RubyIO) runtime.getGlobalVariables().get("$stdin"); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubyArgsFile.java/buggy/src/org/jruby/RubyArgsFile.java |
return RubyString.nilString(runtime); | return RubyString.nilString(getRuntime()); | public RubyString internalGets(IRubyObject[] args) { if (currentFile == null && !nextArgsFile()) { return RubyString.nilString(runtime); } RubyString line = (RubyString)currentFile.callMethod("gets", args); while (line.isNil()) { currentFile.callMethod("close"); if (! nextArgsFile()) { currentFile = null; return line; } line = (RubyString) currentFile.callMethod("gets", args); } currentLineNumber++; runtime.getGlobalVariables().set("$.", RubyFixnum.newFixnum(runtime, currentLineNumber)); return line; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubyArgsFile.java/buggy/src/org/jruby/RubyArgsFile.java |
runtime.getGlobalVariables().set("$.", RubyFixnum.newFixnum(runtime, currentLineNumber)); | getRuntime().getGlobalVariables().set("$.", getRuntime().newFixnum(currentLineNumber)); | public RubyString internalGets(IRubyObject[] args) { if (currentFile == null && !nextArgsFile()) { return RubyString.nilString(runtime); } RubyString line = (RubyString)currentFile.callMethod("gets", args); while (line.isNil()) { currentFile.callMethod("close"); if (! nextArgsFile()) { currentFile = null; return line; } line = (RubyString) currentFile.callMethod("gets", args); } currentLineNumber++; runtime.getGlobalVariables().set("$.", RubyFixnum.newFixnum(runtime, currentLineNumber)); return line; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubyArgsFile.java/buggy/src/org/jruby/RubyArgsFile.java |
RubyArray args = (RubyArray)runtime.getGlobalVariables().get("$*"); | RubyArray args = (RubyArray)getRuntime().getGlobalVariables().get("$*"); | protected boolean nextArgsFile() { RubyArray args = (RubyArray)runtime.getGlobalVariables().get("$*"); if (args.getLength() == 0) { if (currentFile == null) { currentFile = (RubyIO) runtime.getGlobalVariables().get("$stdin"); ((RubyString) runtime.getGlobalVariables().get("$FILENAME")).setValue("-"); currentLineNumber = 0; return true; } return false; } String filename = ((RubyString) args.shift()).getValue(); ((RubyString) runtime.getGlobalVariables().get("$FILENAME")).setValue(filename); if (filename.equals("-")) { currentFile = (RubyIO) runtime.getGlobalVariables().get("$stdin"); } else { currentFile = new RubyFile(runtime, filename); } return true; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubyArgsFile.java/buggy/src/org/jruby/RubyArgsFile.java |
currentFile = (RubyIO) runtime.getGlobalVariables().get("$stdin"); ((RubyString) runtime.getGlobalVariables().get("$FILENAME")).setValue("-"); | currentFile = (RubyIO) getRuntime().getGlobalVariables().get("$stdin"); ((RubyString) getRuntime().getGlobalVariables().get("$FILENAME")).setValue("-"); | protected boolean nextArgsFile() { RubyArray args = (RubyArray)runtime.getGlobalVariables().get("$*"); if (args.getLength() == 0) { if (currentFile == null) { currentFile = (RubyIO) runtime.getGlobalVariables().get("$stdin"); ((RubyString) runtime.getGlobalVariables().get("$FILENAME")).setValue("-"); currentLineNumber = 0; return true; } return false; } String filename = ((RubyString) args.shift()).getValue(); ((RubyString) runtime.getGlobalVariables().get("$FILENAME")).setValue(filename); if (filename.equals("-")) { currentFile = (RubyIO) runtime.getGlobalVariables().get("$stdin"); } else { currentFile = new RubyFile(runtime, filename); } return true; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubyArgsFile.java/buggy/src/org/jruby/RubyArgsFile.java |
((RubyString) runtime.getGlobalVariables().get("$FILENAME")).setValue(filename); | ((RubyString) getRuntime().getGlobalVariables().get("$FILENAME")).setValue(filename); | protected boolean nextArgsFile() { RubyArray args = (RubyArray)runtime.getGlobalVariables().get("$*"); if (args.getLength() == 0) { if (currentFile == null) { currentFile = (RubyIO) runtime.getGlobalVariables().get("$stdin"); ((RubyString) runtime.getGlobalVariables().get("$FILENAME")).setValue("-"); currentLineNumber = 0; return true; } return false; } String filename = ((RubyString) args.shift()).getValue(); ((RubyString) runtime.getGlobalVariables().get("$FILENAME")).setValue(filename); if (filename.equals("-")) { currentFile = (RubyIO) runtime.getGlobalVariables().get("$stdin"); } else { currentFile = new RubyFile(runtime, filename); } return true; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubyArgsFile.java/buggy/src/org/jruby/RubyArgsFile.java |
currentFile = (RubyIO) runtime.getGlobalVariables().get("$stdin"); | currentFile = (RubyIO) getRuntime().getGlobalVariables().get("$stdin"); | protected boolean nextArgsFile() { RubyArray args = (RubyArray)runtime.getGlobalVariables().get("$*"); if (args.getLength() == 0) { if (currentFile == null) { currentFile = (RubyIO) runtime.getGlobalVariables().get("$stdin"); ((RubyString) runtime.getGlobalVariables().get("$FILENAME")).setValue("-"); currentLineNumber = 0; return true; } return false; } String filename = ((RubyString) args.shift()).getValue(); ((RubyString) runtime.getGlobalVariables().get("$FILENAME")).setValue(filename); if (filename.equals("-")) { currentFile = (RubyIO) runtime.getGlobalVariables().get("$stdin"); } else { currentFile = new RubyFile(runtime, filename); } return true; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubyArgsFile.java/buggy/src/org/jruby/RubyArgsFile.java |
currentFile = new RubyFile(runtime, filename); | currentFile = new RubyFile(getRuntime(), filename); | protected boolean nextArgsFile() { RubyArray args = (RubyArray)runtime.getGlobalVariables().get("$*"); if (args.getLength() == 0) { if (currentFile == null) { currentFile = (RubyIO) runtime.getGlobalVariables().get("$stdin"); ((RubyString) runtime.getGlobalVariables().get("$FILENAME")).setValue("-"); currentLineNumber = 0; return true; } return false; } String filename = ((RubyString) args.shift()).getValue(); ((RubyString) runtime.getGlobalVariables().get("$FILENAME")).setValue(filename); if (filename.equals("-")) { currentFile = (RubyIO) runtime.getGlobalVariables().get("$stdin"); } else { currentFile = new RubyFile(runtime, filename); } return true; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubyArgsFile.java/buggy/src/org/jruby/RubyArgsFile.java |
if ( ( factory == null && cssRule.getType() == CSSRule.STYLE_RULE ) || | if ( /*( factory == null && cssRule.getType() == CSSRule.STYLE_RULE ) ||*/ | public static Iterator fromCSSPropertyDecl( CSSRule cssRule, CSSStyleDeclaration style, String propName, int sequence ) { // HACK: special cases for RuleNormalizer...need to work this out cleanly PropertyFactory factory = (PropertyFactory)PRP_FACTORIES.get( propName ); if ( ( factory == null && cssRule.getType() == CSSRule.STYLE_RULE ) || propName.indexOf( "color" ) >= 0 && !propName.equals( "border" ) ) { RULE_NORMALIZER.normalize( (CSSStyleRule)cssRule ); style = ( (CSSStyleRule)cssRule ).getStyle(); } List list = new ArrayList(); switch ( style.getPropertyCSSValue( propName ).getCssValueType() ) { case CSSValue.CSS_PRIMITIVE_VALUE: if ( factory == null ) { XRProperty prop = new XRPropertyImpl( style, propName, sequence ); list.add( prop ); } else { Iterator iter = factory.explodeProperties( style, propName, sequence ); while ( iter.hasNext() ) { list.add( iter.next() ); } } break; case CSSValue.CSS_VALUE_LIST: if ( factory == null ) { XRProperty prop = new XRPropertyImpl( style, propName, sequence ); list.add( prop ); // HACK--right now, BP is allowed to not have a factory if ( !propName.equals( CSSName.BACKGROUND_POSITION ) && !propName.equals( CSSName.FONT_FAMILY ) ) { System.err.println( "! Property '" + propName + "' was assigned multiple values but no factory is assigned to it." ); } } else { Iterator iter = factory.explodeProperties( style, propName, sequence ); while ( iter.hasNext() ) { list.add( iter.next() ); } } break; default: System.err.println( "Property '" + propName + "' is neither primitive nor value list, can't handle." ); break; } return list.iterator(); } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/303478cb2d50ec8a2e30b215b0e54607a0ae9a68/XRPropertyImpl.java/buggy/src/java/org/xhtmlrenderer/css/impl/XRPropertyImpl.java |
if (blockingStatus instanceof IJobStatus) blockingJob = ((IJobStatus) blockingStatus).getJob(); | private BlockedJobsDialog(Shell parentShell, IProgressMonitor blocking, IStatus blockingStatus) { super(parentShell == null ? ProgressManagerUtil.getDefaultParent() : parentShell); blockingMonitor = blocking; if (blockingStatus instanceof IJobStatus) blockingJob = ((IJobStatus) blockingStatus).getJob(); setShellStyle(SWT.BORDER | SWT.TITLE | SWT.APPLICATION_MODAL | SWT.RESIZE | getDefaultOrientation()); // no close button setBlockOnOpen(false); setMessage(blockingStatus.getMessage()); } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/852f4fa051527b55d573274f8d387f43109b3ff6/BlockedJobsDialog.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/BlockedJobsDialog.java |
|
private ProgressTreeContentProvider getContentProvider() { return new ProgressTreeContentProvider(viewer, true) { /* * (non-Javadoc) * * @see org.eclipse.ui.internal.progress.ProgressContentProvider#getElements(java.lang.Object) | private ProgressViewerContentProvider getContentProvider() { return new ProgressViewerContentProvider(viewer, true,false) { /* (non-Javadoc) * @see org.eclipse.ui.internal.progress.ProgressViewerContentProvider#getElements(java.lang.Object) | private ProgressTreeContentProvider getContentProvider() { return new ProgressTreeContentProvider(viewer, true) { /* * (non-Javadoc) * * @see org.eclipse.ui.internal.progress.ProgressContentProvider#getElements(java.lang.Object) */ public Object[] getElements(Object inputElement) { Object[] elements = super.getElements(inputElement); Object[] result = new Object[elements.length + 1]; System.arraycopy(elements, 0, result, 1, elements.length); result[0] = blockedElement; return result; } }; } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/852f4fa051527b55d573274f8d387f43109b3ff6/BlockedJobsDialog.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/BlockedJobsDialog.java |
viewer = new NewProgressViewer(parent, SWT.MULTI | SWT.H_SCROLL | viewer = new DetailedProgressViewer(parent, SWT.MULTI | SWT.H_SCROLL | void showJobDetails(Composite parent) { viewer = new NewProgressViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER); if (blockingJob != null) viewer.setHighlightJob(blockingJob); viewer.setUseHashlookup(true); viewer.setSorter(new ViewerSorter() { /* * (non-Javadoc) * * @see org.eclipse.jface.viewers.ViewerSorter#compare(org.eclipse.jface.viewers.Viewer, * java.lang.Object, java.lang.Object) */ public int compare(Viewer testViewer, Object e1, Object e2) { return ((Comparable) e1).compareTo(e2); } }); IContentProvider provider = getContentProvider(); viewer.setContentProvider(provider); viewer.setInput(provider); viewer.setLabelProvider(new ProgressLabelProvider()); GridData data = new GridData(GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL | GridData.FILL_BOTH); data.horizontalSpan = 2; int heightHint = convertHeightInCharsToPixels(10); data.heightHint = heightHint; viewer.getControl().setLayoutData(data); } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/852f4fa051527b55d573274f8d387f43109b3ff6/BlockedJobsDialog.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/BlockedJobsDialog.java |
if (blockingJob != null) viewer.setHighlightJob(blockingJob); | void showJobDetails(Composite parent) { viewer = new NewProgressViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER); if (blockingJob != null) viewer.setHighlightJob(blockingJob); viewer.setUseHashlookup(true); viewer.setSorter(new ViewerSorter() { /* * (non-Javadoc) * * @see org.eclipse.jface.viewers.ViewerSorter#compare(org.eclipse.jface.viewers.Viewer, * java.lang.Object, java.lang.Object) */ public int compare(Viewer testViewer, Object e1, Object e2) { return ((Comparable) e1).compareTo(e2); } }); IContentProvider provider = getContentProvider(); viewer.setContentProvider(provider); viewer.setInput(provider); viewer.setLabelProvider(new ProgressLabelProvider()); GridData data = new GridData(GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL | GridData.FILL_BOTH); data.horizontalSpan = 2; int heightHint = convertHeightInCharsToPixels(10); data.heightHint = heightHint; viewer.getControl().setLayoutData(data); } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/852f4fa051527b55d573274f8d387f43109b3ff6/BlockedJobsDialog.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/BlockedJobsDialog.java |
|
IContentProvider provider = getContentProvider(); | ProgressViewerContentProvider provider = getContentProvider(); | void showJobDetails(Composite parent) { viewer = new NewProgressViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER); if (blockingJob != null) viewer.setHighlightJob(blockingJob); viewer.setUseHashlookup(true); viewer.setSorter(new ViewerSorter() { /* * (non-Javadoc) * * @see org.eclipse.jface.viewers.ViewerSorter#compare(org.eclipse.jface.viewers.Viewer, * java.lang.Object, java.lang.Object) */ public int compare(Viewer testViewer, Object e1, Object e2) { return ((Comparable) e1).compareTo(e2); } }); IContentProvider provider = getContentProvider(); viewer.setContentProvider(provider); viewer.setInput(provider); viewer.setLabelProvider(new ProgressLabelProvider()); GridData data = new GridData(GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL | GridData.FILL_BOTH); data.horizontalSpan = 2; int heightHint = convertHeightInCharsToPixels(10); data.heightHint = heightHint; viewer.getControl().setLayoutData(data); } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/852f4fa051527b55d573274f8d387f43109b3ff6/BlockedJobsDialog.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/BlockedJobsDialog.java |
public void paintChild( Context c, Box box, Renderer layout ) { if(Configuration.isTrue("xr.renderer.viewport-repaint",false)) { if(c.getGraphics().getClip() != null) { Rectangle2D oldclip = (Rectangle2D)c.getGraphics().getClip(); Rectangle2D box_rect = new Rectangle(box.x,box.y,box.width,box.height); if(oldclip.intersects(box_rect)) { layout.paint( c, box ); } return; } } layout.paint( c, box ); } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/3c2f0ef16203d2439d43879f53050721938d14f5/DefaultRenderer.java/clean/src/java/org/xhtmlrenderer/render/DefaultRenderer.java |
||
setModified(true); | public void setArticleId(String articleId) { if (((articleId == null) && (_articleId != null)) || ((articleId != null) && (_articleId == null)) || ((articleId != null) && (_articleId != null) && !articleId.equals(_articleId))) { if (!XSS_ALLOW_ARTICLEID) { articleId = XSSUtil.strip(articleId); } _articleId = articleId; setModified(true); } } | 57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/f4d6afc6707f57fd84bf6b624f0c119657b0a766/JournalContentSearchModel.java/clean/portal-ejb/src/com/liferay/portlet/journal/model/JournalContentSearchModel.java |
|
setModified(true); | public void setCompanyId(String companyId) { if (((companyId == null) && (_companyId != null)) || ((companyId != null) && (_companyId == null)) || ((companyId != null) && (_companyId != null) && !companyId.equals(_companyId))) { if (!XSS_ALLOW_COMPANYID) { companyId = XSSUtil.strip(companyId); } _companyId = companyId; setModified(true); } } | 57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/f4d6afc6707f57fd84bf6b624f0c119657b0a766/JournalContentSearchModel.java/clean/portal-ejb/src/com/liferay/portlet/journal/model/JournalContentSearchModel.java |
|
setModified(true); | public void setLayoutId(String layoutId) { if (((layoutId == null) && (_layoutId != null)) || ((layoutId != null) && (_layoutId == null)) || ((layoutId != null) && (_layoutId != null) && !layoutId.equals(_layoutId))) { if (!XSS_ALLOW_LAYOUTID) { layoutId = XSSUtil.strip(layoutId); } _layoutId = layoutId; setModified(true); } } | 57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/f4d6afc6707f57fd84bf6b624f0c119657b0a766/JournalContentSearchModel.java/clean/portal-ejb/src/com/liferay/portlet/journal/model/JournalContentSearchModel.java |
|
setModified(true); | public void setOwnerId(String ownerId) { if (((ownerId == null) && (_ownerId != null)) || ((ownerId != null) && (_ownerId == null)) || ((ownerId != null) && (_ownerId != null) && !ownerId.equals(_ownerId))) { if (!XSS_ALLOW_OWNERID) { ownerId = XSSUtil.strip(ownerId); } _ownerId = ownerId; setModified(true); } } | 57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/f4d6afc6707f57fd84bf6b624f0c119657b0a766/JournalContentSearchModel.java/clean/portal-ejb/src/com/liferay/portlet/journal/model/JournalContentSearchModel.java |
|
setModified(true); | public void setPortletId(String portletId) { if (((portletId == null) && (_portletId != null)) || ((portletId != null) && (_portletId == null)) || ((portletId != null) && (_portletId != null) && !portletId.equals(_portletId))) { if (!XSS_ALLOW_PORTLETID) { portletId = XSSUtil.strip(portletId); } _portletId = portletId; setModified(true); } } | 57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/f4d6afc6707f57fd84bf6b624f0c119657b0a766/JournalContentSearchModel.java/clean/portal-ejb/src/com/liferay/portlet/journal/model/JournalContentSearchModel.java |
|
value = getCreateDate().compareTo(address.getCreateDate()); | value = DateUtil.compareTo(getCreateDate(), address.getCreateDate()); | public int compareTo(Object obj) { if (obj == null) { return -1; } Address address = (Address)obj; int value = 0; value = getCreateDate().compareTo(address.getCreateDate()); if (value != 0) { return value; } return 0; } | 57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/0f4675cccf5487b482133977e732e847e320f104/AddressModel.java/clean/portal-ejb/src/com/liferay/portal/model/AddressModel.java |
RubyClass regexpClass = runtime.defineClass("Regexp", runtime.getClasses().getObjectClass()); | RubyClass regexpClass = runtime.defineClass("Regexp", runtime.getObject()); | public static RubyClass createRegexpClass(Ruby runtime) { RubyClass regexpClass = runtime.defineClass("Regexp", runtime.getClasses().getObjectClass()); CallbackFactory callbackFactory = runtime.callbackFactory(RubyRegexp.class); regexpClass.defineConstant("IGNORECASE", runtime.newFixnum(RE_OPTION_IGNORECASE)); regexpClass.defineConstant("EXTENDED", runtime.newFixnum(RE_OPTION_EXTENDED)); regexpClass.defineConstant("MULTILINE", runtime.newFixnum(RE_OPTION_MULTILINE)); regexpClass.defineMethod("initialize", callbackFactory.getOptMethod("initialize")); regexpClass.defineMethod("clone", callbackFactory.getMethod("rbClone")); regexpClass.defineMethod("==", callbackFactory.getMethod("equal", IRubyObject.class)); regexpClass.defineMethod("===", callbackFactory.getMethod("match", IRubyObject.class)); regexpClass.defineMethod("=~", callbackFactory.getMethod("match", IRubyObject.class)); regexpClass.defineMethod("~", callbackFactory.getMethod("match2")); regexpClass.defineMethod("match", callbackFactory.getMethod("match_m", IRubyObject.class)); regexpClass.defineMethod("inspect", callbackFactory.getMethod("inspect")); regexpClass.defineMethod("source", callbackFactory.getMethod("source")); regexpClass.defineMethod("casefold?", callbackFactory.getMethod("casefold")); regexpClass.defineMethod("kcode", callbackFactory.getMethod("kcode")); regexpClass.defineMethod("to_s", callbackFactory.getMethod("to_s")); regexpClass.defineSingletonMethod("new", callbackFactory.getOptSingletonMethod("newInstance")); regexpClass.defineSingletonMethod("compile", callbackFactory.getOptSingletonMethod("newInstance")); regexpClass.defineSingletonMethod("quote", callbackFactory.getSingletonMethod("quote", RubyString.class)); regexpClass.defineSingletonMethod("escape", callbackFactory.getSingletonMethod("quote", RubyString.class)); regexpClass.defineSingletonMethod("last_match", callbackFactory.getSingletonMethod("last_match_s")); return regexpClass; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/ca6b16e996ea9af83ce593594b9c69b9364a9924/RubyRegexp.java/clean/src/org/jruby/RubyRegexp.java |
setModified(true); | public void setCompanyId(String companyId) { if (((companyId == null) && (_companyId != null)) || ((companyId != null) && (_companyId == null)) || ((companyId != null) && (_companyId != null) && !companyId.equals(_companyId))) { if (!XSS_ALLOW_COMPANYID) { companyId = XSSUtil.strip(companyId); } _companyId = companyId; setModified(true); } } | 57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/f4d6afc6707f57fd84bf6b624f0c119657b0a766/WikiPageModel.java/clean/portal-ejb/src/com/liferay/portlet/wiki/model/WikiPageModel.java |
|
setModified(true); | public void setContent(String content) { if (((content == null) && (_content != null)) || ((content != null) && (_content == null)) || ((content != null) && (_content != null) && !content.equals(_content))) { if (!XSS_ALLOW_CONTENT) { content = XSSUtil.strip(content); } _content = content; setModified(true); } } | 57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/f4d6afc6707f57fd84bf6b624f0c119657b0a766/WikiPageModel.java/clean/portal-ejb/src/com/liferay/portlet/wiki/model/WikiPageModel.java |
|
setModified(true); | public void setCreateDate(Date createDate) { if (((createDate == null) && (_createDate != null)) || ((createDate != null) && (_createDate == null)) || ((createDate != null) && (_createDate != null) && !createDate.equals(_createDate))) { _createDate = createDate; setModified(true); } } | 57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/f4d6afc6707f57fd84bf6b624f0c119657b0a766/WikiPageModel.java/clean/portal-ejb/src/com/liferay/portlet/wiki/model/WikiPageModel.java |
|
setModified(true); | public void setFormat(String format) { if (((format == null) && (_format != null)) || ((format != null) && (_format == null)) || ((format != null) && (_format != null) && !format.equals(_format))) { if (!XSS_ALLOW_FORMAT) { format = XSSUtil.strip(format); } _format = format; setModified(true); } } | 57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/f4d6afc6707f57fd84bf6b624f0c119657b0a766/WikiPageModel.java/clean/portal-ejb/src/com/liferay/portlet/wiki/model/WikiPageModel.java |
|
setModified(true); | public void setHead(boolean head) { if (head != _head) { _head = head; setModified(true); } } | 57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/f4d6afc6707f57fd84bf6b624f0c119657b0a766/WikiPageModel.java/clean/portal-ejb/src/com/liferay/portlet/wiki/model/WikiPageModel.java |
|
setModified(true); | public void setNodeId(String nodeId) { if (((nodeId == null) && (_nodeId != null)) || ((nodeId != null) && (_nodeId == null)) || ((nodeId != null) && (_nodeId != null) && !nodeId.equals(_nodeId))) { if (!XSS_ALLOW_NODEID) { nodeId = XSSUtil.strip(nodeId); } _nodeId = nodeId; setModified(true); } } | 57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/f4d6afc6707f57fd84bf6b624f0c119657b0a766/WikiPageModel.java/clean/portal-ejb/src/com/liferay/portlet/wiki/model/WikiPageModel.java |
|
setModified(true); | public void setTitle(String title) { if (((title == null) && (_title != null)) || ((title != null) && (_title == null)) || ((title != null) && (_title != null) && !title.equals(_title))) { if (!XSS_ALLOW_TITLE) { title = XSSUtil.strip(title); } _title = title; setModified(true); } } | 57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/f4d6afc6707f57fd84bf6b624f0c119657b0a766/WikiPageModel.java/clean/portal-ejb/src/com/liferay/portlet/wiki/model/WikiPageModel.java |
|
setModified(true); | public void setUserId(String userId) { if (((userId == null) && (_userId != null)) || ((userId != null) && (_userId == null)) || ((userId != null) && (_userId != null) && !userId.equals(_userId))) { if (!XSS_ALLOW_USERID) { userId = XSSUtil.strip(userId); } _userId = userId; setModified(true); } } | 57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/f4d6afc6707f57fd84bf6b624f0c119657b0a766/WikiPageModel.java/clean/portal-ejb/src/com/liferay/portlet/wiki/model/WikiPageModel.java |
|
setModified(true); | public void setUserName(String userName) { if (((userName == null) && (_userName != null)) || ((userName != null) && (_userName == null)) || ((userName != null) && (_userName != null) && !userName.equals(_userName))) { if (!XSS_ALLOW_USERNAME) { userName = XSSUtil.strip(userName); } _userName = userName; setModified(true); } } | 57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/f4d6afc6707f57fd84bf6b624f0c119657b0a766/WikiPageModel.java/clean/portal-ejb/src/com/liferay/portlet/wiki/model/WikiPageModel.java |
|
setModified(true); | public void setVersion(double version) { if (version != _version) { _version = version; setModified(true); } } | 57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/f4d6afc6707f57fd84bf6b624f0c119657b0a766/WikiPageModel.java/clean/portal-ejb/src/com/liferay/portlet/wiki/model/WikiPageModel.java |
|
return new Dimension(this.x - initialX, this.y - initialY); | setRelativeOffset(new Dimension(this.x - initialX, this.y - initialY)); return getRelativeOffset(); | public Dimension positionRelative(CssContext cssCtx) { int initialX = this.x; int initialY = this.y; CalculatedStyle style = getStyle().getCalculatedStyle(); if (! style.isIdent(CSSName.LEFT, IdentValue.AUTO)) { this.x += style.getFloatPropertyProportionalWidth( CSSName.LEFT, getContainingBlock().getContentWidth(), cssCtx); } else if (! style.isIdent(CSSName.RIGHT, IdentValue.AUTO)) { this.x += style.getFloatPropertyProportionalWidth( CSSName.LEFT, getContainingBlock().getContentWidth(), cssCtx); } int cbContentHeight = 0; if (! getContainingBlock().getStyle().isAutoHeight()) { CalculatedStyle cbStyle = getContainingBlock().getStyle().getCalculatedStyle(); cbContentHeight = (int)cbStyle.getFloatPropertyProportionalHeight( CSSName.HEIGHT, 0, cssCtx); } if (!style.isIdent(CSSName.TOP, IdentValue.AUTO)) { this.y += style.getFloatPropertyProportionalHeight( CSSName.TOP, cbContentHeight, cssCtx); } else if (!style.isIdent(CSSName.BOTTOM, IdentValue.AUTO)) { this.y += style.getFloatPropertyProportionalHeight( CSSName.TOP, cbContentHeight, cssCtx); } return new Dimension(this.x - initialX, this.y - initialY); } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/868e29fe0bd81b55cbd739f60feedbe5488f9adb/Box.java/clean/src/java/org/xhtmlrenderer/render/Box.java |
int rightCorner = (((sides & RIGHT) == RIGHT) ? (int)border.right() : adjust); int leftCorner = (((sides & LEFT) == LEFT) ? (int)border.left() - adjust : 0); int topCorner = (((sides & TOP) == TOP) ? (int)border.top() - adjust : 0); int bottomCorner = (((sides & BOTTOM) == BOTTOM) ? (int)border.bottom() : adjust); | int rightCorner = (((sides & RIGHT) == RIGHT) ? (int) border.right() : adjust); int leftCorner = (((sides & LEFT) == LEFT) ? (int) border.left() - adjust : 0); int topCorner = (((sides & TOP) == TOP) ? (int) border.top() - adjust : 0); int bottomCorner = (((sides & BOTTOM) == BOTTOM) ? (int) border.bottom() : adjust); | private static Polygon getBevelledPolygon(final Rectangle bounds, final BorderPropertySet border, final int sides, int currentSide, boolean isClipRegion) { //adjust for bug in polygon filling final int adjust; //adjust inside corners to make sides fit snugly final int snuggle; if (isClipRegion) { adjust = 0; snuggle = 1; } else { adjust = 1; snuggle = 0; } int rightCorner = (((sides & RIGHT) == RIGHT) ? (int)border.right() : adjust); int leftCorner = (((sides & LEFT) == LEFT) ? (int)border.left() - adjust : 0); int topCorner = (((sides & TOP) == TOP) ? (int)border.top() - adjust : 0); int bottomCorner = (((sides & BOTTOM) == BOTTOM) ? (int)border.bottom() : adjust); Polygon poly = null; if (currentSide == TOP) { if ((int)border.top() != 1) { // use polygons for borders over 1px wide poly = new Polygon(); poly.addPoint(bounds.x, bounds.y); poly.addPoint(bounds.x + bounds.width - adjust, bounds.y); poly.addPoint(bounds.x + bounds.width - rightCorner, bounds.y + (int)border.top() - adjust); poly.addPoint(bounds.x + leftCorner, bounds.y + (int)border.top() - adjust); } } else if (currentSide == BOTTOM) { if ((int)border.bottom() != 1) { poly = new Polygon(); // upper right poly.addPoint(bounds.x + bounds.width - rightCorner, bounds.y + bounds.height - (int)border.bottom()); // upper left poly.addPoint(bounds.x + leftCorner, bounds.y + bounds.height - (int)border.bottom()); // lower left poly.addPoint(bounds.x, bounds.y + bounds.height - adjust); // lower right poly.addPoint(bounds.x + bounds.width - adjust, bounds.y + bounds.height - adjust); } } else if (currentSide == RIGHT) { if ((int)border.right() != 1) { poly = new Polygon(); poly.addPoint(bounds.x + bounds.width - adjust, bounds.y); poly.addPoint(bounds.x + bounds.width - (int)border.right(), bounds.y + topCorner - snuggle); poly.addPoint(bounds.x + bounds.width - (int)border.right(), bounds.y + bounds.height - bottomCorner + snuggle); poly.addPoint(bounds.x + bounds.width - adjust, bounds.y + bounds.height - adjust); } } else if (currentSide == LEFT) { if ((int)border.left() != 1) { poly = new Polygon(); poly.addPoint(bounds.x, bounds.y); poly.addPoint(bounds.x + (int)border.left() - adjust, bounds.y + topCorner - snuggle); poly.addPoint(bounds.x + (int)border.left() - adjust, bounds.y + bounds.height - bottomCorner + snuggle); poly.addPoint(bounds.x, bounds.y + bounds.height - adjust); } } return poly; } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/1ca686f10a0033c5e79968a5d664589db0fef2ec/BorderPainter.java/buggy/src/java/org/xhtmlrenderer/render/BorderPainter.java |
if ((int)border.top() != 1) { | if ((int) border.top() != 1) { | private static Polygon getBevelledPolygon(final Rectangle bounds, final BorderPropertySet border, final int sides, int currentSide, boolean isClipRegion) { //adjust for bug in polygon filling final int adjust; //adjust inside corners to make sides fit snugly final int snuggle; if (isClipRegion) { adjust = 0; snuggle = 1; } else { adjust = 1; snuggle = 0; } int rightCorner = (((sides & RIGHT) == RIGHT) ? (int)border.right() : adjust); int leftCorner = (((sides & LEFT) == LEFT) ? (int)border.left() - adjust : 0); int topCorner = (((sides & TOP) == TOP) ? (int)border.top() - adjust : 0); int bottomCorner = (((sides & BOTTOM) == BOTTOM) ? (int)border.bottom() : adjust); Polygon poly = null; if (currentSide == TOP) { if ((int)border.top() != 1) { // use polygons for borders over 1px wide poly = new Polygon(); poly.addPoint(bounds.x, bounds.y); poly.addPoint(bounds.x + bounds.width - adjust, bounds.y); poly.addPoint(bounds.x + bounds.width - rightCorner, bounds.y + (int)border.top() - adjust); poly.addPoint(bounds.x + leftCorner, bounds.y + (int)border.top() - adjust); } } else if (currentSide == BOTTOM) { if ((int)border.bottom() != 1) { poly = new Polygon(); // upper right poly.addPoint(bounds.x + bounds.width - rightCorner, bounds.y + bounds.height - (int)border.bottom()); // upper left poly.addPoint(bounds.x + leftCorner, bounds.y + bounds.height - (int)border.bottom()); // lower left poly.addPoint(bounds.x, bounds.y + bounds.height - adjust); // lower right poly.addPoint(bounds.x + bounds.width - adjust, bounds.y + bounds.height - adjust); } } else if (currentSide == RIGHT) { if ((int)border.right() != 1) { poly = new Polygon(); poly.addPoint(bounds.x + bounds.width - adjust, bounds.y); poly.addPoint(bounds.x + bounds.width - (int)border.right(), bounds.y + topCorner - snuggle); poly.addPoint(bounds.x + bounds.width - (int)border.right(), bounds.y + bounds.height - bottomCorner + snuggle); poly.addPoint(bounds.x + bounds.width - adjust, bounds.y + bounds.height - adjust); } } else if (currentSide == LEFT) { if ((int)border.left() != 1) { poly = new Polygon(); poly.addPoint(bounds.x, bounds.y); poly.addPoint(bounds.x + (int)border.left() - adjust, bounds.y + topCorner - snuggle); poly.addPoint(bounds.x + (int)border.left() - adjust, bounds.y + bounds.height - bottomCorner + snuggle); poly.addPoint(bounds.x, bounds.y + bounds.height - adjust); } } return poly; } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/1ca686f10a0033c5e79968a5d664589db0fef2ec/BorderPainter.java/buggy/src/java/org/xhtmlrenderer/render/BorderPainter.java |
poly.addPoint(bounds.x + bounds.width - rightCorner, bounds.y + (int)border.top() - adjust); poly.addPoint(bounds.x + leftCorner, bounds.y + (int)border.top() - adjust); | poly.addPoint(bounds.x + bounds.width - rightCorner, bounds.y + (int) border.top() - adjust); poly.addPoint(bounds.x + leftCorner, bounds.y + (int) border.top() - adjust); | private static Polygon getBevelledPolygon(final Rectangle bounds, final BorderPropertySet border, final int sides, int currentSide, boolean isClipRegion) { //adjust for bug in polygon filling final int adjust; //adjust inside corners to make sides fit snugly final int snuggle; if (isClipRegion) { adjust = 0; snuggle = 1; } else { adjust = 1; snuggle = 0; } int rightCorner = (((sides & RIGHT) == RIGHT) ? (int)border.right() : adjust); int leftCorner = (((sides & LEFT) == LEFT) ? (int)border.left() - adjust : 0); int topCorner = (((sides & TOP) == TOP) ? (int)border.top() - adjust : 0); int bottomCorner = (((sides & BOTTOM) == BOTTOM) ? (int)border.bottom() : adjust); Polygon poly = null; if (currentSide == TOP) { if ((int)border.top() != 1) { // use polygons for borders over 1px wide poly = new Polygon(); poly.addPoint(bounds.x, bounds.y); poly.addPoint(bounds.x + bounds.width - adjust, bounds.y); poly.addPoint(bounds.x + bounds.width - rightCorner, bounds.y + (int)border.top() - adjust); poly.addPoint(bounds.x + leftCorner, bounds.y + (int)border.top() - adjust); } } else if (currentSide == BOTTOM) { if ((int)border.bottom() != 1) { poly = new Polygon(); // upper right poly.addPoint(bounds.x + bounds.width - rightCorner, bounds.y + bounds.height - (int)border.bottom()); // upper left poly.addPoint(bounds.x + leftCorner, bounds.y + bounds.height - (int)border.bottom()); // lower left poly.addPoint(bounds.x, bounds.y + bounds.height - adjust); // lower right poly.addPoint(bounds.x + bounds.width - adjust, bounds.y + bounds.height - adjust); } } else if (currentSide == RIGHT) { if ((int)border.right() != 1) { poly = new Polygon(); poly.addPoint(bounds.x + bounds.width - adjust, bounds.y); poly.addPoint(bounds.x + bounds.width - (int)border.right(), bounds.y + topCorner - snuggle); poly.addPoint(bounds.x + bounds.width - (int)border.right(), bounds.y + bounds.height - bottomCorner + snuggle); poly.addPoint(bounds.x + bounds.width - adjust, bounds.y + bounds.height - adjust); } } else if (currentSide == LEFT) { if ((int)border.left() != 1) { poly = new Polygon(); poly.addPoint(bounds.x, bounds.y); poly.addPoint(bounds.x + (int)border.left() - adjust, bounds.y + topCorner - snuggle); poly.addPoint(bounds.x + (int)border.left() - adjust, bounds.y + bounds.height - bottomCorner + snuggle); poly.addPoint(bounds.x, bounds.y + bounds.height - adjust); } } return poly; } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/1ca686f10a0033c5e79968a5d664589db0fef2ec/BorderPainter.java/buggy/src/java/org/xhtmlrenderer/render/BorderPainter.java |
if ((int)border.bottom() != 1) { | if ((int) border.bottom() != 1) { | private static Polygon getBevelledPolygon(final Rectangle bounds, final BorderPropertySet border, final int sides, int currentSide, boolean isClipRegion) { //adjust for bug in polygon filling final int adjust; //adjust inside corners to make sides fit snugly final int snuggle; if (isClipRegion) { adjust = 0; snuggle = 1; } else { adjust = 1; snuggle = 0; } int rightCorner = (((sides & RIGHT) == RIGHT) ? (int)border.right() : adjust); int leftCorner = (((sides & LEFT) == LEFT) ? (int)border.left() - adjust : 0); int topCorner = (((sides & TOP) == TOP) ? (int)border.top() - adjust : 0); int bottomCorner = (((sides & BOTTOM) == BOTTOM) ? (int)border.bottom() : adjust); Polygon poly = null; if (currentSide == TOP) { if ((int)border.top() != 1) { // use polygons for borders over 1px wide poly = new Polygon(); poly.addPoint(bounds.x, bounds.y); poly.addPoint(bounds.x + bounds.width - adjust, bounds.y); poly.addPoint(bounds.x + bounds.width - rightCorner, bounds.y + (int)border.top() - adjust); poly.addPoint(bounds.x + leftCorner, bounds.y + (int)border.top() - adjust); } } else if (currentSide == BOTTOM) { if ((int)border.bottom() != 1) { poly = new Polygon(); // upper right poly.addPoint(bounds.x + bounds.width - rightCorner, bounds.y + bounds.height - (int)border.bottom()); // upper left poly.addPoint(bounds.x + leftCorner, bounds.y + bounds.height - (int)border.bottom()); // lower left poly.addPoint(bounds.x, bounds.y + bounds.height - adjust); // lower right poly.addPoint(bounds.x + bounds.width - adjust, bounds.y + bounds.height - adjust); } } else if (currentSide == RIGHT) { if ((int)border.right() != 1) { poly = new Polygon(); poly.addPoint(bounds.x + bounds.width - adjust, bounds.y); poly.addPoint(bounds.x + bounds.width - (int)border.right(), bounds.y + topCorner - snuggle); poly.addPoint(bounds.x + bounds.width - (int)border.right(), bounds.y + bounds.height - bottomCorner + snuggle); poly.addPoint(bounds.x + bounds.width - adjust, bounds.y + bounds.height - adjust); } } else if (currentSide == LEFT) { if ((int)border.left() != 1) { poly = new Polygon(); poly.addPoint(bounds.x, bounds.y); poly.addPoint(bounds.x + (int)border.left() - adjust, bounds.y + topCorner - snuggle); poly.addPoint(bounds.x + (int)border.left() - adjust, bounds.y + bounds.height - bottomCorner + snuggle); poly.addPoint(bounds.x, bounds.y + bounds.height - adjust); } } return poly; } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/1ca686f10a0033c5e79968a5d664589db0fef2ec/BorderPainter.java/buggy/src/java/org/xhtmlrenderer/render/BorderPainter.java |
poly.addPoint(bounds.x + bounds.width - rightCorner, bounds.y + bounds.height - (int)border.bottom()); | poly.addPoint(bounds.x + bounds.width - rightCorner, bounds.y + bounds.height - (int) border.bottom()); | private static Polygon getBevelledPolygon(final Rectangle bounds, final BorderPropertySet border, final int sides, int currentSide, boolean isClipRegion) { //adjust for bug in polygon filling final int adjust; //adjust inside corners to make sides fit snugly final int snuggle; if (isClipRegion) { adjust = 0; snuggle = 1; } else { adjust = 1; snuggle = 0; } int rightCorner = (((sides & RIGHT) == RIGHT) ? (int)border.right() : adjust); int leftCorner = (((sides & LEFT) == LEFT) ? (int)border.left() - adjust : 0); int topCorner = (((sides & TOP) == TOP) ? (int)border.top() - adjust : 0); int bottomCorner = (((sides & BOTTOM) == BOTTOM) ? (int)border.bottom() : adjust); Polygon poly = null; if (currentSide == TOP) { if ((int)border.top() != 1) { // use polygons for borders over 1px wide poly = new Polygon(); poly.addPoint(bounds.x, bounds.y); poly.addPoint(bounds.x + bounds.width - adjust, bounds.y); poly.addPoint(bounds.x + bounds.width - rightCorner, bounds.y + (int)border.top() - adjust); poly.addPoint(bounds.x + leftCorner, bounds.y + (int)border.top() - adjust); } } else if (currentSide == BOTTOM) { if ((int)border.bottom() != 1) { poly = new Polygon(); // upper right poly.addPoint(bounds.x + bounds.width - rightCorner, bounds.y + bounds.height - (int)border.bottom()); // upper left poly.addPoint(bounds.x + leftCorner, bounds.y + bounds.height - (int)border.bottom()); // lower left poly.addPoint(bounds.x, bounds.y + bounds.height - adjust); // lower right poly.addPoint(bounds.x + bounds.width - adjust, bounds.y + bounds.height - adjust); } } else if (currentSide == RIGHT) { if ((int)border.right() != 1) { poly = new Polygon(); poly.addPoint(bounds.x + bounds.width - adjust, bounds.y); poly.addPoint(bounds.x + bounds.width - (int)border.right(), bounds.y + topCorner - snuggle); poly.addPoint(bounds.x + bounds.width - (int)border.right(), bounds.y + bounds.height - bottomCorner + snuggle); poly.addPoint(bounds.x + bounds.width - adjust, bounds.y + bounds.height - adjust); } } else if (currentSide == LEFT) { if ((int)border.left() != 1) { poly = new Polygon(); poly.addPoint(bounds.x, bounds.y); poly.addPoint(bounds.x + (int)border.left() - adjust, bounds.y + topCorner - snuggle); poly.addPoint(bounds.x + (int)border.left() - adjust, bounds.y + bounds.height - bottomCorner + snuggle); poly.addPoint(bounds.x, bounds.y + bounds.height - adjust); } } return poly; } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/1ca686f10a0033c5e79968a5d664589db0fef2ec/BorderPainter.java/buggy/src/java/org/xhtmlrenderer/render/BorderPainter.java |
poly.addPoint(bounds.x + leftCorner, bounds.y + bounds.height - (int)border.bottom()); | poly.addPoint(bounds.x + leftCorner, bounds.y + bounds.height - (int) border.bottom()); | private static Polygon getBevelledPolygon(final Rectangle bounds, final BorderPropertySet border, final int sides, int currentSide, boolean isClipRegion) { //adjust for bug in polygon filling final int adjust; //adjust inside corners to make sides fit snugly final int snuggle; if (isClipRegion) { adjust = 0; snuggle = 1; } else { adjust = 1; snuggle = 0; } int rightCorner = (((sides & RIGHT) == RIGHT) ? (int)border.right() : adjust); int leftCorner = (((sides & LEFT) == LEFT) ? (int)border.left() - adjust : 0); int topCorner = (((sides & TOP) == TOP) ? (int)border.top() - adjust : 0); int bottomCorner = (((sides & BOTTOM) == BOTTOM) ? (int)border.bottom() : adjust); Polygon poly = null; if (currentSide == TOP) { if ((int)border.top() != 1) { // use polygons for borders over 1px wide poly = new Polygon(); poly.addPoint(bounds.x, bounds.y); poly.addPoint(bounds.x + bounds.width - adjust, bounds.y); poly.addPoint(bounds.x + bounds.width - rightCorner, bounds.y + (int)border.top() - adjust); poly.addPoint(bounds.x + leftCorner, bounds.y + (int)border.top() - adjust); } } else if (currentSide == BOTTOM) { if ((int)border.bottom() != 1) { poly = new Polygon(); // upper right poly.addPoint(bounds.x + bounds.width - rightCorner, bounds.y + bounds.height - (int)border.bottom()); // upper left poly.addPoint(bounds.x + leftCorner, bounds.y + bounds.height - (int)border.bottom()); // lower left poly.addPoint(bounds.x, bounds.y + bounds.height - adjust); // lower right poly.addPoint(bounds.x + bounds.width - adjust, bounds.y + bounds.height - adjust); } } else if (currentSide == RIGHT) { if ((int)border.right() != 1) { poly = new Polygon(); poly.addPoint(bounds.x + bounds.width - adjust, bounds.y); poly.addPoint(bounds.x + bounds.width - (int)border.right(), bounds.y + topCorner - snuggle); poly.addPoint(bounds.x + bounds.width - (int)border.right(), bounds.y + bounds.height - bottomCorner + snuggle); poly.addPoint(bounds.x + bounds.width - adjust, bounds.y + bounds.height - adjust); } } else if (currentSide == LEFT) { if ((int)border.left() != 1) { poly = new Polygon(); poly.addPoint(bounds.x, bounds.y); poly.addPoint(bounds.x + (int)border.left() - adjust, bounds.y + topCorner - snuggle); poly.addPoint(bounds.x + (int)border.left() - adjust, bounds.y + bounds.height - bottomCorner + snuggle); poly.addPoint(bounds.x, bounds.y + bounds.height - adjust); } } return poly; } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/1ca686f10a0033c5e79968a5d664589db0fef2ec/BorderPainter.java/buggy/src/java/org/xhtmlrenderer/render/BorderPainter.java |
if ((int)border.right() != 1) { | if ((int) border.right() != 1) { | private static Polygon getBevelledPolygon(final Rectangle bounds, final BorderPropertySet border, final int sides, int currentSide, boolean isClipRegion) { //adjust for bug in polygon filling final int adjust; //adjust inside corners to make sides fit snugly final int snuggle; if (isClipRegion) { adjust = 0; snuggle = 1; } else { adjust = 1; snuggle = 0; } int rightCorner = (((sides & RIGHT) == RIGHT) ? (int)border.right() : adjust); int leftCorner = (((sides & LEFT) == LEFT) ? (int)border.left() - adjust : 0); int topCorner = (((sides & TOP) == TOP) ? (int)border.top() - adjust : 0); int bottomCorner = (((sides & BOTTOM) == BOTTOM) ? (int)border.bottom() : adjust); Polygon poly = null; if (currentSide == TOP) { if ((int)border.top() != 1) { // use polygons for borders over 1px wide poly = new Polygon(); poly.addPoint(bounds.x, bounds.y); poly.addPoint(bounds.x + bounds.width - adjust, bounds.y); poly.addPoint(bounds.x + bounds.width - rightCorner, bounds.y + (int)border.top() - adjust); poly.addPoint(bounds.x + leftCorner, bounds.y + (int)border.top() - adjust); } } else if (currentSide == BOTTOM) { if ((int)border.bottom() != 1) { poly = new Polygon(); // upper right poly.addPoint(bounds.x + bounds.width - rightCorner, bounds.y + bounds.height - (int)border.bottom()); // upper left poly.addPoint(bounds.x + leftCorner, bounds.y + bounds.height - (int)border.bottom()); // lower left poly.addPoint(bounds.x, bounds.y + bounds.height - adjust); // lower right poly.addPoint(bounds.x + bounds.width - adjust, bounds.y + bounds.height - adjust); } } else if (currentSide == RIGHT) { if ((int)border.right() != 1) { poly = new Polygon(); poly.addPoint(bounds.x + bounds.width - adjust, bounds.y); poly.addPoint(bounds.x + bounds.width - (int)border.right(), bounds.y + topCorner - snuggle); poly.addPoint(bounds.x + bounds.width - (int)border.right(), bounds.y + bounds.height - bottomCorner + snuggle); poly.addPoint(bounds.x + bounds.width - adjust, bounds.y + bounds.height - adjust); } } else if (currentSide == LEFT) { if ((int)border.left() != 1) { poly = new Polygon(); poly.addPoint(bounds.x, bounds.y); poly.addPoint(bounds.x + (int)border.left() - adjust, bounds.y + topCorner - snuggle); poly.addPoint(bounds.x + (int)border.left() - adjust, bounds.y + bounds.height - bottomCorner + snuggle); poly.addPoint(bounds.x, bounds.y + bounds.height - adjust); } } return poly; } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/1ca686f10a0033c5e79968a5d664589db0fef2ec/BorderPainter.java/buggy/src/java/org/xhtmlrenderer/render/BorderPainter.java |
poly.addPoint(bounds.x + bounds.width - (int)border.right(), bounds.y + topCorner - snuggle); poly.addPoint(bounds.x + bounds.width - (int)border.right(), bounds.y + bounds.height - bottomCorner + snuggle); | poly.addPoint(bounds.x + bounds.width - (int) border.right(), bounds.y + topCorner - snuggle); poly.addPoint(bounds.x + bounds.width - (int) border.right(), bounds.y + bounds.height - bottomCorner + snuggle); | private static Polygon getBevelledPolygon(final Rectangle bounds, final BorderPropertySet border, final int sides, int currentSide, boolean isClipRegion) { //adjust for bug in polygon filling final int adjust; //adjust inside corners to make sides fit snugly final int snuggle; if (isClipRegion) { adjust = 0; snuggle = 1; } else { adjust = 1; snuggle = 0; } int rightCorner = (((sides & RIGHT) == RIGHT) ? (int)border.right() : adjust); int leftCorner = (((sides & LEFT) == LEFT) ? (int)border.left() - adjust : 0); int topCorner = (((sides & TOP) == TOP) ? (int)border.top() - adjust : 0); int bottomCorner = (((sides & BOTTOM) == BOTTOM) ? (int)border.bottom() : adjust); Polygon poly = null; if (currentSide == TOP) { if ((int)border.top() != 1) { // use polygons for borders over 1px wide poly = new Polygon(); poly.addPoint(bounds.x, bounds.y); poly.addPoint(bounds.x + bounds.width - adjust, bounds.y); poly.addPoint(bounds.x + bounds.width - rightCorner, bounds.y + (int)border.top() - adjust); poly.addPoint(bounds.x + leftCorner, bounds.y + (int)border.top() - adjust); } } else if (currentSide == BOTTOM) { if ((int)border.bottom() != 1) { poly = new Polygon(); // upper right poly.addPoint(bounds.x + bounds.width - rightCorner, bounds.y + bounds.height - (int)border.bottom()); // upper left poly.addPoint(bounds.x + leftCorner, bounds.y + bounds.height - (int)border.bottom()); // lower left poly.addPoint(bounds.x, bounds.y + bounds.height - adjust); // lower right poly.addPoint(bounds.x + bounds.width - adjust, bounds.y + bounds.height - adjust); } } else if (currentSide == RIGHT) { if ((int)border.right() != 1) { poly = new Polygon(); poly.addPoint(bounds.x + bounds.width - adjust, bounds.y); poly.addPoint(bounds.x + bounds.width - (int)border.right(), bounds.y + topCorner - snuggle); poly.addPoint(bounds.x + bounds.width - (int)border.right(), bounds.y + bounds.height - bottomCorner + snuggle); poly.addPoint(bounds.x + bounds.width - adjust, bounds.y + bounds.height - adjust); } } else if (currentSide == LEFT) { if ((int)border.left() != 1) { poly = new Polygon(); poly.addPoint(bounds.x, bounds.y); poly.addPoint(bounds.x + (int)border.left() - adjust, bounds.y + topCorner - snuggle); poly.addPoint(bounds.x + (int)border.left() - adjust, bounds.y + bounds.height - bottomCorner + snuggle); poly.addPoint(bounds.x, bounds.y + bounds.height - adjust); } } return poly; } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/1ca686f10a0033c5e79968a5d664589db0fef2ec/BorderPainter.java/buggy/src/java/org/xhtmlrenderer/render/BorderPainter.java |
if ((int)border.left() != 1) { | if ((int) border.left() != 1) { | private static Polygon getBevelledPolygon(final Rectangle bounds, final BorderPropertySet border, final int sides, int currentSide, boolean isClipRegion) { //adjust for bug in polygon filling final int adjust; //adjust inside corners to make sides fit snugly final int snuggle; if (isClipRegion) { adjust = 0; snuggle = 1; } else { adjust = 1; snuggle = 0; } int rightCorner = (((sides & RIGHT) == RIGHT) ? (int)border.right() : adjust); int leftCorner = (((sides & LEFT) == LEFT) ? (int)border.left() - adjust : 0); int topCorner = (((sides & TOP) == TOP) ? (int)border.top() - adjust : 0); int bottomCorner = (((sides & BOTTOM) == BOTTOM) ? (int)border.bottom() : adjust); Polygon poly = null; if (currentSide == TOP) { if ((int)border.top() != 1) { // use polygons for borders over 1px wide poly = new Polygon(); poly.addPoint(bounds.x, bounds.y); poly.addPoint(bounds.x + bounds.width - adjust, bounds.y); poly.addPoint(bounds.x + bounds.width - rightCorner, bounds.y + (int)border.top() - adjust); poly.addPoint(bounds.x + leftCorner, bounds.y + (int)border.top() - adjust); } } else if (currentSide == BOTTOM) { if ((int)border.bottom() != 1) { poly = new Polygon(); // upper right poly.addPoint(bounds.x + bounds.width - rightCorner, bounds.y + bounds.height - (int)border.bottom()); // upper left poly.addPoint(bounds.x + leftCorner, bounds.y + bounds.height - (int)border.bottom()); // lower left poly.addPoint(bounds.x, bounds.y + bounds.height - adjust); // lower right poly.addPoint(bounds.x + bounds.width - adjust, bounds.y + bounds.height - adjust); } } else if (currentSide == RIGHT) { if ((int)border.right() != 1) { poly = new Polygon(); poly.addPoint(bounds.x + bounds.width - adjust, bounds.y); poly.addPoint(bounds.x + bounds.width - (int)border.right(), bounds.y + topCorner - snuggle); poly.addPoint(bounds.x + bounds.width - (int)border.right(), bounds.y + bounds.height - bottomCorner + snuggle); poly.addPoint(bounds.x + bounds.width - adjust, bounds.y + bounds.height - adjust); } } else if (currentSide == LEFT) { if ((int)border.left() != 1) { poly = new Polygon(); poly.addPoint(bounds.x, bounds.y); poly.addPoint(bounds.x + (int)border.left() - adjust, bounds.y + topCorner - snuggle); poly.addPoint(bounds.x + (int)border.left() - adjust, bounds.y + bounds.height - bottomCorner + snuggle); poly.addPoint(bounds.x, bounds.y + bounds.height - adjust); } } return poly; } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/1ca686f10a0033c5e79968a5d664589db0fef2ec/BorderPainter.java/buggy/src/java/org/xhtmlrenderer/render/BorderPainter.java |
poly.addPoint(bounds.x + (int)border.left() - adjust, bounds.y + topCorner - snuggle); poly.addPoint(bounds.x + (int)border.left() - adjust, bounds.y + bounds.height - bottomCorner + snuggle); | poly.addPoint(bounds.x + (int) border.left() - adjust, bounds.y + topCorner - snuggle); poly.addPoint(bounds.x + (int) border.left() - adjust, bounds.y + bounds.height - bottomCorner + snuggle); | private static Polygon getBevelledPolygon(final Rectangle bounds, final BorderPropertySet border, final int sides, int currentSide, boolean isClipRegion) { //adjust for bug in polygon filling final int adjust; //adjust inside corners to make sides fit snugly final int snuggle; if (isClipRegion) { adjust = 0; snuggle = 1; } else { adjust = 1; snuggle = 0; } int rightCorner = (((sides & RIGHT) == RIGHT) ? (int)border.right() : adjust); int leftCorner = (((sides & LEFT) == LEFT) ? (int)border.left() - adjust : 0); int topCorner = (((sides & TOP) == TOP) ? (int)border.top() - adjust : 0); int bottomCorner = (((sides & BOTTOM) == BOTTOM) ? (int)border.bottom() : adjust); Polygon poly = null; if (currentSide == TOP) { if ((int)border.top() != 1) { // use polygons for borders over 1px wide poly = new Polygon(); poly.addPoint(bounds.x, bounds.y); poly.addPoint(bounds.x + bounds.width - adjust, bounds.y); poly.addPoint(bounds.x + bounds.width - rightCorner, bounds.y + (int)border.top() - adjust); poly.addPoint(bounds.x + leftCorner, bounds.y + (int)border.top() - adjust); } } else if (currentSide == BOTTOM) { if ((int)border.bottom() != 1) { poly = new Polygon(); // upper right poly.addPoint(bounds.x + bounds.width - rightCorner, bounds.y + bounds.height - (int)border.bottom()); // upper left poly.addPoint(bounds.x + leftCorner, bounds.y + bounds.height - (int)border.bottom()); // lower left poly.addPoint(bounds.x, bounds.y + bounds.height - adjust); // lower right poly.addPoint(bounds.x + bounds.width - adjust, bounds.y + bounds.height - adjust); } } else if (currentSide == RIGHT) { if ((int)border.right() != 1) { poly = new Polygon(); poly.addPoint(bounds.x + bounds.width - adjust, bounds.y); poly.addPoint(bounds.x + bounds.width - (int)border.right(), bounds.y + topCorner - snuggle); poly.addPoint(bounds.x + bounds.width - (int)border.right(), bounds.y + bounds.height - bottomCorner + snuggle); poly.addPoint(bounds.x + bounds.width - adjust, bounds.y + bounds.height - adjust); } } else if (currentSide == LEFT) { if ((int)border.left() != 1) { poly = new Polygon(); poly.addPoint(bounds.x, bounds.y); poly.addPoint(bounds.x + (int)border.left() - adjust, bounds.y + topCorner - snuggle); poly.addPoint(bounds.x + (int)border.left() - adjust, bounds.y + bounds.height - bottomCorner + snuggle); poly.addPoint(bounds.x, bounds.y + bounds.height - adjust); } } return poly; } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/1ca686f10a0033c5e79968a5d664589db0fef2ec/BorderPainter.java/buggy/src/java/org/xhtmlrenderer/render/BorderPainter.java |
(int)(border.top() / 2), (int)(border.right() / 2), (int)(border.bottom() / 2), (int)(border.left() / 2)); | (int) (border.top() / 2), (int) (border.right() / 2), (int) (border.bottom() / 2), (int) (border.left() / 2)); | private static void paintBorderSide(final BorderPropertySet border, final Graphics g, final Rectangle bounds, final int sides, int currentSide, final IdentValue borderSideStyle, int xOffset) { Graphics2D g2 = (Graphics2D) g; if (borderSideStyle == IdentValue.RIDGE || borderSideStyle == IdentValue.GROOVE) { BorderPropertySet bd2 = new BorderPropertySet( (int)(border.top() / 2), (int)(border.right() / 2), (int)(border.bottom() / 2), (int)(border.left() / 2)); if (borderSideStyle == IdentValue.RIDGE) { paintGoodBevel(g2, bounds, border, border.darker(borderSideStyle), border.brighter(borderSideStyle), sides, currentSide); paintGoodBevel(g2, bounds, bd2, border.brighter(borderSideStyle), border.darker(borderSideStyle), sides, currentSide); } else { paintGoodBevel(g2, bounds, border, border.brighter(borderSideStyle), border.darker(borderSideStyle), sides, currentSide); paintGoodBevel(g2, bounds, bd2, border.darker(borderSideStyle), border.brighter(borderSideStyle), sides, currentSide); } return; } if (borderSideStyle == IdentValue.OUTSET) { paintGoodBevel(g2, bounds, border, border.brighter(borderSideStyle), border.darker(borderSideStyle), sides, currentSide); return; } if (borderSideStyle == IdentValue.INSET) { paintGoodBevel(g2, bounds, border, border.darker(borderSideStyle), border.brighter(borderSideStyle), sides, currentSide); return; } if (borderSideStyle == IdentValue.SOLID) { paintSolid(g2, bounds, border, border, sides, currentSide); return; } if (borderSideStyle == IdentValue.DOUBLE) { // this may need to be modified to account for rounding errors // create a new border only 1/3 the thickness BorderPropertySet outer = new BorderPropertySet( (int)(border.top() / 3), (int)(border.bottom() / 3), (int)(border.left() / 3), (int)(border.right() / 3)); BorderPropertySet center = new BorderPropertySet(outer); BorderPropertySet inner = new BorderPropertySet(outer); if ((int)border.top() == 1) { outer.setTop(1f); center.setTop(0f); } if ((int)border.bottom() == 1) { outer.setBottom(1f); center.setBottom(0f); } if ((int)border.left() == 1) { outer.setLeft(1f); center.setLeft(0f); } if ((int)border.right() == 1) { outer.setRight(1f); center.setRight(0f); } if ((int)border.top() == 2) { outer.setTop(1f); center.setTop(0f); inner.setTop(1f); } if ((int)border.bottom() == 2) { outer.setBottom(1f); center.setBottom(0f); inner.setBottom(1f); } if ((int)border.left() == 2) { outer.setLeft(1f); center.setLeft(0f); inner.setLeft(1f); } if ((int)border.right() == 2) { outer.setRight(1f); center.setRight(0f); inner.setRight(1f); } Rectangle b2 = shrinkRect(bounds, outer, sides); b2 = shrinkRect(b2, center, sides); // draw outer border paintSolid((Graphics2D) g, bounds, outer, border, sides, currentSide); // draw inner border paintSolid((Graphics2D) g, b2, inner, border, sides, currentSide); return; } int thickness = 0; if (currentSide == TOP) thickness = (int)border.top(); if (currentSide == BOTTOM) thickness = (int)border.bottom(); if (currentSide == RIGHT) thickness = (int)border.right(); if (currentSide == LEFT) thickness = (int)border.left(); if (borderSideStyle == IdentValue.DASHED) { g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF); paintPatternedRect(g2, bounds, border, border, new float[]{8.0f + thickness * 2, 4.0f + thickness}, sides, currentSide, xOffset); g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); } if (borderSideStyle == IdentValue.DOTTED) { // turn off anti-aliasing or the dots will be all blurry g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF); paintPatternedRect(g2, bounds, border, border, new float[]{thickness, thickness}, sides, currentSide, xOffset); g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); } } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/1ca686f10a0033c5e79968a5d664589db0fef2ec/BorderPainter.java/buggy/src/java/org/xhtmlrenderer/render/BorderPainter.java |
(int)(border.top() / 3), (int)(border.bottom() / 3), (int)(border.left() / 3), (int)(border.right() / 3)); | (int) (border.top() / 3), (int) (border.bottom() / 3), (int) (border.left() / 3), (int) (border.right() / 3)); | private static void paintBorderSide(final BorderPropertySet border, final Graphics g, final Rectangle bounds, final int sides, int currentSide, final IdentValue borderSideStyle, int xOffset) { Graphics2D g2 = (Graphics2D) g; if (borderSideStyle == IdentValue.RIDGE || borderSideStyle == IdentValue.GROOVE) { BorderPropertySet bd2 = new BorderPropertySet( (int)(border.top() / 2), (int)(border.right() / 2), (int)(border.bottom() / 2), (int)(border.left() / 2)); if (borderSideStyle == IdentValue.RIDGE) { paintGoodBevel(g2, bounds, border, border.darker(borderSideStyle), border.brighter(borderSideStyle), sides, currentSide); paintGoodBevel(g2, bounds, bd2, border.brighter(borderSideStyle), border.darker(borderSideStyle), sides, currentSide); } else { paintGoodBevel(g2, bounds, border, border.brighter(borderSideStyle), border.darker(borderSideStyle), sides, currentSide); paintGoodBevel(g2, bounds, bd2, border.darker(borderSideStyle), border.brighter(borderSideStyle), sides, currentSide); } return; } if (borderSideStyle == IdentValue.OUTSET) { paintGoodBevel(g2, bounds, border, border.brighter(borderSideStyle), border.darker(borderSideStyle), sides, currentSide); return; } if (borderSideStyle == IdentValue.INSET) { paintGoodBevel(g2, bounds, border, border.darker(borderSideStyle), border.brighter(borderSideStyle), sides, currentSide); return; } if (borderSideStyle == IdentValue.SOLID) { paintSolid(g2, bounds, border, border, sides, currentSide); return; } if (borderSideStyle == IdentValue.DOUBLE) { // this may need to be modified to account for rounding errors // create a new border only 1/3 the thickness BorderPropertySet outer = new BorderPropertySet( (int)(border.top() / 3), (int)(border.bottom() / 3), (int)(border.left() / 3), (int)(border.right() / 3)); BorderPropertySet center = new BorderPropertySet(outer); BorderPropertySet inner = new BorderPropertySet(outer); if ((int)border.top() == 1) { outer.setTop(1f); center.setTop(0f); } if ((int)border.bottom() == 1) { outer.setBottom(1f); center.setBottom(0f); } if ((int)border.left() == 1) { outer.setLeft(1f); center.setLeft(0f); } if ((int)border.right() == 1) { outer.setRight(1f); center.setRight(0f); } if ((int)border.top() == 2) { outer.setTop(1f); center.setTop(0f); inner.setTop(1f); } if ((int)border.bottom() == 2) { outer.setBottom(1f); center.setBottom(0f); inner.setBottom(1f); } if ((int)border.left() == 2) { outer.setLeft(1f); center.setLeft(0f); inner.setLeft(1f); } if ((int)border.right() == 2) { outer.setRight(1f); center.setRight(0f); inner.setRight(1f); } Rectangle b2 = shrinkRect(bounds, outer, sides); b2 = shrinkRect(b2, center, sides); // draw outer border paintSolid((Graphics2D) g, bounds, outer, border, sides, currentSide); // draw inner border paintSolid((Graphics2D) g, b2, inner, border, sides, currentSide); return; } int thickness = 0; if (currentSide == TOP) thickness = (int)border.top(); if (currentSide == BOTTOM) thickness = (int)border.bottom(); if (currentSide == RIGHT) thickness = (int)border.right(); if (currentSide == LEFT) thickness = (int)border.left(); if (borderSideStyle == IdentValue.DASHED) { g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF); paintPatternedRect(g2, bounds, border, border, new float[]{8.0f + thickness * 2, 4.0f + thickness}, sides, currentSide, xOffset); g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); } if (borderSideStyle == IdentValue.DOTTED) { // turn off anti-aliasing or the dots will be all blurry g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF); paintPatternedRect(g2, bounds, border, border, new float[]{thickness, thickness}, sides, currentSide, xOffset); g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); } } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/1ca686f10a0033c5e79968a5d664589db0fef2ec/BorderPainter.java/buggy/src/java/org/xhtmlrenderer/render/BorderPainter.java |
if ((int)border.top() == 1) { | if ((int) border.top() == 1) { | private static void paintBorderSide(final BorderPropertySet border, final Graphics g, final Rectangle bounds, final int sides, int currentSide, final IdentValue borderSideStyle, int xOffset) { Graphics2D g2 = (Graphics2D) g; if (borderSideStyle == IdentValue.RIDGE || borderSideStyle == IdentValue.GROOVE) { BorderPropertySet bd2 = new BorderPropertySet( (int)(border.top() / 2), (int)(border.right() / 2), (int)(border.bottom() / 2), (int)(border.left() / 2)); if (borderSideStyle == IdentValue.RIDGE) { paintGoodBevel(g2, bounds, border, border.darker(borderSideStyle), border.brighter(borderSideStyle), sides, currentSide); paintGoodBevel(g2, bounds, bd2, border.brighter(borderSideStyle), border.darker(borderSideStyle), sides, currentSide); } else { paintGoodBevel(g2, bounds, border, border.brighter(borderSideStyle), border.darker(borderSideStyle), sides, currentSide); paintGoodBevel(g2, bounds, bd2, border.darker(borderSideStyle), border.brighter(borderSideStyle), sides, currentSide); } return; } if (borderSideStyle == IdentValue.OUTSET) { paintGoodBevel(g2, bounds, border, border.brighter(borderSideStyle), border.darker(borderSideStyle), sides, currentSide); return; } if (borderSideStyle == IdentValue.INSET) { paintGoodBevel(g2, bounds, border, border.darker(borderSideStyle), border.brighter(borderSideStyle), sides, currentSide); return; } if (borderSideStyle == IdentValue.SOLID) { paintSolid(g2, bounds, border, border, sides, currentSide); return; } if (borderSideStyle == IdentValue.DOUBLE) { // this may need to be modified to account for rounding errors // create a new border only 1/3 the thickness BorderPropertySet outer = new BorderPropertySet( (int)(border.top() / 3), (int)(border.bottom() / 3), (int)(border.left() / 3), (int)(border.right() / 3)); BorderPropertySet center = new BorderPropertySet(outer); BorderPropertySet inner = new BorderPropertySet(outer); if ((int)border.top() == 1) { outer.setTop(1f); center.setTop(0f); } if ((int)border.bottom() == 1) { outer.setBottom(1f); center.setBottom(0f); } if ((int)border.left() == 1) { outer.setLeft(1f); center.setLeft(0f); } if ((int)border.right() == 1) { outer.setRight(1f); center.setRight(0f); } if ((int)border.top() == 2) { outer.setTop(1f); center.setTop(0f); inner.setTop(1f); } if ((int)border.bottom() == 2) { outer.setBottom(1f); center.setBottom(0f); inner.setBottom(1f); } if ((int)border.left() == 2) { outer.setLeft(1f); center.setLeft(0f); inner.setLeft(1f); } if ((int)border.right() == 2) { outer.setRight(1f); center.setRight(0f); inner.setRight(1f); } Rectangle b2 = shrinkRect(bounds, outer, sides); b2 = shrinkRect(b2, center, sides); // draw outer border paintSolid((Graphics2D) g, bounds, outer, border, sides, currentSide); // draw inner border paintSolid((Graphics2D) g, b2, inner, border, sides, currentSide); return; } int thickness = 0; if (currentSide == TOP) thickness = (int)border.top(); if (currentSide == BOTTOM) thickness = (int)border.bottom(); if (currentSide == RIGHT) thickness = (int)border.right(); if (currentSide == LEFT) thickness = (int)border.left(); if (borderSideStyle == IdentValue.DASHED) { g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF); paintPatternedRect(g2, bounds, border, border, new float[]{8.0f + thickness * 2, 4.0f + thickness}, sides, currentSide, xOffset); g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); } if (borderSideStyle == IdentValue.DOTTED) { // turn off anti-aliasing or the dots will be all blurry g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF); paintPatternedRect(g2, bounds, border, border, new float[]{thickness, thickness}, sides, currentSide, xOffset); g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); } } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/1ca686f10a0033c5e79968a5d664589db0fef2ec/BorderPainter.java/buggy/src/java/org/xhtmlrenderer/render/BorderPainter.java |
if ((int)border.bottom() == 1) { | if ((int) border.bottom() == 1) { | private static void paintBorderSide(final BorderPropertySet border, final Graphics g, final Rectangle bounds, final int sides, int currentSide, final IdentValue borderSideStyle, int xOffset) { Graphics2D g2 = (Graphics2D) g; if (borderSideStyle == IdentValue.RIDGE || borderSideStyle == IdentValue.GROOVE) { BorderPropertySet bd2 = new BorderPropertySet( (int)(border.top() / 2), (int)(border.right() / 2), (int)(border.bottom() / 2), (int)(border.left() / 2)); if (borderSideStyle == IdentValue.RIDGE) { paintGoodBevel(g2, bounds, border, border.darker(borderSideStyle), border.brighter(borderSideStyle), sides, currentSide); paintGoodBevel(g2, bounds, bd2, border.brighter(borderSideStyle), border.darker(borderSideStyle), sides, currentSide); } else { paintGoodBevel(g2, bounds, border, border.brighter(borderSideStyle), border.darker(borderSideStyle), sides, currentSide); paintGoodBevel(g2, bounds, bd2, border.darker(borderSideStyle), border.brighter(borderSideStyle), sides, currentSide); } return; } if (borderSideStyle == IdentValue.OUTSET) { paintGoodBevel(g2, bounds, border, border.brighter(borderSideStyle), border.darker(borderSideStyle), sides, currentSide); return; } if (borderSideStyle == IdentValue.INSET) { paintGoodBevel(g2, bounds, border, border.darker(borderSideStyle), border.brighter(borderSideStyle), sides, currentSide); return; } if (borderSideStyle == IdentValue.SOLID) { paintSolid(g2, bounds, border, border, sides, currentSide); return; } if (borderSideStyle == IdentValue.DOUBLE) { // this may need to be modified to account for rounding errors // create a new border only 1/3 the thickness BorderPropertySet outer = new BorderPropertySet( (int)(border.top() / 3), (int)(border.bottom() / 3), (int)(border.left() / 3), (int)(border.right() / 3)); BorderPropertySet center = new BorderPropertySet(outer); BorderPropertySet inner = new BorderPropertySet(outer); if ((int)border.top() == 1) { outer.setTop(1f); center.setTop(0f); } if ((int)border.bottom() == 1) { outer.setBottom(1f); center.setBottom(0f); } if ((int)border.left() == 1) { outer.setLeft(1f); center.setLeft(0f); } if ((int)border.right() == 1) { outer.setRight(1f); center.setRight(0f); } if ((int)border.top() == 2) { outer.setTop(1f); center.setTop(0f); inner.setTop(1f); } if ((int)border.bottom() == 2) { outer.setBottom(1f); center.setBottom(0f); inner.setBottom(1f); } if ((int)border.left() == 2) { outer.setLeft(1f); center.setLeft(0f); inner.setLeft(1f); } if ((int)border.right() == 2) { outer.setRight(1f); center.setRight(0f); inner.setRight(1f); } Rectangle b2 = shrinkRect(bounds, outer, sides); b2 = shrinkRect(b2, center, sides); // draw outer border paintSolid((Graphics2D) g, bounds, outer, border, sides, currentSide); // draw inner border paintSolid((Graphics2D) g, b2, inner, border, sides, currentSide); return; } int thickness = 0; if (currentSide == TOP) thickness = (int)border.top(); if (currentSide == BOTTOM) thickness = (int)border.bottom(); if (currentSide == RIGHT) thickness = (int)border.right(); if (currentSide == LEFT) thickness = (int)border.left(); if (borderSideStyle == IdentValue.DASHED) { g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF); paintPatternedRect(g2, bounds, border, border, new float[]{8.0f + thickness * 2, 4.0f + thickness}, sides, currentSide, xOffset); g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); } if (borderSideStyle == IdentValue.DOTTED) { // turn off anti-aliasing or the dots will be all blurry g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF); paintPatternedRect(g2, bounds, border, border, new float[]{thickness, thickness}, sides, currentSide, xOffset); g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); } } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/1ca686f10a0033c5e79968a5d664589db0fef2ec/BorderPainter.java/buggy/src/java/org/xhtmlrenderer/render/BorderPainter.java |
if ((int)border.left() == 1) { | if ((int) border.left() == 1) { | private static void paintBorderSide(final BorderPropertySet border, final Graphics g, final Rectangle bounds, final int sides, int currentSide, final IdentValue borderSideStyle, int xOffset) { Graphics2D g2 = (Graphics2D) g; if (borderSideStyle == IdentValue.RIDGE || borderSideStyle == IdentValue.GROOVE) { BorderPropertySet bd2 = new BorderPropertySet( (int)(border.top() / 2), (int)(border.right() / 2), (int)(border.bottom() / 2), (int)(border.left() / 2)); if (borderSideStyle == IdentValue.RIDGE) { paintGoodBevel(g2, bounds, border, border.darker(borderSideStyle), border.brighter(borderSideStyle), sides, currentSide); paintGoodBevel(g2, bounds, bd2, border.brighter(borderSideStyle), border.darker(borderSideStyle), sides, currentSide); } else { paintGoodBevel(g2, bounds, border, border.brighter(borderSideStyle), border.darker(borderSideStyle), sides, currentSide); paintGoodBevel(g2, bounds, bd2, border.darker(borderSideStyle), border.brighter(borderSideStyle), sides, currentSide); } return; } if (borderSideStyle == IdentValue.OUTSET) { paintGoodBevel(g2, bounds, border, border.brighter(borderSideStyle), border.darker(borderSideStyle), sides, currentSide); return; } if (borderSideStyle == IdentValue.INSET) { paintGoodBevel(g2, bounds, border, border.darker(borderSideStyle), border.brighter(borderSideStyle), sides, currentSide); return; } if (borderSideStyle == IdentValue.SOLID) { paintSolid(g2, bounds, border, border, sides, currentSide); return; } if (borderSideStyle == IdentValue.DOUBLE) { // this may need to be modified to account for rounding errors // create a new border only 1/3 the thickness BorderPropertySet outer = new BorderPropertySet( (int)(border.top() / 3), (int)(border.bottom() / 3), (int)(border.left() / 3), (int)(border.right() / 3)); BorderPropertySet center = new BorderPropertySet(outer); BorderPropertySet inner = new BorderPropertySet(outer); if ((int)border.top() == 1) { outer.setTop(1f); center.setTop(0f); } if ((int)border.bottom() == 1) { outer.setBottom(1f); center.setBottom(0f); } if ((int)border.left() == 1) { outer.setLeft(1f); center.setLeft(0f); } if ((int)border.right() == 1) { outer.setRight(1f); center.setRight(0f); } if ((int)border.top() == 2) { outer.setTop(1f); center.setTop(0f); inner.setTop(1f); } if ((int)border.bottom() == 2) { outer.setBottom(1f); center.setBottom(0f); inner.setBottom(1f); } if ((int)border.left() == 2) { outer.setLeft(1f); center.setLeft(0f); inner.setLeft(1f); } if ((int)border.right() == 2) { outer.setRight(1f); center.setRight(0f); inner.setRight(1f); } Rectangle b2 = shrinkRect(bounds, outer, sides); b2 = shrinkRect(b2, center, sides); // draw outer border paintSolid((Graphics2D) g, bounds, outer, border, sides, currentSide); // draw inner border paintSolid((Graphics2D) g, b2, inner, border, sides, currentSide); return; } int thickness = 0; if (currentSide == TOP) thickness = (int)border.top(); if (currentSide == BOTTOM) thickness = (int)border.bottom(); if (currentSide == RIGHT) thickness = (int)border.right(); if (currentSide == LEFT) thickness = (int)border.left(); if (borderSideStyle == IdentValue.DASHED) { g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF); paintPatternedRect(g2, bounds, border, border, new float[]{8.0f + thickness * 2, 4.0f + thickness}, sides, currentSide, xOffset); g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); } if (borderSideStyle == IdentValue.DOTTED) { // turn off anti-aliasing or the dots will be all blurry g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF); paintPatternedRect(g2, bounds, border, border, new float[]{thickness, thickness}, sides, currentSide, xOffset); g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); } } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/1ca686f10a0033c5e79968a5d664589db0fef2ec/BorderPainter.java/buggy/src/java/org/xhtmlrenderer/render/BorderPainter.java |
if ((int)border.right() == 1) { | if ((int) border.right() == 1) { | private static void paintBorderSide(final BorderPropertySet border, final Graphics g, final Rectangle bounds, final int sides, int currentSide, final IdentValue borderSideStyle, int xOffset) { Graphics2D g2 = (Graphics2D) g; if (borderSideStyle == IdentValue.RIDGE || borderSideStyle == IdentValue.GROOVE) { BorderPropertySet bd2 = new BorderPropertySet( (int)(border.top() / 2), (int)(border.right() / 2), (int)(border.bottom() / 2), (int)(border.left() / 2)); if (borderSideStyle == IdentValue.RIDGE) { paintGoodBevel(g2, bounds, border, border.darker(borderSideStyle), border.brighter(borderSideStyle), sides, currentSide); paintGoodBevel(g2, bounds, bd2, border.brighter(borderSideStyle), border.darker(borderSideStyle), sides, currentSide); } else { paintGoodBevel(g2, bounds, border, border.brighter(borderSideStyle), border.darker(borderSideStyle), sides, currentSide); paintGoodBevel(g2, bounds, bd2, border.darker(borderSideStyle), border.brighter(borderSideStyle), sides, currentSide); } return; } if (borderSideStyle == IdentValue.OUTSET) { paintGoodBevel(g2, bounds, border, border.brighter(borderSideStyle), border.darker(borderSideStyle), sides, currentSide); return; } if (borderSideStyle == IdentValue.INSET) { paintGoodBevel(g2, bounds, border, border.darker(borderSideStyle), border.brighter(borderSideStyle), sides, currentSide); return; } if (borderSideStyle == IdentValue.SOLID) { paintSolid(g2, bounds, border, border, sides, currentSide); return; } if (borderSideStyle == IdentValue.DOUBLE) { // this may need to be modified to account for rounding errors // create a new border only 1/3 the thickness BorderPropertySet outer = new BorderPropertySet( (int)(border.top() / 3), (int)(border.bottom() / 3), (int)(border.left() / 3), (int)(border.right() / 3)); BorderPropertySet center = new BorderPropertySet(outer); BorderPropertySet inner = new BorderPropertySet(outer); if ((int)border.top() == 1) { outer.setTop(1f); center.setTop(0f); } if ((int)border.bottom() == 1) { outer.setBottom(1f); center.setBottom(0f); } if ((int)border.left() == 1) { outer.setLeft(1f); center.setLeft(0f); } if ((int)border.right() == 1) { outer.setRight(1f); center.setRight(0f); } if ((int)border.top() == 2) { outer.setTop(1f); center.setTop(0f); inner.setTop(1f); } if ((int)border.bottom() == 2) { outer.setBottom(1f); center.setBottom(0f); inner.setBottom(1f); } if ((int)border.left() == 2) { outer.setLeft(1f); center.setLeft(0f); inner.setLeft(1f); } if ((int)border.right() == 2) { outer.setRight(1f); center.setRight(0f); inner.setRight(1f); } Rectangle b2 = shrinkRect(bounds, outer, sides); b2 = shrinkRect(b2, center, sides); // draw outer border paintSolid((Graphics2D) g, bounds, outer, border, sides, currentSide); // draw inner border paintSolid((Graphics2D) g, b2, inner, border, sides, currentSide); return; } int thickness = 0; if (currentSide == TOP) thickness = (int)border.top(); if (currentSide == BOTTOM) thickness = (int)border.bottom(); if (currentSide == RIGHT) thickness = (int)border.right(); if (currentSide == LEFT) thickness = (int)border.left(); if (borderSideStyle == IdentValue.DASHED) { g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF); paintPatternedRect(g2, bounds, border, border, new float[]{8.0f + thickness * 2, 4.0f + thickness}, sides, currentSide, xOffset); g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); } if (borderSideStyle == IdentValue.DOTTED) { // turn off anti-aliasing or the dots will be all blurry g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF); paintPatternedRect(g2, bounds, border, border, new float[]{thickness, thickness}, sides, currentSide, xOffset); g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); } } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/1ca686f10a0033c5e79968a5d664589db0fef2ec/BorderPainter.java/buggy/src/java/org/xhtmlrenderer/render/BorderPainter.java |
if ((int)border.top() == 2) { | if ((int) border.top() == 2) { | private static void paintBorderSide(final BorderPropertySet border, final Graphics g, final Rectangle bounds, final int sides, int currentSide, final IdentValue borderSideStyle, int xOffset) { Graphics2D g2 = (Graphics2D) g; if (borderSideStyle == IdentValue.RIDGE || borderSideStyle == IdentValue.GROOVE) { BorderPropertySet bd2 = new BorderPropertySet( (int)(border.top() / 2), (int)(border.right() / 2), (int)(border.bottom() / 2), (int)(border.left() / 2)); if (borderSideStyle == IdentValue.RIDGE) { paintGoodBevel(g2, bounds, border, border.darker(borderSideStyle), border.brighter(borderSideStyle), sides, currentSide); paintGoodBevel(g2, bounds, bd2, border.brighter(borderSideStyle), border.darker(borderSideStyle), sides, currentSide); } else { paintGoodBevel(g2, bounds, border, border.brighter(borderSideStyle), border.darker(borderSideStyle), sides, currentSide); paintGoodBevel(g2, bounds, bd2, border.darker(borderSideStyle), border.brighter(borderSideStyle), sides, currentSide); } return; } if (borderSideStyle == IdentValue.OUTSET) { paintGoodBevel(g2, bounds, border, border.brighter(borderSideStyle), border.darker(borderSideStyle), sides, currentSide); return; } if (borderSideStyle == IdentValue.INSET) { paintGoodBevel(g2, bounds, border, border.darker(borderSideStyle), border.brighter(borderSideStyle), sides, currentSide); return; } if (borderSideStyle == IdentValue.SOLID) { paintSolid(g2, bounds, border, border, sides, currentSide); return; } if (borderSideStyle == IdentValue.DOUBLE) { // this may need to be modified to account for rounding errors // create a new border only 1/3 the thickness BorderPropertySet outer = new BorderPropertySet( (int)(border.top() / 3), (int)(border.bottom() / 3), (int)(border.left() / 3), (int)(border.right() / 3)); BorderPropertySet center = new BorderPropertySet(outer); BorderPropertySet inner = new BorderPropertySet(outer); if ((int)border.top() == 1) { outer.setTop(1f); center.setTop(0f); } if ((int)border.bottom() == 1) { outer.setBottom(1f); center.setBottom(0f); } if ((int)border.left() == 1) { outer.setLeft(1f); center.setLeft(0f); } if ((int)border.right() == 1) { outer.setRight(1f); center.setRight(0f); } if ((int)border.top() == 2) { outer.setTop(1f); center.setTop(0f); inner.setTop(1f); } if ((int)border.bottom() == 2) { outer.setBottom(1f); center.setBottom(0f); inner.setBottom(1f); } if ((int)border.left() == 2) { outer.setLeft(1f); center.setLeft(0f); inner.setLeft(1f); } if ((int)border.right() == 2) { outer.setRight(1f); center.setRight(0f); inner.setRight(1f); } Rectangle b2 = shrinkRect(bounds, outer, sides); b2 = shrinkRect(b2, center, sides); // draw outer border paintSolid((Graphics2D) g, bounds, outer, border, sides, currentSide); // draw inner border paintSolid((Graphics2D) g, b2, inner, border, sides, currentSide); return; } int thickness = 0; if (currentSide == TOP) thickness = (int)border.top(); if (currentSide == BOTTOM) thickness = (int)border.bottom(); if (currentSide == RIGHT) thickness = (int)border.right(); if (currentSide == LEFT) thickness = (int)border.left(); if (borderSideStyle == IdentValue.DASHED) { g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF); paintPatternedRect(g2, bounds, border, border, new float[]{8.0f + thickness * 2, 4.0f + thickness}, sides, currentSide, xOffset); g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); } if (borderSideStyle == IdentValue.DOTTED) { // turn off anti-aliasing or the dots will be all blurry g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF); paintPatternedRect(g2, bounds, border, border, new float[]{thickness, thickness}, sides, currentSide, xOffset); g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); } } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/1ca686f10a0033c5e79968a5d664589db0fef2ec/BorderPainter.java/buggy/src/java/org/xhtmlrenderer/render/BorderPainter.java |
if ((int)border.bottom() == 2) { | if ((int) border.bottom() == 2) { | private static void paintBorderSide(final BorderPropertySet border, final Graphics g, final Rectangle bounds, final int sides, int currentSide, final IdentValue borderSideStyle, int xOffset) { Graphics2D g2 = (Graphics2D) g; if (borderSideStyle == IdentValue.RIDGE || borderSideStyle == IdentValue.GROOVE) { BorderPropertySet bd2 = new BorderPropertySet( (int)(border.top() / 2), (int)(border.right() / 2), (int)(border.bottom() / 2), (int)(border.left() / 2)); if (borderSideStyle == IdentValue.RIDGE) { paintGoodBevel(g2, bounds, border, border.darker(borderSideStyle), border.brighter(borderSideStyle), sides, currentSide); paintGoodBevel(g2, bounds, bd2, border.brighter(borderSideStyle), border.darker(borderSideStyle), sides, currentSide); } else { paintGoodBevel(g2, bounds, border, border.brighter(borderSideStyle), border.darker(borderSideStyle), sides, currentSide); paintGoodBevel(g2, bounds, bd2, border.darker(borderSideStyle), border.brighter(borderSideStyle), sides, currentSide); } return; } if (borderSideStyle == IdentValue.OUTSET) { paintGoodBevel(g2, bounds, border, border.brighter(borderSideStyle), border.darker(borderSideStyle), sides, currentSide); return; } if (borderSideStyle == IdentValue.INSET) { paintGoodBevel(g2, bounds, border, border.darker(borderSideStyle), border.brighter(borderSideStyle), sides, currentSide); return; } if (borderSideStyle == IdentValue.SOLID) { paintSolid(g2, bounds, border, border, sides, currentSide); return; } if (borderSideStyle == IdentValue.DOUBLE) { // this may need to be modified to account for rounding errors // create a new border only 1/3 the thickness BorderPropertySet outer = new BorderPropertySet( (int)(border.top() / 3), (int)(border.bottom() / 3), (int)(border.left() / 3), (int)(border.right() / 3)); BorderPropertySet center = new BorderPropertySet(outer); BorderPropertySet inner = new BorderPropertySet(outer); if ((int)border.top() == 1) { outer.setTop(1f); center.setTop(0f); } if ((int)border.bottom() == 1) { outer.setBottom(1f); center.setBottom(0f); } if ((int)border.left() == 1) { outer.setLeft(1f); center.setLeft(0f); } if ((int)border.right() == 1) { outer.setRight(1f); center.setRight(0f); } if ((int)border.top() == 2) { outer.setTop(1f); center.setTop(0f); inner.setTop(1f); } if ((int)border.bottom() == 2) { outer.setBottom(1f); center.setBottom(0f); inner.setBottom(1f); } if ((int)border.left() == 2) { outer.setLeft(1f); center.setLeft(0f); inner.setLeft(1f); } if ((int)border.right() == 2) { outer.setRight(1f); center.setRight(0f); inner.setRight(1f); } Rectangle b2 = shrinkRect(bounds, outer, sides); b2 = shrinkRect(b2, center, sides); // draw outer border paintSolid((Graphics2D) g, bounds, outer, border, sides, currentSide); // draw inner border paintSolid((Graphics2D) g, b2, inner, border, sides, currentSide); return; } int thickness = 0; if (currentSide == TOP) thickness = (int)border.top(); if (currentSide == BOTTOM) thickness = (int)border.bottom(); if (currentSide == RIGHT) thickness = (int)border.right(); if (currentSide == LEFT) thickness = (int)border.left(); if (borderSideStyle == IdentValue.DASHED) { g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF); paintPatternedRect(g2, bounds, border, border, new float[]{8.0f + thickness * 2, 4.0f + thickness}, sides, currentSide, xOffset); g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); } if (borderSideStyle == IdentValue.DOTTED) { // turn off anti-aliasing or the dots will be all blurry g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF); paintPatternedRect(g2, bounds, border, border, new float[]{thickness, thickness}, sides, currentSide, xOffset); g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); } } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/1ca686f10a0033c5e79968a5d664589db0fef2ec/BorderPainter.java/buggy/src/java/org/xhtmlrenderer/render/BorderPainter.java |
if ((int)border.left() == 2) { | if ((int) border.left() == 2) { | private static void paintBorderSide(final BorderPropertySet border, final Graphics g, final Rectangle bounds, final int sides, int currentSide, final IdentValue borderSideStyle, int xOffset) { Graphics2D g2 = (Graphics2D) g; if (borderSideStyle == IdentValue.RIDGE || borderSideStyle == IdentValue.GROOVE) { BorderPropertySet bd2 = new BorderPropertySet( (int)(border.top() / 2), (int)(border.right() / 2), (int)(border.bottom() / 2), (int)(border.left() / 2)); if (borderSideStyle == IdentValue.RIDGE) { paintGoodBevel(g2, bounds, border, border.darker(borderSideStyle), border.brighter(borderSideStyle), sides, currentSide); paintGoodBevel(g2, bounds, bd2, border.brighter(borderSideStyle), border.darker(borderSideStyle), sides, currentSide); } else { paintGoodBevel(g2, bounds, border, border.brighter(borderSideStyle), border.darker(borderSideStyle), sides, currentSide); paintGoodBevel(g2, bounds, bd2, border.darker(borderSideStyle), border.brighter(borderSideStyle), sides, currentSide); } return; } if (borderSideStyle == IdentValue.OUTSET) { paintGoodBevel(g2, bounds, border, border.brighter(borderSideStyle), border.darker(borderSideStyle), sides, currentSide); return; } if (borderSideStyle == IdentValue.INSET) { paintGoodBevel(g2, bounds, border, border.darker(borderSideStyle), border.brighter(borderSideStyle), sides, currentSide); return; } if (borderSideStyle == IdentValue.SOLID) { paintSolid(g2, bounds, border, border, sides, currentSide); return; } if (borderSideStyle == IdentValue.DOUBLE) { // this may need to be modified to account for rounding errors // create a new border only 1/3 the thickness BorderPropertySet outer = new BorderPropertySet( (int)(border.top() / 3), (int)(border.bottom() / 3), (int)(border.left() / 3), (int)(border.right() / 3)); BorderPropertySet center = new BorderPropertySet(outer); BorderPropertySet inner = new BorderPropertySet(outer); if ((int)border.top() == 1) { outer.setTop(1f); center.setTop(0f); } if ((int)border.bottom() == 1) { outer.setBottom(1f); center.setBottom(0f); } if ((int)border.left() == 1) { outer.setLeft(1f); center.setLeft(0f); } if ((int)border.right() == 1) { outer.setRight(1f); center.setRight(0f); } if ((int)border.top() == 2) { outer.setTop(1f); center.setTop(0f); inner.setTop(1f); } if ((int)border.bottom() == 2) { outer.setBottom(1f); center.setBottom(0f); inner.setBottom(1f); } if ((int)border.left() == 2) { outer.setLeft(1f); center.setLeft(0f); inner.setLeft(1f); } if ((int)border.right() == 2) { outer.setRight(1f); center.setRight(0f); inner.setRight(1f); } Rectangle b2 = shrinkRect(bounds, outer, sides); b2 = shrinkRect(b2, center, sides); // draw outer border paintSolid((Graphics2D) g, bounds, outer, border, sides, currentSide); // draw inner border paintSolid((Graphics2D) g, b2, inner, border, sides, currentSide); return; } int thickness = 0; if (currentSide == TOP) thickness = (int)border.top(); if (currentSide == BOTTOM) thickness = (int)border.bottom(); if (currentSide == RIGHT) thickness = (int)border.right(); if (currentSide == LEFT) thickness = (int)border.left(); if (borderSideStyle == IdentValue.DASHED) { g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF); paintPatternedRect(g2, bounds, border, border, new float[]{8.0f + thickness * 2, 4.0f + thickness}, sides, currentSide, xOffset); g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); } if (borderSideStyle == IdentValue.DOTTED) { // turn off anti-aliasing or the dots will be all blurry g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF); paintPatternedRect(g2, bounds, border, border, new float[]{thickness, thickness}, sides, currentSide, xOffset); g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); } } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/1ca686f10a0033c5e79968a5d664589db0fef2ec/BorderPainter.java/buggy/src/java/org/xhtmlrenderer/render/BorderPainter.java |
if ((int)border.right() == 2) { | if ((int) border.right() == 2) { | private static void paintBorderSide(final BorderPropertySet border, final Graphics g, final Rectangle bounds, final int sides, int currentSide, final IdentValue borderSideStyle, int xOffset) { Graphics2D g2 = (Graphics2D) g; if (borderSideStyle == IdentValue.RIDGE || borderSideStyle == IdentValue.GROOVE) { BorderPropertySet bd2 = new BorderPropertySet( (int)(border.top() / 2), (int)(border.right() / 2), (int)(border.bottom() / 2), (int)(border.left() / 2)); if (borderSideStyle == IdentValue.RIDGE) { paintGoodBevel(g2, bounds, border, border.darker(borderSideStyle), border.brighter(borderSideStyle), sides, currentSide); paintGoodBevel(g2, bounds, bd2, border.brighter(borderSideStyle), border.darker(borderSideStyle), sides, currentSide); } else { paintGoodBevel(g2, bounds, border, border.brighter(borderSideStyle), border.darker(borderSideStyle), sides, currentSide); paintGoodBevel(g2, bounds, bd2, border.darker(borderSideStyle), border.brighter(borderSideStyle), sides, currentSide); } return; } if (borderSideStyle == IdentValue.OUTSET) { paintGoodBevel(g2, bounds, border, border.brighter(borderSideStyle), border.darker(borderSideStyle), sides, currentSide); return; } if (borderSideStyle == IdentValue.INSET) { paintGoodBevel(g2, bounds, border, border.darker(borderSideStyle), border.brighter(borderSideStyle), sides, currentSide); return; } if (borderSideStyle == IdentValue.SOLID) { paintSolid(g2, bounds, border, border, sides, currentSide); return; } if (borderSideStyle == IdentValue.DOUBLE) { // this may need to be modified to account for rounding errors // create a new border only 1/3 the thickness BorderPropertySet outer = new BorderPropertySet( (int)(border.top() / 3), (int)(border.bottom() / 3), (int)(border.left() / 3), (int)(border.right() / 3)); BorderPropertySet center = new BorderPropertySet(outer); BorderPropertySet inner = new BorderPropertySet(outer); if ((int)border.top() == 1) { outer.setTop(1f); center.setTop(0f); } if ((int)border.bottom() == 1) { outer.setBottom(1f); center.setBottom(0f); } if ((int)border.left() == 1) { outer.setLeft(1f); center.setLeft(0f); } if ((int)border.right() == 1) { outer.setRight(1f); center.setRight(0f); } if ((int)border.top() == 2) { outer.setTop(1f); center.setTop(0f); inner.setTop(1f); } if ((int)border.bottom() == 2) { outer.setBottom(1f); center.setBottom(0f); inner.setBottom(1f); } if ((int)border.left() == 2) { outer.setLeft(1f); center.setLeft(0f); inner.setLeft(1f); } if ((int)border.right() == 2) { outer.setRight(1f); center.setRight(0f); inner.setRight(1f); } Rectangle b2 = shrinkRect(bounds, outer, sides); b2 = shrinkRect(b2, center, sides); // draw outer border paintSolid((Graphics2D) g, bounds, outer, border, sides, currentSide); // draw inner border paintSolid((Graphics2D) g, b2, inner, border, sides, currentSide); return; } int thickness = 0; if (currentSide == TOP) thickness = (int)border.top(); if (currentSide == BOTTOM) thickness = (int)border.bottom(); if (currentSide == RIGHT) thickness = (int)border.right(); if (currentSide == LEFT) thickness = (int)border.left(); if (borderSideStyle == IdentValue.DASHED) { g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF); paintPatternedRect(g2, bounds, border, border, new float[]{8.0f + thickness * 2, 4.0f + thickness}, sides, currentSide, xOffset); g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); } if (borderSideStyle == IdentValue.DOTTED) { // turn off anti-aliasing or the dots will be all blurry g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF); paintPatternedRect(g2, bounds, border, border, new float[]{thickness, thickness}, sides, currentSide, xOffset); g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); } } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/1ca686f10a0033c5e79968a5d664589db0fef2ec/BorderPainter.java/buggy/src/java/org/xhtmlrenderer/render/BorderPainter.java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.