rem stringlengths 1 53.3k | add stringlengths 0 80.5k | context stringlengths 6 326k | meta stringlengths 141 403 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
final PsiFileSystemItem resolveResult = resolve(); final PsiManager manager = element.getManager(); return element instanceof PsiDirectory && manager.areElementsEquivalent(element, getPsiDirectory(resolveResult)) || manager.areElementsEquivalent(element, resolveResult); } | final PsiFileSystemItem resolveResult = resolve(); final PsiManager manager = element.getManager(); return element instanceof PsiDirectory && manager.areElementsEquivalent(element, getPsiDirectory(resolveResult)) || manager.areElementsEquivalent(element, resolveResult); } | public boolean isReferenceTo(PsiElement element) { if (!(element instanceof PsiFileSystemItem)) return false; final PsiFileSystemItem resolveResult = resolve(); final PsiManager manager = element.getManager(); return element instanceof PsiDirectory && manager.areElementsEquivalent(element, getPsiDirectory(resolveResult)) || manager.areElementsEquivalent(element, resolveResult); } | 12814 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12814/1260582834a03ebe21bf20d35003b5174641de20/FileReference.java/clean/source/com/intellij/psi/impl/source/resolve/reference/impl/providers/FileReference.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
1071,
1250,
353,
2404,
774,
12,
52,
7722,
1046,
930,
13,
288,
377,
309,
16051,
12,
2956,
1276,
453,
7722,
11785,
1180,
3719,
327,
629,
31,
377,
727,
453,
7722,
11785,
1180,
2245,
1253,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
1071,
1250,
353,
2404,
774,
12,
52,
7722,
1046,
930,
13,
288,
377,
309,
16051,
12,
2956,
1276,
453,
7722,
11785,
1180,
3719,
327,
629,
31,
377,
727,
453,
7722,
11785,
1180,
2245,
1253,
... |
Client.usermanager.listeUtilisateurs(liste); | if(Client.fsm.listeUtilisateurs()) { Client.usermanager.listeUtilisateurs(liste); } | void listeUtilisateurs(Set<Utilisateur> liste) { Client.usermanager.listeUtilisateurs(liste); } | 57791 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57791/da6099451ef8e9920f1e5873d636a7860d1228f1/ClientEntry.java/buggy/src/client/ClientEntry.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
31614,
1304,
24954,
87,
12,
694,
32,
1304,
24954,
34,
31614,
13,
288,
3639,
309,
12,
1227,
18,
2556,
81,
18,
1098,
73,
1304,
24954,
87,
10756,
288,
2445,
18,
407,
1035,
1063,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
31614,
1304,
24954,
87,
12,
694,
32,
1304,
24954,
34,
31614,
13,
288,
3639,
309,
12,
1227,
18,
2556,
81,
18,
1098,
73,
1304,
24954,
87,
10756,
288,
2445,
18,
407,
1035,
1063,
18,
... |
public void actionPerformed(ActionEvent e) { logger.debug ("Player wrote: "+playerChatText.getText()); String text = playerChatText.getText(); text = text.trim(); if (text.length() == 0) return; if(text.charAt(0)!='/') { // Chat command. The most frequent one. RPAction chat=new RPAction(); chat.put("type","chat"); chat.put("text",playerChatText.getText()); client.send(chat); } else { if(text.startsWith("//") && lastPlayerTell!=null) { String[] command = parseString(text, 2); if(command != null) { RPAction tell = new RPAction(); tell.put("type","tell"); tell.put("target", lastPlayerTell); tell.put("text", command[1]); client.send(tell); } } if(text.startsWith("/tell ") ||text.startsWith("/msg ")) // Tell command { String[] command = parseString(text, 3); if(command != null) { RPAction tell = new RPAction(); tell.put("type","tell"); lastPlayerTell= command[1]; tell.put("target", command[1]); tell.put("text", command[2]); client.send(tell); } } else if(text.startsWith("/support ")) // Support command { String[] command = parseString(text, 2); if(command != null) { RPAction tell = new RPAction(); tell.put("type","support"); tell.put("text", command[1]); client.send(tell); } } else if(text.startsWith("/where ")) // Tell command { String[] command = parseString(text, 2); if(command != null) { RPAction where = new RPAction(); where.put("type","where"); where.put("target", command[1]); client.send(where); } } else if(text.equals("/who")) // Who command { RPAction who = new RPAction(); who.put("type","who"); client.send(who); } else if(text.startsWith("/drop ")) // Drop command { String[] command = parseString(text, 3); if(command != null) { String itemName = command[2]; int quantity; try { quantity = Integer.parseInt(command[1]); } catch (NumberFormatException ex) { return; } RPObject player = client.getPlayer(); int itemID = -1; for(RPObject item: player.getSlot("bag")) { if (item.get("name").equals(itemName)) { itemID = item.getID().getObjectID(); break; } } if (itemID != -1) { RPAction drop = new RPAction(); drop.put("type", "drop"); drop.put("baseobject", player.getID().getObjectID()); drop.put("baseslot", "bag"); drop.put("x", player.get("x")); drop.put("y", player.get("y")); drop.put("quantity", quantity); drop.put("baseitem", itemID); client.send(drop); } else { client.addEventLine("You don't have any "+itemName, Color.black); } } } else if(text.startsWith("/add ")) // Add a new buddy to buddy list { String[] command = parseString(text, 2); if(command != null) { RPAction add = new RPAction(); add.put("type","addbuddy"); add.put("target", command[1]); client.send(add); } } else if(text.startsWith("/remove ")) // Removes a existing buddy from buddy list { String[] command = parseString(text, 2); if(command != null) { RPAction remove = new RPAction(); remove.put("type","removebuddy"); remove.put("target", command[1]); client.send(remove); } } else if(text.startsWith("/tellall ")) // Tell everybody admin command { String[] command = parseString(text, 2); if(command != null) { RPAction tellall = new RPAction(); tellall.put("type","tellall"); tellall.put("text", command[1]); client.send(tellall); } } else if(text.startsWith("/teleport ")) // Teleport target(PLAYER NAME) to zone-x,y { String[] command = parseString(text, 5); if(command != null) { RPAction teleport = new RPAction(); teleport.put("type","teleport"); teleport.put("target", command[1]); teleport.put("zone", command[2]); teleport.put("x", command[3]); teleport.put("y", command[4]); client.send(teleport); } } else if(text.startsWith("/teleportto ")) // TeleportTo target(PLAYER NAME) { String[] command = parseString(text, 2); if(command != null) { RPAction teleport = new RPAction(); teleport.put("type","teleportto"); teleport.put("target", command[1]); client.send(teleport); } } else if(text.startsWith("/alter ")) // Set/Add/Substract target(PLAYER NAME) attribute { String[] command = parseString(text, 5); if(command != null) { RPAction alter = new RPAction(); alter.put("type","alter"); alter.put("target", command[1]); alter.put("stat", command[2]); alter.put("mode", command[3]); alter.put("value", command[4]); client.send(alter); } } else if(text.startsWith("/summon ")) // Summon a creature at x,y { String[] command = parseString(text, 4); if(command != null) { RPAction summon = new RPAction(); summon.put("type","summon"); summon.put("creature", command[1]); summon.put("x", command[2]); summon.put("y", command[3]); client.send(summon); } } else if(text.startsWith("/summonat ")) // Summon a creature at x,y { String[] command; command = parseString(text, 5); if(command != null && !command[4].trim().equals("")) { RPAction summon = new RPAction(); summon.put("type","summonat"); summon.put("target", command[1]); summon.put("slot", command[2]); summon.put("item", command[3]); summon.put("amount", command[4]); client.send(summon); } else { command = parseString(text, 4); if(command != null) { RPAction summon = new RPAction(); summon.put("type","summonat"); summon.put("target", command[1]); summon.put("slot", command[2]); summon.put("item", command[3]); client.send(summon); } } } else if(text.startsWith("/inspect ")) // Returns a complete description of the target { String[] command = parseString(text, 2); if(command != null) { RPAction add = new RPAction(); add.put("type","inspect"); add.put("target", command[1]); client.send(add); } } else if(text.startsWith("/jail ")) // Returns a complete description of the target { String[] command = parseString(text, 2); if(command != null) { RPAction add = new RPAction(); add.put("type","jail"); add.put("target", command[1]); client.send(add); } } else if(text.startsWith("/script ")) // Script command { String[] command = parseString(text, 2); if(command != null) { RPAction script = new RPAction(); script.put("type","script"); script.put("target", command[1]); client.send(script); } } else if(text.startsWith("/quit")) { client.getGameGUI().showQuitDialog(); } else if(text.startsWith("/invisible")) // Makes admin invisible for creatures { RPAction invisible = new RPAction(); invisible.put("type","invisible"); client.send(invisible); } else if(text.equals("/help")) // Help command { String[] lines={"Detailed manual refer at http://arianne.sourceforge.net/wiki/index.php/StendhalManual", "This brief help show you the most used commands:", "- /tell <player> <message> \tWrites a private message to player", "- /msg <player> <message> \tWrites a private message to player", "- // <message> \t\tWrites a private message to last player we talked with", "- /support <message> \tAsk for support to admins", "- /who \t\tShow online players", "- /drop <quantity> <item>\tDrops a amount of items from player.", "- /add <player> \t\tAdd player to the buddy list", "- /remove <player> \tRemoves player from buddy list", "- /where <player> \t\tPrints the location of the player", "- /quit \t\tLeaves the game", "- /sound volume <value> \tsets sound system loudness (0..100)", "- /sound mute <value> \tsets sound system mute (on/off)" }; for(String line: lines) { StendhalClient.get().addEventLine(line,Color.gray); } } else if(text.equals("/gmhelp")) // Help command { String[] lines={"Detailed manual refer at http://arianne.sourceforge.net/wiki/index.php?title=Stendhal:Administration", "This brief help show you the most used gm commands:", "- /tellall <message> \t\tWrites a private message to all players", "- /jail <player> \t\tSend a player directly to jail", "- /script <scriptname> \t\tload or reload a server side groovy script", "- /teleport <player> <zone> <x> <y> \tTeleport the player ", "- /teleportto <player> \t\tTeleport us to the player ", "- /alter <player> <attrib> <mode> <value> \tChange by SETting, ADDing or SUBtracting the stat of player", "- /summon <creature|item> <x> <y> \tSummon an item or creature at x,y", "- /summonat <player> <slot> <item> <amount> Summon an item at the slot of the given player", "- /invisible \t\t\tMakes this player invisible for creatures", "- /inspect <player> \t\t\tShows detailed info about the player", "- /destroy <entity> \t\t\tDestroy completly an entity." }; for(String line: lines) { StendhalClient.get().addEventLine(line,Color.gray); } } else if(text.startsWith("/sound ")) // Sound Setup command { String[] command = parseString(text, 3); if ( command != null ) { if ( command[1].equals( "mute" ) ) { SoundSystem.get().setMute( command[2].indexOf("on") != -1 ); } if ( command[1].equals( "volume" ) ) { int vol = Integer.parseInt(command[2]); SoundSystem.get().setVolume( vol ); } } } } lines.add(playerChatText.getText()); actual=lines.size(); if(lines.size()>50) { lines.remove(0); actual--; } playerChatText.setText(""); } | 4438 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4438/2c5d8c48e540e0e8bdaf2b72c3edd55f8838d406/StendhalChatLineListener.java/clean/src/games/stendhal/client/gui/StendhalChatLineListener.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
6459,
1128,
13889,
12,
1803,
1133,
73,
15329,
4901,
18,
4148,
2932,
12148,
91,
21436,
2773,
15,
14872,
14163,
1528,
18,
588,
1528,
10663,
780,
955,
33,
14872,
14163,
1528,
18,
588,
1528,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
6459,
1128,
13889,
12,
1803,
1133,
73,
15329,
4901,
18,
4148,
2932,
12148,
91,
21436,
2773,
15,
14872,
14163,
1528,
18,
588,
1528,
10663,
780,
955,
33,
14872,
14163,
1528,
18,
588,
1528,
... | ||
model, sortOrder, Display.getCurrent()); | model, sortOrder); | public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { if (newInput == null) { setProvider(null); return; } Assert.isTrue(newInput instanceof IConcurrentModel); Assert.isTrue(viewer instanceof TableViewer); IConcurrentModel model = (IConcurrentModel)newInput; this.table = new TableViewerAdapter((TableViewer)viewer); BackgroundContentProvider newProvider = new BackgroundContentProvider( table, model, sortOrder, Display.getCurrent()); setProvider(newProvider); newProvider.setLimit(limit); newProvider.setFilter(filter); } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/174a6cdbe07aba0cc77d88fd5b7455741270174d/DeferredContentProvider.java/buggy/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/deferred/DeferredContentProvider.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
810,
5033,
12,
18415,
14157,
16,
1033,
1592,
1210,
16,
1033,
394,
1210,
13,
288,
202,
202,
430,
261,
2704,
1210,
422,
446,
13,
288,
1082,
202,
542,
2249,
12,
2011,
1769,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
810,
5033,
12,
18415,
14157,
16,
1033,
1592,
1210,
16,
1033,
394,
1210,
13,
288,
202,
202,
430,
261,
2704,
1210,
422,
446,
13,
288,
1082,
202,
542,
2249,
12,
2011,
1769,
... |
public ChannelComponent(Integer attributeId, Integer index, String colorDomain, org.openmicroscopy.omero.model.Image image, org.openmicroscopy.omero.model.ImagePixel imagePixel, org.openmicroscopy.omero.model.ModuleExecution moduleExecution) { this.attributeId = attributeId; this.index = index; this.colorDomain = colorDomain; this.image = image; this.imagePixel = imagePixel; this.moduleExecution = moduleExecution; | public ChannelComponent() { | public ChannelComponent(Integer attributeId, Integer index, String colorDomain, org.openmicroscopy.omero.model.Image image, org.openmicroscopy.omero.model.ImagePixel imagePixel, org.openmicroscopy.omero.model.ModuleExecution moduleExecution) { this.attributeId = attributeId; this.index = index; this.colorDomain = colorDomain; this.image = image; this.imagePixel = imagePixel; this.moduleExecution = moduleExecution; } | 55636 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55636/9570ef74198a070d72e77c417c9d25244a942de2/ChannelComponent.java/buggy/components/common/src/org/openmicroscopy/omero/model/ChannelComponent.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
5307,
1841,
12,
4522,
1566,
548,
16,
2144,
770,
16,
514,
2036,
3748,
16,
2358,
18,
3190,
14458,
1017,
1101,
18,
362,
2439,
18,
2284,
18,
2040,
1316,
16,
2358,
18,
3190,
14458,
101... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
5307,
1841,
12,
4522,
1566,
548,
16,
2144,
770,
16,
514,
2036,
3748,
16,
2358,
18,
3190,
14458,
1017,
1101,
18,
362,
2439,
18,
2284,
18,
2040,
1316,
16,
2358,
18,
3190,
14458,
101... |
PsiStatement statement, String newStatement) | PsiStatement statement, String newStatementText) | protected static void replaceStatementAndShortenClassNames( PsiStatement statement, String newStatement) throws IncorrectOperationException{ final PsiManager psiManager = statement.getManager(); final PsiElementFactory factory = psiManager.getElementFactory(); final PsiStatement newExp = factory.createStatementFromText(newStatement, statement); final PsiElement replacementStatement = statement.replace(newExp); final CodeStyleManager styleManager = psiManager.getCodeStyleManager(); styleManager.shortenClassReferences(replacementStatement); styleManager.reformat(replacementStatement); } | 56627 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56627/d9f02a04761361315c85b2241e72b5b4e4c60eba/InspectionGadgetsFix.java/clean/plugins/InspectionGadgets/src/com/siyeh/ig/InspectionGadgetsFix.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
760,
918,
1453,
3406,
1876,
4897,
275,
18127,
12,
5411,
453,
7722,
3406,
3021,
16,
514,
394,
3406,
1528,
13,
5411,
1216,
657,
6746,
10602,
95,
3639,
727,
453,
7722,
1318,
23921,
131... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
760,
918,
1453,
3406,
1876,
4897,
275,
18127,
12,
5411,
453,
7722,
3406,
3021,
16,
514,
394,
3406,
1528,
13,
5411,
1216,
657,
6746,
10602,
95,
3639,
727,
453,
7722,
1318,
23921,
131... |
log(WARN + message.toString()); | String out = null; if (message instanceof Throwable || message instanceof Exception) out = StringUtils.stackTrace((Throwable)message); else out = message.toString(); log(WARN + out); | public static void warn(Object message) { log(WARN + message.toString()); } | 55820 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55820/87c62b5d149d34d3c0997740a815f7526a2b772d/Runtime.java/clean/src/java/org/apache/velocity/runtime/Runtime.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
1894,
12,
921,
883,
13,
565,
288,
3639,
514,
596,
273,
446,
31,
309,
261,
2150,
1276,
4206,
747,
883,
1276,
1185,
13,
596,
273,
5778,
18,
3772,
3448,
12443,
15155,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
1894,
12,
921,
883,
13,
565,
288,
3639,
514,
596,
273,
446,
31,
309,
261,
2150,
1276,
4206,
747,
883,
1276,
1185,
13,
596,
273,
5778,
18,
3772,
3448,
12443,
15155,
13,
... |
g.drawImage(image, 0, height, width, 0, 0, 0, width, height, null); | g.drawImage(image, 0, 0, null); | private void createFromCustom(BufferedImage image) { int width = image.getWidth(); int height = image.getHeight(); // create a temporary image that is compatible with OpenGL boolean hasAlpha = image.getColorModel().hasAlpha(); ColorModel cm = null; int dataBufferType = image.getRaster().getDataBuffer().getDataType(); if (dataBufferType == DataBuffer.TYPE_BYTE) { cm = hasAlpha ? rgbaColorModel : rgbColorModel; } else { if (hasAlpha) { cm = new ComponentColorModel(ColorSpace.getInstance(ColorSpace.CS_sRGB), null, true, true, Transparency.TRANSLUCENT, dataBufferType); } else { cm = new ComponentColorModel(ColorSpace.getInstance(ColorSpace.CS_sRGB), null, false, false, Transparency.OPAQUE, dataBufferType); } } boolean premult = cm.isAlphaPremultiplied(); WritableRaster raster = cm.createCompatibleWritableRaster(width, height); BufferedImage texImage = new BufferedImage(cm, raster, premult, null); // copy the source image into the temporary image Graphics2D g = texImage.createGraphics(); g.setComposite(AlphaComposite.Src); // Flip image vertically as long as we're at it g.drawImage(image, 0, height, width, 0, 0, 0, width, height, null); g.dispose(); // Wrap the buffer from the temporary image createNIOBufferFromImage(texImage, false); pixelFormat = hasAlpha ? GL.GL_RGBA : GL.GL_RGB; alignment = 1; // FIXME: do we need better? } | 48257 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48257/a736f85a834613d12e2b28e14b5a53fa6991b86f/TextureData.java/clean/src/classes/com/sun/opengl/util/texture/TextureData.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
9492,
3802,
12,
17947,
2040,
1316,
13,
288,
565,
509,
1835,
273,
1316,
18,
588,
2384,
5621,
565,
509,
2072,
273,
1316,
18,
588,
2686,
5621,
565,
368,
752,
279,
6269,
1316,
71... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
9492,
3802,
12,
17947,
2040,
1316,
13,
288,
565,
509,
1835,
273,
1316,
18,
588,
2384,
5621,
565,
509,
2072,
273,
1316,
18,
588,
2686,
5621,
565,
368,
752,
279,
6269,
1316,
71... |
_aCondition.add(new YIdentifier()); | YIdentifier id1 = new YIdentifier(); YIdentifier.saveIdentifier( id1, null, null ); _aCondition.add(id1); | public void testThrowsAppropriateStateExceptions() throws YDataStateException, YQueryException, YPersistenceException { Exception f = null; try{ _validTask.t_fire(); }catch(YAWLException e){ f= e; } assertNotNull(f); f= null; _aCondition.add(new YIdentifier()); assertTrue(_validTask.t_enabled(null)); List childIdentifiers = null; try { childIdentifiers = _validTask.t_fire(); } catch (YStateException e) { e.printStackTrace(); fail(); } assertTrue(childIdentifiers.size() == 3); try{ _validTask.t_fire(); }catch(YStateException e){ f= e; } assertNotNull(f); f= null; try{ Document d = new Document(new Element("data")); _validTask.t_complete((YIdentifier)childIdentifiers.get(0),d); }catch(Exception e){ f= e; } assertNotNull(f);f= null; try{ _validTask.t_add(null, null); }catch(Exception e){ f= e; } assertNotNull(f); } | 51637 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51637/8b7e6c005d18c6dc6d02b4588af401617a55c949/TestYExternalTask.java/clean/yawl/test/au/edu/qut/yawl/elements/TestYExternalTask.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
21845,
1294,
5986,
566,
340,
5060,
87,
1435,
1216,
1624,
751,
5060,
16,
1624,
1138,
503,
16,
1624,
13182,
503,
288,
3639,
1185,
284,
273,
446,
31,
3639,
775,
95,
5411,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
21845,
1294,
5986,
566,
340,
5060,
87,
1435,
1216,
1624,
751,
5060,
16,
1624,
1138,
503,
16,
1624,
13182,
503,
288,
3639,
1185,
284,
273,
446,
31,
3639,
775,
95,
5411,
... |
} else if ("grant".equalsIgnoreCase(st.sval)) { | } else if ("grant".equalsIgnoreCase(st.sval)) { | public void scanStream(Reader r, Collection<GrantEntry> grantEntries, List<KeystoreEntry> keystoreEntries) throws IOException, InvalidFormatException { StreamTokenizer st = configure(new StreamTokenizer(r)); //main parsing loop parsing: while (true) { switch (st.nextToken()) { case StreamTokenizer.TT_EOF: //we've done the job break parsing; case StreamTokenizer.TT_WORD: if ("keystore".equalsIgnoreCase(st.sval)) { keystoreEntries.add(readKeystoreEntry(st)); } else if ("grant".equalsIgnoreCase(st.sval)) { grantEntries.add(readGrantEntry(st)); } else { handleUnexpectedToken(st, "Expected entries are : \"grant\" or \"keystore\""); } break; case ';': //just delimiter of entries break; default: handleUnexpectedToken(st); break; } } } | 54769 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54769/c7fdc88348ff6da63262b6309c2810876f42c6d8/DefaultPolicyScanner.java/clean/modules/security/src/main/java/common/org/apache/harmony/security/DefaultPolicyScanner.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
4135,
1228,
12,
2514,
436,
16,
2200,
32,
9021,
1622,
34,
7936,
5400,
16,
5411,
987,
32,
653,
2233,
1622,
34,
16262,
5400,
13,
1216,
1860,
16,
5411,
1962,
9291,
288,
3639,
396... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
4135,
1228,
12,
2514,
436,
16,
2200,
32,
9021,
1622,
34,
7936,
5400,
16,
5411,
987,
32,
653,
2233,
1622,
34,
16262,
5400,
13,
1216,
1860,
16,
5411,
1962,
9291,
288,
3639,
396... |
System.out.println(s); | private String unfixEscapes(String s) { System.out.println(s); s = s.replaceAll("\\\\", "\\\\\\\\"); System.out.println(s); s = s.replaceAll("\n", "\\\\n"); System.out.println(s); s = s.replaceAll("\t", "\\\\t"); System.out.println(s); s = s.replaceAll("\b", "\\\\b"); System.out.println(s); s = s.replaceAll("\r", "\\\\r"); System.out.println(s); s = s.replaceAll("\f", "\\\\f"); System.out.println(s); return s; } | 4987 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4987/988a31f8b13c218d3cc997a95f474e9bbb9e4a9a/ComponentDescriptionImpl.java/clean/core/smartfrog/src/org/smartfrog/sfcore/componentdescription/ComponentDescriptionImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
514,
640,
904,
30092,
12,
780,
272,
13,
288,
202,
3163,
18,
659,
18,
8222,
12,
87,
1769,
202,
87,
273,
272,
18,
2079,
1595,
2932,
13011,
3113,
1548,
13011,
1695,
2412,
1769,
202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
514,
640,
904,
30092,
12,
780,
272,
13,
288,
202,
3163,
18,
659,
18,
8222,
12,
87,
1769,
202,
87,
273,
272,
18,
2079,
1595,
2932,
13011,
3113,
1548,
13011,
1695,
2412,
1769,
202,
... | |
URL url = Platform.find( Platform.getBundle( ReportPlugin.REPORT_UI ), new Path( TEMPLATE_FILE ) ); if ( url != null ) | URL url = FileLocator.find( Platform.getBundle( IResourceLocator.FRAGMENT_RESOURCE_HOST ), new Path( TEMPLATE_FILE ), null ); final String templateFileName; try | public boolean performFinish( ) { final IPath locPath = newReportFileWizardPage.getFileLocationFullPath( ); String fn = newReportFileWizardPage.getFileName( ); final String fileName; if ( !fn.endsWith( NEW_REPORT_FILE_EXTENSION ) ) //$NON-NLS-1$ { fileName = fn + NEW_REPORT_FILE_EXTENSION; //$NON-NLS-1$ } else { fileName = fn; } InputStream inputData = null; URL url = Platform.find( Platform.getBundle( ReportPlugin.REPORT_UI ), new Path( TEMPLATE_FILE ) ); if ( url != null ) { try { inputData = url.openStream( ); } catch ( IOException e1 ) { // ignore. } } final InputStream stream = inputData; IRunnableWithProgress op = new IRunnableWithProgress( ) { public void run( IProgressMonitor monitor ) { try { doFinish( locPath, fileName, stream, monitor ); } finally { monitor.done( ); } } }; try { getContainer( ).run( true, false, op ); } catch ( InterruptedException e ) { return false; } catch ( InvocationTargetException e ) { Throwable realException = e.getTargetException( ); ExceptionHandler.handle( realException ); return false; } return true; } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/76ebe408a984f02b49cbaf1597c0c7a0213901fe/NewReportTemplateWizard.java/clean/UI/org.eclipse.birt.report.designer.ui.rcp/src/org/eclipse/birt/report/designer/ui/internal/rcp/wizards/NewReportTemplateWizard.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
3073,
11641,
12,
262,
202,
95,
202,
202,
6385,
467,
743,
1515,
743,
273,
394,
4820,
812,
27130,
1964,
18,
29925,
2735,
24173,
12,
11272,
202,
202,
780,
2295,
273,
394,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
3073,
11641,
12,
262,
202,
95,
202,
202,
6385,
467,
743,
1515,
743,
273,
394,
4820,
812,
27130,
1964,
18,
29925,
2735,
24173,
12,
11272,
202,
202,
780,
2295,
273,
394,
4... |
public Client(File file, NutchConf nutchConf) throws IOException { this(readConfig(file), nutchConf); | public Client(File file, Configuration conf) throws IOException { this(readConfig(file), conf); | public Client(File file, NutchConf nutchConf) throws IOException { this(readConfig(file), nutchConf); } | 46828 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46828/25437bc825d50715dcc9a289a1b4c8fbbc6aced1/DistributedSearch.java/clean/src/java/org/apache/nutch/searcher/DistributedSearch.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
2445,
12,
812,
585,
16,
423,
322,
343,
3976,
290,
322,
343,
3976,
13,
1216,
1860,
288,
1377,
333,
12,
896,
809,
12,
768,
3631,
290,
322,
343,
3976,
1769,
565,
289,
2,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
2445,
12,
812,
585,
16,
423,
322,
343,
3976,
290,
322,
343,
3976,
13,
1216,
1860,
288,
1377,
333,
12,
896,
809,
12,
768,
3631,
290,
322,
343,
3976,
1769,
565,
289,
2,
-100,
-100... |
public static void test ( Node n ) throws Exception | public static void test ( ) throws Exception | public static void test ( Node n ) throws Exception { Dom d = (Dom) n; Locale l = d.locale(); // Locale l = Locale.getLocale( XmlBeans.getContextTypeLoader(), null ); l.enter(); try { doTest( l, d ); } finally { l.exit(); } } | 3520 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3520/78d5fcf8af10b9b5bb990c642b2118f8c482db5e/Public2.java/clean/v2/src/newstore2/org/apache/xmlbeans/impl/newstore2/Public2.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
1842,
261,
262,
1216,
1185,
565,
288,
3639,
12965,
302,
273,
261,
8832,
13,
290,
31,
3639,
6458,
328,
273,
302,
18,
6339,
5621,
3639,
368,
3639,
6458,
328,
273,
6458,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
1842,
261,
262,
1216,
1185,
565,
288,
3639,
12965,
302,
273,
261,
8832,
13,
290,
31,
3639,
6458,
328,
273,
302,
18,
6339,
5621,
3639,
368,
3639,
6458,
328,
273,
6458,
18... |
if(!finished) { Bucket data = dataBlocks[i]; if(data instanceof SerializableToFieldSetBucket) { SimpleFieldSet tmp = ((SerializableToFieldSetBucket)data).toFieldSet(); if(tmp == null) { Logger.minor(this, "Could not save to disk: "+data); return null; } block.put("Data", tmp); } else { Logger.minor(this, "Could not save to disk (not serializable to fieldset): "+data); | Bucket data = dataBlocks[i]; if(data instanceof SerializableToFieldSetBucket) { SimpleFieldSet tmp = ((SerializableToFieldSetBucket)data).toFieldSet(); if(tmp == null) { Logger.minor(this, "Could not save to disk: "+data); | public synchronized SimpleFieldSet getProgressFieldset() { SimpleFieldSet fs = new SimpleFieldSet(true); fs.put("Type", "SplitFileInserterSegment"); fs.put("Finished", Boolean.toString(finished)); // If true, check blocks which are null are finished fs.put("Encoded", Boolean.toString(encoded)); // If true, data blocks which are null are finished fs.put("Started", Boolean.toString(started)); errors.copyToFieldSet(fs, "Errors.", false); SimpleFieldSet dataFS = new SimpleFieldSet(true); dataFS.put("Count", Integer.toString(dataBlocks.length)); for(int i=0;i<dataBlocks.length;i++) { SimpleFieldSet block = new SimpleFieldSet(true); if(dataURIs[i] != null) block.put("URI", dataURIs[i].toString()); SingleBlockInserter sbi = dataBlockInserters[i]; // If started, then sbi = null => block finished. boolean finished = started && sbi == null; if(started) { block.put("Finished", finished); } if(!finished) { Bucket data = dataBlocks[i]; if(data instanceof SerializableToFieldSetBucket) { SimpleFieldSet tmp = ((SerializableToFieldSetBucket)data).toFieldSet(); if(tmp == null) { Logger.minor(this, "Could not save to disk: "+data); return null; } block.put("Data", tmp); } else { Logger.minor(this, "Could not save to disk (not serializable to fieldset): "+data); return null; } } if(!block.isEmpty()) dataFS.put(Integer.toString(i), block); } fs.put("DataBlocks", dataFS); SimpleFieldSet checkFS = new SimpleFieldSet(true); checkFS.put("Count", Integer.toString(checkBlocks.length)); for(int i=0;i<checkBlocks.length;i++) { SimpleFieldSet block = new SimpleFieldSet(true); if(checkURIs[i] != null) block.put("URI", checkURIs[i].toString()); SingleBlockInserter sbi = checkBlockInserters[i]; // If encoded, then sbi == null => block finished boolean finished = encoded && sbi == null && checkURIs[i] != null; if(encoded) { block.put("Finished", finished); } if(!finished) { Bucket data = checkBlocks[i]; if(data != null && data instanceof SerializableToFieldSetBucket) { SimpleFieldSet tmp = ((SerializableToFieldSetBucket)data).toFieldSet(); if(tmp != null) Logger.minor(this, "Could not serialize "+data+" - check block "+i+" of "+segNo); block.put("Data", tmp); } else if(encoded) { Logger.minor(this, "Could not save to disk (null or not serializable to fieldset): "+data); return null; } } if(!block.isEmpty()) checkFS.put(Integer.toString(i), block); } fs.put("CheckBlocks", checkFS); return fs; } | 52909 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52909/e0363cde34d4a550209cc88767fad5b5b57d1d3c/SplitFileInserterSegment.java/buggy/src/freenet/client/async/SplitFileInserterSegment.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3852,
4477,
974,
694,
3570,
2329,
974,
542,
1435,
288,
202,
202,
5784,
974,
694,
2662,
273,
394,
4477,
974,
694,
12,
3767,
1769,
202,
202,
2556,
18,
458,
2932,
559,
3113,
315,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3852,
4477,
974,
694,
3570,
2329,
974,
542,
1435,
288,
202,
202,
5784,
974,
694,
2662,
273,
394,
4477,
974,
694,
12,
3767,
1769,
202,
202,
2556,
18,
458,
2932,
559,
3113,
315,... |
if (jj_2_44(3)) { | if (jj_2_42(3)) { | final public Action action() throws ParseException { Token t; VarAttrValMake vavm; FunctionCall fc; if (jj_2_44(3)) { vavm = varAttrValMake(); {if (true) return new Action(vavm);} } else if (jj_2_45(3)) { fc = functionCall(); {if (true) return new Action(fc);} } else if (jj_2_46(3)) { jj_consume_token(TCL_PREPROCESS); {if (true) return null;} } else { jj_consume_token(-1); throw new ParseException(); } throw new Error("Missing return statement in function"); } | 47007 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47007/d1775300ef3c91eaadbc0bf2706207627b5dc993/SoarParser.java/clean/OldSoar/trunk/visualsoar/Source/edu/umich/visualsoar/parser/SoarParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
1071,
4382,
1301,
1435,
1216,
10616,
288,
3639,
3155,
268,
31,
3639,
4562,
3843,
3053,
6464,
331,
842,
81,
31,
3639,
4284,
1477,
8036,
31,
565,
309,
261,
78,
78,
67,
22,
67,
9452,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
1071,
4382,
1301,
1435,
1216,
10616,
288,
3639,
3155,
268,
31,
3639,
4562,
3843,
3053,
6464,
331,
842,
81,
31,
3639,
4284,
1477,
8036,
31,
565,
309,
261,
78,
78,
67,
22,
67,
9452,
... |
new String[]{"" + sectionId} ); | new String[]{"" + sectionId} ); | public SectionDomainObject getSectionById( int sectionId ) { String sectionName = service.sqlQueryStr( "SELECT section_name FROM sections WHERE section_id = ?", new String[]{"" + sectionId} ); if ( null == sectionName ) { return null; } return new SectionDomainObject( sectionId, sectionName ); } | 8781 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8781/78b8cf3c8e17332a572ee863855f4395ff68a51c/DocumentMapper.java/clean/server/src/imcode/server/document/DocumentMapper.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
10092,
3748,
921,
22103,
5132,
12,
509,
2442,
548,
262,
288,
3639,
514,
28887,
273,
1156,
18,
4669,
1138,
1585,
12,
315,
4803,
2442,
67,
529,
4571,
7178,
4852,
2442,
67,
350,
273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
10092,
3748,
921,
22103,
5132,
12,
509,
2442,
548,
262,
288,
3639,
514,
28887,
273,
1156,
18,
4669,
1138,
1585,
12,
315,
4803,
2442,
67,
529,
4571,
7178,
4852,
2442,
67,
350,
273,
... |
public int getColumnCount(); | int getColumnCount(); | public int getColumnCount(); | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/2703ae3b51c371a2a79d28271cd57b4046c647d0/TableModel.java/buggy/core/src/classpath/javax/javax/swing/table/TableModel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
509,
6716,
1380,
5621,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
509,
6716,
1380,
5621,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
public IFile getExecFile(); | public IBinaryExecutable getExecFile(); | public IFile getExecFile(); | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/a192c2f172621fd921dbaebb14ee66fcee4f8f12/IExecFileInfo.java/buggy/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/IExecFileInfo.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
467,
812,
336,
1905,
812,
5621,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
467,
812,
336,
1905,
812,
5621,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
protected final static void addAllArrayList( ArrayList dest, Iterator files ) | protected static final void addAllArrayList( ArrayList dest, Iterator files ) | protected final static void addAllArrayList( ArrayList dest, Iterator files ) { while( files.hasNext() ) { dest.add( files.next() ); } } | 639 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/639/8ce1de2178a0422105fa437c327b49fb5637ff28/AbstractMetamataTask.java/clean/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/metamata/AbstractMetamataTask.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
760,
727,
918,
5428,
19558,
12,
2407,
1570,
16,
4498,
1390,
262,
565,
288,
3639,
1323,
12,
1390,
18,
5332,
2134,
1435,
262,
3639,
288,
5411,
1570,
18,
1289,
12,
1390,
18,
4285,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
760,
727,
918,
5428,
19558,
12,
2407,
1570,
16,
4498,
1390,
262,
565,
288,
3639,
1323,
12,
1390,
18,
5332,
2134,
1435,
262,
3639,
288,
5411,
1570,
18,
1289,
12,
1390,
18,
4285,
14... |
if (entry.image == null && entry.descriptor == null) { entry.image = image; | if (entry.image == null) { entry.descriptor = descriptor; | public void put(String key, Image image) { Entry entry = (Entry)table.get(key); if (entry == null) { entry = new Entry(); table.put(key, entry); } if (entry.image == null && entry.descriptor == null) { entry.image = image; return; } throw new IllegalArgumentException("ImageRegistry key already in use: " + key); //$NON-NLS-1$ } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/3046bb629d4139ef66a636ba89994e1d5ec3aebc/ImageRegistry.java/buggy/bundles/org.eclipse.jface/src/org/eclipse/jface/resource/ImageRegistry.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1378,
12,
780,
498,
16,
3421,
1316,
13,
288,
202,
202,
1622,
1241,
273,
261,
1622,
13,
2121,
18,
588,
12,
856,
1769,
202,
202,
430,
261,
4099,
422,
446,
13,
288,
1082,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1378,
12,
780,
498,
16,
3421,
1316,
13,
288,
202,
202,
1622,
1241,
273,
261,
1622,
13,
2121,
18,
588,
12,
856,
1769,
202,
202,
430,
261,
4099,
422,
446,
13,
288,
1082,
... |
removeFirstInMemory(); } else { iter.remove(); } Delivery delivery = new SimpleDelivery(this, ref, true); acknowledgeInternal(delivery); } else { Delivery del = push(ref); if (del == null) { if (trace) { log.trace(this + ": no delivery returned for message" + ref + " so no receiver got the message"); log.trace("Delivery is now complete"); } receiversReady = false; return; } else if (!del.isSelectorAccepted()) { | protected void deliverInternal() { try { // The iterator is used to iterate through the refs in the channel in the case that they // don't match the selectors of any receivers. ListIterator iter = null; MessageReference ref = null; while (true) { //TODO simplify locking - do we really need two locks?? synchronized (refLock) { synchronized (deliveryLock) { if (iter == null) { ref = (MessageReference) messageRefs.peekFirst(); } else { if (iter.hasNext()) { ref = (MessageReference)iter.next(); } else { ref = null; } } if (ref != null) { // Check if message is expired (we also do this on the client // side) // If so ack it from the channel if (ref.isExpired()) { if (trace) { log.trace("Message reference: " + ref + " has expired"); } // remove and acknowledge it if (iter == null) { removeFirstInMemory(); } else { iter.remove(); } Delivery delivery = new SimpleDelivery(this, ref, true); acknowledgeInternal(delivery); } else { // Reference is not expired // Attempt to push the ref to a receiver Delivery del = push(ref); if (del == null) { // no receiver, broken receiver // or full receiver // so we stop delivering if (trace) { log.trace(this + ": no delivery returned for message" + ref + " so no receiver got the message"); log.trace("Delivery is now complete"); } receiversReady = false; return; } else if (!del.isSelectorAccepted()) { // No receiver accepted the message because no selectors matched // So we create an iterator (if we haven't already created it) to // iterate through the refs in the channel // TODO Note that this is only a partial solution since if there are messages paged to storage // it won't try those - i.e. it will only iterate through those refs in memory. // Dealing with refs in storage is somewhat tricky since we can't just load them and iterate // through them since we might run out of memory // So we will need to load individual refs from storage given the selector expressions // Secondly we should also introduce some in memory indexes here to prevent having to // iterate through all the refs every time // Having said all that, having consumers on a queue that don't match many messages // is an antipattern and should be avoided by the user if (iter == null) { iter = messageRefs.iterator(); } } else { if (trace) { log.trace(this + ": " + del + " returned for message:" + ref); } //Receiver accepted the reference // We must synchronize here to cope with another race // condition where message is // cancelled/acked in flight while the following few // actions are being performed. // e.g. delivery could be cancelled acked after being // removed from state but before // delivery being added (observed). synchronized (del) { if (trace) { log.trace(this + " incrementing delivery count for " + del); } // FIXME - It's actually possible the delivery could be // cancelled before it reaches // here, in which case we wouldn't get a delivery but we // still need to increment the // delivery count // All the problems related to these race conditions and // fiddly edge cases will disappear // once we do // http://jira.jboss.com/jira/browse/JBMESSAGING-355 // This will make life a lot easier del.getReference().incrementDeliveryCount(); if (!del.isCancelled()) { if (iter == null) { removeFirstInMemory(); } else { iter.remove(); } // delivered if (!del.isDone()) { // Add the delivery to state deliveries.add(del); } } } } } } else { // No more refs in channel if (trace) { log.trace(this + " no more refs to deliver "); } break; } } } } } catch (Throwable t) { log.error(this + " Failed to deliver", t); } } | 3806 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3806/23fab495d2abccb117ffe0f5a935da045c7de818/ChannelSupport.java/clean/src/main/org/jboss/messaging/core/ChannelSupport.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
4750,
918,
11795,
3061,
1435,
282,
288,
1377,
775,
1377,
288,
540,
368,
1021,
2775,
353,
1399,
358,
7401,
3059,
326,
9047,
316,
326,
1904,
316,
326,
648,
716,
2898,
540,
368,
2727,
1404,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
4750,
918,
11795,
3061,
1435,
282,
288,
1377,
775,
1377,
288,
540,
368,
1021,
2775,
353,
1399,
358,
7401,
3059,
326,
9047,
316,
326,
1904,
316,
326,
648,
716,
2898,
540,
368,
2727,
1404,
... | |
while (i < length && buf.charAt(i) >= '0' && buf.charAt(i) <= '9') { | int numToTrim=0; int length=buf.length(); if ( (length>2)&&((buf.charAt(0)=='r')||(buf.charAt(0)=='R'))&& ((buf.charAt(1)=='e')||(buf.charAt(1)=='E'))) { char c=buf.charAt(2); if (c==':') { numToTrim=3; } else if ((c=='[')||(c=='(')) { int i=3; while ((i<length)&&(buf.charAt(i)>='0')&&(buf.charAt(i)<='9')) { | protected boolean stripRe(StringBuffer buf) { // Much of this code is duplicated in MessageBase. Sigh. ### if (buf == null) return false; int numToTrim = 0; int length = buf.length(); if (length > 2 && (buf.charAt(0) == 'r' || buf.charAt(0) == 'R') && (buf.charAt(1) == 'e' || buf.charAt(1) == 'E')) { char c = buf.charAt(2); if (c == ':') { numToTrim = 3; // Skip over "Re:" } else if (c == '[' || c == '(') { int i = 3; // skip over "Re[" or "Re(" // Skip forward over digits after the "[" or "(". while (i < length && buf.charAt(i) >= '0' && buf.charAt(i) <= '9') { i++; } // Now ensure that the following thing is "]:" or "):" // Only if it is do we treat this all as a "Re"-ish thing. if (i < (length-1) && (buf.charAt(i) == ']' || buf.charAt(i) == ')') && buf.charAt(i+1) == ':') { numToTrim = i+2; // Skip the whole thing. } } } if (numToTrim > 0) { int i = numToTrim; while (i < length - 1 && Character.isWhitespace(buf.charAt(i))) { i++; } for (int j=i ; j<length ; j++) { buf.setCharAt(j - i, buf.charAt(j)); } buf.setLength(length - i); return true; } return false; } | 54155 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54155/0cc63cb388a13f01532486f9d178811914e6d71b/MessageExtraWrapper.java/clean/grendel/sources/grendel/storage/MessageExtraWrapper.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
1250,
2569,
426,
12,
780,
1892,
1681,
13,
288,
565,
368,
490,
2648,
434,
333,
981,
353,
16975,
316,
2350,
2171,
18,
225,
348,
2031,
18,
11849,
565,
309,
261,
4385,
422,
446,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
1250,
2569,
426,
12,
780,
1892,
1681,
13,
288,
565,
368,
490,
2648,
434,
333,
981,
353,
16975,
316,
2350,
2171,
18,
225,
348,
2031,
18,
11849,
565,
309,
261,
4385,
422,
446,
13,
... |
field.set(javaObject, NativeJavaObject.coerceType(field.getType(), value)); | field.set(javaObject, NativeJavaObject.coerceType(field.getType(), value)); | public void put(String name, Object javaObject, Object value, boolean isStatic) { Hashtable ht = isStatic ? staticMembers : members; Object member = ht.get(name); if (!isStatic && member == null) { // Try to get static member from instance (LC3) member = staticMembers.get(name); } if (member == null) throw reportMemberNotFound(name); if (member instanceof FieldAndMethods) { FieldAndMethods fam = (FieldAndMethods) ht.get(name); member = fam.getField(); } // Is this a bean property "set"? if (member instanceof BeanProperty) { try { Method method = ((BeanProperty) member).setter; if (method == null) throw reportMemberNotFound(name); Class[] types = method.getParameterTypes(); Object[] params = { NativeJavaObject.coerceType(types[0], value) }; method.invoke(javaObject, params); } catch (IllegalAccessException accessEx) { throw new RuntimeException("unexpected IllegalAccessException " + "accessing Java field"); } catch (InvocationTargetException e) { throw new WrappedException(e.getTargetException()); } } else { Field field = null; try { field = (Field) member; if (field == null) { Object[] args = {name}; throw Context.reportRuntimeError( Context.getMessage("msg.java.internal.private", args)); } field.set(javaObject, NativeJavaObject.coerceType(field.getType(), value)); } catch (ClassCastException e) { Object errArgs[] = { name }; throw Context.reportRuntimeError(Context.getMessage ("msg.java.method.assign", errArgs)); } catch (IllegalAccessException accessEx) { throw new RuntimeException("unexpected IllegalAccessException "+ "accessing Java field"); } catch (IllegalArgumentException argEx) { Object errArgs[] = { value.getClass().getName(), field, javaObject.getClass().getName() }; throw Context.reportRuntimeError(Context.getMessage( "msg.java.internal.field.type", errArgs)); } } } | 51275 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51275/e737c6d867e82d4ba7fd00e7e388c9c8da824ff0/JavaMembers.java/buggy/js/rhino/org/mozilla/javascript/JavaMembers.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1378,
12,
780,
508,
16,
1033,
2252,
921,
16,
1033,
460,
16,
10792,
1250,
16116,
13,
565,
288,
3639,
18559,
14049,
273,
16116,
692,
760,
6918,
294,
4833,
31,
3639,
1033,
3140,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1378,
12,
780,
508,
16,
1033,
2252,
921,
16,
1033,
460,
16,
10792,
1250,
16116,
13,
565,
288,
3639,
18559,
14049,
273,
16116,
692,
760,
6918,
294,
4833,
31,
3639,
1033,
3140,
... |
in.skipBytes(2); in.read(er); short layerId = DataTools.bytesToShort(er, false); | in.readShort(); short layerId = in.readShort(); | private void initMetadata() throws FormatException, IOException { in.seek(0); // start by reading the file header byte[] toRead = new byte[4]; in.read(toRead); long order = batoi(toRead); // byte ordering little = toRead[2] != 0xff || toRead[3] != 0xff; metadata.put("Byte Order", new Boolean(little)); in.skipBytes(4); in.read(toRead); long version = DataTools.bytesToLong(toRead, false); metadata.put("Version", new Long(version)); byte[] er = new byte[2]; in.read(er); short count = DataTools.bytesToShort(er, false); metadata.put("Count", new Short(count)); in.skipBytes(2); in.read(toRead); long offset = DataTools.bytesToLong(toRead, false); // skip to first tag in.seek(offset); // read in each tag and its data for (int i=0; i<count; i++) { in.read(er); short tag = DataTools.bytesToShort(er, false); in.skipBytes(2); in.read(toRead); offset = DataTools.bytesToLong(toRead, false); in.read(toRead); long fmt = DataTools.bytesToLong(toRead, false); metadata.put("Format", new Long(fmt)); in.read(toRead); long numBytes = DataTools.bytesToLong(toRead, false); metadata.put("NumBytes", new Long(numBytes)); if (tag == 67 || tag == 68) { byte[] b = new byte[1]; in.read(b); boolean isOpenlab2; if (b[0] == '0') isOpenlab2 = false; else isOpenlab2 = true; metadata.put("isOpenlab2", new Boolean(isOpenlab2)); in.skipBytes(2); in.read(er); short layerId = DataTools.bytesToShort(er, false); metadata.put("LayerID", new Short(layerId)); in.read(er); short layerType = DataTools.bytesToShort(er, false); metadata.put("LayerType", new Short(layerType)); in.read(er); short bitDepth = DataTools.bytesToShort(er, false); metadata.put("BitDepth", new Short(bitDepth)); in.read(er); short opacity = DataTools.bytesToShort(er, false); metadata.put("Opacity", new Short(opacity)); // not sure how many bytes to skip here in.skipBytes(10); in.read(toRead); long type = DataTools.bytesToLong(toRead, false); metadata.put("ImageType", new Long(type)); // not sure how many bytes to skip in.skipBytes(10); in.read(toRead); long timestamp = DataTools.bytesToLong(toRead, false); metadata.put("Timestamp", new Long(timestamp)); in.skipBytes(2); if (isOpenlab2 == true) { byte[] layerName = new byte[127]; in.read(layerName); metadata.put("LayerName", new String(layerName)); in.read(toRead); long timestampMS = DataTools.bytesToLong(toRead, false); metadata.put("Timestamp-MS", new Long(timestampMS)); in.skipBytes(1); byte[] notes = new byte[118]; in.read(notes); metadata.put("Notes", new String(notes)); } else in.skipBytes(123); } else if (tag == 69) { in.read(toRead); long platform = DataTools.bytesToLong(toRead, false); metadata.put("Platform", new Long(platform)); in.read(er); short units = DataTools.bytesToShort(er, false); metadata.put("Units", new Short(units)); in.read(er); short imageId = DataTools.bytesToShort(er, false); metadata.put("ID", new Short(imageId)); in.skipBytes(1); byte[] toRead2 = new byte[8]; double xOrigin = DataTools.readDouble(in, false); metadata.put("XOrigin", new Double(xOrigin)); double yOrigin = DataTools.readDouble(in, false); metadata.put("YOrigin", new Double(yOrigin)); double xScale = DataTools.readDouble(in, false); metadata.put("XScale", new Double(xScale)); double yScale = DataTools.readDouble(in, false); metadata.put("YScale", new Double(yScale)); in.skipBytes(1); byte[] other = new byte[31]; in.read(other); metadata.put("Other", new String(other)); } // Populate metadata store // The metadata store we're working with. MetadataStore store = getMetadataStore(); String type = "int8"; if (metadata.get("BitDepth") != null) { int bitDepth = ((Short) metadata.get("BitDepth")).intValue(); if (bitDepth <= 8) type = "int8"; else if (bitDepth <= 16) type = "int16"; else type = "int32"; } store.setImage(null, metadata.get("Timestamp").toString(), null, null); // FIXME: There is a loss of precision here as we are down-casting from // double to float. store.setStageLabel(null, (Float) metadata.get("XOrigin"), (Float) metadata.get("YOrigin"), null, null); // FIXME: There is a loss of precision here as we are down-casting from // double to float. store.setDimensions((Float) metadata.get("XScale"), (Float) metadata.get("YScale"), null, null, null, null); in.seek(offset); // We need to poke at least one plane so that we can get "sizeX" and // "sizeY" set. to populate the pixels set. try { firstPlane = openImage(currentId, 0); } catch (FormatException e) { e.printStackTrace(); } store.setPixels(sizeX, sizeY, new Integer(numBlocks), new Integer(getSizeC(currentId)), new Integer(1), type, new Boolean(!little), "XYCZT", null); } } | 11426 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11426/2df09d33bfdc966378aae0cc09cb503afb983bc2/OpenlabReader.java/clean/loci/formats/in/OpenlabReader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
1208,
2277,
1435,
1216,
4077,
503,
16,
1860,
288,
565,
316,
18,
16508,
12,
20,
1769,
565,
368,
787,
635,
6453,
326,
585,
1446,
565,
1160,
8526,
358,
1994,
273,
394,
1160,
63,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
1208,
2277,
1435,
1216,
4077,
503,
16,
1860,
288,
565,
316,
18,
16508,
12,
20,
1769,
565,
368,
787,
635,
6453,
326,
585,
1446,
565,
1160,
8526,
358,
1994,
273,
394,
1160,
63,... |
this.configureButton.setEnabled(false); | private void init() { this.add(addButton); this.add(configureButton); this.add(infoButton); this.add(searchButton); this.addButton.setName("add"); this.configureButton.setName("config"); this.searchButton.setName("search"); this.infoButton.setName("info"); this.addButton.addActionListener(this); this.configureButton.addActionListener(this); this.searchButton.addActionListener(this); this.infoButton.addActionListener(this); //Disable all buttons that do nothing. this.configureButton.setEnabled(false); } | 43455 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/43455/f2d29276f1f67246af0fb9f8af2d456c5301ffb6/QuickMenu.java/buggy/src/net/java/sip/communicator/impl/gui/main/QuickMenu.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1208,
1435,
288,
3639,
333,
18,
1289,
12,
1289,
3616,
1769,
3639,
333,
18,
1289,
12,
14895,
3616,
1769,
3639,
333,
18,
1289,
12,
1376,
3616,
1769,
3639,
333,
18,
1289,
12,
30... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1208,
1435,
288,
3639,
333,
18,
1289,
12,
1289,
3616,
1769,
3639,
333,
18,
1289,
12,
14895,
3616,
1769,
3639,
333,
18,
1289,
12,
1376,
3616,
1769,
3639,
333,
18,
1289,
12,
30... | |
protected Object interpretMethod(Class c, MethodDescriptor md, Object obj, Object[] params) { MethodDeclaration meth = md.method; List<FormalParameter> mparams = meth.getParameters(); List<Node> stmts = meth.getBody().getStatements(); String name = meth.getName(); Context context = null; if (Modifier.isStatic(md.method.getAccessFlags())) { if (md.variables == null) { md.importationManager.setClassLoader(classLoader); // pass 1: names resolution Context ctx = new StaticContext(this, c, md.importationManager); ctx.setAdditionalClassLoaderContainer(classLoader); NameVisitor nv = new NameVisitor(ctx); ListIterator<FormalParameter> it1 = mparams.listIterator(); while (it1.hasNext()) { it1.next().acceptVisitor(nv); } ListIterator<Node> it2 = stmts.listIterator(); while (it2.hasNext()) { Node o = it2.next().acceptVisitor(nv); if (o != null) it2.set(o); } // pass 2: type checking ctx = new StaticContext(this, c, md.importationManager); ctx.setAdditionalClassLoaderContainer(classLoader); TypeChecker tc = new TypeChecker(ctx); it1 = mparams.listIterator(); while (it1.hasNext()) { it1.next().acceptVisitor(tc); } it2 = stmts.listIterator(); while (it2.hasNext()) { it2.next().acceptVisitor(tc); } md.variables = ctx.getCurrentScopeVariables(); // Test of the additional context existence if (!name.equals("<clinit>") && !name.equals("<init>")) { try { md.contextField = c.getField("local$Variables$Reference$0"); } catch (NoSuchFieldException e) { } } } // pass 3: evaluation context = new StaticContext(this, c, md.variables); } else { if (md.variables == null) { md.importationManager.setClassLoader(classLoader); // pass 1: names resolution Context ctx1 = new MethodContext(this, c, c, md.importationManager); ctx1.setAdditionalClassLoaderContainer(classLoader); NameVisitor nv1 = new NameVisitor(ctx1); Context ctx2 = new MethodContext(this, c, c, md.importationManager); ctx2.setAdditionalClassLoaderContainer(classLoader); NameVisitor nv2 = new NameVisitor(ctx2); // Initializes the context with the outerclass variables Object[][] cc = null; try { Field f = c.getField("local$Variables$Class$0"); cc = (Object[][])f.get(obj); for (int i = 0; i < cc.length; i++) { Object[] cell = cc[i]; if (!((String)cell[0]).equals("this")) { ctx1.defineConstant((String)cell[0], cell[1]); } } } catch (Exception e) { } // Visit the parameters and the body of the method ListIterator<FormalParameter> it1 = mparams.listIterator(); while (it1.hasNext()) { it1.next().acceptVisitor(nv1); } ListIterator<Node> it2 = stmts.listIterator(); while (it2.hasNext()) { Node n = it2.next(); Node o = null; if (n.hasProperty(NodeProperties.INSTANCE_INITIALIZER)) { o = n.acceptVisitor(nv2); } else { o = n.acceptVisitor(nv1); } if (o != null) it2.set(o); } // pass 2: type checking ctx1 = new MethodContext(this, c, c, md.importationManager); ctx1.setAdditionalClassLoaderContainer(classLoader); TypeChecker tc1 = new TypeChecker(ctx1); ctx2 = new MethodContext(this, c, c, md.importationManager); ctx2.setAdditionalClassLoaderContainer(classLoader); TypeChecker tc2 = new TypeChecker(ctx2); // Initializes the context with outerclass variables if (cc != null) { for (int i = 0; i < cc.length; i++) { Object[] cell = cc[i]; if (!((String)cell[0]).equals("this")) { ctx1.defineConstant((String)cell[0], cell[1]); } } } // Visit the parameters and the body of the method it1 = mparams.listIterator(); while (it1.hasNext()) { it1.next().acceptVisitor(tc1); } it2 = stmts.listIterator(); while (it2.hasNext()) { Node n = (Node)it2.next(); if (n.hasProperty(NodeProperties.INSTANCE_INITIALIZER)) { n.acceptVisitor(tc2); } else { n.acceptVisitor(tc1); } } md.variables = ctx1.getCurrentScopeVariables(); // Test of the additional context existence if (!name.equals("<clinit>") && !name.equals("<init>")) { try { md.contextField = c.getField("local$Variables$Reference$0"); } catch (NoSuchFieldException e) { } } } // pass 3: evaluation context = new MethodContext(this, c, obj, md.variables); } context.setAdditionalClassLoaderContainer(classLoader); // Set the arguments values Iterator<FormalParameter> it1 = mparams.iterator(); int i = 0; while (it1.hasNext()) { context.set(it1.next().getName(), params[i++]); } // Set the final local variables values if (md.contextField != null) { Map vars = null; try { vars = (Map)md.contextField.get(obj); } catch (IllegalAccessException e) { } if (vars != null) { Iterator it2 = vars.keySet().iterator(); while (it2.hasNext()) { String s = (String) it2.next(); if (!s.equals("this")) { context.setConstant(s, vars.get(s)); } } } } EvaluationVisitor ev = new EvaluationVisitor(context); Iterator<Node> it3 = stmts.iterator(); try { while (it3.hasNext()) { it3.next().acceptVisitor(ev); } } catch (ReturnException e) { return e.getValue(); } return null; } | 11192 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11192/56602892a0ed21c5100101190a7b3d24e2204871/TreeInterpreter.java/buggy/dynamicjava/src/koala/dynamicjava/interpreter/TreeInterpreter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
1033,
10634,
1305,
12,
797,
276,
16,
4766,
282,
2985,
3187,
3481,
16,
4766,
282,
1033,
1081,
16,
4766,
282,
1033,
8526,
859,
13,
288,
565,
2985,
6094,
3639,
7917,
273,
3481,
18,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
1033,
10634,
1305,
12,
797,
276,
16,
4766,
282,
2985,
3187,
3481,
16,
4766,
282,
1033,
1081,
16,
4766,
282,
1033,
8526,
859,
13,
288,
565,
2985,
6094,
3639,
7917,
273,
3481,
18,
2... | ||
setName((String) evalAttr("name", getName(), String.class)); | setName((String) evalAttr("name", getNameExpr(), String.class)); | private void evaluateExpressions() throws JspException { try { setCookie((String) evalAttr("cookie", getCookie(), String.class)); } catch (NullAttributeException ex) { setCookie(null); } try { setExpr((String) evalAttr("expr", getExpr(), String.class)); } catch (NullAttributeException ex) { setExpr(null); } try { setHeader((String) evalAttr("header", getHeader(), String.class)); } catch (NullAttributeException ex) { setHeader(null); } try { setLocation((String) evalAttr("location", getLocation(), String.class)); } catch (NullAttributeException ex) { setLocation(null); } try { setName((String) evalAttr("name", getName(), String.class)); } catch (NullAttributeException ex) { setName(null); } try { setParameter((String) evalAttr("parameter", getParameter(), String.class)); } catch (NullAttributeException ex) { setParameter(null); } try { setProperty((String) evalAttr("property", getProperty(), String.class)); } catch (NullAttributeException ex) { setProperty(null); } try { setScope((String) evalAttr("scope", getScope(), String.class)); } catch (NullAttributeException ex) { setScope(null); } try { setValue((String) evalAttr("value", getValue(), String.class)); } catch (NullAttributeException ex) { setValue(null); } } | 48068 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48068/db064e19656421b94aaf753550935d95f44bd5f9/ELNotMatchTag.java/buggy/contrib/struts-el/src/share/org/apache/strutsel/taglib/logic/ELNotMatchTag.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
5956,
8927,
1435,
1216,
27485,
288,
3639,
775,
288,
5411,
26793,
12443,
780,
13,
5302,
3843,
2932,
8417,
3113,
24643,
9334,
514,
18,
1106,
10019,
3639,
289,
1044,
261,
2041,
1499... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
5956,
8927,
1435,
1216,
27485,
288,
3639,
775,
288,
5411,
26793,
12443,
780,
13,
5302,
3843,
2932,
8417,
3113,
24643,
9334,
514,
18,
1106,
10019,
3639,
289,
1044,
261,
2041,
1499... |
int index = menus.indexOf(menu); if (index == -1) return; | Menu m = (Menu) menus.get (index); menus.remove (index); m.removeNotify (); m.parent = null; | remove(MenuComponent menu){ int index = menus.indexOf(menu); if (index == -1) return; remove(index);} | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/ac6303b96cdaf2d4230daf25a90dd00cc4cb192d/MenuBar.java/buggy/core/src/classpath/java/java/awt/MenuBar.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1206,
12,
4599,
1841,
3824,
15329,
225,
509,
770,
273,
21374,
18,
31806,
12,
5414,
1769,
225,
309,
261,
1615,
422,
300,
21,
13,
565,
327,
31,
225,
1206,
12,
1615,
1769,
97,
2,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1206,
12,
4599,
1841,
3824,
15329,
225,
509,
770,
273,
21374,
18,
31806,
12,
5414,
1769,
225,
309,
261,
1615,
422,
300,
21,
13,
565,
327,
31,
225,
1206,
12,
1615,
1769,
97,
2,
-100,
-100,
... |
super.activityStopped(); messageEventProducer = null; setLocalBodyImpl(new InactiveLocalBodyStrategy()); } | super.activityStopped(); messageEventProducer = null; setLocalBodyImpl(new InactiveLocalBodyStrategy()); } | protected void activityStopped() { super.activityStopped(); messageEventProducer = null; setLocalBodyImpl(new InactiveLocalBodyStrategy()); } | 58694 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58694/3b8d1382ffc872fc9b8335fdb22b582eb5574f18/BodyImpl.java/clean/src/org/objectweb/proactive/core/body/BodyImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
5728,
15294,
1435,
288,
202,
202,
9565,
18,
9653,
15294,
5621,
202,
202,
2150,
1133,
12140,
273,
446,
31,
202,
202,
542,
2042,
2250,
2828,
12,
2704,
657,
3535,
2042,
2250,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
5728,
15294,
1435,
288,
202,
202,
9565,
18,
9653,
15294,
5621,
202,
202,
2150,
1133,
12140,
273,
446,
31,
202,
202,
542,
2042,
2250,
2828,
12,
2704,
657,
3535,
2042,
2250,... |
private void forceOpenPerspective() { if (getWorkbenchWindowCount() == 0) { // Something is wrong, there should be at least // one workbench window open by now. return; } String perspId = null; for (int i = 0; i < commandLineArgs.length - 1; i++) { if (commandLineArgs[i].equalsIgnoreCase("-perspective")) { //$NON-NLS-1$ perspId = commandLineArgs[i+1]; break; } } if (perspId == null) return; IPerspectiveDescriptor desc = getPerspectiveRegistry().findPerspectiveWithId(perspId); if (desc == null) return; IWorkbenchWindow win = getActiveWorkbenchWindow(); if (win == null) win = getWorkbenchWindows()[0]; try { showPerspective(perspId, win); } catch (WorkbenchException e) { String msg = "Workbench exception showing specified command line perspective on startup."; //$NON-NLS-1$ WorkbenchPlugin.log(msg, new Status(Status.ERROR, PlatformUI.PLUGIN_ID,0, msg, e)); } } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/25425fe3505bc6f62e9021f3f79e33d77a752241/Workbench.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/Workbench.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
2944,
3678,
14781,
16772,
1435,
288,
202,
202,
430,
261,
588,
2421,
22144,
3829,
1380,
1435,
422,
374,
13,
288,
1082,
202,
759,
29116,
353,
7194,
16,
1915,
1410,
506,
622,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
2944,
3678,
14781,
16772,
1435,
288,
202,
202,
430,
261,
588,
2421,
22144,
3829,
1380,
1435,
422,
374,
13,
288,
1082,
202,
759,
29116,
353,
7194,
16,
1915,
1410,
506,
622,... | ||
public UMOMessageDispatcher create(UMOConnector connector) throws UMOException | public UMOMessageDispatcher create(UMOImmutableEndpoint endpoint) throws UMOException | public UMOMessageDispatcher create(UMOConnector connector) throws UMOException { return new GlueMessageDispatcher((AbstractConnector) connector); } | 2370 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2370/589f59b15144184ea22999b384d5ea92ddec8bb9/GlueMessageDispatcherFactory.java/buggy/providers/glue/src/main/java/org/mule/providers/soap/glue/GlueMessageDispatcherFactory.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
587,
5980,
1079,
6681,
752,
12,
2799,
51,
16014,
3293,
2494,
13,
1216,
587,
5980,
503,
565,
288,
3639,
327,
394,
23138,
1079,
6681,
12443,
7469,
7487,
13,
8703,
1769,
565,
289,
2,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
587,
5980,
1079,
6681,
752,
12,
2799,
51,
16014,
3293,
2494,
13,
1216,
587,
5980,
503,
565,
288,
3639,
327,
394,
23138,
1079,
6681,
12443,
7469,
7487,
13,
8703,
1769,
565,
289,
2,
... |
public org.quickfix.field.SettlCurrOfferFxRate getSettlCurrOfferFxRate() throws FieldNotFound { org.quickfix.field.SettlCurrOfferFxRate value = new org.quickfix.field.SettlCurrOfferFxRate(); | public quickfix.field.SettlCurrOfferFxRate getSettlCurrOfferFxRate() throws FieldNotFound { quickfix.field.SettlCurrOfferFxRate value = new quickfix.field.SettlCurrOfferFxRate(); | public org.quickfix.field.SettlCurrOfferFxRate getSettlCurrOfferFxRate() throws FieldNotFound { org.quickfix.field.SettlCurrOfferFxRate value = new org.quickfix.field.SettlCurrOfferFxRate(); getField(value); return value; } | 8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/QuoteStatusReport.java/clean/src/java/src/quickfix/fix44/QuoteStatusReport.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
694,
6172,
20143,
10513,
42,
92,
4727,
336,
694,
6172,
20143,
10513,
42,
92,
4727,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
694,
6172,
20143,
10513,
42,
92,
4727,
336,
694,
6172,
20143,
10513,
42,
92,
4727,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
... |
SWT.BOTTOM, true); | SWT.NONE, true); | private IWindowTrim getStatusLineTrim() { if (statusLineTrim == null) { statusLineTrim = new WindowTrimProxy( getStatusLineManager().getControl(), "org.eclipse.jface.action.StatusLineManager", //$NON-NLS-1$ WorkbenchMessages.TrimCommon_StatusLine_TrimName, SWT.BOTTOM, true); } return statusLineTrim; } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/5584c64150adcadcce5bbb9f45d2aafcdedc1533/WorkbenchWindow.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
467,
3829,
14795,
5870,
1670,
14795,
1435,
288,
202,
202,
430,
261,
2327,
1670,
14795,
422,
446,
13,
288,
1082,
202,
2327,
1670,
14795,
273,
394,
6076,
14795,
3886,
12,
6862,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
467,
3829,
14795,
5870,
1670,
14795,
1435,
288,
202,
202,
430,
261,
2327,
1670,
14795,
422,
446,
13,
288,
1082,
202,
2327,
1670,
14795,
273,
394,
6076,
14795,
3886,
12,
6862,
2... |
throw new Error("not implemented"); | AccessibleContext ac = getAccessibleColumnHeaderRenderer(); if (ac instanceof AccessibleValue) return (AccessibleValue) ac; else return null; | public AccessibleValue getAccessibleValue() throws NotImplementedException { throw new Error("not implemented"); } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/eef19a6fbc70451186d53b7669077748b8b7c136/JTableHeader.java/buggy/core/src/classpath/javax/javax/swing/table/JTableHeader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4202,
1071,
5016,
1523,
620,
336,
10451,
620,
1435,
3639,
1216,
10051,
503,
1377,
288,
3639,
5016,
1523,
1042,
1721,
273,
336,
10451,
1494,
1864,
6747,
5621,
309,
261,
1077,
1276,
5016,
1523,
62... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4202,
1071,
5016,
1523,
620,
336,
10451,
620,
1435,
3639,
1216,
10051,
503,
1377,
288,
3639,
5016,
1523,
1042,
1721,
273,
336,
10451,
1494,
1864,
6747,
5621,
309,
261,
1077,
1276,
5016,
1523,
62... |
lde = new ListDataEvent( com.gallery.GalleryRemote.GalleryRemote.getInstance().mainFrame, ListDataEvent.CONTENTS_CHANGED, 0, albumList.size() ); | fireContentsChanged( this, 0, albumList.size() ); | void notifyListeners() { ListDataEvent lde; if (albumList != null) { lde = new ListDataEvent( com.gallery.GalleryRemote.GalleryRemote.getInstance().mainFrame, ListDataEvent.CONTENTS_CHANGED, 0, albumList.size() ); } else { lde = new ListDataEvent( com.gallery.GalleryRemote.GalleryRemote.getInstance().mainFrame, ListDataEvent.CONTENTS_CHANGED, 0, 0 ); } notifyListeners(lde); } | 5431 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5431/73c089cb6f981f58b7f0cf0845cec6ba85ea1191/Gallery.java/clean/gallery_remote/com/gallery/GalleryRemote/model/Gallery.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
6459,
5066,
5583,
1435,
288,
202,
202,
682,
751,
1133,
328,
323,
31,
202,
202,
430,
261,
25090,
682,
480,
446,
13,
288,
1082,
202,
80,
323,
273,
394,
987,
751,
1133,
12,
532,
18,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
6459,
5066,
5583,
1435,
288,
202,
202,
682,
751,
1133,
328,
323,
31,
202,
202,
430,
261,
25090,
682,
480,
446,
13,
288,
1082,
202,
80,
323,
273,
394,
987,
751,
1133,
12,
532,
18,... |
org.xhtmlrenderer.css.newmatch.CascadedStyle matched = _matcher.getCascadedStyle(elem); | org.xhtmlrenderer.css.newmatch.CascadedStyle matched = _matcher.matchElement(elem); | public void restyleTree( org.w3c.dom.Element elem ) { CalculatedStyle parent = null; // if this is the root, we will have no parent XRElement; otherwise // we will check to see if our parent was loaded. Since we expect to load // from root to leaves, we should always find a parent // this means, however, that root will have a null parent if ( elem.getOwnerDocument().getDocumentElement() == elem ) { _styleCache = new java.util.HashMap(); parent = new CurrentBoxStyle(_rect); } else { org.w3c.dom.Node pnode = elem.getParentNode(); if(pnode.getNodeType() == org.w3c.dom.Node.ELEMENT_NODE) parent = getCalculatedStyle( (org.w3c.dom.Element) pnode ); if ( parent == null ) { throw new RuntimeException( "Applying matches to elements, found an element with no mapped parent; can't continue." ); } } org.xhtmlrenderer.css.newmatch.CascadedStyle matched = _matcher.getCascadedStyle(elem); CalculatedStyle cs = null; StringBuffer sb = new StringBuffer(); sb.append(parent.hashCode()).append(":").append(matched.hashCode()); String fingerprint = sb.toString(); cs = (CalculatedStyle) _styleCache.get(fingerprint); if(cs == null) { cs = new CalculatedStyle(parent, matched); _styleCache.put(fingerprint, cs); } _styleMap.put( elem, cs ); //System.err.println(elem.getNodeName()+" "+cs); // apply rules from style attribute on element, if any // elementStyling is now responsibility of Matcher org.w3c.dom.NodeList nl = elem.getChildNodes(); for ( int i = 0, len = nl.getLength(); i < len; i++ ) { org.w3c.dom.Node n = nl.item( i ); if ( n.getNodeType() == org.w3c.dom.Node.ELEMENT_NODE ) { restyleTree( (org.w3c.dom.Element)n ); } } } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/8756fd35e9cd52c9d6dd01377122d574a0c48fc0/Styler.java/buggy/src/java/org/xhtmlrenderer/css/style/Styler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
3127,
1362,
2471,
12,
2358,
18,
91,
23,
71,
18,
9859,
18,
1046,
3659,
262,
288,
5411,
15994,
690,
2885,
982,
273,
446,
31,
5411,
368,
309,
333,
353,
326,
1365,
16,
732,
903... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
3127,
1362,
2471,
12,
2358,
18,
91,
23,
71,
18,
9859,
18,
1046,
3659,
262,
288,
5411,
15994,
690,
2885,
982,
273,
446,
31,
5411,
368,
309,
333,
353,
326,
1365,
16,
732,
903... |
for ( int j=0; j < _fields[i].columns.length; j++ ) | for ( int j=0; j < _fields[i].columns.length; j++ ) | public Object store( Object conn, Object[] fields, Object identity, Object[] original, Object stamp ) throws ObjectModifiedException, ObjectDeletedException, PersistenceException { PreparedStatement stmt = null; int count; try { // Must store record in parent table first. // All other dependents are stored independently. if ( _extends != null ) _extends.store( conn, fields, identity, original, stamp ); stmt = ( (Connection) conn ).prepareStatement( original == null ? _sqlStore : _sqlStoreDirty ); count = 1; // bind fields of the row to be stored into the preparedStatement for ( int i = 0 ; i < _fields.length ; ++i ) { if ( _fields[ i ].store ) { if ( fields[i] == null ) { for ( int j=0; j < _fields[i].columns.length; j++ ) stmt.setNull( count++, _fields[i].columns[j].sqlType ); } else if ( fields[i] instanceof Complex ) { Complex inner = (Complex)fields[i]; if ( inner.size() != _fields[i].columns.length ) throw new PersistenceException( "Size of complex field mismatch!" ); for ( int j=0; j<_fields[i].columns.length; j++ ) { if ( inner == null || inner.get(j) == null ) stmt.setNull( count++, _fields[i].columns[j].sqlType ); else stmt.setObject( count++, toSQL( i, j, inner.get(j)), _fields[i].columns[j].sqlType ); } } else { if ( _fields[i].columns.length != 1 ) throw new PersistenceException( "Complex field expected! "); if ( fields[i] == null ) stmt.setNull( count++, _fields[i].columns[0].sqlType ); else stmt.setObject( count++, toSQL( i, 0, fields[i]), _fields[i].columns[0].sqlType ); } } } // bind the identity of the row to be stored into the preparedStatement if ( identity instanceof Complex ) { Complex id = (Complex) identity; if ( id.size() != _ids.length || _ids.length <= 1 ) throw new PersistenceException( "Size of complex field mismatched!"); for ( int i=0; i<_ids.length; i++ ) stmt.setObject( count++, idToSQL( i, id.get(i) ) ); } else { if ( _ids.length != 1 ) throw new PersistenceException( "Complex field expected!" ); stmt.setObject( count++, idToSQL( 0, identity ) ); } // bind the old fields of the row to be stored into the preparedStatement if ( original != null ) { for ( int i = 0 ; i < _fields.length ; ++i ) { if ( _fields[ i ].store && _fields[i].dirtyCheck ) { if ( original[i] == null ) { for ( int j=0; j < _fields[i].columns.length; j++ ) stmt.setNull( count++, _fields[i].columns[j].sqlType ); } else if ( original[i] instanceof Complex ) { Complex inner = (Complex)original[i]; if ( inner.size() != _fields[i].columns.length ) throw new PersistenceException( "Size of complex field mismatch!" ); for ( int j=0; j<_fields[i].columns.length; j++ ) { if ( inner == null || inner.get(j) == null ) stmt.setNull( count++, _fields[i].columns[j].sqlType ); else stmt.setObject( count++, toSQL( i, j, inner.get(j)), _fields[i].columns[j].sqlType ); } } else { if ( _fields[i].columns.length != 1 ) throw new PersistenceException( "Complex field expected! "); if ( original[i] == null ) stmt.setNull( count++, _fields[i].columns[0].sqlType ); else stmt.setObject( count++, toSQL( i, 0, original[i]), _fields[i].columns[0].sqlType ); } } } } if ( stmt.executeUpdate() <= 0 ) { // SAP DB returns -1 here // If no update was performed, the object has been previously // removed from persistent storage or has been modified if // dirty checking. Determine which is which. stmt.close(); if ( original != null ) { stmt = ( (Connection) conn ).prepareStatement( /*_pkLookup*/_sqlLoad ); // bind the identity to the prepareStatement count = 1; if ( identity instanceof Complex ) { Complex id = (Complex) identity; for ( int i=0; i<_ids.length; i++ ) stmt.setObject( count++, idToSQL( i, id.get(i) ) ); } else { stmt.setObject( count++, idToSQL( 0, identity ) ); } ResultSet res = stmt.executeQuery(); int c = res.getMetaData().getColumnCount(); if ( res.next() ) { stmt.close(); throw new ObjectModifiedException( Messages.format("persist.objectModified", _clsDesc.getJavaClass().getName(), identity ) ); } stmt.close(); } throw new ObjectDeletedException( Messages.format("persist.objectDeleted", _clsDesc.getJavaClass().getName(), identity) ); } stmt.close(); return null; } catch ( SQLException except ) { except.printStackTrace(); try { // Close the insert/select statement if ( stmt != null ) stmt.close(); } catch ( SQLException except2 ) { } throw new PersistenceException( Messages.format("persist.nested", except) ); } } | 3614 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3614/5b575b593103b1bf5287e3f8c280c637f3daebf0/SQLEngine.java/buggy/trunk/castor-2002/castor/src/main/org/exolab/castor/jdo/engine/SQLEngine.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
1707,
12,
1033,
1487,
16,
1033,
8526,
1466,
16,
1033,
4215,
16,
12900,
1033,
8526,
2282,
16,
1033,
14429,
262,
3639,
1216,
1033,
4575,
503,
16,
1033,
7977,
503,
16,
13381,
503... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
1707,
12,
1033,
1487,
16,
1033,
8526,
1466,
16,
1033,
4215,
16,
12900,
1033,
8526,
2282,
16,
1033,
14429,
262,
3639,
1216,
1033,
4575,
503,
16,
1033,
7977,
503,
16,
13381,
503... |
myExpectation.setActual(0.0); | myExpectation.setActual(0.0); | public void testHasNoExpectations() { myExpectation.setActual(0.0); assertTrue("Has no expectations", !myExpectation.hasExpectations()); } | 2796 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2796/065d08edd62599d5d244a9317db470157690f4f9/ExpectationDoubleValueTest.java/buggy/jmock/core/src/test/jmock/expectation/ExpectationDoubleValueTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
5582,
2279,
11988,
1012,
1435,
288,
3639,
3399,
11988,
367,
18,
542,
11266,
12,
20,
18,
20,
1769,
3639,
1815,
5510,
2932,
5582,
1158,
26305,
3113,
7734,
401,
4811,
11988,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
5582,
2279,
11988,
1012,
1435,
288,
3639,
3399,
11988,
367,
18,
542,
11266,
12,
20,
18,
20,
1769,
3639,
1815,
5510,
2932,
5582,
1158,
26305,
3113,
7734,
401,
4811,
11988,
... |
AST tmp926_AST_in = (AST)_t; | AST tmp936_AST_in = (AST)_t; | public final void createwidgetstate(AST _t) throws RecognitionException { AST createwidgetstate_AST_in = (_t == ASTNULL) ? null : (AST)_t; AST __t319 = _t; AST tmp914_AST_in = (AST)_t; match(_t,CREATE); _t = _t.getFirstChild(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case VALUE: { valueexpression(_t); _t = _retTree; break; } case BUTTON: { AST tmp915_AST_in = (AST)_t; match(_t,BUTTON); _t = _t.getNextSibling(); break; } case COMBOBOX: { AST tmp916_AST_in = (AST)_t; match(_t,COMBOBOX); _t = _t.getNextSibling(); break; } case CONTROLFRAME: { AST tmp917_AST_in = (AST)_t; match(_t,CONTROLFRAME); _t = _t.getNextSibling(); break; } case DIALOGBOX: { AST tmp918_AST_in = (AST)_t; match(_t,DIALOGBOX); _t = _t.getNextSibling(); break; } case EDITOR: { AST tmp919_AST_in = (AST)_t; match(_t,EDITOR); _t = _t.getNextSibling(); break; } case FILLIN: { AST tmp920_AST_in = (AST)_t; match(_t,FILLIN); _t = _t.getNextSibling(); break; } case FRAME: { AST tmp921_AST_in = (AST)_t; match(_t,FRAME); _t = _t.getNextSibling(); break; } case IMAGE: { AST tmp922_AST_in = (AST)_t; match(_t,IMAGE); _t = _t.getNextSibling(); break; } case MENU: { AST tmp923_AST_in = (AST)_t; match(_t,MENU); _t = _t.getNextSibling(); break; } case MENUITEM: { AST tmp924_AST_in = (AST)_t; match(_t,MENUITEM); _t = _t.getNextSibling(); break; } case RADIOSET: { AST tmp925_AST_in = (AST)_t; match(_t,RADIOSET); _t = _t.getNextSibling(); break; } case RECTANGLE: { AST tmp926_AST_in = (AST)_t; match(_t,RECTANGLE); _t = _t.getNextSibling(); break; } case SELECTIONLIST: { AST tmp927_AST_in = (AST)_t; match(_t,SELECTIONLIST); _t = _t.getNextSibling(); break; } case SLIDER: { AST tmp928_AST_in = (AST)_t; match(_t,SLIDER); _t = _t.getNextSibling(); break; } case SUBMENU: { AST tmp929_AST_in = (AST)_t; match(_t,SUBMENU); _t = _t.getNextSibling(); break; } case TEXT: { AST tmp930_AST_in = (AST)_t; match(_t,TEXT); _t = _t.getNextSibling(); break; } case TOGGLEBOX: { AST tmp931_AST_in = (AST)_t; match(_t,TOGGLEBOX); _t = _t.getNextSibling(); break; } case WINDOW: { AST tmp932_AST_in = (AST)_t; match(_t,WINDOW); _t = _t.getNextSibling(); break; } default: { throw new NoViableAltException(_t); } } } fld(_t,CQ.UPDATING); _t = _retTree; { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case IN_KW: { AST __t322 = _t; AST tmp933_AST_in = (AST)_t; match(_t,IN_KW); _t = _t.getFirstChild(); AST tmp934_AST_in = (AST)_t; match(_t,WIDGETPOOL); _t = _t.getNextSibling(); expression(_t); _t = _retTree; _t = __t322; _t = _t.getNextSibling(); break; } case EOF: case PERIOD: case ASSIGN: case NOERROR_KW: case TRIGGERS: { break; } default: { throw new NoViableAltException(_t); } } } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case NOERROR_KW: { AST tmp935_AST_in = (AST)_t; match(_t,NOERROR_KW); _t = _t.getNextSibling(); break; } case EOF: case PERIOD: case ASSIGN: case TRIGGERS: { break; } default: { throw new NoViableAltException(_t); } } } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case ASSIGN: { assign_opt(_t); _t = _retTree; break; } case EOF: case PERIOD: case TRIGGERS: { break; } default: { throw new NoViableAltException(_t); } } } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case TRIGGERS: { triggerphrase(_t); _t = _retTree; break; } case EOF: case PERIOD: { break; } default: { throw new NoViableAltException(_t); } } } state_end(_t); _t = _retTree; _t = __t319; _t = _t.getNextSibling(); _retTree = _t; } | 13952 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13952/f492fd11e745beb562b4e209643ba003aa8a6271/TreeParser01.java/clean/trunk/org.prorefactor.core/src/org/prorefactor/treeparser01/TreeParser01.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
752,
6587,
2019,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
752,
6587,
2019,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
13,
692,
446,
294,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
752,
6587,
2019,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
752,
6587,
2019,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
13,
692,
446,
294,... |
buf.append('\n'); | buf.append('\n'); | public String generateSQL(final Segment[] segments, final BitKey bitKey, final boolean isDistinct) { // Check if using aggregates is enabled. if (MondrianProperties.instance().getUseAggregates()) { RolapStar star = segments[0].aggregation.getStar(); // Does any aggregate table match the current query AggStar aggStar = star.select(bitKey); if (aggStar != null) { // Got a match, hot damn if (getLogger().isDebugEnabled()) { StringBuffer buf = new StringBuffer(256); buf.append("MATCH: "); buf.append('\n'); buf.append(" bitKey="); buf.append(bitKey); buf.append('\n'); buf.append(" bitkey="); buf.append(aggStar.getBitKey()); buf.append('\n'); buf.append("AggStar="); buf.append(aggStar.getFactTable().getName()); buf.append('\n'); for (Iterator it = aggStar.getFactTable().getColumns(); it.hasNext(); ) { AggStar.Table.Column column = (AggStar.Table.Column) it.next(); buf.append(" "); buf.append(column); buf.append('\n'); } getLogger().debug(buf.toString()); } AggQuerySpec aggQuerySpec = new AggQuerySpec(aggStar, segments, isDistinct); String sql = aggQuerySpec.generateSqlQuery(); return sql; } // No match, fall through and use fact table. } if (getLogger().isDebugEnabled()) { RolapStar star = segments[0].aggregation.getStar(); StringBuffer buf = new StringBuffer(256); buf.append("NO MATCH: "); buf.append('\n'); buf.append(" bitKey="); buf.append(bitKey); buf.append('\n'); buf.append(star.getFactTable().getAlias()); buf.append('\n'); getLogger().debug(buf.toString()); } // Fact table query SegmentArrayQuerySpec spec = new SegmentArrayQuerySpec(segments, isDistinct); String sql = spec.generateSqlQuery(); return sql; } | 37907 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/37907/04e646f31dd5b7942980cee630c94f49bdab0e26/AggregationManager.java/buggy/src/main/mondrian/rolap/agg/AggregationManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
2103,
3997,
12,
6385,
10807,
8526,
5155,
16,
1171,
9079,
727,
6539,
653,
2831,
653,
16,
17311,
727,
1250,
353,
23402,
13,
288,
3639,
368,
2073,
309,
1450,
29389,
353,
3696,
18,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
2103,
3997,
12,
6385,
10807,
8526,
5155,
16,
1171,
9079,
727,
6539,
653,
2831,
653,
16,
17311,
727,
1250,
353,
23402,
13,
288,
3639,
368,
2073,
309,
1450,
29389,
353,
3696,
18,... |
MylarPlugin.log("null bridge for marker: " + resource.getClass(), this); | ErrorLogger.log("null bridge for marker: " + resource.getClass(), this); | public String getHandleForOffsetInObject(Object resource, int offset) { MylarPlugin.log("null bridge for marker: " + resource.getClass(), this); return null; } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/6e4c36ce82823e91011a538b1e18917054cfdf11/MylarPlugin.java/clean/org.eclipse.mylyn.context.core/src/org/eclipse/mylyn/core/MylarPlugin.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
514,
26298,
1290,
2335,
382,
921,
12,
921,
1058,
16,
509,
1384,
13,
288,
1082,
202,
12062,
7901,
3773,
18,
1330,
2932,
2011,
10105,
364,
5373,
30,
315,
397,
1058,
18,
588,
79... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
514,
26298,
1290,
2335,
382,
921,
12,
921,
1058,
16,
509,
1384,
13,
288,
1082,
202,
12062,
7901,
3773,
18,
1330,
2932,
2011,
10105,
364,
5373,
30,
315,
397,
1058,
18,
588,
79... |
StendhalRPZone entranceZone = (StendhalRPZone) StendhalRPWorld.get().getRPZone(new IRPZone.ID(entranceZoneName)); | entranceZone = (StendhalRPZone) StendhalRPWorld.get().getRPZone(new IRPZone.ID(entranceZoneName)); | private void step1CreateDoors() { // 0_semos_mountain_n2 at (95,101) String entranceZoneName = "0_semos_mountain_n2"; StendhalRPZone entranceZone = (StendhalRPZone) StendhalRPWorld.get().getRPZone(new IRPZone.ID(entranceZoneName)); door = new NotifingDoor("housedoor", Direction.DOWN); entranceZone.assignRPObjectID(door); door.setX(95); door.setY(101); door.setNumber(0); door.setDestination(ZONE_NAME, 0); entranceZone.addPortal(door); exit = new Portal(); zone.assignRPObjectID(exit); exit.setX(5); exit.setY(3); exit.setNumber(0); exit.setDestination(entranceZoneName, 0); zone.addPortal(exit); } | 4438 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4438/22c9159feb9ef78040f26a35379b33db8f3d54d3/ReverseArrow.java/buggy/src/games/stendhal/server/maps/quests/ReverseArrow.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
2235,
21,
1684,
3244,
1383,
1435,
288,
202,
202,
759,
374,
67,
12000,
538,
67,
4778,
530,
67,
82,
22,
622,
261,
8778,
16,
15168,
13,
202,
202,
780,
31976,
1359,
4226,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
2235,
21,
1684,
3244,
1383,
1435,
288,
202,
202,
759,
374,
67,
12000,
538,
67,
4778,
530,
67,
82,
22,
622,
261,
8778,
16,
15168,
13,
202,
202,
780,
31976,
1359,
4226,
... |
MyTimer() { super(TIMER_DELAY, null); addActionListener(this); setRepeats(true); } | 17306 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17306/4972de74093751aa507c641e7a852c8feb15d5e3/ActionManagerImpl.java/clean/action-system/impl/com/intellij/openapi/actionSystem/impl/ActionManagerImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
8005,
6777,
1435,
95,
9565,
12,
56,
31582,
67,
26101,
16,
2011,
1769,
1289,
1803,
2223,
12,
2211,
1769,
542,
426,
347,
2323,
12,
3767,
1769,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
8005,
6777,
1435,
95,
9565,
12,
56,
31582,
67,
26101,
16,
2011,
1769,
1289,
1803,
2223,
12,
2211,
1769,
542,
426,
347,
2323,
12,
3767,
1769,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | ||
/* TODO Write this to take Type[] | void createStruct(String name, Type[] type, String pack, PrintStream out, Map<StructStruct, Type[]> existing) throws DBusException, IOException { /* TODO Write this to take Type[] out.println("package "+pack+";"); Set<String> imports = new TreeSet<String>(); imports.add("org.freedesktop.dbus.Position"); imports.add("org.freedesktop.dbus.Struct"); Map<StructStruct, Type[]> structs = new HashMap<StructStruct, Type[]>(existing); Vector<String> types = new Vector<String>(); String s = type; for (int i = 0; i < s.length(); i++) { switch (s.charAt(i)) { case 'a': //TODO types.add(DBusConnection.getJavaType(s.substring(i), imports, structs, true, false)); if ('{' == s.charAt(i+1)) { int c = 1; int j; for (j = i+2; c > 0; j++) switch (s.charAt(j)) { case '{': c++; break; case '}': c--; break; } i = j; } else i++; break; case '(': //TODO types.add(DBusConnection.getJavaType(s.substring(i), imports, structs, true, false)); int c = 1; int j; for (j = i+1; c > 0; j++) switch (s.charAt(j)) { case '(': c++; break; case ')': c--; break; } i = j; break; default: //TODO types.add(DBusConnection.getJavaType(s.substring(i,i+1), imports, structs, true, false)); } } for (String im: imports) out.println("import "+im+";"); out.println("public final class "+name+" extends Struct"); out.println("{"); int i = 0; char c = 'a'; String params = ""; for (String t: types) { out.println(" @Position("+i++ +")"); out.println(" public final "+t+" "+c+";"); params += t+" "+c+", "; c++; } out.println(" public "+name+"("+params.replaceAll("..$", "")+")"); out.println(" {"); for (char d = 'a'; d < c; d++) out.println(" this."+d+" = "+d+";"); out.println(" }"); out.println("}"); structs = StructStruct.fillPackages(structs, pack); Map<StructStruct, Type[]> tocreate = new HashMap<StructStruct, Type[]>(structs); for (StructStruct ss: existing.keySet()) tocreate.remove(ss); createStructs(tocreate, structs);*/ } | 5401 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5401/97f82b4b9c5d5345097395c5f610dbd0dd9b8772/CreateInterface.java/buggy/org/freedesktop/dbus/CreateInterface.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
918,
752,
3823,
12,
780,
508,
16,
1412,
8526,
618,
16,
514,
2298,
16,
21677,
596,
16,
1635,
32,
3823,
3823,
16,
1412,
8526,
34,
2062,
13,
1216,
2383,
407,
503,
16,
1860,
282,
288,
541... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
918,
752,
3823,
12,
780,
508,
16,
1412,
8526,
618,
16,
514,
2298,
16,
21677,
596,
16,
1635,
32,
3823,
3823,
16,
1412,
8526,
34,
2062,
13,
1216,
2383,
407,
503,
16,
1860,
282,
288,
541... | |
int contentsLength; if (localContentsOffset + 50 >= (contentsLength = localContents.length)) { System.arraycopy( contents, 0, (localContents = contents = new byte[contentsLength + INCREMENT_SIZE]), 0, contentsLength); | if (localContentsOffset + 50 >= this.contents.length) { resizePoolContents(50); | public void completeCodeAttributeForProblemMethod( AbstractMethodDeclaration method, MethodBinding binding, int codeAttributeOffset, int[] startLineIndexes) { // reinitialize the localContents with the byte modified by the code stream byte[] localContents = contents = codeStream.bCodeStream; int localContentsOffset = codeStream.classFileOffset; // codeAttributeOffset is the position inside localContents byte array before we started to write// any information about the codeAttribute// That means that to write the attribute_length you need to offset by 2 the value of codeAttributeOffset// to get the right position, 6 for the max_stack etc... int max_stack = codeStream.stackMax; localContents[codeAttributeOffset + 6] = (byte) (max_stack >> 8); localContents[codeAttributeOffset + 7] = (byte) max_stack; int max_locals = codeStream.maxLocals; localContents[codeAttributeOffset + 8] = (byte) (max_locals >> 8); localContents[codeAttributeOffset + 9] = (byte) max_locals; int code_length = codeStream.position; localContents[codeAttributeOffset + 10] = (byte) (code_length >> 24); localContents[codeAttributeOffset + 11] = (byte) (code_length >> 16); localContents[codeAttributeOffset + 12] = (byte) (code_length >> 8); localContents[codeAttributeOffset + 13] = (byte) code_length; // write the exception table int contentsLength; if (localContentsOffset + 50 >= (contentsLength = localContents.length)) { System.arraycopy( contents, 0, (localContents = contents = new byte[contentsLength + INCREMENT_SIZE]), 0, contentsLength); } // write the exception table localContents[localContentsOffset++] = 0; localContents[localContentsOffset++] = 0; // debug attributes int codeAttributeAttributeOffset = localContentsOffset; int attributeNumber = 0; // leave two bytes for the attribute_length localContentsOffset += 2; // first we handle the linenumber attribute if (codeStream.generateLineNumberAttributes) { if (localContentsOffset + 20 >= (contentsLength = localContents.length)) { System.arraycopy( contents, 0, (localContents = contents = new byte[contentsLength + INCREMENT_SIZE]), 0, contentsLength); } /* Create and add the line number attribute (used for debugging) * Build the pairs of: * (bytecodePC lineNumber) * according to the table of start line indexes and the pcToSourceMap table * contained into the codestream */ int lineNumberNameIndex = constantPool.literalIndex(AttributeNamesConstants.LineNumberTableName); localContents[localContentsOffset++] = (byte) (lineNumberNameIndex >> 8); localContents[localContentsOffset++] = (byte) lineNumberNameIndex; localContents[localContentsOffset++] = 0; localContents[localContentsOffset++] = 0; localContents[localContentsOffset++] = 0; localContents[localContentsOffset++] = 6; localContents[localContentsOffset++] = 0; localContents[localContentsOffset++] = 1; if (problemLine == 0) { problemLine = searchLineNumber(startLineIndexes, binding.sourceStart()); } // first entry at pc = 0 localContents[localContentsOffset++] = 0; localContents[localContentsOffset++] = 0; localContents[localContentsOffset++] = (byte) (problemLine >> 8); localContents[localContentsOffset++] = (byte) problemLine; // now we change the size of the line number attribute attributeNumber++; } // then we do the local variable attribute if (codeStream.generateLocalVariableTableAttributes) { // compute the resolved position for the arguments of the method int argSize; int localVariableTableOffset = localContentsOffset; int numberOfEntries = 0; // codeAttribute.addLocalVariableTableAttribute(this); int localVariableNameIndex = constantPool.literalIndex(AttributeNamesConstants.LocalVariableTableName); if (localContentsOffset + 8 >= (contentsLength = localContents.length)) { System.arraycopy( contents, 0, (localContents = contents = new byte[contentsLength + INCREMENT_SIZE]), 0, contentsLength); } localContents[localContentsOffset++] = (byte) (localVariableNameIndex >> 8); localContents[localContentsOffset++] = (byte) localVariableNameIndex; localContentsOffset += 6; // leave space for attribute_length and local_variable_table_length int descriptorIndex; if (!codeStream.methodDeclaration.isStatic()) { numberOfEntries++; if (localContentsOffset + 10 >= (contentsLength = localContents.length)) { System.arraycopy( contents, 0, (localContents = contents = new byte[contentsLength + INCREMENT_SIZE]), 0, contentsLength); } localContents[localContentsOffset++] = 0; localContents[localContentsOffset++] = 0; localContents[localContentsOffset++] = (byte) (code_length >> 8); localContents[localContentsOffset++] = (byte) code_length; int nameIndex = constantPool.literalIndex(QualifiedNamesConstants.This); localContents[localContentsOffset++] = (byte) (nameIndex >> 8); localContents[localContentsOffset++] = (byte) nameIndex; descriptorIndex = constantPool.literalIndex( codeStream.methodDeclaration.binding.declaringClass.signature()); localContents[localContentsOffset++] = (byte) (descriptorIndex >> 8); localContents[localContentsOffset++] = (byte) descriptorIndex; // the resolved position for this is always 0 localContents[localContentsOffset++] = 0; localContents[localContentsOffset++] = 0; } if (binding.isConstructor()) { ReferenceBinding declaringClass = binding.declaringClass; if (declaringClass.isNestedType()) { NestedTypeBinding methodDeclaringClass = (NestedTypeBinding) declaringClass; argSize = methodDeclaringClass.enclosingInstancesSlotSize; SyntheticArgumentBinding[] syntheticArguments; if ((syntheticArguments = methodDeclaringClass.syntheticEnclosingInstances()) != null) { for (int i = 0, max = syntheticArguments.length; i < max; i++) { LocalVariableBinding localVariable = syntheticArguments[i]; if (localContentsOffset + 10 >= (contentsLength = localContents.length)) { System.arraycopy( contents, 0, (localContents = contents = new byte[contentsLength + INCREMENT_SIZE]), 0, contentsLength); } // now we can safely add the local entry numberOfEntries++; localContents[localContentsOffset++] = 0; localContents[localContentsOffset++] = 0; localContents[localContentsOffset++] = (byte) (code_length >> 8); localContents[localContentsOffset++] = (byte) code_length; int nameIndex = constantPool.literalIndex(localVariable.name); localContents[localContentsOffset++] = (byte) (nameIndex >> 8); localContents[localContentsOffset++] = (byte) nameIndex; descriptorIndex = constantPool.literalIndex(localVariable.type.signature()); localContents[localContentsOffset++] = (byte) (descriptorIndex >> 8); localContents[localContentsOffset++] = (byte) descriptorIndex; int resolvedPosition = localVariable.resolvedPosition; localContents[localContentsOffset++] = (byte) (resolvedPosition >> 8); localContents[localContentsOffset++] = (byte) resolvedPosition; } } } else { argSize = 1; } } else { argSize = binding.isStatic() ? 0 : 1; } if (method.binding != null) { TypeBinding[] parameters = method.binding.parameters; Argument[] arguments = method.arguments; if ((parameters != null) && (arguments != null)) { for (int i = 0, max = parameters.length; i < max; i++) { TypeBinding argumentBinding = parameters[i]; if (localContentsOffset + 10 >= (contentsLength = localContents.length)) { System.arraycopy( contents, 0, (localContents = contents = new byte[contentsLength + INCREMENT_SIZE]), 0, contentsLength); } // now we can safely add the local entry numberOfEntries++; localContents[localContentsOffset++] = 0; localContents[localContentsOffset++] = 0; localContents[localContentsOffset++] = (byte) (code_length >> 8); localContents[localContentsOffset++] = (byte) code_length; int nameIndex = constantPool.literalIndex(arguments[i].name); localContents[localContentsOffset++] = (byte) (nameIndex >> 8); localContents[localContentsOffset++] = (byte) nameIndex; descriptorIndex = constantPool.literalIndex(argumentBinding.signature()); localContents[localContentsOffset++] = (byte) (descriptorIndex >> 8); localContents[localContentsOffset++] = (byte) descriptorIndex; int resolvedPosition = argSize; if ((argumentBinding == BaseTypes.LongBinding) || (argumentBinding == BaseTypes.DoubleBinding)) argSize += 2; else argSize++; localContents[localContentsOffset++] = (byte) (resolvedPosition >> 8); localContents[localContentsOffset++] = (byte) resolvedPosition; } } } int value = numberOfEntries * 10 + 2; localVariableTableOffset += 2; localContents[localVariableTableOffset++] = (byte) (value >> 24); localContents[localVariableTableOffset++] = (byte) (value >> 16); localContents[localVariableTableOffset++] = (byte) (value >> 8); localContents[localVariableTableOffset++] = (byte) value; localContents[localVariableTableOffset++] = (byte) (numberOfEntries >> 8); localContents[localVariableTableOffset] = (byte) numberOfEntries; attributeNumber++; } // update the number of attributes// ensure first that there is enough space available inside the localContents array if (codeAttributeAttributeOffset + 2 >= (contentsLength = localContents.length)) { System.arraycopy( contents, 0, (localContents = contents = new byte[contentsLength + INCREMENT_SIZE]), 0, contentsLength); } localContents[codeAttributeAttributeOffset++] = (byte) (attributeNumber >> 8); localContents[codeAttributeAttributeOffset] = (byte) attributeNumber; // update the attribute length int codeAttributeLength = localContentsOffset - (codeAttributeOffset + 6); localContents[codeAttributeOffset + 2] = (byte) (codeAttributeLength >> 24); localContents[codeAttributeOffset + 3] = (byte) (codeAttributeLength >> 16); localContents[codeAttributeOffset + 4] = (byte) (codeAttributeLength >> 8); localContents[codeAttributeOffset + 5] = (byte) codeAttributeLength; contentsOffset = localContentsOffset; } | 10698 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10698/3a562aaf09f9f323b583086b80b4683378886606/ClassFile.java/clean/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ClassFile.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
3912,
1085,
1499,
1290,
13719,
1305,
12,
202,
202,
7469,
1305,
6094,
707,
16,
202,
202,
1305,
5250,
5085,
16,
202,
202,
474,
981,
1499,
2335,
16,
202,
202,
474,
8526,
246... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
3912,
1085,
1499,
1290,
13719,
1305,
12,
202,
202,
7469,
1305,
6094,
707,
16,
202,
202,
1305,
5250,
5085,
16,
202,
202,
474,
981,
1499,
2335,
16,
202,
202,
474,
8526,
246... |
public static List getElements(Element elem, String path) { List list = new ArrayList(); if (elem == null) return list; int ndx = path.indexOf("/"); if (ndx != -1) { Element child = getElement(elem, path.substring(0, ndx)); return getElements(child, path.substring(ndx + 1)); } NodeList nl = elem.getChildNodes(); for (int i = 0, len = nl.getLength(); i < len; i++) { Node node = nl.item(i); if (node.getNodeType() == Node.ELEMENT_NODE && node.getNodeName().equals(path)) { list.add(node); } } return list; } | 8610 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8610/6c6a574b8da6a8f7989e99ea78e4db5cb63abe6b/Util.java/buggy/tag-doc/src/java/org/apache/struts/taskdefs/Util.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3845,
682,
588,
3471,
12,
1046,
10037,
16,
780,
803,
15329,
202,
202,
682,
1098,
33,
2704,
19558,
5621,
202,
202,
430,
12,
10037,
631,
2011,
13,
1082,
202,
2463,
1098,
31,
202... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3845,
682,
588,
3471,
12,
1046,
10037,
16,
780,
803,
15329,
202,
202,
682,
1098,
33,
2704,
19558,
5621,
202,
202,
430,
12,
10037,
631,
2011,
13,
1082,
202,
2463,
1098,
31,
202... | ||
ExpandableComposite expandable = toolkit.createExpandableComposite(form .getBody(), ExpandableComposite.TWISTIE); | GridData layoutData = new GridData(SWT.FILL, SWT.FILL, true, true); form.setLayoutData(layoutData); final ExpandableComposite expandable = toolkit .createExpandableComposite(form.getBody(), ExpandableComposite.TWISTIE); | private void createSettingsControls(Composite workArea) { FormToolkit toolkit = new FormToolkit(workArea.getDisplay()); final ScrolledForm form = toolkit.createScrolledForm(workArea); form.setBackground(workArea.getBackground()); form.getBody().setLayout(new GridLayout()); form.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); ExpandableComposite expandable = toolkit.createExpandableComposite(form .getBody(), ExpandableComposite.TWISTIE); expandable .setText(IDEWorkbenchMessages.ChooseWorkspaceWithSettingsDialog_SettingsGroupName); expandable.setBackground(workArea.getBackground()); expandable.setLayout(new GridLayout()); expandable.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); expandable.addExpansionListener(new IExpansionListener() { /* * (non-Javadoc) * * @see org.eclipse.ui.forms.events.IExpansionListener#expansionStateChanged(org.eclipse.ui.forms.events.ExpansionEvent) */ public void expansionStateChanged(ExpansionEvent e) { form.reflow(true); } /* * (non-Javadoc) * * @see org.eclipse.ui.forms.events.IExpansionListener#expansionStateChanging(org.eclipse.ui.forms.events.ExpansionEvent) */ public void expansionStateChanging(ExpansionEvent e) { // Nothing to do here } }); Composite sectionClient = toolkit.createComposite(expandable); sectionClient.setLayout(new GridLayout()); sectionClient.setBackground(workArea.getBackground()); createButtons(toolkit, sectionClient); expandable.setClient(sectionClient); } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/1f449565d285a6c2e20ccce1d406bbee3c399fc9/ChooseWorkspaceWithSettingsDialog.java/clean/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/ChooseWorkspaceWithSettingsDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
752,
2628,
16795,
12,
9400,
1440,
5484,
13,
288,
202,
202,
1204,
6364,
8691,
5226,
8691,
273,
394,
2748,
6364,
8691,
12,
1252,
5484,
18,
588,
4236,
10663,
202,
202,
6385,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
752,
2628,
16795,
12,
9400,
1440,
5484,
13,
288,
202,
202,
1204,
6364,
8691,
5226,
8691,
273,
394,
2748,
6364,
8691,
12,
1252,
5484,
18,
588,
4236,
10663,
202,
202,
6385,
... |
new NoViableAltException("381:25: ( IDENT )?", 37, 0, input); | new NoViableAltException("481:25: ( IDENT )?", 37, 0, input); | public void statement() throws RecognitionException { try { // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/java.g:336:17: ( compoundStatement | declaration SEMI | expression SEMI | modifiers classDefinition | IDENT COLON statement | 'if' LPAREN expression RPAREN statement ( 'else' statement )? | 'for' LPAREN forInit SEMI forCond SEMI forIter RPAREN statement | 'while' LPAREN expression RPAREN statement | 'do' statement 'while' LPAREN expression RPAREN SEMI | 'break' ( IDENT )? SEMI | 'continue' ( IDENT )? SEMI | 'return' ( expression )? SEMI | 'switch' LPAREN expression RPAREN LCURLY ( casesGroup )* RCURLY | tryBlock | 'throw' expression SEMI | 'synchronized' LPAREN expression RPAREN compoundStatement | SEMI ) int alt41=17; alt41 = dfa41.predict(input); switch (alt41) { case 1 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/java.g:336:17: compoundStatement { following.push(FOLLOW_compoundStatement_in_statement1216); compoundStatement(); following.pop(); } break; case 2 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/java.g:343:17: declaration SEMI { following.push(FOLLOW_declaration_in_statement1232); declaration(); following.pop(); match(input,SEMI,FOLLOW_SEMI_in_statement1234); } break; case 3 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/java.g:348:17: expression SEMI { following.push(FOLLOW_expression_in_statement1246); expression(); following.pop(); match(input,SEMI,FOLLOW_SEMI_in_statement1248); } break; case 4 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/java.g:351:17: modifiers classDefinition { following.push(FOLLOW_modifiers_in_statement1256); modifiers(); following.pop(); following.push(FOLLOW_classDefinition_in_statement1258); classDefinition(); following.pop(); } break; case 5 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/java.g:354:17: IDENT COLON statement { match(input,IDENT,FOLLOW_IDENT_in_statement1266); match(input,COLON,FOLLOW_COLON_in_statement1268); following.push(FOLLOW_statement_in_statement1271); statement(); following.pop(); } break; case 6 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/java.g:357:17: 'if' LPAREN expression RPAREN statement ( 'else' statement )? { match(input,96,FOLLOW_96_in_statement1279); match(input,LPAREN,FOLLOW_LPAREN_in_statement1281); following.push(FOLLOW_expression_in_statement1283); expression(); following.pop(); match(input,RPAREN,FOLLOW_RPAREN_in_statement1285); following.push(FOLLOW_statement_in_statement1287); statement(); following.pop(); // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/java.g:358:17: ( 'else' statement )? int alt36=2; int LA36_0 = input.LA(1); if ( LA36_0==97 ) { alt36=1; } else if ( LA36_0==IDENT||(LA36_0>=LCURLY && LA36_0<=RCURLY)||LA36_0==LPAREN||(LA36_0>=PLUS && LA36_0<=MINUS)||(LA36_0>=INC && LA36_0<=NUM_FLOAT)||(LA36_0>=68 && LA36_0<=89)||(LA36_0>=93 && LA36_0<=94)||LA36_0==96||(LA36_0>=98 && LA36_0<=108)||(LA36_0>=112 && LA36_0<=115) ) { alt36=2; } else { NoViableAltException nvae = new NoViableAltException("358:17: ( \'else\' statement )?", 36, 0, input); throw nvae; } switch (alt36) { case 1 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/java.g:362:25: 'else' statement { match(input,97,FOLLOW_97_in_statement1308); following.push(FOLLOW_statement_in_statement1310); statement(); following.pop(); } break; } } break; case 7 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/java.g:366:17: 'for' LPAREN forInit SEMI forCond SEMI forIter RPAREN statement { match(input,98,FOLLOW_98_in_statement1323); match(input,LPAREN,FOLLOW_LPAREN_in_statement1328); following.push(FOLLOW_forInit_in_statement1334); forInit(); following.pop(); match(input,SEMI,FOLLOW_SEMI_in_statement1336); following.push(FOLLOW_forCond_in_statement1345); forCond(); following.pop(); match(input,SEMI,FOLLOW_SEMI_in_statement1347); following.push(FOLLOW_forIter_in_statement1356); forIter(); following.pop(); match(input,RPAREN,FOLLOW_RPAREN_in_statement1370); following.push(FOLLOW_statement_in_statement1375); statement(); following.pop(); } break; case 8 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/java.g:375:17: 'while' LPAREN expression RPAREN statement { match(input,99,FOLLOW_99_in_statement1404); match(input,LPAREN,FOLLOW_LPAREN_in_statement1406); following.push(FOLLOW_expression_in_statement1408); expression(); following.pop(); match(input,RPAREN,FOLLOW_RPAREN_in_statement1410); following.push(FOLLOW_statement_in_statement1412); statement(); following.pop(); } break; case 9 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/java.g:378:17: 'do' statement 'while' LPAREN expression RPAREN SEMI { match(input,100,FOLLOW_100_in_statement1420); following.push(FOLLOW_statement_in_statement1422); statement(); following.pop(); match(input,99,FOLLOW_99_in_statement1424); match(input,LPAREN,FOLLOW_LPAREN_in_statement1426); following.push(FOLLOW_expression_in_statement1428); expression(); following.pop(); match(input,RPAREN,FOLLOW_RPAREN_in_statement1430); match(input,SEMI,FOLLOW_SEMI_in_statement1432); } break; case 10 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/java.g:381:17: 'break' ( IDENT )? SEMI { match(input,101,FOLLOW_101_in_statement1440); // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/java.g:381:25: ( IDENT )? int alt37=2; int LA37_0 = input.LA(1); if ( LA37_0==IDENT ) { alt37=1; } else if ( LA37_0==SEMI ) { alt37=2; } else { NoViableAltException nvae = new NoViableAltException("381:25: ( IDENT )?", 37, 0, input); throw nvae; } switch (alt37) { case 1 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/java.g:381:26: IDENT { match(input,IDENT,FOLLOW_IDENT_in_statement1443); } break; } match(input,SEMI,FOLLOW_SEMI_in_statement1447); } break; case 11 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/java.g:384:17: 'continue' ( IDENT )? SEMI { match(input,102,FOLLOW_102_in_statement1455); // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/java.g:384:28: ( IDENT )? int alt38=2; int LA38_0 = input.LA(1); if ( LA38_0==IDENT ) { alt38=1; } else if ( LA38_0==SEMI ) { alt38=2; } else { NoViableAltException nvae = new NoViableAltException("384:28: ( IDENT )?", 38, 0, input); throw nvae; } switch (alt38) { case 1 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/java.g:384:29: IDENT { match(input,IDENT,FOLLOW_IDENT_in_statement1458); } break; } match(input,SEMI,FOLLOW_SEMI_in_statement1462); } break; case 12 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/java.g:387:17: 'return' ( expression )? SEMI { match(input,103,FOLLOW_103_in_statement1470); // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/java.g:387:26: ( expression )? int alt39=2; int LA39_0 = input.LA(1); if ( LA39_0==IDENT||LA39_0==LPAREN||(LA39_0>=PLUS && LA39_0<=MINUS)||(LA39_0>=INC && LA39_0<=NUM_FLOAT)||(LA39_0>=68 && LA39_0<=76)||(LA39_0>=93 && LA39_0<=94)||(LA39_0>=112 && LA39_0<=115) ) { alt39=1; } else if ( LA39_0==SEMI ) { alt39=2; } else { NoViableAltException nvae = new NoViableAltException("387:26: ( expression )?", 39, 0, input); throw nvae; } switch (alt39) { case 1 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/java.g:387:27: expression { following.push(FOLLOW_expression_in_statement1473); expression(); following.pop(); } break; } match(input,SEMI,FOLLOW_SEMI_in_statement1477); } break; case 13 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/java.g:390:17: 'switch' LPAREN expression RPAREN LCURLY ( casesGroup )* RCURLY { match(input,104,FOLLOW_104_in_statement1485); match(input,LPAREN,FOLLOW_LPAREN_in_statement1487); following.push(FOLLOW_expression_in_statement1489); expression(); following.pop(); match(input,RPAREN,FOLLOW_RPAREN_in_statement1491); match(input,LCURLY,FOLLOW_LCURLY_in_statement1493); // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/java.g:391:25: ( casesGroup )* loop40: do { int alt40=2; int LA40_0 = input.LA(1); if ( (LA40_0>=106 && LA40_0<=107) ) { alt40=1; } switch (alt40) { case 1 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/java.g:391:27: casesGroup { following.push(FOLLOW_casesGroup_in_statement1500); casesGroup(); following.pop(); } break; default : break loop40; } } while (true); match(input,RCURLY,FOLLOW_RCURLY_in_statement1507); } break; case 14 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/java.g:395:17: tryBlock { following.push(FOLLOW_tryBlock_in_statement1515); tryBlock(); following.pop(); } break; case 15 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/java.g:398:17: 'throw' expression SEMI { match(input,105,FOLLOW_105_in_statement1523); following.push(FOLLOW_expression_in_statement1525); expression(); following.pop(); match(input,SEMI,FOLLOW_SEMI_in_statement1527); } break; case 16 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/java.g:401:17: 'synchronized' LPAREN expression RPAREN compoundStatement { match(input,86,FOLLOW_86_in_statement1535); match(input,LPAREN,FOLLOW_LPAREN_in_statement1537); following.push(FOLLOW_expression_in_statement1539); expression(); following.pop(); match(input,RPAREN,FOLLOW_RPAREN_in_statement1541); following.push(FOLLOW_compoundStatement_in_statement1543); compoundStatement(); following.pop(); } break; case 17 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/java.g:407:17: SEMI { match(input,SEMI,FOLLOW_SEMI_in_statement1556); } break; } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { } } | 6736 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6736/7e425814ce563fcc662b266adb2a4dc8e1a95d19/JavaParser.java/clean/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
3021,
1435,
1216,
9539,
288,
6647,
775,
288,
5411,
368,
342,
6588,
19,
70,
947,
19,
12922,
19,
14915,
19,
10649,
8464,
7482,
19,
12215,
17,
9576,
19,
4816,
19,
5254,
19,
6290... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
3021,
1435,
1216,
9539,
288,
6647,
775,
288,
5411,
368,
342,
6588,
19,
70,
947,
19,
12922,
19,
14915,
19,
10649,
8464,
7482,
19,
12215,
17,
9576,
19,
4816,
19,
5254,
19,
6290... |
this(lw, (String)null, (String)null, new String[] { "no filename, preloaded transformation" }); this.transMeta=transMeta; | log=lw; class_nr = 1; transMeta = new TransMeta(file, name, args); | public Trans(LogWriter lw, TransMeta transMeta) { this(lw, (String)null, (String)null, new String[] { "no filename, preloaded transformation" }); this.transMeta=transMeta; preview=false; preview_steps=null; preview_sizes=null; log.logBasic(toString(), "Transformation is pre-loaded from repository."); log.logDebug(toString(), "nr of steps to run : "+transMeta.nrSteps()+", nr of hops : "+transMeta.nrTransHops()); } | 9547 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9547/096ac4315300a93ed0a4d1e02df99cf58d307b4d/Trans.java/buggy/src/be/ibridge/kettle/trans/Trans.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2604,
12,
1343,
2289,
14589,
16,
2604,
2781,
906,
2781,
13,
202,
95,
202,
202,
2211,
12,
80,
91,
16,
261,
780,
13,
2011,
16,
261,
780,
13,
2011,
16,
394,
514,
8526,
288,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2604,
12,
1343,
2289,
14589,
16,
2604,
2781,
906,
2781,
13,
202,
95,
202,
202,
2211,
12,
80,
91,
16,
261,
780,
13,
2011,
16,
261,
780,
13,
2011,
16,
394,
514,
8526,
288,
3... |
for ( Skill skill : selectedList ) | List<String> associatedKeys = new ArrayList<String>(); pobject.addAssociatedTo(associatedKeys); for ( String key : associatedKeys ) | public void getChoices( final PlayerCharacter aPc, final List<Skill> availableList, final List<Skill> selectedList) { for ( Skill skill : Globals.getSkillList() ) { int sCost = skill.costForPCClassList(aPc.getClassList(), aPc); if (sCost == Globals.getGameModeSkillCost_Class()) { availableList.add(skill); } } for ( Skill skill : selectedList ) { pobject.addAssociated(skill.getKeyName()); } } | 48301 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48301/935adc4060b045f379db1f27f0825679f0299b30/ClassSkillsChoiceManager.java/buggy/code/src/java/pcgen/core/chooser/ClassSkillsChoiceManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
336,
17442,
12,
1082,
202,
6385,
19185,
7069,
279,
28136,
16,
1082,
202,
6385,
987,
32,
9030,
34,
5411,
2319,
682,
16,
1082,
202,
6385,
987,
32,
9030,
34,
5411,
3170,
682... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
336,
17442,
12,
1082,
202,
6385,
19185,
7069,
279,
28136,
16,
1082,
202,
6385,
987,
32,
9030,
34,
5411,
2319,
682,
16,
1082,
202,
6385,
987,
32,
9030,
34,
5411,
3170,
682... |
+"InternalError;"); | +"InternalError;" +"JavaException;" ); | public static void init(Context cx, Scriptable scope, boolean sealed) { NativeGlobal obj = new NativeGlobal(); obj.scopeSlaveFlag = true; for (int id = 1; id <= LAST_SCOPE_FUNCTION_ID; ++id) { String name; switch (id) { case Id_decodeURI: name = "decodeURI"; break; case Id_decodeURIComponent: name = "decodeURIComponent"; break; case Id_encodeURI: name = "encodeURI"; break; case Id_encodeURIComponent: name = "encodeURIComponent"; break; case Id_escape: name = "escape"; break; case Id_eval: name = "eval"; break; case Id_isFinite: name = "isFinite"; break; case Id_isNaN: name = "isNaN"; break; case Id_parseFloat: name = "parseFloat"; break; case Id_parseInt: name = "parseInt"; break; case Id_unescape: name = "unescape"; break; case Id_uneval: name = "uneval"; break; default: Kit.codeBug(); name = null; } IdFunction.define(scope, name, obj, id, ScriptableObject.DONTENUM, sealed); } ScriptableObject.defineProperty(scope, "NaN", ScriptRuntime.NaNobj, ScriptableObject.DONTENUM); ScriptableObject.defineProperty(scope, "Infinity", new Double(Double.POSITIVE_INFINITY), ScriptableObject.DONTENUM); ScriptableObject.defineProperty(scope, "undefined", Undefined.instance, ScriptableObject.DONTENUM); String[] errorMethods = Kit.semicolonSplit("" +"ConversionError;" +"EvalError;" +"RangeError;" +"ReferenceError;" +"SyntaxError;" +"TypeError;" +"URIError;" +"InternalError;"); /* Each error constructor gets its own Error object as a prototype, with the 'name' property set to the name of the error. */ for (int i = 0; i < errorMethods.length; i++) { String name = errorMethods[i]; Scriptable errorProto = ScriptRuntime. newObject(cx, scope, "Error", ScriptRuntime.emptyArgs); errorProto.put("name", errorProto, name); IdFunction ctor = new IdFunction(obj, name, Id_new_CommonError); ctor.initAsConstructor(scope, errorProto); if (sealed) { ctor.sealObject(); if (errorProto instanceof ScriptableObject) { ((ScriptableObject)errorProto).sealObject(); } } ScriptableObject.defineProperty(scope, name, ctor, ScriptableObject.DONTENUM); } } | 12904 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12904/910736ea5d73487e6bd544e9d2dc941303939f86/NativeGlobal.java/clean/js/rhino/src/org/mozilla/javascript/NativeGlobal.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
1208,
12,
1042,
9494,
16,
22780,
2146,
16,
1250,
695,
18931,
13,
288,
3639,
16717,
5160,
1081,
273,
394,
16717,
5160,
5621,
3639,
1081,
18,
4887,
20302,
4678,
273,
638,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
1208,
12,
1042,
9494,
16,
22780,
2146,
16,
1250,
695,
18931,
13,
288,
3639,
16717,
5160,
1081,
273,
394,
16717,
5160,
5621,
3639,
1081,
18,
4887,
20302,
4678,
273,
638,
31... |
public boolean performFinish( ) { final IPath containerName = newReportFileWizardPage.getContainerFullPath( ); String fn = newReportFileWizardPage.getFileName( ); final String fileName; if ( !fn.endsWith( "." + fileExtension ) ) //$NON-NLS-1$ { fileName = fn + "." + fileExtension; //$NON-NLS-1$ } else { fileName = fn; } InputStream streamFromPage = null; String cheatSheetIdFromPage = "";//$NON-NLS-1$ boolean showCheatSheetFromPage = false; //Temporary remark the choice page for that feature is not supported in // R1 // if ( choicePage.isBlank( ) ) // { // // blank report // URL url = Platform.find( Platform.getBundle( ReportPlugin.REPORT_UI // ), // new Path( templateChoicePage.getBlankTemplate( ).reportPath ) ); // if ( url != null ) // { // try // { // streamFromPage = url.openStream( ); // } // catch ( IOException e1 ) // { // //ignore. // } // } // // cheatSheetIdFromPage = templateChoicePage.getBlankTemplate( // ).cheatSheetId; // showCheatSheetFromPage = false; // } // else if ( !choicePage.isCustom( ) ) // { // predefined template URL url = Platform.find( Platform.getBundle( ReportPlugin.REPORT_UI ), new Path( templateChoicePage.getTemplate( ).getReportPath() ) ); if ( url != null ) { try { streamFromPage = url.openStream( ); } catch ( IOException e1 ) { //ignore. } } else { try { streamFromPage = new FileInputStream(templateChoicePage.getTemplate( ).getReportPath() ); } catch ( FileNotFoundException e ) { } } cheatSheetIdFromPage = templateChoicePage.getTemplate( ).getCheatSheetId(); showCheatSheetFromPage = templateChoicePage.getShowCheatSheet( ); // Temporary remark the choice page for that feature is not supported in // R1 // } // else // { // // custom template // try // { // streamFromPage = new FileInputStream( // customTemplatePage.getReportPath( ) ); // String xmlPath = customTemplatePage.getReportPath( ) // .replaceFirst( ".rptdesign", ".xml" ); // File f = new File( xmlPath ); // if ( f.exists( ) ) // { // cheatSheetIdFromPage = f.toURL( ).toString( ); // // commented out until opencheatsheetaction bug is fixed in // // eclipse // // https://bugs.eclipse.org/bugs/show_bug.cgi?id=88481 // // showCheatSheetFromPage = // // customTemplatePage.getShowCheatSheet( ); // } // // } // catch ( Exception e ) // { // ExceptionHandler.handle( e ); // return false; // } // } final InputStream stream = streamFromPage; final String cheatSheetId = cheatSheetIdFromPage; final boolean showCheatSheet = showCheatSheetFromPage; IRunnableWithProgress op = new IRunnableWithProgress( ) { public void run( IProgressMonitor monitor ) throws InvocationTargetException { try { doFinish( containerName, fileName, stream, cheatSheetId, showCheatSheet, monitor ); } catch ( CoreException e ) { throw new InvocationTargetException( e ); } finally { monitor.done( ); } } }; try { getContainer( ).run( true, false, op ); } catch ( InterruptedException e ) { return false; } catch ( InvocationTargetException e ) { Throwable realException = e.getTargetException( ); ExceptionHandler.handle( realException ); return false; } return true; } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/d99dacb66a1a83c9b92f03acef4adfb1206373a0/NewReportWizard.java/buggy/UI/org.eclipse.birt.report.designer.ui.ide/src/org/eclipse/birt/report/designer/ui/ide/wizards/NewReportWizard.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
3073,
11641,
12,
262,
202,
95,
202,
202,
6385,
467,
743,
20408,
273,
394,
4820,
812,
27130,
1964,
18,
588,
2170,
24173,
12,
11272,
202,
202,
780,
2295,
273,
394,
4820,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
3073,
11641,
12,
262,
202,
95,
202,
202,
6385,
467,
743,
20408,
273,
394,
4820,
812,
27130,
1964,
18,
588,
2170,
24173,
12,
11272,
202,
202,
780,
2295,
273,
394,
4820,
8... | ||
label2.addAttributeModifier( | label2.add( | public AttributeModifierComponentPage(final PageParameters parameters) { // Label with attribute modifier Label label1 = new Label("label1", new Model("Label 1")); add(label1); // Lavel with override attribute modifier Label label2 = new Label("label2", new Model("Label 2")); label2.addAttributeModifier( new ComponentTagAttributeModifier("class", new Model("overrideLabel"))); label2.addAttributeModifier( new ComponentTagAttributeModifier("unknown", new Model("invalid"))); add(label2); // Lavel with attribute inserter Label label3 = new Label("label3", new Model("Label 3")); label3.addAttributeModifier( new ComponentTagAttributeModifier("class", true, new IDetachableModel() { private String text = null; public void detach(RequestCycle cycle) { System.out.println("ComponentTagAttributeModifier model detached"); text = null; } public void attach(RequestCycle cycle) { System.out.println("ComponentTagAttributeModifier model attached"); text = "insertLabel"; } public Object getObject() { return text; } public void setObject(Object object) { text = object.toString(); } })); add(label3); } | 46434 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46434/e6fb7d32d37fa36420123e753dbd273c88d2d77d/AttributeModifierComponentPage.java/clean/wicket/src/test/wicket/AttributeModifierComponentPage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3601,
9829,
1841,
1964,
12,
6385,
3460,
2402,
1472,
13,
288,
3639,
368,
5287,
598,
1566,
9606,
3639,
5287,
1433,
21,
273,
394,
5287,
2932,
1925,
21,
3113,
394,
3164,
2932,
2224,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3601,
9829,
1841,
1964,
12,
6385,
3460,
2402,
1472,
13,
288,
3639,
368,
5287,
598,
1566,
9606,
3639,
5287,
1433,
21,
273,
394,
5287,
2932,
1925,
21,
3113,
394,
3164,
2932,
2224,... |
aci.first(); | int j=0; | public int getGlyphIndex(int charIndex) { int numGlyphs = getGlyphCount(); aci.first(); for (int i = 0; i < numGlyphs; i++) { int count = getCharacterCount(i, i); for (int n=0; n<count; n++) { int glyphCharIndex = ((Integer)aci.getAttribute (GVTAttributedCharacterIterator.TextAttribute.CHAR_INDEX)).intValue(); if (charIndex == glyphCharIndex) return i; if (aci.next() == AttributedCharacterIterator.DONE) return -1; } } return -1; } | 46680 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46680/977f13210875a0a4a0f63e06590f8a9bf18c6574/GlyphLayout.java/buggy/sources/org/apache/batik/gvt/text/GlyphLayout.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
7162,
6451,
1016,
12,
474,
1149,
1016,
13,
288,
3639,
509,
818,
25399,
273,
7162,
6451,
1380,
5621,
3639,
509,
525,
33,
20,
31,
3639,
364,
261,
474,
277,
273,
374,
31,
277,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
7162,
6451,
1016,
12,
474,
1149,
1016,
13,
288,
3639,
509,
818,
25399,
273,
7162,
6451,
1380,
5621,
3639,
509,
525,
33,
20,
31,
3639,
364,
261,
474,
277,
273,
374,
31,
277,
... |
String getStyle( ); | Style getStyle( ); | String getStyle( ); | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/1a68696eeaf3d97a3d75bdf3bc939335158a8be5/StyleMap.java/buggy/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/model/attribute/StyleMap.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
780,
14210,
12,
11272,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
780,
14210,
12,
11272,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
public synchronized DDReconstructor getReconstructor() { return _rec; } | public DDReconstructor getReconstructor() { return _rec; } | public synchronized DDReconstructor getReconstructor() { return _rec; } | 11192 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11192/1b9869851f567b7b6474eabaac96584b4771f5f3/DocumentCache.java/buggy/drjava/src/edu/rice/cs/drjava/model/cache/DocumentCache.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3852,
25177,
426,
12316,
5561,
12316,
1435,
288,
327,
389,
3927,
31,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3852,
25177,
426,
12316,
5561,
12316,
1435,
288,
327,
389,
3927,
31,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Log.debug("Update contact: "+item.getJid()); | public void updateContact(RosterItem item) { Log.debug("Update contact: "+item.getJid()); String legacyId = getTransport().convertJIDToID(item.getJid()); String nickname = item.getNickname(); if (nickname == null || nickname.equals("")) { nickname = legacyId; } // Syncing takes care of all of the dirty work. syncContactGroupsAndNickname(legacyId, nickname, item.getGroups()); } | 51636 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51636/588cfa95904f28170ce24bfd4c2f534a6592c0f2/OSCARSession.java/buggy/src/plugins/gateway/src/java/org/jivesoftware/wildfire/gateway/protocols/oscar/OSCARSession.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1089,
6567,
12,
54,
29811,
1180,
761,
13,
288,
9079,
514,
8866,
548,
273,
29801,
7675,
6283,
46,
734,
774,
734,
12,
1726,
18,
588,
46,
350,
10663,
3639,
514,
19570,
273,
761,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1089,
6567,
12,
54,
29811,
1180,
761,
13,
288,
9079,
514,
8866,
548,
273,
29801,
7675,
6283,
46,
734,
774,
734,
12,
1726,
18,
588,
46,
350,
10663,
3639,
514,
19570,
273,
761,... | |
if ( result.toString( ).equals( name ) ) | if ( result.toString( ).equals( literal ) ) | public static ActionType get( String name ) { for ( int i = 0; i < VALUES_ARRAY.length; ++i ) { ActionType result = VALUES_ARRAY[i]; if ( result.toString( ).equals( name ) ) { return result; } } return null; } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/036e8c78765730b146e5854b9d6c397a296fed86/ActionType.java/buggy/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/model/attribute/ActionType.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
4382,
559,
336,
12,
514,
508,
262,
202,
95,
202,
202,
1884,
261,
509,
277,
273,
374,
31,
277,
411,
13477,
67,
8552,
18,
2469,
31,
965,
77,
262,
202,
202,
95,
1082,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
4382,
559,
336,
12,
514,
508,
262,
202,
95,
202,
202,
1884,
261,
509,
277,
273,
374,
31,
277,
411,
13477,
67,
8552,
18,
2469,
31,
965,
77,
262,
202,
202,
95,
1082,
20... |
monitor.subTask("preparing"); Project findbugsProject = FindBugsWorker.workPrepare(files); FindBugsWorker.UpdateJob updateJob = null; try { monitor.subTask("waiting to detect"); manager.beginRule(findbugsExecuteMutex, monitor); monitor.subTask("detecting"); updateJob = worker.workExecute(findbugsProject); } finally { manager.endRule(findbugsExecuteMutex); } monitor.subTask("updating"); if (updateJob != null) { updateJob.update(); } | findbugsExecuteLock.acquire(); worker.work(files); | private void work(final IResource resource) { try { final Collection files = filesInResource(resource); Job runFindBugs = new Job("Finding bugs in "+resource.getName()+"...") { @Override protected IStatus run(IProgressMonitor monitor) { JobManager manager = JobManager.getInstance(); FindBugsWorker worker = new FindBugsWorker(resource.getProject(), monitor); try { monitor.subTask("preparing"); Project findbugsProject = FindBugsWorker.workPrepare(files); //call worker.workExecute(files) but with mutex rule FindBugsWorker.UpdateJob updateJob = null; try { monitor.subTask("waiting to detect"); manager.beginRule(findbugsExecuteMutex, monitor); monitor.subTask("detecting"); updateJob = worker.workExecute(findbugsProject); } finally { manager.endRule(findbugsExecuteMutex); } monitor.subTask("updating"); if (updateJob != null) { //updateJob.schedule(); updateJob.update(); // update directly } } catch (CoreException e) { e.printStackTrace(); return Status.CANCEL_STATUS; } return Status.OK_STATUS; } }; runFindBugs.setUser(true); runFindBugs.schedule(); } catch (CoreException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } } | 7352 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7352/b9916c9514cf5941f7bf60e514251222579b7b69/FindBugsAction.java/clean/eclipsePlugin/src/de/tobject/findbugs/actions/FindBugsAction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1440,
12,
6385,
467,
1420,
1058,
13,
288,
202,
202,
698,
288,
1082,
202,
6385,
2200,
1390,
273,
1390,
382,
1420,
12,
3146,
1769,
1082,
202,
2278,
1086,
3125,
31559,
273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1440,
12,
6385,
467,
1420,
1058,
13,
288,
202,
202,
698,
288,
1082,
202,
6385,
2200,
1390,
273,
1390,
382,
1420,
12,
3146,
1769,
1082,
202,
2278,
1086,
3125,
31559,
273,
... |
assertEquals( node.getCompletionPrefix(), (i == 0 )? "": "V"); | assertEquals( node.getCompletionPrefix(), (i == 0 )? "": "V"); | public void testCompletionOnExpression() throws Exception { Writer writer = new StringWriter(); writer.write( "class ABC { public: void voidMethod(); };\n"); writer.write( "ABC * someFunction(void) { return new ABC(); }\n"); writer.write( "void testFunction( void ) { someFunction()->V }\n" ); String code = writer.toString(); for( int i = 0; i < 2; ++i ) { int index = code.indexOf( "V"); if( i == 1 ) ++index; IASTCompletionNode node = parse( code, index ); assertEquals( node.getCompletionPrefix(), (i == 0 )? "": "V"); assertEquals( node.getCompletionKind(), CompletionKind.MEMBER_REFERENCE ); assertTrue( node.getCompletionContext() instanceof IASTExpression ); } } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/d730ff0f947954910a1a59eb5fe977d0983fd23e/CompletionParseTest.java/buggy/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/CompletionParseTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
11238,
1398,
2300,
1435,
1216,
1185,
202,
95,
202,
202,
2289,
2633,
273,
394,
17436,
5621,
202,
202,
6299,
18,
2626,
12,
315,
1106,
29253,
288,
1071,
30,
918,
918,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
11238,
1398,
2300,
1435,
1216,
1185,
202,
95,
202,
202,
2289,
2633,
273,
394,
17436,
5621,
202,
202,
6299,
18,
2626,
12,
315,
1106,
29253,
288,
1071,
30,
918,
918,
... |
public static Object evalSpecial(Context cx, Scriptable scope, Object thisArg, Object[] args, String filename, int lineNumber) throws JavaScriptException { if (args.length < 1) return Undefined.instance; Object x = args[0]; if (!(x instanceof String)) { String message = Context.getMessage0("msg.eval.nonstring"); Context.reportWarning(message); return x; } int[] linep = { lineNumber }; if (filename == null) { filename = Context.getSourcePositionFromStack(linep); if (filename == null) { filename = "<eval'ed string>"; linep[0] = 1; } } try { StringReader in = new StringReader((String) x); Object securityDomain = cx.getSecurityDomainForStackDepth(3); // Compile the reader with opt level of -1 to force interpreter // mode. int oldOptLevel = cx.getOptimizationLevel(); cx.setOptimizationLevel(-1); Script script = cx.compileReader(scope, in, filename, linep[0], securityDomain); cx.setOptimizationLevel(oldOptLevel); // if the compile fails, an error has been reported by the // compiler, but we need to stop execution to avoid // infinite looping on while(true) { eval('foo bar') } - // so we throw an EvaluatorException. if (script == null) { String message = Context.getMessage0("msg.syntax"); throw new EvaluatorException(message); } InterpretedScript is = (InterpretedScript) script; is.itsData.itsFromEvalCode = true; Object result = is.call(cx, scope, (Scriptable) thisArg, null); return result; } catch (IOException ioe) { // should never happen since we just made the Reader from a String throw new RuntimeException("unexpected io exception"); } } | 12376 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12376/d589083a1e05831fd048d3c3f77379559ec628d7/NativeGlobal.java/buggy/js/rhino/src/org/mozilla/javascript/NativeGlobal.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1033,
5302,
12193,
12,
1042,
9494,
16,
22780,
2146,
16,
4766,
1377,
1033,
20134,
16,
1033,
8526,
833,
16,
4766,
1377,
514,
1544,
16,
509,
13629,
13,
3639,
1216,
11905,
503,
565... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1033,
5302,
12193,
12,
1042,
9494,
16,
22780,
2146,
16,
4766,
1377,
1033,
20134,
16,
1033,
8526,
833,
16,
4766,
1377,
514,
1544,
16,
509,
13629,
13,
3639,
1216,
11905,
503,
565... | ||
boolean shouldPerformResourcePruning() { | protected boolean shouldPerformResourcePruning() { | boolean shouldPerformResourcePruning() { return false; } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/4eac3d2cc275edceeff6f6f06f8d39203c7c731c/OpenResourceAction.java/buggy/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/OpenResourceAction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
1250,
1410,
4990,
1420,
2050,
13036,
1435,
288,
3639,
327,
629,
31,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
1250,
1410,
4990,
1420,
2050,
13036,
1435,
288,
3639,
327,
629,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if (doc instanceof StyledDocument) { StyledDocument sdoc = (StyledDocument) doc; sdoc.setCharacterAttributes(start, end - start, s, true); } | public void setAttributes(int start, int end, AttributeSet s) throws NotImplementedException { // TODO } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/JTextComponent.java/clean/core/src/classpath/javax/javax/swing/text/JTextComponent.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
309,
261,
2434,
1276,
934,
93,
1259,
2519,
13,
288,
934,
93,
1259,
2519,
272,
2434,
273,
261,
24273,
1259,
2519,
13,
997,
31,
272,
2434,
18,
542,
7069,
2498,
12,
1937,
16,
679,
300,
787,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
309,
261,
2434,
1276,
934,
93,
1259,
2519,
13,
288,
934,
93,
1259,
2519,
272,
2434,
273,
261,
24273,
1259,
2519,
13,
997,
31,
272,
2434,
18,
542,
7069,
2498,
12,
1937,
16,
679,
300,
787,
1... | |
Logger.normal(RealNodeRoutingTest.class, "Routed ping "+pings+" success: "+hopsTaken+" "+randomNode.portNumber+" to "+randomNode2.portNumber+" (long:"+ratio+", short:"+avg.currentValue()+", vague:"+avg2.currentValue()+")"); | Logger.normal(RealNodeRoutingTest.class, "Routed ping "+pings+" success: "+hopsTaken+ ' ' +randomNode.portNumber+" to "+randomNode2.portNumber+" (long:"+ratio+", short:"+avg.currentValue()+", vague:"+avg2.currentValue()+ ')'); | public static void main(String[] args) throws FSParseException, PeerParseException, CHKEncodeException { PeerNode.disableProbabilisticHTLs = true; String wd = "realNodeRequestInsertTest"; new File(wd).mkdir(); // Don't clobber nearby nodes! Node.MAX_HTL = 5; FileLoggerHook fh = Logger.setupStdoutLogging(Logger.DEBUG, "freenet.store:minor,freenet.node.Location:normal" /*"freenet.node.LocationManager:debug,freenet.node.FNPPacketManager:normal,freenet.io.comm.UdpSocketManager:debug"*/); Logger.globalSetThreshold(Logger.DEBUG); System.out.println("Insert/retrieve test"); System.out.println(); DummyRandomSource random = new DummyRandomSource(); DiffieHellman.init(random); Node[] nodes = new Node[NUMBER_OF_NODES]; Logger.normal(RealNodeRoutingTest.class, "Creating nodes..."); for(int i=0;i<NUMBER_OF_NODES;i++) { nodes[i] = new Node(5000+i, random, null, wd+File.separator, 0, false, fh, 100); nodes[i].usm.setDropProbability(20); // 5% Logger.normal(RealNodeRoutingTest.class, "Created node "+i); } SimpleFieldSet refs[] = new SimpleFieldSet[NUMBER_OF_NODES]; for(int i=0;i<NUMBER_OF_NODES;i++) refs[i] = nodes[i].exportPublicFieldSet(); Logger.normal(RealNodeRoutingTest.class, "Created "+NUMBER_OF_NODES+" nodes"); // Now link them up // Connect the set for(int i=0;i<NUMBER_OF_NODES;i++) { int next = (i+1) % NUMBER_OF_NODES; int prev = (i+NUMBER_OF_NODES-1)%NUMBER_OF_NODES; nodes[i].peers.connect(refs[next]); nodes[i].peers.connect(refs[prev]); } Logger.normal(RealNodeRoutingTest.class, "Connected nodes"); // Now add some random links for(int i=0;i<NUMBER_OF_NODES*5;i++) { if(i % NUMBER_OF_NODES == 0) Logger.normal(RealNodeRoutingTest.class, ""+i); int length = (int)Math.pow(NUMBER_OF_NODES, random.nextDouble()); int nodeA = random.nextInt(NUMBER_OF_NODES); int nodeB = (nodeA+length)%NUMBER_OF_NODES; //System.out.println(""+nodeA+" -> "+nodeB); Node a = nodes[nodeA]; Node b = nodes[nodeB]; a.peers.connect(b.exportPublicFieldSet()); b.peers.connect(a.exportPublicFieldSet()); } Logger.normal(RealNodeRoutingTest.class, "Added random links"); SwapRequestInterval sri = new CPUAdjustingSwapRequestInterval(((500*1000*NUMBER_OF_NODES)/200), 50); for(int i=0;i<NUMBER_OF_NODES;i++) nodes[i].start(sri); // Now sit back and watch the fireworks! int cycleNumber = 0; int lastSwaps = 0; int lastNoSwaps = 0; int failures = 0; int successes = 0; RunningAverage avg = new SimpleRunningAverage(100, 0.0); RunningAverage avg2 = new BootstrappingDecayingRunningAverage(0.0, 0.0, 1.0, 100); int pings = 0; while(true) { cycleNumber++; try { Thread.sleep(5000); } catch (InterruptedException e) { // Ignore } for(int i=0;i<NUMBER_OF_NODES;i++) { Logger.normal(RealNodeRoutingTest.class, "Cycle "+cycleNumber+" node "+i+": "+nodes[i].lm.getLocation().getValue()); } int newSwaps = LocationManager.swaps; int totalStarted = LocationManager.startedSwaps; int noSwaps = LocationManager.noSwaps; Logger.normal(RealNodeRoutingTest.class, "Swaps: "+(newSwaps-lastSwaps)); Logger.normal(RealNodeRoutingTest.class, "\nTotal swaps: Started*2: "+totalStarted*2+", succeeded: "+newSwaps+", last minute failures: "+noSwaps+ ", ratio "+(double)noSwaps/(double)newSwaps+", early failures: "+((totalStarted*2)-(noSwaps+newSwaps))); Logger.normal(RealNodeRoutingTest.class, "This cycle ratio: "+((double)(noSwaps-lastNoSwaps)) / ((double)(newSwaps - lastSwaps))); lastNoSwaps = noSwaps; Logger.normal(RealNodeRoutingTest.class, "Swaps rejected (already locked): "+LocationManager.swapsRejectedAlreadyLocked); Logger.normal(RealNodeRoutingTest.class, "Swaps rejected (nowhere to go): "+LocationManager.swapsRejectedNowhereToGo); Logger.normal(RealNodeRoutingTest.class, "Swaps rejected (rate limit): "+LocationManager.swapsRejectedRateLimit); Logger.normal(RealNodeRoutingTest.class, "Swaps rejected (loop): "+LocationManager.swapsRejectedLoop); Logger.normal(RealNodeRoutingTest.class, "Swaps rejected (recognized ID):" +LocationManager.swapsRejectedRecognizedID); lastSwaps = newSwaps; // Do some (routed) test-pings for(int i=0;i<10;i++) { try { Thread.sleep(2000); } catch (InterruptedException e1) { } try { Node randomNode = nodes[random.nextInt(NUMBER_OF_NODES)]; Node randomNode2 = randomNode; while(randomNode2 == randomNode) randomNode2 = nodes[random.nextInt(NUMBER_OF_NODES)]; Logger.normal(RealNodeRoutingTest.class, "Pinging "+randomNode2.portNumber+" from "+randomNode.portNumber); double loc2 = randomNode2.lm.getLocation().getValue(); int hopsTaken = randomNode.routedPing(loc2); pings++; if(hopsTaken < 0) { failures++; avg.report(0.0); avg2.report(0.0); double ratio = (double)successes / ((double)(failures+successes)); Logger.normal(RealNodeRoutingTest.class, "Routed ping "+pings+" FAILED from "+randomNode.portNumber+" to "+randomNode2.portNumber+" (long:"+ratio+", short:"+avg.currentValue()+", vague:"+avg2.currentValue()+")"); } else { successes++; avg.report(1.0); avg2.report(1.0); double ratio = (double)successes / ((double)(failures+successes)); Logger.normal(RealNodeRoutingTest.class, "Routed ping "+pings+" success: "+hopsTaken+" "+randomNode.portNumber+" to "+randomNode2.portNumber+" (long:"+ratio+", short:"+avg.currentValue()+", vague:"+avg2.currentValue()+")"); } } catch (Throwable t) { Logger.error(RealNodeRoutingTest.class, "Caught "+t, t); } } if(pings > 10 && avg.currentValue() > 0.98 && ((double)successes / ((double)(failures+successes)) > 0.98)) { break; } } System.out.println(); System.out.println("Ping average > 98%, lets do some inserts/requests"); System.out.println(); int requestNumber = 0; RunningAverage requestsAvg = new SimpleRunningAverage(100, 0.0); String baseString = "" + System.currentTimeMillis() + " "; while(true) { try { requestNumber++; try { Thread.sleep(5000); } catch (InterruptedException e1) { } String dataString = baseString + requestNumber; // Pick random node to insert to int node1 = random.nextInt(NUMBER_OF_NODES); Node randomNode = nodes[node1]; Logger.error(RealNodeRequestInsertTest.class,"Inserting: \""+dataString+"\" to "+node1); byte[] data = dataString.getBytes(); ClientCHKBlock block; block = ClientCHKBlock.encode(data, false, false, (short)-1, 0); ClientCHK chk = (ClientCHK) block.getClientKey(); byte[] encData = block.getData(); byte[] encHeaders = block.getHeaders(); ClientCHKBlock newBlock = new ClientCHKBlock(encData, encHeaders, chk, true); Logger.error(RealNodeRequestInsertTest.class, "Decoded: "+new String(newBlock.memoryDecode())); Logger.error(RealNodeRequestInsertTest.class,"CHK: "+chk.getURI()); Logger.error(RealNodeRequestInsertTest.class,"Headers: "+HexUtil.bytesToHex(block.getHeaders())); randomNode.realPut(block, true); Logger.error(RealNodeRequestInsertTest.class, "Inserted to "+node1); Logger.error(RealNodeRequestInsertTest.class, "Data: "+Fields.hashCode(encData)+", Headers: "+Fields.hashCode(encHeaders)); // Pick random node to request from int node2; do { node2 = random.nextInt(NUMBER_OF_NODES); } while(node2 == node1); Node fetchNode = nodes[node2]; block = (ClientCHKBlock) fetchNode.realGetKey((ClientKey) chk, false, true, false); if(block == null) { Logger.error(RealNodeRequestInsertTest.class, "Fetch FAILED from "+node2); requestsAvg.report(0.0); } else { byte[] results = block.memoryDecode(); requestsAvg.report(1.0); if(Arrays.equals(results, data)) { Logger.error(RealNodeRequestInsertTest.class, "Fetch succeeded: "+new String(results)); } else { Logger.error(RealNodeRequestInsertTest.class, "Returned invalid data!: "+new String(results)); } } } catch (Throwable t) { Logger.error(RealNodeRequestInsertTest.class, "Caught "+t, t); } } } | 46035 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46035/62fd59041864b4ed1f43adc676de6bfb5ea977f3/RealNodeRequestInsertTest.java/clean/src/freenet/node/RealNodeRequestInsertTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
2774,
12,
780,
8526,
833,
13,
1216,
9247,
13047,
16,
10669,
13047,
16,
6469,
47,
5509,
503,
288,
3639,
10669,
907,
18,
8394,
9152,
22681,
5846,
5062,
48,
87,
273,
638,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
2774,
12,
780,
8526,
833,
13,
1216,
9247,
13047,
16,
10669,
13047,
16,
6469,
47,
5509,
503,
288,
3639,
10669,
907,
18,
8394,
9152,
22681,
5846,
5062,
48,
87,
273,
638,
3... |
statement(null); consume(); | { checkToken = LA(1); try { statement(createNewScope ? newScope : scope ); } catch( Backtrack b ) { failParse(); if( LA(1) == checkToken ) errorHandling(); } } consume(IToken.tRBRACE); if( createNewScope ) newScope.exitScope( requestor ); | protected void compoundStatement() throws Backtrack { consume(IToken.tLBRACE); while (LT(1) != IToken.tRBRACE) statement(null); consume(); } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/619b617056a791f58d394641c96f4db0f62b20e3/Parser.java/clean/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/Parser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
11360,
3406,
1435,
1216,
4297,
4101,
565,
288,
3639,
7865,
12,
1285,
969,
18,
88,
12995,
9254,
1769,
3639,
1323,
261,
12050,
12,
21,
13,
480,
467,
1345,
18,
88,
19437,
9254,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
11360,
3406,
1435,
1216,
4297,
4101,
565,
288,
3639,
7865,
12,
1285,
969,
18,
88,
12995,
9254,
1769,
3639,
1323,
261,
12050,
12,
21,
13,
480,
467,
1345,
18,
88,
19437,
9254,
... |
Collection agents=(Set)status.value; | protected List searchByCommunityAndRole(String community,String role) { ArrayList list= new ArrayList(); if(communityService==null) { loggingService.error(" Community Service is null in searchByCommunityAndRole " +myAddress.toString()); return list; } if(community==null) { loggingService.error(" community is null in searchByCommunityAndRole " +myAddress.toString()); return list; } if(role==null) { loggingService.error(" Role is null in searchByCommunityAndRole " +myAddress.toString()); return list; } final Status status = new Status(); final Semaphore s = new Semaphore(0); CommunityResponseListener crl = new CommunityResponseListener() { public void getResponse(CommunityResponse resp) { Object response = resp.getContent(); if (!(response instanceof Set)) { String errorString = "Unexpected community response class:" + response.getClass().getName() + " - Should be a Set"; loggingService.error(errorString); throw new RuntimeException(errorString); } status.value = (Set) response; s.release(); } }; // TODO: do this truly asynchronously. String filter = "(Role=" + role + ")"; communityService.searchCommunity(community, filter, true, Community.AGENTS_ONLY, crl); try { s.acquire(); } catch (InterruptedException ie) { loggingService.error("Error in searchByCommunity:", ie); } Collection agents=(Set)status.value; //Collection searchresult=communityService.searchByRole(community,role); Iterator roleiter=agents.iterator(); while(roleiter.hasNext()) { Entity entity = (Entity) roleiter.next(); list.add(entity.getName()); } return list; } | 12869 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12869/011ffb8fa041f290639068c31ef03a4b47b81f23/MnRQueryBase.java/clean/securityservices/src/org/cougaar/core/security/monitoring/plugin/MnRQueryBase.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
987,
1623,
858,
12136,
13352,
1876,
2996,
12,
780,
19833,
16,
780,
2478,
13,
288,
565,
2407,
666,
33,
394,
2407,
5621,
565,
309,
12,
20859,
1179,
631,
2011,
13,
288,
1377,
2907,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
987,
1623,
858,
12136,
13352,
1876,
2996,
12,
780,
19833,
16,
780,
2478,
13,
288,
565,
2407,
666,
33,
394,
2407,
5621,
565,
309,
12,
20859,
1179,
631,
2011,
13,
288,
1377,
2907,
1... | |
{ } | { } | public KeyHandler() { } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
1929,
1503,
1435,
202,
202,
95,
202,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
1929,
1503,
1435,
202,
202,
95,
202,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
List users = mgr.getUsers(); | List users = new ArrayList(mgr.getUsers()); | private List getSortedUsers() { if (log.isDebugEnabled()) { log.debug("listing users"); } List users = mgr.getUsers(); Collections.sort(users, new Comparator() { public int compare(Object o1, Object o2) { User u1 = (User) o1; User u2 = (User) o2; String name1 = u1.getLastName() + " " + u1.getFirstName(); String name2 = u2.getLastName() + " " + u2.getFirstName(); return name1.compareTo(name2); } }); return users; } | 47226 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47226/1ae6b7d00ab681becd1b5b011131441c75810884/UserAction.java/buggy/src/main/java/org/osaf/cosmo/ui/UserAction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
987,
15175,
329,
6588,
1435,
288,
3639,
309,
261,
1330,
18,
291,
2829,
1526,
10756,
288,
5411,
613,
18,
4148,
2932,
21228,
3677,
8863,
3639,
289,
3639,
987,
3677,
273,
394,
2407,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
987,
15175,
329,
6588,
1435,
288,
3639,
309,
261,
1330,
18,
291,
2829,
1526,
10756,
288,
5411,
613,
18,
4148,
2932,
21228,
3677,
8863,
3639,
289,
3639,
987,
3677,
273,
394,
2407,
12... |
fDocumentHandler.xmlDecl(version, encoding, standalone); } | fDocumentHandler.xmlDecl(version, encoding, standalone); } | public void callXMLDecl(int version, int encoding, int standalone) throws Exception { fDocumentHandler.xmlDecl(version, encoding, standalone); } | 46079 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46079/f2b9ad84920b2015a53c9a67b4dfb5460fa0465e/XMLValidator.java/clean/src/org/apache/xerces/validators/common/XMLValidator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
745,
4201,
3456,
12,
474,
1177,
16,
509,
2688,
16,
509,
17676,
13,
1216,
1185,
288,
3639,
284,
2519,
1503,
18,
2902,
3456,
12,
1589,
16,
2688,
16,
17676,
1769,
565,
289,
2,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
745,
4201,
3456,
12,
474,
1177,
16,
509,
2688,
16,
509,
17676,
13,
1216,
1185,
288,
3639,
284,
2519,
1503,
18,
2902,
3456,
12,
1589,
16,
2688,
16,
17676,
1769,
565,
289,
2,
... |
new BasicAttribute(attrID, Integer.toString(attrVal))); | new BasicAttribute(attrID, Integer.toString(attrVal))); | protected void execute() throws Exception, NamingException { String[] attrList = new String[attrListe.size()]; AttributesImpl attr = new AttributesImpl(); if (debug) { debugPrint(); } SearchControls constraints = new SearchControls(); attrListe.toArray(attrList); attrListe.clear(); try { connect(); switch (toDo) { case LDAPTransformer.STATE_INSIDE_EXECUTE_QUERY: try { if (scope.equals("OBJECT_SCOPE")) { constraints.setSearchScope(SearchControls.OBJECT_SCOPE); } else if (scope.equals("SUBTREE_SCOPE")) { constraints.setSearchScope(SearchControls.SUBTREE_SCOPE); } else { constraints.setSearchScope(SearchControls.ONELEVEL_SCOPE); } constraints.setTimeLimit(time_limit); constraints.setDerefLinkFlag(deref_link); constraints.setCountLimit(count_limit); if (attrList.length > 0) { constraints.setReturningAttributes(attrList); } NamingEnumeration ldapresults = ctx.search(searchbase, filter, constraints); if (!doc_element.equals("")) { transformer.start(doc_element, attr); } while (ldapresults != null && ldapresults.hasMore()) { if (!row_element.equals("")) { transformer.start(row_element, attr); } SearchResult si = (SearchResult)ldapresults.next(); javax.naming.directory.Attributes attrs = si.getAttributes(); if (attrs != null) { NamingEnumeration ae = attrs.getAll(); while (ae.hasMoreElements()) { Attribute at = (Attribute)ae.next(); Enumeration vals = at.getAll(); String attrID = at.getID(); if (showAttribute) { transformer.start(attrID, attr); } String attrVal = (String)vals.nextElement(); if (query_index > 0) { switch (transformer.getQuery(query_index-1).current_state) { case LDAPTransformer.STATE_INSIDE_FILTER_ELEMENT: if (!transformer.getQuery(query_index-1).filter.equals("")) { transformer.getQuery(query_index-1).filter.concat(", "); } transformer.getQuery(query_index-1).filter.concat(attrID).concat("=").concat(attrVal); break; default: transformer.start(attrID, attr); } } else { transformer.data(String.valueOf(attrVal)); } if (showAttribute) { transformer.end(attrID); } } } if (!row_element.equals("")) { transformer.end(row_element); } } if (!doc_element.equals("")) { transformer.end(doc_element); } } catch(Exception e) { if (sax_error) { throw new Exception ("[LDAPTransformer] Error in LDAP-Query: " + e.toString()); } else { transformer.start(error_element, attr); transformer.data("[LDAPTransformer] Error in LDAP-Query: " + e); transformer.end(error_element); transformer.getTheLogger().error("[LDAPTransformer] Exception: " + e.toString()); } } break; case LDAPTransformer.STATE_INSIDE_EXECUTE_INCREMENT: try { if (scope.equals("OBJECT_SCOPE")) { constraints.setSearchScope(SearchControls.OBJECT_SCOPE); } else if (scope.equals("SUBTREE_SCOPE")) { constraints.setSearchScope(SearchControls.SUBTREE_SCOPE); } else { constraints.setSearchScope(SearchControls.ONELEVEL_SCOPE); } constraints.setTimeLimit(time_limit); constraints.setDerefLinkFlag(deref_link); constraints.setCountLimit(count_limit); if (attrList.length != 1) { transformer.start(error_element, attr); transformer.data("Increment must reference exactly 1 attribute."); transformer.end(error_element); } else { constraints.setReturningAttributes(attrList); NamingEnumeration ldapresults = ctx.search(searchbase, filter, constraints); int attrVal = 0; String attrID = ""; SearchResult si = null; while (ldapresults != null && ldapresults.hasMore()) { si = (SearchResult)ldapresults.next(); javax.naming.directory.Attributes attrs = si.getAttributes(); if (attrs != null) { NamingEnumeration ae = attrs.getAll(); while (ae.hasMoreElements()) { Attribute at = (Attribute)ae.next(); Enumeration vals = at.getAll(); attrID = at.getID(); attrVal = Integer.parseInt((String)vals.nextElement()); } } } ++attrVal; // Specify the changes to make ModificationItem[] mods = new ModificationItem[1]; // Replace the "mail" attribute with a new value mods[0] = new ModificationItem(DirContext.REPLACE_ATTRIBUTE, new BasicAttribute(attrID, Integer.toString(attrVal))); // Perform the requested modifications on the named object ctx.modifyAttributes(new StringBuffer(si.toString().substring(0,si.toString().indexOf(":"))) .append(",").append(searchbase).toString(), mods); } } catch(Exception e) { if (sax_error) { throw new Exception ("[LDAPTransformer] Error incrementing an attribute: " + e.toString()); } else { transformer.start(error_element, attr); transformer.data("[LDAPTransformer] Error incrementing an attribute: " + e.toString()); transformer.end(error_element); transformer.getTheLogger().error("[LDAPTransformer] Error incrementing an attribute: " + e.toString()); } } break; default: } //end switch } catch (NamingException e) { if (sax_error) { throw new NamingException ("[LDAPTransformer] Failed ldap-connection to directory service: " + e.toString()); } else { transformer.start(error_element, attr); transformer.data("[LDAPTransformer] Failed ldap-connection to directory service."); transformer.end(error_element); transformer.getTheLogger().error("[LDAPTransformer] Failed to connect to " + serverurl + e.toString()); } } try { disconnect(); } catch (NamingException e) { if (sax_error) { throw new NamingException ("[LDAPTransformer] Failed ldap-disconnection from directory service: " + e.toString()); } else { transformer.start(error_element, attr); transformer.data("[LDAPTransformer] Failed ldap-disconnection to directory service."); transformer.end(error_element); transformer.getTheLogger().error("[LDAPTransformer] Failed to disconnect from " + serverurl + e.toString()); } } } | 46428 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46428/52ffdd8b732294554bcca0d4e0574ce6a20c35bc/LDAPTransformer.java/buggy/src/blocks/naming/java/org/apache/cocoon/transformation/LDAPTransformer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
4750,
918,
1836,
1435,
1216,
1185,
16,
26890,
288,
5411,
514,
8526,
1604,
682,
273,
394,
514,
63,
1747,
682,
73,
18,
1467,
1435,
15533,
5411,
9055,
2828,
1604,
273,
394,
9055,
2828,
5621,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
4750,
918,
1836,
1435,
1216,
1185,
16,
26890,
288,
5411,
514,
8526,
1604,
682,
273,
394,
514,
63,
1747,
682,
73,
18,
1467,
1435,
15533,
5411,
9055,
2828,
1604,
273,
394,
9055,
2828,
5621,... |
if (!RefactoringMessageUtil.checkReadOnlyStatusRecursively(project, Arrays.asList(elements))) return; | if (!CommonRefactoringUtil.checkReadOnlyStatusRecursively(project, Arrays.asList(elements))) return; | public static void deletePsiElement(final PsiElement[] elementsToDelete, final Project project) { if (elementsToDelete == null || elementsToDelete.length == 0) return; final PsiElement[] elements = DeleteUtil.filterElements(elementsToDelete); boolean safeDeleteApplicable = true; for (int i = 0; i < elements.length && safeDeleteApplicable; i++) { PsiElement element = elements[i]; safeDeleteApplicable = element.isWritable() && SafeDeleteProcessor.validElement(element); } if (safeDeleteApplicable) { DeleteDialog dialog = new DeleteDialog(project, elements, new DeleteDialog.Callback() { public void run(final DeleteDialog dialog) { if (!RefactoringMessageUtil.checkReadOnlyStatusRecursively(project, Arrays.asList(elements))) return; SafeDeleteProcessor.createInstance(project, new Runnable() { public void run() { dialog.close(DeleteDialog.CANCEL_EXIT_CODE); } }, elements, dialog.isSearchInComments(), dialog.isSearchInNonJava(), true).run(); } } ); dialog.show(); if (!dialog.isOK()) return; } else { String warningMessage = DeleteUtil.generateWarningMessage(IdeBundle.message("prompt.delete.elements"), elements); int defaultOption; boolean anyDirectories = false; String directoryName = null; for (PsiElement psiElement : elementsToDelete) { if (psiElement instanceof PsiDirectory) { anyDirectories = true; directoryName = ((PsiDirectory)psiElement).getName(); break; } } if (anyDirectories) { if (elements.length == 1) { warningMessage += IdeBundle.message("warning.delete.all.files.and.subdirectories", directoryName); } else { warningMessage += IdeBundle.message("warning.delete.all.files.and.subdirectories.in.the.selected.directory"); } defaultOption = -1; } else { defaultOption = 0; } int result = Messages.showDialog(project, warningMessage, IdeBundle.message("title.delete"), new String[]{CommonBundle.getOkButtonText(), CommonBundle.getCancelButtonText()}, defaultOption, Messages.getQuestionIcon()); if (result != 0) return; } final FileTypeManager ftManager = FileTypeManager.getInstance(); CommandProcessor.getInstance().executeCommand( project, new Runnable() { public void run() { for (int i = 0; i < elements.length; i++) { final PsiElement elementToDelete = elements[i]; if (elementToDelete instanceof PsiDirectory) { VirtualFile virtualFile = ((PsiDirectory)elementToDelete).getVirtualFile(); if (virtualFile.getFileSystem() instanceof LocalFileSystem) { ArrayList<VirtualFile> readOnlyFiles = new ArrayList<VirtualFile>(); getReadOnlyVirtualFiles(virtualFile, readOnlyFiles, ftManager); if (readOnlyFiles.size() > 0) { int _result = Messages.showOkCancelDialog( project, IdeBundle.message("prompt.directory.contains.read.only.files", virtualFile.getPresentableUrl()), IdeBundle.message("title.delete"), Messages.getQuestionIcon() ); if (_result != 0) continue; boolean success = true; for (int j = 0; j < readOnlyFiles.size(); j++) { VirtualFile file = readOnlyFiles.get(j); success = clearReadOnlyFlag(file, project); if (!success) break; } if (!success) continue; } } } else if (!elementToDelete.isWritable()) { final PsiFile file = elementToDelete.getContainingFile(); if (file != null) { final VirtualFile virtualFile = file.getVirtualFile(); if (virtualFile.getFileSystem() instanceof LocalFileSystem) { int _result = MessagesEx.fileIsReadOnly(project, virtualFile) .setTitle(IdeBundle.message("title.delete")) .appendMessage(IdeBundle.message("prompt.delete.it.anyway")) .askOkCancel(); if (_result != 0) continue; boolean success = clearReadOnlyFlag(virtualFile, project); if (!success) continue; } } } try { elementToDelete.checkDelete(); } catch (IncorrectOperationException ex) { Messages.showMessageDialog(project, ex.getMessage(), CommonBundle.getErrorTitle(), Messages.getErrorIcon()); continue; } ApplicationManager.getApplication().runWriteAction(new Runnable() { public void run() { try { elementToDelete.delete(); } catch (final IncorrectOperationException ex) { ApplicationManager.getApplication().invokeLater(new Runnable() { public void run() { Messages.showMessageDialog(project, ex.getMessage(), CommonBundle.getErrorTitle(), Messages.getErrorIcon()); } }); } } }); } } }, IdeBundle.message("command.delete"), null ); } | 12814 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12814/baee929cd58a1e84ca4320072f225f752948f30b/DeleteHandler.java/buggy/source/com/intellij/ide/util/DeleteHandler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
918,
1430,
52,
7722,
1046,
12,
6385,
453,
7722,
1046,
8526,
2186,
14976,
16,
727,
5420,
1984,
13,
288,
565,
309,
261,
6274,
14976,
422,
446,
747,
2186,
14976,
18,
2469,
422,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
918,
1430,
52,
7722,
1046,
12,
6385,
453,
7722,
1046,
8526,
2186,
14976,
16,
727,
5420,
1984,
13,
288,
565,
309,
261,
6274,
14976,
422,
446,
747,
2186,
14976,
18,
2469,
422,
... |
if (log().isDebugEnabled()) log().debug("poll: service= SNMP address= " + agentConfig); | if (log().isDebugEnabled()) log().debug("poll: service= SNMP address= " + agentConfig); | public PollStatus poll(MonitoredService svc, Map parameters, org.opennms.netmgt.config.poller.Package pkg) { NetworkInterface iface = svc.getNetInterface(); PollStatus status = PollStatus.unavailable(); InetAddress ipaddr = (InetAddress) iface.getAddress(); // Retrieve this interface's SNMP peer object // SnmpAgentConfig agentConfig = (SnmpAgentConfig) iface.getAttribute(SNMP_AGENTCONFIG_KEY); if (agentConfig == null) throw new RuntimeException("SnmpAgentConfig object not available for interface " + ipaddr); // Get configuration parameters // int timeout = ParameterMap.getKeyedInteger(parameters, "timeout", agentConfig.getTimeout()); int retries = ParameterMap.getKeyedInteger(parameters, "retries", agentConfig.getRetries()); int port = ParameterMap.getKeyedInteger(parameters, "port", DEFAULT_PORT); String oid = ParameterMap.getKeyedString(parameters, "oid", DEFAULT_OBJECT_IDENTIFIER); String operator = ParameterMap.getKeyedString(parameters, "operator", null); String operand = ParameterMap.getKeyedString(parameters, "operand", null); String walkstr = ParameterMap.getKeyedString(parameters, "walk", "false"); // set timeout and retries on SNMP peer object // agentConfig.setTimeout(timeout); agentConfig.setRetries(retries); agentConfig.setPort(port); if (log().isDebugEnabled()) log().debug("poll: service= SNMP address= " + agentConfig); // Establish SNMP session with interface // try { if (log().isDebugEnabled()) { log().debug("SnmpMonitor.poll: SnmpAgentConfig address: " +agentConfig); } SnmpObjId snmpObjectId = new SnmpObjId(oid); if ("true".equals(walkstr)) { List<SnmpValue> results = SnmpUtils.getColumns(agentConfig, "snmpPoller", snmpObjectId); for(SnmpValue result : results) { if (result != null) { log().debug("poll: SNMPwalk poll succeeded, addr=" + ipaddr.getHostAddress() + " oid=" + oid + " value=" + result); if (meetsCriteria(result, operator, operand)) { status = PollStatus.available(); } } else { status = logDown(Level.DEBUG, "SNMP poll failed, addr=" + ipaddr.getHostAddress() + " oid=" + oid); return status; } } } else { SnmpValue result = SnmpUtils.get(agentConfig, snmpObjectId); if (result != null) { log().debug("poll: SNMP poll succeeded, addr=" + ipaddr.getHostAddress() + " oid=" + oid + " value=" + result); status = (meetsCriteria(result, operator, operand) ? PollStatus.available() : PollStatus.unavailable()); } else { status = logDown(Level.DEBUG, "SNMP poll failed, addr=" + ipaddr.getHostAddress() + " oid=" + oid); } } } catch (NumberFormatException e) { status = logDown(Level.ERROR, "Number operator used on a non-number " + e.getMessage()); } catch (IllegalArgumentException e) { status = logDown(Level.ERROR, "Invalid Snmp Criteria: " + e.getMessage()); } catch (Throwable t) { status = logDown(Level.WARN, "Unexpected exception during SNMP poll of interface " + ipaddr.getHostAddress(), t); } return status; } | 48885 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48885/197dbe646ed332296ce0438e4180826282aabffb/SnmpMonitor.java/clean/opennms-services/src/main/java/org/opennms/netmgt/poller/monitors/SnmpMonitor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19160,
1482,
7672,
12,
11415,
20425,
1179,
7538,
16,
1635,
1472,
16,
2358,
18,
3190,
82,
959,
18,
2758,
81,
4521,
18,
1425,
18,
3915,
749,
18,
2261,
3475,
13,
288,
3639,
21109,
97... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19160,
1482,
7672,
12,
11415,
20425,
1179,
7538,
16,
1635,
1472,
16,
2358,
18,
3190,
82,
959,
18,
2758,
81,
4521,
18,
1425,
18,
3915,
749,
18,
2261,
3475,
13,
288,
3639,
21109,
97... |
Assert.assertEquals(new String[] { "oparam1", "oparam2" }, configuration.getParameters()); Assert.assertEquals(new String[] { "group1", "ogroup1", "ogroup2", "group2" }, configuration.getGroups()); Assert.assertEquals(new String[] { "odg1", "odg2" }, configuration.getDependsOnGroups()); Assert.assertEquals(new String[] { "odm1", "odm2" }, configuration.getDependsOnMethods()); | Assert.assertEquals(configuration.getParameters(), new String[] { "oparam1", "oparam2" }); Assert.assertEqualsNoOrder(configuration.getGroups(), new String[] { "group1", "ogroup1", "ogroup2", "group2" }, "groups"); Assert.assertEqualsNoOrder(configuration.getDependsOnGroups(), new String[] { "odg1", "odg2" }, "depends on groups"); Assert.assertEqualsNoOrder(configuration.getDependsOnMethods(), new String[] { "odm1", "odm2" }, "depends on methods"); | public void verifyConfigurationOthers() throws SecurityException, NoSuchMethodException { Method method = MTest1.class.getMethod("otherConfigurations", new Class[0]); IConfiguration configuration = (IConfiguration) m_finder.findAnnotation(method, IConfiguration.class); Assert.assertNotNull(configuration); Assert.assertFalse(configuration.getBeforeSuite()); Assert.assertFalse(configuration.getBeforeTestMethod()); Assert.assertFalse(configuration.getBeforeTest()); Assert.assertFalse(configuration.getBeforeTestClass()); Assert.assertFalse(configuration.getAfterSuite()); Assert.assertFalse(configuration.getAfterTestMethod()); Assert.assertFalse(configuration.getAfterTest()); Assert.assertFalse(configuration.getAfterTestClass()); Assert.assertFalse(configuration.getEnabled()); Assert.assertEquals(new String[] { "oparam1", "oparam2" }, configuration.getParameters()); Assert.assertEquals(new String[] { "group1", "ogroup1", "ogroup2", "group2" }, configuration.getGroups()); Assert.assertEquals(new String[] { "odg1", "odg2" }, configuration.getDependsOnGroups()); Assert.assertEquals(new String[] { "odm1", "odm2" }, configuration.getDependsOnMethods()); Assert.assertFalse(configuration.getInheritGroups()); Assert.assertTrue(configuration.getAlwaysRun()); Assert.assertEquals(configuration.getDescription(), "beforeSuite description"); } | 50994 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50994/8b8bc76fa825845109cea3a3a79ff040454421a0/MAnnotationSampleTest.java/buggy/test/src/test/mannotation/MAnnotationSampleTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
3929,
1750,
51,
29540,
1435,
377,
1216,
17780,
16,
15959,
282,
288,
565,
2985,
707,
273,
490,
4709,
21,
18,
1106,
18,
588,
1305,
2932,
3011,
9698,
3113,
394,
1659,
63,
20,
19... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
3929,
1750,
51,
29540,
1435,
377,
1216,
17780,
16,
15959,
282,
288,
565,
2985,
707,
273,
490,
4709,
21,
18,
1106,
18,
588,
1305,
2932,
3011,
9698,
3113,
394,
1659,
63,
20,
19... |
_t = __t843; | _t = __t828; | public final void framephrase(AST _t) throws RecognitionException { AST framephrase_AST_in = (_t == ASTNULL) ? null : (AST)_t; AST __t832 = _t; AST tmp133_AST_in = (AST)_t; match(_t,WITH); _t = _t.getFirstChild(); { _loop861: do { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case ACCUMULATE: { AST __t834 = _t; AST tmp134_AST_in = (AST)_t; match(_t,ACCUMULATE); _t = _t.getFirstChild(); { if (_t==null) _t=ASTNULL; if ((_tokenSet_3.member(_t.getType()))) { expression(_t); _t = _retTree; } else if ((_t.getType()==3)) { } else { throw new NoViableAltException(_t); } } _t = __t834; _t = _t.getNextSibling(); break; } case ATTRSPACE: { AST tmp135_AST_in = (AST)_t; match(_t,ATTRSPACE); _t = _t.getNextSibling(); break; } case NOATTRSPACE: { AST tmp136_AST_in = (AST)_t; match(_t,NOATTRSPACE); _t = _t.getNextSibling(); break; } case CANCELBUTTON: { AST __t836 = _t; AST tmp137_AST_in = (AST)_t; match(_t,CANCELBUTTON); _t = _t.getFirstChild(); fld(_t,CQ.SYMBOL); _t = _retTree; _t = __t836; _t = _t.getNextSibling(); break; } case CENTERED: { AST tmp138_AST_in = (AST)_t; match(_t,CENTERED); _t = _t.getNextSibling(); break; } case COLUMN: { AST __t837 = _t; AST tmp139_AST_in = (AST)_t; match(_t,COLUMN); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t837; _t = _t.getNextSibling(); break; } case CONTEXTHELP: { AST tmp140_AST_in = (AST)_t; match(_t,CONTEXTHELP); _t = _t.getNextSibling(); break; } case CONTEXTHELPFILE: { AST tmp141_AST_in = (AST)_t; match(_t,CONTEXTHELPFILE); _t = _t.getNextSibling(); expression(_t); _t = _retTree; break; } case DEFAULTBUTTON: { AST __t838 = _t; AST tmp142_AST_in = (AST)_t; match(_t,DEFAULTBUTTON); _t = _t.getFirstChild(); fld(_t,CQ.SYMBOL); _t = _retTree; _t = __t838; _t = _t.getNextSibling(); break; } case EXPORT: { AST tmp143_AST_in = (AST)_t; match(_t,EXPORT); _t = _t.getNextSibling(); break; } case FITLASTCOLUMN: { AST tmp144_AST_in = (AST)_t; match(_t,FITLASTCOLUMN); _t = _t.getNextSibling(); break; } case FONT: { AST __t839 = _t; AST tmp145_AST_in = (AST)_t; match(_t,FONT); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t839; _t = _t.getNextSibling(); break; } case FONTBASEDLAYOUT: { AST tmp146_AST_in = (AST)_t; match(_t,FONTBASEDLAYOUT); _t = _t.getNextSibling(); break; } case FRAME: { frame_ref(_t); _t = _retTree; break; } case LABELFONT: { AST __t840 = _t; AST tmp147_AST_in = (AST)_t; match(_t,LABELFONT); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t840; _t = _t.getNextSibling(); break; } case LABELDCOLOR: { AST __t841 = _t; AST tmp148_AST_in = (AST)_t; match(_t,LABELDCOLOR); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t841; _t = _t.getNextSibling(); break; } case LABELFGCOLOR: { AST __t842 = _t; AST tmp149_AST_in = (AST)_t; match(_t,LABELFGCOLOR); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t842; _t = _t.getNextSibling(); break; } case LABELBGCOLOR: { AST __t843 = _t; AST tmp150_AST_in = (AST)_t; match(_t,LABELBGCOLOR); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t843; _t = _t.getNextSibling(); break; } case MULTIPLE: { AST tmp151_AST_in = (AST)_t; match(_t,MULTIPLE); _t = _t.getNextSibling(); break; } case SINGLE: { AST tmp152_AST_in = (AST)_t; match(_t,SINGLE); _t = _t.getNextSibling(); break; } case SEPARATORS: { AST tmp153_AST_in = (AST)_t; match(_t,SEPARATORS); _t = _t.getNextSibling(); break; } case NOSEPARATORS: { AST tmp154_AST_in = (AST)_t; match(_t,NOSEPARATORS); _t = _t.getNextSibling(); break; } case NOASSIGN: { AST tmp155_AST_in = (AST)_t; match(_t,NOASSIGN); _t = _t.getNextSibling(); break; } case NOROWMARKERS: { AST tmp156_AST_in = (AST)_t; match(_t,NOROWMARKERS); _t = _t.getNextSibling(); break; } case NOSCROLLBARVERTICAL: { AST tmp157_AST_in = (AST)_t; match(_t,NOSCROLLBARVERTICAL); _t = _t.getNextSibling(); break; } case SCROLLBARVERTICAL: { AST tmp158_AST_in = (AST)_t; match(_t,SCROLLBARVERTICAL); _t = _t.getNextSibling(); break; } case ROWHEIGHTCHARS: { AST __t844 = _t; AST tmp159_AST_in = (AST)_t; match(_t,ROWHEIGHTCHARS); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t844; _t = _t.getNextSibling(); break; } case ROWHEIGHTPIXELS: { AST __t845 = _t; AST tmp160_AST_in = (AST)_t; match(_t,ROWHEIGHTPIXELS); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t845; _t = _t.getNextSibling(); break; } case EXPANDABLE: { AST tmp161_AST_in = (AST)_t; match(_t,EXPANDABLE); _t = _t.getNextSibling(); break; } case DROPTARGET: { AST tmp162_AST_in = (AST)_t; match(_t,DROPTARGET); _t = _t.getNextSibling(); break; } case NOAUTOVALIDATE: { AST tmp163_AST_in = (AST)_t; match(_t,NOAUTOVALIDATE); _t = _t.getNextSibling(); break; } case NOCOLUMNSCROLLING: { AST tmp164_AST_in = (AST)_t; match(_t,NOCOLUMNSCROLLING); _t = _t.getNextSibling(); break; } case KEEPTABORDER: { AST tmp165_AST_in = (AST)_t; match(_t,KEEPTABORDER); _t = _t.getNextSibling(); break; } case NOBOX: { AST tmp166_AST_in = (AST)_t; match(_t,NOBOX); _t = _t.getNextSibling(); break; } case NOEMPTYSPACE: { AST tmp167_AST_in = (AST)_t; match(_t,NOEMPTYSPACE); _t = _t.getNextSibling(); break; } case NOHIDE: { AST tmp168_AST_in = (AST)_t; match(_t,NOHIDE); _t = _t.getNextSibling(); break; } case NOLABELS: { AST tmp169_AST_in = (AST)_t; match(_t,NOLABELS); _t = _t.getNextSibling(); break; } case USEDICTEXPS: { AST tmp170_AST_in = (AST)_t; match(_t,USEDICTEXPS); _t = _t.getNextSibling(); break; } case NOVALIDATE: { AST tmp171_AST_in = (AST)_t; match(_t,NOVALIDATE); _t = _t.getNextSibling(); break; } case NOHELP: { AST tmp172_AST_in = (AST)_t; match(_t,NOHELP); _t = _t.getNextSibling(); break; } case NOUNDERLINE: { AST tmp173_AST_in = (AST)_t; match(_t,NOUNDERLINE); _t = _t.getNextSibling(); break; } case OVERLAY: { AST tmp174_AST_in = (AST)_t; match(_t,OVERLAY); _t = _t.getNextSibling(); break; } case PAGEBOTTOM: { AST tmp175_AST_in = (AST)_t; match(_t,PAGEBOTTOM); _t = _t.getNextSibling(); break; } case PAGETOP: { AST tmp176_AST_in = (AST)_t; match(_t,PAGETOP); _t = _t.getNextSibling(); break; } case NOTABSTOP: { AST tmp177_AST_in = (AST)_t; match(_t,NOTABSTOP); _t = _t.getNextSibling(); break; } case RETAIN: { AST __t846 = _t; AST tmp178_AST_in = (AST)_t; match(_t,RETAIN); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t846; _t = _t.getNextSibling(); break; } case ROW: { AST __t847 = _t; AST tmp179_AST_in = (AST)_t; match(_t,ROW); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t847; _t = _t.getNextSibling(); break; } case SCREENIO: { AST tmp180_AST_in = (AST)_t; match(_t,SCREENIO); _t = _t.getNextSibling(); break; } case STREAMIO: { AST tmp181_AST_in = (AST)_t; match(_t,STREAMIO); _t = _t.getNextSibling(); break; } case SCROLL: { AST __t848 = _t; AST tmp182_AST_in = (AST)_t; match(_t,SCROLL); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t848; _t = _t.getNextSibling(); break; } case SCROLLABLE: { AST tmp183_AST_in = (AST)_t; match(_t,SCROLLABLE); _t = _t.getNextSibling(); break; } case SIDELABELS: { AST tmp184_AST_in = (AST)_t; match(_t,SIDELABELS); _t = _t.getNextSibling(); break; } case STREAM: { stream_name(_t); _t = _retTree; break; } case THREED: { AST tmp185_AST_in = (AST)_t; match(_t,THREED); _t = _t.getNextSibling(); break; } case TOOLTIP: { tooltip_expr(_t); _t = _retTree; break; } case TOPONLY: { AST tmp186_AST_in = (AST)_t; match(_t,TOPONLY); _t = _t.getNextSibling(); break; } case USETEXT: { AST tmp187_AST_in = (AST)_t; match(_t,USETEXT); _t = _t.getNextSibling(); break; } case V6FRAME: { AST tmp188_AST_in = (AST)_t; match(_t,V6FRAME); _t = _t.getNextSibling(); break; } case USEREVVIDEO: { AST tmp189_AST_in = (AST)_t; match(_t,USEREVVIDEO); _t = _t.getNextSibling(); break; } case USEUNDERLINE: { AST tmp190_AST_in = (AST)_t; match(_t,USEUNDERLINE); _t = _t.getNextSibling(); break; } case VIEWAS: { AST __t849 = _t; AST tmp191_AST_in = (AST)_t; match(_t,VIEWAS); _t = _t.getFirstChild(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case DIALOGBOX: { AST __t851 = _t; AST tmp192_AST_in = (AST)_t; match(_t,DIALOGBOX); _t = _t.getFirstChild(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case DIALOGHELP: { AST tmp193_AST_in = (AST)_t; match(_t,DIALOGHELP); _t = _t.getNextSibling(); { if (_t==null) _t=ASTNULL; if ((_tokenSet_3.member(_t.getType()))) { expression(_t); _t = _retTree; } else if ((_t.getType()==3)) { } else { throw new NoViableAltException(_t); } } break; } case 3: { break; } default: { throw new NoViableAltException(_t); } } } _t = __t851; _t = _t.getNextSibling(); break; } case MESSAGELINE: { AST tmp194_AST_in = (AST)_t; match(_t,MESSAGELINE); _t = _t.getNextSibling(); break; } case STATUSBAR: { AST tmp195_AST_in = (AST)_t; match(_t,STATUSBAR); _t = _t.getNextSibling(); break; } case TOOLBAR: { AST __t854 = _t; AST tmp196_AST_in = (AST)_t; match(_t,TOOLBAR); _t = _t.getFirstChild(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case ATTACHMENT: { AST tmp197_AST_in = (AST)_t; match(_t,ATTACHMENT); _t = _t.getNextSibling(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case TOP: { AST tmp198_AST_in = (AST)_t; match(_t,TOP); _t = _t.getNextSibling(); break; } case BOTTOM: { AST tmp199_AST_in = (AST)_t; match(_t,BOTTOM); _t = _t.getNextSibling(); break; } case LEFT: { AST tmp200_AST_in = (AST)_t; match(_t,LEFT); _t = _t.getNextSibling(); break; } case RIGHT: { AST tmp201_AST_in = (AST)_t; match(_t,RIGHT); _t = _t.getNextSibling(); break; } default: { throw new NoViableAltException(_t); } } } break; } case 3: { break; } default: { throw new NoViableAltException(_t); } } } _t = __t854; _t = _t.getNextSibling(); break; } default: { throw new NoViableAltException(_t); } } } _t = __t849; _t = _t.getNextSibling(); break; } case WIDTH: { AST __t857 = _t; AST tmp202_AST_in = (AST)_t; match(_t,WIDTH); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t857; _t = _t.getNextSibling(); break; } case IN_KW: { AST __t858 = _t; AST tmp203_AST_in = (AST)_t; match(_t,IN_KW); _t = _t.getFirstChild(); AST tmp204_AST_in = (AST)_t; match(_t,WINDOW); _t = _t.getNextSibling(); expression(_t); _t = _retTree; _t = __t858; _t = _t.getNextSibling(); break; } case BGCOLOR: case COLOR: case DCOLOR: case FGCOLOR: case PFCOLOR: { colorspecification(_t); _t = _retTree; break; } case AT: { atphrase(_t); _t = _retTree; break; } case SIZE: case SIZECHARS: case SIZEPIXELS: { sizephrase(_t); _t = _retTree; break; } case TITLE: { titlephrase(_t); _t = _retTree; break; } case With_columns: { AST __t859 = _t; AST tmp205_AST_in = (AST)_t; match(_t,With_columns); _t = _t.getFirstChild(); expression(_t); _t = _retTree; AST tmp206_AST_in = (AST)_t; match(_t,COLUMNS); _t = _t.getNextSibling(); _t = __t859; _t = _t.getNextSibling(); break; } case With_down: { AST __t860 = _t; AST tmp207_AST_in = (AST)_t; match(_t,With_down); _t = _t.getFirstChild(); expression(_t); _t = _retTree; AST tmp208_AST_in = (AST)_t; match(_t,DOWN); _t = _t.getNextSibling(); _t = __t860; _t = _t.getNextSibling(); break; } case DOWN: { AST tmp209_AST_in = (AST)_t; match(_t,DOWN); _t = _t.getNextSibling(); break; } case WIDGETID: { widget_id(_t); _t = _retTree; break; } case WITH: { AST tmp210_AST_in = (AST)_t; match(_t,WITH); _t = _t.getNextSibling(); break; } default: { break _loop861; } } } while (true); } _t = __t832; _t = _t.getNextSibling(); _retTree = _t; } | 13952 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13952/daa15e07422d3491bbbb4d0060450c81983332a4/TreeParser01.java/buggy/trunk/org.prorefactor.core/src/org/prorefactor/treeparser01/TreeParser01.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
2623,
9429,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
2623,
9429,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
13,
692,
446,
294,
261,
9053... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
2623,
9429,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
2623,
9429,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
13,
692,
446,
294,
261,
9053... |
LOG.debug(" hiddenMode='"+hiddenMode+"'"); | protected void setProperties(UIComponent uiComponent) { if (LOG.isDebugEnabled()) { if (LineBreakComponent.COMPONENT_TYPE==getComponentType()) { LOG.debug("Component id='"+getId()+"' type='"+getComponentType()+"'."); } LOG.debug(" styleClass='"+styleClass+"'"); LOG.debug(" visible='"+visible+"'"); LOG.debug(" hiddenMode='"+hiddenMode+"'"); LOG.debug(" rendered='"+rendered+"'"); } super.setProperties(uiComponent); if ((uiComponent instanceof LineBreakComponent)==false) { throw new IllegalStateException("Component specified by tag is not instanceof of 'LineBreakComponent'."); } LineBreakComponent component = (LineBreakComponent) uiComponent; FacesContext facesContext = getFacesContext(); Application application = facesContext.getApplication(); if (styleClass != null) { if (isValueReference(styleClass)) { ValueBinding vb = application.createValueBinding(styleClass); component.setStyleClass(vb); } else { component.setStyleClass(styleClass); } } if (visible != null) { if (isValueReference(visible)) { ValueBinding vb = application.createValueBinding(visible); component.setVisible(vb); } else { component.setVisible(getBoolean(visible)); } } if (hiddenMode != null) { if (isValueReference(hiddenMode)) { ValueBinding vb = application.createValueBinding(hiddenMode); component.setHiddenMode(vb); } else { component.setHiddenMode(hiddenMode); } } if (rendered != null) { if (isValueReference(rendered)) { ValueBinding vb = application.createValueBinding(rendered); component.setVisible(vb); } else { component.setVisible(getBoolean(rendered)); } } } | 6232 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6232/1f1850be471d4b8bfd2f3c50aa61bc39bf91259a/LineBreakTag.java/clean/org.rcfaces.core/src/org/rcfaces/core/internal/taglib/LineBreakTag.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
23126,
12,
5370,
1841,
5915,
1841,
13,
288,
202,
202,
430,
261,
4842,
18,
291,
2829,
1526,
10756,
288,
1082,
202,
430,
261,
1670,
7634,
1841,
18,
22922,
67,
2399,
631,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
23126,
12,
5370,
1841,
5915,
1841,
13,
288,
202,
202,
430,
261,
4842,
18,
291,
2829,
1526,
10756,
288,
1082,
202,
430,
261,
1670,
7634,
1841,
18,
22922,
67,
2399,
631,
5... | |
throws JavaScriptException | public Object execMethod(int methodId, IdFunction function, Context cx, Scriptable scope, Scriptable thisObj, Object[] args) throws JavaScriptException { throw IdFunction.onBadMethodId(this, methodId); } | 12376 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12376/8f28fc868ac3f30ea37494abfddb6358154786c3/IdScriptable.java/clean/js/rhino/src/org/mozilla/javascript/IdScriptable.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
1196,
1305,
12,
474,
707,
548,
16,
3124,
2083,
445,
16,
11794,
1772,
9494,
16,
22780,
2146,
16,
11794,
22780,
15261,
16,
1033,
8526,
833,
13,
6647,
288,
3639,
604,
3124,
2083,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
1196,
1305,
12,
474,
707,
548,
16,
3124,
2083,
445,
16,
11794,
1772,
9494,
16,
22780,
2146,
16,
11794,
22780,
15261,
16,
1033,
8526,
833,
13,
6647,
288,
3639,
604,
3124,
2083,... | |
return null; | throw new InvocationException(TARGET_NO_LONGER_VALID); | protected Unit moveUnit (Unit unit, int x, int y, Piece target) { // compute the possible moves for this unit _moves.clear(); _bangobj.board.computeMoves(unit, _moves, null); // if we have not specified an exact move, locate one now if (x == Short.MAX_VALUE) { if (target == null) { // the target must no longer be around, so abandon ship return null; } Point spot = unit.computeShotLocation(target, _moves); if (spot == null) { log.info("Unable to find place from which to shoot. " + "[piece=" + unit.info() + ", target=" + target.info() + ", moves=" + _moves + "]."); return null; } x = spot.x; y = spot.y; // if we decided not to move, just pretend like we did the job if (x == unit.x && y == unit.y) { return unit; } } // make sure we are alive, and are ready to move int steps = Math.abs(unit.x-x) + Math.abs(unit.y-y); if (!unit.isAlive() || unit.ticksUntilMovable(_bangobj.tick) > 0) { log.warning("Unit requested illegal move [unit=" + unit + ", alive=" + unit.isAlive() + ", mticks=" + unit.ticksUntilMovable(_bangobj.tick) + "]."); return null; } // validate that the move is legal if (!_moves.contains(x, y)) { log.warning("Unit requested illegal move [unit=" + unit + ", x=" + x + ", y=" + y + ", moves=" + _moves + "]."); Piece[] pvec = _bangobj.getPieceArray(); for (int ii = 0; ii < pvec.length; ii++) { System.err.println(pvec[ii]); } _bangobj.board.dumpOccupiability(_moves); // reshadow all the pieces to try to correct the error _bangobj.board.shadowPieces(_bangobj.pieces.iterator()); log.warning("Reshadowed dump:"); _bangobj.board.dumpOccupiability(_moves); // now try the whole process again _moves.clear(); _bangobj.board.computeMoves(unit, _moves, null); if (!_moves.contains(x, y)) { log.warning("Move still illegal: "); _bangobj.board.dumpOccupiability(_moves); return null; } } // clone and move the unit Unit munit = (Unit)unit.clone(); munit.position(x, y); munit.lastActed = _bangobj.tick; // if they specified a target, make sure it is still valid if (target != null) { if (!munit.validTarget(target, false)) { log.info("Target no longer valid [shooter=" + munit.info() + ", target=" + target.info() + "]."); return null;// // target already dead or something// throw new InvocationException(TARGET_NO_LONGER_VALID); } if (!munit.targetInRange(target.x, target.y)) { log.info("Target no longer in range [shooter=" + munit.info() + ", target=" + target.info() + "]."); return null;// throw new InvocationException(TARGET_MOVED); } } // ensure that we don't land on any piece that prevents us from // overlapping ArrayList<Piece> lappers = _bangobj.getOverlappers(munit); if (lappers != null) { for (Piece lapper : lappers) { if (lapper.preventsOverlap(munit)) { return null; } } } // update our board shadow _bangobj.board.clearShadow(unit); _bangobj.board.shadowPiece(munit); // record the move to this player's statistics _bangobj.stats[munit.owner].incrementStat( Stat.Type.DISTANCE_MOVED, steps); // dispatch a move effect to actually move the unit MoveEffect meffect = new MoveEffect(); meffect.init(munit); meffect.nx = munit.x; meffect.ny = munit.y; deployEffect(munit.owner, meffect); // interact with any pieces occupying our target space if (lappers != null) { for (Piece lapper : lappers) { Effect effect = munit.maybeInteract(lapper); if (effect != null) { deployEffect(unit.owner, effect); // small hackery: note that this player collected a bonus if (lapper instanceof Bonus) { _bangobj.stats[munit.owner].incrementStat( Stat.Type.BONUSES_COLLECTED, 1); } } } } return munit; } | 8059 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8059/8861d8d9ac6d5d9e9be746bc3c5b07b696f233d5/BangManager.java/clean/src/java/com/threerings/bang/game/server/BangManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
8380,
3635,
2802,
261,
2802,
2836,
16,
509,
619,
16,
509,
677,
16,
453,
8414,
1018,
13,
565,
288,
3639,
368,
3671,
326,
3323,
13934,
364,
333,
2836,
3639,
389,
81,
10829,
18,
8507... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
8380,
3635,
2802,
261,
2802,
2836,
16,
509,
619,
16,
509,
677,
16,
453,
8414,
1018,
13,
565,
288,
3639,
368,
3671,
326,
3323,
13934,
364,
333,
2836,
3639,
389,
81,
10829,
18,
8507... |
_t = __t356; | _t = __t862; | public final Expression generalComp(AST _t, PathExpr path ) throws RecognitionException, PermissionDeniedException,EXistException,XPathException { Expression step; AST generalComp_AST_in = (AST)_t; step= null; PathExpr left= new PathExpr(context); PathExpr right= new PathExpr(context); if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case EQ: { AST __t354 = _t; AST tmp45_AST_in = (AST)_t; match(_t,EQ); _t = _t.getFirstChild(); step=expr(_t,left); _t = _retTree; step=expr(_t,right); _t = _retTree; step= new GeneralComparison(context, left, right, Constants.EQ); path.add(step); _t = __t354; _t = _t.getNextSibling(); break; } case NEQ: { AST __t355 = _t; AST tmp46_AST_in = (AST)_t; match(_t,NEQ); _t = _t.getFirstChild(); step=expr(_t,left); _t = _retTree; step=expr(_t,right); _t = _retTree; step= new GeneralComparison(context, left, right, Constants.NEQ); path.add(step); _t = __t355; _t = _t.getNextSibling(); break; } case LT: { AST __t356 = _t; AST tmp47_AST_in = (AST)_t; match(_t,LT); _t = _t.getFirstChild(); step=expr(_t,left); _t = _retTree; step=expr(_t,right); _t = _retTree; step= new GeneralComparison(context, left, right, Constants.LT); path.add(step); _t = __t356; _t = _t.getNextSibling(); break; } case LTEQ: { AST __t357 = _t; AST tmp48_AST_in = (AST)_t; match(_t,LTEQ); _t = _t.getFirstChild(); step=expr(_t,left); _t = _retTree; step=expr(_t,right); _t = _retTree; step= new GeneralComparison(context, left, right, Constants.LTEQ); path.add(step); _t = __t357; _t = _t.getNextSibling(); break; } case GT: { AST __t358 = _t; AST tmp49_AST_in = (AST)_t; match(_t,GT); _t = _t.getFirstChild(); step=expr(_t,left); _t = _retTree; step=expr(_t,right); _t = _retTree; step= new GeneralComparison(context, left, right, Constants.GT); path.add(step); _t = __t358; _t = _t.getNextSibling(); break; } case GTEQ: { AST __t359 = _t; AST tmp50_AST_in = (AST)_t; match(_t,GTEQ); _t = _t.getFirstChild(); step=expr(_t,left); _t = _retTree; step=expr(_t,right); _t = _retTree; step= new GeneralComparison(context, left, right, Constants.GTEQ); path.add(step); _t = __t359; _t = _t.getNextSibling(); break; } default: { throw new NoViableAltException(_t); } } _retTree = _t; return step; } | 2909 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2909/78bd70965f202738e2ca56dacfd71f5d58c0db69/XPathTreeParser2.java/clean/src/org/exist/parser/XPathTreeParser2.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
5371,
225,
7470,
2945,
12,
9053,
389,
88,
16,
202,
202,
743,
4742,
589,
202,
13,
1216,
9539,
16,
8509,
15877,
16,
2294,
376,
503,
16,
14124,
503,
288,
202,
202,
2300,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
5371,
225,
7470,
2945,
12,
9053,
389,
88,
16,
202,
202,
743,
4742,
589,
202,
13,
1216,
9539,
16,
8509,
15877,
16,
2294,
376,
503,
16,
14124,
503,
288,
202,
202,
2300,
2... |
public char peekChar(){ if(numChars() > 0){ return(characterBuffer[characterBufferHead]); | public double peekChar(){ if(bufferOverflowFlag) return(-1.0); else if(numCharsLocal() > 0){ return((double)characterBuffer[characterBufferTail]); | public char peekChar(){ if(numChars() > 0){ return(characterBuffer[characterBufferHead]); }else{ return(emptyChar); } } | 12211 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12211/9f6c9d532c0736a47678e9e76fd49874c6c9babd/GetCharJava.java/clean/trunk/Psychtoolbox/PsychJava/GetCharJava.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1149,
8032,
2156,
1435,
95,
202,
202,
430,
12,
2107,
7803,
1435,
405,
374,
15329,
1082,
202,
2463,
12,
11560,
1892,
63,
11560,
1892,
1414,
19226,
202,
202,
97,
12107,
95,
1082,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1149,
8032,
2156,
1435,
95,
202,
202,
430,
12,
2107,
7803,
1435,
405,
374,
15329,
1082,
202,
2463,
12,
11560,
1892,
63,
11560,
1892,
1414,
19226,
202,
202,
97,
12107,
95,
1082,
... |
"OID MUST have at least 2 subidentifiers"); | Messages.getString("security.99")); | public static int[] toIntArray(String str) { if (str == null) { throw new IllegalArgumentException( "ObjectIdentifier string is null"); } int length = str.length(); if (length == 0) { throw new IllegalArgumentException("Incorrect syntax"); } int count = 1; // number of subidentifiers boolean wasDot = true; // indicates whether char before was dot or not. char c; // current char for (int i = 0; i < length; i++) { c = str.charAt(i); if (c == '.') { if (wasDot) { throw new IllegalArgumentException("Incorrect syntax"); } wasDot = true; count++; } else if (c >= '0' && c <= '9') { wasDot = false; } else { throw new IllegalArgumentException("Incorrect syntax"); } } if (wasDot) { // the last char is dot throw new IllegalArgumentException("Incorrect syntax"); } if (count < 2) { throw new IllegalArgumentException( "OID MUST have at least 2 subidentifiers"); } int[] oid = new int[count]; for (int i = 0, j = 0; i < length; i++) { c = str.charAt(i); if (c == '.') { j++; } else { oid[j] = oid[j] * 10 + c - 48; // '0' = 48 } } if (oid[0] > 2) { throw new IllegalArgumentException( "Valid values for first subidentifier are 0, 1 and 2"); } else if (oid[0] != 2 && oid[1] > 39) { throw new IllegalArgumentException( "If the first subidentifier has 0 or 1 value the second " + "subidentifier value MUST be less then 40."); } return oid; } | 54769 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54769/c7fdc88348ff6da63262b6309c2810876f42c6d8/ObjectIdentifier.java/buggy/modules/security/src/main/java/common/org/apache/harmony/security/asn1/ObjectIdentifier.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
509,
8526,
20771,
1076,
12,
780,
609,
13,
288,
3639,
309,
261,
701,
422,
446,
13,
288,
5411,
604,
394,
2754,
12,
10792,
315,
921,
3004,
533,
353,
446,
8863,
3639,
289,
3639,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
509,
8526,
20771,
1076,
12,
780,
609,
13,
288,
3639,
309,
261,
701,
422,
446,
13,
288,
5411,
604,
394,
2754,
12,
10792,
315,
921,
3004,
533,
353,
446,
8863,
3639,
289,
3639,
... |
Context.reportWarning( Context.getMessage("msg.bad.octal.literal", errArgs), getSourceName(), in.getLineno(), getLine(), getOffset()); | reportSyntaxWarning("msg.bad.octal.literal", errArgs); | public int getToken() throws IOException { int c; tokenno++; // Check for pushed-back token if (this.pushbackToken != EOF) { int result = this.pushbackToken; this.pushbackToken = EOF; return result; } // Eat whitespace, possibly sensitive to newlines. do { c = in.read(); if (c == '\n') if ((flags & TSF_NEWLINES) != 0) break; } while (isJSSpace(c) || c == '\n'); if (c == EOF_CHAR) return EOF; // identifier/keyword/instanceof? // watch out for starting with a <backslash> boolean isUnicodeEscapeStart = false; if (c == '\\') { c = in.read(); if (c == 'u') isUnicodeEscapeStart = true; else c = '\\'; // always unread the 'u' or whatever, we need // to start the string below at the <backslash>. in.unread(); } if (isUnicodeEscapeStart || Character.isJavaIdentifierStart((char)c)) { in.startString(); boolean containsEscape = isUnicodeEscapeStart; do { c = in.read(); if (c == '\\') { c = in.read(); containsEscape = (c == 'u'); } } while (Character.isJavaIdentifierPart((char)c)); in.unread(); int result; String str = in.getString(); // OPT we shouldn't have to make a string (object!) to // check if it's a keyword. // strictly speaking we should probably push-back // all the bad characters if the <backslash>uXXXX // sequence is malformed. But since there isn't a // correct context(is there?) for a bad Unicode // escape sequence after an identifier, we can report // an error here. if (containsEscape) { char ca[] = str.toCharArray(); int L = str.length(); int destination = 0; for (int i = 0; i != L;) { c = ca[i]; ++i; if (c == '\\' && i != L && ca[i] == 'u') { boolean goodEscape = false; if (i + 4 < L) { int val = xDigitToInt(ca[i + 1]); if (val >= 0) { val = (val << 4) | xDigitToInt(ca[i + 2]); if (val >= 0) { val = (val << 4) | xDigitToInt(ca[i + 3]); if (val >= 0) { val = (val << 4) | xDigitToInt(ca[i + 4]); if (val >= 0) { c = (char)val; i += 5; goodEscape = true; } } } } } if (!goodEscape) { reportSyntaxError("msg.invalid.escape", null); return ERROR; } } ca[destination] = (char)c; ++destination; } str = new String(ca, 0, destination); } else // Return the corresponding token if it's a keyword if ((result = stringToKeyword(str)) != EOF) { return result; } this.string = str; return NAME; } // is it a number? if (isDigit(c) || (c == '.' && isDigit(in.peek()))) { int base = 10; in.startString(); if (c == '0') { c = in.read(); if (c == 'x' || c == 'X') { c = in.read(); base = 16; // restart the string, losing leading 0x in.startString(); } else if (isDigit(c)) { base = 8; } } while (0 <= xDigitToInt(c)) { if (base < 16) { if (isAlpha(c)) break; /* * We permit 08 and 09 as decimal numbers, which * makes our behavior a superset of the ECMA * numeric grammar. We might not always be so * permissive, so we warn about it. */ if (base == 8 && c >= '8') { Object[] errArgs = { c == '8' ? "8" : "9" }; Context.reportWarning( Context.getMessage("msg.bad.octal.literal", errArgs), getSourceName(), in.getLineno(), getLine(), getOffset()); base = 10; } } c = in.read(); } boolean isInteger = true; if (base == 10 && (c == '.' || c == 'e' || c == 'E')) { isInteger = false; if (c == '.') { do { c = in.read(); } while (isDigit(c)); } if (c == 'e' || c == 'E') { c = in.read(); if (c == '+' || c == '-') { c = in.read(); } if (!isDigit(c)) { in.getString(); // throw away string in progress reportSyntaxError("msg.missing.exponent", null); return ERROR; } do { c = in.read(); } while (isDigit(c)); } } in.unread(); String numString = in.getString(); double dval; if (base == 10 && !isInteger) { try { // Use Java conversion to number from string... dval = (Double.valueOf(numString)).doubleValue(); } catch (NumberFormatException ex) { Object[] errArgs = { ex.getMessage() }; reportSyntaxError("msg.caught.nfe", errArgs); return ERROR; } } else { dval = ScriptRuntime.stringToNumber(numString, 0, base); } this.number = dval; return NUMBER; } // is it a string? if (c == '"' || c == '\'') { // We attempt to accumulate a string the fast way, by // building it directly out of the reader. But if there // are any escaped characters in the string, we revert to // building it out of a StringBuffer. StringBuffer stringBuf = null; int quoteChar = c; int val = 0; c = in.read(); in.startString(); // start after the first " while(c != quoteChar) { if (c == '\n' || c == EOF_CHAR) { in.unread(); in.getString(); // throw away the string in progress reportSyntaxError("msg.unterminated.string.lit", null); return ERROR; } if (c == '\\') { // We've hit an escaped character; revert to the // slow method of building a string. if (stringBuf == null) { // Don't include the backslash in.unread(); stringBuf = new StringBuffer(in.getString()); in.read(); } switch (c = in.read()) { case 'b': c = '\b'; break; case 'f': c = '\f'; break; case 'n': c = '\n'; break; case 'r': c = '\r'; break; case 't': c = '\t'; break; case 'v': c = '\u000B'; break; // \v a late addition to the ECMA spec. // '\v' doesn't seem to be valid Java. default: if (isDigit(c) && c < '8') { val = c - '0'; c = in.read(); if (isDigit(c) && c < '8') { val = 8 * val + c - '0'; c = in.read(); if (isDigit(c) && c < '8') { val = 8 * val + c - '0'; c = in.read(); } } in.unread(); if (val > 0377) { reportSyntaxError("msg.oct.esc.too.large", null); return ERROR; } c = val; } else if (c == 'u') { /* * Get 4 hex digits; if the u escape is not * followed by 4 hex digits, use 'u' + the literal * character sequence that follows. Do some manual * match (OK because we're in a string) to avoid * multi-char match on the underlying stream. */ int c1 = in.read(); c = xDigitToInt(c1); if (c < 0) { in.unread(); c = 'u'; } else { int c2 = in.read(); c = (c << 4) | xDigitToInt(c2); if (c < 0) { in.unread(); stringBuf.append('u'); c = c1; } else { int c3 = in.read(); c = (c << 4) | xDigitToInt(c3); if (c < 0) { in.unread(); stringBuf.append('u'); stringBuf.append((char)c1); c = c2; } else { int c4 = in.read(); c = (c << 4) | xDigitToInt(c4); if (c < 0) { in.unread(); stringBuf.append('u'); stringBuf.append((char)c1); stringBuf.append((char)c2); c = c3; } else { // got 4 hex digits! Woo Hoo! } } } } } else if (c == 'x') { /* Get 2 hex digits, defaulting to 'x' + literal * sequence, as above. */ int c1 = in.read(); c = xDigitToInt(c1); if (c < 0) { in.unread(); c = 'x'; } else { int c2 = in.read(); c = (c << 4) | xDigitToInt(c2); if (c < 0) { in.unread(); stringBuf.append('x'); c = c1; } else { // got 2 hex digits } } } } } if (stringBuf != null) stringBuf.append((char) c); c = in.read(); } if (stringBuf != null) this.string = stringBuf.toString(); else { in.unread(); // miss the trailing " this.string = in.getString(); in.read(); } return STRING; } switch (c) { case '\n': return EOL; case ';': return SEMI; case '[': return LB; case ']': return RB; case '{': return LC; case '}': return RC; case '(': return LP; case ')': return RP; case ',': return COMMA; case '?': return HOOK; case ':': return COLON; case '.': return DOT; case '|': if (in.match('|')) { return OR; } else if (in.match('=')) { this.op = BITOR; return ASSIGN; } else { return BITOR; } case '^': if (in.match('=')) { this.op = BITXOR; return ASSIGN; } else { return BITXOR; } case '&': if (in.match('&')) { return AND; } else if (in.match('=')) { this.op = BITAND; return ASSIGN; } else { return BITAND; } case '=': if (in.match('=')) { if (in.match('=')) this.op = SHEQ; else this.op = EQ; return EQOP; } else { this.op = NOP; return ASSIGN; } case '!': if (in.match('=')) { if (in.match('=')) this.op = SHNE; else this.op = NE; return EQOP; } else { this.op = NOT; return UNARYOP; } case '<': /* NB:treat HTML begin-comment as comment-till-eol */ if (in.match('!')) { if (in.match('-')) { if (in.match('-')) { while ((c = in.read()) != EOF_CHAR && c != '\n') /* skip to end of line */; in.unread(); return getToken(); // in place of 'goto retry' } in.unread(); } in.unread(); } if (in.match('<')) { if (in.match('=')) { this.op = LSH; return ASSIGN; } else { this.op = LSH; return SHOP; } } else { if (in.match('=')) { this.op = LE; return RELOP; } else { this.op = LT; return RELOP; } } case '>': if (in.match('>')) { if (in.match('>')) { if (in.match('=')) { this.op = URSH; return ASSIGN; } else { this.op = URSH; return SHOP; } } else { if (in.match('=')) { this.op = RSH; return ASSIGN; } else { this.op = RSH; return SHOP; } } } else { if (in.match('=')) { this.op = GE; return RELOP; } else { this.op = GT; return RELOP; } } case '*': if (in.match('=')) { this.op = MUL; return ASSIGN; } else { return MUL; } case '/': // is it a // comment? if (in.match('/')) { while ((c = in.read()) != EOF_CHAR && c != '\n') /* skip to end of line */; in.unread(); return getToken(); } if (in.match('*')) { while ((c = in.read()) != -1 && !(c == '*' && in.match('/'))) { ; // empty loop body } if (c == EOF_CHAR) { reportSyntaxError("msg.unterminated.comment", null); return ERROR; } return getToken(); // `goto retry' } // is it a regexp? if ((flags & TSF_REGEXP) != 0) { // We don't try to use the in.startString/in.getString // approach, because escaped characters (which break it) // seem likely to be common. StringBuffer re = new StringBuffer(); while ((c = in.read()) != '/') { if (c == '\n' || c == EOF_CHAR) { in.unread(); reportSyntaxError("msg.unterminated.re.lit", null); return ERROR; } if (c == '\\') { re.append((char) c); c = in.read(); } re.append((char) c); } StringBuffer flagsBuf = new StringBuffer(); while (true) { if (in.match('g')) flagsBuf.append('g'); else if (in.match('i')) flagsBuf.append('i'); else if (in.match('m')) flagsBuf.append('m'); else break; } if (isAlpha(in.peek())) { reportSyntaxError("msg.invalid.re.flag", null); return ERROR; } this.string = re.toString(); this.regExpFlags = flagsBuf.toString(); return OBJECT; } if (in.match('=')) { this.op = DIV; return ASSIGN; } else { return DIV; } case '%': this.op = MOD; if (in.match('=')) { return ASSIGN; } else { return MOD; } case '~': this.op = BITNOT; return UNARYOP; case '+': case '-': if (in.match('=')) { if (c == '+') { this.op = ADD; return ASSIGN; } else { this.op = SUB; return ASSIGN; } } else if (in.match((char) c)) { if (c == '+') { return INC; } else { return DEC; } } else if (c == '-') { return SUB; } else { return ADD; } default: reportSyntaxError("msg.illegal.character", null); return ERROR; } } | 13991 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13991/b52f96cd91e9b993568b0e31af354a96b33649a8/TokenStream.java/buggy/js/rhino/src/org/mozilla/javascript/TokenStream.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
9162,
1435,
1216,
1860,
288,
3639,
509,
276,
31,
3639,
1147,
2135,
9904,
31,
3639,
368,
2073,
364,
18543,
17,
823,
1147,
3639,
309,
261,
2211,
18,
6206,
823,
1345,
480,
6431,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
9162,
1435,
1216,
1860,
288,
3639,
509,
276,
31,
3639,
1147,
2135,
9904,
31,
3639,
368,
2073,
364,
18543,
17,
823,
1147,
3639,
309,
261,
2211,
18,
6206,
823,
1345,
480,
6431,
... |
else typeNameIndex = traverseComplexTypeDecl(child); if (typeNameIndex != -1 ) { typeInfo = (ComplexTypeInfo) fComplexTypeRegistry.get(fStringPool.toString(typeNameIndex)); } | private QName traverseElementDecl(Element elementDecl) throws Exception { int contentSpecType = -1; int contentSpecNodeIndex = -1; int typeNameIndex = -1; int scopeDefined = -2; //signal a error if -2 gets gets through //cause scope can never be -2. DatatypeValidator dv = null; String name = elementDecl.getAttribute(SchemaSymbols.ATT_NAME); if ( DEBUGGING ) System.out.println("traversing element decl : " + name ); String ref = elementDecl.getAttribute(SchemaSymbols.ATT_REF); String type = elementDecl.getAttribute(SchemaSymbols.ATT_TYPE); String minOccurs = elementDecl.getAttribute(SchemaSymbols.ATT_MINOCCURS); String maxOccurs = elementDecl.getAttribute(SchemaSymbols.ATT_MAXOCCURS); String dflt = elementDecl.getAttribute(SchemaSymbols.ATT_DEFAULT); String fixed = elementDecl.getAttribute(SchemaSymbols.ATT_FIXED); if(!(dflt.equals("") || fixed.equals(""))) // REVISIT: localize reportGenericSchemaError("an element cannot have both \"fixed\" and \"default\" present at the same time"); String substitutionGroup = elementDecl.getAttribute(SchemaSymbols.ATT_SUBSTITUTIONGROUP); // form attribute String isQName = elementDecl.getAttribute(SchemaSymbols.ATT_FORM); String fromAnotherSchema = null; if (isTopLevel(elementDecl)) { if(name.equals("")) // REVISIT: localize reportGenericSchemaError("globally-declared element must have a name"); else if (!ref.equals("")) // REVISIT: localize reportGenericSchemaError("globally-declared element " + name + " cannot have a ref attribute"); int nameIndex = fStringPool.addSymbol(name); int eltKey = fSchemaGrammar.getElementDeclIndex(fTargetNSURI, nameIndex,TOP_LEVEL_SCOPE); if (eltKey > -1 ) { return new QName(-1,nameIndex,nameIndex,fTargetNSURI); } } // parse out 'block', 'final', 'nullable', 'abstract' int blockSet = parseBlockSet(elementDecl.getAttribute(SchemaSymbols.ATT_BLOCK)); int finalSet = parseFinalSet(elementDecl.getAttribute(SchemaSymbols.ATT_FINAL)); boolean isNullable = elementDecl.getAttribute (SchemaSymbols.ATT_NULLABLE).equals(SchemaSymbols.ATTVAL_TRUE)? true:false; boolean isAbstract = elementDecl.getAttribute (SchemaSymbols.ATT_ABSTRACT).equals(SchemaSymbols.ATTVAL_TRUE)? true:false; int elementMiscFlags = 0; if (isNullable) { elementMiscFlags += SchemaSymbols.NULLABLE; } if (isAbstract) { elementMiscFlags += SchemaSymbols.ABSTRACT; } //if this is a reference to a global element if (!ref.equals("")) { //REVISIT top level check for ref if (!type.equals("") || (elementMiscFlags > 0) || (finalSet > 0) || (blockSet > 0) || !dflt.equals("") || !fixed.equals("")) reportSchemaError(SchemaMessageProvider.BadAttWithRef, null); if (!name.equals("")) // REVISIT: Localize reportGenericSchemaError("element " + name + " cannot also have a ref attribute"); Element child = XUtil.getFirstChildElement(elementDecl); if(child != null && child.getLocalName().equals(SchemaSymbols.ELT_ANNOTATION)) { if (XUtil.getNextSiblingElement(child) != null) reportSchemaError(SchemaMessageProvider.NoContentForRef, null); else traverseAnnotationDecl(child); } else if (child != null) reportSchemaError(SchemaMessageProvider.NoContentForRef, null); String prefix = ""; String localpart = ref; int colonptr = ref.indexOf(":"); if ( colonptr > 0) { prefix = ref.substring(0,colonptr); localpart = ref.substring(colonptr+1); } int localpartIndex = fStringPool.addSymbol(localpart); String uriString = resolvePrefixToURI(prefix); QName eltName = new QName(prefix != null ? fStringPool.addSymbol(prefix) : -1, localpartIndex, fStringPool.addSymbol(ref), uriString != null ? fStringPool.addSymbol(uriString) : StringPool.EMPTY_STRING); //if from another schema, just return the element QName if (! uriString.equals(fTargetNSURIString) ) { return eltName; } int elementIndex = fSchemaGrammar.getElementDeclIndex(eltName, TOP_LEVEL_SCOPE); //if not found, traverse the top level element that if referenced if (elementIndex == -1 ) { Element targetElement = getTopLevelComponentByName(SchemaSymbols.ELT_ELEMENT,localpart); if (targetElement == null ) { // REVISIT: Localize reportGenericSchemaError("Element " + localpart + " not found in the Schema"); //REVISIT, for now, the QName anyway return eltName; //return new QName(-1,fStringPool.addSymbol(localpart), -1, fStringPool.addSymbol(uriString)); } else { // do nothing here, other wise would cause infinite loop for // <element name="recur"><complexType><element ref="recur"> ... //eltName= traverseElementDecl(targetElement); } } return eltName; } // Handle the substitutionGroup Element substitutionGroupElementDecl = null; int substitutionGroupElementDeclIndex = -1; boolean noErrorSoFar = true; String substitutionGroupUri = null; String substitutionGroupLocalpart = null; String substitutionGroupFullName = null; ComplexTypeInfo substitutionGroupEltTypeInfo = null; DatatypeValidator substitutionGroupEltDV = null; if ( substitutionGroup.length() > 0 ) { substitutionGroupUri = resolvePrefixToURI(getPrefix(substitutionGroup)); substitutionGroupLocalpart = getLocalPart(substitutionGroup); substitutionGroupFullName = substitutionGroupUri+","+substitutionGroupLocalpart; if ( !substitutionGroupUri.equals(fTargetNSURIString) ) { substitutionGroupEltTypeInfo = getElementDeclTypeInfoFromNS(substitutionGroupUri, substitutionGroupLocalpart); if (substitutionGroupEltTypeInfo == null) { substitutionGroupEltDV = getElementDeclTypeValidatorFromNS(substitutionGroupUri, substitutionGroupLocalpart); if (substitutionGroupEltDV == null) { //TO DO: report error here; noErrorSoFar = false; reportGenericSchemaError("Could not find type for element '" +substitutionGroupLocalpart + "' in schema '" + substitutionGroupUri+"'"); } } } else { substitutionGroupElementDecl = getTopLevelComponentByName(SchemaSymbols.ELT_ELEMENT, substitutionGroupLocalpart); if (substitutionGroupElementDecl == null) { substitutionGroupElementDeclIndex = fSchemaGrammar.getElementDeclIndex(fTargetNSURI, getLocalPartIndex(substitutionGroup),TOP_LEVEL_SCOPE); if ( substitutionGroupElementDeclIndex == -1) { noErrorSoFar = false; // REVISIT: Localize reportGenericSchemaError("substitutionGroup affiliation element " +substitutionGroup +" in element declaration " +name); } } else { substitutionGroupElementDeclIndex = fSchemaGrammar.getElementDeclIndex(fTargetNSURI, getLocalPartIndex(substitutionGroup),TOP_LEVEL_SCOPE); if ( substitutionGroupElementDeclIndex == -1) { traverseElementDecl(substitutionGroupElementDecl); substitutionGroupElementDeclIndex = fSchemaGrammar.getElementDeclIndex(fTargetNSURI, getLocalPartIndex(substitutionGroup),TOP_LEVEL_SCOPE); } } if (substitutionGroupElementDeclIndex != -1) { substitutionGroupEltTypeInfo = fSchemaGrammar.getElementComplexTypeInfo( substitutionGroupElementDeclIndex ); if (substitutionGroupEltTypeInfo == null) { fSchemaGrammar.getElementDecl(substitutionGroupElementDeclIndex, fTempElementDecl); substitutionGroupEltDV = fTempElementDecl.datatypeValidator; if (substitutionGroupEltDV == null) { //TO DO: report error here; noErrorSoFar = false; reportGenericSchemaError("Could not find type for element '" +substitutionGroupLocalpart + "' in schema '" + substitutionGroupUri+"'"); } } } } } // // resolving the type for this element right here // ComplexTypeInfo typeInfo = null; // element has a single child element, either a datatype or a type, null if primitive Element child = XUtil.getFirstChildElement(elementDecl); if(child != null && child.getLocalName().equals(SchemaSymbols.ELT_ANNOTATION)) { traverseAnnotationDecl(child); child = XUtil.getNextSiblingElement(child); } if(child != null && child.getLocalName().equals(SchemaSymbols.ELT_ANNOTATION)) // REVISIT: Localize reportGenericSchemaError("element declarations can contain at most one annotation Element Information Item"); boolean haveAnonType = false; // Handle Anonymous type if there is one if (child != null) { String childName = child.getLocalName(); if (childName.equals(SchemaSymbols.ELT_COMPLEXTYPE)) { if (child.getAttribute(SchemaSymbols.ATT_NAME).length() > 0) { noErrorSoFar = false; // REVISIT: Localize reportGenericSchemaError("anonymous complexType in element '" + name +"' has a name attribute"); } else typeNameIndex = traverseComplexTypeDecl(child); if (typeNameIndex != -1 ) { typeInfo = (ComplexTypeInfo) fComplexTypeRegistry.get(fStringPool.toString(typeNameIndex)); } else { noErrorSoFar = false; // REVISIT: Localize reportGenericSchemaError("traverse complexType error in element '" + name +"'"); } haveAnonType = true; child = XUtil.getNextSiblingElement(child); } else if (childName.equals(SchemaSymbols.ELT_SIMPLETYPE)) { // TO DO: the Default and fixed attribute handling should be here. if (child.getAttribute(SchemaSymbols.ATT_NAME).length() > 0) { noErrorSoFar = false; // REVISIT: Localize reportGenericSchemaError("anonymous simpleType in element '" + name +"' has a name attribute"); } else typeNameIndex = traverseSimpleTypeDecl(child); if (typeNameIndex != -1) { dv = fDatatypeRegistry.getDatatypeValidator(fStringPool.toString(typeNameIndex)); } else { noErrorSoFar = false; // REVISIT: Localize reportGenericSchemaError("traverse simpleType error in element '" + name +"'"); } contentSpecType = XMLElementDecl.TYPE_SIMPLE; haveAnonType = true; child = XUtil.getNextSiblingElement(child); } else if (type.equals("")) { // "ur-typed" leaf contentSpecType = XMLElementDecl.TYPE_ANY; //REVISIT: is this right? //contentSpecType = fStringPool.addSymbol("UR_TYPE"); // set occurrence count contentSpecNodeIndex = -1; } // see if there's something here; it had better be key, keyref or unique. if (child != null) childName = child.getLocalName(); while ((child != null) && ((childName.equals(SchemaSymbols.ELT_KEY)) || (childName.equals(SchemaSymbols.ELT_KEYREF)) || (childName.equals(SchemaSymbols.ELT_UNIQUE)))) { child = XUtil.getNextSiblingElement(child); if (child != null) { childName = child.getLocalName(); } } if (child != null) { // REVISIT: Localize noErrorSoFar = false; reportGenericSchemaError("only annotation, simpleType, complexType, key, keyref and unique Element Information Items are allowed in element declarations"); } } // handle type="" here if (haveAnonType && (type.length()>0)) { noErrorSoFar = false; // REVISIT: Localize reportGenericSchemaError( "Element '"+ name + "' have both a type attribute and a annoymous type child" ); } // type specified as an attribute and no child is type decl. else if (!type.equals("")) { if (substitutionGroupElementDecl != null) { checkSubstitutionGroupOK(elementDecl, substitutionGroupElementDecl); } String prefix = ""; String localpart = type; int colonptr = type.indexOf(":"); if ( colonptr > 0) { prefix = type.substring(0,colonptr); localpart = type.substring(colonptr+1); } String typeURI = resolvePrefixToURI(prefix); // check if the type is from the same Schema if ( !typeURI.equals(fTargetNSURIString) && !typeURI.equals(SchemaSymbols.URI_SCHEMAFORSCHEMA) && typeURI.length() != 0) { // REVISIT, only needed because of resolvePrifixToURI. fromAnotherSchema = typeURI; typeInfo = getTypeInfoFromNS(typeURI, localpart); if (typeInfo == null) { dv = getTypeValidatorFromNS(typeURI, localpart); if (dv == null) { //TO DO: report error here; noErrorSoFar = false; reportGenericSchemaError("Could not find type " +localpart + " in schema " + typeURI); } } } else { typeInfo = (ComplexTypeInfo) fComplexTypeRegistry.get(typeURI+","+localpart); if (typeInfo == null) { dv = getDatatypeValidator(typeURI, localpart); if (dv == null ) if (typeURI.equals(SchemaSymbols.URI_SCHEMAFORSCHEMA) && !fTargetNSURIString.equals(SchemaSymbols.URI_SCHEMAFORSCHEMA)) { noErrorSoFar = false; // REVISIT: Localize reportGenericSchemaError("type not found : " + typeURI+":"+localpart); } else { Element topleveltype = getTopLevelComponentByName(SchemaSymbols.ELT_COMPLEXTYPE,localpart); if (topleveltype != null) { if (fCurrentTypeNameStack.search((Object)localpart) > - 1) { //then we found a recursive element using complexType. // REVISIT: this will be broken when recursing happens between 2 schemas int uriInd = StringPool.EMPTY_STRING; if ( isQName.equals(SchemaSymbols.ATTVAL_QUALIFIED)|| fElementDefaultQualified) { uriInd = fTargetNSURI; } int nameIndex = fStringPool.addSymbol(name); QName tempQName = new QName(fCurrentScope, nameIndex, nameIndex, uriInd); fElementRecurseComplex.put(tempQName, localpart); return new QName(-1, nameIndex, nameIndex, uriInd); } else { typeNameIndex = traverseComplexTypeDecl( topleveltype ); typeInfo = (ComplexTypeInfo) fComplexTypeRegistry.get(fStringPool.toString(typeNameIndex)); } } else { topleveltype = getTopLevelComponentByName(SchemaSymbols.ELT_SIMPLETYPE, localpart); if (topleveltype != null) { typeNameIndex = traverseSimpleTypeDecl( topleveltype ); dv = getDatatypeValidator(typeURI, localpart); // TO DO: the Default and fixed attribute handling should be here. } else { noErrorSoFar = false; // REVISIT: Localize reportGenericSchemaError("type not found : " + typeURI+":"+localpart); } } } } } } else if (haveAnonType){ if (substitutionGroupElementDecl != null ) { checkSubstitutionGroupOK(elementDecl, substitutionGroupElementDecl); } } // this element is ur-type, check its substitutionGroup afficliation. else { // if there is substitutionGroup affiliation and not type defition found for this element, // then grab substitutionGroup affiliation's type and give it to this element if ( typeInfo == null && dv == null ) { typeInfo = substitutionGroupEltTypeInfo; dv = substitutionGroupEltDV; } } if (typeInfo == null && dv==null) { if (noErrorSoFar) { // Actually this Element's type definition is ur-type; contentSpecType = XMLElementDecl.TYPE_ANY; // REVISIT, need to wait till we have wildcards implementation. // ADD attribute wildcards here } else { noErrorSoFar = false; // REVISIT: Localize reportGenericSchemaError ("untyped element : " + name ); } } // if element belongs to a compelx type if (typeInfo!=null) { contentSpecNodeIndex = typeInfo.contentSpecHandle; contentSpecType = typeInfo.contentType; scopeDefined = typeInfo.scopeDefined; dv = typeInfo.datatypeValidator; } // if element belongs to a simple type if (dv!=null) { contentSpecType = XMLElementDecl.TYPE_SIMPLE; if (typeInfo == null) { fromAnotherSchema = null; // not to switch schema in this case } } // // Create element decl // int elementNameIndex = fStringPool.addSymbol(name); int localpartIndex = elementNameIndex; int uriIndex = StringPool.EMPTY_STRING; int enclosingScope = fCurrentScope; //refer to 4.3.2 in "XML Schema Part 1: Structures" if ( isTopLevel(elementDecl)) { uriIndex = fTargetNSURI; enclosingScope = TOP_LEVEL_SCOPE; } else if ( !isQName.equals(SchemaSymbols.ATTVAL_UNQUALIFIED) && (( isQName.equals(SchemaSymbols.ATTVAL_QUALIFIED)|| fElementDefaultQualified ))) { uriIndex = fTargetNSURI; } //There can never be two elements with the same name and different type in the same scope. int existSuchElementIndex = fSchemaGrammar.getElementDeclIndex(uriIndex, localpartIndex, enclosingScope); if ( existSuchElementIndex > -1) { fSchemaGrammar.getElementDecl(existSuchElementIndex, fTempElementDecl); DatatypeValidator edv = fTempElementDecl.datatypeValidator; ComplexTypeInfo eTypeInfo = fSchemaGrammar.getElementComplexTypeInfo(existSuchElementIndex); if ( ((eTypeInfo != null)&&(eTypeInfo!=typeInfo)) || ((edv != null)&&(edv != dv)) ) { noErrorSoFar = false; // REVISIT: Localize reportGenericSchemaError("duplicate element decl in the same scope : " + fStringPool.toString(localpartIndex)); } } QName eltQName = new QName(-1,localpartIndex,elementNameIndex,uriIndex); // add element decl to pool int attrListHead = -1 ; // copy up attribute decls from type object if (typeInfo != null) { attrListHead = typeInfo.attlistHead; } int elementIndex = fSchemaGrammar.addElementDecl(eltQName, enclosingScope, scopeDefined, contentSpecType, contentSpecNodeIndex, attrListHead, dv); if ( DEBUGGING ) { /***/ System.out.println("########elementIndex:"+elementIndex+" ("+fStringPool.toString(eltQName.uri)+"," + fStringPool.toString(eltQName.localpart) + ")"+ " eltType:"+type+" contentSpecType:"+contentSpecType+ " SpecNodeIndex:"+ contentSpecNodeIndex +" enclosingScope: " +enclosingScope + " scopeDefined: " +scopeDefined+"\n"); /***/ } fSchemaGrammar.setElementComplexTypeInfo(elementIndex, typeInfo); // REVISIT: should we report error if typeInfo was null? // mark element if its type belongs to different Schema. fSchemaGrammar.setElementFromAnotherSchemaURI(elementIndex, fromAnotherSchema); // set BlockSet, FinalSet, Nullable and Abstract for this element decl fSchemaGrammar.setElementDeclBlockSet(elementIndex, blockSet); fSchemaGrammar.setElementDeclFinalSet(elementIndex, finalSet); fSchemaGrammar.setElementDeclMiscFlags(elementIndex, elementMiscFlags); // setSubstitutionGroupElementFullName fSchemaGrammar.setElementDeclSubstitutionGroupElementFullName(elementIndex, substitutionGroupFullName); // // key/keyref/unique processing // Element ic = XUtil.getFirstChildElement(elementDecl, IDENTITY_CONSTRAINTS); if (ic != null) { Integer elementIndexObj = new Integer(elementIndex); Vector identityConstraints = (Vector)fIdentityConstraints.get(elementIndexObj); if (identityConstraints == null) { identityConstraints = new Vector(); fIdentityConstraints.put(elementIndexObj, identityConstraints); } while (ic != null) { if (DEBUG_IC_DATATYPES) { System.out.println("<ICD>: adding ic for later traversal: "+ic); } identityConstraints.addElement(ic); ic = XUtil.getNextSiblingElement(ic, IDENTITY_CONSTRAINTS); } } return eltQName; }// end of method traverseElementDecl(Element) | 6373 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6373/ecaa8044a2d518d7e1aecc2a359d853fd3d96173/TraverseSchema.java/buggy/src/org/apache/xerces/validators/schema/TraverseSchema.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
16723,
10080,
1046,
3456,
12,
1046,
930,
3456,
13,
1216,
1185,
288,
3639,
509,
29617,
559,
1377,
273,
300,
21,
31,
3639,
509,
29617,
907,
1016,
273,
300,
21,
31,
3639,
509,
8173,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
16723,
10080,
1046,
3456,
12,
1046,
930,
3456,
13,
1216,
1185,
288,
3639,
509,
29617,
559,
1377,
273,
300,
21,
31,
3639,
509,
29617,
907,
1016,
273,
300,
21,
31,
3639,
509,
8173,
... | |
return RubyString.newString(getRuntime(), symbol); | return getRuntime().newString(symbol); | public RubyString to_s() { return RubyString.newString(getRuntime(), symbol); } | 46770 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46770/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubySymbol.java/buggy/src/org/jruby/RubySymbol.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19817,
780,
358,
67,
87,
1435,
288,
3639,
327,
18814,
7675,
2704,
780,
12,
7175,
1769,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19817,
780,
358,
67,
87,
1435,
288,
3639,
327,
18814,
7675,
2704,
780,
12,
7175,
1769,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
loadService.addAutoload(symbol.asSymbol(), new IAutoloadMethod() { | final String baseName = symbol.asSymbol(); String nm = baseName; if(recv instanceof RubyModule) { nm = ((RubyModule)recv).getName() + "::" + nm; } loadService.addAutoload(nm, new IAutoloadMethod() { public String file() { return file.toString(); } | public static IRubyObject autoload(final IRubyObject recv, IRubyObject symbol, final IRubyObject file) { final LoadService loadService = recv.getRuntime().getLoadService(); loadService.addAutoload(symbol.asSymbol(), new IAutoloadMethod() { /** * @see org.jruby.runtime.load.IAutoloadMethod#load(IRuby, String) */ public IRubyObject load(IRuby runtime, String name) { loadService.require(file.toString()); return ((RubyModule)recv).getConstant(name); } }); return recv; } | 47619 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47619/3cd87a03d9ff599871bd14f49c218d1045bca20b/RubyKernel.java/buggy/src/org/jruby/RubyKernel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
15908,
10340,
921,
16674,
12,
6385,
15908,
10340,
921,
10665,
16,
15908,
10340,
921,
3273,
16,
727,
15908,
10340,
921,
585,
13,
288,
3639,
727,
4444,
1179,
1262,
1179,
273,
10665... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
15908,
10340,
921,
16674,
12,
6385,
15908,
10340,
921,
10665,
16,
15908,
10340,
921,
3273,
16,
727,
15908,
10340,
921,
585,
13,
288,
3639,
727,
4444,
1179,
1262,
1179,
273,
10665... |
assertEquals(new Integer(State.RUNNING.toInt()), mbServer.getAttribute(configName, "state")); | assertEquals(new Integer(State.RUNNING_INDEX), mbServer.getAttribute(configName, "state")); | public void testOnlineConfig() throws Exception { GBeanMBean config = new GBeanMBean(Configuration.GBEAN_INFO); config.setAttribute("ID", new URI("test")); config.setEndpointPatterns("Parent", null); config.setAttribute("ClassPath", Collections.EMPTY_LIST); config.setAttribute("GBeanState", state); ObjectName configName = (ObjectName) mbServer.invoke(Kernel.KERNEL, "load", new Object[]{config, null}, new String[]{GBeanMBean.class.getName(), URL.class.getName()}); mbServer.invoke(configName, "startRecursive", null, null); assertEquals(new Integer(State.RUNNING.toInt()), mbServer.getAttribute(configName, "state")); assertNotNull(mbServer.getAttribute(configName, "ClassLoader")); assertEquals(new Integer(State.RUNNING.toInt()), mbServer.getAttribute(gbeanName1, "state")); assertEquals("1234", mbServer.getAttribute(gbeanName1, "Value")); assertEquals("no endpoint", mbServer.invoke(gbeanName1, "checkEndpoint", null, null)); //assertEquals("endpointCheck", mbServer.invoke(gbeanName2, "checkEndpoint", null, null)); mbServer.invoke(configName, "stop", null, null); try { mbServer.getAttribute(gbeanName1, "Value"); fail(); } catch (InstanceNotFoundException e) { // ok } assertEquals(new Integer(State.STOPPED.toInt()), mbServer.getAttribute(configName, "state")); mbServer.invoke(Kernel.KERNEL, "unload", new Object[]{configName}, new String[]{ObjectName.class.getName()}); assertFalse(mbServer.isRegistered(configName)); } | 12474 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12474/9661999f1e8fc5027062189f0d40fe70d74c4d29/ConfigTest.java/clean/modules/kernel/src/test/org/apache/geronimo/kernel/ConfigTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
16860,
809,
1435,
1216,
1185,
288,
3639,
611,
3381,
18089,
642,
273,
394,
611,
3381,
18089,
12,
1750,
18,
5887,
41,
1258,
67,
5923,
1769,
3639,
642,
18,
542,
1499,
2932,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
16860,
809,
1435,
1216,
1185,
288,
3639,
611,
3381,
18089,
642,
273,
394,
611,
3381,
18089,
12,
1750,
18,
5887,
41,
1258,
67,
5923,
1769,
3639,
642,
18,
542,
1499,
2932,
... |
"Failed to render " + handle.getExtensionName( ) + ( elementName != null ? " " + elementName : "" ), ex ) ); | MessageConstants.EXTENDED_ITEM_RENDERING_ERROR, new String[]{handle.getExtensionName( ), ( name != null ? " " + name : "" )}, ex ) ); | public void execute( ReportItemDesign item1, IReportEmitter emitter ) { assert item1 instanceof ExtendedItemDesign; ExtendedItemDesign item = (ExtendedItemDesign) item1; IExtendedItemContent content = ContentFactory .createExtendedItemContent( (ExtendedItemDesign) item , context.getContentObject( )); // handle common properties, such as // //1) style (Not supported now as we only support image extension) //2) highlight (Not supported now as we only support image extension) //3) x,y //4) actions // // other report item-supported features. //create user-defined generation-time helper object ExtendedItemHandle handle = (ExtendedItemHandle) item.getHandle( ); String tagName = handle.getExtensionName( ); IReportItemGeneration itemGeneration = ExtensionManager.getInstance( ) .createGenerationItem( tagName ); byte[] generationStatus = null; if ( itemGeneration != null ) { itemGeneration.setModelObject( handle ); itemGeneration.setReportQueries(((ExtendedItemDesign)item).getQueries()); IRowSet[] rowSets = null; try { rowSets = executeQueries( item ); if ( rowSets != null ) { try { itemGeneration.onRowSets( rowSets ); } catch ( BirtException ex ) { logger.log( Level.SEVERE, ex.getMessage( ), ex ); context.addException( new EngineException( "Failed to render " + handle.getExtensionName( ) + ( item.getName( ) != null ? " " + item.getName( ) : "" ), ex ) );//$NON-NLS-1$ } } if ( itemGeneration.needSerialization( ) ) { try { ByteArrayOutputStream out = new ByteArrayOutputStream( ); itemGeneration.serialize( out ); generationStatus = out.toByteArray( ); } catch ( BirtException ex ) { logger.log( Level.SEVERE, ex.getMessage( ), ex ); context.addException( new EngineException( "Failed to render " + handle.getExtensionName( ) + ( item.getName( ) != null ? " " + item.getName( ) : "" ), ex ) );//$NON-NLS-1$ } itemGeneration.finish( ); } } catch ( Throwable t ) { logger.log( Level.SEVERE, "Error:", t );//$NON-NLS-1$ context.addException( new EngineException( "Failed to render " + handle.getExtensionName( ) + ( item.getName( ) != null ? " " + item.getName( ) : "" ), t ) );//$NON-NLS-1$ } finally { closeQueries( rowSets ); } } //call the presentation peer to create the content object IReportItemPresentation itemPresentation = ExtensionManager .getInstance( ).createPresentationItem( tagName ); if ( itemPresentation != null ) { itemPresentation.setModelObject( handle ); itemPresentation.setReportQueries(((ExtendedItemDesign)item).getQueries()); //itemPresentation.setResolution(); itemPresentation.setLocale(context.getLocale()); itemPresentation.setSupportedImageFormats( "GIF;PNG;JPG;BMP" ); itemPresentation.setOutputFormat( emitter.getOutputFormat( ) ); if ( generationStatus != null ) { itemPresentation.deserialize( new ByteArrayInputStream( generationStatus ) ); } Object output = null; IRowSet[] rowSets = null; try { rowSets = executeQueries( item ); if ( rowSets != null ) { try { output = itemPresentation.onRowSets( rowSets ); } catch ( BirtException ex ) { logger.log( Level.SEVERE, ex.getMessage( ), ex ); String elementName = handle.getName( ); context.addException( new EngineException( "Failed to render " + handle.getExtensionName( ) + ( elementName != null ? " " + elementName : "" ), ex ) );//$NON-NLS-1$ } } if ( output != null ) { int type = itemPresentation.getOutputType( ); handleItemContent( item, emitter, content, type, output ); } itemPresentation.finish( ); } catch ( Throwable t ) { logger.log( Level.SEVERE, "Error:", t );//$NON-NLS-1$ context.addException( new EngineException( "Failed to render " + handle.getExtensionName( ) + ( item.getName( ) != null ? " " + item.getName( ) : "" ), t ) );//$NON-NLS-1$ } finally { closeQueries( rowSets ); } } } | 5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/8014737602f11534e33f244d143a691a3608218e/ExtendedItemExecutor.java/buggy/engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/executor/ExtendedItemExecutor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1836,
12,
8706,
1180,
15478,
761,
21,
16,
467,
4820,
13476,
11520,
262,
202,
95,
202,
202,
11231,
761,
21,
1276,
14094,
1180,
15478,
31,
202,
202,
11456,
1180,
15478,
761,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1836,
12,
8706,
1180,
15478,
761,
21,
16,
467,
4820,
13476,
11520,
262,
202,
95,
202,
202,
11231,
761,
21,
1276,
14094,
1180,
15478,
31,
202,
202,
11456,
1180,
15478,
761,
... |
{ "archived_datetime", makeSqlStringFromDate(document.getArchivedDatetime())}, | { "archived_datetime", Utility.makeSqlStringFromDate(document.getArchivedDatetime())}, | private int sqlInsertIntoMeta(DocumentDomainObject document) { final Number documentId = (Number) database.executeCommand(new InsertIntoTableDatabaseCommand("meta", new String[][]{ { "doc_type", document.getDocumentTypeId() + ""}, { "meta_headline", document.getHeadline()}, { "meta_text", document.getMenuText()}, { "meta_image", document.getMenuImage()}, { "owner_id", document.getCreator().getId() + ""}, { "permissions", makeSqlStringFromBoolean(document.isRestrictedOneMorePrivilegedThanRestrictedTwo())}, { "shared", makeSqlStringFromBoolean(document.isLinkableByOtherUsers())}, { "show_meta", makeSqlStringFromBoolean(document.isVisibleInMenusForUnauthorizedUsers())}, { "lang_prefix", document.getLanguageIso639_2()}, { "date_created", makeSqlStringFromDate(document.getCreatedDatetime()) }, { "date_modified", makeSqlStringFromDate(document.getModifiedDatetime())}, { "disable_search", makeSqlStringFromBoolean(document.isSearchDisabled())}, { "target", document.getTarget()}, { "activate", "1"}, { "archived_datetime", makeSqlStringFromDate(document.getArchivedDatetime())}, { "publisher_id", null != document.getPublisher() ? document.getPublisher().getId() + "" : null}, { "status", "" + document.getStatus()}, { "publication_start_datetime", makeSqlStringFromDate(document.getPublicationStartDatetime())}, { "publication_end_datetime", makeSqlStringFromDate(document.getPublicationEndDatetime())} })); return documentId.intValue(); } | 8781 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8781/e81260ba4ea5006ddc86c24938cbb4a791b0cc3b/DocumentMapper.java/clean/server/src/imcode/server/document/DocumentMapper.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
509,
1847,
4600,
5952,
2781,
12,
2519,
3748,
921,
1668,
13,
288,
3639,
727,
3588,
28573,
273,
261,
1854,
13,
2063,
18,
8837,
2189,
12,
2704,
8040,
5952,
1388,
4254,
2189,
2932,
3901... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
509,
1847,
4600,
5952,
2781,
12,
2519,
3748,
921,
1668,
13,
288,
3639,
727,
3588,
28573,
273,
261,
1854,
13,
2063,
18,
8837,
2189,
12,
2704,
8040,
5952,
1388,
4254,
2189,
2932,
3901... |
return null; | long Whole = (long)f; f -= Whole; long Num = Math.round(f * units); return new StringBuffer().append(Whole).append(" ").append(Num).append("/").append(units).toString(); | private String formatUnit(double f, int units) { //JMH TBD return null; } | 509 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/509/3c8d54e6ffd9607b81c1f5580f00f4d69994af5a/SVFractionalFormat.java/clean/src/contrib/src/org/apache/poi/hssf/contrib/view/SVFractionalFormat.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
514,
740,
2802,
12,
9056,
284,
16,
509,
4971,
13,
288,
565,
368,
46,
49,
44,
399,
18096,
282,
1525,
3497,
790,
273,
261,
5748,
13,
74,
31,
284,
3947,
3497,
790,
31,
1525,
6805,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
514,
740,
2802,
12,
9056,
284,
16,
509,
4971,
13,
288,
565,
368,
46,
49,
44,
399,
18096,
282,
1525,
3497,
790,
273,
261,
5748,
13,
74,
31,
284,
3947,
3497,
790,
31,
1525,
6805,
... |
void addLayoutComponent(Component component, Object contraint); | void addLayoutComponent(Component component, Object contraints); | void addLayoutComponent(Component component, Object contraint); | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ac6303b96cdaf2d4230daf25a90dd00cc4cb192d/LayoutManager2.java/buggy/core/src/classpath/java/java/awt/LayoutManager2.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
918,
527,
3744,
1841,
12,
1841,
1794,
16,
1033,
16252,
1598,
1769,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
918,
527,
3744,
1841,
12,
1841,
1794,
16,
1033,
16252,
1598,
1769,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
public void arrayInitializer() throws RecognitionException { try { // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/java.g:260:17: ( LCURLY ( initializer ( COMMA initializer )* ( COMMA )? )? RCURLY ) // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/java.g:260:17: LCURLY ( initializer ( COMMA initializer )* ( COMMA )? )? RCURLY { match(input,LCURLY,FOLLOW_LCURLY_in_arrayInitializer947); // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/java.g:261:25: ( initializer ( COMMA initializer )* ( COMMA )? )? int alt28=2; int LA28_0 = input.LA(1); if ( LA28_0==IDENT||LA28_0==LCURLY||LA28_0==LPAREN||(LA28_0>=PLUS && LA28_0<=MINUS)||(LA28_0>=INC && LA28_0<=NUM_FLOAT)||(LA28_0>=68 && LA28_0<=76)||(LA28_0>=93 && LA28_0<=94)||(LA28_0>=112 && LA28_0<=115) ) { alt28=1; } else if ( LA28_0==RCURLY ) { alt28=2; } else { NoViableAltException nvae = new NoViableAltException("261:25: ( initializer ( COMMA initializer )* ( COMMA )? )?", 28, 0, input); throw nvae; } switch (alt28) { case 1 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/java.g:261:33: initializer ( COMMA initializer )* ( COMMA )? { following.push(FOLLOW_initializer_in_arrayInitializer955); initializer(); following.pop(); // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/java.g:262:33: ( COMMA initializer )* loop26: do { int alt26=2; int LA26_0 = input.LA(1); if ( LA26_0==COMMA ) { int LA26_1 = input.LA(2); if ( LA26_1==IDENT||LA26_1==LCURLY||LA26_1==LPAREN||(LA26_1>=PLUS && LA26_1<=MINUS)||(LA26_1>=INC && LA26_1<=NUM_FLOAT)||(LA26_1>=68 && LA26_1<=76)||(LA26_1>=93 && LA26_1<=94)||(LA26_1>=112 && LA26_1<=115) ) { alt26=1; } } switch (alt26) { case 1 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/java.g:267:41: COMMA initializer { match(input,COMMA,FOLLOW_COMMA_in_arrayInitializer992); following.push(FOLLOW_initializer_in_arrayInitializer994); initializer(); following.pop(); } break; default : break loop26; } } while (true); // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/java.g:269:33: ( COMMA )? int alt27=2; int LA27_0 = input.LA(1); if ( LA27_0==COMMA ) { alt27=1; } else if ( LA27_0==RCURLY ) { alt27=2; } else { NoViableAltException nvae = new NoViableAltException("269:33: ( COMMA )?", 27, 0, input); throw nvae; } switch (alt27) { case 1 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/java.g:269:34: COMMA { match(input,COMMA,FOLLOW_COMMA_in_arrayInitializer1008); } break; } } break; } match(input,RCURLY,FOLLOW_RCURLY_in_arrayInitializer1020); } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { } } | 5490 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5490/024138fd0e08f5f4cd91a30959fe962d30fec435/JavaParser.java/buggy/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
918,
526,
14729,
1435,
1216,
9539,
288,
775,
288,
759,
342,
6588,
19,
70,
947,
19,
12922,
19,
14915,
19,
10649,
8464,
7482,
19,
12215,
17,
9576,
19,
4816,
19,
5254,
19,
6290,
19,
3341,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
918,
526,
14729,
1435,
1216,
9539,
288,
775,
288,
759,
342,
6588,
19,
70,
947,
19,
12922,
19,
14915,
19,
10649,
8464,
7482,
19,
12215,
17,
9576,
19,
4816,
19,
5254,
19,
6290,
19,
3341,... | ||
log.debug(response.getText()); | if (log.isDebugEnabled()) { log.debug(response.getText()); } | public void doTest(String jspName) throws Exception { WebRequest request = new GetMethodWebRequest(jspName); WebResponse response = runner.getResponse(request); log.debug(response.getText()); WebTable[] tables = response.getTables(); assertEquals("Expected one table", 1, tables.length); WebTable table = tables[0]; for (int j = 1; j < 4; j++) { TableCell cell = table.getTableCell(j, 0); String cssClass = cell.getClassName(); String expected = cell.asText().substring("should be ".length()); assertEquals("Wrong css class", expected, cssClass); } } | 7284 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7284/3b50c79e3280d9a33c9a06029bc6d0021644bdb0/ColumnPooling2Test.java/buggy/displaytag/src/test/java/org/displaytag/tags/ColumnPooling2Test.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
741,
4709,
12,
780,
22535,
461,
13,
1216,
1185,
565,
288,
3639,
2999,
691,
590,
273,
394,
968,
1305,
4079,
691,
12,
24926,
461,
1769,
3639,
2999,
1064,
766,
273,
8419,
18,
58... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
741,
4709,
12,
780,
22535,
461,
13,
1216,
1185,
565,
288,
3639,
2999,
691,
590,
273,
394,
968,
1305,
4079,
691,
12,
24926,
461,
1769,
3639,
2999,
1064,
766,
273,
8419,
18,
58... |
checkStarted(); jvmProcess.setJavaPath(javaPath); } | checkStarted(); jvmProcess.setJavaPath(javaPath); } | public void setJavaPath(String javaPath) { checkStarted(); jvmProcess.setJavaPath(javaPath); } | 23362 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/23362/72186abc6d443a4d713da92efc5079c9b125d539/SSHJVMProcess.java/clean/src/org/objectweb/proactive/core/process/ssh/SSHJVMProcess.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
444,
5852,
743,
12,
780,
2252,
743,
13,
288,
565,
866,
9217,
5621,
565,
13555,
2227,
18,
542,
5852,
743,
12,
6290,
743,
1769,
225,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
444,
5852,
743,
12,
780,
2252,
743,
13,
288,
565,
866,
9217,
5621,
565,
13555,
2227,
18,
542,
5852,
743,
12,
6290,
743,
1769,
225,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,... |
FunctionNode funcNode = (FunctionNode)i.next(); | AbstractNode funcNode = (AbstractNode)i.next(); | public static ArrayList findDefinition(AbstractNode node) { ArrayList retVal = new ArrayList(); // simple function calls // ex: simpleCall() if (node instanceof LocalNode && node.getParent() instanceof FunctionCallNode) { ArrayList funcCalls = node.getScope().findFunctionCalls(node.getName(), true, new Comparator() { public int compare(Object token, Object funcCall) { return ((String)token).compareTo(((AbstractNode)funcCall).getName()); } }); for (Iterator i = funcCalls.iterator(); i.hasNext();) { FunctionNode funcNode = (FunctionNode)i.next(); retVal.add(new ItemPointer(funcNode.getPath(), funcNode.getStart(), funcNode.getEnd())); } } else if (node instanceof ImportAlias || node instanceof ImportFromNode) { // imports: // import sys File myImport = node.getScope().findImport(node.getName(), node.getPath()); if (myImport != null) retVal.add(new ItemPointer(myImport)); } else if (node instanceof AttributeNode && node.parent instanceof FunctionCallNode && ((AttributeNode)node).astNode.value instanceof Name && ((Name)((AttributeNode)node).astNode.value).id.equals("self")) { // self. method calls // method calls. ex: self.break_here() // Find the function calls in the containing class that Scope s = node.getScope(); s = s.findContainingClass(); if (s != null) { ArrayList funcCalls = s.findFunctionCalls( node.getName(), false, new Comparator() { public int compare(Object token, Object funcCall) { return ((String)token).compareTo(((AbstractNode)funcCall).getName()); }} ); for (Iterator i = funcCalls.iterator(); i.hasNext();) { FunctionNode funcNode = (FunctionNode)i.next(); retVal.add(new ItemPointer(funcNode.getPath(), funcNode.getStart(), funcNode.getEnd())); } } } return retVal; } | 1319 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1319/2e0750ff13782bb25064881debe65f22d8f24e7b/ModelUtils.java/clean/org.python.pydev/src/org/python/pydev/editor/model/ModelUtils.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
2407,
1104,
1852,
12,
7469,
907,
756,
13,
288,
202,
202,
19558,
12197,
273,
394,
2407,
5621,
202,
202,
759,
4143,
445,
4097,
202,
202,
759,
431,
30,
4143,
1477,
1435,
202... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
2407,
1104,
1852,
12,
7469,
907,
756,
13,
288,
202,
202,
19558,
12197,
273,
394,
2407,
5621,
202,
202,
759,
4143,
445,
4097,
202,
202,
759,
431,
30,
4143,
1477,
1435,
202... |
public void removeListChangeListener(IListChangeListener listener) { | public synchronized void removeListChangeListener(IListChangeListener listener) { | public void removeListChangeListener(IListChangeListener listener) { if (listChangeListeners == listener) { listChangeListeners = null; if (!hasListeners()) { lastListenerRemoved(); } return; } if (listChangeListeners instanceof Collection) { Collection listenerList = (Collection) listChangeListeners; listenerList.remove(listener); if (listenerList.isEmpty()) { listChangeListeners = null; if (!hasListeners()) { lastListenerRemoved(); } } } } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/0298daabed6d67e379534d8bd3819a0404d2c05e/AbstractObservableList.java/buggy/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/list/AbstractObservableList.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1206,
682,
15744,
12,
45,
682,
15744,
2991,
13,
288,
202,
202,
430,
261,
1098,
3043,
5583,
422,
2991,
13,
288,
1082,
202,
1098,
3043,
5583,
273,
446,
31,
1082,
202,
430,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1206,
682,
15744,
12,
45,
682,
15744,
2991,
13,
288,
202,
202,
430,
261,
1098,
3043,
5583,
422,
2991,
13,
288,
1082,
202,
1098,
3043,
5583,
273,
446,
31,
1082,
202,
430,
... |
'(' + expectedType.getPresentableText() + ')' + | '(' + expectedType.getCanonicalText() + ')' + | public void doFix(Project project, ProblemDescriptor descriptor) throws IncorrectOperationException{ final PsiElement castTypeElement = descriptor.getPsiElement(); final PsiTypeCastExpression expression = (PsiTypeCastExpression) castTypeElement.getParent(); final PsiType expectedType = ExpectedTypeUtils.findExpectedType(expression, true); assert expression != null; final PsiExpression operand = expression.getOperand(); final String newExpression = '(' + expectedType.getPresentableText() + ')' + operand.getText(); replaceExpression(expression, newExpression); } | 12814 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12814/3593dca87364a6464decf9eae86cc1bdf65d7505/OverlyStrongTypeCastInspection.java/buggy/plugins/InspectionGadgets/src/com/siyeh/ig/abstraction/OverlyStrongTypeCastInspection.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
741,
8585,
12,
4109,
1984,
16,
21685,
3187,
4950,
13,
28524,
540,
1216,
657,
6746,
10602,
95,
5411,
727,
453,
7722,
1046,
4812,
559,
1046,
273,
4950,
18,
588,
52,
7722,
1046,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
741,
8585,
12,
4109,
1984,
16,
21685,
3187,
4950,
13,
28524,
540,
1216,
657,
6746,
10602,
95,
5411,
727,
453,
7722,
1046,
4812,
559,
1046,
273,
4950,
18,
588,
52,
7722,
1046,
... |
spice.logger.finest("adding new local DAS source"); | logger.finest("adding new local DAS source"); | public void saveConfiguration() { //System.out.println("saving config"); int pos = tabbedPane.getSelectedIndex(); //System.out.println("active tab: " + pos); // save overall registry if ( pos == 0 ) { registryIO.saveConfiguration(); } // add a new local DAS source ... else if ( pos == 1 ) { //System.out.println("adding new local DAS source"); spice.logger.finest("adding new local DAS source"); HashMap formdata = new HashMap(); int formPos = -1 ; for ( int i = 0 ; i < colNames.length; i++) { String col = colNames[i]; if ( col.equals("public") || col.equals("active")) continue ; formPos++ ; Object o = entryFormFields.get(formPos); if ( o instanceof JTextField ) { //JTextField txt = (JTextField)entryFormFields.get(i); JTextField txt = (JTextField)o; String data = txt.getText(); //System.out.println(col + " " + data); formdata.put(col,data); } else if ( o instanceof JList ) { JList l = (JList) o ; Object[] obj = l.getSelectedValues(); String[] data = new String[obj.length]; System.arraycopy(obj,0,(Object[])data,0,obj.length); formdata.put(col,data); } else if ( o instanceof JComboBox) { JComboBox j = (JComboBox) o ; String[] data = new String[1]; data[0] = (String)j.getSelectedItem(); formdata.put(col,data); } } SpiceDasSource sds = new SpiceDasSource(); sds.setRegistered(false); sds.setUrl( (String) formdata.get("url")); sds.setAdminemail( (String) formdata.get("adminemail")); sds.setDescription( (String) formdata.get("description")); String [] coordSys = (String[]) formdata.get("coordinateSystems"); sds.setCoordinateSystem(coordSys); String[] capabs = (String[]) formdata.get("capabilities") ; //String[] split = capabs.split(" "); sds.setCapabilities(capabs); config.addServer(sds,true); updateDasSourceTable() ; //registryIO.saveConfiguration(); } // get PDB files from locally else if ( pos == 2 ) { String e = fileExtensions.getText() ; String[] exts = e.split(" "); config.setPDBFileExtensions(exts); // add a new "pseudo" DAS source SpiceDasSource sds = new SpiceDasSource(); sds.setRegistered(false); sds.setUrl("file://"+pdbDirectory.getText()); sds.setAdminemail("unknown@localhost.org"); sds.setDescription("Access PDB files from local installation. If file not found, retreive from public DAS server"); String[] coordSys = new String[] { "PDBresnum", }; String[] capabs = new String[] { "structure", }; sds.setCoordinateSystem(coordSys); sds.setCapabilities(capabs); config.addServer(sds,true); updateDasSourceTable(); } else if ( pos == 3 ) { String behave = (String)updateBehaveList.getSelectedItem(); //System.out.println("setting update behaviour to " + behave); spice.logger.finest("setting update behaviour to " + behave); if ( behave.equals("once per day")) behave = "day" ; config.setUpdateBehave(behave); updateDasSourceTable(); } } | 52521 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52521/98c5846e9c5805f22f1423fe7fc8a4dfc5e4e37f/RegistryConfigIO.java/clean/src/org/biojava/spice/Config/RegistryConfigIO.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1923,
1750,
1435,
288,
202,
759,
3163,
18,
659,
18,
8222,
2932,
87,
5339,
642,
8863,
202,
474,
949,
273,
3246,
2992,
8485,
18,
588,
7416,
1016,
5621,
202,
759,
3163,
18,
659,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1923,
1750,
1435,
288,
202,
759,
3163,
18,
659,
18,
8222,
2932,
87,
5339,
642,
8863,
202,
474,
949,
273,
3246,
2992,
8485,
18,
588,
7416,
1016,
5621,
202,
759,
3163,
18,
659,... |
rd.close(); | private static String findJarServiceProviderName(String factoryId) { SecuritySupport ss = SecuritySupport.getInstance(); String serviceId = SERVICES_PATH + factoryId; InputStream is = null; // First try the Context ClassLoader ClassLoader cl = findClassLoader(); is = ss.getResourceAsStream(cl, serviceId); // If no provider found then try the current ClassLoader if (is == null) { ClassLoader current = ObjectFactory.class.getClassLoader(); if (cl != current) { cl = current; is = ss.getResourceAsStream(cl, serviceId); } } if (is == null) { // No provider found return null; } debugPrintln("found jar resource=" + serviceId + " using ClassLoader: " + cl); // Read the service provider name in UTF-8 as specified in // the jar spec. Unfortunately this fails in Microsoft // VJ++, which does not implement the UTF-8 // encoding. Theoretically, we should simply let it fail in // that case, since the JVM is obviously broken if it // doesn't support such a basic standard. But since there // are still some users attempting to use VJ++ for // development, we have dropped in a fallback which makes a // second attempt using the platform's default encoding. In // VJ++ this is apparently ASCII, which is a subset of // UTF-8... and since the strings we'll be reading here are // also primarily limited to the 7-bit ASCII range (at // least, in English versions), this should work well // enough to keep us on the air until we're ready to // officially decommit from VJ++. [Edited comment from // jkesselm] BufferedReader rd; try { rd = new BufferedReader(new InputStreamReader(is, "UTF-8")); } catch (java.io.UnsupportedEncodingException e) { rd = new BufferedReader(new InputStreamReader(is)); } String factoryClassName = null; try { // XXX Does not handle all possible input as specified by the // Jar Service Provider specification factoryClassName = rd.readLine(); rd.close(); } catch (IOException x) { // No provider found return null; } if (factoryClassName != null && ! "".equals(factoryClassName)) { debugPrintln("found in resource, value=" + factoryClassName); // Note: here we do not want to fall back to the current // ClassLoader because we want to avoid the case where the // resource file was found using one ClassLoader and the // provider class was instantiated using a different one. return factoryClassName; } // No provider found return null; } | 2723 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2723/8715306de914fc3a40ff4ab45e0b32a46907ce9a/ObjectFactory.java/clean/src/org/apache/xalan/xsltc/cmdline/ObjectFactory.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
514,
1104,
10813,
16300,
461,
12,
780,
3272,
548,
13,
565,
288,
3639,
6036,
6289,
5202,
273,
6036,
6289,
18,
588,
1442,
5621,
3639,
514,
17130,
273,
12828,
55,
67,
4211,
397,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
514,
1104,
10813,
16300,
461,
12,
780,
3272,
548,
13,
565,
288,
3639,
6036,
6289,
5202,
273,
6036,
6289,
18,
588,
1442,
5621,
3639,
514,
17130,
273,
12828,
55,
67,
4211,
397,
... | |
public boolean isSet(org.quickfix.field.StipulationType field) | public boolean isSet(quickfix.field.StipulationType field) | public boolean isSet(org.quickfix.field.StipulationType field) { return isSetField(field); } | 5926 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5926/fecc27f98261270772ff182a1d4dfd94b5daa73d/NewOrderList.java/buggy/src/java/src/quickfix/fix43/NewOrderList.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1250,
13532,
12,
19525,
904,
18,
1518,
18,
510,
625,
6234,
559,
652,
13,
225,
288,
327,
13532,
974,
12,
1518,
1769,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1250,
13532,
12,
19525,
904,
18,
1518,
18,
510,
625,
6234,
559,
652,
13,
225,
288,
327,
13532,
974,
12,
1518,
1769,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
while (true) { char c2 = iterator.next(); if (c2 == '"' || c2 == '\n' || c2 == '\r') break; | char c2 = iterator.current(); while (c2 != '"' && c2 != '\n' && c2 != '\r') { | public int next() { startPosition = iterator.getIndex(); char c = iterator.next(); if (c == CharacterIterator.DONE) { kind = EOF; } else if (Character.isJavaIdentifierStart(c)) { boolean couldBeKeyword = false; if (Character.isLowerCase(c)) { buf.append(c); couldBeKeyword = true; } while (true) { c = iterator.current(); if (!Character.isJavaIdentifierPart(c)) break; c = iterator.next(); if (couldBeKeyword) { if (!Character.isLowerCase(c) || buf.length() >= MAX_KEYWORD_LENGTH) couldBeKeyword = false; else buf.append(c); } } kind = NORMAL_TEXT; if (couldBeKeyword) { if (KEYWORDS.contains(buf.toString())) kind = KEYWORD; buf.setLength(0); } } else if (c == '/') { char c2 = iterator.current(); if (c2 == '/') { while (true) { c2 = iterator.next(); if (c2 == '\n' || c2 == '\r') break; } kind = COMMENT; return kind; } else if (c2 == '*') { scanComment: while (true) { c2 = iterator.next(); if (c2 == '*') { do { c2 = iterator.next(); if (c2 == '/') break scanComment; } while(c2 == '*'); } } kind = JAVADOC; return kind; } } else if (c == '"') { kind = QUOTE; while (true) { char c2 = iterator.next(); if (c2 == '"' || c2 == '\n' || c2 == '\r') break; if (c2 == '\\') { c2 = iterator.next(); if (c2 == '\n' || c2 == '\r') break; } } } else kind = NORMAL_TEXT; // System.out.println(kind + " " + startPosition + "-" + iterator.getIndex()); return kind; } | 10715 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10715/bf8ba79faa8700d501a5d2c5f7fe7b33dc9564bf/JavaScanner.java/buggy/findbugs/src/java5/edu/umd/cs/findbugs/sourceViewer/JavaScanner.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
509,
1024,
1435,
288,
202,
202,
1937,
2555,
273,
2775,
18,
588,
1016,
5621,
202,
202,
3001,
276,
273,
2775,
18,
4285,
5621,
202,
202,
430,
261,
71,
422,
6577,
3198,
18,
26875,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
509,
1024,
1435,
288,
202,
202,
1937,
2555,
273,
2775,
18,
588,
1016,
5621,
202,
202,
3001,
276,
273,
2775,
18,
4285,
5621,
202,
202,
430,
261,
71,
422,
6577,
3198,
18,
26875,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.