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 |
|---|---|---|---|---|---|---|
Collections.sort(nodeList, NODE_COMPARATOR); nodeArray = (svm_node[])nodeList.toArray(new svm_node[0]); return nodeArray; } | public static svm_node[] instanceToNodeArray(Instance instance) { Feature.Looper fLoop = instance.featureIterator(); svm_node[] nodeArray; List nodeList = new ArrayList(); while (fLoop.hasNext()) { Feature f = fLoop.nextFeature(); nodeList.add(featureToNode(f, instance)); } Collections.sort(nodeList, NODE_COMPARATOR); nodeArray = (svm_node[])nodeList.toArray(new svm_node[0]); return nodeArray; } | 51753 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51753/70715af93a6f31786293c5968972b99948a77ce2/SVMUtils.java/buggy/src/edu/cmu/minorthird/classify/algorithms/svm/SVMUtils.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
272,
3489,
67,
2159,
8526,
791,
31403,
1076,
12,
1442,
791,
13,
225,
288,
565,
7881,
18,
1504,
4063,
284,
6452,
273,
791,
18,
7238,
3198,
5621,
565,
272,
3489,
67,
2159,
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,
760,
272,
3489,
67,
2159,
8526,
791,
31403,
1076,
12,
1442,
791,
13,
225,
288,
565,
7881,
18,
1504,
4063,
284,
6452,
273,
791,
18,
7238,
3198,
5621,
565,
272,
3489,
67,
2159,
8526... | |
m_installer.updatePlPgsql(); m_installer.addStoredProcedures(); | public void testTriggerSetIpInterfaceIdInIfServiceNullIfIndexInIfServices() throws Exception { if (!isDBTestEnabled()) { return; } m_installer.createSequences(); m_installer.createTables(); m_installer.updatePlPgsql(); m_installer.addStoredProcedures(); executeSQL("INSERT INTO node (nodeId, nodeCreateTime) VALUES ( 1, now() )"); executeSQL("INSERT INTO snmpInterface (nodeId, ipAddr, snmpIfIndex) VALUES ( 1, '1.2.3.4', 1)"); executeSQL("INSERT INTO ipInterface (nodeId, ipAddr, ifIndex) VALUES ( 1, '1.2.3.4', 1 )"); executeSQL("INSERT INTO service (serviceID, serviceName) VALUES ( 1, 'COFFEE-READY' )"); ThrowableAnticipator ta = new ThrowableAnticipator(); ta.anticipate(new AssertionFailedError("Could not execute statement: 'INSERT INTO ifServices (nodeID, ipAddr, ifIndex, serviceID) VALUES ( 1, '1.2.3.4', null, 1)': ERROR: IfServices Trigger Exception: No IpInterface found for... nodeid: 1 ipaddr: 1.2.3.4 ifindex: <NULL>")); try { executeSQL("INSERT INTO ifServices (nodeID, ipAddr, ifIndex, serviceID) VALUES ( 1, '1.2.3.4', null, 1)"); } catch (Throwable t) { ta.throwableReceived(t); } ta.verifyAnticipated(); } | 11849 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11849/28ec8d0f53c305460681fe922d064c060141774d/InstallerDBTest.java/clean/opennms-install/src/test/java/org/opennms/install/InstallerDBTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
6518,
694,
5273,
1358,
548,
382,
2047,
1179,
2041,
2047,
1016,
382,
2047,
5676,
1435,
1216,
1185,
288,
3639,
309,
16051,
291,
2290,
4709,
1526,
10756,
288,
5411,
327,
31,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
6518,
694,
5273,
1358,
548,
382,
2047,
1179,
2041,
2047,
1016,
382,
2047,
5676,
1435,
1216,
1185,
288,
3639,
309,
16051,
291,
2290,
4709,
1526,
10756,
288,
5411,
327,
31,
... | |
public final AllocAdvice getAllocAdvice(Type type, EXTENT bytes, | final public AllocAdvice getAllocAdvice(Type type, EXTENT bytes, | public final AllocAdvice getAllocAdvice(Type type, EXTENT bytes, CallSite callsite, AllocAdvice hint) { return null; } | 5245 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5245/94b7f2758d20d0b18a9fe0f2a98fc5fcde7a9fce/Plan.java/buggy/rvm/src/vm/memoryManagers/JMTk/plan/hybrid/Plan.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
727,
12830,
1871,
633,
336,
8763,
1871,
633,
12,
559,
618,
16,
11112,
2222,
1731,
16,
25083,
225,
3049,
4956,
4097,
1137,
16,
25083,
225,
12830,
1871,
633,
7380,
13,
288,
377,
327,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
727,
12830,
1871,
633,
336,
8763,
1871,
633,
12,
559,
618,
16,
11112,
2222,
1731,
16,
25083,
225,
3049,
4956,
4097,
1137,
16,
25083,
225,
12830,
1871,
633,
7380,
13,
288,
377,
327,
... |
messages.addElement(lineNr + ":\t" + line); | m_messages.addElement(lineNr + ":\t" + line); | public void run() { int lineNr = 0; int lastLineNr = -1; String line = null; while (!m_stopThread) { lineNr = m_lineReader.getLineNumber(); try { line = m_lineReader.readLine(); } catch (IOException e) { // "Write end dead" IO exceptions can be ignored } if (line != null) { if (lineNr > lastLineNr) { // supress multiple output of the same line after "Write end dead" IO exception messages.addElement(lineNr + ":\t" + line); lastLineNr = lineNr; } } } try { m_pipedIn.close(); } catch (IOException e) { e.printStackTrace(); } } | 51784 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51784/2c6f118e6829e83e68b7436185bcfe3c3c48b03c/CmsSetupLoggingThread.java/buggy/src/org/opencms/setup/CmsSetupLoggingThread.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1086,
1435,
288,
3639,
509,
980,
18726,
273,
374,
31,
3639,
509,
31661,
18726,
273,
300,
21,
31,
3639,
514,
980,
273,
446,
31,
3639,
1323,
16051,
81,
67,
5681,
3830,
13,
288,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1086,
1435,
288,
3639,
509,
980,
18726,
273,
374,
31,
3639,
509,
31661,
18726,
273,
300,
21,
31,
3639,
514,
980,
273,
446,
31,
3639,
1323,
16051,
81,
67,
5681,
3830,
13,
288,... |
return new InsertableClientSSK("", md.digest(pubKey.asBytes()), pubKey, privKey, ckey); | return new InsertableClientSSK(docName, md.digest(pubKey.asBytes()), pubKey, privKey, ckey); | public static InsertableClientSSK createRandom(RandomSource r) { byte[] ckey = new byte[CRYPTO_KEY_LENGTH]; r.nextBytes(ckey); DSAGroup g = Global.DSAgroupBigA; DSAPrivateKey privKey = new DSAPrivateKey(g, r); DSAPublicKey pubKey = new DSAPublicKey(g, privKey); MessageDigest md; try { md = MessageDigest.getInstance("SHA-256"); } catch (NoSuchAlgorithmException e) { throw new Error(e); } try { return new InsertableClientSSK("", md.digest(pubKey.asBytes()), pubKey, privKey, ckey); } catch (MalformedURLException e) { throw new Error(e); } } | 45341 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45341/b56544432e78796bec51263917f81ad95f9853d3/InsertableClientSSK.java/buggy/src/freenet/keys/InsertableClientSSK.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
8040,
429,
1227,
1260,
47,
752,
8529,
12,
8529,
1830,
436,
13,
288,
202,
202,
7229,
8526,
276,
856,
273,
394,
1160,
63,
14306,
51,
67,
3297,
67,
7096,
15533,
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,
482,
760,
8040,
429,
1227,
1260,
47,
752,
8529,
12,
8529,
1830,
436,
13,
288,
202,
202,
7229,
8526,
276,
856,
273,
394,
1160,
63,
14306,
51,
67,
3297,
67,
7096,
15533,
202,
202,
... |
private void cleanupFile(FileSystem fileSys, File name) throws IOException { | private void cleanupFile(FileSystem fileSys, Path name) throws IOException { | private void cleanupFile(FileSystem fileSys, File name) throws IOException { assertTrue(fileSys.exists(name)); fileSys.delete(name); assertTrue(!fileSys.exists(name)); } | 50370 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50370/ee01fef4b4fb82c7492a4a747793839a4d14cd39/TestLocalDFS.java/buggy/src/test/org/apache/hadoop/dfs/TestLocalDFS.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
6686,
812,
12,
11785,
585,
12712,
16,
2666,
508,
13,
1216,
1860,
288,
565,
1815,
5510,
12,
768,
12712,
18,
1808,
12,
529,
10019,
565,
585,
12712,
18,
3733,
12,
529,
1769,
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,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
6686,
812,
12,
11785,
585,
12712,
16,
2666,
508,
13,
1216,
1860,
288,
565,
1815,
5510,
12,
768,
12712,
18,
1808,
12,
529,
10019,
565,
585,
12712,
18,
3733,
12,
529,
1769,
565... |
catch( Backtrack bt ) | else | protected void declSpecifierSeq( Object decl, boolean parm, boolean tryConstructor ) throws Backtrack { Flags flags = new Flags( parm, tryConstructor ); declSpecifiers: for (;;) { switch (LT(1)) { case Token.t_inline: case Token.t_auto: case Token.t_register: case Token.t_static: case Token.t_extern: case Token.t_mutable: case Token.t_virtual: case Token.t_explicit: case Token.t_typedef: case Token.t_friend: case Token.t_const: case Token.t_volatile: try{ callback.simpleDeclSpecifier(decl, consume());} catch( Exception e ) {} break; case Token.t_signed: case Token.t_unsigned: case Token.t_short: case Token.t_char: case Token.t_wchar_t: case Token.t_bool: case Token.t_int: case Token.t_long: case Token.t_float: case Token.t_double: case Token.t_void: flags.setEncounteredRawType(true); try{ callback.simpleDeclSpecifier(decl, consume());} catch( Exception e ) {} break; case Token.t_typename: try{ callback.simpleDeclSpecifier(decl, consume( Token.t_typename ));} catch( Exception e ) {} name(); try{ callback.simpleDeclSpecifierName( decl );} catch( Exception e ) {} return; case Token.tCOLONCOLON: consume( Token.tCOLONCOLON ); // handle nested later: case Token.tIDENTIFIER: // TODO - Kludgy way to handle constructors/destructors // handle nested later: if ( flags.haveEncounteredRawType() ) return; if ( lookAheadForConstructor( flags ) ) return; if ( lookAheadForDeclarator( flags ) ) return; try{ callback.simpleDeclSpecifier(decl,LA(1));} catch( Exception e ) {} name(); try{ callback.simpleDeclSpecifierName( decl );} catch( Exception e ) {} flags.setEncounteredTypename(true); break; case Token.t_class: case Token.t_struct: case Token.t_union: try { classSpecifier(decl); return; } catch( Backtrack bt ) { // this is an elaborated class specifier Object elab = null; try{ elab = callback.elaboratedTypeSpecifierBegin( decl, consume() );} catch( Exception e ) {} name(); try{ callback.elaboratedTypeSpecifierName( elab ); callback.elaboratedTypeSpecifierEnd( elab ); } catch( Exception e ) {} return; } case Token.t_enum: try { enumSpecifier(decl); return; } catch( Backtrack bt ) { // this is an elaborated class specifier Object elab = null; try{ elab = callback.elaboratedTypeSpecifierBegin( decl, consume() ); } catch( Exception e ) {} name(); try{ callback.elaboratedTypeSpecifierName( elab ); callback.elaboratedTypeSpecifierEnd( elab ); } catch( Exception e ) {} return; } default: break declSpecifiers; } } } | 54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/fcd010f569236801f1aded20abe270579381da56/Parser.java/buggy/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/Parser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
3496,
21416,
6926,
12,
1033,
3496,
16,
1250,
19924,
16,
1250,
775,
6293,
262,
1216,
4297,
4101,
288,
202,
202,
5094,
2943,
273,
394,
10104,
12,
19924,
16,
775,
6293,
11272... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3496,
21416,
6926,
12,
1033,
3496,
16,
1250,
19924,
16,
1250,
775,
6293,
262,
1216,
4297,
4101,
288,
202,
202,
5094,
2943,
273,
394,
10104,
12,
19924,
16,
775,
6293,
11272... |
if (myPresentationFigure != null) { myPresentationFigure.addDependendFigure(this); } | public void setPresentationFigure(Figure newPresentationFigure) { myPresentationFigure = newPresentationFigure; if (myPresentationFigure != null) { myPresentationFigure.addDependendFigure(this); } } | 5626 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5626/ea2cb8be59db9721209682394b69158a5e6559bf/GraphicalCompositeFigure.java/buggy/JHotDraw/src/CH/ifa/draw/contrib/GraphicalCompositeFigure.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
444,
6351,
367,
42,
15906,
12,
42,
15906,
394,
6351,
367,
42,
15906,
13,
288,
202,
202,
4811,
6351,
367,
42,
15906,
273,
394,
6351,
367,
42,
15906,
31,
202,
202,
430,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
444,
6351,
367,
42,
15906,
12,
42,
15906,
394,
6351,
367,
42,
15906,
13,
288,
202,
202,
4811,
6351,
367,
42,
15906,
273,
394,
6351,
367,
42,
15906,
31,
202,
202,
430,
2... | |
Object cacheKey = ((GroupMemberImpl)gm).getCacheKey(); return primGetMembers().containsKey(cacheKey); | Object cacheKey = ((GroupMemberImpl)gm).getCacheKey(); return primGetMembers().containsKey(cacheKey); | public boolean contains(IGroupMember gm) throws GroupsException{ if ( ! isMembersInitialized() ) { initializeMembers(); } Object cacheKey = ((GroupMemberImpl)gm).getCacheKey(); return primGetMembers().containsKey(cacheKey);} | 24959 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/24959/4c34db578b77ba3c1f4c891c4e5bc40fe5d7a231/EntityGroupImpl.java/buggy/source/org/jasig/portal/groups/EntityGroupImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
1250,
1914,
12,
45,
1114,
4419,
14125,
13,
1216,
14712,
503,
95,
202,
430,
261,
401,
353,
6918,
11459,
1435,
262,
202,
202,
95,
4046,
6918,
5621,
289,
202,
921,
9097,
273,
14015,
1114,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1914,
12,
45,
1114,
4419,
14125,
13,
1216,
14712,
503,
95,
202,
430,
261,
401,
353,
6918,
11459,
1435,
262,
202,
202,
95,
4046,
6918,
5621,
289,
202,
921,
9097,
273,
14015,
1114,
... |
((AbstractJdbc1Connection)connection).ExecSQL("DEALLOCATE " + m_statementName); | ((AbstractJdbc1Connection)connection).execSQL("DEALLOCATE " + m_statementName); | public void close() throws SQLException { // Force the ResultSet to close java.sql.ResultSet rs = getResultSet(); if (rs != null) rs.close(); // If using server prepared statements deallocate them if (m_useServerPrepare && m_statementName != null) { ((AbstractJdbc1Connection)connection).ExecSQL("DEALLOCATE " + m_statementName); } // Disasociate it from us (For Garbage Collection) result = null; } | 47293 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47293/16a30346c86590fbdcd83cacd2a0a9dbd2cd00dc/AbstractJdbc1Statement.java/buggy/src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1746,
1435,
1216,
6483,
202,
95,
202,
202,
759,
11889,
326,
10842,
358,
1746,
202,
202,
6290,
18,
4669,
18,
13198,
3597,
273,
8601,
694,
5621,
202,
202,
430,
261,
5453,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1746,
1435,
1216,
6483,
202,
95,
202,
202,
759,
11889,
326,
10842,
358,
1746,
202,
202,
6290,
18,
4669,
18,
13198,
3597,
273,
8601,
694,
5621,
202,
202,
430,
261,
5453,
4... |
0, null); | 0); | public NoPutResultSet materializeResultSetIfPossible(NoPutResultSet rs) throws StandardException { rs.openCore(); Vector rowCache = new Vector(); ExecRow aRow; int cacheSize = 0; FormatableBitSet toClone = null; int maxMemoryPerTable = getLanguageConnectionContext().getOptimizerFactory().getMaxMemoryPerTable(); aRow = rs.getNextRowCore(); if (aRow != null) { toClone = new FormatableBitSet(aRow.nColumns() + 1); toClone.set(1); } while (aRow != null) { cacheSize += aRow.getColumn(1).getLength(); if (cacheSize > maxMemoryPerTable || rowCache.size() > Optimizer.MAX_DYNAMIC_MATERIALIZED_ROWS) break; rowCache.addElement(aRow.getClone(toClone)); aRow = rs.getNextRowCore(); } rs.close(); if (aRow == null) { int rsNum = rs.resultSetNumber(); int numRows = rowCache.size(); if (numRows == 0) { return new RowResultSet( this, (ExecRow) null, true, rsNum, 0, 0, null); } RowResultSet[] rrs = new RowResultSet[numRows]; UnionResultSet[] urs = new UnionResultSet[numRows - 1]; for (int i = 0; i < numRows; i++) { rrs[i] = new RowResultSet( this, (ExecRow) rowCache.elementAt(i), true, rsNum, 1, 0, null); if (i > 0) { urs[i - 1] = new UnionResultSet ( (i > 1) ? (NoPutResultSet)urs[i - 2] : (NoPutResultSet)rrs[0], rrs[i], this, rsNum, i + 1, 0, null); } } rs.finish(); if (numRows == 1) return rrs[0]; else return urs[urs.length - 1]; } return rs; } | 56322 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56322/f77f36d19f4b950fcf1f46c08f767787b02b135f/BaseActivation.java/clean/java/engine/org/apache/derby/impl/sql/execute/BaseActivation.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2631,
6426,
13198,
312,
31624,
13198,
2047,
13576,
12,
2279,
6426,
13198,
3597,
13,
202,
202,
15069,
8263,
503,
202,
95,
202,
202,
5453,
18,
3190,
4670,
5621,
202,
202,
5018,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2631,
6426,
13198,
312,
31624,
13198,
2047,
13576,
12,
2279,
6426,
13198,
3597,
13,
202,
202,
15069,
8263,
503,
202,
95,
202,
202,
5453,
18,
3190,
4670,
5621,
202,
202,
5018,
10... |
if (arguments != null && arguments[1] != null) { isNonMaster = DEGREE_TYPE.equals(arguments[1]); } | if (arguments != null && arguments[1] != null) { isNonMaster = DEGREE_TYPE.equals(arguments[1]); } | private boolean verifyDegreeTypeIsMasterDegree(Object[] arguments) { boolean isNonMaster = false; if (arguments != null && arguments[1] != null) { isNonMaster = DEGREE_TYPE.equals(arguments[1]); } return isNonMaster; } | 2645 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2645/df2938c039923d69a1db1c512c05c72e9dd2f0d6/MasterDegreeEnrollmentWithoutRulesAuthorizationFilter.java/buggy/src/net/sourceforge/fenixedu/applicationTier/Filtro/enrollment/MasterDegreeEnrollmentWithoutRulesAuthorizationFilter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1250,
3929,
22885,
559,
2520,
7786,
22885,
12,
921,
8526,
1775,
13,
288,
3639,
1250,
353,
3989,
7786,
273,
629,
31,
3639,
309,
261,
7099,
480,
446,
597,
1775,
63,
21,
65,
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,
377,
3238,
1250,
3929,
22885,
559,
2520,
7786,
22885,
12,
921,
8526,
1775,
13,
288,
3639,
1250,
353,
3989,
7786,
273,
629,
31,
3639,
309,
261,
7099,
480,
446,
597,
1775,
63,
21,
65,
480,
446... |
throws Throwable | public Value unmarshall(Env env, Object value) throws Throwable { if (value == null) return LongValue.ZERO; else return new LongValue(((Number) value).longValue()); } | 3863 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3863/87fa828f676c349c54c585677eb7eeab11f5627f/Marshall.java/clean/quercus/src/main/java/com/caucho/quercus/module/Marshall.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1445,
17606,
12,
3491,
1550,
16,
1033,
460,
13,
540,
288,
1377,
309,
261,
1132,
422,
446,
13,
3639,
327,
3407,
620,
18,
24968,
31,
1377,
469,
3639,
327,
394,
3407,
620,
12443,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1445,
17606,
12,
3491,
1550,
16,
1033,
460,
13,
540,
288,
1377,
309,
261,
1132,
422,
446,
13,
3639,
327,
3407,
620,
18,
24968,
31,
1377,
469,
3639,
327,
394,
3407,
620,
12443,
12,... | |
public org.quickfix.field.LocateReqd getLocateReqd() throws FieldNotFound { org.quickfix.field.LocateReqd value = new org.quickfix.field.LocateReqd(); | public quickfix.field.LocateReqd getLocateReqd() throws FieldNotFound { quickfix.field.LocateReqd value = new quickfix.field.LocateReqd(); | public org.quickfix.field.LocateReqd getLocateReqd() throws FieldNotFound { org.quickfix.field.LocateReqd value = new org.quickfix.field.LocateReqd(); getField(value); return value; } | 8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/NewOrderList.java/buggy/src/java/src/quickfix/fix41/NewOrderList.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
1333,
340,
6113,
72,
336,
1333,
340,
6113,
72,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
1333,
340,
6113,
72,
460,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1333,
340,
6113,
72,
336,
1333,
340,
6113,
72,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
1333,
340,
6113,
72,
460,
... |
this.ruby = ruby; | this.runtime = ruby; | public UnmarshalStream(Ruby ruby, InputStream in) throws IOException { super(in); this.ruby = ruby; in.read(); // Major in.read(); // Minor } | 52337 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52337/f235ab756f32ea9496f8f880066b46ad95ebb692/UnmarshalStream.java/buggy/org/jruby/runtime/marshal/UnmarshalStream.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3814,
1228,
12,
54,
10340,
22155,
16,
5037,
316,
13,
1216,
1860,
288,
3639,
2240,
12,
267,
1769,
3639,
333,
18,
9448,
273,
22155,
31,
3639,
316,
18,
896,
5621,
368,
25977,
3639,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3814,
1228,
12,
54,
10340,
22155,
16,
5037,
316,
13,
1216,
1860,
288,
3639,
2240,
12,
267,
1769,
3639,
333,
18,
9448,
273,
22155,
31,
3639,
316,
18,
896,
5621,
368,
25977,
3639,
3... |
shiftGap(ipos0); | shiftGap(ipos0-gapEnd+gapStart); | protected void removePosRange(int ipos0, int ipos1) { ipos0 >>>= 1; ipos1 >>>= 1; if (ipos0 > gapEnd) shiftGap(ipos0); else if (ipos1 < gapStart) shiftGap(ipos1); if (ipos0 < gapStart) { base.clearBuffer(ipos0, gapStart - ipos0); gapStart = ipos0; } if (ipos1 > gapEnd) { base.clearBuffer(gapEnd, ipos1 - gapEnd); gapEnd = ipos1; } } | 37648 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/37648/10b7403ba29d18485ccc25e266c326fe17119874/GapVector.java/clean/gnu/lists/GapVector.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
918,
1206,
1616,
2655,
12,
474,
277,
917,
20,
16,
509,
277,
917,
21,
13,
225,
288,
565,
277,
917,
20,
4080,
33,
404,
31,
565,
277,
917,
21,
4080,
33,
404,
31,
565,
309,
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,
4750,
918,
1206,
1616,
2655,
12,
474,
277,
917,
20,
16,
509,
277,
917,
21,
13,
225,
288,
565,
277,
917,
20,
4080,
33,
404,
31,
565,
277,
917,
21,
4080,
33,
404,
31,
565,
309,
261,
... |
netdebug = true; | public njavaadmin(Socket ink, BufferedReader IN, OutputStreamWriter OUT) { super(ink,IN,OUT); netdebug = true; } | 6771 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6771/fc9292f4592217c22b88cffdb2cbc9821868ee19/njavaadmin.java/clean/mice/rebuild/server/njavaadmin.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
290,
6290,
3666,
12,
4534,
316,
79,
16,
10633,
2120,
16,
24248,
8210,
13,
202,
95,
202,
202,
9565,
12,
754,
16,
706,
16,
5069,
1769,
202,
202,
2758,
4148,
273,
638,
31,
202,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
290,
6290,
3666,
12,
4534,
316,
79,
16,
10633,
2120,
16,
24248,
8210,
13,
202,
95,
202,
202,
9565,
12,
754,
16,
706,
16,
5069,
1769,
202,
202,
2758,
4148,
273,
638,
31,
202,... | |
public void normal_lhs_block(AndDescr descrs) throws RecognitionException { PatternDescr d = null; try { // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:531:17: ( (d= lhs opt_eol )* opt_eol ) // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:531:17: (d= lhs opt_eol )* opt_eol { // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:531:17: (d= lhs opt_eol )* loop40: do { int alt40=2; int LA40_0 = input.LA(1); if ( LA40_0==ID||LA40_0==21||(LA40_0>=54 && LA40_0<=56) ) { alt40=1; } switch (alt40) { case 1 : // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:531:25: d= lhs opt_eol { following.push(FOLLOW_lhs_in_normal_lhs_block1240); d=lhs(); following.pop(); following.push(FOLLOW_opt_eol_in_normal_lhs_block1242); opt_eol(); following.pop(); descrs.addDescr( d ); } break; default : break loop40; } } while (true); following.push(FOLLOW_opt_eol_in_normal_lhs_block1254); opt_eol(); following.pop(); } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { } return ; } | 31577 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/31577/297a1e0ef2967d8b4f7be9c022102a5a56e97489/RuleParser.java/clean/drools-compiler/src/main/java/org/drools/lang/RuleParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
2212,
67,
80,
4487,
67,
2629,
12,
1876,
16198,
3044,
5453,
13,
1216,
9539,
288,
6647,
6830,
16198,
302,
273,
446,
31,
3639,
775,
288,
5411,
368,
385,
5581,
15298,
64,
10649,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2212,
67,
80,
4487,
67,
2629,
12,
1876,
16198,
3044,
5453,
13,
1216,
9539,
288,
6647,
6830,
16198,
302,
273,
446,
31,
3639,
775,
288,
5411,
368,
385,
5581,
15298,
64,
10649,
... | ||
WebUserDataPermission other = (WebUserDataPermission)permission; | WebUserDataPermission other = (WebUserDataPermission) permission; | public boolean implies(Permission permission) { if (permission == null || !(permission instanceof WebUserDataPermission)) return false; WebUserDataPermission other = (WebUserDataPermission)permission; return urlPatternSpec.implies(other.urlPatternSpec) && httpMethodSpec.implies(other.httpMethodSpec); } | 8608 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8608/361c2269af464cdf79550bc0b73c91519ca0d621/WebUserDataPermission.java/clean/j2ee-jacc/src/java/javax/security/jacc/WebUserDataPermission.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
24168,
12,
5041,
4132,
13,
288,
3639,
309,
261,
9827,
422,
446,
747,
401,
12,
9827,
1276,
2999,
19265,
5041,
3719,
327,
629,
31,
3639,
2999,
19265,
5041,
1308,
273,
261,
4079,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
24168,
12,
5041,
4132,
13,
288,
3639,
309,
261,
9827,
422,
446,
747,
401,
12,
9827,
1276,
2999,
19265,
5041,
3719,
327,
629,
31,
3639,
2999,
19265,
5041,
1308,
273,
261,
4079,... |
assertEquals(receiveValue.getTime().getTime(), rs.getTimestamp(1).getTime()); | assertEquals(receiveValue.getTime().getTime(), getTimeInMs(rs)); | public void testDatetimeRounding6() throws Exception { // Per the SQL Server documentation // Send: 01/01/98 23:59:59.995 // Receive: 01/01/98 23:59:59.997 Calendar sendValue = Calendar.getInstance(); Calendar receiveValue = Calendar.getInstance(); sendValue.set(Calendar.MONTH, Calendar.JANUARY); sendValue.set(Calendar.DAY_OF_MONTH, 1); sendValue.set(Calendar.YEAR, 1998); sendValue.set(Calendar.HOUR_OF_DAY, 23); sendValue.set(Calendar.MINUTE, 59); sendValue.set(Calendar.SECOND, 59); sendValue.set(Calendar.MILLISECOND, 995); receiveValue.set(Calendar.MONTH, Calendar.JANUARY); receiveValue.set(Calendar.DAY_OF_MONTH, 1); receiveValue.set(Calendar.YEAR, 1998); receiveValue.set(Calendar.HOUR_OF_DAY, 23); receiveValue.set(Calendar.MINUTE, 59); receiveValue.set(Calendar.SECOND, 59); receiveValue.set(Calendar.MILLISECOND, 997); Statement stmt = con.createStatement(); stmt.execute("create table #dtr6 (data datetime)"); stmt.close(); PreparedStatement pstmt = con.prepareStatement("insert into #dtr6 (data) values (?)"); pstmt.setTimestamp(1, new Timestamp(sendValue.getTime().getTime())); assertEquals(pstmt.executeUpdate(), 1); pstmt.close(); pstmt = con.prepareStatement("select data from #dtr6"); ResultSet rs = pstmt.executeQuery(); assertTrue(rs.next()); assertEquals(receiveValue.getTime().getTime(), rs.getTimestamp(1).getTime()); assertTrue(!rs.next()); pstmt.close(); rs.close(); } | 2029 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2029/d6f1ce23e41ec23a43408c887aa48ce8de736d00/TimestampTest.java/buggy/src/test/net/sourceforge/jtds/test/TimestampTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
16103,
11066,
310,
26,
1435,
1216,
1185,
288,
3639,
368,
5722,
326,
3063,
3224,
7323,
3639,
368,
2479,
30,
565,
8743,
19,
1611,
19,
10689,
10213,
30,
6162,
30,
6162,
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,
918,
1842,
16103,
11066,
310,
26,
1435,
1216,
1185,
288,
3639,
368,
5722,
326,
3063,
3224,
7323,
3639,
368,
2479,
30,
565,
8743,
19,
1611,
19,
10689,
10213,
30,
6162,
30,
6162,
18,
... |
if(logMINOR) Logger.minor(this, "Creating SingleFileFetcher for "+key); | if(logMINOR) Logger.minor(this, "Creating SingleFileFetcher for "+key+" meta="+metaStrings.toString(), new Exception("debug")); | public SingleFileFetcher(BaseClientGetter get, GetCompletionCallback cb, ClientMetadata metadata, ClientKey key, LinkedList metaStrings, FreenetURI origURI, int addedMetaStrings, FetcherContext ctx, ArchiveContext actx, int maxRetries, int recursionLevel, boolean dontTellClientGet, Object token, boolean isEssential, Bucket returnBucket, boolean isFinal) throws FetchException { super(key, maxRetries, ctx, get); logMINOR = Logger.shouldLog(Logger.MINOR, this); if(logMINOR) Logger.minor(this, "Creating SingleFileFetcher for "+key); this.isFinal = isFinal; this.cancelled = false; this.returnBucket = returnBucket; this.dontTellClientGet = dontTellClientGet; this.token = token; //this.uri = uri; //this.key = ClientKey.getBaseKey(uri); //metaStrings = uri.listMetaStrings(); this.metaStrings = metaStrings; this.addedMetaStrings = addedMetaStrings; this.rcb = cb; this.clientMetadata = metadata; thisKey = key.getURI(); this.uri = origURI; this.actx = actx; this.recursionLevel = recursionLevel + 1; if(recursionLevel > ctx.maxRecursionLevel) throw new FetchException(FetchException.TOO_MUCH_RECURSION, "Too much recursion: "+recursionLevel+" > "+ctx.maxRecursionLevel); this.decompressors = new LinkedList(); parent.addBlock(); if(isEssential) parent.addMustSucceedBlocks(1); } | 46035 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46035/6a97f243bab839e835cd7e7cf39d4233d72cc1db/SingleFileFetcher.java/buggy/src/freenet/client/async/SingleFileFetcher.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
10326,
812,
16855,
12,
2171,
1227,
8461,
336,
16,
968,
11238,
2428,
2875,
16,
2445,
2277,
1982,
16,
1082,
202,
1227,
653,
498,
16,
10688,
2191,
7957,
16,
478,
2842,
278,
3098,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
10326,
812,
16855,
12,
2171,
1227,
8461,
336,
16,
968,
11238,
2428,
2875,
16,
2445,
2277,
1982,
16,
1082,
202,
1227,
653,
498,
16,
10688,
2191,
7957,
16,
478,
2842,
278,
3098,
... |
Security security = dctx.getSecurity(); | public static Map getBOMTree(DispatchContext dctx, Map context) { Map result = new HashMap(); Security security = dctx.getSecurity(); GenericDelegator delegator = dctx.getDelegator(); LocalDispatcher dispatcher = dctx.getDispatcher(); GenericValue userLogin = (GenericValue)context.get("userLogin"); String productId = (String) context.get("productId"); String fromDateStr = (String) context.get("fromDate"); String bomType = (String) context.get("bomType"); Integer type = (Integer) context.get("type"); Double quantity = (Double) context.get("quantity"); Double amount = (Double) context.get("amount"); if (type == null) { type = new Integer(0); } Date fromDate = null; if (UtilValidate.isNotEmpty(fromDateStr)) { try { fromDate = Timestamp.valueOf(fromDateStr); } catch (Exception e) { } } if (fromDate == null) { fromDate = new Date(); } BOMTree tree = null; try { tree = new BOMTree(productId, bomType, fromDate, type.intValue(), delegator, dispatcher, userLogin); } catch(GenericEntityException gee) { return ServiceUtil.returnError("Error creating bill of materials tree: " + gee.getMessage()); } if (tree != null && quantity != null) { tree.setRootQuantity(quantity.doubleValue()); } if (tree != null && amount != null) { tree.setRootAmount(amount.doubleValue()); } result.put("tree", tree); return result; } | 45953 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45953/9b3b889c7b7b34004f352b6b9cabb4103d892e41/BOMServices.java/buggy/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMServices.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1635,
2882,
1872,
2471,
12,
5325,
1042,
302,
5900,
16,
1635,
819,
13,
288,
3639,
1635,
563,
273,
394,
4317,
5621,
9079,
7928,
15608,
639,
11158,
639,
273,
302,
5900,
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,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1635,
2882,
1872,
2471,
12,
5325,
1042,
302,
5900,
16,
1635,
819,
13,
288,
3639,
1635,
563,
273,
394,
4317,
5621,
9079,
7928,
15608,
639,
11158,
639,
273,
302,
5900,
18,
588,
... | |
String dest = translatePath("$INSTALL_PATH") + File.separator + "Uninstaller"; | String dest = translatePath("$INSTALL_PATH") + File.separator + "Uninstaller"; | private void putUninstaller() throws Exception { // Me make the .uninstaller directory String dest = translatePath("$INSTALL_PATH") + File.separator + "Uninstaller"; String jar = dest + File.separator + "uninstaller.jar"; File pathMaker = new File(dest); pathMaker.mkdirs(); // We log the uninstaller deletion information udata.setUninstallerJarFilename(jar); udata.setUninstallerPath(dest); // We open our final jar file FileOutputStream out = new FileOutputStream(jar); ZipOutputStream outJar = new ZipOutputStream(out); idata.uninstallOutJar = outJar; outJar.setLevel(9); udata.addFile(jar); // We copy the uninstaller InputStream in = getClass().getResourceAsStream("/res/IzPack.uninstaller"); ZipInputStream inRes = new ZipInputStream(in); ZipEntry zentry = inRes.getNextEntry(); while (zentry != null) { // Puts a new entry outJar.putNextEntry(new ZipEntry(zentry.getName())); // Byte to byte copy int unc = inRes.read(); while (unc != -1) { outJar.write(unc); unc = inRes.read(); } // Next one please inRes.closeEntry(); outJar.closeEntry(); zentry = inRes.getNextEntry(); } inRes.close(); // We put the langpack in = getClass().getResourceAsStream("/langpacks/" + idata.localeISO3 + ".xml"); outJar.putNextEntry(new ZipEntry("langpack.xml")); int read = in.read(); while (read != -1) { outJar.write(read); read = in.read(); } outJar.closeEntry(); } | 46579 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46579/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/Unpacker.java/buggy/src/lib/com/izforge/izpack/installer/Unpacker.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
1378,
984,
20163,
1435,
1216,
1185,
225,
288,
565,
368,
7499,
1221,
326,
263,
318,
20163,
1867,
565,
514,
1570,
273,
4204,
743,
2932,
8,
28865,
67,
4211,
7923,
397,
1387,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
1378,
984,
20163,
1435,
1216,
1185,
225,
288,
565,
368,
7499,
1221,
326,
263,
318,
20163,
1867,
565,
514,
1570,
273,
4204,
743,
2932,
8,
28865,
67,
4211,
7923,
397,
1387,
18,
... |
public void setSelection(Object[] elements) { if ((elements == null) || (fElements == null)) return; int[] indices= new int[elements.length]; for (int i= 0; i != elements.length; i++) { int j; for (j= 0; j != fFoldedCount; j++) { int max= (j == fFoldedCount - 1) ? fFilteredCount : fFoldedIndices[j + 1]; int l; for (l= fFoldedIndices[j]; l != max; l++) { if (fElements[fFilteredIndices[l]].equals(elements[i])) { indices[i]= j; break; } } if (l != max) break; } if (j == fFoldedCount) indices[i] = 0; } fList.setSelection(indices); | public void setSelection(int[] selection) { if (selection == null || selection.length == 0) fList.deselectAll(); else fList.setSelection(selection); | public void setSelection(Object[] elements) { if ((elements == null) || (fElements == null)) return; // fill indices int[] indices= new int[elements.length]; for (int i= 0; i != elements.length; i++) { int j; for (j= 0; j != fFoldedCount; j++) { int max= (j == fFoldedCount - 1) ? fFilteredCount : fFoldedIndices[j + 1]; int l; for (l= fFoldedIndices[j]; l != max; l++) { // found matching element? if (fElements[fFilteredIndices[l]].equals(elements[i])) { indices[i]= j; break; } } if (l != max) break; } // not found if (j == fFoldedCount) indices[i] = 0; } fList.setSelection(indices); } | 9698 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9698/5c4879234663a13907320ca74ea97038f267ba6b/FilteredList.java/buggy/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/FilteredList.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
444,
6233,
12,
921,
8526,
2186,
13,
288,
202,
202,
430,
14015,
6274,
422,
446,
13,
747,
261,
74,
3471,
422,
446,
3719,
1082,
202,
2463,
31,
6862,
1082,
202,
759,
3636,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
444,
6233,
12,
921,
8526,
2186,
13,
288,
202,
202,
430,
14015,
6274,
422,
446,
13,
747,
261,
74,
3471,
422,
446,
3719,
1082,
202,
2463,
31,
6862,
1082,
202,
759,
3636,
... |
converter.store(); | public void testHandleDuplicateSymbol() throws Exception { String gff = "4\t.\tgene\t248174\t250682\t.\t+\t.\tID=CG1629;Name=yellow-h;Dbxref=FlyBase:FBan0001629,FlyBase:FBgn0039896;cyto_range=102B1-102B2;gbunit=AE003844;synonym=yellow-h\n" + "4\t.\tgene\t248174\t250682\t.\t+\t.\tID=CG1629-test;Name=yellow-h;Dbxref=FlyBase:FBan0001629,FlyBase:FBgn0039896;cyto_range=102B1-102B2;gbunit=AE003844;synonym=yellow-h\n"; BufferedReader srcReader = new BufferedReader(new StringReader(gff)); converter.parse(srcReader); Item expectedGene1 = null; Item expectedGene2 = null; Item actualGene1 = null; Item actualGene2 = null; Iterator iter = writer.getItems().iterator(); while (iter.hasNext()) { Item item = (Item) iter.next(); if (item.getClassName().equals(tgtNs + "Gene")) { if (item.getAttribute("identifier").getValue().equals("CG1629")) { if (actualGene1 == null) { actualGene1 = item; expectedGene1 = itemFactory.makeItem(item.getIdentifier(), tgtNs + "Gene", ""); expectedGene1.setAttribute("organismDbId", "FBgn0039896-duplicate-organismDbId-1"); expectedGene1.setAttribute("identifier", "CG1629"); expectedGene1.setAttribute("symbol", "yellow-h-duplicate-symbol-1"); expectedGene1.setReference("organism", handler.getOrganism()); List evidence = new ArrayList(); evidence.add(handler.getDataSet().getIdentifier()); expectedGene1.setCollection("evidence", evidence); } else { fail("found a gene twice: CG1629"); } } else { if (item.getAttribute("identifier").getValue().equals("CG1629-test")) { if (actualGene2 == null) { actualGene2 = item; expectedGene2 = itemFactory.makeItem(item.getIdentifier(), tgtNs + "Gene", ""); expectedGene2.setAttribute("organismDbId", "FBgn0039896-duplicate-organismDbId-2"); expectedGene2.setAttribute("identifier", "CG1629-test"); expectedGene2.setAttribute("symbol", "yellow-h-duplicate-symbol-2"); expectedGene2.setReference("organism", handler.getOrganism()); List evidence = new ArrayList(); evidence.add(handler.getDataSet().getIdentifier()); expectedGene2.setCollection("evidence", evidence); } else { fail("found a gene twice: CG1629-test"); } } else { fail("found an unknown gene: " + item.getAttribute("identifier").getValue()); } } } } assertNotNull(expectedGene1); assertNotNull(expectedGene2); assertEquals(expectedGene1, actualGene1); assertEquals(expectedGene2, actualGene2); } | 7196 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7196/6fd88da51e01ffa6d9240cf99f2f724606263c5a/ChadoGFF3RecordHandlerTest.java/clean/flymine/model/chado/src/test/org/flymine/dataconversion/ChadoGFF3RecordHandlerTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
6027,
18,
2233,
5621,
225,
6027,
18,
2233,
5621,
225,
6027,
18,
2233,
5621,
225,
6027,
18,
2233,
5621,
225,
1071,
15747,
18,
2233,
5621,
225,
918,
15747,
18,
2233,
5621,
225,
1842,
3259,
11826... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6027,
18,
2233,
5621,
225,
6027,
18,
2233,
5621,
225,
6027,
18,
2233,
5621,
225,
6027,
18,
2233,
5621,
225,
1071,
15747,
18,
2233,
5621,
225,
918,
15747,
18,
2233,
5621,
225,
1842,
3259,
11826... | |
return RubyArray.newArray(ruby, Arrays.asList(values)); | return RubyArray.newArray(ruby, values); | public RubyArray to_a() { return RubyArray.newArray(ruby, Arrays.asList(values)); } | 45753 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45753/a42a5780d9d19f5b3f27bdc079684319c5596e54/RubyStruct.java/clean/org/jruby/RubyStruct.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19817,
1076,
358,
67,
69,
1435,
288,
3639,
327,
19817,
1076,
18,
2704,
1076,
12,
27768,
16,
924,
1769,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19817,
1076,
358,
67,
69,
1435,
288,
3639,
327,
19817,
1076,
18,
2704,
1076,
12,
27768,
16,
924,
1769,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
IndividualJDOM child = (IndividualJDOM) getChildren().get(position); child.getElement().detach(); | List children = getChildren(); Individual removedChild = (Individual) children.remove(position); removedChild.setFamilyAsChild(null); setChildren(children); | public void removeChildAtPosition(int position) { IndividualJDOM child = (IndividualJDOM) getChildren().get(position); child.getElement().detach(); // force list of children to reload next time// children = null; } | 6190 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6190/b2ae5f11ea578b327e07eaf292b8a7c5bea26733/FamilyJDOM.java/clean/MacPAF/src/com/redbugz/macpaf/jdom/FamilyJDOM.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
14213,
861,
2555,
12,
474,
1754,
13,
288,
202,
29834,
46,
8168,
1151,
273,
261,
29834,
46,
8168,
13,
10268,
7675,
588,
12,
3276,
1769,
202,
3624,
18,
21336,
7675,
8238,
497,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
14213,
861,
2555,
12,
474,
1754,
13,
288,
202,
29834,
46,
8168,
1151,
273,
261,
29834,
46,
8168,
13,
10268,
7675,
588,
12,
3276,
1769,
202,
3624,
18,
21336,
7675,
8238,
497,
... |
if ( iid.equals(nsISupportsIID) || iid.equals(bcIJavaSampleIID)) { | if ( iid.equals(nsISupports.IID) || iid.equals(bcIJavaSample.IID)) { | public Object queryInterface(IID iid) { System.out.println("--[java]bcJavaSample::queryInterface iid="+iid); Object result; if ( iid.equals(nsISupportsIID) || iid.equals(bcIJavaSampleIID)) { result = this; } else { result = null; } System.out.println("--[java]bcJavaSample::queryInterface result=null "+(result==null)); return result; } | 51996 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51996/41fe7095a7d54e02dd8c0bac80b7264fac98049b/bcJavaSample.java/clean/java/xpcom/java/test/bcJavaSample.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
843,
1358,
12,
45,
734,
22819,
13,
288,
3639,
2332,
18,
659,
18,
8222,
2932,
413,
63,
6290,
65,
13459,
5852,
8504,
2866,
2271,
1358,
22819,
1546,
15,
77,
350,
1769,
3639,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
843,
1358,
12,
45,
734,
22819,
13,
288,
3639,
2332,
18,
659,
18,
8222,
2932,
413,
63,
6290,
65,
13459,
5852,
8504,
2866,
2271,
1358,
22819,
1546,
15,
77,
350,
1769,
3639,
10... |
public NativeClosure(Context cx, Scriptable scope, NativeFunction f) { setPrototype(f); setParentScope(scope); String name = f.names != null ? f.names[0] : ""; if (name != null && name.length() > 0) { scope.put(name, scope, scope.getParentScope() == null ? (Object) f : this); } | public NativeClosure() { | public NativeClosure(Context cx, Scriptable scope, NativeFunction f) { setPrototype(f); setParentScope(scope); String name = f.names != null ? f.names[0] : ""; if (name != null && name.length() > 0) { scope.put(name, scope, scope.getParentScope() == null ? (Object) f : this); } } | 12376 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12376/032b7f4436573637adbecdd4a87a1f7f49395249/NativeClosure.java/buggy/js/rhino/org/mozilla/javascript/NativeClosure.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
16717,
10573,
12,
1042,
9494,
16,
22780,
2146,
16,
16717,
2083,
284,
13,
288,
3639,
444,
15846,
12,
74,
1769,
3639,
12548,
3876,
12,
4887,
1769,
3639,
514,
508,
273,
284,
18,
1973,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
16717,
10573,
12,
1042,
9494,
16,
22780,
2146,
16,
16717,
2083,
284,
13,
288,
3639,
444,
15846,
12,
74,
1769,
3639,
12548,
3876,
12,
4887,
1769,
3639,
514,
508,
273,
284,
18,
1973,
... |
bootImage.setHalfWord(arrayImageOffset + (i << LOG_BYTES_IN_SHORT), values[i]); | bootImage.setHalfWord(arrayImageOffset.add(i << LOG_BYTES_IN_SHORT), values[i]); | private static int copyToBootImage(Object jdkObject, boolean allocOnly, int overwriteOffset, Object parentObject) throws IllegalAccessException { // // Return object if it is already copied and not being overwritten // BootImageMap.Entry mapEntry = BootImageMap.findOrCreateEntry(jdkObject); if (mapEntry.imageOffset != OBJECT_NOT_ALLOCATED && overwriteOffset == -1) return mapEntry.imageOffset; if (verbose >= 2) depth++; // // fetch object's type information // Class jdkType = jdkObject.getClass(); VM_Type rvmType = getRvmType(jdkType); if (rvmType == null) { if (verbose >= 2) traverseObject(jdkObject); if (verbose >= 2) depth--; return OBJECT_NOT_PRESENT; // object not part of bootimage } // // copy object to image // if (jdkType.isArray()) { VM_Array rvmArrayType = rvmType.asArray(); // // allocate space in image // int arrayCount = Array.getLength(jdkObject); int arrayImageOffset = (overwriteOffset == -1) ? bootImage.allocateArray(rvmArrayType, arrayCount) : overwriteOffset; mapEntry.imageOffset = arrayImageOffset; if (verbose >= 2) { if (depth == depthCutoff) say(SPACES.substring(0,depth+1), "TOO DEEP: cutting off"); else if (depth < depthCutoff) { String tab = SPACES.substring(0,depth+1); if (depth == 0 && jtocCount >= 0) tab = tab + "jtoc #" + String.valueOf(jtocCount) + ": "; int arraySize = rvmArrayType.getInstanceSize(arrayCount); say(tab, "Copying array ", jdkType.getName(), " length=", String.valueOf(arrayCount), (arraySize >= LARGE_ARRAY_SIZE) ? " large object!!!" : ""); } } VM_Type rvmElementType = rvmArrayType.getElementType(); // Show info on reachability of int arrays // if (false && rvmElementType.equals(VM_Type.IntType)) { if (parentObject != null) { Class parentObjectType = parentObject.getClass(); VM.sysWrite("Copying int array (", 4 * ((int []) jdkObject).length); VM.sysWriteln(" bytes) from parent object of type ", parentObjectType.toString()); } else { VM.sysWriteln("Copying int array from no parent object"); } } // // copy array elements from host jdk address space into image // recurse on values that are references // if (rvmElementType.isPrimitiveType()) { // array element is logical or numeric type if (rvmElementType.equals(VM_Type.BooleanType)) { boolean values[] = (boolean[]) jdkObject; for (int i = 0; i < arrayCount; ++i) bootImage.setByte(arrayImageOffset + i, values[i] ? 1 : 0); } else if (rvmElementType.equals(VM_Type.ByteType)) { byte values[] = (byte[]) jdkObject; for (int i = 0; i < arrayCount; ++i) bootImage.setByte(arrayImageOffset + i, values[i]); } else if (rvmElementType.equals(VM_Type.CharType)) { char values[] = (char[]) jdkObject; for (int i = 0; i < arrayCount; ++i) bootImage.setHalfWord(arrayImageOffset + (i << LOG_BYTES_IN_CHAR), values[i]); } else if (rvmElementType.equals(VM_Type.ShortType)) { short values[] = (short[]) jdkObject; for (int i = 0; i < arrayCount; ++i) bootImage.setHalfWord(arrayImageOffset + (i << LOG_BYTES_IN_SHORT), values[i]); } else if (rvmElementType.equals(VM_Type.IntType)) { int values[] = (int[]) jdkObject; for (int i = 0; i < arrayCount; ++i) bootImage.setFullWord(arrayImageOffset + (i << LOG_BYTES_IN_INT), values[i]); } else if (rvmElementType.equals(VM_Type.LongType)) { long values[] = (long[]) jdkObject; for (int i = 0; i < arrayCount; ++i) bootImage.setDoubleWord(arrayImageOffset + (i << LOG_BYTES_IN_LONG), values[i]); } else if (rvmElementType.equals(VM_Type.FloatType)) { float values[] = (float[]) jdkObject; for (int i = 0; i < arrayCount; ++i) bootImage.setFullWord(arrayImageOffset + (i << LOG_BYTES_IN_FLOAT), Float.floatToIntBits(values[i])); } else if (rvmElementType.equals(VM_Type.DoubleType)) { double values[] = (double[]) jdkObject; for (int i = 0; i < arrayCount; ++i) bootImage.setDoubleWord(arrayImageOffset + (i << LOG_BYTES_IN_DOUBLE), Double.doubleToLongBits(values[i])); } else fail("unexpected primitive array type: " + rvmArrayType); } else { // array element is reference type Object values[] = (Object []) jdkObject; Class jdkClass = jdkObject.getClass(); if (!allocOnly) { for (int i = 0; i<arrayCount; ++i) { if (values[i] != null) { if (verbose >= 2) traceContext.push(values[i].getClass().getName(), jdkClass.getName(), i); int imageOffset = copyToBootImage(values[i], allocOnly, -1, jdkObject); if (imageOffset == OBJECT_NOT_PRESENT) { // object not part of bootimage: install null reference if (verbose >= 2) traceContext.traceObjectNotInBootImage(); bootImage.setNullAddressWord(arrayImageOffset + (i << LOG_BYTES_IN_ADDRESS)); } else { bootImage.setAddressWord(arrayImageOffset + (i << LOG_BYTES_IN_ADDRESS), bootImageAddress.add(imageOffset).toWord()); } if (verbose >= 2) traceContext.pop(); } } } } } else { if (rvmType == VM_Type.AddressArrayType) { if (verbose >= 2) depth--; AddressArray addrArray = (AddressArray) jdkObject; Object backing = addrArray.getBacking(); return copyMagicArrayToBootImage(backing, rvmType.asArray(), allocOnly, overwriteOffset, parentObject); } if (rvmType == VM_Type.ObjectReferenceArrayType) { if (verbose >= 2) depth--; ObjectReferenceArray orArray = (ObjectReferenceArray) jdkObject; Object backing = orArray.getBacking(); return copyMagicArrayToBootImage(backing, rvmType.asArray(), allocOnly, overwriteOffset, parentObject); } if (rvmType == VM_Type.OffsetArrayType) { if (verbose >= 2) depth--; OffsetArray addrArray = (OffsetArray) jdkObject; Object backing = addrArray.getBacking(); return copyMagicArrayToBootImage(backing, rvmType.asArray(), allocOnly, overwriteOffset, parentObject); } if (rvmType == VM_Type.WordArrayType) { if (verbose >= 2) depth--; WordArray addrArray = (WordArray) jdkObject; Object backing = addrArray.getBacking(); return copyMagicArrayToBootImage(backing, rvmType.asArray(), allocOnly, overwriteOffset, parentObject); } if (rvmType == VM_Type.ExtentArrayType) { if (verbose >= 2) depth--; ExtentArray addrArray = (ExtentArray) jdkObject; Object backing = addrArray.getBacking(); return copyMagicArrayToBootImage(backing, rvmType.asArray(), allocOnly, overwriteOffset, parentObject); } if (rvmType == VM_Type.CodeArrayType) { if (verbose >= 2) depth--; VM_CodeArray codeArray = (VM_CodeArray) jdkObject; Object backing = codeArray.getBacking(); return copyMagicArrayToBootImage(backing, rvmType.asArray(), allocOnly, overwriteOffset, parentObject); } if (rvmType.isMagicType()) { VM.sysWriteln("Unhandled copying of magic type: " + rvmType.getDescriptor().toString()); VM.sysFail("incomplete boot image support"); } // // allocate space in image // VM_Class rvmScalarType = rvmType.asClass(); int scalarImageOffset = (overwriteOffset == -1) ? bootImage.allocateScalar(rvmScalarType) : overwriteOffset; mapEntry.imageOffset = scalarImageOffset; if (verbose >= 2) { if (depth == depthCutoff) say(SPACES.substring(0,depth+1), "TOO DEEP: cutting off"); else if (depth < depthCutoff) { String tab = SPACES.substring(0,depth+1); if (depth == 0 && jtocCount >= 0) tab = tab + "jtoc #" + String.valueOf(jtocCount) + " "; int scalarSize = rvmScalarType.getInstanceSize(); say(tab, "Copying object ", jdkType.getName(), " size=", String.valueOf(scalarSize), (scalarSize >= LARGE_SCALAR_SIZE) ? " large object!!!" : ""); } } // // copy object fields from host jdk address space into image // recurse on values that are references // VM_Field[] rvmFields = rvmScalarType.getInstanceFields(); for (int i = 0, n = rvmFields.length; i < n; ++i) { VM_Field rvmField = rvmFields[i]; VM_TypeReference rvmFieldType = rvmField.getType(); int rvmFieldOffset = scalarImageOffset + rvmField.getOffsetAsInt(); String rvmFieldName = rvmField.getName().toString(); Field jdkFieldAcc = getJdkFieldAccessor(jdkType, i, INSTANCE_FIELD); if (jdkFieldAcc == null) { if (verbose >= 2) traceContext.push(rvmFieldType.toString(), jdkType.getName(), rvmFieldName); if (verbose >= 2) traceContext.traceFieldNotInHostJdk(); if (verbose >= 2) traceContext.pop(); if (rvmFieldType.isPrimitiveType()) switch (rvmField.getType().getSize()) { case 4: bootImage.setFullWord(rvmFieldOffset, 0); break; case 8: bootImage.setDoubleWord(rvmFieldOffset, 0L); break; default:fail("unexpected field type: " + rvmFieldType); break; } else bootImage.setNullAddressWord(rvmFieldOffset); continue; } if (rvmFieldType.isPrimitiveType()) { // field is logical or numeric type if (rvmFieldType.isBooleanType()) { bootImage.setFullWord(rvmFieldOffset, jdkFieldAcc.getBoolean(jdkObject) ? 1 : 0); } else if (rvmFieldType.isByteType()) { bootImage.setFullWord(rvmFieldOffset, jdkFieldAcc.getByte(jdkObject)); } else if (rvmFieldType.isCharType()) { bootImage.setFullWord(rvmFieldOffset, jdkFieldAcc.getChar(jdkObject)); } else if (rvmFieldType.isShortType()) { bootImage.setFullWord(rvmFieldOffset, jdkFieldAcc.getShort(jdkObject)); } else if (rvmFieldType.isIntType()) { try { bootImage.setFullWord(rvmFieldOffset, jdkFieldAcc.getInt(jdkObject)); } catch (IllegalArgumentException ex) { System.err.println( "type " + rvmScalarType + ", field " + rvmField); throw ex; } } else if (rvmFieldType.isLongType()) { bootImage.setDoubleWord(rvmFieldOffset, jdkFieldAcc.getLong(jdkObject)); } else if (rvmFieldType.isFloatType()) { float f = jdkFieldAcc.getFloat(jdkObject); bootImage.setFullWord(rvmFieldOffset, Float.floatToIntBits(f)); } else if (rvmFieldType.isDoubleType()) { double d = jdkFieldAcc.getDouble(jdkObject); bootImage.setDoubleWord(rvmFieldOffset, Double.doubleToLongBits(d)); } else if (rvmFieldType.equals(VM_TypeReference.Address) || rvmFieldType.equals(VM_TypeReference.Word) || rvmFieldType.equals(VM_TypeReference.Extent) || rvmFieldType.equals(VM_TypeReference.Offset)) { Object o = jdkFieldAcc.get(jdkObject); String msg = " instance field " + rvmField.toString(); boolean warn = rvmFieldType.equals(VM_TypeReference.Address); bootImage.setAddressWord(rvmFieldOffset, getWordValue(o, msg, warn)); } else { fail("unexpected primitive field type: " + rvmFieldType); } } else { // field is reference type Object value = jdkFieldAcc.get(jdkObject); if (!allocOnly && value != null) { Class jdkClass = jdkFieldAcc.getDeclaringClass(); if (verbose >= 2) traceContext.push(value.getClass().getName(), jdkClass.getName(), jdkFieldAcc.getName()); int imageOffset = copyToBootImage(value, allocOnly, -1, jdkObject); if (imageOffset == OBJECT_NOT_PRESENT) { // object not part of bootimage: install null reference if (verbose >= 2) traceContext.traceObjectNotInBootImage(); bootImage.setNullAddressWord(rvmFieldOffset); } else bootImage.setAddressWord(rvmFieldOffset, bootImageAddress.add(imageOffset).toWord()); if (verbose >= 2) traceContext.pop(); } } } } // // copy object's type information block into image, if it's not there // already // if (!allocOnly) { if (verbose >= 2) traceContext.push("", jdkObject.getClass().getName(), "tib"); int tibImageOffset = copyToBootImage(rvmType.getTypeInformationBlock(), allocOnly, -1, jdkObject); if (verbose >= 2) traceContext.pop(); if (tibImageOffset == OBJECT_NOT_ALLOCATED) fail("can't copy tib for " + jdkObject); Address tibAddress = bootImageAddress.add(tibImageOffset); VM_ObjectModel.setTIB(bootImage, mapEntry.imageOffset, tibAddress, rvmType); } if (verbose >= 2) depth--; return mapEntry.imageOffset; } | 5245 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5245/ea6b401d82469a044d9cebd971fa06a82c817f01/BootImageWriter.java/buggy/rvm/src/tools/bootImageWriter/BootImageWriter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
760,
509,
29817,
15817,
2040,
12,
921,
525,
2883,
921,
16,
4766,
1377,
1250,
4767,
3386,
16,
509,
6156,
2335,
16,
4766,
1377,
1033,
982,
921,
13,
565,
1216,
11900,
565,
288,
1377,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
509,
29817,
15817,
2040,
12,
921,
525,
2883,
921,
16,
4766,
1377,
1250,
4767,
3386,
16,
509,
6156,
2335,
16,
4766,
1377,
1033,
982,
921,
13,
565,
1216,
11900,
565,
288,
1377,
... |
codeMap = new HashMap<String, DefinitionItem>(); | codeMap = map.get(defs.getLanguage()); if (null == codeMap) { codeMap = new HashMap<String, DefinitionItem>(); } | private void loadDefs(Map<String, Map<String, DefinitionItem>> map, List<OntologyDefinitions> list) { if (list == null) { return; } Map<String, DefinitionItem> codeMap = null; for (OntologyDefinitions defs : list) { codeMap = new HashMap<String, DefinitionItem>(); for (DefinitionItem item : defs.getDefinitions()) { codeMap.put(item.getCode(), item); } map.put(defs.getLanguage(), codeMap); } } | 49748 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49748/75b073024a7225053f013a1c40af238e7b3d61c8/ArchetypeOntology.java/clean/libraries/src/java/org/openehr/am/archetype/ontology/ArchetypeOntology.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1262,
14554,
12,
863,
32,
780,
16,
1635,
32,
780,
16,
10849,
1180,
9778,
852,
16,
12900,
987,
32,
51,
19610,
7130,
34,
666,
13,
288,
3639,
309,
261,
1098,
422,
446,
13,
288... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1262,
14554,
12,
863,
32,
780,
16,
1635,
32,
780,
16,
10849,
1180,
9778,
852,
16,
12900,
987,
32,
51,
19610,
7130,
34,
666,
13,
288,
3639,
309,
261,
1098,
422,
446,
13,
288... |
cal.setTimeInMillis( this.file.lastModified()); | cal.setTimeInMillis( lastModDate ); | public Date lastModified() { Calendar cal = Calendar.getInstance(); cal.clear(); cal.setTimeInMillis( this.file.lastModified()); return( cal.getTime() ); } | 50426 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50426/54764303882435a82b212bb0ae8c5352743327a9/CrawlableDatasetFile.java/buggy/cdm/src/main/java/thredds/crawlabledataset/CrawlableDatasetFile.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2167,
12709,
1435,
225,
288,
565,
5542,
1443,
273,
5542,
18,
588,
1442,
5621,
565,
1443,
18,
8507,
5621,
565,
1443,
18,
542,
950,
16620,
12,
1142,
1739,
1626,
11272,
565,
327,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2167,
12709,
1435,
225,
288,
565,
5542,
1443,
273,
5542,
18,
588,
1442,
5621,
565,
1443,
18,
8507,
5621,
565,
1443,
18,
542,
950,
16620,
12,
1142,
1739,
1626,
11272,
565,
327,
12,
... |
public XMLSocketNode(String decoder, Socket socket, Receiver receiver) { | public XMLSocketNode( String decoder, Socket socket, LoggerRepository hierarchy) { | public XMLSocketNode(String decoder, Socket socket, Receiver receiver) { try { Class c = Class.forName(decoder); Object o = c.newInstance(); if (o instanceof Decoder) { this.decoder = (Decoder) o; } } catch (ClassNotFoundException cnfe) { LogLog.warn("Unable to find decoder", cnfe); } catch (IllegalAccessException iae) { LogLog.warn("Unable to construct decoder", iae); } catch (InstantiationException ie) { LogLog.warn("Unable to construct decoder", ie); } this.socket = socket; this.receiver = receiver; } | 45952 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45952/c7f61b55090626e154dca3962283587a3d6009a4/XMLSocketNode.java/buggy/src/java/org/apache/log4j/net/XMLSocketNode.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
3167,
4534,
907,
12,
514,
8320,
16,
8758,
2987,
16,
4242,
3305,
9360,
13,
288,
565,
775,
288,
1377,
1659,
276,
273,
1659,
18,
1884,
461,
12,
21070,
1769,
1377,
1033,
320,
273,
276... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3167,
4534,
907,
12,
514,
8320,
16,
8758,
2987,
16,
4242,
3305,
9360,
13,
288,
565,
775,
288,
1377,
1659,
276,
273,
1659,
18,
1884,
461,
12,
21070,
1769,
1377,
1033,
320,
273,
276... |
System.out.println(ColumnValues[row][0] + " row: " | logger.info(ColumnValues[row][0] + " row: " | public void sortData(int column, final boolean sortascending) { Object[][] ColumnValues = new String [mVecVec.size()][2]; int row; int col; for(row = 0 ; row < mVecVec.size() ; ++row) { ColumnValues[row][0] = (((Vector)mVecVec.elementAt(row)).elementAt(column)); ColumnValues[row][1] = new Integer(row).toString(); } System.out.println("Values before sorting"); for(row = 0; row < ColumnValues.length ; ++row) { System.out.println(ColumnValues[row][0] + " row: " + ColumnValues[row][1]); } QSort sorter = new QSort(new Comparer() { public int compare(Object a, Object b) { int returnValue; try { returnValue = (((String[])a)[0]).compareTo(((String[])b)[0]); } catch (NullPointerException e) { returnValue = 1; } if (!sortascending) returnValue = -1 * returnValue; return returnValue; } }); sorter.sort(ColumnValues); System.out.println("Values after sorting"); for(row = 0; row < ColumnValues.length ; ++row) { System.out.println(ColumnValues[row][0] + " row: " + ColumnValues[row][1]); } Vector SortedVector = new Vector(); for(row = 0; row < ColumnValues.length ; ++row) { Vector thisRow = new Vector(6); Integer OriginalPosition = new Integer((String)ColumnValues[row][1]); for(col = 0; col < ((Vector)mVecVec.elementAt(row)).size(); ++col) { thisRow.addElement(((Vector)mVecVec.elementAt(OriginalPosition.intValue())).elementAt(col)); } SortedVector.addElement(thisRow); } mVecVec = SortedVector; fireTableDataChanged(); } | 7555 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7555/dba8c3b6ca55297114840a7e8d6a99e1d87d27cb/AddressBook.java/clean/grendel/sources/grendel/addressbook/AddressBook.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1524,
751,
12,
474,
1057,
16,
727,
1250,
1524,
3691,
2846,
13,
288,
1377,
1033,
63,
6362,
65,
4753,
1972,
273,
394,
514,
306,
81,
12991,
12991,
18,
1467,
1435,
6362,
22,
1553... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1524,
751,
12,
474,
1057,
16,
727,
1250,
1524,
3691,
2846,
13,
288,
1377,
1033,
63,
6362,
65,
4753,
1972,
273,
394,
514,
306,
81,
12991,
12991,
18,
1467,
1435,
6362,
22,
1553... |
if (rollbackException != null) | if (transaction != null) | public void close() { if (hibernateSession != null) { hibernateSession.flush(); if (transaction != null) { if (rollbackException != null) { rollback(rollbackException); } else { try { transaction.commit(); } catch (HibernateException e) { rollback(e); } } } hibernateSession.close(); } } | 51612 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51612/4d6e29eea5e77f0e063741287b0b333e5e5c97b6/HibernateDatabaseSession.java/clean/wicket-contrib-database/src/java/wicket/contrib/database/hibernate/HibernateDatabaseSession.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1746,
1435,
202,
95,
202,
202,
430,
261,
15769,
22828,
2157,
480,
446,
13,
202,
202,
95,
1082,
202,
15769,
22828,
2157,
18,
11330,
5621,
1082,
202,
430,
261,
7958,
480,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1746,
1435,
202,
95,
202,
202,
430,
261,
15769,
22828,
2157,
480,
446,
13,
202,
202,
95,
1082,
202,
15769,
22828,
2157,
18,
11330,
5621,
1082,
202,
430,
261,
7958,
480,
4... |
RubySymbol classname = RubySymbol.newSymbol(runtime, getMetaClass().getName()); | RubySymbol classname = RubySymbol.newSymbol(getRuntime(), getMetaClass().getName()); | public void marshalTo(MarshalStream output) throws java.io.IOException { output.write('o'); RubySymbol classname = RubySymbol.newSymbol(runtime, getMetaClass().getName()); output.dumpObject(classname); if (getInstanceVariables() == null) { output.dumpInt(0); } else { output.dumpInt(getInstanceVariables().size()); Iterator iter = instanceVariableNames(); while (iter.hasNext()) { String name = (String) iter.next(); IRubyObject value = getInstanceVariable(name); output.dumpObject(RubySymbol.newSymbol(runtime, name)); output.dumpObject(value); } } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubyObject.java/clean/src/org/jruby/RubyObject.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
10893,
774,
12,
8105,
1228,
876,
13,
1216,
2252,
18,
1594,
18,
14106,
288,
3639,
876,
18,
2626,
2668,
83,
8284,
3639,
19817,
5335,
7479,
273,
19817,
5335,
18,
2704,
5335,
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,
10893,
774,
12,
8105,
1228,
876,
13,
1216,
2252,
18,
1594,
18,
14106,
288,
3639,
876,
18,
2626,
2668,
83,
8284,
3639,
19817,
5335,
7479,
273,
19817,
5335,
18,
2704,
5335,
12,
... |
y - daMinor[k] ) ); | y + iDirection * daMinor[k] ) ); | public final void renderEachAxis( IPrimitiveRenderer ipr, Plot pl, OneAxis ax, int iWhatToDraw ) throws ChartException { final RunTimeContext rtc = getRunTimeContext( ); final Axis axModel = ax.getModelAxis( ); final PlotWithAxes pwa = (PlotWithAxes) getComputations( ); final Insets insCA = pwa.getAxes( ).getInsets( ); final ScriptHandler sh = getRunTimeContext( ).getScriptHandler( ); final double dLocation = ax.getAxisCoordinate( ); final AutoScale sc = ax.getScale( ); final IntersectionValue iv = ax.getIntersectionValue( ); final int iMajorTickStyle = ax.getGrid( ) .getTickStyle( IConstants.MAJOR ); final int iMinorTickStyle = ax.getGrid( ) .getTickStyle( IConstants.MINOR ); final int iLabelLocation = ax.getLabelPosition( ); final int iOrientation = ax.getOrientation( ); final IDisplayServer xs = this.getDevice( ).getDisplayServer( ); Label la = LabelImpl.copyInstance( ax.getLabel( ) ); final double[] daEndPoints = sc.getEndPoints( ); final double[] da = sc.getTickCordinates( ); final double[] daMinor = sc.getMinorCoordinates( ax.getGrid( ) .getMinorCountPerMajor( ) ); String sText = null; final int iDimension = pwa.getDimension( ); final double dSeriesThickness = pwa.getSeriesThickness( ); final NumberDataElement nde = NumberDataElementImpl.create( 0 ); final FormatSpecifier fs = ax.getModelAxis( ).getFormatSpecifier( ); final double dStaggeredLabelOffset = sc.computeStaggeredAxisLabelOffset( xs, la, iOrientation ); final boolean bAxisLabelStaggered = sc.isAxisLabelStaggered( ); DecimalFormat df = null; final LineAttributes lia = ax.getLineAttributes( ); final LineAttributes liaMajorTick = ax.getGrid( ) .getTickAttributes( IConstants.MAJOR ); final LineAttributes liaMinorTick = ax.getGrid( ) .getTickAttributes( IConstants.MINOR ); if ( !lia.isSetVisible( ) ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, "exception.unset.axis.visibility", //$NON-NLS-1$ ResourceBundle.getBundle( Messages.ENGINE, getRunTimeContext( ).getULocale( ).toLocale( ) ) ); } final boolean bRenderAxisLabels = ( ( iWhatToDraw & IConstants.LABELS ) == IConstants.LABELS && la.isVisible( ) ); final boolean bRenderAxisTitle = ( ( iWhatToDraw & IConstants.LABELS ) == IConstants.LABELS ); Location lo = LocationImpl.create( 0, 0 ); final TransformationEvent trae = (TransformationEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), TransformationEvent.class ); final TextRenderEvent tre = (TextRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), TextRenderEvent.class ); tre.setLabel( la ); tre.setTextPosition( iLabelLocation ); tre.setLocation( lo ); final LineRenderEvent lre = (LineRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), LineRenderEvent.class ); lre.setLineAttributes( lia ); lre.setStart( LocationImpl.create( 0, 0 ) ); lre.setEnd( LocationImpl.create( 0, 0 ) ); // Prepare 3D rendering variables. final boolean bRendering3D = iDimension == IConstants.THREE_D; final boolean bRenderOrthogonal3DAxis = ( iWhatToDraw & IConstants.ORTHOGONAL_AXIS ) == IConstants.ORTHOGONAL_AXIS && bRendering3D; final boolean bRenderBase3DAxis = ( iWhatToDraw & IConstants.BASE_AXIS ) == IConstants.BASE_AXIS && bRendering3D; final boolean bRenderAncillary3DAxis = ( iWhatToDraw & IConstants.ANCILLARY_AXIS ) == IConstants.ANCILLARY_AXIS && bRendering3D; final DeferredCache dc = getDeferredCache( ); final int axisType = ax.getAxisType( ); final Bounds boPlot = getPlotBounds( ); final boolean bTransposed = ( (ChartWithAxes) getModel( ) ).isTransposed( ); double[] daEndPoints3D = null; double[] da3D = null; Location3D lo3d = null; Text3DRenderEvent t3dre = null; Line3DRenderEvent l3dre = null; double dXStart = 0; double dZStart = 0; double dXEnd = 0; double dZEnd = 0; if ( iDimension == IConstants.THREE_D ) { AllAxes aax = pwa.getAxes( ); dXEnd = aax.getPrimaryBase( ).getScale( ).getEnd( ); dZEnd = aax.getAncillaryBase( ).getScale( ).getEnd( ); dXStart = aax.getPrimaryBase( ).getScale( ).getStart( ); dZStart = aax.getAncillaryBase( ).getScale( ).getStart( ); daEndPoints3D = sc.getEndPoints( ); da3D = sc.getTickCordinates( ); lo3d = Location3DImpl.create( 0, 0, 0 ); t3dre = (Text3DRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), Text3DRenderEvent.class ); t3dre.setLabel( la ); t3dre.setAction( Text3DRenderEvent.RENDER_TEXT_AT_LOCATION ); t3dre.setTextPosition( iLabelLocation ); t3dre.setLocation3D( lo3d ); l3dre = (Line3DRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), Line3DRenderEvent.class ); l3dre.setLineAttributes( lia ); l3dre.setStart3D( Location3DImpl.create( 0, 0, 0 ) ); l3dre.setEnd3D( Location3DImpl.create( 0, 0, 0 ) ); } if ( iOrientation == IConstants.VERTICAL ) { int y; int y3d = 0; double dX = dLocation; double dZ = 0; if ( bRendering3D ) { Location3D l3d = ax.getAxisCoordinate3D( ); dX = l3d.getX( ); dZ = l3d.getZ( ); } if ( iv != null && iv.getType( ) == IntersectionValue.MAX && iDimension == IConstants.TWO_5_D ) { trae.setTransform( TransformationEvent.TRANSLATE ); trae.setTranslation( dSeriesThickness, -dSeriesThickness ); ipr.applyTransformation( trae ); } double dXTick1 = ( ( iMajorTickStyle & IConstants.TICK_LEFT ) == IConstants.TICK_LEFT ) ? ( dX - IConstants.TICK_SIZE ) : dX; double dXTick2 = ( ( iMajorTickStyle & IConstants.TICK_RIGHT ) == IConstants.TICK_RIGHT ) ? dX + IConstants.TICK_SIZE : dX; if ( ( iWhatToDraw & IConstants.AXIS ) == IConstants.AXIS && lia.isVisible( ) ) { if ( bRenderOrthogonal3DAxis ) { final double dStart = daEndPoints3D[0]; final double dEnd = daEndPoints3D[1]; l3dre.setLineAttributes( lia ); // center l3dre.setStart3D( dX, dStart, dZ ); l3dre.setEnd3D( dX, dEnd, dZ ); dc.addLine( l3dre ); // left l3dre.setStart3D( dX, dStart, dZEnd ); l3dre.setEnd3D( dX, dEnd, dZEnd ); dc.addLine( l3dre ); // right l3dre.setStart3D( dXEnd, dStart, dZ ); l3dre.setEnd3D( dXEnd, dEnd, dZ ); dc.addLine( l3dre ); if ( isInteractivityEnabled( ) ) { Trigger tg; EList elTriggers = axModel.getTriggers( ); if ( !elTriggers.isEmpty( ) ) { ArrayList cachedTriggers = null; Location3D[] loaHotspot = new Location3D[4]; Polygon3DRenderEvent pre3d = (Polygon3DRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), Polygon3DRenderEvent.class ); // process center y-axis. loaHotspot[0] = Location3DImpl.create( dX - IConstants.LINE_EXPAND_DOUBLE_SIZE, dStart, dZ + IConstants.LINE_EXPAND_DOUBLE_SIZE ); loaHotspot[1] = Location3DImpl.create( dX + IConstants.LINE_EXPAND_DOUBLE_SIZE, dStart, dZ - IConstants.LINE_EXPAND_DOUBLE_SIZE ); loaHotspot[2] = Location3DImpl.create( dX + IConstants.LINE_EXPAND_DOUBLE_SIZE, dEnd, dZ - IConstants.LINE_EXPAND_DOUBLE_SIZE ); loaHotspot[3] = Location3DImpl.create( dX - IConstants.LINE_EXPAND_DOUBLE_SIZE, dEnd, dZ + IConstants.LINE_EXPAND_DOUBLE_SIZE ); pre3d.setPoints3D( loaHotspot ); pre3d.setDoubleSided( true ); if ( get3DEngine( ).processEvent( pre3d, boPlot.getLeft( ), boPlot.getTop( ) ) != null ) { final InteractionEvent iev = (InteractionEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), InteractionEvent.class ); cachedTriggers = new ArrayList( ); for ( int t = 0; t < elTriggers.size( ); t++ ) { tg = TriggerImpl.copyInstance( (Trigger) elTriggers.get( t ) ); processTrigger( tg, StructureSource.createAxis( axModel ) ); cachedTriggers.add( tg ); iev.addTrigger( TriggerImpl.copyInstance( tg ) ); } iev.setHotSpot( pre3d ); ipr.enableInteraction( iev ); } // process left y-axis. pre3d = (Polygon3DRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), Polygon3DRenderEvent.class ); loaHotspot = new Location3D[4]; loaHotspot[0] = Location3DImpl.create( dXStart - IConstants.LINE_EXPAND_DOUBLE_SIZE, dStart, dZEnd + IConstants.LINE_EXPAND_DOUBLE_SIZE ); loaHotspot[1] = Location3DImpl.create( dXStart + IConstants.LINE_EXPAND_DOUBLE_SIZE, dStart, dZEnd - IConstants.LINE_EXPAND_DOUBLE_SIZE ); loaHotspot[2] = Location3DImpl.create( dXStart + IConstants.LINE_EXPAND_DOUBLE_SIZE, dEnd, dZEnd - IConstants.LINE_EXPAND_DOUBLE_SIZE ); loaHotspot[3] = Location3DImpl.create( dXStart - IConstants.LINE_EXPAND_DOUBLE_SIZE, dEnd, dZEnd + IConstants.LINE_EXPAND_DOUBLE_SIZE ); pre3d.setPoints3D( loaHotspot ); pre3d.setDoubleSided( true ); if ( get3DEngine( ).processEvent( pre3d, boPlot.getLeft( ), boPlot.getTop( ) ) != null ) { final InteractionEvent iev = (InteractionEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), InteractionEvent.class ); if ( cachedTriggers == null ) { cachedTriggers = new ArrayList( ); for ( int t = 0; t < elTriggers.size( ); t++ ) { tg = TriggerImpl.copyInstance( (Trigger) elTriggers.get( t ) ); processTrigger( tg, StructureSource.createAxis( axModel ) ); cachedTriggers.add( tg ); iev.addTrigger( TriggerImpl.copyInstance( tg ) ); } } else { for ( int t = 0; t < cachedTriggers.size( ); t++ ) { iev.addTrigger( TriggerImpl.copyInstance( (Trigger) cachedTriggers.get( t ) ) ); } } iev.setHotSpot( pre3d ); ipr.enableInteraction( iev ); } // process right y-axis. pre3d = (Polygon3DRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), Polygon3DRenderEvent.class ); loaHotspot = new Location3D[4]; loaHotspot[0] = Location3DImpl.create( dXEnd - IConstants.LINE_EXPAND_DOUBLE_SIZE, dStart, dZStart + IConstants.LINE_EXPAND_DOUBLE_SIZE ); loaHotspot[1] = Location3DImpl.create( dXEnd + IConstants.LINE_EXPAND_DOUBLE_SIZE, dStart, dZStart - IConstants.LINE_EXPAND_DOUBLE_SIZE ); loaHotspot[2] = Location3DImpl.create( dXEnd + IConstants.LINE_EXPAND_DOUBLE_SIZE, dEnd, dZStart - IConstants.LINE_EXPAND_DOUBLE_SIZE ); loaHotspot[3] = Location3DImpl.create( dXEnd - IConstants.LINE_EXPAND_DOUBLE_SIZE, dEnd, dZStart + IConstants.LINE_EXPAND_DOUBLE_SIZE ); pre3d.setPoints3D( loaHotspot ); pre3d.setDoubleSided( true ); if ( get3DEngine( ).processEvent( pre3d, boPlot.getLeft( ), boPlot.getTop( ) ) != null ) { final InteractionEvent iev = (InteractionEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), InteractionEvent.class ); if ( cachedTriggers == null ) { for ( int t = 0; t < elTriggers.size( ); t++ ) { tg = TriggerImpl.copyInstance( (Trigger) elTriggers.get( t ) ); processTrigger( tg, StructureSource.createAxis( axModel ) ); iev.addTrigger( tg ); } } else { for ( int t = 0; t < cachedTriggers.size( ); t++ ) { iev.addTrigger( (Trigger) cachedTriggers.get( t ) ); } } iev.setHotSpot( pre3d ); ipr.enableInteraction( iev ); } } } } else { double dStart = daEndPoints[0] + insCA.getBottom( ), dEnd = daEndPoints[1] - insCA.getTop( ); if ( sc.getDirection( ) == IConstants.FORWARD ) { dStart = daEndPoints[1] + insCA.getBottom( ); dEnd = daEndPoints[0] - insCA.getTop( ); } if ( iv != null && iv.getType( ) == IntersectionValue.VALUE && iDimension == IConstants.TWO_5_D ) { final Location[] loa = new Location[4]; loa[0] = LocationImpl.create( dX, dStart ); loa[1] = LocationImpl.create( dX + dSeriesThickness, dStart - dSeriesThickness ); loa[2] = LocationImpl.create( dX + dSeriesThickness, dEnd - dSeriesThickness ); loa[3] = LocationImpl.create( dX, dEnd ); final PolygonRenderEvent pre = (PolygonRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), PolygonRenderEvent.class ); pre.setPoints( loa ); pre.setBackground( ColorDefinitionImpl.create( 255, 255, 255, 127 ) ); pre.setOutline( lia ); ipr.fillPolygon( pre ); } lre.setLineAttributes( lia ); lre.getStart( ).set( dX, dStart ); lre.getEnd( ).set( dX, dEnd ); ipr.drawLine( lre ); if ( isInteractivityEnabled( ) ) { Trigger tg; EList elTriggers = axModel.getTriggers( ); if ( !elTriggers.isEmpty( ) ) { final InteractionEvent iev = (InteractionEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), InteractionEvent.class ); for ( int t = 0; t < elTriggers.size( ); t++ ) { tg = TriggerImpl.copyInstance( (Trigger) elTriggers.get( t ) ); processTrigger( tg, StructureSource.createAxis( axModel ) ); iev.addTrigger( tg ); } Location[] loaHotspot = new Location[4]; loaHotspot[0] = LocationImpl.create( dX - IConstants.LINE_EXPAND_SIZE, dStart ); loaHotspot[1] = LocationImpl.create( dX + IConstants.LINE_EXPAND_SIZE, dStart ); loaHotspot[2] = LocationImpl.create( dX + IConstants.LINE_EXPAND_SIZE, dEnd ); loaHotspot[3] = LocationImpl.create( dX - IConstants.LINE_EXPAND_SIZE, dEnd ); final PolygonRenderEvent pre = (PolygonRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), PolygonRenderEvent.class ); pre.setPoints( loaHotspot ); iev.setHotSpot( pre ); ipr.enableInteraction( iev ); } } } } if ( ( sc.getType( ) & IConstants.TEXT ) == IConstants.TEXT || sc.isCategoryScale( ) ) { final int iDirection = sc.getDirection( ); // double dUnitSize = sc.getUnitSize( ); final double dUnitSize = ( iDirection == IConstants.BACKWARD || ( iDirection == IConstants.AUTO && bTransposed ) ) ? -sc.getUnitSize( ) : sc.getUnitSize( ); final double dOffset = dUnitSize / 2; DataSetIterator dsi = sc.getData( ); final int iDateTimeUnit = ( sc.getType( ) == IConstants.DATE_TIME ) ? CDateTime.computeUnit( dsi ) : IConstants.UNDEFINED; final ITextMetrics itmText = xs.getTextMetrics( la ); double x = ( iLabelLocation == IConstants.LEFT ) ? dXTick1 - 1 : dXTick2 + 1; dsi.reset( ); for ( int i = 0; i < da.length - 1; i++ ) { if ( bRenderAxisLabels ) { la.getCaption( ) .setValue( sc.formatCategoryValue( sc.getType( ), dsi.next( ), iDateTimeUnit ) ); if ( sc.isTickLabelVisible( i ) ) { ScriptHandler.callFunction( sh, ScriptHandler.BEFORE_DRAW_AXIS_LABEL, axModel, la, getRunTimeContext( ).getScriptContext( ) ); getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.BEFORE_DRAW_AXIS_LABEL, la ); itmText.reuse( la ); // RECYCLED } } y = (int) da[i]; if ( bRendering3D ) { y3d = (int) da3D[i]; } if ( ( iWhatToDraw & IConstants.AXIS ) == IConstants.AXIS ) { double dXMinorTick1 = ( ( iMinorTickStyle & IConstants.TICK_LEFT ) == IConstants.TICK_LEFT ) ? ( dX - IConstants.TICK_SIZE ) : dX; double dXMinorTick2 = ( ( iMinorTickStyle & IConstants.TICK_RIGHT ) == IConstants.TICK_RIGHT ) ? dX + IConstants.TICK_SIZE : dX; if ( dXMinorTick1 != dXMinorTick2 ) { // RENDER THE MINOR TICKS FIRST (For ALL but the // last Major tick) if ( i != da.length - 1 ) { if ( bRenderOrthogonal3DAxis ) { Line3DRenderEvent l3dreMinor = null; for ( int k = 0; k < daMinor.length - 1; k++ ) { l3dreMinor = (Line3DRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), Line3DRenderEvent.class ); l3dreMinor.setLineAttributes( liaMinorTick ); l3dreMinor.setStart3D( Location3DImpl.create( dXMinorTick1, y3d + daMinor[k], dZ ) ); l3dreMinor.setEnd3D( Location3DImpl.create( dXMinorTick2, y3d + daMinor[k], dZ ) ); dc.addLine( l3dreMinor ); } } else { LineRenderEvent lreMinor = null; for ( int k = 0; k < daMinor.length - 1; k++ ) { lreMinor = (LineRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), LineRenderEvent.class ); lreMinor.setLineAttributes( liaMinorTick ); lreMinor.setStart( LocationImpl.create( dXMinorTick1, y - daMinor[k] ) ); lreMinor.setEnd( LocationImpl.create( dXMinorTick2, y - daMinor[k] ) ); ipr.drawLine( lreMinor ); } } } } if ( dXTick1 != dXTick2 ) { if ( bRenderOrthogonal3DAxis ) { l3dre.setLineAttributes( liaMajorTick ); l3dre.setStart3D( dXTick1, y3d, dZ ); l3dre.setEnd3D( dXTick2, y3d, dZ ); dc.addLine( l3dre ); } else { lre.setLineAttributes( liaMajorTick ); lre.getStart( ).set( dXTick1, y ); lre.getEnd( ).set( dXTick2, y ); ipr.drawLine( lre ); } if ( iv != null && iDimension == IConstants.TWO_5_D && iv.getType( ) == IntersectionValue.VALUE ) { lre.setStart( LocationImpl.create( dX, y ) ); lre.setEnd( LocationImpl.create( dX + dSeriesThickness, y - dSeriesThickness ) ); ipr.drawLine( lre ); } } } if ( bRenderAxisLabels && sc.isTickLabelVisible( i ) ) { double sx = x; double sx2 = dXEnd; if ( bAxisLabelStaggered && sc.isTickLabelStaggered( i ) ) { if ( iLabelLocation == IConstants.LEFT ) { sx -= dStaggeredLabelOffset; sx2 -= dStaggeredLabelOffset; } else { sx += dStaggeredLabelOffset; sx2 += dStaggeredLabelOffset; } } if ( ax.getLabel( ).isVisible( ) ) { if ( bRendering3D ) { // Left wall lo3d.set( sx - pwa.getHorizontalSpacingInPixels( ), y3d + dOffset, dZEnd + pwa.getHorizontalSpacingInPixels( ) ); t3dre.setLocation3D( lo3d ); t3dre.setTextPosition( TextRenderEvent.LEFT ); t3dre.setAction( TextRenderEvent.RENDER_TEXT_AT_LOCATION ); dc.addLabel( t3dre ); // Right wall lo3d.set( sx2 + pwa.getHorizontalSpacingInPixels( ), y3d + dOffset, dZ - pwa.getHorizontalSpacingInPixels( ) ); t3dre.setLocation3D( lo3d ); t3dre.setTextPosition( TextRenderEvent.RIGHT ); t3dre.setAction( TextRenderEvent.RENDER_TEXT_AT_LOCATION ); dc.addLabel( t3dre ); } else { lo.set( sx, y + dOffset ); tre.setAction( TextRenderEvent.RENDER_TEXT_AT_LOCATION ); ipr.drawText( tre ); } } ScriptHandler.callFunction( sh, ScriptHandler.AFTER_DRAW_AXIS_LABEL, axModel, la, getRunTimeContext( ).getScriptContext( ) ); getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.AFTER_DRAW_AXIS_LABEL, la ); } } y = (int) da[da.length - 1]; if ( bRendering3D ) { y3d = (int) da3D[da3D.length - 1]; } if ( dXTick1 != dXTick2 ) { if ( bRenderOrthogonal3DAxis ) { l3dre.setLineAttributes( liaMajorTick ); l3dre.setStart3D( dXTick1, y3d, dZ ); l3dre.setEnd3D( dXTick2, y3d, dZ ); dc.addLine( l3dre ); } else { lre.setLineAttributes( liaMajorTick ); lre.getStart( ).set( dXTick1, y ); lre.getEnd( ).set( dXTick2, y ); ipr.drawLine( lre ); } if ( iv != null && iDimension == IConstants.TWO_5_D && iv.getType( ) == IntersectionValue.VALUE ) { lre.setStart( LocationImpl.create( dX, y ) ); lre.setEnd( LocationImpl.create( dX + dSeriesThickness, y - dSeriesThickness ) ); ipr.drawLine( lre ); } } itmText.dispose( );// DISPOSED } else if ( ( sc.getType( ) & IConstants.LOGARITHMIC ) == IConstants.LOGARITHMIC ) { double dAxisValue = Methods.asDouble( sc.getMinimum( ) ) .doubleValue( ); final double dAxisStep = Methods.asDouble( sc.getStep( ) ) .doubleValue( ); dAxisValue = Methods.asDouble( sc.getMinimum( ) ).doubleValue( ); // RESET double x = ( iLabelLocation == IConstants.LEFT ) ? dXTick1 - 1 : dXTick2 + 1; for ( int i = 0; i < da.length; i++ ) { if ( bRenderAxisLabels ) // PERFORM COMPUTATIONS ONLY IF // AXIS LABEL IS VISIBLE { if ( fs == null ) { df = new DecimalFormat( sc.getNumericPattern( dAxisValue ) ); } nde.setValue( dAxisValue ); try { sText = ValueFormatter.format( nde, fs, ax.getRunTimeContext( ).getULocale( ), df ); } catch ( ChartException dfex ) { logger.log( dfex ); sText = IConstants.NULL_STRING; } } y = (int) da[i]; if ( bRendering3D ) { y3d = (int) da3D[i]; } if ( ( iWhatToDraw & IConstants.AXIS ) == IConstants.AXIS ) { double dXMinorTick1 = ( ( iMinorTickStyle & IConstants.TICK_LEFT ) == IConstants.TICK_LEFT ) ? ( dX - IConstants.TICK_SIZE ) : dX; double dXMinorTick2 = ( ( iMinorTickStyle & IConstants.TICK_RIGHT ) == IConstants.TICK_RIGHT ) ? dX + IConstants.TICK_SIZE : dX; if ( dXMinorTick1 != dXMinorTick2 ) { // RENDER THE MINOR TICKS FIRST (For ALL but the // last Major tick) if ( i != da.length - 1 ) { if ( bRenderOrthogonal3DAxis ) { Line3DRenderEvent l3dreMinor = null; for ( int k = 0; k < daMinor.length - 1; k++ ) { l3dreMinor = (Line3DRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), Line3DRenderEvent.class ); l3dreMinor.setLineAttributes( liaMinorTick ); l3dreMinor.setStart3D( Location3DImpl.create( dXMinorTick1, y3d + daMinor[k], dZ ) ); l3dreMinor.setEnd3D( Location3DImpl.create( dXMinorTick2, y3d + daMinor[k], dZ ) ); dc.addLine( l3dreMinor ); } } else { LineRenderEvent lreMinor = null; for ( int k = 0; k < daMinor.length - 1; k++ ) { lreMinor = (LineRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), LineRenderEvent.class ); lreMinor.setLineAttributes( liaMinorTick ); lreMinor.setStart( LocationImpl.create( dXMinorTick1, y - daMinor[k] ) ); lreMinor.setEnd( LocationImpl.create( dXMinorTick2, y - daMinor[k] ) ); ipr.drawLine( lreMinor ); } } } } if ( dXTick1 != dXTick2 ) { if ( bRenderOrthogonal3DAxis ) { l3dre.setLineAttributes( liaMajorTick ); l3dre.setStart3D( dXTick1, y3d, dZ ); l3dre.setEnd3D( dXTick2, y3d, dZ ); dc.addLine( l3dre ); } else { lre.setLineAttributes( liaMajorTick ); lre.getStart( ).set( dXTick1, y ); lre.getEnd( ).set( dXTick2, y ); ipr.drawLine( lre ); } if ( iv != null && iDimension == IConstants.TWO_5_D && iv.getType( ) == IntersectionValue.VALUE ) { lre.setLineAttributes( lia ); lre.setStart( LocationImpl.create( dX, y ) ); lre.setEnd( LocationImpl.create( dX + dSeriesThickness, y - dSeriesThickness ) ); ipr.drawLine( lre ); } } } // RENDER LABELS ONLY IF REQUESTED if ( bRenderAxisLabels && sc.isTickLabelVisible( i ) ) { double sx = x; double sx2 = dXEnd; if ( bAxisLabelStaggered && sc.isTickLabelStaggered( i ) ) { if ( iLabelLocation == IConstants.LEFT ) { sx -= dStaggeredLabelOffset; sx2 -= dStaggeredLabelOffset; } else { sx += dStaggeredLabelOffset; sx2 += dStaggeredLabelOffset; } } ScriptHandler.callFunction( sh, ScriptHandler.BEFORE_DRAW_AXIS_LABEL, axModel, la, getRunTimeContext( ).getScriptContext( ) ); getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.BEFORE_DRAW_AXIS_LABEL, la ); if ( ax.getLabel( ).isVisible( ) ) { if ( bRendering3D ) { // Left wall lo3d.set( sx - pwa.getHorizontalSpacingInPixels( ), y3d, dZEnd + pwa.getHorizontalSpacingInPixels( ) ); la.getCaption( ).setValue( sText ); t3dre.setLocation3D( lo3d ); t3dre.setTextPosition( TextRenderEvent.LEFT ); t3dre.setAction( TextRenderEvent.RENDER_TEXT_AT_LOCATION ); dc.addLabel( t3dre ); // Right wall lo3d.set( sx2 + pwa.getHorizontalSpacingInPixels( ), y3d, dZ - pwa.getHorizontalSpacingInPixels( ) ); la.getCaption( ).setValue( sText ); t3dre.setLocation3D( lo3d ); t3dre.setTextPosition( TextRenderEvent.RIGHT ); t3dre.setAction( TextRenderEvent.RENDER_TEXT_AT_LOCATION ); dc.addLabel( t3dre ); } else { lo.set( sx, y ); la.getCaption( ).setValue( sText ); tre.setAction( TextRenderEvent.RENDER_TEXT_AT_LOCATION ); ipr.drawText( tre ); } } ScriptHandler.callFunction( sh, ScriptHandler.AFTER_DRAW_AXIS_LABEL, axModel, la, getRunTimeContext( ).getScriptContext( ) ); getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.AFTER_DRAW_AXIS_LABEL, la ); } dAxisValue *= dAxisStep; } } else if ( ( sc.getType( ) & IConstants.LINEAR ) == IConstants.LINEAR ) { double dAxisValue = Methods.asDouble( sc.getMinimum( ) ) .doubleValue( ); final double dAxisStep = Methods.asDouble( sc.getStep( ) ) .doubleValue( ); if ( fs == null ) { df = new DecimalFormat( sc.getNumericPattern( ) ); } dAxisValue = Methods.asDouble( sc.getMinimum( ) ).doubleValue( ); // RESET double x = ( iLabelLocation == IConstants.LEFT ) ? dXTick1 - 1 : dXTick2 + 1; for ( int i = 0; i < da.length; i++ ) { nde.setValue( dAxisValue ); try { sText = ValueFormatter.format( nde, fs, ax.getRunTimeContext( ).getULocale( ), df ); } catch ( ChartException dfex ) { logger.log( dfex ); sText = IConstants.NULL_STRING; } y = (int) da[i]; if ( bRendering3D ) { y3d = (int) da3D[i]; } if ( ( iWhatToDraw & IConstants.AXIS ) == IConstants.AXIS ) { double dXMinorTick1 = ( ( iMinorTickStyle & IConstants.TICK_LEFT ) == IConstants.TICK_LEFT ) ? ( dX - IConstants.TICK_SIZE ) : dX, dXMinorTick2 = ( ( iMinorTickStyle & IConstants.TICK_RIGHT ) == IConstants.TICK_RIGHT ) ? dX + IConstants.TICK_SIZE : dX; if ( dXMinorTick1 != dXMinorTick2 ) { // RENDER THE MINOR TICKS FIRST (For ALL but the // last Major tick) if ( i != da.length - 1 ) { if ( bRenderOrthogonal3DAxis ) { Line3DRenderEvent l3dreMinor = null; for ( int k = 0; k < daMinor.length - 1; k++ ) { l3dreMinor = (Line3DRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), Line3DRenderEvent.class ); l3dreMinor.setLineAttributes( liaMinorTick ); l3dreMinor.setStart3D( Location3DImpl.create( dXMinorTick1, y3d + daMinor[k], dZ ) ); l3dreMinor.setEnd3D( Location3DImpl.create( dXMinorTick2, y3d + daMinor[k], dZ ) ); dc.addLine( l3dreMinor ); } } else { LineRenderEvent lreMinor = null; for ( int k = 0; k < daMinor.length - 1; k++ ) { lreMinor = (LineRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), LineRenderEvent.class ); lreMinor.setLineAttributes( liaMinorTick ); lreMinor.setStart( LocationImpl.create( dXMinorTick1, y - daMinor[k] ) ); lreMinor.setEnd( LocationImpl.create( dXMinorTick2, y - daMinor[k] ) ); ipr.drawLine( lreMinor ); } } } } if ( dXTick1 != dXTick2 ) { if ( bRenderOrthogonal3DAxis ) { l3dre.setLineAttributes( liaMajorTick ); l3dre.setStart3D( dXTick1, y3d, dZ ); l3dre.setEnd3D( dXTick2, y3d, dZ ); dc.addLine( l3dre ); } else { lre.setLineAttributes( liaMajorTick ); lre.getStart( ).set( dXTick1, y ); lre.getEnd( ).set( dXTick2, y ); ipr.drawLine( lre ); } if ( iv != null && iDimension == IConstants.TWO_5_D && iv.getType( ) == IntersectionValue.VALUE ) { lre.setLineAttributes( lia ); lre.setStart( LocationImpl.create( dX, y ) ); lre.setEnd( LocationImpl.create( dX + dSeriesThickness, y - dSeriesThickness ) ); ipr.drawLine( lre ); } } } if ( bRenderAxisLabels && sc.isTickLabelVisible( i ) ) { double sx = x; double sx2 = dXEnd; if ( bAxisLabelStaggered && sc.isTickLabelStaggered( i ) ) { if ( iLabelLocation == IConstants.LEFT ) { sx -= dStaggeredLabelOffset; sx2 -= dStaggeredLabelOffset; } else { sx += dStaggeredLabelOffset; sx2 += dStaggeredLabelOffset; } } ScriptHandler.callFunction( sh, ScriptHandler.BEFORE_DRAW_AXIS_LABEL, axModel, la, getRunTimeContext( ).getScriptContext( ) ); getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.BEFORE_DRAW_AXIS_LABEL, la ); if ( ax.getLabel( ).isVisible( ) ) { if ( bRendering3D ) { // Left wall lo3d.set( sx - pwa.getHorizontalSpacingInPixels( ), y3d, dZEnd + pwa.getHorizontalSpacingInPixels( ) ); la.getCaption( ).setValue( sText ); t3dre.setLocation3D( lo3d ); t3dre.setTextPosition( TextRenderEvent.LEFT ); t3dre.setAction( TextRenderEvent.RENDER_TEXT_AT_LOCATION ); dc.addLabel( t3dre ); // Right wall lo3d.set( sx2 + pwa.getHorizontalSpacingInPixels( ), y3d, dZ - pwa.getHorizontalSpacingInPixels( ) ); la.getCaption( ).setValue( sText ); t3dre.setLocation3D( lo3d ); t3dre.setTextPosition( TextRenderEvent.RIGHT ); t3dre.setAction( TextRenderEvent.RENDER_TEXT_AT_LOCATION ); dc.addLabel( t3dre ); } else { lo.set( sx, y ); la.getCaption( ).setValue( sText ); tre.setAction( TextRenderEvent.RENDER_TEXT_AT_LOCATION ); ipr.drawText( tre ); } } ScriptHandler.callFunction( sh, ScriptHandler.AFTER_DRAW_AXIS_LABEL, axModel, la, getRunTimeContext( ).getScriptContext( ) ); getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.AFTER_DRAW_AXIS_LABEL, la ); } dAxisValue += dAxisStep; } } else if ( ( sc.getType( ) & IConstants.DATE_TIME ) == IConstants.DATE_TIME ) { CDateTime cdt, cdtAxisValue = Methods.asDateTime( sc.getMinimum( ) ); final int iUnit = Methods.asInteger( sc.getUnit( ) ); final int iStep = Methods.asInteger( sc.getStep( ) ); SimpleDateFormat sdf = null; if ( fs == null ) { sdf = new SimpleDateFormat( CDateTime.getPreferredFormat( iUnit ) ); } cdt = cdtAxisValue; double x = ( iLabelLocation == IConstants.LEFT ) ? dXTick1 - 1 : dXTick2 + 1; for ( int i = 0; i < da.length; i++ ) { try { sText = ValueFormatter.format( cdt, ax.getFormatSpecifier( ), ax.getRunTimeContext( ).getULocale( ), sdf ); } catch ( ChartException dfex ) { logger.log( dfex ); sText = IConstants.NULL_STRING; } y = (int) da[i]; if ( bRendering3D ) { y3d = (int) da3D[i]; } if ( ( iWhatToDraw & IConstants.AXIS ) == IConstants.AXIS ) { double dXMinorTick1 = ( ( iMinorTickStyle & IConstants.TICK_LEFT ) == IConstants.TICK_LEFT ) ? ( dX - IConstants.TICK_SIZE ) : dX, dXMinorTick2 = ( ( iMinorTickStyle & IConstants.TICK_RIGHT ) == IConstants.TICK_RIGHT ) ? dX + IConstants.TICK_SIZE : dX; if ( dXMinorTick1 != dXMinorTick2 ) { // RENDER THE MINOR TICKS FIRST (For ALL but the // last Major tick) if ( i != da.length - 1 ) { if ( bRenderOrthogonal3DAxis ) { Line3DRenderEvent l3dreMinor = null; for ( int k = 0; k < daMinor.length - 1; k++ ) { l3dreMinor = (Line3DRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), Line3DRenderEvent.class ); l3dreMinor.setLineAttributes( liaMinorTick ); l3dreMinor.setStart3D( Location3DImpl.create( dXMinorTick1, y3d + daMinor[k], dZ ) ); l3dreMinor.setEnd3D( Location3DImpl.create( dXMinorTick2, y3d + daMinor[k], dZ ) ); dc.addLine( l3dreMinor ); } } else { LineRenderEvent lreMinor = null; for ( int k = 0; k < daMinor.length - 1; k++ ) { lreMinor = (LineRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), LineRenderEvent.class ); lreMinor.setLineAttributes( liaMinorTick ); lreMinor.setStart( LocationImpl.create( dXMinorTick1, y - daMinor[k] ) ); lreMinor.setEnd( LocationImpl.create( dXMinorTick2, y - daMinor[k] ) ); ipr.drawLine( lreMinor ); } } } } if ( dXTick1 != dXTick2 ) { if ( bRenderOrthogonal3DAxis ) { l3dre.setLineAttributes( liaMajorTick ); l3dre.setStart3D( dXTick1, y3d, dZ ); l3dre.setEnd3D( dXTick2, y3d, dZ ); dc.addLine( l3dre ); } else { lre.setLineAttributes( liaMajorTick ); lre.getStart( ).set( dXTick1, y ); lre.getEnd( ).set( dXTick2, y ); ipr.drawLine( lre ); } if ( iv != null && iDimension == IConstants.TWO_5_D && iv.getType( ) == IntersectionValue.VALUE ) { lre.setStart( LocationImpl.create( dX, y ) ); lre.setEnd( LocationImpl.create( dX + dSeriesThickness, y - dSeriesThickness ) ); ipr.drawLine( lre ); } } } if ( bRenderAxisLabels && sc.isTickLabelVisible( i ) ) { double sx = x; double sx2 = dXEnd; if ( bAxisLabelStaggered && sc.isTickLabelStaggered( i ) ) { if ( iLabelLocation == IConstants.LEFT ) { sx -= dStaggeredLabelOffset; sx2 -= dStaggeredLabelOffset; } else { sx += dStaggeredLabelOffset; sx2 += dStaggeredLabelOffset; } } ScriptHandler.callFunction( sh, ScriptHandler.BEFORE_DRAW_AXIS_LABEL, axModel, la, getRunTimeContext( ).getScriptContext( ) ); getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.BEFORE_DRAW_AXIS_LABEL, la ); if ( ax.getLabel( ).isVisible( ) ) { if ( bRendering3D ) { // Left wall lo3d.set( sx - pwa.getHorizontalSpacingInPixels( ), y3d, dZEnd + pwa.getHorizontalSpacingInPixels( ) ); la.getCaption( ).setValue( sText ); t3dre.setLocation3D( lo3d ); t3dre.setTextPosition( TextRenderEvent.LEFT ); t3dre.setAction( TextRenderEvent.RENDER_TEXT_AT_LOCATION ); dc.addLabel( t3dre ); // Right wall lo3d.set( sx2 + pwa.getHorizontalSpacingInPixels( ), y3d, dZ - pwa.getHorizontalSpacingInPixels( ) ); la.getCaption( ).setValue( sText ); t3dre.setLocation3D( lo3d ); t3dre.setTextPosition( TextRenderEvent.RIGHT ); t3dre.setAction( TextRenderEvent.RENDER_TEXT_AT_LOCATION ); dc.addLabel( t3dre ); } else { lo.set( sx, y ); la.getCaption( ).setValue( sText ); tre.setAction( TextRenderEvent.RENDER_TEXT_AT_LOCATION ); ipr.drawText( tre ); } } ScriptHandler.callFunction( sh, ScriptHandler.AFTER_DRAW_AXIS_LABEL, axModel, la, getRunTimeContext( ).getScriptContext( ) ); getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.AFTER_DRAW_AXIS_LABEL, la ); } // ALWAYS W.R.T START VALUE cdt = cdtAxisValue.forward( iUnit, iStep * ( i + 1 ) ); } } la = LabelImpl.copyInstance( ax.getTitle( ) ); // TEMPORARILY USE // FOR AXIS TITLE if ( la.isVisible( ) && bRenderAxisTitle ) { ScriptHandler.callFunction( sh, ScriptHandler.BEFORE_DRAW_AXIS_TITLE, axModel, la, getRunTimeContext( ).getScriptContext( ) ); getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.BEFORE_DRAW_AXIS_TITLE, la ); final String sRestoreValue = la.getCaption( ).getValue( ); la.getCaption( ) .setValue( rtc.externalizedMessage( sRestoreValue ) ); BoundingBox bb = null; try { bb = Methods.computeBox( xs, ax.getTitlePosition( ), la, 0, 0 ); } catch ( IllegalArgumentException uiex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, uiex ); } if ( ax.getTitle( ).isVisible( ) ) { if ( bRendering3D ) { Bounds cbo = getPlotBounds( ); tre.setBlockBounds( BoundsImpl.create( cbo.getLeft( ) + ( cbo.getWidth( ) / 3d - bb.getWidth( ) ) / 2d, cbo.getTop( ) + 30, bb.getWidth( ), bb.getHeight( ) ) ); tre.setLabel( la ); tre.setBlockAlignment( la.getCaption( ) .getFont( ) .getAlignment( ) ); tre.setAction( TextRenderEvent.RENDER_TEXT_IN_BLOCK ); ipr.drawText( tre ); tre.setBlockBounds( BoundsImpl.create( cbo.getLeft( ) + cbo.getWidth( ) - bb.getWidth( ), cbo.getTop( ) + 30 * 2, bb.getWidth( ), bb.getHeight( ) ) ); ipr.drawText( tre ); } else { final Bounds bo = BoundsImpl.create( ax.getTitleCoordinate( ), daEndPoints[1], bb.getWidth( ), daEndPoints[0] - daEndPoints[1] ); tre.setBlockBounds( bo ); tre.setLabel( la ); tre.setBlockAlignment( la.getCaption( ) .getFont( ) .getAlignment( ) ); tre.setAction( TextRenderEvent.RENDER_TEXT_IN_BLOCK ); if ( ax.getTitle( ).isVisible( ) ) { ipr.drawText( tre ); } } } la.getCaption( ).setValue( sRestoreValue ); ScriptHandler.callFunction( sh, ScriptHandler.AFTER_DRAW_AXIS_TITLE, axModel, la, getRunTimeContext( ).getScriptContext( ) ); getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.AFTER_DRAW_AXIS_TITLE, la ); } la = LabelImpl.copyInstance( ax.getLabel( ) ); if ( iv != null && iv.getType( ) == IntersectionValue.MAX && iDimension == IConstants.TWO_5_D ) { trae.setTranslation( -dSeriesThickness, dSeriesThickness ); ipr.applyTransformation( trae ); } } else if ( iOrientation == IConstants.HORIZONTAL ) { int x; int x3d = 0; int z3d = 0; double dY = dLocation; double dX = 0; double dZ = 0; if ( bRendering3D ) { Location3D l3d = ax.getAxisCoordinate3D( ); dX = l3d.getX( ); dY = l3d.getY( ); dZ = l3d.getZ( ); } double dYTick1 = ( ( iMajorTickStyle & IConstants.TICK_ABOVE ) == IConstants.TICK_ABOVE ) ? ( bRendering3D ? dY + IConstants.TICK_SIZE : dY - IConstants.TICK_SIZE ) : dY; double dYTick2 = ( ( iMajorTickStyle & IConstants.TICK_BELOW ) == IConstants.TICK_BELOW ) ? ( bRendering3D ? dY - IConstants.TICK_SIZE : dY + IConstants.TICK_SIZE ) : dY; if ( iv != null && iDimension == IConstants.TWO_5_D && ( ( bTransposed && isRightToLeft( ) && iv.getType( ) == IntersectionValue.MIN ) || ( !bTransposed && iv.getType( ) == IntersectionValue.MAX ) ) ) { trae.setTransform( TransformationEvent.TRANSLATE ); trae.setTranslation( dSeriesThickness, -dSeriesThickness ); ipr.applyTransformation( trae ); } if ( ( iWhatToDraw & IConstants.AXIS ) == IConstants.AXIS && lia.isVisible( ) ) { if ( bRenderBase3DAxis ) { final double dStart = daEndPoints3D[0]; final double dEnd = daEndPoints3D[1]; l3dre.setLineAttributes( lia ); l3dre.setStart3D( dStart, dY, dZ ); l3dre.setEnd3D( dEnd, dY, dZ ); dc.addLine( l3dre ); if ( isInteractivityEnabled( ) ) { Trigger tg; EList elTriggers = axModel.getTriggers( ); if ( !elTriggers.isEmpty( ) ) { final Polygon3DRenderEvent pre3d = (Polygon3DRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), Polygon3DRenderEvent.class ); Location3D[] loaHotspot = new Location3D[4]; loaHotspot[0] = Location3DImpl.create( dStart, dY - IConstants.LINE_EXPAND_DOUBLE_SIZE, dZ ); loaHotspot[1] = Location3DImpl.create( dStart, dY + IConstants.LINE_EXPAND_DOUBLE_SIZE, dZ ); loaHotspot[2] = Location3DImpl.create( dEnd, dY + IConstants.LINE_EXPAND_DOUBLE_SIZE, dZ ); loaHotspot[3] = Location3DImpl.create( dEnd, dY - IConstants.LINE_EXPAND_DOUBLE_SIZE, dZ ); pre3d.setPoints3D( loaHotspot ); pre3d.setDoubleSided( true ); if ( get3DEngine( ).processEvent( pre3d, boPlot.getLeft( ), boPlot.getTop( ) ) != null ) { final InteractionEvent iev = (InteractionEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), InteractionEvent.class ); for ( int t = 0; t < elTriggers.size( ); t++ ) { tg = TriggerImpl.copyInstance( (Trigger) elTriggers.get( t ) ); processTrigger( tg, StructureSource.createAxis( axModel ) ); iev.addTrigger( tg ); } iev.setHotSpot( pre3d ); ipr.enableInteraction( iev ); } } } } else if ( bRenderAncillary3DAxis ) { final double dStart = daEndPoints3D[0]; final double dEnd = daEndPoints3D[1]; l3dre.setLineAttributes( lia ); l3dre.setStart3D( dX, dY, dStart ); l3dre.setEnd3D( dX, dY, dEnd ); dc.addLine( l3dre ); if ( isInteractivityEnabled( ) ) { Trigger tg; EList elTriggers = axModel.getTriggers( ); if ( !elTriggers.isEmpty( ) ) { final Polygon3DRenderEvent pre3d = (Polygon3DRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), Polygon3DRenderEvent.class ); Location3D[] loaHotspot = new Location3D[4]; loaHotspot[0] = Location3DImpl.create( dX, dY - IConstants.LINE_EXPAND_DOUBLE_SIZE, dStart ); loaHotspot[1] = Location3DImpl.create( dX, dY + IConstants.LINE_EXPAND_DOUBLE_SIZE, dStart ); loaHotspot[2] = Location3DImpl.create( dX, dY + IConstants.LINE_EXPAND_DOUBLE_SIZE, dEnd ); loaHotspot[3] = Location3DImpl.create( dX, dY - IConstants.LINE_EXPAND_DOUBLE_SIZE, dEnd ); pre3d.setPoints3D( loaHotspot ); pre3d.setDoubleSided( true ); if ( get3DEngine( ).processEvent( pre3d, boPlot.getLeft( ), boPlot.getTop( ) ) != null ) { final InteractionEvent iev = (InteractionEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), InteractionEvent.class ); for ( int t = 0; t < elTriggers.size( ); t++ ) { tg = TriggerImpl.copyInstance( (Trigger) elTriggers.get( t ) ); processTrigger( tg, StructureSource.createAxis( axModel ) ); iev.addTrigger( tg ); } iev.setHotSpot( pre3d ); ipr.enableInteraction( iev ); } } } } else { double dStart = daEndPoints[0] - insCA.getLeft( ), dEnd = daEndPoints[1] + insCA.getRight( ); if ( sc.getDirection( ) == IConstants.BACKWARD ) { dStart = daEndPoints[1] - insCA.getLeft( ); dEnd = daEndPoints[0] + insCA.getRight( ); } if ( iv != null && iv.getType( ) == IntersectionValue.VALUE && iDimension == IConstants.TWO_5_D ) { // Zero plane. final Location[] loa = new Location[4]; loa[0] = LocationImpl.create( dStart, dY ); loa[1] = LocationImpl.create( dStart + dSeriesThickness, dY - dSeriesThickness ); loa[2] = LocationImpl.create( dEnd + dSeriesThickness, dY - dSeriesThickness ); loa[3] = LocationImpl.create( dEnd, dY ); final PolygonRenderEvent pre = (PolygonRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), PolygonRenderEvent.class ); pre.setPoints( loa ); pre.setBackground( ColorDefinitionImpl.create( 255, 255, 255, 127 ) ); pre.setOutline( lia ); ipr.fillPolygon( pre ); } lre.setLineAttributes( lia ); lre.getStart( ).set( dStart, dY ); lre.getEnd( ).set( dEnd, dY ); ipr.drawLine( lre ); if ( isInteractivityEnabled( ) ) { Trigger tg; EList elTriggers = axModel.getTriggers( ); if ( !elTriggers.isEmpty( ) ) { final InteractionEvent iev = (InteractionEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), InteractionEvent.class ); for ( int t = 0; t < elTriggers.size( ); t++ ) { tg = TriggerImpl.copyInstance( (Trigger) elTriggers.get( t ) ); processTrigger( tg, StructureSource.createAxis( axModel ) ); iev.addTrigger( tg ); } Location[] loaHotspot = new Location[4]; loaHotspot[0] = LocationImpl.create( dStart, dY - IConstants.LINE_EXPAND_SIZE ); loaHotspot[1] = LocationImpl.create( dEnd, dY - IConstants.LINE_EXPAND_SIZE ); loaHotspot[2] = LocationImpl.create( dEnd, dY + IConstants.LINE_EXPAND_SIZE ); loaHotspot[3] = LocationImpl.create( dStart, dY + IConstants.LINE_EXPAND_SIZE ); final PolygonRenderEvent pre = (PolygonRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), PolygonRenderEvent.class ); pre.setPoints( loaHotspot ); iev.setHotSpot( pre ); ipr.enableInteraction( iev ); } } } } if ( ( sc.getType( ) & IConstants.TEXT ) == IConstants.TEXT || sc.isCategoryScale( ) ) { final int iDirection = sc.getDirection( ); // double dUnitSize = sc.getUnitSize( ); final double dUnitSize = ( iDirection == IConstants.BACKWARD || ( iDirection == IConstants.AUTO && bTransposed ) ) ? -sc.getUnitSize( ) : sc.getUnitSize( ); final double dOffset = dUnitSize / 2; DataSetIterator dsi = sc.getData( ); final int iDateTimeUnit = ( sc.getType( ) == IConstants.DATE_TIME ) ? CDateTime.computeUnit( dsi ) : IConstants.UNDEFINED; final ITextMetrics itmText = xs.getTextMetrics( la ); double y = ( iLabelLocation == IConstants.ABOVE ) ? ( bRendering3D ? dYTick1 + 1 : dYTick1 - 1 ) : ( bRendering3D ? dYTick2 - 1 : dYTick2 + 1 ); dsi.reset( ); for ( int i = 0; i < da.length - 1; i++ ) { x = (int) da[i]; if ( bRendering3D ) { x3d = (int) da3D[i]; z3d = (int) da3D[i]; } if ( ( iWhatToDraw & IConstants.AXIS ) == IConstants.AXIS ) { double dYMinorTick1 = ( ( iMinorTickStyle & IConstants.TICK_ABOVE ) == IConstants.TICK_ABOVE ) ? ( bRendering3D ? dY + IConstants.TICK_SIZE : dY - IConstants.TICK_SIZE ) : dY; double dYMinorTick2 = ( ( iMinorTickStyle & IConstants.TICK_BELOW ) == IConstants.TICK_BELOW ) ? ( bRendering3D ? dY - IConstants.TICK_SIZE : dY + IConstants.TICK_SIZE ) : dY; if ( dYMinorTick1 != -dYMinorTick2 ) { // RENDER THE MINOR TICKS FIRST (For ALL but the // last Major tick) if ( i != da.length - 1 ) { if ( bRenderBase3DAxis ) { Line3DRenderEvent l3dreMinor = null; for ( int k = 0; k < daMinor.length - 1; k++ ) { l3dreMinor = (Line3DRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), Line3DRenderEvent.class ); l3dreMinor.setLineAttributes( liaMinorTick ); l3dreMinor.setStart3D( Location3DImpl.create( x3d + daMinor[k], dYMinorTick1, dZ ) ); l3dreMinor.setEnd3D( Location3DImpl.create( x3d + daMinor[k], dYMinorTick2, dZ ) ); dc.addLine( l3dreMinor ); } } else if ( bRenderAncillary3DAxis ) { Line3DRenderEvent l3dreMinor = null; for ( int k = 0; k < daMinor.length - 1; k++ ) { l3dreMinor = (Line3DRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), Line3DRenderEvent.class ); l3dreMinor.setLineAttributes( liaMinorTick ); l3dreMinor.setStart3D( Location3DImpl.create( dX, dYMinorTick1, z3d + daMinor[k] ) ); l3dreMinor.setEnd3D( Location3DImpl.create( dX, dYMinorTick2, z3d + daMinor[k] ) ); dc.addLine( l3dreMinor ); } } else { LineRenderEvent lreMinor = null; for ( int k = 0; k < daMinor.length - 1; k++ ) { lreMinor = (LineRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), LineRenderEvent.class ); lreMinor.setLineAttributes( liaMinorTick ); lreMinor.setStart( LocationImpl.create( x + daMinor[k], dYMinorTick1 ) ); lreMinor.setEnd( LocationImpl.create( x + daMinor[k], dYMinorTick2 ) ); ipr.drawLine( lreMinor ); } } } } if ( dYTick1 != dYTick2 ) { if ( bRenderBase3DAxis ) { l3dre.setLineAttributes( liaMajorTick ); l3dre.setStart3D( x3d, dYTick1, dZ ); l3dre.setEnd3D( x3d, dYTick2, dZ ); dc.addLine( l3dre ); } else if ( bRenderAncillary3DAxis ) { l3dre.setLineAttributes( liaMajorTick ); l3dre.setStart3D( dX, dYTick1, z3d ); l3dre.setEnd3D( dX, dYTick2, z3d ); dc.addLine( l3dre ); } else { lre.setLineAttributes( liaMajorTick ); lre.getStart( ).set( x, dYTick1 ); lre.getEnd( ).set( x, dYTick2 ); ipr.drawLine( lre ); } if ( iv != null && iDimension == IConstants.TWO_5_D && iv.getType( ) == IntersectionValue.VALUE ) { lre.getStart( ).set( x, dY ); lre.getEnd( ).set( x + dSeriesThickness, dY - dSeriesThickness ); ipr.drawLine( lre ); } } } if ( bRenderAxisLabels ) { la.getCaption( ) .setValue( sc.formatCategoryValue( sc.getType( ), dsi.next( ), // step to next value. iDateTimeUnit ) ); if ( sc.isTickLabelVisible( i ) ) { ScriptHandler.callFunction( sh, ScriptHandler.BEFORE_DRAW_AXIS_LABEL, axModel, la, getRunTimeContext( ).getScriptContext( ) ); getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.BEFORE_DRAW_AXIS_LABEL, la ); itmText.reuse( la );// RECYCLED double sy = y; if ( bAxisLabelStaggered && sc.isTickLabelStaggered( i ) ) { if ( iLabelLocation == IConstants.ABOVE ) { sy -= dStaggeredLabelOffset; } else { sy += dStaggeredLabelOffset; } } if ( ax.getLabel( ).isVisible( ) ) { if ( bRendering3D ) { if ( axisType == IConstants.BASE_AXIS ) { lo3d.set( x3d + dOffset, sy - pwa.getVerticalSpacingInPixels( ), dZEnd + pwa.getVerticalSpacingInPixels( ) ); } else { lo3d.set( dXEnd + pwa.getVerticalSpacingInPixels( ), sy - pwa.getVerticalSpacingInPixels( ), z3d + dOffset ); } t3dre.setLocation3D( lo3d ); t3dre.setAction( TextRenderEvent.RENDER_TEXT_AT_LOCATION ); dc.addLabel( t3dre ); } else { lo.set( x + dOffset, sy ); tre.setAction( TextRenderEvent.RENDER_TEXT_AT_LOCATION ); ipr.drawText( tre ); } } ScriptHandler.callFunction( sh, ScriptHandler.AFTER_DRAW_AXIS_LABEL, axModel, la, getRunTimeContext( ).getScriptContext( ) ); getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.AFTER_DRAW_AXIS_LABEL, la ); } } } // ONE LAST TICK x = (int) da[da.length - 1]; if ( ( iWhatToDraw & IConstants.AXIS ) == IConstants.AXIS ) { if ( dYTick1 != dYTick2 ) { if ( bRenderBase3DAxis ) { l3dre.setLineAttributes( liaMajorTick ); l3dre.setStart3D( x3d, dYTick1, dZ ); l3dre.setEnd3D( x3d, dYTick2, dZ ); dc.addLine( l3dre ); } else if ( bRenderAncillary3DAxis ) { l3dre.setLineAttributes( liaMajorTick ); l3dre.setStart3D( dX, dYTick1, z3d ); l3dre.setEnd3D( dX, dYTick2, z3d ); dc.addLine( l3dre ); } else { lre.setLineAttributes( liaMajorTick ); lre.getStart( ).set( x, dYTick1 ); lre.getEnd( ).set( x, dYTick2 ); ipr.drawLine( lre ); } if ( iv != null && iDimension == IConstants.TWO_5_D && iv.getType( ) == IntersectionValue.VALUE ) { lre.getStart( ).set( x, dY ); lre.getEnd( ).set( x + dSeriesThickness, dY - dSeriesThickness ); ipr.drawLine( lre ); } } } itmText.dispose( ); // DISPOSED } else if ( ( sc.getType( ) & IConstants.LINEAR ) == IConstants.LINEAR ) { double dAxisValue = Methods.asDouble( sc.getMinimum( ) ) .doubleValue( ); final double dAxisStep = Methods.asDouble( sc.getStep( ) ) .doubleValue( ); if ( fs == null ) { df = new DecimalFormat( sc.getNumericPattern( ) ); } dAxisValue = Methods.asDouble( sc.getMinimum( ) ).doubleValue( ); // RESET double y = ( iLabelLocation == IConstants.ABOVE ) ? ( bRendering3D ? dYTick1 + 1 : dYTick1 - 1 ) : ( bRendering3D ? dYTick2 - 1 : dYTick2 + 1 ); for ( int i = 0; i < da.length; i++ ) { x = (int) da[i]; if ( bRendering3D ) { x3d = (int) da3D[i]; z3d = (int) da3D[i]; } if ( ( iWhatToDraw & IConstants.AXIS ) == IConstants.AXIS ) { double dYMinorTick1 = ( ( iMinorTickStyle & IConstants.TICK_ABOVE ) == IConstants.TICK_ABOVE ) ? ( bRendering3D ? dY + IConstants.TICK_SIZE : dY - IConstants.TICK_SIZE ) : dY; double dYMinorTick2 = ( ( iMinorTickStyle & IConstants.TICK_BELOW ) == IConstants.TICK_BELOW ) ? ( bRendering3D ? dY - IConstants.TICK_SIZE : dY + IConstants.TICK_SIZE ) : dY; if ( dYMinorTick1 != -dYMinorTick2 ) { // RENDER THE MINOR TICKS FIRST (For ALL but the // last Major tick) if ( i != da.length - 1 ) { if ( bRenderBase3DAxis ) { Line3DRenderEvent l3dreMinor = null; for ( int k = 0; k < daMinor.length - 1; k++ ) { l3dreMinor = (Line3DRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), Line3DRenderEvent.class ); l3dreMinor.setLineAttributes( liaMinorTick ); l3dreMinor.setStart3D( Location3DImpl.create( x3d + daMinor[k], dYMinorTick1, dZ ) ); l3dreMinor.setEnd3D( Location3DImpl.create( x3d + daMinor[k], dYMinorTick2, dZ ) ); dc.addLine( l3dreMinor ); } } else if ( bRenderAncillary3DAxis ) { Line3DRenderEvent l3dreMinor = null; for ( int k = 0; k < daMinor.length - 1; k++ ) { l3dreMinor = (Line3DRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), Line3DRenderEvent.class ); l3dreMinor.setLineAttributes( liaMinorTick ); l3dreMinor.setStart3D( Location3DImpl.create( dX, dYMinorTick1, z3d + daMinor[k] ) ); l3dreMinor.setEnd3D( Location3DImpl.create( dX, dYMinorTick2, z3d + daMinor[k] ) ); dc.addLine( l3dreMinor ); } } else { LineRenderEvent lreMinor = null; for ( int k = 0; k < daMinor.length - 1; k++ ) { lreMinor = (LineRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), LineRenderEvent.class ); lreMinor.setLineAttributes( liaMinorTick ); lreMinor.setStart( LocationImpl.create( x + daMinor[k], dYMinorTick1 ) ); lreMinor.setEnd( LocationImpl.create( x + daMinor[k], dYMinorTick2 ) ); ipr.drawLine( lreMinor ); } } } } if ( dYTick1 != dYTick2 ) { if ( bRenderBase3DAxis ) { l3dre.setLineAttributes( liaMajorTick ); l3dre.setStart3D( x3d, dYTick1, dZ ); l3dre.setEnd3D( x3d, dYTick2, dZ ); dc.addLine( l3dre ); } else if ( bRenderAncillary3DAxis ) { l3dre.setLineAttributes( liaMajorTick ); l3dre.setStart3D( dX, dYTick1, z3d ); l3dre.setEnd3D( dX, dYTick2, z3d ); dc.addLine( l3dre ); } else { lre.setLineAttributes( liaMajorTick ); lre.getStart( ).set( x, dYTick1 ); lre.getEnd( ).set( x, dYTick2 ); ipr.drawLine( lre ); } if ( iv != null && iDimension == IConstants.TWO_5_D && iv.getType( ) == IntersectionValue.VALUE ) { lre.getStart( ).set( x, dY ); lre.getEnd( ).set( x + dSeriesThickness, dY - dSeriesThickness ); ipr.drawLine( lre ); } } } // OPTIMIZED: ONLY PROCESS IF AXES LABELS ARE VISIBLE OR // REQUESTED FOR if ( bRenderAxisLabels && sc.isTickLabelVisible( i ) ) { nde.setValue( dAxisValue ); try { sText = ValueFormatter.format( nde, ax.getFormatSpecifier( ), ax.getRunTimeContext( ).getULocale( ), df ); } catch ( ChartException dfex ) { logger.log( dfex ); sText = IConstants.NULL_STRING; } ScriptHandler.callFunction( sh, ScriptHandler.BEFORE_DRAW_AXIS_LABEL, axModel, la, getRunTimeContext( ).getScriptContext( ) ); getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.BEFORE_DRAW_AXIS_LABEL, la ); double sy = y; if ( bAxisLabelStaggered && sc.isTickLabelStaggered( i ) ) { if ( iLabelLocation == IConstants.ABOVE ) { sy -= dStaggeredLabelOffset; } else { sy += dStaggeredLabelOffset; } } if ( ax.getLabel( ).isVisible( ) ) { if ( bRendering3D ) { if ( axisType == IConstants.BASE_AXIS ) { lo3d.set( x3d, sy - pwa.getVerticalSpacingInPixels( ), dZEnd + pwa.getVerticalSpacingInPixels( ) ); } else { lo3d.set( dXEnd + pwa.getVerticalSpacingInPixels( ), sy - pwa.getVerticalSpacingInPixels( ), z3d ); } la.getCaption( ).setValue( sText ); t3dre.setLocation3D( lo3d ); t3dre.setAction( TextRenderEvent.RENDER_TEXT_AT_LOCATION ); dc.addLabel( t3dre ); } else { lo.set( x, sy ); la.getCaption( ).setValue( sText ); tre.setAction( TextRenderEvent.RENDER_TEXT_AT_LOCATION ); ipr.drawText( tre ); } } ScriptHandler.callFunction( sh, ScriptHandler.AFTER_DRAW_AXIS_LABEL, axModel, la, getRunTimeContext( ).getScriptContext( ) ); getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.AFTER_DRAW_AXIS_LABEL, la ); } dAxisValue += dAxisStep; } } else if ( ( sc.getType( ) & IConstants.LOGARITHMIC ) == IConstants.LOGARITHMIC ) { double dAxisValue = Methods.asDouble( sc.getMinimum( ) ) .doubleValue( ); final double dAxisStep = Methods.asDouble( sc.getStep( ) ) .doubleValue( ); dAxisValue = Methods.asDouble( sc.getMinimum( ) ).doubleValue( ); // RESET double y = ( iLabelLocation == IConstants.ABOVE ) ? ( bRendering3D ? dYTick1 + 1 : dYTick1 - 1 ) : ( bRendering3D ? dYTick2 - 1 : dYTick2 + 1 ); for ( int i = 0; i < da.length; i++ ) { x = (int) da[i]; if ( bRendering3D ) { x3d = (int) da3D[i]; z3d = (int) da3D[i]; } if ( ( iWhatToDraw & IConstants.AXIS ) == IConstants.AXIS ) { double dYMinorTick1 = ( ( iMinorTickStyle & IConstants.TICK_ABOVE ) == IConstants.TICK_ABOVE ) ? ( bRendering3D ? dY + IConstants.TICK_SIZE : dY - IConstants.TICK_SIZE ) : dY; double dYMinorTick2 = ( ( iMinorTickStyle & IConstants.TICK_BELOW ) == IConstants.TICK_BELOW ) ? ( bRendering3D ? dY - IConstants.TICK_SIZE : dY + IConstants.TICK_SIZE ) : dY; if ( dYMinorTick1 != -dYMinorTick2 ) { // RENDER THE MINOR TICKS FIRST (For ALL but the // last Major tick) if ( i != da.length - 1 ) { if ( bRenderBase3DAxis ) { Line3DRenderEvent l3dreMinor = null; for ( int k = 0; k < daMinor.length - 1; k++ ) { l3dreMinor = (Line3DRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), Line3DRenderEvent.class ); l3dreMinor.setLineAttributes( liaMinorTick ); l3dreMinor.setStart3D( Location3DImpl.create( x3d + daMinor[k], dYMinorTick1, dZ ) ); l3dreMinor.setEnd3D( Location3DImpl.create( x3d + daMinor[k], dYMinorTick2, dZ ) ); dc.addLine( l3dreMinor ); } } else if ( bRenderAncillary3DAxis ) { Line3DRenderEvent l3dreMinor = null; for ( int k = 0; k < daMinor.length - 1; k++ ) { l3dreMinor = (Line3DRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), Line3DRenderEvent.class ); l3dreMinor.setLineAttributes( liaMinorTick ); l3dreMinor.setStart3D( Location3DImpl.create( dX, dYMinorTick1, z3d + daMinor[k] ) ); l3dreMinor.setEnd3D( Location3DImpl.create( dX, dYMinorTick2, z3d + daMinor[k] ) ); dc.addLine( l3dreMinor ); } } else { LineRenderEvent lreMinor = null; for ( int k = 0; k < daMinor.length - 1; k++ ) { lreMinor = (LineRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), LineRenderEvent.class ); lreMinor.setLineAttributes( liaMinorTick ); lreMinor.setStart( LocationImpl.create( x + daMinor[k], dYMinorTick1 ) ); lreMinor.setEnd( LocationImpl.create( x + daMinor[k], dYMinorTick2 ) ); ipr.drawLine( lreMinor ); } } } } if ( dYTick1 != dYTick2 ) { if ( bRenderBase3DAxis ) { l3dre.setLineAttributes( liaMajorTick ); l3dre.setStart3D( x3d, dYTick1, dZ ); l3dre.setEnd3D( x3d, dYTick2, dZ ); dc.addLine( l3dre ); } else if ( bRenderAncillary3DAxis ) { l3dre.setLineAttributes( liaMajorTick ); l3dre.setStart3D( dX, dYTick1, z3d ); l3dre.setEnd3D( dX, dYTick2, z3d ); dc.addLine( l3dre ); } else { lre.setLineAttributes( lia ); lre.getStart( ).set( x, dYTick1 ); lre.getEnd( ).set( x, dYTick2 ); ipr.drawLine( lre ); } if ( iv != null && iDimension == IConstants.TWO_5_D && iv.getType( ) == IntersectionValue.VALUE ) { lre.getStart( ).set( x, dY ); lre.getEnd( ).set( x + dSeriesThickness, dY - dSeriesThickness ); ipr.drawLine( lre ); } } } // OPTIMIZED: ONLY PROCESS IF AXES LABELS ARE VISIBLE OR // REQUESTED FOR if ( bRenderAxisLabels && sc.isTickLabelVisible( i ) ) { if ( fs == null ) { df = new DecimalFormat( sc.getNumericPattern( dAxisValue ) ); } nde.setValue( dAxisValue ); try { sText = ValueFormatter.format( nde, ax.getFormatSpecifier( ), ax.getRunTimeContext( ).getULocale( ), df ); } catch ( ChartException dfex ) { logger.log( dfex ); sText = IConstants.NULL_STRING; } ScriptHandler.callFunction( sh, ScriptHandler.BEFORE_DRAW_AXIS_LABEL, axModel, la, getRunTimeContext( ).getScriptContext( ) ); getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.BEFORE_DRAW_AXIS_LABEL, la ); double sy = y; if ( bAxisLabelStaggered && sc.isTickLabelStaggered( i ) ) { if ( iLabelLocation == IConstants.ABOVE ) { sy -= dStaggeredLabelOffset; } else { sy += dStaggeredLabelOffset; } } if ( ax.getLabel( ).isVisible( ) ) { if ( bRendering3D ) { if ( axisType == IConstants.BASE_AXIS ) { lo3d.set( x3d, sy - pwa.getVerticalSpacingInPixels( ), dZEnd + pwa.getVerticalSpacingInPixels( ) ); } else { lo3d.set( dXEnd + pwa.getVerticalSpacingInPixels( ), sy - pwa.getVerticalSpacingInPixels( ), z3d ); } la.getCaption( ).setValue( sText ); t3dre.setLocation3D( lo3d ); t3dre.setAction( TextRenderEvent.RENDER_TEXT_AT_LOCATION ); dc.addLabel( t3dre ); } else { lo.set( x, sy ); la.getCaption( ).setValue( sText ); tre.setAction( TextRenderEvent.RENDER_TEXT_AT_LOCATION ); ipr.drawText( tre ); } } ScriptHandler.callFunction( sh, ScriptHandler.AFTER_DRAW_AXIS_LABEL, axModel, la, getRunTimeContext( ).getScriptContext( ) ); getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.AFTER_DRAW_AXIS_LABEL, la ); } dAxisValue *= dAxisStep; } } else if ( ( sc.getType( ) & IConstants.DATE_TIME ) == IConstants.DATE_TIME ) { CDateTime cdt, cdtAxisValue = Methods.asDateTime( sc.getMinimum( ) ); final int iUnit = Methods.asInteger( sc.getUnit( ) ); final int iStep = Methods.asInteger( sc.getStep( ) ); SimpleDateFormat sdf = null; if ( fs == null ) { sdf = new SimpleDateFormat( CDateTime.getPreferredFormat( iUnit ) ); } cdt = cdtAxisValue; double y = ( iLabelLocation == IConstants.ABOVE ) ? ( bRendering3D ? dYTick1 + 1 : dYTick1 - 1 ) : ( bRendering3D ? dYTick2 - 1 : dYTick2 + 1 ); for ( int i = 0; i < da.length; i++ ) { x = (int) da[i]; if ( bRendering3D ) { x3d = (int) da3D[i]; z3d = (int) da3D[i]; } if ( ( iWhatToDraw & IConstants.AXIS ) == IConstants.AXIS ) { double dYMinorTick1 = ( ( iMinorTickStyle & IConstants.TICK_ABOVE ) == IConstants.TICK_ABOVE ) ? ( bRendering3D ? dY + IConstants.TICK_SIZE : dY - IConstants.TICK_SIZE ) : dY; double dYMinorTick2 = ( ( iMinorTickStyle & IConstants.TICK_BELOW ) == IConstants.TICK_BELOW ) ? ( bRendering3D ? dY - IConstants.TICK_SIZE : dY + IConstants.TICK_SIZE ) : dY; if ( dYMinorTick1 != -dYMinorTick2 ) { // RENDER THE MINOR TICKS FIRST (For ALL but the // last Major tick) if ( i != da.length - 1 ) { if ( bRenderBase3DAxis ) { Line3DRenderEvent l3dreMinor = null; for ( int k = 0; k < daMinor.length - 1; k++ ) { l3dreMinor = (Line3DRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), Line3DRenderEvent.class ); l3dreMinor.setLineAttributes( liaMinorTick ); l3dreMinor.setStart3D( Location3DImpl.create( x3d + daMinor[k], dYMinorTick1, dZ ) ); l3dreMinor.setEnd3D( Location3DImpl.create( x3d + daMinor[k], dYMinorTick2, dZ ) ); dc.addLine( l3dreMinor ); } } else if ( bRenderAncillary3DAxis ) { Line3DRenderEvent l3dreMinor = null; for ( int k = 0; k < daMinor.length - 1; k++ ) { l3dreMinor = (Line3DRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), Line3DRenderEvent.class ); l3dreMinor.setLineAttributes( liaMinorTick ); l3dreMinor.setStart3D( Location3DImpl.create( dX, dYMinorTick1, z3d + daMinor[k] ) ); l3dreMinor.setEnd3D( Location3DImpl.create( dX, dYMinorTick2, z3d + daMinor[k] ) ); dc.addLine( l3dreMinor ); } } else { LineRenderEvent lreMinor = null; for ( int k = 0; k < daMinor.length - 1; k++ ) { lreMinor = (LineRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), LineRenderEvent.class ); lreMinor.setLineAttributes( liaMinorTick ); lreMinor.setStart( LocationImpl.create( x + daMinor[k], dYMinorTick1 ) ); lreMinor.setEnd( LocationImpl.create( x + daMinor[k], dYMinorTick2 ) ); ipr.drawLine( lreMinor ); } } } } if ( dYTick1 != dYTick2 ) { if ( bRenderBase3DAxis ) { l3dre.setLineAttributes( liaMajorTick ); l3dre.setStart3D( x3d, dYTick1, dZ ); l3dre.setEnd3D( x3d, dYTick2, dZ ); dc.addLine( l3dre ); } else if ( bRenderAncillary3DAxis ) { l3dre.setLineAttributes( liaMajorTick ); l3dre.setStart3D( dX, dYTick1, z3d ); l3dre.setEnd3D( dX, dYTick2, z3d ); dc.addLine( l3dre ); } else { lre.setLineAttributes( liaMajorTick ); lre.getStart( ).set( x, dYTick1 ); lre.getEnd( ).set( x, dYTick2 ); ipr.drawLine( lre ); } if ( iv != null && iDimension == IConstants.TWO_5_D && iv.getType( ) == IntersectionValue.VALUE ) { lre.getStart( ).set( x, dY ); lre.getEnd( ).set( x + dSeriesThickness, dY - dSeriesThickness ); ipr.drawLine( lre ); } } } // OPTIMIZED: ONLY PROCESS IF AXES LABELS ARE VISIBLE OR // REQUESTED FOR if ( bRenderAxisLabels && sc.isTickLabelVisible( i ) ) { try { sText = ValueFormatter.format( cdt, ax.getFormatSpecifier( ), ax.getRunTimeContext( ).getULocale( ), sdf ); } catch ( ChartException dfex ) { logger.log( dfex ); sText = IConstants.NULL_STRING; } ScriptHandler.callFunction( sh, ScriptHandler.BEFORE_DRAW_AXIS_LABEL, axModel, la, getRunTimeContext( ).getScriptContext( ) ); getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.BEFORE_DRAW_AXIS_LABEL, la ); double sy = y; if ( bAxisLabelStaggered && sc.isTickLabelStaggered( i ) ) { if ( iLabelLocation == IConstants.ABOVE ) { sy -= dStaggeredLabelOffset; } else { sy += dStaggeredLabelOffset; } } if ( ax.getLabel( ).isVisible( ) ) { if ( bRendering3D ) { if ( axisType == IConstants.BASE_AXIS ) { lo3d.set( x3d, sy - pwa.getVerticalSpacingInPixels( ), dZEnd + pwa.getVerticalSpacingInPixels( ) ); } else { lo3d.set( dXEnd + pwa.getVerticalSpacingInPixels( ), sy - pwa.getVerticalSpacingInPixels( ), z3d ); } la.getCaption( ).setValue( sText ); t3dre.setLocation3D( lo3d ); t3dre.setAction( TextRenderEvent.RENDER_TEXT_AT_LOCATION ); dc.addLabel( t3dre ); } else { lo.set( x, sy ); la.getCaption( ).setValue( sText ); tre.setAction( TextRenderEvent.RENDER_TEXT_AT_LOCATION ); ipr.drawText( tre ); } } ScriptHandler.callFunction( sh, ScriptHandler.AFTER_DRAW_AXIS_LABEL, axModel, la, getRunTimeContext( ).getScriptContext( ) ); getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.AFTER_DRAW_AXIS_LABEL, la ); } // ALWAYS W.R.T START VALUE cdt = cdtAxisValue.forward( iUnit, iStep * ( i + 1 ) ); } } // RENDER THE AXIS TITLE la = LabelImpl.copyInstance( ax.getTitle( ) ); // TEMPORARILY USE // FOR AXIS TITLE if ( la.isVisible( ) && bRenderAxisTitle ) { ScriptHandler.callFunction( sh, ScriptHandler.BEFORE_DRAW_AXIS_TITLE, axModel, la, getRunTimeContext( ).getScriptContext( ) ); getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.BEFORE_DRAW_AXIS_TITLE, la ); final String sRestoreValue = la.getCaption( ).getValue( ); la.getCaption( ) .setValue( rtc.externalizedMessage( sRestoreValue ) ); // EXTERNALIZE la.getCaption( ) .getFont( ) .setAlignment( switchTextAlignment( la.getCaption( ) .getFont( ) .getAlignment( ) ) ); BoundingBox bb = null; try { bb = Methods.computeBox( xs, ax.getTitlePosition( ), la, 0, 0 ); } catch ( IllegalArgumentException uiex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, uiex ); } if ( ax.getTitle( ).isVisible( ) ) { if ( bRendering3D ) { Bounds cbo = getPlotBounds( ); if ( axisType == IConstants.BASE_AXIS ) { tre.setBlockBounds( BoundsImpl.create( cbo.getLeft( ) + ( cbo.getWidth( ) / 3d - bb.getWidth( ) ), cbo.getTop( ) + cbo.getHeight( ) - Math.min( bb.getHeight( ), bb.getWidth( ) ) - 30, bb.getWidth( ), bb.getHeight( ) ) ); } else { tre.setBlockBounds( BoundsImpl.create( cbo.getLeft( ) + cbo.getWidth( ) * 2 / 3d + ( cbo.getWidth( ) / 3d - bb.getWidth( ) ) / 2d, cbo.getTop( ) + cbo.getHeight( ) - Math.min( bb.getHeight( ), bb.getWidth( ) ) - 30 * 2, bb.getWidth( ), bb.getHeight( ) ) ); } tre.setLabel( la ); tre.setBlockAlignment( la.getCaption( ) .getFont( ) .getAlignment( ) ); tre.setAction( TextRenderEvent.RENDER_TEXT_IN_BLOCK ); ipr.drawText( tre ); } else { final Bounds bo = BoundsImpl.create( daEndPoints[0], ax.getTitleCoordinate( ), daEndPoints[1] - daEndPoints[0], bb.getHeight( ) ); tre.setBlockBounds( bo ); tre.setLabel( la ); tre.setBlockAlignment( la.getCaption( ) .getFont( ) .getAlignment( ) ); tre.setAction( TextRenderEvent.RENDER_TEXT_IN_BLOCK ); ipr.drawText( tre ); } } ScriptHandler.callFunction( sh, ScriptHandler.AFTER_DRAW_AXIS_TITLE, axModel, la, getRunTimeContext( ).getScriptContext( ) ); getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.AFTER_DRAW_AXIS_TITLE, la ); } la = LabelImpl.copyInstance( ax.getLabel( ) ); // RESTORE BACK TO // AXIS LABEL if ( iv != null && iDimension == IConstants.TWO_5_D && ( ( bTransposed && isRightToLeft( ) && iv.getType( ) == IntersectionValue.MIN ) || ( !bTransposed && iv.getType( ) == IntersectionValue.MAX ) ) ) { trae.setTranslation( -dSeriesThickness, dSeriesThickness ); ipr.applyTransformation( trae ); } } } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/39dbdbe915b6d1a6a7715671f5dc3bf62995dbdc/AxesRenderer.java/clean/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/render/AxesRenderer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
1743,
3442,
6558,
12,
467,
9840,
6747,
277,
683,
16,
15211,
886,
16,
1082,
202,
3335,
6558,
1740,
16,
509,
277,
23801,
774,
6493,
262,
1216,
14804,
503,
202,
95,
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,
727,
918,
1743,
3442,
6558,
12,
467,
9840,
6747,
277,
683,
16,
15211,
886,
16,
1082,
202,
3335,
6558,
1740,
16,
509,
277,
23801,
774,
6493,
262,
1216,
14804,
503,
202,
95,
202... |
public UMOMessage route(UMOMessage message, UMOSession session, boolean synchronous) throws RoutingException | public synchronized UMOMessage route(UMOMessage message, UMOSession session, boolean synchronous) throws RoutingException | public UMOMessage route(UMOMessage message, UMOSession session, boolean synchronous) throws RoutingException { String correlationId = (String) propertyExtractor.getProperty(MuleProperties.MULE_CORRELATION_ID_PROPERTY, message); initialise(message); UMOEndpoint endpoint; // UMOMessage message; UMOMessage result = null; List list = getEndpoints(); int i = 1; for (Iterator iterator = list.iterator(); iterator.hasNext();) { endpoint = (UMOEndpoint) iterator.next(); message = getMessagePart(message, endpoint); if (message == null) { // Log a warning if there are no messages for a given endpoint logger.warn("Message part is null for endpoint: " + endpoint.getEndpointURI().toString()); } // We'll keep looping to get all messages for the current endpoint // before moving to the next endpoint // This can be turned off by setting the multimatch flag to false while (message != null) { try { if (enableCorrelation != ENABLE_CORRELATION_NEVER) { boolean correlationSet = message.getCorrelationId() != null; if (!correlationSet && (enableCorrelation == ENABLE_CORRELATION_IF_NOT_SET)) { message.setCorrelationId(correlationId); } // take correlation group size from the message // properties, set by concrete message splitter // implementations final int groupSize = message.getCorrelationGroupSize(); message.setCorrelationGroupSize(groupSize); message.setCorrelationSequence(i++); } if (synchronous) { result = send(session, message, endpoint); } else { dispatch(session, message, endpoint); } } catch (UMOException e) { throw new CouldNotRouteOutboundMessageException(message, endpoint, e); } if (!multimatch) { break; } message = getMessagePart(message, endpoint); } } return result; } | 2370 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2370/dffd51286bdf5c85719dcb4b6136e0e6b5fbca8b/AbstractMessageSplitter.java/clean/src/java/org/mule/routing/outbound/AbstractMessageSplitter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3852,
587,
5980,
1079,
1946,
12,
2799,
51,
1079,
883,
16,
587,
5980,
2157,
1339,
16,
1250,
12209,
13,
1216,
19349,
503,
565,
288,
3639,
514,
31022,
273,
261,
780,
13,
1272,
10958,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
587,
5980,
1079,
1946,
12,
2799,
51,
1079,
883,
16,
587,
5980,
2157,
1339,
16,
1250,
12209,
13,
1216,
19349,
503,
565,
288,
3639,
514,
31022,
273,
261,
780,
13,
1272,
10958,
... |
if (log.isDebugEnabled()) { log.debug("Entering 'execute' method"); } | public String execute() throws IOException { if (log.isDebugEnabled()) { log.debug("Entering 'execute' method"); } StartupListener.setupContext(getSession().getServletContext()); String referer = getRequest().getHeader("Referer"); HttpServletResponse response = ServletActionContext.getResponse(); if (referer != null) { log.info("reload complete, reloading user back to: " + referer); saveMessage(getText("reload.succeeded")); response.sendRedirect(response.encodeRedirectURL(referer)); return SUCCESS; } else { response.setContentType("text/html"); PrintWriter out = response.getWriter(); out.println("<html>"); out.println("<head>"); out.println("<title>Context Reloaded</title>"); out.println("</head>"); out.println("<body bgcolor=\"white\">"); out.println("<script type=\"text/javascript\">"); out.println("alert('Reloading options succeeded! Click OK to continue.');"); out.println("history.back();"); out.println("</script>"); out.println("</body>"); out.println("</html>"); } return SUCCESS; } | 3521 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3521/24e468222d23592c808bc2909b2f619f8372db1e/ReloadAction.java/clean/web/struts/src/main/java/org/appfuse/webapp/action/ReloadAction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
1836,
1435,
1216,
1860,
288,
3639,
309,
261,
1330,
18,
291,
2829,
1526,
10756,
288,
5411,
613,
18,
4148,
2932,
10237,
310,
296,
8837,
11,
707,
8863,
3639,
289,
3639,
3603,
416,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1836,
1435,
1216,
1860,
288,
3639,
309,
261,
1330,
18,
291,
2829,
1526,
10756,
288,
5411,
613,
18,
4148,
2932,
10237,
310,
296,
8837,
11,
707,
8863,
3639,
289,
3639,
3603,
416,... | |
method, new AnnotationInfo(ANNOTATION_AROUND, aroundProxy) | method, new AnnotationInfo( ANNOTATION_AROUND, aroundProxy ) | private static void handleMethodAnnotations(final AnnotationManager manager, final AttributeEnhancer enhancer, final JavaMethod method) { // Pointcut with signature Annotation[] expressionAnnotations = manager.getAnnotations(ANNOTATION_EXPRESSION, method); for (int i = 0; i < expressionAnnotations.length; i++) { Annotation expressionAnnotation = expressionAnnotations[i]; if (expressionAnnotation != null) { ExpressionAnnotationProxy expressionProxy = (ExpressionAnnotationProxy) expressionAnnotation; AnnotationC.registerCallParameters(expressionProxy, method); enhancer.insertMethodAttribute( method, new AnnotationInfo(ANNOTATION_EXPRESSION, expressionProxy) ); logInfo( " pointcut [" + AnnotationC.getShortCallSignature(method) + " :: " + expressionProxy.expression() + ']' ); } } Annotation[] aroundAnnotations = manager.getAnnotations(ANNOTATION_AROUND, method); for (int i = 0; i < aroundAnnotations.length; i++) { Annotation aroundAnnotation = aroundAnnotations[i]; if (aroundAnnotation != null) { AroundAnnotationProxy aroundProxy = (AroundAnnotationProxy) aroundAnnotation; AnnotationC.registerCallParameters(aroundProxy, method); enhancer.insertMethodAttribute( method, new AnnotationInfo(ANNOTATION_AROUND, aroundProxy) ); logInfo( " around advice [" + AnnotationC.getShortCallSignature(method) + " :: " + aroundProxy.pointcut() + ']' ); } } Annotation[] beforeAnnotations = manager.getAnnotations(ANNOTATION_BEFORE, method); for (int i = 0; i < beforeAnnotations.length; i++) { Annotation beforeAnnotation = beforeAnnotations[i]; if (beforeAnnotation != null) { BeforeAnnotationProxy beforeProxy = (BeforeAnnotationProxy) beforeAnnotation; AnnotationC.registerCallParameters(beforeProxy, method); enhancer.insertMethodAttribute( method, new AnnotationInfo(ANNOTATION_BEFORE, beforeProxy) ); logInfo( " before [" + AnnotationC.getShortCallSignature(method) + " :: " + beforeProxy.pointcut() + ']' ); } } Annotation[] afterAnnotations = manager.getAnnotations(ANNOTATION_AFTER, method); for (int i = 0; i < afterAnnotations.length; i++) { Annotation afterAnnotation = afterAnnotations[i]; if (afterAnnotation != null) { AfterAnnotationProxy afterProxy = (AfterAnnotationProxy) afterAnnotation; AnnotationC.registerCallParameters(afterProxy, method); enhancer.insertMethodAttribute( method, new AnnotationInfo(ANNOTATION_AFTER, afterProxy) ); logInfo( " after advice [" + AnnotationC.getShortCallSignature(method) + " :: " + afterProxy.pointcut() + ']' ); } } for (Iterator it = s_customAnnotations.keySet().iterator(); it.hasNext();) { String annotationName = (String) it.next(); Annotation[] customAnnotations = manager.getAnnotations(annotationName, method); for (int i = 0; i < customAnnotations.length; i++) { Annotation customAnnotation = customAnnotations[i]; if (customAnnotation != null) { enhancer.insertMethodAttribute( method, new AnnotationInfo(annotationName, customAnnotation) ); logInfo( " custom method annotation [" + annotationName + " @ " + method.getParentClass().getName() + '.' + method.getName() + ']' ); } } } } | 7954 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7954/1d0349e7ccf2153e1995788e5677af36e7510015/AnnotationC.java/buggy/aspectwerkz3/src/main/org/codehaus/aspectwerkz/annotation/AnnotationC.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
918,
1640,
1305,
5655,
12,
6385,
6090,
1318,
3301,
16,
4766,
7734,
727,
3601,
664,
25842,
2750,
570,
25842,
2750,
16,
4766,
7734,
727,
5110,
1305,
707,
13,
288,
3639,
368,
4686... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
918,
1640,
1305,
5655,
12,
6385,
6090,
1318,
3301,
16,
4766,
7734,
727,
3601,
664,
25842,
2750,
570,
25842,
2750,
16,
4766,
7734,
727,
5110,
1305,
707,
13,
288,
3639,
368,
4686... |
factory.updated( "", null ); | loggingConfig.updated( null ); | public void testManagedServiceConfiguration() throws Exception { Mock configFactory = new Mock( ConfigFactory.class ); GlobalConfigureStub stub = new GlobalConfigureStub(); configFactory.expects( atLeastOnce() ).method( "configure" ).with( NOT_NULL ).will( stub ); ResourceStub resourceStub = new ResourceStub(); // ML - Aug 15, 2005: Test using the basic configuration Mock bundle1 = new Mock( Bundle.class ); Hashtable<String,String> dictionary = new Hashtable<String, String>(); dictionary.put( LoggingServiceFactory.LOG4J_LOGGER_NAME, "bundle1" ); dictionary.put( LoggingServiceFactory.LOG4J_CONFIG_FILE, "./bundle1_log4j.properties" ); bundle1.expects( atLeastOnce() ).method( "getHeaders" ).will( returnValue( dictionary ) ); bundle1.expects( once() ).method( "getResource" ).will( resourceStub ); Bundle bundle = (Bundle) bundle1.proxy(); ServiceRegistration serviceRegistration = new TestServiceRegistration( bundle ); PaxLoggingService paxLogging = (PaxLoggingService) new Mock( PaxLoggingService.class ).proxy(); LoggingServiceFactory factory = new LoggingServiceFactory( (ConfigFactory) configFactory.proxy(), paxLogging ); factory.getService( bundle, serviceRegistration ); factory.updated( "", null ); // ML - Aug 15, 2005: Test using the global configuration String fileName = getClass().getClassLoader().getResource( "./global_log4j.properties" ).toString(); Hashtable<String, String> configuration = new Hashtable<String, String>(); configuration.put( LoggingServiceFactory.LOG4J_CONFIG_FILE, fileName ); stub.setState( 10 ); factory.updated( "", configuration ); // ML - Aug 15, 2005: Test reseting the global configuration stub.setState( 20 ); factory.updated( "", null ); configFactory.verify(); bundle1.verify(); } | 56296 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56296/a5aad7b04ceef24c7242f8f8c145abf92a11ebc3/Log4jServiceFactoryTestCase.java/clean/service/src/test/java/org/ops4j/pax/logging/test/Log4jServiceFactoryTestCase.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
10055,
1179,
1750,
1435,
3639,
1216,
1185,
565,
288,
3639,
7867,
642,
1733,
273,
394,
7867,
12,
1903,
1733,
18,
1106,
11272,
3639,
8510,
11207,
11974,
7168,
273,
394,
8510,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
10055,
1179,
1750,
1435,
3639,
1216,
1185,
565,
288,
3639,
7867,
642,
1733,
273,
394,
7867,
12,
1903,
1733,
18,
1106,
11272,
3639,
8510,
11207,
11974,
7168,
273,
394,
8510,... |
public UMOMessageDispatcher create(UMOConnector connector) throws UMOException | public UMOMessageDispatcher create(UMOImmutableEndpoint endpoint) throws UMOException | public UMOMessageDispatcher create(UMOConnector connector) throws UMOException { return new EjbMessageDispatcher((EjbConnector) connector); } | 2370 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2370/589f59b15144184ea22999b384d5ea92ddec8bb9/EjbMessageDispatcherFactory.java/clean/providers/ejb/src/java/org/mule/providers/ejb/EjbMessageDispatcherFactory.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
587,
5980,
1079,
6681,
752,
12,
2799,
51,
16014,
3293,
2494,
13,
1216,
587,
5980,
503,
565,
288,
3639,
327,
394,
512,
10649,
1079,
6681,
12443,
41,
10649,
7487,
13,
8703,
1769,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
587,
5980,
1079,
6681,
752,
12,
2799,
51,
16014,
3293,
2494,
13,
1216,
587,
5980,
503,
565,
288,
3639,
327,
394,
512,
10649,
1079,
6681,
12443,
41,
10649,
7487,
13,
8703,
1769,
565,... |
{ return this.passwordConfirm; } | { return this.passwordConfirm; } | public String getPasswordConfirm() { return this.passwordConfirm; } | 51612 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51612/8c7fded16a75ce2a1f0300235fd1af96b502ea2e/Register.java/buggy/wicket-library/src/java/wicket/addons/Register.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
514,
17397,
11269,
1435,
3639,
288,
5411,
327,
333,
18,
3664,
11269,
31,
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... | [
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
514,
17397,
11269,
1435,
3639,
288,
5411,
327,
333,
18,
3664,
11269,
31,
3639,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
mSession.getFolder().disableNotifications(); | i4folder.disableNotifications(); | boolean doSTORE(String tag, String sequenceSet, List<String> flagNames, byte operation, boolean silent, boolean byUID) throws IOException { if (!checkState(tag, ImapSession.STATE_SELECTED)) return CONTINUE_PROCESSING; else if (!mSession.getFolder().isWritable()) { sendNO(tag, "mailbox selected READ-ONLY"); return CONTINUE_PROCESSING; } String command = (byUID ? "UID STORE" : "STORE"); List<Tag> newTags = (operation != STORE_REMOVE ? new ArrayList<Tag>() : null); Set<ImapMessage> i4set; synchronized (mMailbox) { i4set = mSession.getFolder().getSubsequence(sequenceSet, byUID); } boolean allPresent = byUID || !i4set.contains(null); i4set.remove(null); try { // get set of relevant tags List<ImapFlag> i4flags; synchronized (mMailbox) { i4flags = findOrCreateTags(flagNames, newTags); } // if we're doing a STORE FLAGS (i.e. replace), precompute the new set of flags for all the affected messages long tags = 0; int flags = Flag.BITMASK_UNREAD; short sflags = 0; if (operation == STORE_REPLACE) { for (ImapFlag i4flag : i4flags) { if (Tag.validateId(i4flag.mId)) tags = (i4flag.mPositive ? tags | i4flag.mBitmask : tags & ~i4flag.mBitmask); else if (!i4flag.mPermanent) sflags = (byte) (i4flag.mPositive ? sflags | i4flag.mBitmask : sflags & ~i4flag.mBitmask); else flags = (int) (i4flag.mPositive ? flags | i4flag.mBitmask : flags & ~i4flag.mBitmask); } } long checkpoint = System.currentTimeMillis(); int i = 0; List<ImapMessage> i4list = new ArrayList<ImapMessage>(AlterTagOperation.SUGGESTED_BATCH_SIZE); List<Integer> idlist = new ArrayList<Integer>(AlterTagOperation.SUGGESTED_BATCH_SIZE); for (ImapMessage msg : i4set) { // we're sending 'em off in batches of 100 i4list.add(msg); idlist.add(msg.msgId); if (++i % AlterTagOperation.SUGGESTED_BATCH_SIZE != 0 && i != i4set.size()) continue; try { // if it was a STORE [+-]?FLAGS.SILENT, temporarily disable notifications if (silent) mSession.getFolder().disableNotifications(); if (operation == STORE_REPLACE) { // replace real tags and flags on all messages new SetTagsOperation(mSession, getContext(), mMailbox, Requester.IMAP, idlist, MailItem.TYPE_UNKNOWN, flags, tags, null).schedule(); // replace session tags on all messages for (ImapMessage i4msg : i4list) i4msg.setSessionFlags(sflags); } else if (!i4flags.isEmpty()) { for (ImapFlag i4flag : i4flags) { boolean add = operation == STORE_ADD ^ !i4flag.mPositive; if (i4flag.mPermanent) { // real tag; do a batch update to the DB new AlterTagOperation(mSession, getContext(), mMailbox, Requester.IMAP, idlist, MailItem.TYPE_UNKNOWN, i4flag.mId, add, null).schedule(); } else { // session tag; update one-by-one in memory only for (ImapMessage i4msg : i4list) i4msg.setSessionFlags((short) (add ? i4msg.sflags | i4flag.mBitmask : i4msg.sflags & ~i4flag.mBitmask)); } } } } finally { // if it was a STORE [+-]?FLAGS.SILENT, reenable notifications mSession.getFolder().enableNotifications(); } if (!silent) { for (ImapMessage i4msg : i4list) { mSession.getFolder().undirtyMessage(i4msg); StringBuilder ntfn = new StringBuilder(); ntfn.append(i4msg.sequence).append(" FETCH (").append(i4msg.getFlags(mSession)); // 6.4.8: "However, server implementations MUST implicitly include // the UID message data item as part of any FETCH response // caused by a UID command..." if (byUID) ntfn.append(" UID ").append(i4msg.imapUid); sendUntagged(ntfn.append(')').toString()); } } else { // send a gratuitous untagged response to keep pissy clients from closing the socket from inactivity long now = System.currentTimeMillis(); if (now - checkpoint > MAXIMUM_IDLE_PROCESSING_MILLIS) { sendIdleUntagged(); checkpoint = now; } } } } catch (ServiceException e) { deleteTags(newTags); ZimbraLog.imap.warn(command + " failed", e); sendNO(tag, command + " failed"); return canContinue(e); } sendNotifications(false, false); // RFC 2180 4.2.1: "If the ".SILENT" suffix is used, and the STORE completed successfully for // all the non-expunged messages, the server SHOULD return a tagged OK." // RFC 2180 4.2.3: "If the ".SILENT" suffix is not used, and a mixture of expunged and non- // expunged messages are referenced, the server MAY set the flags and return // a FETCH response for the non-expunged messages along with a tagged NO." if (silent || allPresent) sendOK(tag, command + " completed"); else sendNO(tag, command + " completed"); return CONTINUE_PROCESSING; } | 6965 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6965/850f66dfd6c92a9a888f9b12bbfb0a9a2081edb1/ImapHandler.java/buggy/ZimbraServer/src/java/com/zimbra/cs/imap/ImapHandler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1250,
741,
13651,
12,
780,
1047,
16,
514,
3102,
694,
16,
987,
32,
780,
34,
2982,
1557,
16,
1160,
1674,
16,
1250,
10404,
16,
1250,
635,
3060,
13,
1216,
1860,
288,
3639,
309,
16051,
1893,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1250,
741,
13651,
12,
780,
1047,
16,
514,
3102,
694,
16,
987,
32,
780,
34,
2982,
1557,
16,
1160,
1674,
16,
1250,
10404,
16,
1250,
635,
3060,
13,
1216,
1860,
288,
3639,
309,
16051,
1893,... |
public void actionPerformed(ActionEvent e) { startCompareAction.setEnabled(false); CompareDMFrame cf = null; try { SQLObject left = source.getObjectToCompare(); if (left.getChildType() == SQLTable.class) { sourceTables = left.getChildren(); } else { sourceTables = new ArrayList(); } SQLObject right = target.getObjectToCompare(); if (right.getChildType() == SQLTable.class) { targetTables = right.getChildren(); } else { targetTables = new ArrayList(); } // XXX: should do most or all of this work in a worker thread Map<DiffType, AttributeSet> styles = new HashMap<DiffType, AttributeSet>(); { SimpleAttributeSet att = new SimpleAttributeSet(); StyleConstants.setForeground(att, Color.green); styles.put(DiffType.LEFTONLY, att); att = new SimpleAttributeSet(); StyleConstants.setForeground(att, Color.red); styles.put(DiffType.RIGHTONLY, att); att = new SimpleAttributeSet(); StyleConstants.setForeground(att, Color.black); styles.put(DiffType.SAME, att); att = new SimpleAttributeSet(); StyleConstants.setForeground(att, Color.orange); styles.put(DiffType.MODIFIED, att); } CompareSQL sourceComp = new CompareSQL(sourceTables, targetTables); List<DiffChunk<SQLObject>> diff = sourceComp.generateTableDiffs(); CompareSQL targetComp = new CompareSQL(targetTables, sourceTables); List<DiffChunk<SQLObject>> diff1 = targetComp.generateTableDiffs(); DefaultStyledDocument sourceDoc = new DefaultStyledDocument(); DefaultStyledDocument targetDoc = new DefaultStyledDocument(); if (sqlButton.isSelected()) { throw new UnsupportedOperationException( "We don't support DDL generation yet"); } else if (englishButton.isSelected()) { for (DiffChunk<SQLObject> chunk : diff) { sourceDoc.insertString( sourceDoc.getLength(), chunk.getData().toString()+"\n", styles.get(chunk.getType())); } for (DiffChunk<SQLObject> chunk1 : diff1) { targetDoc.insertString( targetDoc.getLength(), chunk1.getData().toString()+"\n", styles.get(chunk1.getType())); } } else { throw new IllegalStateException( "Don't know what type of output to make"); } // get the title string for the compareDMFrame String compMethod = null; if (sqlButton.isSelected()) { compMethod = "SQL"; } else { compMethod = OUTPUT_ENGLISH; } String titleString = "Comparing " +left.getName() + " to " + right.getName() + " using " + compMethod; cf = new CompareDMFrame( sourceDoc, targetDoc, titleString, source.getDatabase()); cf.pack(); cf.setVisible(true); } catch (ArchitectDiffException ex) { JOptionPane.showMessageDialog( CompareDMPanel.this, "Could not perform the diff:\n"+ex.getMessage(), "Diff Error", JOptionPane.ERROR_MESSAGE); logger.error("Couldn't do diff", ex); } catch (ArchitectException exp) { ASUtils.showExceptionDialog( "StartCompareAction failed", exp); logger.error("StartCompareAction failed", exp); } catch (FileNotFoundException ex) { ASUtils.showExceptionDialog("Your file could not be found.", ex); logger.error("File could not be found.", ex); } catch (IOException ex) { ASUtils.showExceptionDialog("Could not read file", ex); logger.error("Could not read file", ex); } catch (BadLocationException ex) { ASUtils.showExceptionDialog("Could not create document for results", ex); logger.error("Could not create document for results", ex); } catch (Exception ex) { ASUtils.showExceptionDialog("Unxepected Exception!", ex); logger.error("Unxepected Exception!", ex); } finally { this.setEnabled(isStartable()); } } | 53257 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/53257/561a8da5f06185bff5888ce0a4e1985fcee845da/CompareDMPanel.java/clean/src/ca/sqlpower/architect/swingui/CompareDMPanel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
918,
26100,
12,
1803,
1133,
425,
13,
288,
1082,
202,
1937,
8583,
1803,
18,
542,
1526,
12,
5743,
1769,
1082,
202,
8583,
16125,
3219,
6080,
273,
446,
31,
1082,
202,
698,
288,
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,
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,
26100,
12,
1803,
1133,
425,
13,
288,
1082,
202,
1937,
8583,
1803,
18,
542,
1526,
12,
5743,
1769,
1082,
202,
8583,
16125,
3219,
6080,
273,
446,
31,
1082,
202,
698,
288,
9... | ||
protected RemoteProActiveRuntime createRemoteProActiveRuntime()throws java.rmi.RemoteException,java.rmi.AlreadyBoundException { return new RemoteProActiveRuntimeImpl(); } | protected RemoteProActiveRuntime createRemoteProActiveRuntime() throws java.rmi.RemoteException, java.rmi.AlreadyBoundException { return new RemoteProActiveRuntimeImpl(); } | protected RemoteProActiveRuntime createRemoteProActiveRuntime()throws java.rmi.RemoteException,java.rmi.AlreadyBoundException { return new RemoteProActiveRuntimeImpl(); } | 23362 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/23362/c171c3550f70b496c1228bbed45f5f8feea45a9c/RemoteProActiveRuntimeAdapter.java/buggy/src/org/objectweb/proactive/core/runtime/rmi/RemoteProActiveRuntimeAdapter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
6304,
626,
3896,
5576,
752,
5169,
626,
3896,
5576,
1435,
15069,
2252,
18,
8864,
77,
18,
5169,
503,
16,
6290,
18,
8864,
77,
18,
9430,
3499,
503,
202,
95,
202,
202,
2463,
394,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
6304,
626,
3896,
5576,
752,
5169,
626,
3896,
5576,
1435,
15069,
2252,
18,
8864,
77,
18,
5169,
503,
16,
6290,
18,
8864,
77,
18,
9430,
3499,
503,
202,
95,
202,
202,
2463,
394,
... |
if (!hc.isInterface() && !done.contains(hc)) { done.add(hc); HClass sc = hc.getSuperclass(); if (sc!=null) forDescriptor(sc.getDescriptor()); fixup(hc); for (Iterator<HMethod> it=new ArrayIterator<HMethod> (hc.getDeclaredMethods()); it.hasNext(); ) { HMethod hm = it.next(); forDescriptor(hm.getReturnType().getDescriptor()); for (Iterator<HClass> it2=new ArrayIterator<HClass> (hm.getParameterTypes()); it2.hasNext(); ) forDescriptor(it2.next().getDescriptor()); } for (Iterator<HField> it=new ArrayIterator<HField> (hc.getDeclaredFields()); it.hasNext(); ) forDescriptor(it.next().getType().getDescriptor()); } | depth--; deferred.add(hc); if (depth==0) while (!deferred.isEmpty()) resolve(deferred.removeFirst()); | public HClass forDescriptor(String descriptor) { HClass hc = super.forDescriptor(descriptor); // okay, now scan the class and fix it up. if (!hc.isInterface() && !done.contains(hc)) { done.add(hc);// properly handle incidental recursion inside fixup() // we should first fix up the superclass(es), if any. HClass sc = hc.getSuperclass(); if (sc!=null) forDescriptor(sc.getDescriptor()); // recurse! // okay, now fix this class up. fixup(hc); // and to prevent fixup from happening at inopportune times // (such as after we start modifying method signatures) // we're going to be aggressive in fixing up other classes // mentioned in fields and methods of this one. // fix up classes mentioned in method signatures for (Iterator<HMethod> it=new ArrayIterator<HMethod> (hc.getDeclaredMethods()); it.hasNext(); ) { HMethod hm = it.next(); forDescriptor(hm.getReturnType().getDescriptor()); for (Iterator<HClass> it2=new ArrayIterator<HClass> (hm.getParameterTypes()); it2.hasNext(); ) forDescriptor(it2.next().getDescriptor()); } // and those in field signatures. for (Iterator<HField> it=new ArrayIterator<HField> (hc.getDeclaredFields()); it.hasNext(); ) forDescriptor(it.next().getType().getDescriptor()); } // done! return hc; } | 2866 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2866/54d4e1b45868a322fff3a89eafbd4c2e57bf67a1/AbstractClassFixupRelinker.java/buggy/Analysis/AbstractClassFixupRelinker.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
670,
797,
364,
3187,
12,
780,
4950,
13,
288,
202,
44,
797,
11684,
273,
2240,
18,
1884,
3187,
12,
12628,
1769,
202,
759,
21194,
16,
2037,
4135,
326,
667,
471,
2917,
518,
731,
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,
670,
797,
364,
3187,
12,
780,
4950,
13,
288,
202,
44,
797,
11684,
273,
2240,
18,
1884,
3187,
12,
12628,
1769,
202,
759,
21194,
16,
2037,
4135,
326,
667,
471,
2917,
518,
731,
18,
... |
return o instanceof MUseCase && ((MExtensionPoint)getTarget()).getUseCase() == o; | return o instanceof MUseCase && ((MExtensionPoint) getTarget()).getUseCase() == o; | protected boolean isValidElement(MBase o) { return o instanceof MUseCase && ((MExtensionPoint)getTarget()).getUseCase() == o; } | 7166 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7166/ca3bcb5d6dd283c4553bcbfe50b108dc5d499768/UMLExtensionPointUseCaseListModel.java/buggy/src_new/org/argouml/uml/ui/behavior/use_cases/UMLExtensionPointUseCaseListModel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
1250,
4908,
1046,
12,
49,
2171,
320,
13,
288,
3639,
327,
320,
1276,
490,
3727,
2449,
597,
14015,
49,
3625,
2148,
13,
8571,
1435,
2934,
588,
3727,
2449,
1435,
422,
320,
31,
565,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
1250,
4908,
1046,
12,
49,
2171,
320,
13,
288,
3639,
327,
320,
1276,
490,
3727,
2449,
597,
14015,
49,
3625,
2148,
13,
8571,
1435,
2934,
588,
3727,
2449,
1435,
422,
320,
31,
565,
28... |
if ( stable == false ) | if (stable == false) | public void setAggregateAbilitiesStable(final AbilityCategory aCategory, final boolean stable) { if ( stable == false ) { cachedWeaponProfs = null; } if ( aCategory == AbilityCategory.FEAT ) { setAggregateFeatsStable(stable); return; } if ( aCategory == null ) { if ( stable == false ) { // Clear all the categories for ( final AbilityCategory cat : theAbilities.getKeySet() ) { setAggregateAbilitiesStable( cat, stable ); } } setAggregateFeatsStable(stable); return; } if ( stable == false ) { theAbilities.put(aCategory, Ability.Nature.AUTOMATIC, null); // TODO - Deal with non-aggregate virtual abilities (i.e. from ADD:) theAbilities.put(aCategory, Ability.Nature.VIRTUAL, null); } } | 48301 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48301/376816acf8bf134fa77bd6ea5c602dbe9af9bfbd/PlayerCharacter.java/clean/code/src/java/pcgen/core/PlayerCharacter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
444,
11490,
5895,
5076,
30915,
12,
6385,
9771,
1889,
4457,
279,
4457,
16,
6862,
6862,
1082,
202,
6385,
1250,
14114,
13,
202,
95,
202,
202,
430,
261,
14114,
422,
629,
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,
225,
202,
482,
918,
444,
11490,
5895,
5076,
30915,
12,
6385,
9771,
1889,
4457,
279,
4457,
16,
6862,
6862,
1082,
202,
6385,
1250,
14114,
13,
202,
95,
202,
202,
430,
261,
14114,
422,
629,
262,
... |
Class[] parameterTypes; Method m = null; if (arity.isFixed()) { parameterTypes = new Class[arity.getValue()]; Arrays.fill(parameterTypes, IRubyObject.class); } else { parameterTypes = new Class[1]; parameterTypes[0] = IRubyObject[].class; } try { m = type.getMethod(name, parameterTypes); } catch (NoSuchMethodException e) { assert false : e; } catch (SecurityException e) { assert false : e; } this.method = m; | loadMethod(); | public ReflectionCallback(Class type, String name, Arity arity) { super(type, name, arity); assert type != null; assert name != null; assert arity != null; Class[] parameterTypes; Method m = null; if (arity.isFixed()) { parameterTypes = new Class[arity.getValue()]; Arrays.fill(parameterTypes, IRubyObject.class); } else { parameterTypes = new Class[1]; parameterTypes[0] = IRubyObject[].class; } try { m = type.getMethod(name, parameterTypes); } catch (NoSuchMethodException e) { assert false : e; } catch (SecurityException e) { assert false : e; } this.method = m; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/803c66ee682936beecc8a43fe2cfc90fe5645b22/ReflectionCallback.java/buggy/src/org/jruby/runtime/callback/ReflectionCallback.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
5685,
2428,
12,
797,
618,
16,
514,
508,
16,
1201,
560,
19353,
13,
288,
3639,
2240,
12,
723,
16,
508,
16,
19353,
1769,
3639,
1815,
618,
480,
446,
31,
3639,
1815,
508,
480,
446,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
5685,
2428,
12,
797,
618,
16,
514,
508,
16,
1201,
560,
19353,
13,
288,
3639,
2240,
12,
723,
16,
508,
16,
19353,
1769,
3639,
1815,
618,
480,
446,
31,
3639,
1815,
508,
480,
446,
3... |
next = CONFIG_COLLECTION + path.substring(0, p); | next = CONFIG_COLLECTION + path.substring(0, p); | protected CollectionConfiguration getConfiguration(DBBroker broker, Collection collection) throws CollectionConfigurationException { LOG.debug("Reading config for " + collection.getName()); CollectionConfiguration conf = new CollectionConfiguration(collection); String path = collection.getName() + '/'; int p = "/db".length(); String next; Collection coll = null; while(p != -1) { next = CONFIG_COLLECTION + path.substring(0, p); try { coll = broker.openCollection(next, Lock.READ_LOCK); if (coll != null && coll.getDocumentCount() > 0) { for(Iterator i = coll.iterator(broker); i.hasNext(); ) { DocumentImpl confDoc = (DocumentImpl) i.next(); if(confDoc.getFileName().endsWith(CollectionConfiguration.COLLECTION_CONFIG_SUFFIX)) { if(LOG.isDebugEnabled()) LOG.debug("Reading config for " + collection.getName() + " from " + confDoc.getName()); conf.read(broker, confDoc); break; } } } } finally { if(coll != null) coll.release(); } p = path.indexOf('/', p + 1); } // we synchronize on the global CollectionCache to avoid deadlocks. // the calling code does mostly already hold a lock on CollectionCache. CollectionCache collectionCache = pool.getCollectionsCache(); synchronized (collectionCache) { cache.put(collection.getName(), conf); } return conf; } | 2909 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2909/79fabc38151da6744682af61ffcf9ab799210c21/CollectionConfigurationManager.java/buggy/src/org/exist/collections/CollectionConfigurationManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
2200,
1750,
10316,
12,
2290,
11194,
8625,
16,
2398,
2200,
1849,
13,
1216,
2200,
10737,
288,
377,
202,
4842,
18,
4148,
2932,
15714,
642,
364,
315,
397,
1849,
18,
17994,
10663,
377,
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,
4750,
2200,
1750,
10316,
12,
2290,
11194,
8625,
16,
2398,
2200,
1849,
13,
1216,
2200,
10737,
288,
377,
202,
4842,
18,
4148,
2932,
15714,
642,
364,
315,
397,
1849,
18,
17994,
10663,
377,
2... |
public YearDatatypeValidator() throws InvalidDatatypeFacetException{ | public YearDatatypeValidator() { | public YearDatatypeValidator() throws InvalidDatatypeFacetException{ super(); } | 6373 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6373/4b01142cc37cb03a4b40a1d07569328af4773755/YearDatatypeValidator.java/clean/src/org/apache/xerces/impl/v2/datatypes/YearDatatypeValidator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
225,
16666,
20228,
5126,
1435,
225,
288,
3639,
2240,
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,
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,
377,
1071,
225,
16666,
20228,
5126,
1435,
225,
288,
3639,
2240,
5621,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
return radioGroup; | return area; | protected Control createCustomArea(Composite parent) { Composite radioGroup = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.marginWidth = layout.marginHeight = 0; layout.numColumns = 3; radioGroup.setLayout(layout); radioGroup.setLayoutData(new GridData(GridData.FILL_BOTH)); SelectionListener updateEnablement = new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { updateEnablement(); } }; IDialogSettings settings = getDialogSettings(DIALOG_SETTINGS_SECTION); boolean selectSelectedButton= settings.getBoolean(TOGGLE_SELECTED); //first row allButton = new Button(radioGroup, SWT.RADIO); allButton.setText(IDEWorkbenchMessages.CleanDialog_cleanAllButton); allButton.setSelection(!selectSelectedButton); allButton.addSelectionListener(updateEnablement); //empty label to fill rest of grid row new Label(radioGroup, SWT.NONE); new Label(radioGroup, SWT.NONE); //second row selectedButton = new Button(radioGroup, SWT.RADIO); selectedButton.setText(IDEWorkbenchMessages.CleanDialog_cleanSelectedButton); GridData data = new GridData(); data.verticalAlignment = SWT.TOP; selectedButton.setLayoutData(data); selectedButton.setSelection(selectSelectedButton); selectedButton.addSelectionListener(updateEnablement); createProjectSelectionTable(radioGroup); //only prompt for immediate build if autobuild is off if (!ResourcesPlugin.getWorkspace().isAutoBuilding()) { buildNowButton = new Button(parent, SWT.CHECK); buildNowButton.setText(IDEWorkbenchMessages.CleanDialog_buildNowButton); String buildNow = settings.get(BUILD_NOW); buildNowButton.setSelection(buildNow == null || Boolean.valueOf(buildNow).booleanValue()); buildNowButton.setLayoutData(new GridData( GridData.HORIZONTAL_ALIGN_BEGINNING)); } projectNames.getTable().setEnabled(selectSelectedButton); return radioGroup; } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/a529e631f4f1c73626b9fb97d95ac6b0b67d2241/CleanDialog.java/clean/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/CleanDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
8888,
752,
3802,
5484,
12,
9400,
982,
13,
288,
3639,
14728,
13512,
1114,
273,
394,
14728,
12,
2938,
16,
348,
8588,
18,
9826,
1769,
3639,
7145,
3744,
3511,
273,
394,
7145,
3744,
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,
377,
4750,
8888,
752,
3802,
5484,
12,
9400,
982,
13,
288,
3639,
14728,
13512,
1114,
273,
394,
14728,
12,
2938,
16,
348,
8588,
18,
9826,
1769,
3639,
7145,
3744,
3511,
273,
394,
7145,
3744,
5621... |
setImage(checkIcon()); | setImage(checkIcon()); | public boolean refresh() { if (isDisposed()) return false; boolean changed= false; boolean isGroup= jobTreeElement instanceof GroupInfo; Object[] roots= contentProviderGetChildren(jobTreeElement); // poll for properties checkKeep(); if (image == null) setImage(checkIcon()); // name String name; if (jobTerminated) { name= "Terminated: " + jobTreeElement.getCondensedDisplayString(); } else { name= jobTreeElement.getDisplayString(); int ll= name.length(); if (ll > 0) { if (name.charAt(0) == '(') { int pos= name.indexOf("%) "); if (pos >= 0) name= name.substring(pos+3); } else if (name.charAt(ll-1) == ')') { int pos= name.lastIndexOf(": ("); if (pos >= 0) name= name.substring(0, pos); } } } if (DEBUG) { if (isGroup) name= "G " + name; //$NON-NLS-1$ if (jobTreeElement.getParent() != null) name= "X " + name; //$NON-NLS-1$ } nameItem.setText(shortenText(nameItem, name)); // percentage if (jobTreeElement instanceof JobInfo) { TaskInfo ti= ((JobInfo)jobTreeElement).getTaskInfo(); if (ti != null) changed |= setPercentDone(ti.getPercentDone()); } else if (isGroup) { if (roots.length == 1 && roots[0] instanceof JobTreeElement) { TaskInfo ti= ((JobInfo)roots[0]).getTaskInfo(); if (ti != null) changed |= setPercentDone(ti.getPercentDone()); } else { GroupInfo gi= (GroupInfo) jobTreeElement; changed |= setPercentDone(gi.getPercentDone()); } } // children if (!jobTreeElement.hasChildren()) return changed; Control[] children= getChildren(); int n= 0; for (int i= 0; i < children.length; i++) if (children[i] instanceof Hyperlink) n++; if (roots.length == n) { // reuse all children int z= 0; for (int i= 0; i < children.length; i++) { if (children[i] instanceof Hyperlink) { Hyperlink l= (Hyperlink) children[i]; l.init((JobTreeElement) roots[z++]); } } } else { HashSet modelJobs= new HashSet(); for (int z= 0; z < roots.length; z++) modelJobs.add(roots[z]); // find all removed HashSet shownJobs= new HashSet(); for (int i= 0; i < children.length; i++) { if (children[i] instanceof Hyperlink) { JobTreeItem ji= (JobTreeItem)children[i]; shownJobs.add(ji.jobTreeElement); if (modelJobs.contains(ji.jobTreeElement)) { ji.refresh(); } else { changed |= ji.remove(); } } } // find all added for (int i= 0; i < roots.length; i++) { Object element= roots[i]; if (!shownJobs.contains(element)) { JobTreeElement jte= (JobTreeElement)element; new Hyperlink(this, jte); changed= true; } } } return changed; } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/48f578c42f066647880e2e114a60cb6b6c342b16/NewProgressViewer.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/NewProgressViewer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
1250,
4460,
1435,
288,
1082,
565,
309,
261,
291,
1669,
7423,
10756,
1082,
3639,
327,
629,
31,
1082,
202,
6494,
3550,
33,
629,
31,
1082,
565,
1250,
353,
1114,
33,
1719,
2471,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1250,
4460,
1435,
288,
1082,
565,
309,
261,
291,
1669,
7423,
10756,
1082,
3639,
327,
629,
31,
1082,
202,
6494,
3550,
33,
629,
31,
1082,
565,
1250,
353,
1114,
33,
1719,
2471,
... |
assertNull( "Returned incorrect InetSocketAddress -unconnected socket:" + "Expected: NULL", theSocket .getRemoteSocketAddress()); | assertNull("Returned incorrect InetSocketAddress -unconnected socket:" + "Expected: NULL", theSocket.getRemoteSocketAddress()); | public void test_getRemoteSocketAddress() { // set up server connect and then validate that we get the right // response for the remote address try { int sport = startServer("SServer getLocRemoteAddress"); int portNumber = Support_PortManager.getNextPort(); s = new Socket(InetAddress.getLocalHost(), sport, null, portNumber); assertTrue("Returned incorrect InetSocketAddress(1):" + s.getLocalSocketAddress().toString(), s .getRemoteSocketAddress().equals( new InetSocketAddress(InetAddress.getLocalHost(), sport))); s.close(); // now create one that is not connect and validate that we get the // right answer Socket theSocket = new Socket(); portNumber = Support_PortManager.getNextPort(); theSocket.bind(new InetSocketAddress(InetAddress.getLocalHost(), portNumber)); assertNull( "Returned incorrect InetSocketAddress -unconnected socket:" + "Expected: NULL", theSocket .getRemoteSocketAddress()); // now connect and validate we get the right answer theSocket.connect(new InetSocketAddress(InetAddress.getLocalHost(), sport)); assertTrue("Returned incorrect InetSocketAddress(2):" + theSocket.getRemoteSocketAddress().toString(), theSocket .getRemoteSocketAddress().equals( new InetSocketAddress(InetAddress.getLocalHost(), sport))); theSocket.close(); } catch (Exception e) { fail("Exception during getRemoteSocketAddress test: " + e); } } | 54769 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54769/bc86cd1e314cd948b1f872a54b5075cf2678bc4a/SocketTest.java/clean/modules/luni/src/test/java/tests/api/java/net/SocketTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
67,
588,
5169,
15520,
1435,
288,
202,
202,
759,
444,
731,
1438,
3077,
471,
1508,
1954,
716,
732,
336,
326,
2145,
202,
202,
759,
766,
364,
326,
2632,
1758,
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,
482,
918,
1842,
67,
588,
5169,
15520,
1435,
288,
202,
202,
759,
444,
731,
1438,
3077,
471,
1508,
1954,
716,
732,
336,
326,
2145,
202,
202,
759,
766,
364,
326,
2632,
1758,
202,
202,... |
if ( !isEquals( tmpDataSetName, tmpDataSetName1 ) ) | if ( !EcoreUtil.equals( tmpDataSet, tmpDataSet1 ) ) | boolean isUpdatedReportParameter( ScalarParameterHandle reportParam, ParameterDefinition odaParam, String newDataType ) { if ( reportParam == null || odaParam == null ) return true; DataElementAttributes dataAttrs = odaParam.getAttributes( ); boolean allowNull = reportParam.allowNull( ); Boolean odaAllowNull = getROMNullability( dataAttrs.getNullability( ) ); if ( odaAllowNull != null && allowNull != odaAllowNull.booleanValue( ) ) return false; if ( !DesignChoiceConstants.PARAM_TYPE_ANY .equalsIgnoreCase( newDataType ) ) { if ( !isEquals( newDataType, reportParam.getDataType( ) ) ) return false; } DataElementUIHints dataUiHints = dataAttrs.getUiHints( ); if ( dataUiHints != null ) { String newPromptText = dataUiHints.getDisplayName( ); String newHelpText = dataUiHints.getDescription( ); if ( !isEquals( newPromptText, reportParam.getPromptText( ) ) ) return false; if ( !isEquals( newHelpText, reportParam.getHelpText( ) ) ) return false; } InputParameterAttributes paramAttrs = odaParam.getInputAttributes( ); InputParameterAttributes tmpParamDefn = null; String tmpDataSetName = null; if ( paramAttrs != null ) { tmpParamDefn = (InputParameterAttributes) EcoreUtil .copy( paramAttrs ); DynamicValuesQuery tmpDynamicQuery = tmpParamDefn .getElementAttributes( ).getDynamicValueChoices( ); if ( tmpDynamicQuery != null ) { tmpDataSetName = tmpDynamicQuery.getDataSetDesign( ).getName( ); tmpDynamicQuery.setDataSetDesign( null ); } if ( tmpParamDefn.getUiHints( ) != null ) { tmpParamDefn.setUiHints( null ); } } else tmpParamDefn = DesignFactory.eINSTANCE .createInputParameterAttributes( ); InputParameterAttributes tmpParamDefn1 = DesignFactory.eINSTANCE .createInputParameterAttributes( ); updateInputElementAttrs( tmpParamDefn1, reportParam, null ); if ( tmpParamDefn1.getUiHints( ) != null ) { tmpParamDefn1.setUiHints( null ); } DynamicValuesQuery tmpDynamicQuery1 = tmpParamDefn1 .getElementAttributes( ).getDynamicValueChoices( ); String tmpDataSetName1 = null; if ( tmpDynamicQuery1 != null ) { tmpDataSetName1 = tmpDynamicQuery1.getDataSetDesign( ).getName( ); tmpDynamicQuery1.setDataSetDesign( null ); } if ( !isEquals( tmpDataSetName, tmpDataSetName1 ) ) return false; return EcoreUtil.equals( tmpParamDefn, tmpParamDefn1 ); } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/ad565a6fb083b0cb4f39f81200f9f34cc2de99fe/ReportParameterAdapter.java/clean/model/org.eclipse.birt.report.model.adapter.oda/src/org/eclipse/birt/report/model/adapter/oda/ReportParameterAdapter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
6494,
353,
7381,
4820,
1662,
12,
15791,
1662,
3259,
2605,
786,
16,
1082,
202,
1662,
1852,
320,
2414,
786,
16,
514,
394,
6273,
262,
202,
95,
202,
202,
430,
261,
2605,
786,
422,
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,
6494,
353,
7381,
4820,
1662,
12,
15791,
1662,
3259,
2605,
786,
16,
1082,
202,
1662,
1852,
320,
2414,
786,
16,
514,
394,
6273,
262,
202,
95,
202,
202,
430,
261,
2605,
786,
422,
446,... |
PDBPolymer moleculePDB1 = (PDBPolymer)polymer; | public void testSFBug1085912_1() throws Exception { String filename_pdb = "data/pdb/1CKV.pdb"; String filename_cml = "data/cml/1CKV.cml"; InputStream ins1 = this.getClass().getClassLoader().getResourceAsStream(filename_pdb); InputStream ins2 = this.getClass().getClassLoader().getResourceAsStream(filename_cml); try { /*1*/ IChemObjectReader reader = new PDBReader(ins1); IChemFile chemFile = (IChemFile) reader.read(new NNChemFile()); IChemSequence seq = chemFile.getChemSequence(0); IChemModel model = seq.getChemModel(0); IAtomContainer container = model.getMoleculeSet().getMolecule(0); IBioPolymer polymer = (IBioPolymer)container; PDBPolymer moleculePDB1 = (PDBPolymer)polymer; StringWriter writer = new StringWriter(); CMLWriter cmlWriter = new CMLWriter(writer); cmlWriter.write(moleculePDB1); String cmlContent1 = writer.toString(); /*2*/ CMLReader reader2 = new CMLReader(new ByteArrayInputStream(cmlContent1.getBytes())); IChemFile chemFil2 = (IChemFile)reader2.read(new NNChemFile()); IChemSequence seq2 = chemFil2.getChemSequence(0); IChemModel model2 = seq2.getChemModel(0); IMolecule container2 = model2.getMoleculeSet().getMolecule(0); IBioPolymer polymer2 = (IBioPolymer)container2; PDBPolymer moleculePDB2 = (PDBPolymer)polymer2; StringWriter writer2 = new StringWriter(); CMLWriter cmlWriter2 = new CMLWriter(writer2); cmlWriter2.write(moleculePDB2); String cmlContent2 = writer2.toString(); /*3*/ CMLReader reader3 = new CMLReader(ins2); IChemFile chemFil3 = (IChemFile)reader3.read(new NNChemFile()); IChemSequence seq3 = chemFil3.getChemSequence(0); IChemModel model3 = seq3.getChemModel(0); IAtomContainer container3 = model3.getMoleculeSet().getMolecule(0); IBioPolymer polymer3 = (IBioPolymer)container3; PDBPolymer moleculePDB3 = (PDBPolymer)polymer3; StringWriter writer3 = new StringWriter(); CMLWriter cmlWriter3 = new CMLWriter(writer3); cmlWriter3.write(moleculePDB3); String cmlContent3 = writer3.toString(); assertEquals(cmlContent1,cmlContent2); assertEquals(cmlContent3,cmlContent2); assertEquals(moleculePDB1,moleculePDB2); for(int i = 0; i < moleculePDB2.getAtomCount() ; i++) assertEquals(((PDBAtom)moleculePDB1.getAtom(i)).getResName(),((PDBAtom)moleculePDB2.getAtom(i)).getResName()); } catch (Exception ex) { fail(ex.getMessage()); } } | 45254 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45254/2a939a94486794ee0ca07c58f450714250d67e84/CML2Test.java/buggy/src/org/openscience/cdk/test/io/cml/CML2Test.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
22395,
19865,
21770,
6162,
2138,
67,
21,
1435,
1216,
1185,
288,
202,
202,
780,
1544,
67,
17414,
273,
315,
892,
19,
17414,
19,
21,
3507,
58,
18,
17414,
14432,
202,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
22395,
19865,
21770,
6162,
2138,
67,
21,
1435,
1216,
1185,
288,
202,
202,
780,
1544,
67,
17414,
273,
315,
892,
19,
17414,
19,
21,
3507,
58,
18,
17414,
14432,
202,
2... | |
if (listIndexPosition > 0) { Object newRoot = getValue(parentProperty, root, true); Method method = OgnlRuntime.getGetMethod(createContext(), newRoot.getClass(), childProperty.substring(0, listIndexPosition)); Type returnType = method.getGenericReturnType(); if (returnType instanceof ParameterizedType) { ParameterizedType ptype = (ParameterizedType) returnType; Type actualType = null; | if (listIndexPosition > 0) { Method method = OgnlRuntime.getGetMethod(createContext(), newRoot.getClass(), childProperty.substring(0, listIndexPosition)); Type returnType = method.getGenericReturnType(); if (returnType instanceof ParameterizedType) { ParameterizedType ptype = (ParameterizedType) returnType; Type actualType = null; | public static Class getPropertyClass(String property, Object root) throws OgnlException, IntrospectionException { Class propertyClass = null; int propertyIndex = propertySplit(property); if (propertyIndex > 0) { // foo.bar.baz.splat => parent: "foo.bar.baz" and child: "splat" String parentProperty = property.substring(0,propertyIndex); String childProperty = property.substring(propertyIndex+1); // We need to handle the case where the last chunk of the expression references // a List or a Map int listIndexPosition = childProperty.indexOf("["); if (listIndexPosition > 0) { Object newRoot = getValue(parentProperty, root, true); Method method = OgnlRuntime.getGetMethod(createContext(), newRoot.getClass(), childProperty.substring(0, listIndexPosition)); Type returnType = method.getGenericReturnType(); if (returnType instanceof ParameterizedType) { ParameterizedType ptype = (ParameterizedType) returnType; Type actualType = null; // Get the right type parameter for List<X> and Map<?,X> if (List.class.isAssignableFrom((Class) ptype.getRawType())) { actualType = ptype.getActualTypeArguments()[0]; } else if (Map.class.isAssignableFrom((Class) ptype.getRawType())) { actualType = ptype.getActualTypeArguments()[1]; } if (actualType instanceof Class) { propertyClass = (Class) actualType; } } // If we can't figure it out, let's try String! if (propertyClass == null) { propertyClass = String.class; } } else { Object newRoot = getValue(parentProperty,root, true); Method method = OgnlRuntime.getGetMethod(createContext(), newRoot.getClass(), childProperty); if (method == null) { throw new NoSuchPropertyException(root,property); } propertyClass = method.getReturnType(); } } else { Method method = OgnlRuntime.getGetMethod(createContext(), root.getClass(), property); if (method == null) { throw new NoSuchPropertyException(root,property); } propertyClass = method.getReturnType(); } return propertyClass; } | 9306 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9306/52587539eb8659cd0d6fe7284e88b41375fe185c/OgnlUtil.java/clean/stripes/src/net/sourceforge/stripes/util/OgnlUtil.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1659,
3911,
797,
12,
780,
1272,
16,
1033,
1365,
13,
1216,
531,
1600,
80,
503,
16,
28524,
2868,
3094,
26362,
503,
288,
3639,
1659,
1272,
797,
273,
446,
31,
3639,
509,
1272,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1659,
3911,
797,
12,
780,
1272,
16,
1033,
1365,
13,
1216,
531,
1600,
80,
503,
16,
28524,
2868,
3094,
26362,
503,
288,
3639,
1659,
1272,
797,
273,
446,
31,
3639,
509,
1272,
10... |
} catch(Exception exc) { | } catch(RuntimeException exc) { | public Object getValueAt(Object node, int column) { Object value = getObject(node); Context cx = Context.enter(); try { switch(column) { case 0: // Name VariableNode varNode = (VariableNode)node; String name = ""; if(varNode.name != null) { return name + varNode.name; } return name + "[" + varNode.index + "]"; case 1: // value if(value == Undefined.instance || value == ScriptableObject.NOT_FOUND) { return "undefined"; } if(value == null) { return "null"; } if(value instanceof NativeCall) { return "[object Call]"; } String result; try { result = Context.toString(value); } catch(Exception exc) { result = value.toString(); } StringBuffer buf = new StringBuffer(); int len = result.length(); for(int i = 0; i < len; i++) { char ch = result.charAt(i); if(Character.isISOControl(ch)) { ch = ' '; } buf.append(ch); } return buf.toString(); } } catch(Exception exc) { //exc.printStackTrace(); } finally { cx.exit(); } return null; } | 12904 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12904/04393fc2b7ccab89d8cfc436bc201b1499962ed6/VariableModel.java/buggy/js/rhino/toolsrc/org/mozilla/javascript/tools/debugger/VariableModel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
2366,
861,
12,
921,
756,
16,
509,
1057,
13,
288,
202,
921,
460,
273,
6455,
12,
2159,
1769,
540,
1772,
9494,
273,
1772,
18,
2328,
5621,
202,
698,
288,
202,
565,
1620,
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,
377,
1071,
1033,
2366,
861,
12,
921,
756,
16,
509,
1057,
13,
288,
202,
921,
460,
273,
6455,
12,
2159,
1769,
540,
1772,
9494,
273,
1772,
18,
2328,
5621,
202,
698,
288,
202,
565,
1620,
12,
2... |
return "secuence: " + string; | return "sequence: " + string; | public String getName() { return "secuence: " + string; //$NON-NLS-1$ } | 54769 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54769/760e4483e61b8af9a32c265fefd7cf0b54a9b2ac/SequenceSet.java/clean/modules/regex/src/main/java/java/util/regex/SequenceSet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
1723,
1435,
288,
3639,
327,
315,
6178,
30,
315,
397,
533,
31,
4329,
3993,
17,
5106,
17,
21,
8,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
1723,
1435,
288,
3639,
327,
315,
6178,
30,
315,
397,
533,
31,
4329,
3993,
17,
5106,
17,
21,
8,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
symbol.st_value = efile.readIntE(); | efile.readFullyE(addrArray); symbol.st_value = new Addr32(addrArray); | private Symbol[] loadSymbolsBySection( Section section ) throws IOException { int numSyms = 1; if (section.sh_entsize != 0) { numSyms = (int)section.sh_size / (int)section.sh_entsize; } ArrayList symList = new ArrayList(numSyms); for( int c = 0; c < numSyms; c++) { efile.seek(section.sh_offset + (section.sh_entsize * c)); Symbol symbol = new Symbol( section ); symbol.st_name = efile.readIntE(); symbol.st_value = efile.readIntE(); symbol.st_size = efile.readIntE(); symbol.st_info = efile.readByte(); symbol.st_other = efile.readByte(); symbol.st_shndx = efile.readShortE(); if ( symbol.st_info == 0 ) continue; symList.add(symbol); } Symbol[] results = (Symbol[])symList.toArray(new Symbol[0]); Arrays.sort(results); return results; } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/9e051b52c2a88d5d7240aefaae2ee8e5109c72c6/Elf.java/buggy/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/Elf.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
8565,
8526,
1262,
14821,
858,
5285,
12,
10092,
2442,
262,
1216,
1860,
288,
202,
202,
474,
818,
10876,
959,
273,
404,
31,
202,
202,
430,
261,
3464,
18,
674,
67,
319,
1467,
480,
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,
377,
3238,
8565,
8526,
1262,
14821,
858,
5285,
12,
10092,
2442,
262,
1216,
1860,
288,
202,
202,
474,
818,
10876,
959,
273,
404,
31,
202,
202,
430,
261,
3464,
18,
674,
67,
319,
1467,
480,
374... |
return u2 == null ? 0 : ((Integer)u2).intValue(); } | return u2 == null ? 0 : ((Integer) u2).intValue(); } | public int getALength() { return u2 == null ? 0 : ((Integer)u2).intValue(); } | 46770 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46770/d31a76ee29d5978a9bec41e3ac9134cee024bcab/Node.java/buggy/org/jruby/nodes/Node.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
509,
336,
1013,
1288,
1435,
288,
202,
202,
2463,
582,
22,
422,
446,
692,
374,
294,
14015,
4522,
13,
89,
22,
2934,
474,
620,
5621,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
225,
202,
482,
509,
336,
1013,
1288,
1435,
288,
202,
202,
2463,
582,
22,
422,
446,
692,
374,
294,
14015,
4522,
13,
89,
22,
2934,
474,
620,
5621,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-... |
public static int deserializeInt(XMLStreamReader xpp)throws AxisFault{ String val = deserializeString(xpp); if(val == null){ throw new AxisFault("Number format exception value is null"); } return Integer.parseInt(val); } | 49300 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49300/5d82f9befbf778a549293f6b8a3942ba9b29af1c/SimpleTypeEncodingUtils.java/buggy/dev/scratch/prototype2/src/java/org/apache/axis/encoding/SimpleTypeEncodingUtils.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
3845,
474,
18109,
1702,
12,
4201,
31495,
92,
11858,
13,
15069,
6558,
7083,
95,
780,
1125,
33,
18109,
780,
12,
92,
11858,
1769,
430,
12,
1125,
631,
2011,
15329,
12849,
2704,
6558,
7083,
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,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
3845,
474,
18109,
1702,
12,
4201,
31495,
92,
11858,
13,
15069,
6558,
7083,
95,
780,
1125,
33,
18109,
780,
12,
92,
11858,
1769,
430,
12,
1125,
631,
2011,
15329,
12849,
2704,
6558,
7083,
2... | ||
evaluator ); | evaluator, this.child); | protected void setUp() throws Exception { super.setUp(); ClassFieldExtractor extractor = new ClassFieldExtractor( DummyValueObject.class, "objectAttr" ); Declaration declaration = new Declaration( "myObject", extractor, 0 ); Evaluator evaluator = EvaluatorFactory.getEvaluator( Evaluator.OBJECT_TYPE, Evaluator.NOT_EQUAL ); this.memory = new ObjectNotEqualConstrLeftMemory( extractor, declaration, evaluator ); } | 5490 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5490/c9e76aca3a34c0be20259f674c029ab51ae59de6/ObjectNotEqualConstrLeftMemoryTest.java/clean/drools-core/src/test/java/org/drools/reteoo/beta/ObjectNotEqualConstrLeftMemoryTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
24292,
1435,
1216,
1185,
288,
3639,
2240,
18,
542,
1211,
5621,
3639,
1659,
974,
10958,
14031,
273,
394,
1659,
974,
10958,
12,
28622,
620,
921,
18,
1106,
16,
28524,
315,
1612,
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,
4750,
918,
24292,
1435,
1216,
1185,
288,
3639,
2240,
18,
542,
1211,
5621,
3639,
1659,
974,
10958,
14031,
273,
394,
1659,
974,
10958,
12,
28622,
620,
921,
18,
1106,
16,
28524,
315,
1612,
3... |
return null; | public Image getImage(Object element) { if (element instanceof IMylarContextNode) { IMylarContextNode node = (IMylarContextNode)element; IMylarUiBridge adapter = MylarUiPlugin.getDefault().getUiBridge(node.getStructureKind()); if (adapter != null) { return adapter.getLabelProvider().getImage(element); } else { return null; } } else if (element instanceof MylarContextEdge) { IMylarContextEdge edge = (IMylarContextEdge)element; IMylarUiBridge bridge = MylarUiPlugin.getDefault().getUiBridge(edge.getStructureKind()); ImageDescriptor descriptor = bridge.getIconForRelationship(edge.getRelationshipHandle()); if (descriptor != null) return MylarImages.getImage(descriptor); } return null; } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/ffea9ed89adc29b1ae1184818ee9577e822d6fde/MylarContextLabelProvider.java/buggy/org.eclipse.mylyn.context.ui/src/org/eclipse/mylyn/ui/views/MylarContextLabelProvider.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3421,
10567,
12,
921,
930,
13,
288,
3639,
309,
261,
2956,
1276,
6246,
93,
7901,
1042,
907,
13,
288,
5411,
6246,
93,
7901,
1042,
907,
756,
273,
261,
3445,
93,
7901,
1042,
907,
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,
3421,
10567,
12,
921,
930,
13,
288,
3639,
309,
261,
2956,
1276,
6246,
93,
7901,
1042,
907,
13,
288,
5411,
6246,
93,
7901,
1042,
907,
756,
273,
261,
3445,
93,
7901,
1042,
907,
13,
... | |
firePartBroughtToTop(ref); | partService.firePartBroughtToTop(ref); | public void partBroughtToTop(IWorkbenchPartReference ref) { firePartBroughtToTop(ref); } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/45ab2bee3420234882ba61c9b99fecd868b62e8f/WWinPartService.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WWinPartService.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
1087,
38,
303,
9540,
774,
3401,
12,
45,
2421,
22144,
1988,
2404,
1278,
13,
288,
5411,
1087,
1179,
18,
12179,
1988,
38,
303,
9540,
774,
3401,
12,
1734,
1769,
3639,
289,
2,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
1087,
38,
303,
9540,
774,
3401,
12,
45,
2421,
22144,
1988,
2404,
1278,
13,
288,
5411,
1087,
1179,
18,
12179,
1988,
38,
303,
9540,
774,
3401,
12,
1734,
1769,
3639,
289,
2,
-10... |
LocalVariables.getInstance().createKettleVariables(Thread.currentThread().toString(), parentThread.toString(), false); | LocalVariables.getInstance().createKettleVariables(Thread.currentThread().getName(), parentThread.getName(), false); | public void run() { try { // This JobEntryRunner is a replacement for the Job thread. // The job thread is never started because we simpy want to wait for the result. // That is the reason why it's not in the same namespace as the parent (job, chef, etc.) // LocalVariables.getInstance().createKettleVariables(Thread.currentThread().toString(), parentThread.toString(), false); result = job.execute(entryNr+1, result); } catch(KettleException e) { log.logError(toString(), "An error occurred executing this job entry : "+e.getMessage()); result.setNrErrors(1); } finished=true; } | 58146 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58146/ef13f9c7b56192f5dd5dd5bf994c57f332860a3f/JobEntryJobRunner.java/buggy/kettle/src/be/ibridge/kettle/job/entry/job/JobEntryJobRunner.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1086,
1435,
202,
95,
202,
202,
698,
202,
202,
95,
5411,
368,
1220,
3956,
1622,
9709,
353,
279,
6060,
364,
326,
3956,
2650,
18,
5411,
368,
1021,
1719,
2650,
353,
5903,
574... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1086,
1435,
202,
95,
202,
202,
698,
202,
202,
95,
5411,
368,
1220,
3956,
1622,
9709,
353,
279,
6060,
364,
326,
3956,
2650,
18,
5411,
368,
1021,
1719,
2650,
353,
5903,
574... |
dynamicVars = new RubyVarmap(null, null, block.dynamicVars); | ruby.setDynamicVars(new RubyVarmap(null, null, block.dynamicVars)); | public RubyObject yield0(RubyObject value, RubyObject self, RubyModule klass, boolean acheck) { RubyObject result = ruby.getNil(); if (!(isBlockGiven() || isFBlockGiven()) || (rubyBlock == null)) { throw new RuntimeException("yield called out of block"); } RubyVarmap.push(ruby); pushClass(); RubyBlock block = rubyBlock.getTmp(); Frame frame = block.frame; frame.setPrev(getRubyFrame()); rubyFrame = frame; VALUE old_cref = ruby_cref; ruby_cref = (NODE)getRubyFrame().getCbase(); RubyScope oldScope = ruby.getRubyScope(); ruby.setRubyScope(block.scope); rubyBlock.pop(); if ((block.flags & RubyBlock.BLOCK_D_SCOPE) != 0) { dynamicVars = new RubyVarmap(null, null, block.dynamicVars); } else { dynamicVars = block.dynamicVars; } ruby_class = (klass != null) ? klass : block.klass; if (klass == null) { self = (RubyObject)block.self; } NODE node = block.body; if (block.var != null) { // try { if (block.var == NODE.ONE) { if (acheck && value != null && value instanceof RubyArray && ((RubyArray)value).length() != 0) { throw new RubyArgumentException("wrong # of arguments ("+ ((RubyArray)value).length() + " for 0)"); } } else { if (block.var.nd_type() == NODE_MASGN) { massign(self, block.var, value, acheck); } else { if (acheck && value != null && value instanceof RubyArray && ((RubyArray)value).length() == 1) { value = ((RubyArray)value).entry(0); } assign(self, block.var, value, acheck); } } // } catch () { // goto pop_state; // } } else { if (acheck && value != null && value instanceof RubyArray && ((RubyArray)value).length() == 1) { value = ((RubyArray)value).entry(0); } } rubyIter.push(block.iter); while (true) { try { if (node == null) { result = ruby.getNil(); } else if (node.nd_type() == NODE_CFUNC || node.nd_type() == NODE_IFUNC) { if (value == null) { value = RubyArray.m_newArray(ruby, 0); } result = ((RubyCallbackMethod)node.nd_cfnc()).execute(value, new RubyObject[] {(RubyObject)node.nd_tval(), self}, ruby); } else { result = eval(self, node); } break; } catch (RedoException rExcptn) { } catch (NextException nExcptn) { result = ruby.getNil(); break; } catch (BreakException bExcptn) { break; } catch (ReturnException rExcptn) { break; } } // pop_state: rubyIter.pop(); popClass(); RubyVarmap.pop(ruby); rubyBlock.setTmp(block); rubyFrame = getRubyFrame().getPrev(); ruby_cref = (NODE)old_cref; // if (ruby_scope->flag & SCOPE_DONT_RECYCLE) // scope_dup(old_scope); ruby.setRubyScope(oldScope); /* * if (state) { * if (!block->tag) { * switch (state & TAG_MASK) { * case TAG_BREAK: * case TAG_RETURN: * jump_tag_but_local_jump(state & TAG_MASK); * break; * } * } * JUMP_TAG(state); * } */ return result; } | 45298 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45298/a2024bddc1b8e83f4e8075d2080935c221a833fe/RubyInterpreter.java/clean/org/jruby/interpreter/RubyInterpreter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19817,
921,
2824,
20,
12,
54,
10340,
921,
460,
16,
19817,
921,
365,
16,
19817,
3120,
7352,
16,
1250,
279,
1893,
13,
288,
3639,
19817,
921,
563,
273,
22155,
18,
588,
12616,
5621,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
19817,
921,
2824,
20,
12,
54,
10340,
921,
460,
16,
19817,
921,
365,
16,
19817,
3120,
7352,
16,
1250,
279,
1893,
13,
288,
3639,
19817,
921,
563,
273,
22155,
18,
588,
12616,
5621,
7... |
private void updatePreview() { if (sample != null) { String fontFamily = name.getValueForName(name.getComboBoxControl( null).getText()); | private void updatePreview( ) { if ( sample != null ) { String fontFamily = name.getValueForName( name.getComboBoxControl( null ) .getText( ) ); | private void updatePreview() { if (sample != null) { String fontFamily = name.getValueForName(name.getComboBoxControl( null).getText()); if (fontFamily == null) { fontFamily = "Times New Roman"; //$NON-NLS-1$ } String familyValue = (String) DesignerConstants.familyMap .get(fontFamily); if (familyValue == null) { familyValue = fontFamily; } // set default font size. String fontSize = DesignChoiceConstants.FONT_SIZE_MEDIUM; int sizeValue = Integer.valueOf( (String) DesignerConstants.fontMap.get(fontSize)) .intValue(); if (size.InComboNamesList(size.getComboBoxControl( getFieldEditorParent()).getText())) { fontSize = size.getBoxValueForName(size.getComboBoxControl( getFieldEditorParent()).getText()); if (DesignChoiceConstants.FONT_SIZE_LARGER.equals(fontSize)) { fontSize = DesignChoiceConstants.FONT_SIZE_LARGE; } else if (DesignChoiceConstants.FONT_SIZE_SMALLER .equals(fontSize)) { fontSize = DesignChoiceConstants.FONT_SIZE_SMALL; } sizeValue = Integer.valueOf( (String) DesignerConstants.fontMap.get(fontSize)) .intValue(); } else { String text = size.getComboBoxControl(getFieldEditorParent()) .getText(); String pre = size.getMeasureValueForName(size .getMeasureControl(getFieldEditorParent()).getText()); if (DEUtil.isValidNumber(text)) { sizeValue = (int) CSSUtil .convertToPoint(new DimensionValue(Double .parseDouble(text), pre)); } } boolean italic = false; String fontStyle = style.getValueForName(style.getComboBoxControl( getFieldEditorParent()).getText()); if (DesignChoiceConstants.FONT_STYLE_ITALIC.equals(fontStyle)) { italic = true; } String fontWeight = weight.getValueForName(weight .getComboBoxControl(null).getText()); boolean bold = false; int fw = 400; if (DesignChoiceConstants.FONT_WEIGHT_NORMAL.equals(fontWeight)) { // no change. } else if (DesignChoiceConstants.FONT_WEIGHT_BOLD .equals(fontWeight)) { bold = true; fw = 700; } else if (DesignChoiceConstants.FONT_WEIGHT_BOLDER .equals(fontWeight)) { bold = true; fw = 1000; } else if (DesignChoiceConstants.FONT_WEIGHT_LIGHTER .equals(fontWeight)) { fw = 100; } else { try { fw = Integer.parseInt(fontWeight); } catch (NumberFormatException e) { fw = 400; } if (fw > 700) { bold = true; } } sample.setFontFamily(familyValue); sample.setFontSize(sizeValue); sample.setBold(bold); sample.setItalic(italic); sample.setFontWeight(fw); // sample.setForeground( new Color( Display.getCurrent( ), // color.getColorSelector( ).getColorValue( ) ) ); sample.setForeground(ColorManager.getColor(color.getColorSelector() .getRGB())); sample.setUnderline(docoration.getUnderLinePropControl(null) .getSelection()); sample.setLinethrough(docoration.getLineThroughPropControl(null) .getSelection()); sample.setOverline(docoration.getOverLinePropControl(null) .getSelection()); sample.updateView(); } } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/9a44d88745cf69dac1395f41e7c3c7bf8bdeb1e6/FontPreferencePage.java/clean/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/dialogs/FontPreferencePage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1089,
11124,
1435,
288,
202,
202,
430,
261,
6358,
480,
446,
13,
288,
1082,
202,
780,
3512,
9203,
273,
508,
18,
24805,
1290,
461,
12,
529,
18,
588,
22199,
3367,
12,
6862,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1089,
11124,
1435,
288,
202,
202,
430,
261,
6358,
480,
446,
13,
288,
1082,
202,
780,
3512,
9203,
273,
508,
18,
24805,
1290,
461,
12,
529,
18,
588,
22199,
3367,
12,
6862,... |
super(parent, id, object); | super(parent, id); | public ScopedLink(MarkupContainer parent, String id, IModel object) { super(parent, id, object); } | 46434 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46434/b00436352d46400fdec0d49139f5aed0f502ce0b/ScopedLink.java/clean/wicket/src/test/wicket/markup/html/ScopedLink.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2850,
8889,
2098,
12,
13111,
2170,
982,
16,
514,
612,
16,
467,
1488,
733,
13,
202,
95,
202,
202,
9565,
12,
2938,
16,
612,
16,
733,
1769,
202,
97,
2,
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,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2850,
8889,
2098,
12,
13111,
2170,
982,
16,
514,
612,
16,
467,
1488,
733,
13,
202,
95,
202,
202,
9565,
12,
2938,
16,
612,
16,
733,
1769,
202,
97,
2,
-100,
-100,
-100,
-100,
... |
return className; else { if (uri.startsWith(JAVA_EXT_XSLTC)) { int length = JAVA_EXT_XSLTC.length() + 1; return (uri.length() > length) ? uri.substring(length) : EMPTYSTRING; } else if (uri.startsWith(JAVA_EXT_XALAN)) { int length = JAVA_EXT_XALAN.length() + 1; return (uri.length() > length) ? uri.substring(length) : EMPTYSTRING; } else if (uri.startsWith(JAVA_EXT_XALAN_OLD)) { int length = JAVA_EXT_XALAN_OLD.length() + 1; return (uri.length() > length) ? uri.substring(length) : EMPTYSTRING; } else { int index = uri.lastIndexOf('/'); return (index > 0) ? uri.substring(index+1) : uri; } | return className; else { if (uri.startsWith(JAVA_EXT_XSLTC)) { int length = JAVA_EXT_XSLTC.length() + 1; return (uri.length() > length) ? uri.substring(length) : EMPTYSTRING; } else if (uri.startsWith(JAVA_EXT_XALAN)) { int length = JAVA_EXT_XALAN.length() + 1; return (uri.length() > length) ? uri.substring(length) : EMPTYSTRING; } else if (uri.startsWith(JAVA_EXT_XALAN_OLD)) { int length = JAVA_EXT_XALAN_OLD.length() + 1; return (uri.length() > length) ? uri.substring(length) : EMPTYSTRING; } else { int index = uri.lastIndexOf('/'); return (index > 0) ? uri.substring(index+1) : uri; } | public String getClassNameFromUri(String uri) { String className = (String)_extensionNamespaceTable.get(uri); if (className != null) return className; else { if (uri.startsWith(JAVA_EXT_XSLTC)) { int length = JAVA_EXT_XSLTC.length() + 1; return (uri.length() > length) ? uri.substring(length) : EMPTYSTRING; } else if (uri.startsWith(JAVA_EXT_XALAN)) { int length = JAVA_EXT_XALAN.length() + 1; return (uri.length() > length) ? uri.substring(length) : EMPTYSTRING; } else if (uri.startsWith(JAVA_EXT_XALAN_OLD)) { int length = JAVA_EXT_XALAN_OLD.length() + 1; return (uri.length() > length) ? uri.substring(length) : EMPTYSTRING; } else { int index = uri.lastIndexOf('/'); return (index > 0) ? uri.substring(index+1) : uri; } } } | 46591 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46591/f2269251d2d2151ef6399c06a210c39e047c7fe0/FunctionCall.java/buggy/src/org/apache/xalan/xsltc/compiler/FunctionCall.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
11819,
1265,
3006,
12,
780,
2003,
13,
377,
288,
5411,
514,
2658,
273,
261,
780,
13,
67,
6447,
3402,
1388,
18,
588,
12,
1650,
1769,
5411,
309,
261,
12434,
480,
446,
13,
1850,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
11819,
1265,
3006,
12,
780,
2003,
13,
377,
288,
5411,
514,
2658,
273,
261,
780,
13,
67,
6447,
3402,
1388,
18,
588,
12,
1650,
1769,
5411,
309,
261,
12434,
480,
446,
13,
1850,
... |
public org.quickfix.field.BidID getBidID() throws FieldNotFound { org.quickfix.field.BidID value = new org.quickfix.field.BidID(); | public quickfix.field.BidID getBidID() throws FieldNotFound { quickfix.field.BidID value = new quickfix.field.BidID(); | public org.quickfix.field.BidID getBidID() throws FieldNotFound { org.quickfix.field.BidID value = new org.quickfix.field.BidID(); getField(value); return value; } | 8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/ListExecute.java/clean/src/java/src/quickfix/fix44/ListExecute.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
17763,
734,
2882,
350,
734,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
17763,
734,
460,
273,
394,
2358,
18,
19525,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
17763,
734,
2882,
350,
734,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
17763,
734,
460,
273,
394,
2358,
18,
19525,
9... |
public GetFailedMessage(FetchException e, String identifier) { | public GetFailedMessage(FetchException e, String identifier, boolean global) { | public GetFailedMessage(FetchException e, String identifier) { if(Logger.shouldLog(Logger.MINOR, this)) Logger.minor(this, "Creating get failed from "+e+" for "+identifier, e); this.tracker = e.errorCodes; this.code = e.mode; this.codeDescription = FetchException.getMessage(code); this.extraDescription = e.extraMessage; this.shortCodeDescription = FetchException.getShortMessage(code); this.isFatal = e.isFatal(); this.identifier = identifier; this.expectedDataLength = e.expectedSize; this.expectedMimeType = e.getExpectedMimeType(); this.finalizedExpected = e.finalizedSize(); this.redirectURI = e.newURI; } | 45341 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45341/bbb3c23ec38ea1c7abb48040a17f5fc7932248bc/GetFailedMessage.java/clean/src/freenet/node/fcp/GetFailedMessage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
968,
2925,
1079,
12,
5005,
503,
425,
16,
514,
2756,
13,
288,
202,
202,
430,
12,
3328,
18,
13139,
1343,
12,
3328,
18,
6236,
916,
16,
333,
3719,
1082,
202,
3328,
18,
17364,
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,
225,
202,
482,
968,
2925,
1079,
12,
5005,
503,
425,
16,
514,
2756,
13,
288,
202,
202,
430,
12,
3328,
18,
13139,
1343,
12,
3328,
18,
6236,
916,
16,
333,
3719,
1082,
202,
3328,
18,
17364,
12... |
void setContentPane(Container contentPane) { getRootPane().setContentPane(contentPane); } | void setContentPane(Container contentPane) { getRootPane().setContentPane(contentPane); } | void setContentPane(Container contentPane) { getRootPane().setContentPane(contentPane); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/2703ae3b51c371a2a79d28271cd57b4046c647d0/JApplet.java/buggy/core/src/classpath/javax/javax/swing/JApplet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
6459,
10651,
8485,
12,
2170,
913,
8485,
13,
288,
202,
202,
588,
2375,
8485,
7675,
542,
1350,
8485,
12,
1745,
8485,
1769,
202,
97,
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,
225,
202,
6459,
10651,
8485,
12,
2170,
913,
8485,
13,
288,
202,
202,
588,
2375,
8485,
7675,
542,
1350,
8485,
12,
1745,
8485,
1769,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if (!(Comparing.equal(name, JSPX_SCRIPTLET_TAG_NAME) || Comparing.equal(name, JSPX_DECLARATION_TAG_NAME))){ | if (!(Comparing.equal(name, JSPX_SCRIPTLET_TAG_NAME) || Comparing.equal(name, JSPX_DECLARATION_TAG_NAME))){ | protected boolean isJspxJavaContainingNode(final ASTNode child) { if (child.getElementType() != ElementType.XML_TEXT) return false; final ASTNode treeParent = child.getTreeParent(); if (treeParent == null) return false; if (treeParent.getElementType() != ElementType.XML_TAG) return false; final PsiElement psiElement = SourceTreeToPsiMap.treeElementToPsi(treeParent); final String name = ((XmlTag)psiElement).getName(); if (!(Comparing.equal(name, JSPX_SCRIPTLET_TAG_NAME) || Comparing.equal(name, JSPX_DECLARATION_TAG_NAME))){ return false; } if (child.getText().trim().length() == 0) return false; return JspTextBlock.findJavaElementAt(child) != null; } | 56598 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56598/c260451f16a223a8c997b9f9af9929992f239468/AbstractXmlBlock.java/buggy/source/com/intellij/psi/formatter/xml/AbstractXmlBlock.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
1250,
353,
21796,
92,
5852,
24344,
907,
12,
6385,
9183,
907,
1151,
13,
288,
565,
309,
261,
3624,
18,
588,
17481,
1435,
480,
3010,
559,
18,
4201,
67,
5151,
13,
327,
629,
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,
4750,
1250,
353,
21796,
92,
5852,
24344,
907,
12,
6385,
9183,
907,
1151,
13,
288,
565,
309,
261,
3624,
18,
588,
17481,
1435,
480,
3010,
559,
18,
4201,
67,
5151,
13,
327,
629,
31,
565,
... |
Id toolId = getIdManager().getId(template.getToolId()); return new Boolean(facade.isAuthorized(function,toolId)); | Id siteId = getIdManager().getId(template.getSiteId()); return new Boolean(facade.isAuthorized(function,siteId)); | protected Boolean isTemplateAuth(AuthorizationFacade facade, Id qualifier, Agent agent, String function){ PresentationTemplate template = getPresentationManager().getPresentationTemplate(qualifier); //owner can do anything if (template.getOwner().equals(agent)){ return new Boolean(true); } Id toolId = getIdManager().getId(template.getToolId()); return new Boolean(facade.isAuthorized(function,toolId)); } | 48996 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48996/a1c2f8d1f8005e0fad51c56d42748210c4606c67/PresentationAuthorizerImpl.java/buggy/presentation/api-impl/src/java/org/theospi/portfolio/presentation/PresentationAuthorizerImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
4750,
3411,
353,
2283,
1730,
12,
6063,
12467,
11270,
16,
3124,
12327,
16,
8669,
4040,
16,
514,
445,
15329,
1377,
25130,
367,
2283,
1542,
273,
1689,
1581,
367,
1318,
7675,
588,
6351,
367,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
4750,
3411,
353,
2283,
1730,
12,
6063,
12467,
11270,
16,
3124,
12327,
16,
8669,
4040,
16,
514,
445,
15329,
1377,
25130,
367,
2283,
1542,
273,
1689,
1581,
367,
1318,
7675,
588,
6351,
367,
... |
if(lastXorX != -1 && lastXorY != -1) { | if (lastXorX >= 0 && lastXorY >= 0) { | private void formMouseMoved(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_formMouseMoved Main.getGUI().setCoords(evt.getX(), evt.getY()); if (currentTool == LINE_TOOL && brokenLine == true) { if(lastXorX != -1 && lastXorY != -1) { drawXorLine(lastXorX, lastXorY, lastX, lastY); } drawXorLine(evt.getX(),evt.getY(), lastX, lastY); lastXorX = evt.getX(); lastXorY = evt.getY(); repaint(); } else if (currentTool != LINE_TOOL && brokenLine == true) { brokenLine = false; drawXorLine(lastXorX, lastXorY, lastX, lastY); repaint(); resetCoords(); resetXorCoords(); java.awt.Cursor normalCursor = new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR); setCursor(normalCursor); } }//GEN-LAST:event_formMouseMoved | 11087 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11087/ea5cb1611d3f30717ecb90bfe697ef9f408caea4/DrawingPanel.java/buggy/netboard/DrawingPanel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
646,
9186,
25317,
12,
6290,
18,
2219,
88,
18,
2575,
18,
9186,
1133,
6324,
13,
288,
759,
16652,
17,
15354,
30,
2575,
67,
687,
9186,
25317,
3639,
12740,
18,
588,
43,
5370,
7675... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
646,
9186,
25317,
12,
6290,
18,
2219,
88,
18,
2575,
18,
9186,
1133,
6324,
13,
288,
759,
16652,
17,
15354,
30,
2575,
67,
687,
9186,
25317,
3639,
12740,
18,
588,
43,
5370,
7675... |
public org.quickfix.field.UnderlyingCurrency getUnderlyingCurrency() throws FieldNotFound { org.quickfix.field.UnderlyingCurrency value = new org.quickfix.field.UnderlyingCurrency(); | public quickfix.field.UnderlyingCurrency getUnderlyingCurrency() throws FieldNotFound { quickfix.field.UnderlyingCurrency value = new quickfix.field.UnderlyingCurrency(); | public org.quickfix.field.UnderlyingCurrency getUnderlyingCurrency() throws FieldNotFound { org.quickfix.field.UnderlyingCurrency value = new org.quickfix.field.UnderlyingCurrency(); getField(value); return value; } | 8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/SecurityStatus.java/clean/src/java/src/quickfix/fix44/SecurityStatus.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
14655,
6291,
7623,
10833,
765,
6291,
7623,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
14655,
6291,
7623,
460,
273,
394... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
14655,
6291,
7623,
10833,
765,
6291,
7623,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
14655,
6291,
7623,
460,
273,
394... |
element.uri = fNamespaceSupport.getURI(eprefix); | element.uri = fNamespaceContext.getURI(eprefix); | protected void handleEndElement(QName element, Augmentations augs, boolean isEmpty) throws XNIException { // bind element String eprefix = element.prefix != null ? element.prefix : XMLSymbols.EMPTY_STRING; element.uri = fNamespaceSupport.getURI(eprefix); if (element.uri != null) { element.prefix = eprefix; } // call handlers if (fDocumentHandler != null && !fOnlyPassPrefixMappingEvents) { if (!isEmpty) { fDocumentHandler.endElement(element, augs); } } // end prefix mappings if (fDocumentHandler != null) { int count = fNamespaceSupport.getDeclaredPrefixCount(); for (int i = count - 1; i >= 0; i--) { String prefix = fNamespaceSupport.getDeclaredPrefixAt(i); fDocumentHandler.endPrefixMapping(prefix, augs); } } // pop context fNamespaceSupport.popContext(); } // handleEndElement(QName,boolean) | 4434 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4434/41a9eddf1f69a94ac4334a19d85b1a0424c4bcae/XMLNamespaceBinder.java/clean/src/org/apache/xerces/impl/XMLNamespaceBinder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
1640,
1638,
1046,
12,
13688,
930,
16,
432,
14870,
1012,
279,
9024,
16,
1250,
2709,
13,
3639,
1216,
1139,
50,
45,
503,
288,
3639,
368,
1993,
930,
3639,
514,
425,
3239,
273,
93... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1640,
1638,
1046,
12,
13688,
930,
16,
432,
14870,
1012,
279,
9024,
16,
1250,
2709,
13,
3639,
1216,
1139,
50,
45,
503,
288,
3639,
368,
1993,
930,
3639,
514,
425,
3239,
273,
93... |
model0.insertStar(); | model0.insertChar('*'); | public void testInsertBraces() { assertEquals("#0.0", 0, model0.absOffset()); model0.insertSlash(); // /# assertEquals("#1.0", ReducedToken.FREE, model0.getStateAtCurrent()); model0.insertStar(); // /*# assertEquals("#2.0", ReducedToken.INSIDE_BLOCK_COMMENT, model0.getStateAtCurrent()); assertEquals("#2.1", 2, model0.absOffset()); model0.move(-1); // /#* assertEquals("#3.0", 1, model0.absOffset()); model0.insertOpenParen(); // /(#* assertEquals("#4.0", ReducedToken.FREE, model0.getStateAtCurrent()); model0.move(-1); // /#(* model0.delete(1); // /#* model0.move(1); // /*# assertEquals("#5.0", ReducedToken.INSIDE_BLOCK_COMMENT, model0.getStateAtCurrent()); model0.insertStar(); // /**# assertEquals("#6.0",ReducedToken.INSIDE_BLOCK_COMMENT, model0.getStateAtCurrent()); model0.insertSlash(); // /**/# assertEquals("#7.0", 4, model0.absOffset()); assertEquals("#7.1", ReducedToken.FREE, model0.getStateAtCurrent()); model0.move(-2); // /*#*/ assertEquals("#8.0", ReducedToken.INSIDE_BLOCK_COMMENT, model0.getStateAtCurrent()); assertEquals("#8.1", 2, model0.absOffset()); model0.insertOpenParen(); assertEquals("#9.0", ReducedToken.INSIDE_BLOCK_COMMENT, model0.getStateAtCurrent()); // /*(#*/ model0.move(1); // /*(*#/ assertEquals("#10.0", ReducedToken.INSIDE_BLOCK_COMMENT, model0.getStateAtCurrent()); model0.move(-2); // /*#(*/ assertEquals("#11.0", ReducedToken.INSIDE_BLOCK_COMMENT, model0.getStateAtCurrent()); model0.move(1); // /*(#*/ // /*(#*/ assertEquals("#12.0", ReducedToken.INSIDE_BLOCK_COMMENT, model0.getStateAtCurrent()); assertEquals("#12.1", 3, model0.absOffset()); model0.insertGap(4); // /*(____#*/ model0.move(-2); // /*(__#__*/ assertEquals("#13.0", 5, model0.absOffset()); model0.insertClosedParen(); // /*(__)#__*/ assertEquals("#14.0", 6, model0.absOffset()); // move to the closed paren model0.move(-1); // /*(__#)__*/ assertEquals("#12.0", ReducedToken.INSIDE_BLOCK_COMMENT, model0.getStateAtCurrent()); } | 11192 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11192/6f064a351cf6f32ca81eb7bd4e1d9f192f6a46c6/ReducedModelTest.java/buggy/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/ReducedModelTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
4600,
38,
354,
764,
1435,
202,
202,
95,
1082,
202,
11231,
8867,
2932,
7,
20,
18,
20,
3113,
374,
16,
938,
20,
18,
5113,
2335,
10663,
1082,
202,
2284,
20,
18,
6387,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4600,
38,
354,
764,
1435,
202,
202,
95,
1082,
202,
11231,
8867,
2932,
7,
20,
18,
20,
3113,
374,
16,
938,
20,
18,
5113,
2335,
10663,
1082,
202,
2284,
20,
18,
6387,... |
g2.drawLine(x + w, y, x + w, y + h); } if ((sides & BOTTOM) == BOTTOM) { | g2.drawLine(x + w - border.right / 2, y, x + w - border.right / 2, y + h); } else if (currentSide == BOTTOM) { | private static void paintPatternedRect(final Graphics2D g2, final Rectangle bounds, final Border border, final BorderColor color, final float[] pattern, final int sides) { Stroke old_stroke = g2.getStroke(); int x = bounds.x; int y = bounds.y; int w = bounds.width; int h = bounds.height; if ((sides & TOP) == TOP) { g2.setColor(color.topColor); g2.setStroke(new BasicStroke(border.top, BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL, 0, pattern, 0)); g2.drawLine(x, y, x + w, y); } if ((sides & LEFT) == LEFT) { g2.setColor(color.leftColor); g2.setStroke(new BasicStroke(border.left, BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL, 0, pattern, 0)); g2.drawLine(x, y, x, y + h); } if ((sides & RIGHT) == RIGHT) { g2.setColor(color.rightColor); g2.setStroke(new BasicStroke(border.right, BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL, 0, pattern, 0)); g2.drawLine(x + w, y, x + w, y + h); } if ((sides & BOTTOM) == BOTTOM) { g2.setColor(color.bottomColor); g2.setStroke(new BasicStroke(border.bottom, BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL, 0, pattern, 0)); g2.drawLine(x, y + h, x + w, y + h); } g2.setStroke(old_stroke); } | 53937 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/53937/cdd53fac1870407b7499c8e553eab14bb755c9d1/BorderPainter.java/buggy/src/java/org/xhtmlrenderer/render/BorderPainter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
918,
12574,
3234,
329,
6120,
12,
6385,
16830,
22,
40,
314,
22,
16,
727,
13264,
4972,
16,
727,
13525,
5795,
16,
727,
13525,
2957,
2036,
16,
727,
1431,
8526,
1936,
16,
727,
509... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
918,
12574,
3234,
329,
6120,
12,
6385,
16830,
22,
40,
314,
22,
16,
727,
13264,
4972,
16,
727,
13525,
5795,
16,
727,
13525,
2957,
2036,
16,
727,
1431,
8526,
1936,
16,
727,
509... |
if (!containsUserName(name)) { | if (!containsUserName(name)) { | public void addUserName(String name) { if (!containsUserName(name)) { String[] newNames = new String[userNames.length + 1]; for (int i=0; i<userNames.length; i++) { newNames[i] = userNames[i]; } newNames[newNames.length - 1] = name; setUserNames(newNames); } } | 47551 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47551/26a3a7bc34e6e5e004586f261205a4cb42d7cf2c/DefaultUserNameStore.java/buggy/src/java/org/jdesktop/swingx/auth/DefaultUserNameStore.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
527,
15296,
12,
780,
508,
13,
288,
202,
202,
430,
16051,
12298,
15296,
12,
529,
3719,
288,
5411,
514,
8526,
394,
1557,
273,
394,
514,
63,
1355,
1557,
18,
2469,
397,
404,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
527,
15296,
12,
780,
508,
13,
288,
202,
202,
430,
16051,
12298,
15296,
12,
529,
3719,
288,
5411,
514,
8526,
394,
1557,
273,
394,
514,
63,
1355,
1557,
18,
2469,
397,
404,
... |
if (!m_classIsNominal) throw new Exception("Class is numeric!"); else { thekey = new hashKey(instance, instance.numAttributes()); if ((tempDist = (double [])m_entries.get(thekey)) == null) { if (m_useIBk) { tempDist = m_ibk.distributionForInstance(instance); } else { | thekey = new hashKey(instance, instance.numAttributes()); if ((tempDist = (double [])m_entries.get(thekey)) == null) { if (m_useIBk) { tempDist = m_ibk.distributionForInstance(instance); } else { if (!m_classIsNominal) { tempDist = new double[1]; tempDist[0] = m_majority; } else { | public double [] distributionForInstance(Instance instance) throws Exception { hashKey thekey; double [] tempDist; double [] normDist; m_disTransform.input(instance); instance = m_disTransform.output(); m_delTransform.input(instance); instance = m_delTransform.output(); if (!m_classIsNominal) throw new Exception("Class is numeric!"); else { thekey = new hashKey(instance, instance.numAttributes()); // if this one is not in the table if ((tempDist = (double [])m_entries.get(thekey)) == null) { if (m_useIBk) { tempDist = m_ibk.distributionForInstance(instance); } else { tempDist = new double [m_theInstances.classAttribute().numValues()]; tempDist[(int)m_majority] = 1.0; } } else { // normalise distribution normDist = new double [tempDist.length]; System.arraycopy(tempDist,0,normDist,0,tempDist.length); Utils.normalize(normDist); tempDist=normDist; } } return tempDist; } | 4773 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4773/9e72041e2204a61830b9cccfa8173a6ed2c39eb5/DecisionTable.java/clean/weka/classifiers/rules/DecisionTable.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1645,
5378,
7006,
1290,
1442,
12,
1442,
791,
13,
4202,
1216,
1185,
225,
288,
565,
29623,
326,
856,
31,
565,
1645,
5378,
1906,
5133,
31,
565,
1645,
5378,
4651,
5133,
31,
565,
312,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1645,
5378,
7006,
1290,
1442,
12,
1442,
791,
13,
4202,
1216,
1185,
225,
288,
565,
29623,
326,
856,
31,
565,
1645,
5378,
1906,
5133,
31,
565,
1645,
5378,
4651,
5133,
31,
565,
312,
... |
return getMostRelevantFileContext().getLine(); | ScannerContextInclusion mostRelevantFileContext = getMostRelevantFileContext(); if( mostRelevantFileContext != null ) return mostRelevantFileContext.getLine(); return -1; | public int getCurrentLineNumber() { return getMostRelevantFileContext().getLine(); } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/591d1d3a21906b2635aae873e197e679e2ce7462/ContextStack.java/buggy/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/ContextStack.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
509,
5175,
31063,
1435,
202,
95,
202,
202,
2463,
2108,
669,
17018,
7445,
812,
1042,
7675,
588,
1670,
5621,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
509,
5175,
31063,
1435,
202,
95,
202,
202,
2463,
2108,
669,
17018,
7445,
812,
1042,
7675,
588,
1670,
5621,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
ConflictsDialog conflictsDialog = new ConflictsDialog(myProject); | ConflictsDialog conflictsDialog = new ConflictsDialog(myProject, conflicts); | public boolean checkConflicts(PullUpDialog dialog) { final MemberInfo[] infos = dialog.getSelectedMemberInfos(); PsiClass superClass = dialog.getSuperClass(); if (!checkWritable(superClass, infos)) return false; String[] conflicts = PullUpConflictsUtil.checkConflicts(infos, mySubclass, superClass, null, null, dialog.getContainmentVerifier()); if (conflicts.length > 0) { ConflictsDialog conflictsDialog = new ConflictsDialog(myProject); conflictsDialog.show(); return conflictsDialog.isOK(); } return true; } | 17306 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17306/413999cb6b9d69b19798528a6066ceba40f68c3c/PullUpHandler.java/clean/refactoring/impl/com/intellij/refactoring/memberPullUp/PullUpHandler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1250,
866,
30897,
12,
9629,
1211,
6353,
6176,
13,
288,
565,
727,
8596,
966,
8526,
10626,
273,
6176,
18,
588,
7416,
4419,
7655,
5621,
565,
453,
7722,
797,
18846,
273,
6176,
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,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1250,
866,
30897,
12,
9629,
1211,
6353,
6176,
13,
288,
565,
727,
8596,
966,
8526,
10626,
273,
6176,
18,
588,
7416,
4419,
7655,
5621,
565,
453,
7722,
797,
18846,
273,
6176,
18,
588,
... |
Asserts.notNull(name); Asserts.notNull(oldName); Asserts.isTrue(name.startsWith("$")); Asserts.isTrue(oldName.startsWith("$")); | assert name != null; assert oldName != null; assert name.startsWith("$"); assert oldName.startsWith("$"); | public void alias(String name, String oldName) { Asserts.notNull(name); Asserts.notNull(oldName); Asserts.isTrue(name.startsWith("$")); Asserts.isTrue(oldName.startsWith("$")); if (runtime.getSafeLevel() >= 4) { throw new SecurityError(runtime, "Insecure: can't alias global variable"); } GlobalVariable oldVariable = createIfNotDefined(oldName); GlobalVariable variable = (GlobalVariable)globalVariables.get(name); if (variable != null && oldVariable != variable && variable.isTracing()) { throw new RaiseException(runtime, "RuntimeError", "can't alias in tracer"); } globalVariables.put(name, oldVariable); } | 46217 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46217/b72a2862ae5b2f01f9a767ef2ce248fd785857c4/GlobalVariables.java/clean/src/org/jruby/internal/runtime/GlobalVariables.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
2308,
12,
780,
508,
16,
514,
22916,
13,
288,
3639,
5452,
87,
18,
902,
2041,
12,
529,
1769,
3639,
5452,
87,
18,
902,
2041,
12,
1673,
461,
1769,
3639,
5452,
87,
18,
291,
5510... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2308,
12,
780,
508,
16,
514,
22916,
13,
288,
3639,
5452,
87,
18,
902,
2041,
12,
529,
1769,
3639,
5452,
87,
18,
902,
2041,
12,
1673,
461,
1769,
3639,
5452,
87,
18,
291,
5510... |
exitMenuItem = newJMenuItem("Exit", KeyEvent.VK_X); | exitMenuItem = newJMenuItem("menu.exit", "Exit", KeyEvent.VK_X); | protected JMenuBar createMainMenuBar() { JMenuBar menuBar = new JMenuBar(); //Create JMenus for menuBar. JMenu fileMenu = newJMenu("File"); fileMenu.setMnemonic(KeyEvent.VK_F); JMenu editMenu = newJMenu("Edit"); editMenu.setMnemonic(KeyEvent.VK_E); //Edit fileMenu JMenu object. JMenuItem newProjectMenuItem = newJMenuItem("New Project", KeyEvent.VK_N); JMenuItem openProjectMenuItem = newJMenuItem("Open Project...", KeyEvent.VK_O); recentProjectsMenu = newJMenu("Recent Projects"); recentProjectsMenu.setMnemonic(KeyEvent.VK_E); createRecentProjectsMenu(); JMenuItem saveAsProjectMenuItem = newJMenuItem("Save Project As...", KeyEvent.VK_A); JMenuItem importBugsMenuItem = newJMenuItem("Load Analysis...", KeyEvent.VK_L); JMenuItem exportBugsMenuItem = newJMenuItem("Save Analysis...", KeyEvent.VK_B); JMenuItem redoAnalysis = newJMenuItem("Redo Analysis", KeyEvent.VK_R); JMenuItem mergeMenuItem = newJMenuItem("Merge Analysis..."); JMenuItem exitMenuItem = null; if (!MAC_OS_X) { exitMenuItem = newJMenuItem("Exit", KeyEvent.VK_X); exitMenuItem.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent evt){ callOnClose(); } }); } JMenu windowMenu = guiLayout.createWindowMenu(); attachAccelaratorKey(newProjectMenuItem, KeyEvent.VK_N); newProjectMenuItem.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent evt){ newProjectMenu(); } }); attachAccelaratorKey(editProjectMenuItem, KeyEvent.VK_F); editProjectMenuItem.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { saveComments(currentSelectedBugLeaf, currentSelectedBugAspects); new NewProjectWizard(curProject); } }); openProjectMenuItem.setEnabled(true); attachAccelaratorKey(openProjectMenuItem, KeyEvent.VK_O); openProjectMenuItem.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent evt){ openProject(); } }); mergeMenuItem.setEnabled(true); mergeMenuItem.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent evt){ mergeAnalysis(); } }); redoAnalysis.setEnabled(true); attachAccelaratorKey(redoAnalysis, KeyEvent.VK_R); redoAnalysis.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent evt){ redoAnalysis(); } }); saveProjectMenuItem.setEnabled(false); attachAccelaratorKey(saveProjectMenuItem, KeyEvent.VK_S); saveProjectMenuItem.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent evt){ saveComments(currentSelectedBugLeaf, currentSelectedBugAspects); save(projectDirectory); } }); saveAsProjectMenuItem.setEnabled(true); attachAccelaratorKey(saveAsProjectMenuItem, KeyEvent.VK_S, Event.SHIFT_MASK); saveAsProjectMenuItem.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent evt){ saveComments(currentSelectedBugLeaf, currentSelectedBugAspects); if(projectSaveAs()) saveProjectMenuItem.setEnabled(true); } }); attachAccelaratorKey(importBugsMenuItem, KeyEvent.VK_O, Event.ALT_MASK); importBugsMenuItem.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent evt){ loadAnalysis(); } }); exportBugsMenuItem.setEnabled(true); attachAccelaratorKey(exportBugsMenuItem, KeyEvent.VK_S, Event.ALT_MASK); exportBugsMenuItem.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent evt){ saveAnalysis(); } }); fileMenu.add(newProjectMenuItem); fileMenu.add(editProjectMenuItem); fileMenu.addSeparator(); fileMenu.add(openProjectMenuItem); fileMenu.add(recentProjectsMenu); fileMenu.addSeparator(); fileMenu.add(saveProjectMenuItem); fileMenu.add(saveAsProjectMenuItem); fileMenu.addSeparator(); fileMenu.add(importBugsMenuItem); fileMenu.add(exportBugsMenuItem); fileMenu.addSeparator(); fileMenu.add(redoAnalysis); fileMenu.add(mergeMenuItem); if (exitMenuItem != null) { fileMenu.addSeparator(); fileMenu.add(exitMenuItem); } menuBar.add(fileMenu); //Edit editMenu Menu object. JMenuItem cutMenuItem = new JMenuItem(new CutAction()); JMenuItem copyMenuItem = new JMenuItem(new CopyAction()); JMenuItem pasteMenuItem = new JMenuItem(new PasteAction()); preferencesMenuItem = newJMenuItem("Filters/Suppressions..."); JMenuItem sortMenuItem = newJMenuItem("Sort Configuration..."); JMenuItem goToLineMenuItem = newJMenuItem("Go to line..."); attachAccelaratorKey(cutMenuItem, KeyEvent.VK_X); attachAccelaratorKey(copyMenuItem, KeyEvent.VK_C); attachAccelaratorKey(pasteMenuItem, KeyEvent.VK_V); preferencesMenuItem.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent evt){ saveComments(currentSelectedBugLeaf, currentSelectedBugAspects); PreferencesFrame.getInstance().setLocationRelativeTo(MainFrame.this); PreferencesFrame.getInstance().setVisible(true); } }); sortMenuItem.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent evt){ saveComments(currentSelectedBugLeaf, currentSelectedBugAspects); SorterDialog.getInstance().setLocationRelativeTo(MainFrame.this); SorterDialog.getInstance().setVisible(true); } }); attachAccelaratorKey(goToLineMenuItem, KeyEvent.VK_L); goToLineMenuItem.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent evt){ guiLayout.makeSourceVisible(); try{ int num = Integer.parseInt(JOptionPane.showInputDialog(MainFrame.this, "", "Go To Line:", JOptionPane.QUESTION_MESSAGE)); displayer.showLine(num); } catch(NumberFormatException e){} }}); editMenu.add(cutMenuItem); editMenu.add(copyMenuItem); editMenu.add(pasteMenuItem); editMenu.addSeparator(); editMenu.add(goToLineMenuItem); editMenu.addSeparator(); //editMenu.add(selectAllMenuItem);// editMenu.addSeparator(); editMenu.add(preferencesMenuItem); editMenu.add(sortMenuItem); menuBar.add(editMenu); if (windowMenu != null) menuBar.add(windowMenu); final ActionMap map = tree.getActionMap(); JMenu navMenu = newJMenu("Navigation"); addNavItem(map, navMenu, "Expand", "expand", KeyEvent.VK_RIGHT ); addNavItem(map, navMenu, "Collapse", "collapse", KeyEvent.VK_LEFT); addNavItem(map, navMenu, "Up", "selectPrevious", KeyEvent.VK_UP ); addNavItem(map, navMenu, "Down", "selectNext", KeyEvent.VK_DOWN); menuBar.add(navMenu); JMenu designationMenu = newJMenu("Designation"); int i = 0; int keyEvents [] = {KeyEvent.VK_1, KeyEvent.VK_2, KeyEvent.VK_3, KeyEvent.VK_4, KeyEvent.VK_5, KeyEvent.VK_6, KeyEvent.VK_7, KeyEvent.VK_8, KeyEvent.VK_9}; for(String key : I18N.instance().getUserDesignationKeys(true)) { String name = I18N.instance().getUserDesignation(key); addDesignationItem(designationMenu, name, keyEvents[i++]); } menuBar.add(designationMenu); if (!MAC_OS_X) { // On Mac, 'About' appears under Findbugs menu, so no need for it here JMenu helpMenu = newJMenu("Help"); JMenuItem aboutItem = newJMenuItem("About FindBugs"); helpMenu.add(aboutItem); aboutItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { about(); } }); menuBar.add(helpMenu); } return menuBar; } | 7352 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7352/e46f6483c2781379c0187f280900175fdbdb8272/MainFrame.java/clean/findbugs/src/java5/edu/umd/cs/findbugs/gui2/MainFrame.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
804,
4599,
5190,
752,
6376,
4599,
5190,
1435,
288,
202,
202,
46,
4599,
5190,
3824,
5190,
273,
394,
804,
4599,
5190,
5621,
9506,
202,
759,
1684,
804,
29755,
364,
3824,
5190,
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,
1117,
804,
4599,
5190,
752,
6376,
4599,
5190,
1435,
288,
202,
202,
46,
4599,
5190,
3824,
5190,
273,
394,
804,
4599,
5190,
5621,
9506,
202,
759,
1684,
804,
29755,
364,
3824,
5190,
18,... |
} | } | private WindowTableModel createWindowModel() { return new WindowTableModel(); } | 8690 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8690/0dd723c3694db491cff88aad5a0eee98b1bb8e01/DockingOptionPane.java/clean/org/gjt/sp/jedit/options/DockingOptionPane.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
6076,
1388,
1488,
752,
3829,
1488,
1435,
202,
95,
202,
202,
2463,
394,
6076,
1388,
1488,
5621,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
6076,
1388,
1488,
752,
3829,
1488,
1435,
202,
95,
202,
202,
2463,
394,
6076,
1388,
1488,
5621,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
if (jj_3R_211()) return true; | if (jj_3R_350()) return true; | final private boolean jj_3R_342() { if (jj_3R_211()) return true; return false; } | 41673 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/41673/606e83b0f5c7b0b4f0d05f9c5bcc8d92c81d9342/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,
5026,
22,
1435,
288,
565,
309,
261,
78,
78,
67,
23,
54,
67,
23,
3361,
10756,
327,
638,
31,
565,
327,
629,
31,
225,
289,
2,
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,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
3238,
1250,
10684,
67,
23,
54,
67,
5026,
22,
1435,
288,
565,
309,
261,
78,
78,
67,
23,
54,
67,
23,
3361,
10756,
327,
638,
31,
565,
327,
629,
31,
225,
289,
2,
-100,
-100,
-100,
... |
Element recurElt = request.getOptionalElement(MailService.E_INSTANCE); if (recurElt != null) { RecurId recurId = CalendarUtils.parseRecurId(recurElt, inv.getTimeZoneMap(), inv); cancelInstance(lc, request, acct, mbox, appt, inv, recurId); } else { | public Element handle(Element request, Map context) throws ServiceException { long startTime = sWatch.start(); try { ZimbraContext lc = getZimbraContext(context); Account acct = getRequestedAccount(lc); Mailbox mbox = getRequestedMailbox(lc); OperationContext octxt = lc.getOperationContext(); ItemId iid = new ItemId(request.getAttribute(MailService.A_ID), lc); int compNum = (int) request.getAttributeLong(MailService.E_INVITE_COMPONENT); sLog.info("<CancelAppointment id=" + iid + " comp=" + compNum + ">"); synchronized (mbox) { Appointment appt = mbox.getAppointmentById(octxt, iid.getId()); Invite inv = appt.getInvite(iid.getSubpartId(), compNum); if (appt == null) { throw MailServiceException.NO_SUCH_APPOINTMENT(inv.getUid(), " for CancelAppointmentRequest(" + iid + "," + compNum + ")"); } Element recurElt = request.getOptionalElement(MailService.E_INSTANCE); if (recurElt != null) { RecurId recurId = CalendarUtils.parseRecurId(recurElt, inv.getTimeZoneMap(), inv); cancelInstance(lc, request, acct, mbox, appt, inv, recurId); } else { // if recur is not set, then we're cancelling the entire appointment... // first, pull a list of all the invites and THEN start cancelling them: since cancelling them // will remove them from the appointment's list, we can get really confused if we just directly // iterate through the list... Invite invites[] = new Invite[appt.numInvites()]; for (int i = appt.numInvites()-1; i >= 0; i--) { invites[i] = appt.getInvite(i); } for (int i = invites.length-1; i >= 0; i--) { if (invites[i] != null && (invites[i].getMethod().equals(ICalTok.REQUEST.toString()) || invites[i].getMethod().equals(ICalTok.PUBLISH.toString())) ) { cancelInvite(lc, request, acct, mbox, appt, invites[i]); } } } } // synchronized on mailbox Element response = lc.createElement(MailService.CANCEL_APPOINTMENT_RESPONSE); return response; } finally { sWatch.stop(startTime); } } | 6965 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6965/730ea281ef81c431ba62c481ddea62a0c34edfc9/CancelAppointment.java/buggy/ZimbraServer/src/java/com/zimbra/cs/service/mail/CancelAppointment.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3010,
1640,
12,
1046,
590,
16,
1635,
819,
13,
1216,
16489,
288,
3639,
1525,
8657,
273,
272,
5234,
18,
1937,
5621,
3639,
775,
288,
5411,
2285,
381,
15397,
1042,
9109,
273,
23448,
381... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3010,
1640,
12,
1046,
590,
16,
1635,
819,
13,
1216,
16489,
288,
3639,
1525,
8657,
273,
272,
5234,
18,
1937,
5621,
3639,
775,
288,
5411,
2285,
381,
15397,
1042,
9109,
273,
23448,
381... | |
else if (name.equals(SYMBOL_TABLE)){ | else if (name.equalsIgnoreCase(SYMBOL_TABLE)){ | public boolean canSetParameter(String name, Object value) { if (value == null){ //if null, the returned value is true. //REVISIT: I dont like this --- even for unrecognized parameter it would //return 'true'. I think it should return false in that case. // Application will be surprised to find that setParameter throws not //recognized exception when canSetParameter returns 'true' Then what is the use //of having canSetParameter ??? - nb. return true ; } if( value instanceof Boolean ){ //features whose parameter value can be set either 'true' or 'false' // or they accept any boolean value -- so we just need to check that // its a boolean value.. if (name.equals(Constants.DOM_COMMENTS) || name.equals(Constants.DOM_DATATYPE_NORMALIZATION) || name.equals(Constants.DOM_CDATA_SECTIONS) || name.equals(Constants.DOM_ENTITIES) || name.equals(Constants.DOM_SPLIT_CDATA) || name.equals(Constants.DOM_NAMESPACES) || name.equals(Constants.DOM_VALIDATE) || name.equals(Constants.DOM_WELLFORMED) || name.equals(Constants.DOM_INFOSET) ) { return true ; }//features whose parameter value can not be set to 'true' else if ( name.equals(Constants.DOM_NORMALIZE_CHARACTERS) || name.equals(Constants.DOM_CANONICAL_FORM) || name.equals(Constants.DOM_VALIDATE_IF_SCHEMA) || name.equals(Constants.DOM_CHECK_CHAR_NORMALIZATION) ) { return (value.equals(Boolean.TRUE)) ? false : true; }//features whose parameter value can not be set to 'false' else if( name.equals(Constants.DOM_NAMESPACE_DECLARATIONS) || name.equals(Constants.DOM_ELEMENT_CONTENT_WHITESPACE) || name.equals(SEND_PSVI) ) { return (value.equals(Boolean.TRUE)) ? true : false; }// if name is not among the above listed above -- its not recognized. return false else { return false ; } } else if (name.equals(Constants.DOM_ERROR_HANDLER)) { return (value instanceof DOMErrorHandler) ? true : false ; } else if (name.equals(Constants.DOM_RESOURCE_RESOLVER)) { return (value instanceof LSResourceResolver) ? true : false ; } else if (name.equals(Constants.DOM_SCHEMA_LOCATION)) { return (value instanceof String) ? true : false ; } else if (name.equals(Constants.DOM_SCHEMA_TYPE)) { // REVISIT: should null value be supported? //as of now we are only supporting W3C XML Schema return ( (value instanceof String) && value.equals(Constants.NS_XMLSCHEMA) ) ? true : false ; } else if (name.equals(SYMBOL_TABLE)){ // Xerces Symbol Table return (value instanceof SymbolTable) ? true : false ; } else if (name.equals (GRAMMAR_POOL)){ return (value instanceof XMLGrammarPool) ? true : false ; } else { //false if the parameter is not recognized or the requested value is not supported. return false ; } } //canSetParameter | 6373 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6373/533ebf030a7b0e9b294007b8c69adbacd68acc35/DOMConfigurationImpl.java/clean/src/org/apache/xerces/dom/DOMConfigurationImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
848,
694,
1662,
12,
780,
508,
16,
1033,
460,
13,
288,
3639,
309,
261,
1132,
422,
446,
15329,
5411,
368,
430,
446,
16,
326,
2106,
460,
353,
638,
18,
5411,
368,
862,
267... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
848,
694,
1662,
12,
780,
508,
16,
1033,
460,
13,
288,
3639,
309,
261,
1132,
422,
446,
15329,
5411,
368,
430,
446,
16,
326,
2106,
460,
353,
638,
18,
5411,
368,
862,
267... |
super(newPrevalentSystem, snapshotDirectoryName); | init(newPrevalentSystem, snapshotDirectoryName); | public SkaringaSnapshotManager(Object newPrevalentSystem, String snapshotDirectoryName) throws ClassNotFoundException, IOException { super(newPrevalentSystem, snapshotDirectoryName); } | 6336 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6336/9f3bf317e04c33c43873514183062a7f9edfcd81/SkaringaSnapshotManager.java/buggy/prevayler/src/main/org/prevayler/implementation/snapshot/SkaringaSnapshotManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
10362,
5968,
69,
4568,
1318,
12,
921,
394,
1386,
1125,
319,
3163,
16,
514,
4439,
2853,
461,
13,
1216,
10403,
16,
1860,
288,
202,
202,
9565,
12,
2704,
1386,
1125,
319,
3163,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
10362,
5968,
69,
4568,
1318,
12,
921,
394,
1386,
1125,
319,
3163,
16,
514,
4439,
2853,
461,
13,
1216,
10403,
16,
1860,
288,
202,
202,
9565,
12,
2704,
1386,
1125,
319,
3163,
16... |
res.close(); | protected synchronized int nextId(int key) throws CmsException { com.opencms.file.genericSql.CmsDbPool pool = (com.opencms.file.genericSql.CmsDbPool) m_pool; int newId = C_UNKNOWN_INT; PreparedStatement firstStatement = null; PreparedStatement statement = null; ResultSet res = null; try { firstStatement = pool.getPreparedStatement(m_cq.C_SYSTEMID_LOCK_KEY); firstStatement.executeUpdate(); statement = pool.getNextPreparedStatement(firstStatement, m_cq.C_SYSTEMID_READ_KEY); statement.setInt(1,key); res = statement.executeQuery(); if (res.next()){ newId = res.getInt(m_cq.C_SYSTEMID_ID); res.close(); }else{ res.close(); throw new CmsException("[" + this.getClass().getName() + "] "+" cant read Id! ",CmsException.C_NO_GROUP); } statement = pool.getNextPreparedStatement(firstStatement, m_cq.C_SYSTEMID_WRITE_KEY); statement.setInt(1,newId+1); statement.setInt(2,key); statement.executeUpdate(); statement = pool.getNextPreparedStatement(firstStatement, m_cq.C_SYSTEMID_UNLOCK_KEY); statement.executeUpdate(); m_pool.putPreparedStatement(m_cq.C_SYSTEMID_LOCK_KEY, firstStatement); } catch (SQLException e){ throw new CmsException("["+this.getClass().getName()+"] "+e.getMessage(),CmsException.C_SQL_ERROR, e); } return( newId ); } | 51784 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51784/d08c341ccfdbd4bb8b4b4f8ccf8259e733284995/CmsDbAccess.java/clean/src/com/opencms/file/genericSql/CmsDbAccess.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
3852,
509,
1024,
548,
12,
474,
498,
13,
3196,
202,
15069,
11228,
288,
202,
202,
832,
18,
556,
14645,
18,
768,
18,
13540,
5101,
18,
4747,
4331,
2864,
2845,
273,
261,
832,
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,
1117,
3852,
509,
1024,
548,
12,
474,
498,
13,
3196,
202,
15069,
11228,
288,
202,
202,
832,
18,
556,
14645,
18,
768,
18,
13540,
5101,
18,
4747,
4331,
2864,
2845,
273,
261,
832,
18,
... | |
public static SocketFactory getSocketFactory(String ssl, String instance) { return new TdsTlsSocketFactory(ssl, instance); | public static SocketFactory getSocketFactory(String ssl, Socket socket) { return new TdsTlsSocketFactory(ssl, socket); | public static SocketFactory getSocketFactory(String ssl, String instance) { return new TdsTlsSocketFactory(ssl, instance); } | 439 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/439/e7d0b7908da01b14476008fede47421df3409655/SocketFactories.java/buggy/trunk/jtds/src/main/net/sourceforge/jtds/ssl/SocketFactories.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
8758,
1733,
28673,
1733,
12,
780,
5832,
16,
514,
791,
13,
288,
3639,
327,
394,
399,
2377,
26115,
4534,
1733,
12,
8157,
16,
791,
1769,
565,
289,
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,
377,
1071,
760,
8758,
1733,
28673,
1733,
12,
780,
5832,
16,
514,
791,
13,
288,
3639,
327,
394,
399,
2377,
26115,
4534,
1733,
12,
8157,
16,
791,
1769,
565,
289,
2,
-100,
-100,
-100,
-100,
-10... |
} else { | } else { | public void mousePressed(MouseEvent e){ project proj_class=(project)project.oClass; if(e.getButton() == MouseEvent.BUTTON3) { //System.out.println("Mouse 3 Was Clicked with in stage area at "+e.getX()+" "+e.getY()); PopUpMenu menu = new PopUpMenu(this,proj_class.selected_type); menu.show((Component)this, e.getX(), e.getY()); } else { //System.out.println("Mouse Was Clicked with in stage area at "+e.getX()+" "+e.getY()); if(proj_class.draw_mouse_state==0) { Vector allList = new Vector(); int num_in_list=0; //THE NORMAL STATE //try to find out which object was selected int curx=e.getX(); int cury=e.getY(); int search_area=10; boolean found_item=false; Random ran_obj= new Random(); //check if the house was selected Object_Drawer items=proj_class.houses.get_objects_in_area(curx-search_area, cury-search_area, curx+search_area,cury+search_area); if(items.get_num_objects()>0) { allList.add(items.get_object(0)); num_in_list++; } //check if the stage was selected items=proj_class.stages.get_objects_in_area(curx-search_area, cury-search_area, curx+search_area,cury+search_area); if(items.get_num_objects()>0) { allList.add(items.get_object(0)); num_in_list++; } //check if any bars were selected items=proj_class.bars.get_objects_in_area(curx-search_area, cury-search_area, curx+search_area,cury+search_area); if(items.get_num_objects()>0) { int iter; for(iter=0;iter<items.get_num_objects();iter++) { allList.add(items.get_object(iter)); num_in_list++; } } //check if any instruments were selected items=proj_class.instruments.get_objects_in_area(curx-search_area, cury-search_area, curx+search_area,cury+search_area); if(items.get_num_objects()>0) { int iter; for(iter=0;iter<items.get_num_objects();iter++) { allList.add(items.get_object(iter)); num_in_list++; } } //select a random number from the created list of objects int ran_index=ran_obj.nextInt()%num_in_list; ran_index=Math.abs(ran_index); Object temp_obj=allList.get(ran_index); if(temp_obj instanceof house) { proj_class.selected_type=0; } else if(temp_obj instanceof stage) { proj_class.selected_type=1; } else if(temp_obj instanceof bar) { proj_class.selected_type=2; } else if(temp_obj instanceof instrument) { proj_class.selected_type=3; } else if(temp_obj instanceof setobject) { proj_class.selected_type=4; } proj_class.selected_index=((General_Object)temp_obj).index; ItemBrowser.displayInfo(temp_obj); repaint(); } else if(proj_class.draw_mouse_state==1) { //creation of a bar //System.out.println("Mouse state was 1 adding "+temp_bar.num_nodes+" node"); //drawing a bar if(temp_bar.num_nodes==0) { //begin chaplin edit if(proj_class.zoom_factor == 1) { temp_bar.worldx=e.getX(); temp_bar.worldy=e.getY(); } else { temp_bar.worldx=(e.getX()/proj_class.zoom_factor); temp_bar.worldy=(e.getY()/proj_class.zoom_factor); } //end chaplin edit temp_bar.add_node(0,0); } else { //begin chaplin edit if(proj_class.zoom_factor == 1) temp_bar.add_node(e.getX()-temp_bar.worldx,e.getY()-temp_bar.worldy); else temp_bar.add_node((e.getX()/proj_class.zoom_factor)-temp_bar.worldx,(e.getY()/proj_class.zoom_factor)-temp_bar.worldy); //end chaplin edit if(temp_bar.num_nodes>=2) { proj_class.addBar(temp_bar); proj_class.draw_mouse_state=0; temp_bar=null; } } } else if(proj_class.draw_mouse_state==2) { //adding an instrument to the selected bar //since the instrument has to be on the bar that was selected //use the x value of the mouse to find out the y value for the //edit here for instrument on bar problem. //placement on the bar int pot_x; int pot_y=-1; int barx1=proj_class.bars.get_object(temp_instrument.Associated_barID).x[0]+proj_class.bars.get_object(temp_instrument.Associated_barID).worldx; int barx2=proj_class.bars.get_object(temp_instrument.Associated_barID).x[1]+proj_class.bars.get_object(temp_instrument.Associated_barID).worldx; int bary1=proj_class.bars.get_object(temp_instrument.Associated_barID).y[0]+proj_class.bars.get_object(temp_instrument.Associated_barID).worldy; int bary2=proj_class.bars.get_object(temp_instrument.Associated_barID).y[1]+proj_class.bars.get_object(temp_instrument.Associated_barID).worldy; //swap the points to make the math easier because assume point 1 is to the right //begin chaplin edit if (proj_class.zoom_factor == 1) pot_x = e.getX(); else pot_x = (e.getX()/proj_class.zoom_factor); //end chaplin edit if(barx1>barx2) { int temp_int; temp_int=barx1; barx1=barx2; barx2=temp_int; temp_int=bary1; bary1=bary2; bary2=temp_int; } if((pot_x>barx1)&&(pot_x<barx2)) { //the x is valid find the y value for it //fix here. what if slope undefined or 0? i.e. vertical/horizontal line if(barx1-barx2!=0) { //to find slope y - y1 = m (x - x1) or m=(y-y1)/(x-x1) //double slope = (bary1-bary2)/(barx1-barx2); //to find y with an x use equation y=m(x-x1)+y1 //pot_y=(int)(slope*(double)(barx1-barx2)+bary2); double slope = (double)(bary1-bary2)/ (double)(barx1-barx2); pot_y=(int)(slope*((double)pot_x-(double)barx1)+(double)bary1); } } if(pot_y>=0) { //found a y so place it temp_instrument.worldx=pot_x; temp_instrument.worldy=pot_y; proj_class.instruments.add_object(temp_instrument); proj_class.draw_mouse_state=0; proj_class.selected_type=3; proj_class.selected_index=temp_instrument.index; temp_instrument=null; } } else if(proj_class.draw_mouse_state==6) { //moving a bar bar selected_bar=(bar)proj_class.bars.get_object(proj_class.selected_index); int old_bar_x; old_bar_x=selected_bar.worldx; int old_bar_y; old_bar_y=selected_bar.worldy; //move all the instrumetns attached to the bar //need to compensate for zoom factor just to tired to do it tonight int xdiff; int ydiff; //chaplin edit if(proj_class.zoom_factor == 1) { xdiff = old_bar_x-e.getX(); ydiff = old_bar_y-e.getY(); } else { xdiff = old_bar_x-(e.getX()/proj_class.zoom_factor); ydiff = old_bar_y-(e.getY()/proj_class.zoom_factor); } for(int iter=0;iter<proj_class.instruments.get_num_objects();iter++) { if(((instrument)proj_class.instruments.get_object(iter)).getBarID()==proj_class.selected_index) { proj_class.instruments.get_object(iter).worldx-=xdiff; proj_class.instruments.get_object(iter).worldy-=ydiff; } } //actually move the bar if(proj_class.zoom_factor == 1) { proj_class.bars.get_object(proj_class.selected_index).worldx=e.getX(); proj_class.bars.get_object(proj_class.selected_index).worldy=e.getY(); } else { proj_class.bars.get_object(proj_class.selected_index).worldx=(e.getX()/proj_class.zoom_factor); proj_class.bars.get_object(proj_class.selected_index).worldy=(e.getY()/proj_class.zoom_factor); } proj_class.draw_mouse_state=0; } else if(proj_class.draw_mouse_state==8) { //adding a stage object if(temp_stage.num_nodes==0) { if(proj_class.zoom_factor == 1) { temp_stage.worldx=e.getX(); temp_stage.worldy=e.getY(); } else { temp_stage.worldx=(e.getX()/proj_class.zoom_factor); temp_stage.worldy=(e.getY()/proj_class.zoom_factor); } temp_stage.add_node(0,0); } else { if(proj_class.zoom_factor == 1) { temp_stage.add_node(e.getX()-temp_stage.worldx,e.getY()-temp_stage.worldy); } else { temp_stage.add_node((e.getX()/proj_class.zoom_factor)-temp_stage.worldx,(e.getY()/proj_class.zoom_factor)-temp_stage.worldy); } if(temp_stage.num_nodes>=15) { proj_class.addStage(temp_stage); proj_class.draw_mouse_state=0; temp_stage=null; } } } else if(proj_class.draw_mouse_state==9) { //adding a stage object if(temp_set.num_nodes==0) { if(proj_class.zoom_factor == 1) { temp_set.worldx=e.getX(); temp_set.worldy=e.getY(); } else { temp_set.worldx=e.getX()/proj_class.zoom_factor; temp_set.worldy=e.getY()/proj_class.zoom_factor; } temp_set.add_node(0,0); } else { if(proj_class.zoom_factor == 1) { temp_set.add_node(e.getX()-temp_set.worldx,e.getY()-temp_set.worldy); } else { temp_set.add_node((e.getX()/proj_class.zoom_factor)-temp_set.worldx,(e.getY()/proj_class.zoom_factor)-temp_set.worldy); } if(temp_set.num_nodes>=15) { proj_class.addSet(temp_set); proj_class.draw_mouse_state=0; temp_set=null; } } } else if(proj_class.draw_mouse_state==4) { //edit nodes of house //change this?? if(selected_node<0) { //find a node to select selected_node=temp_house.closest_node(e.getX(),e.getY()); } else { //set the node to the new position temp_house.move_node(selected_node, e.getX(), e.getY()); selected_node=-1; } } else if(proj_class.draw_mouse_state==5) { //edit node of stage //change this?? if(selected_node<0) { //find a node to select selected_node=temp_stage.closest_node(e.getX(),e.getY()); } else { //set the node to the new position temp_stage.move_node(selected_node, e.getX(), e.getY()); selected_node=-1; } } else if(proj_class.draw_mouse_state==3) { //edit nodes of bar //change this?? if(selected_node<0) { //find a node to select selected_node=temp_bar.closest_node(e.getX(),e.getY()); } else { //set the node to the new position temp_bar.move_node(selected_node, e.getX(), e.getY()); selected_node=-1; } //proj_class.draw_mouse_state=0; } else if(proj_class.draw_mouse_state==10) { //edit nodes of set object //change this?? if(selected_node<0) { //find a node to select selected_node=temp_set.closest_node(e.getX(),e.getY()); } else { //set the node to the new position temp_set.move_node(selected_node, e.getX(), e.getY()); selected_node=-1; } } repaint(); } } | 11744 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11744/2c94ce45eff274c86765397beaf012337a7074d2/TransPanel.java/buggy/src/drawing_prog/TransPanel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
7644,
24624,
12,
9186,
1133,
425,
15329,
3639,
1984,
10296,
67,
1106,
28657,
4406,
13,
4406,
18,
83,
797,
31,
3639,
309,
12,
73,
18,
588,
3616,
1435,
422,
17013,
1133,
18,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
7644,
24624,
12,
9186,
1133,
425,
15329,
3639,
1984,
10296,
67,
1106,
28657,
4406,
13,
4406,
18,
83,
797,
31,
3639,
309,
12,
73,
18,
588,
3616,
1435,
422,
17013,
1133,
18,
20... |
int xval = x.ival; int yval = y.ival; if (x.words == null) | if (b > a) | public static IntNum gcd (IntNum x, IntNum y) { int xval = x.ival; int yval = y.ival; if (x.words == null) { if (xval == 0) return IntNum.abs(y); if (y.words == null && xval != Integer.MIN_VALUE && yval != Integer.MIN_VALUE) { if (xval < 0) xval = -xval; if (yval < 0) yval = -yval; return IntNum.make (IntNum.gcd (xval, yval)); } xval = 1; } if (y.words == null) { if (yval == 0) return IntNum.abs(x); yval = 1; } int len = (xval > yval ? xval : yval) + 1; int[] xwords = new int[len]; int[] ywords = new int[len]; x.getAbsolute (xwords); y.getAbsolute (ywords); len = MPN.gcd (xwords, ywords, len); IntNum result = new IntNum (0); result.ival = len; result.words = xwords; return result.canonicalize (); } | 36870 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/36870/2f567fadceb74b9bb8c9ee224a088b49518f716b/IntNum.java/buggy/gnu/math/IntNum.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
3094,
2578,
14876,
261,
1702,
2578,
619,
16,
3094,
2578,
677,
13,
225,
288,
565,
509,
619,
1125,
273,
619,
18,
5162,
31,
565,
509,
677,
1125,
273,
677,
18,
5162,
31,
565,
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,
1071,
760,
3094,
2578,
14876,
261,
1702,
2578,
619,
16,
3094,
2578,
677,
13,
225,
288,
565,
509,
619,
1125,
273,
619,
18,
5162,
31,
565,
509,
677,
1125,
273,
677,
18,
5162,
31,
565,
3... |
private final boolean isLVT(char c) { return isL(c) || isV(c) || isT(c); | private final boolean isLVT (char c) { return isL (c) || isV (c) || isT (c); | private final boolean isLVT(char c) { return isL(c) || isV(c) || isT(c); } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/b5af1a0dd02ba16d1f4f4556ab34fa51c2db060d/CharacterBreakIterator.java/clean/core/src/classpath/gnu/gnu/java/text/CharacterBreakIterator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
727,
1250,
28601,
58,
56,
12,
3001,
276,
13,
288,
202,
202,
2463,
28601,
12,
71,
13,
747,
353,
58,
12,
71,
13,
747,
353,
56,
12,
71,
1769,
202,
97,
2,
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,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
727,
1250,
28601,
58,
56,
12,
3001,
276,
13,
288,
202,
202,
2463,
28601,
12,
71,
13,
747,
353,
58,
12,
71,
13,
747,
353,
56,
12,
71,
1769,
202,
97,
2,
-100,
-100,
-100,
... |
final PsiStatement statementLabeled = labeledStatement.getStatement(); return statementMustThrowException( statementLabeled); } else if (statement instanceof PsiIfStatement) { return ifStatementMustThrowException( (PsiIfStatement) statement); } else if (statement instanceof PsiTryStatement) { return tryStatementMustThrowException( (PsiTryStatement) statement); } else if (statement instanceof PsiSwitchStatement) { | final PsiStatement statementLabeled = labeledStatement .getStatement(); return statementMustThrowException(statementLabeled); } else if(statement instanceof PsiIfStatement){ return ifStatementMustThrowException((PsiIfStatement) statement); } else if(statement instanceof PsiTryStatement){ return tryStatementMustThrowException((PsiTryStatement) statement); } else if(statement instanceof PsiSwitchStatement){ | private static boolean statementMustThrowException( PsiStatement statement) { if (statement == null) { return false; } if (statement instanceof PsiBreakStatement || statement instanceof PsiContinueStatement || statement instanceof PsiAssertStatement || statement instanceof PsiReturnStatement || statement instanceof PsiExpressionStatement || statement instanceof PsiExpressionListStatement || statement instanceof PsiForeachStatement || statement instanceof PsiDeclarationStatement || statement instanceof PsiEmptyStatement) { return false; } else if (statement instanceof PsiThrowStatement) { return true; } else if (statement instanceof PsiForStatement) { return forStatementMustThrowException( (PsiForStatement) statement); } else if (statement instanceof PsiWhileStatement) { return whileStatementMustThrowException( (PsiWhileStatement) statement); } else if (statement instanceof PsiDoWhileStatement) { return doWhileMustThrowException( (PsiDoWhileStatement) statement); } else if (statement instanceof PsiSynchronizedStatement) { final PsiCodeBlock body = ((PsiSynchronizedStatement) statement).getBody(); return blockMustThrowException( body); } else if (statement instanceof PsiBlockStatement) { final PsiCodeBlock codeBlock = ((PsiBlockStatement) statement).getCodeBlock(); return blockMustThrowException( codeBlock); } else if (statement instanceof PsiLabeledStatement) { final PsiLabeledStatement labeledStatement = (PsiLabeledStatement) statement; final PsiStatement statementLabeled = labeledStatement.getStatement(); return statementMustThrowException( statementLabeled); } else if (statement instanceof PsiIfStatement) { return ifStatementMustThrowException( (PsiIfStatement) statement); } else if (statement instanceof PsiTryStatement) { return tryStatementMustThrowException( (PsiTryStatement) statement); } else if (statement instanceof PsiSwitchStatement) { return false; } else // unknown statement type { return false; } } | 56598 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56598/fc3fc1341db4aa6d26930bf45116ec44c28fc569/InitializationUtils.java/clean/plugins/InspectionGadgets/src/com/siyeh/ig/psiutils/InitializationUtils.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
1250,
3021,
10136,
8282,
503,
12,
225,
453,
7722,
3406,
3021,
13,
288,
3639,
309,
261,
11516,
422,
446,
13,
288,
5411,
327,
629,
31,
3639,
289,
3639,
309,
261,
11516,
1276,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
1250,
3021,
10136,
8282,
503,
12,
225,
453,
7722,
3406,
3021,
13,
288,
3639,
309,
261,
11516,
422,
446,
13,
288,
5411,
327,
629,
31,
3639,
289,
3639,
309,
261,
11516,
1276,
4... |
SOAPBinding binding) { | SOAPBinding binding, ParameterBinding paramBinding) { | protected Object fillData(RuntimeContext context, Parameter param, Object obj, Object[] data, SOAPBinding binding) { if (param.isWrapperStyle()) { Object resp = null; for (Parameter p : ((WrapperParameter) param).getWrapperChildren()) { QName name = p.getName(); Object value = null; if (binding.isDocLit()){ value = super.getWrapperChildValue(context, ((JAXBBridgeInfo)obj).getValue(), name.getNamespaceURI(), name .getLocalPart()); }else if (binding.isRpcLit()){ value = getWrapperChildValue(context, obj, name.getNamespaceURI(), name .getLocalPart()); if(value == null) value = setIfPrimitive(p.getTypeReference().type); } if (p.isResponse()) resp = value; else { if (data[p.getIndex()] != null) { Parameter.setHolderValue(data[p.getIndex()], value); } else { data[p.getIndex()] = p.createHolderValue(value); } } } return resp; } if(!param.getBinding().isAttachment()) obj = (obj != null)?((JAXBBridgeInfo)obj).getValue():null; if (param.isResponse()) { return obj; } else if (data[param.getIndex()] != null) { Parameter.setHolderValue(data[param.getIndex()], obj); } else { data[param.getIndex()] = param.createHolderValue(obj); } return null; } | 9667 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9667/6200604565355885ba65f291977a296dc68e9045/EncoderDecoder.java/buggy/jaxws-ri/rt/src/com/sun/xml/ws/encoding/soap/EncoderDecoder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
1033,
3636,
751,
12,
5576,
1042,
819,
16,
5498,
579,
16,
1033,
1081,
16,
1033,
8526,
501,
16,
5411,
16434,
5250,
5085,
16,
5498,
5250,
579,
5250,
13,
288,
3639,
309,
261,
891,
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,
4750,
1033,
3636,
751,
12,
5576,
1042,
819,
16,
5498,
579,
16,
1033,
1081,
16,
1033,
8526,
501,
16,
5411,
16434,
5250,
5085,
16,
5498,
5250,
579,
5250,
13,
288,
3639,
309,
261,
891,
18,... |
if (isAutoScale()) computeScale(scaler, plotLine); | private void drawBars(GC gc, PlotLine plotLine, Scaler scaler, boolean selected) { if (plotLine.getScaleFlag()) { scaler = new Scaler(); scaler.setExtendRange(this.scaler.getExtendRange()); scaler.set(this.scaler.getHeight(), plotLine.getHigh(), plotLine.getLow(), this.scaler.getLogScaleHigh(), this.scaler.getLogRange(), this.scaler.getLogFlag()); if (isAutoScale()) computeScale(scaler, plotLine); } gc.setLineStyle(SWT.LINE_SOLID); gc.setForeground(plotLine.getColor()); int ofs = barData.size() - plotLine.getSize(); int x = getMarginWidth() + getGridWidth() / 2 + ofs * getGridWidth(); for (int i = 0; i < plotLine.getSize(); i++, x += getGridWidth()) { if (plotLine.getColor(i) != null) gc.setForeground(plotLine.getColor(i)); int y = scaler.convertToY(plotLine.getBar(i).getOpen()); gc.drawLine(x - 2, y, x, y); y = scaler.convertToY(plotLine.getBar(i).getClose()); gc.drawLine(x, y, x + 2, y); int y1 = scaler.convertToY(plotLine.getBar(i).getHigh()); int y2 = scaler.convertToY(plotLine.getBar(i).getLow()); gc.drawLine(x, y1, x, y2); } // Draw the selection marks if (selected) { x = getMarginWidth() + getGridWidth() / 2 + ofs * getGridWidth(); int[] pointArray = new int[plotLine.getSize() * 2]; for (int i = 0, pa = 0; i < plotLine.getSize(); i++, x += getGridWidth()) { pointArray[pa++] = x; pointArray[pa++] = scaler.convertToY(plotLine.getBar(i).getLow() + (plotLine.getBar(i).getHigh() - plotLine.getBar(i).getLow()) / 2); } if (pointArray.length > 0) { gc.setBackground(selectionMarks); int length = pointArray.length / 2; if (length <= 20) { gc.fillRectangle(pointArray[0] - 1, pointArray[1] - 1, 5, 5); gc.fillRectangle(pointArray[(length / 2) * 2] - 1, pointArray[(length / 2) * 2 + 1] - 1, 5, 5); } else { for (int i = 0; i < length - 5; i += 10) gc.fillRectangle(pointArray[i * 2] - 1, pointArray[i * 2 + 1] - 1, 5, 5); } gc.fillRectangle(pointArray[pointArray.length - 2] - 1, pointArray[pointArray.length - 1] - 1, 5, 5); } } } | 12846 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12846/5c507e7b50bb8282aa867762bb78671aab5cfdca/IndicatorPlot.java/buggy/net.sourceforge.eclipsetrader.charts/src/net/sourceforge/eclipsetrader/charts/IndicatorPlot.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
3724,
5190,
87,
12,
15396,
8859,
16,
15211,
1670,
3207,
1670,
16,
348,
13501,
8292,
264,
16,
1250,
3170,
13,
565,
288,
3639,
309,
261,
4032,
1670,
18,
588,
5587,
4678,
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,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
3724,
5190,
87,
12,
15396,
8859,
16,
15211,
1670,
3207,
1670,
16,
348,
13501,
8292,
264,
16,
1250,
3170,
13,
565,
288,
3639,
309,
261,
4032,
1670,
18,
588,
5587,
4678,
10756,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.