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 |
|---|---|---|---|---|---|---|
return "itemimages/familiar" + familiarID + ".gif"; | return familiarID <= KNOWN_FAMILIARS ? "itemimages/familiar" + familiarID + ".gif" : "0star.gif"; | public static String getFamiliarImageLocation( int familiarID ) { switch ( familiarID ) { case 18: return "itemimages/hat2.gif"; case 37: return "itemimages/sgfairy.gif"; case 48: return "itemimages/npzr.gif"; case 49: return "itemimages/slgfairy.gif"; case 50: return "itemimages/hare.gif"; case 51: return "itemimages/chatteeth.gif"; default: return "itemimages/familiar" + familiarID + ".gif"; } } | 50364 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50364/ad3cbbe12c74ee11a9847612f606f3a2b6a2df81/FamiliarsDatabase.java/buggy/src/net/sourceforge/kolmafia/FamiliarsDatabase.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
514,
2812,
11580,
77,
297,
2040,
2735,
12,
509,
284,
11580,
77,
297,
734,
262,
202,
95,
202,
202,
9610,
261,
284,
11580,
77,
297,
734,
262,
202,
202,
95,
1082,
202,
359... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
514,
2812,
11580,
77,
297,
2040,
2735,
12,
509,
284,
11580,
77,
297,
734,
262,
202,
95,
202,
202,
9610,
261,
284,
11580,
77,
297,
734,
262,
202,
202,
95,
1082,
202,
359... |
blocksCompleted++; if(blocksCompleted != dataBlockInserters.length + checkBlockInserters.length) return true; return false; | checkBlockInserters[x-dataBlocks.length] = null; } else { if(dataBlockInserters[x] == null) { Logger.error(this, "Completed twice: data block "+x+" on "+this); return true; } dataBlockInserters[x] = null; | private boolean completed(int x) { Logger.minor(this, "Completed: "+x+" on "+this+" ( completed="+blocksCompleted+", total="+(dataBlockInserters.length+checkBlockInserters.length)); synchronized(this) { if(finished) return true; if(x >= dataBlocks.length) { if(checkBlockInserters[x-dataBlocks.length] == null) { Logger.error(this, "Completed twice: check block "+x+" on "+this); return true; } checkBlockInserters[x-dataBlocks.length] = null; } else { if(dataBlockInserters[x] == null) { Logger.error(this, "Completed twice: data block "+x+" on "+this); return true; } dataBlockInserters[x] = null; } blocksCompleted++; if(blocksCompleted != dataBlockInserters.length + checkBlockInserters.length) return true; return false; } } | 49933 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49933/a6a9cc01004d94d4bdefc0b76c0bdb1962187369/SplitFileInserterSegment.java/clean/src/freenet/client/async/SplitFileInserterSegment.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
1250,
5951,
12,
474,
619,
13,
288,
202,
202,
3328,
18,
17364,
12,
2211,
16,
315,
9556,
30,
13773,
92,
9078,
603,
13773,
2211,
9078,
261,
5951,
1546,
15,
7996,
9556,
15,
3113,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
1250,
5951,
12,
474,
619,
13,
288,
202,
202,
3328,
18,
17364,
12,
2211,
16,
315,
9556,
30,
13773,
92,
9078,
603,
13773,
2211,
9078,
261,
5951,
1546,
15,
7996,
9556,
15,
3113,... |
public void accept(NodeVisitor iVisitor) { iVisitor.visitDStrNode(this); } | public void accept(NodeVisitor iVisitor) { iVisitor.visitDStrNode(this); } | public void accept(NodeVisitor iVisitor) { iVisitor.visitDStrNode(this); } | 46454 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46454/6033f9c2f59690506013679a71ee19c554c93ae4/DStrNode.java/buggy/org/jruby/nodes/DStrNode.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
2791,
12,
907,
7413,
277,
7413,
13,
202,
202,
95,
202,
202,
77,
7413,
18,
11658,
40,
1585,
907,
12,
2211,
1769,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
2791,
12,
907,
7413,
277,
7413,
13,
202,
202,
95,
202,
202,
77,
7413,
18,
11658,
40,
1585,
907,
12,
2211,
1769,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
nodes.add(new Path.Node(50,19)); | nodes.add(new Path.Node(50, 19)); | protected void createPath() { List<Path.Node> nodes=new LinkedList<Path.Node>(); nodes.add(new Path.Node(46,19)); nodes.add(new Path.Node(46,20)); nodes.add(new Path.Node(50,20)); nodes.add(new Path.Node(50,19)); nodes.add(new Path.Node(50,20)); nodes.add(new Path.Node(46,20)); setPath(nodes,true); } | 4438 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4438/d512245d8e26069d9f1c5a15fba078b322c3b0ac/Semos.java/buggy/src/games/stendhal/server/maps/Semos.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4202,
4750,
918,
752,
743,
1435,
3639,
288,
3639,
987,
32,
743,
18,
907,
34,
2199,
33,
2704,
10688,
32,
743,
18,
907,
34,
5621,
3639,
2199,
18,
1289,
12,
2704,
2666,
18,
907,
12,
8749,
16,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4202,
4750,
918,
752,
743,
1435,
3639,
288,
3639,
987,
32,
743,
18,
907,
34,
2199,
33,
2704,
10688,
32,
743,
18,
907,
34,
5621,
3639,
2199,
18,
1289,
12,
2704,
2666,
18,
907,
12,
8749,
16,... |
_cnt963++; | _cnt967++; | public final void defineframestate(AST _t) throws RecognitionException { AST defineframestate_AST_in = (_t == ASTNULL) ? null : (AST)_t; AST __t952 = _t; AST tmp657_AST_in = (AST)_t; match(_t,DEFINE); _t = _t.getFirstChild(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case NEW: case SHARED: { def_shared(_t); _t = _retTree; break; } case FRAME: case PRIVATE: case PUBLIC: case PROTECTED: { break; } default: { throw new NoViableAltException(_t); } } } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case PRIVATE: case PUBLIC: case PROTECTED: { def_visib(_t); _t = _retTree; break; } case FRAME: { break; } default: { throw new NoViableAltException(_t); } } } AST tmp658_AST_in = (AST)_t; match(_t,FRAME); _t = _t.getNextSibling(); AST tmp659_AST_in = (AST)_t; match(_t,ID); _t = _t.getNextSibling(); { _loop956: do { if (_t==null) _t=ASTNULL; if ((_t.getType()==Form_item)) { form_item(_t); _t = _retTree; } else { break _loop956; } } while (true); } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case HEADER: { AST __t958 = _t; AST tmp660_AST_in = (AST)_t; match(_t,HEADER); _t = _t.getFirstChild(); { int _cnt960=0; _loop960: do { if (_t==null) _t=ASTNULL; if ((_t.getType()==Form_item)) { display_item(_t); _t = _retTree; } else { if ( _cnt960>=1 ) { break _loop960; } else {throw new NoViableAltException(_t);} } _cnt960++; } while (true); } _t = __t958; _t = _t.getNextSibling(); break; } case BACKGROUND: { AST __t961 = _t; AST tmp661_AST_in = (AST)_t; match(_t,BACKGROUND); _t = _t.getFirstChild(); { int _cnt963=0; _loop963: do { if (_t==null) _t=ASTNULL; if ((_t.getType()==Form_item)) { display_item(_t); _t = _retTree; } else { if ( _cnt963>=1 ) { break _loop963; } else {throw new NoViableAltException(_t);} } _cnt963++; } while (true); } _t = __t961; _t = _t.getNextSibling(); break; } case EOF: case PERIOD: case EXCEPT: case WITH: { break; } default: { throw new NoViableAltException(_t); } } } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case EXCEPT: { AST __t965 = _t; AST tmp662_AST_in = (AST)_t; match(_t,EXCEPT); _t = _t.getFirstChild(); { _loop967: do { if (_t==null) _t=ASTNULL; if ((_t.getType()==Field_ref)) { field(_t); _t = _retTree; } else { break _loop967; } } while (true); } _t = __t965; _t = _t.getNextSibling(); break; } case EOF: case PERIOD: case WITH: { break; } default: { throw new NoViableAltException(_t); } } } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case WITH: { framephrase(_t); _t = _retTree; break; } case EOF: case PERIOD: { break; } default: { throw new NoViableAltException(_t); } } } state_end(_t); _t = _retTree; _t = __t952; _t = _t.getNextSibling(); _retTree = _t; } | 13952 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13952/daa15e07422d3491bbbb4d0060450c81983332a4/JPTreeParser.java/clean/trunk/org.prorefactor.core/src/org/prorefactor/treeparserbase/JPTreeParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
4426,
74,
1940,
395,
340,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
4426,
74,
1940,
395,
340,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4426,
74,
1940,
395,
340,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
4426,
74,
1940,
395,
340,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
... |
CmsFile file = getCms().readFile(getCms().getSitePath(res)); uri = new String(file.getContents()); | uri = new String(CmsFile.upgrade(res, getCms()).getContents()); | public String applyButton() { if (MODE_VIEW.equals(getParamDialogMode())) { // in view mode, generate disabled button return button(null, null, "apply_in.png", "button.paste", 0); } else { String uri = getParamResourcePath(); if (CmsStringUtil.isEmpty(getParamDialogMode())) { // in editor mode, create a valid link from resource path uri = getJsp().link(uri); } else if (MODE_WIDGET.equals(getParamDialogMode())) { // get real link target in widget mode from file content try { CmsResource res = getCms().readResource(getParamResourcePath()); CmsFile file = getCms().readFile(getCms().getSitePath(res)); uri = new String(file.getContents()); } catch (CmsException e) { // this should never happen LOG.error(e); } } return button( "javascript:link('" + uri + "',document.form.title.value, document.form.title.value);", null, "apply.png", "button.paste", 0); } } | 51784 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51784/47af503bf7828b7c08f9a264b53dec4ab039220b/CmsLinkGallery.java/clean/src/org/opencms/workplace/galleries/CmsLinkGallery.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
2230,
3616,
1435,
288,
3639,
309,
261,
7038,
67,
12145,
18,
14963,
12,
588,
786,
6353,
2309,
1435,
3719,
288,
5411,
368,
316,
1476,
1965,
16,
2103,
5673,
3568,
5411,
327,
3568,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2230,
3616,
1435,
288,
3639,
309,
261,
7038,
67,
12145,
18,
14963,
12,
588,
786,
6353,
2309,
1435,
3719,
288,
5411,
368,
316,
1476,
1965,
16,
2103,
5673,
3568,
5411,
327,
3568,... |
if (changeListeners == null) { boolean hadListeners = hasListeners(); changeListeners = listener; if (!hadListeners) { firstListenerAdded(); } return; } Collection listenerList; if (changeListeners instanceof IChangeListener) { IChangeListener l = (IChangeListener) changeListeners; listenerList = new ArrayList(); listenerList.add(l); changeListeners = listenerList; } else { listenerList = (Collection) changeListeners; } listenerList.add(listener); | changeSupport.addChangeListener(listener); | public synchronized void addChangeListener(IChangeListener listener) { if (changeListeners == null) { boolean hadListeners = hasListeners(); changeListeners = listener; if (!hadListeners) { firstListenerAdded(); } return; } Collection listenerList; if (changeListeners instanceof IChangeListener) { IChangeListener l = (IChangeListener) changeListeners; listenerList = new ArrayList(); listenerList.add(l); changeListeners = listenerList; } else { listenerList = (Collection) changeListeners; } listenerList.add(listener); } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/6aecdb31231a8602dbf72944625703c440949c78/AbstractObservableList.java/clean/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/list/AbstractObservableList.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3852,
918,
527,
15744,
12,
45,
15744,
2991,
13,
288,
202,
202,
430,
261,
3427,
5583,
422,
446,
13,
288,
1082,
202,
6494,
9323,
5583,
273,
711,
5583,
5621,
1082,
202,
3427,
558... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3852,
918,
527,
15744,
12,
45,
15744,
2991,
13,
288,
202,
202,
430,
261,
3427,
5583,
422,
446,
13,
288,
1082,
202,
6494,
9323,
5583,
273,
711,
5583,
5621,
1082,
202,
3427,
558... |
Connection someConnection = getConnection(); final DimensionView products = createSimpleDimensionView(someConnection); Util.discard(products); StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); print(products, pw); pw.flush(); assertEquals("", sw.toString()); } | Connection someConnection = getConnection(); final DimensionView products = createSimpleDimensionView(someConnection); Util.discard(products); StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); print(products, pw); pw.flush(); assertEquals("", sw.toString()); } | public void testSimpleDimensionView() throws OLAPException { Connection someConnection = getConnection(); final DimensionView products = createSimpleDimensionView(someConnection); Util.discard(products); StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); print(products, pw); pw.flush(); assertEquals("", sw.toString()); } | 4891 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4891/b5b5168edc3af09cb74945a80b0c36e6630ed502/JolapTest.java/buggy/testsrc/main/mondrian/test/JolapTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
5784,
8611,
1767,
1435,
1216,
531,
48,
2203,
503,
288,
202,
202,
1952,
2690,
1952,
273,
6742,
5621,
202,
202,
6385,
13037,
1767,
10406,
273,
752,
5784,
8611,
1767,
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,
918,
1842,
5784,
8611,
1767,
1435,
1216,
531,
48,
2203,
503,
288,
202,
202,
1952,
2690,
1952,
273,
6742,
5621,
202,
202,
6385,
13037,
1767,
10406,
273,
752,
5784,
8611,
1767,
12... |
throw new InvalidKeySpecException( "DSAPrivateKeySpec not supported: " + "http: /* | protected java.security.PrivateKey engineGeneratePrivate(KeySpec keySpec) throws InvalidKeySpecException { if( keySpec instanceof RSAPrivateCrtKeySpec ) { // // PKCS #1 RSAPrivateKey // RSAPrivateCrtKeySpec spec = (RSAPrivateCrtKeySpec) keySpec; SEQUENCE privKey = new SEQUENCE(); privKey.addElement( new INTEGER(0) ) ; // version privKey.addElement( new INTEGER(spec.getModulus()) ); privKey.addElement( new INTEGER(spec.getPublicExponent()) ); privKey.addElement( new INTEGER(spec.getPrivateExponent()) ); privKey.addElement( new INTEGER(spec.getPrimeP()) ); privKey.addElement( new INTEGER(spec.getPrimeQ()) ); privKey.addElement( new INTEGER(spec.getPrimeExponentP()) ); privKey.addElement( new INTEGER(spec.getPrimeExponentQ()) ); privKey.addElement( new INTEGER(spec.getCrtCoefficient()) ); AlgorithmIdentifier algID = new AlgorithmIdentifier( PrivateKey.RSA.toOID(), null ); OCTET_STRING encodedPrivKey = new OCTET_STRING( ASN1Util.encode(privKey) ); PrivateKeyInfo pki = new PrivateKeyInfo( new INTEGER(0), // version algID, encodedPrivKey, (SET)null // OPTIONAL SET OF Attribute ); return PK11PrivKey.fromPrivateKeyInfo( ASN1Util.encode(pki), TokenSupplierManager.getTokenSupplier().getThreadToken() ); } else if( keySpec instanceof DSAPrivateKeySpec ) { throw new InvalidKeySpecException( "DSAPrivateKeySpec not supported: " + "http://bugzilla.mozilla.org/show_bug.cgi?id=150720"); /* DSAPrivateKeySpec spec = (DSAPrivateKeySpec) keySpec; SEQUENCE pqgParams = new SEQUENCE(); pqgParams.addElement(new INTEGER(spec.getP())); pqgParams.addElement(new INTEGER(spec.getQ())); pqgParams.addElement(new INTEGER(spec.getG())); AlgorithmIdentifier algID = new AlgorithmIdentifier( PrivateKey.DSA.toOID(), pqgParams ); OCTET_STRING privateKey = new OCTET_STRING( ASN1Util.encode(new INTEGER(spec.getX())) ); PrivateKeyInfo pki = new PrivateKeyInfo( new INTEGER(0), // version algID, privateKey, null // OPTIONAL SET OF Attribute ); return PK11PrivKey.fromPrivateKeyInfo( ASN1Util.encode(pki), TokenSupplierManager.getTokenSupplier().getThreadToken() ); */ } else if( keySpec instanceof PKCS8EncodedKeySpec ) { return PK11PrivKey.fromPrivateKeyInfo( (PKCS8EncodedKeySpec)keySpec, TokenSupplierManager.getTokenSupplier().getThreadToken() ); } throw new InvalidKeySpecException("Unsupported KeySpec type: " + keySpec.getClass().getName()); } | 12904 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12904/5013a65e3363856576685c9e4fbdbbaf31e1d9bd/KeyFactorySpi1_2.java/buggy/security/jss/org/mozilla/jss/provider/java/security/KeyFactorySpi1_2.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
2252,
18,
7462,
18,
10824,
4073,
4625,
6014,
12,
653,
1990,
498,
1990,
13,
3639,
1216,
1962,
653,
1990,
503,
565,
288,
3639,
309,
12,
498,
1990,
1276,
13470,
6014,
39,
3797,
653,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2252,
18,
7462,
18,
10824,
4073,
4625,
6014,
12,
653,
1990,
498,
1990,
13,
3639,
1216,
1962,
653,
1990,
503,
565,
288,
3639,
309,
12,
498,
1990,
1276,
13470,
6014,
39,
3797,
653,
... | |
if (peer != null) | if (peer == null) | addNotify(){ if (peer != null) peer = getToolkit ().createPopupMenu (this); super.addNotify ();} | 27835 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/27835/14511e3ad21013e92c6399b2bd2ec09a8263e33a/PopupMenu.java/clean/libjava/java/awt/PopupMenu.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
527,
9168,
1435,
95,
225,
309,
261,
12210,
422,
446,
13,
565,
4261,
273,
336,
6364,
8691,
1832,
18,
2640,
13770,
4599,
261,
2211,
1769,
225,
2240,
18,
1289,
9168,
261,
1769,
97,
2,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
527,
9168,
1435,
95,
225,
309,
261,
12210,
422,
446,
13,
565,
4261,
273,
336,
6364,
8691,
1832,
18,
2640,
13770,
4599,
261,
2211,
1769,
225,
2240,
18,
1289,
9168,
261,
1769,
97,
2,
-100,
-10... |
Driver.debug("supportsTableCorrelationNames " + true); | if (Driver.logDebug) Driver.debug("supportsTableCorrelationNames " + true); | public boolean supportsTableCorrelationNames() throws SQLException { Driver.debug("supportsTableCorrelationNames " + true); return true; } | 46312 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46312/b465f5307f9f5506beb1edbcc0fb56eed7c29c12/DatabaseMetaData.java/clean/src/interfaces/jdbc/org/postgresql/jdbc2/DatabaseMetaData.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
6146,
1388,
31685,
1557,
1435,
1216,
6483,
202,
95,
202,
202,
4668,
18,
4148,
2932,
28064,
1388,
31685,
1557,
315,
397,
638,
1769,
202,
202,
2463,
638,
31,
202,
97,
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,
225,
202,
482,
1250,
6146,
1388,
31685,
1557,
1435,
1216,
6483,
202,
95,
202,
202,
4668,
18,
4148,
2932,
28064,
1388,
31685,
1557,
315,
397,
638,
1769,
202,
202,
2463,
638,
31,
202,
97,
2,
-... |
date[CY]=parseInt(start,i); | date[CY]= parseIntYear(i); if (fBuffer.charAt(i)!='-') { throw new RuntimeException("CCYY must be followed by '-' sign."); } | protected void getYearMonth (int start, int end, int[] date) throws RuntimeException{ if ( fBuffer.charAt(0)=='-' ) { // REVISIT: date starts with preceding '-' sign // do we have to do anything with it? // start++; } int i = indexOf(start, end, '-'); if ( i==-1 ) throw new RuntimeException("Year separator is missing or misplaced."); fStart=i; //position after the Year int length = i-start; if (length<4) { throw new RuntimeException("Year must have 'CCYY' format."); } else if (length > 4 && fBuffer.charAt(start)=='0'){ throw new RuntimeException("Leading zeros are required if the year value would otherwise have fewer than four digits; otherwise they are forbidden"); } date[CY]=parseInt(start,i); start = ++i; date[M]=parseInt(start, start+2); } | 46079 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46079/06d4f5296aaec58f8711338d163ecb3457110c29/DateTimeValidator.java/buggy/src/org/apache/xerces/validators/datatype/DateTimeValidator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
30071,
5445,
261,
474,
787,
16,
509,
679,
16,
509,
8526,
1509,
13,
1216,
3235,
95,
3639,
309,
261,
284,
1892,
18,
3001,
861,
12,
20,
13,
18920,
6627,
262,
288,
5411,
368,
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,
918,
30071,
5445,
261,
474,
787,
16,
509,
679,
16,
509,
8526,
1509,
13,
1216,
3235,
95,
3639,
309,
261,
284,
1892,
18,
3001,
861,
12,
20,
13,
18920,
6627,
262,
288,
5411,
368,
2... |
private final int addString(String str, int iCodeTop) | private int addString(String str, int iCodeTop) | private final int addString(String str, int iCodeTop) { int index = itsData.itsStringTableIndex; if (itsData.itsStringTable.length == index) { String[] sa = new String[index * 2]; System.arraycopy(itsData.itsStringTable, 0, sa, 0, index); itsData.itsStringTable = sa; } itsData.itsStringTable[index] = str; itsData.itsStringTableIndex = index + 1; iCodeTop = addByte((byte)(index >> 8), iCodeTop); iCodeTop = addByte((byte)(index & 0xFF), iCodeTop); return iCodeTop; } | 19000 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/19000/7f850f6162d49fce5f2a418eb4b32ba1cf9d58bf/Interpreter.java/clean/src/org/mozilla/javascript/Interpreter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
509,
527,
780,
12,
780,
609,
16,
509,
277,
1085,
3401,
13,
565,
288,
3639,
509,
770,
273,
2097,
751,
18,
1282,
780,
1388,
1016,
31,
3639,
309,
261,
1282,
751,
18,
1282,
780,
138... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
509,
527,
780,
12,
780,
609,
16,
509,
277,
1085,
3401,
13,
565,
288,
3639,
509,
770,
273,
2097,
751,
18,
1282,
780,
1388,
1016,
31,
3639,
309,
261,
1282,
751,
18,
1282,
780,
138... |
" 0 getstatic java.lang.System.out : java.io.PrintStream [27]\n" + " 3 new X [2]\n" + | " 0 getstatic java.lang.System.out : java.io.PrintStream [22]\n" + " 3 new X [1]\n" + | public void test504() { this.runConformTest( new String[] { "X.java", "class XA {}\n" + "interface XB {\n" + " XB CONST = new XB(){ public String toString() { return \"SUCCESS\"; }};\n" + "}\n" + "class XAB extends XA implements XB {}\n" + "\n" + "public class X <E extends XA&XB> {\n" + " E e() { return null; }\n" + " public static void main(String[] args) {\n" + " System.out.print(new X<XAB>().e().CONST);\n" + " new X<XAB>().foo();\n" + " }\n" + " public void foo() {\n" + " System.out.print(this.e().CONST);\n" + " }\n" + "}\n", }, "SUCCESSSUCCESS"); String expectedOutput = "// Compiled from X.java (version 1.5 : 49.0, super bit)\n" + "// Signature: <E:LXA;:LXB;>Ljava/lang/Object;\n" + "public class X extends java.lang.Object {\n" + " \n" + " // Method descriptor #6 ()V\n" + " // Stack: 1, Locals: 1\n" + " public X();\n" + " 0 aload_0 [this]\n" + " 1 invokespecial java.lang.Object() [9]\n" + " 4 return\n" + " Line numbers:\n" + " [pc: 0, line: 7]\n" + " Local variable table:\n" + " [pc: 0, pc: 5] local: this index: 0 type: X\n" + " Local variable type table:\n" + " [pc: 0, pc: 5] local: this index: 0 type: X<E>\n" + " \n" + " // Method descriptor #17 ()LXA;\n" + " // Signature: ()TE;\n" + " // Stack: 1, Locals: 1\n" + " XA e();\n" + " 0 aconst_null\n" + " 1 areturn\n" + " Line numbers:\n" + " [pc: 0, line: 8]\n" + " Local variable table:\n" + " [pc: 0, pc: 2] local: this index: 0 type: X\n" + " Local variable type table:\n" + " [pc: 0, pc: 2] local: this index: 0 type: X<E>\n" + " \n" + " // Method descriptor #21 ([Ljava/lang/String;)V\n" + " // Stack: 3, Locals: 1\n" + " public static void main(String[] args);\n" + " 0 getstatic java.lang.System.out : java.io.PrintStream [27]\n" + " 3 new X [2]\n" + " 6 dup\n" + " 7 invokespecial X() [28]\n" + " 10 invokevirtual X.e() : XA [30]\n" + " 13 pop\n" + " 14 getstatic XAB.CONST : XB [36]\n" + " 17 invokevirtual java.io.PrintStream.print(java.lang.Object) : void [42]\n" + " 20 new X [2]\n" + " 23 dup\n" + " 24 invokespecial X() [28]\n" + " 27 invokevirtual X.foo() : void [45]\n" + " 30 return\n" + " Line numbers:\n" + " [pc: 0, line: 10]\n" + " [pc: 20, line: 11]\n" + " [pc: 30, line: 12]\n" + " Local variable table:\n" + " [pc: 0, pc: 31] local: args index: 0 type: java.lang.String[]\n" + " \n" + " // Method descriptor #6 ()V\n" + " // Stack: 2, Locals: 1\n" + " public void foo();\n" + " 0 getstatic java.lang.System.out : java.io.PrintStream [27]\n" + " 3 aload_0 [this]\n" + " 4 invokevirtual X.e() : XA [30]\n" + " 7 pop\n" + " 8 getstatic XB.CONST : XB [50]\n" + " 11 invokevirtual java.io.PrintStream.print(java.lang.Object) : void [42]\n" + " 14 return\n" + " Line numbers:\n" + " [pc: 0, line: 14]\n" + " [pc: 14, line: 15]\n" + " Local variable table:\n" + " [pc: 0, pc: 15] local: this index: 0 type: X\n" + " Local variable type table:\n" + " [pc: 0, pc: 15] local: this index: 0 type: X<E>\n" + "}"; try { File f = new File(OUTPUT_DIR + File.separator + "X.class"); byte[] classFileBytes = org.eclipse.jdt.internal.compiler.util.Util.getFileByteContent(f); ClassFileBytesDisassembler disassembler = ToolFactory.createDefaultClassFileBytesDisassembler(); String result = disassembler.disassemble(classFileBytes, "\n", ClassFileBytesDisassembler.DETAILED); int index = result.indexOf(expectedOutput); if (index == -1 || expectedOutput.length() == 0) { System.out.println(Util.displayString(result, 3)); } if (index == -1) { assertEquals("Wrong contents", expectedOutput, result); } } catch (org.eclipse.jdt.core.util.ClassFormatException e) { assertTrue(false); } catch (IOException e) { assertTrue(false); } } | 10698 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10698/c17970bb54810597f5d28802d36bfac65d844634/GenericTypeTest.java/clean/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
25,
3028,
1435,
288,
202,
202,
2211,
18,
2681,
442,
687,
4709,
12,
1082,
202,
2704,
514,
8526,
288,
9506,
202,
6,
60,
18,
6290,
3113,
9506,
202,
6,
1106,
12410,
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,
25,
3028,
1435,
288,
202,
202,
2211,
18,
2681,
442,
687,
4709,
12,
1082,
202,
2704,
514,
8526,
288,
9506,
202,
6,
60,
18,
6290,
3113,
9506,
202,
6,
1106,
12410,
2... |
strings[stringsIndex] = "Rubble"; | strings[stringsIndex] = Messages.getString("BoardView1.Rubble"); | private String[] getTipText(Point point) { int stringsSize = 0; Hex mhex = null; // first, we have to determine how much text we are going to have // are we on a hex? final Coords mcoords = getCoordsAt(point); if (Settings.showMapHexPopup && game.board.contains(mcoords)) { mhex = game.board.getHex(mcoords); stringsSize += 1; } // check if it's on any entities for (Iterator i = entitySprites.iterator(); i.hasNext();) { final EntitySprite eSprite = (EntitySprite)i.next(); if (eSprite.isInside(point)) { stringsSize += 3; } } // check if it's on any attacks for (Iterator i = attackSprites.iterator(); i.hasNext();) { final AttackSprite aSprite = (AttackSprite)i.next(); if (aSprite.isInside(point)) { stringsSize += 1 + aSprite.weaponDescs.size(); } } // If the hex contains a building or rubble, make more space. if ( mhex != null && (mhex.contains(Terrain.RUBBLE) || mhex.contains(Terrain.BUILDING)) ) { stringsSize += 1; } stringsSize += game.getNbrMinefields(mcoords); // if the size is zip, you must a'quit if (stringsSize == 0) { return null; } // now we can allocate an array of strings String[] strings = new String[stringsSize]; int stringsIndex = 0; // are we on a hex? if (mhex != null) { strings[stringsIndex] = "Hex " + mcoords.getBoardNum() + "; level " + mhex.getElevation(); stringsIndex += 1; // Do we have rubble? if ( mhex.contains(Terrain.RUBBLE) ) { strings[stringsIndex] = "Rubble"; stringsIndex += 1; } // Do we have a building? else if ( mhex.contains(Terrain.BUILDING) ) { // Get the building. Building bldg = game.board.getBuildingAt( mcoords ); StringBuffer buf = new StringBuffer( "Height " ); // Each hex of a building has its own elevation. buf.append( mhex.levelOf(Terrain.BLDG_ELEV) ); buf.append( " " ); buf.append( bldg.toString() ); buf.append( ", CF: " ); buf.append( bldg.getCurrentCF() ); strings[stringsIndex] = buf.toString(); stringsIndex += 1; } if (game.containsMinefield(mcoords)) { java.util.Vector minefields = game.getMinefields(mcoords); for (int i = 0; i < minefields.size(); i++){ Minefield mf = (Minefield) minefields.elementAt(i); String owner = " (" + game.getPlayer(mf.getPlayerId()).getName() + ")"; switch (mf.getType()) { case (Minefield.TYPE_CONVENTIONAL) : strings[stringsIndex] = "Conventional minefield " + owner; break; case (Minefield.TYPE_THUNDER) : strings[stringsIndex] = "Thunder minefield(" + mf.getDamage() + ")" + owner; break; case (Minefield.TYPE_COMMAND_DETONATED) : strings[stringsIndex] = "Command-detonated minefield " + owner; break; case (Minefield.TYPE_VIBRABOMB) : if (mf.getPlayerId() == localPlayer.getId()) { strings[stringsIndex] = "Vibrabomb minefield(" + mf.getSetting() + ") " + owner; } else { strings[stringsIndex] = "Vibrabomb minefield" + owner; } break; case (Minefield.TYPE_THUNDER_ACTIVE) : strings[stringsIndex] = "Thunder-Active minefield(" + mf.getDamage() + ")" + owner; break; case (Minefield.TYPE_THUNDER_INFERNO) : strings[stringsIndex] = "Thunder-Inferno minefield(" + mf.getDamage() + ")" + owner; break; } stringsIndex++; } } } // check if it's on any entities for (Iterator i = entitySprites.iterator(); i.hasNext();) { final EntitySprite eSprite = (EntitySprite)i.next(); if (eSprite.isInside(point)) { final String[] entityStrings = eSprite.getTooltip(); java.lang.System.arraycopy(entityStrings, 0, strings, stringsIndex, entityStrings.length); stringsIndex += entityStrings.length; } } // check if it's on any attacks for (Iterator i = attackSprites.iterator(); i.hasNext();) { final AttackSprite aSprite = (AttackSprite)i.next(); if (aSprite.isInside(point)) { final String[] attackStrings = aSprite.getTooltip(); java.lang.System.arraycopy(attackStrings, 0, strings, stringsIndex, attackStrings.length); stringsIndex += 1 + aSprite.weaponDescs.size(); } } return strings; } | 3464 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3464/18ec0036f3c5df3d8fbef60e9dd53cc153fc889e/BoardView1.java/buggy/megamek/src/megamek/client/ui/AWT/BoardView1.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
514,
8526,
3181,
625,
1528,
12,
2148,
1634,
13,
288,
3639,
509,
2064,
1225,
273,
374,
31,
3639,
15734,
312,
7118,
273,
446,
31,
3639,
368,
1122,
16,
732,
1240,
358,
4199,
3661,
98... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
514,
8526,
3181,
625,
1528,
12,
2148,
1634,
13,
288,
3639,
509,
2064,
1225,
273,
374,
31,
3639,
15734,
312,
7118,
273,
446,
31,
3639,
368,
1122,
16,
732,
1240,
358,
4199,
3661,
98... |
if (builderWrappersRequestingFullBuild.size() > 0) { BuilderWrapper[] builderWrappersRequestingFullBuildList = (BuilderWrapper[]) builderWrappersRequestingFullBuild .toArray(new BuilderWrapper[builderWrappersRequestingFullBuild .size()]); build(IncrementalProjectBuilder.FULL_BUILD, args, monitor, builderWrappersRequestingFullBuildList); | if (fullBuildDeltaVisitor != null) { fullBuildDeltaVisitor.visitingDone(); } if (deltaVisitor != null) { deltaVisitor.visitingDone(); } | protected IProject[] build(int kind, Map args, IProgressMonitor monitor) throws CoreException { IProject project = this.getProject(); IProjectAdapter projectAdapter = (IProjectAdapter) project .getAdapter(IProjectAdapter.class); IBuildAdapter buildAdapter = projectAdapter.getBuildAdapter(); if (kind == IncrementalProjectBuilder.FULL_BUILD) { this.clean(monitor); } BuilderWrapper[] deltaBuilderWrappersRequestingFullBuild = build(kind, args, monitor, this.builderWrappers); Set builderWrappersRequestingFullBuild = new HashSet(); for (int i = 0; i < deltaBuilderWrappersRequestingFullBuild.length; i++) { builderWrappersRequestingFullBuild .add(deltaBuilderWrappersRequestingFullBuild[i]); } if (builderWrappersRequestingFullBuild.size() > 0) { BuilderWrapper[] builderWrappersRequestingFullBuildList = (BuilderWrapper[]) builderWrappersRequestingFullBuild .toArray(new BuilderWrapper[builderWrappersRequestingFullBuild .size()]); build(IncrementalProjectBuilder.FULL_BUILD, args, monitor, builderWrappersRequestingFullBuildList); } if (kind != IncrementalProjectBuilder.CLEAN_BUILD) { if (buildAdapter != null) { buildAdapter.markAsDerivated(monitor); } IWoprojectAdapter woprojectAdapter = projectAdapter .getWoprojectAdapter(); if (woprojectAdapter != null) { woprojectAdapter.markAsDerivated(monitor); } } final IProject workspaceRunnableProject = project; IWorkspaceRunnable workspaceRunnable = new IWorkspaceRunnable() { public void run(IProgressMonitor runInWorkspaceMonitor) throws CoreException { workspaceRunnableProject.refreshLocal(IResource.DEPTH_INFINITE, runInWorkspaceMonitor); } }; ResourcesPlugin.getWorkspace().run(workspaceRunnable, workspaceRunnableProject, 0, (IProgressMonitor) null); return null; } | 50596 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50596/5644f6506a8f17f2b8311774090206457f13a78d/Builder.java/clean/wolips/plugins/org.objectstyle.wolips/java/org/objectstyle/wolips/core/resources/internal/build/Builder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
467,
4109,
8526,
1361,
12,
474,
3846,
16,
1635,
833,
16,
467,
5491,
7187,
6438,
13,
1082,
202,
15069,
30015,
288,
202,
202,
45,
4109,
1984,
273,
333,
18,
588,
4109,
5621,
202... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
467,
4109,
8526,
1361,
12,
474,
3846,
16,
1635,
833,
16,
467,
5491,
7187,
6438,
13,
1082,
202,
15069,
30015,
288,
202,
202,
45,
4109,
1984,
273,
333,
18,
588,
4109,
5621,
202... |
protected void startTransportConnector(TransportConnector connector) throws Exception { | protected TransportConnector startTransportConnector(TransportConnector connector) throws Exception { | protected void startTransportConnector(TransportConnector connector) throws Exception { connector.setBroker(getBroker()); connector.setBrokerName(getBrokerName()); connector.setTaskRunnerFactory(getTaskRunnerFactory()); MessageAuthorizationPolicy policy = getMessageAuthorizationPolicy(); if (policy != null) { connector.setMessageAuthorizationPolicy(policy); } if (isUseJmx()) { connector = registerConnectorMBean(connector); } connector.start(); } | 11783 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11783/e34cbc1b075ce78879abfdcb3a023df005686f7e/BrokerService.java/buggy/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
9514,
7487,
787,
6568,
7487,
12,
6568,
7487,
8703,
13,
1216,
1185,
288,
3639,
8703,
18,
542,
11194,
12,
588,
11194,
10663,
3639,
8703,
18,
542,
11194,
461,
12,
588,
11194,
461,
1066... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
9514,
7487,
787,
6568,
7487,
12,
6568,
7487,
8703,
13,
1216,
1185,
288,
3639,
8703,
18,
542,
11194,
12,
588,
11194,
10663,
3639,
8703,
18,
542,
11194,
461,
12,
588,
11194,
461,
1066... |
{ int cat = getType(); return cat == Category.Set || cat == Category.Tuple; } | { int cat = getType(); return cat == Category.Set || cat == Category.Tuple; } | public final boolean isSet() { int cat = getType(); return cat == Category.Set || cat == Category.Tuple; } | 37907 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/37907/b5b5168edc3af09cb74945a80b0c36e6630ed502/ExpBase.java/buggy/src/main/mondrian/olap/ExpBase.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
1250,
13532,
1435,
202,
95,
202,
202,
474,
6573,
273,
3130,
5621,
202,
202,
2463,
6573,
422,
9856,
18,
694,
747,
6573,
422,
9856,
18,
9038,
31,
202,
97,
2,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
1250,
13532,
1435,
202,
95,
202,
202,
474,
6573,
273,
3130,
5621,
202,
202,
2463,
6573,
422,
9856,
18,
694,
747,
6573,
422,
9856,
18,
9038,
31,
202,
97,
2,
-100,
-100,
... |
System.out.println("Total R size: "+totalRSize+" (max "+maxRSize+")"); System.out.println("Total S size: "+totalSSize+" (max "+maxSSize+")"); | System.out.println("Total R size: "+totalRSize+" (max "+maxRSize+ ')'); System.out.println("Total S size: "+totalSSize+" (max "+maxSSize+ ')'); | public static void main(String[] args) throws Exception { //DSAGroup g=DSAGroup.readFromField(args[0]); DSAGroup g = Global.DSAgroupBigA; //Yarrow y=new Yarrow(); DummyRandomSource y = new DummyRandomSource(); DSAPrivateKey pk=new DSAPrivateKey(g, y); DSAPublicKey pub=new DSAPublicKey(g, pk); DSASignature sig=sign(g, pk, BigInteger.ZERO, y); System.err.println(verify(pub, sig, BigInteger.ZERO)); while(true) { long totalTimeSigning = 0; long totalTimeVerifying = 0; long totalRSize = 0; long totalSSize = 0; long totalPubKeySize = 0; long totalPrivKeySize = 0; int maxPrivKeySize = 0; int maxPubKeySize = 0; int maxRSize = 0; int maxSSize = 0; int totalRUnsignedBitSize = 0; int maxRUnsignedBitSize = 0; Random r = new Random(y.nextLong()); byte[] msg = new byte[32]; for(int i=0;i<1000;i++) { r.nextBytes(msg); BigInteger m = new BigInteger(1, msg); pk = new DSAPrivateKey(g, r); int privKeySize = pk.asBytes().length; totalPrivKeySize += privKeySize; if(privKeySize > maxPrivKeySize) maxPrivKeySize = privKeySize; pub = new DSAPublicKey(g, pk); int pubKeySize = pub.asBytes().length; totalPubKeySize += pubKeySize; if(pubKeySize > maxPubKeySize) maxPubKeySize = pubKeySize; long t1 = System.currentTimeMillis(); sig = sign(g, pk, m, y); long t2 = System.currentTimeMillis(); if(!verify(pub, sig, m)) { System.err.println("Failed to verify!"); } long t3 = System.currentTimeMillis(); totalTimeSigning += (t2 - t1); totalTimeVerifying += (t3 - t2); int rSize = sig.getR().bitLength(); rSize = (rSize / 8) + (rSize % 8 == 0 ? 0 : 1); totalRSize += rSize; if(rSize > maxRSize) maxRSize = rSize; int rUnsignedBitSize = sig.getR().bitLength(); totalRUnsignedBitSize += rUnsignedBitSize; maxRUnsignedBitSize = Math.max(maxRUnsignedBitSize, rUnsignedBitSize); int sSize = sig.getS().bitLength(); sSize = sSize / 8 + (sSize % 8 == 0 ? 0 : 1); totalSSize += sSize; if(sSize > maxSSize) maxSSize = sSize; } System.out.println("Total time signing: "+totalTimeSigning); System.out.println("Total time verifying: "+totalTimeVerifying); System.out.println("Total R size: "+totalRSize+" (max "+maxRSize+")"); System.out.println("Total S size: "+totalSSize+" (max "+maxSSize+")"); System.out.println("Total R unsigned bitsize: "+totalRUnsignedBitSize); System.out.println("Total pub key size: "+totalPubKeySize+" (max "+maxPubKeySize+")"); System.out.println("Total priv key size: "+totalPrivKeySize+" (max "+maxPrivKeySize+")"); } } | 46731 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46731/62fd59041864b4ed1f43adc676de6bfb5ea977f3/DSA.java/clean/src/freenet/crypt/DSA.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
918,
2774,
12,
780,
8526,
833,
13,
1216,
1185,
288,
202,
202,
759,
19748,
1114,
314,
33,
19748,
1114,
18,
896,
1265,
974,
12,
1968,
63,
20,
19226,
202,
202,
19748,
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,
225,
202,
482,
760,
918,
2774,
12,
780,
8526,
833,
13,
1216,
1185,
288,
202,
202,
759,
19748,
1114,
314,
33,
19748,
1114,
18,
896,
1265,
974,
12,
1968,
63,
20,
19226,
202,
202,
19748,
1114,
... |
num = DataTools.read4SignedBytes(in, little); | num = in.readInt(); | protected void initStandardMetadata() { try { Hashtable ifd = ifds[0]; super.initStandardMetadata(); Integer obj = new Integer(0); int offset; Integer k = new Integer(UIC4TAG); long[] temp = (long[]) ifd.get(k); Long[] q = new Long[temp.length]; for (int i=0; i<q.length; i++) q[i] = new Long(temp[i]); if (q == null) offset = -1; Integer w = new Integer(q[1].intValue()); if (w == null) offset = -1; else offset = w.intValue(); if (offset < 0) throw new FormatException("UIC4TAG not found"); in.seek(offset); int currentcode = -1; byte[] toread; TiffRational[] temp2 = (TiffRational[]) ifd.get(new Integer(METAMORPH_ID)); Long[] v = new Long[temp2.length]; for (int i=0; i<v.length; i++) v[i] = new Long(temp2[i].longValue()); if (v == null) throw new FormatException("Metamorph ID not found"); int planes = v[1].intValue(); boolean little = TiffTools.isLittleEndian(ifd); while ((currentcode < 66) && ((in.length() - in.getFilePointer()) > 2)) { currentcode = DataTools.read2SignedBytes(in, little); // variable declarations, because switch is dumb int num, denom; int xnum, xdenom, ynum, ydenom; double xpos, ypos; String thedate, thetime; switch (currentcode) { case 0: String autoscale = DataTools.read4SignedBytes(in, little) == 0 ? "no auto-scaling" : "16-bit to 8-bit scaling"; put("AutoScale", autoscale); break; case 1: put("MinScale", DataTools.read4SignedBytes(in, little)); break; case 2: put("MaxScale", DataTools.read4SignedBytes(in, little)); break; case 3: int calib = DataTools.read4SignedBytes(in, little); String calibration = calib == 0 ? "on" : "off"; put("Spatial Calibration", calibration); break; case 4: num = DataTools.read4SignedBytes(in, little); denom = DataTools.read4SignedBytes(in, little); put("XCalibration", new TiffRational(num, denom)); break; case 5: num = DataTools.read4SignedBytes(in, little); denom = DataTools.read4SignedBytes(in, little); put("YCalibration", new TiffRational(num, denom)); break; case 6: num = DataTools.read4SignedBytes(in, little); toread = new byte[num]; in.read(toread); put("CalibrationUnits", new String(toread)); break; case 7: num = DataTools.read4SignedBytes(in, little); toread = new byte[num]; in.read(toread); String name = new String(toread); put("Name", name); imageName = name; break; case 8: int thresh = DataTools.read4SignedBytes(in, little); String threshState = "off"; if (thresh == 1) threshState = "inside"; else if (thresh == 2) threshState = "outside"; put("ThreshState", threshState); break; case 9: put("ThreshStateRed", DataTools.read4SignedBytes(in, little)); break; // there is no 10 case 11: put("ThreshStateGreen", DataTools.read4SignedBytes(in, little)); break; case 12: put("ThreshStateBlue", DataTools.read4SignedBytes(in, little)); break; case 13: put("ThreshStateLo", DataTools.read4SignedBytes(in, little)); break; case 14: put("ThreshStateHi", DataTools.read4SignedBytes(in, little)); break; case 15: int zoom = DataTools.read4SignedBytes(in, little); put("Zoom", zoom);// OMETools.setAttribute(ome, "DisplayOptions", "Zoom", "" + zoom); break; case 16: // oh how we hate you Julian format... thedate = decodeDate(DataTools.read4SignedBytes(in, little)); thetime = decodeTime(DataTools.read4SignedBytes(in, little)); put("DateTime", thedate + " " + thetime); imageCreationDate = thedate + " " + thetime; break; case 17: thedate = decodeDate(DataTools.read4SignedBytes(in, little)); thetime = decodeTime(DataTools.read4SignedBytes(in, little)); put("LastSavedTime", thedate + " " + thetime); break; case 18: put("currentBuffer", DataTools.read4SignedBytes(in, little)); break; case 19: put("grayFit", DataTools.read4SignedBytes(in, little)); break; case 20: put("grayPointCount", DataTools.read4SignedBytes(in, little)); break; case 21: num = DataTools.read4SignedBytes(in, little); denom = DataTools.read4SignedBytes(in, little); put("grayX", new TiffRational(num, denom)); break; case 22: num = DataTools.read4SignedBytes(in, little); denom = DataTools.read4SignedBytes(in, little); put("gray", new TiffRational(num, denom)); break; case 23: num = DataTools.read4SignedBytes(in, little); denom = DataTools.read4SignedBytes(in, little); put("grayMin", new TiffRational(num, denom)); break; case 24: num = DataTools.read4SignedBytes(in, little); denom = DataTools.read4SignedBytes(in, little); put("grayMax", new TiffRational(num, denom)); break; case 25: num = DataTools.read4SignedBytes(in, little); toread = new byte[num]; in.read(toread); put("grayUnitName", new String(toread)); break; case 26: int standardLUT = DataTools.read4SignedBytes(in, little); String standLUT; switch (standardLUT) { case 0: standLUT = "monochrome"; break; case 1: standLUT = "pseudocolor"; break; case 2: standLUT = "Red"; break; case 3: standLUT = "Green"; break; case 4: standLUT = "Blue"; break; case 5: standLUT = "user-defined"; break; default: standLUT = "monochrome"; break; } put("StandardLUT", standLUT); break; case 27: put("Wavelength", DataTools.read4SignedBytes(in, little)); break; case 28: for (int i = 0; i < planes; i++) { xnum = DataTools.read4SignedBytes(in, little); xdenom = DataTools.read4SignedBytes(in, little); ynum = DataTools.read4SignedBytes(in, little); ydenom = DataTools.read4SignedBytes(in, little); xpos = xnum / xdenom; ypos = ynum / ydenom; put("Stage Position Plane " + i, "(" + xpos + ", " + ypos + ")"); } break; case 29: for (int i = 0; i < planes; i++) { xnum = DataTools.read4SignedBytes(in, little); xdenom = DataTools.read4SignedBytes(in, little); ynum = DataTools.read4SignedBytes(in, little); ydenom = DataTools.read4SignedBytes(in, little); xpos = xnum / xdenom; ypos = ynum / ydenom; put("Camera Offset Plane " + i, "(" + xpos + ", " + ypos + ")"); } break; case 30: put("OverlayMask", DataTools.read4SignedBytes(in, little)); break; case 31: put("OverlayCompress", DataTools.read4SignedBytes(in, little)); break; case 32: put("Overlay", DataTools.read4SignedBytes(in, little)); break; case 33: put("SpecialOverlayMask", DataTools.read4SignedBytes(in, little)); break; case 34: put("SpecialOverlayCompress", DataTools.read4SignedBytes(in, little)); break; case 35: put("SpecialOverlay", DataTools.read4SignedBytes(in, little)); break; case 36: put("ImageProperty", DataTools.read4SignedBytes(in, little)); break; case 37: for (int i = 0; i<planes; i++) { num = DataTools.read4SignedBytes(in, little); toread = new byte[num]; in.read(toread); String s = new String(toread); put("StageLabel Plane " + i, s); } break; case 38: num = DataTools.read4SignedBytes(in, little); denom = DataTools.read4SignedBytes(in, little); put("AutoScaleLoInfo", new TiffRational(num, denom)); break; case 39: num = DataTools.read4SignedBytes(in, little); denom = DataTools.read4SignedBytes(in, little); put("AutoScaleHiInfo", new TiffRational(num, denom)); break; case 40: for (int i=0;i<planes;i++) { num = DataTools.read4SignedBytes(in, little); denom = DataTools.read4SignedBytes(in, little); put("AbsoluteZ Plane " + i, new TiffRational(num, denom)); } break; case 41: for (int i=0; i<planes; i++) { put("AbsoluteZValid Plane " + i, DataTools.read4SignedBytes(in, little)); } break; case 42: put("Gamma", DataTools.read4SignedBytes(in, little)); break; case 43: put("GammaRed", DataTools.read4SignedBytes(in, little)); break; case 44: put("GammaGreen", DataTools.read4SignedBytes(in, little)); break; case 45: put("GammaBlue", DataTools.read4SignedBytes(in, little)); break; } // end switch } } catch (NullPointerException n) { n.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } catch (FormatException e) { e.printStackTrace(); } try { super.initStandardMetadata(); } catch (Throwable t) { t.printStackTrace(); } // parse (mangle) TIFF comment String descr = (String) metadata.get("Comment"); if (descr != null) { StringTokenizer st = new StringTokenizer(descr, "\n"); StringBuffer sb = new StringBuffer(); boolean first = true; while (st.hasMoreTokens()) { String line = st.nextToken(); int colon = line.indexOf(": "); if (colon < 0) { // normal line (not a key/value pair) if (line.trim().length() > 0) { // not a blank line sb.append(line); if (!line.endsWith(".")) sb.append("."); sb.append(" "); } first = false; continue; } if (first) { // first line could be mangled; make a reasonable guess int dot = line.lastIndexOf(".", colon); if (dot >= 0) { String s = line.substring(0, dot + 1); sb.append(s); if (!s.endsWith(".")) sb.append("."); sb.append(" "); } line = line.substring(dot + 1); colon -= dot + 1; first = false; } // add key/value pair embedded in comment as separate metadata String key = line.substring(0, colon); String value = line.substring(colon + 2); put(key, value); } // replace comment with trimmed version descr = sb.toString().trim(); if (descr.equals("")) metadata.remove("Comment"); else put("Comment", descr); } } | 46826 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46826/2df09d33bfdc966378aae0cc09cb503afb983bc2/MetamorphReader.java/clean/loci/formats/in/MetamorphReader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
918,
1208,
8336,
2277,
1435,
288,
565,
775,
288,
1377,
18559,
309,
72,
273,
309,
2377,
63,
20,
15533,
1377,
2240,
18,
2738,
8336,
2277,
5621,
1377,
2144,
1081,
273,
394,
2144,
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,
282,
4750,
918,
1208,
8336,
2277,
1435,
288,
565,
775,
288,
1377,
18559,
309,
72,
273,
309,
2377,
63,
20,
15533,
1377,
2240,
18,
2738,
8336,
2277,
5621,
1377,
2144,
1081,
273,
394,
2144,
12,
... |
return collator.compare(str1, str2); | return getComparator().compare(str1, str2); | public int compare(Viewer viewer, Object e1, Object e2) { if (e1 instanceof IActionSetDescriptor) { String str1 = DialogUtil.removeAccel(((IActionSetDescriptor) e1) .getLabel()); String str2 = DialogUtil.removeAccel(((IActionSetDescriptor) e2) .getLabel()); return collator.compare(str1, str2); } return 0; } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/146f3001fe6ede719f238f001198f2fb91babf04/ActionSetSorter.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/ActionSetSorter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
3400,
12,
18415,
14157,
16,
1033,
425,
21,
16,
1033,
425,
22,
13,
288,
3639,
309,
261,
73,
21,
1276,
467,
1803,
694,
3187,
13,
288,
5411,
514,
609,
21,
273,
17242,
1304,
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,
509,
3400,
12,
18415,
14157,
16,
1033,
425,
21,
16,
1033,
425,
22,
13,
288,
3639,
309,
261,
73,
21,
1276,
467,
1803,
694,
3187,
13,
288,
5411,
514,
609,
21,
273,
17242,
1304,
18... |
addByteCode(ByteCode.ALOAD, 4); | cfw.add(ByteCode.ALOAD, 4); | private void generateCode(Context cx, ScriptOrFnNode scriptOrFn, ObjArray names, ObjArray classFiles) { String superClassName; this.scriptOrFn = scriptOrFn; if (scriptOrFn.getType() == Token.FUNCTION) { inFunction = true; fnCurrent = (OptFunctionNode)scriptOrFn; inDirectCallFunction = fnCurrent.isTargetOfDirectCall(); generatedClassName = fnCurrent.getClassName(); superClassName = FUNCTION_SUPER_CLASS_NAME; } else { // better be a script if (scriptOrFn.getType() != Token.SCRIPT) badTree(); inFunction = false; boolean isPrimary = (nameHelper.getTargetExtends() == null && nameHelper.getTargetImplements() == null); generatedClassName = getScriptClassName(null, isPrimary); superClassName = SCRIPT_SUPER_CLASS_NAME; } generatedClassSignature = classNameToSignature(generatedClassName); itsUseDynamicScope = cx.hasCompileFunctionsWithDynamicScope(); itsSourceFile = null; // default is to generate debug info if (!cx.isGeneratingDebugChanged() || cx.isGeneratingDebug()) { itsSourceFile = scriptOrFn.getSourceName(); } version = cx.getLanguageVersion(); optLevel = cx.getOptimizationLevel(); // Generate nested function code int functionCount = scriptOrFn.getFunctionCount(); for (int i = 0; i != functionCount; ++i) { OptFunctionNode fn = (OptFunctionNode)scriptOrFn.getFunctionNode(i); Codegen codegen = new Codegen(mainCodegen); codegen.generateCode(cx, fn, names, classFiles); } classFile = new ClassFileWriter(generatedClassName, superClassName, itsSourceFile); Node codegenBase; if (inFunction) { generateInit(cx, superClassName); if (inDirectCallFunction) { classFile.startMethod("call", "(Lorg/mozilla/javascript/Context;" + "Lorg/mozilla/javascript/Scriptable;" + "Lorg/mozilla/javascript/Scriptable;" + "[Ljava/lang/Object;)Ljava/lang/Object;", (short)(ClassFileWriter.ACC_PUBLIC | ClassFileWriter.ACC_FINAL)); addByteCode(ByteCode.ALOAD_0); addByteCode(ByteCode.ALOAD_1); addByteCode(ByteCode.ALOAD_2); addByteCode(ByteCode.ALOAD_3); for (int i = 0; i < scriptOrFn.getParamCount(); i++) { push(i); addByteCode(ByteCode.ALOAD, 4); addByteCode(ByteCode.ARRAYLENGTH); int undefArg = acquireLabel(); int beyond = acquireLabel(); addByteCode(ByteCode.IF_ICMPGE, undefArg); addByteCode(ByteCode.ALOAD, 4); push(i); addByteCode(ByteCode.AALOAD); push(0.0); addByteCode(ByteCode.GOTO, beyond); markLabel(undefArg); pushUndefined(); push(0.0); markLabel(beyond); } addByteCode(ByteCode.ALOAD, 4); addVirtualInvoke(generatedClassName, "callDirect", fnCurrent.getDirectCallMethodSignature()); addByteCode(ByteCode.ARETURN); classFile.stopMethod((short)5, null); // 1 for this, 1 for js this, 1 for args[] emitDirectConstructor(); startCodeBodyMethod("callDirect", fnCurrent.getDirectCallMethodSignature()); assignParameterJRegs(fnCurrent); if (!fnCurrent.getParameterNumberContext()) { // make sure that all parameters are objects itsForcedObjectParameters = true; for (int i = 0; i < fnCurrent.getParamCount(); i++) { OptLocalVariable lVar = fnCurrent.getVar(i); aload(lVar.getJRegister()); classFile.add(ByteCode.GETSTATIC, "java/lang/Void", "TYPE", "Ljava/lang/Class;"); int isObjectLabel = acquireLabel(); addByteCode(ByteCode.IF_ACMPNE, isObjectLabel); addByteCode(ByteCode.NEW,"java/lang/Double"); addByteCode(ByteCode.DUP); dload((short)(lVar.getJRegister() + 1)); addDoubleConstructor(); astore(lVar.getJRegister()); markLabel(isObjectLabel); } } generatePrologue(cx, scriptOrFn.getParamCount()); } else { startCodeBodyMethod("call", "(Lorg/mozilla/javascript/Context;" +"Lorg/mozilla/javascript/Scriptable;" +"Lorg/mozilla/javascript/Scriptable;" +"[Ljava/lang/Object;)Ljava/lang/Object;"); generatePrologue(cx, -1); } codegenBase = scriptOrFn.getLastChild(); } else { // script classFile.addInterface("org/mozilla/javascript/Script"); generateInit(cx, superClassName); generateScriptCtor(cx, superClassName); generateMain(cx); generateExecute(cx); startCodeBodyMethod("call", "(Lorg/mozilla/javascript/Context;" +"Lorg/mozilla/javascript/Scriptable;" +"Lorg/mozilla/javascript/Scriptable;" +"[Ljava/lang/Object;)Ljava/lang/Object;"); generatePrologue(cx, -1); int linenum = scriptOrFn.getEndLineno(); if (linenum != -1) classFile.addLineNumberEntry((short)linenum); scriptOrFn.addChildToBack(new Node(Token.RETURN)); codegenBase = scriptOrFn; } generateCodeFromNode(codegenBase, null); generateEpilogue(); finishMethod(cx, debugVars); emitConstantDudeInitializers(); if (isMainCodegen && mainCodegen.directCallTargets != null) { int N = mainCodegen.directCallTargets.size(); for (int i = 0; i != N; ++i) { OptFunctionNode fn = (OptFunctionNode)directCallTargets.get(i); classFile.addField(getDirectTargetFieldName(i), classNameToSignature(fn.getClassName()), (short)0); } } byte[] bytes = classFile.toByteArray(); names.add(generatedClassName); classFiles.add(bytes); classFile = null; } | 19000 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/19000/64dc04549cad044865eae2e65e775ddc0f292717/Codegen.java/clean/src/org/mozilla/javascript/optimizer/Codegen.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
2103,
1085,
12,
1042,
9494,
16,
7739,
1162,
5372,
907,
2728,
1162,
5372,
16,
17311,
18760,
1076,
1257,
16,
18760,
1076,
667,
2697,
13,
565,
288,
3639,
514,
2240,
3834,
31,
3639... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
2103,
1085,
12,
1042,
9494,
16,
7739,
1162,
5372,
907,
2728,
1162,
5372,
16,
17311,
18760,
1076,
1257,
16,
18760,
1076,
667,
2697,
13,
565,
288,
3639,
514,
2240,
3834,
31,
3639... |
public org.quickfix.field.RawDataLength getRawDataLength() throws FieldNotFound { org.quickfix.field.RawDataLength value = new org.quickfix.field.RawDataLength(); | public quickfix.field.RawDataLength getRawDataLength() throws FieldNotFound { quickfix.field.RawDataLength value = new quickfix.field.RawDataLength(); | public org.quickfix.field.RawDataLength getRawDataLength() throws FieldNotFound { org.quickfix.field.RawDataLength value = new org.quickfix.field.RawDataLength(); getField(value); return value; } | 8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/Email.java/clean/src/java/src/quickfix/fix41/Email.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
31733,
1782,
10547,
751,
1782,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
31733,
1782,
460,
273,
394,
2358,
18,
19525,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
31733,
1782,
10547,
751,
1782,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
31733,
1782,
460,
273,
394,
2358,
18,
19525,... |
assertTrue(ch1_repl.isOpen()); assertTrue(ch1_repl.isConnected()); | public void testStateTransferWithReconnect() throws Exception { ch1=factory.createMultiplexerChannel(STACK_NAME, "c1"); ch1.connect("bla"); c1=new Cache(ch1, "cache-1"); assertEquals("cache has to be empty initially", 0, c1.size()); ch1_repl=factory2.createMultiplexerChannel(STACK_NAME, "c1"); c1.put("name", "Bela"); c1.put("id", new Long(322649)); c1.put("hobbies", "biking"); c1.put("bike", "Centurion"); ch1_repl.connect("bla"); c1_repl=new Cache(ch1_repl, "cache-1-repl"); boolean rc=ch1_repl.getState(null, 5000); System.out.println("state transfer: " + rc); Util.sleep(500); System.out.println("c1_repl: " + c1_repl); assertEquals("initial state should have been transferred", 4, c1_repl.size()); assertEquals(new Long(322649), c1.get("id")); assertEquals(new Long(322649), c1_repl.get("id")); assertEquals("biking", c1.get("hobbies")); assertEquals("biking", c1_repl.get("hobbies")); assertEquals("Centurion", c1.get("bike")); assertEquals("Centurion", c1_repl.get("bike")); ch1_repl.disconnect(); c1_repl.clear(); ch1_repl.connect("bla");// c2_repl=new Cache(ch1_repl, "cache-2-repl"); assertEquals("cache has to be empty initially", 0, c1_repl.size()); rc=ch1_repl.getState(null, 5000); System.out.println("state transfer: " + rc); Util.sleep(500); System.out.println("c1_repl: " + c1_repl); assertEquals("initial state should have been transferred", 4, c1_repl.size()); assertEquals(new Long(322649), c1.get("id")); assertEquals(new Long(322649), c1_repl.get("id")); assertEquals("biking", c1.get("hobbies")); assertEquals("biking", c1_repl.get("hobbies")); assertEquals("Centurion", c1.get("bike")); assertEquals("Centurion", c1_repl.get("bike")); // Now see what happens if we reconnect the first channel // But first, add another MuxChannel on that JChannel // just so it remains coordinator (test that it doesn't // ask for state from itself) ch2 = factory.createMultiplexerChannel(STACK_NAME, "c2"); ch1.disconnect(); c1.clear(); ch1.connect("bla"); assertEquals("cache has to be empty initially", 0, c1.size()); rc=ch1.getState(null, 5000); System.out.println("state transfer: " + rc); Util.sleep(500); System.out.println("c1: " + c1); assertEquals("initial state should have been transferred", 4, c1.size()); assertEquals(new Long(322649), c1.get("id")); assertEquals(new Long(322649), c1_repl.get("id")); assertEquals("biking", c1.get("hobbies")); assertEquals("biking", c1_repl.get("hobbies")); assertEquals("Centurion", c1.get("bike")); assertEquals("Centurion", c1_repl.get("bike")); } | 49475 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49475/a03e9409d690180d27d527cde4b3cb2057c706ef/MultiplexerTest.java/buggy/tests/junit/org/jgroups/tests/MultiplexerTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1815,
5510,
12,
343,
21,
67,
26745,
18,
291,
3678,
10663,
1815,
5510,
12,
343,
21,
67,
26745,
18,
291,
8932,
10663,
225,
1815,
5510,
12,
343,
21,
67,
26745,
18,
291,
3678,
10663,
1815,
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,
1815,
5510,
12,
343,
21,
67,
26745,
18,
291,
3678,
10663,
1815,
5510,
12,
343,
21,
67,
26745,
18,
291,
8932,
10663,
225,
1815,
5510,
12,
343,
21,
67,
26745,
18,
291,
3678,
10663,
1815,
5510,... | |
final String cacheKey = generateCacheKey(sUrl); | final String cacheKey = generateCacheKey(sUrl, response.getNamespace()); | private void renderContent(final RenderRequest request, final RenderResponse response) throws PortletException, IOException { //Gets a reference to the ApplicationContext created by the //ContextLoaderListener which is configured in the web.xml for //this portlet final ApplicationContext context = PortletApplicationContextUtils.getWebApplicationContext(this.getPortletContext()); //retrieve portlet preferences from PortletPreferencesWrapper object // substitution final Map userInfo = (Map)request.getAttribute(RenderRequest.USER_INFO); PortletPreferences myPreferences = request.getPreferences(); myPreferences = new PortletPreferencesWrapper(myPreferences, userInfo); //Get users session PortletSession session = request.getPortletSession(); String sUrl = (String)session.getAttribute(GeneralConfigImpl.BASE_URL); if (sUrl == null) { sUrl = ConfigUtils.checkEmptyNullString(myPreferences.getValue(GeneralConfigImpl.BASE_URL, null), null); if (sUrl == null) { throw new PortletException("No Initial URL Configured"); } } //use Edit Url if in Edit mode final PortletMode mode = request.getPortletMode(); if (PortletMode.EDIT.equals(mode)) { String sTemp = myPreferences.getValue(GeneralConfigImpl.EDIT_URL, null); if (sTemp!=null){ sUrl = sTemp; } } String sRequestType; if (request.getParameter(WebproxyConstants.REQUEST_TYPE) != null) sRequestType = request.getParameter(WebproxyConstants.REQUEST_TYPE); else sRequestType = null; final HttpManager httpManager = (HttpManager)context.getBean("HttpManagerBean", HttpManager.class); httpManager.setRenderData(request, response); this.doFormAuth(httpManager, request); final boolean sUseCache = new Boolean(myPreferences.getValue(CacheConfigImpl.USE_CACHE, null)).booleanValue(); if (sUseCache) { final PageCache cache = (PageCache)context.getBean("PageCache", PageCache.class); final String cacheKey = generateCacheKey(sUrl); final CacheEntry cachedData = cache.getCachedPage(cacheKey); if (cachedData != null) { if (LOG.isTraceEnabled()) LOG.trace("Using cached content for key '" + cacheKey + "'"); response.setContentType(cachedData.getContentType()); response.getPortletOutputStream().write(cachedData.getContent()); return; } } //Get Persisted HTTP State State httpState = this.getState(request); Response httpResponse = null; try { boolean redirect = true; final int maxRedirects = ConfigUtils.parseInt(myPreferences.getValue(HttpClientConfigImpl.MAX_REDIRECTS, null), 5); for (int index = 0; index < maxRedirects && redirect; index++) { //create request object final Request httpRequest = httpManager.createRequest(); //set the state on the request object httpRequest.setState(httpState); this.doHttpAuth(request, httpRequest); //set URL in request httpRequest.setUrl(sUrl); //Set headers final String[] headerNames = myPreferences.getValues(HttpHeaderConfigImpl.HEADER_NAME, new String[0]); final String[] headerValues = myPreferences.getValues(HttpHeaderConfigImpl.HEADER_VALUE, new String[0]); if (headerNames.length == headerValues.length) { final List<Header> headerList = new ArrayList<Header>(headerNames.length); for (int headerIndex = 0; headerIndex < headerNames.length; headerIndex++) { final Header h = httpRequest.createHeader(); h.setName(headerNames[headerIndex]); h.setValue(headerValues[headerIndex]); headerList.add(h); } httpRequest.setHeaders(headerList.toArray(new Header[headerList.size()])); } else { LOG.error("Invalid data in preferences. Header name array length does not equal header value array length"); } //check to see if form was a GET form //set Type (e.g., GET, POST, HEAD) if (sRequestType == null) { httpRequest.setType(WebproxyConstants.GET_REQUEST); } else { httpRequest.setType(sRequestType); //If post add any parameters to the method if (sRequestType.equals(WebproxyConstants.POST_REQUEST)) { final List<ParameterPair> postParameters = new ArrayList<ParameterPair>(request.getParameterMap().size()); for (Enumeration e = request.getParameterNames(); e.hasMoreElements();) { final String paramName = (String)e.nextElement(); if (!paramName.startsWith(WebproxyConstants.UNIQUE_CONSTANT)) { final String[] values = request.getParameterValues(paramName); for (int valIndex = 0; valIndex < values.length; valIndex++) { final ParameterPair param = new ParameterPair(paramName, values[valIndex]); postParameters.add(param); } } } final ParameterPair[] params = postParameters.toArray(new ParameterPair[postParameters.size()]); httpRequest.setParameters(params); } } //Check to see if pre-interceptors are used. final String sPreInterceptor = ConfigUtils.checkEmptyNullString(myPreferences.getValue(GeneralConfigImpl.PRE_INTERCEPTOR_CLASS, null), null); if (sPreInterceptor != null) { try { final Class preInterceptorClass = Class.forName(sPreInterceptor); PreInterceptor myPreInterceptor = (PreInterceptor)preInterceptorClass.newInstance(); myPreInterceptor.intercept(request, response, httpRequest); } catch (ClassNotFoundException cnfe) { final String msg = "Could not find specified pre-interceptor class '" + sPreInterceptor + "'"; LOG.error(msg, cnfe); throw new PortletException(msg, cnfe); } catch (InstantiationException ie) { final String msg = "Could instatiate specified pre-interceptor class '" + sPreInterceptor + "'"; LOG.error(msg, ie); throw new PortletException(msg, ie); } catch (IllegalAccessException iae) { final String msg = "Could instatiate specified pre-interceptor class '" + sPreInterceptor + "'"; LOG.error(msg, iae); throw new PortletException(msg, iae); } catch (ClassCastException cce) { final String msg = "Could not cast '" + sPreInterceptor + "' to 'edu.wisc.my.webproxy.beans.interceptors.PreInterceptor'"; LOG.error(msg, cce); throw new PortletException(msg, cce); } } try { //send httpRequest httpResponse = httpManager.doRequest(httpRequest); } catch (HttpTimeoutException hte) { final boolean sUseExpired = new Boolean(myPreferences.getValue(CacheConfigImpl.USE_EXPIRED, null)).booleanValue(); if (sUseCache && sUseExpired) { LOG.info("Request '" + sUrl + "' timed out. Attempting to use expired cache data."); final PageCache cache = (PageCache)context.getBean("PageCache", PageCache.class); final String cacheKey = generateCacheKey(sUrl); final CacheEntry cachedData = cache.getCachedPage(cacheKey, true); if (cachedData != null) { final int retryDelay = ConfigUtils.parseInt(myPreferences.getValue(CacheConfigImpl.RETRY_DELAY, null), -1); if (retryDelay > 0) { final boolean persistData = new Boolean(myPreferences.getValue(CacheConfigImpl.PERSIST_CACHE, null)).booleanValue(); cachedData.setExpirationDate(new Date(System.currentTimeMillis() + (retryDelay * 1000))); cache.cachePage(cacheKey, cachedData, persistData); } if (LOG.isTraceEnabled()) LOG.trace("Using cached content for key '" + cacheKey + "'"); response.setContentType(cachedData.getContentType()); response.getPortletOutputStream().write(cachedData.getContent()); return; } } //If cached content was used this won't be reached, all other //cases an exception needs to be thrown. LOG.warn("Request '" + httpRequest + "' timed out", hte); throw hte; //TODO handle timeout cleanly } //Track last activity time in session session.setAttribute(HttpClientConfigImpl.SESSION_TIMEOUT, new Long(System.currentTimeMillis())); //Check to see if post-interceptors are used final String sPostInterceptor = ConfigUtils.checkEmptyNullString(myPreferences.getValue(GeneralConfigImpl.POST_INTERCEPTOR_CLASS, null), null); if (sPostInterceptor != null) { try { final Class postInterceptorClass = Class.forName(sPostInterceptor); PostInterceptor myPostInterceptor = (PostInterceptor)postInterceptorClass.newInstance(); myPostInterceptor.intercept(request, response, httpResponse); } catch (ClassNotFoundException cnfe) { final String msg = "Could not find specified post-interceptor class '" + sPostInterceptor + "'"; LOG.error(msg, cnfe); throw new PortletException(msg, cnfe); } catch (InstantiationException ie) { final String msg = "Could instatiate specified post-interceptor class '" + sPostInterceptor + "'"; LOG.error(msg, ie); throw new PortletException(msg, ie); } catch (IllegalAccessException iae) { final String msg = "Could instatiate specified post-interceptor class '" + sPostInterceptor + "'"; LOG.error(msg, iae); throw new PortletException(msg, iae); } catch (ClassCastException cce) { final String msg = "Could not cast '" + sPostInterceptor + "' to 'edu.wisc.my.webproxy.beans.interceptors.PostInterceptor'"; LOG.error(msg, cce); throw new PortletException(msg, cce); } } //store the state httpState = httpResponse.getState(); if (httpState != null) { this.storeState(request, httpState); } //Check to see if redirected final String tempUrl = checkRedirect(sUrl, httpResponse); //TODO make sure this works if (sUrl.equals(tempUrl)) redirect = false; else sUrl = tempUrl; } final String realUrl = httpResponse.getRequestUrl(); //check response object for binary content String sContentType = httpResponse.getContentType(); if (sContentType != null) { StringTokenizer st = new StringTokenizer(sContentType, ";"); sContentType = st.nextToken(); } else { sContentType = "text/html"; } //TODO how do we handle 'unknown'? if ("unknown".equals(sContentType)) sContentType = "text/html"; final List acceptedContent = (List)context.getBean("ContentTypeBean", List.class); boolean matches = false; for (Iterator iterateContent = acceptedContent.iterator(); iterateContent.hasNext() && !matches; ) { final String sAcceptedContent = (String)iterateContent.next(); final Pattern contentPattern = Pattern.compile(sAcceptedContent, Pattern.CASE_INSENSITIVE); final Matcher contentMatcher = contentPattern.matcher(sContentType); matches = contentMatcher.matches(); } response.setContentType(sContentType); //Get InputStream and OutputStream InputStream in = null; OutputStream out = null; try { in = httpResponse.getResponseBodyAsStream(); out = response.getPortletOutputStream(); if (!matches) { //TODO Display page with direct link to content and back link to previous URL } else { if (realUrl != null) sUrl = realUrl; session.setAttribute(GeneralConfigImpl.BASE_URL, sUrl); //prepend the back button to the outputstream if (PortletMode.EDIT.equals(mode)) { out.write(createBackButton(response).getBytes()); } //Matched a filterable content type, parse and filter stream. if (sUseCache) { final PageCache cache = (PageCache)context.getBean("PageCache", PageCache.class); final String cacheKey = generateCacheKey(sUrl); final int cacheExprTime = ConfigUtils.parseInt(myPreferences.getValue(CacheConfigImpl.CACHE_TIMEOUT, null), -1); final boolean persistData = new Boolean(myPreferences.getValue(CacheConfigImpl.PERSIST_CACHE, null)).booleanValue(); final CacheEntry entryBase = new CacheEntry(); entryBase.setContentType(sContentType); if (cacheExprTime >= 0) entryBase.setExpirationDate(new Date(System.currentTimeMillis() + cacheExprTime * 1000)); out = new CacheOutputStream(out, entryBase, cache, cacheKey, persistData); } //Write out static header data final String sHeader = ConfigUtils.checkEmptyNullString(myPreferences.getValue(StaticHtmlConfigImpl.STATIC_HEADER, null), null); if (sHeader != null) { out.write(sHeader.getBytes()); } final HtmlParser htmlParser = (HtmlParser)context.getBean("HtmlParserBean", HtmlParser.class); final HtmlOutputFilter outFilter = new HtmlOutputFilter(out); try { htmlParser.setRenderData(request, response); //Setup filter chain final List saxFilters = (List)context.getBean("SaxFilterBean", List.class); ChainingSaxFilter parent = null; final Iterator filterItr = saxFilters.iterator(); if (filterItr.hasNext()) { parent = (ChainingSaxFilter)filterItr.next(); outFilter.setParent(parent); while (filterItr.hasNext()) { final ChainingSaxFilter nextParent = (ChainingSaxFilter)filterItr.next(); parent.setParent(nextParent); parent = nextParent; } } //This call should be chained so it only needs to be done on the end filter outFilter.setRenderData(request, response); //Get the xmlReader and set a reference to the last filter for Lexical Handling final XMLReader xmlReader = htmlParser.getReader(parent); //Set the parent of the last filter so parsing will work parent.setParent(xmlReader); try { outFilter.parse(new InputSource(in)); } catch (SAXException se) { throw new PortletException("A error occured while parsing the content", se); } //Write out static footer data final String sFooter = ConfigUtils.checkEmptyNullString(myPreferences.getValue(StaticHtmlConfigImpl.STATIC_FOOTER, null), null); if (sFooter != null) { out.write(sFooter.getBytes()); } } finally { htmlParser.clearData(); outFilter.clearData(); } } } finally { if (in != null) in.close(); if (out != null) { out.flush(); out.close(); } } } finally { if (httpResponse != null) httpResponse.close(); } } | 52447 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52447/c1aa70dee0749ab0c07f3c463a37ab9d53c88cbd/WebProxyPortlet.java/buggy/src/main/java/edu/wisc/my/webproxy/portlet/WebProxyPortlet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1743,
1350,
12,
6385,
6987,
691,
590,
16,
727,
6987,
1064,
766,
13,
1216,
21305,
503,
16,
1860,
288,
3639,
368,
3002,
279,
2114,
358,
326,
4257,
1042,
2522,
635,
326,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1743,
1350,
12,
6385,
6987,
691,
590,
16,
727,
6987,
1064,
766,
13,
1216,
21305,
503,
16,
1860,
288,
3639,
368,
3002,
279,
2114,
358,
326,
4257,
1042,
2522,
635,
326,
3639,
3... |
public org.quickfix.field.LegFactor getLegFactor() throws FieldNotFound { org.quickfix.field.LegFactor value = new org.quickfix.field.LegFactor(); | public quickfix.field.LegFactor getLegFactor() throws FieldNotFound { quickfix.field.LegFactor value = new quickfix.field.LegFactor(); | public org.quickfix.field.LegFactor getLegFactor() throws FieldNotFound { org.quickfix.field.LegFactor value = new org.quickfix.field.LegFactor(); getField(value); return value; } | 5926 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5926/fecc27f98261270772ff182a1d4dfd94b5daa73d/AllocationReport.java/clean/src/java/src/quickfix/fix44/AllocationReport.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
8329,
6837,
336,
8329,
6837,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
8329,
6837,
460,
273,
394,
2358,
18,
19525,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8329,
6837,
336,
8329,
6837,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
8329,
6837,
460,
273,
394,
2358,
18,
19525,
... |
this.setAttribute (JOIN_FILES, "y"); | this.setAttribute (JOIN_FILES, this.JOIN_FILES_TRUE_STRING); | public void setJoinFiles (boolean join) throws DrmaaException { if (join) { this.setAttribute (JOIN_FILES, "y"); } else { this.setAttribute (JOIN_FILES, "n"); } } | 52706 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52706/58ceef2112b26ff88deb65c9adb2baa5f92f55f0/JobTemplateImpl.java/clean/source/classes/com/sun/grid/drmaa/JobTemplateImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
1071,
918,
444,
4572,
2697,
261,
6494,
1233,
13,
1216,
11473,
2540,
69,
503,
288,
1377,
309,
261,
5701,
13,
288,
540,
333,
18,
542,
1499,
261,
18800,
67,
12669,
16,
333,
18,
18800,
67,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
1071,
918,
444,
4572,
2697,
261,
6494,
1233,
13,
1216,
11473,
2540,
69,
503,
288,
1377,
309,
261,
5701,
13,
288,
540,
333,
18,
542,
1499,
261,
18800,
67,
12669,
16,
333,
18,
18800,
67,
... |
Properties p = new Properties(); | private void loadFile(Map langs, InputStream in, Set advanced, String filename) { Properties p = new Properties(); try { in = new BufferedInputStream(in); p.load(in); removeAdvanced(advanced, p); String lc = p.getProperty("LOCALE_LANGUAGE_CODE"); String cc = p.getProperty("LOCALE_COUNTRY_CODE"); String vc = p.getProperty("LOCALE_VARIANT_CODE"); String ln = p.getProperty("LOCALE_LANGUAGE_NAME"); String sc = p.getProperty("LOCALE_SCRIPT_CODE"); String cn = p.getProperty("LOCALE_COUNTRY_NAME"); String vn = p.getProperty("LOCALE_VARIANT_NAME"); String sn = p.getProperty("LOCALE_SCRIPT_NAME"); String dn = p.getProperty("LOCALE_ENGLISH_LANGUAGE_NAME"); langs.put(new LanguageInfo(lc, cc, vc, sc, ln, cn, vn, sn, dn, filename), p); } catch (IOException e) { // ignore. } finally { if (in != null) try { in.close(); } catch(IOException ioe) {} } } | 5134 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5134/d35c56011116d0a38d039bb343361832204026fd/CountPercent.java/buggy/lib/messagebundles/CountPercent.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
26953,
12,
863,
26467,
16,
5037,
316,
16,
1000,
16111,
16,
514,
1544,
13,
288,
9079,
775,
288,
5411,
316,
273,
394,
24742,
12,
267,
1769,
5411,
293,
18,
945,
12,
267,
1769,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
26953,
12,
863,
26467,
16,
5037,
316,
16,
1000,
16111,
16,
514,
1544,
13,
288,
9079,
775,
288,
5411,
316,
273,
394,
24742,
12,
267,
1769,
5411,
293,
18,
945,
12,
267,
1769,
... | |
IPatch p = new Patch(sysex, this); | Patch p = new Patch(sysex, this); | public IPatch createNewPatch() { byte [] sysex = new byte[319]; sysex[0]=(byte)0xF0; sysex[1]=(byte)0x18;sysex[2]=(byte)0x08;sysex[3]=(byte)0x00;sysex[4]=(byte)0x01; sysex[318]=(byte)0xF7; IPatch p = new Patch(sysex, this); setPatchName(p,"New Patch"); calculateChecksum(p); return p; } | 7591 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7591/8de9e9d107eb8c0487bbadf2f24d3a5cc9bc1add/EmuProteusMPSSingleDriver.java/buggy/JSynthLib/synthdrivers/EmuProteusMPS/EmuProteusMPSSingleDriver.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
1071,
2971,
505,
15291,
7332,
1435,
288,
202,
1160,
5378,
1393,
20909,
273,
394,
1160,
63,
23,
3657,
15533,
202,
1393,
20909,
63,
20,
65,
28657,
7229,
13,
20,
16275,
20,
31,
1393,
20909,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1071,
2971,
505,
15291,
7332,
1435,
288,
202,
1160,
5378,
1393,
20909,
273,
394,
1160,
63,
23,
3657,
15533,
202,
1393,
20909,
63,
20,
65,
28657,
7229,
13,
20,
16275,
20,
31,
1393,
20909,
... |
private static void appendLoad(OPT_BasicBlock bb, | private void appendLoad(OPT_BasicBlock bb, | private static void appendLoad(OPT_BasicBlock bb, OPT_IR ir) { if (DEBUG)VM.sysWrite("Adding load to "+ bb + "\n"); OPT_Instruction load = null; if (ir.options.PROCESSOR_SPECIFIC_COUNTER) { // Use one CBS counter per processor (better for multi threaded apps) if (ir.IRStage == OPT_IR.HIR) { // NOT IMPLEMENTED } else { // Phase is being used in LIR OPT_Instruction dummy = Load.create(INT_LOAD,null,null,null,null); // Insert the load instruction. load = Load.create(INT_LOAD, cbsReg.copyRO(), OPT_IRTools.A(ir.regpool.getPhysicalRegisterSet().getPR()), OPT_IRTools.AC(VM_Entrypoints.processorCBSField.getOffset()), new OPT_LocationOperand(VM_Entrypoints.processorCBSField)); bb.appendInstruction(load); } } else { // Use global counter if (ir.IRStage == OPT_IR.HIR) { OPT_Operand offsetOp = new OPT_AddressConstantOperand(VM_Entrypoints.globalCBSField.getOffset()); load = GetStatic.create(GETSTATIC,cbsReg.copyRO(),offsetOp, new OPT_LocationOperand(VM_Entrypoints.globalCBSField)); bb.appendInstruction(load); } else { // LIR OPT_Instruction dummy = Load.create(INT_LOAD,null,null,null,null); bb.appendInstruction(dummy); load = Load.create(INT_LOAD, cbsReg.copyRO(), ir.regpool.makeJTOCOp(ir,dummy), OPT_IRTools.AC(VM_Entrypoints.globalCBSField.getOffset()), new OPT_LocationOperand(VM_Entrypoints.globalCBSField)); dummy.insertBefore(load); dummy.remove(); } } } | 4011 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4011/b1b50818f30a1dce68026d92668f31d63aff75f8/OPT_InstrumentationSamplingFramework.java/clean/rvm/src/vm/adaptive/recompilation/instrumentation/OPT_InstrumentationSamplingFramework.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
714,
2563,
12,
15620,
67,
8252,
1768,
7129,
16,
4766,
16456,
67,
7937,
9482,
13,
288,
565,
309,
261,
9394,
13,
7397,
18,
9499,
3067,
2932,
13962,
1262,
358,
13773,
7129,
397,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
714,
2563,
12,
15620,
67,
8252,
1768,
7129,
16,
4766,
16456,
67,
7937,
9482,
13,
288,
565,
309,
261,
9394,
13,
7397,
18,
9499,
3067,
2932,
13962,
1262,
358,
13773,
7129,
397,
... |
if (offsets[rowNumber] - currentCell.height() - cellpadding < offsets[rowNumber + currentCell.rowspan()]) { offsets[rowNumber + currentCell.rowspan()] = offsets[rowNumber] - currentCell.height() - cellpadding; | if (offsets[rowNumber] - currentCell.height() - cellspacing < offsets[rowNumber + currentCell.rowspan()]) { offsets[rowNumber + currentCell.rowspan()] = offsets[rowNumber] - currentCell.height() - cellspacing; | PdfTable(Table table, float left, float right, float top) { // constructs a Rectangle (the bottomvalue will be changed afterwards) super(left, top, right, top); setBorder(table.border()); setBorderWidth(table.borderWidth()); setBorderColor(table.borderColor()); setBackgroundColor(table.backgroundColor()); setGrayFill(table.grayFill()); // initialisation of some parameters this.cellpadding = table.cellpadding(); float[] positions = table.getWidths(left, right - left); setLeft(positions[0]); setRight(positions[positions.length - 1]); Row row; int rowNumber = 0; int firstDataRow = table.firstDataRow(); Cell cell; PdfCell currentCell; headercells = new ArrayList(); cells = new ArrayList(); int rows = table.size() + 1; float[] offsets = new float[rows]; for (int i = 0; i < rows; i++) { offsets[i] = top - cellpadding; } // loop over all the rows for (Iterator rowIterator = table.iterator(); rowIterator.hasNext(); ) { row = (Row) rowIterator.next(); if (! row.isEmpty()) { for(int i = 0; i < row.columns(); i++) { cell = (Cell) row.getCell(i); if (cell != null) { currentCell = new PdfCell(cell, rowNumber, positions[i], positions[i + cell.colspan()], offsets[rowNumber], table.cellspacing(), cellpadding); try { if (offsets[rowNumber] - currentCell.height() - cellpadding < offsets[rowNumber + currentCell.rowspan()]) { offsets[rowNumber + currentCell.rowspan()] = offsets[rowNumber] - currentCell.height() - cellpadding; } } catch(ArrayIndexOutOfBoundsException aioobe) { if (offsets[rowNumber] - currentCell.height() < offsets[offsets.length - 1]) { offsets[offsets.length - 1] = offsets[rowNumber] - currentCell.height(); } } if (rowNumber < firstDataRow) { currentCell.setHeader(); headercells.add(currentCell); } cells.add(currentCell); } } } rowNumber++; } // loop over all the cells int n = cells.size(); for (int i = 0; i < n; i++) { currentCell = (PdfCell) cells.get(i); try { currentCell.setBottom(offsets[currentCell.rownumber() + currentCell.rowspan()]); } catch(ArrayIndexOutOfBoundsException aioobe) { currentCell.setBottom(offsets[offsets.length - 1]); } } setBottom(offsets[offsets.length - 1] - cellpadding); } | 3011 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3011/f60d6f94043d3c5e563621c33d69c01013ee4b81/PdfTable.java/clean/itext/src/com/lowagie/text/pdf/PdfTable.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
9989,
1388,
12,
1388,
1014,
16,
1431,
2002,
16,
1431,
2145,
16,
1431,
1760,
13,
288,
7734,
368,
15725,
279,
13264,
261,
5787,
5469,
1132,
903,
506,
3550,
23838,
13,
3639,
2240,
12,
4482,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
9989,
1388,
12,
1388,
1014,
16,
1431,
2002,
16,
1431,
2145,
16,
1431,
1760,
13,
288,
7734,
368,
15725,
279,
13264,
261,
5787,
5469,
1132,
903,
506,
3550,
23838,
13,
3639,
2240,
12,
4482,
... |
abort( MessageFormat.format( "Unable to restore prompting source locator - project {0} not found.", new String[] { projectName } ), null ); | abort( MessageFormat.format( CDebugUIPlugin.getResourceString("ui.sourcelookup.DefaultSourceLocator.Unable_to_restore_prompting_src_locator_project_not_found"), new String[] { projectName } ), null ); | public void initializeFromMemento( String memento ) throws CoreException { Exception ex = null; try { Element root = null; DocumentBuilder parser = DocumentBuilderFactory.newInstance().newDocumentBuilder(); StringReader reader = new StringReader( memento ); InputSource source = new InputSource( reader ); root = parser.parse( source ).getDocumentElement(); if ( !root.getNodeName().equalsIgnoreCase( ELEMENT_NAME ) ) { abort( "Unable to restore prompting source locator - invalid format.", null ); } String projectName = root.getAttribute( ATTR_PROJECT ); String data = root.getAttribute( ATTR_MEMENTO ); if ( isEmpty( projectName ) ) { abort( "Unable to restore prompting source locator - invalid format.", null ); } IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject( projectName ); if ( getCSourceLocator() == null ) setCSourceLocator( SourceLookupFactory.createSourceLocator( project ) ); if ( getCSourceLocator().getProject() != null && !getCSourceLocator().getProject().equals( project ) ) return; if ( project == null || !project.exists() || !project.isOpen() ) abort( MessageFormat.format( "Unable to restore prompting source locator - project {0} not found.", new String[] { projectName } ), null ); IPersistableSourceLocator psl = getPersistableSourceLocator(); if ( psl != null ) psl.initializeFromMemento( data ); else abort( "Unable to restore C/C++ source locator - invalid format.", null ); return; } catch( ParserConfigurationException e ) { ex = e; } catch( SAXException e ) { ex = e; } catch( IOException e ) { ex = e; } abort( "Exception occurred initializing source locator.", ex ); } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/7c50719ee75ad53d8a6bd367d0f569749c3680bc/DefaultSourceLocator.java/clean/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/sourcelookup/DefaultSourceLocator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
4046,
1265,
49,
820,
83,
12,
514,
312,
820,
83,
262,
1216,
30015,
202,
95,
202,
202,
503,
431,
273,
446,
31,
202,
202,
698,
202,
202,
95,
1082,
202,
1046,
1365,
273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
4046,
1265,
49,
820,
83,
12,
514,
312,
820,
83,
262,
1216,
30015,
202,
95,
202,
202,
503,
431,
273,
446,
31,
202,
202,
698,
202,
202,
95,
1082,
202,
1046,
1365,
273,
... |
public void visitIALOAD(IALOAD obj) { pushValue(Type.INT); } | public void visitIALOAD(IALOAD obj) { consumeStack(obj); pushValue(Type.INT); } | public void visitIALOAD(IALOAD obj) { pushValue(Type.INT); } | 10715 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10715/9e55b32a478d9bf623212d8a8aa6e1446e58c8b5/TypeFrameModelingVisitor.java/buggy/findbugs/src/java/edu/umd/cs/findbugs/ba/TypeFrameModelingVisitor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
3757,
6365,
51,
1880,
12,
6365,
51,
1880,
1081,
13,
9506,
202,
95,
1817,
620,
12,
559,
18,
3217,
1769,
289,
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
3757,
6365,
51,
1880,
12,
6365,
51,
1880,
1081,
13,
9506,
202,
95,
1817,
620,
12,
559,
18,
3217,
1769,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
if ( result != 0 ) { | if (result != 0) { | public void execute() throws BuildException { Commandline commandLine = new Commandline(); Project aProj = getProject(); int result = 0; // Default the viewpath to basedir if it is not specified if (getViewPath() == null) { setViewPath(aProj.getBaseDir().getPath()); } // build the command line from what we got the format is // cleartool checkout [options...] [viewpath ...] // as specified in the CLEARTOOL.EXE help commandLine.setExecutable(getClearToolCommand()); commandLine.createArgument().setValue(COMMAND_CHECKOUT); checkOptions(commandLine); result = run(commandLine); if ( result != 0 ) { String msg = "Failed executing: " + commandLine.toString(); throw new BuildException(msg, location); } } | 639 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/639/c6c232893c39257745a8f7a618bcdb5c59791cae/CCCheckout.java/clean/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCCheckout.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1836,
1435,
1216,
18463,
288,
3639,
3498,
1369,
20894,
273,
394,
3498,
1369,
5621,
3639,
5420,
279,
626,
78,
273,
11080,
5621,
3639,
509,
563,
273,
374,
31,
3639,
368,
2989,
32... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1836,
1435,
1216,
18463,
288,
3639,
3498,
1369,
20894,
273,
394,
3498,
1369,
5621,
3639,
5420,
279,
626,
78,
273,
11080,
5621,
3639,
509,
563,
273,
374,
31,
3639,
368,
2989,
32... |
while (true) { while (tmp != null) { if (tmp.getInstanceVariables().get(id) != null) { return (RubyObject) tmp.getInstanceVariables().get(id); } if (tmp == getRuby().getClasses().getObjectClass() && getRuby().getTopConstant(id) != null) { return getRuby().getTopConstant(id); } tmp = tmp.getSuperClass(); } if (!mod_retry && isModule()) { mod_retry = true; tmp = getRuby().getClasses().getObjectClass(); continue; } break; } | while (true) { while (tmp != null) { if (tmp.getInstanceVariables().get(id) != null) { return (RubyObject) tmp.getInstanceVariables().get(id); } if (tmp == getRuby().getClasses().getObjectClass() && getRuby().getTopConstant(id) != null) { return getRuby().getTopConstant(id); } tmp = tmp.getSuperClass(); } if (!mod_retry && isModule()) { mod_retry = true; tmp = getRuby().getClasses().getObjectClass(); continue; } break; } | public RubyObject getConstant(RubyId id) { boolean mod_retry = false; RubyModule tmp = this; while (true) { while (tmp != null) { if (tmp.getInstanceVariables().get(id) != null) { return (RubyObject) tmp.getInstanceVariables().get(id); } if (tmp == getRuby().getClasses().getObjectClass() && getRuby().getTopConstant(id) != null) { return getRuby().getTopConstant(id); } tmp = tmp.getSuperClass(); } if (!mod_retry && isModule()) { mod_retry = true; tmp = getRuby().getClasses().getObjectClass(); continue; } break; } /* Uninitialized constant */ if (this != getRuby().getClasses().getObjectClass()) { throw new RubyNameException( getRuby(), "uninitialized constant " + id.toName() + " at " + getClassPath().getValue()); } else { throw new RubyNameException(getRuby(), "uninitialized constant " + id.toName()); } // return getRuby().getNil(); } | 52337 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52337/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/clean/org/jruby/RubyModule.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
19817,
921,
24337,
12,
54,
10340,
548,
612,
13,
288,
202,
202,
6494,
681,
67,
9620,
273,
629,
31,
202,
202,
54,
10340,
3120,
1853,
273,
333,
31,
202,
202,
17523,
261,
3767,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
19817,
921,
24337,
12,
54,
10340,
548,
612,
13,
288,
202,
202,
6494,
681,
67,
9620,
273,
629,
31,
202,
202,
54,
10340,
3120,
1853,
273,
333,
31,
202,
202,
17523,
261,
3767,
... |
private void delete(IResource[] resourcesToDelete, IProgressMonitor monitor) throws CoreException { | private IStatus delete(IResource[] resourcesToDelete, IProgressMonitor monitor) { | private void delete(IResource[] resourcesToDelete, IProgressMonitor monitor) throws CoreException { final List exceptions = new ArrayList(); forceOutOfSyncDelete = false; monitor.beginTask("", resourcesToDelete.length); //$NON-NLS-1$ for (int i = 0; i < resourcesToDelete.length; ++i) { if (monitor.isCanceled()) { throw new OperationCanceledException(); } try { delete(resourcesToDelete[i], new SubProgressMonitor(monitor, 1, SubProgressMonitor.PREPEND_MAIN_LABEL_TO_SUBTASK)); } catch (CoreException e) { exceptions.add(e); } } // Check to see if any problems occurred during processing. final int exceptionCount = exceptions.size(); if (exceptionCount == 1) { throw (CoreException) exceptions.get(0); } else if (exceptionCount > 1) { final MultiStatus multi = new MultiStatus( IDEWorkbenchPlugin.IDE_WORKBENCH, 0, IDEWorkbenchMessages .getString("DeleteResourceAction.deletionExceptionMessage"), new Exception()); //$NON-NLS-1$ for (int i = 0; i < exceptionCount; i++) { CoreException exception = (CoreException) exceptions.get(0); IStatus status = exception.getStatus(); multi.add(new Status(status.getSeverity(), status.getPlugin(), status.getCode(), status.getMessage(), exception)); } throw new CoreException(multi); } // Signal that the job has completed successfully. monitor.done(); } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/c6e47b39f4f7d39741fba9a61369fbd5077ed236/DeleteResourceAction.java/buggy/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/DeleteResourceAction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1430,
12,
45,
1420,
8526,
2703,
14976,
16,
467,
5491,
7187,
6438,
13,
5411,
1216,
30015,
288,
3639,
727,
987,
4798,
273,
394,
2407,
5621,
3639,
2944,
11224,
4047,
2613,
273,
62... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1430,
12,
45,
1420,
8526,
2703,
14976,
16,
467,
5491,
7187,
6438,
13,
5411,
1216,
30015,
288,
3639,
727,
987,
4798,
273,
394,
2407,
5621,
3639,
2944,
11224,
4047,
2613,
273,
62... |
Menu subMenu = null; | public void fill(Menu parent, int index) { if (widget == null && parent != null) { Menu subMenu = null; int flags = SWT.PUSH; if (action != null) { int style = action.getStyle(); if (style == IAction.AS_CHECK_BOX) flags = SWT.CHECK; else if (style == IAction.AS_RADIO_BUTTON) flags = SWT.RADIO; else if (style == IAction.AS_DROP_DOWN_MENU) { IMenuCreator mc = action.getMenuCreator(); if (mc != null) { subMenu = mc.getMenu(parent); flags = SWT.CASCADE; } } } MenuItem mi = null; if (index >= 0) mi = new MenuItem(parent, flags, index); else mi = new MenuItem(parent, flags); widget = mi; mi.setData(this); mi.addListener(SWT.Dispose, getMenuItemListener()); mi.addListener(SWT.Selection, getMenuItemListener()); if (action.getHelpListener() != null) mi.addHelpListener(action.getHelpListener()); if (subMenu != null) mi.setMenu(subMenu); update(null); action.addPropertyChangeListener(propertyListener); } } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/46d954b546b46c20442ad054fb1b860e3b9e902b/ActionContributionItem.java/buggy/bundles/org.eclipse.jface/src/org/eclipse/jface/action/ActionContributionItem.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
3636,
12,
4599,
982,
16,
509,
770,
13,
288,
202,
202,
430,
261,
6587,
422,
446,
597,
982,
480,
446,
13,
288,
1082,
202,
4599,
720,
4599,
273,
446,
31,
1082,
202,
474,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3636,
12,
4599,
982,
16,
509,
770,
13,
288,
202,
202,
430,
261,
6587,
422,
446,
597,
982,
480,
446,
13,
288,
1082,
202,
4599,
720,
4599,
273,
446,
31,
1082,
202,
474,
... | |
} else if("false".equals(value)){ | } else if("false".equals(value)){ | private void processCell(final Element ecell) throws XML2XLSFatalException{ List<Element> l = ecell.getChildren(); if(l.size()>1){ throw new XMLSyntaxException( "<cell> can have only one child element: " + "text|number|formula"); } for(Element e: l){ String name = e.getName(); CellEntity cell = new CellEntity(); if("text".equals(name)){ wbgh.setCellValue(e.getText()); } else if("number".equals(name)){ String doubleStr = e.getTextTrim(); double d = -1; try{ d = Double.parseDouble(doubleStr); } catch(NumberFormatException nfe){ throw new XML2XLSFatalException( "<number> cell value is not valid double: " + doubleStr, nfe); } wbgh.setCellValue(d); } else if("formula".equals(name)){ String formula = e.getTextTrim(); if(formula == null || "".equals(formula)){ throw new XML2XLSFatalException( "element <formula> cannot be empty"); } wbgh.setCellFormula(formula); } else if("date".equals(name)){ String format = e.getAttributeValue("format"); if(format == null){ throw new XML2XLSFatalException( "<date> element should have `format'" + " attribute specified"); } wbgh.setCellValue(getDate(e.getTextTrim(), format)); } else if("calendar".equals(name)){ String format = e.getAttributeValue("format"); if(format == null){ throw new XML2XLSFatalException( "<date> element should have `format'" + " attribute specified"); } wbgh.setCellValue(getCalendar(e.getTextTrim(), format)); } else if("boolean".equals(name)){ String value = e.getTextTrim(); boolean bolVal; if("true".equals(value)){ bolVal = true; } else if("false".equals(value)){ bolVal = false; } else{ throw new XML2XLSFatalException( "<boolean> cell can have only true/false as value. " + "The present value: " + value); } wbgh.setCellValue(bolVal); } else{ throw new XMLInvalidNestedElementException("cell", name); } } } | 58507 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58507/5f7a69a4e14a6887fc9e0c3ece2046718de046d0/XML2XLSGenerator.java/clean/trunk/src/main/java/org/wiztools/xml2spreadsheet/XML2XLSGenerator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1207,
4020,
12,
6385,
3010,
425,
3855,
13,
7682,
1216,
3167,
22,
60,
3045,
19593,
503,
95,
3639,
987,
32,
1046,
34,
328,
273,
425,
3855,
18,
588,
4212,
5621,
3639,
309,
12,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1207,
4020,
12,
6385,
3010,
425,
3855,
13,
7682,
1216,
3167,
22,
60,
3045,
19593,
503,
95,
3639,
987,
32,
1046,
34,
328,
273,
425,
3855,
18,
588,
4212,
5621,
3639,
309,
12,
... |
public boolean after(Date when) { return (getTime() > when.getTime()); } | public boolean after(Date when) { return time > when.time; } | public boolean after(Date when) { return (getTime() > when.getTime());} | 45713 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45713/7c6c05f1f83e6c15370af9d0524167268ffd3643/Date.java/buggy/libraries/javalib/java/util/Date.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
1250,
1839,
12,
1626,
1347,
13,
288,
202,
2463,
261,
588,
950,
1435,
405,
1347,
18,
588,
950,
10663,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
1250,
1839,
12,
1626,
1347,
13,
288,
202,
2463,
261,
588,
950,
1435,
405,
1347,
18,
588,
950,
10663,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
return ResolveFunction( items ); | return ResolveFunction( data, items ); | static private Declaration ResolveAmbiguities( LinkedList items ) throws ParserSymbolTableException{ Declaration decl = null; int size = items.size(); if( size == 0){ return null; } else if (size == 1) { return (Declaration) items.getFirst(); } else { Declaration first = (Declaration)items.removeFirst(); //if first one is a class-name, the next ones hide it if( first.getType() >= Declaration.t_class && first.getType() <= Declaration.t_enum ){ return ResolveAmbiguities( items ); } //else, if the first is an object (ie not a function), the rest must be the same //declaration. otherwise (ie it is a function), the rest must be functions. boolean needSame = ( first.getType() != Declaration.t_function ); Iterator iter = items.iterator(); for( int i = (size - 1); i > 0; i-- ){ decl = (Declaration) iter.next(); if( needSame ){ if( decl != first ){ throw new ParserSymbolTableException(); } } else { if( decl.getType() != Declaration.t_function ){ throw new ParserSymbolTableException(); } } } if( needSame ){ return first; } else { items.addFirst( first ); return ResolveFunction( items ); } } } | 54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/c27351afc006a281288d8636d98a881449522b1b/ParserSymbolTable.java/clean/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/ParserSymbolTable.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
3845,
3238,
16110,
4302,
9910,
30706,
8810,
1961,
12,
10688,
1516,
262,
1216,
6783,
5335,
1388,
503,
95,
202,
202,
6094,
3496,
273,
446,
31,
1082,
202,
474,
963,
273,
1516,
18,
1467,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3845,
3238,
16110,
4302,
9910,
30706,
8810,
1961,
12,
10688,
1516,
262,
1216,
6783,
5335,
1388,
503,
95,
202,
202,
6094,
3496,
273,
446,
31,
1082,
202,
474,
963,
273,
1516,
18,
1467,... |
{ return slicerAxis; } | { return slicerAxis; } | public Axis getSlicerAxis() { return slicerAxis; } | 51263 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51263/b5b5168edc3af09cb74945a80b0c36e6630ed502/ResultBase.java/buggy/src/main/mondrian/olap/ResultBase.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
15509,
17718,
21349,
6558,
1435,
202,
95,
202,
202,
2463,
2020,
21349,
6558,
31,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
15509,
17718,
21349,
6558,
1435,
202,
95,
202,
202,
2463,
2020,
21349,
6558,
31,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
dbEncoding = "KOI8_R"; | try { dbEncoding = "KOI8_U"; "test".getBytes(dbEncoding); } catch(UnsupportedEncodingException uee) { dbEncoding = "KOI8_R"; } | protected void openConnection(String host, int port, Properties info, String database, String url, Driver d) throws SQLException { // Throw an exception if the user or password properties are missing // This occasionally occurs when the client uses the properties version // of getConnection(), and is a common question on the email lists if(info.getProperty("user")==null) throw new PSQLException("postgresql.con.user"); if(info.getProperty("password")==null) throw new PSQLException("postgresql.con.pass"); this_driver = d; this_url = url; PG_DATABASE = database; PG_PASSWORD = info.getProperty("password"); PG_USER = info.getProperty("user"); PG_PORT = port; PG_HOST = host; PG_STATUS = CONNECTION_BAD; // Now make the initial connection try { pg_stream = new PG_Stream(host, port); } catch (ConnectException cex) { // Added by Peter Mount <peter@retep.org.uk> // ConnectException is thrown when the connection cannot be made. // we trap this an return a more meaningful message for the end user throw new PSQLException ("postgresql.con.refused"); } catch (IOException e) { throw new PSQLException ("postgresql.con.failed",e); } // Now we need to construct and send a startup packet try { // Ver 6.3 code pg_stream.SendInteger(4+4+SM_DATABASE+SM_USER+SM_OPTIONS+SM_UNUSED+SM_TTY,4); pg_stream.SendInteger(PG_PROTOCOL_LATEST_MAJOR,2); pg_stream.SendInteger(PG_PROTOCOL_LATEST_MINOR,2); pg_stream.Send(database.getBytes(),SM_DATABASE); // This last send includes the unused fields pg_stream.Send(PG_USER.getBytes(),SM_USER+SM_OPTIONS+SM_UNUSED+SM_TTY); // now flush the startup packets to the backend pg_stream.flush(); // Now get the response from the backend, either an error message // or an authentication request int areq = -1; // must have a value here do { int beresp = pg_stream.ReceiveChar(); switch(beresp) { case 'E': // An error occured, so pass the error message to the // user. // // The most common one to be thrown here is: // "User authentication failed" // throw new SQLException(pg_stream.ReceiveString (receive_sbuf, 4096, getEncoding())); case 'R': // Get the type of request areq = pg_stream.ReceiveIntegerR(4); // Get the password salt if there is one if(areq == AUTH_REQ_CRYPT) { byte[] rst = new byte[2]; rst[0] = (byte)pg_stream.ReceiveChar(); rst[1] = (byte)pg_stream.ReceiveChar(); salt = new String(rst,0,2); DriverManager.println("Salt="+salt); } // now send the auth packet switch(areq) { case AUTH_REQ_OK: break; case AUTH_REQ_KRB4: DriverManager.println("postgresql: KRB4"); throw new PSQLException("postgresql.con.kerb4"); case AUTH_REQ_KRB5: DriverManager.println("postgresql: KRB5"); throw new PSQLException("postgresql.con.kerb5"); case AUTH_REQ_PASSWORD: DriverManager.println("postgresql: PASSWORD"); pg_stream.SendInteger(5+PG_PASSWORD.length(),4); pg_stream.Send(PG_PASSWORD.getBytes()); pg_stream.SendInteger(0,1); pg_stream.flush(); break; case AUTH_REQ_CRYPT: DriverManager.println("postgresql: CRYPT"); String crypted = UnixCrypt.crypt(salt,PG_PASSWORD); pg_stream.SendInteger(5+crypted.length(),4); pg_stream.Send(crypted.getBytes()); pg_stream.SendInteger(0,1); pg_stream.flush(); break; default: throw new PSQLException("postgresql.con.auth",new Integer(areq)); } break; default: throw new PSQLException("postgresql.con.authfail"); } } while(areq != AUTH_REQ_OK); } catch (IOException e) { throw new PSQLException("postgresql.con.failed",e); } // As of protocol version 2.0, we should now receive the cancellation key and the pid int beresp = pg_stream.ReceiveChar(); switch(beresp) { case 'K': pid = pg_stream.ReceiveInteger(4); ckey = pg_stream.ReceiveInteger(4); break; case 'E': case 'N': throw new SQLException(pg_stream.ReceiveString (receive_sbuf, 4096, getEncoding())); default: throw new PSQLException("postgresql.con.setup"); } // Expect ReadyForQuery packet beresp = pg_stream.ReceiveChar(); switch(beresp) { case 'Z': break; case 'E': case 'N': throw new SQLException(pg_stream.ReceiveString(receive_sbuf, 4096, getEncoding())); default: throw new PSQLException("postgresql.con.setup"); } // Originally we issued a SHOW DATESTYLE statement to find the databases default // datestyle. However, this caused some problems with timestamps, so in 6.5, we // went the way of ODBC, and set the connection to ISO. // // This may cause some clients to break when they assume anything other than ISO, // but then - they should be using the proper methods ;-) // // We also ask the DB for certain properties (i.e. DatabaseEncoding at this time) // firstWarning = null; java.sql.ResultSet initrset = ExecSQL("set datestyle to 'ISO'; select getdatabaseencoding()"); String dbEncoding = null; //retrieve DB properties if(initrset.next()) { //handle DatabaseEncoding dbEncoding = initrset.getString(1); //convert from the PostgreSQL name to the Java name if (dbEncoding.equals("SQL_ASCII")) { dbEncoding = "ASCII"; } else if (dbEncoding.equals("UNICODE")) { dbEncoding = "UTF8"; } else if (dbEncoding.equals("LATIN1")) { dbEncoding = "ISO8859_1"; } else if (dbEncoding.equals("LATIN2")) { dbEncoding = "ISO8859_2"; } else if (dbEncoding.equals("LATIN3")) { dbEncoding = "ISO8859_3"; } else if (dbEncoding.equals("LATIN4")) { dbEncoding = "ISO8859_4"; } else if (dbEncoding.equals("LATIN5")) { dbEncoding = "ISO8859_5"; } else if (dbEncoding.equals("LATIN6")) { dbEncoding = "ISO8859_6"; } else if (dbEncoding.equals("LATIN7")) { dbEncoding = "ISO8859_7"; } else if (dbEncoding.equals("LATIN8")) { dbEncoding = "ISO8859_8"; } else if (dbEncoding.equals("LATIN9")) { dbEncoding = "ISO8859_9"; } else if (dbEncoding.equals("EUC_JP")) { dbEncoding = "EUC_JP"; } else if (dbEncoding.equals("EUC_CN")) { dbEncoding = "EUC_CN"; } else if (dbEncoding.equals("EUC_KR")) { dbEncoding = "EUC_KR"; } else if (dbEncoding.equals("EUC_TW")) { dbEncoding = "EUC_TW"; } else if (dbEncoding.equals("KOI8")) { dbEncoding = "KOI8_R"; } else if (dbEncoding.equals("WIN")) { dbEncoding = "Cp1252"; } else { dbEncoding = null; } } //Set the encoding for this connection //Since the encoding could be specified or obtained from the DB we use the //following order: // 1. passed as a property // 2. value from DB if supported by current JVM // 3. default for JVM (leave encoding null) String passedEncoding = info.getProperty("charSet"); // could be null if (passedEncoding != null) { encoding = passedEncoding; } else { if (dbEncoding != null) { //test DB encoding try { "TEST".getBytes(dbEncoding); //no error the encoding is supported by the current JVM encoding = dbEncoding; } catch (UnsupportedEncodingException uee) { //dbEncoding is not supported by the current JVM encoding = null; } } else { encoding = null; } } // Initialise object handling initObjectTypes(); // Mark the connection as ok, and cleanup firstWarning = null; PG_STATUS = CONNECTION_OK; } | 45454 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45454/999a4d48d3727774d1c36b734130cdc0931a2bc9/Connection.java/clean/src/interfaces/jdbc/org/postgresql/Connection.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
24982,
12,
780,
1479,
16,
509,
1756,
16,
6183,
1123,
16,
514,
2063,
16,
514,
880,
16,
9396,
302,
13,
1216,
6483,
565,
288,
565,
368,
3743,
392,
1520,
309,
326,
729,
578,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
24982,
12,
780,
1479,
16,
509,
1756,
16,
6183,
1123,
16,
514,
2063,
16,
514,
880,
16,
9396,
302,
13,
1216,
6483,
565,
288,
565,
368,
3743,
392,
1520,
309,
326,
729,
578,
22... |
assertTrue("Binary search suceeded for value not present in array 1", | assertTrue("Binary search succeeded for value not present in array 1", | public void test_binarySearch$CC() { // Test for method int java.util.Arrays.binarySearch(char [], char) for (char counter = 0; counter < arraySize; counter++) assertTrue( "Binary search on char[] answered incorrect position", Arrays.binarySearch(charArray, (char) (counter + 1)) == counter); assertTrue("Binary search suceeded for value not present in array 1", Arrays.binarySearch(charArray, '\u0000') == -1); assertTrue( "Binary search suceeded for value not present in array 2", Arrays.binarySearch(charArray, (char) (arraySize + 1)) == -(arraySize + 1)); } | 54769 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54769/05d418921ff60e1f4923fdfa958156a76ce9c068/ArraysTest.java/buggy/modules/luni/src/test/java/tests/api/java/util/ArraysTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
67,
8578,
2979,
8,
6743,
1435,
288,
202,
202,
759,
7766,
364,
707,
509,
2252,
18,
1367,
18,
12726,
18,
8578,
2979,
12,
3001,
5378,
16,
1149,
13,
202,
202,
1884,
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,
67,
8578,
2979,
8,
6743,
1435,
288,
202,
202,
759,
7766,
364,
707,
509,
2252,
18,
1367,
18,
12726,
18,
8578,
2979,
12,
3001,
5378,
16,
1149,
13,
202,
202,
1884,
2... |
ChunkCache.LineInfo info = chunkCache.getLineInfo(i); if(info.physicalLine != -1) | chunkCache.updateChunksUpTo(visibleLines); for(int i = visibleLines; i >= 0; i--) | void recalculateLastPhysicalLine() { chunkCache.updateChunksUpTo(visibleLines); for(int i = visibleLines; i >= 0; i--) { ChunkCache.LineInfo info = chunkCache.getLineInfo(i); if(info.physicalLine != -1) { physLastLine = info.physicalLine; screenLastLine = i; break; } } } //}}} | 8690 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8690/f8f88a2c4b4f099b82a435bab4a6d60eb5dd8ebe/JEditTextArea.java/clean/org/gjt/sp/jedit/textarea/JEditTextArea.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
6459,
26657,
3024,
18136,
1670,
1435,
202,
95,
202,
202,
6551,
1649,
18,
2725,
14975,
1211,
774,
12,
8613,
5763,
1769,
202,
202,
1884,
12,
474,
277,
273,
6021,
5763,
31,
277,
1545,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
6459,
26657,
3024,
18136,
1670,
1435,
202,
95,
202,
202,
6551,
1649,
18,
2725,
14975,
1211,
774,
12,
8613,
5763,
1769,
202,
202,
1884,
12,
474,
277,
273,
6021,
5763,
31,
277,
1545,
... |
public boolean supportsTransposition() { return true; } | public boolean supportsTransposition( ) { return true; } | public boolean supportsTransposition() { return true; } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/349f24e6a8f8484f0f1f1af682b4952337cac402/LineChart.java/buggy/chart/org.eclipse.birt.chart.ui.extension/src/org/eclipse/birt/chart/ui/swt/type/LineChart.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
6146,
1429,
3276,
1435,
565,
288,
3639,
327,
638,
31,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
6146,
1429,
3276,
1435,
565,
288,
3639,
327,
638,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
private Dimension getLayoutSize(Container parent, int which) { synchronized (parent.getTreeLock()){ | private Dimension getLayoutSize(Container parent, LayoutSize which) { synchronized (parent.getTreeLock()) { | private Dimension getLayoutSize(Container parent, int which) { synchronized (parent.getTreeLock()){ update(parent); int ncomponents = parent.getComponentCount(); int h = 0; int w = 0; for (int r = 0, i = 0; r < nrows; r++) { int row_height = 0; for (int c = 0; c < ncols; c++, i++) { if (i < ncomponents) { switch (which) { case 0: row_height = Math.max(row_height, parent.getComponent(i).getMinimumSize().height); break; case 1: row_height = Math.max(row_height, parent.getComponent(i).getMaximumSize().height); break; default: row_height = Math.max(row_height, parent.getComponent(i).getPreferredSize().height); break; } } else { break; } } h += row_height; } for (int c = 0; c < ncols; c++) { int col_width = 0; for (int r = 0; r < nrows; r++) { int i = r * ncols + c; if (i < ncomponents) { switch (which) { case 0: col_width = Math.max(col_width, parent.getComponent(i).getMinimumSize().width); break; case 1: col_width = Math.max(col_width, parent.getComponent(i).getMaximumSize().width); break; default: col_width = Math.max(col_width, parent.getComponent(i).getPreferredSize().width); break; } } else { break; } } w += col_width; } Insets insets = parent.getInsets(); return new Dimension(w + insets.left + insets.right + ((ncols - 1) * hgap), h + insets.top + insets.bottom + ((nrows - 1) * vgap)); } } | 8690 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8690/920984a35b8fa35ba9bc7b7299c673c3718301b9/VariableGridLayout.java/clean/org/gjt/sp/jedit/gui/VariableGridLayout.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
13037,
17670,
1225,
12,
2170,
982,
16,
509,
1492,
13,
288,
202,
202,
22043,
261,
2938,
18,
588,
2471,
2531,
10756,
95,
1082,
202,
2725,
12,
2938,
1769,
1082,
202,
474,
290,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
13037,
17670,
1225,
12,
2170,
982,
16,
509,
1492,
13,
288,
202,
202,
22043,
261,
2938,
18,
588,
2471,
2531,
10756,
95,
1082,
202,
2725,
12,
2938,
1769,
1082,
202,
474,
290,
8... |
RequestHint hint = new RequestHint(stepThread, suspendContext, StepRequest.STEP_INTO); | final RequestHint hint = myTargetMethodSignature != null? new RequestHint(stepThread, suspendContext, myTargetMethodSignature) : new RequestHint(stepThread, suspendContext, StepRequest.STEP_INTO); | public void contextAction() { showStatusText(DebuggerBundle.message("status.step.into")); final SuspendContextImpl suspendContext = getSuspendContext(); final ThreadReferenceProxyImpl stepThread = suspendContext.getThread(); RequestHint hint = new RequestHint(stepThread, suspendContext, StepRequest.STEP_INTO); hint.setIgnoreFilters(myIgnoreFilters); doStep(stepThread, StepRequest.STEP_INTO, hint); super.contextAction(); } | 12814 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12814/daf9d43b252169731b5ce43bc169636bf5dee950/DebugProcessImpl.java/buggy/debugger/impl/com/intellij/debugger/engine/DebugProcessImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
819,
1803,
1435,
288,
1377,
2405,
1482,
1528,
12,
24113,
3405,
18,
2150,
2932,
2327,
18,
4119,
18,
18591,
7923,
1769,
1377,
727,
348,
18815,
1042,
2828,
20413,
1042,
273,
1322,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
819,
1803,
1435,
288,
1377,
2405,
1482,
1528,
12,
24113,
3405,
18,
2150,
2932,
2327,
18,
4119,
18,
18591,
7923,
1769,
1377,
727,
348,
18815,
1042,
2828,
20413,
1042,
273,
1322,
... |
A_CmsUser owner=cms.readOwner(file); xmlTemplateDocument.setXmlData("TITLE",title); xmlTemplateDocument.setXmlData("STATE",getState(cms,file,new CmsXmlLanguageFile(cms))); xmlTemplateDocument.setXmlData("OWNER",owner.getFirstname()+" "+owner.getLastname()+"("+owner.getName()+")"); xmlTemplateDocument.setXmlData("GROUP",cms.readGroup(file).getName()); xmlTemplateDocument.setXmlData("FILENAME",file.getName()); | public byte[] getContent(A_CmsObject cms, String templateFile, String elementName, Hashtable parameters, String templateSelector) throws CmsException { HttpSession session= ((HttpServletRequest)cms.getRequestContext().getRequest().getOriginalRequest()).getSession(true); // the template to be displayed String template=null; // get the lasturl parameter String lasturl = getLastUrl(cms, parameters); String delete=(String)parameters.get(C_PARA_DELETE); if (delete != null) { session.putValue(C_PARA_DELETE,delete); } delete=(String)session.getValue(C_PARA_DELETE); String filename=(String)parameters.get(C_PARA_FILE); if (filename != null) { session.putValue(C_PARA_FILE,filename); } filename=(String)session.getValue(C_PARA_FILE); String action = (String)parameters.get("action"); A_CmsResource file=(A_CmsResource)cms.readFileHeader(filename); if (file.isFile()) { template="file"; } else { template="folder"; } //check if the name parameter was included in the request // if not, the delete page is shown for the first time if (delete != null) { if (action== null) { template="wait"; } else { // check if the resource is a file or a folder if (file.isFile()) { // its a file, so delete it deleteFile(cms,file,false); session.removeValue(C_PARA_FILE); try { if(lasturl == null || "".equals(lasturl)) { cms.getRequestContext().getResponse().sendCmsRedirect( getConfigFile(cms).getWorkplaceActionPath()+C_WP_EXPLORER_FILELIST); } else { ((HttpServletResponse)(cms.getRequestContext().getResponse().getOriginalResponse())).sendRedirect(lasturl); } } catch (Exception e) { throw new CmsException("Redirect fails :"+ getConfigFile(cms).getWorkplaceActionPath()+C_WP_EXPLORER_FILELIST,CmsException.C_UNKNOWN_EXCEPTION,e); } } else { // its a folder, so try to delete the folder and its subfolders // get all subfolders and files Vector allFolders=new Vector(); Vector allFiles=new Vector(); getAllResources(cms,filename,allFiles,allFolders); // unlock the folder, otherwise the subflders and files could not be // deleted. cms.unlockResource(filename); // now delete all files in the subfolders for (int i=0;i<allFiles.size();i++) { CmsFile newfile=(CmsFile)allFiles.elementAt(i); cms.lockResource(newfile.getAbsolutePath()); deleteFile(cms,newfile,true); } // now delete all subfolders for (int i=0;i<allFolders.size();i++) { CmsFolder folder=(CmsFolder)allFolders.elementAt(allFolders.size()-i-1); cms.lockResource(folder.getAbsolutePath()); cms.deleteFolder(folder.getAbsolutePath()); } // finally delete the selected folder cms.lockResource(filename); cms.deleteFolder(filename); session.removeValue(C_PARA_FILE); template="update"; } } // TODO: Error handling } CmsXmlWpTemplateFile xmlTemplateDocument = new CmsXmlWpTemplateFile(cms,templateFile); // set the required datablocks String title=cms.readProperty(file.getAbsolutePath(),C_PROPERTY_TITLE); if (title==null) { title=""; } A_CmsUser owner=cms.readOwner(file); xmlTemplateDocument.setXmlData("TITLE",title); xmlTemplateDocument.setXmlData("STATE",getState(cms,file,new CmsXmlLanguageFile(cms))); xmlTemplateDocument.setXmlData("OWNER",owner.getFirstname()+" "+owner.getLastname()+"("+owner.getName()+")"); xmlTemplateDocument.setXmlData("GROUP",cms.readGroup(file).getName()); xmlTemplateDocument.setXmlData("FILENAME",file.getName()); // process the selected template return startProcessing(cms,xmlTemplateDocument,"",parameters,template); } | 8585 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8585/a5925e0f4f8a26ff7aba0051df8a95e28803290c/CmsDelete.java/buggy/src/com/opencms/workplace/CmsDelete.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1160,
8526,
5154,
12,
37,
67,
4747,
921,
6166,
16,
514,
28215,
16,
514,
14453,
16,
17311,
18559,
1472,
16,
514,
1542,
4320,
13,
3639,
1216,
11228,
288,
3639,
26166,
1339,
33,
14015,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1160,
8526,
5154,
12,
37,
67,
4747,
921,
6166,
16,
514,
28215,
16,
514,
14453,
16,
17311,
18559,
1472,
16,
514,
1542,
4320,
13,
3639,
1216,
11228,
288,
3639,
26166,
1339,
33,
14015,... | |
m_listLMs.add(lineLM); | listLMs.add(lineLM); | protected boolean preLoadNext() { while (proxy.hasNext()) { LayoutManager lm = (LayoutManager) proxy.next(); if(lm.generatesInlineAreas()) { LineLayoutManager lineLM = createLineManager(lm); m_listLMs.add(lineLM); } else { m_listLMs.add(lm); } if (m_curPos < m_listLMs.size()) { return true; } } return false; } | 5268 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5268/a62f977d812bb273863a574255920ca141eec969/BlockLayoutManager.java/buggy/src/org/apache/fop/layoutmgr/BlockLayoutManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
4750,
1250,
675,
2563,
2134,
1435,
288,
5411,
1323,
261,
5656,
18,
5332,
2134,
10756,
288,
7734,
9995,
1318,
14966,
273,
261,
3744,
1318,
13,
2889,
18,
4285,
5621,
7734,
309,
12,
25972,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
4750,
1250,
675,
2563,
2134,
1435,
288,
5411,
1323,
261,
5656,
18,
5332,
2134,
10756,
288,
7734,
9995,
1318,
14966,
273,
261,
3744,
1318,
13,
2889,
18,
4285,
5621,
7734,
309,
12,
25972,
1... |
m_propertyDefVectorCache.clear(); | public CmsPropertydefinition createPropertydefinition(CmsRequestContext context, String name, int resourcetype) throws CmsException { CmsPropertydefinition propertyDefinition = null; if (isAdmin(context)) { name = name.trim(); validFilename(name); m_propertyDefVectorCache.clear(); try { propertyDefinition = m_vfsDriver.readPropertyDefinition(name, context.currentProject().getId(), resourcetype); } catch (CmsException e) { propertyDefinition = m_vfsDriver.createPropertyDefinition(name, context.currentProject().getId(), resourcetype); } try { m_vfsDriver.readPropertyDefinition(name, I_CmsConstants.C_PROJECT_ONLINE_ID, resourcetype); } catch (CmsException e) { m_vfsDriver.createPropertyDefinition(name, I_CmsConstants.C_PROJECT_ONLINE_ID, resourcetype); } try { m_backupDriver.readBackupPropertyDefinition(name, resourcetype); } catch (CmsException e) { m_backupDriver.createBackupPropertyDefinition(name, resourcetype); } //propertyDefinition = m_vfsDriver.createPropertyDefinition(name, context.currentProject().getId(), resourcetype)); } else { throw new CmsSecurityException("[" + this.getClass().getName() + "] createPropertydefinition() " + name, CmsSecurityException.C_SECURITY_ADMIN_PRIVILEGES_REQUIRED); } return propertyDefinition; } | 8585 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8585/d2237ec513b9a11831eebfaf1c227867995de1fa/CmsDriverManager.java/buggy/src/org/opencms/db/CmsDriverManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
18505,
6907,
31318,
6907,
12,
4747,
21426,
819,
16,
514,
508,
16,
509,
31174,
5872,
13,
1216,
11228,
288,
3639,
18505,
6907,
1272,
1852,
273,
446,
31,
7734,
309,
261,
291,
4446,
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,
18505,
6907,
31318,
6907,
12,
4747,
21426,
819,
16,
514,
508,
16,
509,
31174,
5872,
13,
1216,
11228,
288,
3639,
18505,
6907,
1272,
1852,
273,
446,
31,
7734,
309,
261,
291,
4446,
12,... | |
int _m191 = mark(); synPredMatched191 = true; | int _m192 = mark(); synPredMatched192 = true; | public final void stepExpr() throws RecognitionException, TokenStreamException, XPathException { returnAST = null; ASTPair currentAST = new ASTPair(); org.exist.xquery.parser.XQueryAST stepExpr_AST = null; boolean synPredMatched188 = false; if (((_tokenSet_6.member(LA(1))))) { int _m188 = mark(); synPredMatched188 = true; inputState.guessing++; try { { { switch ( LA(1)) { case LITERAL_text: { match(LITERAL_text); break; } case LITERAL_node: { match(LITERAL_node); break; } case LITERAL_element: { match(LITERAL_element); break; } case LITERAL_attribute: { match(LITERAL_attribute); break; } case LITERAL_comment: { match(LITERAL_comment); break; } case 141: { match(141); break; } case 142: { match(142); break; } default: { throw new NoViableAltException(LT(1), getFilename()); } } } match(LPAREN); } } catch (RecognitionException pe) { synPredMatched188 = false; } rewind(_m188); inputState.guessing--; } if ( synPredMatched188 ) { axisStep(); astFactory.addASTChild(currentAST, returnAST); stepExpr_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; } else { boolean synPredMatched191 = false; if (((_tokenSet_7.member(LA(1))))) { int _m191 = mark(); synPredMatched191 = true; inputState.guessing++; try { { { switch ( LA(1)) { case LITERAL_element: { match(LITERAL_element); break; } case LITERAL_attribute: { match(LITERAL_attribute); break; } case LITERAL_text: { match(LITERAL_text); break; } case LITERAL_document: { match(LITERAL_document); break; } case 141: { match(141); break; } case LITERAL_comment: { match(LITERAL_comment); break; } default: { throw new NoViableAltException(LT(1), getFilename()); } } } match(LCURLY); } } catch (RecognitionException pe) { synPredMatched191 = false; } rewind(_m191); inputState.guessing--; } if ( synPredMatched191 ) { filterStep(); astFactory.addASTChild(currentAST, returnAST); stepExpr_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; } else { boolean synPredMatched194 = false; if (((_tokenSet_7.member(LA(1))))) { int _m194 = mark(); synPredMatched194 = true; inputState.guessing++; try { { { switch ( LA(1)) { case LITERAL_element: { match(LITERAL_element); break; } case LITERAL_attribute: { match(LITERAL_attribute); break; } case 141: { match(141); break; } case LITERAL_namespace: { match(LITERAL_namespace); break; } default: { throw new NoViableAltException(LT(1), getFilename()); } } } qName(); match(LCURLY); } } catch (RecognitionException pe) { synPredMatched194 = false; } rewind(_m194); inputState.guessing--; } if ( synPredMatched194 ) { filterStep(); astFactory.addASTChild(currentAST, returnAST); stepExpr_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; } else { boolean synPredMatched197 = false; if (((_tokenSet_7.member(LA(1))))) { int _m197 = mark(); synPredMatched197 = true; inputState.guessing++; try { { switch ( LA(1)) { case DOLLAR: { match(DOLLAR); break; } case NCNAME: case LITERAL_xquery: case LITERAL_version: case LITERAL_module: case LITERAL_namespace: case LITERAL_import: case LITERAL_declare: case LITERAL_default: case LITERAL_xmlspace: case LITERAL_ordering: case LITERAL_construction: case 63: case LITERAL_function: case LITERAL_variable: case LITERAL_encoding: case LITERAL_collation: case LITERAL_element: case LITERAL_preserve: case LITERAL_strip: case LITERAL_ordered: case LITERAL_unordered: case LITERAL_at: case LITERAL_external: case LITERAL_as: case LITERAL_empty: case LITERAL_item: case LITERAL_for: case LITERAL_let: case LITERAL_some: case LITERAL_every: case LITERAL_if: case LITERAL_return: case LITERAL_order: case LITERAL_by: case LITERAL_typeswitch: case LITERAL_then: case LITERAL_else: case LITERAL_or: case LITERAL_and: case LITERAL_instance: case LITERAL_of: case LITERAL_cast: case LITERAL_is: case LITERAL_isnot: case LITERAL_to: case LITERAL_div: case LITERAL_mod: case LITERAL_union: case LITERAL_intersect: case LITERAL_except: case LITERAL_text: case LITERAL_node: case LITERAL_attribute: case LITERAL_comment: case 142: case LITERAL_document: case LITERAL_child: case LITERAL_self: case LITERAL_descendant: case 154: case 155: case LITERAL_following: case LITERAL_parent: case LITERAL_ancestor: case 159: case 160: case LITERAL_collection: case LITERAL_preceding: { { qName(); match(LPAREN); } break; } case SELF: { match(SELF); break; } case LPAREN: { match(LPAREN); break; } case STRING_LITERAL: case DOUBLE_LITERAL: case DECIMAL_LITERAL: case INTEGER_LITERAL: { literal(); break; } case XML_COMMENT: { match(XML_COMMENT); break; } case LT: { match(LT); break; } case XML_PI: { match(XML_PI); break; } default: { throw new NoViableAltException(LT(1), getFilename()); } } } } catch (RecognitionException pe) { synPredMatched197 = false; } rewind(_m197); inputState.guessing--; } if ( synPredMatched197 ) { filterStep(); astFactory.addASTChild(currentAST, returnAST); stepExpr_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; } else if ((_tokenSet_6.member(LA(1)))) { axisStep(); astFactory.addASTChild(currentAST, returnAST); stepExpr_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; } else { throw new NoViableAltException(LT(1), getFilename()); } }}} returnAST = stepExpr_AST; } | 2909 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2909/10544e5ec103a411822c6180ed81ef38eab15de8/XQueryParser.java/buggy/src/org/exist/xquery/parser/XQueryParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
2235,
4742,
1435,
1216,
9539,
16,
3155,
1228,
503,
16,
10172,
503,
288,
9506,
202,
2463,
9053,
273,
446,
31,
202,
202,
9053,
4154,
783,
9053,
273,
394,
9183,
4154,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
2235,
4742,
1435,
1216,
9539,
16,
3155,
1228,
503,
16,
10172,
503,
288,
9506,
202,
2463,
9053,
273,
446,
31,
202,
202,
9053,
4154,
783,
9053,
273,
394,
9183,
4154,
5... |
AST __t196 = _t; AST tmp25_AST_in = (AST)_t; | AST __t223 = _t; AST tmp28_AST_in = (AST)_t; | public final Expression generalComp(AST _t, PathExpr path ) throws RecognitionException, PermissionDeniedException,EXistException,XPathException { Expression step; AST generalComp_AST_in = (AST)_t; step= null; PathExpr left= new PathExpr(); PathExpr right= new PathExpr(); if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case EQ: { AST __t196 = _t; AST tmp25_AST_in = (AST)_t; match(_t,EQ); _t = _t.getFirstChild(); expr(_t,left); _t = _retTree; expr(_t,right); _t = _retTree; step= new GeneralComparison(left, right, Constants.EQ); path.add(step); _t = __t196; _t = _t.getNextSibling(); break; } case NEQ: { AST __t197 = _t; AST tmp26_AST_in = (AST)_t; match(_t,NEQ); _t = _t.getFirstChild(); expr(_t,left); _t = _retTree; expr(_t,right); _t = _retTree; step= new GeneralComparison(left, right, Constants.NEQ); path.add(step); _t = __t197; _t = _t.getNextSibling(); break; } case LT: { AST __t198 = _t; AST tmp27_AST_in = (AST)_t; match(_t,LT); _t = _t.getFirstChild(); expr(_t,left); _t = _retTree; expr(_t,right); _t = _retTree; step= new GeneralComparison(left, right, Constants.LT); path.add(step); _t = __t198; _t = _t.getNextSibling(); break; } case LTEQ: { AST __t199 = _t; AST tmp28_AST_in = (AST)_t; match(_t,LTEQ); _t = _t.getFirstChild(); expr(_t,left); _t = _retTree; expr(_t,right); _t = _retTree; step= new GeneralComparison(left, right, Constants.LTEQ); path.add(step); _t = __t199; _t = _t.getNextSibling(); break; } case GT: { AST __t200 = _t; AST tmp29_AST_in = (AST)_t; match(_t,GT); _t = _t.getFirstChild(); expr(_t,left); _t = _retTree; expr(_t,right); _t = _retTree; step= new GeneralComparison(left, right, Constants.GT); path.add(step); _t = __t200; _t = _t.getNextSibling(); break; } case GTEQ: { AST __t201 = _t; AST tmp30_AST_in = (AST)_t; match(_t,GTEQ); _t = _t.getFirstChild(); expr(_t,left); _t = _retTree; expr(_t,right); _t = _retTree; step= new GeneralComparison(left, right, Constants.GTEQ); path.add(step); _t = __t201; _t = _t.getNextSibling(); break; } default: { throw new NoViableAltException(_t); } } _retTree = _t; return step; } | 2909 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2909/991914fac6d8ec32704e1e021ab6bf8707ee56ec/XPathTreeParser2.java/clean/src/org/exist/parser/XPathTreeParser2.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
5371,
225,
7470,
2945,
12,
9053,
389,
88,
16,
202,
202,
743,
4742,
589,
202,
13,
1216,
9539,
16,
8509,
15877,
16,
2294,
376,
503,
16,
14124,
503,
288,
202,
202,
2300,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
5371,
225,
7470,
2945,
12,
9053,
389,
88,
16,
202,
202,
743,
4742,
589,
202,
13,
1216,
9539,
16,
8509,
15877,
16,
2294,
376,
503,
16,
14124,
503,
288,
202,
202,
2300,
2... |
createDescriptionIn(outerContainer); | fTemplateViewer.getTable().setLayoutData(gd); TableItem[] selection = fPointListViewer.getTable().getSelection(); if (selection != null && selection.length > 0) fTemplateViewer.setInput((IPluginExtensionPoint)selection[0]); fTemplateViewer.addDoubleClickListener(new IDoubleClickListener(){ public void doubleClick(DoubleClickEvent event) { if (canFlipToNextPage()){ advanceToNextPage(); } } }); Composite descriptionComposite = new Composite(sashForm, SWT.NONE); layout = new GridLayout(); layout.marginHeight = 0; layout.marginWidth = 0; descriptionComposite.setLayout(layout); gd = new GridData( GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL); descriptionComposite.setLayoutData(gd); createDescriptionIn(descriptionComposite); createMenuManager(); | public void createControl(Composite parent) { // top level group Composite outerContainer = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.numColumns = 3; layout.verticalSpacing = 9; outerContainer.setLayout(layout); outerContainer.setLayoutData( new GridData( GridData.VERTICAL_ALIGN_FILL | GridData.HORIZONTAL_ALIGN_FILL)); fFilterCheck = new Button(outerContainer, SWT.CHECK); fFilterCheck.setText(PDEPlugin.getResourceString("NewExtensionWizard.PointSelectionPage.filterCheck")); GridData gd = new GridData(); gd.horizontalSpan = 3; fFilterCheck.setLayoutData(gd); fFilterCheck.setSelection(true); fFilterCheck.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { fPointListViewer.refresh(); } }); fPointListViewer = new TableViewer( outerContainer, SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER); fPointListViewer.setContentProvider(new ContentProvider()); fPointListViewer.setLabelProvider(new PointLabelProvider()); fPointListViewer.addSelectionChangedListener(this); fPointListViewer.setSorter(ListUtil.NAME_SORTER); gd = new GridData( GridData.FILL_BOTH | GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL); gd.heightHint = 300; gd.horizontalSpan = 2; fPointListViewer.getTable().setLayoutData(gd); fDescriptionButton = new Button(outerContainer, SWT.PUSH); fDescriptionButton.setText(PDEPlugin.getResourceString("NewExtensionWizard.PointSelectionPage.descButton")); gd = new GridData(GridData.VERTICAL_ALIGN_BEGINNING); fDescriptionButton.setLayoutData(gd); SWTUtil.setButtonDimensionHint(fDescriptionButton); fDescriptionButton.setEnabled(false); fDescriptionButton.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { doShowDescription(); } }); Label label = new Label(outerContainer, SWT.NONE); label.setText(PDEPlugin.getResourceString("NewExtensionWizard.PointSelectionPage.pointId")); fPointIdText = new Text(outerContainer, SWT.SINGLE | SWT.BORDER); gd = new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL); fPointIdText.setLayoutData(gd); new Label(outerContainer, SWT.NULL); label = new Label(outerContainer, SWT.NONE); label.setText(PDEPlugin.getResourceString("NewExtensionWizard.PointSelectionPage.pointName")); fPointNameText = new Text(outerContainer, SWT.SINGLE | SWT.BORDER); gd = new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL); fPointNameText.setLayoutData(gd); new Label(outerContainer, SWT.NULL); createDescriptionIn(outerContainer); initialize(); setControl(outerContainer); Dialog.applyDialogFont(outerContainer); WorkbenchHelp.setHelp( outerContainer, IHelpContextIds.ADD_EXTENSIONS_SCHEMA_BASED); } | 14404 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/14404/67c7d5d0b0d525549acee2450c787ae16de799a4/PointSelectionPage.java/buggy/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/extension/PointSelectionPage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
752,
3367,
12,
9400,
982,
13,
288,
202,
202,
759,
1760,
1801,
1041,
202,
202,
9400,
6390,
2170,
273,
394,
14728,
12,
2938,
16,
348,
8588,
18,
9826,
1769,
202,
202,
6313,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
752,
3367,
12,
9400,
982,
13,
288,
202,
202,
759,
1760,
1801,
1041,
202,
202,
9400,
6390,
2170,
273,
394,
14728,
12,
2938,
16,
348,
8588,
18,
9826,
1769,
202,
202,
6313,
... |
MailProcessingRecord mailProcessingRecord = new MailProcessingRecord(); mailProcessingRecord.setReceivingQueue("smtpOutbound"); mailProcessingRecord.setTimeFetchStart(System.currentTimeMillis()); mailProcessingRecord.setByteReceivedTotal(message.getSize()); try { if (!MailMatchingUtils.isMatchCandidate(message)) return; String id = MailMatchingUtils.getMailIdHeader(message); mailProcessingRecord.setMailId(id); String[] subjectHeader = message.getHeader("Subject"); if (subjectHeader != null && subjectHeader.length > 0) { mailProcessingRecord.setSubject(subjectHeader[0]); } mailProcessingRecord.setTimeFetchEnd(System.currentTimeMillis()); } catch(MessagingException e) { log.error("error processing incoming mail: " + e.getMessage()); throw e; } finally{ MailProcessingRecord matchedAndMergedRecord = m_results.matchMailRecord(mailProcessingRecord); if (matchedAndMergedRecord == null) { if (mailProcessingRecord.getMailId() == null) mailProcessingRecord.setMailId(MailProcessingRecord.getNextId()); m_results.addNewMailRecord(mailProcessingRecord); } else { MailMatchingUtils.validateMail(message, matchedAndMergedRecord); } } | try { new SMTPMailAnalyzeStrategy("smtpOutbound", m_results, message).handle(); } catch (Exception e) { throw new MessagingException("error handling message", e); } | public void sendMail(MailAddress sender, Collection recipients, MimeMessage message) throws MessagingException { //log.info("start processing incoming mail having id = " + msg.getMessageID()); MailProcessingRecord mailProcessingRecord = new MailProcessingRecord(); mailProcessingRecord.setReceivingQueue("smtpOutbound"); mailProcessingRecord.setTimeFetchStart(System.currentTimeMillis()); mailProcessingRecord.setByteReceivedTotal(message.getSize()); try { if (!MailMatchingUtils.isMatchCandidate(message)) return; String id = MailMatchingUtils.getMailIdHeader(message); mailProcessingRecord.setMailId(id); String[] subjectHeader = message.getHeader("Subject"); if (subjectHeader != null && subjectHeader.length > 0) { mailProcessingRecord.setSubject(subjectHeader[0]); } // TODO mailProcessingRecord.setByteReceivedText(); // TODO mailProcessingRecord.setByteReceivedBinary(); mailProcessingRecord.setTimeFetchEnd(System.currentTimeMillis()); } catch(MessagingException e) { log.error("error processing incoming mail: " + e.getMessage()); throw e; // rethrow after logging } finally{ MailProcessingRecord matchedAndMergedRecord = m_results.matchMailRecord(mailProcessingRecord); if (matchedAndMergedRecord == null) { if (mailProcessingRecord.getMailId() == null) mailProcessingRecord.setMailId(MailProcessingRecord.getNextId()); m_results.addNewMailRecord(mailProcessingRecord); } else { MailMatchingUtils.validateMail(message, matchedAndMergedRecord); } } } | 51804 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51804/18d01c392496899b5c73e6165f0e61a38bef0bc1/SimpleMailServer.java/buggy/src/main/java/org/apache/james/postage/smtpserver/SimpleMailServer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1366,
6759,
12,
6759,
1887,
5793,
16,
2200,
12045,
16,
22059,
1079,
883,
13,
1216,
23794,
503,
288,
3639,
368,
1330,
18,
1376,
2932,
1937,
4929,
6935,
4791,
7999,
612,
273,
315... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1366,
6759,
12,
6759,
1887,
5793,
16,
2200,
12045,
16,
22059,
1079,
883,
13,
1216,
23794,
503,
288,
3639,
368,
1330,
18,
1376,
2932,
1937,
4929,
6935,
4791,
7999,
612,
273,
315... |
; | public void testNegativeScalar() { Object value = null; /* fixme Boolean converters not implemented at this point value = LocaleConvertUtils.convert("foo", Boolean.TYPE); ... value = LocaleConvertUtils.convert("foo", Boolean.class); ... */ try { value = LocaleConvertUtils.convert("foo", Byte.TYPE); fail("Should have thrown conversion exception (1)"); } catch (ConversionException e) { ; // Expected result } try { value = LocaleConvertUtils.convert("foo", Byte.class); fail("Should have thrown conversion exception (2)"); } catch (ConversionException e) { ; // Expected result } /* fixme - not implemented try { value = LocaleConvertUtils.convert("org.apache.commons.beanutils.Undefined", Class.class); fail("Should have thrown conversion exception"); } catch (ConversionException e) { ; // Expected result } */ try { value = LocaleConvertUtils.convert("foo", Double.TYPE); fail("Should have thrown conversion exception (3)"); } catch (ConversionException e) { ; // Expected result } try { value = LocaleConvertUtils.convert("foo", Double.class); fail("Should have thrown conversion exception (4)"); } catch (ConversionException e) { ; // Expected result } try { value = LocaleConvertUtils.convert("foo", Float.TYPE); fail("Should have thrown conversion exception (5)"); } catch (ConversionException e) { ; // Expected result } try { value = LocaleConvertUtils.convert("foo", Float.class); fail("Should have thrown conversion exception (6)"); } catch (ConversionException e) { ; // Expected result } try { value = LocaleConvertUtils.convert("foo", Integer.TYPE); fail("Should have thrown conversion exception (7)"); } catch (ConversionException e) { ; // Expected result } try { value = LocaleConvertUtils.convert("foo", Integer.class); fail("Should have thrown conversion exception (8)"); } catch (ConversionException e) { ; // Expected result } try { value = LocaleConvertUtils.convert("foo", Byte.TYPE); fail("Should have thrown conversion exception (9)"); } catch (ConversionException e) { ; // Expected result } try { value = LocaleConvertUtils.convert("foo", Long.class); fail("Should have thrown conversion exception (10)"); } catch (ConversionException e) { ; // Expected result } try { value = LocaleConvertUtils.convert("foo", Short.TYPE); fail("Should have thrown conversion exception (11)"); } catch (ConversionException e) { ; // Expected result } try { value = LocaleConvertUtils.convert("foo", Short.class); fail("Should have thrown conversion exception (12)"); } catch (ConversionException e) { ; // Expected result } } | 54521 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54521/815a48d2428d1c7bfed1d81f2df07fb9e042c1d8/LocaleConvertUtilsTestCase.java/clean/src/test/org/apache/commons/beanutils/locale/LocaleConvertUtilsTestCase.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
14959,
13639,
1435,
288,
3639,
1033,
460,
273,
446,
3639,
1748,
225,
2917,
3501,
3411,
19414,
486,
8249,
622,
333,
1634,
3639,
460,
273,
6458,
2723,
1989,
18,
6283,
2932,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
14959,
13639,
1435,
288,
3639,
1033,
460,
273,
446,
3639,
1748,
225,
2917,
3501,
3411,
19414,
486,
8249,
622,
333,
1634,
3639,
460,
273,
6458,
2723,
1989,
18,
6283,
2932,
... | |
if(result.length() > 0) { | if (result.length() > 0) { | synchronized void returnPressed() { Document doc = getDocument(); int len = doc.getLength(); Segment segment = new Segment(); try { doc.getText(outputMark, len - outputMark, segment); } catch(javax.swing.text.BadLocationException ignored) { ignored.printStackTrace(); } String text = segment.toString(); if(db.stringIsCompilableUnit(text)) { if(text.trim().length() > 0) { history.addElement(text); historyIndex = history.size(); } append("\n"); String result = db.eval(text); if(result.length() > 0) { append(result); append("\n"); } append("% "); outputMark = doc.getLength(); } else { append("\n"); } } | 19000 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/19000/bebd557da53b74c60ab8525aa96904d4cee6224c/Main.java/buggy/toolsrc/org/mozilla/javascript/tools/debugger/Main.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3852,
918,
327,
24624,
1435,
288,
3639,
4319,
997,
273,
9956,
5621,
3639,
509,
562,
273,
997,
18,
588,
1782,
5621,
3639,
10807,
3267,
273,
394,
10807,
5621,
3639,
775,
288,
5411,
997,
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,
3852,
918,
327,
24624,
1435,
288,
3639,
4319,
997,
273,
9956,
5621,
3639,
509,
562,
273,
997,
18,
588,
1782,
5621,
3639,
10807,
3267,
273,
394,
10807,
5621,
3639,
775,
288,
5411,
997,
18,... |
nb.cacheTimeout = System.currentTimeMillis() + _namingContextCacheTimeout; | nb.cacheTimeout = System.currentTimeMillis() + namingContextCacheTimeout; | protected NameBinding resolve(String name) throws NamingException { Object value = org.apache.geronimo.interop.naming.NameService.getInitialContext().lookupReturnNullIfNotFound(name); if (value != null) { NameBinding nb = new NameBinding(); nb.object = value; nb.cacheTimeout = System.currentTimeMillis() + _namingContextCacheTimeout; return nb; } try { org.apache.geronimo.interop.CosNaming.NameComponent[] resolveName = {new org.apache.geronimo.interop.CosNaming.NameComponent(name, "")}; org.omg.CORBA.Object object = _serverNamingContext.resolve(resolveName); NameBinding nb = new NameBinding(); nb.object = object; nb.cacheTimeout = System.currentTimeMillis() + _namingContextCacheTimeout; return nb; } catch (org.apache.geronimo.interop.CosNaming.NamingContextPackage.NotFound notFound) { throw new NameNotFoundException(name); } catch (Exception ex) { throw new javax.naming.NamingException(ExceptionUtil.getStackTrace(ex)); } } | 12474 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12474/5c788225030ea2bb15cb5f3f9696c52b755b6d54/ClientNamingContext.java/clean/modules/interop/src/java/org/apache/geronimo/interop/rmi/iiop/client/ClientNamingContext.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
1770,
5250,
2245,
12,
780,
508,
13,
1216,
26890,
288,
3639,
1033,
460,
273,
2358,
18,
19211,
18,
693,
265,
381,
83,
18,
30376,
18,
82,
7772,
18,
461,
1179,
18,
588,
4435,
1042,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1770,
5250,
2245,
12,
780,
508,
13,
1216,
26890,
288,
3639,
1033,
460,
273,
2358,
18,
19211,
18,
693,
265,
381,
83,
18,
30376,
18,
82,
7772,
18,
461,
1179,
18,
588,
4435,
1042,
... |
setTabindex(null); | private void evaluateExpressions() throws JspException { try { setAlt((String) evalAttr("alt", getAlt(), String.class)); } catch (NullAttributeException ex) { setAlt(null); } try { setAltKey((String) evalAttr("altKey", getAltKey(), String.class)); } catch (NullAttributeException ex) { setAltKey(null); } try { setDisabled(((Boolean) evalAttr("disabled", getDisabledExpr(), Boolean.class)). booleanValue()); } catch (NullAttributeException ex) { setDisabled(false); } try { setIndexed(((Boolean) evalAttr("indexed", getIndexedExpr(), Boolean.class)). booleanValue()); } catch (NullAttributeException ex) { setIndexed(false); } try { setMultiple((String) evalAttr("multiple", getMultiple(), String.class)); } catch (NullAttributeException ex) { setMultiple(null); } try { setName((String) evalAttr("name", getName(), String.class)); } catch (NullAttributeException ex) { setName(null); } try { setOnblur((String) evalAttr("onblur", getOnblur(), String.class)); } catch (NullAttributeException ex) { setOnblur(null); } try { setOnchange((String) evalAttr("onchange", getOnchange(), String.class)); } catch (NullAttributeException ex) { setOnchange(null); } try { setOnclick((String) evalAttr("onclick", getOnclick(), String.class)); } catch (NullAttributeException ex) { setOnclick(null); } try { setOndblclick((String) evalAttr("ondblclick", getOndblclick(), String.class)); } catch (NullAttributeException ex) { setOndblclick(null); } try { setOnfocus((String) evalAttr("onfocus", getOnfocus(), String.class)); } catch (NullAttributeException ex) { setOnfocus(null); } try { setOnkeydown((String) evalAttr("onkeydown", getOnkeydown(), String.class)); } catch (NullAttributeException ex) { setOnkeydown(null); } try { setOnkeypress((String) evalAttr("onkeypress", getOnkeypress(), String.class)); } catch (NullAttributeException ex) { setOnkeypress(null); } try { setOnkeyup((String) evalAttr("onkeyup", getOnkeyup(), String.class)); } catch (NullAttributeException ex) { setOnkeyup(null); } try { setOnmousedown((String) evalAttr("onmousedown", getOnmousedown(), String.class)); } catch (NullAttributeException ex) { setOnmousedown(null); } try { setOnmousemove((String) evalAttr("onmousemove", getOnmousemove(), String.class)); } catch (NullAttributeException ex) { setOnmousemove(null); } try { setOnmouseout((String) evalAttr("onmouseout", getOnmouseout(), String.class)); } catch (NullAttributeException ex) { setOnmouseout(null); } try { setOnmouseover((String) evalAttr("onmouseover", getOnmouseover(), String.class)); } catch (NullAttributeException ex) { setOnmouseover(null); } try { setOnmouseup((String) evalAttr("onmouseup", getOnmouseup(), String.class)); } catch (NullAttributeException ex) { setOnmouseup(null); } try { setProperty((String) evalAttr("property", getProperty(), String.class)); } catch (NullAttributeException ex) { setProperty(null); } try { setSize((String) evalAttr("size", getSize(), String.class)); } catch (NullAttributeException ex) { setSize(null); } try { setStyle((String) evalAttr("style", getStyle(), String.class)); } catch (NullAttributeException ex) { setStyle(null); } try { setStyleClass((String) evalAttr("styleClass", getStyleClass(), String.class)); } catch (NullAttributeException ex) { setStyleClass(null); } try { setStyleId((String) evalAttr("styleId", getStyleId(), String.class)); } catch (NullAttributeException ex) { setStyleId(null); } try { setTabindex((String) evalAttr("tabindex", getTabindex(), String.class)); } catch (NullAttributeException ex) { setTabindex(null); } try { setTitle((String) evalAttr("title", getTitle(), String.class)); } catch (NullAttributeException ex) { setTitle(null); } try { setTitleKey((String) evalAttr("titleKey", getTitleKey(), String.class)); } catch (NullAttributeException ex) { setTitleKey(null); } try { setValue((String) evalAttr("value", getValue(), String.class)); } catch (NullAttributeException ex) { setValue(null); } } | 8610 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8610/2dbb705eab3659c5c2ceb6398f2eec56e1f6994d/ELSelectTag.java/clean/struts-el/src/share/org/apache/strutsel/taglib/html/ELSelectTag.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
5956,
8927,
1435,
1216,
27485,
288,
3639,
775,
288,
5411,
444,
10655,
12443,
780,
13,
5302,
3843,
2932,
2390,
3113,
336,
10655,
9334,
514,
18,
1106,
10019,
3639,
289,
1044,
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,
377,
3238,
918,
5956,
8927,
1435,
1216,
27485,
288,
3639,
775,
288,
5411,
444,
10655,
12443,
780,
13,
5302,
3843,
2932,
2390,
3113,
336,
10655,
9334,
514,
18,
1106,
10019,
3639,
289,
1044,
261,
... | |
return layout.getFirstSiblingNode(nodeId); } | return layout.getFirstSiblingNode(nodeId); } | private ALNode getFirstSiblingNode ( String nodeId ) { return layout.getFirstSiblingNode(nodeId); } | 24959 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/24959/a70ada928fe06bf9bc2b55f2f32208ea99e82cb6/AggregatedLayoutManager.java/clean/source/org/jasig/portal/layout/alm/AggregatedLayoutManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
7981,
907,
7521,
10291,
907,
261,
514,
11507,
262,
288,
377,
327,
3511,
18,
588,
3759,
10291,
907,
12,
2159,
548,
1769,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
7981,
907,
7521,
10291,
907,
261,
514,
11507,
262,
288,
377,
327,
3511,
18,
588,
3759,
10291,
907,
12,
2159,
548,
1769,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
SIROperator oper = NodeEnumerator.getOperator(t); Vector<NetStream> out = RegisterStreams.getNodeOutStreams(oper); for (int i = 0; i < out.size(); i++) { NetStream stream = out.elementAt(i); | SIROperator oper = NodeEnumerator.getOperator(t); for (NetStream stream : RegisterStreams.getNodeOutStreams(oper)) { if (stream != null) { | public static void generateFusionHeader(SIRStream top_stream, boolean inc_mult) { //WorkEstimate work_est = WorkEstimate.getWorkEstimate(top_stream); int threadCount = NodeEnumerator.getNumberOfNodes(); CodegenPrintWriter p = null; try { p = new CodegenPrintWriter(new FileWriter("fusion.h")); } catch (IOException e) { e.printStackTrace(); System.exit(1); } p.print("#ifndef __FUSION_H\n"); p.print("#define __FUSION_H\n"); p.newline(); p.print("#define max(A,B) (((A)>(B))?(A):(B))\n"); p.print("#define pow2ceil(A) ((A<=256)?(256):(((A<=1024)?(1024):(((A<=4096)?(4096):(((A<=16384)?(16384):(((A<=65536)?(65536):(((A<=131072)?(131072):(((A<=262144)?(262144):(((A<=524288)?(524288):(((A<=1048576)?(1048576):(((A<=2097152)?(2097152):(((A<=4194304)?(4194304):(((A<=8388608)?(8388608):(((A<=16777216)?(16777216):(((A<=33554432)?(33554432):(((A<=67108864)?(67108864):(((A<=134217728)?(134217728):(((A<=268435456)?(268435456):(((A<=536870912)?(536870912):(1073741824))))))))))))))))))))))))))))))))))))"); p.newLine(); //p.print("#define __ITERS 10000\n"); //int mult = bestMult(16000,65000,work_est); // estimating best multiplicity mult = bestMult(8500,65000); // estimating best multiplicity if (KjcOptions.nomult || !inc_mult) mult = 1; if (mult != 1) { p.print("#define __MULT " + mult + "\n"); p.newLine(); } if (KjcOptions.standalone) { //p.print("#define __CLUSTER_STANDALONE\n"); // threadcount is the number of operators after fusion/cacheopts for (int t = 0; t < threadCount; t++) { SIROperator oper = NodeEnumerator.getOperator(t); Vector<NetStream> out = RegisterStreams.getNodeOutStreams(oper); for (int i = 0; i < out.size(); i++) { NetStream stream = out.elementAt(i); int src = stream.getSource(); int dst = stream.getDest(); if (FixedBufferTape.isFixedBuffer(src,dst)) { p.print("#define __FUSED_"+src+"_"+dst+"\n"); } int extraPeeks = FixedBufferTape.getRemaining(src,dst); if (extraPeeks > 0) { p.print("//destination peeks: "+(extraPeeks)+" extra items\n"); p.print("#define __PEEK_BUF_SIZE_" + src + "_" + dst + " " + extraPeeks + "\n"); } //if (KjcOptions.peekratio == 1024 || no_peek) { if (! FixedBufferTape.needsModularBuffer(src,dst)) { p.print("#define __NOMOD_"+src+"_"+dst+"\n"); } int buffersize = FixedBufferTape.bufferSize(src, dst, p, true); p.print("#define __BUF_SIZE_MASK_" + src + "_" + dst + " (pow2ceil(" /*max(" + FixedBufferTape.getInitItems() + "," + FixedBufferTape.getSteadyItems()*/ + buffersize + (mult == 1? "" : "*__MULT") /*+ ")"*/ + "+" + extraPeeks + ")-1)\n"); p.print("\n"); } } } p.print("#endif\n"); try { p.close(); } catch (Exception e) { System.err.println("Unable to write fusion.h"); } } | 5955 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5955/8307f2aefcfd62db1757fb15c92fa1cae3a6323b/FusionCode.java/buggy/streams/src/at/dms/kjc/cluster/FusionCode.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
2103,
42,
7063,
1864,
12,
2320,
54,
1228,
1760,
67,
3256,
16,
1250,
7290,
67,
5421,
13,
288,
3639,
368,
2421,
13638,
1440,
67,
395,
273,
4147,
13638,
18,
588,
2421,
1363... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
2103,
42,
7063,
1864,
12,
2320,
54,
1228,
1760,
67,
3256,
16,
1250,
7290,
67,
5421,
13,
288,
3639,
368,
2421,
13638,
1440,
67,
395,
273,
4147,
13638,
18,
588,
2421,
1363... |
final DetailAST modifiersAST = aAST.findFirstToken(TokenTypes.MODIFIERS); | final DetailAST modifiersAST = aAST.findFirstToken(TokenTypes.MODIFIERS); | protected final boolean mustCheckName(DetailAST aAST) { final DetailAST modifiersAST = aAST.findFirstToken(TokenTypes.MODIFIERS); final boolean isFinal = (modifiersAST != null) && modifiersAST.branchContains(TokenTypes.FINAL); return (!isFinal && ScopeUtils.inCodeBlock(aAST)); } | 50482 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50482/6806415e506a5eafc6c5e76f00fb1677e514bb7c/LocalVariableNameCheck.java/buggy/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/LocalVariableNameCheck.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
727,
1250,
1297,
1564,
461,
12,
6109,
9053,
279,
9053,
13,
565,
288,
3639,
727,
27931,
9053,
10429,
9053,
5411,
273,
279,
9053,
18,
4720,
3759,
1345,
12,
1345,
2016,
18,
6720,
10591... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
727,
1250,
1297,
1564,
461,
12,
6109,
9053,
279,
9053,
13,
565,
288,
3639,
727,
27931,
9053,
10429,
9053,
5411,
273,
279,
9053,
18,
4720,
3759,
1345,
12,
1345,
2016,
18,
6720,
10591... |
field, new AnnotationInfo(ANNOTATION_EXPRESSION, expressionProxy) | field, new AnnotationInfo( ANNOTATION_EXPRESSION, expressionProxy ) | private static void handleFieldAnnotations(final AnnotationManager manager, final AttributeEnhancer enhancer, final JavaField field) { Annotation[] expressionAnnotations = manager.getAnnotations(ANNOTATION_EXPRESSION, field); for (int i = 0; i < expressionAnnotations.length; i++) { Annotation expressionAnnotation = expressionAnnotations[i]; if (expressionAnnotation != null) { ExpressionAnnotationProxy expressionProxy = (ExpressionAnnotationProxy) expressionAnnotation; enhancer.insertFieldAttribute( field, new AnnotationInfo(ANNOTATION_EXPRESSION, expressionProxy) ); logInfo( " pointcut [" + field.getName() + " :: " + expressionProxy.expression() + ']' ); } } Annotation[] implementsAnnotations = manager.getAnnotations(ANNOTATION_IMPLEMENTS, field); for (int i = 0; i < implementsAnnotations.length; i++) { Annotation implementsAnnotation = implementsAnnotations[i]; if (implementsAnnotation != null) { ImplementsAnnotationProxy implementsProxy = (ImplementsAnnotationProxy) implementsAnnotation; enhancer.insertFieldAttribute( field, new AnnotationInfo(ANNOTATION_IMPLEMENTS, implementsProxy) ); logInfo( " interface introduction [" + field.getName() + " :: " + implementsProxy.expression() + ']' ); } } for (Iterator it = s_customAnnotations.keySet().iterator(); it.hasNext();) { String annotationName = (String) it.next(); Annotation[] customAnnotations = manager.getAnnotations(annotationName, field); for (int i = 0; i < customAnnotations.length; i++) { Annotation customAnnotation = customAnnotations[i]; if (customAnnotation != null) { enhancer.insertFieldAttribute( field, new AnnotationInfo(annotationName, customAnnotation) ); logInfo( " custom field annotation [" + annotationName + " @ " + field.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,
974,
5655,
12,
6385,
6090,
1318,
3301,
16,
4766,
9079,
727,
3601,
664,
25842,
2750,
570,
25842,
2750,
16,
4766,
9079,
727,
5110,
974,
652,
13,
288,
3639,
6090,
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,
377,
3238,
760,
918,
1640,
974,
5655,
12,
6385,
6090,
1318,
3301,
16,
4766,
9079,
727,
3601,
664,
25842,
2750,
570,
25842,
2750,
16,
4766,
9079,
727,
5110,
974,
652,
13,
288,
3639,
6090,
8526,... |
public void mousePressed(MouseEvent e) { ListSelectionModel rowModel = table.getSelectionModel(); ListSelectionModel colModel = table.getColumnModel().getSelectionModel(); int rowLead = rowModel.getLeadSelectionIndex(); int colLead = colModel.getLeadSelectionIndex(); begin = new Point(e.getX(), e.getY()); curr = new Point(e.getX(), e.getY()); //if control is pressed and the cell is already selected, deselect it if (e.isControlDown() && table. isCellSelected(table.rowAtPoint(begin),table.columnAtPoint(begin))) { table.getSelectionModel(). removeSelectionInterval(table.rowAtPoint(begin), table.rowAtPoint(begin)); table.getColumnModel().getSelectionModel(). removeSelectionInterval(table.columnAtPoint(begin), table.columnAtPoint(begin)); } else updateSelection(e.isControlDown()); // If we were editing, but the moved to another cell, stop editing if (rowLead != rowModel.getLeadSelectionIndex() || colLead != colModel.getLeadSelectionIndex()) if (table.isEditing()) table.editingStopped(new ChangeEvent(e)); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTableUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicTableUI.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
7644,
24624,
12,
9186,
1133,
425,
13,
377,
288,
1377,
987,
6233,
1488,
1027,
1488,
273,
1014,
18,
588,
6233,
1488,
5621,
1377,
987,
6233,
1488,
645,
1488,
273,
1014,
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,
918,
7644,
24624,
12,
9186,
1133,
425,
13,
377,
288,
1377,
987,
6233,
1488,
1027,
1488,
273,
1014,
18,
588,
6233,
1488,
5621,
1377,
987,
6233,
1488,
645,
1488,
273,
1014,
18,
588,
... | ||
line = lis.readLine(100, 100); | line = lis.readLine(100, 100, false); | private void parseMultiPartData() throws IOException { String ctype = (String) this.headers.get("content-type"); if (ctype == null) return; String[] ctypeparts = ctype.split(";"); if(ctypeparts[0].equalsIgnoreCase("application/x-www-form-urlencoded")) { // Completely different encoding, but easy to handle if(data.size() > 1024*1024) throw new IOException("Too big"); byte[] buf = BucketTools.toByteArray(data); String s = new String(buf, "us-ascii"); parseRequestParameters(s, true); } if (!ctypeparts[0].trim().equalsIgnoreCase("multipart/form-data") || ctypeparts.length < 2) { return; } String boundary = null; for (int i = 0; i < ctypeparts.length; i++) { String[] subparts = ctypeparts[i].split("="); if (subparts.length == 2 && subparts[0].trim().equalsIgnoreCase("boundary")) { boundary = subparts[1]; } } if (boundary == null || boundary.length() == 0) return; if (boundary.charAt(0) == '"') boundary = boundary.substring(1); if (boundary.charAt(boundary.length() - 1) == '"') boundary = boundary.substring(0, boundary.length() - 1); boundary = "--"+boundary; InputStream is = this.data.getInputStream(); LineReadingInputStream lis = new LineReadingInputStream(is); String line; line = lis.readLine(100, 100); while (is.available() > 0 && !line.equals(boundary)) { line = lis.readLine(100, 100); } boundary = "\r\n"+boundary; Bucket filedata = null; String name = null; while(is.available() > 0) { name = null; // chomp headers while( (line = lis.readLine(100, 100)) != null) { if (line.length() == 0) break; String[] lineparts = line.split(":"); if (lineparts == null) continue; String hdrname = lineparts[0].trim(); if (lineparts.length < 2) continue; String[] valueparts = lineparts[1].split(";"); for (int i = 0; i < valueparts.length; i++) { String[] subparts = valueparts[i].split("="); if (subparts.length != 2) { continue; } if (hdrname.equalsIgnoreCase("Content-Disposition")) { if (subparts[0].trim().equalsIgnoreCase("name")) { name = subparts[1].trim(); if (name.charAt(0) == '"') name = name.substring(1); if (name.charAt(name.length() - 1) == '"') name = name.substring(0, name.length() - 1); } } } } if (name == null) continue; // we should be at the data now. Start reading it in, checking for the // boundary string // we can only give an upper bound for the size of the bucket filedata = this.bucketfactory.makeBucket(is.available()); OutputStream bucketos = filedata.getOutputStream(); // buffer characters that match the boundary so far byte[] buf = new byte[boundary.length()]; byte[] bbound = boundary.getBytes("UTF-8"); int offset = 0; while (is.available() > 0 && !boundary.equals(new String(buf))) { byte b = (byte)is.read(); if (b == bbound[offset]) { buf[offset] = b; offset++; } else if (b != bbound[offset] && offset > 0) { // empty the buffer out bucketos.write(buf, 0, offset); bucketos.write(b); offset = 0; } else { bucketos.write(b); } } bucketos.close(); this.parts.put(name, filedata); } } | 50493 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50493/33ee3b69fcea23317a2adea57d21b7ba64393d4c/HTTPRequest.java/clean/src/freenet/clients/http/HTTPRequest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1109,
5002,
1988,
751,
1435,
1216,
1860,
288,
202,
202,
780,
11920,
273,
261,
780,
13,
333,
18,
2485,
18,
588,
2932,
1745,
17,
723,
8863,
202,
202,
430,
261,
12387,
422,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1109,
5002,
1988,
751,
1435,
1216,
1860,
288,
202,
202,
780,
11920,
273,
261,
780,
13,
333,
18,
2485,
18,
588,
2932,
1745,
17,
723,
8863,
202,
202,
430,
261,
12387,
422,... |
Location loa = (Location) lre.getStart( ); | Location loa = lre.getStart( ); | private void drawButton( IPrimitiveRenderer ipr ) throws ChartException { double offset = 0.5 * iSize; if ( bRendering3D ) { final Line3DRenderEvent lre = new Line3DRenderEvent( oSource ); lre.setStart3D( lo3d ); lre.setEnd3D( lo3d ); lre.setLineAttributes( la ); engine3d.processEvent( lre, boPlot.getLeft( ), boPlot.getTop( ) ); Location loa = (Location) lre.getStart( ); final ArcRenderEvent areL = new ArcRenderEvent( oSource ); areL.setStartAngle( 90.0 ); areL.setEndAngle( 180.0 ); areL.setBounds( BoundsImpl.create( loa.getX( ) - iSize, loa.getY( ) - offset, iSize, iSize ) ); final LineRenderEvent lreL = new LineRenderEvent( oSource ); lreL.setStart( LocationImpl.create( loa.getX( ) - offset, loa.getY( ) + offset ) ); lreL.setEnd( LocationImpl.create( loa.getX( ) + offset, loa.getY( ) + offset ) ); final ArcRenderEvent areR = new ArcRenderEvent( oSource ); areR.setStartAngle( 270.0 ); areR.setEndAngle( 180.0 ); areR.setBounds( BoundsImpl.create( loa.getX( ), loa.getY( ) - offset, iSize, iSize ) ); final LineRenderEvent lreU = new LineRenderEvent( oSource ); lreU.setStart( LocationImpl.create( loa.getX( ) + offset, loa.getY( ) - offset ) ); lreU.setEnd( LocationImpl.create( loa.getX( ) - offset, loa.getY( ) - offset ) ); final AreaRenderEvent area = new AreaRenderEvent( oSource ); area.add( areL ); area.add( lreL ); area.add( areR ); area.add( lreU ); area.setBackground( paletteEntry ); area.setOutline( la ); preCopy = area.copy( ); if ( bDeferred ) { dc.addMarker( area, PrimitiveRenderEvent.FILL | PrimitiveRenderEvent.DRAW ); } else { ipr.fillArea( area ); ipr.drawArea( area ); } } else { final ArcRenderEvent areL = new ArcRenderEvent( oSource ); areL.setStartAngle( 90.0 ); areL.setEndAngle( 180.0 ); areL.setStyle( ArcRenderEvent.OPEN ); areL.setBounds( BoundsImpl.create( lo.getX( ) - iSize, lo.getY( ) - offset, iSize, iSize ) ); final LineRenderEvent lreL = new LineRenderEvent( oSource ); lreL.setStart( LocationImpl.create( lo.getX( ) - offset, lo.getY( ) + offset ) ); lreL.setEnd( LocationImpl.create( lo.getX( ) + offset, lo.getY( ) + offset ) ); final ArcRenderEvent areR = new ArcRenderEvent( oSource ); areR.setStartAngle( 270.0 ); areR.setEndAngle( 180.0 ); areR.setStyle( ArcRenderEvent.OPEN ); areR.setBounds( BoundsImpl.create( lo.getX( ) - 1, lo.getY( ) - offset, iSize, iSize ) ); final LineRenderEvent lreU = new LineRenderEvent( oSource ); lreU.setStart( LocationImpl.create( lo.getX( ) + offset, lo.getY( ) - offset ) ); lreU.setEnd( LocationImpl.create( lo.getX( ) - offset, lo.getY( ) - offset ) ); final AreaRenderEvent area = new AreaRenderEvent( oSource ); area.add( areL ); area.add( lreL ); area.add( areR ); area.add( lreU ); area.setBackground( paletteEntry ); area.setOutline( la ); preCopy = area.copy( ); if ( bDeferred ) { dc.addMarker( area, PrimitiveRenderEvent.FILL | PrimitiveRenderEvent.DRAW ); } else { ipr.fillArea( area ); ipr.drawArea( area ); } } } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/ad38cf76f1d641ada210d2a5b0551677d4e55a71/MarkerRenderer.java/buggy/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/render/MarkerRenderer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
3724,
3616,
12,
467,
9840,
6747,
277,
683,
262,
1216,
14804,
503,
202,
95,
202,
202,
9056,
1384,
273,
374,
18,
25,
380,
277,
1225,
31,
202,
202,
430,
261,
324,
14261,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3724,
3616,
12,
467,
9840,
6747,
277,
683,
262,
1216,
14804,
503,
202,
95,
202,
202,
9056,
1384,
273,
374,
18,
25,
380,
277,
1225,
31,
202,
202,
430,
261,
324,
14261,
... |
tableViewerImpl.setCellModifier(modifier); } | tableEditorImpl.setCellModifier(modifier); } | public void setCellModifier(ICellModifier modifier) { tableViewerImpl.setCellModifier(modifier); } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/98f48f47b2fd4c2b264a8e2e689bcbe9c594c5d2/TableTreeViewer.java/buggy/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/TableTreeViewer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
444,
4020,
9829,
12,
2871,
1165,
9829,
9606,
13,
288,
3639,
1014,
18415,
2828,
18,
542,
4020,
9829,
12,
20597,
1769,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
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,
918,
444,
4020,
9829,
12,
2871,
1165,
9829,
9606,
13,
288,
3639,
1014,
18415,
2828,
18,
542,
4020,
9829,
12,
20597,
1769,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
return new ClassNameMethodMetaDataTuple(jp.getCalleeClassName(), createMetaData(jp)); | return new ClassNameMethodMetaDataTuple(createClassMetaData(jp), createMethodMetaData(jp)); | private ClassNameMethodMetaDataTuple getMetaData(final JoinPoint joinPoint) { CallerSideJoinPoint jp = ((CallerSideJoinPoint)joinPoint); return new ClassNameMethodMetaDataTuple(jp.getCalleeClassName(), createMetaData(jp)); } | 7954 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7954/7b7dc1bbb1dd38d34faefd225711fb091f24dc9a/CFlowPreAdvice.java/buggy/aspectwerkz/src/main/org/codehaus/aspectwerkz/xmldef/advice/CFlowPreAdvice.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
19811,
1305,
6998,
9038,
23028,
12,
6385,
4214,
2148,
1233,
2148,
13,
288,
3639,
20646,
8895,
4572,
2148,
18182,
273,
14015,
11095,
8895,
4572,
2148,
13,
5701,
2148,
1769,
3639,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
19811,
1305,
6998,
9038,
23028,
12,
6385,
4214,
2148,
1233,
2148,
13,
288,
3639,
20646,
8895,
4572,
2148,
18182,
273,
14015,
11095,
8895,
4572,
2148,
13,
5701,
2148,
1769,
3639,
327,
... |
return (Bucket[]) bucketsToFree.toArray(new Bucket[bucketsToFree.size()]); | Bucket[] toFree = (Bucket[]) bucketsToFree.toArray(new Bucket[bucketsToFree.size()]); bucketsToFree.clear(); return toFree; | public Bucket[] grabBucketsToFree() { synchronized(this) { return (Bucket[]) bucketsToFree.toArray(new Bucket[bucketsToFree.size()]); } } | 56348 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56348/87283290aa494832b974adec87a0fb667dee1899/PersistentTempBucketFactory.java/clean/src/freenet/support/io/PersistentTempBucketFactory.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
7408,
8526,
11086,
4103,
11634,
9194,
1435,
288,
202,
202,
22043,
12,
2211,
13,
288,
1082,
202,
2463,
261,
4103,
63,
5717,
9169,
774,
9194,
18,
31447,
12,
2704,
7408,
63,
7242,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
7408,
8526,
11086,
4103,
11634,
9194,
1435,
288,
202,
202,
22043,
12,
2211,
13,
288,
1082,
202,
2463,
261,
4103,
63,
5717,
9169,
774,
9194,
18,
31447,
12,
2704,
7408,
63,
7242,
... |
if (e.getPresentation().isEnabled()) { final InspectionResultsView invoker = getInvoker(e); if (invoker != null) { ProblemDescriptor[] descriptors = invoker.getSelectedDescriptors(); boolean hasFixes = false; for (ProblemDescriptor descriptor : descriptors) { if (descriptor.getFix() != null && descriptor.getPsiElement() != null) { hasFixes = true; break; } } if (hasFixes) { e.getPresentation().setVisible(true); e.getPresentation().setEnabled(true); e.getPresentation().setText(getName(descriptors)); return; } } } e.getPresentation().setVisible(false); e.getPresentation().setEnabled(false); | getTemplatePresentation().setText(myText); e.getPresentation().setText(myText); | public void update(AnActionEvent e) { super.update(e); if (e.getPresentation().isEnabled()) { final InspectionResultsView invoker = getInvoker(e); if (invoker != null) { ProblemDescriptor[] descriptors = invoker.getSelectedDescriptors(); boolean hasFixes = false; for (ProblemDescriptor descriptor : descriptors) { if (descriptor.getFix() != null && descriptor.getPsiElement() != null) { hasFixes = true; break; } } if (hasFixes) { e.getPresentation().setVisible(true); e.getPresentation().setEnabled(true); e.getPresentation().setText(getName(descriptors)); return; } } } e.getPresentation().setVisible(false); e.getPresentation().setEnabled(false); } | 56627 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56627/7d18937b6c277d5ef28a5ed5045f90e8b80e937a/LocalQuickFixWrapper.java/clean/source/com/intellij/codeInspection/ex/LocalQuickFixWrapper.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1089,
12,
979,
1803,
1133,
425,
13,
288,
565,
2240,
18,
2725,
12,
73,
1769,
565,
309,
261,
73,
18,
588,
6351,
367,
7675,
291,
1526,
10756,
288,
1377,
727,
22085,
7017,
3447,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1089,
12,
979,
1803,
1133,
425,
13,
288,
565,
2240,
18,
2725,
12,
73,
1769,
565,
309,
261,
73,
18,
588,
6351,
367,
7675,
291,
1526,
10756,
288,
1377,
727,
22085,
7017,
3447,
... |
ScriptRuntime.getMessage("msg.null.to.object", null), | ScriptRuntime.getMessage0("msg.null.to.object"), | public static Object setProp(Object obj, String id, Object value, Scriptable scope) { Scriptable start; if (obj instanceof Scriptable) { start = (Scriptable) obj; } else { start = toObject(scope, obj); } if (start == null) { throw NativeGlobal.constructError( Context.getContext(), "TypeError", ScriptRuntime.getMessage("msg.null.to.object", null), scope); } Scriptable m = start; do { if (m.has(id, start)) { m.put(id, start, value); return value; } m = m.getPrototype(); } while (m != null); start.put(id, start, value); return value; } | 51996 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51996/e737c6d867e82d4ba7fd00e7e388c9c8da824ff0/ScriptRuntime.java/buggy/js/rhino/src/org/mozilla/javascript/ScriptRuntime.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1033,
444,
4658,
12,
921,
1081,
16,
514,
612,
16,
1033,
460,
16,
4766,
22780,
2146,
13,
565,
288,
3639,
22780,
787,
31,
3639,
309,
261,
2603,
1276,
22780,
13,
288,
5411,
787,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1033,
444,
4658,
12,
921,
1081,
16,
514,
612,
16,
1033,
460,
16,
4766,
22780,
2146,
13,
565,
288,
3639,
22780,
787,
31,
3639,
309,
261,
2603,
1276,
22780,
13,
288,
5411,
787,... |
public void addPropertyChangeListener(PropertyChangeListener listener) {} | public void addPropertyChangeListener(PropertyChangeListener listener) { super.addPropertyChangeListener(listener); } | public void addPropertyChangeListener(PropertyChangeListener listener) {} | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JComponent.java/buggy/core/src/classpath/javax/javax/swing/JComponent.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
14324,
15744,
12,
1396,
15744,
2991,
13,
2618,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
918,
14324,
15744,
12,
1396,
15744,
2991,
13,
2618,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
assertEquals((float)209.0718 , mfa.getNaturalMass() ,.001); | assertEquals((float)209.0692 , mfa.getNaturalMass() ,.001); | public void testGetNaturalMass() throws Exception { MFAnalyser mfa = new MFAnalyser("C8H10O2Cl2", new Molecule()); assertEquals((float)209.0718 , mfa.getNaturalMass() ,.001); } | 46046 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46046/cfa2097451736a6373d402039e263f0fac013f16/MFAnalyserTest.java/clean/src/org/openscience/cdk/test/tools/MFAnalyserTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
967,
23779,
3766,
18060,
1435,
1216,
1185,
288,
377,
202,
13542,
979,
3450,
550,
312,
507,
273,
394,
490,
42,
979,
3450,
550,
2932,
39,
28,
44,
2163,
51,
22,
2009,
22,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
967,
23779,
3766,
18060,
1435,
1216,
1185,
288,
377,
202,
13542,
979,
3450,
550,
312,
507,
273,
394,
490,
42,
979,
3450,
550,
2932,
39,
28,
44,
2163,
51,
22,
2009,
22,
... |
if(anchor.physicalLine > line && anchor.index == index) | if(anchor == null || anchor.physicalLine < line) break; if(anchor.index == index) | public final void setLineVisible(int line, int index, boolean visible) { long info = lineInfo[line]; long mask = 1L << (index + VISIBLE_SHIFT); boolean oldVisible = ((info & mask) != 0); if(visible) { if(!oldVisible) { int screenLines = getScreenLineCount(line); Anchor anchor = anchors; while(anchor != null) { if(anchor.physicalLine > line && anchor.index == index) { anchor.scrollLine += screenLines; anchor.callChanged = true; } anchor = anchor.next; } } lineInfo[line] = (info | mask); } else { if(oldVisible) { int screenLines = getScreenLineCount(line); Anchor anchor = anchors; while(anchor != null) { if(anchor.physicalLine > line && anchor.index == index) { anchor.scrollLine -= screenLines; anchor.callChanged = true; } anchor = anchor.next; } } lineInfo[line] = (info & ~mask); } } //}}} | 8690 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8690/2cb4fcbeb1e741e4d3687e63c8334832e5ed2343/OffsetManager.java/clean/org/gjt/sp/jedit/buffer/OffsetManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
26482,
6207,
12,
474,
980,
16,
509,
770,
16,
1250,
6021,
13,
202,
95,
202,
202,
5748,
1123,
273,
980,
966,
63,
1369,
15533,
202,
202,
5748,
3066,
273,
404,
48,
229... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
26482,
6207,
12,
474,
980,
16,
509,
770,
16,
1250,
6021,
13,
202,
95,
202,
202,
5748,
1123,
273,
980,
966,
63,
1369,
15533,
202,
202,
5748,
3066,
273,
404,
48,
229... |
public Object clone() { ViewId vid2=vid != null? (ViewId)vid.clone() : null; Vector members2=members != null? (Vector)members.clone() : null; Vector subgroups2=subgroups != null? (Vector)subgroups.clone() : null; return new MergeView(vid2, members2, subgroups2); | public Object clone() { ViewId vid2=vid != null ? (ViewId)vid.clone() : null; Vector members2=members != null ? (Vector)members.clone() : null; Vector subgroups2=subgroups != null ? (Vector)subgroups.clone() : null; return new MergeView(vid2, members2, subgroups2); | public Object clone() { ViewId vid2=vid != null? (ViewId)vid.clone() : null; Vector members2=members != null? (Vector)members.clone() : null; Vector subgroups2=subgroups != null? (Vector)subgroups.clone() : null; return new MergeView(vid2, members2, subgroups2); } | 51463 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51463/4071daaa0d7c1c82cdc06c63ce8b9cfb7b0eff8c/MergeView.java/buggy/src/org/jgroups/MergeView.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
3236,
1435,
565,
288,
202,
1767,
548,
18339,
22,
33,
1246,
480,
446,
35,
261,
1767,
548,
13,
1246,
18,
14056,
1435,
294,
446,
31,
202,
5018,
4833,
22,
33,
7640,
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,
1071,
1033,
3236,
1435,
565,
288,
202,
1767,
548,
18339,
22,
33,
1246,
480,
446,
35,
261,
1767,
548,
13,
1246,
18,
14056,
1435,
294,
446,
31,
202,
5018,
4833,
22,
33,
7640,
480,
446,
... |
return ((Map.Entry) oResult).getValue(); | return oResult; | private Object internalPut(Object key, Object value) { HashtableEntry entry; Bucket list; int hashIndex; Object oResult; modCount++; if (size == threshold) rehash(); entry = new HashtableEntry(key, value); hashIndex = hash(key); list = buckets[hashIndex]; if (list == null) { list = new Bucket(); buckets[hashIndex] = list; } oResult = list.add(entry); if (oResult == null) { size++; return null; } else { return ((Map.Entry) oResult).getValue(); } } | 47947 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47947/06d33409f65045a9ed8e15bb4583c8099c6eb3e6/Hashtable.java/clean/java/util/Hashtable.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
1033,
2713,
6426,
12,
921,
498,
16,
1033,
460,
13,
565,
288,
202,
5582,
14544,
1622,
1241,
31,
202,
4103,
666,
31,
202,
474,
1651,
1016,
31,
202,
921,
320,
1253,
31,
202,
1711,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1033,
2713,
6426,
12,
921,
498,
16,
1033,
460,
13,
565,
288,
202,
5582,
14544,
1622,
1241,
31,
202,
4103,
666,
31,
202,
474,
1651,
1016,
31,
202,
921,
320,
1253,
31,
202,
1711,
... |
throws InlinePragma { | throws InlinePragma { | private final boolean markGrey(ObjectReference object, long timeCap) throws InlinePragma { boolean abort = false; if (Assert.VERIFY_ASSERTIONS) Assert._assert(workQueue.pop().isNull()); while (!object.isNull()) { if (Assert.VERIFY_ASSERTIONS) Assert._assert(!RefCountSpace.isGreen(object)); visitCount++; if (visitCount % GREY_VISIT_GRAIN == 0 && !RefCountSpace.RC_SANITY_CHECK && Statistics.cycles() > timeCap) { abort = true; } if (!abort && !RefCountSpace.isGrey(object)) { RefCountSpace.makeGrey(object); Scan.enumeratePointers(object, greyEnum); } object = workQueue.pop(); } return !abort; } | 4011 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4011/30524c62fa391922d51289c03075f714c772951c/TrialDeletion.java/buggy/MMTk/src/org/mmtk/utility/TrialDeletion.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
727,
1250,
2267,
43,
266,
93,
12,
22101,
733,
16,
1525,
813,
4664,
13,
565,
1216,
16355,
2050,
9454,
288,
565,
1250,
6263,
273,
629,
31,
565,
309,
261,
8213,
18,
23756,
67,
8423,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
727,
1250,
2267,
43,
266,
93,
12,
22101,
733,
16,
1525,
813,
4664,
13,
565,
1216,
16355,
2050,
9454,
288,
565,
1250,
6263,
273,
629,
31,
565,
309,
261,
8213,
18,
23756,
67,
8423,
... |
System.out.println( "[" + getLocalName() + "] Sending message..."); | System.out.println( "[" + getLocalName() + "] Sending the message..."); | public void action() { try { // Preparing the first message System.out.println( "[" + getLocalName() + "] Creating the message..."); ACLMessage msg = new ACLMessage(ACLMessage.INFORM); AID receiver = new AID("receiver", false); msg.setSender(getAID()); msg.addReceiver(receiver); msg.setLanguage(codec.getName()); msg.setOntology(ontology.getName()); // The message informs that: // fatherOf(man :name "John" :address "London", [man :name "Bill" :address "Paris"]) Man john = new Man(); Man bill = new Man(); john.setName("John"); bill.setName("Bill"); Address johnAddress = new Address(); johnAddress.setCity("London"); john.setAddress(johnAddress); Address billAddress = new Address(); billAddress.setCity("Paris"); bill.setAddress(billAddress); FatherOf fatherOf = new FatherOf(); fatherOf.setFather(john); List children = new ArrayList(); children.add(bill); fatherOf.setChildren(children); // Fill the content of the message manager.fillContent(msg, fatherOf); // Send the message System.out.println( "[" + getLocalName() + "] Sending message..."); send(msg); // Now ask the proposition back. // Use a query-ref with the following content: // iota ?x fatherOf(?x, [man :name "Bill" :address "Paris"]) msg.setPerformative(ACLMessage.QUERY_REF); // Create an abstract descriptor from scratch AbsConcept absBill = new AbsConcept(PeopleOntology.MAN); absBill.set(PeopleOntology.NAME, "Bill"); // Create an abstract descriptor from a concrete object AbsConcept absBillAddress = (AbsConcept)ontology.fromObject(billAddress); absBill.set(PeopleOntology.ADDRESS, absBillAddress); AbsAggregate absChildren = new AbsAggregate(BasicOntology.SET); absChildren.add(absBill); AbsVariable absX = new AbsVariable("x", PeopleOntology.MAN); AbsPredicate absFatherOf = new AbsPredicate(PeopleOntology.FATHER_OF); absFatherOf.set(PeopleOntology.FATHER, absX); absFatherOf.set(PeopleOntology.CHILDREN, absChildren); AbsIRE absIRE = new AbsIRE(); absIRE.setVariable(absX); absIRE.setKind(ACLOntology.IOTA); absIRE.setProposition(absFatherOf); // Fill the content of the message manager.fillContent(msg, absIRE); // Send the message System.out.println( "[" + getLocalName() + "] Sending message..."); send(msg); } catch(Exception e) { e.printStackTrace(); } finished = true; } | 5505 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5505/666e1abe2086370a9fa8ba566408bd71f7c4a626/Sender.java/buggy/src/examples/content/Sender.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1301,
1435,
288,
202,
565,
775,
288,
202,
202,
759,
2962,
12583,
326,
1122,
883,
202,
202,
3163,
18,
659,
18,
8222,
12,
13626,
397,
25345,
1435,
397,
9850,
21837,
326,
88... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1301,
1435,
288,
202,
565,
775,
288,
202,
202,
759,
2962,
12583,
326,
1122,
883,
202,
202,
3163,
18,
659,
18,
8222,
12,
13626,
397,
25345,
1435,
397,
9850,
21837,
326,
88... |
currentIssue.setPriority("P2"); | currentIssue.setPriority(Priority.P2); | public static List loadIssues() { List issues = new ArrayList(); Issue currentIssue = null; Description description = null; currentIssue = new Issue(); currentIssue.setId(new Integer(1)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("TASK"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("Improve filter performance upon list change"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("The current implementation of filtering uses a N*N*M algorithm to re-filter when the list \nchanges, for M changes on a list of size N.\n\nIt is necessary to improve this runtime by using more appropriate data structures inside \nthe AbstractFilterList."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Created an attachment (id=1)\nscreenshot from profiler\n"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("In creating a test case I found that the filter performance can be really bad in certain situations.\n\nI think this case can be justification for updating the AbstractFilterList to use a SparseList instead of the \ncurrent arraylist hack."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I have changed the AbstractFilterList to use SparseList instead of the hack array data structure. The \nresults are impressive in some cases only and not noticable in other cases. This change will cause \nchange events to be orders of magnitude faster, while get() events will be slightly slower.\n\nHere is the results in elapsed time from two tests I ran, before and after the fix:\nCaseInsensitiveFilterListTest\nbefore: 3.9s\nafter: 2.8s\n\nMultipleListenersTest\nbefore: 162.9s\nafter: 19.2s"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(2)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P2"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("Filter regex fails with special characters"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("The current filter code for CaseInsensitiveFilterList fails to work when the filter text \ncontains regular-expression characters such as dot.\n\nFix this to handle special characters as they should be."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Fixed in CVS. Added a method getMatcher() that constructs a matcher using the source \nstring"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(3)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("EventListIterator problem with remove() method"); description = new Description(); description.setWho("ildella"); description.setWhen(null); description.setText("This code doesn't seem to work properly: \n(variable \"songs\" is a BasicEventList)\n\n public int cleanFromMissingFiles() {\n Iterator it = songs.iterator();\n while (it.hasNext()) {\n MP3Song song = (MP3Song) it.next();\n File f = new File(song.getPath());\n if (!f.exists())\n it.remove(); \n }\n }\n\nif there are 2 items to remove, after removing the first, the iterator return\nfalse at the next call to hasNext()\nif, for example, there are 8 items to remove, the hasNext() return false after\nthe 4th remove() calls. \nAnd so on...\n\nthe rest of the code is right, in fact, with this code:\n\n public int cleanFromMissingFiles() {\n List list = new LinkedList();\n list.addAll(songs);\n Iterator it = list.iterator();\n while (it.hasNext()) {\n MP3Song song = (MP3Song) it.next();\n File f = new File(song.getPath());\n if (!f.exists())\n it.remove();\n }\n songs.clear();\n songs.addAll(list);\n }\n\neverything is all right.\n\nhope this can help.\nbye."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This was a defect in my iterator code.\n\nThe iterator contains two indexes - the index of the last item viewed and the index of the \nnext item to view. When a remove occurred, only the last item viewed index was updated. \n\nThe next item to view index needed to be shifted down by one whenever a remove would \ncause the list's indicies to shift down by one."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(4)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("Error in setting header value in TableComparatorSelector"); description = new Description(); description.setWho("ildella"); description.setWhen(null); description.setText("Maybe there is a problem in TableComparatorSelector.\n\nI set tableHeader.setReorderingAllowed(true) on a table which has its own\nTableComparatorSelector. \nI move a column. After moving, the index of the column is changed, but the\nmodelIndex remains unchanged. \nThis is wel handled in method mouseClicked with trhis code \n\n int viewColumn = columnModel.getColumnIndexAtX(e.getX()); \n int column = table.convertColumnIndexToModel(viewColumn); \n\nthe last method, which rewrite the table header of all the columns, has the\nfollowing code:\n\n // and set the name of the table header to the current comparator\n for(int c = 0; c < table.getColumnCount(); c++) {\n if(c == column) { \n table.getColumnModel().getColumn(column).setHeaderValue(sortedHeader);\n } else {\n String header = listTable.getTableFormat().getFieldName(c);\n table.getColumnModel().getColumn(c).setHeaderValue(header);\n }\n }\n\nthis method doesn't seem to handle difference between column index and model index.\nIn my app, when I move a column and then click on the header for resorting the\ntable, all the header value happen to move from their position. And this seems\nto be caused by that portion of code wich, I guess, has to use the view index\nand not the model index of the column. \n\nIf I am right, that code has to handle difference between index and model index.\nIf I am wrong, there are different way to handle this thing?"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("The problem looks legit. In most of my use of ListTable I use only a single column so \nmultiple columns is not well exercised!\n\nI'll try to reproduce the problem and look into a fix."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I've fixed the bug and done preliminary testing to verify that the fix worked."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(5)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("Speed up SparseLists"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("The SparseListNode's height() method slow. More formally, this method is potentially O(n) \nand it should be optimized to be O(1).\n\nThis is insignificant in small lists but huge in large lists. In my brief profiling I discovered \nthat height() can consume 75% of the access time for large lists."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I have tuned SparseLists to use a better height() method. The height is now stored \nin the node and recalculated whenever it may have changed (as a consequence of \ninsert or remove).\n\nThe performance gains are fantastic."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(6)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("INVALID"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("MutationList return \"parent\" source instead of its own"); description = new Description(); description.setWho("ildella"); description.setWhen(null); description.setText("MutationList getRootList was\n \n public EventList getRootList() {\n return source;\n }\n\nas of revision 1.3 on CVS.\n\nIn revision 1.4, it is:\n\n /**\n * For implementing the EventList interface. This returns the root of the\n * source list, or <code>this</code> if this list has no source.\n */\n /*\n public EventList getRootList() {\n if(source == this) return this;\n return source.getRootList();\n }\n\nand this broke all my code and my coomprehension of Glazed Lists.\n\nIs this correct?"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Forgive me for breaking your code. The newest revision in CVS is correct and the previous \nrevision was a bug.\n\nIn your own code when you need the source list, you are supposed to use 'source', which \nis a protected member of the MutationList class. If you change your calls to 'getRootList()' \nwith 'source', your code should continue to work as it is supposed to.\n\n\nHere's why I made the change:\n\nGlazed Lists needs to be thread-safe. Currently I have made every effort to make it totally \nthread-safe. To accomplish thread safety I need to synchronize threads while they are \nperforming updates to the lists. In my original implementation, each list would be coded \nlike this:\n public synchronized void notifyListUpdated()\n public synchronized void get()\nUnfortunately this strategy can fail for thread safety in deadlock because the Swing thread \ncan be doing a get() while the query thread is doing an update. The get() call propagates \nfrom the table to the filter to the sorted list and eventually to the source list, holding all \nthe locks as it works. The notifyListUpdated does the opposite, starting at the source list \nand propagating through the sorted list, the filter and finally the table, attempting to \nacquire locks as it goes also. A deadlock is the inevitable result because the Swing thread \nis waiting for the query thread to release its lock on the source list while the query thread \nwaits on the Swing thread to release its lock on the table.\n\nSo my naive solution failed and I realized that I needed to synchronize all lists with the \nsame lock. The obvious lock to choose is the root list - the absolute source list in the tree. \nThis is the list that all of the other lists depend on.\n\nAs you walk through the code, you will see that I protect against thread problems with\n synchronized(getRootList()) {\n }\n\nBut I still access the parent list with 'source'. For example, the following is cut-and-pasted \nfrom SortedList:\n\n public void setComparator(Comparator comparator) {\n synchronized(getRootList()) {\n // create the sorted list with a simple comparator\n sorted = new IndexedTree(new IndexedTreeNodeComparator(comparator));\n // create a list which knows the offsets of the indexes\n unsorted = new IndexedTree();\n\n // we're done if there's no elements in the source list\n if(source.size() == 0) return;\n\n // add all elements in the source list, in order\n for(int i = 0; i < source.size(); i++) {\n IndexedTreeNode unsortedNode = unsorted.addByNode(i, this);\n insertByUnsortedNode(unsortedNode);\n }\n\n // notification about the big change\n updates.beginAtomicChange();\n updates.appendChange(0, size() - 1, ListChangeBlock.DELETE);\n updates.appendChange(0, size() - 1, ListChangeBlock.INSERT);\n updates.commitAtomicChange();\n }\n }\n\nThe second line is synchronized on getRootList(), but all of the calls to size() are directly \non source.\n\nIn summary\n\nWhenever you are synchronizing, use\n synchronized(getRootList())\nbut for everything else use\n source"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(7)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("ENHANCEMENT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("CaseInsensitiveFilterList non-\"live\" mode"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("If you have a CaseInsensitiveFilterList with many entries and you filter for \"foo\", then the \nlist will be filtered three times! Because the list is \"live\" it filters once after the user types \n\"f\", another time after they have typed \"fo\" and finally a third time after they have \ncompleted \"foo\".\n\nThis is great when filtering is very fast and the list is short but it leads to unnecessary \nperformance lags when the list is large and filtering isn't as fast.\n\nThe CaseInsensitiveFilterList should have a non-\"live\" mode where the list is only filtered \nafter the user presses the Enter key in the search box. There could also be a \"filter\" \nbutton to activate the filter after the filter text has been entered."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I've added some new methods to CaseInsensitiveFilterList:\n\ngetActionListener()\nsetLive(boolean)\n\nThe ActionListener can be used to trigger a refilter on a button press. \nThe list also will always refilter when ENTER is pressed in the filter edit field, whether in live mode or \nnot.\n\nFinally the DocumentListener has been moved to an inner class which is a 'safer' place for it."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(8)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("ListChangeSequence hasNext() fails when there's no next"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("There are two things that happen when a list changes:\n - the ListChangeEvent is populated with the change information\n - the notifyListChanges() method is called on all listeners\n\nSometimes as a consequence of multi-threading, multiple change events are processed in \na single notifyListChanges() methods. When the notifyListChanges() is called on a different \nthread than where the changes were created, that method is required to verify that there \nare changes left to be processed using:\n listChanges.hasNext()\n\nThis is performed by the ListTable because it receives all events on the SwingThread via \nListChangeListenerEventThreadProxy:\n public void notifyListChanges(ListChangeEvent listChanges) {\n ...\n // when all events hae already been processed by clearing the event queue\n if(!listChanges.hasNext()) {\n return;\n ...\n\nUnfortunately the listChanges.hasNext() method is broken, and throws an \nIndexOutOfBoundsException when there are no more changes:\njava.lang.IndexOutOfBoundsException: Index: 43, Size: 43\n at java.util.ArrayList.RangeCheck(ArrayList.java:507)\n at java.util.ArrayList.get(ArrayList.java:324)\n at \ncom.odellengineeringltd.glazedlists.event.ListChangeSequence.getBlockCount(ListChangeSe\nquence.java:181)\n at \ncom.odellengineeringltd.glazedlists.event.ListChangeEvent.hasNext(ListChangeEvent.java:\n124)\n at com.odellengineeringltd.glazedlists.jtable.ListTable.notifyListChanges(ListTable.java:\n158)\n at \ncom.odellengineeringltd.glazedlists.event.ListChangeListenerEventThreadProxy.run(ListCha\nngeListenerEventThreadProxy.java:54)\n at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)\n at java.awt.EventQueue.dispatchEvent(EventQueue.java:454)\n at \njava.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)\n at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:\n151)\n at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)\n at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)\n at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("The ListChangeEvent now checks with the target ListChangeSequence to verify that it has \nnot already reached the last atomic change in the set.\n\nThis should fix the problem as it has in my preliminary tests."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(9)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("fails to report selection event"); description = new Description(); description.setWho("ildella"); description.setWhen(null); description.setText("The problem is in this code:\n\nclass ListTable \n...\n\n public void notifyListChanges(ListChangeEvent listChanges) {\n // for avoiding extra selection events\n ignoreSelectionEvents = true;\n // when all events hae already been processed by clearing the event queue\n if(!listChanges.hasNext()) {\n return;\n // notify all changes simultaneously\n }\n\nit is needed to add this line\n\n ignoreSelectionEvents = false;\n\nbefore that return. Without that line, it could happen that\nignoreSelectionEvents remains false and selection event are no more propagated."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("The bug has been fixed.\n\nThe bug report was very useful in helping me fix this bug quickly!"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(10)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("IndexedTree insert and remove are too slow"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("The height() method on the IndexedTreeNode is not optimized and prevents the \nIndexedTreeNode from functioning efficiently. The method has O(n) runtime while proper \noptimization should yield O(log n) runtime.\n\nThis is because the height() method does not cache the height of the values at the nodes.\n\nFix the height as done for issue #5 with SparseListNode and the IndexedTree will perform \nmuch more efficiently."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I have resolved the speed issue with the IndexedTreeNode.\n\nThis will impact the SortedList and cause it to perform faster sorts!"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(11)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("ENHANCEMENT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("Expose prepareRenderer from JTable into ListTable class"); description = new Description(); description.setWho("philblais"); description.setWhen(null); description.setText("I like having the ability to alternate colors on each of the rows of my tables so \nthat they look more like a ledger. Since ListTable creates the JTable object it \nmakes it impossible to use this approach to render this.\n\nI propose to expose this method into ListTable so that it can be overriden if \nnecessary."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("philblais - Glazed Lists already has a place where you can configure your table and \nprepare your renderers as necessary.\n\nYou will have implemented the interface TableFormat which contains a method \nconfigureTable(). This method is called after the JTable has been created and its purpose is \nto allow you to modify the table's renderers to your liking:\n\n /**\n * Allow the record model to customize the table to its liking\n * This method is called after the table is created so that the\n * record can ensure the table behaves appropriately. This may\n * include setting the editors and renderers for the table.\n */\n public void configureTable(JTable table);\n\nPlease call prepareRenderer() from this configureTable method and I hope you will get \nyour desired results.\n\nIf my understanding of your problem is incorrect please explain why calling \nprepareRenderer() from your configureTable() is insufficient and I will make quick \nprogress at getting it working for you.\n\nGood luck with your project!"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("On 30-Jan-04, at 10:54 AM, Philippe Blais wrote:\n\nHi,\n\nThe way it now it won't work. The JTable's prepareRenderer method is called\ndynamically with the cell's renderer, the row index and the column index.\nIn my project I use the row index to decide what kind of background I want\nfor all the renderers on the row.\n\nI made a quick and dirty mod to ListTable for now since I couldn't simply\nsubclass it, my mod looks as follows in the constructWidgets method:\n\n--\ntable = new JTable(this)\n{\n public Component prepareRenderer(TableCellRenderer renderer, int\nrowIndex,int colIndex)\n {\n Component c = super.prepareRenderer(renderer, \n rowIndex, colIndex);\n if (rowIndex % 2 == 0 && !isCellSelected(rowIndex,\ncolIndex)){\n if (alternateShadingColor!=null) {\n c.setBackground(alternateShadingColor);\n } else {\n c.setBackground(getBackground());\n }\n } else {\n c.setBackground(getBackground());\n }\n \n return c;\n}\n--\n\nOn simple way to allow extending ListTable for this functionality would be\nto delegate the creation of the table to a protected method of ListTable\nthat can be overridden by whoever wants to extend ListTable.\n\nMy suggestion is to change the \"new JTable(this)\" call to\n\"createTable(this)\" where the method would look like:\n\nprotected JTable createTable(TableModel model) {\n return new JTable(model);\n}\n\nThis way I would have the ability to use my own extended JTable.\n\nThanks,\n\nPhil Blais\n"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Phil Blais - \n\nI have written a fix for your problem and I hope that you find it sufficient! \n\nBut first, an explanation as to why I have not fixed your problem the way you have \nsuggested. The problem with allowing the user to extend JTable is that it prevents me \nfrom extending JTable in the future.\n\nMy solution involves a custom renderer called StripedTableCellRenderer which I have \nadded to the com.odellengineeringltd.glazedlists.jtable package. In your TableCell class \nyou will need to set each column's renderer to use this StripedTableCellRenderer:\n\npublic void configureTable(JTable table) {\n Color oddColor = new java.awt.Color(234, 234, 234);\n Color evenColor = table.getBackground();\n StripedTableCellRenderer renderer = new StripedTableCellRenderer(oddColor, \nevenColor);\n for(int i = 0; i < getFieldCount(); i++) {\n table.getColumnModel().getColumn(i).setCellRenderer(renderer);\n }\n}\n\nThe StripedTableCellRenderer uses the default renderer from the table so classes like \nBoolean and Number should render correctly.\n\nIt is also possible to specify a base renderer to use. In this case the StripedRenderer will \nuse that renderer to do the initial drawing and then paint its own stripe onto the row.\n\nLet me know if this solution is still insufficient and I will work with you to resolve any \noutstanding problems."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(12)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("Problem with ListTable.getSelected() ?"); description = new Description(); description.setWho("ildella"); description.setWhen(null); description.setText("Sometimes I receive this exception that seems to be connected to a problem in\ngetSelected() methods in ListTable.\n\njava.lang.IndexOutOfBoundsException: cannot get from tree of size 14 at 47\n at\ncom.odellengineeringltd.glazedlists.util.IndexedTreeNode.getNodeWithIndex(IndexedTreeNode.java:81)\n at\ncom.odellengineeringltd.glazedlists.util.IndexedTree.getNode(IndexedTree.java:55)\n at com.odellengineeringltd.glazedlists.SortedList.get(SortedList.java:228)\n at\ncom.odellengineeringltd.glazedlists.jtable.ListTable.getSelected(ListTable.java:227)\n at\nnet.della.mcube.outliner.OutlinersBuilder$2.filterMatches(OutlinersBuilder.java:77)\n at\nnet.della.mcube.util.CustomFilteredList.filterMatches(CustomFilteredList.java:38)\n at\ncom.odellengineeringltd.glazedlists.AbstractFilterList.notifyListChanges(AbstractFilterList.java:93)\n at\ncom.odellengineeringltd.glazedlists.event.ListChangeSequence.commitAtomicChange(ListChangeSequence.java:154)\n at net.della.mcube.util.QueryList.refresh(QueryList.java:110)\n at net.della.mcube.util.QueryList$RefreshTask.run(QueryList.java:127)\n at java.util.TimerThread.mainLoop(Timer.java:432)\n at java.util.TimerThread.run(Timer.java:382)"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This problem arises when the table selection is being accessed by a thread which is not \nthe event dispatch thread. When the table selection is being modified by the event \ndispatch thread and a second thread attempts to access the selection, it is natural for the \nsecond thread to see an inconsistent view of the selection. This inconsistent view can \ncause unrelated exceptions to show up in other parts of the system. \n\n\nI have come up with three potential solutions to this problem:\n\n1. Synchronize access to the table selection. The problem with this approach is that typical \naccess to the table selection is done by the event dispatch thread which does not require \nsynchronization. Therefore the synchronization will cause an unnecessary performance hit \nto typical use.\n\n2. Require that all access to the table selection be performed on the event dispatch \nthread. This is how things work currently. But as is demonstrated there are cases where \nother threads such as timer threads need to access the table selection. The work around \nfor this case is to use the SwingUtilities.invokeAndWait() method to schedule the selection \naccess on the event dispatch thread. The biggest problem with this approach is that it adds \ncomplexity to the ListTable class.\n\n3. Attempt to detect if the selection is currently being modified. This can be tested by \nwhether or not the selection has a consistent state. If the state is inconsistent simply \nreturn null as if there was no selection.\n\n\nI am trying to decide between solution two and solution three. Solution 2 will always \nreturn the correct value but it will also always take a long time when called by a thread \nwhich is not the event dispatch thread. Solution 3 will always return immediately but has \nthe potential for returning the wrong value when the selection is being modified.\n\nI will look through and continue to weight the pros and cons of each solution. Please let \nme know if you have any input which may help me make my decision."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I have made the getSelected() method safe to call from threads which are not the event \ndispatch thread. To do this I have made the getSelected() method use a helper class which \nwill do the actual selection lookup on the event dispatch thread.\n\nIn implementing this solution I have been thinking that the ListTable class should not be \nconcerned with selection. Unfortunately I cannot remove selection from ListTable without \nbreaking existing code.\n\nIn the interim I am considering making the getSelected() method deprecated with clients \naccessing the SelectionList as an alternative. The problem with this solution is that like \ngetSelected(), the SelectionList is not safe to be used any thread but the event dispatch \nthread.\n\nI will continue to think about this problem. If anyone has any suggestions I am open for \ncomment."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(13)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("INVALID"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("ListChangeSequence grows unbounded"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("The ListChangeSequence grows as more and more atomic changes are created. For a long-\nrunning Glazed Lists application the memory usage may become a serious performance \nproblem.\n\nThe ListChangeSequence should null out atomic changes when they are no longer in use \nand shift the array list when it grows too large."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I performed a thorough examination of the memory usage of Glazed Lists and the \napplication does not grow unbounded.\n\nThis can be verified in the code from the following lines that were cut-and-paste from \nListChangeSequence:\n\n // attempt to reclaim some changes for the change pool\n int oldestRequiredChange = atomicChanges.size(); \n for(int e = 0; e < listenerEvents.size(); e++) {\n ListChangeEvent listChangeEvent = (ListChangeEvent)listenerEvents.get(e);\n int eventOldestChange = listChangeEvent.getAtomicChangeCount();\n if(eventOldestChange < oldestRequiredChange) {\n oldestRequiredChange = eventOldestChange;\n }\n }\n // recycle every change that is no longer used\n for(int i = oldestChange; i < oldestRequiredChange; i++) {\n List recycledChanges = (List)atomicChanges.get(i);\n changePool.addAll(recycledChanges);\n atomicChanges.set(i, null);\n }\n // now we have reclaimed all these change objects\n oldestChange = oldestRequiredChange;\n\nI guess that when I was initially entering this bug I had forgotten that I had gotten around \nto adding this optimization. Nevertheless it is good to verify that there are no memory \nleaks when using Glazed Lists. In my simple test, Glazed Lists consumed less than 1000k \nof memory during the first 100,000 changes but consumed no additional memory for the \nfollowing 1,000,000 changes. Therefore I conclude that memory usage does not grow \nunbounded."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(14)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("FEATURE"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("JList support"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Glazed Lists needs to support JList alongside JTable and JComboBox.\n\nIt should be very straightforward to change between JList and JTable in an application:\n * The selection interfaces should be the same\n * The renderers should be the same\n\nFrom Fred at l2fprod.com:\n> I was looking at an equivalent of \"ListTable\"\n> but which would encapsulates a JList. Do you \n> have this on your todo list? I guess it could\n> share code with the ListTable\n\n\nThis functionality should get its own package,\n com.odellengineeringltd.glazedlists.jlist\nPerhaps the class name could be EventJList."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I've done some preliminary work on this and I've run into a few snags.\n\nMy first problem is with rendering. I cannot get the preferred width in order to render the cells \nnicely, because the getSize() methods depend on the results of the rendered cells! It also seems \nto be a lot slower than JTable when scrolling through a long list of rendered cells.\n\nOne thing that this has brought me to think about is better naming for some classes. ListTable is \nfine for an event list JTable, but the matching \"ListList\" does not make much sense. My working \nname is \"EventJList\" which I think is a decent naming convention. I am pondering what the \nconsequences would be if I renamed everything in Glazed Lists to make more sense. If I were to \ndo that I would probably also want to change the package names. O'Dell Engineering is now using \na better package prefix of \"ca.odell\" which might in and of itself be worth the costs of migration.\n\nStill I have users and CVS is unfriendly to directory deletes. I'll worry about that later. For now I \nget to think about how to do JLists right."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I have implemented EventJList. The class shares the following with ListTable:\n - SelectionListener interface\n - SelectionList / Selection Model\n\nThis class never batches groups of changes like ListTable does. It also does not use a Mutable change \nevent. It may be necessary to create a mutable ListDataEvent if change event creation proves to be a \nbottleneck.\n\nThis class still does not have any extra renderer support. For now if styled rendering is necessary, the \nuse of ListTable is a sufficient work around."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(15)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("Inserted items become selected"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I am delighted with the performance, flexibility and ease of use of your platform, which I am \ncurrently evaluating for use in a table intensive application for my employer.\n\nOur application needs to display tabular data which gets notified through JMS. That means, \nultimately, that data arrives via a callback method in out code. I am therefore using a \nBasicEventList as base list, encapsulated in a SortedList and a subclass of AbstractFilterList as a \nmeans of providing the functionality (sorting & filtering by various criteria) that we need.\n\nThe only problem so far arises with keeping selected rows between data insertions.�I set the \nunderlying table selection model to ListSelectionModel.MULTIPLE_INTERVAL_SELECTION (anyway, \nas it is the default value). A thread keeps adding rows to the table, at a rate of 10 per second (to \ntest performance). I have noticed that whenever I select a row, further row insertions may \nmodify the number of selected rows. In particular, if a new row has the same internal index as \nthe currently selected one, it is guaranteed I will end up with two selected rows.\n\nThat seems to be your intended behaviour as per the documentation of the class SelectionList; \nhowever, I tried to modify it in order to suppress this behaviour to no avail. In particular, I \nsuppressed the lines marked inside SelectionList.notifyListChanges():\n// when an element is inserted, it is selected if its index was selected\n} else if(changeType == ListChangeBlock.INSERT) {\n��� // when selected, add the flag and fire a selection event\n��� if(previouslySelected) {\n��� ��� flagList.add(index, Boolean.TRUE); // <--- SUPRESS\n��� ��� updates.appendChange(previousSelectionIndex, ListChangeBlock.INSERT); // <--- SUPRESS\n��� // when not selected, just add the space\n��� } else {\n��� ��� flagList.add(index, null);\n��� }\n\nI tried other changes, including the method SelectionList.valueChanged(). Do you have any \nsuggestion to solve this problem? Is it a bug in your code? In that case, I'd be willing to help and \ncontribute back to your project any bugfixes I develop.�I can also provide you with my testing \ncode, but at this stage it's really simple: the thread inserting fake data rows does so in an \ninvokeLater() block, and uses a java.util.Timer for scheduling data feed.\n\nThe problem does not manifest when I set the table selection model to \nListSelectionModel.SINGLE_SELECTION, by the way.\n\nThank you for your time and for providing the Java Community with such a promising piece of \nwork.\n\nYours\nIv�n Rivera Rodr�guez"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Iv�n -\n\nThe current behaviour is \"as designed\" but I agree that there may be a better way to solve this \nproblem.\n\nThis behaviour is the same as the behaviour of a simple JTable (ie. no Glazed Lists). When JTable \nreceives in insert at some index, say i, then the newly inserted row will be selected only if row i \nwas selected before the insertion. This behaviour has some nice properties: values inserted \nwithin a range of selected values will themselves become selected.\n\nBut I also agree that this behaviour can be problematic. I think the solution is to add an extra \n\"mode\" to the SelectionList. The new mode will be as you describe. Inserted values will never be \nselected until done so explicitly by the user.\n\nDue to constraints at school and at work I will be unable to add this functionality until at least \nFebruary 14th, 2004. In the worst case it will take until February 21st to complete. Hopefully then \nI will get something working that solves this problem!"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("According to the J2SE 1.4.1 API for DefaultListSelectionModel:\n\"If the value at index is itself selected and the selection mode is not SINGLE_SELECTION, set all of \nthe newly inserted items as selected. Otherwise leave them unselected. \"\nhttp://java.sun.com/j2se/1.4.1/docs/api/javax/swing/\nDefaultListSelectionModel.html#insertIndexInterval(int,%20int,%20boolean)\n\nI have tested some of the simple ways to solve this problem and I do not think that they will work \nelegantly. The problem is that I need to undo the selection which is added by \nDefaultListSelectionModel. This would be trivial except that the ListSelectionModel fires events that \nalso need to be done and undone.\n\nI am considering changing the Interface of SelectionList, to become a ListSelectionModel and \nEventList simultaneously. This approach is complex but appropriate as the SelectionList already \ntracks the table selection.\n\nI will continue to review my options but for now it looks like implementing ListSelectionModel is my \nbest bet."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I have solved the problem by implementing ListSelectionModel. Implementing this class was \ndifficult as the interface specification was not explicit enough for the behaviour in certain cases. I \nthink that the behaviour of my ListSelectionModel should be the same as the J2SE 1.4 \nDefaultListSelectionModel. If you discover a descrepancy, let me know.\n\nThis new ListSelectionModel has a new mode for solving this problem \n\"MULTIPLE_INTERVAL_SELECTION_DEFENSIVE\". The new mode is the default list selection mode. \n\nMy ListSelectionModel is fully capable of switching between different modes and retains the \nappropriate selection when the mode changes. To test this, there is a commented out block of \ncode in ProgrammingLanguageBrowser.java that provides a JComboBox to switch between \ndifferent ListSelectionModel modes.\n\nI hope this fix helps, it took quite a bit of code to make it work - 653 lines!"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("From Iv�n Rivera:\n\nThank you very much. I had also some time to work on the issue last Friday and came up with a \nsubclass of javax.swing.DefaultListSelectionModel which undoes the selection, without caring for \nevents generated. I append a copy to this mail for you to examine, as it seems to correct the \n(Swing-default) behaviour.\n\nYou are right about the event handling problem, but it doesn't seem to be causing troubles in my \ntest benchmark. Perhaps it's just a matter of performance. Anyway, your solution is surely more \nelegant. I won't be able to see your code until this night at home, since at work I'm behind an \nextremely restrictive firewall which doesn't even allow SSH tunneling for CVS checkout.\n\nI'm working in some components to enable automatic width adjustment for columns based on \ncontent and column hiding. I hope to be able to contribute the code once I'm done (this week, \nmost likely).\n\nOnce again, thanks for your interest.\n\nYours,\n\nIv�n Rivera"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(16)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("No removeSelectionListener() method in ListTable"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Hi,\n\nat minimum the ListTable has no removeSelectionListener(SelectionListener)\nmethod ...\n\nAny plans to correct this?\n\nCheers,\n\nJoern"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("The method had been omitted in error.\n\nI have added it to the latest revision in CVS."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(17)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P1"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("Selection concurrency ArrayIndexOutOfBoundsException"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I got the following exception:\n\n[tasks] Interrupting worker thread to run Adding Article\napple.awt.EventQueueExceptionHandler Caught Throwable : \njava.lang.ArrayIndexOutOfBoundsException: Cannot get selection index 0, list size 0\n at \ncom.odellengineeringltd.glazedlists.listselectionmodel.SelectionModelEventList$EventListSelectionMode\nl.isSelectedIndex(SelectionModelEventList.java:505)\n at javax.swing.JTable.isRowSelected(JTable.java:1451)\n at javax.swing.JTable.isCellSelected(JTable.java:1481)\n at javax.swing.JTable.prepareRenderer(JTable.java:3725)\n at javax.swing.plaf.basic.BasicTableUI.paintCell(BasicTableUI.java:1149)\n at javax.swing.plaf.basic.BasicTableUI.paintCells(BasicTableUI.java:1051)\n at javax.swing.plaf.basic.BasicTableUI.paint(BasicTableUI.java:974)\n at javax.swing.plaf.ComponentUI.update(ComponentUI.java:142)\n at javax.swing.JComponent.paintComponent(JComponent.java:541)\n at javax.swing.JComponent.paint(JComponent.java:808)\n at javax.swing.JComponent._paintImmediately(JComponent.java:4695)\n at javax.swing.JComponent.paintImmediately(JComponent.java:4488)\n at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:410)\n at \njavax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:\n117)\n at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)\n at java.awt.EventQueue.dispatchEvent(EventQueue.java:454)\n at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234)\n at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:184)\n at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178)\n at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170)\n at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)\napple.awt.EventQueueExceptionHandler Caught Throwable : \njava.lang.ArrayIndexOutOfBoundsException: Cannot get selection index 0, list size 0\n at \ncom.odellengineeringltd.glazedlists.listselectionmodel.SelectionModelEventList$EventListSelectionMode\nl.isSelectedIndex(SelectionModelEventList.java:505)\n at javax.swing.JTable.isRowSelected(JTable.java:1451)\n at javax.swing.JTable.isCellSelected(JTable.java:1481)\n at javax.swing.JTable.prepareRenderer(JTable.java:3725)\n at javax.swing.plaf.basic.BasicTableUI.paintCell(BasicTableUI.java:1149)\n at javax.swing.plaf.basic.BasicTableUI.paintCells(BasicTableUI.java:1051)\n at javax.swing.plaf.basic.BasicTableUI.paint(BasicTableUI.java:974)\n at javax.swing.plaf.ComponentUI.update(ComponentUI.java:142)\n at javax.swing.JComponent.paintComponent(JComponent.java:541)\n at javax.swing.JComponent.paint(JComponent.java:808)\n at javax.swing.JComponent.paintChildren(JComponent.java:647)\n at javax.swing.JComponent.paint(JComponent.java:817)\n at javax.swing.JViewport.paint(JViewport.java:774)\n at javax.swing.JComponent.paintChildren(JComponent.java:647)\n at javax.swing.JComponent.paint(JComponent.java:817)\n at javax.swing.JComponent._paintImmediately(JComponent.java:4695)\n at javax.swing.JComponent.paintImmediately(JComponent.java:4488)\n at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:410)\n at \njavax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:\n117)\n at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)\n at java.awt.EventQueue.dispatchEvent(EventQueue.java:454)\n at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234)\n at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:184)\n at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178)\n at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170)\n at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("The lists can get out of sync while changes are pending in the event queue. The ListSelectionModel \nmust not throw an exception because it is possible that the lists are simply out of sync and that when \nthe event queue is processed they will come back into sync.\n\nThis has been fixed so that the SelectionModel does not throw an exception in the possiblility that the \nlists are simply out of sync.\n\nOne unfortunate side effect is that the ListSelectionModel now cannot provide warning as to whether \nthis method is actually being called in error."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(18)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("set(), add(), remove() etc. not implemented"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Glazed Lists does not support remove() on FilterLists. It simply throws an Exception.\n\nGlazed Lists should support remove(). It should also support set().\n\nTo provide protection, there should be a MutationList called ReadOnlyList that throws an exception \nupon a remove() or a set."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("The following methods that modify lists should be implemented: set(), add(), remove() and clear().\n\nImplementing these is not straightforward because we want to modify the model indirectly by calling \nthese methods upon the view. Here are some observations:\n\nBasicEventList:\nAlready supports modifying methods.\n\nQueryList:\nNot directly modifyable. Objects created or modified externally can currently be updated via \nnotifyObjectUpdated(). This is appropriate.\n\nSortedList:\nMethods called with an index such as set(index, value) and add(index, value) will have unpredictable \nresults. This is because the modified/inserted objects may be sorted into a different index than that \nspecified. This is acceptable but should be documented.\n\nFilteredList:\nThe add(index, value) method is ambiguous. This is because there may be several filtered-out indicies \nin the source list that will have the same filtered index. I think the best approach is to insert at the \nhighest index that will satisfy the specified index.\nThe add() and set() methods may cause an object to become filtered. This is acceptable but should be \ndocumented.\n\nFreezableList:\nChanges may do different things in different states. This is nonintuitive and could be \ntroublesome. For example, when a list is frozen changes can only applied to a local copy. When the list \nis not frozen changes should propagate to parente lists. Therefore I recommend that changes are only \nallowed in the not frozen state. Otherwise an IllegalStateException should be thrown.\n\nSelectionList:\nThis is not clearly defined. It may be intuitive that remove() either removes the selection or that \nremove() actually removes an element from the source list. But add() can only add an element to the \nsource list because it is unnatural to use add() to perform selection by value and not index. Therefore \nadd() and remove() will modify the source list.\n\nMutationList:\nThis should continue to throw MethodNotSupportedException for mutator methods. It may be desirable \nto make some methods use others such as clear() calling remove() in sequence in order to simplify \nwriting extending classes."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Daniel Bonin and I were discussing modifyable views and we came up with some observations. When \nusing FilterList, SortedList or the like, you can have inconsistent behaviour. For example, the following \ncode wil fail.\n\nlist x = ...\nx.add(0, \"Jesse\");\nassert(\"Jesse\".equals(x.get(0));\n\nThis can fail because the inserted value \"Jesse\" gets filtered out or sorted to a different location.\n\nOur solution: a happy list. The happy list \"fakes\" success as the method directed. It basically keeps \ntrack of local changes to make the changes appear consistent. This can be used with GUIs to allow the \nuser to verify their modifications without losing the filtering and sorting. \n\nThe happy list will be called \"DeltaList\" and it will keep track of both the source list and a set of deltas \nthat have been performed. When an insert at x occurs, the delta list simulates that the insert occured at \nx, even if the insert was sorted or filtered to a different location."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I have created a new class \"WritableMutationList\" that provides these services to lists that extend it. It \nrequires that lists implement two additional methods:\n - isWritable() returns true if the list is accepting changes at this time\n - getSourceIndex() gets the index from the source list for the corresponding index in the mutated list\n\nThis requires that there is a 1:1 correspondence between indicies in the mutated list and the indicies in \nthe source list. This will not work for lists that combine source values in the mutated view.\n\nTo complete the fix, I must implement a ReadOnlyList mutated list and a DeltaList. I will also need to do \na bunch of testing to verify that this works."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I've added a ReadOnlyList - now all that's left is DeltaList.\n\n...And LOTS of testing!"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I added test methods to SortedList and CaseInsensitiveFilterList and have gained confidence in my \nimplementation of the set(), add(), remove(), clear() etc. methods.\n\nThe DeltaList has been moved to a separate issue, issue 24.\nhttps://glazedlists.dev.java.net/issues/show_bug.cgi?id=24"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(19)); currentIssue.setStatus("NEW"); currentIssue.setPriority("P3"); currentIssue.setResolution(""); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("FEATURE"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("Glazed lists on the network"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("As documented in the developer newsgroup, I want to build a model that allows list changes to be \ndistributed across the network.\n\nhttps://glazedlists.dev.java.net/servlets/ReadMsg?list=dev&msgNo=11\nhttps://glazedlists.dev.java.net/servlets/ReadMsg?list=dev&msgNo=12\n\nI will create a descrete event simulation model in order to test out what network strategies are most \neffective. Also I think that this package should be implemented exclusively using the buffered java.nio \npackage if possible."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(20)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P5"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("Refactor package and class names"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("These changes make the code easier for new users at the expense of requiring existing users to change \ntheir imports. Therefore the changes should be made very carefully. If possible a tool should be \nreferenced to automatically convert .java files for existing users.\n\nFirst off, com.odellengineeringltd.glazedlists is a mouthful. This should be changed to O'Dell \nEngineering's new standard package, ca.odell.glazedlists.\n\n...glazedlists.listselectionmodel should be renamed to ...glazedlists.selection.\n\nIn ...glazedlists.jtable:\n ListTable should be EventJTable\n SelectionListener should be moved to ...glazedlists.selection\n BasicSelectionListener should be moved to ...glazedlists.selection\n\nFinally the following classes should be verified working or removed:\n...glazedlists.jtextfield.ArrayStringCompleter\n...glazedlists.jtextfield.CompletedField\n...glazedlists.jtextfield.ComponentCaution\n...glazedlists.jtextfield.ListStringCompleter\n...glazedlists.jtextfield.StringCompleter\n...glazedlists.jtextfield.ValidatedField\n...glazedlists.jtable.StyledDocumentEditor\n...glazedlists.jtable.WritableListTable\n...glazedlists.jtable.WritableTableFormat\n...glazedlists.query.QueryListManager\n\nAs I have already said, these changes will ruin Glazed Lists programs. Therefore all Glazed Lists users \nshould be notified before making any changes and copies of the Glazed Lists jar file and source should \nbe permanently archived for users with these packages."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("When I fix this bug I will be breaking compatibility. Other compatibility-breaking changes should all be \nperformed at the exact same time.\n\nAnother compatibility-breaking change is changing the concurrency strategy. The current strategy uses \nsimple global synchronization, where a better solution will use Reader/Writer locks. This will be \nnecessary to resolve Issue 25."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Here's my current ideas on what to do with each class. My goal is to simplify Glazed Lists by removing \neverything that is not essential. \n\nAbstractFilterList - ok\nArrayStringCompleter - remove, this class is not within the scope of the project\nBasicEventList - ok\nBasicSelectionListener - remove, this class is simple in implementation and limited in use\nBoundedMap - remove, this class is no longer used\nCachingList - ok\nCaseInsensitiveFilterList - SubstringFilterList, have case toggle options\nCharacteristicList - rename ?\nComparableComparator - ok\nComparatorChain - ok\nCompletedField - remove, not within scope\nComponentCaution - remove, not within scope\nCompositeList - ok\nDynamicQueryList - replace with a different 'query' list that does not use the Query class, just a \nsetCollection() method\nEmptyQuery - remove\nEventJList - replace with a EventListModel\nEventList - ok\nEventListIterator - ok\nExitOnCloseHandler - remove, not in scope\nFilterable - remove? Filterator only may be a better approach\nFilterator - rename TextFilterator\nFreezableList - ok\nIconComboBoxRenderer - remove, not within scope\nIndexedTree - ok\nIndexedTreeNode - ok\nListChangeBlock - make package-scope, move constants DELETE, INSERT to ListChangeEvent class\nListChangeEvent - ok, add methods to get the source list and target listener\nListChangeListener - ok, change notifyListChanges to listChanged\nListChangeListenerEventThreadProxy - ok\nListChangeListenerWeakReferenceProxy - ok\nListChangeSequence - ok, maybe rename to ListChangeEventHelper or something\nListComboBoxModel - ok\nListStringCompleter - remove, out of scope\nListTable - replace with EventListTableModel\nMutableListDataEvent - ok, make package-scope\nMutableTableModelEvent - ok, make package-scope\nMutationList - rename. the renamed list could be \"DecoratorList\" or something else\nPeriodicQueryList - remove, see DynamicQueryList\nProgrammingLanguageBrowser - ok\nProgrammingLanguageNameComparator - ok\nProgrammingLanguageTableCell - ok\nProgrammingLanguageYearComparator - ok\nQuery - remove, see DynamicQueryList\nQueryList - replace as per DynamicQueryList\nQueryListManager - remove\nReadOnlyList - ok\nReverseComparator - ok\nSelectionList - remove\nSelectionListener - ok? maybe remove due to models, consider more flexible selection events\nSelectionModelEventList - ok\nSelectionNotifier - package private\nSortedList - ok\nSparseList - ok\nStringCompleter - remove\nStripedTableCellRenderer - not really in scope, but keep it anyway\nStyledDocumentEditor - remove\nStyledDocumentRenderer - not really in scope, but keep it anyway, adjust built-in forms\nSubEventList - ok\nTableComparatorChooser - ok\nTableComparatorSelector - remove\nTableFormat - rename um TableColumnFormat maybe? remove configureTable for new model-\napproach\nTaskQueryList - remove, see DynamicQueryList\nUniqueList - ok\nValidatedField - remove\nWritableListTable - replace with methods in TableFormat\nWritableMutationList - remove, replace with more powerful MutationList\nWritableTableFormat - remove\n"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Some other things I think we should go over for this issue:\n - verify standard copyright header\n - classes should be final\n\nTo reduce the number of visible classes and therefore simplify Glazed Lists:\n - all *List classes should be in the main package\n - no support classes should be public\n - Swing classes in swing package\n"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Two other things I thought of to verify:\n - imports are clean & straightforward & necessary\n - there is a thread-safety warning in Javadoc for all thread-unsafe classes"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("NEVER AGAIN"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(21)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("SubList not implemented"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("SubList should be implemented. This should be an MutationList on its own, that starts with the initial \nsize and accepts add() and remove() from source list."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Implementing SubList as an EventList in its own right will introduce a subtle problem:\n\nThe SubList should listen to events from its source list and change itself accordingly. But if the SubList \nis to listen for such events, it must be registered as a ListChangeListener of the source list.\n\nBecause the SubList is a ListChangeListener, the source list will always maintain a reference to the \nSubList and the SubList will never go out of scope. Therefore the SubList will never be garbage collected \nand waste memory space.\n\nThe work around is to require EventLists to accept two classes of ListChangeListeners - those that \nshould be garbage collected once they go out of the scope from the caller and those that should not be \ngarbage collected. In effect there should be ListChangeListeners that are stored with weak references \nand those that have regular references.\n\nI would prefer not to change the interface for EventList or ListChangeListener, so it will be tricky to \ndetermine whether to reference a listener with a weak reference or a regular reference. One solution \ncreate a proxy class called \"WeakReferenceListChangeListenerProxy\" that sends changes using a weak \nreference only. This is similar to the SwingThreadProxy already in use in Glazed Lists."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("SubList is added and appears to be working.\n\nI still need to perform a test to ensure it is being garbage collected."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Fixed!\n\nThe SubList and Iterator now respond to events. Therefore they can be used even if the underlying list \nchanges."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(22)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("kevinmaltby"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("CachingList dumps all values whenever the list is changed"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("The CachingList will be of growing importance as Glazed Lists are used on the network.\n\nThe current implementation of CachingList dumps the entire cache whenever any changes to the list \noccur. The CachingList should only dump values which have been invalidated."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("The current CachingList keeps track of what is in its cache by its list index. When the list is modified, \nthese list indicies may change and therefore it is necessary to invalidate the entire cache.\n\nIn order to fix the CachingList, it will be necessary to change the data structures that support it. This fix \nwill be difficult to build!\n\nI am considering allowing this defect to exist in the 1.0 release as it is only a performance problem and \nnot a behavioural problem."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I'm assigning this to Kevin Maltby - the best coder I know when caching is concerned. Let's hope my \nflattery and his talent are enough to get this bug fixed!"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Kevin has pretty much conquered this one. He's going to CVS commit and close this issue real soon.\n\nI have peer-reviewed his code and it's pretty decent. The peer review session was very helpful and \nhopefully we can get a lot of the Glazed Lists code peer reviewed in the future!"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("kevinmaltby"); description.setWhen(null); description.setText("The fix is in. The CachingList now behaves as you would expect."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(23)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("TASK"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("Add JUnit Support"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("As Glazed Lists gets bigger in scope it is becoming very urgent to create a set of unit tests.\n\nThere should be a package such as .glazedlists.test that is only compiled if the JUnit libraries are \ndetected on the classpath. If they are, then these test files can be built. They can then be tested with a \n\"test\" target in the project buildfile.\n\nFinally these test classes shall not be included in the library distribution."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I have added the framework for JUnit tests within the Glazed Lists package and build file.\n\nNow all I have to do is write the tests!"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I've gone through the code to select which classes are good candidates for unit tests. Unit tests require \nprogrammatic access so testing Swing stuff will be of marginal value.\n\npackage: .glazedlists\nAbstractFilterList\nBasicEventList\nCaseInsensitiveFilterList\nSortedList\nWritableMutationList\n\npackage: .glazedlists.listselectionmodel\nSelectionModelEventList\n\npackage: .glazedlists.util\nBoundedMap\nCachingList\nEventListIterator\nFreezableList\nIndexedTree\nReadOnlyList\nSparseList\n\nAs of March 18, 2004 I have created tests for the CaseInsensitiveFilterList and the SortedList."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("The most basic classes now have tests for them.\n\nSome tests are not appropriate for JUnit, for example, concurrency tests.\n\nRegardless, JUnit support is now in the Glazed Lists project. It is possible to add new tests by simply \ncreating a class that ends with Test.java. In fact, Glazed Lists now requires that classes ending in \nTest.java must be JUnit tests as such classes are NOT included in the distribution jar.\n\nAnyone interested in getting their hands dirty with Glazed Lists should consider adding more tests to \nour test library!"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(24)); currentIssue.setStatus("NEW"); currentIssue.setPriority("P5"); currentIssue.setResolution(""); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("FEATURE"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("Add DeltaList for consistency with derivatives of WritableMutationList"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("WritableMutationLists allow modifications to be made to the list that may behave differently than \nexpected. The solution is to implement a DeltaList, which is a mutation list that provides as-expected \nresults when they would not otherwise be possible.\n\nFrom issue 18:\n\nDaniel Bonin and I were discussing modifyable views and we came up with some observations. When \nusing FilterList, SortedList or the like, you can have inconsistent behaviour. For example, the following \ncode wil fail.\n\nlist x = ...\nx.add(0, \"Jesse\");\nassert(\"Jesse\".equals(x.get(0));\n\nThis can fail because the inserted value \"Jesse\" gets filtered out or sorted to a different location.\n\nOur solution: a happy list. The happy list \"fakes\" success as the method directed. It basically keeps \ntrack of local changes to make the changes appear consistent. This can be used with GUIs to allow the \nuser to verify their modifications without losing the filtering and sorting. \n\nThe happy list will be called \"DeltaList\" and it will keep track of both the source list and a set of deltas \nthat have been performed. When an insert at x occurs, the delta list simulates that the insert occured at \nx, even if the insert was sorted or filtered to a different location."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("priority reduced as there is no 'customers' waiting for this feature."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This may be an excellent candidate as something to extend AbstractFilterList."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(25)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("CompositeList not thread-safe"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Glazed Lists' new CompositeList combines multiple event lists into one.\n\nThis class is not thread-safe. In particular, it may be possible to cause a deadlock when one thread is \nreading the CompositeList while another thread is writing a list that the CompositeList is composed of."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug depends on fixing Issue 26. That issue is for adding beefier concurrency constructs to Glazed \nLists."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("After much thought, I have decided my approach to solving this bug.\n\nHere are the things that all solutions must consider:\n1. When one of the source lists change, they call notifyListChanges() while holding the writer lock to \nthat source list.\n2. When a user needs read access to any list including CompositeList, the user acquires a reader lock \nand performs their access. The list must not change during access.\n3. If a thread obtains two locks, it must always obtain the locks in the same order as any other thread \nthat may hold those two locks. Otherwise deadlock is possible as threads may compete for each other's \nlocks.\n\nMy initial idea was as follows:\n - Eliminate the need for locking all source lists for each access\n - When a read is performed, lock the local read lock and the read lock on the source list\n - When a write is performed, lock the local write lock and the write lock of the source list\n - When a source list calls notifyListChanges, use the tryLock() method to attempt to obtain the local \nwrite lock. If it can be obtained propogate the change. If it cannot, return without propogating the \nchange. The thread that currently holds a lock is now responsible for propogating that change.\n\nThis strategy has many advantages. It has a constant time to acquire locks, and it takes advantage of \nthe listEvent's abilities to be read at a later time. Although this avoids deadlock, the problem this \nstrategy is that this does not fulfill requirement 2.\n\nTherefore, I will implement a much simpler and potentially slower strategy:\n - for each lock, present a decorator lock that locks all corresponding locks from the source list\n - obtain the locks in a constant order: by the System.hashCode() value of their source list\n\nThis solution looks good! The only problem I have with it is that the System.hashCode() value could \nchange for an Object over time if it gets moved within memory. I doubt that this will be a problem but it \nis a good thing to keep an eye on."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("My initial implementation is complete, but I still need to add a test class to verify that it is thread safe."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("After implementing my proposed solution, I tested it and discovered that it was\nfailing miserably! The solution has a problem that prevents it from being\nacceptable. The notifying thread must have a write lock on the entire list to\nprevent changes from being made while the listChanged() method is being handled\nby listeners. This is requirement #2 and it is not satisfied by that proposal.\nTherefore the proposal is insufficient.\n\nTherefore I propose a new solution, somewhat of a hybrid between the two.\ni. Read lock on composite list obtains the read locks of all source lists in\narbitrary order\nii. Write lock on composite list is a special ReadWriteLock called\n\"PropagateLock\" plus the read locks of all source lists.\niii. Upon a change notification in the composite list, that thread tests if the\npropagateLock is locked. If it is, it leaves its changes to be propogated by the\nthread that currently owns the propogate lock. If that lock is unlocked, the\nthread takes the propogate lock and then all read locks in arbitrary order. It\nthen concatenates its own changes with any changes left while it was collecting\nlocks. Finally it propagates the concatenated change while holding the propogate\nlock, read locks to all source lists, and the original write lock for one source\nlist.\n\nThis combined lock includes the \"writer lock\" for this list, satisfying\nrequirement #1. \nThe reader lock is a hybrid lock that holds all other read locks, preventing\nchanges while reading. This satisfies requirement #2.\nThe reader locks need not be mutex with one another so that solves part of #3.\nFor writer locks, a thread's 2nd lock is always the propogate lock, and it fails\nif that lock is not available immediately, solving another part of #3. Finally,\nno thread acquires write locks after owning a first read lock, finishing up the\nfinal area of concern for requirement #3."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Yet again, I have presented a solution that failed in practice. Here is the problem with my most recent \nsolution:\n\nSuppose you have two writer threads, A and B that write to source lists Apples and Bananas. There is \nalso a reader thread C that reads the composite list of A and B called \"FruitSalad\".\n\n1. A creates an event in Apples and acquires the write lock to Apples. A = { WL(Apples) }\n2. C wants to read the fruit salad and requests a read lock. By the provided implementation, this causes \nC to obtain read locks to each of the two lists Apples and Bananas in arbitrary order. C aquires the read \nlock to Bananas and requests the read lock to Apples, which blocks because A currently holds that lock. \nC = { RL(Bananas), REQUEST(RL(Apples)) }\n3. B wants to create an event in Bananas and requests the write lock to Bananas. This blocks because C \ncurrently holds that lock. B = { REQUEST(WL(Bananas)) }\n4. A forwards its event to FruitSalad, regarding its change to Apples. A attempts to acquire the read \nlocks to all lists in FruitSalad in order to forward this event. When attempting to acquire the read lock to \nBananas, this request is blocked because there is a waiting request for the write lock to Bananas by B. \nTherefore A = { WL(Apples), REQUEST(RL(Bananas)) }\n\nAs you can see, all of the lists are awaiting requests held by each other and we have a deadlock. This \nsucks! I do not think it is appropriate to change the preferences on the lock orders because doing so \nmay severely limit the original concurrency goals of Glazed Lists.\n\nFor now, I will continue to ponder a better solution. "); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Created an attachment (id=2)\nMy request for help on Usenet\n"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I was thinking about this problem and I came to a solution. Supporting arbitrary\nsources for CompositeList is not only difficult, it is impossible!\n\nThis is because allowing arbitrary numbers of threads and sources for each list\ncan always lead to potential deadloch situations. For example, suppose we have\nthe following.\nlist A\nlist B\nthread C reading the composite list (A, B) called \"Fruit Salad\"\nthread D reading the composite list (B, A) called \"Fruit Punch\"\nThen C can hold RL(A) while waiting for RL(B) while D is holding RL(B) while\nwaiting for RL(A). You guessed it, deadlock.\n\nIt may be worthwhile to investigate using a lock-aquiring-order to solve this\nproblem partially, but I still think that arbitrary graphs are impossible to\nsupport. I must also note that it is always possible to support arbitrary graphs\nwhen using a global lock. I would very much like to avoid that solution however.\n\nAnyway given my new requirements I have drafted up a new solution! Set writers\nto write change events to a queue, then attempt to obtain the composite list\nlock. Overload the composite list lock to first obtain a base lock, then to\nforward queued changes after all reader lock has been acquired.\n\nOr better, pseudocode:\n\n lock() {\n starlock.lock()\n lock all read locks\n process queue\n }\n unlock() {\n starlock.unlock()\n release all read locks\n }\n tryLock() {\n boolean success = starlock.trylock() \n if(!success) return false;\n lock all read locks\n process queue\n }\n listChanged(list event) {\n add event to queue\n cl.tryLock()\n cl.unlock();\n }\n\nDoes anybody have any comments on this strategy? The biggest new idea is that\nreaders may sometimes be called upon to forward changes when they are acquiring\nthe read lock."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("My solution worked and this issue has been resolved!\n\nHow satisfying!!\n"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(26)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("Replace global lock with reader/writer locks"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("The current Glazed Lists uses global locks for all reads and writes. It would higher performance to use a \nreader/writer lock instead.\n\nThe reader/writer lock could be either requested via eventList.getLock().aquireRead() or via \neventList.aquireReadLock(). I think I prefer using getLock(), which returns an object implementing a \nReaderWriterLock interface. That way I can easily swap out the lock implementation."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("We've swapped the global synchronized on root list to global reader writer locks.\n\nWe can now replace that with local locks."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I am marking this problem as \"fixed\" and creating a new issue which covers concurrent mutationlist \nmodifications."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(27)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("kevinmaltby"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("FEATURE"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("UniqueList not implemented"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Glazed Lists needs a UniqueList that can take two lists and show only the unique values."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Kevin Maltby has got a working implementation! What a stallion!"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("kevinmaltby"); description.setWhen(null); description.setText("UniqueLists are now implemented to provide a unique view of a given list."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("kevinmaltby"); description.setWhen(null); description.setText("Jesse Wilson broke it with the addition of the testUpdateDeleteCollide test \ncase.\n\nThe result of this test was the following Exception...\n\n [junit] Testcase: testUpdateDeleteCollide(com.odellengineeringltd.glazedlist\ns.util.UniqueListTest): Caused an ERROR\n [junit] cannot get from tree of size 1 at 1\n [junit] java.lang.IndexOutOfBoundsException: cannot get from tree of size 1\nat 1\n [junit] at com.odellengineeringltd.glazedlists.util.IndexedTreeNode.getN\nodeWithIndex(IndexedTreeNode.java:81)\n [junit] at com.odellengineeringltd.glazedlists.util.IndexedTree.getNode(\nIndexedTree.java:64)\n [junit] at com.odellengineeringltd.glazedlists.SortedList.get(SortedList\n.java:239)\n [junit] at com.odellengineeringltd.glazedlists.util.UniqueList.get(Uniqu\neList.java:167)\n [junit] at com.odellengineeringltd.glazedlists.util.UniqueList.processIn\nsertEvent(UniqueList.java:259)\n [junit] at com.odellengineeringltd.glazedlists.util.UniqueList.notifyLis\ntChanges(UniqueList.java:209)\n [junit] at com.odellengineeringltd.glazedlists.event.ListChangeSequence.\ncommitAtomicChange(ListChangeSequence.java:134)\n [junit] at com.odellengineeringltd.glazedlists.SortedList.notifyListChan\nges(SortedList.java:146)\n [junit] at com.odellengineeringltd.glazedlists.event.ListChangeSequence.\ncommitAtomicChange(ListChangeSequence.java:134)\n [junit] at com.odellengineeringltd.glazedlists.AbstractFilterList.handle\nFilterChanged(AbstractFilterList.java:187)\n [junit] at com.odellengineeringltd.glazedlists.util.UniqueListTest$IntAr\nrayFilterList.setFilter(UniqueListTest.java:526)\n [junit] at com.odellengineeringltd.glazedlists.util.UniqueListTest.testU\npdateDeleteCollide(UniqueListTest.java:542)"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This is broken because some naive programmer guy didn't do a very good job at implementing \nSortedList. "); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed as a consequence of bug 37 being fixed.\n\nI performed the Unit Tests and all worked perfectly, for 1000 elements filtered 10 times."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(28)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P1"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("Lists may fail if the change event indicies are out of order"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Lists that evaluate the values such as SortedList and FilteredList may break if the change event has \nindicies that arrive out of order.\n\nThere should be a test for this added to the unit tests and a fix should be made if the problem is \nlegitimate."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I have created a JUnit test that confirms the presense of this bug. That test has been added to CVS.\n\nThe solution as I see it is to add a method in the ListChangeSequence that is called from \ncommitAtomicChanges(). Such a method would examine the list change events and re-order them into \norder of increasing index.\n\nThe reordering could potentially also merge adjacent list change blocks but this is not totally necessary."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("The ListChangeSequence now bubble-sorts change blocks when the change is commited.\n\nBubbleSort was used because it only swaps adjacent entries. When two change blocks are swapped, \ntheir indicies must be modified relative to one another. Therefore bubble sort is the simplest sort to \nimplement."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug appears to remain broken:\n\n [junit] Testcase: testIndexOutOfOrder(com.odellengineeringltd.glazedlists.test.IndexOrderTest): \nFAILED\n [junit] expected:<[[I@c05d3b, [I@28f6ee, [I@6bade9, [I@66afb3, [I@9945ce, [I@b5dac4, [I@2d96f2, \n[I@110003, [I@17e4ca, [I@adb1d4, [I@75d6ab, [I@60a26f, [I@484a05, [I@f39b3a, [I@542a75, \n[I@af993e, [I@75e4fc, [I@c62c8, [I@2940b3, [I@56b6b9, [I@f66cff, [I@6de49c, [I@bbf1ca, [I@ff0dde, \n[I@e78fc6, [I@901437, [I@1f6226, [I@64ea66, [I@58f9d3, [I@79a2e7, [I@b60280, [I@5e55ab, \n[I@4a55f2, [I@5093f1, [I@20bf2c, [I@e6f7d2, [I@9836ed, [I@3e0ebb, [I@39443f, [I@afae45, [I@da4b71, \n[I@8f1d7e, [I@d9660d, [I@bb0d0d, [I@55e55f, [I@45c859, [I@64883c, [I@2c1e6b, [I@811c88, \n[I@785d65, [I@3bc257, [I@53f67e, [I@5bdc50, [I@dd3812, [I@8c436b, [I@9e5c73, [I@c791b9, \n[I@3020ad, [I@b15692, [I@aa9f99, [I@d42d08, [I@d86fd3, [I@958bb8, [I@7f4ec, [I@60e128, \n[I@5e1077, [I@8b3364, [I@db05b2, [I@530cf2, [I@76fba0, [I@81ed9e, [I@175422, [I@949f69, \n[I@6dadf9, [I@b8d6f7, [I@290fbc, [I@c80b01, [I@4aa0ce, [I@833eca, [I@8f5824, [I@e3cd51, [I@bc8e1e, \n[I@1671b2, [I@82764b, [I@2452e8, [I@bf3d87, [I@60991f, [I@e4f7c2, [I@45f0e3, [I@c9d92c, [I@d0fafc, \n[I@dc6b5, [I@70bea5, [I@f47396, [I@d0af9b, [I@b8f8eb, [I@de17f4, [I@f6ba0f, [I@313906, [I@96cf11, \n[I@f47bf5, [I@f6438d, [I@cd0888]> but was:<[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, \n18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, \n44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, \n70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, \n96, 97, 98, 99, 100, 101]>\n [junit] junit.framework.AssertionFailedError: expected:<[[I@c05d3b, [I@28f6ee, [I@6bade9, \n[I@66afb3, [I@9945ce, [I@b5dac4, [I@2d96f2, [I@110003, [I@17e4ca, [I@adb1d4, [I@75d6ab, \n[I@60a26f, [I@484a05, [I@f39b3a, [I@542a75, [I@af993e, [I@75e4fc, [I@c62c8, [I@2940b3, [I@56b6b9, \n[I@f66cff, [I@6de49c, [I@bbf1ca, [I@ff0dde, [I@e78fc6, [I@901437, [I@1f6226, [I@64ea66, [I@58f9d3, \n[I@79a2e7, [I@b60280, [I@5e55ab, [I@4a55f2, [I@5093f1, [I@20bf2c, [I@e6f7d2, [I@9836ed, \n[I@3e0ebb, [I@39443f, [I@afae45, [I@da4b71, [I@8f1d7e, [I@d9660d, [I@bb0d0d, [I@55e55f, \n[I@45c859, [I@64883c, [I@2c1e6b, [I@811c88, [I@785d65, [I@3bc257, [I@53f67e, [I@5bdc50, \n[I@dd3812, [I@8c436b, [I@9e5c73, [I@c791b9, [I@3020ad, [I@b15692, [I@aa9f99, [I@d42d08, \n[I@d86fd3, [I@958bb8, [I@7f4ec, [I@60e128, [I@5e1077, [I@8b3364, [I@db05b2, [I@530cf2, [I@76fba0, \n[I@81ed9e, [I@175422, [I@949f69, [I@6dadf9, [I@b8d6f7, [I@290fbc, [I@c80b01, [I@4aa0ce, [I@833eca, \n[I@8f5824, [I@e3cd51, [I@bc8e1e, [I@1671b2, [I@82764b, [I@2452e8, [I@bf3d87, [I@60991f, \n[I@e4f7c2, [I@45f0e3, [I@c9d92c, [I@d0fafc, [I@dc6b5, [I@70bea5, [I@f47396, [I@d0af9b, [I@b8f8eb, \n[I@de17f4, [I@f6ba0f, [I@313906, [I@96cf11, [I@f47bf5, [I@f6438d, [I@cd0888]> but was:<[0, 1, 2, 3, \n4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, \n32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, \n58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, \n84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101]>\n [junit] at \ncom.odellengineeringltd.glazedlists.test.IndexOrderTest.testIndexOutOfOrder(IndexOrderTest.java:85)\n [junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n [junit] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)\n [junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:\n25)\n"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("kevinmaltby"); description.setWhen(null); description.setText("The current ordering of events appears to be inverted and thus events appear in \ndecreasing order."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Fixed! Again! This bug has haunted me all day. \n\nThe solution sorts and combines properly, but not necessarily too efficiently. If this proves to be a \nproblem, I'll send the optimization police onto it!\n\nHere's an example of the (poor) runtime. Changes are measured in loop executions.\n [junit] Changed! blocks before: 142, after: 142, changes: 141\n [junit] Changed! blocks before: 204, after: 1, changes: 405\n [junit] Changed! blocks before: 203, after: 88, changes: 9890\n [junit] Changed! blocks before: 306, after: 253, changes: 647\n [junit] Changed! blocks before: 541, after: 40, changes: 5257\n [junit] Changed! blocks before: 514, after: 73, changes: 27433\n [junit] Changed! blocks before: 212, after: 158, changes: 439\n [junit] Changed! blocks before: 626, after: 9, changes: 46633\n [junit] Changed! blocks before: 548, after: 67, changes: 22004\n [junit] Changed! blocks before: 141, after: 141, changes: 140\n [junit] Changed! blocks before: 411, after: 91, changes: 20767\n [junit] Changed! blocks before: 119, after: 119, changes: 118\n [junit] Changed! blocks before: 490, after: 2, changes: 32108\n [junit] Changed! blocks before: 460, after: 81, changes: 24387\n [junit] Changed! blocks before: 121, after: 121, changes: 120\n [junit] Changed! blocks before: 551, after: 81, changes: 24285\n [junit] Changed! blocks before: 219, after: 176, changes: 447\n [junit] Changed! blocks before: 623, after: 68, changes: 53634\n [junit] Changed! blocks before: 572, after: 23, changes: 23838\n [junit] Changed! blocks before: 34, after: 34, changes: 33\n [junit] Changed! blocks before: 41, after: 29, changes: 919\n [junit] Changed! blocks before: 55, after: 55, changes: 54\n [junit] Changed! blocks before: 77, after: 50, changes: 2964\n [junit] Changed! blocks before: 65, after: 1, changes: 127\n [junit] Changed! blocks before: 46, after: 46, changes: 45\n"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(29)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P4"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("ToString on BasicEventList, MutationList no good"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("The toString value on Java Lists is like \"[lemon, orange, apple, banana]\"\nbut on Glazed Lists it is like \"com.odellengineeringltd.glazedlists.BasicEventList@f4d448ce\""); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("kevinmaltby"); description.setWhen(null); description.setText("The toString value on Glazed Lists is the same as the toString value on Java \nLists now."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(30)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P4"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("TASK"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("Verify ListTable changeSizeRepaintAllThreshhold works"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Some users have had problems with the behaviour of Glazed Lists when the \nchangeSizeRepaintAllThreshhold is low.\n\nVerify that the behaviour is:\n - correct\n - faster than using single changes"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I've done some research and learned a lot about the behaviour of JTable.\n\nWhen you give JTable a large set of small changes, it has different behaviour depending on what its \nrenderer is doing. If the table rows all have a uniform height, then the JTable is very fast at handling \nsuch a set of changes. If the table rows have nonuniform height, however, the JTable is very slow.\n\nTherefore I am going to make a few small changes:\n - I am going to further document the changeSizeRepaintAllThreshhold and its relationship with the \ntable speed in both the ListTable class and in the performance section of the tutorial\n - I am going to change the default value of changeSizeRepaintAllThreshhold to 250, and add proper \ngetter and setter values. The table performance was intolerable with variable row sizes when there were \nmroe than 250 changes, but may be acceptable below that.\n\nNote that the changeSizeRepaintAllThreshhold is an unwanted hack to work around the poor behaviour \nof JTable in such situations. It has major problems because it forces the table to lose its selection and \nits scrolling."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I have changed the behaviour of repaintAllThreshhold to default to Integer.MAX_VALUE. Therefore new \nrepaintAllThreshhold must be set manually to be enabled. This is good because the whole thing is kind \nof an ugly hack to get around the poor behaviour of the JTable's ability to track row height. \n\nI believe the whole problem stems from a poor implementation of SizeSequence in the JVM. I think a \ntree-based structure similar to the one used for SparseList may be more appropriate."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(31)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P2"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("ENHANCEMENT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("More powerful TableComparatorSelector"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Glazed Lists' TableComparatorSelector does not:\n - have chevrons or arrows to indicate sort order\n - allow sorting by multiple columns simultaneously\n\nThese should be implemented by \"beefing-up\" TableComparatorSelector."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I've moved this from priority 4 to priority 2 due to demand!\n\nI also got some additional info from the users mailing list.\n\nSource for a tool that does table header stuff well:\nhttp://www.fawcette.com/javapro/2002_08/magazine/columns/visualcomponents/\n\nAlso - the table should support raw-order sort."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I have started preliminary work on this.\n\nI have yet to do the header arrows and multiple-column sort, but the new TableComparatorSelector is \nalready much, much better."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I've added support for multiple column sort, and arrow icons.\n\nHeader/table sorting is now a FIRST CLASS feature in Glazed Lists.\n\nAll that's left is support for raw sort order. I will enter a new bug for that as the support should be done \nin SortedList."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(32)); currentIssue.setStatus("NEW"); currentIssue.setPriority("P5"); currentIssue.setResolution(""); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("kevinmaltby"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("ENHANCEMENT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("CachingList could be more powerful"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("As Kevin and I were working on the CachingList problems today, we came up with some clever new \nideas for a powerful replacement for CachingList:\n\n - background loading. Calls to get() return a default value immediately, then load the actual value in \nthe background. Finally fire a updated() event when the actual value is loaded.\n\n - bulk loading via an API. Create a Caching API for performing BulkLoading. This is not really a \nMutationList because it would require more than an EventList as a source. Bulk loading could be faster \nbut it is definitely a big fat ugly pig to implement.\n\n - footprint that is bounded by max cache size and NOT by the size of the source list. This will be \nnecessary for arbitrarily large source lists on finitely powerful computers.\n\nRegardless of where we go forward with Caching, it will be necessary to find some real-world cases that \nrequire caching before we commit serious time to the problem. Such cases will enable us to have a \nuser's perspective on caching."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(33)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P2"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("ENHANCEMENT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("SortedList raw order support"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("SortedList should support raw order when the current comparator is NULL."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This is now high priority as it is needed for making TableComparatorChooser work better."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Done!\n\nAlthough the SortedList now supports raw-order sort, this is not supported by \nTableComparatorChooser."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(34)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("UniqueList sometimes does not forward events on a DELETE"); description = new Description(); description.setWho("kevinmaltby"); description.setWhen(null); description.setText("UniqueList currently does not forward events on when a DELETE is encountered in \nthe following instance:\n\nThe element being removed is modelled in the unique view and has at least one \nduplicate. This should result in the duplicate being modelled in the unique \nview and an update event being forwarded.\n\nIn some circumstances, such as on a call to clear() on the source list, \nforwarding this event causes the following exception:\n\nChange blocks U.0 and D.0-1 intersect\njava.lang.IllegalStateException: Change blocks U.0 and D.0-1 intersect\nat com.odellengineeringltd.glazedlists.event.ListChangeBlock.requiresSwap\n(ListChangeBlock.java:185)...\n\nThis fix will require altering the current strategy for dealing with change \ncollisions in ListChangeBlock."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("kevinmaltby"); description.setWhen(null); description.setText("UniqueList now forwards events correctly in all cases when handling DELETE \nevents."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(35)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P5"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("ENHANCEMENT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("UniqueList needs a means of forwarding non-mandatory change events"); description = new Description(); description.setWho("kevinmaltby"); description.setWhen(null); description.setText("UniqueList needs to provide access to non-mandatory change events for \noverlaying lists which want to listen to them."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This non-critical issue is being marked low-priority until Glazed Lists 1.0 has\nbeen released."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("The solution is for UniqueList to use multiple ListEventAssemblers and to allow\nlisteners to choose which ListEventAssembler they subscribe to by overloading\nthe addListEventListener() method."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(36)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P5"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("FEATURE"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("GlazedLists requires a counted, unique view of a given list."); description = new Description(); description.setWho("kevinmaltby"); description.setWhen(null); description.setText("This list type is based on the Bag ADT and is currently unnamed.\n\nThis class will sit on top of a UniqueList, and listen to all change events \nfrom the UniqueList to correctly provide access to not only a view which is \nguaranteed to be unique, but also the number of duplicate values for each \nunique value.\n\nAn example usage would be a list of votes for favourite pop.\n\nSource Unique View Unique, Counted\n------------------------------------------------------\nPepsi | Coke | Coke x 3\nCoke | MountainDew | Mountain Dew\nSprite | Pepsi | Pepsi x 2\nPepsi | Sprite | Sprite\nMountain Dew | |\nCoke | |\nCoke | |\n------------------------------------------------------\n\nClearly this could provide a valuable list view."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("kevinmaltby"); description.setWhen(null); description.setText("Specified an explicit dependency upon Issue 35."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This non-critical issue is being marked low-priority until Glazed Lists 1.0 has\nbeen released."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This non-critical issue is being marked low-priority until Glazed Lists 1.0 has\nbeen released."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I've added the getCount() method which works well and was very easy to\nimplement. Like all reading methods, this method is not thread safe. I think it\nwould be a good idea to comb through the Javadocs before 1.0 and add a standard\nthread safe warning to methods like these.\n\nAlso I attempted to implement listeners for the bag events but I failed because\nsometimes updates are thrown that collide with deletes or inserts. For example,\nif I have a change that deletes multiple instances of a value, the first few\ndeletes will throw updates and the last delete will throw a delete. These\nintersect and the ListEventAssembler complains. So this is on hold for now."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Fixed for now! We may add listeners for change counts later, but that will require some work on \nListEventAssembler.\n"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(37)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("TASK"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("Glazed Lists version 0.8 release"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Glazed Lists version 0.8 is the last release before Glazed Lists undergoes the major API change.\n\nGlazed Lists 0.8 will be a release that should be permanently available on the Glazed Lists webpage for \nexisting users, but such users should be encouraged to migrate to Glazed Lists 0.9.\n\nGlazed Lists v0.8 does not inlcude:\n - the renaming of APIs and classes\n - the new concurrency model\n\nIt depents upon the following issues:\n 33 - SortedList raw order support\n 34 - UniqueList sometimes does not forward events on a DELETE\n 29 - ToString on BasicEventList, MutationList no good\n 30 - Verify ListTable changeSizeRepaintAllThreshhold works"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This issue depends on the outstanding bugs in the 0.8 release. It does not require new features or \nenhancements."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("The 0.8 release can't be done until the SortedList is fixed and the UniqueList is finished (and verified)"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Version 0.8 was released on April 15, 2004."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(38)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P4"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("TableComparatorChooser icon can get out of sync"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("When the sorting of a list changes, the TableComparatorChooser fails to respond to this change \nappropriately. The TableComparatorChooser should show the proper icon, even if the sorted list's \ncomparator was selected elsewhere."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("kevinmaltby"); description.setWhen(null); description.setText("TableComparatorChooser now responds to sorting criteria changing externally."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(39)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P2"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("Sorting clears selection"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This problem will be very difficult to solve using the current Glazed Lists framework, but it is a valid \nproblem. Sorting clears the selection. \n\nThe only fix I can think of is to add a new type of event alongside INSERT, UPDATE and DELETE which is \ncalled MOVE. I think it is kind of an ugly hack on principal because it will impact all other lists if it is \nimplemented. \n\nI will have to give this one some more thought. Saving selection by value may be one option but that is \nalso rather a big ugly hack."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("The \"ideal\" solution looks like it will cause major headaches to the rest of the\nGlazed Lists code. I think we should consider implementing a simpler solution\nthat keeps the selection by value rather than by index. This solution is\nstraightforward to implement and will be immediately useful to Glazed Lists' users."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("After a bunch of thinking I have come to the conclusion that this solution can\nbe implemented without compromising the rest of Glazed Lists.\n\nHere is my idea:\nAdd an extra property to each change event called \"is reorder\". Such events will\nalways contain remove all and insert all events so that they can be processed as\nthey are currently by regular lists. But lists that are reorder-aware can view\nthe reorder property and get an array of reorder indicies. \n\nHaving reorder supported in lists like filter list will improve performance!\nSuppose a sorted list is filtered. Then if that list is resorted, each element\nis currently tested to see if it shall still be filtered. But if the filter list\nsupports reordering, it can use the reorder and not need to refilter."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This solution is mostly implemented! The only thing left is to add support for \nmultiple sorted lists in sequence. This will be necessary for UniqueList \nsupport!\n\nOh boy!"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I have added support to major classes: SortedList (and UniqueList), AbstractFilterList, & \nEventSelectionModel.\n\nI will also need to add support for minor classes: CachingList, FreezableList, CompositeList. I am \nconsidering adding a method forwardEvent(ListChanges c) to speed up lists like FreezableList that \nsimply propagate changes."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(40)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P2"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("Sorted List fails upon intensive filtering"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("SortedList fails upon an intensive amount of filtering. The SortedListTest must be updated to catch this \nfailure and the SortedList should also be fixed to remedy the problem.\n\n [junit] FILTER: 4, 5, 1, 6, 2, 3, 2, 8, 1, 3, \n [junit] SORTED: 1, 1, 2, 3, 2, 3, 4, 8, 5, 6,"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I was processing the events in the ListChangeEvent in a manner that was unsafe when there were \ninserts mixed with deletes.\n\nThe SortedList now fires all delete events first, and then goes on to handle the inserts and updates \nlater.\n"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(41)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("TASK"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("Glazed Lists version 0.9 release"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This issue depends upon all issues to be resolved for the 0.9 release.\n\nThese issues include the name refactoring and API stability.\n\nGlazed Lists 0.9 is a release intended to have 100% compatibility with 1.0. This includes:\n - class & package names\n - concurrency strategy\n - event sequence strategy"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This release depends upon the 0.9 issues."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("TO DO, left in this release, off the top of my head:\n* make final classes final\n* determine where EventList iterator/sublist goes\n* tutorial? may defer to 1.0\n* rename main package (ca.odell.glazedlists)\n* port Query stuff to use UniqueList, move package to migrationkit\n* move DEMO out of Javadocs (new demo for 1.0 definitely needed)\n* change TableFormat to not include configureTable() method"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Released!"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(42)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("Enable concurrent mutation list modifications"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Currently the reader/writer locks lock ALL lists when any mutation list is being modified (ie. re-sorted).\n\nThe reader/writer locks should be changed to only lock dependent lists when such a modification takes \nplace.\n\nThis applies to:\n - AbstractFilterList\n - SortedList\n - UniqueList\n - CachingList\n - and potentially others"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Fixed . . . now the SortedList and AbstractFilterList can sort or filter multiple lists with the same source \nsimultaneously. This uses the new InternalReadWriteLock which delegates locking to a pair of \nReadWriteLocks."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(43)); currentIssue.setStatus("NEW"); currentIssue.setPriority("P5"); currentIssue.setResolution(""); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("Potential deadlock in CachingList"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("The CachingList acquires a WriteLock when it may already have a ReadLock.\n\nThis is DANGEROUS! It is possible that two CachingLists may each have readlocks, and contest over a \nwrite lock to their doom!"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Simple solution: make CachingList.getReadLock() return the write lock."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(44)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P2"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("remove(object), clear() can have unwanted side effects"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Suppose we have a List \"alphabet\" containing \"A\", \"B\", \"C\", \"D\", \"E\", \"F\".\nIf we call alphabet.subList(1, 3).clear(), then the list alphabet should change to \"A\", \"D\", \"E\", \"F\".\nBut Glazed Lists clears the entire list alphabet.\n\nSimilar problems exist upon clearing filtered lists, etc.\n\nThis problem exists in the following List methods:\nclear()\nremove(Object)\nremoveAll(Collection)\nretainAll(Collection)"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Fixed! Hopefully, this doesn't ruin any code in place because the behaviour of SubList etc.\nare now correct. Existing code could possibly depend on the incorrect implementations!\nHopefully that does not prove to be a problem.\n\nThis fix allows us to do cool things, as I will demonstrate:\n\nSuppose we have a list, alphabet composed of { A, B, C, D, E, F, G, H, I, J, K }\nAnd we constructed a transformed list vowels, which filtered alphabet to { A, E, I }\nThen if we do vowels.clear(), we get the following result:\nalphabet becomes: B, C, D, F, G, H, J, K\n\nCool, no? This would be made more powerful with a better example. Perhaps a list of email addresses, \nand a filter list that picks the SPAM or whatever."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(45)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P2"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("ENHANCEMENT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("Add write functionality to UniqueList"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("The UniqueList should be writable. Some write methods to include:\n\nadd(), remove(), set() . . .\n\nThe most interesting ones to implement will be the remove() methods as they may require removing \nmultiple duplicates from the source list."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I have added write support to UniqueList.\n\nThere is an interesting problem posed by supporting writing in UniqueList, as well as writing in other \ncode already implemented via bug 44.\n\nMethods such as clear() on a filter list may call several remove() methods on the underlying source list. \nThese remove() methods fire the event listeners and other lists receive notification for each of many \nremoves within a clear. Such listeners will likely read from their source list to respond to the change, \nand it is possible that this source list is still in the process of changing due to the clear() method. \nTherefore:\n - such methods that call multiple changing methods on their source list must be in a consistent state \nfor each such method call\n - such methods must be implemented in a way that safely handles receiving a change event after each \nsource list modification.\n\nThese multiple source method calling lists are troublesome and it may be worthwhile to find a way to \nbundle a set of methods to invoke on a source list as a group. This is a sophisticated problem and will \nrequire some research. For the time being, guaranteeing consistency and event safety should be \nsufficient."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(46)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P4"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("UniqueList, FilterList fire multiple events for some operations"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("UniqueList.clear(), FilterList.clear(), SubList.clear() all can fire multiple ListEvents when only a single \noperation is performed upon them.\n\nThis can be fixed by causing such lists to not propogate changes until they are all done."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("These lists now only fire one event for the said operations. A new test class\nhas also been added to verify this behaviour."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(47)); currentIssue.setStatus("STARTED"); currentIssue.setPriority("P5"); currentIssue.setResolution(""); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("kevinmaltby"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("ENHANCEMENT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("Threshhold List"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Suppose we have a list of Objects, each of which has a date created.\n\nIt should be possible to create a filter that filters for where the date created is less than or greater than \na specified threshhold. This should be possible for any criteria that can take a range of values - in \neffect anything that is Comparable.\n\nCurrently this is possible using the AbstractFilterList, but it is not 'smart' enough to know how \nadjustments in the criteria require only a subset of the values to be readjusted. A clever implementation \nof this would use a sorted set, and binary search to find the seperator between those that meet the \ncriteria and those that do not.\n\nI was thinking a \"Date Slider\" Swing widget would be a good prototype of this!"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This non-critical issue is being marked low-priority until Glazed Lists 1.0 has\nbeen released."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("kevinmaltby"); description.setWhen(null); description.setText("assigned issue to myself"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("kevinmaltby"); description.setWhen(null); description.setText("I've hammered out some code towards the creation of this list that is yet to be \nin cvs, but hopefully by the end of the month this list should be available to \nthe world. My initial implementaion followed the design of UniqueList which \nprovides explicit sorting by wrapping a SortedList.\n\nHowever, during construction it occurred to me that the explicit sorting might \nnot be desirable. My second implementation sorts the list internally to keeps \ncalls to setThreshold() super fast, but does not enforce a particular sort \norder."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("kevinmaltby"); description.setWhen(null); description.setText("Well after roughly a month out of town, and 4 different versions of the code \nfor this feature, ThresholdList is nearing public release.\n\nWhile keeping the underlying sort order might offer some business value to this \ntransformation, doing so comes with a significant performance penalty. As \nsuch, I have returned to the earlier requirement for this transformation to \nexplicitly sort the list. The sorting is performed internally for performance \nreasons over simply wrapping a SortedList as UniqueList does.\n\nCurrently I am working to clean up the implementation a bit after having Jesse \ncode-review my classes. With any luck this code should be available within 2 \nweeks at the latest."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Kevin's code was 1000x better today than two weeks ago. He's modest, but today's code is really good.\n\nWe have added 3 public classes to the codebase:\n - ThresholdEvaluator interface gets an int from a given Object\n - ThresholdList, sorts and limits a list by a ThresholdEvaluator value\n - ThresholdRangeModelFactory - creates range models for use in a Slider\n\nThis stuff also lends itself to use with ComboBoxes and such!\n\nTo Do:\n - test the heck out of it\n - add Kev's tutorial page to website, revise tutorial\n - integrate into demo\n\nWe're almost done!"); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(48)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("Migrationkit's DynamicQueryList fails to forward events"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("The Migrationkit's DynamicQueryList class is not forwarding events."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has already been fixed.\n\nThe fix is NOT in the Glazed Lists 0.9 release, but it will be in the next Glazed Lists release. The fix is \nalso available via CVS."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(49)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("TASK"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("Tutorial v. 0.9"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Glazed Lists needs a new tutorial. It would be great if this tutorial involved a newer, more exciting and \nmore powerful demo app.\n\nMy current two ideas are:\n - a bugzilla XML browser\n - a Pop3 client\n\nSuch involve lots of lists and could take good advantage of Glazed Lists' ability to transform lists.\n\nThe demo should involve:\n - Multiple-criterea sorting\n - Text Filtering & Custom Filtering\n - UniqueList, UniqueList on a derived list\n - Transformed List\n - JTable, JComboBox & JList\n\nThe demo should not rely on third-party libraries or tools for simplicity."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("progress on this is going very well! I already have a preview of the tutorial\nonline, and a few more steps and it will be done.\n\nTodo: \n1. Concurrency\n2. CompositeList (?)\n3. Performance"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I've added Concurrency. \n\nThis tutorial needs to be revamped and sexed up, but I don't feel like doing it! I wonder if we can \nconvince one of our users to do it! ha ha ha."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(50)); currentIssue.setStatus("STARTED"); currentIssue.setPriority("P5"); currentIssue.setResolution(""); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("ENHANCEMENT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("SWT Support"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Glazed Lists does not support SWT. This toolkit is growing in importance and Glazed Lists is well suited \nfor this platform.\n\nSome things to consider:\n - I need an SWT 'expert', either by becoming one or by finding a volunteer\n - SWT compilation into the .jar file must be conditional. SWT support should be in source-form only \nand compiled only if SWT classes are available on the user's class path.\n - From my initial research, SWT is not as model-driven as Swing. Although this does not pose a \nproblem it may require a change in approach\n - We need to choose an SWT version to support. 3.0 is coming out soon but I have no idea what the \nactual SWT users in the field are using."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This non-critical issue is being marked low-priority until Glazed Lists 1.0 has\nbeen released."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I've added some SWT support to Glazed Lists!\n\nI ported the following classes from Swing to SWT:\n * EventTableModel (now EventTableViewer)\n * TableFormat\n * TextFilterList\n\nYet I still have some issues to resolve:\n * concurrency support in EventTableViewer\n * hitting ENTER in the TextFilterList\n * EventTableViewer handling column widths\n * EventTableViewer handling column alignment\n * EventTableViewer handling Images as cell contents\n * EventTableViewer sorting via clicking on the table's header\n\nSo I have my work cut out for me. SWT is not that tricky to hack on, but it is kind of a pain to get up \nand running.\n"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Today I added support for EventTableViewer keeping the Selection between ListChanges. The \nimplemented algorithm is simple and reliable but slow. It will be desirable to speed this up to support \nreally big tables!\n\nSWT is becoming a high priority at O'Dell Engineering so I think this bug will receive some well deserved \nattention."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Today I added some support for SWT's checked tables.\n\nThe classes are \"Checkable\" and \"TableCheckFilterList\". There are some limitations, however.\n* TableCheckFilterList inspects the table's check items so there may not be any TransformationLists \nbetween the TableCheckFilterList and the EventTableViewer.\n* Checkable objects may not be shared between tables.\n\nIf I can think of work-arounds or fixes for these limitations, I'll post another update.\n"); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(51)); currentIssue.setStatus("STARTED"); currentIssue.setPriority("P3"); currentIssue.setResolution(""); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("TASK"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("Implement Chunk Transfer Protocol client & servers"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("We have hacked out a basic plan for the initial network protocol for Glazed Lists.\n\nWe are going to use a layered protocol to isolate concerns:\n - \"Chunk Transfer Protocol\" is our base protocol. This is a simplification of HTTP/1.1 with chunked \nencoding. We would like Glazed Lists to work through HTTP proxies and HTTP-aware firewalls so this \nprotocol shall be a subset of HTTP/1.1.\n - \"Update Subscription Protocol\" is an update-push protocol that sits on top of CTP and adds some \napplication-specific features. This will initially consist of update sequencing. Eventual features for this \nare digitally signed updates, peer-to-peer support and NAT evasion.\n - Glazed Lists on the network will specify an encoding for list updates that can be transferred via USP. \n\nAll encodings must have the following properties:\n - well documented to allow for alternative implementations\n - extendible without breaking clients using previous versions\n - language and platform neutral\n - simple!\n\nAll that said, we need to implement the first step, Chunk Transfer Protocol. Here are the interfaces for \nthe initial version of CTP:\n\nCTPServerProtocol\nvoid sendResponse(int code, Map headers) throws CTPException;\nvoid sendChunk(byte[] data) throws CTPException;\nvoid close();\nCTPServerHandler\nvoid receiveGet(CTPServerProtocol source, String uri, Map headers);\nvoid connectionClosed(CTPServerProtocol source, Exception reason);\n\nCTPClientProtocol\nvoid sendGet(String uri, Map headers) throws CTPException;\nvoid close();\nCTPClientHandler\nvoid receiveResponse(CTPClientProtocol source, int code, Map headers);\nvoid receiveChunk(CTPClientProtocol source, byte[] data);\nvoid connectionClosed(CTPClientProtocol source, Exception reason);\n\nIt should be straightforward to create a simple implementation that uses sockets. This design should \nalso hopefully be extendable for use with Java's buffered IO, java.nio."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("About 90% of ChunkedTransferProtocol is implemented.\n\nLeft to do:\n - Buffer sizing, including setting the initial size & max size\n - Handling method calls from other threads\n - Listen port selection\n - Stop() method\n\nMy ChunkedTransferProtocol implementation has the following notes:\n - it starts its own thread that does all the networking via NIO\n - it uses a subset of HTTP that should slip nicely through proxy servers\n - it handles the case where the proxy removes chunking (although no Content-Length)\n - Server and client share the same connection class\n\nHaving come this far, I will leave the remaining four tasks until I have built more of USP on top of CTP. \nUSP is \"Update Subscription Protocol\", I will be creating an issue for tracking its development."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(52)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("Support 'nested' change events"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Adding support for nested change events may simplify the code and may even make it more powerful.\n\nCurrently, some classes such as TransformationList implement clear(), removeAll() etc. as a series of \nremove() calls. This fires a series of events when only one event should be fired.\n\nThe solution is to create 'nested' change events such as\nbeginNestedChange()\ncommitNestedChange()\n\nwhich can contain within it many calls to beginChange() / commitChange(), where such commits do not \nactually send the events."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I've added support for nested changes.\n\nThe new method is:\nbeginEvent(true), which means \"Begin an event with support for nested changes\"\nas an alternative to \"beginEvent(false) and beginEvent(), which mean \"Begin an\nevent that throws an exception when creating a nested change\".\n\nThis is already in use by clear(), removeAll() and retainAll() in\nTransformationList and replaceAll() in UniqueList. If implementing this in your\ncode, remember that Iterators behaviour will change if they stop receiving\nchange event notification.\n"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(53)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("Protected constructors on final classes"); description = new Description(); description.setWho("kevinmaltby"); description.setWhen(null); description.setText("Both ReadOnlyList and ThreadSafeList have protected constructors. This is most \nlikely in error, particularly because both classes are final. These should be \nmade public (I would do it but my CVS still doesn't want to work at my new \nplace)."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This was an easy fix. We have to get Kevin some CVS access!"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(54)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P2"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("EventSelectionModel does not support concurrency"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("In implementing EventSelectionModel we made some incorrect assumptions about\nmultithreading. The problem is that although the accessing thead will usually be\nthe event dispatch thread, we must be able to read the model while another\nthread is modifying the source list."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I have added concurrency support with an Internal lock."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(55)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("UniqueList events delete indicies that do not exist"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I ran into a problem when coupling EventSelectionModel\nand UniqueList, so I decided to enhance the ConsistencyTestList\nto verify that UniqueList is well behaved.\n\nFrom my tests, the UniqueList can sometimes delete indicies\nthat have not yet been created! For example, on a list of\nsize 5, it might delete at 6 and later on insert at 6 to\nretain size consistency.\n\nI am going to dive into the UniqueList code to attempt to\nfind the problem. Hopefully it is either a mis-reported\nproblem or an easy fix!\n\nTo reproduce, add the following line to the end of the\nUniqueList constructor, and run the JUnit tests.\n addListEventListener(new ca.odell.glazedlists.test.ConsistencyTestList(this,\n\"unique\"));\n\nThe (first of many) exception I received was:\n\n [junit] java.lang.Exception: unique/1 cannot delete at 2, size is: 2\n [junit] at\nca.odell.glazedlists.test.ConsistencyTestList.listChanged(ConsistencyTestList.java:63)\n [junit] at\nca.odell.glazedlists.event.ListEventAssembler.fireEvent(ListEventAssembler.java:248)\n [junit] at\nca.odell.glazedlists.event.ListEventAssembler.commitEvent(ListEventAssembler.java:221)\n [junit] at ca.odell.glazedlists.UniqueList.listChanged(UniqueList.java:152)\n [junit] at\nca.odell.glazedlists.event.ListEventAssembler.fireEvent(ListEventAssembler.java:248)\n [junit] at\nca.odell.glazedlists.event.ListEventAssembler.commitEvent(ListEventAssembler.java:221)\n [junit] at ca.odell.glazedlists.SortedList.listChanged(SortedList.java:174)\n [junit] at\nca.odell.glazedlists.event.ListEventAssembler.fireEvent(ListEventAssembler.java:248)\n [junit] at\nca.odell.glazedlists.event.ListEventAssembler.commitEvent(ListEventAssembler.java:221)\n [junit] at\nca.odell.glazedlists.AbstractFilterList.handleFilterChanged(AbstractFilterList.java:196)\n [junit] at\nca.odell.glazedlists.test.IntArrayFilterList.setFilter(IntArrayFilterList.java:33)\n [junit] at\nca.odell.glazedlists.test.UniqueListTest.testUpdateDeleteCollide(UniqueListTest.java:514)\n [junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n [junit] at\nsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)\n [junit] at\nsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)\n [junit] at java.lang.reflect.Method.invoke(Method.java:582)\n [junit] at junit.framework.TestCase.runTest(TestCase.java:154)\n [junit] at junit.framework.TestCase.runBare(TestCase.java:127)\n [junit] at junit.framework.TestResult$1.protect(TestResult.java:106)\n [junit] at junit.framework.TestResult.runProtected(TestResult.java:124)\n [junit] at junit.framework.TestResult.run(TestResult.java:109)\n [junit] at junit.framework.TestCase.run(TestCase.java:118)\n [junit] at junit.framework.TestSuite.runTest(TestSuite.java:208)\n [junit] at junit.framework.TestSuite.run(TestSuite.java:203)\n [junit] at\norg.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:325)\n [junit] at\norg.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:524)"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I have found the cause of this problem!\n\nThe problem is that UniqueList uses \"delayed inserts\". This means it does not\nadd into to the event list any insert events until all delete and update events\nhave been inserted.\n\nThe problem is that the delete indicies are all offset the insert indicies, and\nthe insert indicies are missing.\n\nHere is a simple example.\nI have a list \"A B\" that I change to \"C\".\n\nThe change event should be \"delete 0-1, insert 0\"\n\nBefore re-ordering, it is currently \"delete 1-2, insert 0\", which is wrong and\nillegal.\n\nThe solution is to keep an offset index that increments with every index, and\nthis value is subtracted from every delete.\n\nNow, all's left is implementation!"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("fixed! I would like Kevin to look over my fix to verify that I did the right thing!\n\nPerhaps we could add some more tests to verify that this kind of thing doesn't\nhappen again!"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(56)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P2"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("UniqueList replaceAll() can clear selection"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("The replaceAll() method should use UPDATE events whenever possible.\nCurrently it forwards DELETE/INSERT events that can clear selection.\n\nIn order for UniqueList to completely replace query lists, this functionality is\nabsolutely mandatory."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("After a bunch of thinking I have come to the conclusion that this solution can\nbe implemented without compromising the rest of Glazed Lists.\n\nHere is my idea:\nAdd an extra property to each change event called \"is reorder\". Such events will\nalways contain remove all and insert all events so that they can be processed as\nthey are currently by regular lists. But lists that are reorder-aware can view\nthe reorder property and get an array of reorder indicies. \n\nHaving reorder supported in lists like filter list will improve performance!\nSuppose a sorted list is filtered. Then if that list is resorted, each element\nis currently tested to see if it shall still be filtered. But if the filter list\nsupports reordering, it can use the reorder and not need to refilter."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Whoops! My bad. \n\nThe previous comment is supposed to be on Issue 39."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("From my analysis, this problem may require changing the way the UniqueList\nlistChanged() method is handled. I think that a 2-pass algorithm may remove all\nthe events that are currently not optimized.\n\nPass 1: Update the duplicatesList by inserting a non-duplicate for every\ninserted and updated value, remove all deleted values. Create a working array\ncontaining the previous values for each updated index: either DUPLICATE or\nNON-DUPLICATE\n\nPass 2: Iterate simultaneously through the update event and the previous value\narray. For each index, determine if it is now a DUPLICATE or NON-DUPLICATE and\ncompare that to the previous value. Forward events as necessary."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("As a consequence of much thought on Friday afternoon, this bug is very fixed and \nthe solution is awesome. Much thanks to Kevin for being my brain-storming buddy \non this solution.\n\nHorray!"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(57)); currentIssue.setStatus("NEW"); currentIssue.setPriority("P3"); currentIssue.setResolution(""); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("TASK"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("Glazed Lists version 1.0 release"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This issue depends upon all issues to be resolved for the 1.0 release.\n\nGlazed Lists 1.0 is the production-quality and feature-complete release of\nGlazed Lists. There are many issues that must be resolved for this release.\n\n - UniqueList replaceAll() can clear selection\n - CompositeList not thread-safe\n - Glazed lists on the network\n - Tutorial v. 0.9\n\nSome issues would also be 'nice-to-have' for 1.0. In particular:\n - Sorting clears selection (this may require a work-around implementation)\n\nAs of June 25 I am marking all non-1.0 issues as lowest priority. Such issues\nmay be removed at a later date if it is determined that they shall not be\nimplemented."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(58)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("ENHANCEMENT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("UniqueList and SortedList not optimized for contains and containsAll methods"); description = new Description(); description.setWho("kevinmaltby"); description.setWhen(null); description.setText("Current implementations of both SortedList and UniqueList do not take advantage \nof optimizations available since the lists are in sorted order. Namely, the \ncontains and containsAll methods could boast significant performance \nimprovements if they are optimized."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("kevinmaltby"); description.setWhen(null); description.setText("Adding this optimization to SortedList is simple. Overload contains with a one \nline method which returns true iff sorted.getNode returns non-null. For \ncontainsAll, simply iterate through the collection and call contains for each \nelement."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("kevinmaltby"); description.setWhen(null); description.setText("The enhancement for UniqueList must be a little more complex. For a simple and \nreasonably fast implementation, the underlying SortedList's contains and \ncontainsAll methods could be called. However, this produces very odd and \ncounter-intuitive best and worst cases. The best case is to have no duplicates \nin the UniqueList, since no duplicates would be repeatedly compared. This \nimplementation would yield a worst case of having n identical items in the \nUniqueList, or just one element in the compressed view."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("kevinmaltby"); description.setWhen(null); description.setText("However, these best and worst cases SHOULD be the exact opposite for a \nUniqueList. The above worst case SHOULD require only a single comparison for a \ncall to contains and SHOULD be the best case for searching a UniqueList. \nLikewise, the above best case should be the worst case as it would be the \nlargest possible set to search on.\n\nDue to the fact that the SparseList ADT isn't inherently a sorted set, further \noptimization is a little more tricky. I'm trying to come up with a good way to \ntake advantage of searching only the unique view. Any clever ideas?"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Implementation of this should simply use the public API method \"get(index)\" and\na binary search.\n\nThe following methods should also be implemented:\n indexOf()\n lastIndexOf()\n"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Fixed! Kevin added binary search methods to both these classes. 50% faster*.\n\n\n*based on 1 test."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(59)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("WORKSFORME"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("read-only access is broken once a ReadOnlyList is decorated by a writable list."); description = new Description(); description.setWho("kevinmaltby"); description.setWhen(null); description.setText("The error is not to be found in ReadOnlyList but as a consequence of layering \nwith ReadOnlyList.\n\nConsider the following:\n\nA BasicEventList containing aribitrary data.\n\nA ReadOnlyList wrapping that data to prevent changes.\n\nA SortedList wrapping the ReadOnlyList to provide a sorted view of that read-\nonly data.\n\nThis will scenario will allow a write operation on the SortedList."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("kevinmaltby"); description.setWhen(null); description.setText("This problem cannot be replicated with a fresh checkout of the source. I \nimagine my local copy of ReadOnlyList was out of sync due to some testing and \namidst my recent CVS troubles I had forgotten about the change. This issue \nshould be closed."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(60)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("SortedList fires insert & delete instead of updates"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("When updating a range of values in a sorted list, the sorted list sends a \nsequence of delete and insert events instead of update evetns, even if the order \ndoes not change."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I am very close to having a complete solution to this.\n\nThe current potential problems - \n - multiple updates co-existing with non-updated indices\n - updates with multiple copies of the same source value\n - high-performance (the current implementation has some O(n^2) methods)\n\nBut the solution is good and it seems to work. Oh boy!"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Upon further research, some discoveries:\n - multiple copies of the same value breaks because of the non-deterministic insert order in \nIndexedTree. I will try to fix this.\n"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("The \"non-deterministic\" insert order from before is a lie - it is actually just \"insert at head\" instead of \nthe preferred \"insert at tail\". This has been changed and now SortedList works with multiple values \nquite well!\n"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This fix for this issue was very involved and required the addition of two helper classes to SortedList, \nIndicesPendingDeletion, a wrapper around a TreeSet, and IndexNodePair, a union of a node and the \nindex from which it came."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(61)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P5"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("ENHANCEMENT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("SetEnabled(boolean) on EventSelectionModel"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("It would be great if we could disable changing of the table selection via a\nsetEnabled() method on EventSelectionModel.\n\nI'm not 100% sure this will work well with JTable & JList, but if possible, it\nwould make for a great addition to the JTable's existing functionality."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("EventSelectionModel.setEnabled(false) will now prevent the user from changing the selection.\n\nThe selection can still be changed however. If the list changes, the selection may change. For example, \nif a selected item is deleted, it will no longer be selected!"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(62)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P4"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("ENHANCEMENT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("SortedList indexOf() etc. make multiple tree calls"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("The current implementation of SortedList has a faster version of the methods indexOf, lastIndexOf and \ncontains. These methods perform binary searches of the list using the sorted ordering. These \noperations make O(log n) tree calls, each of which as an O(log n) cost. Total cost is O(log n * log n). For \nexample, on a tree of size 1000, this cost is O(100).\n\nThese methods can be made faster by using calls on the sorted tree. Such an implementation will have \na total cost of O(log n). For example, on a tree of size 1000, this cost is O(10).\n\nThe IndexedTree classes may need to be modified for new indexOf methods."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Revised priority, etc. of bug which were wrong."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Kevin implemented the fix, I am merely the reporter. Here is what Kevin had to say:\n\n\nSortedList Changes:\n\n- Fixed flawed comment for lastIndexOf()\n- Changed indexOf(), lastIndexOf(), and contains() so that they now call\n the corresponding method on the sorted tree to cut the cost down to\n one tree call from SortedList giving O(log(n)) runtime.\n- Removed now redundant binary search methods\n- Improved the IndexedTreeNodeComparator inner class to compare both\n standard Objects and IndexedTreeNodes to make this bug fix possible\n \nSortedListTest Changes:\n- Added an additional test to each of the indexOf() lastIndexOf() and contains()\n testcases to test on an empty list.\n \nIndexedTree Changes:\n\n- Added support for indexOf(), lastIndexOf() and contains()\n \nIndexedTreeNode Changes:\n- Implemented support for each of the new methods on the IndexedTree interface.\n\n"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(63)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P5"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("EventLists don't get garbage collected unless source list is garbage collected.."); description = new Description(); description.setWho("kevinmaltby"); description.setWhen(null); description.setText("With the current system, once an EventList is created it lives until the app \nterminates, or the source list is garbage collected. EventLists need to have \ndefined lifecycle methods, such as dispose() for example, to allow them to be \npicked up by gc() when you no longer need them.\n\nFor most applications the EventLists used to transform a source list will live \nfor the entire lifespan of the source list. However, it is concievable that an \napplication might destroy and create lists on a particular source over time and \nthose should be garbage collected when possible."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("kevinmaltby"); description.setWhen(null); description.setText("changed priority."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I've added a dispose() method to TransformedList.\n\nThe UniqueList overrides this method to manually dispose the SortedList, other chained lists should do \nthis too!"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(64)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("WORKSFORME"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("Multithreading problem in demo app & tutorial part 6."); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I get the following exception, I am assuming it is due to the issues being loaded before the GUI is \ncompletely constructed.\n\njava.lang.NullPointerException\n at IssuesUserFilter.filterMatches(IssuesUserFilter.java:74)\n at ca.odell.glazedlists.AbstractFilterList.listChanged(AbstractFilterList.java:138)\n at ca.odell.glazedlists.event.ListEventAssembler.fireEvent(ListEventAssembler.java:289)\n at ca.odell.glazedlists.event.ListEventAssembler.commitEvent(ListEventAssembler.java:256)\n at IssuesList.listChanged(IssuesList.java:82)\n at ca.odell.glazedlists.event.ListEventAssembler.fireEvent(ListEventAssembler.java:289)\n at ca.odell.glazedlists.event.ListEventAssembler.commitEvent(ListEventAssembler.java:256)\n at ca.odell.glazedlists.UniqueList.replaceAll(UniqueList.java:514)\n at IssuesList$IssuesRefreshTask.run(IssuesList.java:67)\n at java.util.TimerThread.mainLoop(Timer.java:432)\n at java.util.TimerThread.run(Timer.java:382)\nException in thread \"main\" java.util.ConcurrentModificationException: Cannot begin a new event while \nanother event is in progress\n at ca.odell.glazedlists.event.ListEventAssembler.beginEvent(ListEventAssembler.java:94)\n at ca.odell.glazedlists.event.ListEventAssembler.beginEvent(ListEventAssembler.java:72)\n at ca.odell.glazedlists.AbstractFilterList.handleFilterChanged(AbstractFilterList.java:199)\n at IssuesUserFilter.<init>(IssuesUserFilter.java:52)\n at IssuesBrowser.display(IssuesBrowser.java:43)\n at IssuesBrowser.main(IssuesBrowser.java:81)"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I tried to reproduce this problem and I can't. If anybody else can, could you please send a stack trace? \nThe stack trace provided is from an old revision as IssueUserFilter cannot throw a null pointer exception \non line 74 (as there are no dereferences on 74)."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I couldn't reproduce this problem. It is possible that another bug that has since been fixed was \nconfounding with this one?"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(65)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P1"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("Tutorial part 3 references outdated API"); description = new Description(); description.setWho("kevinmaltby"); description.setWhen(null); description.setText("Part 3 of the Tutorial references the old API for getFilterStrings() on \nTextFilterable."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I have added a new branch of tutorial, tutorial-0.9.1\nhttp://publicobject.com/glazedlists/tutorial-0.9.1/\n\nNote that although tutorial numbers equal Glazed Lists numbers, there may be some Glazed Lists \nreleases that skip a tutorial release. Also, the tutorial could be rewritten by someone a little less \nexperienced who can point out the finer details of Glazed Lists development! As an experienced user I \nthink I glossed over some things too much since they are too familiar to me!\n\nAlso the tutorial has been moved out of CVS and onto the website only. I have added a tutorial zip to \nthe java.net file archives."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(66)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P1"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("issues@glazedlists"); currentIssue.setSubcomponent("www"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("issues@glazedlists"); currentIssue.setShortDescription("SortedList fires empty events on setComparator"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("SortedList fires empty update events on setComparator(). This can throw off the EventTableModel etc.\n\napple.awt.EventQueueExceptionHandler Caught Throwable : \njava.lang.IndexOutOfBoundsException: bitIndex < 0: -1\n at java.util.BitSet.get(BitSet.java:459)\n at javax.swing.DefaultListSelectionModel.clear(DefaultListSelectionModel.java:277)\n at javax.swing.DefaultListSelectionModel.setState(DefaultListSelectionModel.java:489)\n at javax.swing.DefaultListSelectionModel.removeIndexInterval(DefaultListSelectionModel.java:544)\n at javax.swing.JTable.tableRowsDeleted(JTable.java:2971)\n at javax.swing.JTable.tableChanged(JTable.java:2874)\n at javax.swing.table.AbstractTableModel.fireTableChanged(AbstractTableModel.java:280)\n at ca.odell.glazedlists.swing.EventTableModel.listChanged(EventTableModel.java:118)\n at ca.odell.glazedlists.event.EventThreadProxy.listChanged(EventThreadProxy.java:44)\n at ca.odell.glazedlists.event.ListEventAssembler.fireEvent(ListEventAssembler.java:289)\n at ca.odell.glazedlists.event.ListEventAssembler.commitEvent(ListEventAssembler.java:256)\n at ca.odell.glazedlists.SortedList.setComparator(SortedList.java:321)\n at \nca.odell.glazedlists.swing.TableComparatorChooser.columnClicked(TableComparatorChooser.java:306)\n at \nca.odell.glazedlists.swing.TableComparatorChooser.mouseClicked(TableComparatorChooser.java:179)\n at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:212)\n at java.awt.Component.processMouseEvent(Component.java:5103)\n at java.awt.Component.processEvent(Component.java:4897)\n at java.awt.Container.processEvent(Container.java:1569)\n at java.awt.Component.dispatchEventImpl(Component.java:3615)\n at java.awt.Container.dispatchEventImpl(Container.java:1627)\n at java.awt.Component.dispatchEvent(Component.java:3477)\n at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)\n at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3207)\n at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)\n at java.awt.Container.dispatchEventImpl(Container.java:1613)\n at java.awt.Window.dispatchEventImpl(Window.java:1606)\n at java.awt.Component.dispatchEvent(Component.java:3477)\n at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)\n at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234)\n at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:184)\n at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178)\n at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170)\n at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This was an easy fix. The problem stems from when we added support to retain selection through a \nsort as we forgot to support 0-element lists in that case."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(67)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P4"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("0.9.1"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("core"); currentIssue.setIssueType("ENHANCEMENT"); currentIssue.setQAContact("jessewilson"); currentIssue.setShortDescription("SparseList makes 2 tree calls when 1 will suffice"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("SparseList models a list with some elements filtered out. This is accomplished using a tree whose nodes \ncontain two indices: relative to all elements and relative only to unfiltered elements.\n\nThe getIndex and getCompressedIndex methods are performed in two stages:\n - get the corresponding node\n - get the appropriate index for that node\n\nThis two-stage process can be condensed into one by adding a method to SparseList's nodes to \nperform this operation in one step.\n\nImplementing this performance enhancement will have the following Big-O impact:\n - Currently a getIndex() on a list of size 1000 takes O(10 + 10)\n - After the optimization, on a list of size 1000 this takes O(10)\n\nAlthough this is a very lowlevel optimization, it occurs in a frequently called method. The implementor \nshould record real-world times on getIndex and getCompressedIndex before and after the fix to see if \nthe real-world results compare to the theoretical ones."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Now speedier!\n\nI created a sample program that does repeated gets() from a FilterList.\nOriginally this program took 14 seconds to run.\nAfter the optimization, it takes 8.9 seconds!\n\nAlright! Only problem is that there aren't very many obvious optimizations left!"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(68)); currentIssue.setStatus("NEW"); currentIssue.setPriority("P3"); currentIssue.setResolution(""); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("0.9.1"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("file"); currentIssue.setIssueType("ENHANCEMENT"); currentIssue.setQAContact("jessewilson"); currentIssue.setShortDescription("Glazed lists on the filesystem"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Glazed Lists should store and retrieve list data using the filesystem.\n\nThe uses for this are numerous:\n - data caching\n - database style persistence\n\nIt would be desirable for such an implementation to be:\n - really, really easy to use\n - transactionable (preferrably using a supported API such as JTA)\n - very fault tolerant\n\nSee prevalayer for a more general-purpose implementation of this functionality.\n\nJava programmers would love to use an List API to persist data. This could be awesome."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("kevinmaltby"); description.setWhen(null); description.setText("I was pondering the implementation of this feature and I suddenly remembered an \narticle from an old JDJ. After making use of my JDJ Resource CD, I tracked it \ndown in Volume 8, Issue 11. The article is entitled \"Enabling a File System as \na Transactional Resource\". Some the work we will need to do to implement this \nfeature may have been partially solved in the article. Is it exactly what we \nneed? Probably not, but it's still worth a read.\n\nThe web version for any of you with digital subscriptions to the JDJ or access \nvia the Resource CD is:\n\nhttp://sys-con.com/story/?storyid=37798&DE=1"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("*** Issue 74 has been marked as a duplicate of this issue. ***"); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(69)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("0.9.1"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("core"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("jessewilson"); currentIssue.setShortDescription("Build fails on junit"); description = new Description(); description.setWho("pkuzel"); description.setWhen(null); description.setText("Default target excludes *Test classes by there is one not folowing the pattren.\n\ncompile:\n [mkdir] Created dir: /data/cvs/javanet/glazedlists/classes\n [javac] Compiling 82 source files to /data/cvs/javanet/glazedlists/classes\n [javac]\n/data/cvs/javanet/glazedlists/source/ca/odell/glazedlists/test/ThreadedCompositeRunner.java:10:\npackage junit.framework does not exist\n [javac] import junit.framework.*;\n [javac] ^\n [javac] Note: Some input files use or override a deprecated API.\n [javac] Note: Recompile with -deprecation for details.\n [javac] 1 error"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("pkuzel"); description.setWhen(null); description.setText("Created an attachment (id=3)\nA simple patch\n"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This was a total oversight on my behalf and has now been resolved."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(70)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P2"); currentIssue.setResolution("INVALID"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("0.9.1"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("swing"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("jessewilson"); currentIssue.setShortDescription("UI does not allow to remove sorting order"); description = new Description(); description.setWho("pkuzel"); description.setWhen(null); description.setText("TableComparatorChooser instals header UI that allow to select sort by mouse\nclicks order but it *cannot* be removed.\n\nExpected behaviour: on third click remove sorting by selected column."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This is the problem that I have not yet solved. The fix is\nfairly straightforward yet I do not know if it is natural.\nYou suggest the expected behavior of a 3rd click removing\nsorting. Although practical, this is not the behavior found\nin native Windows or Mac OS X tables. Mind you, I have\nnot yet seen another implementation of multiple-column\nsorting, so my experience is constrained to single column\nsorting.\n\nDo you think that this would be a worthwhile option to\nbe set on the TableComparatorChooser? I just think that\nbeing the same as Mac and Windows is preferable only\nbecause that will be the behavior that users will be most\nfamiliar with.\n\nLet me know what you think about this, and I will consider\nadding a method or changing the behavior."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Currently we have no compelling reason to change the behaviour. If I am presented with such, this bug \nmay be reopened!"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(71)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P2"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("0.9.1"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("core"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("jessewilson"); currentIssue.setShortDescription("Event API antipatterns"); description = new Description(); description.setWho("pkuzel"); description.setWhen(null); description.setText("ListEventListener:\n\n * <p>It is mandatory that the calling thread has obtained the write lock\n * on the source list. This guarantees the listener can read and write the\n * source list without obtaining any further locks.\n\nAFAIK it's pure antipattern. Commonly any event listener must not alter event\nsource synchronously to avoid:\n - dispatching out of date events to other listeners\n - infinite event loops\n\nListEvent & ListEventAssembler\n\nMy undertanding is that all clients get the same ListEvent object.\nUnfortunatelly ListEvent is mutable and therefore \"consumed\" by the first\nlistener. May be it should be cloned before firing it."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This was a documentation error. Fortunately we do not follow the terrible\npractices as suggested by our own documentation. The documentation has\nbeen corrected and we have made note that the source list shall not be changed\nin the handling of an event.\n\nThe documentation error has been corrected:\n * <p>It is mandatory that the calling thread has obtained the write lock\n * on the source list. This is because the calling thread will have written\n * to the source list to cause this event. This condition guarantees that\n * no writes can occur while the listener is handling this event.\n * It is an error to write to the source list while processing an event.\n"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(72)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("0.9.1"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("core"); currentIssue.setIssueType("TASK"); currentIssue.setQAContact("jessewilson"); currentIssue.setShortDescription("Note on issue 71"); description = new Description(); description.setWho("pkuzel"); description.setWhen(null); description.setText("I cannot edit issues. I had to fill next one. This one represents additional\nnote issue #71.\n\nRegarding event source mutability and event firing I can see that your solution\ncould work if EventAssembler fires updated events. I.e. if a listener changes a\nsource list then:\n - all already notified listeners get the event decribing the additional change\n - listener itself gets no event \n - all not yet notified listeners get an event desribing both original change\n and new change (blocks)\n\nIt could be hard to implement. Hopefully unit test could be simple."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Fortunately we do not have to worry about this problem.\n\nListeners are strictly not allowed to modify their source lists in the processing of list events, and that's \nfinal!\n\nFortunately if a listener does not like the contents of a source list, it is free to present and alternate \nview of that list that it likes better. We call these \"TransformationLists\" and they are the basis of this \nproject. \n\nFinally, for good measure:\nDO NOT MODIFY A LIST WHILE PROCESSING AN EVENT THAT IT SENT YOU! IT WILL MEAN BIG TROUBLE \nFOR YOU! PROBABLY A CONCURRENTMODIFICATIONEXCEPTION!"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(73)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P2"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("core"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("jessewilson"); currentIssue.setShortDescription("ArrayIndexOutOfBoundsException on J2SE 5.0 beta 2"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I got the following Exception upon starting the demo app.\n\ndeathstar:glazedlists$ java -jar glazedlists.jar \nException in thread \"AWT-EventQueue-0\" java.lang.ArrayIndexOutOfBoundsException:\nInvalid range for selection: 0-0, list size is 0\n at\nca.odell.glazedlists.swing.EventSelectionModel$EventListSelectionModel.setSubRangeOfRange(EventSelectionModel.java:420)\n at\nca.odell.glazedlists.swing.EventSelectionModel$EventListSelectionModel.removeSelectionInterval(EventSelectionModel.java:587)\n at javax.swing.JTable.checkLeadAnchor(JTable.java:2963)\n at javax.swing.JTable.tableRowsInserted(JTable.java:3079)\n at javax.swing.JTable.tableChanged(JTable.java:3013)\n at\njavax.swing.table.AbstractTableModel.fireTableChanged(AbstractTableModel.java:280)\n at ca.odell.glazedlists.swing.EventTableModel.listChanged(EventTableModel.java:118)\n at ca.odell.glazedlists.event.EventThreadProxy.run(EventThreadProxy.java:54)\n at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)\n at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)\n at\njava.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234)\n at\njava.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)\n at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157) at\njava.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149) at\njava.awt.EventDispatchThread.run(EventDispatchThread.java:110)"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Easy fix! I hope they fix the Java 5.0 though as this is lame. Currently the lameness is that if -1 is \npassed as an argument to any method, it is either a no-op or a selection clear."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(74)); currentIssue.setStatus("RESOLVED"); currentIssue.setPriority("P3"); currentIssue.setResolution("DUPLICATE"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("1.1"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("file"); currentIssue.setIssueType("ENHANCEMENT"); currentIssue.setQAContact("jessewilson"); currentIssue.setShortDescription("File based list"); description = new Description(); description.setWho("pkuzel"); description.setWhen(null); description.setText("Attached prototype implementation of file bases lists. It can be used as data\nholder (warpped by EventList) for huge lists. Implementation is not effecient on\nlist.remove()."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("pkuzel"); description.setWhen(null); description.setText("Created an attachment (id=4)\nSources\n"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("See bug #68.\n\nThat implementation will support all that is here, plus persisting a List so that it can be opened up later \nwhen the application is next started. The only problem with that implementation is that it is currently \nvaporware. This will do great for now!\n\n*** This issue has been marked as a duplicate of 68 ***"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("pkuzel"); description.setWhen(null); description.setText("Here I primarily addressed huge lists that does not fit into memory. I planned\nto wrap it into CachedFileList that would keep few last entries in memory and\ninteligently implements iterators to do not flush the cached entries.\n\nIt can be reused for long term persistence but with the same warning as Swing\nused - it's not designed for it and the serialization format can change. I was\ntempting to add a File parametrized contructor but I have resisted because long\nterm persistence introduces data format backward compatability issues (well with\nwrong clients, but it's too easy to code such client if everything seems to\nimplicitly work today). In my applications clients must explicitly iterate over\nlist and store its content.\n"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("The argument to avoid serializing a list for long-term use is compelling.\n\nWhen I get around to implementing issue 68, I will keep this in mind. \nI think a useful approach will be to create a \"Serialator\" class with a method such as \n byte[] toBytes(Object o)\nI could then create a default Serialiator that simply Serializes the Object.\n\nThis will allow users to use the Serializable interface or perhaps something with more longevity. The \nproblem with Serializable and Externalizable is that neither of them interoperate outside of Java very \neasily. By using a Serialator, we enable the user to spend the extra time to create binary representations \nof their data that interop either via files or even via the network. This way we get the best of both \nworlds. \n\nI will be sure to include options such as \"temporary\" for the eventual implementation of #68. And of \ncourse a \"Serialization Warning\" in the Javadoc."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(75)); currentIssue.setStatus("NEW"); currentIssue.setPriority("P2"); currentIssue.setResolution(""); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("0.9.1"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("net"); currentIssue.setIssueType("TASK"); currentIssue.setQAContact("jessewilson"); currentIssue.setShortDescription("Implement Resource Block Peer"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Originally I planned to create \"Update Subscription Protocol\" which was a publish/subscribe protocol for \nupdate events. This approach is nice because it is generic, yet I have realized that it is not flexible \nenough for any generic use!\n\nTherefore I suggest \"Block Resource Peer\", which is similar to the proposed Update Subscription \nProtocol, but with a few important differences:\n - clients can query upstream, for methods like get(i)\n - packet interpretation is left up to another class\n\nBlock Resource Peer must perform the following:\n - Crypto. Public key exchange and block signing\n - Blocking. Like chunking, but not at the mercy of proxy servers. Most of the time, 1 packet will \ncontain 1 HTTP chunk, and 1 HTTP chunk will contain 1 block\n\nEventually, I would like to add P2P to Block Resource Peer. This has the following implications:\n - A block from connection X may have been signed from Y which is upstream of X\n - Connections to a resource, rather than a particular host. Resources are replicated\n - Databases of hosts and resources\n\nTo simplify this:\n - Resources are named by their source host, but not available exclusively at that site\n - I shall design a URI for resources, \"glazedlists://host:port/resourcename\" may be a good start\n - Resource handlers should have methods to publish blocks and handle queries\n - Multiple resource publishers and subscribers per Block Resource Peer\n\nI have my work cut out for me. For starters I will design some interfaces and perhaps even draw some \ndiagrams!"); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(76)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P3"); currentIssue.setResolution("WORKSFORME"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("core"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("jessewilson"); currentIssue.setShortDescription("problem in EventListSelectionModel under Java 5"); description = new Description(); description.setWho("ildella"); description.setWhen(null); description.setText("I have another problem with Java5\nThis exception raises up. The same code works perfectly under 1.4.2\nI am testing the CVS version of glazedlists.\n\nException in thread \"AWT-EventQueue-0\" java.lang.ArrayIndexOutOfBoundsException:\nInvalid range for selection: 0-0, list size is 0\n at\nca.odell.glazedlists.swing.EventSelectionModel$EventListSelectionModel.setSubRangeOfRange(EventSelectionModel.java:387)\n at\nca.odell.glazedlists.swing.EventSelectionModel$EventListSelectionModel.removeSelectionInterval(EventSelectionModel.java:548)\n at javax.swing.JTable.checkLeadAnchor(JTable.java:2965)\n at javax.swing.JTable.tableRowsInserted(JTable.java:3081)\n at javax.swing.JTable.tableChanged(JTable.java:3015)\n at\njavax.swing.table.AbstractTableModel.fireTableChanged(AbstractTableModel.java:280)\n at ca.odell.glazedlists.swing.EventTableModel.listChanged(EventTableModel.java:118)\n at ca.odell.glazedlists.event.EventThreadProxy.run(EventThreadProxy.java:54)\n at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)\n at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)\n at\njava.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234)\n at\njava.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)\n at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)\n at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)\n at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I could not reproduce this bug. I think it is a duplicate of an earlier bug that has since been fixed.\n\nIn the included exception, the method removeSelectionInterval() calls setSubRangeOfRange() on \nline 548. But in my code from CVS, there is no such method call on line 548. Note that it is very \npossible that the tested system has different newline characters: \"\\n\" or \"\\r\\n\" which can \ncause a discrepancy in line numbers.\n\nI request that the bug's reporter, idella, please update to the latest version from CVS by doing a clean \ncheckout and verify that this bug still exists. Please include steps to reproduce!"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(77)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P2"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("0.9.1"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("swing"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("jessewilson"); currentIssue.setShortDescription("TableHeader indicator arrows point the wrong way"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Compare table header indicator arrows between Glazed Lists' TableComparatorChooser and native \napps. Glazed Lists' arrows point up when down and vice-versa. This should be verified on other \nplatforms!"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This was just a silly missing exclamation mark, as in if(isReverse()) should have been if(!isReverse())\n\nAn embarassing mistake to say the least. How come nobody caught this earlier!"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(78)); currentIssue.setStatus("CLOSED"); currentIssue.setPriority("P2"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("0.9.1"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("swing"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("jessewilson"); currentIssue.setShortDescription("EventThreadProxy in wrong package"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("The EventThreadProxy class depends on Java Swing. But that class is not in the swing package, rather it \nis in the event package.\n\nThis is a problem for building on VMs that do not support Swing such as GCJ."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("All fixed up, moved to the other package. It should have never been there in the first place.\n\nThis fix is more significant than you might expect for at least one project:\n - For a project at work, we are using Glazed Lists with SWT\n - We are compiling with GCJ\n - GCJ does not support Swing\n - Our project grabs the Glazed Lists source and then dumps the swing/ folder\n - The EventThreadProxy breaks our build, until now we had to delete it explicitly"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This bug has been fixed for two weeks with no problems. I am marking it closed."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(79)); currentIssue.setStatus("RESOLVED"); currentIssue.setPriority("P3"); currentIssue.setResolution("WONTFIX"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("0.9.1"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("core"); currentIssue.setIssueType("ENHANCEMENT"); currentIssue.setQAContact("jessewilson"); currentIssue.setShortDescription("TransformedList with a virtual entry"); description = new Description(); description.setWho("pkuzel"); description.setWhen(null); description.setText("I found usefull to code a list that adds a virtual entry to own end. This list\nis then used as source for UI component models.\n\nBackground: I have impelemented the logic in list rather than in models bacause\nI share the list source by multiple models and their respective views (form vs\ntable view)."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("pkuzel"); description.setWhen(null); description.setText("Created an attachment (id=5)\nThe source\n"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I think that this is a good idea and the submitted code is good.\n\nBut there already exists a more general solution in the code called \"CompositeList\".\n\nCompositeList allows you to concatenate EventLists and view them as one. For this problem, this would \nuse CompositeList in the following way:\n - CompositeList of 2 lists A and B\n - A is the EventList of interest\n - B is a BasicEventList with one entry, the 'virtual' entry\nAny action to de-virtualize the last entry would simply be to do A.addAll(B), B.set(0, new VirtualEntry());\n\nAgain, the provided code is good. But I don't see a very compelling reason to include it in the main \nGlazed Lists distribution simply because the provided code solves a rather specific problem. If it were \nmy application code I would keep the VirtualList, perhaps in a util/ package of my project."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(80)); currentIssue.setStatus("NEW"); currentIssue.setPriority("P2"); currentIssue.setResolution(""); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("0.9.2"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("core"); currentIssue.setIssueType("ENHANCEMENT"); currentIssue.setQAContact("jessewilson"); currentIssue.setShortDescription("AbstractFilterList.notifyFilterChanged() should have \"tighter\" and \"looser\""); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Suppose I have a TextFilterList where I have filtered out 9000 of 10,000 items.\nIf I edit the filter text to add a new word, it is impossible that any of the hiddne elements will appear \nbecause the filter is getting \"tighter\". By adding a new word, I can only filter-out and not filter-in.\n\nUnfortunately AbstractFilterList does not support the idea of \"tigher\" and \"looser\" and therefore in this \ncase all 10,000 elements will be re-examined when only 1000 will do.\n\nSimilarly if I remove a filter word, it is not possible that existing entries will filter-out, only filter in. This \nis a 'looser' refinement. The AbstractFilterList should only examine the 9000 hidden elements and not \nthe 1000 visible ones.\n\nThis will increase the performance of AbstractFilterList without much additional complexity. It should \nstill support overall changes where the new filter and old filter have no relationship."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(81)); currentIssue.setStatus("NEW"); currentIssue.setPriority("P4"); currentIssue.setResolution(""); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("0.9.2"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("core"); currentIssue.setIssueType("ENHANCEMENT"); currentIssue.setQAContact("jessewilson"); currentIssue.setShortDescription("JDBC support in Glazed Lists"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I think that people are using Glazed Lists as an alternative to a traditional database grids.\n\nI have been wondering whether or not it is possible to create a JDBCList that is backed by a SQL query. \nThere's a whole bunch of different problems that this could introduce, but if done right then Glazed \nLists would make a killer database grid.\n\nIt will require some thought and some tweaking to existing classes if we want to build this."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(82)); currentIssue.setStatus("NEW"); currentIssue.setPriority("P5"); currentIssue.setResolution(""); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("0.9.2"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("swing"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("jessewilson"); currentIssue.setShortDescription("TableComparatorChooser sort arrow indicators not right aligned"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This is the nit-pickiest issue yet. The TableComparatorChooser arrows don't look EXACTLY like the \nnative operating system, but they could.\nhttp://publicobject.com/glazedlists/sortedjtables/\n\nA summary of differences:\n label alignment is not LEFT on Windows\n label alignment is not context-sensitive on Windows or Mac OS X\n arrow alignment is not RIGHT on Mac OS X\n header is not blue for primary column on Mac OS X\n\nThis issue is low priority and should only be done if there's nothing better to do! Don't work on this \nbug!"); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(83)); currentIssue.setStatus("RESOLVED"); currentIssue.setPriority("P5"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("0.9.2"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("swing"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("jessewilson"); currentIssue.setShortDescription("TableComparatorChooser needs icons for new Java l&fs"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Java is getting better Look&Feel support and Glazed Lists should keep up with appropriate icons for the \nTableComparatorChooser.\n\nLook and feels currently supported by TableComparatorChooser:\n - Aqua\n - Metal\n - Windows\n\nLook and feels that need support\n - Ocean (J2SE 1.5+)\n - GTK\n - Windows XP\n\nHere's some screenshots to get started:\nhttp://java.sun.com/developer/technicalArticles/releases/j2se15/"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Created an attachment (id=6)\nSwingSet demo, this is what OCEAN looks like\n"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Created an attachment (id=7)\nAnother SwingSet demo picture for what OCEAN looks like\n"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I've attached some Ocean screenshots so that I can draw up some triangles for\nthat theme.\n\nAs for XP, I need to find a friend who will lend me their XP box for a few hours\nso I can get some screenshots of its icons.\n\nAs for GTK, the GTK theme does not make this task very easy. The GTK theme is\nskinnable itself, so an icon that looks good for one GTK user might look\nterrible for another GTK user. There might be a standard icon included in such\nskins, but I have no idea how to get at it. Also I would like to note that my\nSun box has the ugliest GTK theme known to man and it would be a crime against\nhumanity to make an icon that matches its theme. I think the \"Blue Curve\" theme\nis where all the GTK kids are at with their Redhat boxes and if I can get a hold\nof that, I'd be able to do a decent enough icon."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I've completed the Ocean triangles, you can view them right now at:\nhttp://publicobject.com/glazedlists/sortedjtables/\n\nAs for the others:\n Windows XP - I'm installing XP on a box tomorrow, so I should be able to do icons for it soon.\n GTK - I think my best bet is to copy the set from Evolution 2.0, if I can get that on a machine\n Synth - Not before mentioned skinnable L&F. Obviously I will need code support for this via setIcons() \nor perhaps inspecting the synth XML file or something? I don't know if it supports extensions but that \nwould be really slick. Programmable access will be necessary regardless for canned skins."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("The XP skin is now complete.\n\nAll that is left is GTK & Synth. GTK will be deferred until requested, or I get bored and want to draw 'em \nup. Synth will require me to look into how to make synth skins. I haven't yet seen any, so I'm going to \nput that on hold also. When the Synth skins first start popping up, then I'll do some investigation!\n\n"); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(84)); currentIssue.setStatus("NEW"); currentIssue.setPriority("P4"); currentIssue.setResolution(""); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("0.9.2"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("swing"); currentIssue.setIssueType("ENHANCEMENT"); currentIssue.setQAContact("jessewilson"); currentIssue.setShortDescription("TextFilterList optimization via caching results"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Currently TextFilterList does a full-text search on ALL of the Strings returned from getFilterStrings() for \nALL Objects in the list. In many cases this will contain a lot of redundant searches. Suppose we have a \nprogram like mCube where the data is songs. Each song has an album and and an artist and there is a \nlot of duplication among album and artists for names. Currently if I have 25 items all with the artist \n\"Limp Bizkit\", then that string will be searched 25 times on a Glazed Lists filter.\n\nMy idea is to cache the result of a String matching a pattern, so that if that exact same String is found \nagain, then the result can be returned faster than normal.\n\nOf course there are some requirements. Finding a cached String has to be an order of magnitude faster \nthan searching the string itself. \n - the normal hashCode() method on String might not be fast. I think it examines every character. It \nmay cache the result however, in which case a HashSet would be a useful datastructure to start\n - using a Collection of successes and a Collection of failures. For each filter string, we could first \ncheck for its presence in either set before attempting to perform the actual match. After finding a \nmatch or not, the String could be placed in one of the Collections.\n - Collections could be limited in size to only the most popular entries to keep searches fast! This \nwould allow for an O(1)-style filtering in best cases\n\nThis will require experimentation. But it is a FUN problem!"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("It is important to note that the chance of collision is much higher when the string is smaller.\nSmaller strings tend to have \"token\" values, wheras long strings will more likely be unique descriptions.\n\nExample: \"P3\", \"jessewilson\", \"ENHANCEMENT\" and \"0.9.2\" are more likely to be repeated than say, this \ndescription. It might be worthwhile to determine a cut-off like 32-characters to differentiate between \nStrings that would be worth caching or not."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(85)); currentIssue.setStatus("RESOLVED"); currentIssue.setPriority("P4"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("0.9.2"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("swing"); currentIssue.setIssueType("ENHANCEMENT"); currentIssue.setQAContact("jessewilson"); currentIssue.setShortDescription("Convenience constructors for automatic TableFormats"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Writing a TableFormat is quite a dry experience. It seems like every TableFormat I write is nearly \nidentical and creating them is very mechanical.\n\nTherefore I propose some convenience constructors for EventTableModel that do not require me to \ncreate a boring TableFormat, rather I should be able to specify using Strings how my TableFormat shall \nlook.\n\nFor example, to create an EventTableModel to display Issue objects, this would be a decent constructor:\nList columns = Arrays.asList(new String[] { \"ID\", \"Priority\", \"Description\" });\nList fields = Arrays.asList(new String[] { \"id\", \"priority\", \"shortDescription\" });\nEventTableModel etm = new EventTableModel(myIssuesList, columns, fields);\n\nThe EventTableModel could then use reflection to create a custom TableFormat that fits my needs. In \nthis case, \"ID\" would correspond to a \"getId()\" method in the list objects and \"shortDescription\" would \ncorrespond to a \"getShortDescription()\" method in the list objects. All with simple JavaBeans and \nreflection.\n\nFinally, it might also be desirable to create a TableModel that takes a ResultSet as a parameter and \nexpects objects as either database rows or Lists of row columns.\n\nThe whole idea here is to make it so that we can create applications with less code. Note that if \nimplemented, this would be a very bad thing to feature in a tutorial since it is runtime checked and \nerrors cannot be caught by Mr. Javac."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Done. I sent out a survey to the mailing list on this to see what the best way to expose this functionality \nwould be.\n\nMost users said it would be best simply to provide an alternate constructor to EventTableModel that did \nthe construction of by BeanTableFormat automatcally. So this is how it now works!\n\nThere is a brief caution on the use of this with respect to reflection. It is also dangerous because typos \nin method names will not be checked until runtime."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(86)); currentIssue.setStatus("RESOLVED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("0.9.2"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("core"); currentIssue.setIssueType("ENHANCEMENT"); currentIssue.setQAContact("jessewilson"); currentIssue.setShortDescription("Convenience constructor for automatic Filterators"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Bug 85 is \"Convenience constructors for automatic TableFormats\". The fix for this was to use reflection \nto do automatic construction of TableFormat objects. \n\nWe could do something very similar for automatic Filterators. Simply inspect the class in use and use all \nof its methods that return a String. This might not have great performance due to some classes which \ndo lookups in such methods, but it would be a great helper for most simple filter classes.\n\nThis is a convenience-type of enhancement. It must be noted in its Javadocs that use of this method \nmay cause a performance hit in some cases."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Fixed. See the new constructor for TextFilterList."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(87)); currentIssue.setStatus("RESOLVED"); currentIssue.setPriority("P5"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("0.9.2"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("core"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("jessewilson"); currentIssue.setShortDescription("GlazedLists is inconsistent in what exception is thrown on bounds checking"); description = new Description(); description.setWho("kevinmaltby"); description.setWhen(null); description.setText("Our volatile implementation classes follow suit with ArrayList and other \nmembers of the Collections framework by throwing IndexOutOfBoundsExceptions \nwhen range checking fails. The TransformedList throws \nArrayIndexOutOfBoundsExceptions on range checking failures. As a result any \nlist which overrides a method that takes an index may throw different exception \ntypes depending on its implementation details. A minor inconsistency but worth \nmentioning nonetheless. I haven't checked yet how many classes are affected by \nthis."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("kevinmaltby"); description.setWhen(null); description.setText("A related inconsistency can be found in the volatile IndexedTree ADT (and I \nassume the SparseList ADT) which throws a NullPointerException when a get() is \ncalled on an empty list. ArrayList throws an IndexOutOfBoundsException in that \ncase.\n\nI would agree with anyone who says that this issue is almost a tad on the \nexcessive, but it's still worth mentioning, even at priority 5."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Well I fixed bug 87, albeit perhaps not in the most 'agreeable' way.\n\nHeres the problem with fixing the bug in the IndexedTree class:\n - its used only internally\n - many classes (ie. SortedList) call get() hundreds of times, none of those are ever out-of-bounds\n - high performance is going to be a very important issue for SortedList, so we are going to avoid at all \ncosts slowing that down\n\nSo I fixed it in CachingList instead. The new rule is that IndexedTree will blow up violently if you violate \nits preconditions, so classes that use it should be careful to verify that they are not violating its \npreconditions.\n\nPretty much my strategy is this:\n - create a user-friendly front end (ie. SortedList, CachingList) that does all the necessary due-process \nand range checks\n - create high performance backend (ie. IndexedTree, SparseList) that have strict requirements on \nparameters etc., but do no unnecessary checks or whatever. \n - in that high performance backend, use the assert() keyword to enable appropriate checking when \nnecessary to verify that the code is in fact correct\n\n"); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(88)); currentIssue.setStatus("RESOLVED"); currentIssue.setPriority("P3"); currentIssue.setResolution("INVALID"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("0.9.2"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("swing"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("jessewilson"); currentIssue.setShortDescription("TableFormat may receive null Object"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("TableFormat may be passed a null Object for a list that never contains nulls.\n\nThis happens when an element is deleted on a worker thread, but the EventTableModel has not yet \nbeen notified on the event dispatch thread, and the event dispatch thread is now asking to paint the \ndeleted element.\n\nThe null should simply be rendered as null. The renderers should be tolerable, that is much more \nappropriate than the TableFormat."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I must have forgotten.\n\nThis bug is already fixed. It is NOT necessary to check for null in your TableFormat class."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(89)); currentIssue.setStatus("STARTED"); currentIssue.setPriority("P3"); currentIssue.setResolution(""); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("0.9.2"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("swing"); currentIssue.setIssueType("TASK"); currentIssue.setQAContact("jessewilson"); currentIssue.setShortDescription("Validate performance of TextFilterList"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("TextFilterList uses regular expressions to do searching. Is this really faster? This claim must be \nvalidated.\n\nIf regex is not faster, TextFilterList should use an alternative text searching system."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I've been doing some thinking on how to speed this stuff up....\n\nRegex uses a DFA to walk through the strings, one character of input at a time. It may not be \nridiculously fast for my purposes.\n\nindexOf works, but it requires a call to toUpperCase(), which is already slower than regex.\n\nA custom solution may be the ultimate solution to this problem. We learned about fast searching \ntechniques in CS 240 at U of W, this might be the best way to go."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I've given this some further thought. What we really need is a test program that tests the performance \nof TextFilterList with meaningful real-world data. Therefore I have come up with a strategy.\n\nI will develop a test program that reads test files, runs them through the TextFilterList and times its \nperformance. It will then write the total time to the console. The test program can verify speed AND \ncorrectness.\n\nThe test file is made up of a series of serialized objects.\n 1. A List of Strings, each String a the 'query String' for a separate test\n 2. A List of Integers, each corresponding to the number of results expected from String #1.\n 3. The test data. This is a List of \"test data objects\". For simplicity, a test data object itself is simply an \nArrayList full of Strings.\n\nNow here are some test data that I think would be reasonable:\n - The ID3 data from my entire MP3 collection. Each MP3's gets one ArrayList full of Strings. These \nstrings are short and there's lots of duplication.\n - The entire Mozilla issue database. This is a mix of short and longs strings with lots of duplication.\n - Some articles from a website. This is a single really long String.\n\nBuilding this will take some time, but it will make it possible to implement competing algorithms and to \nsee how they actually will perform in practice."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I've run some simple performance tests and the performance is GOOD, but not GREAT.\nFiltering a quarter-million medium elements takes about 7 seconds on my PowerBook 1.3GHz\nFiltering 2500 medium elements takes about 0.2 seconds on my PowerBook\n\nThis sounds good, but the smart people at Google.com filter a hell of a lot more faster. Mind you they \nhave more hardware, but I think we can significantly improve this.\n\nOne new idea - is there a benefit to doing lookups on filter strings upon loading the data to build an \nindex?\n\nHere's the before-mentioned results:\n--- 2 filters of Mozilla.org's bug database of 260,836 takes 14.2s ---\nslackette:glazedlists$ java -Xmx1000000000 -classpath classes/ \nca.odell.glazedlists.swing.test.TextFilterPerformance mozillabugs.tfpt \nReading input\nRead input, 260836 elements\n\nFilter 0: frameset, expect: 327\nFilter 1: java PC @sun.com, expect: 320\n\nRunning... done. Time: 14187ms\n\n--- and 4 filters with my MP3 collection of 2569 takes 0.8s ---\nslackette:glazedlists$ java -classpath classes/ ca.odell.glazedlists.swing.test.TextFilterPerformance \nmp3collection.tfpt \nReading input\nRead input, 5138 elements\n\nFilter 0: Limp, expect: 79\nFilter 1: Bizkit, expect: 79\nFilter 2: file 128 44100, expect: 508\nFilter 3: iTunes Music jessewilson, expect: 2568\n\nRunning... done. Time: 768ms\n"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I've looked at this and apparently regex was NOT a genius idea. It's performance was okay but I have \nalready built a simpler better replacement. The new method \"caseInsensitiveIndexOf()\" is just as fast (in \nmy tests).\n\nFrom here, I think it is time to implement something faster.\nI think I will try the Boyer-Moore algorithm as the next step in my performance quest."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(90)); currentIssue.setStatus("NEW"); currentIssue.setPriority("P5"); currentIssue.setResolution(""); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("0.9.2"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("core"); currentIssue.setIssueType("ENHANCEMENT"); currentIssue.setQAContact("jessewilson"); currentIssue.setShortDescription("SparseList uses multiple nodes when one will do"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("The innovation of SparseList is that null values do not require a node Object.\n\nThis means that in a list of 10,000, if 3000 elements are null, then only 7000 nodes are required.\n\nIt should also be possible to create a SparseList where sequential non-null values are collapsed into one \n'supernode'. This means that a list of 10,000 where all elements are the same, then only one node will \nbe needed.\n\nThis would be useful to make AbstractFilterList scale better! Currently it uses O(N) to provide filtering \nservices to a list of size N, even if its filtering services are not used. With this strategy, it only requires \nnodes when its filter is in use.\n\nThis will add complexity but should yeild a measurable performance benefit."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(91)); currentIssue.setStatus("RESOLVED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("current"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("core"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("jessewilson"); currentIssue.setShortDescription("EventListIterator falls in a loop"); description = new Description(); description.setWho("ildella"); description.setWhen(null); description.setText("Sometimes my app hangs up, using 100% CPU.\nI have tracked the problem, and found that the loop happens in\nEventListIterator.listChanged() where the first line is\n\nwhile(listChanges.next())\n\nand I think this is the cause of the loop."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Additional comments, emailed from Daniele Dellafiore:\n\nI have submitted issues 91, but I can't add comment on it.\nhttps://glazedlists.dev.java.net/issues/show_bug.cgi?id=91\n\nI have some news, so I will write here.\n\nListChanges.next() method falls in the loop.\nWhen the loop occurs, the first call to next fall in the \"if\" part of the if-else statement.\nBeginning from the second call, the \"else\" part is executed infinitely.\n\nThe call sequence is:\n\nWeakReferenceProxy.listChanged()\n\nin this method is called, within else statement\n\nproxyTarget.listChanged(listChanges);\n\nwhere proxyTarget is a EventListIterator instance, and the loop occurs here, because listChanges.next \nalways returns true.\n\nI do not receive any exceptions, so I do not have a stack trace.\n\n\nIf you want to see the loop in action, you can have a look to CVS code of mcube project: run it and try \nto click on the buttons to sort a table. If you click two times quickly on the same button, you can see \nthat applications start using 100% CPU.\n\nI do not exclude that there could be some issue in my code, but right now I have only figured out the \nloop, not it's cause. Maybe you can help me in understanding what could this cause be.\n\nThanks, bye.\n"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This an excellent bug report led to a very fast fix.\n\nThe problem was that the ListEventAssembler was creating 'reorder' events of size 0. Usually this does \nnot happen because the SortedList does not pass events when its size is 0. But if you have say, an \nEventSelectionModel, it is possible that it will create such events.\n\nThe problem has been solved.\n\nThanks again for the EXCELLENT and HELPFUL bug report."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(92)); currentIssue.setStatus("STARTED"); currentIssue.setPriority("P3"); currentIssue.setResolution(""); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("0.9.3"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("core"); currentIssue.setIssueType("TASK"); currentIssue.setQAContact("jessewilson"); currentIssue.setShortDescription("Glazed Lists version 0.9.3 release"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Glazed Lists requires a release before October 25, 2004.\n\nThis should be a polish-release with the following changes:\n - no more migrationkit\n - Javadoc warnings where appropriate (for untested code, unfinished code, concurrency)\n - Demo as WebStart"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I've refined the Javadocs for all the public *List classes.\nI've created a migrationkit .jar which is available here:\nhttps://glazedlists.dev.java.net/files/documents/1073/7976/glazedlists-0.8-migrationkit.jar"); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(93)); currentIssue.setStatus("STARTED"); currentIssue.setPriority("P2"); currentIssue.setResolution(""); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("0.9.3"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("core"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("jessewilson"); currentIssue.setShortDescription("Multiple source support"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Glazed Lists does not support EventLists that have multiple sources.\n\nSee thread, \"ArrayIndexOutOfBoundsException\" on the users@ mailing list."); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("I've added support for multiple sources in Glazed Lists!\n\nThis has required one major change to the API.\nEventList now has a method, getPublisher() which returns an EventListPublisher.\n\nThis is so that EventLists can share EventListPublishers if they are chained. The EventListPublisher keeps \ntrack of all listeners and their dependencies. When a change is forwarded, all dependencies are \nmanaged to ensure the change is propagates in a safe sequence.\n\nThere are still some outstanding issues with this implementation, but it is a good start.\nOutstanding issues:\n - no support for events other than ListEvent\n - no support for CompositeList\n\nHopefully I can fix these issues soon!"); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(94)); currentIssue.setStatus("NEW"); currentIssue.setPriority("P5"); currentIssue.setResolution(""); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("0.9.3"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("core"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("jessewilson"); currentIssue.setShortDescription("issues.xml is 104 KB"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Glazed Lists .jar file includes a 104 KB file \"issues.xml\" for the demo applet.\n\nIncluding this file is okay. Including 104 KB is ridiculous.\n\nTrim the file and update it to the latest issue set!"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("This is actually only 7KB compressed, but trimming it won't hurt anyway.\n\nAnd updating it is definitely worthwhile."); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; currentIssue = new Issue(); currentIssue.setId(new Integer(95)); currentIssue.setStatus("RESOLVED"); currentIssue.setPriority("P3"); currentIssue.setResolution("FIXED"); currentIssue.setComponent("glazedlists"); currentIssue.setVersion("0.9.3"); currentIssue.setAssignedTo("jessewilson"); currentIssue.setSubcomponent("swing"); currentIssue.setIssueType("DEFECT"); currentIssue.setQAContact("jessewilson"); currentIssue.setShortDescription("TableComparatorChooser breaks when column count changes"); description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("TableComparatorChooser breaks violently with a NullPointerException when the number of columns is \nchanged.\n\nInstead, TableComparatorChooser should simply adjust to the column change.\n\nThe only problem with this is that some columns may have extra comparators set for them. Figuring \nout how to do this correctly may be tricky!"); currentIssue.getDescriptions().add(description); description = null; description = new Description(); description.setWho("jessewilson"); description.setWhen(null); description.setText("Fixed! Additional comparators are thrown out when the TableFormat is changed. This may be a drag, \nbut there are much better ways to turn on and off columns if that is to be desired.\n\nSee the mailing list for sample code that uses the TableColumnModel for this purpose:\nhttps://glazedlists.dev.java.net/servlets/ReadMsg?list=users&msgNo=234"); currentIssue.getDescriptions().add(description); description = null; issues.add(currentIssue); currentIssue = null; return issues; } | 10062 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10062/3f5c1bc8959d4b329dc98cd738a87e40f60ad957/Issue.java/clean/source/ca/odell/glazedlists/demo/Issue.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
987,
1262,
17316,
1435,
288,
3639,
987,
8296,
273,
394,
2407,
5621,
3639,
11820,
783,
12956,
273,
446,
31,
3639,
6507,
2477,
273,
446,
31,
3639,
783,
12956,
273,
394,
11820,
56... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
987,
1262,
17316,
1435,
288,
3639,
987,
8296,
273,
394,
2407,
5621,
3639,
11820,
783,
12956,
273,
446,
31,
3639,
6507,
2477,
273,
446,
31,
3639,
783,
12956,
273,
394,
11820,
56... |
FileWriter writer = new FileWriter(fileName); | FileWriter writer = new FileWriter(m_fileName); | public void saveSchedules(String fileName) throws ServletException { if (fileName == null) { throw new ServletException("Saving to outage factory not implemented yet!"); } else { try { FileWriter writer = new FileWriter(fileName); Marshaller.marshal(m_outages, writer); writer.close(); } catch (MarshalException e) { throw new ServletException("Unable to unmarshal "+fileName, e); } catch (ValidationException e) { throw new ServletException("Invalid xml in file "+fileName, e); } catch (FileNotFoundException e) { throw new ServletException("Unable to locate file "+fileName, e); } catch (IOException e) { throw new ServletException("Error reading file "+fileName, e); } } } | 47678 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47678/306bca6f000f6e6fe39a9e6bbacae8feae1f0730/ScheduleEditorServlet.java/buggy/src/web/src/org/opennms/web/admin/schedule/ScheduleEditorServlet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
1923,
27073,
12,
780,
3968,
13,
1216,
16517,
288,
5411,
309,
261,
17812,
422,
446,
13,
288,
7734,
604,
394,
16517,
2932,
24660,
358,
596,
410,
3272,
486,
8249,
4671,
4442,
1769... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
1923,
27073,
12,
780,
3968,
13,
1216,
16517,
288,
5411,
309,
261,
17812,
422,
446,
13,
288,
7734,
604,
394,
16517,
2932,
24660,
358,
596,
410,
3272,
486,
8249,
4671,
4442,
1769... |
public static void addOperation(BugzillaReport bugReport, BUGZILLA_OPERATION opcode, String userName) { Operation newOperation = null; switch (opcode) { case none: newOperation = new Operation(opcode.toString(), "Leave as " + bugReport.getStatus() + " " + bugReport.getResolution()); newOperation.setChecked(true); break; case accept: newOperation = new Operation(opcode.toString(), OPERATION_LABEL_ACCEPT); break; case resolve: newOperation = new Operation(opcode.toString(), OPERATION_LABEL_RESOLVE); newOperation.setUpOptions(OPERATION_OPTION_RESOLUTION); for (BUGZILLA_RESOLUTION resolution : BUGZILLA_RESOLUTION.values()) { newOperation.addOption(resolution.toString(), resolution.toString()); } break; case duplicate: newOperation = new Operation(opcode.toString(), OPERATION_LABEL_DUPLICATE); newOperation.setInputName(OPERATION_INPUT_DUP_ID); newOperation.setInputValue(""); break; case reassign: String localUser = userName; newOperation = new Operation(opcode.toString(), OPERATION_LABEL_REASSIGN); newOperation.setInputName(OPERATION_INPUT_ASSIGNED_TO); newOperation.setInputValue(localUser); break; case reassignbycomponent: newOperation = new Operation(opcode.toString(), OPERATION_LABEL_REASSIGN_DEFAULT); break; case reopen: newOperation = new Operation(opcode.toString(), OPERATION_LABEL_REOPEN); break; case verify: newOperation = new Operation(opcode.toString(), OPERATION_LABEL_VERIFY); break; case close: newOperation = new Operation(opcode.toString(), OPERATION_LABEL_CLOSE); break; default: break;// MylarStatusHandler.log("Unknown bugzilla operation code recieved", BugzillaRepositoryUtil.class); } if (newOperation != null) { bugReport.addOperation(newOperation); } } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/204dad24d2ed955fd888f1486a2d34f0b27d0705/BugzillaRepositoryUtil.java/clean/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaRepositoryUtil.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
225,
760,
225,
918,
225,
527,
2988,
12,
19865,
15990,
4820,
225,
7934,
4820,
16,
225,
10937,
43,
62,
2627,
2534,
67,
22040,
225,
11396,
16,
225,
514,
225,
12065,
13,
225,
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,
225,
202,
482,
225,
760,
225,
918,
225,
527,
2988,
12,
19865,
15990,
4820,
225,
7934,
4820,
16,
225,
10937,
43,
62,
2627,
2534,
67,
22040,
225,
11396,
16,
225,
514,
225,
12065,
13,
225,
288,... | ||
abstract public Object getTransferData ( DataFlavor flavor ) throws UnsupportedFlavorException, IOException; | Object getTransferData ( DataFlavor flavor ) throws UnsupportedFlavorException, IOException; | abstract public Object getTransferData ( DataFlavor flavor ) throws UnsupportedFlavorException, IOException; | 45713 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45713/b37b39a8e8ee762cc74efa7e8d06368d13147150/Transferable.java/buggy/libraries/javalib/java/awt/datatransfer/Transferable.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
8770,
1071,
1033,
336,
5912,
751,
261,
1910,
2340,
9444,
19496,
262,
1216,
7221,
2340,
9444,
503,
16,
1860,
31,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
8770,
1071,
1033,
336,
5912,
751,
261,
1910,
2340,
9444,
19496,
262,
1216,
7221,
2340,
9444,
503,
16,
1860,
31,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
for (ThrownExceptionIterator i = iterator(); i.hasNext(); ) { | for (ThrownExceptionIterator i = iterator(); i.hasNext();) { | public String toString() { StringBuffer buf = new StringBuffer(); buf.append('{'); boolean first = true; for (ThrownExceptionIterator i = iterator(); i.hasNext(); ) { ObjectType type = i.next(); if (first) first = false; else buf.append(','); boolean implicit = !i.isExplicit(); if (implicit) buf.append('['); buf.append(type.toString()); if (implicit) buf.append(']'); } buf.append('}'); return buf.toString(); } | 7352 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7352/4748a5a9b76f3dd763ee6bc7755c932a711bd6a6/ExceptionSet.java/clean/findbugs/src/java/edu/umd/cs/findbugs/ba/ExceptionSet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
1762,
1435,
288,
202,
202,
780,
1892,
1681,
273,
394,
6674,
5621,
202,
202,
4385,
18,
6923,
2668,
95,
8284,
202,
202,
6494,
1122,
273,
638,
31,
202,
202,
1884,
261,
29591... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
1762,
1435,
288,
202,
202,
780,
1892,
1681,
273,
394,
6674,
5621,
202,
202,
4385,
18,
6923,
2668,
95,
8284,
202,
202,
6494,
1122,
273,
638,
31,
202,
202,
1884,
261,
29591... |
public IASTNode parse(int startingOffset, int endingOffset) { | public ISelectionParseResult parse(int startingOffset, int endingOffset) { | public IASTNode parse(int startingOffset, int endingOffset) { offsetRange = new OffsetDuple( startingOffset, endingOffset ); translationUnit(); return reconcileTokenDuple(); } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/7a2c6de5fb3f720d4ccf6d80c100a157056f2b77/SelectionParser.java/clean/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/SelectionParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
467,
9053,
907,
1109,
12,
474,
5023,
2335,
16,
509,
11463,
2335,
13,
288,
202,
202,
3348,
2655,
273,
394,
9874,
40,
2268,
12,
5023,
2335,
16,
11463,
2335,
11272,
202,
202,
101... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
467,
9053,
907,
1109,
12,
474,
5023,
2335,
16,
509,
11463,
2335,
13,
288,
202,
202,
3348,
2655,
273,
394,
9874,
40,
2268,
12,
5023,
2335,
16,
11463,
2335,
11272,
202,
202,
101... |
InetAddress myInetaddr = InetAddress. getLocalHost(); | InetAddress myInetaddr = InetAddress.getLocalHost(); | public void actionPerformed(ActionEvent ae) { String kommando = ((JMenuItem)ae.getSource()).getText(); if (kommando.equals(YAMM.getString("file.exit"))) { frame.Exit(); } else if (kommando.equals(YAMM.getString( "help.about_you"))) { String host = null; String ipaddress = null; try { InetAddress myInetaddr = InetAddress. getLocalHost(); ipaddress = myInetaddr.getHostAddress(); host = myInetaddr.getHostName(); } catch (UnknownHostException uhe) {} if (ipaddress == null) { ipaddress = YAMM.getString("unknown"); } if (host == null) { host = YAMM.getString("unknown"); } Object[] args = { System.getProperty("os.name"), System.getProperty("os.version"), System.getProperty("os.arch"), ipaddress, host, System.getProperty("java.version"), System.getProperty("java.vendor"), System.getProperty("java.vendor.url"), System.getProperty("user.name"), System.getProperty("user.home") }; new MsgDialog(null, YAMM.getString("help.about_you"), YAMM.getString("info.about.you", args)); } else if (kommando.equals(YAMM.getString( "help.about"))) { Object[] args = { YAMM.version, YAMM.compDate, "http://www.gjt.org/~fredde/yamm.html", "<fredde@gjt.org>" }; new MsgDialog(null, YAMM.getString("help.about"), "Copyright (C) 1999, 2000 Fredrik Ehnbom\n" + YAMM.getString("info.about", args) ); } else if (kommando.equals(YAMM.getString( "help.bug_report"))) { YAMMWrite yw = new YAMMWrite("fredde@gjt.org", "Bug report"); JTextArea jt = yw.myTextArea; jt.append("What is the problem?\n\n"); jt.append("How did you make it happen?\n\n"); jt.append("Can you make it happen again?\n\n"); jt.append("\nAnd now some info about your " + "system:\n"); p("java.version", jt); p("java.vendor", jt); p("java.vendor.url", jt); p("java.home", jt); p("java.vm.specification.version", jt); p("java.vm.specification.vendor", jt); p("java.vm.specification.name", jt); p("java.vm.version", jt); p("java.vm.vendor", jt); p("java.vm.name", jt); p("java.specification.version", jt); p("java.specification.vendor", jt); p("java.specification.name", jt); p("java.class.version", jt); p("java.class.path", jt); p("os.name", jt); p("os.arch", jt); p("os.version", jt); jt.append("YAMM.version: " + YAMM.version + "\n"); jt.append("YAMM.compDate: " + YAMM.compDate); } else if (kommando.equals(YAMM.getString( "help.license"))) { new MsgDialog(null, YAMM.getString("help.license"), "Yet Another Mail Manager " + YAMM.version + " E-Mail Client\n" + "Copyright (C) 1999 Fredrik Ehnbom\n" + YAMM.getString("license"), MsgDialog.OK, JLabel.LEFT ); } else if (kommando.equals(YAMM.getString( "edit.settings"))) { new ConfigurationWizard(frame); } else if (kommando.equals(YAMM.getString( "file.new"))) { new YAMMWrite(); } else if (kommando.equals(YAMM.getString( "edit.view_source"))) { JTable tmp = frame.mailList; int test = tmp.getSelectedRow(); if (test >= 0 && test < frame.listOfMails.size()) { int i = 0; while (i < 4) { if (tmp.getColumnName(i). equals("#")) { break; } i++; } int msg = Integer.parseInt( tmp.getValueAt( tmp.getSelectedRow(),i). toString()); long skip = Long.parseLong( ((Vector) frame.listOfMails. elementAt(tmp.getSelectedRow())).elementAt(5). toString()); if (msg != -1) { sourceViewer sv = new sourceViewer(); int ret = Mailbox.viewSource( frame.selectedbox, msg, skip, sv.jtarea ); if (ret != -1) { JScrollBar jsb = sv.jsp.getVerticalScrollBar(); jsb.updateUI(); jsb.setValue(0); } else { sv.dispose(); sv = null; } } } } else if (kommando.equals(YAMM.getString( "file.save_as"))) { int test = ((JTable)frame.mailList). getSelectedRow(); if (test != -1 && test <= frame.listOfMails.size()) { JFileChooser jfs = new JFileChooser(); jfs.setFileSelectionMode( JFileChooser.FILES_ONLY ); jfs.setMultiSelectionEnabled(false); jfs.setFileFilter(new filter()); jfs.setSelectedFile( new File("mail.html") ); int ret = jfs.showSaveDialog(frame); if (ret == JFileChooser.APPROVE_OPTION) { String tmp = frame.selectedbox; String boxName = tmp.substring( tmp.indexOf("boxes") + 6, tmp.length() ); tmp = frame.mailPageString; boxName = tmp.substring(8, tmp.length()) + boxName + File.separator + frame.mailList. getSelectedRow() + ".html"; new File(boxName).renameTo( jfs.getSelectedFile() ); } } } } | 3248 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3248/38ff7f4b63da246fd77247d2a03120c734587703/mainMenu.java/buggy/gui/main/mainMenu.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
918,
26100,
12,
1803,
1133,
14221,
13,
288,
1082,
202,
780,
417,
362,
889,
83,
273,
14015,
46,
12958,
13,
8906,
18,
588,
1830,
1435,
2934,
588,
1528,
5621,
1082,
202,
430,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
14221,
13,
288,
1082,
202,
780,
417,
362,
889,
83,
273,
14015,
46,
12958,
13,
8906,
18,
588,
1830,
1435,
2934,
588,
1528,
5621,
1082,
202,
430,
26... |
log.error(ex); | System.err.println(ex); | public void sendClearPanelMsg() { int tmp[]=new int[1]; tmp[0]=0; DrawCommand comm=new DrawCommand(DrawCommand.CLEAR); ObjectOutputStream os; try { out.reset(); os=new ObjectOutputStream(out); os.writeObject(comm); os.flush(); data_channel.send(new Message(null, null, out.toByteArray())); } catch(Exception ex) { log.error(ex); } } | 50160 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50160/13de68466e3cf7fde6ee0bde0cee09a33e837e89/Draw2Channels.java/buggy/src/org/jgroups/demos/Draw2Channels.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1366,
9094,
5537,
3332,
1435,
288,
202,
474,
5375,
1853,
8526,
33,
2704,
509,
63,
21,
15533,
1853,
63,
20,
65,
33,
20,
31,
202,
6493,
2189,
1850,
1543,
33,
2704,
10184,
2189,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1366,
9094,
5537,
3332,
1435,
288,
202,
474,
5375,
1853,
8526,
33,
2704,
509,
63,
21,
15533,
1853,
63,
20,
65,
33,
20,
31,
202,
6493,
2189,
1850,
1543,
33,
2704,
10184,
2189,... |
public void invokeCommand(String command){ processCommand( command ); } | public void invokeCommand(String command) { processCommand(command); } | public void invokeCommand(String command){ processCommand( command ); } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/34de2dc986de957bf3cb702395f863f43c74672f/CommandShell.java/clean/shell/src/shell/org/jnode/shell/CommandShell.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
4356,
2189,
12,
780,
1296,
15329,
3639,
1207,
2189,
12,
1296,
11272,
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... | [
1,
1,
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,
377,
1071,
918,
4356,
2189,
12,
780,
1296,
15329,
3639,
1207,
2189,
12,
1296,
11272,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
} else { | } else { | public String toString() { if( name == null ) { return address; } else { return name + " <" + address + ">"; } } | 17033 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17033/c7b5b643b25b20f5c96097b2c54e2e26a054f212/EmailAddress.java/buggy/src/main/org/apache/tools/ant/taskdefs/email/EmailAddress.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
1762,
1435,
565,
288,
3639,
309,
12,
508,
422,
446,
262,
3639,
288,
5411,
327,
1758,
31,
3639,
289,
3639,
469,
3639,
288,
5411,
327,
508,
397,
315,
411,
6,
397,
1758,
397,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
1762,
1435,
565,
288,
3639,
309,
12,
508,
422,
446,
262,
3639,
288,
5411,
327,
1758,
31,
3639,
289,
3639,
469,
3639,
288,
5411,
327,
508,
397,
315,
411,
6,
397,
1758,
397,
... |
public OnmsAlarm(Integer alarmid, String eventuei, String dpname, Integer nodeid, String ipaddr, Integer serviceid, String reductionkey, Integer alarmtype, int counter, int severity, Date firsteventtime, Date lasteventtime, String description, String logmsg, String operinstruct, String tticketid, Integer tticketstate, String mouseovertext, Date suppresseduntil, String suppresseduser, Date suppressedtime, String alarmackuser, Date alarmacktime, String clearuei, org.opennms.netmgt.model.OnmsEvent event) { this.alarmid = alarmid; this.eventuei = eventuei; this.dpname = dpname; this.nodeid = nodeid; this.ipaddr = ipaddr; this.serviceid = serviceid; this.reductionkey = reductionkey; this.alarmtype = alarmtype; this.counter = counter; this.severity = severity; this.firsteventtime = firsteventtime; this.lasteventtime = lasteventtime; this.description = description; this.logmsg = logmsg; this.operinstruct = operinstruct; this.tticketid = tticketid; this.tticketstate = tticketstate; this.mouseovertext = mouseovertext; this.suppresseduntil = suppresseduntil; this.suppresseduser = suppresseduser; this.suppressedtime = suppressedtime; this.alarmackuser = alarmackuser; this.alarmacktime = alarmacktime; this.clearuei = clearuei; this.event = event; | public OnmsAlarm(Integer alarmid, String eventuei, OnmsDistPoller distPoller, OnmsNode node, String ipaddr, OnmsMonitoredService service, String reductionkey, Integer alarmtype, Integer counter, Integer severity, Date firsteventtime, Date lasteventtime, String description, String logmsg, String operinstruct, String tticketid, Integer tticketstate, String mouseovertext, Date suppresseduntil, String suppresseduser, Date suppressedtime, String alarmackuser, Date alarmacktime, String clearuei, org.opennms.netmgt.model.OnmsEvent event) { this.m_id = alarmid; this.m_uei = eventuei; this.m_distPoller = distPoller; this.m_node = node; this.m_ipAddr = ipaddr; this.m_service = service; this.m_reductionKey = reductionkey; this.m_alarmType = alarmtype; this.m_counter = counter; this.m_severity = severity; this.m_firstEventTime = firsteventtime; this.m_lastEventTime = lasteventtime; this.m_description = description; this.m_logMsg = logmsg; this.m_operInstruct = operinstruct; this.m_tTicketId = tticketid; this.m_tTicketState = tticketstate; this.m_mouseOverText = mouseovertext; this.m_suppressedUntil = suppresseduntil; this.m_suppressedUser = suppresseduser; this.m_suppressedTime = suppressedtime; this.m_alarmAckUser = alarmackuser; this.m_alarmAckTime = alarmacktime; this.m_clearUei = clearuei; this.m_lastEvent = event; | public OnmsAlarm(Integer alarmid, String eventuei, String dpname, Integer nodeid, String ipaddr, Integer serviceid, String reductionkey, Integer alarmtype, int counter, int severity, Date firsteventtime, Date lasteventtime, String description, String logmsg, String operinstruct, String tticketid, Integer tticketstate, String mouseovertext, Date suppresseduntil, String suppresseduser, Date suppressedtime, String alarmackuser, Date alarmacktime, String clearuei, org.opennms.netmgt.model.OnmsEvent event) { this.alarmid = alarmid; this.eventuei = eventuei; this.dpname = dpname; this.nodeid = nodeid; this.ipaddr = ipaddr; this.serviceid = serviceid; this.reductionkey = reductionkey; this.alarmtype = alarmtype; this.counter = counter; this.severity = severity; this.firsteventtime = firsteventtime; this.lasteventtime = lasteventtime; this.description = description; this.logmsg = logmsg; this.operinstruct = operinstruct; this.tticketid = tticketid; this.tticketstate = tticketstate; this.mouseovertext = mouseovertext; this.suppresseduntil = suppresseduntil; this.suppresseduser = suppresseduser; this.suppressedtime = suppressedtime; this.alarmackuser = alarmackuser; this.alarmacktime = alarmacktime; this.clearuei = clearuei; this.event = event; } | 11849 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11849/cb8cf3b9ee6bc6dcaaebe1297db1438eb533f7df/OnmsAlarm.java/buggy/opennms-model/src/main/java/org/opennms/netmgt/model/OnmsAlarm.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
2755,
959,
16779,
12,
4522,
13721,
350,
16,
514,
871,
344,
77,
16,
514,
9986,
529,
16,
2144,
756,
350,
16,
514,
2359,
4793,
16,
2144,
1156,
350,
16,
514,
20176,
856,
16,
2144,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2755,
959,
16779,
12,
4522,
13721,
350,
16,
514,
871,
344,
77,
16,
514,
9986,
529,
16,
2144,
756,
350,
16,
514,
2359,
4793,
16,
2144,
1156,
350,
16,
514,
20176,
856,
16,
2144,
1... |
public void addParameter(Object param); | void addParameter(Object param); | public void addParameter(Object param); | 9368 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9368/edfbbd9ac4b0509913ee0d047a6b893c082271af/ComponentData.java/buggy/csmart/src/org/cougaar/tools/csmart/ui/component/ComponentData.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
14436,
12,
921,
579,
1769,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
14436,
12,
921,
579,
1769,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
for (int i = 0; i < allComms.length; i++) | for (int i = 0; i < allCols.length; i++) | public Map listSets() throws NoSetHierarchyException, OAIInternalServerError { log.info(LogManager.getHeader(null, "oai_request", "verb=listSets")); Context context = null; // List to put results in List sets = new LinkedList(); try { context = new Context(); // FIXME: This may break the OAI protocol with multiple inclusion // FIXME: Should check perms? Community[] allComms = Community.findAll(context); for (int i = 0; i < allComms.length; i++) { // Set XML community String communitySpec = "<set><setSpec>" + allComms[i].getID() + "</setSpec><setName>" + allComms[i].getMetadata("name") + "</setName></set>"; sets.add(communitySpec); // Add set XML for collections Collection[] colls = allComms[i].getCollections(); for (int j = 0; j < colls.length; j++) { StringBuffer collectionSpec = new StringBuffer("<set><setSpec>"); collectionSpec.append(allComms[i].getID()) .append(":") .append(colls[j].getID()) .append("</setSpec><setName>") .append(colls[j].getMetadata("name")) .append("</setName></set>"); sets.add(collectionSpec.toString()); } } } catch (SQLException se) { // Log the error log.warn(LogManager.getHeader(context, "database_error", ""), se); throw new OAIInternalServerError(se.toString()); } finally { if (context != null) { context.abort(); } } // Put results in form needed to return Map results = new HashMap(); results.put("sets", sets.iterator()); return results; } | 47292 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47292/564aa767ae3958fb227322d346195962712ce24e/DSpaceOAICatalog.java/buggy/dspace/src/org/dspace/app/oai/DSpaceOAICatalog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1635,
666,
2785,
1435,
3639,
1216,
2631,
694,
12074,
503,
16,
531,
18194,
12371,
565,
288,
3639,
613,
18,
1376,
12,
1343,
1318,
18,
588,
1864,
12,
2011,
16,
5411,
315,
83,
10658,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1635,
666,
2785,
1435,
3639,
1216,
2631,
694,
12074,
503,
16,
531,
18194,
12371,
565,
288,
3639,
613,
18,
1376,
12,
1343,
1318,
18,
588,
1864,
12,
2011,
16,
5411,
315,
83,
10658,
... |
{ return false; } | { return false; } | public boolean storesLowerCaseIdentifiers() throws SQLException { return false; } | 47293 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47293/6a061da272f04e1463864065f87f1f3fd61d6162/DatabaseMetaData.java/clean/src/interfaces/jdbc/postgresql/DatabaseMetaData.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
9064,
5630,
12745,
1435,
1216,
6483,
202,
95,
202,
202,
2463,
629,
31,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
9064,
5630,
12745,
1435,
1216,
6483,
202,
95,
202,
202,
2463,
629,
31,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
((EvenDetailsDialogAction)propertiesAction).resetSelection(); | ((EventDetailsDialogAction)propertiesAction).resetSelection(); | public void selectionChanged(SelectionChangedEvent e) { handleSelectionChanged(e.getSelection()); if (propertiesAction.isEnabled()) ((EvenDetailsDialogAction)propertiesAction).resetSelection(); } | 8783 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8783/82674e955478776ae1394ec747ff424753d71996/LogView.java/clean/ui/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/logview/LogView.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
482,
918,
4421,
5033,
12,
6233,
27553,
425,
13,
288,
9506,
202,
4110,
6233,
5033,
12,
73,
18,
588,
6233,
10663,
9506,
202,
430,
261,
4738,
1803,
18,
291,
1526,
10756,
6862,
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,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
482,
918,
4421,
5033,
12,
6233,
27553,
425,
13,
288,
9506,
202,
4110,
6233,
5033,
12,
73,
18,
588,
6233,
10663,
9506,
202,
430,
261,
4738,
1803,
18,
291,
1526,
10756,
6862,
202,
1... |
instance.partOpened( part ); | if(part instanceof ReportEditorProxy){ instance.partOpened( ((ReportEditorProxy)part).getEditorPart( ) ); } else { instance.partOpened( part ); } | public void partOpened( IWorkbenchPart part ) { instance.partOpened( part ); } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/786c901afd0d53ea23213d22170e8b35aa4a0a1d/ReportEditorProxy.java/clean/UI/org.eclipse.birt.report.designer.ui.ide/src/org/eclipse/birt/report/designer/ui/editors/ReportEditorProxy.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1087,
23115,
12,
467,
2421,
22144,
1988,
1087,
262,
202,
95,
202,
202,
1336,
18,
2680,
23115,
12,
1087,
11272,
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,
482,
918,
1087,
23115,
12,
467,
2421,
22144,
1988,
1087,
262,
202,
95,
202,
202,
1336,
18,
2680,
23115,
12,
1087,
11272,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if (titleTooltip.endsWith("\\")) { | if (titleTooltip.endsWith("\\")) { | private static String computeLongName(PartInfo info) { String text = info.name; String contentDescription = info.contentDescription; if (contentDescription.equals("")) { //$NON-NLS-1$ String titleTooltip = info.toolTip.trim(); if (titleTooltip.endsWith(info.name)) { titleTooltip = titleTooltip.substring(0, titleTooltip.lastIndexOf(info.name)).trim(); } if (titleTooltip.endsWith("\\")) { //$NON-NLS-1$ titleTooltip = titleTooltip.substring(0, titleTooltip.lastIndexOf("\\")).trim(); //$NON-NLS-1$ } if (titleTooltip.endsWith("/")) { //$NON-NLS-1$ titleTooltip = titleTooltip.substring(0, titleTooltip.lastIndexOf("/")).trim(); //$NON-NLS-1$ } contentDescription = titleTooltip; } if (!contentDescription.equals("")) { //$NON-NLS-1$ text = MessageFormat .format( WorkbenchMessages.EditorPart_AutoTitleFormat, new String[] { text, contentDescription }); } if (info.dirty) { text = DIRTY_PREFIX + text; } return text; } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/b8ac10faab55d0a01aff2cfd407ac509d16d6ab8/DefaultTabItem.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/defaultpresentation/DefaultTabItem.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
514,
3671,
3708,
461,
12,
1988,
966,
1123,
13,
288,
3639,
514,
977,
273,
1123,
18,
529,
31,
3639,
514,
913,
3291,
273,
1123,
18,
1745,
3291,
31,
3639,
309,
261,
1745,
3291,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
514,
3671,
3708,
461,
12,
1988,
966,
1123,
13,
288,
3639,
514,
977,
273,
1123,
18,
529,
31,
3639,
514,
913,
3291,
273,
1123,
18,
1745,
3291,
31,
3639,
309,
261,
1745,
3291,
... |
Map allRegions = new HashMap(); | Map allRegions = new java.util.HashMap(); | protected void checkRegionNames() throws FOPException { // Section 7.33.15 check to see that if a region-name is a // duplicate, that it maps to the same region-class. Map allRegions = new HashMap(); for (Iterator spm = simplePageMasters.values().iterator(); spm.hasNext(); ) { SimplePageMaster simplePageMaster = (SimplePageMaster)spm.next(); Map spmRegions = simplePageMaster.getRegions(); for (Iterator e = spmRegions.values().iterator(); e.hasNext(); ) { Region region = (Region)e.next(); if (allRegions.containsKey(region.getRegionName())) { String localClass = (String)allRegions.get(region.getRegionName()); if (!localClass.equals(region.getRegionClass())) { throw new FOPException("Duplicate region-names (" + region.getRegionName() + ") must map " + "to the same region-class (" + localClass + "!=" + region.getRegionClass() + ")"); } } allRegions.put(region.getRegionName(), region.getRegionClass()); } } } | 5268 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5268/541f74f88cfcdb9a5aaa1fa33cca4d89d74de80e/LayoutMasterSet.java/clean/src/org/apache/fop/fo/pagination/LayoutMasterSet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
866,
5165,
1557,
1435,
1216,
478,
3665,
503,
288,
3639,
368,
10092,
2371,
18,
3707,
18,
3600,
866,
358,
2621,
716,
309,
279,
3020,
17,
529,
353,
279,
3639,
368,
6751,
16,
716... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
866,
5165,
1557,
1435,
1216,
478,
3665,
503,
288,
3639,
368,
10092,
2371,
18,
3707,
18,
3600,
866,
358,
2621,
716,
309,
279,
3020,
17,
529,
353,
279,
3639,
368,
6751,
16,
716... |
private void setState(int newState) { | protected void setState(int newState) { | private void setState(int newState) { if (!supportsState(newState) || newState == presentationSite.getState()) { return; } int oldState = presentationSite.getState(); if (current != null) { if (newState == IStackPresentationSite.STATE_MAXIMIZED) { PartPane pane = getVisiblePart(); if (pane != null) { pane.doZoom(); } } else { presentationSite.setPresentationState(newState); WorkbenchPage page = getPage(); if (page != null) { if (page.isZoomed()) { page.zoomOut(); } updateControlBounds(); if (oldState == IStackPresentationSite.STATE_MINIMIZED) { forceLayout(); } } } } if (presentationSite.getState() == IStackPresentationSite.STATE_MINIMIZED) { WorkbenchPage page = getPage(); if (page != null) { page.refreshActiveView(); } } } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/d9dd5925e0ada6fd5fd1875ed1c72e5361209eb9/PartStack.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PartStack.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
12947,
12,
474,
15907,
13,
288,
377,
202,
3639,
309,
16051,
28064,
1119,
12,
2704,
1119,
13,
747,
15907,
422,
22525,
4956,
18,
588,
1119,
10756,
288,
327,
31,
289,
3639,
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,
4750,
918,
12947,
12,
474,
15907,
13,
288,
377,
202,
3639,
309,
16051,
28064,
1119,
12,
2704,
1119,
13,
747,
15907,
422,
22525,
4956,
18,
588,
1119,
10756,
288,
327,
31,
289,
3639,
509,
... |
public void doTag(XMLOutput output) throws MissingAttributeException, JellyTagException { if ( getVar() == null ) { throw new MissingAttributeException( "var" ); } if ( getUrl() == null ) { throw new MissingAttributeException( "url" ); } ClassLoader parent = Thread.currentThread().getContextClassLoader(); if (parent == null) { parent = getClass().getClassLoader(); } URLClassLoader newClassLoader = null; try { newClassLoader = new URLClassLoader( new URL[] { new URL(getUrl()) }, parent ); } catch (MalformedURLException e) { throw new JellyTagException(e); } log.debug("Storing the new classloader in " + getVar()); context.setVariable(getVar(), newClassLoader); } | 51800 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51800/cbaa8d2430c2bf467e589a423fee7c83e3f0eb2f/ClassLoaderTag.java/buggy/jelly-tags/define/src/java/org/apache/commons/jelly/tags/define/ClassLoaderTag.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
741,
1805,
12,
4201,
1447,
876,
13,
1216,
10230,
1499,
503,
16,
804,
292,
715,
1805,
503,
288,
3639,
309,
261,
22381,
1435,
422,
446,
262,
288,
5411,
604,
394,
10230,
1499,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
741,
1805,
12,
4201,
1447,
876,
13,
1216,
10230,
1499,
503,
16,
804,
292,
715,
1805,
503,
288,
3639,
309,
261,
22381,
1435,
422,
446,
262,
288,
5411,
604,
394,
10230,
1499,
5... | ||
String value = data.getValue(); | String value = iv.getValue(); | public Object convertInbound(Class paramType, InboundVariable data, InboundContext inctx) throws ConversionException { String value = data.getValue(); try { if (paramType == Boolean.TYPE || paramType == Boolean.class) { return Boolean.valueOf(value.trim()); } else if (paramType == Byte.TYPE || paramType == Byte.class) { if (value.length() == 0) { byte b = 0; return new Byte(b); } return new Byte(value.trim()); } else if (paramType == Short.TYPE || paramType == Short.class) { if (value.length() == 0) { short s = 0; return new Short(s); } return new Short(value.trim()); } else if (paramType == Character.TYPE || paramType == Character.class) { String decode = LocalUtil.decode(value); if (decode.length() == 1) { return new Character(decode.charAt(0)); } else { throw new ConversionException(Messages.getString("PrimitiveConverter.StringTooLong", value)); //$NON-NLS-1$ } } else if (paramType == Integer.TYPE || paramType == Integer.class) { if (value.length() == 0) { return new Integer(0); } return new Integer(value.trim()); } else if (paramType == Long.TYPE || paramType == Long.class) { if (value.length() == 0) { return new Long(0); } return new Long(value.trim()); } else if (paramType == Float.TYPE || paramType == Float.class) { if (value.length() == 0) { return new Float(0); } return new Float(value.trim()); } else if (paramType == Double.TYPE || paramType == Double.class) { if (value.length() == 0) { return new Double(0); } return new Double(value.trim()); } throw new ConversionException(Messages.getString("PrimitiveConverter.TypeNotPrimitive", paramType.getName())); //$NON-NLS-1$ } catch (NumberFormatException ex) { throw new ConversionException(Messages.getString("PrimitiveConverter.FormatError", value, paramType.getName()), ex); //$NON-NLS-1$ } } | 45384 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45384/225f234c47ef4d1706dfcc3422daf5dfc3fcc47a/PrimitiveConverter.java/clean/java/uk/ltd/getahead/dwr/convert/PrimitiveConverter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
1765,
20571,
12,
797,
20781,
16,
657,
3653,
3092,
501,
16,
657,
3653,
1042,
316,
5900,
13,
1216,
16401,
503,
565,
288,
3639,
514,
460,
273,
4674,
18,
24805,
5621,
3639,
775,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1765,
20571,
12,
797,
20781,
16,
657,
3653,
3092,
501,
16,
657,
3653,
1042,
316,
5900,
13,
1216,
16401,
503,
565,
288,
3639,
514,
460,
273,
4674,
18,
24805,
5621,
3639,
775,
... |
String[] names = funObj.names; if (names != null) { | String[] argNames = funObj.argNames; if (argNames != null) { | NativeCall(Context cx, Scriptable scope, NativeFunction funObj, Scriptable thisObj, Object[] args) { this(cx, scope, funObj, thisObj); this.originalArgs = (args == null) ? ScriptRuntime.emptyArgs : args; // initialize values of arguments String[] names = funObj.names; if (names != null) { for (int i=0; i < funObj.argCount; i++) { Object val = i < args.length ? args[i] : Undefined.instance; super.put(names[i+1], this, val); } } // initialize "arguments" property super.put("arguments", this, new Arguments(this)); } | 11366 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11366/49ee5104a9201354fbd63b6b9e1e0ea314785d03/NativeCall.java/buggy/js/rhino/src/org/mozilla/javascript/NativeCall.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
16717,
1477,
12,
1042,
9494,
16,
22780,
2146,
16,
16717,
2083,
9831,
2675,
16,
7734,
22780,
15261,
16,
1033,
8526,
833,
13,
565,
288,
3639,
333,
12,
71,
92,
16,
2146,
16,
9831,
2675,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
16717,
1477,
12,
1042,
9494,
16,
22780,
2146,
16,
16717,
2083,
9831,
2675,
16,
7734,
22780,
15261,
16,
1033,
8526,
833,
13,
565,
288,
3639,
333,
12,
71,
92,
16,
2146,
16,
9831,
2675,
16... |
return getInt(findColumn(columnName)); | String s = getFixedString(columnIndex); if (s != null) { try { return Integer.parseInt(s); } catch (NumberFormatException e) { throw new PSQLException ("postgresql.badint",s); } } return 0; | public int getInt(String columnName) throws SQLException { return getInt(findColumn(columnName)); } | 49504 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49504/0380765cc17c7216a11f361c52dc47c157681598/ResultSet.java/clean/src/interfaces/jdbc/org/postgresql/jdbc1/ResultSet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
509,
8145,
12,
780,
7578,
13,
1216,
6483,
225,
288,
565,
514,
272,
273,
2812,
3960,
780,
12,
2827,
1016,
1769,
225,
309,
261,
87,
480,
446,
13,
288,
775,
288,
327,
2144,
18,
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,
282,
1071,
509,
8145,
12,
780,
7578,
13,
1216,
6483,
225,
288,
565,
514,
272,
273,
2812,
3960,
780,
12,
2827,
1016,
1769,
225,
309,
261,
87,
480,
446,
13,
288,
775,
288,
327,
2144,
18,
267... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.