rem stringlengths 1 226k | add stringlengths 0 227k | context stringlengths 6 326k | meta stringlengths 143 403 | input_ids listlengths 256 256 | attention_mask listlengths 256 256 | labels listlengths 128 128 |
|---|---|---|---|---|---|---|
mockDispatcher.verifyExpectations(); } | mockDispatcher.verifyExpectations(); } | public void testMockVerifies() throws Exception { mockDispatcher.verifyCalls.setExpected(1); coreMock.verify(); // Can't use Verifier as we are verifying "verify" mockDispatcher.verifyExpectations(); } | 54028 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54028/c26c57f3ac4851e6bc9c5df8515ac73f4045eebf/CGLIBCoreMockTest.java/buggy/jmock/extensions/cglib/src/test/jmock/cglib/CGLIBCoreMockTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
9865,
19802,
1435,
1216,
1185,
288,
202,
202,
22851,
6681,
18,
8705,
10125,
18,
542,
6861,
12,
21,
1769,
202,
202,
3644,
9865,
18,
8705,
5621,
202,
202,
759,
4480,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
9865,
19802,
1435,
1216,
1185,
288,
202,
202,
22851,
6681,
18,
8705,
10125,
18,
542,
6861,
12,
21,
1769,
202,
202,
3644,
9865,
18,
8705,
5621,
202,
202,
759,
4480,
... |
int frameCount() { | public int frameCount() { | int frameCount() { return frameStack.size(); } | 12376 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12376/2d4fc75b74d717c754829dde488ff0a7456682cc/Dim.java/buggy/js/rhino/toolsrc/org/mozilla/javascript/tools/debugger/Dim.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
509,
2623,
1380,
1435,
288,
5411,
327,
2623,
2624,
18,
1467,
5621,
3639,
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,
540,
1071,
509,
2623,
1380,
1435,
288,
5411,
327,
2623,
2624,
18,
1467,
5621,
3639,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
out.write((byte) 0); bytes += comment.length + 1; | bytes += comment.length; | private int write_entry (ZipEntry entry, boolean is_local) throws IOException { long offset = bytes_written; int bytes = put4 (is_local ? 0x04034b50 : 0x02014b50); if (! is_local) bytes += put_version (); bytes += put_version (); boolean crc_after = false; if (is_local && (entry.getCrc() == -1 || entry.getCompressedSize() == -1 || entry.getSize() == -1)) crc_after = true; // For the bits field we always indicate `normal' compression, // even if that isn't true. bytes += put2 (crc_after ? (1 << 3) : 0); bytes += put2 (entry.method); bytes += put2(0); // time - FIXME bytes += put2(0); // date - FIXME if (crc_after) { // CRC, compressedSize, and Size are always 0 in this header. // The actual values are given after the entry. bytes += put4 (0); bytes += put4 (0); bytes += put4 (0); } else { bytes += put4 ((int) (entry.getCrc())); bytes += put4 ((int) (entry.getCompressedSize())); bytes += put4 ((int) (entry.getSize())); } byte[] name = entry.name.getBytes("8859_1"); bytes += put2 (name.length); bytes += put2 (entry.extra == null ? 0 : entry.extra.length); byte[] comment = null; if (! is_local) { if (entry.getComment() == null) bytes += put2 (0); else { comment = entry.getComment().getBytes("8859_1"); bytes += put2 (comment.length); } // Disk number start. bytes += put2 (0); // Internal file attributes. bytes += put2 (0); // External file attributes. bytes += put2 (0); // Relative offset of local header. bytes += put2 ((int) offset); } out.write (name); out.write ((byte) 0); bytes += name.length + 1; if (entry.extra != null) { out.write(entry.extra); out.write((byte) 0); bytes += entry.extra.length + 1; } if (comment != null) { out.write(comment); out.write((byte) 0); bytes += comment.length + 1; } bytes_written += bytes; return bytes; } | 25352 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/25352/1e3cd04be9565704fb97be6d733636dea0442cf2/ZipOutputStream.java/clean/libjava/java/util/zip/ZipOutputStream.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
509,
1045,
67,
4099,
261,
9141,
1622,
1241,
16,
1250,
353,
67,
3729,
13,
565,
1216,
1860,
225,
288,
565,
1525,
1384,
273,
1731,
67,
9748,
31,
565,
509,
1731,
273,
1378,
24,
261,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
509,
1045,
67,
4099,
261,
9141,
1622,
1241,
16,
1250,
353,
67,
3729,
13,
565,
1216,
1860,
225,
288,
565,
1525,
1384,
273,
1731,
67,
9748,
31,
565,
509,
1731,
273,
1378,
24,
261,
... |
throw new InvalidConfigValueException("Negative values not supported"); | throw new InvalidConfigValueException("Negative or zero values not supported"); | Node(FreenetFilePersistentConfig config, RandomSource random, LoggingConfigHandler lc, NodeStarter ns) throws NodeInitException { // Easy stuff logMINOR = Logger.shouldLog(Logger.MINOR, this); String tmp = "Initializing Node using freenet Build #"+Version.buildNumber()+" r"+Version.cvsRevision+" and freenet-ext Build #"+NodeStarter.extBuildNumber+" r"+NodeStarter.extRevisionNumber; Logger.normal(this, tmp); System.out.println(tmp); pInstantRejectIncoming = new TimeDecayingRunningAverage(0, 60000, 0.0, 1.0); nodeStarter=ns; if(logConfigHandler != lc) logConfigHandler=lc; startupTime = System.currentTimeMillis(); nodeNameUserAlert = new MeaningfulNodeNameUserAlert(this); recentlyCompletedIDs = new LRUQueue(); this.config = config; this.random = random; cachedPubKeys = new LRUHashtable(); lm = new LocationManager(random); try { localhostAddress = InetAddress.getByName("127.0.0.1"); } catch (UnknownHostException e3) { // Does not do a reverse lookup, so this is impossible throw new Error(e3); } fLocalhostAddress = new FreenetInetAddress(localhostAddress); requestSenders = new HashMap(); transferringRequestSenders = new HashMap(); insertSenders = new HashMap(); peerNodeStatuses = new HashMap(); peerNodeRoutingBackoffReasons = new HashMap(); runningUIDs = new HashSet(); dnsr = new DNSRequester(this); ps = new PacketSender(this); // FIXME maybe these should persist? They need to be private though, so after the node/peers split. (bug 51). decrementAtMax = random.nextDouble() <= DECREMENT_AT_MAX_PROB; decrementAtMin = random.nextDouble() <= DECREMENT_AT_MIN_PROB; bootID = random.nextLong(); throttledPacketSendAverage = new TimeDecayingRunningAverage(1, 10*60*1000 /* should be significantly longer than a typical transfer */, 0, Long.MAX_VALUE); buildOldAgeUserAlert = new BuildOldAgeUserAlert(); int sortOrder = 0; // Setup node-specific configuration SubConfig nodeConfig = new SubConfig("node", config); nodeConfig.register("aggressiveGC", aggressiveGCModificator, sortOrder++, true, false, "AggressiveGC modificator", "Enables the user to tweak the time in between GC and forced finalization. SHOULD NOT BE CHANGED unless you know what you're doing! -1 means : disable forced call to System.gc() and System.runFinalization()", new IntCallback() { public int get() { return aggressiveGCModificator; } public void set(int val) throws InvalidConfigValueException { if(val == get()) return; Logger.normal(this, "Changing aggressiveGCModificator to "+val); aggressiveGCModificator = val; } }); if(lastVersion <= 954) nodeConfig.fixOldDefault("aggressiveGC", "250"); aggressiveGCModificator = nodeConfig.getInt("aggressiveGC"); //Memory Checking thread // TODO: proper config. callbacks : maybe we shoudln't start the thread at all if it's not worthy this.myMemoryChecker = new Thread(new MemoryChecker(), "Memory checker"); this.myMemoryChecker.setPriority(Thread.MAX_PRIORITY); this.myMemoryChecker.setDaemon(true); // FIXME maybe these configs should actually be under a node.ip subconfig? ipDetector = new NodeIPDetector(this); sortOrder = ipDetector.registerConfigs(nodeConfig, sortOrder); // Determine where to bind to nodeConfig.register("bindTo", "0.0.0.0", sortOrder++, true, true, "IP address to bind to", "IP address to bind to", new NodeBindtoCallback(this)); this.bindto = nodeConfig.getString("bindTo"); // Determine the port number nodeConfig.register("listenPort", -1 /* means random */, sortOrder++, true, true, "FNP port number (UDP)", "UDP port for node-to-node communications (Freenet Node Protocol)", new IntCallback() { public int get() { return portNumber; } public void set(int val) throws InvalidConfigValueException { // FIXME implement on the fly listenPort changing // Note that this sort of thing should be the exception rather than the rule!!!! String msg = "Switching listenPort on the fly not yet supported!"; Logger.error(this, msg); throw new InvalidConfigValueException(msg); } }); int port=-1; try{ port=nodeConfig.getInt("listenPort"); }catch (Exception e){ Logger.error(this, "Caught "+e, e); System.err.println(e); e.printStackTrace(); port=-1; } UdpSocketManager u = null; if(port > 65535) { throw new NodeInitException(EXIT_IMPOSSIBLE_USM_PORT, "Impossible port number: "+port); } else if(port == -1) { // Pick a random port for(int i=0;i<200000;i++) { int portNo = 1024 + random.nextInt(65535-1024); try { u = new UdpSocketManager(portNo, InetAddress.getByName(bindto), this); port = u.getPortNumber(); break; } catch (Exception e) { Logger.normal(this, "Could not use port: "+bindto+ ':' +portNo+": "+e, e); System.err.println("Could not use port: "+bindto+ ':' +portNo+": "+e); e.printStackTrace(); continue; } } if(u == null) throw new NodeInitException(EXIT_NO_AVAILABLE_UDP_PORTS, "Could not find an available UDP port number for FNP (none specified)"); } else { try { u = new UdpSocketManager(port, InetAddress.getByName(bindto), this); } catch (Exception e) { throw new NodeInitException(EXIT_IMPOSSIBLE_USM_PORT, "Could not bind to port: "+port+" (node already running?)"); } } usm = u; Logger.normal(this, "FNP port created on "+bindto+ ':' +port); System.out.println("FNP port created on "+bindto+ ':' +port); portNumber = port; Logger.normal(Node.class, "Creating node..."); previous_input_stat = 0; previous_output_stat = 0; previous_io_stat_time = 1; last_input_stat = 0; last_output_stat = 0; last_io_stat_time = 3; // Bandwidth limit nodeConfig.register("outputBandwidthLimit", "15K", sortOrder++, false, true, "Output bandwidth limit (bytes per second)", "Hard output bandwidth limit (bytes/sec); the node should almost never exceed this", new IntCallback() { public int get() { //return BlockTransmitter.getHardBandwidthLimit(); return (int) ((1000L * 1000L * 1000L) / outputThrottle.getNanosPerTick()); } public void set(int obwLimit) throws InvalidConfigValueException { if(obwLimit <= 0) throw new InvalidConfigValueException("Bandwidth limit must be positive"); outputThrottle.changeNanosAndBucketSizes((1000L * 1000L * 1000L) / obwLimit, obwLimit/2, (obwLimit * 2) / 5); obwLimit = (obwLimit * 4) / 5; // fudge factor; take into account non-request activity requestOutputThrottle.changeNanosAndBucketSize((1000L*1000L*1000L) / obwLimit, Math.max(obwLimit*60, 32768*20)); if(inputLimitDefault) { int ibwLimit = obwLimit * 4; requestInputThrottle.changeNanosAndBucketSize((1000L*1000L*1000L) / ibwLimit, Math.max(ibwLimit*60, 32768*20)); } } }); int obwLimit = nodeConfig.getInt("outputBandwidthLimit"); outputThrottle = new DoubleTokenBucket(obwLimit/2, (1000L*1000L*1000L) / obwLimit, obwLimit, (obwLimit * 2) / 5); obwLimit = (obwLimit * 4) / 5; // fudge factor; take into account non-request activity requestOutputThrottle = new TokenBucket(Math.max(obwLimit*60, 32768*20), (1000L*1000L*1000L) / obwLimit, 0); nodeConfig.register("inputBandwidthLimit", "-1", sortOrder++, false, true, "Input bandwidth limit (bytes per second)", "Input bandwidth limit (bytes/sec); the node will try not to exceed this; -1 = 4x set outputBandwidthLimit", new IntCallback() { public int get() { if(inputLimitDefault) return -1; return (((int) ((1000L * 1000L * 1000L) / requestInputThrottle.getNanosPerTick())) * 5) / 4; } public void set(int ibwLimit) throws InvalidConfigValueException { if(ibwLimit == -1) { inputLimitDefault = true; ibwLimit = (int) ((1000L * 1000L * 1000L) / outputThrottle.getNanosPerTick()) * 4; } else { inputLimitDefault = false; ibwLimit = ibwLimit * 4 / 5; // fudge factor; take into account non-request activity } if(ibwLimit <= 0) throw new InvalidConfigValueException("Bandwidth limit must be positive or -1"); requestInputThrottle.changeNanosAndBucketSize((1000L*1000L*1000L) / ibwLimit, Math.max(ibwLimit*60, 32768*20)); } }); int ibwLimit = nodeConfig.getInt("inputBandwidthLimit"); if(ibwLimit == -1) { inputLimitDefault = true; ibwLimit = (int) ((1000L * 1000L * 1000L) / outputThrottle.getNanosPerTick()) * 4; } else { ibwLimit = ibwLimit * 4 / 5; } requestInputThrottle = new TokenBucket(Math.max(ibwLimit*60, 32768*20), (1000L*1000L*1000L) / ibwLimit, 0); // FIXME add an averaging/long-term/soft bandwidth limit. (bug 76) // SwapRequestInterval nodeConfig.register("swapRequestSendInterval", 2000, sortOrder++, true, false, "Swap request send interval (ms)", "Interval between swap attempting to send swap requests in milliseconds. Leave this alone!", new IntCallback() { public int get() { return swapInterval.fixedInterval; } public void set(int val) throws InvalidConfigValueException { swapInterval.set(val); } }); swapInterval = new StaticSwapRequestInterval(nodeConfig.getInt("swapRequestSendInterval")); // Testnet. // Cannot be enabled/disabled on the fly. // If enabled, forces certain other config options. if((testnetHandler = TestnetHandler.maybeCreate(this, config)) != null) { String msg = "WARNING: ENABLING TESTNET CODE! This WILL seriously jeopardize your anonymity!"; Logger.error(this, msg); System.err.println(msg); testnetEnabled = true; if(logConfigHandler.getFileLoggerHook() == null) { System.err.println("Forcing logging enabled (essential for testnet)"); logConfigHandler.forceEnableLogging(); } int x = Logger.globalGetThreshold(); if(!((x == Logger.MINOR) || (x == Logger.DEBUG))) { System.err.println("Forcing log threshold to MINOR for testnet, was "+x); Logger.globalSetThreshold(Logger.MINOR); } if(logConfigHandler.getMaxZippedLogFiles() < TESTNET_MIN_MAX_ZIPPED_LOGFILES) { System.err.println("Forcing max zipped logfiles space to 256MB for testnet"); try { logConfigHandler.setMaxZippedLogFiles(TESTNET_MIN_MAX_ZIPPED_LOGFILES_STRING); } catch (InvalidConfigValueException e) { throw new Error("Impossible: "+e); } } } else { String s = "Testnet mode DISABLED. You may have some level of anonymity. :)\n"+ "Note that this version of Freenet is still a very early alpha, and may well have numerous bugs and design flaws.\n"+ "In particular: YOU ARE WIDE OPEN TO YOUR IMMEDIATE DARKNET PEERS! They can eavesdrop on your requests with relatively little difficulty at present (correlation attacks etc)."; Logger.normal(this, s); System.err.println(s); testnetEnabled = false; if(wasTestnet) { FileLoggerHook flh = logConfigHandler.getFileLoggerHook(); if(flh != null) flh.deleteAllOldLogFiles(); } } // Directory for node-related files other than store nodeConfig.register("nodeDir", ".", sortOrder++, true, false, "Node directory", "Name of directory to put node-related files e.g. peers list in", new StringCallback() { public String get() { return nodeDir.getPath(); } public void set(String val) throws InvalidConfigValueException { if(nodeDir.equals(new File(val))) return; // FIXME throw new InvalidConfigValueException("Moving node directory on the fly not supported at present"); } }); nodeDir = new File(nodeConfig.getString("nodeDir")); if(!((nodeDir.exists() && nodeDir.isDirectory()) || (nodeDir.mkdir()))) { String msg = "Could not find or create datastore directory"; throw new NodeInitException(EXIT_BAD_NODE_DIR, msg); } // After we have set up testnet and IP address, load the node file try { // FIXME should take file directly? readNodeFile(new File(nodeDir, "node-"+portNumber).getPath(), random); } catch (IOException e) { try { readNodeFile(new File("node-"+portNumber+".bak").getPath(), random); } catch (IOException e1) { initNodeFileSettings(random); } } if(wasTestnet != testnetEnabled) { Logger.error(this, "Switched from testnet mode to non-testnet mode or vice versa! Regenerating pubkey, privkey, and deleting logs."); this.myCryptoGroup = Global.DSAgroupBigA; this.myPrivKey = new DSAPrivateKey(myCryptoGroup, random); this.myPubKey = new DSAPublicKey(myCryptoGroup, myPrivKey); } // Then read the peers peers = new PeerManager(this, new File(nodeDir, "peers-"+portNumber).getPath()); peers.writePeers(); peers.updatePMUserAlert(); nodePinger = new NodePinger(this); usm.setDispatcher(dispatcher=new NodeDispatcher(this)); usm.setLowLevelFilter(packetMangler = new FNPPacketMangler(this)); // Extra Peer Data Directory nodeConfig.register("extraPeerDataDir", new File(nodeDir, "extra-peer-data-"+portNumber).toString(), sortOrder++, true, false, "Extra peer data directory", "Name of directory to put extra peer data in", new StringCallback() { public String get() { return extraPeerDataDir.getPath(); } public void set(String val) throws InvalidConfigValueException { if(extraPeerDataDir.equals(new File(val))) return; // FIXME throw new InvalidConfigValueException("Moving node directory on the fly not supported at present"); } }); extraPeerDataDir = new File(nodeConfig.getString("extraPeerDataDir")); if(!((extraPeerDataDir.exists() && extraPeerDataDir.isDirectory()) || (extraPeerDataDir.mkdir()))) { String msg = "Could not find or create extra peer data directory"; throw new NodeInitException(EXIT_EXTRA_PEER_DATA_DIR, msg); } // Name nodeConfig.register("name", myName, sortOrder++, false, true, "Node name for darknet", "Node name; you may want to set this to something descriptive if running on darknet e.g. Fred Blogg's Node; it is visible to any connecting node", new NodeNameCallback(this)); myName = nodeConfig.getString("name"); // Datastore nodeConfig.register("storeSize", "1G", sortOrder++, false, true, "Store size in bytes", "Store size in bytes", new LongCallback() { public long get() { return maxTotalKeys * sizePerKey; } public void set(long storeSize) throws InvalidConfigValueException { if((storeSize < 0) || (storeSize < (32 * 1024 * 1024))) throw new InvalidConfigValueException("Invalid store size"); long newMaxStoreKeys = storeSize / sizePerKey; if(newMaxStoreKeys == maxTotalKeys) return; // Update each datastore synchronized(Node.this) { maxTotalKeys = newMaxStoreKeys; maxStoreKeys = maxTotalKeys / 2; maxCacheKeys = maxTotalKeys - maxStoreKeys; } try { chkDatastore.setMaxKeys(maxStoreKeys, false); chkDatacache.setMaxKeys(maxCacheKeys, false); pubKeyDatastore.setMaxKeys(maxStoreKeys, false); pubKeyDatacache.setMaxKeys(maxCacheKeys, false); sskDatastore.setMaxKeys(maxStoreKeys, false); sskDatacache.setMaxKeys(maxCacheKeys, false); } catch (IOException e) { // FIXME we need to be able to tell the user. Logger.error(this, "Caught "+e+" resizing the datastore", e); System.err.println("Caught "+e+" resizing the datastore"); e.printStackTrace(); } catch (DatabaseException e) { Logger.error(this, "Caught "+e+" resizing the datastore", e); System.err.println("Caught "+e+" resizing the datastore"); e.printStackTrace(); } } }); long storeSize = nodeConfig.getLong("storeSize"); if(storeSize < 0 || storeSize < (32 * 1024 * 1024)) { // totally arbitrary minimum! throw new NodeInitException(EXIT_INVALID_STORE_SIZE, "Invalid store size"); } maxTotalKeys = storeSize / sizePerKey; nodeConfig.register("storeDir", ".", sortOrder++, true, false, "Store directory", "Name of directory to put store files in", new StringCallback() { public String get() { return storeDir.getPath(); } public void set(String val) throws InvalidConfigValueException { if(storeDir.equals(new File(val))) return; // FIXME throw new InvalidConfigValueException("Moving datastore on the fly not supported at present"); } }); storeDir = new File(nodeConfig.getString("storeDir")); if(!((storeDir.exists() && storeDir.isDirectory()) || (storeDir.mkdir()))) { String msg = "Could not find or create datastore directory"; throw new NodeInitException(EXIT_STORE_OTHER, msg); } maxStoreKeys = maxTotalKeys / 2; maxCacheKeys = maxTotalKeys - maxStoreKeys; // Setup datastores // First, global settings // Percentage of the database that must contain usefull data // decrease to increase performance, increase to save disk space System.setProperty("je.cleaner.minUtilization","90"); // Delete empty log files System.setProperty("je.cleaner.expunge","true"); EnvironmentConfig envConfig = new EnvironmentConfig(); envConfig.setAllowCreate(true); envConfig.setTransactional(true); envConfig.setTxnWriteNoSync(true); File dbDir = new File(storeDir, "database-"+portNumber); dbDir.mkdirs(); try { storeEnvironment = new Environment(dbDir, envConfig); envMutableConfig = storeEnvironment.getMutableConfig(); } catch (DatabaseException e) { System.err.println("Could not open store: "+e); e.printStackTrace(); throw new NodeInitException(EXIT_STORE_OTHER, e.getMessage()); } storeShutdownHook = new SemiOrderedShutdownHook(); Runtime.getRuntime().addShutdownHook(storeShutdownHook); storeShutdownHook.addLateJob(new Thread() { public void run() { try { storeEnvironment.close(); System.err.println("Successfully closed all datastores."); } catch (Throwable t) { System.err.println("Caught "+t+" closing environment"); t.printStackTrace(); } } }); nodeConfig.register("databaseMaxMemory", "20M", sortOrder++, true, false, "Datastore maximum memory usage", "Maximum memory usage of the database backing the datastore indexes", new LongCallback() { public long get() { return envMutableConfig.getCacheSize(); } public void set(long val) throws InvalidConfigValueException { if(val < 0) throw new InvalidConfigValueException("Negative values not supported"); envMutableConfig.setCacheSize(val); } }); envMutableConfig.setCacheSize(nodeConfig.getLong("databaseMaxMemory")); String suffix = "-" + portNumber; try { Logger.normal(this, "Initializing CHK Datastore"); System.out.println("Initializing CHK Datastore ("+maxStoreKeys+" keys)"); chkDatastore = BerkeleyDBFreenetStore.construct(lastVersion, storeDir, true, suffix, maxStoreKeys, CHKBlock.DATA_LENGTH, CHKBlock.TOTAL_HEADERS_LENGTH, true, BerkeleyDBFreenetStore.TYPE_CHK, storeEnvironment, random, storeShutdownHook); Logger.normal(this, "Initializing CHK Datacache"); System.out.println("Initializing CHK Datacache ("+maxCacheKeys+ ':' +maxCacheKeys+" keys)"); chkDatacache = BerkeleyDBFreenetStore.construct(lastVersion, storeDir, false, suffix, maxCacheKeys, CHKBlock.DATA_LENGTH, CHKBlock.TOTAL_HEADERS_LENGTH, true, BerkeleyDBFreenetStore.TYPE_CHK, storeEnvironment, random, storeShutdownHook); Logger.normal(this, "Initializing pubKey Datastore"); System.out.println("Initializing pubKey Datastore"); pubKeyDatastore = BerkeleyDBFreenetStore.construct(lastVersion, storeDir, true, suffix, maxStoreKeys, DSAPublicKey.PADDED_SIZE, 0, true, BerkeleyDBFreenetStore.TYPE_PUBKEY, storeEnvironment, random, storeShutdownHook); Logger.normal(this, "Initializing pubKey Datacache"); System.out.println("Initializing pubKey Datacache ("+maxCacheKeys+" keys)"); pubKeyDatacache = BerkeleyDBFreenetStore.construct(lastVersion, storeDir, false, suffix, maxCacheKeys, DSAPublicKey.PADDED_SIZE, 0, true, BerkeleyDBFreenetStore.TYPE_PUBKEY, storeEnvironment, random, storeShutdownHook); // FIXME can't auto-fix SSK stores. Logger.normal(this, "Initializing SSK Datastore"); System.out.println("Initializing SSK Datastore"); sskDatastore = BerkeleyDBFreenetStore.construct(lastVersion, storeDir, true, suffix, maxStoreKeys, SSKBlock.DATA_LENGTH, SSKBlock.TOTAL_HEADERS_LENGTH, false, BerkeleyDBFreenetStore.TYPE_SSK, storeEnvironment, random, storeShutdownHook); Logger.normal(this, "Initializing SSK Datacache"); System.out.println("Initializing SSK Datacache ("+maxCacheKeys+" keys)"); sskDatacache = BerkeleyDBFreenetStore.construct(lastVersion, storeDir, false, suffix, maxStoreKeys, SSKBlock.DATA_LENGTH, SSKBlock.TOTAL_HEADERS_LENGTH, false, BerkeleyDBFreenetStore.TYPE_SSK, storeEnvironment, random, storeShutdownHook); } catch (FileNotFoundException e1) { String msg = "Could not open datastore: "+e1; Logger.error(this, msg, e1); System.err.println(msg); throw new NodeInitException(EXIT_STORE_FILE_NOT_FOUND, msg); } catch (IOException e1) { String msg = "Could not open datastore: "+e1; Logger.error(this, msg, e1); System.err.println(msg); e1.printStackTrace(); throw new NodeInitException(EXIT_STORE_IOEXCEPTION, msg); } catch (Exception e1) { String msg = "Could not open datastore: "+e1; Logger.error(this, msg, e1); System.err.println(msg); e1.printStackTrace(); throw new NodeInitException(EXIT_STORE_OTHER, msg); } nodeConfig.register("throttleFile", "throttle.dat", sortOrder++, true, false, "File to store the persistent throttle data to", "File to store the persistent throttle data to", new StringCallback() { public String get() { return persistTarget.toString(); } public void set(String val) throws InvalidConfigValueException { setThrottles(val); } }); String throttleFile = nodeConfig.getString("throttleFile"); try { setThrottles(throttleFile); } catch (InvalidConfigValueException e2) { throw new NodeInitException(EXIT_THROTTLE_FILE_ERROR, e2.getMessage()); } throttlePersister = new ThrottlePersister(); SimpleFieldSet throttleFS = null; try { throttleFS = SimpleFieldSet.readFrom(persistTarget); } catch (IOException e) { try { throttleFS = SimpleFieldSet.readFrom(persistTemp); } catch (FileNotFoundException e1) { // Ignore } catch (IOException e1) { Logger.error(this, "Could not read "+persistTarget+" ("+e+") and could not read "+persistTemp+" either ("+e1+ ')'); } } if(logMINOR) Logger.minor(this, "Read throttleFS:\n"+throttleFS); // Guesstimates. Hopefully well over the reality. localChkFetchBytesSentAverage = new TimeDecayingRunningAverage(500, 180000, 0.0, 1024*1024*1024, throttleFS == null ? null : throttleFS.subset("LocalChkFetchBytesSentAverage")); localSskFetchBytesSentAverage = new TimeDecayingRunningAverage(500, 180000, 0.0, 1024*1024*1024, throttleFS == null ? null : throttleFS.subset("LocalSskFetchBytesSentAverage")); localChkInsertBytesSentAverage = new TimeDecayingRunningAverage(32768, 180000, 0.0, 1024*1024*1024, throttleFS == null ? null : throttleFS.subset("LocalChkInsertBytesSentAverage")); localSskInsertBytesSentAverage = new TimeDecayingRunningAverage(2048, 180000, 0.0, 1024*1024*1024, throttleFS == null ? null : throttleFS.subset("LocalSskInsertBytesSentAverage")); localChkFetchBytesReceivedAverage = new TimeDecayingRunningAverage(32768, 180000, 0.0, 1024*1024*1024, throttleFS == null ? null : throttleFS.subset("LocalChkFetchBytesReceivedAverage")); localSskFetchBytesReceivedAverage = new TimeDecayingRunningAverage(2048, 180000, 0.0, 1024*1024*1024, throttleFS == null ? null : throttleFS.subset("LocalSskFetchBytesReceivedAverage")); localChkInsertBytesReceivedAverage = new TimeDecayingRunningAverage(1024, 180000, 0.0, 1024*1024*1024, throttleFS == null ? null : throttleFS.subset("LocalChkInsertBytesReceivedAverage")); localSskInsertBytesReceivedAverage = new TimeDecayingRunningAverage(500, 180000, 0.0, 1024*1024*1024, throttleFS == null ? null : throttleFS.subset("LocalChkInsertBytesReceivedAverage")); remoteChkFetchBytesSentAverage = new TimeDecayingRunningAverage(32768+1024+500, 180000, 0.0, 1024*1024*1024, throttleFS == null ? null : throttleFS.subset("RemoteChkFetchBytesSentAverage")); remoteSskFetchBytesSentAverage = new TimeDecayingRunningAverage(1024+1024+500, 180000, 0.0, 1024*1024*1024, throttleFS == null ? null : throttleFS.subset("RemoteSskFetchBytesSentAverage")); remoteChkInsertBytesSentAverage = new TimeDecayingRunningAverage(32768+32768+1024, 180000, 0.0, 1024*1024*1024, throttleFS == null ? null : throttleFS.subset("RemoteChkInsertBytesSentAverage")); remoteSskInsertBytesSentAverage = new TimeDecayingRunningAverage(1024+1024+500, 180000, 0.0, 1024*1024*1024, throttleFS == null ? null : throttleFS.subset("RemoteSskInsertBytesSentAverage")); remoteChkFetchBytesReceivedAverage = new TimeDecayingRunningAverage(32768+1024+500, 180000, 0.0, 1024*1024*1024, throttleFS == null ? null : throttleFS.subset("RemoteChkFetchBytesReceivedAverage")); remoteSskFetchBytesReceivedAverage = new TimeDecayingRunningAverage(2048+500, 180000, 0.0, 1024*1024*1024, throttleFS == null ? null : throttleFS.subset("RemoteSskFetchBytesReceivedAverage")); remoteChkInsertBytesReceivedAverage = new TimeDecayingRunningAverage(32768+1024+500, 180000, 0.0, 1024*1024*1024, throttleFS == null ? null : throttleFS.subset("RemoteChkInsertBytesReceivedAverage")); remoteSskInsertBytesReceivedAverage = new TimeDecayingRunningAverage(1024+1024+500, 180000, 0.0, 1024*1024*1024, throttleFS == null ? null : throttleFS.subset("RemoteSskInsertBytesReceivedAverage")); clientCore = new NodeClientCore(this, config, nodeConfig, nodeDir, portNumber, sortOrder, throttleFS == null ? null : throttleFS.subset("RequestStarters")); nodeConfig.finishedInitialization(); writeNodeFile(); // And finally, Initialize the plugin manager Logger.normal(this, "Initializing Plugin Manager"); System.out.println("Initializing Plugin Manager"); pluginManager = new PluginManager(this); pluginManager2 = new freenet.plugin.PluginManager(this); FetcherContext ctx = clientCore.makeClient((short)0, true).getFetcherContext(); ctx.allowSplitfiles = false; ctx.dontEnterImplicitArchives = true; ctx.maxArchiveRestarts = 0; ctx.maxMetadataSize = 256; ctx.maxNonSplitfileRetries = 10; ctx.maxOutputLength = 4096; ctx.maxRecursionLevel = 2; ctx.maxTempLength = 4096; this.arkFetcherContext = ctx; Logger.normal(this, "Node constructor completed"); System.out.println("Node constructor completed"); } | 56348 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56348/467b47f618151c0e29727408b4581a3e6334c383/Node.java/buggy/src/freenet/node/Node.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
2029,
12,
42,
2842,
278,
812,
11906,
809,
642,
16,
8072,
1830,
2744,
16,
10253,
809,
1503,
9109,
16,
2029,
510,
14153,
3153,
13,
1216,
2029,
2570,
503,
288,
202,
202,
759,
29442,
10769,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3196,
2029,
12,
42,
2842,
278,
812,
11906,
809,
642,
16,
8072,
1830,
2744,
16,
10253,
809,
1503,
9109,
16,
2029,
510,
14153,
3153,
13,
1216,
2029,
2570,
503,
288,
202,
202,
759,
29442,
10769,
... |
boolean isJavaSourceFile(VirtualFile file); | boolean isJavaSourceFile(@NotNull VirtualFile file); | boolean isJavaSourceFile(VirtualFile file); | 56598 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56598/1052b661d29f3f5b33c858932dce5d8777fab489/ProjectFileIndex.java/buggy/openapi/src/com/intellij/openapi/roots/ProjectFileIndex.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1250,
353,
5852,
31150,
12,
6466,
812,
585,
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,
0,
0,
0,
0,
... | [
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,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1250,
353,
5852,
31150,
12,
6466,
812,
585,
1769,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
if (jj_3R_177()) return true; | if (jj_scan_token(THIS)) return true; | final private boolean jj_3R_165() { if (jj_3R_177()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } | 41673 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/41673/83d81b076b32acdf3f82077c7f4c2a2e160aa32f/JavaParser.java/clean/pmd/src/net/sourceforge/pmd/ast/JavaParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
3238,
1250,
10684,
67,
23,
54,
67,
28275,
1435,
288,
565,
309,
261,
78,
78,
67,
9871,
67,
2316,
12,
2455,
5127,
3719,
327,
638,
31,
565,
309,
261,
78,
78,
67,
11821,
422,
374,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3238,
1250,
10684,
67,
23,
54,
67,
28275,
1435,
288,
565,
309,
261,
78,
78,
67,
9871,
67,
2316,
12,
2455,
5127,
3719,
327,
638,
31,
565,
309,
261,
78,
78,
67,
11821,
422,
374,
... |
if(parent.equals(browser.getDirectory())) | if(MiscUtilities.isAbsolutePath(currentText) && !currentText.startsWith(browser.getPath())) newText = path; else if(parent.equals(browser.getDirectory())) | public void keyTyped(KeyEvent evt) { char ch = evt.getKeyChar(); if(ch < 0x20 || ch == 0x7f || ch == 0xff) return; SwingUtilities.invokeLater(new Runnable() { public void run() { String currentText = filenameField.getText(); int caret = filenameField.getCaretPosition(); if(MiscUtilities.isAbsolutePath(currentText)) caret -= MiscUtilities.getParentOfPath(currentText).length(); BrowserView view = browser.getBrowserView(); view.selectNone(); view.getTree().doTypeSelect( currentText, false); VFS.DirectoryEntry[] files = view.getSelectedFiles(); if(files.length != 0) { String path = files[0].path; String name = files[0].name; String parent = MiscUtilities.getParentOfPath(path); if(parent.endsWith("/") || parent.endsWith(File.separator)) parent = parent.substring(0,parent.length() - 1); String newText; if(parent.equals(browser.getDirectory())) newText = name; else newText = path; filenameField.setText(newText); filenameField.setCaretPosition( newText.length()); if(MiscUtilities.isAbsolutePath(newText)) caret += parent.length() + 1; filenameField.moveCaretPosition( caret); } } }); } //}}} | 8690 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8690/1013df0114ffbdb6bc72fb4289f10f6c85a06029/VFSFileChooserDialog.java/buggy/org/gjt/sp/jedit/browser/VFSFileChooserDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
918,
498,
11985,
12,
653,
1133,
6324,
13,
202,
202,
95,
1082,
202,
3001,
462,
273,
6324,
18,
588,
653,
2156,
5621,
1082,
202,
430,
12,
343,
411,
374,
92,
3462,
747,
462,
42... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3196,
202,
482,
918,
498,
11985,
12,
653,
1133,
6324,
13,
202,
202,
95,
1082,
202,
3001,
462,
273,
6324,
18,
588,
653,
2156,
5621,
1082,
202,
430,
12,
343,
411,
374,
92,
3462,
747,
462,
42... |
public void set(String value) throws InvalidValueException, ValuePresenceException { throw new ValuePresenceException(); | public void set(String value) throws InvalidParamValueException, ParamValuePresenceException { throw new ParamValuePresenceException(); | public void set(String value) throws InvalidValueException, ValuePresenceException { throw new ValuePresenceException(); } | 5103 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5103/1111562e798a1fbb3e3dccd1decacc8bc438eaf5/AbstractParam.java/buggy/trang/src/com/thaiopensource/relaxng/translate/util/AbstractParam.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
444,
12,
780,
460,
13,
1216,
1962,
9738,
16,
1445,
22590,
503,
288,
565,
604,
394,
1445,
22590,
503,
5621,
225,
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,
918,
444,
12,
780,
460,
13,
1216,
1962,
9738,
16,
1445,
22590,
503,
288,
565,
604,
394,
1445,
22590,
503,
5621,
225,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if (mailReceiptHBM == null) { _log.warn("No MailReceipt exists with the primary key " + receiptId.toString()); throw new NoSuchReceiptException( "No MailReceipt exists with the primary key " + receiptId.toString()); } mailReceipt = MailReceiptHBMUtil.model(mailReceiptHBM, false); | if (mailReceiptHBM == null) { _log.warn("No MailReceipt exists with the primary key " + receiptId.toString()); throw new NoSuchReceiptException( "No MailReceipt exists with the primary key " + receiptId.toString()); | public com.liferay.portlet.mail.model.MailReceipt findByPrimaryKey( String receiptId) throws NoSuchReceiptException, SystemException { com.liferay.portlet.mail.model.MailReceipt mailReceipt = MailReceiptPool.get(receiptId); Session session = null; try { if (mailReceipt == null) { session = openSession(); MailReceiptHBM mailReceiptHBM = (MailReceiptHBM)session.get(MailReceiptHBM.class, receiptId); if (mailReceiptHBM == null) { _log.warn("No MailReceipt exists with the primary key " + receiptId.toString()); throw new NoSuchReceiptException( "No MailReceipt exists with the primary key " + receiptId.toString()); } mailReceipt = MailReceiptHBMUtil.model(mailReceiptHBM, false); } return mailReceipt; } catch (HibernateException he) { throw new SystemException(he); } finally { closeSession(session); } } | 53908 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/53908/8c4054ea8e295b5e5e4f4309b1d8379f8887c3af/MailReceiptPersistence.java/clean/portal-ejb/src/com/liferay/portlet/mail/service/persistence/MailReceiptPersistence.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
532,
18,
10256,
15164,
18,
655,
1810,
18,
4408,
18,
2284,
18,
6759,
15636,
6224,
11575,
12,
202,
202,
780,
16030,
548,
13,
1216,
5823,
15636,
503,
16,
26731,
288,
202,
202,
83... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
532,
18,
10256,
15164,
18,
655,
1810,
18,
4408,
18,
2284,
18,
6759,
15636,
6224,
11575,
12,
202,
202,
780,
16030,
548,
13,
1216,
5823,
15636,
503,
16,
26731,
288,
202,
202,
83... |
String rootpaths = ApplicationServer.getIMCServiceInterface().getConfig().getFileAdminRootPaths(); | String rootpaths = Imcms.getServices().getConfig().getFileAdminRootPaths(); | private File[] getRoots() throws IOException { String rootpaths = ApplicationServer.getIMCServiceInterface().getConfig().getFileAdminRootPaths(); List rootList = new ArrayList(); if ( rootpaths != null ) { StringTokenizer st = new StringTokenizer( rootpaths, ":;" ); int tokenCount = st.countTokens(); for ( int i = 0; i < tokenCount; i++ ) { String oneRoot = st.nextToken().trim(); File oneRootFile = FileUtility.getFileFromWebappRelativePath( oneRoot ); if ( oneRootFile.isDirectory() ) { rootList.add( oneRootFile ); } } } File[] roots = (File[])rootList.toArray( new File[rootList.size()] ); return roots; } | 8781 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8781/d060a6873350aa2972f54c354321cf3756f50e6f/FileAdmin.java/clean/server/src/com/imcode/imcms/servlet/superadmin/FileAdmin.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1387,
8526,
7656,
87,
1435,
1216,
1860,
288,
3639,
514,
1365,
4481,
273,
2221,
6851,
18,
588,
5676,
7675,
588,
809,
7675,
29925,
4446,
2375,
4466,
5621,
3639,
987,
1365,
682,
273,
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,
3238,
1387,
8526,
7656,
87,
1435,
1216,
1860,
288,
3639,
514,
1365,
4481,
273,
2221,
6851,
18,
588,
5676,
7675,
588,
809,
7675,
29925,
4446,
2375,
4466,
5621,
3639,
987,
1365,
682,
273,
3... |
if ( new File( warSourceDirectory ).exists() ) | if ( warSourceDirectory.exists() ) | public void copyResources( File sourceDirectory, File webappDirectory, String includes, String excludes, String webXml ) throws IOException { if ( !sourceDirectory.equals( webappDirectory ) ) { getLog().info( "Copy webapp resources to " + webappDirectory.getAbsolutePath() ); if ( new File( warSourceDirectory ).exists() ) { //TODO : Use includes and excludes FileUtils.copyDirectoryStructure( sourceDirectory, webappDirectory ); } if ( webXml != null && !"".equals( webXml ) ) { FileUtils.copyFileToDirectory( new File( webXml ), new File( webappDirectory, WEB_INF ) ); } } } | 11530 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11530/e21120a0a4e6c146b4e7302a2240920517aaeb65/WarMojo.java/clean/maven-plugins/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/WarMojo.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1610,
3805,
12,
1387,
1084,
2853,
16,
1387,
28945,
2853,
16,
514,
6104,
16,
514,
13644,
16,
1171,
9079,
514,
3311,
4432,
262,
3639,
1216,
1860,
565,
288,
3639,
309,
261,
401,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1610,
3805,
12,
1387,
1084,
2853,
16,
1387,
28945,
2853,
16,
514,
6104,
16,
514,
13644,
16,
1171,
9079,
514,
3311,
4432,
262,
3639,
1216,
1860,
565,
288,
3639,
309,
261,
401,
... |
public abstract void displayMaster(Folder aFolder); | public abstract void displayMaster(); | public abstract void displayMaster(Folder aFolder); | 13991 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13991/f202ef7ed293d4a594fbd578fb00d7900876e8ff/MessageDisplayManager.java/buggy/grendel/sources/grendel/ui/MessageDisplayManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
8770,
918,
2562,
7786,
12,
3899,
279,
3899,
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,
0,
0,
0,... | [
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,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
8770,
918,
2562,
7786,
12,
3899,
279,
3899,
1769,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Runnable useless = new Runnable() { public void run() { while(true) try { Thread.sleep(Long.MAX_VALUE); } catch (InterruptedException e) { } } }; Thread plug = new Thread(useless, "Plug"); plug.start(); | public Integer start( String[] args ) { if(args.length>1) { System.out.println("Usage: $ java freenet.node.Node <configFile>"); return new Integer(-1); } File configFilename; if(args.length == 0) { System.out.println("Using default config filename freenet.ini"); configFilename = new File("freenet.ini"); } else configFilename = new File(args[0]); // set Java's DNS cache not to cache forever, since many people // use dyndns hostnames java.security.Security.setProperty("networkaddress.cache.ttl" , "300"); // set Java's negative DNS cache to 1 minute rather than the default 10 seconds java.security.Security.setProperty("networkaddress.cache.negative.ttl" , "60"); try{ cfg = new FilePersistentConfig(configFilename); }catch(IOException e){ System.out.println("Error : "+e); return new Integer(-1); } // First, set up logging. It is global, and may be shared between several nodes. SubConfig loggingConfig = new SubConfig("logger", cfg); try { logConfigHandler = new LoggingConfigHandler(loggingConfig); } catch (InvalidConfigValueException e) { System.err.println("Error: could not set up logging: "+e.getMessage()); e.printStackTrace(); return new Integer(-2); } // Setup RNG RandomSource random = new Yarrow(); DiffieHellman.init(random); // FIXME : maybe we should keep it even if the wrapper does it Thread t = new Thread(new MemoryChecker(), "Memory checker"); t.setPriority(Thread.MAX_PRIORITY); t.start(); WrapperManager.signalStarting(500000); try { node = new Node(cfg, random, logConfigHandler,this); node.start(false); } catch (NodeInitException e) { System.err.println("Failed to load node: "+e.getMessage()); e.printStackTrace(); System.exit(e.exitCode); } return null; } | 50287 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50287/0e73e63698410905555b43e69172b80870e39ae5/NodeStarter.java/clean/src/freenet/node/NodeStarter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1377,
10254,
26967,
273,
394,
10254,
1435,
288,
1071,
918,
1086,
1435,
288,
1323,
12,
3767,
13,
775,
288,
4884,
18,
19607,
12,
3708,
18,
6694,
67,
4051,
1769,
289,
1044,
261,
24485,
503,
425,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1377,
10254,
26967,
273,
394,
10254,
1435,
288,
1071,
918,
1086,
1435,
288,
1323,
12,
3767,
13,
775,
288,
4884,
18,
19607,
12,
3708,
18,
6694,
67,
4051,
1769,
289,
1044,
261,
24485,
503,
425,
... | |
String property = name.substring(0, name.lastIndexOf("[")); Object target = getRealTarget(property, context, root); | property = name.substring(0, name.lastIndexOf("[")); target = getRealTarget(property, context, root); | public static void setValue(String name, Map context, Object root, Object value) throws OgnlException { if (name.endsWith("]")) { String property = name.substring(0, name.lastIndexOf("[")); Object target = getRealTarget(property, context, root); if (target != null) { Class memberType = (Class) XWorkConverter.getInstance().getObjectTypeDeterminer().getElementClass(target.getClass(), property,null); if (memberType != null) { TypeConverter converter = Ognl.getTypeConverter(context); value = converter.convertValue(context, target, null, property, value, memberType); } } } Ognl.setValue(compile(name), context, root, value); } | 16468 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/16468/4b325fce3594b8ba6020634c1668befd4c39d59f/OgnlUtil.java/clean/src/java/com/opensymphony/xwork/util/OgnlUtil.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
5524,
12,
780,
508,
16,
1635,
819,
16,
1033,
1365,
16,
1033,
460,
13,
1216,
531,
1600,
80,
503,
288,
3639,
309,
261,
529,
18,
5839,
1190,
2932,
4279,
3719,
288,
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,
760,
918,
5524,
12,
780,
508,
16,
1635,
819,
16,
1033,
1365,
16,
1033,
460,
13,
1216,
531,
1600,
80,
503,
288,
3639,
309,
261,
529,
18,
5839,
1190,
2932,
4279,
3719,
288,
5411,
... |
public void removeStructureStylesheetDescription (int stylesheetId) throws Exception { Connection con = RDBMServices.getConnection(); try { Statement stmt = con.createStatement(); try { // detele all associated theme stylesheets String sQuery = "SELECT SS_ID FROM UP_SS_THEME WHERE STRUCT_SS_ID=" + stylesheetId; LogService.instance().log(LogService.DEBUG, "RDBMUserLayoutStore::removeStructureStylesheetDescription() : " + sQuery); ResultSet rs = stmt.executeQuery(sQuery); try { while (rs.next()) { removeThemeStylesheetDescription(rs.getInt("SS_ID")); } } finally { rs.close(); } sQuery = "DELETE FROM UP_SS_STRUCT WHERE SS_ID=" + stylesheetId; LogService.instance().log(LogService.DEBUG, "RDBMUserLayoutStore::removeStructureStylesheetDescription() : " + sQuery); stmt.executeUpdate(sQuery); // delete params sQuery = "DELETE FROM UP_SS_STRUCT_PAR WHERE SS_ID=" + stylesheetId; LogService.instance().log(LogService.DEBUG, "RDBMUserLayoutStore::removeStructureStylesheetDescription() : " + sQuery); stmt.executeUpdate(sQuery); // clean up user preferences // should we do something about profiles ? RDBMServices.commit(con); } catch (Exception e) { // Roll back the transaction RDBMServices.rollback(con); throw e; } finally { stmt.close(); } } finally { RDBMServices.releaseConnection(con); } } | 24959 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/24959/a300af8fdba43cdf4489c02afa1f0e4e417b743d/RDBMUserLayoutStore.java/buggy/source/org/jasig/portal/RDBMUserLayoutStore.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
918,
1206,
6999,
24656,
3291,
261,
474,
13820,
548,
13,
1216,
1185,
288,
1952,
356,
273,
534,
2290,
49,
5676,
18,
588,
1952,
5621,
698,
288,
3406,
3480,
273,
356,
18,
2640,
3406,
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,
1071,
918,
1206,
6999,
24656,
3291,
261,
474,
13820,
548,
13,
1216,
1185,
288,
1952,
356,
273,
534,
2290,
49,
5676,
18,
588,
1952,
5621,
698,
288,
3406,
3480,
273,
356,
18,
2640,
3406,
5621,
... | ||
public void loadDescriptors( String packageName, ClassLoader classLoader ) { | public synchronized void loadDescriptors( String packageName, ClassLoader classLoader ) { | public void loadDescriptors( String packageName, ClassLoader classLoader ) { String res=packageName.replace( '.', '/'); if( log.isTraceEnabled() ) { log.trace("Finding descriptor " + res ); } if( searchedPaths.get( packageName ) != null ) { return; } String descriptors=res + "/mbeans-descriptors.ser"; URL dURL=classLoader.getResource( descriptors ); if( dURL == null ) { descriptors=res + "/mbeans-descriptors.xml"; dURL=classLoader.getResource( descriptors ); } if( dURL == null ) { return; } log.debug( "Found " + dURL); searchedPaths.put( packageName, dURL ); try { if( descriptors.endsWith(".xml" )) loadDescriptors("MbeansDescriptorsDigesterSource", dURL, null); else loadDescriptors("MbeansDescriptorsSerSource", dURL, null); return; } catch(Exception ex ) { log.error("Error loading " + dURL); } return; } | 15905 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15905/400e51ac3a86812f80e6a4df5fce62cb8f9e7177/Registry.java/clean/java/org/apache/tomcat/util/modeler/Registry.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3852,
918,
1262,
12705,
12,
514,
9929,
16,
9403,
11138,
225,
262,
288,
3639,
514,
400,
33,
5610,
461,
18,
2079,
12,
2611,
16,
2023,
1769,
3639,
309,
12,
613,
18,
291,
3448,
1526,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3852,
918,
1262,
12705,
12,
514,
9929,
16,
9403,
11138,
225,
262,
288,
3639,
514,
400,
33,
5610,
461,
18,
2079,
12,
2611,
16,
2023,
1769,
3639,
309,
12,
613,
18,
291,
3448,
1526,
... |
public void initializePlugin(PluginManager manager, File pluginDir) { try { // Configure logging to a file, creating log dir if needed System.setProperty("org.apache.commons.logging.LogFactory", "org.mortbay.log.Factory"); File logDir = new File(JiveGlobals.getMessengerHome(), "logs"); if (!logDir.exists()) { logDir.mkdirs(); } File logFile = new File(logDir, "admin-console.log"); OutputStreamLogSink logSink = new OutputStreamLogSink(logFile.toString()); logSink.start(); LogImpl log = (LogImpl) Factory.getFactory().getInstance(""); // Ignore INFO logs. log.setVerbose(-1); log.add(logSink); jetty = new Server(); // Configure HTTP socket listener boolean plainStarted = false; // Setting this property to a not null value will imply that the Jetty server will only // accept connect requests to that IP address interfaceName = JiveGlobals.getXMLProperty("adminConsole.inteface"); port = JiveGlobals.getXMLProperty("adminConsole.port", 9090); InetAddrPort address = new InetAddrPort(interfaceName, port); if (port > 0) { jetty.addListener(address); plainStarted = true; } boolean secureStarted = false; try { securePort = JiveGlobals.getXMLProperty("adminConsole.securePort", 9091); if (securePort > 0) { SunJsseListener listener = new SunJsseListener(); // Get the keystore location. The default location is security/keystore String keyStoreLocation = JiveGlobals.getProperty("xmpp.socket.ssl.keystore", "resources" + File.separator + "security" + File.separator + "keystore"); keyStoreLocation = JiveGlobals.getMessengerHome() + File.separator + keyStoreLocation; // Get the keystore password. The default password is "changeit". String keypass = JiveGlobals.getProperty("xmpp.socket.ssl.keypass", "changeit"); keypass = keypass.trim(); // Get the truststore location; default at security/truststore String trustStoreLocation = JiveGlobals.getProperty("xmpp.socket.ssl.truststore", "resources" + File.separator + "security" + File.separator + "truststore"); trustStoreLocation = JiveGlobals.getMessengerHome() + File.separator + trustStoreLocation; // Get the truststore passwprd; default is "changeit". String trustpass = JiveGlobals.getProperty("xmpp.socket.ssl.trustpass", "changeit"); trustpass = trustpass.trim(); listener.setKeystore(keyStoreLocation); listener.setKeyPassword(keypass); listener.setPassword(keypass); listener.setHost(interfaceName); listener.setPort(securePort); jetty.addListener(listener); secureStarted = true; } } catch (Exception e) { Log.error(e); } // Add web-app WebApplicationContext webAppContext = jetty.addWebApplication("/", pluginDir.getAbsoluteFile() + File.separator + "webapp"); webAppContext.setWelcomeFiles(new String[]{"index.jsp"}); jetty.start(); if (!plainStarted && !secureStarted) { Log.info("Warning: admin console not started due to configuration settings."); System.out.println("Warning: admin console not started due to configuration settings."); } else if (!plainStarted && secureStarted) { Log.info("Admin console listening at https://" + XMPPServer.getInstance().getServerInfo().getName() + ":" + securePort); System.out.println("Admin console listening at https://" + XMPPServer.getInstance().getServerInfo().getName() + ":" + securePort); } else if (!secureStarted && plainStarted) { Log.info("Admin console listening at http://" + XMPPServer.getInstance().getServerInfo().getName() + ":" + port); System.out.println("Admin console listening at http://" + XMPPServer.getInstance().getServerInfo().getName() + ":" + port); } else { String msg = "Admin console listening at:\n" + " http://" + XMPPServer.getInstance().getServerInfo().getName() + ":" + port + "\n" + " https://" + XMPPServer.getInstance().getServerInfo().getName() + ":" + securePort; Log.info(msg); System.out.println(msg); } } catch (Exception e) { Log.error("Trouble initializing admin console", e); } } | 6161 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6161/c078cad370f53d9dab9901dcfc86ea91fe98a4a6/AdminConsolePlugin.java/buggy/src/java/org/jivesoftware/messenger/container/AdminConsolePlugin.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
6459,
11160,
3773,
12,
3773,
49,
940,
1035,
1063,
16,
812,
4094,
1621,
15329,
698,
95,
759,
11207,
11167,
12799,
768,
16,
23799,
1330,
1214,
430,
17471,
3163,
18,
542,
1396,
2932,
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,
6459,
11160,
3773,
12,
3773,
49,
940,
1035,
1063,
16,
812,
4094,
1621,
15329,
698,
95,
759,
11207,
11167,
12799,
768,
16,
23799,
1330,
1214,
430,
17471,
3163,
18,
542,
1396,
2932,
3341,
... | ||
if (!(toTest instanceof ViewStack)) { return false; } ViewStack folder = (ViewStack)toTest; return folder.getParent() == getParent(); | return (toTest instanceof ViewStack); | public boolean isStackType(LayoutPart toTest) { if (!(toTest instanceof ViewStack)) { return false; } ViewStack folder = (ViewStack)toTest; return folder.getParent() == getParent(); } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/e04a85b80c5ca10481c86bbaa2202b3f2fc194bb/ViewSashContainer.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ViewSashContainer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
1250,
353,
2624,
559,
12,
3744,
1988,
358,
4709,
13,
288,
202,
430,
16051,
12,
869,
4709,
1276,
4441,
2624,
3719,
288,
3196,
202,
2463,
629,
31,
202,
97,
202,
202,
1767,
2624,
3009,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1250,
353,
2624,
559,
12,
3744,
1988,
358,
4709,
13,
288,
202,
430,
16051,
12,
869,
4709,
1276,
4441,
2624,
3719,
288,
3196,
202,
2463,
629,
31,
202,
97,
202,
202,
1767,
2624,
3009,
27... |
List addresses = new ArrayList(); | List<InetAddress> addresses = new ArrayList<InetAddress>(); | private static List buildLBSnmpAddressList(Map collectorMap, IfSnmpCollector snmpc) { Category log = ThreadCategory.getInstance(RescanProcessor.class); List addresses = new ArrayList(); // Verify that we have SNMP info if (snmpc == null) { log.debug("buildLBSnmpAddressList: no SNMP info available..."); return addresses; } if (!snmpc.hasIfTable()) { log.debug("buildLBSnmpAddressList: no SNMP ifTable available..."); return addresses; } /* * To be eligible to be the primary SNMP interface for a node: * * 1. The interface must support SNMP * 2. The interface must have a valid ifIndex. */ Collection values = collectorMap.values(); Iterator iter = values.iterator(); while (iter.hasNext()) { IfCollector ifc = (IfCollector) iter.next(); // Add eligible target. InetAddress ifaddr = ifc.getTarget(); if (addresses.contains(ifaddr) == false) { if (SuspectEventProcessor.supportsSnmp(ifc.getSupportedProtocols()) && SuspectEventProcessor.hasIfIndex(ifaddr, snmpc) && SuspectEventProcessor.getIfType(ifaddr, snmpc) == 24) { if (log.isDebugEnabled()) { log.debug("buildLBSnmpAddressList: adding target interface " + ifaddr.getHostAddress() + " temporarily marked as primary!"); } addresses.add(ifaddr); } } // Now go through list of sub-targets if (ifc.hasAdditionalTargets()) { Map subTargets = ifc.getAdditionalTargets(); Set keys = subTargets.keySet(); Iterator siter = keys.iterator(); while (siter.hasNext()) { // Add eligible subtargets. InetAddress xifaddr = (InetAddress) siter.next(); if (addresses.contains(xifaddr) == false) { if (SuspectEventProcessor.supportsSnmp((List) subTargets.get(xifaddr)) && SuspectEventProcessor.hasIfIndex(xifaddr, snmpc) && SuspectEventProcessor.getIfType(xifaddr, snmpc) == 24) { if (log.isDebugEnabled()) { log.debug("buildLBSnmpAddressList: adding subtarget interface " + xifaddr.getHostAddress() + " temporarily marked as primary!"); } addresses.add(xifaddr); } } } } } return addresses; } | 11849 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11849/2d7d01a6c8884e6784a932ca6408a4304fe577cf/RescanProcessor.java/clean/opennms-services/src/main/java/org/opennms/netmgt/capsd/RescanProcessor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
987,
1361,
12995,
10461,
1291,
1887,
682,
12,
863,
8543,
863,
16,
971,
10461,
1291,
7134,
15366,
71,
13,
288,
3639,
9856,
613,
273,
4884,
4457,
18,
588,
1442,
12,
607,
4169,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
987,
1361,
12995,
10461,
1291,
1887,
682,
12,
863,
8543,
863,
16,
971,
10461,
1291,
7134,
15366,
71,
13,
288,
3639,
9856,
613,
273,
4884,
4457,
18,
588,
1442,
12,
607,
4169,
... |
if( antActions.size() > 0 ) | if( antActions != null && antActions.size() > 0 ) | public void afterDeletion(List files, AbstractUIProgressHandler handler) throws Exception { if( antActions.size() > 0 ) { // There are actions of the order "afterdeletion". for (int i = 0; i < antActions.size(); i++) { AntAction act = (AntAction)antActions.get(i); act.performUninstallAction(); } } } | 28044 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/28044/79590c83b49ec3a5e5f819a3119830a666b326a4/AntActionUninstallerListener.java/buggy/src/lib/com/izforge/izpack/event/AntActionUninstallerListener.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1839,
13064,
12,
682,
1390,
16,
4115,
5370,
5491,
1503,
1838,
13,
565,
1216,
1185,
225,
288,
565,
309,
12,
17841,
6100,
480,
446,
597,
17841,
6100,
18,
1467,
1435,
405,
374,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1839,
13064,
12,
682,
1390,
16,
4115,
5370,
5491,
1503,
1838,
13,
565,
1216,
1185,
225,
288,
565,
309,
12,
17841,
6100,
480,
446,
597,
17841,
6100,
18,
1467,
1435,
405,
374,
... |
public ConnectDialog(Frame frame) { super(frame, "Connect To Game...", true); yourNameL = new Label("Your Name:", Label.RIGHT); serverAddrL = new Label("Server Address:", Label.RIGHT); portL = new Label("Port:", Label.RIGHT); yourNameF = new TextField(Settings.lastPlayerName, 16); yourNameF.addActionListener(this); serverAddrF = new TextField(Settings.lastConnectAddr, 16); serverAddrF.addActionListener(this); portF = new TextField(Settings.lastConnectPort + "", 4); portF.addActionListener(this); okayB = new Button("Okay"); okayB.setActionCommand("done"); okayB.addActionListener(this); okayB.setSize(80, 24); cancelB = new Button("Cancel"); cancelB.setActionCommand("cancel"); cancelB.addActionListener(this); cancelB.setSize(80, 24); GridBagLayout gridbag = new GridBagLayout(); GridBagConstraints c = new GridBagConstraints(); setLayout(gridbag); c.fill = GridBagConstraints.NONE; c.weightx = 0.0; c.weighty = 0.0; c.insets = new Insets(5, 5, 5, 5); c.gridwidth = 1; c.anchor = GridBagConstraints.EAST; gridbag.setConstraints(yourNameL, c); add(yourNameL); c.gridwidth = GridBagConstraints.REMAINDER; c.anchor = GridBagConstraints.WEST; gridbag.setConstraints(yourNameF, c); add(yourNameF); c.gridwidth = 1; c.anchor = GridBagConstraints.EAST; gridbag.setConstraints(serverAddrL, c); add(serverAddrL); c.gridwidth = GridBagConstraints.REMAINDER; c.anchor = GridBagConstraints.WEST; gridbag.setConstraints(serverAddrF, c); add(serverAddrF); c.gridwidth = 1; c.anchor = GridBagConstraints.EAST; gridbag.setConstraints(portL, c); add(portL); c.gridwidth = GridBagConstraints.REMAINDER; c.anchor = GridBagConstraints.WEST; gridbag.setConstraints(portF, c); add(portF); c.ipadx = 20; c.ipady = 5; c.gridwidth = 1; c.anchor = GridBagConstraints.CENTER; gridbag.setConstraints(okayB, c); add(okayB); c.gridwidth = GridBagConstraints.REMAINDER; gridbag.setConstraints(cancelB, c); add(cancelB); pack(); setResizable(false); setLocation(frame.getLocation().x + frame.getSize().width/2 - getSize().width/2, frame.getLocation().y + frame.getSize().height/2 - getSize().height/2); } | 3464 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3464/d7aa695a7511ae9edf5983c3cfd1b2959eaf677e/MegaMek.java/buggy/megamek/src/megamek/MegaMek.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
8289,
6353,
12,
3219,
2623,
13,
288,
3639,
2240,
12,
3789,
16,
315,
5215,
2974,
14121,
7070,
16,
638,
1769,
7734,
3433,
461,
48,
273,
394,
5287,
2932,
15446,
1770,
2773,
16,
5287,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8289,
6353,
12,
3219,
2623,
13,
288,
3639,
2240,
12,
3789,
16,
315,
5215,
2974,
14121,
7070,
16,
638,
1769,
7734,
3433,
461,
48,
273,
394,
5287,
2932,
15446,
1770,
2773,
16,
5287,
... | ||
if (oBP.getAtomCount() > 0) { oSet.addAtomContainer(oBP); oModel.setSetOfMolecules(oSet); oSeq.addChemModel(oModel); oBP = new PDBPolymer(); oModel = oFile.getBuilder().newChemModel(); oSet = oFile.getBuilder().newMoleculeSet(); | if (isProteinStructure) { if (oBP.getAtomCount() > 0) { oSet.addAtomContainer(oBP); oModel.setSetOfMolecules(oSet); oSeq.addChemModel(oModel); oBP = new PDBPolymer(); oModel = oFile.getBuilder().newChemModel(); oSet = oFile.getBuilder().newMoleculeSet(); } } else { if (molecularStructure.getAtomCount() > 0) { oSet.addAtomContainer(molecularStructure); oModel.setSetOfMolecules(oSet); oSeq.addChemModel(oModel); molecularStructure = oFile.getBuilder().newMolecule(); oModel = oFile.getBuilder().newChemModel(); oSet = oFile.getBuilder().newMoleculeSet(); } | private IChemFile readChemFile(IChemFile oFile) { // initialize all containers IChemSequence oSeq = oFile.getBuilder().newChemSequence(); IChemModel oModel = oFile.getBuilder().newChemModel(); IMoleculeSet oSet = oFile.getBuilder().newMoleculeSet(); // some variables needed String cCol; PDBAtom oAtom; PDBPolymer oBP = new PDBPolymer(); StringBuffer cResidue; String oObj; IMonomer oMonomer; String cRead = ""; char chain = 'A'; // To ensure stringent name giving of monomers IStrand oStrand; int lineLength = 0; atomNumberMap = new Hashtable(); // do the reading of the Input try { do { cRead = _oInput.readLine(); logger.debug("Read line: ", cRead); if (cRead != null) { lineLength = cRead.length(); if (lineLength < 80) { logger.warn("Line is not of the expected length 80!"); } // make sure the record name is 6 characters long if (lineLength < 6) { cRead = cRead + " "; } // check the first column to decide what to do cCol = cRead.substring(0,6); if ("ATOM ".equalsIgnoreCase(cCol)) { // read an atom record oAtom = readAtom(cRead, lineLength); // construct a string describing the residue cResidue = new StringBuffer(8); oObj = oAtom.getResName(); if (oObj != null) { cResidue = cResidue.append(oObj.trim()); } oObj = oAtom.getChainID(); if (oObj != null) { // cResidue = cResidue.append(((String)oObj).trim()); cResidue = cResidue.append(String.valueOf(chain)); } oObj = oAtom.getResSeq(); if (oObj != null) { cResidue = cResidue.append(oObj.trim()); } // search for an existing strand or create a new one. oStrand = oBP.getStrand(String.valueOf(chain)); if (oStrand == null) { oStrand = new PDBStrand(); oStrand.setStrandName(String.valueOf(chain)); } // search for an existing monomer or create a new one. oMonomer = oBP.getMonomer(cResidue.toString(), String.valueOf(chain)); if (oMonomer == null) { PDBMonomer monomer = new PDBMonomer(); monomer.setMonomerName(cResidue.toString()); monomer.setMonomerType(oAtom.getResName()); monomer.setChainID(oAtom.getChainID()); monomer.setICode(oAtom.getICode()); oMonomer = monomer; } // add the atom oBP.addAtom(oAtom, oMonomer, oStrand); if (readConnect.isSet() && atomNumberMap.put(new Integer(oAtom.getSerial()), oAtom) != null) { logger.warn("Duplicate serial ID found for atom: ", oAtom); }// logger.debug("Added ATOM: ", oAtom); /** As HETATMs cannot be considered to either belong to a certain monomer or strand, * they are dealt with seperately.*/ } else if("HETATM".equalsIgnoreCase(cCol)) { // read an atom record oAtom = readAtom(cRead, lineLength); oAtom.setHetAtom(true); oBP.addAtom(oAtom); if (atomNumberMap.put(new Integer(oAtom.getSerial()), oAtom) != null) { logger.warn("Duplicate serial ID found for atom: ", oAtom); } logger.debug("Added HETATM: ", oAtom); } else if ("TER ".equalsIgnoreCase(cCol)) { // start new strand chain++; oStrand = new PDBStrand(); oStrand.setStrandName(String.valueOf(chain)); logger.debug("Added new STRAND"); } else if ("END ".equalsIgnoreCase(cCol)) { atomNumberMap.clear(); // create bonds and finish the molecule if (useRebondTool.isSet()) { try { if(!createBondsWithRebondTool(oBP)) { // Get rid of all potentially created bonds. logger.info("Bonds could not be created using the RebondTool when PDB file was read."); oBP.removeAllBonds(); } } catch (Exception exception) { logger.info("Bonds could not be created when PDB file was read."); logger.debug(exception); } } oSet.addMolecule(oBP); // oBP = new BioPolymer(); // } else if (cCol.equals("USER ")) { // System.out.println(cLine); // System.out.println(cLine); // } else if (cCol.equals("ENDMDL")) { // System.out.println(cLine); } else if (cCol.equals("MODEL ")) { // OK, start a new model and save the current one first *if* it contains atoms if (oBP.getAtomCount() > 0) { // save the model oSet.addAtomContainer(oBP); oModel.setSetOfMolecules(oSet); oSeq.addChemModel(oModel); // setup a new one oBP = new PDBPolymer(); oModel = oFile.getBuilder().newChemModel(); oSet = oFile.getBuilder().newMoleculeSet(); } } else if ("REMARK".equalsIgnoreCase(cCol)) { Object comment = oFile.getProperty(CDKConstants.COMMENT); if (comment == null) { comment = ""; } if (lineLength >12) { comment = comment.toString() + cRead.substring(11).trim() + "\n"; oFile.setProperty(CDKConstants.COMMENT, comment); } else { logger.warn("REMARK line found without any comment!"); } } else if ("COMPND".equalsIgnoreCase(cCol)) { String title = cRead.substring(10).trim(); oFile.setProperty(CDKConstants.TITLE, title); } /************************************************************* * Read connectivity information from CONECT records. * Only covalent bonds are dealt with. Perhaps salt bridges * should be dealt with in the same way..? */ else if (readConnect.isSet() && "CONECT".equalsIgnoreCase(cCol)) { cRead.trim(); if (cRead.length() < 16) { logger.debug("Skipping unexpected empty CONECT line! : ", cRead); } else { String bondAtom = cRead.substring(7, 11).trim(); int bondAtomNo = Integer.parseInt(bondAtom); String bondedAtom = cRead.substring(12, 16).trim(); int bondedAtomNo = -1; try {bondedAtomNo = Integer.parseInt(bondedAtom);} catch(Exception e) {bondedAtomNo = -1;} if(bondedAtomNo != -1) { addBond(oBP, bondAtomNo, bondedAtomNo); logger.warn("Bonded " + bondAtomNo + " with " + bondedAtomNo); } if(cRead.length() > 17) { bondedAtom = cRead.substring(17, 21); bondedAtom = bondedAtom.trim(); try {bondedAtomNo = Integer.parseInt(bondedAtom);} catch(Exception e) {bondedAtomNo = -1;} if(bondedAtomNo != -1) { addBond(oBP, bondAtomNo, bondedAtomNo); logger.warn("Bonded " + bondAtomNo + " with " + bondedAtomNo); } } if(cRead.length() > 22) { bondedAtom = cRead.substring(22, 26); bondedAtom = bondedAtom.trim(); try {bondedAtomNo = Integer.parseInt(bondedAtom);} catch(Exception e) {bondedAtomNo = -1;} if(bondedAtomNo != -1) { addBond(oBP, bondAtomNo, bondedAtomNo); logger.warn("Bonded " + bondAtomNo + " with " + bondedAtomNo); } } if(cRead.length() > 27) { bondedAtom = cRead.substring(27, 31); bondedAtom = bondedAtom.trim(); try {bondedAtomNo = Integer.parseInt(bondedAtom);} catch(Exception e) {bondedAtomNo = -1;} if(bondedAtomNo != -1) { addBond(oBP, bondAtomNo, bondedAtomNo); logger.warn("Bonded " + bondAtomNo + " with " + bondedAtomNo); } } } } /*************************************************************/ else if ("HELIX ".equalsIgnoreCase(cCol)) {// HELIX 1 H1A CYS A 11 LYS A 18 1 RESIDUE 18 HAS POSITIVE PHI 1D66 72// 1 2 3 4 5 6 7// 01234567890123456789012345678901234567890123456789012345678901234567890123456789 PDBStructure structure = new PDBStructure(); structure.setStructureType(PDBStructure.HELIX); structure.setStartChainID(cRead.charAt(19)); structure.setStartSequenceNumber(Integer.parseInt(cRead.substring(21, 25).trim())); structure.setStartInsertionCode(cRead.charAt(25)); structure.setEndChainID(cRead.charAt(31)); structure.setEndSequenceNumber(Integer.parseInt(cRead.substring(33, 37).trim())); structure.setEndInsertionCode(cRead.charAt(37)); oBP.addStructure(structure); } else if ("SHEET ".equalsIgnoreCase(cCol)) { PDBStructure structure = new PDBStructure(); structure.setStructureType(PDBStructure.SHEET); structure.setStartChainID(cRead.charAt(21)); structure.setStartSequenceNumber(Integer.parseInt(cRead.substring(22, 26).trim())); structure.setStartInsertionCode(cRead.charAt(26)); structure.setEndChainID(cRead.charAt(32)); structure.setEndSequenceNumber(Integer.parseInt(cRead.substring(33, 37).trim())); structure.setEndInsertionCode(cRead.charAt(37)); oBP.addStructure(structure); } else if ("TURN ".equalsIgnoreCase(cCol)) { PDBStructure structure = new PDBStructure(); structure.setStructureType(PDBStructure.TURN); structure.setStartChainID(cRead.charAt(19)); structure.setStartSequenceNumber(Integer.parseInt(cRead.substring(20, 24).trim())); structure.setStartInsertionCode(cRead.charAt(24)); structure.setEndChainID(cRead.charAt(30)); structure.setEndSequenceNumber(Integer.parseInt(cRead.substring(31, 35).trim())); structure.setEndInsertionCode(cRead.charAt(35)); oBP.addStructure(structure); } // ignore all other commands } } while (_oInput.ready() && (cRead != null)); } catch (Exception e) { logger.error("Found a problem at line:\n"); logger.error(cRead); logger.error("01234567890123456789012345678901234567890123456789012345678901234567890123456789"); logger.error(" 1 2 3 4 5 6 7 "); logger.error(" error: " + e.getMessage()); logger.debug(e); } // try to close the Input try { _oInput.close(); } catch (Exception e) { logger.debug(e); } // Set all the dependencies oModel.setSetOfMolecules(oSet); oSeq.addChemModel(oModel); oFile.addChemSequence(oSeq); return oFile; } | 45167 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45167/c0618c2e15c8ce542d36d2c23510fc6118bdeb2b/PDBReader.java/buggy/src/org/openscience/cdk/io/PDBReader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
29681,
812,
855,
20200,
812,
12,
45,
20200,
812,
320,
812,
13,
225,
202,
95,
202,
202,
759,
4046,
777,
8475,
202,
202,
45,
20200,
4021,
320,
6926,
273,
320,
812,
18,
588,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
29681,
812,
855,
20200,
812,
12,
45,
20200,
812,
320,
812,
13,
225,
202,
95,
202,
202,
759,
4046,
777,
8475,
202,
202,
45,
20200,
4021,
320,
6926,
273,
320,
812,
18,
588,
1... |
twidth = readShort(in); theight = readShort(in); | twidth = Util.readShort(in); theight = Util.readShort(in); | private Map readMPHDChunk(InputStream in) throws IOException { Map ret = null; TileSet set = new TileSet(); int major, minor; major = in.read(); minor = in.read(); in.skip(2); //skip lsb and reserved bytes - always msb ret = new Map(readShort(in), readShort(in)); ret.setOrientation(Map.MDO_ORTHO); //be sure to set the orientation! ret.addProperty("(s)fmap reader","Don't modify properties marked (s) unless you really know what you're doing."); ret.addProperty("version",""+major+"."+minor); in.skip(4); //reserved twidth = readShort(in); theight = readShort(in); set.setStandardWidth(twidth); set.setStandardHeight(theight); ret.setTileWidth(twidth); ret.setTileHeight(theight); set.setName("Static tiles"); ret.addTileset(set); int depth = readShort(in); if(depth<16) { throw new IOException("Tile bitdepths less than 16 are not supported!"); } ret.addProperty("(s)depth",""+depth); in.skip(2); int numBlocks = readShort(in); int numBlocksGfx = readShort(in); Chunk c = findChunk("BKDT"); if(c == null) { throw new IOException("No BKDT block found!"); } MapLayer ml = new MapLayer(ret, ret.getWidth(),ret.getHeight()); ml.setName("bg"); ret.addLayer(ml); ml = new MapLayer(ret, ret.getWidth(),ret.getHeight()); ml.setName("fg 1"); ret.addLayer(ml); ml = new MapLayer(ret, ret.getWidth(),ret.getHeight()); ml.setName("fg 2"); ret.addLayer(ml); ml = new MapLayer(ret, ret.getWidth(),ret.getHeight()); ml.setName("fg 3"); ret.addLayer(ml); for(int i=1;i<8;i++) { ml = new MapLayer(ret, ret.getWidth(),ret.getHeight()); ml.setName("Layer "+i); ret.addLayer(ml); } readBKDTChunk(ret, c.getInputStream(), numBlocks); c = findChunk("BGFX"); if(c != null) { readBGFXChunk(ret, c.getInputStream(), numBlocksGfx); }else{ throw new IOException("No BGFX chunk found!"); } System.out.println(ret.toString()); return ret; } | 6621 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6621/2a2629efa6f1c21cdbc32f00ce9bbe8c91090b74/MappyMapReader.java/clean/tiled/plugins/mappy/MappyMapReader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1635,
855,
4566,
44,
40,
5579,
12,
4348,
316,
13,
1216,
1860,
288,
202,
202,
863,
325,
273,
446,
31,
202,
202,
9337,
694,
444,
273,
394,
13791,
694,
5621,
202,
202,
474,
7888,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1635,
855,
4566,
44,
40,
5579,
12,
4348,
316,
13,
1216,
1860,
288,
202,
202,
863,
325,
273,
446,
31,
202,
202,
9337,
694,
444,
273,
394,
13791,
694,
5621,
202,
202,
474,
7888,
1... |
public org.quickfix.field.Pool getPool() throws FieldNotFound { org.quickfix.field.Pool value = new org.quickfix.field.Pool(); | public quickfix.field.Pool getPool() throws FieldNotFound { quickfix.field.Pool value = new quickfix.field.Pool(); | public org.quickfix.field.Pool getPool() throws FieldNotFound { org.quickfix.field.Pool value = new org.quickfix.field.Pool(); getField(value); return value; } | 5926 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5926/fecc27f98261270772ff182a1d4dfd94b5daa73d/Confirmation.java/clean/src/java/src/quickfix/fix44/Confirmation.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
2864,
28575,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
2864,
460,
273,
394,
2358,
18,
19525,
904,
18,
1518,
18,
286... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
2864,
28575,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
2864,
460,
273,
394,
2358,
18,
19525,
904,
18,
1518,
18,
286... |
SOAPHeaderBlock block2 = header.addHeaderBlock("echoMeStructRequest",hns); block2.addAttribute("xsi:type","s:SOAPStruct",null); | SOAPHeaderBlock block2 = header.addHeaderBlock("echoMeStructRequest", hns); block2.addAttribute("xsi:type", "s:SOAPStruct", null); | public SOAPEnvelope getEchoSoapEnvelope() { SOAPFactory omfactory = OMAbstractFactory.getSOAP12Factory(); SOAPEnvelope reqEnv = omfactory.createSOAPEnvelope(); //reqEnv.declareNamespace("http://schemas.xmlsoap.org/soap/envelope/", "soapenv"); reqEnv.declareNamespace("http://www.w3.org/2001/XMLSchema", "xsd"); reqEnv.declareNamespace("http://schemas.xmlsoap.org/soap/encoding/", "SOAP-ENC"); //xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" reqEnv.declareNamespace("http://www.w3.org/2001/XMLSchema-instance", "xsi"); reqEnv.declareNamespace("http://soapinterop.org/xsd", "s"); reqEnv.declareNamespace("http://soapinterop.org/","m"); reqEnv.declareNamespace("http://schemas.xmlsoap.org/wsdl/soap12/","soap12"); SOAPHeader header = omfactory.createSOAPHeader(reqEnv); OMNamespace hns= reqEnv.declareNamespace("http://soapinterop.org/echoheader/","hns"); //xmlns:m0="http://soapinterop.org/echoheader/ SOAPHeaderBlock block1 = header.addHeaderBlock("echoMeStringRequest",hns); block1.addAttribute("xsi:type","xsd:string",null); block1.addChild(omfactory.createText("string")); // header.addChild(headerChild); header.addChild(block1); SOAPHeaderBlock block2 = header.addHeaderBlock("echoMeStructRequest",hns); block2.addAttribute("xsi:type","s:SOAPStruct",null); OMElement h2Val1=omfactory.createOMElement("varString",null); h2Val1.addAttribute("xsi:type","xsd:string",null); h2Val1.addChild(omfactory.createText("string")); OMElement h2Val2=omfactory.createOMElement("varInt",null); h2Val2.addAttribute("xsi:type","xsd:int",null); h2Val2.addChild(omfactory.createText("150")); OMElement h2Val3=omfactory.createOMElement("varFloat",null); h2Val3.addAttribute("xsi:type","xsd:float",null); h2Val3.addChild(omfactory.createText("456.321")); block2.addChild(h2Val1); block2.addChild(h2Val2); block2.addChild(h2Val3); OMElement operation = omfactory.createOMElement("echoString","http://soapinterop.org/", null); //operation.setNamespace(ns); SOAPBody body = omfactory.createSOAPBody(reqEnv); body.addChild(operation); operation.addAttribute("soapenv:encodingStyle", "http://www.w3.org/2003/05/soap-encoding", null); OMElement part = omfactory.createOMElement("inputString", null); part.addAttribute("xsi:type", "xsd:string", null); part.addChild(omfactory.createText("strssfdfing1")); operation.addChild(part); //reqEnv.getBody().addChild(method); return reqEnv; } | 49300 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49300/6295a3864398ed319578fb0b345f1adafef73782/GroupcSoap12EchoStringUtil.java/buggy/modules/integration/src/test/interop/whitemesa/round2/util/soap12/GroupcSoap12EchoStringUtil.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
16434,
10862,
4774,
2599,
20601,
10862,
1435,
288,
3639,
16434,
1733,
8068,
6848,
273,
531,
5535,
3336,
1733,
18,
588,
27952,
2138,
1733,
5621,
3639,
16434,
10862,
1111,
3491,
273,
8068... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
16434,
10862,
4774,
2599,
20601,
10862,
1435,
288,
3639,
16434,
1733,
8068,
6848,
273,
531,
5535,
3336,
1733,
18,
588,
27952,
2138,
1733,
5621,
3639,
16434,
10862,
1111,
3491,
273,
8068... |
} | }*/ | public SOAPHeader getHeader() throws OMException { SOAPHeader header = (SOAPHeader) getFirstChildWithName(new QName(SOAPConstants.HEADER_LOCAL_NAME)); if (builder == null && header == null) { header = factory.createSOAPHeader(this); addChild(header); } return header; } | 49300 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49300/b96b3273abd285bc7cb292a2b726d06b3b24d936/SOAPEnvelopeImpl.java/clean/modules/doom/src/org/apache/axis2/soap/impl/dom/SOAPEnvelopeImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
16434,
1864,
7911,
1435,
1216,
28839,
503,
288,
202,
202,
27952,
1864,
1446,
273,
7734,
261,
27952,
1864,
13,
17315,
17557,
12,
2704,
16723,
12,
27952,
2918,
18,
7557,
67,
14922,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
16434,
1864,
7911,
1435,
1216,
28839,
503,
288,
202,
202,
27952,
1864,
1446,
273,
7734,
261,
27952,
1864,
13,
17315,
17557,
12,
2704,
16723,
12,
27952,
2918,
18,
7557,
67,
14922,
... |
String className, | Collection classNames, | public LaunchInfo(String projectName, int launchType, String className, Map groupMap, String suiteName, String complianceLevel, String logLevel) { m_projectName= projectName; m_launchType= launchType; m_className= className.trim(); m_groupMap= groupMap; m_suiteName= suiteName.trim(); m_complianceLevel= complianceLevel; m_logLevel= logLevel; } | 57075 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57075/d42cff6078dc81fdbe15ceb2b18037f7fa09bb58/ConfigurationHelper.java/buggy/src/main/org/testng/eclipse/ui/util/ConfigurationHelper.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
14643,
966,
12,
780,
17234,
16,
8227,
509,
8037,
559,
16,
8227,
2200,
19407,
16,
8227,
1635,
1041,
863,
16,
8227,
514,
11371,
461,
16,
8227,
514,
29443,
2355,
16,
8227,
514,
16752,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
14643,
966,
12,
780,
17234,
16,
8227,
509,
8037,
559,
16,
8227,
2200,
19407,
16,
8227,
1635,
1041,
863,
16,
8227,
514,
11371,
461,
16,
8227,
514,
29443,
2355,
16,
8227,
514,
16752,
... |
A_OpenCms.log(C_OPENCMS_INFO, "CmsTemplateCache initialized."); | if(C_DEBUG && A_OpenCms.isLogging()) { A_OpenCms.log(C_OPENCMS_INFO, "[CmsTemplateCache] Initialized successfully."); } | public CmsTemplateCache() { A_OpenCms.log(C_OPENCMS_INFO, "CmsTemplateCache initialized."); } | 51784 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51784/3c9092570e76582036deafbc4033038a73d36104/CmsTemplateCache.java/clean/src/com/opencms/launcher/CmsTemplateCache.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
2149,
2283,
1649,
1435,
288,
3639,
309,
12,
39,
67,
9394,
597,
432,
67,
3678,
4747,
18,
291,
7735,
10756,
288,
432,
67,
3678,
4747,
18,
1330,
12,
39,
67,
11437,
13802,
67,
5923,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
2149,
2283,
1649,
1435,
288,
3639,
309,
12,
39,
67,
9394,
597,
432,
67,
3678,
4747,
18,
291,
7735,
10756,
288,
432,
67,
3678,
4747,
18,
1330,
12,
39,
67,
11437,
13802,
67,
5923,
... |
public void registerUniqueID( String id, IdentityBuilder builder ) { | public void registerUniqueID( String id, MatchBuilder builder ) { | public void registerUniqueID( String id, IdentityBuilder builder ) { if( idTable.containsKey(id) ) { throw new AssertionFailedError( "duplicate invocation named \"" + id + "\"" ); } registerID( id, builder ); } | 54028 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54028/2defe1eafaa463cbe1c2691fed05e4d7e6dcdb62/Mock.java/buggy/jmock/core/src/org/jmock/Mock.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1744,
31118,
12,
514,
612,
16,
4639,
1263,
2089,
262,
288,
3639,
309,
12,
612,
1388,
18,
12298,
653,
12,
350,
13,
262,
288,
5411,
604,
394,
9067,
2925,
668,
12,
7734,
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,
377,
1071,
918,
1744,
31118,
12,
514,
612,
16,
4639,
1263,
2089,
262,
288,
3639,
309,
12,
612,
1388,
18,
12298,
653,
12,
350,
13,
262,
288,
5411,
604,
394,
9067,
2925,
668,
12,
7734,
315,
... |
if (enabledSets[i].equals(set)) | if (enabledSets[i].equals(set)) { | private boolean isWorkingSetEnabled(IWorkingSet set) { IWorkingSet[] enabledSets = getEnabledSets(); for (int i = 0; i < enabledSets.length; i++) { if (enabledSets[i].equals(set)) return true; } return false; } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/fa4a8cff0e027f8d3c6b1fcb92b30f46767dd191/SelectWorkingSetsAction.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/SelectWorkingSetsAction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
1250,
353,
14836,
694,
1526,
12,
45,
14836,
694,
444,
13,
288,
202,
202,
45,
14836,
694,
8526,
3696,
2785,
273,
336,
1526,
2785,
5621,
202,
202,
1884,
261,
474,
277,
273,
374... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1250,
353,
14836,
694,
1526,
12,
45,
14836,
694,
444,
13,
288,
202,
202,
45,
14836,
694,
8526,
3696,
2785,
273,
336,
1526,
2785,
5621,
202,
202,
1884,
261,
474,
277,
273,
374... |
buf.append("<b>UDP connections: ").append(peers.size()).append("</b><br />\n"); | buf.append("<b id=\"udpcon\">UDP connections: ").append(peers.size()).append("</b><br />\n"); | public void renderStatusHTML(Writer out) throws IOException { TreeSet peers = new TreeSet(AlphaComparator.instance()); synchronized (_peersByIdent) { peers.addAll(_peersByIdent.values()); } long offsetTotal = 0; StringBuffer buf = new StringBuffer(512); buf.append("<b>UDP connections: ").append(peers.size()).append("</b><br />\n"); buf.append("<table border=\"1\">\n"); buf.append(" <tr><td><b>peer</b></td><td><b>idle</b></td>"); buf.append(" <td><b>in/out</b></td>\n"); buf.append(" <td><b>up</b></td><td><b>skew</b></td>\n"); buf.append(" <td><b>cwnd</b></td><td><b>ssthresh</b></td>\n"); buf.append(" <td><b>rtt</b></td><td><b>dev</b></td><td><b>rto</b></td>\n"); buf.append(" <td><b>send</b></td><td><b>recv</b></td>\n"); buf.append(" <td><b>resent</b></td><td><b>dupRecv</b></td>\n"); buf.append(" </tr>\n"); out.write(buf.toString()); buf.setLength(0); long now = _context.clock().now(); for (Iterator iter = peers.iterator(); iter.hasNext(); ) { PeerState peer = (PeerState)iter.next(); if (now-peer.getLastReceiveTime() > 60*60*1000) continue; // don't include old peers buf.append("<tr>"); String name = peer.getRemotePeer().toBase64().substring(0,6); buf.append("<td valign=\"top\" nowrap=\"nowrap\"><code>"); buf.append("<a href=\"netdb.jsp#"); buf.append(name); buf.append("\">"); buf.append(name).append("@"); byte ip[] = peer.getRemoteIP(); for (int j = 0; j < ip.length; j++) { int num = ip[j] & 0xFF; if (num < 10) buf.append("00"); else if (num < 100) buf.append("0"); buf.append(num); if (j + 1 < ip.length) buf.append('.'); } buf.append(':'); int port = peer.getRemotePort(); if (port < 10) buf.append("0000"); else if (port < 100) buf.append("000"); else if (port < 1000) buf.append("00"); else if (port < 10000) buf.append("0"); buf.append(port); buf.append("</a>"); if (peer.getWeRelayToThemAs() > 0) buf.append(">"); else buf.append(" "); if (peer.getTheyRelayToUsAs() > 0) buf.append("<"); else buf.append(" "); boolean appended = false; if (_activeThrottle.isChoked(peer.getRemotePeer())) { if (!appended) buf.append("<br />"); buf.append(" [choked]"); appended = true; } if (peer.getConsecutiveFailedSends() > 0) { if (!appended) buf.append("<br />"); buf.append(" [").append(peer.getConsecutiveFailedSends()).append(" failures]"); appended = true; } if (_context.shitlist().isShitlisted(peer.getRemotePeer())) { if (!appended) buf.append("<br />"); buf.append(" [shitlisted]"); appended = true; } buf.append("</code></td>"); buf.append("<td valign=\"top\" ><code>"); buf.append((now-peer.getLastReceiveTime())/1000); buf.append("s/"); buf.append((now-peer.getLastSendTime())/1000); buf.append("s</code></td>"); buf.append("<td valign=\"top\" ><code>"); buf.append(formatKBps(peer.getReceiveBps())); buf.append("KBps/"); buf.append(formatKBps(peer.getSendBps())); buf.append("KBps "); //buf.append(formatKBps(peer.getReceiveACKBps())); //buf.append("KBps/"); //buf.append(formatKBps(peer.getSendACKBps())); //buf.append("KBps "); buf.append("</code></td>"); buf.append("<td valign=\"top\" ><code>"); buf.append(DataHelper.formatDuration(now-peer.getKeyEstablishedTime())); buf.append("</code></td>"); buf.append("<td valign=\"top\" ><code>"); buf.append(peer.getClockSkew()/1000); buf.append("s</code></td>"); offsetTotal = offsetTotal + peer.getClockSkew(); buf.append("<td valign=\"top\" ><code>"); buf.append(peer.getSendWindowBytes()/1024); buf.append("K</code></td>"); buf.append("<td valign=\"top\" ><code>"); buf.append(peer.getSlowStartThreshold()/1024); buf.append("K</code></td>"); buf.append("<td valign=\"top\" ><code>"); buf.append(peer.getRTT()); buf.append("</code></td>"); buf.append("<td valign=\"top\" ><code>"); buf.append(peer.getRTTDeviation()); buf.append("</code></td>"); buf.append("<td valign=\"top\" ><code>"); buf.append(peer.getRTO()); buf.append("</code></td>"); buf.append("<td valign=\"top\" ><code>"); buf.append(peer.getPacketsTransmitted()); buf.append("</code></td>"); buf.append("<td valign=\"top\" ><code>"); buf.append(peer.getPacketsReceived()); buf.append("</code></td>"); double sent = (double)peer.getPacketsPeriodTransmitted(); double sendLostPct = 0; if (sent > 0) sendLostPct = (double)peer.getPacketsRetransmitted()/(sent); buf.append("<td valign=\"top\" ><code>"); //buf.append(formatPct(sendLostPct)); buf.append(peer.getPacketsRetransmitted()); // + "/" + peer.getPacketsPeriodRetransmitted() + "/" + sent); //buf.append(peer.getPacketRetransmissionRate()); buf.append("</code></td>"); double recvDupPct = (double)peer.getPacketsReceivedDuplicate()/(double)peer.getPacketsReceived(); buf.append("<td valign=\"top\" ><code>"); buf.append(formatPct(recvDupPct)); buf.append("</code></td>"); buf.append("</tr>"); out.write(buf.toString()); buf.setLength(0); } out.write("</table>\n"); buf.append("<b>Average clock skew, UDP peers:"); if (peers.size() > 0) buf.append(offsetTotal / peers.size()).append("ms</b><br><br>\n"); else buf.append("n/a</b><br><br>\n"); out.write(buf.toString()); buf.setLength(0); } | 3808 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3808/aef33548b35848b46991ab14cf8ddde142c982e1/UDPTransport.java/buggy/router/java/src/net/i2p/router/transport/udp/UDPTransport.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1743,
1482,
4870,
12,
2289,
596,
13,
1216,
1860,
288,
3639,
19461,
10082,
273,
394,
19461,
12,
9690,
5559,
18,
1336,
10663,
3639,
3852,
261,
67,
30502,
5132,
319,
13,
288,
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,
1743,
1482,
4870,
12,
2289,
596,
13,
1216,
1860,
288,
3639,
19461,
10082,
273,
394,
19461,
12,
9690,
5559,
18,
1336,
10663,
3639,
3852,
261,
67,
30502,
5132,
319,
13,
288,
5411... |
Boolean b = getBooleanArg(evaluator, args, 0); return (b == null) ? null : b.booleanValue() ? Boolean.FALSE : Boolean.TRUE; | Boolean b1 = getBooleanArg(evaluator, args, 0); if ((b1 != null) && !b1.booleanValue()) { return Boolean.FALSE; } Boolean b2 = getBooleanArg(evaluator, args, 1); if ((b2 != null) && !b2.booleanValue()) { return Boolean.FALSE; } if (b1 == null || b2 == null) { return null; } return Boolean.valueOf(b1.booleanValue() && b2.booleanValue()); | public Object evaluate(Evaluator evaluator, Exp[] args) { Boolean b = getBooleanArg(evaluator, args, 0); return (b == null) ? null : b.booleanValue() ? Boolean.FALSE : Boolean.TRUE; } | 4891 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4891/8ce2540c398f87f14f1a0a792bb7fcaef78a148a/BuiltinFunTable.java/clean/src/main/mondrian/olap/fun/BuiltinFunTable.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
1033,
5956,
12,
15876,
18256,
16,
7784,
8526,
833,
13,
288,
7734,
3411,
324,
273,
12835,
4117,
12,
14168,
639,
16,
833,
16,
374,
1769,
7734,
327,
261,
70,
422,
446,
13,
692,
1349... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2398,
1071,
1033,
5956,
12,
15876,
18256,
16,
7784,
8526,
833,
13,
288,
7734,
3411,
324,
273,
12835,
4117,
12,
14168,
639,
16,
833,
16,
374,
1769,
7734,
327,
261,
70,
422,
446,
13,
692,
1349... |
public org.quickfix.field.NestedPartySubID get(org.quickfix.field.NestedPartySubID value) | public quickfix.field.NestedPartySubID get(quickfix.field.NestedPartySubID value) | public org.quickfix.field.NestedPartySubID get(org.quickfix.field.NestedPartySubID value) throws FieldNotFound { getField(value); return value; } | 8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/QuoteRequest.java/buggy/src/java/src/quickfix/fix44/QuoteRequest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
9549,
904,
18,
1518,
18,
8649,
17619,
1676,
734,
336,
12,
19525,
904,
18,
1518,
18,
8649,
17619,
1676,
734,
225,
460,
13,
565,
1216,
2286,
2768,
225,
288,
5031,
12,
1132,
1769,
32... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
282,
1071,
9549,
904,
18,
1518,
18,
8649,
17619,
1676,
734,
336,
12,
19525,
904,
18,
1518,
18,
8649,
17619,
1676,
734,
225,
460,
13,
565,
1216,
2286,
2768,
225,
288,
5031,
12,
1132,
1769,
32... |
lblDatePattern.setText("Pattern:"); | lblDatePattern.setText(Messages.getString("FormatSpecifierComposite.Lbl.DatePattern")); | private void placeComponents() { // Layout for the content composite GridLayout glContent = new GridLayout(); glContent.numColumns = 2; glContent.marginHeight = 7; glContent.marginWidth = 7; glContent.horizontalSpacing = 5; glContent.verticalSpacing = 5; // Layout for the details composite slStandardDetails = new StackLayout(); // Layout for the details composite slAdvancedDetails = new StackLayout(); this.setLayout(glContent); Label lblDataType = new Label(this, SWT.NONE); GridData gdLBLDataType = new GridData(); lblDataType.setLayoutData(gdLBLDataType); lblDataType.setText("Data Type:"); cmbDataType = new Combo(this, SWT.DROP_DOWN | SWT.READ_ONLY); GridData gdCMBDataType = new GridData(GridData.FILL_HORIZONTAL); cmbDataType.setLayoutData(gdCMBDataType); cmbDataType.addSelectionListener(this); btnUndefined = new Button(this, SWT.RADIO); GridData gdBTNUndefined = new GridData(GridData.FILL_HORIZONTAL); gdBTNUndefined.horizontalSpan = 2; btnUndefined.setLayoutData(gdBTNUndefined); btnUndefined.setText("Undefined"); btnUndefined.addSelectionListener(this); Label lblDummyStandard = new Label(this, SWT.NONE); GridData gdLBLDummyStandard = new GridData(); gdLBLDummyStandard.horizontalSpan = 2; gdLBLDummyStandard.heightHint = 10; lblDummyStandard.setLayoutData(gdLBLDummyStandard); btnStandard = new Button(this, SWT.RADIO); GridData gdBTNStandard = new GridData(GridData.FILL_HORIZONTAL); gdBTNStandard.horizontalSpan = 2; btnStandard.setLayoutData(gdBTNStandard); btnStandard.setText("Standard"); btnStandard.addSelectionListener(this); cmpStandardDetails = new Composite(this, SWT.NONE); GridData gdCMPStandardDetails = new GridData(GridData.FILL_BOTH); gdCMPStandardDetails.horizontalIndent = 16; gdCMPStandardDetails.horizontalSpan = 2; cmpStandardDetails.setLayoutData(gdCMPStandardDetails); cmpStandardDetails.setLayout(slStandardDetails); // Date/Time details Composite GridLayout glDate = new GridLayout(); glDate.verticalSpacing = 5; glDate.marginHeight = 0; glDate.marginWidth = 0; cmpStandardDateDetails = new Composite(cmpStandardDetails, SWT.NONE); cmpStandardDateDetails.setLayout(glDate); // Date/Time Standard Composite // Layout GridLayout glDateStandard = new GridLayout(); glDateStandard.verticalSpacing = 5; glDateStandard.numColumns = 2; glDateStandard.marginHeight = 2; glDateStandard.marginWidth = 2; cmpDateStandard = new Composite(cmpStandardDateDetails, SWT.NONE); GridData gdGRPDateStandard = new GridData(GridData.FILL_BOTH); cmpDateStandard.setLayoutData(gdGRPDateStandard); cmpDateStandard.setLayout(glDateStandard); Label lblDateType = new Label(cmpDateStandard, SWT.NONE); GridData gdLBLDateType = new GridData(); lblDateType.setLayoutData(gdLBLDateType); lblDateType.setText("Type:"); cmbDateType = new Combo(cmpDateStandard, SWT.DROP_DOWN | SWT.READ_ONLY); GridData gdCMBDateType = new GridData(GridData.FILL_HORIZONTAL); cmbDateType.setLayoutData(gdCMBDateType); cmbDateType.addSelectionListener(this); Label lblDateDetails = new Label(cmpDateStandard, SWT.NONE); GridData gdLBLDateDetails = new GridData(); lblDateDetails.setLayoutData(gdLBLDateDetails); lblDateDetails.setText("Details:"); cmbDateForm = new Combo(cmpDateStandard, SWT.DROP_DOWN | SWT.READ_ONLY); GridData gdCMBDateForm = new GridData(GridData.FILL_HORIZONTAL); cmbDateForm.setLayoutData(gdCMBDateForm); cmbDateForm.addSelectionListener(this); // Number details Composite GridLayout glNumber = new GridLayout(); glNumber.verticalSpacing = 5; glNumber.marginHeight = 0; glNumber.marginWidth = 0; cmpStandardNumberDetails = new Composite(cmpStandardDetails, SWT.NONE); cmpStandardNumberDetails.setLayout(glNumber); // Number Standard Composite // Layout GridLayout glNumberStandard = new GridLayout(); glNumberStandard.verticalSpacing = 5; glNumberStandard.numColumns = 4; glNumberStandard.marginHeight = 2; glNumberStandard.marginWidth = 2; cmpNumberStandard = new Composite(cmpStandardNumberDetails, SWT.NONE); GridData gdGRPNumberStandard = new GridData(GridData.FILL_BOTH); cmpNumberStandard.setLayoutData(gdGRPNumberStandard); cmpNumberStandard.setLayout(glNumberStandard); Label lblPrefix = new Label(cmpNumberStandard, SWT.NONE); GridData gdLBLPrefix = new GridData(); lblPrefix.setLayoutData(gdLBLPrefix); lblPrefix.setText("Prefix:"); txtPrefix = new Text(cmpNumberStandard, SWT.BORDER | SWT.SINGLE); GridData gdTXTPrefix = new GridData(GridData.FILL_HORIZONTAL); txtPrefix.setLayoutData(gdTXTPrefix); txtPrefix.addModifyListener(this); Label lblSuffix = new Label(cmpNumberStandard, SWT.NONE); GridData gdLBLSuffix = new GridData(); lblSuffix.setLayoutData(gdLBLSuffix); lblSuffix.setText("Suffix:"); txtSuffix = new Text(cmpNumberStandard, SWT.BORDER | SWT.SINGLE); GridData gdTXTSuffix = new GridData(GridData.FILL_HORIZONTAL); txtSuffix.setLayoutData(gdTXTSuffix); txtSuffix.addModifyListener(this); Label lblMultiplier = new Label(cmpNumberStandard, SWT.NONE); GridData gdLBLMultiplier = new GridData(); lblMultiplier.setLayoutData(gdLBLMultiplier); lblMultiplier.setText("Multiplier:"); txtMultiplier = new Text(cmpNumberStandard, SWT.BORDER | SWT.SINGLE); GridData gdTXTMultiplier = new GridData(GridData.FILL_HORIZONTAL); txtMultiplier.setLayoutData(gdTXTMultiplier); txtMultiplier.addModifyListener(this); Label lblFractionDigit = new Label(cmpNumberStandard, SWT.NONE); GridData gdLBLFractionDigit = new GridData(); lblFractionDigit.setLayoutData(gdLBLFractionDigit); lblFractionDigit.setText("Fraction Digits:"); iscFractionDigits = new IntegerSpinControl(cmpNumberStandard, SWT.NONE, 2); GridData gdISCFractionDigits = new GridData(GridData.FILL_HORIZONTAL); iscFractionDigits.setLayoutData(gdISCFractionDigits); iscFractionDigits.addListener(this); Label lblDummyAdvanced = new Label(this, SWT.NONE); GridData gdLBLDummyAdvanced = new GridData(); gdLBLDummyAdvanced.horizontalSpan = 2; gdLBLDummyAdvanced.heightHint = 10; lblDummyAdvanced.setLayoutData(gdLBLDummyAdvanced); btnAdvanced = new Button(this, SWT.RADIO); GridData gdBTNAdvanced = new GridData(GridData.FILL_HORIZONTAL); gdBTNAdvanced.horizontalSpan = 2; btnAdvanced.setLayoutData(gdBTNAdvanced); btnAdvanced.setText("Advanced"); btnAdvanced.addSelectionListener(this); cmpAdvancedDetails = new Composite(this, SWT.NONE); GridData gdCMPAdvancedDetails = new GridData(GridData.FILL_BOTH); gdCMPAdvancedDetails.horizontalIndent = 16; gdCMPAdvancedDetails.horizontalSpan = 2; cmpAdvancedDetails.setLayoutData(gdCMPAdvancedDetails); cmpAdvancedDetails.setLayout(slAdvancedDetails); // Date/Time details Composite GridLayout glAdvDate = new GridLayout(); glAdvDate.verticalSpacing = 5; glAdvDate.marginHeight = 0; glAdvDate.marginWidth = 0; cmpAdvancedDateDetails = new Composite(cmpAdvancedDetails, SWT.NONE); cmpAdvancedDateDetails.setLayout(glAdvDate); // Date/Time Advanced Composite // Layout GridLayout glDateAdvanced = new GridLayout(); glDateAdvanced.verticalSpacing = 5; glDateAdvanced.numColumns = 2; glDateAdvanced.marginHeight = 2; glDateAdvanced.marginWidth = 2; cmpDateAdvanced = new Composite(cmpAdvancedDateDetails, SWT.NONE); GridData gdGRPDateAdvanced = new GridData(GridData.FILL_BOTH); cmpDateAdvanced.setLayoutData(gdGRPDateAdvanced); cmpDateAdvanced.setLayout(glDateAdvanced); Label lblDatePattern = new Label(cmpDateAdvanced, SWT.NONE); GridData gdLBLDatePattern = new GridData(); lblDatePattern.setLayoutData(gdLBLDatePattern); lblDatePattern.setText("Pattern:"); txtDatePattern = new Text(cmpDateAdvanced, SWT.BORDER | SWT.SINGLE); GridData gdTXTDatePattern = new GridData(GridData.FILL_HORIZONTAL); txtDatePattern.setLayoutData(gdTXTDatePattern); txtDatePattern.addModifyListener(this); // Number details Composite GridLayout glAdvNumber = new GridLayout(); glAdvNumber.verticalSpacing = 5; glAdvNumber.marginHeight = 0; glAdvNumber.marginWidth = 0; cmpAdvancedNumberDetails = new Composite(cmpAdvancedDetails, SWT.NONE); cmpAdvancedNumberDetails.setLayout(glAdvNumber); // Number Advanced Composite // Layout GridLayout glNumberAdvanced = new GridLayout(); glNumberAdvanced.verticalSpacing = 5; glNumberAdvanced.numColumns = 2; glNumberAdvanced.marginHeight = 2; glNumberAdvanced.marginWidth = 2; cmpNumberAdvanced = new Composite(cmpAdvancedNumberDetails, SWT.NONE); GridData gdGRPNumberAdvanced = new GridData(GridData.FILL_BOTH); cmpNumberAdvanced.setLayoutData(gdGRPNumberAdvanced); cmpNumberAdvanced.setLayout(glNumberAdvanced); Label lblAdvMultiplier = new Label(cmpNumberAdvanced, SWT.NONE); GridData gdLBLAdvMultiplier = new GridData(); lblAdvMultiplier.setLayoutData(gdLBLAdvMultiplier); lblAdvMultiplier.setText("Multiplier:"); txtAdvMultiplier = new Text(cmpNumberAdvanced, SWT.BORDER | SWT.SINGLE); GridData gdTXTAdvMultiplier = new GridData(GridData.FILL_HORIZONTAL); txtAdvMultiplier.setLayoutData(gdTXTAdvMultiplier); txtAdvMultiplier.addModifyListener(this); Label lblNumberPattern = new Label(cmpNumberAdvanced, SWT.NONE); GridData gdLBLNumberPattern = new GridData(); lblNumberPattern.setLayoutData(gdLBLNumberPattern); lblNumberPattern.setText("Pattern:"); txtNumberPattern = new Text(cmpNumberAdvanced, SWT.BORDER | SWT.SINGLE); GridData gdTXTNumberPattern = new GridData(GridData.FILL_HORIZONTAL); txtNumberPattern.setLayoutData(gdTXTNumberPattern); txtNumberPattern.addModifyListener(this); populateLists(); } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/7793e94b4d7fab5891f226c6c937e37d85bebad8/FormatSpecifierComposite.java/buggy/chart/org.eclipse.birt.chart.ui.extension/src/org/eclipse/birt/chart/ui/swt/composites/FormatSpecifierComposite.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
3166,
7171,
1435,
565,
288,
3639,
368,
9995,
364,
326,
913,
9635,
3639,
7145,
3744,
5118,
1350,
273,
394,
7145,
3744,
5621,
3639,
5118,
1350,
18,
2107,
3380,
273,
576,
31,
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,
3238,
918,
3166,
7171,
1435,
565,
288,
3639,
368,
9995,
364,
326,
913,
9635,
3639,
7145,
3744,
5118,
1350,
273,
394,
7145,
3744,
5621,
3639,
5118,
1350,
18,
2107,
3380,
273,
576,
31,
3639... |
return readers[index].isInterleaved(id); | return readers[current].isInterleaved(id); | public boolean isInterleaved(String id) throws FormatException, IOException { if (!id.equals(currentId)) initFile(id); return readers[index].isInterleaved(id); } | 55415 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55415/76f0f24f6d6757c1f4133a42b987de82878422c1/ImageReader.java/buggy/loci/formats/ImageReader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1250,
353,
2465,
22593,
12,
780,
612,
13,
1216,
4077,
503,
16,
1860,
288,
565,
309,
16051,
350,
18,
14963,
12,
2972,
548,
3719,
1208,
812,
12,
350,
1769,
565,
327,
16527,
63,
2972... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1250,
353,
2465,
22593,
12,
780,
612,
13,
1216,
4077,
503,
16,
1860,
288,
565,
309,
16051,
350,
18,
14963,
12,
2972,
548,
3719,
1208,
812,
12,
350,
1769,
565,
327,
16527,
63,
2972... |
return curCommandName; | return curCommandName; | public String getCommandName() { return curCommandName; } | 47102 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47102/d4f817efab178e73e483e869f48c06a7985ceadf/SMTPHandler.java/buggy/sandbox/handlerapi2/src/java/org/apache/james/smtpserver/SMTPHandler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
12856,
461,
1435,
288,
565,
327,
662,
2189,
461,
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,
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,
514,
12856,
461,
1435,
288,
565,
327,
662,
2189,
461,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
public static int getFloatDistance(Box line, List floatsList, BlockFormattingContext bfc) { //Uu.p("---\n---\ngetting the float distance for line: " + line + " " + line.element); //Uu.p(floatsList); //Uu.dump_stack(); // if if (floatsList.size() == 0) { //Uu.p("returning nada"); return 0; } int xoff = 0; // create a rectangle for the line we are attempting to adjust Rectangle lr = new Rectangle(line.x,line.y,line.width,line.height); // this is a hack to deal with lines w/o width or height. is this valid? // possibly, since the line doesn't know how long it should be until it's already // done float adjustments if(line.width == 0) { lr.width = 10; } if(line.height == 0) { lr.height = 10; } //Uu.p("line rect = " + lr); Point lpt = new Point(bfc.x, bfc.y); //Uu.p("trans by: " + lpt); // convert to abs coords lr.translate(-lpt.x,-lpt.y); //Uu.p("line rect = " + lr); // josh: note. this code doesn't handle floats on the same line! // loop through all of the floats for (int i = 0; i < floatsList.size(); i++) { // get the current float Box floater = (Box) floatsList.get(i); //Uu.p("the floater = " + floater); // create a rect from the box Rectangle fr = new Rectangle(floater.x,floater.y,floater.width,floater.height); //Uu.p("float rect: " + fr); // get the point where the float was added Point fpt = bfc.getOffset(floater); // get the origin of this BFC //Uu.p("fpt = " + fpt + " lpt = " + lpt); // convert to abs coords fr.translate(-fpt.x,-fpt.y); //Uu.p("float rect: " + fr); // if the line is lower than bottom of the floater // josh: is this calc right? shouldn't floater.y be in there somewhere? if(lr.intersects(fr)) { //Uu.p("it intersects!"); lr.translate(fr.width,0); xoff+=fr.width; //Uu.p("new lr = " + lr); } //Uu.p("xoff = " + xoff); } //Uu.p("final val = " + xoff); return xoff; } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/bb9b81ee7be6601404028f6f9847b6ba41abcd98/FloatManager.java/buggy/src/java/org/xhtmlrenderer/layout/FloatManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
509,
28276,
7200,
12,
3514,
980,
16,
987,
19172,
682,
16,
3914,
23974,
1042,
324,
7142,
13,
288,
202,
202,
759,
57,
89,
18,
84,
2932,
6062,
64,
82,
6062,
64,
82,
588,
1787,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
28276,
7200,
12,
3514,
980,
16,
987,
19172,
682,
16,
3914,
23974,
1042,
324,
7142,
13,
288,
202,
202,
759,
57,
89,
18,
84,
2932,
6062,
64,
82,
6062,
64,
82,
588,
1787,... | ||
return forAll0((BuDDyBDD) var); | BuDDyBDD c = (BuDDyBDD) var; int b = forAll0(_id, c._id); return new BuDDyBDD(b); | public BDD forAll(BDD var) { return forAll0((BuDDyBDD) var); } | 5661 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5661/9e78dd73c47b7dc5ac8d538c75e248e38438693d/BuDDyFactory.java/clean/JavaBDD/org/sf/javabdd/BuDDyFactory.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
605,
5698,
364,
1595,
12,
38,
5698,
569,
13,
288,
5411,
605,
89,
5698,
93,
38,
5698,
276,
273,
261,
38,
89,
5698,
93,
38,
5698,
13,
569,
31,
509,
324,
273,
364,
1595,
20,
2489... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
605,
5698,
364,
1595,
12,
38,
5698,
569,
13,
288,
5411,
605,
89,
5698,
93,
38,
5698,
276,
273,
261,
38,
89,
5698,
93,
38,
5698,
13,
569,
31,
509,
324,
273,
364,
1595,
20,
2489... |
for( Vector rowVector : (Vector<Vector>) this.getDataVector() ){ | for( Vector rowVector : tableVector ){ | public void generateSettings(Object settings, boolean validateOnly) throws Exception{ List elemList = new ArrayList(); ProtoFilterPattern newElem = null; for( Vector rowVector : (Vector<Vector>) this.getDataVector() ){ newElem = (ProtoFilterPattern) rowVector.elementAt(9); newElem.setCategory( (String) rowVector.elementAt(2) ); newElem.setProtocol( (String) rowVector.elementAt(3) ); newElem.setBlocked( (Boolean) rowVector.elementAt(4) ); newElem.setLog( (Boolean) rowVector.elementAt(5) ); newElem.setDescription( (String) rowVector.elementAt(6) ); newElem.setDefinition( (String) rowVector.elementAt(7) ); newElem.setQuality( (String) rowVector.elementAt(8) ); elemList.add(newElem); } // SAVE SETTINGS //////// if( !validateOnly ){ ProtoFilterSettings transformSettings = (ProtoFilterSettings) settings; transformSettings.setPatterns( elemList ); } } | 49954 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49954/ff039aa0a88558bd57c3af5130d7d059b60c42c3/ProtoConfigJPanel.java/buggy/tran/protofilter/main/com/metavize/tran/protofilter/gui/ProtoConfigJPanel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
2103,
2628,
12,
921,
1947,
16,
1250,
1954,
3386,
13,
1216,
1185,
95,
3639,
987,
3659,
682,
273,
394,
2407,
5621,
202,
6262,
1586,
3234,
394,
7498,
273,
446,
31,
202,
1884,
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,
1071,
918,
2103,
2628,
12,
921,
1947,
16,
1250,
1954,
3386,
13,
1216,
1185,
95,
3639,
987,
3659,
682,
273,
394,
2407,
5621,
202,
6262,
1586,
3234,
394,
7498,
273,
446,
31,
202,
1884,
12... |
innov[i]=0; | innov[i] = 0; | public int encode(final Bits bits, final float[] in) { int i; float[] mem, innov, syn_resp; float[] low_pi_gain, low_exc, low_innov; int dtx; /* Compute the two sub-bands by filtering with h0 and h1*/ Filters.qmf_decomp(in, h0, x0d, x1d, fullFrameSize, QMF_ORDER, h0_mem); /* Encode the narrowband part*/ lowenc.encode(bits, x0d); /* High-band buffering / sync with low band */ for (i=0;i<windowSize-frameSize;i++) high[i] = high[frameSize+i]; for (i=0;i<frameSize;i++) high[windowSize-frameSize+i]=x1d[i]; System.arraycopy(excBuf, frameSize, excBuf, 0, bufSize-frameSize); low_pi_gain = lowenc.getPiGain(); low_exc = lowenc.getExc(); low_innov = lowenc.getInnov(); int low_mode = lowenc.getMode(); if (low_mode==0) dtx=1; else dtx=0; /* Start encoding the high-band */ for (i=0; i<windowSize; i++) buf[i] = high[i] * window[i]; /* Compute auto-correlation */ Lpc.autocorr(buf, autocorr, lpcSize+1, windowSize); autocorr[0] += 1; /* prevents NANs */ autocorr[0] *= lpc_floor; /* Noise floor in auto-correlation domain */ /* Lag windowing: equivalent to filtering in the power-spectrum domain */ for (i=0; i<lpcSize+1; i++) autocorr[i] *= lagWindow[i]; /* Levinson-Durbin */ Lpc.wld(lpc, autocorr, rc, lpcSize); // tmperr System.arraycopy(lpc, 0, lpc, 1, lpcSize); lpc[0]=1; /* LPC to LSPs (x-domain) transform */ int roots = Lsp.lpc2lsp (lpc, lpcSize, lsp, 15, 0.2f); if (roots != lpcSize) { roots = Lsp.lpc2lsp (lpc, lpcSize, lsp, 11, 0.02f); if (roots != lpcSize) { /*If we can't find all LSP's, do some damage control and use a flat filter*/ for (i=0; i<lpcSize; i++) { lsp[i]=(float)Math.cos(Math.PI*((float)(i+1))/(lpcSize+1)); } } } /* x-domain to angle domain*/ for (i=0; i<lpcSize; i++) lsp[i] = (float) Math.acos(lsp[i]); float lsp_dist=0; for (i=0;i<lpcSize;i++) lsp_dist += (old_lsp[i] - lsp[i])*(old_lsp[i] - lsp[i]); /*VBR stuff*/ if ((vbr_enabled != 0 || vad_enabled != 0) && dtx == 0) { float e_low=0, e_high=0; float ratio; if (abr_enabled != 0) { float qual_change=0; if (abr_drift2 * abr_drift > 0) { /* Only adapt if long-term and short-term drift are the same sign */ qual_change = -.00001f*abr_drift/(1+abr_count); if (qual_change>.1f) qual_change=.1f; if (qual_change<-.1f) qual_change=-.1f; } vbr_quality += qual_change; if (vbr_quality>10) vbr_quality=10; if (vbr_quality<0) vbr_quality=0; } for (i=0;i<frameSize;i++) { e_low += x0d[i]* x0d[i]; e_high += high[i]* high[i]; } ratio = (float) Math.log((1+e_high)/(1+e_low)); relative_quality = lowenc.getRelativeQuality(); if (ratio<-4) ratio=-4; if (ratio>2) ratio=2; /*if (ratio>-2)*/ if (vbr_enabled != 0) { int modeid; modeid = nb_modes-1; relative_quality+=1.0*(ratio+2); if (relative_quality<-1) { relative_quality=-1; } while (modeid != 0) { int v1; float thresh; v1=(int)Math.floor(vbr_quality); if (v1==10) thresh = Vbr.hb_thresh[modeid][v1]; else thresh = (vbr_quality-v1) * Vbr.hb_thresh[modeid][v1+1] + (1+v1-vbr_quality) * Vbr.hb_thresh[modeid][v1]; if (relative_quality >= thresh) break; modeid--; } setMode(modeid); if (abr_enabled != 0) { int bitrate; bitrate = getBitRate(); abr_drift+=(bitrate-abr_enabled); abr_drift2 = .95f*abr_drift2 + .05f*(bitrate-abr_enabled); abr_count += 1.0; } } else { /* VAD only */ int modeid; if (relative_quality<2.0) modeid=1; else modeid=submodeSelect; /*speex_encoder_ctl(state, SPEEX_SET_MODE, &mode);*/ submodeID=modeid; } /*fprintf (stderr, "%f %f\n", ratio, low_qual);*/ } bits.pack(1, 1); if (dtx != 0) bits.pack(0, SB_SUBMODE_BITS); else bits.pack(submodeID, SB_SUBMODE_BITS); /* If null mode (no transmission), just set a couple things to zero*/ if (dtx != 0 || submodes[submodeID] == null) { for (i=0; i<frameSize; i++) excBuf[excIdx+i]=swBuf[i]=VERY_SMALL; for (i=0; i<lpcSize; i++) mem_sw[i]=0; first=1; /* Final signal synthesis from excitation */ Filters.iir_mem2(excBuf, excIdx, interp_qlpc, high, 0, subframeSize, lpcSize, mem_sp); /* Reconstruct the original */ filters.fir_mem_up(x0d, h0, y0, fullFrameSize, QMF_ORDER, g0_mem); filters.fir_mem_up(high, h1, y1, fullFrameSize, QMF_ORDER, g1_mem); for (i=0; i<fullFrameSize; i++) in[i]=2*(y0[i]-y1[i]); if (dtx != 0) return 0; else return 1; } /* LSP quantization */ submodes[submodeID].lsqQuant.quant(lsp, qlsp, lpcSize, bits); if (first != 0) { for (i=0; i<lpcSize; i++) old_lsp[i] = lsp[i]; for (i=0; i<lpcSize; i++) old_qlsp[i] = qlsp[i]; } mem = new float[lpcSize]; syn_resp = new float[subframeSize]; innov = new float[subframeSize]; for (int sub=0; sub<nbSubframes; sub++) { float tmp, filter_ratio; int exc, sp, sw, resp; int offset; float rl, rh, eh=0, el=0; int fold; offset = subframeSize*sub; sp=offset; exc=excIdx+offset; resp=offset; sw=offset; /* LSP interpolation (quantized and unquantized) */ tmp = (1.0f + sub)/nbSubframes; for (i=0; i<lpcSize; i++) interp_lsp[i] = (1-tmp)*old_lsp[i] + tmp*lsp[i]; for (i=0; i<lpcSize; i++) interp_qlsp[i] = (1-tmp)*old_qlsp[i] + tmp*qlsp[i]; Lsp.enforce_margin(interp_lsp, lpcSize, .05f); Lsp.enforce_margin(interp_qlsp, lpcSize, .05f); /* Compute interpolated LPCs (quantized and unquantized) */ for (i=0; i<lpcSize; i++) interp_lsp[i] = (float) Math.cos(interp_lsp[i]); for (i=0; i<lpcSize; i++) interp_qlsp[i] = (float) Math.cos(interp_qlsp[i]); m_lsp.lsp2lpc(interp_lsp, interp_lpc, lpcSize); m_lsp.lsp2lpc(interp_qlsp, interp_qlpc, lpcSize); Filters.bw_lpc(gamma1, interp_lpc, bw_lpc1, lpcSize); Filters.bw_lpc(gamma2, interp_lpc, bw_lpc2, lpcSize); /* Compute mid-band (4000 Hz for wideband) response of low-band and high-band filters */ rl=rh=0; tmp=1; pi_gain[sub]=0; for (i=0; i<=lpcSize; i++) { rh += tmp*interp_qlpc[i]; tmp = -tmp; pi_gain[sub]+=interp_qlpc[i]; } rl = low_pi_gain[sub]; rl=1/(Math.abs(rl)+.01f); rh=1/(Math.abs(rh)+.01f); /* Compute ratio, will help predict the gain */ filter_ratio=Math.abs(.01f+rh)/(.01f+Math.abs(rl)); fold = filter_ratio<5 ? 1 : 0; /*printf ("filter_ratio %f\n", filter_ratio);*/ fold=0; /* Compute "real excitation" */ Filters.fir_mem2(high, sp, interp_qlpc, excBuf, exc, subframeSize, lpcSize, mem_sp2); /* Compute energy of low-band and high-band excitation */ for (i=0; i<subframeSize; i++) eh+=excBuf[exc+i]*excBuf[exc+i]; if (submodes[submodeID].innovation == null) {/* 1 for spectral folding excitation, 0 for stochastic */ float g; /*speex_bits_pack(bits, 1, 1);*/ for (i=0; i<subframeSize; i++) el+=low_innov[offset+i]*low_innov[offset+i]; /* Gain to use if we want to use the low-band excitation for high-band */ g=eh/(.01f+el); g=(float) Math.sqrt(g); g *= filter_ratio; /*print_vec(&g, 1, "gain factor");*/ /* Gain quantization */ { int quant = (int) Math.floor(.5 + 10 + 8.0 * Math.log((g+.0001))); /*speex_warning_int("tata", quant);*/ if (quant<0) quant=0; if (quant>31) quant=31; bits.pack(quant, 5); g=(float)(.1*Math.exp(quant/9.4)); } /*printf ("folding gain: %f\n", g);*/ g /= filter_ratio; } else { float gc, scale, scale_1; for (i=0; i<subframeSize; i++) el+=low_exc[offset+i]*low_exc[offset+i]; /*speex_bits_pack(bits, 0, 1);*/ gc = (float) (Math.sqrt(1+eh)*filter_ratio/Math.sqrt((1+el)*subframeSize)); { int qgc = (int)Math.floor(.5+3.7*(Math.log(gc)+2)); if (qgc<0) qgc=0; if (qgc>15) qgc=15; bits.pack(qgc, 4); gc = (float) Math.exp((1/3.7)*qgc-2); } scale = gc*(float)Math.sqrt(1+el)/filter_ratio; scale_1 = 1/scale; for (i=0; i<subframeSize; i++) excBuf[exc+i]=0; excBuf[exc]=1; Filters.syn_percep_zero(excBuf, exc, interp_qlpc, bw_lpc1, bw_lpc2, syn_resp, subframeSize, lpcSize); /* Reset excitation */ for (i=0; i<subframeSize; i++) excBuf[exc+i]=0; /* Compute zero response (ringing) of A(z/g1) / ( A(z/g2) * Aq(z) ) */ for (i=0; i<lpcSize; i++) mem[i]=mem_sp[i]; Filters.iir_mem2(excBuf, exc, interp_qlpc, excBuf, exc, subframeSize, lpcSize, mem); for (i=0; i<lpcSize; i++) mem[i]=mem_sw[i]; Filters.filter_mem2(excBuf, exc, bw_lpc1, bw_lpc2, res, resp, subframeSize, lpcSize, mem, 0); /* Compute weighted signal */ for (i=0; i<lpcSize; i++) mem[i]=mem_sw[i]; Filters.filter_mem2(high, sp, bw_lpc1, bw_lpc2, swBuf, sw, subframeSize, lpcSize, mem, 0); /* Compute target signal */ for (i=0; i<subframeSize; i++) target[i]=swBuf[sw+i]-res[resp+i]; for (i=0; i<subframeSize; i++) excBuf[exc+i]=0; for (i=0; i<subframeSize; i++) target[i]*=scale_1; /* Reset excitation */ for (i=0; i<subframeSize; i++) innov[i]=0; /*print_vec(target, st->subframeSize, "\ntarget");*/ submodes[submodeID].innovation.quant(target, interp_qlpc, bw_lpc1, bw_lpc2, lpcSize, subframeSize, innov, 0, syn_resp, bits, (complexity+1)>>1); /*print_vec(target, st->subframeSize, "after");*/ for (i=0; i<subframeSize; i++) excBuf[exc+i] += innov[i]*scale; if (submodes[submodeID].double_codebook != 0) { float[] innov2 = new float[subframeSize]; for (i=0; i<subframeSize; i++) innov2[i]=0; for (i=0; i<subframeSize; i++) target[i]*=2.5; submodes[submodeID].innovation.quant(target, interp_qlpc, bw_lpc1, bw_lpc2, lpcSize, subframeSize, innov2, 0, syn_resp, bits, (complexity+1)>>1); for (i=0; i<subframeSize; i++) innov2[i]*=scale*(1/2.5); for (i=0; i<subframeSize; i++) excBuf[exc+i] += innov2[i]; } } /*Keep the previous memory*/ for (i=0; i<lpcSize; i++) mem[i]=mem_sp[i]; /* Final signal synthesis from excitation */ Filters.iir_mem2(excBuf, exc, interp_qlpc, high, sp, subframeSize, lpcSize, mem_sp); /* Compute weighted signal again, from synthesized speech (not sure it's the right thing) */ Filters.filter_mem2(high, sp, bw_lpc1, bw_lpc2, swBuf, sw, subframeSize, lpcSize, mem_sw, 0); }//#ifndef RELEASE /* Reconstruct the original */ filters.fir_mem_up(x0d, h0, y0, fullFrameSize, QMF_ORDER, g0_mem); filters.fir_mem_up(high, h1, y1, fullFrameSize, QMF_ORDER, g1_mem); for (i=0; i<fullFrameSize; i++) in[i]=2*(y0[i]-y1[i]);//#endif for (i=0; i<lpcSize; i++) old_lsp[i] = lsp[i]; for (i=0; i<lpcSize; i++) old_qlsp[i] = qlsp[i]; first=0; return 1; } | 6221 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6221/81112208859292bc5ef5f9b0033ab2ea6dab38c0/SbEncoder.java/buggy/main/trunk/codec/src/main/java/org/xiph/speex/SbEncoder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
509,
2017,
12,
6385,
18690,
4125,
16,
727,
1431,
8526,
316,
13,
225,
288,
565,
509,
277,
31,
565,
1431,
8526,
1663,
16,
316,
82,
1527,
16,
6194,
67,
12243,
31,
565,
1431,
8526,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
509,
2017,
12,
6385,
18690,
4125,
16,
727,
1431,
8526,
316,
13,
225,
288,
565,
509,
277,
31,
565,
1431,
8526,
1663,
16,
316,
82,
1527,
16,
6194,
67,
12243,
31,
565,
1431,
8526,
... |
Object o, String index, Part p, Renderer master) throws MessagingException, IOException; | Object o, String index, Part p, Renderer master) throws MessagingException, IOException; | public StringBuilder objectRenderer( Object o, String index, Part p, Renderer master) throws MessagingException, IOException; | 54155 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54155/b13c667b376deb4a8f2c235ffd847b57616d23c4/ObjectRender.java/buggy/grendel/sources/grendel/renderer/ObjectRender.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
3225,
733,
6747,
12,
4766,
1377,
1033,
320,
16,
514,
770,
16,
6393,
293,
16,
4766,
1377,
17589,
4171,
13,
1171,
9079,
1216,
23794,
503,
16,
1860,
31,
2,
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,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
3225,
733,
6747,
12,
4766,
1377,
1033,
320,
16,
514,
770,
16,
6393,
293,
16,
4766,
1377,
17589,
4171,
13,
1171,
9079,
1216,
23794,
503,
16,
1860,
31,
2,
-100,
-100,
-100,
-100,
-1... |
if (!fNamespacePrefixes) { int len = attributes.getLength(); for (int i = len - 1; i >= 0; i--) { attributes.getName(i, fQName); if (fQName.rawname == fXmlnsSymbol || fQName.prefix == fXmlnsSymbol) { | int len = attributes.getLength(); for (int i = len - 1; i >= 0; i--) { attributes.getName(i, fQName); if (fQName.prefix == fXmlnsSymbol || fQName.rawname == fXmlnsSymbol) { if (!fNamespacePrefixes) { | public void startElement(QName element, XMLAttributes attributes, Augmentations augs) throws XNIException { try { // SAX1 if (fDocumentHandler != null) { fAttributesProxy.setAttributes(attributes); fDocumentHandler.startElement(element.rawname, fAttributesProxy); } // SAX2 if (fContentHandler != null) { if (!fNamespacePrefixes) { // remove namespace declaration attributes int len = attributes.getLength(); for (int i = len - 1; i >= 0; i--) { attributes.getName(i, fQName); if (fQName.rawname == fXmlnsSymbol || fQName.prefix == fXmlnsSymbol) { attributes.removeAttributeAt(i); } } } String uri = element.uri != null ? element.uri : fEmptySymbol; String localpart = fNamespaces ? element.localpart : fEmptySymbol; fAttributesProxy.setAttributes(attributes); fContentHandler.startElement(uri, localpart, element.rawname, fAttributesProxy); } } catch (SAXException e) { throw new XNIException(e); } } // startElement(QName,XMLAttributes) | 6373 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6373/e93af845e1c25cfc343755a6f4a906337992f53e/AbstractSAXParser.java/buggy/src/org/apache/xerces/parsers/AbstractSAXParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
13591,
12,
13688,
930,
16,
3167,
2498,
1677,
16,
432,
14870,
1012,
279,
9024,
13,
3639,
1216,
1139,
50,
45,
503,
288,
3639,
775,
288,
5411,
368,
10168,
21,
5411,
309,
261,
74... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
13591,
12,
13688,
930,
16,
3167,
2498,
1677,
16,
432,
14870,
1012,
279,
9024,
13,
3639,
1216,
1139,
50,
45,
503,
288,
3639,
775,
288,
5411,
368,
10168,
21,
5411,
309,
261,
74... |
} | } | protected void createPath() { List<Path.Node> nodes=new LinkedList<Path.Node>(); nodes.add(new Path.Node(24,3)); nodes.add(new Path.Node(24,5)); nodes.add(new Path.Node(28,5)); nodes.add(new Path.Node(28,3)); setPath(nodes,true); } | 4438 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4438/d512245d8e26069d9f1c5a15fba078b322c3b0ac/Semos.java/buggy/src/games/stendhal/server/maps/Semos.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4202,
4750,
918,
752,
743,
1435,
3639,
288,
3639,
987,
32,
743,
18,
907,
34,
2199,
33,
2704,
10688,
32,
743,
18,
907,
34,
5621,
3639,
2199,
18,
1289,
12,
2704,
2666,
18,
907,
12,
3247,
16,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4202,
4750,
918,
752,
743,
1435,
3639,
288,
3639,
987,
32,
743,
18,
907,
34,
2199,
33,
2704,
10688,
32,
743,
18,
907,
34,
5621,
3639,
2199,
18,
1289,
12,
2704,
2666,
18,
907,
12,
3247,
16,... |
private void expand() { int i; if (isCompact) { byte[] tempArray; hashes = new int[INDEXCOUNT]; tempArray = new byte[UNICODECOUNT]; for (i = 0; i < UNICODECOUNT; ++i) { byte value = elementAt((char)i); tempArray[i] = value; touchBlock(i >> BLOCKSHIFT, value); } for (i = 0; i < INDEXCOUNT; ++i) { indices[i] = (char)(i<<BLOCKSHIFT); } values = null; values = tempArray; isCompact = false; } } | 5620 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5620/e87b31606f688d97d1580bcab4c7589a7d24935d/CompactByteArray.java/clean/icu4j/src/com/ibm/util/CompactByteArray.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3238,
90,
11359,
561,
84,
464,
1435,
95,
474,
77,
31,
430,
12,
291,
16863,
15329,
7229,
8526,
5814,
1076,
31,
17612,
33,
2704,
474,
63,
9199,
7240,
15533,
5814,
1076,
33,
2704,
7229,
63,
266... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3238,
90,
11359,
561,
84,
464,
1435,
95,
474,
77,
31,
430,
12,
291,
16863,
15329,
7229,
8526,
5814,
1076,
31,
17612,
33,
2704,
474,
63,
9199,
7240,
15533,
5814,
1076,
33,
2704,
7229,
63,
266... | ||
btnDetails.setText( "Show Trace..." ); grpDetails.setText( "Stack Trace:" ); btnOK.setText( " OK " ); | btnDetails.setText( Messages.getString( "ErrorDialog.text.ShowTrace" ) ); grpDetails.setText( Messages.getString( "ErrorDialog.text.StackTrace" ) ); btnOK.setText( Messages.getString( "ErrorDialog.text.Ok" ) ); | private void placeComponents( ) { // CONTAINER cmpContainer = new Composite( shell, SWT.NONE ); { // CONTAINER LAYOUT GridLayout glDialog = new GridLayout( ); glDialog.numColumns = 3; glDialog.marginWidth = 6; glDialog.marginHeight = 6; glDialog.horizontalSpacing = 5; glDialog.verticalSpacing = 2; cmpContainer.setLayoutData( new GridData( GridData.FILL_BOTH ) ); cmpContainer.setLayout( glDialog ); } // MESSAGE LABEL mcSheetHeading = new MessageComposite( cmpContainer, "", sMessage, "", true ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ GridData gdMSGHeading = new GridData( GridData.FILL_HORIZONTAL ); gdMSGHeading.heightHint = 22; gdMSGHeading.horizontalSpan = 3; mcSheetHeading.setLayoutData( gdMSGHeading ); mcSheetHeading.setBackground( display.getSystemColor( SWT.COLOR_WHITE ) ); // ICON lblImage = new Label( cmpContainer, SWT.NONE ); lblImage.setImage( display.getSystemImage( SWT.ICON_ERROR ) ); // PROBLEMS LABEL grpProblems = new Group( cmpContainer, SWT.NONE ); { GridData gdGrpProblems = new GridData( GridData.FILL_HORIZONTAL ); gdGrpProblems.horizontalSpan = 2; gdGrpProblems.heightHint = 50; grpProblems.setLayoutData( gdGrpProblems ); FillLayout layout = new FillLayout( ); layout.marginWidth = 2; layout.marginHeight = 2; grpProblems.setLayout( layout ); } txtProblems = new Text( grpProblems, SWT.WRAP | SWT.V_SCROLL ); { txtProblems.setEditable( false ); } // DETAILS BUTTON Label lblButtonSpacer = new Label( cmpContainer, SWT.NONE ); btnDetails = new Button( cmpContainer, SWT.TOGGLE ); GridData gdBtnDetails = new GridData( ); gdBtnDetails.horizontalSpan = 2; btnDetails.setLayoutData( gdBtnDetails ); btnDetails.addSelectionListener( this ); // SOLUTIONS LABEL Label lblDetailSpacer = new Label( cmpContainer, SWT.NONE ); slDetails = new StackLayout( ); cmpDetails = new Composite( cmpContainer, SWT.NONE ); GridData gdCmpDetails = new GridData( GridData.FILL_BOTH ); gdCmpDetails.horizontalSpan = 2; cmpDetails.setLayoutData( gdCmpDetails ); cmpDetails.setLayout( slDetails ); cmpDummy = new Composite( cmpDetails, SWT.NONE ); grpDetails = new Group( cmpDetails, SWT.NONE ); FillLayout flSolutions = new FillLayout( ); flSolutions.marginWidth = 5; flSolutions.marginHeight = 5; grpDetails.setLayout( flSolutions ); txtDetails = new Text( grpDetails, SWT.BORDER | SWT.WRAP | SWT.V_SCROLL ); txtDetails.setEditable( false ); // BUTTON PANEL LAYOUT GridLayout glButtons = new GridLayout( ); glButtons.numColumns = 2; glButtons.horizontalSpacing = 5; glButtons.marginHeight = 5; glButtons.marginWidth = 5; // BUTTON PANEL Composite cmpButtons = new Composite( cmpContainer, SWT.NONE ); GridData gdCmpButtons = new GridData( GridData.FILL_HORIZONTAL ); gdCmpButtons.horizontalSpan = 3; cmpButtons.setLayoutData( gdCmpButtons ); cmpButtons.setLayout( glButtons ); // ACCEPT BUTTON btnOK = new Button( cmpButtons, SWT.NONE ); GridData gdBtnOK = null; if ( bError ) { gdBtnOK = new GridData( GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_END ); } else { gdBtnOK = new GridData( GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_CENTER ); } btnOK.setLayoutData( gdBtnOK ); btnOK.addSelectionListener( this ); // CANCEL BUTTON if ( bError ) { btnCancel = new Button( cmpButtons, SWT.NONE ); GridData gdBtnCancel = new GridData( GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_BEGINNING ); btnCancel.setLayoutData( gdBtnCancel ); btnCancel.addSelectionListener( this ); } if ( bError ) { grpProblems.setText( "Error List:" ); txtProblems.setText( sErrors ); btnDetails.setText( "Show Details..." ); grpDetails.setText( "Suggested Fixes:" ); btnOK.setText( " Fix It " ); // TODO unsupported now btnOK.setEnabled( false ); btnCancel.setText( "Proceed Without Fixing" ); if ( sFixes == null || sFixes.length( ) == 0 ) { btnDetails.setEnabled( false ); } else { btnDetails.setEnabled( true ); txtDetails.setText( sFixes ); } } else { grpProblems.setText( "Exception:" ); txtProblems.setText( sExceptionMessage ); btnDetails.setText( "Show Trace..." ); grpDetails.setText( "Stack Trace:" ); btnOK.setText( " OK " ); if ( sTrace == null || sTrace.length( ) == 0 ) { btnDetails.setEnabled( false ); } else { btnDetails.setEnabled( true ); txtDetails.setText( sTrace ); } } slDetails.topControl = cmpDummy; shell.setSize( shell.getSize( ).x, DEFAULT_HEIGHT ); shell.layout( ); } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/10fe950cbad09cea3732306ccb67e21cd29a304a/ErrorDialog.java/buggy/core/org.eclipse.birt.core.ui/src/org/eclipse/birt/core/ui/frameworks/errordisplay/ErrorDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
3166,
7171,
12,
262,
202,
95,
202,
202,
759,
8020,
16843,
202,
202,
9625,
2170,
273,
394,
14728,
12,
5972,
16,
348,
8588,
18,
9826,
11272,
202,
202,
95,
1082,
202,
759,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3166,
7171,
12,
262,
202,
95,
202,
202,
759,
8020,
16843,
202,
202,
9625,
2170,
273,
394,
14728,
12,
5972,
16,
348,
8588,
18,
9826,
11272,
202,
202,
95,
1082,
202,
759,
... |
return new CharJoin( srcInsert, offInsert, cchInsert, src, off, cch ); | newSrc = new CharJoin( srcInsert, offInsert, cchInsert, src, off, cch ); else { | public Object insertChars ( int posInsert, Object src, int off, int cch, Object srcInsert, int offInsert, int cchInsert ) { assert isValid( src, off, cch ); assert isValid( srcInsert, offInsert, cchInsert ); assert posInsert >= 0 && posInsert <= cch; // TODO - at some point, instead of creating joins, I should // normalize all the text into a single buffer to stop large // tree;s from being built when many modifications happen... // TODO - actually, I should see if the size of the new char // sequence is small enough to simply allocate a new contigous // sequence, either in a common char[] managed by the master, // or just create a new string ... this goes for remove chars // as well. _cchSrc = cch + cchInsert; if (cch == 0) { _offSrc = off; return src; } _offSrc = 0; if (posInsert == 0) return new CharJoin( src, off, cch, srcInsert, offInsert, cchInsert ); if (posInsert == cch) return new CharJoin( srcInsert, offInsert, cchInsert, src, off, cch ); Object newSrc = new CharJoin( new CharJoin( src, off, posInsert, srcInsert, offInsert, cchInsert ), 0, posInsert + cchInsert, src, off + posInsert, cch - posInsert ); assert isValid( newSrc, _offSrc, _cchSrc ); return newSrc; } | 3520 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3520/c1c94b7550bc15c20f0b99cccea4448a4d545a58/CharUtil.java/clean/v2/src/newstore/org/apache/xmlbeans/impl/newstore/CharUtil.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
2243,
7803,
261,
3639,
509,
949,
4600,
16,
3639,
1033,
1705,
16,
509,
3397,
16,
509,
276,
343,
16,
3639,
1033,
1705,
4600,
16,
509,
3397,
4600,
16,
509,
276,
343,
4600,
262,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2243,
7803,
261,
3639,
509,
949,
4600,
16,
3639,
1033,
1705,
16,
509,
3397,
16,
509,
276,
343,
16,
3639,
1033,
1705,
4600,
16,
509,
3397,
4600,
16,
509,
276,
343,
4600,
262,... |
long start = System.currentTimeMillis(); | if (ChainBuilderAgent.DEBUG) { start = System.currentTimeMillis(); } | public synchronized Collection getChains() { Collection res = null; // if we're done, go for it. if (chainHash != null && chainHash.size() > 0) { res = chainHash.values(); } else { if (gettingChains == false) { long start = System.currentTimeMillis(); gettingChains = true; retrieveChains(); gettingChains = false; notifyAll(); long end = System.currentTimeMillis()-start; System.err.println("time for retrieving chains.. "+end); res = chainHash.values(); } else {// in progress try{ wait(); res = chainHash.values(); } catch (InterruptedException e) { res = null; } } } return res; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/a806bf744289bb0eed666b235887c8680d549d94/ChainDataManager.java/buggy/SRC/org/openmicroscopy/shoola/agents/chainbuilder/ChainDataManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3852,
2200,
336,
15945,
1435,
288,
9506,
202,
2532,
400,
273,
446,
31,
202,
202,
759,
309,
732,
4565,
2731,
16,
1960,
364,
518,
18,
202,
202,
430,
261,
5639,
2310,
480,
446,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2200,
336,
15945,
1435,
288,
9506,
202,
2532,
400,
273,
446,
31,
202,
202,
759,
309,
732,
4565,
2731,
16,
1960,
364,
518,
18,
202,
202,
430,
261,
5639,
2310,
480,
446,
... |
null); | null, searchContext); | private static boolean processElementsWithWordInScopeElement(PsiElement scopeElement, PsiElementProcessorEx processor, String word, TokenSet elementTypes, boolean caseInsensitive) { if (SourceTreeToPsiMap.hasTreeElement(scopeElement)) { StringSearcher searcher = new StringSearcher(word); searcher.setCaseSensitive(!caseInsensitive); return LowLevelSearchUtil.processElementsContainingWordInElement(processor, scopeElement, searcher, elementTypes, null); } else { return true; } } | 56627 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56627/57ac9224412cde7806fda672ad210899f7a8d81d/PsiSearchHelperImpl.java/clean/source/com/intellij/psi/impl/search/PsiSearchHelperImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
760,
1250,
1207,
3471,
1190,
3944,
382,
3876,
1046,
12,
52,
7722,
1046,
2146,
1046,
16,
4766,
13491,
453,
7722,
1046,
5164,
424,
6659,
16,
4766,
13491,
514,
2076,
16,
4766,
13491,
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,
282,
3238,
760,
1250,
1207,
3471,
1190,
3944,
382,
3876,
1046,
12,
52,
7722,
1046,
2146,
1046,
16,
4766,
13491,
453,
7722,
1046,
5164,
424,
6659,
16,
4766,
13491,
514,
2076,
16,
4766,
13491,
3... |
refreshCheckBoxes(); | for (JCheckBox chkMsdt : chkMsdtSelection.values()) { chkMsdt.setSelected(false); } | public void actionPerformed(@SuppressWarnings("unused") final ActionEvent e) { refreshCheckBoxes(); } | 239 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/239/df0f7069634fdd2654e8b2cb2b3d70037641f0bc/MSDTFilterIntermediateModule.java/clean/modules/ECG_MSDTFilterIntermediateModule/src/org/electrocodeogram/module/intermediate/implementation/MSDTFilterIntermediateModule.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
918,
26100,
26964,
29282,
4312,
2932,
14375,
7923,
5411,
727,
19641,
425,
13,
288,
7734,
364,
261,
46,
19174,
15000,
49,
6427,
88,
294,
15000,
49,
6427,
88,
6233,
18,
2372,
10756,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2398,
1071,
918,
26100,
26964,
29282,
4312,
2932,
14375,
7923,
5411,
727,
19641,
425,
13,
288,
7734,
364,
261,
46,
19174,
15000,
49,
6427,
88,
294,
15000,
49,
6427,
88,
6233,
18,
2372,
10756,
... |
public PatternElement getPatternElement() { return patternElement; } | public PatternElement getPatternElement() { return patternElement; } | public PatternElement getPatternElement() { return patternElement; } | 7352 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7352/4748a5a9b76f3dd763ee6bc7755c932a711bd6a6/MatchResult.java/buggy/findbugs/src/java/edu/umd/cs/findbugs/ba/bcp/MatchResult.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
6830,
1046,
23420,
1046,
1435,
288,
327,
1936,
1046,
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,
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,
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,
6830,
1046,
23420,
1046,
1435,
288,
327,
1936,
1046,
31,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
public void addTreeStateListener(TreeStateListener l); | void addTreeStateListener(ITreeStateListener l); | public void addTreeStateListener(TreeStateListener l); | 46434 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46434/234acdada6bb523025df2bf64c707be9ba3f57d5/ITreeState.java/buggy/wicket/src/java/wicket/markup/html/tree/ITreeState.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
527,
2471,
1119,
2223,
12,
2471,
1119,
2223,
328,
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... | [
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,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
527,
2471,
1119,
2223,
12,
2471,
1119,
2223,
328,
1769,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
updateMonitor(ManagedMakeMessages.getFormattedString("MakefileGenerator.message.gen.source.makefile", moduleOutputPath.toString())); | protected void populateFragmentMakefile(IContainer module) throws CoreException { // Calculate the new directory relative to the build output IPath moduleRelativePath = module.getProjectRelativePath(); IPath buildRoot = getBuildWorkingDir(); if (buildRoot == null) { return; } IPath moduleOutputPath = buildRoot.append(moduleRelativePath); // Now create the directory IPath moduleOutputDir = createDirectory(moduleOutputPath.toString()); // Create a module makefile IFile modMakefile = createFile(moduleOutputDir.addTrailingSeparator().append(MODFILE_NAME)); StringBuffer makeBuf = new StringBuffer(); makeBuf.append(addFragmentMakefileHeader()); makeBuf.append(addSources(module)); // Save the files Util.save(makeBuf, modMakefile); } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/29ab091666001009a5c9de5bc710c6a3f54cfe21/GnuMakefileGenerator.java/buggy/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/GnuMakefileGenerator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
2725,
7187,
12,
10055,
6464,
5058,
18,
588,
18298,
780,
2932,
6464,
768,
3908,
18,
2150,
18,
4507,
18,
3168,
18,
6540,
768,
3113,
1605,
1447,
743,
18,
10492,
1435,
10019,
225,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2725,
7187,
12,
10055,
6464,
5058,
18,
588,
18298,
780,
2932,
6464,
768,
3908,
18,
2150,
18,
4507,
18,
3168,
18,
6540,
768,
3113,
1605,
1447,
743,
18,
10492,
1435,
10019,
225,
... | |
context.operands.push(null); } | } | public void execute(PAContext context) throws PainterException { context.operands.push(null); } | 6653 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6653/847947ee757ac47e8514ce31066d7b04585dcfbb/PAContext.java/buggy/src/com/lowagie/text/pdf/codec/postscript/PAContext.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3639,
1071,
918,
1836,
12,
4066,
1042,
819,
13,
1216,
453,
11606,
503,
288,
377,
819,
18,
4063,
5708,
18,
6206,
12,
2011,
1769,
4202,
289,
2,
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,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3639,
1071,
918,
1836,
12,
4066,
1042,
819,
13,
1216,
453,
11606,
503,
288,
377,
819,
18,
4063,
5708,
18,
6206,
12,
2011,
1769,
4202,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
} if (result instanceof InclusionData) { | } else if (result instanceof InclusionData) { | protected Object popContext() { //TODO calibrate offsets Object result = super.popContext(); if (result instanceof CodeReader) { locationMap.endTranslationUnit(bufferDelta[0] + ((CodeReader) result).buffer.length); } if (result instanceof InclusionData) { CodeReader codeReader = ((InclusionData) result).reader; if (log.isTracing()) { StringBuffer buffer = new StringBuffer("Exiting inclusion "); //$NON-NLS-1$ buffer.append(codeReader.filename); log.traceLog(buffer.toString()); } locationMap.endInclusion(getGlobalCounter(bufferStackPos + 1) + bufferPos[bufferStackPos + 1]); bufferDelta[bufferStackPos] += bufferDelta[bufferStackPos + 1] + codeReader.buffer.length; } return result; } | 54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/1e8393f7a2cd5d5de7919712722d6a1202f825c5/DOMScanner.java/clean/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner2/DOMScanner.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
1033,
1843,
1042,
1435,
288,
3639,
368,
6241,
26139,
5141,
8738,
3639,
1033,
563,
273,
2240,
18,
5120,
1042,
5621,
3639,
309,
261,
2088,
1276,
3356,
2514,
13,
288,
5411,
2117,
863,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1033,
1843,
1042,
1435,
288,
3639,
368,
6241,
26139,
5141,
8738,
3639,
1033,
563,
273,
2240,
18,
5120,
1042,
5621,
3639,
309,
261,
2088,
1276,
3356,
2514,
13,
288,
5411,
2117,
863,
... |
else if ( cbMultipleY.getSelectionIndex( ) == 1 ) { if ( iAxisNumber == 1 ) { ChartUIUtil.addAxis( (ChartWithAxes) chartModel ); } else if ( iAxisNumber > 2 ) { ChartUIUtil.removeLastAxes( (ChartWithAxes) chartModel, iAxisNumber - 2 ); } } ChartAdapter.ignoreNotifications( isNotificaionIgnored ); | cmpMisc.layout( ); | public void widgetSelected( SelectionEvent e ) { // Indicates whether need to update chart model boolean needUpdateModel = false; Object oSelected = e.getSource( ); if ( oSelected.getClass( ).equals( Button.class ) ) { needUpdateModel = true; if ( oSelected.equals( cbOrientation ) ) { if ( cbOrientation.getSelection( ) ) { this.orientation = Orientation.HORIZONTAL_LITERAL; } else { this.orientation = Orientation.VERTICAL_LITERAL; } createAndDisplayTypesSheet( sType ); setDefaultSubtypeSelection( ); } else { Button btn = (Button) e.getSource( ); if ( btn.getSelection( ) ) { if ( this.sSubType != null && !getSubtypeFromButton( btn ).equals( sSubType ) ) { int iTypeIndex = vSubTypeNames.indexOf( sSubType ); if ( iTypeIndex >= 0 ) { ( (Button) cmpTypeButtons.getChildren( )[iTypeIndex] ).setSelection( false ); cmpTypeButtons.redraw( ); } } sSubType = getSubtypeFromButton( btn ); ChartCacheManager.getInstance( ).cacheSubtype( sType, sSubType ); } else { if ( this.sSubType != null && getSubtypeFromButton( btn ).equals( sSubType ) ) { // Clicking on the same button should not cause it to be // unselected btn.setSelection( true ); needUpdateModel = false; } } } } else if ( oSelected.getClass( ).equals( Table.class ) ) { sType = ( (String) ( (TableItem) e.item ).getData( ) ).trim( ); if ( !chartModel.getType( ).equals( sType ) ) { sSubType = null; createAndDisplayTypesSheet( sType ); setDefaultSubtypeSelection( ); // Pack to display enough space for different chart container.packWizard( ); cmpMisc.layout( ); needUpdateModel = true; } } else if ( oSelected.equals( cbMultipleY ) ) { needUpdateModel = true; lblSeriesType.setEnabled( isTwoAxesEnabled( ) ); cbSeriesType.setEnabled( isTwoAxesEnabled( ) ); ( (ChartWizardContext) getContext( ) ).setMoreAxesSupported( cbMultipleY.getSelectionIndex( ) == 2 ); int iAxisNumber = ChartUIUtil.getOrthogonalAxisNumber( chartModel ); if ( chartModel instanceof ChartWithoutAxes ) { throw new IllegalArgumentException( Messages.getString( "TaskSelectType.Exception.CannotSupportAxes" ) ); //$NON-NLS-1$ } // Prevent notifications rendering preview boolean isNotificaionIgnored = ChartAdapter.isNotificationIgnored( ); ChartAdapter.ignoreNotifications( true ); if ( cbMultipleY.getSelectionIndex( ) == 0 ) { // Keeps one axis if ( iAxisNumber > 1 ) { ChartUIUtil.removeLastAxes( (ChartWithAxes) chartModel, iAxisNumber - 1 ); } } else if ( cbMultipleY.getSelectionIndex( ) == 1 ) { // Keeps two axes if ( iAxisNumber == 1 ) { ChartUIUtil.addAxis( (ChartWithAxes) chartModel ); } else if ( iAxisNumber > 2 ) { ChartUIUtil.removeLastAxes( (ChartWithAxes) chartModel, iAxisNumber - 2 ); } } ChartAdapter.ignoreNotifications( isNotificaionIgnored ); } else if ( oSelected.equals( cbDimension ) ) { String newDimension = cbDimension.getItem( cbDimension.getSelectionIndex( ) ); if ( !newDimension.equals( sDimension ) ) { sDimension = newDimension; createAndDisplayTypesSheet( this.sType ); setDefaultSubtypeSelection( ); needUpdateModel = true; } } else if ( oSelected.equals( cbSeriesType ) ) { String oldSeriesName = ( (SeriesDefinition) ChartUIUtil.getOrthogonalSeriesDefinitions( chartModel, 1 ) .get( 0 ) ).getDesignTimeSeries( ).getDisplayName( ); if ( !cbSeriesType.getText( ).equals( oldSeriesName ) ) { needUpdateModel = true; changeOverlaySeriesType( ); } } else if ( oSelected.equals( cbOutput ) ) { ( (ChartWizardContext) getContext( ) ).setOutputFormat( cbOutput.getText( ) ); } // Following operations need new model if ( needUpdateModel ) { // Update chart model refreshChart( ); if ( oSelected.getClass( ).equals( Table.class ) ) { // Ensure populate list after chart model generated populateSeriesTypesList( ); } else if ( oSelected.equals( cbMultipleY ) && isTwoAxesEnabled( ) ) { if ( chartModel != null && chartModel instanceof ChartWithAxes ) { if ( ChartUIUtil.getOrthogonalAxisNumber( chartModel ) > 1 ) { Axis overlayAxis = ChartUIUtil.getAxisYForProcessing( (ChartWithAxes) chartModel, 1 ); String sDisplayName = PluginSettings.instance( ) .getSeriesDisplayName( ( (SeriesDefinition) overlayAxis.getSeriesDefinitions( ) .get( 0 ) ).getDesignTimeSeries( ) .getClass( ) .getName( ) ); cbSeriesType.select( cbSeriesType.indexOf( sDisplayName ) ); } } } } } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/4596c4ffec0e8e4066521d2af513aecb5e0c9795/TaskSelectType.java/clean/chart/org.eclipse.birt.chart.ui.extension/src/org/eclipse/birt/chart/ui/swt/wizard/TaskSelectType.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
3604,
7416,
12,
12977,
1133,
425,
262,
202,
95,
202,
202,
759,
18336,
2856,
1608,
358,
1089,
4980,
938,
202,
202,
6494,
1608,
1891,
1488,
273,
629,
31,
202,
202,
921,
320... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3604,
7416,
12,
12977,
1133,
425,
262,
202,
95,
202,
202,
759,
18336,
2856,
1608,
358,
1089,
4980,
938,
202,
202,
6494,
1608,
1891,
1488,
273,
629,
31,
202,
202,
921,
320... |
DomNode sibling = node.getPreviousSibling(); | final DomNode sibling = node.getPreviousSibling(); | protected DomNode getFirstNode (DomNode node) { if (node == null) { return null; } else { DomNode sibling = node.getPreviousSibling(); if (sibling == null) { return getFirstNode(node.getParentNode()); } else { return sibling; } } } | 3508 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3508/bfbb9e2a2e54bf7040308f5f0b4fd744c80370c8/Util.java/clean/htmlunit/src/java/com/gargoylesoftware/htmlunit/html/Util.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
4750,
12965,
907,
7521,
907,
261,
8832,
907,
756,
13,
288,
7734,
309,
261,
2159,
422,
446,
13,
288,
10792,
327,
446,
31,
7734,
289,
7734,
469,
288,
10792,
727,
12965,
907,
10841,
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,
2398,
4750,
12965,
907,
7521,
907,
261,
8832,
907,
756,
13,
288,
7734,
309,
261,
2159,
422,
446,
13,
288,
10792,
327,
446,
31,
7734,
289,
7734,
469,
288,
10792,
727,
12965,
907,
10841,
273,
... |
LoggingSystem.getLogger(this).info("signature is "+signature); | public void perform(ToolContext tc) { if (tc.getSource() == forwardBackwardSlot) { velocity = tc.getAxisState(forwardBackwardSlot).doubleValue(); // TODO make this transformation an option if (raiseToThirdPower) velocity = velocity*velocity*velocity; if (tc.getAxisState(forwardBackwardSlot).isReleased()) { isFlying = false; removeCurrentSlot(timerSlot); return; } if (!isFlying) { isFlying = true; addCurrentSlot(timerSlot); } return; } if (eap == null || !EffectiveAppearance.matches(eap, tc.getRootToToolComponent())) { eap = EffectiveAppearance.create(tc.getRootToToolComponent()); } int signature = eap.getAttribute("signature", Pn.EUCLIDEAN); SceneGraphComponent ship = tc.getRootToToolComponent().getLastComponent(); Matrix pointerMatrix = new Matrix(tc.getTransformationMatrix(InputSlot.getDevice("PointerTransformation"))); Matrix localPointer = ToolUtility.worldToTool(tc, pointerMatrix); double[] dir = localPointer.getColumn(2); // z-axis ( modulo +/- ) //System.out.println(""); //System.out.println("FlyTool: dir is "+Rn.toString(dir)); // if (dir[3]*dir[2] > 0) for (int i = 0; i<3; ++i) dir[i] = -dir[i]; double[] shipPosition = localPointer.getColumn(3); //System.out.println("FlyTool: dir is "+Rn.toString(dir)); // don't need the following correction anymore // if (signature == Pn.EUCLIDEAN) dir[3] = 1.0; Matrix shipMatrix = new Matrix(); if (ship.getTransformation() != null) shipMatrix.assignFrom(ship.getTransformation()); // the new position also depends on the signature; // val is the distance we have moved in the direction dir // use dragTowards to calculate the resulting point double val = tc.getAxisState(timerSlot).intValue()*0.001; //Rn.times(dir, val*gain*velocity, dir); val = val*gain*velocity; double[] newShipPosition = Pn.dragTowards(null, shipPosition, dir, val, signature); //System.out.println("FlyTool: old position is "+Rn.toString(Pn.normalize(shipPosition, shipPosition,signature))); //System.out.println("FlyTool: new position is "+Rn.toString(Pn.normalize(newShipPosition,newShipPosition, signature))); MatrixBuilder.init(shipMatrix, signature).translateFromTo(shipPosition,newShipPosition).assignTo(ship); // demo madness: can't get render trigger to work, so do it by hand. // TODO remove when demo is over tc.getViewer().render(); } | 25560 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/25560/9760de0ab090480cb2f8ec155711b5805935ab0d/FlyTool.java/clean/src-tool/de/jreality/tools/FlyTool.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
10253,
3163,
18,
588,
3328,
12,
2211,
2934,
1376,
2932,
8195,
353,
13773,
8195,
1769,
10253,
3163,
18,
588,
3328,
12,
2211,
2934,
1376,
2932,
8195,
353,
13773,
8195,
1769,
1071,
7735,
3163,
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,
10253,
3163,
18,
588,
3328,
12,
2211,
2934,
1376,
2932,
8195,
353,
13773,
8195,
1769,
10253,
3163,
18,
588,
3328,
12,
2211,
2934,
1376,
2932,
8195,
353,
13773,
8195,
1769,
1071,
7735,
3163,
18,
... | |
+ fontSize/5f; | + fontSize/4f; | public float getWordHeight() { if(bf==null) return fontSize; return bf.getFontDescriptor(BaseFont.AWT_ASCENT, fontSize) - bf.getFontDescriptor(BaseFont.AWT_DESCENT, fontSize) + bf.getFontDescriptor(BaseFont.AWT_LEADING, fontSize) + fontSize/5f; } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/eccebe9e6154fd92f32a9af020eb8cc49086c031/FontInfo.java/clean/engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/layout/pdf/font/FontInfo.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1431,
336,
3944,
2686,
1435,
202,
95,
3196,
202,
430,
12,
17156,
631,
2011,
13,
1082,
202,
2463,
16746,
31,
202,
202,
2463,
16222,
18,
588,
5711,
3187,
12,
2171,
5711,
18,
37,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1431,
336,
3944,
2686,
1435,
202,
95,
3196,
202,
430,
12,
17156,
631,
2011,
13,
1082,
202,
2463,
16746,
31,
202,
202,
2463,
16222,
18,
588,
5711,
3187,
12,
2171,
5711,
18,
37,... |
Object arg = (typeHint == null) ? "undefined" : typeHint.toString(); throw NativeGlobal.typeError1("msg.default.value", arg, this); | String arg = (typeHint == null) ? "undefined" : typeHint.getName(); throw ScriptRuntime.typeError1("msg.default.value", arg); | public Object getDefaultValue(Class typeHint) { Object val; Context cx = null; try { for (int i=0; i < 2; i++) { if (typeHint == ScriptRuntime.StringClass ? i == 0 : i == 1) { Object v = getProperty(this, "toString"); if (!(v instanceof Function)) continue; Function fun = (Function) v; if (cx == null) cx = Context.getContext(); val = fun.call(cx, fun.getParentScope(), this, ScriptRuntime.emptyArgs); } else { String hint; if (typeHint == null) hint = "undefined"; else if (typeHint == ScriptRuntime.StringClass) hint = "string"; else if (typeHint == ScriptRuntime.ScriptableClass) hint = "object"; else if (typeHint == ScriptRuntime.FunctionClass) hint = "function"; else if (typeHint == ScriptRuntime.BooleanClass || typeHint == Boolean.TYPE) hint = "boolean"; else if (typeHint == ScriptRuntime.NumberClass || typeHint == ScriptRuntime.ByteClass || typeHint == Byte.TYPE || typeHint == ScriptRuntime.ShortClass || typeHint == Short.TYPE || typeHint == ScriptRuntime.IntegerClass || typeHint == Integer.TYPE || typeHint == ScriptRuntime.FloatClass || typeHint == Float.TYPE || typeHint == ScriptRuntime.DoubleClass || typeHint == Double.TYPE) hint = "number"; else { throw Context.reportRuntimeError1( "msg.invalid.type", typeHint.toString()); } Object v = getProperty(this, "valueOf"); if (!(v instanceof Function)) continue; Function fun = (Function) v; Object[] args = { hint }; if (cx == null) cx = Context.getContext(); val = fun.call(cx, fun.getParentScope(), this, args); } if (val != null && (val == Undefined.instance || !(val instanceof Scriptable) || typeHint == ScriptRuntime.ScriptableClass || typeHint == ScriptRuntime.FunctionClass)) { return val; } if (val instanceof NativeJavaObject) { // Let a wrapped java.lang.String pass for a primitive // string. Object u = ((Wrapper) val).unwrap(); if (u instanceof String) return u; } } // fall through to error } catch (JavaScriptException jse) { // fall through to error } Object arg = (typeHint == null) ? "undefined" : typeHint.toString(); throw NativeGlobal.typeError1("msg.default.value", arg, this); } | 47345 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47345/40f7554390dea10ea64bd490d09230d2c0814929/ScriptableObject.java/clean/src/org/mozilla/javascript/ScriptableObject.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
19569,
12,
797,
618,
7002,
13,
288,
3639,
1033,
1244,
31,
3639,
1772,
9494,
273,
446,
31,
3639,
775,
288,
5411,
364,
261,
474,
277,
33,
20,
31,
277,
411,
576,
31,
277,
272... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
19569,
12,
797,
618,
7002,
13,
288,
3639,
1033,
1244,
31,
3639,
1772,
9494,
273,
446,
31,
3639,
775,
288,
5411,
364,
261,
474,
277,
33,
20,
31,
277,
411,
576,
31,
277,
272... |
if (ait.codepoint == ait.IS_STRING) { | if (ait.codepoint == UnicodeSetIterator.IS_STRING) { | public int compare(Object o1, Object o2) { if (o1 == o2) return 0; if (o1 == null) return -1; if (o2 == null) return 1; UnicodeSet a = (UnicodeSet)o1; UnicodeSet b = (UnicodeSet)o2; if (a.size() != b.size()) { return a.size() < b.size() ? -1 : 1; } ait.reset(a); bit.reset(b); while (ait.nextRange()) { bit.nextRange(); if (ait.codepoint != bit.codepoint) { return ait.codepoint < bit.codepoint ? -1 : 1; } if (ait.codepoint == ait.IS_STRING) { int result = ait.string.compareTo(bit.string); if (result != 0) return result; } else if (ait.codepointEnd != bit.codepointEnd) { return ait.codepointEnd < bit.codepointEnd ? -1 : 1; } } return 0; } | 27800 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/27800/e19906d953d4d75e0dce018f8a56b7423df505fd/GenerateCldrTests.java/clean/tools/java/org/unicode/cldr/icu/GenerateCldrTests.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
509,
3400,
12,
921,
320,
21,
16,
1033,
320,
22,
13,
288,
1082,
202,
430,
261,
83,
21,
422,
320,
22,
13,
327,
374,
31,
1082,
202,
430,
261,
83,
21,
422,
446,
13,
327,
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,
3196,
202,
482,
509,
3400,
12,
921,
320,
21,
16,
1033,
320,
22,
13,
288,
1082,
202,
430,
261,
83,
21,
422,
320,
22,
13,
327,
374,
31,
1082,
202,
430,
261,
83,
21,
422,
446,
13,
327,
30... |
writeContents( obj, Cell.CONTENT_SLOT, null ); | writeContents( obj, ICellModel.CONTENT_SLOT, null ); | public void visitCell( Cell obj ) { writer.startElement( DesignSchemaConstants.CELL_TAG ); writer.attribute( DesignSchemaConstants.ID_ATTRIB, new Long( obj .getID( ) ).toString( ) ); attribute( obj, DesignSchemaConstants.VIEW_ACTION_ATTRIB, DesignElement.VIEW_ACTION_PROP ); super.visitCell( obj ); property( obj, Cell.COLUMN_PROP ); property( obj, Cell.COL_SPAN_PROP ); property( obj, Cell.ROW_SPAN_PROP ); property( obj, Cell.DROP_PROP ); property( obj, Cell.HEIGHT_PROP ); property( obj, Cell.WIDTH_PROP ); property( obj, Cell.EVENT_HANDLER_CLASS_PROP ); property( obj, Cell.ON_PREPARE_METHOD ); property( obj, Cell.ON_CREATE_METHOD ); property( obj, Cell.ON_RENDER_METHOD ); writeStyle( obj ); writeContents( obj, Cell.CONTENT_SLOT, null ); writer.endElement( ); } | 5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/d802c33711e0d111551ae23575895cd060f085b6/ModuleWriter.java/clean/model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/writer/ModuleWriter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
3757,
4020,
12,
8614,
1081,
262,
202,
95,
202,
202,
6299,
18,
1937,
1046,
12,
29703,
3078,
2918,
18,
27752,
67,
7927,
11272,
202,
202,
6299,
18,
4589,
12,
29703,
3078,
29... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3757,
4020,
12,
8614,
1081,
262,
202,
95,
202,
202,
6299,
18,
1937,
1046,
12,
29703,
3078,
2918,
18,
27752,
67,
7927,
11272,
202,
202,
6299,
18,
4589,
12,
29703,
3078,
29... |
IQualifiedTypeName typeName = new QualifiedTypeName(namespace); | IQualifiedTypeName typeName = new QualifiedTypeName(namespace); | protected IStatus namespaceChanged() { StatusInfo status = new StatusInfo(); if (!isNamespaceSelected()) { return status; } // must not be empty String namespace = getNamespaceText(); if (namespace == null || namespace.length() == 0) { status.setError(NewClassWizardMessages.getString("NewClassCreationWizardPage.error.EnterNamespace")); //$NON-NLS-1$ return status; } IStatus val = CConventions.validateNamespaceName(namespace); if (val.getSeverity() == IStatus.ERROR) { status.setError(NewClassWizardMessages.getFormattedString("NewClassCreationWizardPage.error.InvalidNamespace", val.getMessage())); //$NON-NLS-1$ return status; } else if (val.getSeverity() == IStatus.WARNING) { status.setWarning(NewClassWizardMessages.getFormattedString("NewClassCreationWizardPage.warning.NamespaceDiscouraged", val.getMessage())); //$NON-NLS-1$ } IQualifiedTypeName typeName = new QualifiedTypeName(namespace); ICProject project = getCurrentProject(); if (project != null) { if (typeName.isQualified()) { // make sure enclosing namespace exists ITypeInfo parentNamespace = AllTypesCache.getType(project, ICElement.C_NAMESPACE, typeName.getEnclosingTypeName()); if (parentNamespace == null) { status.setError(NewClassWizardMessages.getString("NewClassCreationWizardPage.error.EnclosingNamespaceNotExists")); //$NON-NLS-1$ return status; } } ITypeInfo[] types = AllTypesCache.getTypes(project, typeName, false, true); if (types.length > 0) { // look for namespace boolean foundNamespace = false; boolean exactMatch = false; for (int i = 0; i < types.length; ++i) { ITypeInfo currType = types[i]; if (currType.getCElementType() == ICElement.C_NAMESPACE) { foundNamespace = true; exactMatch = currType.getQualifiedTypeName().equals(typeName); if (exactMatch) { // found a matching namespace break; } } } if (foundNamespace) { if (exactMatch) { // we're good to go status.setOK(); } else { status.setError(NewClassWizardMessages.getString("NewClassCreationWizardPage.error.NamespaceExistsDifferentCase")); //$NON-NLS-1$ } return status; } // look for other types exactMatch = false; for (int i = 0; i < types.length; ++i) { ITypeInfo currType = types[i]; if (currType.getCElementType() != ICElement.C_NAMESPACE) { exactMatch = currType.getQualifiedTypeName().equals(typeName); if (exactMatch) { // found a matching type break; } } } if (exactMatch) { status.setWarning(NewClassWizardMessages.getString("NewClassCreationWizardPage.error.TypeMatchingNamespaceExists")); //$NON-NLS-1$ } else { status.setWarning(NewClassWizardMessages.getString("NewClassCreationWizardPage.error.TypeMatchingNamespaceExistsDifferentCase")); //$NON-NLS-1$ } } else { status.setWarning(NewClassWizardMessages.getString("NewClassCreationWizardPage.warning.NamespaceNotExists")); //$NON-NLS-1$ } } val = CConventions.validateNamespaceName(typeName.lastSegment()); if (val.getSeverity() == IStatus.ERROR) { status.setError(NewClassWizardMessages.getFormattedString("NewClassCreationWizardPage.error.InvalidNamespace", val.getMessage())); //$NON-NLS-1$ return status; } return status; } | 54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/5524cec83bf1cb4c0d7deabd25f6892c0e92c73c/NewClassCreationWizardPage.java/clean/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/NewClassCreationWizardPage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
467,
1482,
1981,
5033,
1435,
288,
202,
202,
1482,
966,
1267,
273,
394,
2685,
966,
5621,
202,
202,
430,
16051,
291,
3402,
7416,
10756,
288,
1082,
565,
327,
1267,
31,
202,
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,
1117,
467,
1482,
1981,
5033,
1435,
288,
202,
202,
1482,
966,
1267,
273,
394,
2685,
966,
5621,
202,
202,
430,
16051,
291,
3402,
7416,
10756,
288,
1082,
565,
327,
1267,
31,
202,
202,
... |
if (propertyId.regionMatches(prefixLength, Constants.SCHEMA_LOCATION, 0, Constants.SCHEMA_LOCATION.length())) { | if (suffixLength == Constants.SCHEMA_LOCATION.length() && propertyId.endsWith(Constants.SCHEMA_LOCATION)) { | protected void checkProperty(String propertyId) throws XMLConfigurationException { // // Xerces Properties // if (propertyId.startsWith(Constants.XERCES_PROPERTY_PREFIX)) { final int prefixLength = Constants.XERCES_PROPERTY_PREFIX.length(); if (propertyId.regionMatches(prefixLength, Constants.DTD_SCANNER_PROPERTY, 0, Constants.DTD_SCANNER_PROPERTY.length())) { return; } if (propertyId.regionMatches(prefixLength, Constants.SCHEMA_LOCATION, 0, Constants.SCHEMA_LOCATION.length())) { return; } if (propertyId.regionMatches(prefixLength, Constants.SCHEMA_NONS_LOCATION, 0, Constants.SCHEMA_NONS_LOCATION.length())) { return; } } if (propertyId.startsWith(Constants.JAXP_PROPERTY_PREFIX)) { final int prefixLength = Constants.JAXP_PROPERTY_PREFIX.length(); if (propertyId.regionMatches(prefixLength, Constants.SCHEMA_SOURCE, 0, Constants.SCHEMA_SOURCE.length())) { return; } } // special cases if (propertyId.startsWith(Constants.SAX_PROPERTY_PREFIX)) { final int prefixLength = Constants.SAX_PROPERTY_PREFIX.length(); // // http://xml.org/sax/properties/xml-string // Value type: String // Access: read-only // Get the literal string of characters associated with the // current event. If the parser recognises and supports this // property but is not currently parsing text, it should return // null (this is a good way to check for availability before the // parse begins). // if (propertyId.regionMatches(prefixLength, Constants.XML_STRING_PROPERTY, 0, Constants.XML_STRING_PROPERTY.length())) { // REVISIT - we should probably ask xml-dev for a precise // definition of what this is actually supposed to return, and // in exactly which circumstances. short type = XMLConfigurationException.NOT_SUPPORTED; throw new XMLConfigurationException(type, propertyId); } } // // Not recognized // super.checkProperty(propertyId); } // checkProperty(String) | 6373 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6373/74854a4dd6ce7a572c298057865a9161761aaee5/XML11Configuration.java/clean/src/org/apache/xerces/parsers/XML11Configuration.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
866,
1396,
12,
780,
31894,
13,
1216,
3167,
10737,
288,
3639,
368,
3639,
368,
1139,
264,
764,
6183,
3639,
368,
3639,
309,
261,
4468,
548,
18,
17514,
1190,
12,
2918,
18,
60,
65... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
918,
866,
1396,
12,
780,
31894,
13,
1216,
3167,
10737,
288,
3639,
368,
3639,
368,
1139,
264,
764,
6183,
3639,
368,
3639,
309,
261,
4468,
548,
18,
17514,
1190,
12,
2918,
18,
60,
65... |
int[] coords2 = distanceCalculator(newCoords2,bondWidth/2); int[] xCoords2 = {coords2[0],coords2[2],coords2[4],coords2[6]}; int[] yCoords2 = {coords2[1],coords2[3],coords2[5],coords2[7]}; g.fillPolygon(xCoords2,yCoords2,4); | paintOneBond(newCoords2); | private void paintDoubleBond(Bond bond) { int[] coords = distanceCalculator(getBondCoordinates(bond),bondDistance/2); int[] newCoords1 = {coords[0],coords[1],coords[6],coords[7]}; int[] coords1 = distanceCalculator(newCoords1,bondWidth/2); int[] xCoords1 = {coords1[0],coords1[2],coords1[4],coords1[6]}; int[] yCoords1 = {coords1[1],coords1[3],coords1[5],coords1[7]}; g.fillPolygon(xCoords1,yCoords1,4); int[] newCoords2 = {coords[2],coords[3],coords[4],coords[5]}; int[] coords2 = distanceCalculator(newCoords2,bondWidth/2); int[] xCoords2 = {coords2[0],coords2[2],coords2[4],coords2[6]}; int[] yCoords2 = {coords2[1],coords2[3],coords2[5],coords2[7]}; g.fillPolygon(xCoords2,yCoords2,4); } | 45167 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45167/0ccdc81fbb854cafbe76975fa2e13098b1b51c00/Renderer2D.java/clean/org/openscience/cdk/Renderer2D.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
12574,
5265,
9807,
12,
9807,
8427,
13,
202,
95,
202,
202,
474,
8526,
6074,
273,
3888,
19278,
12,
588,
9807,
13431,
12,
26425,
3631,
26425,
7200,
19,
22,
1769,
9506,
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,
1152,
918,
12574,
5265,
9807,
12,
9807,
8427,
13,
202,
95,
202,
202,
474,
8526,
6074,
273,
3888,
19278,
12,
588,
9807,
13431,
12,
26425,
3631,
26425,
7200,
19,
22,
1769,
9506,
202,
... |
public static void instantiateDB(URL url, HomologeneBuilder builder) throws OperationNotSupportedException, FileNotFoundException, IOException { boolean inDB = false; boolean inGroup = false; if (!url.getProtocol().equals("file")) throw new OperationNotSupportedException(); // open the file BufferedReader rdr = new BufferedReader( new FileReader(url.getPath()) ); // the file assumes implicitly that a group has started builder.startDB(); builder.startGroup(); inDB = inGroup = true; // read loop Pattern titlePattern = Pattern.compile("TITLE\\s(\\d+)_(\\d+)=(\\S+)\\s(.*)"); Pattern orthoPattern = Pattern.compile("^\\s*(\\d+)\\s*\\|\\s*(\\d+)\\s*\\|([Bbc]{1})\\|(.*)\\|\\s*(\\d+)\\s*\\|(.*)\\|(.*)\\|\\s*(\\d+)\\s*\\|(.*)\\|(.*)"); String currLine; while ((currLine = rdr.readLine()) != null) { // parse current line if (currLine.startsWith(">")) { // start new group if (inGroup) builder.endGroup(); builder.startGroup(); } else if (currLine.startsWith("TITLE")) { try { // parse the line Matcher m = titlePattern.matcher(currLine); if (m.matches()) { if (m.groupCount() != 4) continue; // pick up the groups int taxonID = Integer.parseInt(m.group(1)); String homologeneID = m.group(2); String sym = m.group(3); String title = m.group(4); builder.addTitle(taxonID, homologeneID.trim(), title.trim()); } } catch (NumberFormatException nfe) { continue; } } else { // this is a orthology line try { // parse the line Matcher m = orthoPattern.matcher(currLine); if (m.matches()) {// System.out.println("=======================orthology line: " + m.groupCount() + "====================="); if (m.groupCount() != 10) continue; // pick up the groups String taxonID0 = m.group(1).trim();//System.out.println(taxonID0); String taxonID1 = m.group(2).trim();//System.out.println(taxonID1); String type = m.group(3).trim();//System.out.println(type); String locus0 = m.group(4).trim(); String homoID0 = m.group(5).trim(); String access0 = m.group(6).trim(); String locus1 = m.group(7).trim(); String homoID1 = m.group(8).trim(); String access1 = m.group(9).trim(); String finale = m.group(10).trim();//System.out.println(finale); // validate numeric formats Integer.parseInt(taxonID0); Integer.parseInt(taxonID1); // validate the similarity type before proceeding if ( (type.equals("B")) || (type.equals("b")) || (type.equals("c")) ) { if (type.equals("B")) { // validate numeric format Double.parseDouble(finale); builder.startOrthology(); builder.addOrthologyProperty(HomologeneBuilder.PERCENTIDENTITY, finale); builder.addOrthologyProperty(HomologeneBuilder.SIMILARITYTYPE, HomologeneBuilder.MULTIPLE); } else if (type.equals("b")) { // validate numeric format Integer.parseInt(finale); builder.startOrthology(); builder.addOrthologyProperty(HomologeneBuilder.PERCENTIDENTITY, finale); builder.addOrthologyProperty(HomologeneBuilder.SIMILARITYTYPE, HomologeneBuilder.TWIN); } else if (type.equals("c")) { builder.startOrthology(); builder.addOrthologyProperty(HomologeneBuilder.SIMILARITYTYPE, HomologeneBuilder.CURATED); builder.addOrthologyProperty(HomologeneBuilder.PERCENTIDENTITY, finale); } // add the orthologues builder.startOrthologue(); builder.addOrthologueProperty(HomologeneBuilder.TAXONID, taxonID0); builder.addOrthologueProperty(HomologeneBuilder.LOCUSID, locus0); builder.addOrthologueProperty(HomologeneBuilder.HOMOID, homoID0); builder.addOrthologueProperty(HomologeneBuilder.ACCESSION, access0); builder.endOrthologue(); builder.startOrthologue(); builder.addOrthologueProperty(HomologeneBuilder.TAXONID, taxonID1); builder.addOrthologueProperty(HomologeneBuilder.LOCUSID, locus1); builder.addOrthologueProperty(HomologeneBuilder.HOMOID, homoID1); builder.addOrthologueProperty(HomologeneBuilder.ACCESSION, access1); builder.endOrthologue(); builder.endOrthology(); } } } catch (NumberFormatException nfe) { builder.endOrthology(); continue; } } } // EOF if (inGroup) builder.endGroup(); if (inDB) builder.endDB(); } | 50397 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50397/da11978490f856a4ba4df50cadd5c557b4a21454/HomologeneTools.java/buggy/src/org/biojava/bio/program/homologene/HomologeneTools.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
225,
760,
225,
918,
225,
10275,
2290,
12,
1785,
225,
880,
16,
225,
670,
362,
3966,
4009,
1263,
225,
2089,
13,
7734,
1216,
225,
4189,
25482,
16,
225,
13707,
16,
225,
1860,
3639,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
225,
760,
225,
918,
225,
10275,
2290,
12,
1785,
225,
880,
16,
225,
670,
362,
3966,
4009,
1263,
225,
2089,
13,
7734,
1216,
225,
4189,
25482,
16,
225,
13707,
16,
225,
1860,
3639,
28... | ||
return pages.length; | return pages.size(); | public int getNumberOfPages() { return pages.length; } | 3011 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3011/7db9e738a62cae021d8a52915e84389f881d0f9e/PdfReader.java/buggy/itext/src/com/lowagie/text/pdf/PdfReader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
14981,
5716,
1435,
288,
3639,
327,
4689,
18,
1467,
5621,
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,
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,
509,
14981,
5716,
1435,
288,
3639,
327,
4689,
18,
1467,
5621,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
System.err.println("skippping testIncrementalSuite - too long"); | System.err.println("skipping testIncrementalSuite - too long"); | public void testIncrementalSuite() { System.err.println("skippping testIncrementalSuite - too long"); if (true) return; if (!eclipseAvailable()) { System.err.println("skipping test - eclipse classes not available"); return; } String[] options = new String[] { "!verbose", "!eclipse", }; Exp exp = new Exp(6, 6, 0, 6, 0, 0, 0); checkSelection(INCREMENTAL, options, "INFIX IGNORED", exp); } | 53148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/53148/ff27a1d81c3e98d11029bfd9f59cf62afb7fdc74/HarnessSelectionTest.java/buggy/testing-drivers/testsrc/org/aspectj/testing/drivers/HarnessSelectionTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
10798,
287,
13587,
1435,
288,
3639,
2332,
18,
370,
18,
8222,
2932,
7457,
1382,
1842,
10798,
287,
13587,
300,
4885,
1525,
8863,
3639,
309,
261,
3767,
13,
327,
31,
3639,
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,
1071,
918,
1842,
10798,
287,
13587,
1435,
288,
3639,
2332,
18,
370,
18,
8222,
2932,
7457,
1382,
1842,
10798,
287,
13587,
300,
4885,
1525,
8863,
3639,
309,
261,
3767,
13,
327,
31,
3639,
30... |
public org.quickfix.field.EncodedUnderlyingIssuer getEncodedUnderlyingIssuer() throws FieldNotFound { org.quickfix.field.EncodedUnderlyingIssuer value = new org.quickfix.field.EncodedUnderlyingIssuer(); | public quickfix.field.EncodedUnderlyingIssuer getEncodedUnderlyingIssuer() throws FieldNotFound { quickfix.field.EncodedUnderlyingIssuer value = new quickfix.field.EncodedUnderlyingIssuer(); | public org.quickfix.field.EncodedUnderlyingIssuer getEncodedUnderlyingIssuer() throws FieldNotFound { org.quickfix.field.EncodedUnderlyingIssuer value = new org.quickfix.field.EncodedUnderlyingIssuer(); getField(value); return value; } | 8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/MassQuoteAcknowledgement.java/clean/src/java/src/quickfix/fix44/MassQuoteAcknowledgement.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
10397,
14655,
6291,
16667,
28799,
14655,
6291,
16667,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
10397,
14655,
6291,
166... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
10397,
14655,
6291,
16667,
28799,
14655,
6291,
16667,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
10397,
14655,
6291,
166... |
LinearPrinter.println(" expanding filter by " + this.expansionFactors[i]); expandedReps[i] = this.linearRepresentations[i].expand(this.expansionFactors[i]); | LinearPrinter.println(" expanding filter by " + this.filterExpansionFactors[i]); expandedReps[i] = this.linearRepresentations[i].expand(this.filterExpansionFactors[i]); | public LinearFilterRepresentation transform() throws NoTransformPossibleException { int filterCount = linearRepresentations.length; LinearPrinter.println(" preparing to combine splitjoin of " + filterCount + " filters"); LinearPrinter.println(" (expansion)(RR join weight) factors:"); for (int i=0; i<filterCount; i++) { LinearPrinter.println(" " + "(" + this.expansionFactors[i] + ")" + "(" + this.combinationWeights[i] + ")"); } // do the expansion LinearFilterRepresentation[] expandedReps = new LinearFilterRepresentation[filterCount]; int totalCols = 0; for (int i=0; i<filterCount; i++) { LinearPrinter.println(" expanding filter by " + this.expansionFactors[i]); expandedReps[i] = this.linearRepresentations[i].expand(this.expansionFactors[i]); totalCols += expandedReps[i].getPushCount(); } // figure how how many columns the "stride" is (eg the sum of the weights) int strideLength = 0; for (int i=0; i<filterCount; i++) { strideLength += this.combinationWeights[i]; } // now, create a new matrix and vector that have the appropriate size: // cols = the sum of the number of columns in the expanded representations // rows = (all expanded matrices have the same number of rows) FilterMatrix expandedA = new FilterMatrix(expandedReps[0].getPeekCount(), totalCols); FilterVector expandedb = new FilterVector(totalCols); // now, copy the cols of the matrices (and vectors) into the expanded versions // for each expanded matrix, copy joinWeight[i] cols into the new matrix and vector // at an offset that makes the output work out correctly. See paper. int startOffset = 0; for (int i=0; i<filterCount; i++) { // figure out how many groups of joinWeight cols that we have int numGroups = expandedReps[i].getPushCount() / this.combinationWeights[i]; // total # of groups for (int j=0; j<numGroups; j++) { // figure out offset into expanded A to copy the columns int currentOffset = startOffset + j*strideLength; // the offset into the current source matrix is j*joinWeights[i] // the number of columns that we are copying is combination weights[i] expandedA.copyColumnsAt(currentOffset, expandedReps[i].getA(), j*this.combinationWeights[i], this.combinationWeights[i]); expandedb.copyColumnsAt(currentOffset, expandedReps[i].getb(), j*this.combinationWeights[i], this.combinationWeights[i]); } // update start of the offset for the next expanded rep. startOffset += this.combinationWeights[i]; } // now, return a new LinearRepresentation that represents the transformed // splitjoin. (remember peek=pop) return new LinearFilterRepresentation(expandedA, expandedb, expandedA.getRows()); } | 47772 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47772/6a1baeebecdd778b05fb4b08a9efdaa9c00d955f/LinearTransformSplitJoin.java/buggy/streams/src/at/dms/kjc/sir/linear/transform/LinearTransformSplitJoin.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
13921,
1586,
13742,
2510,
1435,
1216,
2631,
4059,
13576,
503,
288,
202,
474,
1034,
1380,
273,
9103,
23869,
1012,
18,
2469,
31,
202,
15982,
12149,
18,
8222,
2932,
675,
12583,
358,
8661... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
13921,
1586,
13742,
2510,
1435,
1216,
2631,
4059,
13576,
503,
288,
202,
474,
1034,
1380,
273,
9103,
23869,
1012,
18,
2469,
31,
202,
15982,
12149,
18,
8222,
2932,
675,
12583,
358,
8661... |
jPicturesList.setEnabled( enabled ); | jPicturesList.setEnabled( enabled && getCurrentAlbum().getCanAdd()); | void resetUIState() { SwingUtilities.invokeLater(new Runnable() { public void run() { // if the list is empty or comm, disable upload jUploadButton.setEnabled( getCurrentAlbum() != null && getCurrentAlbum().sizePictures() > 0 && !inProgress && jAlbumCombo.getSelectedIndex() >= 0 ); Gallery currentGallery = getCurrentGallery(); // during comm, don't change Gallery or do any other comm jLoginButton.setEnabled( !inProgress && currentGallery != null); jGalleryCombo.setEnabled( !inProgress ); jNewGalleryButton.setEnabled( !inProgress ); if (currentGallery != null && currentGallery.getUsername() != null && currentGallery.hasComm() && currentGallery.getComm(jStatusBar).isLoggedIn()) { jLoginButton.setText(grRes.getString("Log_out")); } else { jLoginButton.setText("Log in"); } // if the selected album is uploading, disable everything boolean enabled = ! inProgress && getCurrentAlbum() != null && jAlbumCombo.getModel().getSize() >= 1; jBrowseButton.setEnabled( enabled ); jPictureInspector.setEnabled( enabled ); jPicturesList.setEnabled( enabled ); jAlbumCombo.setEnabled( enabled ); jNewAlbumButton.setEnabled( !inProgress && currentGallery != null && currentGallery.hasComm() && currentGallery.getComm(jStatusBar).hasCapability(GalleryCommCapabilities.CAPA_NEW_ALBUM)); // change image displayed int sel = jPicturesList.getSelectedIndex(); /*if (mAlbum != null && mAlbum.getSize() < 1) { // if album was just emptied, it takes a while for the pictureList // to notice... // this is fixed by using invokeLater sel = -1; }*/ if ( GalleryRemote.getInstance().properties.getShowPreview() && previewFrame != null ) { if ( sel != -1 ) { previewFrame.displayFile( getCurrentAlbum().getPicture( sel ) ); } else { previewFrame.displayFile( null ); } if ( !previewFrame.isVisible() ) { previewFrame.setVisible( true ); } } // status if ( getCurrentAlbum() == null) { jPictureInspector.setPictures( null ); jStatusBar.setStatus("Select a Gallery URL and click Log in..." ); } else if ( getCurrentAlbum().sizePictures() > 0 ) { jPictureInspector.setPictures( jPicturesList.getSelectedValues() ); int selN = jPicturesList.getSelectedIndices().length; if ( sel == -1 ) { jStatusBar.setStatus(getCurrentAlbum().sizePictures() + " pictures / " + NumberFormat.getInstance().format( ( (int) getCurrentAlbum().getPictureFileSize() / 1024 ) ) + " K" ); } else { jStatusBar.setStatus("Selected " + selN + ((selN == 1)?" picture / ":" pictures / ") + NumberFormat.getInstance().format( ( (int) Album.getObjectFileSize( jPicturesList.getSelectedValues() ) / 1024 ) ) + " K" ); } } else { jPictureInspector.setPictures( null ); jStatusBar.setStatus("No selection" ); } }}); } | 5431 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5431/4a8fc67225338c8db0c556c5e282ef5dfe68da4b/MainFrame.java/buggy/gallery_remote/com/gallery/GalleryRemote/MainFrame.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
6459,
2715,
5370,
1119,
1435,
288,
202,
202,
6050,
310,
11864,
18,
14407,
20607,
12,
2704,
10254,
1435,
288,
1082,
202,
482,
918,
1086,
1435,
288,
9506,
202,
759,
309,
326,
666,
353,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2715,
5370,
1119,
1435,
288,
202,
202,
6050,
310,
11864,
18,
14407,
20607,
12,
2704,
10254,
1435,
288,
1082,
202,
482,
918,
1086,
1435,
288,
9506,
202,
759,
309,
326,
666,
353,... |
reloaded = true; | reloaded = true; | protected void updateWorkerPrivileged(URLConnection source) throws BundleException { AbstractBundle oldBundle = AbstractBundle.createBundle(bundledata, framework); boolean reloaded = false; BundleOperation storage = framework.adaptor.updateBundle(this.bundledata, source); BundleRepository bundles = framework.getBundles(); try { BundleData newBundleData = storage.begin(); // Must call framework createBundle to check execution environment. AbstractBundle newBundle = framework.createAndVerifyBundle(newBundleData); String[] nativepaths = framework.selectNativeCode(newBundle); if (nativepaths != null) { bundledata.installNativeCode(nativepaths); } boolean exporting; int st = getState(); synchronized (bundles) { exporting = reload(newBundle); manifestLocalization = null; } // indicate we have loaded from the new version of the bundle reloaded = true; if (System.getSecurityManager() != null && (bundledata.getType() & (BundleData.TYPE_BOOTCLASSPATH_EXTENSION | BundleData.TYPE_FRAMEWORK_EXTENSION)) != 0) { // must check for AllPermission before allow a bundle extension to be installed try { hasPermission(new AllPermission()); } catch (SecurityException se) { throw new BundleException(Msg.formatter.getString("BUNDLE_EXTENSION_PERMISSION"), se); //$NON-NLS-1$ } } // send out unresolved events outside synch block (defect #80610) if (st == RESOLVED) framework.publishBundleEvent(BundleEvent.UNRESOLVED, this); storage.commit(exporting); } catch (BundleException e) { try { storage.undo(); if (reloaded) /* * if we loaded from the new version of the * bundle */{ synchronized (bundles) { reload(oldBundle); /* revert to old version */ } } } catch (BundleException ee) { /* if we fail to revert then we are in big trouble */ framework.publishFrameworkEvent(FrameworkEvent.ERROR, this, ee); } throw e; } } | 2516 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2516/249359ca66714f4fdf660bc095787ad0bc5b442a/AbstractBundle.java/clean/bundles/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/core/AbstractBundle.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
1089,
6671,
18845,
12,
14790,
1084,
13,
1216,
8539,
503,
288,
202,
202,
7469,
3405,
1592,
3405,
273,
4115,
3405,
18,
2640,
3405,
12,
9991,
892,
16,
8257,
1769,
202,
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,
1117,
918,
1089,
6671,
18845,
12,
14790,
1084,
13,
1216,
8539,
503,
288,
202,
202,
7469,
3405,
1592,
3405,
273,
4115,
3405,
18,
2640,
3405,
12,
9991,
892,
16,
8257,
1769,
202,
202,
... |
newCCattr.setNewValue(BugzillaPreferences.getUserName()); | newCCattr.setNewValue(BugzillaPreferencePage.getUserName()); | private void setDefaultCCValue(){ Attribute newCCattr = bug.getAttributeForKnobName("newcc"); Attribute owner = bug.getAttribute("AssignedTo"); //Don't add the cc if the user is the bug owner if(owner != null && owner.getValue().indexOf(BugzillaPreferences.getUserName()) > -1){ return; } //Add the user to the cc list if(newCCattr != null) { if (newCCattr.getNewValue().equals("")){ newCCattr.setNewValue(BugzillaPreferences.getUserName()); } } } | 51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/e22519ca0e9999a69c25435efd31f89c774867c2/ExistingBugEditor.java/clean/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/editor/ExistingBugEditor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
9277,
6743,
620,
1435,
95,
202,
202,
1499,
394,
6743,
1747,
273,
7934,
18,
588,
1499,
1290,
47,
82,
947,
461,
2932,
2704,
952,
8863,
202,
202,
1499,
3410,
273,
7934,
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,
1152,
918,
9277,
6743,
620,
1435,
95,
202,
202,
1499,
394,
6743,
1747,
273,
7934,
18,
588,
1499,
1290,
47,
82,
947,
461,
2932,
2704,
952,
8863,
202,
202,
1499,
3410,
273,
7934,
18,... |
boolean mod_retry = false; RubyModule tmp = this; | boolean mod_retry = false; RubyModule tmp = this; | public RubyObject getConstant(RubyId id) { boolean mod_retry = false; RubyModule tmp = this; while (true) { while (tmp != null) { if (tmp.getInstanceVariables().get(id) != null) { return (RubyObject) tmp.getInstanceVariables().get(id); } if (tmp == getRuby().getClasses().getObjectClass() && getRuby().getTopConstant(id) != null) { return getRuby().getTopConstant(id); } tmp = tmp.getSuperClass(); } if (!mod_retry && isModule()) { mod_retry = true; tmp = getRuby().getClasses().getObjectClass(); continue; } break; } /* Uninitialized constant */ if (this != getRuby().getClasses().getObjectClass()) { throw new RubyNameException( getRuby(), "uninitialized constant " + id.toName() + " at " + getClassPath().getValue()); } else { throw new RubyNameException(getRuby(), "uninitialized constant " + id.toName()); } // return getRuby().getNil(); } | 45753 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45753/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/clean/org/jruby/RubyModule.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
19817,
921,
24337,
12,
54,
10340,
548,
612,
13,
288,
202,
202,
6494,
681,
67,
9620,
273,
629,
31,
202,
202,
54,
10340,
3120,
1853,
273,
333,
31,
202,
202,
17523,
261,
3767,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
19817,
921,
24337,
12,
54,
10340,
548,
612,
13,
288,
202,
202,
6494,
681,
67,
9620,
273,
629,
31,
202,
202,
54,
10340,
3120,
1853,
273,
333,
31,
202,
202,
17523,
261,
3767,
... |
ts.matchToken(ts.RC); | mustMatchToken(ts, ts.RC, "msg.no.brace.after.body"); | private Object statementHelper(TokenStream ts, Source source) throws IOException, JavaScriptException { Object pn = null; // If skipsemi == true, don't add SEMI + EOL to source at the // end of this statment. For compound statements, IF/FOR etc. boolean skipsemi = false; int tt; int lastExprType = 0; // For wellTerminated. 0 to avoid warning. tt = ts.getToken(); switch(tt) { case ts.IF: { skipsemi = true; source.append((char)ts.IF); int lineno = ts.getLineno(); Object cond = condition(ts, source); source.append((char)ts.LC); source.append((char)ts.EOL); Object ifTrue = statement(ts, source); Object ifFalse = null; if (ts.matchToken(ts.ELSE)) { source.append((char)ts.RC); source.append((char)ts.ELSE); source.append((char)ts.LC); source.append((char)ts.EOL); ifFalse = statement(ts, source); } source.append((char)ts.RC); source.append((char)ts.EOL); pn = nf.createIf(cond, ifTrue, ifFalse, lineno); break; } case ts.SWITCH: { skipsemi = true; source.append((char)ts.SWITCH); pn = nf.createSwitch(ts.getLineno()); Object cur_case = null; // to kill warning Object case_statements; mustMatchToken(ts, ts.LP, "msg.no.paren.switch"); source.append((char)ts.LP); nf.addChildToBack(pn, expr(ts, source, false)); mustMatchToken(ts, ts.RP, "msg.no.paren.after.switch"); source.append((char)ts.RP); mustMatchToken(ts, ts.LC, "msg.no.brace.switch"); source.append((char)ts.LC); source.append((char)ts.EOL); while ((tt = ts.getToken()) != ts.RC && tt != ts.EOF) { switch(tt) { case ts.CASE: source.append((char)ts.CASE); cur_case = nf.createUnary(ts.CASE, expr(ts, source, false)); source.append((char)ts.COLON); source.append((char)ts.EOL); break; case ts.DEFAULT: cur_case = nf.createLeaf(ts.DEFAULT); source.append((char)ts.DEFAULT); source.append((char)ts.COLON); source.append((char)ts.EOL); // XXX check that there isn't more than one default break; default: reportError(ts, "msg.bad.switch"); break; } mustMatchToken(ts, ts.COLON, "msg.no.colon.case"); case_statements = nf.createLeaf(TokenStream.BLOCK); while ((tt = ts.peekToken()) != ts.RC && tt != ts.CASE && tt != ts.DEFAULT && tt != ts.EOF) { nf.addChildToBack(case_statements, statement(ts, source)); } // assert cur_case nf.addChildToBack(cur_case, case_statements); nf.addChildToBack(pn, cur_case); } source.append((char)ts.RC); source.append((char)ts.EOL); break; } case ts.WHILE: { skipsemi = true; source.append((char)ts.WHILE); int lineno = ts.getLineno(); Object cond = condition(ts, source); source.append((char)ts.LC); source.append((char)ts.EOL); Object body = statement(ts, source); source.append((char)ts.RC); source.append((char)ts.EOL); pn = nf.createWhile(cond, body, lineno); break; } case ts.DO: { source.append((char)ts.DO); source.append((char)ts.LC); source.append((char)ts.EOL); int lineno = ts.getLineno(); Object body = statement(ts, source); source.append((char)ts.RC); mustMatchToken(ts, ts.WHILE, "msg.no.while.do"); source.append((char)ts.WHILE); Object cond = condition(ts, source); pn = nf.createDoWhile(body, cond, lineno); break; } case ts.FOR: { skipsemi = true; source.append((char)ts.FOR); int lineno = ts.getLineno(); Object init; // Node init is also foo in 'foo in Object' Object cond; // Node cond is also object in 'foo in Object' Object incr = null; // to kill warning Object body; mustMatchToken(ts, ts.LP, "msg.no.paren.for"); source.append((char)ts.LP); tt = ts.peekToken(); if (tt == ts.SEMI) { init = nf.createLeaf(ts.VOID); } else { if (tt == ts.VAR) { // set init to a var list or initial ts.getToken(); // throw away the 'var' token init = variables(ts, source, true); } else { init = expr(ts, source, true); } } tt = ts.peekToken(); if (tt == ts.RELOP && ts.getOp() == ts.IN) { ts.matchToken(ts.RELOP); source.append((char)ts.IN); // 'cond' is the object over which we're iterating cond = expr(ts, source, false); } else { // ordinary for loop mustMatchToken(ts, ts.SEMI, "msg.no.semi.for"); source.append((char)ts.SEMI); if (ts.peekToken() == ts.SEMI) { // no loop condition cond = nf.createLeaf(ts.VOID); } else { cond = expr(ts, source, false); } mustMatchToken(ts, ts.SEMI, "msg.no.semi.for.cond"); source.append((char)ts.SEMI); if (ts.peekToken() == ts.RP) { incr = nf.createLeaf(ts.VOID); } else { incr = expr(ts, source, false); } } mustMatchToken(ts, ts.RP, "msg.no.paren.for.ctrl"); source.append((char)ts.RP); source.append((char)ts.LC); source.append((char)ts.EOL); body = statement(ts, source); source.append((char)ts.RC); source.append((char)ts.EOL); if (incr == null) { // cond could be null if 'in obj' got eaten by the init node. pn = nf.createForIn(init, cond, body, lineno); } else { pn = nf.createFor(init, cond, incr, body, lineno); } break; } case ts.TRY: { int lineno = ts.getLineno(); Object tryblock; Object catchblocks = null; Object finallyblock = null; skipsemi = true; source.append((char)ts.TRY); source.append((char)ts.LC); source.append((char)ts.EOL); tryblock = statement(ts, source); source.append((char)ts.RC); source.append((char)ts.EOL); catchblocks = nf.createLeaf(TokenStream.BLOCK); int peek = ts.peekToken(); if (peek == ts.CATCH) { while (ts.matchToken(ts.CATCH)) { source.append((char)ts.CATCH); mustMatchToken(ts, ts.LP, "msg.no.paren.catch"); source.append((char)ts.LP); mustMatchToken(ts, ts.NAME, "msg.bad.catchcond"); String varName = ts.getString(); source.addString(ts.NAME, varName); Object catchCond = null; if (implementsCatchCond && ts.matchToken(ts.COLON)) { source.append((char)ts.COLON); catchCond = expr(ts, source, false); } mustMatchToken(ts, ts.RP, "msg.bad.catchcond"); source.append((char)ts.RP); mustMatchToken(ts, ts.LC, "msg.no.brace.catchblock"); source.append((char)ts.LC); source.append((char)ts.EOL); nf.addChildToBack(catchblocks, nf.createCatch(varName, catchCond, statements(ts, source), ts.getLineno())); ts.matchToken(ts.RC); source.append((char)ts.RC); source.append((char)ts.EOL); } } else if (peek != ts.FINALLY) { mustMatchToken(ts, ts.FINALLY, "msg.try.no.catchfinally"); } if (ts.matchToken(ts.FINALLY)) { source.append((char)ts.FINALLY); source.append((char)ts.LC); source.append((char)ts.EOL); finallyblock = statement(ts, source); source.append((char)ts.RC); source.append((char)ts.EOL); } pn = nf.createTryCatchFinally(tryblock, catchblocks, finallyblock, lineno); break; } case ts.THROW: { int lineno = ts.getLineno(); source.append((char)ts.THROW); pn = nf.createThrow(expr(ts, source, false), lineno); if (lineno == ts.getLineno()) wellTerminated(ts, ts.ERROR); break; } case ts.BREAK: { int lineno = ts.getLineno(); source.append((char)ts.BREAK); // matchLabel only matches if there is one String label = matchLabel(ts); if (label != null) { source.addString(ts.NAME, label); } pn = nf.createBreak(label, lineno); break; } case ts.CONTINUE: { int lineno = ts.getLineno(); source.append((char)ts.CONTINUE); // matchLabel only matches if there is one String label = matchLabel(ts); if (label != null) { source.addString(ts.NAME, label); } pn = nf.createContinue(label, lineno); break; } case ts.WITH: { skipsemi = true; source.append((char)ts.WITH); int lineno = ts.getLineno(); mustMatchToken(ts, ts.LP, "msg.no.paren.with"); source.append((char)ts.LP); Object obj = expr(ts, source, false); mustMatchToken(ts, ts.RP, "msg.no.paren.after.with"); source.append((char)ts.RP); source.append((char)ts.LC); source.append((char)ts.EOL); Object body = statement(ts, source); source.append((char)ts.RC); source.append((char)ts.EOL); pn = nf.createWith(obj, body, lineno); break; } case ts.VAR: { int lineno = ts.getLineno(); pn = variables(ts, source, false); if (ts.getLineno() == lineno) wellTerminated(ts, ts.ERROR); break; } case ts.RETURN: { Object retExpr = null; int lineno = 0; source.append((char)ts.RETURN); // bail if we're not in a (toplevel) function if ((ts.flags & ts.TSF_FUNCTION) == 0) reportError(ts, "msg.bad.return"); /* This is ugly, but we don't want to require a semicolon. */ ts.flags |= ts.TSF_REGEXP; tt = ts.peekTokenSameLine(); ts.flags &= ~ts.TSF_REGEXP; if (tt != ts.EOF && tt != ts.EOL && tt != ts.SEMI && tt != ts.RC) { lineno = ts.getLineno(); retExpr = expr(ts, source, false); if (ts.getLineno() == lineno) wellTerminated(ts, ts.ERROR); ts.flags |= ts.TSF_RETURN_EXPR; } else { ts.flags |= ts.TSF_RETURN_VOID; } if ((ts.flags & (ts.TSF_RETURN_EXPR | ts.TSF_RETURN_VOID)) == (ts.TSF_RETURN_EXPR | ts.TSF_RETURN_VOID)) reportError(ts, "msg.fn.retval"); // XXX ASSERT pn pn = nf.createReturn(retExpr, lineno); break; } case ts.LC: skipsemi = true; pn = statements(ts, source); mustMatchToken(ts, ts.RC, "msg.no.brace.block"); break; case ts.ERROR: reportError(ts, "msg.scanner.caught.error"); // Fall thru, to have a node for error recovery to work on case ts.EOL: case ts.SEMI: pn = nf.createLeaf(ts.VOID); skipsemi = true; break; default: { lastExprType = tt; int tokenno = ts.getTokenno(); ts.ungetToken(tt); int lineno = ts.getLineno(); pn = expr(ts, source, false); if (ts.peekToken() == ts.COLON) { /* check that the last thing the tokenizer returned was a * NAME and that only one token was consumed. */ if (lastExprType != ts.NAME || (ts.getTokenno() != tokenno)) reportError(ts, "msg.bad.label"); ts.getToken(); // eat the COLON /* in the C source, the label is associated with the * statement that follows: * nf.addChildToBack(pn, statement(ts)); */ String name = ts.getString(); pn = nf.createLabel(name, lineno); // depend on decompiling lookahead to guess that that // last name was a label. source.append((char)ts.COLON); source.append((char)ts.EOL); return pn; } pn = nf.createExprStatement(pn, lineno); /* * Check explicitly against (multi-line) function * statement. * lastExprEndLine is a hack to fix an * automatic semicolon insertion problem with function * expressions; the ts.getLineno() == lineno check was * firing after a function definition even though the * next statement was on a new line, because * speculative getToken calls advanced the line number * even when they didn't succeed. */ if (ts.getLineno() == lineno || (lastExprType == ts.FUNCTION && ts.getLineno() == lastExprEndLine)) { wellTerminated(ts, lastExprType); } break; } } ts.matchToken(ts.SEMI); if (!skipsemi) { source.append((char)ts.SEMI); source.append((char)ts.EOL); } return pn; } | 51996 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51996/741cf4ed39eb86d92e1ed9534cf08f057ea58784/Parser.java/buggy/js/rhino/org/mozilla/javascript/Parser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1033,
3021,
2276,
12,
1345,
1228,
3742,
16,
4998,
1084,
13,
3639,
1216,
1860,
16,
11905,
503,
565,
288,
3639,
1033,
11059,
273,
446,
31,
3639,
368,
971,
2488,
307,
9197,
422,
638,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1033,
3021,
2276,
12,
1345,
1228,
3742,
16,
4998,
1084,
13,
3639,
1216,
1860,
16,
11905,
503,
565,
288,
3639,
1033,
11059,
273,
446,
31,
3639,
368,
971,
2488,
307,
9197,
422,
638,
... |
String[] props = { "lastIndex", "source", "global", "ignoreCase", "multiline" }; int[] propAttrs = { ScriptableObject.PERMANENT, ScriptableObject.PERMANENT | ScriptableObject.READONLY, ScriptableObject.PERMANENT | ScriptableObject.READONLY, ScriptableObject.PERMANENT | ScriptableObject.READONLY, ScriptableObject.PERMANENT | ScriptableObject.READONLY }; for (int i=0; i < props.length; i++) { proto.defineProperty(props[i], NativeRegExp.class, propAttrs[i]); | NativeRegExpCtor ctor = new NativeRegExpCtor(); ctor.setPrototype(getClassPrototype(scope, "Function")); ctor.setParentScope(scope); ctor.setImmunePrototypeProperty(proto); if (sealed) { proto.sealObject(); ctor.sealObject(); | public static void init(Scriptable scope) throws PropertyException { NativeRegExp proto = new NativeRegExp(); proto.setParentScope(scope); proto.setPrototype(getObjectPrototype(scope)); String[] fns = { "compile", "toString", "exec", "test", "prefix" }; proto.defineFunctionProperties(fns, NativeRegExp.class, ScriptableObject.DONTENUM); String[] props = { "lastIndex", "source", "global", "ignoreCase", "multiline" }; int[] propAttrs = { ScriptableObject.PERMANENT, ScriptableObject.PERMANENT | ScriptableObject.READONLY, ScriptableObject.PERMANENT | ScriptableObject.READONLY, ScriptableObject.PERMANENT | ScriptableObject.READONLY, ScriptableObject.PERMANENT | ScriptableObject.READONLY }; for (int i=0; i < props.length; i++) { proto.defineProperty(props[i], NativeRegExp.class, propAttrs[i]); } Scriptable ctor = NativeRegExpCtor.init(scope); ctor.put("prototype", ctor, proto); } | 12376 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12376/8b34980fb3adc3beae5bcea5913d426dc2e366c8/NativeRegExp.java/buggy/js/rhino/src/org/mozilla/javascript/regexp/NativeRegExp.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
1208,
12,
3651,
429,
2146,
13,
3639,
1216,
4276,
503,
565,
288,
3639,
16717,
13673,
3760,
273,
394,
16717,
13673,
5621,
3639,
3760,
18,
542,
3054,
3876,
12,
4887,
1769,
36... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3651,
429,
2146,
13,
3639,
1216,
4276,
503,
565,
288,
3639,
16717,
13673,
3760,
273,
394,
16717,
13673,
5621,
3639,
3760,
18,
542,
3054,
3876,
12,
4887,
1769,
36... |
private UDPService() { | private UDPService() { | private UDPService() { UDP_THREAD = new Thread(this, "UDPService"); UDP_THREAD.setDaemon(true); UDP_THREAD.start(); } | 5134 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5134/11c4471b31c882a4b2598eae7e2ed051ea052963/UDPService.java/buggy/components/gnutella-core/src/main/java/com/limegroup/gnutella/UDPService.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
16230,
1179,
1435,
288,
3639,
16230,
67,
21730,
273,
394,
4884,
12,
2211,
16,
315,
20352,
1179,
8863,
202,
202,
20352,
67,
21730,
18,
542,
12858,
12,
3767,
1769,
3639,
16230,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
225,
202,
1152,
16230,
1179,
1435,
288,
3639,
16230,
67,
21730,
273,
394,
4884,
12,
2211,
16,
315,
20352,
1179,
8863,
202,
202,
20352,
67,
21730,
18,
542,
12858,
12,
3767,
1769,
3639,
16230,
6... |
currentMessage); | rawMessage); | private SIPMessage parseMessage(String currentMessage) throws ParseException { // position line counter at the end of the // sip messages. // System.out.println("parsing " + currentMessage); int sip_message_size = 0; // # of lines in the sip message SIPMessage sipmsg = null; java.util.StringTokenizer tokenizer = new java.util.StringTokenizer(currentMessage, "\n", true); messageHeaders = new Vector(); // A list of headers for error reporting try { while (tokenizer.hasMoreElements()) { String nexttok = tokenizer.nextToken(); if (nexttok.equals("\n")) { String nextnexttok = tokenizer.nextToken(); if (nextnexttok.equals("\n")) { break; } else messageHeaders.add(nextnexttok); } else messageHeaders.add(nexttok); sip_message_size++; } } catch (NoSuchElementException ex) { } currentLine = 0; currentHeader = (String) messageHeaders.elementAt(currentLine); String firstLine = currentHeader; // System.out.println("first Line " + firstLine); if (!firstLine.startsWith(SIPConstants.SIP_VERSION_STRING)) { sipmsg = new SIPRequest(); try { RequestLine rl = new RequestLineParser(firstLine + "\n").parse(); ((SIPRequest) sipmsg).setRequestLine(rl); } catch (ParseException ex) { if (this.parseExceptionListener != null) this.parseExceptionListener.handleException( ex, sipmsg, RequestLine.class, firstLine, currentMessage); else throw ex; } } else { sipmsg = new SIPResponse(); try { StatusLine sl = new StatusLineParser(firstLine + "\n").parse(); ((SIPResponse) sipmsg).setStatusLine(sl); } catch (ParseException ex) { if (this.parseExceptionListener != null) { this.parseExceptionListener.handleException( ex, sipmsg, StatusLine.class, firstLine, currentMessage); } else throw ex; } } for (int i = 1; i < messageHeaders.size(); i++) { String hdrstring = (String) messageHeaders.elementAt(i); if (hdrstring == null || hdrstring.trim().equals("")) continue; HeaderParser hdrParser = null; try { hdrParser = ParserFactory.createParser(hdrstring + "\n"); } catch (ParseException ex) { this.parseExceptionListener.handleException( ex, sipmsg, null, hdrstring, currentMessage); continue; } try { SIPHeader sipHeader = hdrParser.parse(); sipmsg.attachHeader(sipHeader, false); } catch (ParseException ex) { if (this.parseExceptionListener != null) { String hdrName = Lexer.getHeaderName(hdrstring); Class hdrClass = NameMap.getClassFromName(hdrName); try { if (hdrClass == null) { hdrClass = Class.forName( PackageNames.SIPHEADERS_PACKAGE + ".ExtensionHeaderImpl"); } this.parseExceptionListener.handleException( ex, sipmsg, hdrClass, hdrstring, currentMessage); } catch (ClassNotFoundException ex1) { InternalErrorHandler.handleException(ex1); } } } } return sipmsg; } | 7607 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7607/cddc2d617709ebf9d928c30205c044c0a5f0438a/StringMsgParser.java/buggy/trunk/src/gov/nist/javax/sip/parser/StringMsgParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
348,
2579,
1079,
1109,
1079,
12,
780,
783,
1079,
13,
202,
202,
15069,
10616,
288,
202,
202,
759,
1754,
980,
3895,
622,
326,
679,
434,
326,
202,
202,
759,
10341,
2743,
18,
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,
1152,
348,
2579,
1079,
1109,
1079,
12,
780,
783,
1079,
13,
202,
202,
15069,
10616,
288,
202,
202,
759,
1754,
980,
3895,
622,
326,
679,
434,
326,
202,
202,
759,
10341,
2743,
18,
202... |
getOwner( ).getViewer( ) .setSelection( new StructuredSelection( list ) ); | if (getOwner( ).getViewer( ).getControl().isVisible()) { getOwner( ).getViewer( ) .setSelection( new StructuredSelection( list ) ); } | public void run( ) { getOwner( ).getViewer( ) .setSelection( new StructuredSelection( list ) ); } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/5495381640a77875e5cbf18f5f5d7159e3ccaa3f/TableLayout.java/clean/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/layout/TableLayout.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4697,
202,
482,
918,
1086,
12,
262,
9506,
202,
95,
6862,
202,
588,
5541,
12,
262,
18,
588,
18415,
12,
262,
6862,
1082,
202,
18,
542,
6233,
12,
394,
7362,
2862,
6233,
12,
666,
262,
11272,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4697,
202,
482,
918,
1086,
12,
262,
9506,
202,
95,
6862,
202,
588,
5541,
12,
262,
18,
588,
18415,
12,
262,
6862,
1082,
202,
18,
542,
6233,
12,
394,
7362,
2862,
6233,
12,
666,
262,
11272,
9... |
this.params_ = params; | return this.params_; | public void params (String params) { this.params_ = params; } | 1867 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1867/4a083aa184dc44951c22cca7515c6d1cb407b690/AddServiceObjectNode.java/clean/java/src/AddServiceObjectNode.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
859,
261,
780,
859,
13,
225,
288,
565,
327,
333,
18,
2010,
67,
31,
225,
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,
... | [
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
859,
261,
780,
859,
13,
225,
288,
565,
327,
333,
18,
2010,
67,
31,
225,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Paint p = CSSUtilities.convertFillToPaint((SVGElement)element, node, ctx, cssDecl, uctx); if (p != null) { result.put(TextAttribute.FOREGROUND, p); } p = CSSUtilities.convertStrokeToPaint((SVGElement)element, node, ctx, cssDecl, uctx); if (p != null) { result.put (GVTAttributedCharacterIterator.TextAttribute.STROKE_PAINT, p); } Stroke stroke = CSSUtilities.convertStrokeToBasicStroke((SVGElement)element, ctx, cssDecl, uctx); if(stroke != null){ result.put(GVTAttributedCharacterIterator.TextAttribute.STROKE, stroke); } | protected Map getAttributeMap(BridgeContext ctx, Element element, GraphicsNode node) { CSSStyleDeclaration cssDecl = ctx.getViewCSS().getComputedStyle(element, null); UnitProcessor.Context uctx = new DefaultUnitProcessorContext(ctx, cssDecl); Map result = new HashMap(); CSSPrimitiveValue v; // Font size float fs = CSSUtilities.convertFontSize((SVGElement)element, ctx, cssDecl, uctx); fs = Math.round(fs * ctx.getUserAgent().getPixelToMM() * 72f / 25.4f); result.put(TextAttribute.SIZE, new Float(fs)); // Font family CSSValueList ff = (CSSValueList)cssDecl.getPropertyCSSValue (FONT_FAMILY_PROPERTY); String s = null; for (int i = 0; s == null && i < ff.getLength(); i++) { v = (CSSPrimitiveValue)ff.item(i); s = (String)fonts.get(v.getStringValue()); } s = (s == null) ? "SansSerif" : s; result.put(TextAttribute.FAMILY, s); // Font weight v = (CSSPrimitiveValue)cssDecl.getPropertyCSSValue (FONT_WEIGHT_PROPERTY); if (v.getPrimitiveType() == CSSPrimitiveValue.CSS_IDENT) { if (v.getStringValue().charAt(0) == 'n') { result.put(TextAttribute.WEIGHT, TextAttribute.WEIGHT_REGULAR); } else { result.put(TextAttribute.WEIGHT, TextAttribute.WEIGHT_BOLD); } } else { switch ((int)v.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)) { case 100: result.put(TextAttribute.WEIGHT, TextAttribute.WEIGHT_EXTRA_LIGHT); break; case 200: result.put(TextAttribute.WEIGHT, TextAttribute.WEIGHT_LIGHT); break; case 300: result.put(TextAttribute.WEIGHT, TextAttribute.WEIGHT_DEMILIGHT); break; case 400: result.put(TextAttribute.WEIGHT, TextAttribute.WEIGHT_REGULAR); break; case 500: result.put(TextAttribute.WEIGHT, TextAttribute.WEIGHT_SEMIBOLD); break; case 600: result.put(TextAttribute.WEIGHT, TextAttribute.WEIGHT_DEMIBOLD); break; case 700: result.put(TextAttribute.WEIGHT, TextAttribute.WEIGHT_BOLD); break; case 800: result.put(TextAttribute.WEIGHT, //TextAttribute.WEIGHT_EXTRABOLD); TextAttribute.WEIGHT_BOLD); break; case 900: result.put(TextAttribute.WEIGHT, //TextAttribute.WEIGHT_ULTRABOLD); TextAttribute.WEIGHT_BOLD); } } // Font style v = (CSSPrimitiveValue)cssDecl.getPropertyCSSValue (FONT_STYLE_PROPERTY); s = v.getStringValue(); switch (s.charAt(0)) { case 'n': result.put(TextAttribute.POSTURE, TextAttribute.POSTURE_REGULAR); break; case 'o': case 'i': result.put(TextAttribute.POSTURE, TextAttribute.POSTURE_OBLIQUE); } // Font stretch v = (CSSPrimitiveValue)cssDecl.getPropertyCSSValue (FONT_STRETCH_PROPERTY); s = v.getStringValue(); switch (s.charAt(0)) { case 'u': if (s.charAt(6) == 'c') { result.put(TextAttribute.WIDTH, TextAttribute.WIDTH_CONDENSED); } else { result.put(TextAttribute.WIDTH, TextAttribute.WIDTH_EXTENDED); } break; case 'e': if (s.charAt(6) == 'c') { result.put(TextAttribute.WIDTH, TextAttribute.WIDTH_CONDENSED); } else { if (s.length() == 8) { result.put(TextAttribute.WIDTH, TextAttribute.WIDTH_SEMI_EXTENDED); } else { result.put(TextAttribute.WIDTH, TextAttribute.WIDTH_EXTENDED); } } break; case 's': if (s.charAt(6) == 'c') { result.put(TextAttribute.WIDTH, TextAttribute.WIDTH_SEMI_CONDENSED); } else { result.put(TextAttribute.WIDTH, TextAttribute.WIDTH_SEMI_EXTENDED); } break; default: result.put(TextAttribute.WIDTH, TextAttribute.WIDTH_REGULAR); } // Text decoration CSSValue cssVal = cssDecl.getPropertyCSSValue (TEXT_DECORATION_PROPERTY); short t = cssVal.getCssValueType(); if (t == CSSValue.CSS_VALUE_LIST) { CSSValueList lst = (CSSValueList)cssVal; for (int i = 0; i < lst.getLength(); i++) { v = (CSSPrimitiveValue)lst.item(i); s = v.getStringValue(); switch (s.charAt(0)) { case 'u': result.put(TextAttribute.UNDERLINE, TextAttribute.UNDERLINE_ON); break; case 'o': // !!! overline break; case 'l': result.put(TextAttribute.STRIKETHROUGH, TextAttribute.STRIKETHROUGH_ON); } } } // Fill Paint p = CSSUtilities.convertFillToPaint((SVGElement)element, node, ctx, cssDecl, uctx); if (p != null) { result.put(TextAttribute.FOREGROUND, p); } // Stroke Paint p = CSSUtilities.convertStrokeToPaint((SVGElement)element, node, ctx, cssDecl, uctx); if (p != null) { result.put (GVTAttributedCharacterIterator.TextAttribute.STROKE_PAINT, p); } // Stroke Stroke stroke = CSSUtilities.convertStrokeToBasicStroke((SVGElement)element, ctx, cssDecl, uctx); if(stroke != null){ result.put(GVTAttributedCharacterIterator.TextAttribute.STROKE, stroke); } return result; } | 46680 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46680/a884e97a92d5b449ab1ff18def7a446e0e19d3a1/SVGTextElementBridge.java/clean/sources/org/apache/batik/refimpl/bridge/SVGTextElementBridge.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
1635,
4061,
863,
12,
13691,
1042,
1103,
16,
21394,
3010,
930,
16,
21394,
16830,
907,
756,
13,
288,
3639,
6765,
2885,
6094,
3747,
3456,
5411,
273,
1103,
18,
588,
1767,
10276,
7675,
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,
377,
4750,
1635,
4061,
863,
12,
13691,
1042,
1103,
16,
21394,
3010,
930,
16,
21394,
16830,
907,
756,
13,
288,
3639,
6765,
2885,
6094,
3747,
3456,
5411,
273,
1103,
18,
588,
1767,
10276,
7675,
5... | |
public CommonDropAdapterAssistant[] findCommonDropAdapterAssistants(Object aDropTarget) { return null; | public CommonDropAdapterAssistant[] findCommonDropAdapterAssistants( Object aDropTarget, TransferData aTransferType) { CommonDropAdapterDescriptor[] descriptors = CommonDropDescriptorManager .getInstance().findCommonDropAdapterAssistants(aDropTarget, contentService); if (descriptors.length == 0) return NO_ASSISTANTS; if (LocalSelectionTransfer.getTransfer().isSupportedType(aTransferType) && LocalSelectionTransfer.getTransfer().getSelection() instanceof IStructuredSelection) return getAssistantsBySelection(descriptors, (IStructuredSelection) LocalSelectionTransfer.getTransfer().getSelection()); return getAssistantsByTransferData(descriptors, aTransferType); | public CommonDropAdapterAssistant[] findCommonDropAdapterAssistants(Object aDropTarget) { // TODO Implement the search routine return null; } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/49eb96577ec0522e254b4f6e46dc20eebd9aad2c/NavigatorDnDService.java/clean/bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/dnd/NavigatorDnDService.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
5658,
7544,
4216,
2610,
17175,
8526,
1104,
6517,
7544,
4216,
2610,
376,
4388,
12,
921,
279,
7544,
2326,
13,
288,
202,
202,
759,
2660,
10886,
326,
1623,
12245,
202,
202,
2463,
44... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
5658,
7544,
4216,
2610,
17175,
8526,
1104,
6517,
7544,
4216,
2610,
376,
4388,
12,
921,
279,
7544,
2326,
13,
288,
202,
202,
759,
2660,
10886,
326,
1623,
12245,
202,
202,
2463,
44... |
if ((attr.getValue().indexOf("molecularDescriptor") != -1) && | if ((attr.getValue().indexOf("molecularDescriptor") != -1) || | public String getDictionaryType(String identifier) { Entry[] dictEntries = dict.getEntries(); String specRef = getSpecRef(identifier); logger.debug("Got identifier: "+identifier); logger.debug("Final spec ref: "+specRef); for (int j = 0; j < dictEntries.length; j++) { if (!dictEntries[j].getClassName().equals("Descriptor")) continue; if (dictEntries[j].getID().equals(specRef.toLowerCase())) { Element rawElement = (Element) dictEntries[j].getRawContent(); // assert(rawElement != null); // We're not fully Java 1.5 yet, so commented it out now. If it is // really important to have it, then add @cdk.require java1.5 in the // Class javadoc (and all classes that use this class) Elements classifications = rawElement.getChildElements("isClassifiedAs", dict.getNS()); for (int i = 0; i < classifications.size(); i++) { Element e = classifications.get(i); Attribute attr = e.getAttribute("resource", rdfNS); if ((attr.getValue().indexOf("molecularDescriptor") != -1) && (attr.getValue().indexOf("atomicDescriptor") != -1)) { String[] tmp = attr.getValue().split("#"); return tmp[1]; } } } } return null; } | 46046 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46046/0d703195852c5d0d4d0ae560499a984d8e41a1cf/DescriptorEngine.java/buggy/src/org/openscience/cdk/qsar/DescriptorEngine.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
2343,
3192,
559,
12,
780,
2756,
13,
288,
3639,
3841,
8526,
2065,
5400,
273,
2065,
18,
588,
5400,
5621,
3639,
514,
857,
1957,
273,
20189,
1957,
12,
5644,
1769,
3639,
1194,
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,
2343,
3192,
559,
12,
780,
2756,
13,
288,
3639,
3841,
8526,
2065,
5400,
273,
2065,
18,
588,
5400,
5621,
3639,
514,
857,
1957,
273,
20189,
1957,
12,
5644,
1769,
3639,
1194,
18,
... |
boolean retval = !jj_3_8(); jj_save(7, xla); return retval; | try { return !jj_3_8(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(7, xla); } | final private boolean jj_2_8(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; boolean retval = !jj_3_8(); jj_save(7, xla); return retval; } | 6527 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6527/da645dc04442445e7ffc49c76d475409ee62c51f/PythonGrammar.java/clean/org/python/parser/PythonGrammar.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
3238,
1250,
10684,
67,
22,
67,
28,
12,
474,
619,
11821,
13,
288,
565,
10684,
67,
11821,
273,
619,
11821,
31,
10684,
67,
2722,
917,
273,
10684,
67,
9871,
917,
273,
1147,
31,
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,
282,
727,
3238,
1250,
10684,
67,
22,
67,
28,
12,
474,
619,
11821,
13,
288,
565,
10684,
67,
11821,
273,
619,
11821,
31,
10684,
67,
2722,
917,
273,
10684,
67,
9871,
917,
273,
1147,
31,
565,
... |
addMessage(allMessages, message, GlobalStyleSheet.ALL); | addMessage(messagesTP, message, GlobalStyleSheet.ALL); | public void updateMessages(int messageType, String message) { if (messageType == EventTypes.CHAT_SAY) { addMessage(allMessages, message, GlobalStyleSheet.ALL); } else if (messageType == EventTypes.CHAT_PM) { addMessage(allMessages, message, GlobalStyleSheet.PM); addMessage(privateMessages, message, GlobalStyleSheet.PM); } else if (messageType == EventTypes.CHAT_ADMIN_COMMAND) { addMessage(allMessages, message, GlobalStyleSheet.ADMIN); addMessage(consoleMessages, message, GlobalStyleSheet.ADMIN); } else if (messageType == EventTypes.CHAT_GROUP_SAY) { addMessage(allMessages, message, GlobalStyleSheet.GROUP); addMessage(groupMessages, message, GlobalStyleSheet.GROUP); } } | 10962 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10962/34dc98127899d88a72ee5f3a8681d2e0cfd17008/ChatWindow.java/buggy/MBWSClient/src/de/mbws/client/gui/ingame/ChatWindow.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1089,
5058,
12,
474,
22402,
16,
514,
883,
13,
288,
202,
202,
430,
261,
2150,
559,
422,
2587,
2016,
18,
1792,
789,
67,
5233,
61,
13,
288,
1082,
202,
1289,
1079,
12,
454,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1089,
5058,
12,
474,
22402,
16,
514,
883,
13,
288,
202,
202,
430,
261,
2150,
559,
422,
2587,
2016,
18,
1792,
789,
67,
5233,
61,
13,
288,
1082,
202,
1289,
1079,
12,
454,... |
public org.quickfix.field.OptAttribute getOptAttribute() throws FieldNotFound { org.quickfix.field.OptAttribute value = new org.quickfix.field.OptAttribute(); | public quickfix.field.OptAttribute getOptAttribute() throws FieldNotFound { quickfix.field.OptAttribute value = new quickfix.field.OptAttribute(); | public org.quickfix.field.OptAttribute getOptAttribute() throws FieldNotFound { org.quickfix.field.OptAttribute value = new org.quickfix.field.OptAttribute(); getField(value); return value; } | 8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/OrderCancelReplaceRequest.java/buggy/src/java/src/quickfix/fix43/OrderCancelReplaceRequest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
6179,
1499,
28959,
1499,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
6179,
1499,
460,
273,
394,
2358,
18,
19525,
904,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
6179,
1499,
28959,
1499,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
6179,
1499,
460,
273,
394,
2358,
18,
19525,
904,
... |
String sql = sql = "CREATE TABLE "+ targetSchema+"."+tempEnd.getName()+" AS SELECT DISTINCT "+ TSKey+ | String sql = "CREATE TABLE "+ targetSchema+"."+tempEnd.getName()+" AS SELECT DISTINCT "+ TSKey+ | private String notNullSQL(){ String sql = sql = "CREATE TABLE "+ targetSchema+"."+tempEnd.getName()+" AS SELECT DISTINCT "+ TSKey+ " FROM "+ targetSchema+"."+refTable.getName()+" WHERE "+ RFKey+ " IS NOT NULL;"; return sql; } | 2000 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2000/a463e16a8f19e1e77106fde5f53f90b51a92bb71/TransformationUnitSingle.java/buggy/src/java/org/ensembl/mart/builder/lib/TransformationUnitSingle.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
514,
7713,
3997,
1435,
95,
9506,
202,
780,
1847,
273,
1847,
273,
315,
9344,
7567,
13773,
1018,
3078,
9078,
1199,
15,
5814,
1638,
18,
17994,
1435,
9078,
5355,
9111,
23286,
13773,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
514,
7713,
3997,
1435,
95,
9506,
202,
780,
1847,
273,
1847,
273,
315,
9344,
7567,
13773,
1018,
3078,
9078,
1199,
15,
5814,
1638,
18,
17994,
1435,
9078,
5355,
9111,
23286,
13773,
... |
return (a != 0 && b != 0) ? | return ((a != 0) && (b != 0)) ? | static final int mul (int a, int b) { return (a != 0 && b != 0) ? alog[(log[a & 0xFF] + log[b & 0xFF]) % 255] : 0; } | 46035 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46035/ca136843ae9ecb30cadada58a33a5dc2cf8ad064/Rijndael_Algorithm.java/buggy/src/freenet/crypt/ciphers/Rijndael_Algorithm.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
760,
727,
509,
14064,
261,
474,
279,
16,
509,
324,
13,
288,
3639,
327,
14015,
69,
480,
374,
13,
597,
261,
70,
480,
374,
3719,
692,
5411,
279,
1330,
63,
12,
1330,
63,
69,
473,
374,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
760,
727,
509,
14064,
261,
474,
279,
16,
509,
324,
13,
288,
3639,
327,
14015,
69,
480,
374,
13,
597,
261,
70,
480,
374,
3719,
692,
5411,
279,
1330,
63,
12,
1330,
63,
69,
473,
374,
6... |
if (argv[optind].startsWith("-h") || argv[optind].startsWith("--h")) { | if ( argv[optind].startsWith("--help") ) { | public static void main(String[] argv) { String fileNotFound = "preference file not found on disk"; String configfile = null; display = new Display(); links = new ArrayList(); // parse args int optind; for (optind = 0; optind < argv.length; optind++) { if (argv[optind].startsWith("-h") || argv[optind].startsWith("--h")) { printCommandlineHelp(); System.exit(1); } else if (argv[optind].equals("-d")) { debug = true; } else if ( argv.length > optind + 1 ) { // we got a configfile-parameter if (argv[optind].equals("-c")) { try { configfile = (String) argv[++optind]; PreferenceLoader.initialize( configfile ); G2GuiResources.initialize(); } catch (IOException e) { System.err.println(fileNotFound + ": " + configfile); } // we got a link parameter for submission } else if (argv[optind].equals("-l")) { links.add( argv[++optind] ); // hostname and port } else if (argv[optind].equals("-H")) { String[] strings = RegExp.split(argv[++optind], ':'); if ( strings.length == 2 ) { hostname = strings[0]; port = port = new Integer( strings[1] ).intValue(); } // username } else if (argv[optind].equals("-U")) { username = argv[++optind]; // password } else if (argv[optind].equals("-P")) { password = argv[++optind]; } else if (argv[optind].equals("--")) { optind++; break; } } else { break; } } // if there has not been specified a config-file, use default if (configfile == null) { G2GuiResources.initialize(); try { PreferenceLoader.initialize(); } catch (IOException e) { System.err.println(fileNotFound); } } // we received links? -> send them if ( links.size() > 0 ) { launch( links ); return; } /*determine wether a new instance of G2gui is allowed: */ if (PreferenceLoader.loadBoolean("allowMultipleInstances") || !PreferenceLoader.loadBoolean("running") || debug) { launch(); } else { MessageBox alreadyRunning = new MessageBox(new Shell(display), SWT.YES | SWT.NO | SWT.ICON_ERROR); alreadyRunning.setText(G2GuiResources.getString("G2_MULTIPLE_WARNING_HEAD")); alreadyRunning.setMessage(G2GuiResources.getString("G2_MULTIPLE_WARNING_MESSAGE")); if (alreadyRunning.open() == SWT.YES) { launch(); } } } | 11075 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11075/4a004f1cb52fde8ea9e9dae5df163d6c5e61c913/G2Gui.java/clean/g2gui/src/net/mldonkey/g2gui/view/G2Gui.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
2774,
12,
780,
8526,
5261,
13,
288,
377,
202,
780,
585,
2768,
273,
315,
19141,
585,
486,
1392,
603,
4234,
14432,
377,
202,
780,
642,
768,
273,
446,
31,
377,
202,
5417,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5261,
13,
288,
377,
202,
780,
585,
2768,
273,
315,
19141,
585,
486,
1392,
603,
4234,
14432,
377,
202,
780,
642,
768,
273,
446,
31,
377,
202,
5417,
... |
public boolean getNextPragma(Token /*@ non_null @*/ dst) { try { if (inProcessTag == NOTHING_ELSE_TO_PROCESS) { if (DEBUG) Info.out("getNextPragma: Nothing else to process."); return false; } // See if we need to continue a previous pragma, for example // "monitored_by", which can take multiple SpecExprs if ((inProcessTag != NEXT_TOKEN_STARTS_NEW_PRAGMA) && (inProcessTag != TagConstants.JML_ALSO)) { continuePragma(dst); return true; } if (scanner.ttype == TagConstants.EOF) { LexicalPragma PP = scanner.popLexicalPragma(); if (PP != null) { dst.ttype = TagConstants.LEXICALPRAGMA; dst.auxVal = PP; if (DEBUG) Info.out("getNextPragma: parsed final lexical pragma " + PP + " at EOF."); return true; } if (pendingJavadocComment != null) { scanner.close(); if (processJavadocComment()) { if (DEBUG) Info.out("getNextPragma: processed javadoc comment at EOF."); return true; } } close(); if (DEBUG) Info.out("getNextPragma: hit EOF, so finishing pragma parsing."); return false; } //@ assume scanner.m_in != null; // TBW: is this right?? --KRML // FIXME - not everything allows modifiers int prefixModifiers = parseModifiers(scanner); // Start a new pragma int loc = scanner.startingLoc; if (Main.parsePlus && scanner.ttype == TagConstants.ADD && scanner.lookahead(1) == TagConstants.EOF) { return false; } // Pragmas can start with modifiers //if (scanner.ttype != TagConstants.IDENT) // ErrorSet.fatal(loc, "Pragma must start with an identifier"); int tag = scanner.ttype; Identifier kw = null; if (tag == TagConstants.IDENT) { kw = scanner.identifierVal; tag = TagConstants.fromIdentifier(kw); } if (tag != TagConstants.IMPORT) { // Just because the parent class routines expect // to start on the IMPORT token scanner.getNextToken(); } boolean semiNotOptional = false; if (DEBUG) Info.out("next tag is: " + tag); switch (tag) { case TagConstants.JML_NOT_SPECIFIED: dst.ttype = TagConstants.MODIFIERPRAGMA; NotSpecifiedExpr nse = NotSpecifiedExpr.make(loc); dst.auxVal = ExprModifierPragma.make(inProcessTag, nse, loc); break; case TagConstants.JML_EVERYTHING: dst.ttype = TagConstants.MODIFIERPRAGMA; EverythingExpr ee = EverythingExpr.make(loc); dst.auxVal = ExprModifierPragma.make(inProcessTag, ee, loc); break; case TagConstants.JML_NOTHING: dst.ttype = TagConstants.MODIFIERPRAGMA; NothingExpr ne = NothingExpr.make(loc); dst.auxVal = ExprModifierPragma.make(inProcessTag, ne, loc); break; case TagConstants.JML_BEHAVIOR: case TagConstants.JML_EXCEPTIONAL_BEHAVIOR: case TagConstants.JML_NORMAL_BEHAVIOR: // All desugaring of normal and exceptional // behavior is now performed in the desugaring // step in AnnotationHandler. dst.ttype = TagConstants.MODIFIERPRAGMA; dst.auxVal = SimpleModifierPragma.make(tag, loc); break; case TagConstants.NOWARN: dst.ttype = TagConstants.LEXICALPRAGMA; seqIdentifier.push(); if (scanner.ttype == TagConstants.IDENT) while (true) { seqIdentifier.addElement(parseIdentifier(scanner)); if (scanner.ttype != TagConstants.COMMA) break; scanner.getNextToken(); // Discard COMMA } IdentifierVec checks = IdentifierVec.popFromStackVector(seqIdentifier); dst.auxVal = NowarnPragma.make(checks, loc); if (scanner.ttype == TagConstants.SEMICOLON) scanner.getNextToken(); if (scanner.ttype != TagConstants.EOF) ErrorSet.fatal(loc, "Syntax error in nowarn pragma"); break; case TagConstants.ALSO_MODIFIES: case TagConstants.JML_ASSIGNABLE: case TagConstants.JML_ASSIGNABLE_REDUNDANTLY: case TagConstants.JML_MEASURED_BY: case TagConstants.JML_MEASURED_BY_REDUNDANTLY: case TagConstants.JML_MODIFIABLE: case TagConstants.JML_MODIFIABLE_REDUNDANTLY: case TagConstants.JML_MODIFIES_REDUNDANTLY: case TagConstants.MODIFIES: case TagConstants.MONITORED_BY: case TagConstants.JML_NOT_MODIFIED: // SC AAST 4 case TagConstants.STILL_DEFERRED: inProcessTag = tag; inProcessLoc = loc; continuePragma(dst); if (DEBUG) Info.out("getNextPragma: parsed a frame axiom: " + dst.ztoString()); return true; case TagConstants.JML_DEPENDS: // SC AAST 4 case TagConstants.JML_DEPENDS_REDUNDANTLY: { // SC AAST 4 inProcessTag = tag; inProcessLoc = loc; dst.ttype = TagConstants.TYPEDECLELEMPRAGMA; Expr target = parseExpression(scanner); int locOp = scanner.startingLoc; expect(scanner, TagConstants.JML_LEFTARROW); Vector list = new Vector(); while (true) { Expr value = parseExpression(scanner); list.add(value); if (scanner.ttype != TagConstants.COMMA) break; scanner.getNextToken(); } DependsPragma pragma = DependsPragma.make(tag, target, ExprVec.make(list), loc); if (isRedundant(tag)) pragma.setRedundant(true); dst.auxVal = pragma; semiNotOptional = true; break; } case TagConstants.UNREACHABLE: dst.ttype = TagConstants.STMTPRAGMA; dst.auxVal = SimpleStmtPragma.make(tag, loc); if (scanner.ttype == TagConstants.SEMICOLON) scanner.getNextToken(); break; case TagConstants.ASSERT: case TagConstants.ASSUME: case TagConstants.DECREASES: case TagConstants.JML_ASSERT_REDUNDANTLY: case TagConstants.JML_ASSUME_REDUNDANTLY: case TagConstants.JML_DECREASES_REDUNDANTLY: case TagConstants.JML_DECREASING: case TagConstants.JML_DECREASING_REDUNDANTLY: case TagConstants.JML_LOOP_INVARIANT_REDUNDANTLY: case TagConstants.JML_MAINTAINING: case TagConstants.JML_MAINTAINING_REDUNDANTLY: case TagConstants.LOOP_INVARIANT: { dst.ttype = TagConstants.STMTPRAGMA; ExprStmtPragma pragma = ExprStmtPragma.make(tag, parseExpression(scanner), loc); if (isRedundant(tag)) pragma.setRedundant(true); dst.auxVal = pragma; semiNotOptional = true; break; } case TagConstants.LOOP_PREDICATE: inProcessTag = tag; inProcessLoc = loc; continuePragma(dst); semiNotOptional = true; if (DEBUG) Info.out("getNextPragma: parsed a loop predicate: " + dst.ztoString()); return true; case TagConstants.SET: { dst.ttype = TagConstants.STMTPRAGMA; Expr target = parseExpression(scanner); int locOp = scanner.startingLoc; expect(scanner, TagConstants.ASSIGN); Expr value = parseExpression(scanner); dst.auxVal = SetStmtPragma.make(target, locOp, value, loc); semiNotOptional = true; } break; case TagConstants.JML_REPRESENTS: // SC HPT AAST 4 { dst.ttype = TagConstants.TYPEDECLELEMPRAGMA; Expr target = parseExpression(scanner); int locOp = scanner.startingLoc; if (scanner.ttype == TagConstants.JML_LEFTARROW) { expect(scanner, TagConstants.JML_LEFTARROW); Expr value = parseExpression(scanner); dst.auxVal = ExprDeclPragma.make(tag, BinaryExpr.make( TagConstants.EQ, target, value, locOp), loc); } else if (scanner.ttype == TagConstants.JML_SUCH_THAT) { expect(scanner, TagConstants.JML_SUCH_THAT); Expr value = parseExpression(scanner); dst.auxVal = ExprDeclPragma.make(tag, value, loc); } semiNotOptional = true; } break; case TagConstants.AXIOM: case TagConstants.INVARIANT: case TagConstants.JML_CONSTRAINT: case TagConstants.JML_CONSTRAINT_REDUNDANTLY: case TagConstants.JML_INITIALLY: case TagConstants.JML_INVARIANT_REDUNDANTLY: { dst.ttype = TagConstants.TYPEDECLELEMPRAGMA; ExprDeclPragma pragma = ExprDeclPragma.make(tag, parseExpression(scanner), loc); if (isRedundant(tag)) pragma.setRedundant(true); dst.auxVal = pragma; semiNotOptional = true; break; } case TagConstants.IMPORT: ErrorSet.caution(loc,"An import statement in an annotation should begin with 'model import'"); scanner.lexicalPragmas.addElement( ImportPragma.make(parseImportDeclaration(scanner), loc)); semiNotOptional = true; return getNextPragma(dst); case TagConstants.JML_MODEL: if (scanner.lookahead(0) == TagConstants.IMPORT) { scanner.lexicalPragmas.addElement( ImportPragma.make(parseImportDeclaration(scanner), loc)); semiNotOptional = true; return getNextPragma(dst); } prefixModifiers |= Modifiers.ACC_MODEL; case TagConstants.GHOST: { dst.ttype = TagConstants.TYPEDECLELEMPRAGMA; int modifiers = parseModifiers(scanner,true); if ((modifiers & prefixModifiers) != 0) { ErrorSet.warning(loc, TagConstants.toString(tag) + " annotation has a repeated access modifier"); } modifiers |= prefixModifiers; ModifierPragmaVec modifierPragmas = this.modifierPragmas; int locType = scanner.startingLoc; Type type = parseType(scanner); // make modifierPragmas non-null, so can retroactively extend if (modifierPragmas == null) modifierPragmas = ModifierPragmaVec.make(); int locId = scanner.startingLoc; Identifier id = parseIdentifier(scanner); Type vartype = parseBracketPairs(scanner, type); VarInit init = null; int locAssignOp = Location.NULL; if (scanner.ttype == TagConstants.LPAREN) { if (tag == TagConstants.GHOST) { ErrorSet.error(loc, "A method may not be declared ghost"); } // Must be a model method // FIXME - note - cannot have a ghost method FormalParaDeclVec args = parseFormalParameterList(scanner); int locThrowsKeyword; if (scanner.ttype == TagConstants.THROWS) { locThrowsKeyword = scanner.startingLoc; } else { locThrowsKeyword = Location.NULL; } TypeNameVec raises = parseTypeNames(scanner, TagConstants.THROWS); int locOpenBrace = Location.NULL; BlockStmt body = null; if (scanner.ttype == TagConstants.SEMICOLON) { scanner.getNextToken(); // eats semicolon } else if (scanner.ttype == TagConstants.LBRACE) { locOpenBrace = scanner.startingLoc; body = parseBlock(scanner, true); // FIXME - the above parses with specOnly=true which will not provide the body } else { // FIXME -- error } // FIXME - need to add the method into the decl elements of the type MethodDecl md = MethodDecl.make( modifiers, modifierPragmas, null, args, raises, body, locOpenBrace, loc, locId, locThrowsKeyword, id, type,locType); dst.auxVal = ModelMethodDeclPragma.make(md,loc); } else { if (scanner.ttype == TagConstants.ASSIGN) { locAssignOp = scanner.startingLoc; scanner.getNextToken(); init = parseVariableInitializer(scanner, false); } FieldDecl decl = FieldDecl.make(modifiers, modifierPragmas, id, vartype, locId, init, locAssignOp ); if (scanner.ttype == TagConstants.MODIFIERPRAGMA || scanner.ttype == TagConstants.SEMICOLON ) { // if modifier pragma, retroactively add to modifierPragmas parseMoreModifierPragmas(scanner, modifierPragmas); } if (scanner.ttype == TagConstants.COMMA) fail(scanner.startingLoc, "Only one field may be declared per ghost or model annotation."); if (tag == TagConstants.GHOST) { dst.auxVal = GhostDeclPragma.make(decl, loc); } else if (tag == TagConstants.JML_MODEL) { dst.auxVal = ModelDeclPragma.make(decl, loc); } semiNotOptional = true;// FIXME - monitored_by as well??// FIXME - test this without replciating the string if (scanner.ttype == TagConstants.IDENT && scanner.identifierVal.toString().equals("initially")) { semiNotOptional = false; } } break; } case TagConstants.SKOLEM_CONSTANT: { dst.ttype = TagConstants.STMTPRAGMA; int locType = scanner.startingLoc; Type type = parseType(scanner); LocalVarDeclVec v = LocalVarDeclVec.make(); int nextTtype; loop: while (true) { int locId = scanner.startingLoc; Identifier id = parseIdentifier(scanner); Type vartype = parseBracketPairs(scanner, type); LocalVarDecl decl = LocalVarDecl.make(Modifiers.NONE, null, id, vartype, locId, null, Location.NULL); v.addElement(decl); switch (scanner.ttype) { case TagConstants.COMMA: scanner.getNextToken(); continue loop; default: fail( scanner.startingLoc, "Expected comma or semicolon in skolem_constant decl"); case TagConstants.SEMICOLON: break loop; } } dst.auxVal = SkolemConstantPragma.make(v, locType, scanner.startingLoc); semiNotOptional = true; break; } case TagConstants.HELPER: case TagConstants.JML_CLOSEPRAGMA: case TagConstants.JML_EXAMPLE: case TagConstants.JML_EXCEPTIONAL_EXAMPLE: case TagConstants.JML_FOR_EXAMPLE: case TagConstants.JML_IMPLIES_THAT: case TagConstants.JML_INSTANCE: case TagConstants.JML_NORMAL_EXAMPLE: case TagConstants.JML_OPENPRAGMA: case TagConstants.JML_PURE: case TagConstants.JML_SPEC_PROTECTED: // SC HPT AAST 3 case TagConstants.MONITORED: case TagConstants.NON_NULL: case TagConstants.SPEC_PUBLIC: case TagConstants.UNINITIALIZED: case TagConstants.WRITABLE_DEFERRED: dst.ttype = TagConstants.MODIFIERPRAGMA; dst.auxVal = SimpleModifierPragma.make(tag, loc); break; case TagConstants.ALSO_ENSURES: case TagConstants.ALSO_REQUIRES: case TagConstants.ENSURES: case TagConstants.JML_DIVERGES: case TagConstants.JML_DIVERGES_REDUNDANTLY: case TagConstants.JML_ENSURES_REDUNDANTLY: case TagConstants.JML_POST: case TagConstants.JML_POST_REDUNDANTLY: case TagConstants.JML_PRE: case TagConstants.JML_PRE_REDUNDANTLY: case TagConstants.JML_REQUIRES_REDUNDANTLY: case TagConstants.JML_WHEN: // NOT SC concurrent only case TagConstants.JML_WHEN_REDUNDANTLY: // NOT SC concurrent only case TagConstants.READABLE_IF: case TagConstants.REQUIRES: case TagConstants.WRITABLE_IF: { dst.ttype = TagConstants.MODIFIERPRAGMA; // SpecExpr [';'] ExprModifierPragma pragma = ExprModifierPragma.make(tag, parseExpression(scanner), loc); if (isRedundant(tag)) pragma.setRedundant(true); dst.auxVal = pragma; semiNotOptional = true; break; } case TagConstants.JML_ALSO: dst.ttype = TagConstants.MODIFIERPRAGMA; dst.auxVal = SimpleModifierPragma.make(tag, loc); break; case TagConstants.ALSO_EXSURES: case TagConstants.EXSURES: case TagConstants.JML_EXSURES_REDUNDANTLY: case TagConstants.JML_SIGNALS: case TagConstants.JML_SIGNALS_REDUNDANTLY: { dst.ttype = TagConstants.MODIFIERPRAGMA; expect(scanner, TagConstants.LPAREN); FormalParaDecl arg = parseExsuresFormalParaDecl(scanner); expect(scanner, TagConstants.RPAREN); Expr expr = null; if (scanner.ttype == TagConstants.SEMICOLON) expr = LiteralExpr.make(TagConstants.BOOLEANLIT, Boolean.TRUE,scanner.startingLoc); else expr = parseExpression(scanner); VarExprModifierPragma pragma = VarExprModifierPragma.make(tag, arg, expr, loc); if (isRedundant(tag)) pragma.setRedundant(true); dst.auxVal = pragma; semiNotOptional = true; break; } case TagConstants.JML_FIELDS_OF: // SC AAST 4 // unknown exact semantics parseFieldsOfExpr(scanner); noteUnsupportedCheckableJmlPragma(loc, tag); return getNextPragma(dst); case TagConstants.JML_INVARIANT_FOR: // SC AAST 4 case TagConstants.JML_SPACE: // SC HPT 2 case TagConstants.JML_WACK_DURATION: // SC HPT 2 case TagConstants.JML_WACK_WORKING_SPACE: // SC HPT 2 expect(scanner, TagConstants.LPAREN); parseExpression(scanner); expect(scanner, TagConstants.RPAREN); eatSemiColon(kw); noteUnsupportedCheckableJmlPragma(loc, tag); return getNextPragma(dst); case TagConstants.JML_IS_INITIALIZED: // SC AAST 3 expect(scanner, TagConstants.LPAREN); parseTypeName(scanner); expect(scanner, TagConstants.RPAREN); eatSemiColon(kw); noteUnsupportedCheckableJmlPragma(loc, tag); return getNextPragma(dst); case TagConstants.JML_OTHER: // unclear semantics scanner.getNextToken(); parseStoreRefNameSuffix(scanner); eatSemiColon(kw); noteUnsupportedCheckableJmlPragma(loc, tag); return getNextPragma(dst); case TagConstants.JML_REACH: // SC HPT AAST 5 scanner.getNextToken(); expect(scanner, TagConstants.LPAREN); parseExpression(scanner); if (scanner.ttype == TagConstants.COMMA) { expect(scanner, TagConstants.IDENT); if (scanner.ttype == TagConstants.COMMA) { scanner.getNextToken(); parseStoreRefExpr(scanner); } } expect(scanner, TagConstants.RPAREN); eatSemiColon(kw); noteUnsupportedCheckableJmlPragma(loc, tag); return getNextPragma(dst); case TagConstants.JML_DURATION: // SC HPT 2 case TagConstants.JML_DURATION_REDUNDANTLY: // SC HPT 2 case TagConstants.JML_WORKING_SPACE: // SC HPT 2 case TagConstants.JML_WORKING_SPACE_REDUNDANTLY:// SC HPT 2 if (scanner.ttype == TagConstants.JML_NOT_SPECIFIED) scanner.getNextToken(); else { parseExpression(scanner); if (scanner.ttype == TagConstants.IFSTMT) { scanner.getNextToken(); parseExpression(scanner); } } eatSemiColon(kw); noteUnsupportedCheckableJmlPragma(loc, tag); return getNextPragma(dst); case TagConstants.JML_MIN: // SC HPT AAST 3 case TagConstants.JML_NUM_OF: // SC AAST 3 case TagConstants.JML_PRODUCT: // SC HPT AAST 3 case TagConstants.JML_SUM: // SC HPT AAST 3 notePragmaUnderway(loc, tag, "kiniry@acm.org"); break; // 'SC' == Statically Checkable or otherwise useful // 'HPT' == Handle at Parse-time 'AAST' == 'Augments // Abstract Symbol Tree' Final 0-5 indicates // difficulty of implementation; 0 being easiest. All // estimates and implementation/design guesses were // made by Joe Kiniry on 29 April 2003. // Unsupported JML keywords not beginning with '\' (wack). case TagConstants.JML_ABRUPT_BEHAVIOR: // unclear semantics case TagConstants.JML_ACCESSIBLE_REDUNDANTLY: // SC HPT AAST 2 case TagConstants.JML_ACCESSIBLE: // SC HPT AAST 2 // case TagConstants.JML_ALSO: support complete (kiniry/cok) // case TagConstants.JML_ASSERT_REDUNDANTLY: support complete (kiniry) // case TagConstants.JML_ASSIGNABLE_REDUNDANTLY: support complete (kiniry) // case TagConstants.JML_ASSIGNABLE: support complete (kiniry) // case TagConstants.JML_ASSUME_REDUNDANTLY: support complete (kiniry) // case TagConstants.JML_BEHAVIOR: support complete (kiniry) case TagConstants.JML_BREAKS_REDUNDANTLY: // unclear semantics case TagConstants.JML_BREAKS: // unclear semantics case TagConstants.JML_CALLABLE_REDUNDANTLY: // unclear semantics case TagConstants.JML_CALLABLE: // unclear semantics case TagConstants.JML_CHOOSE_IF: // unclear semantics case TagConstants.JML_CHOOSE: // unclear semantics // case TagConstants.JML_CLOSEPRAGMA: parses but incomplete (cok) // case TagConstants.JML_CONSTRAINT_REDUNDANTLY: SC AAST 4 parsed (cok) // case TagConstants.JML_CONSTRAINT: SC AAST 4 parsed (cok) case TagConstants.JML_CONTINUES_REDUNDANTLY: // unclear semantics case TagConstants.JML_CONTINUES: // unclear semantics // case TagConstants.JML_DECREASES_REDUNDANTLY: support complete (kiniry) // case TagConstants.JML_DECREASING_REDUNDANTLY: support complete (kiniry) // case TagConstants.JML_DECREASING: support complete (kiniry) // case TagConstants.JML_DEPENDS_REDUNDANTLY: SC AAST 4 parsed (cok) // case TagConstants.JML_DEPENDS: SC AAST 4 parsed (cok) // case TagConstants.JML_DIVERGES_REDUNDANTLY: parsed (cok) // case TagConstants.JML_DIVERGES: parsed (cok) // case TagConstants.JML_DURATION: SC HPT 2 unsupported (kiniry) // case TagConstants.JML_DURATION_REDUNDANTLY: SC HPT 2 unsupported (kiniry) // case TagConstants.JML_ENSURES_REDUNDANTLY: support complete (kiniry) // case TagConstants.JML_EXAMPLE: NOT SC parsed (cok) // case TagConstants.JML_EXCEPTIONAL_BEHAVIOR: support complete (kiniry) // case TagConstants.JML_EXCEPTIONAL_EXAMPLE: NOT SC - parsed cok // case TagConstants.JML_EXSURES_REDUNDANTLY: support complete (kiniry) // case TagConstants.JML_FIELDS_OF: SC AAST 4 unknown semantics (kiniry) case TagConstants.JML_FORALL: // unclear semantics // case TagConstants.JML_FOR_EXAMPLE: NOT SC parsed (cok) // case TagContants.GHOST: support complete (cok) case TagConstants.JML_HENCE_BY_REDUNDANTLY: // unclear semantics case TagConstants.JML_HENCE_BY: // unclear semantics // case TagConstants.JML_IMPLIES_THAT: NOT SC parsed (cok) // case TagConstants.IMPORT: support complete (cok) case TagConstants.JML_INITIALIZER: // SC AAST 4 // case TagConstants.JML_INITIALLY: SC AAST 4 parsed (cok) // case TagConstants.JML_INSTANCE: parses but no semantics (cok) SC AAST 3 // case TagConstants.JML_INVARIANT_FOR: unsupported (kiniry) // case TagConstants.JML_INVARIANT_REDUNDANTLY: support complete (kiniry) // case TagConstants.JML_IS_INITIALIZED: unsupported (kiniry) // case TagConstants.JML_LOOP_INVARIANT_REDUNDANTLY: support complete (kiniry) // case TagConstants.JML_MAINTAINING_REDUNDANTLY: support complete (kiniry) // case TagConstants.JML_MAINTAINING: support complete (kiniry) // case TagConstants.JML_MEASURED_BY_REDUNDANTLY: unclear semantics (parsed - cok) // case TagConstants.JML_MEASURED_BY: unclear semantics (parsed - cok) // case TagConstants.JML_MIN: SC HPT AAST 3 underway (kiniry) // case TagConstants.JML_MODEL: support complete (cok) case TagConstants.JML_MODEL_PROGRAM: // unclear semantics // case TagConstants.JML_MODIFIABLE_REDUNDANTLY: support complete (kiniry) // case TagConstants.JML_MODIFIABLE: support complete (kiniry) // case TagConstants.JML_MODIFIES_REDUNDANTLY: support complete (kiniry) // case TagConstants.JML_NORMAL_BEHAVIOR: support complete (kiniry) // case TagConstants.JML_NORMAL_EXAMPLE: NOT SC support complete (cok/kiniry) // case TagConstants.JML_NOT_MODIFIED: SC AAST 4 unsupported (kiniry) // case TagConstants.JML_NOT_SPECIFIED: HPT? 2 unsupported (kiniry) // case TagConstants.JML_NUM_OF: SC AAST 3 underway (kiniry) case TagConstants.JML_OLD: // unclear semantics // case TagConstants.JML_OPENPRAGMA: parses but incomplete (cok) // case TagConstants.JML_OTHER: unsupported, unclear semantics (kiniry) case TagConstants.JML_OR: // unclear semantics // case TagConstants.JML_POST_REDUNDANTLY: support complete (kiniry) // case TagConstants.JML_POST: support complete (kiniry) // case TagConstants.JML_PRE_REDUNDANTLY: support complete (kiniry) // case TagConstants.JML_PRE: support complete (kiniry) // case TagConstants.JML_PRIVATE_DATA: unclear semantics unsupported (kiniry) // case TagConstants.JML_PRODUCT: SC HPT AAST 3 underway (kiniry) // case TagConstants.JML_PURE: parse/check support complete (cok) // case TagConstants.JML_REACH: SC HPT AAST 5 parses (kiniry/cok) case TagConstants.JML_REFINE: // SC HPT AAST 3 case TagConstants.JML_REPRESENTS_REDUNDANTLY: // SC HPT AAST 4 (cok) // case TagConstants.JML_REPRESENTS: SC HPT AAST 4 support complete (cok) // case TagConstants.JML_REQUIRES_REDUNDANTLY: support complete (kiniry) case TagConstants.JML_RETURNS_REDUNDANTLY: // unclear semantics case TagConstants.JML_RETURNS: // unclear semantics // case TagConstants.JML_SIGNALS_REDUNDANTLY: support complete (kiniry) // case TagConstants.JML_SIGNALS: support complete (kiniry) // case TagConstants.JML_SPACE: unsupported (kiniry) // case TagConstants.JML_SPEC_PROTECTED: support complete (cok) case TagConstants.JML_STATIC_INITIALIZER: // SC AAST 4 case TagConstants.JML_SUBCLASSING_CONTRACT: // NOT SC // case TagConstants.JML_SUM: SC HPT AAST 3 underway (kiniry) // case TagConstants.JML_WACK_DURATION: SC HPT 2 unsupported (kiniry) // case TagConstants.JML_WACK_WORKING_SPACE: SC HPT 2 unsupported (kiniry) case TagConstants.JML_WEAKLY: // unclear semantics // case TagConstants.JML_WHEN_REDUNDANTLY: NOT SC concurrent only (parsed - cok) // case TagConstants.JML_WHEN: NOT SC concurrent only (parsed - cok) // case TagConstants.JML_WORKING_SPACE: SC HPT 2 unsupported (kiniry) // case TagConstants.JML_WORKING_SPACE_REDUNDANTLY: SC HPT 2 unsupported (kiniry) ErrorSet.fatal(loc, "Unsupported pragma: " + TagConstants.toString(tag)); break; default: ErrorSet.fatal(loc, "Unrecognized pragma: " + tag + " " + TagConstants.toString(tag)); } if (semiNotOptional) eatSemiColon(kw); if (DEBUG) Info.out("getNextPragma: parsed : " + dst.ztoString()); return true; } catch (IOException e) { return false; } } | 46634 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46634/5225df86b98d4fedc3db4f5184861bc8fb5f7793/EscPragmaParser.java/buggy/src/escjava/trunk/ESCTools/Escjava/java/escjava/parser/EscPragmaParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
6927,
2050,
9454,
12,
1345,
1748,
36,
1661,
67,
2011,
632,
5549,
3046,
13,
288,
3639,
775,
288,
5411,
309,
261,
267,
2227,
1805,
422,
4269,
44,
1360,
67,
2247,
1090,
67,
429... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1250,
6927,
2050,
9454,
12,
1345,
1748,
36,
1661,
67,
2011,
632,
5549,
3046,
13,
288,
3639,
775,
288,
5411,
309,
261,
267,
2227,
1805,
422,
4269,
44,
1360,
67,
2247,
1090,
67,
429... | ||
StringBuffer resultString = new StringBuffer(); | StringBuffer resultString = new StringBuffer(32); | public String toString() { StringBuffer resultString = new StringBuffer(); resultString.append("Isotope("); resultString.append(massNumber); resultString.append(", EM:"); resultString.append(exactMass); resultString.append(", AB:"); resultString.append(naturalAbundance); resultString.append(", "); resultString.append(super.toString()); resultString.append(")"); return resultString.toString(); } | 45254 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45254/b35703c55343be9e1780756711f8f8cb630300f2/Isotope.java/clean/src/org/openscience/cdk/Isotope.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
1762,
1435,
288,
3639,
6674,
563,
780,
273,
394,
6674,
5621,
202,
202,
2088,
780,
18,
6923,
2932,
2520,
18946,
2932,
1769,
563,
780,
18,
6923,
12,
10424,
1854,
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,
225,
202,
482,
514,
1762,
1435,
288,
3639,
6674,
563,
780,
273,
394,
6674,
5621,
202,
202,
2088,
780,
18,
6923,
2932,
2520,
18946,
2932,
1769,
563,
780,
18,
6923,
12,
10424,
1854,
1769,
202,
... |
SessionUtils.setAttribute(MasterConstants.PAYMENT_TYPE, getMasterDataService().getSupportedPaymentModes( uc.getLocaleId(), TrxnTypes.savings_withdrawal.getValue()), request); | public ActionForward reLoad(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { SavingsBO savingsInSession = (SavingsBO) SessionUtils.getAttribute( Constants.BUSINESS_KEY, request); SavingsBO savings = getSavingsService().findById(savingsInSession.getAccountId()); savings.setVersionNo(savingsInSession.getVersionNo()); savingsInSession=null; logger.debug("In SavingsDepositWithdrawalAction::reload(), accountId: " + savings.getAccountId()); UserContext uc = (UserContext) SessionUtils.getAttribute( Constants.USER_CONTEXT_KEY, request.getSession()); SavingsDepositWithdrawalActionForm actionForm = (SavingsDepositWithdrawalActionForm) form; if (actionForm.getTrxnTypeId() != null && actionForm.getTrxnTypeId() != "") { Short trxnTypeId = Short.valueOf(actionForm.getTrxnTypeId()); if (trxnTypeId.equals(AccountConstants.ACTION_SAVINGS_DEPOSIT)) { SessionUtils.setAttribute(MasterConstants.PAYMENT_TYPE, getMasterDataService().getSupportedPaymentModes( uc.getLocaleId(), TrxnTypes.savings_deposit.getValue()), request); if (actionForm.getCustomerId() != null && actionForm.getCustomerId() != "") actionForm.setAmount(savings.getTotalPaymentDue(Integer .valueOf(actionForm.getCustomerId())).toString()); } else { actionForm.setAmount(new Money().toString()); SessionUtils.setAttribute(MasterConstants.PAYMENT_TYPE, getMasterDataService().getSupportedPaymentModes( uc.getLocaleId(), TrxnTypes.savings_withdrawal.getValue()), request); } } return mapping.findForward(ActionForwards.load_success.toString()); } | 45468 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45468/3b21adf70b59e250e716b3c8b3ed4f3df9485708/SavingsDepositWithdrawalAction.java/clean/mifos/src/org/mifos/application/accounts/savings/struts/action/SavingsDepositWithdrawalAction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
4382,
8514,
283,
2563,
12,
1803,
3233,
2874,
16,
4382,
1204,
646,
16,
1082,
202,
2940,
18572,
590,
16,
12446,
766,
13,
1082,
202,
15069,
1185,
288,
202,
202,
55,
27497,
5315,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4382,
8514,
283,
2563,
12,
1803,
3233,
2874,
16,
4382,
1204,
646,
16,
1082,
202,
2940,
18572,
590,
16,
12446,
766,
13,
1082,
202,
15069,
1185,
288,
202,
202,
55,
27497,
5315,
... | |
+ "y >= 0, width > 0, height > 0, units >= 1"); | + "y >= 0, width > 0, height > 0, units >= 1"); | public MediaPrintableArea(int x, int y, int width, int height, int units) { if ((x < 0) || (y < 0) || (width <= 0) || (height <= 0) || (units < 1)) { throw new IllegalArgumentException("Valid values are: x >= 0, " + "y >= 0, width > 0, height > 0, units >= 1"); } this.x = x*units; this.y = y*units; this.width = width*units; this.height = height*units; } | 54769 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54769/76d66c542831682bab339f2d172bb8e87585eec7/MediaPrintableArea.java/buggy/modules/print/src/main/java/common/javax/print/attribute/standard/MediaPrintableArea.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
6128,
5108,
429,
5484,
12,
474,
619,
16,
509,
677,
16,
509,
1835,
16,
509,
2072,
16,
509,
4971,
13,
288,
3639,
309,
14015,
92,
411,
374,
13,
747,
261,
93,
411,
374,
13,
747,
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,
377,
1071,
6128,
5108,
429,
5484,
12,
474,
619,
16,
509,
677,
16,
509,
1835,
16,
509,
2072,
16,
509,
4971,
13,
288,
3639,
309,
14015,
92,
411,
374,
13,
747,
261,
93,
411,
374,
13,
747,
2... |
pane.getDocument() == model.getSwingInteractionsDocument()); | pane.getDocument() == doc); int origLength = doc.getDocLength(); doc.insertText(1, "typed text", InteractionsDocument.DEFAULT_STYLE); assertEquals("Document should not have changed.", origLength, doc.getDocLength()); | public void testCorrectInteractionsDocument() { InteractionsPane pane = _frame.getInteractionsPane(); SingleDisplayModel model = _frame.getModel(); // Test for strict == equality assertTrue("UI's int. doc. should equals Model's int. doc.", pane.getDocument() == model.getSwingInteractionsDocument()); } | 11192 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11192/c5c75a401a26592d7a4255e5d3749f5543238660/MainFrameTest.java/buggy/drjava/src/edu/rice/cs/drjava/ui/MainFrameTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1842,
16147,
2465,
4905,
2519,
1435,
288,
565,
5294,
4905,
8485,
13618,
273,
389,
3789,
18,
588,
2465,
4905,
8485,
5621,
565,
10326,
4236,
1488,
938,
273,
389,
3789,
18,
588,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1842,
16147,
2465,
4905,
2519,
1435,
288,
565,
5294,
4905,
8485,
13618,
273,
389,
3789,
18,
588,
2465,
4905,
8485,
5621,
565,
10326,
4236,
1488,
938,
273,
389,
3789,
18,
588,
1... |
return; | return; | private void refresh() { if (toolbar == null && toolbar.isDisposed()) return; lastJobInfo= null; JobTreeElement[] jobTreeElements= FinishedJobs.getInstance().getJobInfos(); // search from end (youngest) for (int i= jobTreeElements.length-1; i >= 0; i--) { if (jobTreeElements[i] instanceof JobInfo) { JobInfo ji= (JobInfo) jobTreeElements[i]; lastJobInfo= ji; Job job= ji.getJob(); if (job != null) { IStatus status= job.getResult(); if (status != null && status.getSeverity() == IStatus.ERROR) { // green arrow with error overlay initButton(errorImage, ProgressMessages.format("ProgressAnimationItem.error", new Object[] { job.getName() } )); //$NON-NLS-1$ return; } IAction action= getAction(job); if (action != null && action.isEnabled()) { // green arrow with exclamation mark String tt= action.getToolTipText(); if (tt == null || tt.trim().length() == 0) tt= ProgressMessages.format("ProgressAnimationItem.ok", new Object[] { job.getName() } ); initButton(okImage, tt); //$NON-NLS-1$ return; } // just the green arrow initButton(noneImage, ProgressMessages.getString("ProgressAnimationItem.tasks")); //$NON-NLS-1$ return; } } } if (animationRunning) { initButton(noneImage, ProgressMessages.getString("ProgressAnimationItem.tasks")); //$NON-NLS-1$ return; } // if nothing found hide tool item toolbar.setVisible(false); } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/a3af40ebea97c200e58fd9146b5455fd19b3037f/ProgressAnimationItem.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressAnimationItem.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
4460,
1435,
288,
9506,
202,
430,
261,
18849,
422,
446,
597,
12748,
18,
291,
1669,
7423,
10756,
1082,
202,
2463,
31,
9506,
202,
2722,
2278,
966,
33,
446,
31,
202,
202,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4460,
1435,
288,
9506,
202,
430,
261,
18849,
422,
446,
597,
12748,
18,
291,
1669,
7423,
10756,
1082,
202,
2463,
31,
9506,
202,
2722,
2278,
966,
33,
446,
31,
202,
202,
22... |
if (addMatchingMarkers(selected)) | if (addMatchingMarkers(selected)) { | private Composite createTableButtons(Composite control) { Composite buttonComposite = new Composite(control, SWT.NONE); buttonComposite.setLayout(new GridLayout()); Button selectAll = new Button(buttonComposite, SWT.PUSH); selectAll.setText(MarkerMessages.selectAllAction_title); selectAll.setLayoutData(new GridData(SWT.FILL, SWT.NONE, false, false)); selectAll.addSelectionListener(new SelectionAdapter() { /* * (non-Javadoc) * * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent) */ public void widgetSelected(SelectionEvent arg0) { markersTable.setAllChecked(true); setComplete(!resolutionsList.getSelection().isEmpty()); } }); Button deselectAll = new Button(buttonComposite, SWT.PUSH); deselectAll.setText(MarkerMessages.filtersDialog_deselectAll); deselectAll .setLayoutData(new GridData(SWT.FILL, SWT.NONE, false, false)); deselectAll.addSelectionListener(new SelectionAdapter() { /* * (non-Javadoc) * * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent) */ public void widgetSelected(SelectionEvent arg0) { markersTable.setAllChecked(false); setComplete(false); } }); addMatching = new Button(buttonComposite, SWT.PUSH); addMatching.setText(MarkerMessages.MarkerResolutionDialog_AddOthers); addMatching .setLayoutData(new GridData(SWT.FILL, SWT.NONE, false, false)); addMatching.setEnabled(getMatchingButtonEnablement()); addMatching.addSelectionListener(new SelectionAdapter() { /* * (non-Javadoc) * * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent) */ public void widgetSelected(SelectionEvent arg0) { WorkbenchMarkerResolution selected = getSelectedWorkbenchResolution(); if (selected == null) return; if (addMatchingMarkers(selected)) addMatching.setEnabled(false); } }); return buttonComposite; } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/e38d295ea613cf9f08aadb93a84a33d2e91abc5f/MarkerResolutionDialog.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerResolutionDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
14728,
19565,
14388,
12,
9400,
3325,
13,
288,
202,
202,
9400,
3568,
9400,
273,
394,
14728,
12,
7098,
16,
348,
8588,
18,
9826,
1769,
202,
202,
5391,
9400,
18,
542,
3744,
12,
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,
14728,
19565,
14388,
12,
9400,
3325,
13,
288,
202,
202,
9400,
3568,
9400,
273,
394,
14728,
12,
7098,
16,
348,
8588,
18,
9826,
1769,
202,
202,
5391,
9400,
18,
542,
3744,
12,
2... |
if (offset != -1 && itsICode[offset] == TokenStream.BREAKPOINT) | if (offset != -1 && itsICode[offset] == (byte) TokenStream.BREAKPOINT) | public boolean removeBreakpoint(int line) { int offset = getOffset(line); if (offset != -1 && itsICode[offset] == TokenStream.BREAKPOINT) { itsICode[offset] = (byte) TokenStream.LINE; return true; } return false; } | 54155 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54155/0470e048abb345f567d5fda1e9564715a9f4d5d7/InterpreterData.java/buggy/js/rhino/org/mozilla/javascript/InterpreterData.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
1206,
20552,
12,
474,
980,
13,
288,
3639,
509,
1384,
273,
13386,
12,
1369,
1769,
3639,
309,
261,
3348,
480,
300,
21,
597,
2097,
45,
1085,
63,
3348,
65,
422,
261,
7229,
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,
377,
1071,
1250,
1206,
20552,
12,
474,
980,
13,
288,
3639,
509,
1384,
273,
13386,
12,
1369,
1769,
3639,
309,
261,
3348,
480,
300,
21,
597,
2097,
45,
1085,
63,
3348,
65,
422,
261,
7229,
13,
... |
ex.printStackTrace( ); | logger.log( ex ); | SwtChartViewerSelector( ) { final PluginSettings ps = PluginSettings.instance( ); try { idr = ps.getDevice( "dv.SWT" );//$NON-NLS-1$ } catch ( ChartException ex ) { ex.printStackTrace( ); } cm = PrimitiveCharts.createBarChart( ); } | 5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/ef9ad0cebcee59b4b447430acdbf2355afecf441/SwtChartViewerSelector.java/clean/chart/org.eclipse.birt.chart.examples/src/org/eclipse/birt/chart/examples/api/viewer/SwtChartViewerSelector.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
55,
6046,
7984,
18415,
4320,
12,
262,
202,
95,
202,
202,
6385,
6258,
2628,
4250,
273,
6258,
2628,
18,
1336,
12,
11272,
202,
202,
698,
202,
202,
95,
1082,
202,
350,
86,
273,
4250,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
55,
6046,
7984,
18415,
4320,
12,
262,
202,
95,
202,
202,
6385,
6258,
2628,
4250,
273,
6258,
2628,
18,
1336,
12,
11272,
202,
202,
698,
202,
202,
95,
1082,
202,
350,
86,
273,
4250,
... |
for (int i = e.getIndex0(); i < e.getIndex1() + 1; i++) { tabJPanel.remove(i); | tabJPanel.remove(e.getIndex0()); for (int i = e.getIndex0(); i < listModel.size(); i++) { panelConstraints.gridy = i; tabJPanel.add((DefaultTabPanel) listModel.get(i), panelConstraints.clone(), i); | private void installDataListener() { final DefaultListModel listModel = model.getListModel(); listModel.addListDataListener(new ListDataListener() { public void contentsChanged(final ListDataEvent e) { debug(); logger.logApiId(); logger.logVariable("e", e); tabJPanel.remove(fillJLabel); for (int i = e.getIndex0(); i < e.getIndex1(); i++) { panelConstraints.gridy = i; tabJPanel.remove(i); tabJPanel.add((DefaultTabPanel) listModel.getElementAt(i), panelConstraints.clone(), i); } tabJPanel.add(fillJLabel, fillConstraints); tabJPanel.revalidate(); tabJScrollPane.revalidate(); revalidate(); repaint(); debug(); } public void intervalAdded(final ListDataEvent e) { debug(); logger.logApiId(); logger.logVariable("e", e); final int index0 = e.getIndex0(); tabJPanel.remove(fillJLabel); for (int i = index0; i < tabJPanel.getComponentCount(); i++) { tabJPanel.remove(i); } for (int i = index0; i < listModel.size(); i++) { panelConstraints.gridy = i; tabJPanel.add((DefaultTabPanel) listModel.getElementAt(i), panelConstraints.clone(), i); } tabJPanel.add(fillJLabel, fillConstraints); tabJPanel.revalidate(); tabJScrollPane.revalidate(); revalidate(); repaint(); debug(); } public void intervalRemoved(final ListDataEvent e) { debug(); logger.logApiId(); logger.logVariable("e", e); tabJPanel.remove(fillJLabel); for (int i = e.getIndex0(); i < e.getIndex1() + 1; i++) { tabJPanel.remove(i); } tabJPanel.add(fillJLabel, fillConstraints); tabJPanel.revalidate(); tabJScrollPane.revalidate(); revalidate(); repaint(); debug(); } }); } | 53635 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/53635/6d57efe58a914dfb4f0ec85d4adfd52de821dc63/TabPanelAvatar.java/clean/local/browser/src/main/java/com/thinkparity/ophelia/browser/application/browser/display/avatar/tab/TabPanelAvatar.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
3799,
751,
2223,
1435,
288,
3639,
727,
2989,
682,
1488,
666,
1488,
273,
938,
18,
588,
682,
1488,
5621,
3639,
666,
1488,
18,
1289,
682,
751,
2223,
12,
2704,
987,
751,
2223,
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,
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,
3799,
751,
2223,
1435,
288,
3639,
727,
2989,
682,
1488,
666,
1488,
273,
938,
18,
588,
682,
1488,
5621,
3639,
666,
1488,
18,
1289,
682,
751,
2223,
12,
2704,
987,
751,
2223,
14... |
ir.pruneExceptionalOut(); | void perform(OPT_IR ir) { // make sure IR info is up-to-date ir.pruneExceptionalOut(); OPT_DefUse.recomputeSpansBasicBlock(ir); debugBegining(ir, createGCMaps); bbLiveInfo = new BBLiveElement[ir.cfg.numberOfNodes()]; for (int i = 0; i < ir.cfg.numberOfNodes(); i++) { bbLiveInfo[i] = new BBLiveElement(); } if (createGCMaps) { // Create the IR-based Map we will use during compilation // At a later phase this map is converted into the "runtime" // map, which is called VM_OptReferenceMap. map = new OPT_GCIRMap(); } // allocate the "currentSet" which is used to cache the current results currentSet = new OPT_LiveSet(); boolean reuseCurrentSet = false; // make sure reverse top sort order is built // currentBlock is the first node in the list OPT_BasicBlock currentBlock = (OPT_BasicBlock)ir.cfg.buildRevTopSort(); // 2nd parm: true means forward analysis; false means backward analysis OPT_SortedGraphIterator bbIter = new OPT_SortedGraphIterator(currentBlock, false); while (currentBlock != null) { boolean changed = processBlock(currentBlock, reuseCurrentSet, ir); // mark this block as processed and get the next one OPT_BasicBlock nextBlock = (OPT_BasicBlock)bbIter.markAndGetNextTopSort(changed); // check to see if nextBlock has only one successor, currentBlock. // If so, we can reuse the current set and avoid performing a meet. if (nextBlock != null && bbIter.isSinglePredecessor(currentBlock, nextBlock)) { reuseCurrentSet = true; } else { reuseCurrentSet = false; } currentBlock = nextBlock; } debugPostGlobal(ir); // Now compute live ranges, using results from the fixed point computation // Also, optionally create GC maps // SSA doesn't need this part so we allow it to be optional. // However, if we don't perform it than the final maps and intervals aren't // created, so we can't print them. if (!skipLocal) { performLocalPropagation(ir, createGCMaps); if (createGCMaps && dumpFinalMaps) { printFinalMaps(ir); } if (dumpFinalLiveIntervals) { printFinalLiveIntervals(ir); } // If we performed the local propagation, live interval information // lives off of each basic block. // Thus, we no longer need bbLiveInfo (the fixed points results) // When we don't perform the local propagation, such as translating // out of SSA, then we need to keep bbLiveInfo around bbLiveInfo = null; // compute the mapping from registers to live interval elements computeRegisterMap(ir); } // No longer need currentSet, which is simply a cache of a LiveSet). currentSet = null; // This will be null if createGCMaps is false if (createGCMaps) { ir.MIRInfo.gcIRMap = map; } // inform the IR that handler liveness is now available if (storeLiveAtHandlers) { ir.setHandlerLivenessComputed(); } } | 49871 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49871/cefd371ec006d3e9a070dba676d80088bbc1be14/OPT_LiveAnalysis.java/buggy/rvm/src/vm/compilers/optimizing/optimizations/global/liveness/OPT_LiveAnalysis.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
918,
3073,
12,
15620,
67,
7937,
9482,
13,
288,
565,
368,
1221,
3071,
15908,
1123,
353,
731,
17,
869,
17,
712,
4202,
16456,
67,
3262,
3727,
18,
266,
9200,
17798,
8252,
1768,
12,
481,
176... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
918,
3073,
12,
15620,
67,
7937,
9482,
13,
288,
565,
368,
1221,
3071,
15908,
1123,
353,
731,
17,
869,
17,
712,
4202,
16456,
67,
3262,
3727,
18,
266,
9200,
17798,
8252,
1768,
12,
481,
176... | |
AbstractConnectorUi connectorUi = TasksUiPlugin.getRepositoryManager().getRepositoryConnectorUi( | AbstractRepositoryUi connectorUi = TasksUiPlugin.getRepositoryManager().getRepositoryUi( | public void decorate(Object element, IDecoration decoration) { if (element instanceof AbstractRepositoryQuery) { AbstractRepositoryQuery query = (AbstractRepositoryQuery)element; String repositoryUrl = query.getRepositoryUrl(); if (repositoryUrl != null) { try { URL url = new URL(repositoryUrl); decoration.addSuffix(" [" + url.getHost() + "]"); } catch (MalformedURLException e) { decoration.addSuffix(" [ <unknown host> ]"); } } if (query.isSynchronizing()) { decoration.addOverlay(TaskListImages.OVERLAY_SYNCHRONIZING, IDecoration.TOP_LEFT); } } else if (element instanceof AbstractRepositoryTask) { AbstractRepositoryTask task = (AbstractRepositoryTask)element; AbstractRepositoryConnector connector = TasksUiPlugin.getRepositoryManager().getRepositoryConnector(task.getRepositoryKind()); AbstractConnectorUi connectorUi = TasksUiPlugin.getRepositoryManager().getRepositoryConnectorUi( task.getRepositoryKind()); TaskRepository repository = TasksUiPlugin.getRepositoryManager().getRepository(task.getRepositoryKind(), task.getRepositoryUrl()); if (!connectorUi.hasRichEditor()) { decoration.addOverlay(TaskListImages.OVERLAY_WEB, IDecoration.BOTTOM_LEFT); } else if (connector != null && connector.hasRepositoryContext(repository, task)) { decoration.addOverlay(TaskListImages.OVERLAY_REPOSITORY_CONTEXT, IDecoration.BOTTOM_LEFT); } else { decoration.addOverlay(TaskListImages.OVERLAY_REPOSITORY, IDecoration.BOTTOM_LEFT); } if (task.isSynchronizing()) { decoration.addOverlay(TaskListImages.OVERLAY_SYNCHRONIZING, IDecoration.TOP_LEFT); } } else if (element instanceof AbstractQueryHit) { ITask correspondingTask = ((AbstractQueryHit)element).getCorrespondingTask(); decorate(correspondingTask, decoration); } else if (element instanceof ITask) { String url = ((ITask)element).getUrl(); if (url != null && !url.trim().equals("") && !url.equals("http://")) { decoration.addOverlay(TaskListImages.OVERLAY_WEB, IDecoration.BOTTOM_LEFT); } } } | 51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/cf0b994bf1db9c3d120f04e07595d8f6cec4520f/RepositoryTaskDecorator.java/buggy/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/RepositoryTaskDecorator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
15752,
12,
921,
930,
16,
1599,
557,
22226,
29217,
13,
288,
202,
202,
430,
261,
2956,
1276,
4115,
3305,
1138,
13,
288,
1082,
202,
7469,
3305,
1138,
843,
273,
261,
7469,
33... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
15752,
12,
921,
930,
16,
1599,
557,
22226,
29217,
13,
288,
202,
202,
430,
261,
2956,
1276,
4115,
3305,
1138,
13,
288,
1082,
202,
7469,
3305,
1138,
843,
273,
261,
7469,
33... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.