rem
stringlengths
1
53.3k
add
stringlengths
0
80.5k
context
stringlengths
6
326k
meta
stringlengths
141
403
input_ids
list
attention_mask
list
labels
list
public void setOwner(Territory territory, PlayerID id) { if(territory.isWater()) return; String name = territory.getName(); String fileName = "countries/" + name.replace(' ', '_')+ ".png"; Image country = loadImage(fileName); BufferedImage newImage = new BufferedImage(country.getWidth(s_observer), country.getHeight(s_observer), BufferedImage.TYPE_INT_ARGB); newImage.getGraphics().drawImage(country, 0,0, s_observer); LookupOp filter = getLookupOp(id); filter.filter(newImage, newImage); Point p = (Point) m_topCorners.get(name); if(p == null) throw new IllegalStateException("No top corner could be found for:" + name); m_largeMapImage.getGraphics().drawImage(newImage, p.x, p.y, s_observer); if (!territory.isWater()) { TerritoryAttatchment ta = TerritoryAttatchment.get(territory); Graphics g = m_largeMapImage.getGraphics(); FontMetrics fm = g.getFontMetrics(); int x = p.x; int y = p.y; // if (ta.getProduction() > 0) // name += " (" + ta.getProduction() + ")"; x += country.getWidth(s_observer) >> 1; y += country.getHeight(s_observer) >> 1; x -= fm.stringWidth(name) >> 1; y += fm.getAscent() >> 1; g.drawString(name, x, y); if (ta.getProduction() > 0) { String prod = new Integer(ta.getProduction()).toString(); x = p.x + ((country.getWidth(s_observer) - fm.stringWidth(prod))>> 1); y += fm.getLeading() + fm.getAscent(); g.drawString(prod, x, y); } } int smallHeight = (int) (newImage.getHeight() / m_smallLargeRatio) + 3; int smallWidth = (int) (newImage.getWidth() / m_smallLargeRatio) + 3; Image small = newImage.getScaledInstance(smallWidth, smallHeight , Image.SCALE_FAST); Point smallPoint = new Point( (int)( p.x / m_smallLargeRatio), (int) (p.y / m_smallLargeRatio)); m_smallMapImage.getGraphics().drawImage(small, smallPoint.x, smallPoint.y, s_observer); }
8339 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8339/65dc97c8bd1d73da6a21d79d5ad468e6bb971a9b/MapImage.java/buggy/src/games/strategy/triplea/image/MapImage.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 31309, 12, 56, 25313, 268, 25313, 16, 19185, 734, 612, 13, 202, 95, 202, 202, 430, 12, 88, 25313, 18, 291, 24064, 10756, 1082, 202, 2463, 31, 9506, 202, 780, 508, 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, 31309, 12, 56, 25313, 268, 25313, 16, 19185, 734, 612, 13, 202, 95, 202, 202, 430, 12, 88, 25313, 18, 291, 24064, 10756, 1082, 202, 2463, 31, 9506, 202, 780, 508, 273, ...
long beg = RubyNumeric.fix2long(args[0]); long len = RubyNumeric.fix2long(args[1]);
int beg = RubyNumeric.fix2int(args[0]); int len = RubyNumeric.fix2int(args[1]);
public IRubyObject aref(IRubyObject[] args) { int argc = checkArgumentCount(args, 1, 2); if (argc == 2) { long beg = RubyNumeric.fix2long(args[0]); long len = RubyNumeric.fix2long(args[1]); if (beg < 0) { beg += getSize(); } return subseq(beg, len); } if (args[0] instanceof RubyFixnum) { return group(RubyNumeric.fix2long(args[0])); } if (args[0] instanceof RubyBignum) { throw new IndexError(getRuntime(), "index too big"); } if (args[0] instanceof RubyRange) { long[] begLen = ((RubyRange) args[0]).getBeginLength(getSize(), true, false); if (begLen == null) { return getRuntime().getNil(); } return subseq(begLen[0], begLen[1]); } return group(RubyNumeric.num2long(args[0])); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/cc20d41e6031b7e9c9ed46676d32e45334ed0d53/RubyMatchData.java/buggy/src/org/jruby/RubyMatchData.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 15908, 10340, 921, 854, 74, 12, 7937, 10340, 921, 8526, 833, 13, 288, 3639, 509, 1501, 71, 273, 10788, 1380, 12, 1968, 16, 404, 16, 576, 1769, 3639, 309, 261, 3175, 71, 422, 576, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 15908, 10340, 921, 854, 74, 12, 7937, 10340, 921, 8526, 833, 13, 288, 3639, 509, 1501, 71, 273, 10788, 1380, 12, 1968, 16, 404, 16, 576, 1769, 3639, 309, 261, 3175, 71, 422, 576, ...
element.setProperty( OdaDataSource.EXTENSION_ID_PROP, extensionID );
public OdaDataSourceHandle newOdaDataSource( String name, String extensionID ) { if ( extensionID != null ) { if ( ODAManifestUtil.getDataSourceExtension( extensionID ) == null ) return null; } OdaDataSource element = new OdaDataSource( name ); module.makeUniqueName( element ); element.setProperty( OdaDataSource.EXTENSION_ID_PROP, extensionID ); return element.handle( module ); }
46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/4c8b2e04b963dfaac26d3710164ac7a4da6b60f2/ElementFactory.java/buggy/model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/api/ElementFactory.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 531, 2414, 8597, 3259, 394, 51, 2414, 8597, 12, 514, 508, 16, 514, 2710, 734, 262, 202, 95, 202, 202, 430, 261, 2710, 734, 480, 446, 262, 202, 202, 95, 1082, 202, 430, 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, 225, 202, 482, 531, 2414, 8597, 3259, 394, 51, 2414, 8597, 12, 514, 508, 16, 514, 2710, 734, 262, 202, 95, 202, 202, 430, 261, 2710, 734, 480, 446, 262, 202, 202, 95, 1082, 202, 430, 261, ...
super(view,jEdit.getProperty("beanshell-error.title"),
super(frame,jEdit.getProperty("beanshell-error.title"),
public BeanShellErrorDialog(View view, Throwable t) { super(view,jEdit.getProperty("beanshell-error.title"), jEdit.getProperty("beanshell-error.message"), UIManager.getIcon("OptionPane.errorIcon"), MiscUtilities.throwableToString(t)); }
8690 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8690/c19773cc63e3dbcbb47670243d70ffd77d592ab5/BeanShellErrorDialog.java/buggy/org/gjt/sp/jedit/gui/BeanShellErrorDialog.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 7704, 13220, 668, 6353, 12, 1767, 1476, 16, 4206, 268, 13, 202, 95, 202, 202, 9565, 12, 1945, 16, 78, 4666, 18, 588, 1396, 2932, 2196, 634, 76, 1165, 17, 1636, 18, 2649, 6, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 7704, 13220, 668, 6353, 12, 1767, 1476, 16, 4206, 268, 13, 202, 95, 202, 202, 9565, 12, 1945, 16, 78, 4666, 18, 588, 1396, 2932, 2196, 634, 76, 1165, 17, 1636, 18, 2649, 6, ...
created = creation_ts_date_format.parse(getAttribute(BugzillaReportElement.CREATION_TS).getValue());
created = creation_ts_date_format.parse(getAttributeValue(BugzillaReportElement.BUG_WHEN));
public Date getCreated() { if(created == null) { created = Calendar.getInstance().getTime(); try { created = creation_ts_date_format.parse(getAttribute(BugzillaReportElement.CREATION_TS).getValue()); } catch (Exception e) { } } return created; }
51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/d679cb873e3e7da4abf06018519fc0905b13aa54/Comment.java/clean/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/bugzilla/core/Comment.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 2167, 21744, 1435, 288, 202, 202, 430, 12, 4824, 422, 446, 13, 288, 1082, 202, 4824, 273, 5542, 18, 588, 1442, 7675, 588, 950, 5621, 1082, 202, 698, 288, 9506, 202, 4824, 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, 2167, 21744, 1435, 288, 202, 202, 430, 12, 4824, 422, 446, 13, 288, 1082, 202, 4824, 273, 5542, 18, 588, 1442, 7675, 588, 950, 5621, 1082, 202, 698, 288, 9506, 202, 4824, 273,...
public MappingConstraintInfo[] get_mapping_constraints( int[] intArray ) throws ConstraintNotFound
public MappingConstraintInfo[] get_mapping_constraints( int[] constraintIds ) throws ConstraintNotFound
public MappingConstraintInfo[] get_mapping_constraints( int[] intArray ) throws ConstraintNotFound { ConstraintInfo[] _constraintInfo = filterImpl_.get_constraints( intArray ); MappingConstraintInfo[] _mappingConstraintInfo = new MappingConstraintInfo[ _constraintInfo.length ]; for ( int x = 0; x < _constraintInfo.length; ++x ) { _mappingConstraintInfo[ x ] = new MappingConstraintInfo( _constraintInfo[ x ].constraint_expression, _constraintInfo[ x ].constraint_id, valueMap_.get( _constraintInfo[ x ].constraint_id ) ); } return _mappingConstraintInfo; }
46355 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46355/5cb0735ade8f313fe4c90cbdfa863891946a8579/MappingFilterImpl.java/buggy/src/org/jacorb/notification/MappingFilterImpl.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 9408, 5806, 966, 8526, 336, 67, 6770, 67, 11967, 12, 509, 8526, 4954, 2673, 262, 1216, 10770, 2768, 565, 288, 3639, 10770, 966, 8526, 389, 13364, 966, 273, 1034, 2828, 27799, 588, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 9408, 5806, 966, 8526, 336, 67, 6770, 67, 11967, 12, 509, 8526, 4954, 2673, 262, 1216, 10770, 2768, 565, 288, 3639, 10770, 966, 8526, 389, 13364, 966, 273, 1034, 2828, 27799, 588, 6...
if (b >= half)
if (a < 0.0) return a/0.0 ; t = sqrt(Math.abs(a)) ; double half = 0.5 ; while (b > 0.0)
double iNumpow(double a, double b) { // :todo: this needs proper checking for boundary cases boolean invert = b < 0.0 ; if (invert) b = -b ; double result = 1.0 ; int ipow = (int) b ; b -= ipow ; double t = a ; while (ipow > 0) { if ((ipow & 1) != 0) result *= t ; ipow >>= 1 ; t = t*t ; } t = sqrt(a) ; double half = 0.5 ; while (b > 0.0) { if (b >= half) { result = result * t ; b -= half ; } b = b+b ; t = sqrt(t) ; if (t == 1.0) break ; } return invert ? 1.0 / result : result ; }
47685 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47685/90bbf2435ab82c021edf05becc4f1d4a6e0acc94/Lua.java/clean/code/Lua.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1645, 277, 2578, 23509, 12, 9056, 279, 16, 1645, 324, 13, 225, 288, 565, 368, 294, 9012, 30, 333, 4260, 5338, 6728, 364, 7679, 6088, 565, 1250, 9848, 273, 324, 411, 374, 18, 20, 274, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1645, 277, 2578, 23509, 12, 9056, 279, 16, 1645, 324, 13, 225, 288, 565, 368, 294, 9012, 30, 333, 4260, 5338, 6728, 364, 7679, 6088, 565, 1250, 9848, 273, 324, 411, 374, 18, 20, 274, ...
if(!equalBlob(blobToBeInerted,blobRetrieved)) fail("Blob not inserted properly using setBlob");
assertEquals(blobToBeInserted, blobRetrieved);
public void testSetBlob() throws SQLException { //insert default values into the table byte[] bytes = new byte[] { 0x65, 0x66, 0x67, 0x68, 0x69, 0x69, 0x68, 0x67, 0x66, 0x65 }; InputStream is = new java.io.ByteArrayInputStream(bytes); try { is.reset(); } catch (IOException ioe) { fail("Failed to reset blob input stream: " + ioe.getMessage()); } PreparedStatement ps_sb = conn.prepareStatement("insert into BlobTestTable values(?,?)"); //initially insert the data ps_sb.setInt(1,1); ps_sb.setBlob(2,is,bytes.length); ps_sb.executeUpdate(); //Now query to retrieve the Blob ResultSet rs = s.executeQuery("select * from BlobTestTable where sno = 1"); rs.next(); Blob blobToBeInerted = rs.getBlob(2); rs.close(); //Now use the setBlob method ps_sb.setInt(1,2); ps_sb.setBlob(2,blobToBeInerted); ps_sb.execute(); ps_sb.close(); //Now test to see that the Blob has been stored correctly rs = s.executeQuery("select * from BlobTestTable where sno = 2"); rs.next(); Blob blobRetrieved = rs.getBlob(2); if(!equalBlob(blobToBeInerted,blobRetrieved)) fail("Blob not inserted properly using setBlob"); }
56322 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56322/242c9bda1c1d17214c7658796d4b08809bdad2db/PreparedStatementTest.java/buggy/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/PreparedStatementTest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1842, 694, 9405, 1435, 1216, 6483, 288, 3639, 368, 6387, 805, 924, 1368, 326, 1014, 7734, 1160, 8526, 1731, 273, 394, 1160, 8526, 288, 5411, 374, 92, 9222, 16, 374, 92, 6028, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 694, 9405, 1435, 1216, 6483, 288, 3639, 368, 6387, 805, 924, 1368, 326, 1014, 7734, 1160, 8526, 1731, 273, 394, 1160, 8526, 288, 5411, 374, 92, 9222, 16, 374, 92, 6028, ...
AST __t1258 = _t; AST tmp1022_AST_in = (AST)_t;
AST __t1262 = _t; AST tmp1021_AST_in = (AST)_t;
public final void destructorstate(AST _t) throws RecognitionException { AST destructorstate_AST_in = (_t == ASTNULL) ? null : (AST)_t; AST __t1257 = _t; AST tmp1017_AST_in = (AST)_t; match(_t,DESTRUCTOR); _t = _t.getFirstChild(); AST tmp1018_AST_in = (AST)_t; match(_t,PUBLIC); _t = _t.getNextSibling(); AST tmp1019_AST_in = (AST)_t; match(_t,TYPE_NAME); _t = _t.getNextSibling(); AST tmp1020_AST_in = (AST)_t; match(_t,LEFTPAREN); _t = _t.getNextSibling(); AST tmp1021_AST_in = (AST)_t; match(_t,RIGHTPAREN); _t = _t.getNextSibling(); block_colon(_t); _t = _retTree; code_block(_t); _t = _retTree; AST __t1258 = _t; AST tmp1022_AST_in = (AST)_t; match(_t,END); _t = _t.getFirstChild(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case DESTRUCTOR: { AST tmp1023_AST_in = (AST)_t; match(_t,DESTRUCTOR); _t = _t.getNextSibling(); break; } case 3: { break; } default: { throw new NoViableAltException(_t); } } } _t = __t1258; _t = _t.getNextSibling(); state_end(_t); _t = _retTree; _t = __t1257; _t = _t.getNextSibling(); _retTree = _t; }
13952 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13952/daa15e07422d3491bbbb4d0060450c81983332a4/TreeParser03.java/clean/trunk/org.prorefactor.core/src/org/prorefactor/treeparser03/TreeParser03.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 727, 918, 23819, 280, 2019, 12, 9053, 389, 88, 13, 1216, 9539, 288, 9506, 202, 9053, 23819, 280, 2019, 67, 9053, 67, 267, 273, 261, 67, 88, 422, 9183, 8560, 13, 692, 446, 29...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 727, 918, 23819, 280, 2019, 12, 9053, 389, 88, 13, 1216, 9539, 288, 9506, 202, 9053, 23819, 280, 2019, 67, 9053, 67, 267, 273, 261, 67, 88, 422, 9183, 8560, 13, 692, 446, 29...
}
if (useCache) setUpCaches();
public Model(ProbabilityStructure structure) { this.structure = structure; structureClassName = structure.getClass().getName(); numLevels = structure.numLevels(); specialLevel = structure.specialLevel(); counts = new CountsTrio[numLevels]; for (int i = 0; i < counts.length; i++) { counts[i] = new CountsTrio(); } }
5472 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5472/909c3acda445bff2b5644a1defeddcf90eadfa52/Model.java/clean/src/danbikel/parser/Model.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 3164, 12, 25598, 6999, 3695, 13, 288, 565, 333, 18, 7627, 273, 3695, 31, 565, 3695, 3834, 273, 3695, 18, 588, 797, 7675, 17994, 5621, 565, 818, 12240, 273, 3695, 18, 2107, 12240, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3164, 12, 25598, 6999, 3695, 13, 288, 565, 333, 18, 7627, 273, 3695, 31, 565, 3695, 3834, 273, 3695, 18, 588, 797, 7675, 17994, 5621, 565, 818, 12240, 273, 3695, 18, 2107, 12240, ...
public org.quickfix.field.SettlInstCode getSettlInstCode() throws FieldNotFound { org.quickfix.field.SettlInstCode value = new org.quickfix.field.SettlInstCode();
public quickfix.field.SettlInstCode getSettlInstCode() throws FieldNotFound { quickfix.field.SettlInstCode value = new quickfix.field.SettlInstCode();
public org.quickfix.field.SettlInstCode getSettlInstCode() throws FieldNotFound { org.quickfix.field.SettlInstCode value = new org.quickfix.field.SettlInstCode(); getField(value); return value; }
8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/SettlementInstructions.java/buggy/src/java/src/quickfix/fix43/SettlementInstructions.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 2358, 18, 19525, 904, 18, 1518, 18, 694, 6172, 10773, 1085, 336, 694, 6172, 10773, 1085, 1435, 1216, 2286, 2768, 225, 288, 2358, 18, 19525, 904, 18, 1518, 18, 694, 6172, 10773, 1085...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 2358, 18, 19525, 904, 18, 1518, 18, 694, 6172, 10773, 1085, 336, 694, 6172, 10773, 1085, 1435, 1216, 2286, 2768, 225, 288, 2358, 18, 19525, 904, 18, 1518, 18, 694, 6172, 10773, 1085...
Parser parser = new ParserFactory(nutchConf).getParser(contentType, url);
Parser parser = new ParserFactory(conf).getParser(contentType, url);
private static String getUrlContent(String url, NutchConf nutchConf) { Protocol protocol; try { protocol = new ProtocolFactory(nutchConf).getProtocol(url); Content content = protocol.getProtocolOutput(new UTF8(url), new CrawlDatum()).getContent(); String contentType = content.getContentType(); Parser parser = new ParserFactory(nutchConf).getParser(contentType, url); Parse parse = parser.getParse(content); System.out.println("text:" + parse.getText()); return parse.getText(); } catch (ProtocolNotFound e) { e.printStackTrace(); } catch (ProtocolException e) { e.printStackTrace(); } catch (ParserNotFound e) { e.printStackTrace(); } catch (ParseException e) { e.printStackTrace(); } return null; }
50818 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50818/25437bc825d50715dcc9a289a1b4c8fbbc6aced1/LanguageIdentifier.java/clean/src/plugin/languageidentifier/src/java/org/apache/nutch/analysis/lang/LanguageIdentifier.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 3238, 760, 514, 8928, 1350, 12, 780, 880, 16, 423, 322, 343, 3976, 290, 322, 343, 3976, 13, 288, 565, 4547, 1771, 31, 565, 775, 288, 1377, 1771, 273, 394, 4547, 1733, 12, 82, 322, 343...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 3238, 760, 514, 8928, 1350, 12, 780, 880, 16, 423, 322, 343, 3976, 290, 322, 343, 3976, 13, 288, 565, 4547, 1771, 31, 565, 775, 288, 1377, 1771, 273, 394, 4547, 1733, 12, 82, 322, 343...
eds.findOrCreate( ed );
ed = eds.findOrCreate( ed ); assert ed.getId() != null;
public void onSetUpInTransaction() throws Exception { super.onSetUpInTransaction(); ed = ExperimentalDesign.Factory.newInstance(); ed.setName( "Experimental Design Bot" ); ed.setDescription( "An experimental design created from the ExperimentalDesignFormControllerTest." ); Collection<ExperimentalFactor> efCol = new HashSet(); for ( int i = 0; i < TEST_ELEMENT_COLLECTION_SIZE; i++ ) { ExperimentalFactor ef = ExperimentalFactor.Factory.newInstance(); ef.setName( "Experimental Factor Bot" ); ef.setDescription( "An experimental factor created from the ExperimentalDesignFormControllerTest" ); efCol.add( ef ); } ed.setExperimentalFactors( efCol ); ExperimentalDesignService eds = ( ExperimentalDesignService ) getBean( "experimentalDesignService" ); eds.findOrCreate( ed ); }
4335 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4335/8e414d94b8a82b6b1fbaad1494f58bf473b52da8/ExperimentalDesignFormControllerTest.java/buggy/gemma-web/src/test/java/ubic/gemma/web/controller/expression/experiment/ExperimentalDesignFormControllerTest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 603, 694, 1211, 382, 3342, 1435, 1216, 1185, 288, 3639, 2240, 18, 265, 694, 1211, 382, 3342, 5621, 3639, 1675, 273, 22844, 287, 15478, 18, 1733, 18, 2704, 1442, 5621, 3639, 167...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 603, 694, 1211, 382, 3342, 1435, 1216, 1185, 288, 3639, 2240, 18, 265, 694, 1211, 382, 3342, 5621, 3639, 1675, 273, 22844, 287, 15478, 18, 1733, 18, 2704, 1442, 5621, 3639, 167...
int index = serverName.lastIndexOf(serverDomain); if (index > 0) { return components.get(serverName.substring(0, --index));
int index = serverName.lastIndexOf("." + serverDomain); if (index > -1) { return components.get(serverName.substring(0, index));
public Component getComponent(JID componentJID) { Component component = components.get(componentJID.getDomain()); if (component != null) { return component; } else { // Search again for those JIDs whose domain include the server name but this // time remove the server name from the JID's domain String serverName = componentJID.getDomain(); int index = serverName.lastIndexOf(serverDomain); if (index > 0) { return components.get(serverName.substring(0, --index)); } } return null; }
51636 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51636/3b03652e24fbf8ed956afc04b1c34a208823fb8f/InternalComponentManager.java/buggy/src/java/org/jivesoftware/wildfire/component/InternalComponentManager.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 5435, 10322, 12, 46, 734, 1794, 46, 734, 13, 288, 3639, 5435, 1794, 273, 4085, 18, 588, 12, 4652, 46, 734, 18, 588, 3748, 10663, 3639, 309, 261, 4652, 480, 446, 13, 288, 5411, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 5435, 10322, 12, 46, 734, 1794, 46, 734, 13, 288, 3639, 5435, 1794, 273, 4085, 18, 588, 12, 4652, 46, 734, 18, 588, 3748, 10663, 3639, 309, 261, 4652, 480, 446, 13, 288, 5411, 3...
else if (m_key.equals(m_plugin.AU_START_URL)) {
else if (m_key.equals(EditableDefinablePlugin.AU_START_URL)) {
public void updateTemplateData(PrintfTemplate template) { if (m_plugin == null || m_key == null)return; m_data = template; m_displayString = template.getViewableTemplate(); if (m_key.equals(m_plugin.AU_NAME)) { m_plugin.setAuName(template.getViewableTemplate()); } else if (m_key.equals(m_plugin.AU_START_URL)) { m_plugin.setAuStartURL(template.getViewableTemplate()); } notifyListenersOfChange(); }
8150 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8150/ec8e5a0280b90d913120c32dc3ba7912b376b9c6/EDPCellData.java/buggy/tools/src/org/lockss/devtools/plugindef/EDPCellData.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 1089, 2283, 751, 12, 23332, 2283, 1542, 13, 288, 565, 309, 261, 81, 67, 4094, 422, 446, 747, 312, 67, 856, 422, 446, 13, 2463, 31, 565, 312, 67, 892, 273, 1542, 31, 565, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 1089, 2283, 751, 12, 23332, 2283, 1542, 13, 288, 565, 309, 261, 81, 67, 4094, 422, 446, 747, 312, 67, 856, 422, 446, 13, 2463, 31, 565, 312, 67, 892, 273, 1542, 31, 565, ...
throw runtime.newNameError("superclass method '" + context.getFrameLastFunc() + "' disabled");
String name = context.getFrameLastFunc(); throw runtime.newNameError("superclass method '" + name + "' disabled", name);
private static IRubyObject evalInternal(ThreadContext context, Node node, IRubyObject self) { IRuby runtime = context.getRuntime(); bigloop: do { if (node == null) return runtime.getNil(); switch (node.nodeId) { case NodeTypes.ALIASNODE: { AliasNode iVisited = (AliasNode) node; if (context.getRubyClass() == null) { throw runtime.newTypeError("no class to make alias"); } context.getRubyClass().defineAlias(iVisited.getNewName(), iVisited.getOldName()); context.getRubyClass().callMethod(context, "method_added", runtime.newSymbol(iVisited.getNewName())); return runtime.getNil(); } case NodeTypes.ANDNODE: { BinaryOperatorNode iVisited = (BinaryOperatorNode) node; IRubyObject result = evalInternal(context, iVisited.getFirstNode(), self); if (!result.isTrue()) return result; node = iVisited.getSecondNode(); continue bigloop; } case NodeTypes.ARGSCATNODE: { ArgsCatNode iVisited = (ArgsCatNode) node; IRubyObject args = evalInternal(context, iVisited.getFirstNode(), self); IRubyObject secondArgs = splatValue(evalInternal(context, iVisited.getSecondNode(), self)); RubyArray list = args instanceof RubyArray ? (RubyArray) args : runtime.newArray(args); return list.concat(secondArgs); } // case NodeTypes.ARGSNODE: // EvaluateVisitor.argsNodeVisitor.execute(this, node); // break; // case NodeTypes.ARGUMENTNODE: // EvaluateVisitor.argumentNodeVisitor.execute(this, node); // break; case NodeTypes.ARRAYNODE: { ArrayNode iVisited = (ArrayNode) node; IRubyObject[] array = new IRubyObject[iVisited.size()]; int i = 0; for (Iterator iterator = iVisited.iterator(); iterator.hasNext();) { Node next = (Node) iterator.next(); array[i++] = evalInternal(context, next, self); } return runtime.newArray(array); } // case NodeTypes.ASSIGNABLENODE: // EvaluateVisitor.assignableNodeVisitor.execute(this, node); // break; case NodeTypes.BACKREFNODE: { BackRefNode iVisited = (BackRefNode) node; IRubyObject backref = context.getBackref(); switch (iVisited.getType()) { case '~': return backref; case '&': return RubyRegexp.last_match(backref); case '`': return RubyRegexp.match_pre(backref); case '\'': return RubyRegexp.match_post(backref); case '+': return RubyRegexp.match_last(backref); } break; } case NodeTypes.BEGINNODE: { BeginNode iVisited = (BeginNode) node; node = iVisited.getBodyNode(); continue bigloop; } case NodeTypes.BIGNUMNODE: { BignumNode iVisited = (BignumNode) node; return RubyBignum.newBignum(runtime, iVisited.getValue()); } // case NodeTypes.BINARYOPERATORNODE: // EvaluateVisitor.binaryOperatorNodeVisitor.execute(this, node); // break; // case NodeTypes.BLOCKARGNODE: // EvaluateVisitor.blockArgNodeVisitor.execute(this, node); // break; case NodeTypes.BLOCKNODE: { BlockNode iVisited = (BlockNode) node; IRubyObject result = runtime.getNil(); for (Iterator iter = iVisited.iterator(); iter.hasNext();) { result = evalInternal(context, (Node) iter.next(), self); } return result; } case NodeTypes.BLOCKPASSNODE: { BlockPassNode iVisited = (BlockPassNode) node; IRubyObject proc = evalInternal(context, iVisited.getBodyNode(), self); if (proc.isNil()) { context.setNoBlock(); try { return evalInternal(context, iVisited.getIterNode(), self); } finally { context.clearNoBlock(); } } // If not already a proc then we should try and make it one. if (!(proc instanceof RubyProc)) { proc = proc.convertToType("Proc", "to_proc", false); if (!(proc instanceof RubyProc)) { throw runtime.newTypeError("wrong argument type " + proc.getMetaClass().getName() + " (expected Proc)"); } } // TODO: Add safety check for taintedness Block block = (Block) context.getCurrentBlock(); if (block != null) { IRubyObject blockObject = block.getBlockObject(); // The current block is already associated with the proc. No need to create new // block for it. Just eval! if (blockObject != null && blockObject == proc) { try { context.setBlockAvailable(); return evalInternal(context, iVisited.getIterNode(), self); } finally { context.clearBlockAvailable(); } } } context.preBlockPassEval(((RubyProc) proc).getBlock()); try { return evalInternal(context, iVisited.getIterNode(), self); } finally { context.postBlockPassEval(); } } case NodeTypes.BREAKNODE: { BreakNode iVisited = (BreakNode) node; IRubyObject result = evalInternal(context, iVisited.getValueNode(), self); JumpException je = new JumpException(JumpException.JumpType.BreakJump); je.setPrimaryData(result); je.setSecondaryData(node); throw je; } case NodeTypes.CALLNODE: { CallNode iVisited = (CallNode) node; context.beginCallArgs(); IRubyObject receiver = null; IRubyObject[] args = null; try { receiver = evalInternal(context, iVisited.getReceiverNode(), self); args = setupArgs(context, iVisited.getArgsNode(), self); } finally { context.endCallArgs(); } assert receiver.getMetaClass() != null : receiver.getClass().getName(); // If reciever is self then we do the call the same way as vcall CallType callType = (receiver == self ? CallType.VARIABLE : CallType.NORMAL); return receiver.callMethod(context, iVisited.getName(), args, callType); } case NodeTypes.CASENODE: { CaseNode iVisited = (CaseNode) node; IRubyObject expression = null; if (iVisited.getCaseNode() != null) { expression = evalInternal(context, iVisited.getCaseNode(), self); } context.pollThreadEvents(); IRubyObject result = runtime.getNil(); Node firstWhenNode = iVisited.getFirstWhenNode(); while (firstWhenNode != null) { if (!(firstWhenNode instanceof WhenNode)) { node = firstWhenNode; continue bigloop; } WhenNode whenNode = (WhenNode) firstWhenNode; if (whenNode.getExpressionNodes() instanceof ArrayNode) { for (Iterator iter = ((ArrayNode) whenNode.getExpressionNodes()).iterator(); iter .hasNext();) { Node tag = (Node) iter.next(); context.setPosition(tag.getPosition()); if (isTrace(runtime)) { callTraceFunction(context, "line", self); } // Ruby grammar has nested whens in a case body because of // productions case_body and when_args. if (tag instanceof WhenNode) { RubyArray expressions = (RubyArray) evalInternal(context, ((WhenNode) tag) .getExpressionNodes(), self); for (int j = 0; j < expressions.getLength(); j++) { IRubyObject condition = expressions.entry(j); if ((expression != null && condition.callMethod(context, "===", expression) .isTrue()) || (expression == null && condition.isTrue())) { node = ((WhenNode) firstWhenNode).getBodyNode(); continue bigloop; } } continue; } result = evalInternal(context, tag, self); if ((expression != null && result.callMethod(context, "===", expression).isTrue()) || (expression == null && result.isTrue())) { node = whenNode.getBodyNode(); continue bigloop; } } } else { result = evalInternal(context, whenNode.getExpressionNodes(), self); if ((expression != null && result.callMethod(context, "===", expression).isTrue()) || (expression == null && result.isTrue())) { node = ((WhenNode) firstWhenNode).getBodyNode(); continue bigloop; } } context.pollThreadEvents(); firstWhenNode = whenNode.getNextCase(); } return runtime.getNil(); } case NodeTypes.CLASSNODE: { ClassNode iVisited = (ClassNode) node; Node superNode = iVisited.getSuperNode(); RubyClass superClass = superNode == null ? null : (RubyClass) evalInternal(context, superNode, self); Node classNameNode = iVisited.getCPath(); String name = ((INameNode) classNameNode).getName(); RubyModule enclosingClass = getEnclosingModule(context, classNameNode, self); RubyClass rubyClass = enclosingClass.defineOrGetClassUnder(name, superClass); if (context.getWrapper() != null) { rubyClass.extendObject(context.getWrapper()); rubyClass.includeModule(context.getWrapper()); } return evalClassDefinitionBody(context, iVisited.getScope(), iVisited.getBodyNode(), rubyClass, self); } case NodeTypes.CLASSVARASGNNODE: { ClassVarAsgnNode iVisited = (ClassVarAsgnNode) node; IRubyObject result = evalInternal(context, iVisited.getValueNode(), self); RubyModule rubyClass = (RubyModule) context.peekCRef().getValue(); if (rubyClass == null) { rubyClass = self.getMetaClass(); } else if (rubyClass.isSingleton()) { rubyClass = (RubyModule) rubyClass.getInstanceVariable("__attached__"); } rubyClass.setClassVar(iVisited.getName(), result); return result; } case NodeTypes.CLASSVARDECLNODE: { ClassVarDeclNode iVisited = (ClassVarDeclNode) node; // FIXME: shouldn't we use cref here? if (context.getRubyClass() == null) { throw runtime.newTypeError("no class/module to define class variable"); } IRubyObject result = evalInternal(context, iVisited.getValueNode(), self); ((RubyModule) context.peekCRef().getValue()).setClassVar(iVisited.getName(), result); return runtime.getNil(); } case NodeTypes.CLASSVARNODE: { ClassVarNode iVisited = (ClassVarNode) node; RubyModule rubyClass = (RubyModule) context.peekCRef().getValue(); if (rubyClass == null) { rubyClass = self.getMetaClass(); } else if (rubyClass.isSingleton()) { rubyClass = (RubyModule)rubyClass.getInstanceVariable("__attached__"); } return rubyClass.getClassVar(iVisited.getName()); } case NodeTypes.COLON2NODE: { Colon2Node iVisited = (Colon2Node) node; Node leftNode = iVisited.getLeftNode(); // TODO: Made this more colon3 friendly because of cpath production // rule in grammar (it is convenient to think of them as the same thing // at a grammar level even though evaluation is). if (leftNode == null) { return runtime.getObject().getConstantFrom(iVisited.getName()); } else { IRubyObject result = evalInternal(context, iVisited.getLeftNode(), self); if (result instanceof RubyModule) { return ((RubyModule) result).getConstantFrom(iVisited.getName()); } else { return result.callMethod(context, iVisited.getName()); } } } case NodeTypes.COLON3NODE: { Colon3Node iVisited = (Colon3Node) node; return runtime.getObject().getConstantFrom(iVisited.getName()); } case NodeTypes.CONSTDECLNODE: { ConstDeclNode iVisited = (ConstDeclNode) node; IRubyObject result = evalInternal(context, iVisited.getValueNode(), self); IRubyObject module; if (iVisited.getPathNode() != null) { module = evalInternal(context, iVisited.getPathNode(), self); } else { // FIXME: why do we check RubyClass and then use CRef? if (context.getRubyClass() == null) { // TODO: wire into new exception handling mechanism throw runtime.newTypeError("no class/module to define constant"); } module = (RubyModule) context.peekCRef().getValue(); } // FIXME: shouldn't we use the result of this set in setResult? ((RubyModule) module).setConstant(iVisited.getName(), result); return result; } case NodeTypes.CONSTNODE: { ConstNode iVisited = (ConstNode) node; return context.getConstant(iVisited.getName()); } case NodeTypes.DASGNNODE: { DAsgnNode iVisited = (DAsgnNode) node; IRubyObject result = evalInternal(context, iVisited.getValueNode(), self); // System.out.println("DSetting: " + iVisited.getName() + " at index " + iVisited.getIndex() + " and at depth " + iVisited.getDepth() + " and set " + result); context.getCurrentScope().setValue(iVisited.getIndex(), result, iVisited.getDepth()); return result; } case NodeTypes.DEFINEDNODE: { DefinedNode iVisited = (DefinedNode) node; String definition = getDefinition(context, iVisited.getExpressionNode(), self); if (definition != null) { return runtime.newString(definition); } else { return runtime.getNil(); } } case NodeTypes.DEFNNODE: { DefnNode iVisited = (DefnNode) node; RubyModule containingClass = context.getRubyClass(); if (containingClass == null) { throw runtime.newTypeError("No class to add method."); } String name = iVisited.getName(); if (containingClass == runtime.getObject() && name.equals("initialize")) { runtime.getWarnings().warn("redefining Object#initialize may cause infinite loop"); } Visibility visibility = context.getCurrentVisibility(); if (name.equals("initialize") || visibility.isModuleFunction()) { visibility = Visibility.PRIVATE; } DefaultMethod newMethod = new DefaultMethod(containingClass, iVisited.getScope(), iVisited.getBodyNode(), (ArgsNode) iVisited.getArgsNode(), visibility, context.peekCRef()); if (iVisited.getBodyNode() != null) { iVisited.getBodyNode().accept(new CreateJumpTargetVisitor(newMethod)); } containingClass.addMethod(name, newMethod); if (context.getCurrentVisibility().isModuleFunction()) { containingClass.getSingletonClass().addMethod( name, new WrapperCallable(containingClass.getSingletonClass(), newMethod, Visibility.PUBLIC)); containingClass.callMethod(context, "singleton_method_added", runtime.newSymbol(name)); } // 'class << state.self' and 'class << obj' uses defn as opposed to defs if (containingClass.isSingleton()) { ((MetaClass) containingClass).getAttachedObject().callMethod( context, "singleton_method_added", runtime.newSymbol(iVisited.getName())); } else { containingClass.callMethod(context, "method_added", runtime.newSymbol(name)); } return runtime.getNil(); } case NodeTypes.DEFSNODE: { DefsNode iVisited = (DefsNode) node; IRubyObject receiver = evalInternal(context, iVisited.getReceiverNode(), self); if (runtime.getSafeLevel() >= 4 && !receiver.isTaint()) { throw runtime.newSecurityError("Insecure; can't define singleton method."); } if (receiver.isFrozen()) { throw runtime.newFrozenError("object"); } if (!receiver.singletonMethodsAllowed()) { throw runtime.newTypeError("can't define singleton method \"" + iVisited.getName() + "\" for " + receiver.getType()); } RubyClass rubyClass = receiver.getSingletonClass(); if (runtime.getSafeLevel() >= 4) { ICallable method = (ICallable) rubyClass.getMethods().get(iVisited.getName()); if (method != null) { throw runtime.newSecurityError("Redefining method prohibited."); } } DefaultMethod newMethod = new DefaultMethod(rubyClass, iVisited.getScope(), iVisited.getBodyNode(), (ArgsNode) iVisited.getArgsNode(), Visibility.PUBLIC, context.peekCRef()); if (iVisited.getBodyNode() != null) { iVisited.getBodyNode().accept(new CreateJumpTargetVisitor(newMethod)); } rubyClass.addMethod(iVisited.getName(), newMethod); receiver.callMethod(context, "singleton_method_added", runtime.newSymbol(iVisited.getName())); return runtime.getNil(); } case NodeTypes.DOTNODE: { DotNode iVisited = (DotNode) node; return RubyRange.newRange(runtime, evalInternal(context, iVisited.getBeginNode(), self), evalInternal(context, iVisited .getEndNode(), self), iVisited.isExclusive()); } case NodeTypes.DREGEXPNODE: { DRegexpNode iVisited = (DRegexpNode) node; StringBuffer sb = new StringBuffer(); for (Iterator iterator = iVisited.iterator(); iterator.hasNext();) { Node iterNode = (Node) iterator.next(); sb.append(evalInternal(context, iterNode, self).toString()); } String lang = null; int opts = iVisited.getOptions(); if((opts & 16) != 0) { // param n lang = "n"; } else if((opts & 48) != 0) { // param s lang = "s"; } else if((opts & 64) != 0) { // param s lang = "u"; } return RubyRegexp.newRegexp(runtime, sb.toString(), iVisited.getOptions(), lang); } case NodeTypes.DSTRNODE: { DStrNode iVisited = (DStrNode) node; StringBuffer sb = new StringBuffer(); for (Iterator iterator = iVisited.iterator(); iterator.hasNext();) { Node iterNode = (Node) iterator.next(); sb.append(evalInternal(context, iterNode, self).toString()); } return runtime.newString(sb.toString()); } case NodeTypes.DSYMBOLNODE: { DSymbolNode iVisited = (DSymbolNode) node; StringBuffer sb = new StringBuffer(); for (Iterator iterator = iVisited.getNode().iterator(); iterator.hasNext();) { Node iterNode = (Node) iterator.next(); sb.append(evalInternal(context, iterNode, self).toString()); } return runtime.newSymbol(sb.toString()); } case NodeTypes.DVARNODE: { DVarNode iVisited = (DVarNode) node; // System.out.println("DGetting: " + iVisited.getName() + " at index " + iVisited.getIndex() + " and at depth " + iVisited.getDepth()); IRubyObject obj = context.getCurrentScope().getValue(iVisited.getIndex(), iVisited.getDepth()); // FIXME: null check is removable once we figure out how to assign to unset named block args return obj == null ? runtime.getNil() : obj; } case NodeTypes.DXSTRNODE: { DXStrNode iVisited = (DXStrNode) node; StringBuffer sb = new StringBuffer(); for (Iterator iterator = iVisited.iterator(); iterator.hasNext();) { Node iterNode = (Node) iterator.next(); sb.append(evalInternal(context, iterNode, self).toString()); } return self.callMethod(context, "`", runtime.newString(sb.toString())); } case NodeTypes.ENSURENODE: { EnsureNode iVisited = (EnsureNode) node; // save entering the try if there's nothing to ensure if (iVisited.getEnsureNode() != null) { IRubyObject result = runtime.getNil(); try { result = evalInternal(context, iVisited.getBodyNode(), self); } finally { evalInternal(context, iVisited.getEnsureNode(), self); } return result; } node = iVisited.getBodyNode(); continue bigloop; } case NodeTypes.EVSTRNODE: { EvStrNode iVisited = (EvStrNode) node; node = iVisited.getBody(); continue bigloop; } case NodeTypes.FALSENODE: { context.pollThreadEvents(); return runtime.getFalse(); } case NodeTypes.FCALLNODE: { FCallNode iVisited = (FCallNode) node; context.beginCallArgs(); IRubyObject[] args; try { args = setupArgs(context, iVisited.getArgsNode(), self); } finally { context.endCallArgs(); } return self.callMethod(context, iVisited.getName(), args, CallType.FUNCTIONAL); } case NodeTypes.FIXNUMNODE: { FixnumNode iVisited = (FixnumNode) node; return runtime.newFixnum(iVisited.getValue()); } case NodeTypes.FLIPNODE: { FlipNode iVisited = (FlipNode) node; IRubyObject result = runtime.getNil(); if (iVisited.isExclusive()) { if (!context.getCurrentScope().getValue(iVisited.getIndex(), iVisited.getDepth()).isTrue()) { result = evalInternal(context, iVisited.getBeginNode(), self).isTrue() ? runtime.getFalse() : runtime.getTrue(); context.getCurrentScope().setValue(iVisited.getIndex(), result, iVisited.getDepth()); return result; } else { if (evalInternal(context, iVisited.getEndNode(), self).isTrue()) { context.getCurrentScope().setValue(iVisited.getIndex(), runtime.getFalse(), iVisited.getDepth()); } return runtime.getTrue(); } } else { if (!context.getCurrentScope().getValue(iVisited.getIndex(), iVisited.getDepth()).isTrue()) { if (evalInternal(context, iVisited.getBeginNode(), self).isTrue()) { context.getCurrentScope().setValue( iVisited.getIndex(), evalInternal(context, iVisited.getEndNode(), self).isTrue() ? runtime.getFalse() : runtime.getTrue(), iVisited.getDepth()); return runtime.getTrue(); } else { return runtime.getFalse(); } } else { if (evalInternal(context, iVisited.getEndNode(), self).isTrue()) { context.getCurrentScope().setValue(iVisited.getIndex(), runtime.getFalse(), iVisited.getDepth()); } return runtime.getTrue(); } } } case NodeTypes.FLOATNODE: { FloatNode iVisited = (FloatNode) node; return RubyFloat.newFloat(runtime, iVisited.getValue()); } case NodeTypes.FORNODE: { ForNode iVisited = (ForNode) node; // For nodes do not have to create an addition scope so we just pass null context.preForLoopEval(Block.createBlock(iVisited.getVarNode(), null, iVisited.getCallable(), self)); try { while (true) { try { ISourcePosition position = context.getPosition(); context.beginCallArgs(); IRubyObject recv = null; try { recv = evalInternal(context, iVisited.getIterNode(), self); } finally { context.setPosition(position); context.endCallArgs(); } return recv.callMethod(context, "each", IRubyObject.NULL_ARRAY, CallType.NORMAL); } catch (JumpException je) { switch (je.getJumpType().getTypeId()) { case JumpType.RETRY: // do nothing, allow loop to retry break; default: throw je; } } } } catch (JumpException je) { switch (je.getJumpType().getTypeId()) { case JumpType.BREAK: IRubyObject breakValue = (IRubyObject) je.getPrimaryData(); return breakValue == null ? runtime.getNil() : breakValue; default: throw je; } } finally { context.postForLoopEval(); } } case NodeTypes.GLOBALASGNNODE: { GlobalAsgnNode iVisited = (GlobalAsgnNode) node; IRubyObject result = evalInternal(context, iVisited.getValueNode(), self); runtime.getGlobalVariables().set(iVisited.getName(), result); return result; } case NodeTypes.GLOBALVARNODE: { GlobalVarNode iVisited = (GlobalVarNode) node; return runtime.getGlobalVariables().get(iVisited.getName()); } case NodeTypes.HASHNODE: { HashNode iVisited = (HashNode) node; Map hash = null; if (iVisited.getListNode() != null) { hash = new HashMap(iVisited.getListNode().size() / 2); for (Iterator iterator = iVisited.getListNode().iterator(); iterator.hasNext();) { // insert all nodes in sequence, hash them in the final instruction // KEY IRubyObject key = evalInternal(context, (Node) iterator.next(), self); IRubyObject value = evalInternal(context, (Node) iterator.next(), self); hash.put(key, value); } } if (hash == null) { return RubyHash.newHash(runtime); } return RubyHash.newHash(runtime, hash, runtime.getNil()); } case NodeTypes.IFNODE: { IfNode iVisited = (IfNode) node; IRubyObject result = evalInternal(context, iVisited.getCondition(), self); if (result.isTrue()) { node = iVisited.getThenBody(); continue bigloop; } else { node = iVisited.getElseBody(); continue bigloop; } } case NodeTypes.INSTASGNNODE: { InstAsgnNode iVisited = (InstAsgnNode) node; IRubyObject result = evalInternal(context, iVisited.getValueNode(), self); self.setInstanceVariable(iVisited.getName(), result); return result; } case NodeTypes.INSTVARNODE: { InstVarNode iVisited = (InstVarNode) node; IRubyObject variable = self.getInstanceVariable(iVisited.getName()); return variable == null ? runtime.getNil() : variable; } // case NodeTypes.ISCOPINGNODE: // EvaluateVisitor.iScopingNodeVisitor.execute(this, node); // break; case NodeTypes.ITERNODE: { IterNode iVisited = (IterNode) node; context.preIterEval(Block.createBlock(iVisited.getVarNode(), new DynamicScope(iVisited.getScope(), context.getCurrentScope()), iVisited.getCallable(), self)); try { while (true) { try { context.setBlockAvailable(); return evalInternal(context, iVisited.getIterNode(), self); } catch (JumpException je) { switch (je.getJumpType().getTypeId()) { case JumpType.RETRY: // allow loop to retry break; default: throw je; } } finally { context.clearBlockAvailable(); } } } catch (JumpException je) { switch (je.getJumpType().getTypeId()) { case JumpType.BREAK: IRubyObject breakValue = (IRubyObject) je.getPrimaryData(); return breakValue == null ? runtime.getNil() : breakValue; default: throw je; } } finally { context.postIterEval(); } } case NodeTypes.LOCALASGNNODE: { LocalAsgnNode iVisited = (LocalAsgnNode) node; IRubyObject result = evalInternal(context, iVisited.getValueNode(), self); // System.out.println("LSetting: " + iVisited.getName() + " at index " + iVisited.getIndex() + " and at depth " + iVisited.getDepth() + " and set " + result); context.getCurrentScope().setValue(iVisited.getIndex(), result, iVisited.getDepth()); return result; } case NodeTypes.LOCALVARNODE: { LocalVarNode iVisited = (LocalVarNode) node; //System.out.println("DGetting: " + iVisited.getName() + " at index " + iVisited.getIndex() + " and at depth " + iVisited.getDepth()); IRubyObject result = context.getCurrentScope().getValue(iVisited.getIndex(), iVisited.getDepth()); return result == null ? runtime.getNil() : result; } case NodeTypes.MATCH2NODE: { Match2Node iVisited = (Match2Node) node; IRubyObject recv = evalInternal(context, iVisited.getReceiverNode(), self); IRubyObject value = evalInternal(context, iVisited.getValueNode(), self); return ((RubyRegexp) recv).match(value); } case NodeTypes.MATCH3NODE: { Match3Node iVisited = (Match3Node) node; IRubyObject recv = evalInternal(context, iVisited.getReceiverNode(), self); IRubyObject value = evalInternal(context, iVisited.getValueNode(), self); if (value instanceof RubyString) { return ((RubyRegexp) recv).match(value); } else { return value.callMethod(context, "=~", recv); } } case NodeTypes.MATCHNODE: { MatchNode iVisited = (MatchNode) node; return ((RubyRegexp) evalInternal(context, iVisited.getRegexpNode(), self)).match2(); } case NodeTypes.MODULENODE: { ModuleNode iVisited = (ModuleNode) node; Node classNameNode = iVisited.getCPath(); String name = ((INameNode) classNameNode).getName(); RubyModule enclosingModule = getEnclosingModule(context, classNameNode, self); if (enclosingModule == null) { throw runtime.newTypeError("no outer class/module"); } RubyModule module; if (enclosingModule == runtime.getObject()) { module = runtime.getOrCreateModule(name); } else { module = enclosingModule.defineModuleUnder(name); } return evalClassDefinitionBody(context, iVisited.getScope(), iVisited.getBodyNode(), module, self); } case NodeTypes.MULTIPLEASGNNODE: { MultipleAsgnNode iVisited = (MultipleAsgnNode) node; return AssignmentVisitor.assign(context, self, iVisited, evalInternal(context, iVisited.getValueNode(), self), false); } case NodeTypes.NEWLINENODE: { NewlineNode iVisited = (NewlineNode) node; // something in here is used to build up ruby stack trace... context.setPosition(iVisited.getPosition()); if (isTrace(runtime)) { callTraceFunction(context, "line", self); } // TODO: do above but not below for additional newline nodes node = iVisited.getNextNode(); continue bigloop; } case NodeTypes.NEXTNODE: { NextNode iVisited = (NextNode) node; context.pollThreadEvents(); IRubyObject result = evalInternal(context, iVisited.getValueNode(), self); // now used as an interpreter event JumpException je = new JumpException(JumpException.JumpType.NextJump); je.setPrimaryData(result); je.setSecondaryData(iVisited); //state.setCurrentException(je); throw je; } case NodeTypes.NILNODE: return runtime.getNil(); case NodeTypes.NOTNODE: { NotNode iVisited = (NotNode) node; IRubyObject result = evalInternal(context, iVisited.getConditionNode(), self); return result.isTrue() ? runtime.getFalse() : runtime.getTrue(); } case NodeTypes.NTHREFNODE: { NthRefNode iVisited = (NthRefNode) node; return RubyRegexp.nth_match(iVisited.getMatchNumber(), context.getBackref()); } case NodeTypes.OPASGNANDNODE: { BinaryOperatorNode iVisited = (BinaryOperatorNode) node; // add in reverse order IRubyObject result = evalInternal(context, iVisited.getFirstNode(), self); if (!result.isTrue()) return result; node = iVisited.getSecondNode(); continue bigloop; } case NodeTypes.OPASGNNODE: { OpAsgnNode iVisited = (OpAsgnNode) node; IRubyObject receiver = evalInternal(context, iVisited.getReceiverNode(), self); IRubyObject value = receiver.callMethod(context, iVisited.getVariableName()); if (iVisited.getOperatorName().equals("||")) { if (value.isTrue()) { return value; } value = evalInternal(context, iVisited.getValueNode(), self); } else if (iVisited.getOperatorName().equals("&&")) { if (!value.isTrue()) { return value; } value = evalInternal(context, iVisited.getValueNode(), self); } else { value = value.callMethod(context, iVisited.getOperatorName(), evalInternal(context, iVisited.getValueNode(), self)); } receiver.callMethod(context, iVisited.getVariableName() + "=", value); context.pollThreadEvents(); return value; } case NodeTypes.OPASGNORNODE: { OpAsgnOrNode iVisited = (OpAsgnOrNode) node; String def = getDefinition(context, iVisited.getFirstNode(), self); IRubyObject result = runtime.getNil(); if (def != null) { result = evalInternal(context, iVisited.getFirstNode(), self); } if (!result.isTrue()) { result = evalInternal(context, iVisited.getSecondNode(), self); } return result; } case NodeTypes.OPELEMENTASGNNODE: { OpElementAsgnNode iVisited = (OpElementAsgnNode) node; IRubyObject receiver = evalInternal(context, iVisited.getReceiverNode(), self); IRubyObject[] args = setupArgs(context, iVisited.getArgsNode(), self); IRubyObject firstValue = receiver.callMethod(context, "[]", args); if (iVisited.getOperatorName().equals("||")) { if (firstValue.isTrue()) { return firstValue; } firstValue = evalInternal(context, iVisited.getValueNode(), self); } else if (iVisited.getOperatorName().equals("&&")) { if (!firstValue.isTrue()) { return firstValue; } firstValue = evalInternal(context, iVisited.getValueNode(), self); } else { firstValue = firstValue.callMethod(context, iVisited.getOperatorName(), evalInternal(context, iVisited .getValueNode(), self)); } IRubyObject[] expandedArgs = new IRubyObject[args.length + 1]; System.arraycopy(args, 0, expandedArgs, 0, args.length); expandedArgs[expandedArgs.length - 1] = firstValue; return receiver.callMethod(context, "[]=", expandedArgs); } case NodeTypes.OPTNNODE: { OptNNode iVisited = (OptNNode) node; IRubyObject result = runtime.getNil(); while (RubyKernel.gets(runtime.getTopSelf(), IRubyObject.NULL_ARRAY).isTrue()) { loop: while (true) { // Used for the 'redo' command try { result = evalInternal(context, iVisited.getBodyNode(), self); break; } catch (JumpException je) { switch (je.getJumpType().getTypeId()) { case JumpType.REDO: // do nothing, this iteration restarts break; case JumpType.NEXT: // recheck condition break loop; case JumpType.BREAK: // end loop return (IRubyObject) je.getPrimaryData(); default: throw je; } } } } return result; } case NodeTypes.ORNODE: { OrNode iVisited = (OrNode) node; IRubyObject result = evalInternal(context, iVisited.getFirstNode(), self); if (!result.isTrue()) { result = evalInternal(context, iVisited.getSecondNode(), self); } return result; } // case NodeTypes.POSTEXENODE: // EvaluateVisitor.postExeNodeVisitor.execute(this, node); // break; case NodeTypes.REDONODE: { context.pollThreadEvents(); // now used as an interpreter event JumpException je = new JumpException(JumpException.JumpType.RedoJump); je.setSecondaryData(node); throw je; } case NodeTypes.REGEXPNODE: { RegexpNode iVisited = (RegexpNode) node; String lang = null; int opts = iVisited.getOptions(); if((opts & 16) != 0) { // param n lang = "n"; } else if((opts & 48) != 0) { // param s lang = "s"; } else if((opts & 64) != 0) { // param s lang = "u"; } return RubyRegexp.newRegexp(runtime, iVisited.getPattern(), lang); } case NodeTypes.RESCUEBODYNODE: { RescueBodyNode iVisited = (RescueBodyNode) node; node = iVisited.getBodyNode(); continue bigloop; } case NodeTypes.RESCUENODE: { RescueNode iVisited = (RescueNode)node; RescuedBlock : while (true) { try { // Execute rescue block IRubyObject result = evalInternal(context, iVisited.getBodyNode(), self); // If no exception is thrown execute else block if (iVisited.getElseNode() != null) { if (iVisited.getRescueNode() == null) { runtime.getWarnings().warn(iVisited.getElseNode().getPosition(), "else without rescue is useless"); } result = evalInternal(context, iVisited.getElseNode(), self); } return result; } catch (RaiseException raiseJump) { RubyException raisedException = raiseJump.getException(); // TODO: Rubicon TestKernel dies without this line. A cursory glance implies we // falsely set $! to nil and this sets it back to something valid. This should // get fixed at the same time we address bug #1296484. runtime.getGlobalVariables().set("$!", raisedException); RescueBodyNode rescueNode = iVisited.getRescueNode(); while (rescueNode != null) { Node exceptionNodes = rescueNode.getExceptionNodes(); ListNode exceptionNodesList; if (exceptionNodes instanceof SplatNode) { exceptionNodesList = (ListNode) evalInternal(context, exceptionNodes, self); } else { exceptionNodesList = (ListNode) exceptionNodes; } if (isRescueHandled(context, raisedException, exceptionNodesList, self)) { try { return evalInternal(context, rescueNode, self); } catch (JumpException je) { if (je.getJumpType() == JumpException.JumpType.RetryJump) { // should be handled in the finally block below //state.runtime.getGlobalVariables().set("$!", state.runtime.getNil()); //state.threadContext.setRaisedException(null); continue RescuedBlock; } else { throw je; } } } rescueNode = rescueNode.getOptRescueNode(); } // no takers; bubble up throw raiseJump; } finally { // clear exception when handled or retried runtime.getGlobalVariables().set("$!", runtime.getNil()); } } } case NodeTypes.RETRYNODE: { context.pollThreadEvents(); JumpException je = new JumpException(JumpException.JumpType.RetryJump); throw je; } case NodeTypes.RETURNNODE: { ReturnNode iVisited = (ReturnNode) node; IRubyObject result = evalInternal(context, iVisited.getValueNode(), self); JumpException je = new JumpException(JumpException.JumpType.ReturnJump); je.setPrimaryData(iVisited.getTarget()); je.setSecondaryData(result); je.setTertiaryData(iVisited); throw je; } case NodeTypes.ROOTNODE: { RootNode iVisited = (RootNode) node; DynamicScope scope = iVisited.getScope(); // Serialization killed our dynamic scope. We can just create an empty one // since serialization cannot serialize an eval (which is the only thing // which is capable of having a non-empty dynamic scope). if (scope == null) { scope = new DynamicScope(iVisited.getStaticScope(), null); } // Each root node has a top-level scope that we need to push context.preRootNode(scope); // FIXME: Wire up BEGIN and END nodes try { return eval(context, iVisited.getBodyNode(), self); } finally { context.postRootNode(); } } case NodeTypes.SCLASSNODE: { SClassNode iVisited = (SClassNode) node; IRubyObject receiver = evalInternal(context, iVisited.getReceiverNode(), self); RubyClass singletonClass; if (receiver.isNil()) { singletonClass = runtime.getNilClass(); } else if (receiver == runtime.getTrue()) { singletonClass = runtime.getClass("TrueClass"); } else if (receiver == runtime.getFalse()) { singletonClass = runtime.getClass("FalseClass"); } else { if (runtime.getSafeLevel() >= 4 && !receiver.isTaint()) { throw runtime.newSecurityError("Insecure: can't extend object."); } singletonClass = receiver.getSingletonClass(); } if (context.getWrapper() != null) { singletonClass.extendObject(context.getWrapper()); singletonClass.includeModule(context.getWrapper()); } return evalClassDefinitionBody(context, iVisited.getScope(), iVisited.getBodyNode(), singletonClass, self); } case NodeTypes.SELFNODE: return self; case NodeTypes.SPLATNODE: { SplatNode iVisited = (SplatNode) node; return splatValue(evalInternal(context, iVisited.getValue(), self)); } //// case NodeTypes.STARNODE: //// EvaluateVisitor.starNodeVisitor.execute(this, node); //// break; case NodeTypes.STRNODE: { StrNode iVisited = (StrNode) node; return runtime.newString(iVisited.getValue()); } case NodeTypes.SUPERNODE: { SuperNode iVisited = (SuperNode) node; if (context.getFrameLastClass() == null) { throw runtime.newNameError("Superclass method '" + context.getFrameLastFunc() + "' disabled."); } context.beginCallArgs(); IRubyObject[] args = null; try { args = setupArgs(context, iVisited.getArgsNode(), self); } finally { context.endCallArgs(); } return context.callSuper(args); } case NodeTypes.SVALUENODE: { SValueNode iVisited = (SValueNode) node; return aValueSplat(evalInternal(context, iVisited.getValue(), self)); } case NodeTypes.SYMBOLNODE: { SymbolNode iVisited = (SymbolNode) node; return runtime.newSymbol(iVisited.getName()); } case NodeTypes.TOARYNODE: { ToAryNode iVisited = (ToAryNode) node; return aryToAry(evalInternal(context, iVisited.getValue(), self)); } case NodeTypes.TRUENODE: { context.pollThreadEvents(); return runtime.getTrue(); } case NodeTypes.UNDEFNODE: { UndefNode iVisited = (UndefNode) node; if (context.getRubyClass() == null) { throw runtime .newTypeError("No class to undef method '" + iVisited.getName() + "'."); } context.getRubyClass().undef(iVisited.getName()); return runtime.getNil(); } case NodeTypes.UNTILNODE: { UntilNode iVisited = (UntilNode) node; IRubyObject result = runtime.getNil(); while (!(result = evalInternal(context, iVisited.getConditionNode(), self)).isTrue()) { loop: while (true) { // Used for the 'redo' command try { result = evalInternal(context, iVisited.getBodyNode(), self); break loop; } catch (JumpException je) { switch (je.getJumpType().getTypeId()) { case JumpType.REDO: continue; case JumpType.NEXT: break loop; case JumpType.BREAK: return (IRubyObject) je.getPrimaryData(); default: throw je; } } } } return result; } case NodeTypes.VALIASNODE: { VAliasNode iVisited = (VAliasNode) node; runtime.getGlobalVariables().alias(iVisited.getNewName(), iVisited.getOldName()); return runtime.getNil(); } case NodeTypes.VCALLNODE: { VCallNode iVisited = (VCallNode) node; return self.callMethod(context, iVisited.getName(), IRubyObject.NULL_ARRAY, CallType.VARIABLE); } case NodeTypes.WHENNODE: assert false; return null; case NodeTypes.WHILENODE: { WhileNode iVisited = (WhileNode) node; IRubyObject result = runtime.getNil(); boolean firstTest = iVisited.evaluateAtStart(); while (!firstTest || (result = evalInternal(context, iVisited.getConditionNode(), self)).isTrue()) { firstTest = true; loop: while (true) { // Used for the 'redo' command try { evalInternal(context, iVisited.getBodyNode(), self); break loop; } catch (JumpException je) { switch (je.getJumpType().getTypeId()) { case JumpType.REDO: continue; case JumpType.NEXT: break loop; case JumpType.BREAK: return result; default: throw je; } } } } return result; } case NodeTypes.XSTRNODE: { XStrNode iVisited = (XStrNode) node; return self.callMethod(context, "`", runtime.newString(iVisited.getValue())); } case NodeTypes.YIELDNODE: { YieldNode iVisited = (YieldNode) node; IRubyObject result = evalInternal(context, iVisited.getArgsNode(), self); if (iVisited.getArgsNode() == null) { result = null; } return context.yieldCurrentBlock(result, null, null, iVisited.getCheckState()); } case NodeTypes.ZARRAYNODE: { return runtime.newArray(); } case NodeTypes.ZSUPERNODE: { if (context.getFrameLastClass() == null) { throw runtime.newNameError("superclass method '" + context.getFrameLastFunc() + "' disabled"); } return context.callSuper(context.getFrameArgs()); } } } while (true); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/1278c5bb3507a052d150d814f15453542ae41aed/EvaluationState.java/clean/src/org/jruby/evaluator/EvaluationState.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 760, 15908, 10340, 921, 5302, 3061, 12, 3830, 1042, 819, 16, 2029, 756, 16, 15908, 10340, 921, 365, 13, 288, 3639, 15908, 10340, 3099, 273, 819, 18, 588, 5576, 5621, 7734, 5446, 649...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 15908, 10340, 921, 5302, 3061, 12, 3830, 1042, 819, 16, 2029, 756, 16, 15908, 10340, 921, 365, 13, 288, 3639, 15908, 10340, 3099, 273, 819, 18, 588, 5576, 5621, 7734, 5446, 649...
public void processOutgoing(Message[] messages, PeerNode pn, boolean neverWaitForPacketNumber) throws NotConnectedException, WouldBlockException {
public void processOutgoing(MessageItem[] messages, PeerNode pn, boolean neverWaitForPacketNumber) throws NotConnectedException, WouldBlockException {
public void processOutgoing(Message[] messages, PeerNode pn, boolean neverWaitForPacketNumber) throws NotConnectedException, WouldBlockException { byte[][] messageData = new byte[messages.length][]; int length = 1; for(int i=0;i<messageData.length;i++) { messageData[i] = messages[i].encodeToPacket(this, pn); Logger.minor(this, "Sending: "+messages[i]+" length "+messageData[i].length); length += (messageData[i].length + 2); } if(length < node.usm.getMaxPacketSize() && messages.length < 256) { innerProcessOutgoing(messageData, 0, messageData.length, length, pn, neverWaitForPacketNumber); } else { length = 1; int count = 0; int lastIndex = 0; for(int i=0;i<messages.length;i++) { int thisLength = (messageData[i].length + 2); int newLength = length + thisLength; if(thisLength > node.usm.getMaxPacketSize()) { Logger.error(this, "Message exceeds packet size: "+messages[i]); // Send the last lot, then send this } count++; if(newLength > node.usm.getMaxPacketSize() || count > 255) { innerProcessOutgoing(messageData, lastIndex, i-lastIndex, length, pn, neverWaitForPacketNumber); lastIndex = i; length = (messageData[i].length + 2); count = 1; } else length = newLength; } } }
51738 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51738/f48ad5c9057903788f63aaa8ccd26e567faf4317/FNPPacketMangler.java/clean/src/freenet/node/FNPPacketMangler.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1207, 24866, 12, 1079, 1180, 8526, 2743, 16, 10669, 907, 11059, 16, 1250, 5903, 29321, 6667, 1854, 13, 1216, 31541, 503, 16, 678, 1006, 1768, 503, 288, 3639, 1160, 63, 6362, 65...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1207, 24866, 12, 1079, 1180, 8526, 2743, 16, 10669, 907, 11059, 16, 1250, 5903, 29321, 6667, 1854, 13, 1216, 31541, 503, 16, 678, 1006, 1768, 503, 288, 3639, 1160, 63, 6362, 65...
try { setMessage((String) evalAttr("message", getMessageExpr(), String.class)); } catch (NullAttributeException ex) { }
if ((string = EvalHelper.evalString("message", getMessageExpr(), this, pageContext)) != null) setMessage(string);
private void evaluateExpressions() throws JspException { try { setName((String) evalAttr("name", getNameExpr(), String.class)); } catch (NullAttributeException ex) { } try { setProperty((String) evalAttr("property", getPropertyExpr(), String.class)); } catch (NullAttributeException ex) { } try { setMessage((String) evalAttr("message", getMessageExpr(), String.class)); } catch (NullAttributeException ex) { } }
48068 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48068/022bd23c954cf673e53731849d562b3c295473f1/ELMessagesPresentTag.java/buggy/contrib/struts-el/src/share/org/apache/strutsel/taglib/logic/ELMessagesPresentTag.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 5956, 8927, 1435, 1216, 27485, 288, 3639, 775, 288, 5411, 6788, 12443, 780, 13, 5302, 3843, 2932, 529, 3113, 1723, 4742, 9334, 514, 18, 1106, 10019, 3639, 289, 1044, 261, 2041, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6788, 12443, 780, 13, 5302, 3843, 2932, 529, 3113, 1723, 4742, 9334, 514, 18, 1106, 10019, 3639, 289, 1044, 261, 2041, ...
it = _fileRefs.iterator();
it = _resourceFileRefs.iterator();
public void save( File projectFile ) { ObjectsTable objectsTable = new ObjectsTable(); String projectPath; try { projectPath = projectFile.getCanonicalPath(); } catch (IOException ex) { throw new RuntimeException("Can't get path of project file: " + projectFile); } int last = projectPath.lastIndexOf(File.separator); if(last != -1) { projectPath = projectPath.substring(0, last); } last = projectPath.lastIndexOf(File.separator); if(last != -1) { projectPath = projectPath.substring(0, last); } ArrayList sourceBuildFileIDs = new ArrayList(); ArrayList resourceBuildFileIDs = new ArrayList(); ArrayList frameworkBuildFileIDs = new ArrayList(); ArrayList sourceFileIDs = new ArrayList(); ArrayList resourceFileIDs = new ArrayList(); ArrayList frameworkFileIDs = new ArrayList(); // Walk refs, creating the appropriate reference type and an associated // build file for each and adding it to the objects table and group children list. String path; Iterator it; it = _sourceRefs.iterator(); while( it.hasNext() ) { path = (String) it.next(); if(path.indexOf(projectPath) == 0) { path = path.substring(projectPath.length()+1); } File file = new File(path); Map reference = newFileReference(file.getName(), path); ObjectsTable.ID refID = objectsTable.insert(reference); sourceFileIDs.add(refID); sourceBuildFileIDs.add(objectsTable.insert(newBuildFile(refID))); } it = _fileRefs.iterator(); while( it.hasNext() ) { path = (String) it.next(); if(path.indexOf(projectPath) == 0) { path = path.substring(projectPath.length()+1); } File file = new File(path); Map reference = newFileReference(file.getName(), path); ObjectsTable.ID refID = objectsTable.insert(reference); resourceFileIDs.add(refID); resourceBuildFileIDs.add(objectsTable.insert(newBuildFile(refID))); } it = _folderRefs.iterator(); while( it.hasNext() ) { path = (String) it.next(); if(path.indexOf(projectPath) == 0) { path = path.substring(projectPath.length()+1); } File file = new File(path); Map reference = newFolderReference(file.getName(), path); ObjectsTable.ID refID = objectsTable.insert(reference); resourceFileIDs.add(refID); resourceBuildFileIDs.add(objectsTable.insert(newBuildFile(refID))); } it = _frameworkRefs.iterator(); while( it.hasNext() ) { path = (String) it.next(); Map reference = newFrameworkReference((new File(path)).getName(), path ); ObjectsTable.ID refID = objectsTable.insert(reference); frameworkFileIDs.add(refID); frameworkBuildFileIDs.add(objectsTable.insert(newBuildFile(refID))); } ArrayList childrenIDs = new ArrayList(); childrenIDs.add(objectsTable.insert(newGroup( "Sources", sourceFileIDs))); childrenIDs.add(objectsTable.insert(newGroup( "Resources", resourceFileIDs))); childrenIDs.add(objectsTable.insert(newGroup( "Frameworks", frameworkFileIDs))); // Create the PBXGroup and add it to the objects table. ObjectsTable.ID mainGroupID = objectsTable.insert( newGroup( "Root", childrenIDs) ); // Create the PBXBuildPhase and add it to the objects table. ArrayList buildPhaseIDs = new ArrayList( 1 ); if (hasBuildPhases()) { buildPhaseIDs.add( objectsTable.insert( newSourcesBuildPhase( sourceBuildFileIDs))); buildPhaseIDs.add( objectsTable.insert( newResourcesBuildPhase( resourceBuildFileIDs))); buildPhaseIDs.add( objectsTable.insert( newFrameworkBuildPhase( frameworkBuildFileIDs))); } // Create the PBXToolTarget and add it to the objects table and // the targets list. ArrayList targetIDs = new ArrayList( 1 ); targetIDs.add( objectsTable.insert( newAppServerTarget(buildPhaseIDs, objectsTable))); // Create the PBXProject and add it to the objects table. ObjectsTable.ID projectID = objectsTable.insert( newProject( mainGroupID, targetIDs, objectsTable )); // Create the root dictionary. Map pbxproj = newPBXProj( objectsTable, projectID); PropertyListSerialization.propertyListToFile( projectFile, pbxproj ); }
2575 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2575/480be17e4be6381db443f5d04495da4d910c541f/PBXProject.java/buggy/projects/woenvironment/src/java/org/objectstyle/woenvironment/pb/PBXProject.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1923, 12, 1387, 1984, 812, 262, 288, 202, 565, 8487, 1388, 2184, 1388, 273, 394, 8487, 1388, 5621, 202, 565, 514, 1984, 743, 31, 202, 565, 775, 288, 202, 3639, 1984, 743,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1923, 12, 1387, 1984, 812, 262, 288, 202, 565, 8487, 1388, 2184, 1388, 273, 394, 8487, 1388, 5621, 202, 565, 514, 1984, 743, 31, 202, 565, 775, 288, 202, 3639, 1984, 743,...
fcp.removeGlobalRequest(HTMLDecoder.decode(identifier));
fcp.removeGlobalRequest(identifier);
public void handlePost(URI uri, Bucket data, ToadletContext ctx) throws ToadletContextClosedException, IOException, RedirectException { if(data.size() > 1024*1024) { this.writeReply(ctx, 400, "text/plain", "Too big", "Data exceeds 1MB limit"); return; } HTTPRequest request = new HTTPRequest(uri, data, ctx); String pass = request.getParam("formPassword"); if((pass == null) || !pass.equals(node.formPassword)) { MultiValueTable headers = new MultiValueTable(); headers.put("Location", "/queue/"); ctx.sendReplyHeaders(302, "Found", headers, null, 0); return; } if(request.isParameterSet("remove_request") && (request.getParam("remove_request").length() > 0)) { String identifier = request.getParam("identifier"); Logger.minor(this, "Removing "+identifier); try { fcp.removeGlobalRequest(HTMLDecoder.decode(identifier)); } catch (MessageInvalidException e) { this.sendErrorPage(ctx, 200, "Failed to remove request", "Failed to remove "+HTMLEncoder.encode(identifier)+" : "+HTMLEncoder.encode(e.getMessage())); } writePermanentRedirect(ctx, "Done", "/queue/"); return; }else if(request.isParameterSet("remove_AllRequests") && (request.getParam("remove_AllRequests").length() > 0)) { ClientRequest[] reqs = fcp.getGlobalRequests(); Logger.minor(this, "Request count: "+reqs.length); for(int i=0; i<reqs.length ; i++){ Logger.minor(this, "Removing "+reqs[i].getIdentifier()); try { fcp.removeGlobalRequest(reqs[i].getIdentifier()); } catch (MessageInvalidException e) { this.sendErrorPage(ctx, 200, "Failed to remove request", "Failed to remove "+HTMLEncoder.encode(reqs[i].getIdentifier())+" : "+HTMLEncoder.encode(e.getMessage())); } } writePermanentRedirect(ctx, "Done", "/queue/"); return; }else if(request.isParameterSet("download")) { // Queue a download if(!request.isParameterSet("key")) { writeError("No key specified to download", "No key specified to download"); return; } String expectedMIMEType = null; if(request.isParameterSet("type")) { expectedMIMEType = request.getParam("type"); } FreenetURI fetchURI; try { fetchURI = new FreenetURI(request.getParam("key")); } catch (MalformedURLException e) { writeError("Invalid URI to download", "Invalid URI to download"); return; } String persistence = request.getParam("persistence"); String returnType = request.getParam("return-type"); fcp.makePersistentGlobalRequest(fetchURI, expectedMIMEType, persistence, returnType); writePermanentRedirect(ctx, "Done", "/queue/"); return; } else if (request.isParameterSet("change_priority")) { String identifier = HTMLDecoder.decode(request.getParam("identifier")); short newPriority = Short.parseShort(request.getParam("priority")); ClientRequest[] clientRequests = fcp.getGlobalRequests(); for (int requestIndex = 0, requestCount = clientRequests.length; requestIndex < requestCount; requestIndex++) { ClientRequest clientRequest = clientRequests[requestIndex]; if (identifier.equals(clientRequest.getIdentifier())) { clientRequest.setPriorityClass(newPriority); } } writePermanentRedirect(ctx, "Done", "/queue/"); return; } this.handleGet(uri, ctx); }
52909 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52909/45f1677706eeb743a8223da05a4508604cfb492b/QueueToadlet.java/buggy/src/freenet/clients/http/QueueToadlet.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1640, 3349, 12, 3098, 2003, 16, 7408, 501, 16, 2974, 361, 1810, 1042, 1103, 13, 1216, 2974, 361, 1810, 1042, 7395, 503, 16, 1860, 16, 9942, 503, 288, 202, 202, 430, 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, 1640, 3349, 12, 3098, 2003, 16, 7408, 501, 16, 2974, 361, 1810, 1042, 1103, 13, 1216, 2974, 361, 1810, 1042, 7395, 503, 16, 1860, 16, 9942, 503, 288, 202, 202, 430, 12, ...
rsvc.error("Error getting iterator for #foreach : " + ee.getMessage());
rsvc.getLog().error("Error getting iterator for #foreach", ee);
public boolean render(InternalContextAdapter context, Writer writer, Node node) throws IOException, MethodInvocationException, ResourceNotFoundException, ParseErrorException { /* * do our introspection to see what our collection is */ Object listObject = node.jjtGetChild(2).value(context); if (listObject == null) return false; Iterator i = null; try { i = rsvc.getUberspect().getIterator(listObject, uberInfo); } catch(Exception ee) { rsvc.error("Error getting iterator for #foreach : " + ee.getMessage()); } if (i == null) { return false; } int counter = counterInitialValue; boolean maxNbrLoopsExceeded = false; /* * save the element key if there is one, and the loop counter */ Object o = context.get(elementKey); Object savedCounter = context.get(counterName); /* * Instantiate the null holder context if a null value * is returned by the foreach iterator. Only one instance is * created - it's reused for every null value. */ NullHolderContext nullHolderContext = null; while (!maxNbrLoopsExceeded && i.hasNext()) { context.put(counterName , new Integer(counter)); Object value = i.next(); context.put(elementKey, value); /* * If the value is null, use the special null holder context */ if( value == null ) { if( nullHolderContext == null ) { // lazy instantiation nullHolderContext = new NullHolderContext(elementKey, context); } node.jjtGetChild(3).render(nullHolderContext, writer); } else { node.jjtGetChild(3).render(context, writer); } counter++; // Determine whether we're allowed to continue looping. // ASSUMPTION: counterInitialValue is not negative! maxNbrLoopsExceeded = (counter - counterInitialValue) >= maxNbrLoops; } /* * restores the loop counter (if we were nested) * if we have one, else just removes */ if (savedCounter != null) { context.put(counterName, savedCounter); } else { context.remove(counterName); } /* * restores element key if exists * otherwise just removes */ if (o != null) { context.put(elementKey, o); } else { context.remove(elementKey); } return true; }
9291 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9291/f4adefb79ccda5d9df1f60719e0ede8f167e4089/Foreach.java/clean/src/java/org/apache/velocity/runtime/directive/Foreach.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 1250, 1743, 12, 3061, 1042, 4216, 819, 16, 21821, 5497, 2633, 16, 2029, 756, 13, 3639, 1216, 1860, 16, 225, 2985, 9267, 503, 16, 16676, 16, 540, 202, 3201, 10009, 565, 288, 7734, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 1250, 1743, 12, 3061, 1042, 4216, 819, 16, 21821, 5497, 2633, 16, 2029, 756, 13, 3639, 1216, 1860, 16, 225, 2985, 9267, 503, 16, 16676, 16, 540, 202, 3201, 10009, 565, 288, 7734, ...
assertTrue(text.indexOf("class TestController") > -1); assertTrue(text.indexOf("def list") > -1); assertTrue(text.indexOf("def update") > -1); assertTrue(text.indexOf("def create") > -1); assertTrue(text.indexOf("def show") > -1); assertTrue(text.indexOf("def edit") > -1); assertTrue(text.indexOf("def delete") > -1);
Class controllerClass = gcl.parseClass(text); BeanWrapper bean = new BeanWrapperImpl(controllerClass.newInstance()); assertEquals("TestController", controllerClass.getName()); assertTrue(bean.isReadableProperty("list")); assertTrue(bean.isReadableProperty("update")); assertTrue(bean.isReadableProperty("create")); assertTrue(bean.isReadableProperty("list")); assertTrue(bean.isReadableProperty("show")); assertTrue(bean.isReadableProperty("edit")); assertTrue(bean.isReadableProperty("delete"));
public void testGenerateController() throws Exception { GrailsTemplateGenerator generator; GroovyClassLoader gcl = new GroovyClassLoader(Thread.currentThread().getContextClassLoader()); generator = (GrailsTemplateGenerator)gcl.parseClass(gcl.getResourceAsStream("org/codehaus/groovy/grails/scaffolding/DefaultGrailsTemplateGenerator.groovy")) .newInstance(); Class dc = gcl.parseClass("class Test { \n Long id;\n Long version; }"); GrailsDomainClass domainClass = new DefaultGrailsDomainClass(dc); generator.generateController(domainClass,"test"); File generatedFile = new File("test/grails-app/controllers/TestController.groovy"); assertTrue(generatedFile.exists()); String text = (String)new GroovyShell().evaluate("new File('test/grails-app/controllers/TestController.groovy').text"); assertTrue(text.indexOf("class TestController") > -1); assertTrue(text.indexOf("def list") > -1); assertTrue(text.indexOf("def update") > -1); assertTrue(text.indexOf("def create") > -1); assertTrue(text.indexOf("def show") > -1); assertTrue(text.indexOf("def edit") > -1); assertTrue(text.indexOf("def delete") > -1); }
50670 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50670/5acc62ff6322d5dce472391d5409d8048736168b/GrailsTemplateGeneratorsTests.java/buggy/test/scaffolding/org/codehaus/groovy/grails/scaffolding/GrailsTemplateGeneratorsTests.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1842, 4625, 2933, 1435, 1216, 1185, 288, 3639, 10812, 14573, 2283, 3908, 4456, 31, 3639, 20841, 7805, 314, 830, 273, 394, 20841, 7805, 12, 3830, 18, 2972, 3830, 7675, 29120, 7805...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4625, 2933, 1435, 1216, 1185, 288, 3639, 10812, 14573, 2283, 3908, 4456, 31, 3639, 20841, 7805, 314, 830, 273, 394, 20841, 7805, 12, 3830, 18, 2972, 3830, 7675, 29120, 7805...
public void perspectiveChanged(IWorkbenchPage page, IPerspectiveDescriptor perspective, String changeId) { }
public void perspectiveSavedAs(IWorkbenchPage page,IPerspectiveDescriptor oldPerspective,IPerspectiveDescriptor newPerspective){ updateTitle(); }
private void hookTitleUpdateListeners(IWorkbenchWindowConfigurer configurer) { // hook up the listeners to update the window title configurer.getWindow().addPageListener(new IPageListener() { public void pageActivated(IWorkbenchPage page) { // do nothing } public void pageClosed(IWorkbenchPage page) { updateTitle(); } public void pageOpened(IWorkbenchPage page) { // do nothing } }); configurer.getWindow().addPerspectiveListener( new IPerspectiveListener() { public void perspectiveActivated(IWorkbenchPage page, IPerspectiveDescriptor perspective) { updateTitle(); } public void perspectiveChanged(IWorkbenchPage page, IPerspectiveDescriptor perspective, String changeId) { // do nothing } }); configurer.getWindow().getPartService().addPartListener( new IPartListener2() { public void partActivated(IWorkbenchPartReference ref) { if (ref instanceof IEditorReference || ref.getPage().getActiveEditor() == null) { updateTitle(); } } public void partBroughtToTop(IWorkbenchPartReference ref) { if (ref instanceof IEditorReference || ref.getPage().getActiveEditor() == null) { updateTitle(); } } public void partClosed(IWorkbenchPartReference ref) { // do nothing } public void partDeactivated(IWorkbenchPartReference ref) { // do nothing } public void partOpened(IWorkbenchPartReference ref) { // do nothing } public void partHidden(IWorkbenchPartReference ref) { // do nothing } public void partVisible(IWorkbenchPartReference ref) { // do nothing } public void partInputChanged(IWorkbenchPartReference ref) { // do nothing } }); }
58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/0501474556156a0c17b909530acacf661cb5bd16/IDEWorkbenchWindowAdvisor.java/clean/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/IDEWorkbenchWindowAdvisor.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 3953, 4247, 1891, 5583, 12, 45, 2421, 22144, 3829, 809, 11278, 642, 11278, 13, 288, 3639, 368, 3953, 731, 326, 4679, 358, 1089, 326, 2742, 2077, 3639, 642, 11278, 18, 588, 3829...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3953, 4247, 1891, 5583, 12, 45, 2421, 22144, 3829, 809, 11278, 642, 11278, 13, 288, 3639, 368, 3953, 731, 326, 4679, 358, 1089, 326, 2742, 2077, 3639, 642, 11278, 18, 588, 3829...
MylarPlugin.getDefault().getPreferenceStore().setValue(MylarPrefContstants.USER_ID, uid);
MylarPlugin.getDefault().getPreferenceStore().setValue(MylarPreferenceContstants.USER_ID, uid);
public int getExistingUid(String firstName, String lastName, String emailAddress, boolean anonymous) { if (failed) return -1; try { if (anonymous) { InputDialog d = new InputDialog(null, "Enter User Study Id", "Please enter your user study id", "", new IInputValidator() { public String isValid(String newText) { try { int testUid = Integer.parseInt(newText); if (testUid <= 0) return "User id must be a positive integer"; else if (testUid % 17 != 1) return "User id is invalid, please check your user id or get a new id by clicking cancel"; } catch (Exception e) { return "User id must be an integer"; } return null; } }); int rc = d.open(); if (rc == InputDialog.OK) { uid = Integer.parseInt(d.getValue()); MylarPlugin.getDefault().getPreferenceStore().setValue(MylarPrefContstants.USER_ID, uid); return uid; } else { return -1; } } // create a new post method final GetMethod getUidMethod = new GetMethod(MylarMonitorPlugin.getDefault().getStudyParameters() .getScriptsUrl() + MylarMonitorPlugin.getDefault().getStudyParameters().getScriptsUserId()); NameValuePair first = new NameValuePair("firstName", firstName); NameValuePair last = new NameValuePair("lastName", lastName); NameValuePair email = new NameValuePair("email", emailAddress); NameValuePair job = new NameValuePair("jobFunction", ""); NameValuePair size = new NameValuePair("companySize", ""); NameValuePair buisness = new NameValuePair("companyBuisness", ""); NameValuePair contact = new NameValuePair("contact", ""); NameValuePair anon = null; if (anonymous) { anon = new NameValuePair("anonymous", "true"); } else { anon = new NameValuePair("anonymous", "false"); } if (MylarMonitorPlugin.getDefault().usingContactField()) getUidMethod.setQueryString(new NameValuePair[] { first, last, email, job, size, buisness, anon, contact }); else getUidMethod.setQueryString(new NameValuePair[] { first, last, email, job, size, buisness, anon }); // create a new client and upload the file final HttpClient client = new HttpClient(); MylarMonitorPlugin.getDefault().configureProxy(client); ProgressMonitorDialog pmd = new ProgressMonitorDialog(Display.getCurrent().getActiveShell()); pmd.run(false, false, new IRunnableWithProgress() { public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { monitor.beginTask("Get User Id", 1); try { status = client.executeMethod(getUidMethod); resp = getData(getUidMethod.getResponseBodyAsStream()); // release the connection to the server getUidMethod.releaseConnection(); } catch (final Exception e) { // there was a problem with the file upload so throw up // an error // dialog to inform the user and log the exception failed = true; if (e instanceof NoRouteToHostException || e instanceof UnknownHostException) { PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { public void run() { MessageDialog.openError(null, "Error Uploading", "There was an error getting a new user id: \n" + "No network connection. Please try again later"); } }); } else { PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { public void run() { MessageDialog.openError(null, "Error Uploading", "There was an error getting a new user id: \n" + e.getClass().getCanonicalName() + e.getMessage()); } }); MylarStatusHandler.log(e, "error uploading"); } } monitor.worked(1); monitor.done(); } }); if (status != 200) { // there was a problem with the file upload so throw up an error // dialog to inform the user failed = true; // there was a problem with the file upload so throw up an error // dialog to inform the user PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { public void run() { MessageDialog.openError(null, "Error Getting User ID", "There was an error getting a user id: \n" + "HTTP Response Code " + status + "\n" + "Please try again later"); } }); } else { resp = resp.substring(resp.indexOf(":") + 1).trim(); uid = Integer.parseInt(resp); MylarPlugin.getDefault().getPreferenceStore().setValue(MylarPrefContstants.USER_ID, uid); return uid; } } catch (final Exception e) { // there was a problem with the file upload so throw up an error // dialog to inform the user and log the exception failed = true; if (e instanceof NoRouteToHostException || e instanceof UnknownHostException) { PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { public void run() { MessageDialog.openError(null, "Error Uploading", "There was an error getting a new user id: \n" + "No network connection. Please try again later"); } }); } else { PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { public void run() { MessageDialog.openError(null, "Error Uploading", "There was an error getting a new user id: \n" + e.getClass().getCanonicalName()); } }); MylarStatusHandler.log(e, "error uploading"); } } return -1; }
51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/455202f218b29371e15a7a7b7bc46021b598a844/UsageSubmissionWizard.java/buggy/org.eclipse.mylyn.monitor.ui/src/org/eclipse/mylyn/internal/monitor/ui/wizards/UsageSubmissionWizard.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 509, 336, 9895, 11994, 12, 780, 22033, 16, 514, 23439, 16, 514, 28748, 16, 1250, 13236, 13, 288, 202, 202, 430, 261, 7307, 13, 1082, 202, 2463, 300, 21, 31, 202, 202, 698, 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, 509, 336, 9895, 11994, 12, 780, 22033, 16, 514, 23439, 16, 514, 28748, 16, 1250, 13236, 13, 288, 202, 202, 430, 261, 7307, 13, 1082, 202, 2463, 300, 21, 31, 202, 202, 698, 2...
public Certificate findCertificateByIssuerAndSerno(Admin admin, String issuerDN, BigInteger serno) { debug(">findCertificateByIssuerAndSerno(), dn:" + issuerDN + ", serno=" + serno); // First make a DN in our well-known format String dn = CertTools.stringToBCDNString(issuerDN); debug("Looking for cert with (transformed)DN: " + dn); try { Collection coll = certHome.findByIssuerDNSerialNumber(dn, serno.toString()); Certificate ret = null; if (coll != null) { if (coll.size() > 1) { logsession.log(admin, LogEntry.MODULE_CA, new java.util.Date(), null, null, LogEntry.EVENT_ERROR_DATABASE, "Error in database, more than one certificate has the same Issuer : " + issuerDN + " and serialnumber " + serno.toString(16) + "."); } Iterator iter = coll.iterator(); if (iter.hasNext()) { ret = ((CertificateDataLocal) iter.next()).getCertificate(); } } debug("<findCertificateByIssuerAndSerno(), dn:" + issuerDN + ", serno=" + serno); return ret; } catch (Exception fe) { throw new EJBException(fe); } }
4109 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4109/31d6aba7523c1171d3298c2d2f27b963fa299bfc/LocalCertificateStoreSessionBean.java/clean/src/java/se/anatom/ejbca/ca/store/LocalCertificateStoreSessionBean.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1071, 4719, 4720, 4719, 858, 16667, 1876, 827, 2135, 12, 4446, 3666, 16, 780, 17567, 8609, 16, 9901, 382, 736, 6215, 264, 2135, 15329, 4148, 2932, 34, 4720, 4719, 858, 16667, 1876, 827, 2135, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1071, 4719, 4720, 4719, 858, 16667, 1876, 827, 2135, 12, 4446, 3666, 16, 780, 17567, 8609, 16, 9901, 382, 736, 6215, 264, 2135, 15329, 4148, 2932, 34, 4720, 4719, 858, 16667, 1876, 827, 2135, ...
case 95:
case 97:
final public void except_clause() throws ParseException { /*@bgen(jjtree) except_clause */ SimpleNode jjtn000 = new SimpleNode(JJTEXCEPT_CLAUSE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtreeOpenNodeScope(jjtn000); try { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LPAREN: case LBRACE: case LBRACKET: case PLUS: case MINUS: case NOT: case NOT_BOOL: case LAMBDA: case NAME: case DECNUMBER: case HEXNUMBER: case OCTNUMBER: case FLOAT: case SINGLE_STRING: case SINGLE_STRING2: case TRIPLE_STRING: case TRIPLE_STRING2: case 95: test(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: jj_consume_token(COMMA); test(); break; default: jj_la1[41] = jj_gen; ; } break; default: jj_la1[42] = jj_gen; ; } } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof ParseException) { {if (true) throw (ParseException)jjte000;} } if (jjte000 instanceof RuntimeException) { {if (true) throw (RuntimeException)jjte000;} } {if (true) throw (Error)jjte000;} } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); jjtreeCloseNodeScope(jjtn000); } } }
6527 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6527/2016c40d17ba5540ddf2386aef5ad9eaf3be41c3/PythonGrammar.java/buggy/org/python/parser/PythonGrammar.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 727, 1071, 918, 1335, 67, 18128, 1435, 1216, 10616, 288, 15604, 1748, 36, 70, 4507, 12, 78, 78, 3413, 13, 1335, 67, 18128, 1195, 225, 4477, 907, 10684, 5088, 3784, 273, 394, 4477, 907, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 727, 1071, 918, 1335, 67, 18128, 1435, 1216, 10616, 288, 15604, 1748, 36, 70, 4507, 12, 78, 78, 3413, 13, 1335, 67, 18128, 1195, 225, 4477, 907, 10684, 5088, 3784, 273, 394, 4477, 907, ...
System.out.println("MessageDispatcherTestAsync [-debug]");
System.out.println("MessageDispatcherTestAsync");
static void help() { System.out.println("MessageDispatcherTestAsync [-debug]"); }
50160 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50160/6cf135ab0aec1dba727f94146eb1d03ec797779c/MessageDispatcherTestAsync.java/clean/tests/other/org/jgroups/tests/MessageDispatcherTestAsync.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 760, 918, 2809, 1435, 288, 3639, 2332, 18, 659, 18, 8222, 2932, 1079, 6681, 4709, 2771, 8863, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 760, 918, 2809, 1435, 288, 3639, 2332, 18, 659, 18, 8222, 2932, 1079, 6681, 4709, 2771, 8863, 565, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
result = result.replaceAll("\\.","__");
result = CommonUtils.replaceText(result, "\\.","__");
private static String encodeQueryString ( String text ) { String result = text.replaceAll("&","_and_"); result = result.replaceAll("=","_eq_"); if ( UPFileSpec.PORTAL_URL_SEPARATOR.equals(".") ) result = result.replaceAll("\\.","__"); else result = result.replaceAll(UPFileSpec.PORTAL_URL_SEPARATOR,"__"); return result; }
24959 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/24959/3598b02553f392ce0e03bd5e26d34d0961f21102/PortletStateManager.java/buggy/source/org/jasig/portal/container/services/information/PortletStateManager.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 760, 514, 2017, 15276, 261, 514, 977, 262, 288, 202, 202, 780, 563, 273, 977, 18, 2079, 1595, 2932, 10, 15937, 67, 464, 67, 8863, 202, 202, 2088, 273, 563, 18, 2079, 1595, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 760, 514, 2017, 15276, 261, 514, 977, 262, 288, 202, 202, 780, 563, 273, 977, 18, 2079, 1595, 2932, 10, 15937, 67, 464, 67, 8863, 202, 202, 2088, 273, 563, 18, 2079, 1595, ...
throw new Error("not implemented");
return Math.max(Line2D.ptSegDistSq(x1, y1, x2, y2, cx1, cy1), Line2D.ptSegDistSq(x1, y1, x2, y2, cx2, cy2));
public static double getFlatnessSq(double x1, double y1, double cx1, double cy1, double cx2, double cy2, double x2, double y2) { // XXX Implement. throw new Error("not implemented"); }
25352 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/25352/f50cd386020536bedfaae8a28621a9bb308e4d21/CubicCurve2D.java/clean/libjava/java/awt/geom/CubicCurve2D.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 760, 1645, 336, 16384, 4496, 19643, 12, 9056, 619, 21, 16, 1645, 677, 21, 16, 1645, 9494, 21, 16, 19694, 1645, 6143, 21, 16, 1645, 9494, 22, 16, 1645, 6143, 22, 16, 19694, 1645, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 760, 1645, 336, 16384, 4496, 19643, 12, 9056, 619, 21, 16, 1645, 677, 21, 16, 1645, 9494, 21, 16, 19694, 1645, 6143, 21, 16, 1645, 9494, 22, 16, 1645, 6143, 22, 16, 19694, 1645, ...
preferenceChanged(this, true, false);
preferenceChanged(null, true, false);
public void insertUpdate(DocumentEvent e, Shape a, ViewFactory vf) { preferenceChanged(this, true, false); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ba862f89183b5347853381927a04e1e399fae5db/GlyphView.java/buggy/core/src/classpath/javax/javax/swing/text/GlyphView.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 2243, 1891, 12, 2519, 1133, 425, 16, 12383, 279, 16, 4441, 1733, 28902, 13, 225, 288, 565, 11555, 5033, 12, 2011, 16, 638, 16, 629, 1769, 225, 289, 2, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2243, 1891, 12, 2519, 1133, 425, 16, 12383, 279, 16, 4441, 1733, 28902, 13, 225, 288, 565, 11555, 5033, 12, 2011, 16, 638, 16, 629, 1769, 225, 289, 2, -100, -100, -100, -100,...
TunnelGateway.QueuePreprocessor preproc = createPreprocessor();
TunnelGateway.QueuePreprocessor preproc = createPreprocessor(cfg);
public void joinInboundGateway(HopConfig cfg) { if (_log.shouldLog(Log.INFO)) _log.info("Joining as inbound gateway: " + cfg); TunnelGateway.QueuePreprocessor preproc = createPreprocessor(); TunnelGateway.Sender sender = new InboundSender(_context, cfg); TunnelGateway.Receiver receiver = new InboundGatewayReceiver(_context, cfg); TunnelGateway gw = new TunnelGateway(_context, preproc, sender, receiver); TunnelId recvId = cfg.getReceiveTunnel(); synchronized (_inboundGateways) { _inboundGateways.put(recvId, gw); } int numParticipants = 0; synchronized (_participatingConfig) { _participatingConfig.put(recvId, cfg); numParticipants = _participatingConfig.size(); } _context.statManager().addRateData("tunnel.participatingTunnels", numParticipants, 0); _context.statManager().addRateData("tunnel.joinInboundGateway", 1, 0); if (cfg.getExpiration() > _lastParticipatingExpiration) _lastParticipatingExpiration = cfg.getExpiration(); _leaveJob.add(cfg); }
45677 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45677/b2f0d17e94d14935df1dfc85d03f4f3eae66000e/TunnelDispatcher.java/buggy/router/java/src/net/i2p/router/tunnel/TunnelDispatcher.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1233, 20571, 5197, 12, 27461, 809, 2776, 13, 288, 3639, 309, 261, 67, 1330, 18, 13139, 1343, 12, 1343, 18, 5923, 3719, 5411, 389, 1330, 18, 1376, 2932, 4572, 310, 487, 13357, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1233, 20571, 5197, 12, 27461, 809, 2776, 13, 288, 3639, 309, 261, 67, 1330, 18, 13139, 1343, 12, 1343, 18, 5923, 3719, 5411, 389, 1330, 18, 1376, 2932, 4572, 310, 487, 13357, ...
void innerUpdate(){ Logger.minor(this, "Update() called"); synchronized(this) { if((result == null) || hasBeenBlown) { Logger.minor(this, "Returning: result="+result+", isAutoUpdateAllowed="+isAutoUpdateAllowed+", hasBeenBlown="+hasBeenBlown); return; } this.revocationDNFCounter = 0; this.finalCheck = true; } System.err.println("Searching for revocation key"); this.queueFetchRevocation(100); synchronized(this) { while(revocationDNFCounter < 3) { System.err.println("Revocation counter: "+revocationDNFCounter); if(this.hasBeenBlown) { Logger.error(this, "The revocation key has been found on the network : blocking auto-update"); return; } try { wait(100*1000); } catch (InterruptedException e) { // Ignore } } } System.err.println("Update in progress"); Logger.normal(this, "Update in progress"); try{ ArrayBucket bucket = (ArrayBucket) result.asBucket(); byte[] data = bucket.toByteArray(); File fRunning = new File("freenet-cvs-snapshot.jar"); File fNew = new File("freenet-cvs-snapshot.jar.new"); boolean nastyRestart = false; if(File.separatorChar != '\\') { // Do nothing. } else { nastyRestart = true; Properties p = WrapperManager.getProperties(); String cp1 = p.getProperty("wrapper.java.classpath.1"); if(cp1.equals("freenet-cvs-snapshot.jar")) { // Cool! } else if(cp1.equals("freenet-cvs-snapshot.jar.new")) { // Swapped; we are running .new File tmp = fRunning; fRunning = fNew; fNew = tmp; } else { cp1 = p.getProperty("wrapper.java.classpath.2"); if(cp1.equals("freenet-cvs-snapshot.jar")) { // Cool! } else if(cp1.equals("freenet-cvs-snapshot.jar.new")) { // Swapped; we are running .new File tmp = fRunning; fRunning = fNew; fNew = tmp; } else { Logger.error(this, "Cannot restart on Windows due to non-standard config file!"); System.err.println("Cannot restart on Windows due to non-standard config file!"); return; } } } fNew.delete(); FileOutputStream fos = new FileOutputStream(fNew); fos.write(data); fos.flush(); fos.close(); System.out.println("################## File written! "+cg.getURI().getSuggestedEdition()+ " " +fNew.getAbsolutePath()); if(!nastyRestart) { // Easy way. if(!fNew.renameTo(fRunning)) { fRunning.delete(); if(!fNew.renameTo(fRunning)) { System.err.println("ERROR renaming the file!"); return; } } } else { // Hard way. if(!WrapperManager.isControlledByNativeWrapper()) { Logger.error(this, "Cannot update because not running under wrapper"); System.err.println("Cannot update because not running under wrapper"); return; } try { File oldConfig = new File("wrapper.conf"); File newConfig = new File("wrapper.conf.new"); FileInputStream fis = new FileInputStream(oldConfig); BufferedInputStream bis = new BufferedInputStream(fis); InputStreamReader isr = new InputStreamReader(bis); BufferedReader br = new BufferedReader(isr); fos = new FileOutputStream(newConfig); OutputStreamWriter osw = new OutputStreamWriter(fos); BufferedWriter bw = new BufferedWriter(osw); String line; boolean succeeded = false; boolean stillSucceeded = false; while((line = br.readLine()) != null) { if(line.equals("wrapper.java.classpath.1="+fRunning.getName())) { bw.write("wrapper.java.classpath.1="+fNew.getName()+"\r\n"); succeeded = true; } else if(line.equals("wrapper.java.classpath.2="+fRunning.getName())) { bw.write("wrapper.java.classpath.2="+fNew.getName()+"\r\n"); succeeded = true; } else { if(line.equals("wrapper.restart.reload_configuration=TRUE")) stillSucceeded = true; bw.write(line+"\r\n"); } } bw.close(); br.close(); if(!succeeded) { System.err.println("Not able to update because of non-standard config"); Logger.error(this, "Not able to update because of non-standard config"); return; } if(!stillSucceeded) { System.err.println("Not able to update because of non-standard or old config, add a line saying \"wrapper.restart.reload_configuration=TRUE\""); Logger.error(this, "Not able to update because of non-standard or old config, add a line saying \"wrapper.restart.reload_configuration=TRUE\""); return; } if(!newConfig.renameTo(oldConfig)) { oldConfig.delete(); if(!newConfig.renameTo(oldConfig)) { System.err.println("Failed to rename over old config: update failed."); Logger.error(this, "Failed to rename over old config: update failed."); return; } } // New config installed. } catch (IOException e) { Logger.error(this, "Not able to update because of I/O error: "+e, e); System.err.println("Not able to update because of I/O error: "+e); } } if(node.getNodeStarter()!=null) { System.err.println("Restarting because of update"); node.getNodeStarter().restart(); } else{ System.out.println("New version has been downloaded: please restart your node!"); node.exit(); } System.err.println("WTF? Restart returned!?"); }catch(Exception e){ Logger.error(this, "Error while updating the node : "+e); System.out.println("Exception : "+e); e.printStackTrace(); } }
46731 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46731/0ce52e9ff1e0048c34e8d11f2ad596bc8936f6e9/NodeUpdater.java/clean/src/freenet/node/updater/NodeUpdater.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 6459, 3443, 1891, 1435, 95, 202, 202, 3328, 18, 17364, 12, 2211, 16, 315, 1891, 1435, 2566, 8863, 202, 202, 22043, 12, 2211, 13, 288, 1082, 202, 430, 12443, 2088, 422, 446, 13, 747...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3443, 1891, 1435, 95, 202, 202, 3328, 18, 17364, 12, 2211, 16, 315, 1891, 1435, 2566, 8863, 202, 202, 22043, 12, 2211, 13, 288, 1082, 202, 430, 12443, 2088, 422, 446, 13, 747...
trailing = "";
trailing = "";
public void parseFromServer(String lineFromServer) throws IOException { myParser parser = new myParser(lineFromServer); String command = parser.getCommand(); if (command.equals("PING")) { parseSendToCommand("PONG :" + parser.getTrailing()); } else if (command.equals("JOIN")) { String channelName = parser.getTrailing(); if (channelName.startsWith("#")) { channelName = channelName.substring(1); int indexOfChannel = findTab(tabbedPane, "#" + channelName); if (indexOfChannel == -1) { // Channel Tab doesn't exist ChannelPanel channel = addChannel(tabbedPane, channelName); indexOfChannel = findTab(tabbedPane, "#" + channelName); tabbedPane.setSelectedIndex(indexOfChannel); channel.updateTextArea("*** Now talking in: " + parser.getTrailing()); if (tabbedPane.getSelectedIndex() != findTab(tabbedPane, "#" + channelName)) { tabbedPane.setBackgroundAt(findTab(tabbedPane, "#" + channelName), Color.red); } tabbedPane.revalidate(); // channel.updateUserArea(parser.getNick(), "add"); } else { // channelName tab exists! ChannelPanel channel = (ChannelPanel) tabbedPane.getComponentAt( indexOfChannel); channel.updateTextArea("---> JOIN: " + parser.getNick() + " (" + parser.getUser() + "@" + parser.getHost() + ")"); if (tabbedPane.getSelectedIndex() != indexOfChannel) { tabbedPane.setBackgroundAt(indexOfChannel, Color.red); } tabbedPane.revalidate(); channel.updateUserArea(parser.getNick(), "add"); } } } else if (command.equals("PRIVMSG")) { // handle PRIVMSG String destination = parser.getMiddle(); if (destination.startsWith("#")) { // it's a channel! String channelName = destination.substring(1);// MSG Received....! int indexOfChannel = findTab(tabbedPane, destination); if (indexOfChannel != -1) { // A connection/tab already exists! Component aComponent = tabbedPane.getComponentAt(indexOfChannel); if (aComponent instanceof ChannelPanel) { String trailing; String nick; nick = parser.getNick(); trailing = parser.getTrailing(); if (trailing.indexOf(1) != -1) { //is this a CTCP //remove \001 from Beginning and End of CTCP msg trailing = trailing.substring(1, trailing.length() - 1); ((ChannelPanel) aComponent).updateTextArea( formatNickname("[" + nick + "] ") + trailing); } String bracketFermeture = "a"; if (trailing.indexOf("[") != -1) { bracketFermeture = String.valueOf(trailing.charAt(trailing. indexOf("[") + 5)); } if (nick.equals(nickname)) { //((ChannelPanel)aComponent).textArea.setDisabledTextColor(new Color(255,0,0)); ((ChannelPanel) aComponent).updateTextArea( formatNickname("<" + nick + "> ") + trailing); } else { //((ChannelPanel)aComponent).textArea.setDisabledTextColor(new Color(0,0,255)); ((ChannelPanel) aComponent).updateTextArea( formatNickname("<" + nick + "> ") + trailing); } if (tabbedPane.getSelectedIndex() != indexOfChannel) { tabbedPane.setBackgroundAt(indexOfChannel, Color.red); } tabbedPane.revalidate(); } } else { // A connection/tab doesn't exists, so create one! ChannelPanel channel = addChannel(tabbedPane, channelName); channel.updateTextArea( formatNickname("<" + parser.getNick() + "> ") + "> " + parser.getTrailing()); if (tabbedPane.getSelectedIndex() != findTab(tabbedPane, "#" + channelName)) { tabbedPane.setBackgroundAt(findTab(tabbedPane, "#" + channelName), Color.red); } tabbedPane.revalidate(); } } //if (destination.startsWith("#")) else { //if (!destination.equalsIgnoreCase(getNickname())) // it's from a user int indexOfUser = findTab(tabbedPane, parser.getNick()); if (indexOfUser == -1) { UserPanel userPanel = addUser(tabbedPane, parser.getNick()); //if tab doesnt exist // Add the real username@hostname in title of tabbedPane userPanel.setTitleArea(parser.getNick() + "!" + parser.getUser() + "@" + parser.getHost()); } indexOfUser = findTab(tabbedPane, parser.getNick()); if (indexOfUser != -1) { // A user connection/tab already exists! Component aComponent = tabbedPane.getComponentAt(indexOfUser); UserPanel userPanel = (UserPanel) aComponent; if (aComponent instanceof UserPanel) { String ctcpCommand; String trailing; char firstOne = 1; trailing = parser.getTrailing(); if (trailing.indexOf(1) != -1) { //is this a CTCP if (trailing.indexOf(" ") != -1) { ctcpCommand = trailing.substring(1, trailing.indexOf(" ")); } else { ctcpCommand = trailing.substring(1, trailing.indexOf(1, 2)); } if (ctcpCommand.equalsIgnoreCase("PING")) { parseSendToCommand("NOTICE " + parser.getNick() + " " + trailing); } else if (ctcpCommand.equalsIgnoreCase("VERSION")) { String versionReply = "NOTICE " + parser.getNick() + " " + firstOne + ctcpCommand + " Using Xdcc IRC:v0.1b:Java" + firstOne; parseSendToCommand(versionReply); } userPanel.updateTextArea( formatNickname(" CTCP " + ctcpCommand + " received from " + parser.getNick())); } // if (trailing.indexOf(1) != -1) //is this a CTCP else { // regular privmsg userPanel.updateTextArea( formatNickname("<" + parser.getNick() + "> ") + trailing); //update le tout } if (tabbedPane.getSelectedIndex() != indexOfUser) { tabbedPane.setBackgroundAt(indexOfUser, Color.red); } tabbedPane.revalidate(); } //if (aComponent instanceof UserPanel) } // if (indexOfUser != -1) } // else (Msg from a user..) } //else if (command.equals("PRIVMSG")) else if (command.equals("PART")) { // Let's grab the channel name String channelName = parser.getParams(); int index = channelName.indexOf("#"); int index2 = channelName.indexOf(":"); if (index2 != -1) { channelName = channelName.substring(index, index2 - 1); } else { channelName = channelName.substring(index); } if (channelName.startsWith("#")) { channelName = channelName.substring(1); int indexOfChannel = findTab(tabbedPane, "#" + channelName); if (indexOfChannel != -1) { // Tab doesn't exist. Do nothing Component aComponent = tabbedPane.getComponentAt(indexOfChannel); if (aComponent instanceof ChannelPanel) { ((ChannelPanel) aComponent).updateTextArea("<--- PART: " + parser.getNick()); ((ChannelPanel) aComponent).updateUserArea(parser.getNick(), "remove"); } // Ok, let's remove the tab if the user who left the channel is you if (parser.getNick().equals(getNickname())) { tabbedPane.removeTabAt(indexOfChannel); } } } } else if (command.equals("QUIT")) { //?????????????????????????? //Find what channel user is on and direct Quit msg to correct channel(s) tabUpdate("Init Window", parser.getNick() + " has quit (" + parser.getTrailing() + ")"); } else if (command.equals("NICK")) { // handle NICK --- When a user changes its nickname int index = findTab(tabbedPane, parser.getNick()); if (index != -1) { // setting the user tab title to changed nickname tabbedPane.setTitleAt(index, parser.getTrailing()); // Let's change the name of the UserPanel alsow UserPanel temp = (UserPanel) tabbedPane.getComponentAt(index); temp.setName(parser.getTrailing()); } if (parser.getNick().equalsIgnoreCase(getNickname())) { setNickname(parser.getTrailing()); } // When a user changes his/her name, his name in every // UserPanel or ChannelPanel should be changed too. // So, we are doing it now --- here String oldNickname = parser.getNick(); String newNickname = parser.getTrailing(); changeNickname(oldNickname, newNickname); } else if (command.equals("NOTICE")) { // handle NOTICE ( arranger: savoir de qui elle vient et la mettre au bon endroit) tabUpdate("Init Window", "NOTICE FROM: " + parser.getNick() + " ---> " + parser.getTrailing()); } else if (command.equals("KICK")) { // handle KICK String kickedNick; String kickedChannel; String temp; temp = parser.getMiddle(); kickedChannel = temp.substring(0, temp.indexOf(" ")); kickedNick = temp.substring(temp.indexOf(" ") + 1, temp.length()); int indexOfChannel = findTab(tabbedPane, kickedChannel); ChannelPanel channel = (ChannelPanel) tabbedPane.getComponentAt( indexOfChannel); if (!(kickedNick.equals(getNickname()))) { channel.updateTextArea("<- KICK: " + kickedNick + " by " + parser.getNick() + " (" + parser.getTrailing() + ")"); channel.updateUserArea(kickedNick, "remove"); } else { // You have been kicked... tabbedPane.removeTabAt(indexOfChannel); tabUpdate("Init Window", "You have been kicked from " + kickedChannel + " by " + parser.getNick() + " because " + parser.getTrailing()); } } else if (command.equals("001") || // RPL_WELCOME command.equals("002") || // RPL_YOURHOST command.equals("003") || // RPL_CREATED command.equals("004")) { // RPL_MYINFO // successful registration tabUpdate("Init Window", parser.getTrailing()); } else if (command.equals("250") || command.equals("251") || command.equals("253") || command.equals("255") || command.equals("256") || command.equals("257") || command.equals("258") || command.equals("259") || command.equals("265") || command.equals("266") ) { tabUpdate("Init Window", parser.getTrailing()); }//252 & 254 = num IRCOP and Total Channels else if (command.equals("252")) { String numThing; numThing = lineFromServer.substring(lineFromServer.indexOf("252") + 5 + nickname.length(), lineFromServer.indexOf(":", 2)); tabUpdate("Init Window", numThing + " " + parser.getTrailing()); } else if (command.equals("254")) { String numThing; numThing = lineFromServer.substring(lineFromServer.indexOf("254") + 5 + nickname.length(), lineFromServer.indexOf(":", 2)); tabUpdate("Init Window", numThing + " " + parser.getTrailing()); }//channel full, invite only or need a key else if (command.equals("471") || command.equals("473") || command.equals("475") ) { String channel; channel = lineFromServer.substring(lineFromServer.indexOf("#"), lineFromServer.indexOf(":", 2)); tabUpdate("Init Window", parser.getTrailing() + " (" + channel + ")"); }/* else if (command.equals("371") || command.equals("372") || command.equals("374") || command.equals("375") || command.equals("376") ) { tabUpdate("Init Window", "371-376 " + parser.getTrailing()); tabUpdate("Init Window", "Skipping MOTD!"); }*/ else if (command.equals("311") // RPL_WHOISUSER ) { // Ok, let's see how we can process PROCESS StringTokenizer st = new StringTokenizer(parser.getParams(), " \r\n"); //StringTokenizer st = new StringTokenizer(parser.getParams(), " "); String whoNick = "", whoUser = "", whoHost = "", whoMode = "", whoRealName = ""; for (int i = 0; st.hasMoreTokens();) { String aToken = st.nextToken(); if (i == 1) { whoNick = aToken; } else if (i == 2) { whoUser = aToken; } else if (i == 3) { whoHost = aToken; } else if (i == 4) { whoMode = aToken; } else if (i == 5) { // vrifier!!!!!!!!!!!!!! String paramsWhois = parser.getParams(); whoRealName = paramsWhois.substring(paramsWhois.indexOf(aToken) + 1, paramsWhois.length()); //whoRealName = aToken.substring(1); } i++; } // Let's show the messages in the Init Window tabUpdate("Init Window", "Whois info for " + whoNick); tabUpdate("Init Window", " " + whoNick + "!" + whoUser + "@" + whoHost + " " + whoRealName); } else if (command.equals("312")) { String whoNick = "", whoServer = "", whoServerInfo = ""; StringTokenizer st = new StringTokenizer(parser.getParams(), " \r\n"); for (int i = 0; st.hasMoreTokens();) { String aToken = st.nextToken(); if (i == 1) { whoNick = aToken; } else if (i == 2) { whoServer = aToken; } else if (i == 3) { // vrifier!!!!!!!!!!!!!! ainsi que whois realname String paramsWhois = parser.getParams(); whoServerInfo = paramsWhois.substring(paramsWhois.indexOf(aToken) + 1, paramsWhois.length()); //whoServerInfo = aToken.substring(aToken.length()); } i++; } // Let's update the Init Window tabUpdate("Init Window", " Server: " + whoServer + " " + whoServerInfo); } else if (command.equals("313")) { tabUpdate("Init Window", " Operator: " + lineFromServer); } else if (command.equals("317")) { String seconds = "", trailing = ""; trailing = parser.getTrailing(); StringTokenizer st = new StringTokenizer(parser.getParams(), " \r\n"); for (int i = 0; st.hasMoreTokens();) { String aToken = st.nextToken(); if (i == 2) { seconds = aToken; break; } i++; } tabUpdate("Init Window", " Idle time: " + seconds + " " + trailing); } else if (command.equals("318")) { tabUpdate("Init Window", parser.getTrailing()); } else if (command.equals("319")) { tabUpdate("Init Window", " Channels: " + parser.getTrailing()); } else if (command.equals("301")) { // RPL_AWAY StringTokenizer st = new StringTokenizer(parser.getParams(), " \r\n"); String awayNickname = ""; for (int i = 0; st.hasMoreTokens();) { String aToken = st.nextToken(); if (i == 1) { awayNickname = aToken; break; } i++; } tabUpdate("Init Window", awayNickname + " is away for \"" + parser.getTrailing() + "\""); } else if (command.equals("305")) { // RPL_UNAWAY ; } else if (command.equals("333")) { // RPL_UNAWAY ; }// used or not ??????? else if (command.equals("332") // RPL_TOPIC ) { String topicChannelName = ""; StringTokenizer st = new StringTokenizer(parser.getParams(), " \r\n"); for (int i = 0; st.hasMoreTokens();) { String aToken = st.nextToken(); if (i == 1) { topicChannelName = aToken; break; } i++; } int indexOfChannel = findTab(tabbedPane, topicChannelName); if (indexOfChannel != -1) { Component aComponent = tabbedPane.getComponentAt(indexOfChannel); if (aComponent instanceof ChannelPanel) { ((ChannelPanel) aComponent).setTitleArea(parser.getTrailing()); } } } else if (command.equals("TOPIC") ) { String topicChannelName = ""; StringTokenizer st = new StringTokenizer(parser.getParams(), " \r\n"); if (st.hasMoreTokens()) { topicChannelName = st.nextToken(); } int indexOfChannel = findTab(tabbedPane, topicChannelName); if (indexOfChannel != -1) { Component aComponent = tabbedPane.getComponentAt(indexOfChannel); if (aComponent instanceof ChannelPanel) { ((ChannelPanel) aComponent).setTitleArea(parser.getTrailing()); ((ChannelPanel) aComponent).updateTextArea("TOPIC: " + parser.getTrailing() + "(" + parser.getNick() + ")"); } } } else if (command.equals("353") // ) { String channelName = parser.getMiddle(); int index = channelName.lastIndexOf("#"); channelName = channelName.substring(index); // Find the tab of channelName int indexOfChannel = findTab(tabbedPane, channelName); // If the channelName tab exists! if (indexOfChannel != -1) { Component aComponent = tabbedPane.getComponentAt(indexOfChannel); if (aComponent instanceof ChannelPanel) { // All the usernames are in trailing! String trailing = parser.getTrailing(); // let's split those usernames with StringTokenizer StringTokenizer st = new StringTokenizer(trailing, " \r\n"); // How many users are there? int totalTokens = st.countTokens(); for (int i = 0; i < totalTokens; i++) { // a username/nickname String tempnickname = st.nextToken(); // Add that username to channelPanel's usernameBox ((ChannelPanel) aComponent).updateUserArea(tempnickname, "add"); } } } else { // channelName tab doesn't exist! ; } } else if (command.equals("404")) { tabUpdate("Init Window", "ERROR: Cannot send msg to channel! " + lineFromServer); } else if (command.equals("421")) { tabUpdate("Init Window", "ERROR: Command not found! " + lineFromServer); } else if (command.equals("442")) { tabUpdate("Init Window", "ERROR: You're not on that channel! " + lineFromServer); } else if (command.equals("443")) { tabUpdate("Init Window", "ERROR: User is already on that channel! " + lineFromServer); } else if (command.equals("461")) { tabUpdate("Init Window", "ERROR: Need more params for this command! " + lineFromServer); } else if (command.equals("482")) { tabUpdate("Init Window", "ERROR: You must be channel operator for this! " + lineFromServer); } else if (command.equals("433")) { tabUpdate("Init Window", nickname + " already in use " + parser.getTrailing()); String newNickname; newNickname = JOptionPane.showInputDialog(nicknameString, nickname); if (newNickname != null) { nickname = newNickname; Component aComponent = tabbedPane.getComponentAt(0); ((InitPanel) aComponent).setTitleArea(newNickname + " connected to: " + host + ":" + port); parseSendToCommand("NICK " + newNickname); } } else { if (lineFromServer.indexOf("MODE") != -1) { String nickCommand; String modeReceiver; String modeReceived; String temp; String channelsMode; temp = lineFromServer.substring(1, lineFromServer.indexOf(" ")); nickCommand = temp; if (temp.indexOf("!") != -1) { nickCommand = temp.substring(0, temp.indexOf("!")); } temp = lineFromServer.substring(lineFromServer.indexOf(" ", lineFromServer.indexOf(" ") + 1)); temp = temp.substring(temp.indexOf(" "));// User mode if (temp.indexOf(":") != -1) { modeReceiver = temp.substring(0, temp.indexOf(":") - 1); modeReceived = temp.substring(temp.indexOf(":") + 1); tabUpdate("Init Window", nickCommand + " sets MODE: " + modeReceived + " " + modeReceiver); }// Channel mode else { channelsMode = temp.substring(1, temp.indexOf(" ", 1)); modeReceived = temp.substring(temp.indexOf(" ", 1) + 1, temp.length()); int indexOfChannel = findTab(tabbedPane, channelsMode); if (indexOfChannel != -1) { Component aComponent = tabbedPane.getComponentAt(indexOfChannel); if (aComponent instanceof ChannelPanel) { ChannelPanel channel = (ChannelPanel)aComponent; channel.updateTextArea(nickCommand +" sets MODE: " + modeReceived); String tmp = modeReceived.substring(0,1); if (tmp.compareToIgnoreCase("-")==0 || tmp.compareToIgnoreCase("+")==0){ String name = modeReceived.substring(3); if (channel.usernameList.contains("!" + name)){ channel.updateUserArea("!" + name, "remove"); } else if (channel.usernameList.contains("@" + name)){ channel.updateUserArea("@" + name, "remove"); } else if (channel.usernameList.contains("%" + name)){ channel.updateUserArea("%" + name, "remove"); } else if (channel.usernameList.contains("+" + name)){ channel.updateUserArea("+" + name, "remove"); } else if (channel.usernameList.contains(name)){ channel.updateUserArea(name, "remove"); } if (tmp.compareToIgnoreCase("+")==0){ tmp = modeReceived.substring(1,2); if (tmp.compareToIgnoreCase("v")==0){ channel.updateUserArea("+" + name, "add"); } else if (tmp.compareToIgnoreCase("a")==0){ channel.updateUserArea("!" + name, "add"); } else if (tmp.compareToIgnoreCase("o")==0){ channel.updateUserArea("@" + name, "add"); } else if (tmp.compareToIgnoreCase("h")==0){ channel.updateUserArea("%" + name, "add"); } } else if (tmp.compareToIgnoreCase("-")==0){ channel.updateUserArea(name, "add"); } } } } } } else if (lineFromServer.indexOf(" 366 ") != -1) { ; } else { tabUpdate("Init Window", lineFromServer); } } }
13641 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13641/94ad224a9ccab8782cbda6190a71cfb9b59a2727/XdccIrc.java/clean/AJClientGUI/plugin_src/ircplugin/src/de/applejuicenet/client/gui/plugins/ircplugin/XdccIrc.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1109, 1265, 2081, 12, 780, 980, 1265, 2081, 13, 1216, 1860, 288, 3639, 3399, 2678, 2082, 273, 394, 3399, 2678, 12, 1369, 1265, 2081, 1769, 3639, 514, 1296, 273, 2082, 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, 1109, 1265, 2081, 12, 780, 980, 1265, 2081, 13, 1216, 1860, 288, 3639, 3399, 2678, 2082, 273, 394, 3399, 2678, 12, 1369, 1265, 2081, 1769, 3639, 514, 1296, 273, 2082, 18, 588, ...
f = f.resolve();
f = resolve(f);
public void visitBPUTFIELD(jq_InstanceField f) { super.visitBPUTFIELD(f); f = f.resolve(); byte v = (byte)state.pop_I(); vm.putfield_B(state.pop_A(), f, v); }
3029 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3029/d12f1e1bc9744829efc71c43906f1f511c2f07d2/Interpreter.java/clean/joeq_native/joeq/Interpreter/Interpreter.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 540, 1071, 918, 3757, 38, 4762, 6776, 12, 78, 85, 67, 1442, 974, 284, 13, 288, 5411, 2240, 18, 11658, 38, 4762, 6776, 12, 74, 1769, 5411, 284, 273, 2245, 12, 74, 1769, 5411, 1160, 331, 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, 540, 1071, 918, 3757, 38, 4762, 6776, 12, 78, 85, 67, 1442, 974, 284, 13, 288, 5411, 2240, 18, 11658, 38, 4762, 6776, 12, 74, 1769, 5411, 284, 273, 2245, 12, 74, 1769, 5411, 1160, 331, 273...
public void configureMessageInternalFrame() throws MessagingException { try { this.setTitle((String)msg.getMessageInfo().getMessageProperty("Subject")); } catch (MessagingException me) { this.setTitle(Pooka.getProperty("Pooka.messageInternalFrame.messageTitle.noSubject", "<no subject>")); } messageDisplay = new ReadMessageDisplayPanel(this); messageDisplay.configureMessageDisplay(); toolbar = new ConfigurableToolbar("MessageWindowToolbar", Pooka.getResources()); this.getContentPane().add("North", toolbar); this.getContentPane().add("Center", messageDisplay); toolbar.setActive(this.getActions()); // check to see if there are any DisplayStyleComboBoxes // in the toolbar java.awt.Component[] toolbarComponents = toolbar.getComponents(); for (int i = 0; i < toolbarComponents.length; i++) { if (toolbarComponents[i] instanceof DisplayStyleComboBox) { DisplayStyleComboBox dscb = (DisplayStyleComboBox) toolbarComponents[i]; if (dscb.displayStyle) ((ReadMessageDisplayPanel)messageDisplay).setDisplayCombo(dscb); if (dscb.headerStyle) ((ReadMessageDisplayPanel)messageDisplay).setHeaderCombo(dscb); dscb.styleUpdated(getMessageProxy().getDisplayMode(), getMessageProxy().getHeaderMode()); } } keyBindings = new ConfigurableKeyBinding(this, "ReadMessageWindow.keyBindings", Pooka.getResources()); keyBindings.setActive(getActions()); configureInterfaceStyle(); }
967 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/967/538edc8a94ad8ef2062ef68f8ea643b251c1a947/ReadMessageInternalFrame.java/clean/src/net/suberic/pooka/gui/ReadMessageInternalFrame.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 5068, 1079, 3061, 3219, 1435, 1216, 23794, 503, 288, 565, 775, 288, 1377, 333, 18, 542, 4247, 12443, 780, 13, 3576, 18, 24906, 966, 7675, 24906, 1396, 2932, 6638, 7923, 1769, 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, 282, 1071, 918, 5068, 1079, 3061, 3219, 1435, 1216, 23794, 503, 288, 565, 775, 288, 1377, 333, 18, 542, 4247, 12443, 780, 13, 3576, 18, 24906, 966, 7675, 24906, 1396, 2932, 6638, 7923, 1769, 5...
else
} else {
private void setVisible(FieldDecorationData decData, boolean visible) { // Check the decData visibility flag, since it contains the client's // instructions for visibility. if (visible && decData.visible) decData.label.setVisible(true); else decData.label.setVisible(false); }
56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/391f2606b4ea2c1fb5052d938ca90877ee7631f6/DecoratedField.java/clean/bundles/org.eclipse.jface/src/org/eclipse/jface/fieldassist/DecoratedField.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 918, 16697, 12, 974, 7859, 367, 751, 2109, 751, 16, 1250, 6021, 13, 288, 202, 202, 759, 2073, 326, 2109, 751, 9478, 2982, 16, 3241, 518, 1914, 326, 1004, 1807, 202, 202, 759,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 918, 16697, 12, 974, 7859, 367, 751, 2109, 751, 16, 1250, 6021, 13, 288, 202, 202, 759, 2073, 326, 2109, 751, 9478, 2982, 16, 3241, 518, 1914, 326, 1004, 1807, 202, 202, 759,...
return ((Number)object).doubleValue();
return ((Number) object).doubleValue();
public double getDoubleValue(Object object) { return ((Number)object).doubleValue(); }
5490 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5490/a560a540b3f2b2fa87fd65e6205a42f34a160b9f/EvaluatorFactoryTest.java/buggy/drools-core/src/test/java/org/drools/base/EvaluatorFactoryTest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 540, 1071, 1645, 16097, 620, 12, 921, 733, 13, 288, 5411, 327, 14015, 1854, 13, 733, 2934, 9056, 620, 5621, 3639, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 540, 1071, 1645, 16097, 620, 12, 921, 733, 13, 288, 5411, 327, 14015, 1854, 13, 733, 2934, 9056, 620, 5621, 3639, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
if (type.isAssignableFrom(getClass())) { return this; } RubyObject result = null; try { result = funcall(getRuby().intern(method)); } catch (RubyNameException rnExcptn) { throw new RubyTypeException(getRuby(), "failed to convert " + getRubyClass().toName() + " into " + className); } if (!type.isAssignableFrom(result.getClass())) { throw new RubyTypeException(getRuby(), getRubyClass().toName() + "#" + method + " should return " + className); } return result; }
if (type.isAssignableFrom(getClass())) { return this; } RubyObject result = null; try { result = funcall(getRuby().intern(method)); } catch (RubyNameException rnExcptn) { throw new RubyTypeException( getRuby(), "failed to convert " + getRubyClass().toName() + " into " + className); } if (!type.isAssignableFrom(result.getClass())) { throw new RubyTypeException( getRuby(), getRubyClass().toName() + "#" + method + " should return " + className); } return result; }
public RubyObject convertType(Class type, String className, String method) { if (type.isAssignableFrom(getClass())) { return this; } RubyObject result = null; try { result = funcall(getRuby().intern(method)); } catch (RubyNameException rnExcptn) { throw new RubyTypeException(getRuby(), "failed to convert " + getRubyClass().toName() + " into " + className); //} catch (RubyS rnExcptn) { } if (!type.isAssignableFrom(result.getClass())) { throw new RubyTypeException(getRuby(), getRubyClass().toName() + "#" + method + " should return " + className); } return result; }
45221 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45221/addcb75d5d86d9b1fd628d84d22b74cfc41f078e/RubyObject.java/buggy/org/jruby/RubyObject.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 19817, 921, 1765, 559, 12, 797, 618, 16, 514, 2658, 16, 514, 707, 13, 288, 3639, 309, 261, 723, 18, 291, 7961, 1265, 12, 588, 797, 1435, 3719, 288, 5411, 327, 333, 31, 3639, 289...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 19817, 921, 1765, 559, 12, 797, 618, 16, 514, 2658, 16, 514, 707, 13, 288, 3639, 309, 261, 723, 18, 291, 7961, 1265, 12, 588, 797, 1435, 3719, 288, 5411, 327, 333, 31, 3639, 289...
14.3, 20.9, 7.6
14.3, 20.9, 7.6, -2.0, 9.5
public static final Chart createColoredByCategorySeries( ) { ChartWithAxes cwaBar = ChartWithAxesImpl.create( ); // Plot cwaBar.getBlock( ).setBackground( ColorDefinitionImpl.WHITE( ) ); cwaBar.getBlock( ).getOutline( ).setVisible( true ); Plot p = cwaBar.getPlot( ); p.getClientArea( ).setBackground( ColorDefinitionImpl.create( 255, 255, 225 ) ); p.getOutline( ).setVisible( false ); cwaBar.getTitle( ) .getLabel( ) .getCaption( ) .setValue( "Bar Chart Colored by Category" );//$NON-NLS-1$ // Legend Legend lg = cwaBar.getLegend( ); lg.getText( ).getFont( ).setBold( true ); lg.setItemType( LegendItemType.CATEGORIES_LITERAL ); // X-Axis Axis xAxisPrimary = cwaBar.getPrimaryBaseAxes( )[0]; xAxisPrimary.setType( AxisType.TEXT_LITERAL ); xAxisPrimary.getMajorGrid( ).setTickStyle( TickStyle.BELOW_LITERAL ); xAxisPrimary.getOrigin( ).setType( IntersectionType.MIN_LITERAL ); // Y-Axis Axis yAxisPrimary = cwaBar.getPrimaryOrthogonalAxis( xAxisPrimary ); yAxisPrimary.getMajorGrid( ).setTickStyle( TickStyle.LEFT_LITERAL ); yAxisPrimary.setType( AxisType.LINEAR_LITERAL ); yAxisPrimary.getLabel( ).getCaption( ).getFont( ).setRotation( 90 ); // Data Set TextDataSet categoryValues = TextDataSetImpl.create( new String[]{ "Item 1", "Item 2", "Item 3"} );//$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$ NumberDataSet orthoValues = NumberDataSetImpl.create( new double[]{ 14.3, 20.9, 7.6 } ); // X-Series Series seCategory = SeriesImpl.create( ); seCategory.setDataSet( categoryValues ); SeriesDefinition sdX = SeriesDefinitionImpl.create( ); sdX.getSeriesPalette( ).update( 0 ); xAxisPrimary.getSeriesDefinitions( ).add( sdX ); sdX.getSeries( ).add( seCategory ); // Y-Series BarSeries bs = (BarSeries) BarSeriesImpl.create( ); bs.setDataSet( orthoValues ); bs.setSeriesIdentifier( "Series" ); //$NON-NLS-1$ bs.getLabel( ).setVisible( true ); bs.setLabelPosition( Position.INSIDE_LITERAL ); SeriesDefinition sdY = SeriesDefinitionImpl.create( ); sdY.getSeriesPalette( ).update( -1 ); yAxisPrimary.getSeriesDefinitions( ).add( sdY ); sdY.getSeries( ).add( bs ); return cwaBar; }
5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/87be376b194f799be46893d03147e84946c9d70b/ColoredByCategorySeries.java/buggy/chart/org.eclipse.birt.chart.examples/src/org/eclipse/birt/chart/examples/view/models/ColoredByCategorySeries.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 760, 727, 14804, 752, 914, 7653, 858, 4457, 6485, 12, 262, 202, 95, 202, 202, 7984, 1190, 26494, 14098, 69, 5190, 273, 14804, 1190, 26494, 2828, 18, 2640, 12, 11272, 202, 202, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 760, 727, 14804, 752, 914, 7653, 858, 4457, 6485, 12, 262, 202, 95, 202, 202, 7984, 1190, 26494, 14098, 69, 5190, 273, 14804, 1190, 26494, 2828, 18, 2640, 12, 11272, 202, 202, ...
eventID = getNextId(); if (log.isDebugEnabled())
int eventID = getNextId(); if (log.isDebugEnabled()) {
protected void insertEvent(Header eventHeader, Event event) throws SQLException { int eventID = -1; Category log = ThreadCategory.getInstance(EventWriter.class); // events next id from sequence // // Execute the statement to get the next event id // eventID = getNextId(); if (log.isDebugEnabled()) log.debug("EventWriter: DBID: " + eventID); synchronized (event) { event.setDbid(eventID); } // // Set up the sql information now // // eventID m_insStmt.setInt(1, eventID); // eventUEI m_insStmt.setString(2, Constants.format(event.getUei(), EVENT_UEI_FIELD_SIZE)); // nodeID int nodeid = (int) event.getNodeid(); set(m_insStmt, 3, event.hasNodeid() ? nodeid : -1); // eventTime java.sql.Timestamp eventTime = getEventTime(event, log); m_insStmt.setTimestamp(4, eventTime); // // Resolve the event host to a hostname using // the ipinterface table // String hostname = getEventHost(event); // eventHost set(m_insStmt, 5, Constants.format(hostname, EVENT_HOST_FIELD_SIZE)); // ipAddr set(m_insStmt, 6, Constants.format(event.getInterface(), EVENT_INTERFACE_FIELD_SIZE)); // eventDpName m_insStmt.setString(7, (eventHeader != null) ? Constants.format(eventHeader.getDpName(), EVENT_DPNAME_FIELD_SIZE) : "undefined"); // eventSnmpHost set(m_insStmt, 8, Constants.format(event.getSnmphost(), EVENT_SNMPHOST_FIELD_SIZE)); // // convert the service name to a service id // int svcId = getEventServiceId(event, log); // service identifier set(m_insStmt, 9, svcId); // eventSnmp if (event.getSnmp() != null) m_insStmt.setString(10, SnmpInfo.format(event.getSnmp(), EVENT_SNMP_FIELD_SIZE)); else m_insStmt.setNull(10, Types.VARCHAR); // eventParms set(m_insStmt, 11, (event.getParms() != null) ? Parameter.format(event.getParms()) : null); // grab the ifIndex out of the parms if it is defined if (event.getIfIndex() != null) { if (event.getParms() != null) { Parameter.format(event.getParms()); } } // eventCreateTime java.sql.Timestamp eventCreateTime = new java.sql.Timestamp((new java.util.Date()).getTime()); m_insStmt.setTimestamp(12, eventCreateTime); // eventDescr set(m_insStmt, 13, Constants.format(event.getDescr(), EVENT_DESCR_FIELD_SIZE)); // eventLoggroup set(m_insStmt, 14, (event.getLoggroupCount() > 0) ? Constants.format(event.getLoggroup(), EVENT_LOGGRP_FIELD_SIZE) : null); // eventLogMsg // eventLog // eventDisplay if (event.getLogmsg() != null) { // set log message set(m_insStmt, 15, Constants.format(event.getLogmsg().getContent(), EVENT_LOGMSG_FIELD_SIZE)); String logdest = event.getLogmsg().getDest(); // if 'logndisplay' set both log and display // column to yes if (logdest.equals("logndisplay")) { set(m_insStmt, 16, MSG_YES); set(m_insStmt, 17, MSG_YES); } // if 'logonly' set log column to true else if (logdest.equals("logonly")) { set(m_insStmt, 16, MSG_YES); set(m_insStmt, 17, MSG_NO); } // if 'displayonly' set display column to true else if (logdest.equals("displayonly")) { set(m_insStmt, 16, MSG_NO); set(m_insStmt, 17, MSG_YES); } // if 'suppress' set both log and display to false else if (logdest.equals("suppress")) { set(m_insStmt, 16, MSG_NO); set(m_insStmt, 17, MSG_NO); } } else { m_insStmt.setNull(15, Types.VARCHAR); // If this is an event that had no match in the event conf // mark it as to be logged and displayed so that there // are no events that slip through the system // without the user knowing about them set(m_insStmt, 16, MSG_YES); set(m_insStmt, 17, MSG_YES); } // eventSeverity set(m_insStmt, 18, Constants.getSeverity(event.getSeverity())); // eventPathOutage set(m_insStmt, 19, (event.getPathoutage() != null) ? Constants.format(event.getPathoutage(), EVENT_PATHOUTAGE_FIELD_SIZE) : null); // eventCorrelation set(m_insStmt, 20, (event.getCorrelation() != null) ? org.opennms.netmgt.eventd.db.Correlation.format(event.getCorrelation(), EVENT_CORRELATION_FIELD_SIZE) : null); // eventSuppressedCount m_insStmt.setNull(21, Types.INTEGER); // eventOperInstruct set(m_insStmt, 22, Constants.format(event.getOperinstruct(), EVENT_OPERINSTRUCT_FIELD_SIZE)); // eventAutoAction set(m_insStmt, 23, (event.getAutoactionCount() > 0) ? AutoAction.format(event.getAutoaction(), EVENT_AUTOACTION_FIELD_SIZE) : null); // eventOperAction / eventOperActionMenuText if (event.getOperactionCount() > 0) { List a = new ArrayList(); List b = new ArrayList(); Enumeration en = event.enumerateOperaction(); while (en.hasMoreElements()) { Operaction eoa = (Operaction) en.nextElement(); a.add(eoa); b.add(eoa.getMenutext()); } set(m_insStmt, 24, OperatorAction.format(a, EVENT_OPERACTION_FIELD_SIZE)); set(m_insStmt, 25, Constants.format(b, EVENT_OPERACTION_MENU_FIELD_SIZE)); } else { m_insStmt.setNull(24, Types.VARCHAR); m_insStmt.setNull(25, Types.VARCHAR); } // eventNotification, this column no longer needed m_insStmt.setNull(26, Types.VARCHAR); // eventTroubleTicket / eventTroubleTicket state if (event.getTticket() != null) { set(m_insStmt, 27, Constants.format(event.getTticket().getContent(), EVENT_TTICKET_FIELD_SIZE)); int ttstate = 0; if (event.getTticket().getState().equals("on")) ttstate = 1; set(m_insStmt, 28, ttstate); } else { m_insStmt.setNull(27, Types.VARCHAR); m_insStmt.setNull(28, Types.INTEGER); } // eventForward set(m_insStmt, 29, (event.getForwardCount() > 0) ? org.opennms.netmgt.eventd.db.Forward.format(event.getForward(), EVENT_FORWARD_FIELD_SIZE) : null); // event mouseOverText set(m_insStmt, 30, Constants.format(event.getMouseovertext(), EVENT_MOUSEOVERTEXT_FIELD_SIZE)); // eventAckUser if (event.getAutoacknowledge() != null && event.getAutoacknowledge().getState().equals("on")) { set(m_insStmt, 31, Constants.format(event.getAutoacknowledge().getContent(), EVENT_ACKUSER_FIELD_SIZE)); // eventAckTime - if autoacknowledge is present, // set time to event create time set(m_insStmt, 32, eventCreateTime); } else { m_insStmt.setNull(31, Types.INTEGER); m_insStmt.setNull(32, Types.TIMESTAMP); } // eventSource set(m_insStmt, 33, Constants.format(event.getSource(), EVENT_SOURCE_FIELD_SIZE)); // execute m_insStmt.executeUpdate(); if (log.isDebugEnabled()) log.debug("SUCCESSFULLY added " + event.getUei() + " related data into the EVENTS table"); }
11849 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11849/6b56ca0b1efc953e9c9482a7352e300e32d4ac56/Persist.java/buggy/opennms-services/src/main/java/org/opennms/netmgt/eventd/Persist.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 918, 2243, 1133, 12, 1864, 871, 1864, 16, 2587, 871, 13, 1216, 6483, 288, 3639, 509, 871, 734, 273, 300, 21, 31, 3639, 9856, 613, 273, 4884, 4457, 18, 588, 1442, 12, 1133, 2289, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2243, 1133, 12, 1864, 871, 1864, 16, 2587, 871, 13, 1216, 6483, 288, 3639, 509, 871, 734, 273, 300, 21, 31, 3639, 9856, 613, 273, 4884, 4457, 18, 588, 1442, 12, 1133, 2289, ...
if(newTaglibPrefixes == null || newTaglibPrefixes.equals(oldTaglibPrefixes)) ParsingUtil.reparse(grammarByFileType, treeFileElement.getCharTable(), treeFileElement, newFileText, startOffset, endOffset, lengthShift, file.getViewProvider()); else makeFullParse(parent, newFileText, textLength, fileImpl, fileType);
if (!unparseableChameleonDetected && (newTaglibPrefixes == null || newTaglibPrefixes.equals(oldTaglibPrefixes))) { ParsingUtil.reparse(grammarByFileType, treeFileElement.getCharTable(), treeFileElement, newFileText, startOffset, endOffset, lengthShift, file.getViewProvider()); } else { ParsingUtil.reparse(grammarByFileType, treeFileElement.getCharTable(), treeFileElement, newFileText, 0, textLength, lengthShift, file.getViewProvider()); }
private static void reparseRangeInternal(PsiFile file, int startOffset, int endOffset, int lengthShift, char[] newFileText){ Set<String> oldTaglibPrefixes = null; if(file.getLanguage() == StdLanguages.JSP){ oldTaglibPrefixes = ((JspFileViewProvider)file.getViewProvider()).getKnownTaglibPrefixes(); } try{ file.getViewProvider().beforeContentsSynchronized(); final PsiFileImpl fileImpl = (PsiFileImpl)file; Project project = fileImpl.getProject(); final CharTable charTable = fileImpl.getTreeElement().getCharTable(); // hack final int textLength = file.getTextLength() + lengthShift; final FileElement treeFileElement = fileImpl.getTreeElement(); final ASTNode leafAtStart = treeFileElement.findLeafElementAt(startOffset); final ASTNode leafAtEnd = treeFileElement.findLeafElementAt(endOffset); ASTNode parent = leafAtStart != null && leafAtEnd != null ? TreeUtil.findCommonParent(leafAtStart, leafAtEnd) : treeFileElement; int minErrorLevel = Integer.MAX_VALUE; ASTNode bestReparseable = null; ASTNode prevReparseable = null; boolean theOnlyReparseable = false; while(parent != null && !(parent instanceof FileElement)){ if(parent.getElementType() instanceof IChameleonElementType){ final TextRange textRange = parent.getTextRange(); final IChameleonElementType reparseable = (IChameleonElementType)parent.getElementType(); boolean languageChanged = false; if(prevReparseable != null){ languageChanged = prevReparseable.getElementType().getLanguage() != reparseable.getLanguage(); } final String newTextStr = StringFactory.createStringFromConstantArray(newFileText, textRange.getStartOffset(), textRange.getLength() + lengthShift); if(reparseable.isParsable(newTextStr, project)){ final ChameleonElement chameleon = (ChameleonElement)Factory.createSingleLeafElement(reparseable, newFileText, textRange.getStartOffset(), textRange.getEndOffset() + lengthShift, charTable, file.getManager(), fileImpl); ChangeUtil.replaceAllChildren((CompositeElement)parent, reparseable.parseContents(chameleon).getTreeParent()); return; } else if(reparseable instanceof IErrorCounterChameleonElementType){ int currentErrorLevel = ((IErrorCounterChameleonElementType)reparseable).getErrorsCount(newTextStr, project); if(currentErrorLevel == IErrorCounterChameleonElementType.FATAL_ERROR){ prevReparseable = parent; } else if(Math.abs(currentErrorLevel) < Math.abs(minErrorLevel)){ theOnlyReparseable = bestReparseable == null; bestReparseable = parent; minErrorLevel = currentErrorLevel; if (languageChanged) break; } } // invalid content; } parent = parent.getTreeParent(); } if(bestReparseable != null && !theOnlyReparseable){ // best reparseable available final ASTNode treeElement = bestReparseable; final TextRange textRange = treeElement.getTextRange(); final ChameleonElement chameleon = (ChameleonElement)Factory.createLeafElement(bestReparseable.getElementType(), newFileText, textRange.getStartOffset(), textRange.getEndOffset() + lengthShift, -1, treeFileElement.getCharTable()); chameleon.putUserData(CharTable.CHAR_TABLE_KEY, treeFileElement.getCharTable()); chameleon.setTreeParent((CompositeElement)parent); treeElement.replaceAllChildrenToChildrenOf(chameleon.transform(treeFileElement.getCharTable(), fileImpl.createLexer(), project).getTreeParent()); } else{ //boolean leafChangeOptimized = false; //Document document = PsiDocumentManager.getInstance(project).getDocument(fileImpl); //if (document != null) { // int changedOffset; // synchronized (document) { // Integer offset = document.getUserData(LexerEditorHighlighter.CHANGED_TOKEN_START_OFFSET); // changedOffset = offset == null ? -1 : offset.intValue(); // document.putUserData(LexerEditorHighlighter.CHANGED_TOKEN_START_OFFSET, null); // } // leafChangeOptimized = changedOffset != -1 && optimizeLeafChange(treeFileElement, newFileText, startOffset, endOffset, lengthShift, changedOffset); //} //if (leafChangeOptimized) { // return; //} // file reparse FileType fileType = file.getFileType(); if (file instanceof PsiPlainTextFile){ fileType = StdFileTypes.PLAIN_TEXT; } final Grammar grammarByFileType = GrammarUtil.getGrammarByFileType(fileType); if(grammarByFileType != null){ Set<String> newTaglibPrefixes = null; if(file.getLanguage() == StdLanguages.JSP){ newTaglibPrefixes = ((JspFileViewProvider)file.getViewProvider()).getKnownTaglibPrefixes(); } if(newTaglibPrefixes == null || newTaglibPrefixes.equals(oldTaglibPrefixes)) ParsingUtil.reparse(grammarByFileType, treeFileElement.getCharTable(), treeFileElement, newFileText, startOffset, endOffset, lengthShift, file.getViewProvider()); else makeFullParse(parent, newFileText, textLength, fileImpl, fileType); } else{ makeFullParse(parent, newFileText, textLength, fileImpl, fileType); } } } finally{ file.getViewProvider().contentsSynchronized(); } }
12814 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12814/0b99499e4c508e6a4575a65ec2d733c32f24fc2e/BlockSupportImpl.java/clean/source/com/intellij/psi/impl/source/text/BlockSupportImpl.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 3238, 760, 918, 283, 2670, 2655, 3061, 12, 52, 7722, 812, 585, 16, 509, 18245, 16, 509, 25507, 16, 509, 769, 10544, 16, 1149, 8526, 20592, 1528, 15329, 565, 1000, 32, 780, 34, 1592, 180...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 3238, 760, 918, 283, 2670, 2655, 3061, 12, 52, 7722, 812, 585, 16, 509, 18245, 16, 509, 25507, 16, 509, 769, 10544, 16, 1149, 8526, 20592, 1528, 15329, 565, 1000, 32, 780, 34, 1592, 180...
contentService = aContentService; isContentServiceSelfManaged = false;
contentService = new NavigatorContentService(aViewerId); isContentServiceSelfManaged = true;
public NavigatorContentServiceContentProvider(NavigatorContentService aContentService) { super(); contentService = aContentService; isContentServiceSelfManaged = false; }
58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/1dc6ce9641d9b1d626246712db24ed137425b43b/NavigatorContentServiceContentProvider.java/buggy/bundles/org.eclipse.ui.navigator/src-navigator/org/eclipse/ui/navigator/NavigatorContentServiceContentProvider.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 423, 13061, 1350, 1179, 1350, 2249, 12, 22817, 1350, 1179, 279, 1350, 1179, 13, 288, 202, 202, 9565, 5621, 202, 202, 1745, 1179, 273, 279, 1350, 1179, 31, 202, 202, 291, 1350, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 423, 13061, 1350, 1179, 1350, 2249, 12, 22817, 1350, 1179, 279, 1350, 1179, 13, 288, 202, 202, 9565, 5621, 202, 202, 1745, 1179, 273, 279, 1350, 1179, 31, 202, 202, 291, 1350, ...
byte[] output = null; JasperPrint jasperPrint = null;
ServletOutputStream ouputStream = response.getOutputStream(); ouputStream.write(imageData, 0, imageData.length); ouputStream.flush(); ouputStream.close(); } catch (IOException ioe) { log.warn(ioe.toString()); } } } else { OgnlValueStack stack = ServletActionContext.getContext().getValueStack(); String dataSource = "" + request.getAttribute("dataSource"); OgnlValueStackDataSource stackDataSource = new OgnlValueStackDataSource(stack, dataSource);
public void service(HttpServletRequest request, HttpServletResponse response) throws ServletException { //construct the data source for the report OgnlValueStack stack = ServletActionContext.getContext().getValueStack(); String dataSource = "" + request.getAttribute("dataSource"); OgnlValueStackDataSource stackDataSource = new OgnlValueStackDataSource(stack, dataSource); //get the output format String outputFormat = "" + request.getAttribute("format"); if (outputFormat == null) { outputFormat = FORMAT_PDF; } if (!"contype".equals(request.getHeader("User-Agent"))) { // Determine the directory that the report file is in and set the reportDirectory parameter String systemId = getServletContext().getRealPath(request.getServletPath()); Map parameters = new OgnlValueStackShadowMap(stack); File directory = new File(systemId.substring(0, systemId.lastIndexOf(File.separator))); parameters.put("reportDirectory", directory); byte[] output = null; JasperPrint jasperPrint = null; // Fill the report and produce a print object try { JasperReport jasperReport = JasperManager.loadReport(systemId); jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, stackDataSource); } catch (JRException e) { log.error("Error building report for uri " + systemId, e); throw new ServletException(e.getMessage(), e); } // Export the print object to the desired output format try { if (outputFormat.equals(FORMAT_PDF)) { response.setContentType("application/pdf"); // response.setHeader("Content-disposition", "inline; filename=report.pdf"); output = JasperExportManager.exportReportToPdf(jasperPrint); } else { JRExporter exporter = null; if (outputFormat.equals(FORMAT_CSV)) { response.setContentType("text/plain"); exporter = new JRCsvExporter(); } else if (outputFormat.equals(FORMAT_HTML)) { // todo fixme... currently not working... response.setContentType("text/html"); exporter = new JRHtmlExporter(); ((JRHtmlExporter) exporter).setParameter(JRHtmlExporterParameter.IMAGES_URI, IMAGES_URI); } else if (outputFormat.equals(FORMAT_XLS)) { response.setContentType("application/vnd.ms-excel"); exporter = new JRXlsExporter(); } else if (outputFormat.equals(FORMAT_XML)) { response.setContentType("text/xml"); exporter = new JRXmlExporter(); } else { throw new ServletException("Unknown report format: " + outputFormat); } output = exportReportToBytes(jasperPrint, exporter); } } catch (JRException e) { String message = "Error producing " + outputFormat + " report for uri " + systemId; log.error(message, e); throw new ServletException(e.getMessage(), e); } response.setContentLength(output.length); ServletOutputStream ouputStream; try { if (log.isDebugEnabled()) { log.debug("Writing " + output.length + " bytes to output stream"); } ouputStream = response.getOutputStream(); ouputStream.write(output); ouputStream.flush(); ouputStream.close(); } catch (IOException e) { log.error("Error writing report output", e); throw new ServletException(e.getMessage(), e); } } else { // Code to handle "contype" request from IE try { ServletOutputStream outputStream; response.setContentType("application/pdf"); response.setContentLength(0); outputStream = response.getOutputStream(); outputStream.close(); } catch (IOException e) { log.error("Error writing report output", e); throw new ServletException(e.getMessage(), e); } } }
22725 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/22725/a7e735dc33df72d1c7ecd15bd87a869ce47251a7/JasperReportViewServlet.java/clean/src/java/com/opensymphony/webwork/views/jasperreports/JasperReportViewServlet.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1156, 12, 2940, 18572, 590, 16, 12446, 766, 13, 1216, 16517, 288, 3639, 368, 10062, 326, 501, 1084, 364, 326, 2605, 3639, 531, 1600, 80, 620, 2624, 2110, 273, 7971, 1803, 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, 1071, 918, 1156, 12, 2940, 18572, 590, 16, 12446, 766, 13, 1216, 16517, 288, 3639, 368, 10062, 326, 501, 1084, 364, 326, 2605, 3639, 531, 1600, 80, 620, 2624, 2110, 273, 7971, 1803, 1042,...
options.addElement( "-output" ); options.addElement( tmpFile.toString() ); options.addElement( "-" + granularity);
options.addElement("-output"); options.addElement(tmpFile.toString()); options.addElement("-" + granularity);
protected Vector getOptions(){ Vector options = new Vector(512); // there is a bug in Metamata 2.0 build 37. The sourcepath argument does // not work. So we will use the sourcepath prepended to classpath. (order // is important since Metamata looks at .class and .java) if (sourcePath != null){ sourcePath.append(classPath); // srcpath is prepended classPath = sourcePath; sourcePath = null; // prevent from using -sourcepath } // don't forget to modify the pattern if you change the options reporting if (classPath != null){ options.addElement("-classpath"); options.addElement(classPath); } options.addElement( "-output" ); options.addElement( tmpFile.toString() ); options.addElement( "-" + granularity); // display the metamata copyright // options.addElement( "-quiet"); options.addElement( "-format"); // need this because that's what the handler is using, it's // way easier to process than any other separator options.addElement( "tab"); // specify a / as the indent character, used by the handler. options.addElement( "-i"); options.addElement( "/"); // directories String[] dirs = path.list(); for (int i = 0; i < dirs.length; i++){ options.addElement( dirs[i] ); } // files next. addAllVector(options, includedFiles.keys()); return options; }
506 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/506/8af1905a98b1e04a63ab7473d64a41bfda91f15e/MMetrics.java/buggy/src/main/org/apache/tools/ant/taskdefs/optional/metamata/MMetrics.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 5589, 9849, 1435, 95, 3639, 5589, 702, 273, 394, 5589, 12, 13757, 1769, 3639, 368, 1915, 353, 279, 7934, 316, 21604, 301, 396, 576, 18, 20, 1361, 18091, 18, 1021, 1084, 803, 1237, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5589, 9849, 1435, 95, 3639, 5589, 702, 273, 394, 5589, 12, 13757, 1769, 3639, 368, 1915, 353, 279, 7934, 316, 21604, 301, 396, 576, 18, 20, 1361, 18091, 18, 1021, 1084, 803, 1237, ...
final Document xupdateConfig; if (true) { xupdateConfig = Dom4jUtils.createDocumentCopyParentNamespaces(resultElement); xupdateConfig.getRootElement().setQName(new QName("modifications", XUpdateConstants.XUPDATE_NAMESPACE)); } else { final NonLazyUserDataElement modificationsElement = new NonLazyUserDataElement( "modifications", XUpdateConstants.XUPDATE_NAMESPACE ); final Map namespacesOnResult = Dom4jUtils.getNamespaceContext(resultElement); for (Iterator i = namespacesOnResult.keySet().iterator(); i.hasNext();) { String prefix = (String) i.next(); if (prefix.length() > 0) modificationsElement.add(new Namespace(prefix, (String) namespacesOnResult.get(prefix))); } xupdateConfig = new NonLazyUserDataDocument( modificationsElement ); for (Iterator l = resultElement.elements().iterator(); l.hasNext();) { Element xupdateElement = (Element) l.next(); modificationsElement.add(xupdateElement.createCopy()); } }
final Document xupdateConfig = Dom4jUtils.createDocumentCopyParentNamespaces(resultElement); xupdateConfig.getRootElement().setQName(new QName("modifications", XUpdateConstants.XUPDATE_NAMESPACE));
private void executeResult(StepProcessorContext stepProcessorContext, final String controllerContext, ASTWhen when, final Map pageIdToXFormsModel, final Map pageIdToPathInfo, final Map pageIdToParamsDocument, final ASTOutput[] paramedInstance, final Element resultElement, final ASTOutput actionData, final ASTOutput redirect, final ASTOutput xupdatedInstance, String instancePassing) { // Instance to update: either current, or instance from other page final String resultPageId = resultElement == null ? null : resultElement.attributeValue("page"); Attribute instancePassingAttribute = resultElement == null ? null : resultElement.attribute("instance-passing"); final String _instancePassing = instancePassingAttribute == null ? instancePassing : instancePassingAttribute.getValue(); final String otherXForms = (String) pageIdToXFormsModel.get(resultPageId); final boolean useCurrentPageInstance = resultPageId == null || otherXForms == null; final ASTOutput instanceToUpdate = useCurrentPageInstance ? paramedInstance[0] : new ASTOutput("data", "other-page-instance"); if (!useCurrentPageInstance) { final ASTOutput otherPageXFormsModel = new ASTOutput("data", "other-page-model"); when.addStatement(new StepProcessorCall(stepProcessorContext, controllerContext, otherXForms) {{ addInput(new ASTInput("data", Dom4jUtils.NULL_DOCUMENT)); addInput(new ASTInput("instance", Dom4jUtils.NULL_DOCUMENT)); addInput(new ASTInput("xforms-model", Dom4jUtils.NULL_DOCUMENT)); addInput(new ASTInput("matcher", Dom4jUtils.NULL_DOCUMENT)); addInput(new ASTInput("can-be-serializer", FALSE_DOCUMENT)); addOutput(new ASTOutput("data", otherPageXFormsModel)); }}); when.addStatement(new ASTProcessorCall(XMLConstants.IDENTITY_PROCESSOR_QNAME) {{ addInput(new ASTInput("data", new ASTHrefXPointer(new ASTHrefId(otherPageXFormsModel), EXTRACT_INSTANCE_XPATH))); addOutput(new ASTOutput("data", instanceToUpdate)); }}); } // XUpdate the instance final ASTOutput internalXUpdatedInstance = resultElement == null || resultElement.elements().isEmpty() ? instanceToUpdate : new ASTOutput("data", "internal-xupdated-instance"); if (resultElement != null && !resultElement.elements().isEmpty()) { // Create XUpdate config final Document xupdateConfig; if (true) { // The code in this branch should be equivalent to the one in the next branch, // except it will add the default namespace as well. Try to switch at some point. xupdateConfig = Dom4jUtils.createDocumentCopyParentNamespaces(resultElement); xupdateConfig.getRootElement().setQName(new QName("modifications", XUpdateConstants.XUPDATE_NAMESPACE)); } else { final NonLazyUserDataElement modificationsElement = new NonLazyUserDataElement( "modifications", XUpdateConstants.XUPDATE_NAMESPACE ); final Map namespacesOnResult = Dom4jUtils.getNamespaceContext(resultElement); for (Iterator i = namespacesOnResult.keySet().iterator(); i.hasNext();) { String prefix = (String) i.next(); if (prefix.length() > 0) modificationsElement.add(new Namespace(prefix, (String) namespacesOnResult.get(prefix))); } xupdateConfig = new NonLazyUserDataDocument( modificationsElement ); for (Iterator l = resultElement.elements().iterator(); l.hasNext();) { Element xupdateElement = (Element) l.next(); modificationsElement.add(xupdateElement.createCopy()); } } // Run XUpdate final String resultTraceAttribute = resultElement.attributeValue("trace"); when.addStatement(new ASTProcessorCall(XMLConstants.XUPDATE_PROCESSOR_QNAME) {{ addInput(new ASTInput("config", xupdateConfig)); addInput(new ASTInput("data", new ASTHrefId(instanceToUpdate))); addInput(new ASTInput("instance", new ASTHrefId(paramedInstance[0]))); if (actionData != null) addInput(new ASTInput("action", new ASTHrefId(actionData))); addOutput(new ASTOutput("data", internalXUpdatedInstance) {{ setDebug(resultTraceAttribute);}}); }}); } // Do redirect if (resultPageId != null) { final String forwardPathInfo = (String) pageIdToPathInfo.get(resultPageId); if (forwardPathInfo == null) throw new OXFException("Cannot find page with id '" + resultPageId + "'"); final Document paramsDocument = (Document) pageIdToParamsDocument.get(resultPageId); final boolean doServerSideRedirect = _instancePassing != null && _instancePassing.equals(INSTANCE_PASSING_FORWARD); final boolean doRedirectExitPortal = _instancePassing != null && _instancePassing.equals(INSTANCE_PASSING_REDIRECT_PORTAL); { // Do redirect passing parameters from internalXUpdatedInstance without modifying URL final ASTOutput parametersOutput = (otherXForms != null) ? new ASTOutput(null, "parameters") : null; if (otherXForms != null) { // Pass parameters only if needed when.addStatement(new ASTProcessorCall(XMLConstants.INSTANCE_TO_PARAMETERS_PROCESSOR_QNAME) {{ addInput(new ASTInput("instance", new ASTHrefId(internalXUpdatedInstance))); addInput(new ASTInput("filter", (paramsDocument != null) ? paramsDocument : Dom4jUtils.NULL_DOCUMENT)); addOutput(new ASTOutput("data", parametersOutput)); }}); } // Handle path info final ASTOutput forwardPathInfoOutput = new ASTOutput(null, "forward-path-info"); when.addStatement(new ASTProcessorCall(XMLConstants.IDENTITY_PROCESSOR_QNAME) {{ addInput(new ASTInput("data", new NonLazyUserDataDocument (new NonLazyUserDataElement("path-info") {{ setText(forwardPathInfo); }} ))); addOutput(new ASTOutput("data", forwardPathInfoOutput)); }}); // Handle server-side redirect and exit portal redirect final ASTOutput isServerSideRedirectOutput = new ASTOutput(null, "is-server-side-redirect"); when.addStatement(new ASTProcessorCall(XMLConstants.IDENTITY_PROCESSOR_QNAME) {{ addInput(new ASTInput("data", new NonLazyUserDataDocument (new NonLazyUserDataElement("server-side") {{ setText(Boolean.toString(doServerSideRedirect)); }} ))); addOutput(new ASTOutput("data", isServerSideRedirectOutput)); }}); final ASTOutput isRedirectExitPortal = new ASTOutput(null, "is-redirect-exit-portal"); when.addStatement(new ASTProcessorCall(XMLConstants.IDENTITY_PROCESSOR_QNAME) {{ addInput(new ASTInput("data", new NonLazyUserDataDocument (new NonLazyUserDataElement("exit-portal") {{ setText(Boolean.toString(doRedirectExitPortal)); }} ))); addOutput(new ASTOutput("data", isRedirectExitPortal)); }}); // Serialize the instance into the request if we are doing a server-side redirect if (doServerSideRedirect) { when.addStatement(new ASTProcessorCall(XMLConstants.SCOPE_SERIALIZER_PROCESSOR_QNAME) {{ Document config = null; try { config = Dom4jUtils.parseText ("<config><key>" + org.orbeon.oxf.xforms.XFormsInstance.REQUEST_INSTANCE_DOCUMENT + "</key><scope>request</scope></config>"); } catch (DocumentException e) { throw new OXFException(e); } catch ( final SAXException e ) { throw new OXFException( e ); } addInput(new ASTInput("data", new ASTHrefId(internalXUpdatedInstance))); addInput(new ASTInput("config", config)); }}); } // Aggregate redirect-url config final ASTHref redirectURLData; if (paramsDocument != null) { // Params document - things are little more complicated, so we delegate final ASTOutput redirectDataOutput = new ASTOutput(null, "redirect-data"); final ASTHrefAggregate redirectDataAggregate = new ASTHrefAggregate("redirect-url", new ASTHrefId(forwardPathInfoOutput), new ASTHrefId(isServerSideRedirectOutput), new ASTHrefId(isRedirectExitPortal)); redirectDataAggregate.getHrefs().add(new ASTHrefId(parametersOutput)); when.addStatement(new ASTProcessorCall(XMLConstants.UNSAFE_XSLT_PROCESSOR_QNAME) {{ addInput(new ASTInput("config", new ASTHrefURL("oxf:/oxf/private/page-flow/reverse-params.xsl"))); addInput(new ASTInput("data", redirectDataAggregate)); addInput(new ASTInput("instance", new ASTHrefId(internalXUpdatedInstance))); addInput(new ASTInput("params", paramsDocument)); addOutput(new ASTOutput("data", redirectDataOutput)); }}); redirectURLData = new ASTHrefId(redirectDataOutput); } else { // No params document, we can simply aggregate with XPL final ASTHrefAggregate redirectDataAggregate = new ASTHrefAggregate("redirect-url", new ASTHrefId(forwardPathInfoOutput), new ASTHrefId(isServerSideRedirectOutput), new ASTHrefId(isRedirectExitPortal)); if (otherXForms != null) // Pass parameters only if needed redirectDataAggregate.getHrefs().add(new ASTHrefId(parametersOutput)); redirectURLData = redirectDataAggregate; } // Execute the redirect when.addStatement(new ASTProcessorCall(XMLConstants.REDIRECT_PROCESSOR_QNAME) {{ addInput(new ASTInput("data", redirectURLData) {{setDebug("redirect 2");}});// {{setDebug("redirect 2");}} }}); } } // Signal if we did a redirect when.addStatement(new ASTProcessorCall(XMLConstants.IDENTITY_PROCESSOR_QNAME) {{ addInput(new ASTInput("data", new NonLazyUserDataDocument(new NonLazyUserDataElement ("is-redirect") {{ setText(Boolean.toString(resultPageId != null)); }}))); addOutput(new ASTOutput("data", redirect)); }}); // Export XUpdated instance from this branch when.addStatement(new ASTProcessorCall(XMLConstants.IDENTITY_PROCESSOR_QNAME) {{ addInput(new ASTInput("data", new ASTHrefId(internalXUpdatedInstance))); addOutput(new ASTOutput("data", xupdatedInstance)); }}); }
52783 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52783/13f56e1f31bcbf299c0d81eeab5e91b86b91fb9f/PageFlowControllerProcessor.java/clean/src/java/org/orbeon/oxf/processor/PageFlowControllerProcessor.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 1836, 1253, 12, 4160, 5164, 1042, 2235, 5164, 1042, 16, 727, 514, 2596, 1042, 16, 9183, 9434, 1347, 16, 1171, 9079, 727, 1635, 18720, 14955, 18529, 1488, 16, 727, 1635, 18720, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1836, 1253, 12, 4160, 5164, 1042, 2235, 5164, 1042, 16, 727, 514, 2596, 1042, 16, 9183, 9434, 1347, 16, 1171, 9079, 727, 1635, 18720, 14955, 18529, 1488, 16, 727, 1635, 18720, ...
cheatSheetIdFromPage = templateChoicePage.getTemplate( ).cheatSheetId;
cheatSheetIdFromPage = templateChoicePage.getTemplate( ).getCheatSheetId();
public boolean performFinish( ) { final IPath containerName = newReportFileWizardPage.getContainerFullPath( ); String fn = newReportFileWizardPage.getFileName( ); final String fileName; if ( !fn.endsWith( "." + fileExtension ) ) //$NON-NLS-1$ { fileName = fn + "." + fileExtension; //$NON-NLS-1$ } else { fileName = fn; } InputStream streamFromPage = null; String cheatSheetIdFromPage = "";//$NON-NLS-1$ boolean showCheatSheetFromPage = false; //Temporary remark the choice page for that feature is not supported in // R1 // if ( choicePage.isBlank( ) ) // { // // blank report // URL url = Platform.find( Platform.getBundle( ReportPlugin.REPORT_UI // ), // new Path( templateChoicePage.getBlankTemplate( ).reportPath ) ); // if ( url != null ) // { // try // { // streamFromPage = url.openStream( ); // } // catch ( IOException e1 ) // { // //ignore. // } // } // // cheatSheetIdFromPage = templateChoicePage.getBlankTemplate( // ).cheatSheetId; // showCheatSheetFromPage = false; // } // else if ( !choicePage.isCustom( ) ) // { // predefined template URL url = Platform.find( Platform.getBundle( ReportPlugin.REPORT_UI ), new Path( templateChoicePage.getTemplate( ).reportPath ) ); if ( url != null ) { try { streamFromPage = url.openStream( ); } catch ( IOException e1 ) { //ignore. } } cheatSheetIdFromPage = templateChoicePage.getTemplate( ).cheatSheetId; showCheatSheetFromPage = templateChoicePage.getShowCheatSheet( ); // Temporary remark the choice page for that feature is not supported in // R1 // } // else // { // // custom template // try // { // streamFromPage = new FileInputStream( // customTemplatePage.getReportPath( ) ); // String xmlPath = customTemplatePage.getReportPath( ) // .replaceFirst( ".rptdesign", ".xml" ); // File f = new File( xmlPath ); // if ( f.exists( ) ) // { // cheatSheetIdFromPage = f.toURL( ).toString( ); // // commented out until opencheatsheetaction bug is fixed in // // eclipse // // https://bugs.eclipse.org/bugs/show_bug.cgi?id=88481 // // showCheatSheetFromPage = // // customTemplatePage.getShowCheatSheet( ); // } // // } // catch ( Exception e ) // { // ExceptionHandler.handle( e ); // return false; // } // } final InputStream stream = streamFromPage; final String cheatSheetId = cheatSheetIdFromPage; final boolean showCheatSheet = showCheatSheetFromPage; IRunnableWithProgress op = new IRunnableWithProgress( ) { public void run( IProgressMonitor monitor ) throws InvocationTargetException { try { doFinish( containerName, fileName, stream, cheatSheetId, showCheatSheet, monitor ); } catch ( CoreException e ) { throw new InvocationTargetException( e ); } finally { monitor.done( ); } } }; try { getContainer( ).run( true, false, op ); } catch ( InterruptedException e ) { return false; } catch ( InvocationTargetException e ) { Throwable realException = e.getTargetException( ); ExceptionHandler.handle( realException ); return false; } return true; }
46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/de4ffb7d72b3e5ee84cd5233d36c52013b9c12d1/NewReportWizard.java/buggy/UI/org.eclipse.birt.report.designer.ui.ide/src/org/eclipse/birt/report/designer/ui/ide/wizards/NewReportWizard.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 1250, 3073, 11641, 12, 262, 202, 95, 202, 202, 6385, 467, 743, 20408, 273, 394, 4820, 812, 27130, 1964, 18, 588, 2170, 24173, 12, 11272, 202, 202, 780, 2295, 273, 394, 4820, 8...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 1250, 3073, 11641, 12, 262, 202, 95, 202, 202, 6385, 467, 743, 20408, 273, 394, 4820, 812, 27130, 1964, 18, 588, 2170, 24173, 12, 11272, 202, 202, 780, 2295, 273, 394, 4820, 8...
jj_consume_token(QUOTE);
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case QUOTE: jj_consume_token(QUOTE); break; case 0: jj_consume_token(0); break; default: jj_la1[7] = jj_gen; jj_consume_token(-1); throw new ParseException(); }
final public ArrayList phrase(String field) throws ParseException { int start; int end; ArrayList result = new ArrayList(); String term; jj_consume_token(QUOTE); start = token.endColumn; label_2: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case 0: case PLUS: case MINUS: case COLON: case SLASH: case DOT: case ATSIGN: case APOSTROPHE: case WHITE: ; break; default: jj_la1[4] = jj_gen; break label_2; } nonTerm(); } label_3: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WORD: case ACRONYM: case SIGRAM: ; break; default: jj_la1[5] = jj_gen; break label_3; } term = term(); result.add(term); label_4: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case 0: case PLUS: case MINUS: case COLON: case SLASH: case DOT: case ATSIGN: case APOSTROPHE: case WHITE: ; break; default: jj_la1[6] = jj_gen; break label_4; } nonTerm(); } } end = token.endColumn; jj_consume_token(QUOTE); if (QueryFilters.isRawField(field)) { result.clear(); result.add(queryString.substring(start, end)); } {if (true) return result;} throw new Error("Missing return statement in function"); }
50818 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50818/0faf643f0efa6f2ad848fed686443d8e4c4ad978/NutchAnalysis.java/buggy/src/java/org/apache/nutch/analysis/NutchAnalysis.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 727, 1071, 2407, 13045, 12, 780, 652, 13, 1216, 10616, 288, 225, 509, 787, 31, 225, 509, 679, 31, 225, 2407, 563, 273, 394, 2407, 5621, 225, 514, 2481, 31, 565, 1620, 14015, 78, 78, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 727, 1071, 2407, 13045, 12, 780, 652, 13, 1216, 10616, 288, 225, 509, 787, 31, 225, 509, 679, 31, 225, 2407, 563, 273, 394, 2407, 5621, 225, 514, 2481, 31, 565, 1620, 14015, 78, 78, 6...
AST __t1250 = _t; AST tmp1599_AST_in = (AST)_t;
AST __t1235 = _t; AST tmp1611_AST_in = (AST)_t;
public final void altertablestate(AST _t) throws RecognitionException { AST altertablestate_AST_in = (_t == ASTNULL) ? null : (AST)_t; AST __t1247 = _t; AST tmp1591_AST_in = (AST)_t; match(_t,ALTER); _t = _t.getFirstChild(); AST tmp1592_AST_in = (AST)_t; match(_t,TABLE); _t = _t.getNextSibling(); tbl(_t,CQ.SCHEMATABLESYMBOL); _t = _retTree; { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case ADD: { AST tmp1593_AST_in = (AST)_t; match(_t,ADD); _t = _t.getNextSibling(); AST tmp1594_AST_in = (AST)_t; match(_t,COLUMN); _t = _t.getNextSibling(); sql_col_def(_t); _t = _retTree; break; } case DROP: { AST tmp1595_AST_in = (AST)_t; match(_t,DROP); _t = _t.getNextSibling(); AST tmp1596_AST_in = (AST)_t; match(_t,COLUMN); _t = _t.getNextSibling(); fld(_t,CQ.SYMBOL); _t = _retTree; break; } case ALTER: { AST tmp1597_AST_in = (AST)_t; match(_t,ALTER); _t = _t.getNextSibling(); AST tmp1598_AST_in = (AST)_t; match(_t,COLUMN); _t = _t.getNextSibling(); fld(_t,CQ.SYMBOL); _t = _retTree; { _loop1252: do { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case FORMAT: { AST __t1250 = _t; AST tmp1599_AST_in = (AST)_t; match(_t,FORMAT); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t1250; _t = _t.getNextSibling(); break; } case COLUMNLABEL: case LABEL: { label_constant(_t); _t = _retTree; break; } case DEFAULT: { AST __t1251 = _t; AST tmp1600_AST_in = (AST)_t; match(_t,DEFAULT); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t1251; _t = _t.getNextSibling(); break; } case CASESENSITIVE: case Not_casesens: { casesens_or_not(_t); _t = _retTree; break; } default: { break _loop1252; } } } while (true); } break; } default: { throw new NoViableAltException(_t); } } } state_end(_t); _t = _retTree; _t = __t1247; _t = _t.getNextSibling(); _retTree = _t; }
13952 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13952/daa15e07422d3491bbbb4d0060450c81983332a4/TreeParser01.java/buggy/trunk/org.prorefactor.core/src/org/prorefactor/treeparser01/TreeParser01.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 727, 918, 10182, 7032, 80, 395, 340, 12, 9053, 389, 88, 13, 1216, 9539, 288, 9506, 202, 9053, 10182, 7032, 80, 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, 10182, 7032, 80, 395, 340, 12, 9053, 389, 88, 13, 1216, 9539, 288, 9506, 202, 9053, 10182, 7032, 80, 395, 340, 67, 9053, 67, 267, 273, 261, 67, 88, 422, 9183, 8560...
String token = tokenizer.nextToken(); if (token.equals("##targetNamespace")) { token = fTargetNSURIString;
token = tokenizer.nextToken(); if (token.equals(SchemaSymbols.ATTVAL_TWOPOUNDLOCAL)) { leafIndex = fSchemaGrammar.addContentSpecNode(processContentsAnyLocal, -1, StringPool.EMPTY_STRING, false); } else { if (token.equals("##targetNamespace")) token = fTargetNSURIString; uriIndex = fStringPool.addSymbol(token); leafIndex = fSchemaGrammar.addContentSpecNode(processContentsAny, -1, uriIndex, false);
private int traverseAny(Element child) throws Exception { // General Attribute Checking int scope = GeneralAttrCheck.ELE_CONTEXT_LOCAL; Hashtable attrValues = fGeneralAttrCheck.checkAttributes(child, scope); Element annotation = checkContent( child, XUtil.getFirstChildElement(child), true ); if(annotation != null ) { // REVISIT: Localize reportGenericSchemaError("<any> elements can contain at most one <annotation> element in their children"); } int anyIndex = -1; String namespace = child.getAttribute(SchemaSymbols.ATT_NAMESPACE).trim(); String processContents = child.getAttribute("processContents").trim(); int processContentsAny = XMLContentSpec.CONTENTSPECNODE_ANY; int processContentsAnyOther = XMLContentSpec.CONTENTSPECNODE_ANY_OTHER; int processContentsAnyLocal = XMLContentSpec.CONTENTSPECNODE_ANY_LOCAL; if (processContents.length() > 0 && !processContents.equals("strict")) { if (processContents.equals("lax")) { processContentsAny = XMLContentSpec.CONTENTSPECNODE_ANY_LAX; processContentsAnyOther = XMLContentSpec.CONTENTSPECNODE_ANY_OTHER_LAX; processContentsAnyLocal = XMLContentSpec.CONTENTSPECNODE_ANY_LOCAL_LAX; } else if (processContents.equals("skip")) { processContentsAny = XMLContentSpec.CONTENTSPECNODE_ANY_SKIP; processContentsAnyOther = XMLContentSpec.CONTENTSPECNODE_ANY_OTHER_SKIP; processContentsAnyLocal = XMLContentSpec.CONTENTSPECNODE_ANY_LOCAL_SKIP; } } if (namespace.length() == 0 || namespace.equals("##any")) { // REVISIT: Should the "any" namespace signifier also be changed // to StringPool.EMPTY_STRING instead of -1? -Ac // REVISIT: is this the right way to do it? EMPTY_STRING does not // seem to work in this case -el // Simplify! - ng //String uri = child.getOwnerDocument().getDocumentElement().getAttribute("targetNamespace"); String uri = fTargetNSURIString; int uriIndex = fStringPool.addSymbol(uri); anyIndex = fSchemaGrammar.addContentSpecNode(processContentsAny, -1, uriIndex, false); } else if (namespace.equals("##other")) { String uri = fTargetNSURIString; int uriIndex = fStringPool.addSymbol(uri); anyIndex = fSchemaGrammar.addContentSpecNode(processContentsAnyOther, -1, uriIndex, false); } else if (namespace.equals("##local")) { anyIndex = fSchemaGrammar.addContentSpecNode(processContentsAnyLocal, -1, StringPool.EMPTY_STRING, false); } else if (namespace.length() > 0) { StringTokenizer tokenizer = new StringTokenizer(namespace); Vector tokens = new Vector(); while (tokenizer.hasMoreElements()) { String token = tokenizer.nextToken(); if (token.equals("##targetNamespace")) { token = fTargetNSURIString; } tokens.addElement(token); } String uri = (String)tokens.elementAt(0); int uriIndex = fStringPool.addSymbol(uri); int leafIndex = fSchemaGrammar.addContentSpecNode(processContentsAny, -1, uriIndex, false); int valueIndex = leafIndex; int count = tokens.size(); if (count > 1) { uri = (String)tokens.elementAt(1); uriIndex = fStringPool.addSymbol(uri); leafIndex = fSchemaGrammar.addContentSpecNode(processContentsAny, -1, uriIndex, false); int otherValueIndex = leafIndex; int choiceIndex = fSchemaGrammar.addContentSpecNode(XMLContentSpec.CONTENTSPECNODE_CHOICE, valueIndex, otherValueIndex, false); for (int i = 2; i < count; i++) { uri = (String)tokens.elementAt(i); uriIndex = fStringPool.addSymbol(uri); leafIndex = fSchemaGrammar.addContentSpecNode(processContentsAny, -1, uriIndex, false); otherValueIndex = leafIndex; choiceIndex = fSchemaGrammar.addContentSpecNode(XMLContentSpec.CONTENTSPECNODE_CHOICE, choiceIndex, otherValueIndex, false); } anyIndex = choiceIndex; } else { anyIndex = leafIndex; } } else { // REVISIT: Localize reportGenericSchemaError("Empty namespace attribute for any element"); } return anyIndex; }
46079 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46079/db50512047bd38712dbc3a9d35ed787e6f2582f4/TraverseSchema.java/clean/src/org/apache/xerces/validators/schema/TraverseSchema.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 509, 10080, 2961, 12, 1046, 1151, 13, 1216, 1185, 288, 3639, 368, 9544, 3601, 24471, 3639, 509, 2146, 273, 9544, 3843, 1564, 18, 41, 900, 67, 13181, 67, 14922, 31, 3639, 18559, 1604...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 10080, 2961, 12, 1046, 1151, 13, 1216, 1185, 288, 3639, 368, 9544, 3601, 24471, 3639, 509, 2146, 273, 9544, 3843, 1564, 18, 41, 900, 67, 13181, 67, 14922, 31, 3639, 18559, 1604...
if (dsm.getValueType() == DatabaseStoreMessage.KEY_TYPE_LEASESET) _context.netDb().store(dsm.getKey(), dsm.getLeaseSet()); else _context.netDb().store(dsm.getKey(), dsm.getRouterInfo());
try { if (dsm.getValueType() == DatabaseStoreMessage.KEY_TYPE_LEASESET) _context.netDb().store(dsm.getKey(), dsm.getLeaseSet()); else _context.netDb().store(dsm.getKey(), dsm.getRouterInfo()); } catch (IllegalArgumentException iae) { if (_log.shouldLog(Log.WARN)) _log.warn("Bad store attempt", iae); }
public void handleClove(DeliveryInstructions instructions, I2NPMessage data) { switch (instructions.getDeliveryMode()) { case DeliveryInstructions.DELIVERY_MODE_LOCAL: if (_log.shouldLog(Log.DEBUG)) _log.debug("local delivery instructions for clove: " + data.getClass().getName()); if (data instanceof GarlicMessage) { _receiver.receive((GarlicMessage)data); return; } else { if (data instanceof DatabaseStoreMessage) { // treat db store explicitly, since we don't want to republish (or flood) // unnecessarily DatabaseStoreMessage dsm = (DatabaseStoreMessage)data; if (dsm.getValueType() == DatabaseStoreMessage.KEY_TYPE_LEASESET) _context.netDb().store(dsm.getKey(), dsm.getLeaseSet()); else _context.netDb().store(dsm.getKey(), dsm.getRouterInfo()); } else { _context.inNetMessagePool().add(data, null, null); } return; } case DeliveryInstructions.DELIVERY_MODE_DESTINATION: if (!(data instanceof DataMessage)) { if (_log.shouldLog(Log.ERROR)) _log.error("cant send a " + data.getClass().getName() + " to a destination"); } else if ( (_client != null) && (_client.equals(instructions.getDestination())) ) { if (_log.shouldLog(Log.DEBUG)) _log.debug("data message came down a tunnel for " + _client.toBase64().substring(0,4)); DataMessage dm = (DataMessage)data; Payload payload = new Payload(); payload.setEncryptedData(dm.getData()); ClientMessage m = new ClientMessage(); m.setDestinationHash(_client); m.setPayload(payload); _context.clientManager().messageReceived(m); } else { if (_log.shouldLog(Log.ERROR)) _log.error("this data message came down a tunnel for " + (_client == null ? "no one" : _client.toBase64().substring(0,4)) + " but targetted " + instructions.getDestination().toBase64().substring(0,4)); } return; case DeliveryInstructions.DELIVERY_MODE_ROUTER: // fall through case DeliveryInstructions.DELIVERY_MODE_TUNNEL: if (_log.shouldLog(Log.INFO)) _log.info("clove targetted " + instructions.getRouter() + ":" + instructions.getTunnelId() + ", treat recursively to prevent leakage"); distribute(data, instructions.getRouter(), instructions.getTunnelId()); return; default: if (_log.shouldLog(Log.ERROR)) _log.error("Unknown instruction " + instructions.getDeliveryMode() + ": " + instructions); return; } }
3808 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3808/c8c109093dbd7f26e169c3c73fed09b232a02fe8/InboundMessageDistributor.java/buggy/router/java/src/net/i2p/router/tunnel/InboundMessageDistributor.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1640, 4082, 537, 12, 8909, 26712, 12509, 16, 467, 22, 23430, 1079, 501, 13, 288, 3639, 1620, 261, 25758, 18, 588, 8909, 2309, 10756, 288, 5411, 648, 17390, 26712, 18, 20643, 17...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1640, 4082, 537, 12, 8909, 26712, 12509, 16, 467, 22, 23430, 1079, 501, 13, 288, 3639, 1620, 261, 25758, 18, 588, 8909, 2309, 10756, 288, 5411, 648, 17390, 26712, 18, 20643, 17...
TreeModel mod = tree.getModel(); TreePath start = tree.getLeadSelectionPath(); Object last = null; if (start != null) last = start.getLastPathComponent(); if (last != null) { if (e.getKeyCode() == KeyEvent.VK_DOWN || e.getKeyCode() == KeyEvent.VK_KP_DOWN) { Object next = getNextVisibleNode(last); if (next != null) { TreePath newPath = new TreePath(getPathToRoot(next, 0)); selectPath(tree, newPath); if (e.isControlDown()) tree.setLeadSelectionPath(newPath); else if (!mod.isLeaf(next) && e.isShiftDown()) tree.expandPath(newPath); } } else if (e.getKeyCode() == KeyEvent.VK_UP || e.getKeyCode() == KeyEvent.VK_KP_UP) { Object prev = getPreviousVisibleNode(last); if (prev != null) { TreePath newPath = new TreePath(getPathToRoot(prev, 0)); selectPath(tree, new TreePath(getPathToRoot(prev, 0))); if (e.isControlDown()) tree.setLeadSelectionPath(newPath); else if (!mod.isLeaf(prev) && e.isShiftDown()) tree.expandPath(newPath); } } else if (e.getKeyCode() == KeyEvent.VK_LEFT || e.getKeyCode() == KeyEvent.VK_KP_LEFT) { TreePath path = new TreePath(getPathToRoot(last, 0)); Object p = getParent(mod.getRoot(), last); if (!mod.isLeaf(last) && tree.isExpanded(path)) tree.collapsePath(path); else if (p != null) selectPath(tree, new TreePath(getPathToRoot(p, 0))); } else if (e.getKeyCode() == KeyEvent.VK_RIGHT || e.getKeyCode() == KeyEvent.VK_KP_RIGHT) { TreePath path = new TreePath(getPathToRoot(last, 0)); if (!mod.isLeaf(last) && tree.isCollapsed(path)) tree.expandPath(path); else { Object next = getNextVisibleNode(last); if (next != null) selectPath(tree, new TreePath(getPathToRoot(next, 0))); } } else if (e.getKeyCode() == KeyEvent.VK_ENTER) { TreePath path = new TreePath(getPathToRoot(last, 0)); if (!mod.isLeaf(last)) { if (tree.isExpanded(path)) tree.collapsePath(path); else tree.expandPath(path); } } }
public void keyPressed(KeyEvent e) { TreeModel mod = tree.getModel(); TreePath start = tree.getLeadSelectionPath(); Object last = null; if (start != null) last = start.getLastPathComponent(); if (last != null) { // DOWN, KP_DOWN if (e.getKeyCode() == KeyEvent.VK_DOWN || e.getKeyCode() == KeyEvent.VK_KP_DOWN) { Object next = getNextVisibleNode(last); if (next != null) { TreePath newPath = new TreePath(getPathToRoot(next, 0)); selectPath(tree, newPath); if (e.isControlDown()) tree.setLeadSelectionPath(newPath); else if (!mod.isLeaf(next) && e.isShiftDown()) tree.expandPath(newPath); } } // UP, KP_UP else if (e.getKeyCode() == KeyEvent.VK_UP || e.getKeyCode() == KeyEvent.VK_KP_UP) { Object prev = getPreviousVisibleNode(last); if (prev != null) { TreePath newPath = new TreePath(getPathToRoot(prev, 0)); selectPath(tree, new TreePath(getPathToRoot(prev, 0))); if (e.isControlDown()) tree.setLeadSelectionPath(newPath); else if (!mod.isLeaf(prev) && e.isShiftDown()) tree.expandPath(newPath); } } // LEFT, KP_LEFT else if (e.getKeyCode() == KeyEvent.VK_LEFT || e.getKeyCode() == KeyEvent.VK_KP_LEFT) { TreePath path = new TreePath(getPathToRoot(last, 0)); Object p = getParent(mod.getRoot(), last); if (!mod.isLeaf(last) && tree.isExpanded(path)) tree.collapsePath(path); else if (p != null) selectPath(tree, new TreePath(getPathToRoot(p, 0))); } // RIGHT, KP_RIGHT else if (e.getKeyCode() == KeyEvent.VK_RIGHT || e.getKeyCode() == KeyEvent.VK_KP_RIGHT) { TreePath path = new TreePath(getPathToRoot(last, 0)); if (!mod.isLeaf(last) && tree.isCollapsed(path)) tree.expandPath(path); else { Object next = getNextVisibleNode(last); if (next != null) selectPath(tree, new TreePath(getPathToRoot(next, 0))); } } // Enter else if (e.getKeyCode() == KeyEvent.VK_ENTER) { TreePath path = new TreePath(getPathToRoot(last, 0)); if (!mod.isLeaf(last)) { if (tree.isExpanded(path)) tree.collapsePath(path); else tree.expandPath(path); } } } }
47947 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47947/b9f1c1a5891dbb61ad52057132d00e73cdf9fb39/BasicTreeUI.java/buggy/javax/swing/plaf/basic/BasicTreeUI.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 498, 24624, 12, 653, 1133, 425, 13, 565, 288, 1377, 4902, 1488, 681, 273, 2151, 18, 588, 1488, 5621, 1377, 4902, 743, 787, 273, 2151, 18, 588, 9678, 6233, 743, 5621, 1377, 10...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 498, 24624, 12, 653, 1133, 425, 13, 565, 288, 1377, 4902, 1488, 681, 273, 2151, 18, 588, 1488, 5621, 1377, 4902, 743, 787, 273, 2151, 18, 588, 9678, 6233, 743, 5621, 1377, 10...
private void initVersionHistories(Iterator iter) throws RepositoryException { // todo centralize version history creation code (currently in NodeImpl.addMixin & ItemImpl.initVersionHistories // walk through list of transient items and // search for new versionable nodes while (iter.hasNext()) { ItemState itemState = (ItemState) iter.next(); if (itemState.isNode() && itemState.getStatus() == ItemState.STATUS_NEW) { NodeImpl node = (NodeImpl) itemMgr.getItem(itemState.getId()); if (node.isNodeType(NodeTypeRegistry.MIX_VERSIONABLE)) { VersionHistory hist = rep.getVersionManager().createVersionHistory(node); node.internalSetProperty(VersionManager.PROPNAME_VERSION_HISTORY, InternalValue.create(new UUID(hist.getUUID()))); node.internalSetProperty(VersionManager.PROPNAME_BASE_VERSION, InternalValue.create(new UUID(hist.getRootVersion().getUUID()))); node.internalSetProperty(VersionManager.PROPNAME_IS_CHECKED_OUT, InternalValue.create(true)); node.internalSetProperty(VersionManager.PROPNAME_PREDECESSORS, new InternalValue[]{InternalValue.create(new UUID(hist.getRootVersion().getUUID()))}); } } } }
49304 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49304/e034de2f86ce8e44c3676aa3a7f76018f0361d70/ItemImpl.java/buggy/src/java/org/apache/jackrabbit/core/ItemImpl.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 1208, 1444, 8648, 2401, 12, 3198, 1400, 13, 1216, 13367, 288, 3639, 368, 10621, 18291, 554, 1177, 4927, 6710, 981, 261, 2972, 715, 316, 2029, 2828, 18, 1289, 14439, 473, 4342, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 1208, 1444, 8648, 2401, 12, 3198, 1400, 13, 1216, 13367, 288, 3639, 368, 10621, 18291, 554, 1177, 4927, 6710, 981, 261, 2972, 715, 316, 2029, 2828, 18, 1289, 14439, 473, 4342, ...
public org.quickfix.field.LastMkt getLastMkt() throws FieldNotFound { org.quickfix.field.LastMkt value = new org.quickfix.field.LastMkt();
public quickfix.field.LastMkt getLastMkt() throws FieldNotFound { quickfix.field.LastMkt value = new quickfix.field.LastMkt();
public org.quickfix.field.LastMkt getLastMkt() throws FieldNotFound { org.quickfix.field.LastMkt value = new org.quickfix.field.LastMkt(); getField(value); return value; }
8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/ExecutionReport.java/buggy/src/java/src/quickfix/fix44/ExecutionReport.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 2358, 18, 19525, 904, 18, 1518, 18, 3024, 49, 8629, 7595, 49, 8629, 1435, 1216, 2286, 2768, 225, 288, 2358, 18, 19525, 904, 18, 1518, 18, 3024, 49, 8629, 460, 273, 394, 2358, 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, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 2358, 18, 19525, 904, 18, 1518, 18, 3024, 49, 8629, 7595, 49, 8629, 1435, 1216, 2286, 2768, 225, 288, 2358, 18, 19525, 904, 18, 1518, 18, 3024, 49, 8629, 460, 273, 394, 2358, 18, ...
n.putProp(Node.ISNUMBER_PROP, new Integer(Node.LEFT));
n.putIntProp(Node.ISNUMBER_PROP, Node.LEFT);
int rewriteForNumberVariables(Node n) { switch (n.getType()) { case TokenStream.POP : { Node child = n.getFirstChild(); int type = rewriteForNumberVariables(child); if (type == TypeEvent.NumberType) n.putProp(Node.ISNUMBER_PROP, new Integer(Node.BOTH)); return TypeEvent.NoType; } case TokenStream.NUMBER : n.putProp(Node.ISNUMBER_PROP, new Integer(Node.BOTH)); return TypeEvent.NumberType; case TokenStream.GETVAR : { OptLocalVariable theVar = (OptLocalVariable)(n.getProp(Node.VARIABLE_PROP)); if (theVar != null) { if (inDirectCallFunction && theVar.isParameter()) { n.putProp(Node.ISNUMBER_PROP, new Integer(Node.BOTH)); return TypeEvent.NumberType; } else if (theVar.isNumber()) { n.putProp(Node.ISNUMBER_PROP, new Integer(Node.BOTH)); return TypeEvent.NumberType; } } return TypeEvent.NoType; } case TokenStream.INC : case TokenStream.DEC : { Node child = n.getFirstChild(); // will be a GETVAR or GETPROP if (child.getType() == TokenStream.GETVAR) { OptLocalVariable theVar = (OptLocalVariable)(child.getProp(Node.VARIABLE_PROP)); if ((theVar != null) && theVar.isNumber()) { n.putProp(Node.ISNUMBER_PROP, new Integer(Node.BOTH)); markDCPNumberContext(child); return TypeEvent.NumberType; } else return TypeEvent.NoType; } else return TypeEvent.NoType; } case TokenStream.SETVAR : { Node lChild = n.getFirstChild(); Node rChild = lChild.getNextSibling(); int rType = rewriteForNumberVariables(rChild); OptLocalVariable theVar = (OptLocalVariable)(n.getProp(Node.VARIABLE_PROP)); if (inDirectCallFunction && theVar.isParameter()) { if (rType == TypeEvent.NumberType) { if (!convertParameter(rChild)) { n.putProp(Node.ISNUMBER_PROP, new Integer(Node.BOTH)); return TypeEvent.NumberType; } markDCPNumberContext(rChild); return TypeEvent.NoType; } else return rType; } else { if ((theVar != null) && theVar.isNumber()) { if (rType != TypeEvent.NumberType) { n.removeChild(rChild); Node newRChild = new Node(TokenStream.CONVERT, rChild); newRChild.putProp(Node.TYPE_PROP, Double.class); n.addChildToBack(newRChild); } n.putProp(Node.ISNUMBER_PROP, new Integer(Node.BOTH)); markDCPNumberContext(rChild); return TypeEvent.NumberType; } else { if (rType == TypeEvent.NumberType) { if (!convertParameter(rChild)) { n.removeChild(rChild); Node newRChild = new Node(TokenStream.CONVERT, rChild); newRChild.putProp(Node.TYPE_PROP, Object.class); n.addChildToBack(newRChild); } } return TypeEvent.NoType; } } } case TokenStream.RELOP : { Node lChild = n.getFirstChild(); Node rChild = lChild.getNextSibling(); int lType = rewriteForNumberVariables(lChild); int rType = rewriteForNumberVariables(rChild); markDCPNumberContext(lChild); markDCPNumberContext(rChild); if ((n.getInt() == TokenStream.INSTANCEOF) || (n.getInt() == TokenStream.IN)) { if (lType == TypeEvent.NumberType) { if (!convertParameter(lChild)) { n.removeChild(lChild); Node nuChild = new Node(TokenStream.CONVERT, lChild); nuChild.putProp(Node.TYPE_PROP, Object.class); n.addChildToFront(nuChild); } } if (rType == TypeEvent.NumberType) { if (!convertParameter(rChild)) { n.removeChild(rChild); Node nuChild = new Node(TokenStream.CONVERT, rChild); nuChild.putProp(Node.TYPE_PROP, Object.class); n.addChildToBack(nuChild); } } } else { if (convertParameter(lChild)) { if (convertParameter(rChild)) { return TypeEvent.NoType; } else { if (rType == TypeEvent.NumberType) { n.putProp(Node.ISNUMBER_PROP, new Integer(Node.RIGHT)); } } } else { if (convertParameter(rChild)) { if (lType == TypeEvent.NumberType) { n.putProp(Node.ISNUMBER_PROP, new Integer(Node.LEFT)); } } else { if (lType == TypeEvent.NumberType) { if (rType == TypeEvent.NumberType) { n.putProp(Node.ISNUMBER_PROP, new Integer(Node.BOTH)); } else { n.putProp(Node.ISNUMBER_PROP, new Integer(Node.LEFT)); } } else { if (rType == TypeEvent.NumberType) { n.putProp(Node.ISNUMBER_PROP, new Integer(Node.RIGHT)); } } } } } // we actually build a boolean value return TypeEvent.NoType; } case TokenStream.ADD : { Node lChild = n.getFirstChild(); Node rChild = lChild.getNextSibling(); int lType = rewriteForNumberVariables(lChild); int rType = rewriteForNumberVariables(rChild); if (convertParameter(lChild)) { if (convertParameter(rChild)) { return TypeEvent.NoType; } else { if (rType == TypeEvent.NumberType) { n.putProp(Node.ISNUMBER_PROP,new Integer(Node.RIGHT)); } } } else { if (convertParameter(rChild)) { if (lType == TypeEvent.NumberType) { n.putProp(Node.ISNUMBER_PROP,new Integer(Node.LEFT)); } } else { if (lType == TypeEvent.NumberType) { if (rType == TypeEvent.NumberType) { n.putProp(Node.ISNUMBER_PROP,new Integer(Node.BOTH)); return TypeEvent.NumberType; } else { n.putProp(Node.ISNUMBER_PROP,new Integer(Node.LEFT)); } } else { if (rType == TypeEvent.NumberType) { n.putProp(Node.ISNUMBER_PROP,new Integer(Node.RIGHT)); } } } } return TypeEvent.NoType; } case TokenStream.BITXOR : case TokenStream.BITOR : case TokenStream.BITAND : case TokenStream.RSH : case TokenStream.LSH : case TokenStream.SUB : case TokenStream.MUL : case TokenStream.DIV : case TokenStream.MOD : { Node lChild = n.getFirstChild(); Node rChild = lChild.getNextSibling(); int lType = rewriteForNumberVariables(lChild); int rType = rewriteForNumberVariables(rChild); markDCPNumberContext(lChild); markDCPNumberContext(rChild); if (lType == TypeEvent.NumberType) { if (rType == TypeEvent.NumberType) { n.putProp(Node.ISNUMBER_PROP, new Integer(Node.BOTH)); return TypeEvent.NumberType; } else { if (!convertParameter(rChild)) { n.removeChild(rChild); Node newRChild = new Node(TokenStream.CONVERT, rChild); newRChild.putProp(Node.TYPE_PROP, Double.class); n.addChildToBack(newRChild); n.putProp(Node.ISNUMBER_PROP, new Integer(Node.BOTH)); } return TypeEvent.NumberType; } } else { if (rType == TypeEvent.NumberType) { if (!convertParameter(lChild)) { n.removeChild(lChild); Node newLChild = new Node(TokenStream.CONVERT, lChild); newLChild.putProp(Node.TYPE_PROP, Double.class); n.addChildToFront(newLChild); n.putProp(Node.ISNUMBER_PROP, new Integer(Node.BOTH)); } return TypeEvent.NumberType; } else { if (!convertParameter(lChild)) { n.removeChild(lChild); Node newLChild = new Node(TokenStream.CONVERT, lChild); newLChild.putProp(Node.TYPE_PROP, Double.class); n.addChildToFront(newLChild); } if (!convertParameter(rChild)) { n.removeChild(rChild); Node newRChild = new Node(TokenStream.CONVERT, rChild); newRChild.putProp(Node.TYPE_PROP, Double.class); n.addChildToBack(newRChild); } n.putProp(Node.ISNUMBER_PROP, new Integer(Node.BOTH)); return TypeEvent.NumberType; } } } case TokenStream.SETELEM : { Node arrayBase = n.getFirstChild(); Node arrayIndex = arrayBase.getNextSibling(); Node rValue = arrayIndex.getNextSibling(); int baseType = rewriteForNumberVariables(arrayBase); if (baseType == TypeEvent.NumberType) {// can never happen ??? if (!convertParameter(arrayBase)) { n.removeChild(arrayBase); Node nuChild = new Node(TokenStream.CONVERT, arrayBase); nuChild.putProp(Node.TYPE_PROP, Object.class); n.addChildToFront(nuChild); } } int indexType = rewriteForNumberVariables(arrayIndex); if (indexType == TypeEvent.NumberType) { // setting the ISNUMBER_PROP signals the codegen // to use the scriptRuntime.setElem that takes // a double index n.putProp(Node.ISNUMBER_PROP, new Integer(Node.LEFT)); markDCPNumberContext(arrayIndex); } int rValueType = rewriteForNumberVariables(rValue); if (rValueType == TypeEvent.NumberType) { if (!convertParameter(rValue)) { n.removeChild(rValue); Node nuChild = new Node(TokenStream.CONVERT, rValue); nuChild.putProp(Node.TYPE_PROP, Object.class); n.addChildToBack(nuChild); } } return TypeEvent.NoType; } case TokenStream.GETELEM : { Node arrayBase = n.getFirstChild(); Node arrayIndex = arrayBase.getNextSibling(); int baseType = rewriteForNumberVariables(arrayBase); if (baseType == TypeEvent.NumberType) {// can never happen ??? if (!convertParameter(arrayBase)) { n.removeChild(arrayBase); Node nuChild = new Node(TokenStream.CONVERT, arrayBase); nuChild.putProp(Node.TYPE_PROP, Object.class); n.addChildToFront(nuChild); } } int indexType = rewriteForNumberVariables(arrayIndex); if (indexType == TypeEvent.NumberType) { // setting the ISNUMBER_PROP signals the codegen // to use the scriptRuntime.getElem that takes // a double index n.putProp(Node.ISNUMBER_PROP, new Integer(Node.RIGHT)); markDCPNumberContext(arrayIndex); } return TypeEvent.NoType; } case TokenStream.CALL : { FunctionNode target = (FunctionNode)n.getProp(Node.DIRECTCALL_PROP); if (target != null) {/* we leave each child as a Number if it can be. The codegen will handle moving the pairs of parameters.*/ Node child = n.getFirstChild(); // the function rewriteForNumberVariables(child); child = child.getNextSibling(); // the 'this' object rewriteForNumberVariables(child); child = child.getNextSibling(); // the first arg while (child != null) { int type = rewriteForNumberVariables(child); if (type == TypeEvent.NumberType) { markDCPNumberContext(child); } child = child.getNextSibling(); } return TypeEvent.NoType; } // else fall thru... } default : { Node child = n.getFirstChild(); while (child != null) { Node nextChild = child.getNextSibling(); int type = rewriteForNumberVariables(child); if (type == TypeEvent.NumberType) { if (!convertParameter(child)) { n.removeChild(child); Node nuChild = new Node(TokenStream.CONVERT, child); nuChild.putProp(Node.TYPE_PROP, Object.class); if (nextChild == null) n.addChildToBack(nuChild); else n.addChildBefore(nuChild, nextChild); } } child = nextChild; } return TypeEvent.NoType; } } }
12376 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12376/f6c346cc7699c007b0b9b27d9c3cdb5446052c64/Optimizer.java/buggy/js/rhino/src/org/mozilla/javascript/optimizer/Optimizer.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 509, 10738, 1290, 1854, 6158, 12, 907, 290, 13, 565, 288, 3639, 1620, 261, 82, 18, 588, 559, 10756, 288, 5411, 648, 3155, 1228, 18, 30374, 294, 288, 10792, 2029, 1151, 273, 290, 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, 509, 10738, 1290, 1854, 6158, 12, 907, 290, 13, 565, 288, 3639, 1620, 261, 82, 18, 588, 559, 10756, 288, 5411, 648, 3155, 1228, 18, 30374, 294, 288, 10792, 2029, 1151, 273, 290, 18, 588...
h += left != null ? leftSize.y : rightSize.y;
if (left != null) { h += right == null ? leftSize.y : Math.max(leftSize.y, rightMinHeight); } else { h += rightSize.y; }
public Point computeSize(int wHint, int hHint, boolean changed) { checkWidget(); boolean showCurve = left != null && right != null; int height = hHint; int width = wHint; Point bottomSize = new Point(0, 0); if (bottom != null) { Point trim = bottom.computeSize(width, SWT.DEFAULT); trim.x = trim.x - width; bottomSize = bottom.computeSize(width == SWT.DEFAULT ? SWT.DEFAULT : width - trim.x, SWT.DEFAULT); if (height != SWT.DEFAULT) { bottomSize.y = Math.min(bottomSize.y, height); height -= bottomSize.y + BORDER_TOP + BORDER_STRIPE + BORDER_BOTTOM; } } if (showCurve && height != SWT.DEFAULT ) height -= BORDER_TOP + BORDER_BOTTOM + 2*BORDER_STRIPE; Point rightSize = new Point(0, 0); if (right != null) { Point trim = right.computeSize(rightWidth, height); trim.x = trim.x - rightWidth; rightSize = right.computeSize(rightWidth == SWT.DEFAULT ? SWT.DEFAULT : rightWidth - trim.x, rightWidth == SWT.DEFAULT ? SWT.DEFAULT : height); if (width != SWT.DEFAULT) { rightSize.x = Math.min(rightSize.x, width); width -= rightSize.x + curve_width - 2* curve_indent; width = Math.max(width, MIN_LEFT); } } Point leftSize = new Point(0, 0); if (left != null) { Point trim = left.computeSize(width, SWT.DEFAULT); trim.x = trim.x - width; leftSize = left.computeSize(width == SWT.DEFAULT ? SWT.DEFAULT : width - trim.x, SWT.DEFAULT); } int w = 0, h = 0; h += bottomSize.y; if (bottom != null && (left != null || right != null)) h += BORDER_TOP + BORDER_BOTTOM + BORDER_STRIPE; w += leftSize.x + rightSize.x; if (showCurve) { w += curve_width - 2*curve_indent; h += BORDER_TOP + BORDER_BOTTOM + 2*BORDER_STRIPE; } h += left != null ? leftSize.y : rightSize.y; if (wHint != SWT.DEFAULT) w = wHint; if (hHint != SWT.DEFAULT) h = hHint; return new Point(w, h);}
12413 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12413/9375eac1060c4091e5442520e7cad843adae6fa9/CBanner.java/buggy/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CBanner.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1071, 4686, 3671, 1225, 12, 474, 341, 7002, 16, 509, 366, 7002, 16, 1250, 3550, 13, 288, 202, 1893, 4609, 5621, 202, 6494, 2405, 9423, 273, 2002, 480, 446, 597, 2145, 480, 446, 31, 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, 1071, 4686, 3671, 1225, 12, 474, 341, 7002, 16, 509, 366, 7002, 16, 1250, 3550, 13, 288, 202, 1893, 4609, 5621, 202, 6494, 2405, 9423, 273, 2002, 480, 446, 597, 2145, 480, 446, 31, 202, 474,...
public Object cloneWithSource(Object source) { return null; }
public Object cloneWithSource(Object source) { return new TreeSelectionEvent (source, paths, areNew, oldLeadSelectionPath, newLeadSelectionPath); }
public Object cloneWithSource(Object source) { return null; // TODO } // cloneWithSource()
45713 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45713/557666b95fa3867d4ba334cba2ac0d92632349f7/TreeSelectionEvent.java/clean/libraries/javalib/javax/swing/event/TreeSelectionEvent.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 1033, 3236, 1190, 1830, 12, 921, 1084, 13, 288, 202, 202, 2463, 446, 31, 368, 2660, 202, 97, 368, 3236, 1190, 1830, 1435, 2, 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, 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, 1033, 3236, 1190, 1830, 12, 921, 1084, 13, 288, 202, 202, 2463, 446, 31, 368, 2660, 202, 97, 368, 3236, 1190, 1830, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -1...
assertNull(space.takeNoWait()); space.put("String1"); } catch (Exception e) {
assertNull(space.takeNoWait()); space.put("String1"); } catch (Exception e) { logger.warn(e); }
public void testTakePut() throws Exception { final UMOSpace space = getSpaceFactory().create("test"); final Latch latch = new Latch(); Thread t = new Thread() { public void run() { try { latch.countDown(); Thread.sleep(200); assertNull(space.takeNoWait()); space.put("String1"); } catch (Exception e) { } } }; t.start(); latch.await(); long t0 = System.currentTimeMillis(); assertNull(space.takeNoWait()); Object o = space.take(); long t1 = System.currentTimeMillis(); t.join(); assertNotNull(o); assertEquals("String1", o); assertNull(space.takeNoWait()); assertTrue(t1 - t0 > 100); space.dispose(); }
28323 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/28323/acdfa287f985955d6c1d34c1dbffc923d3a61a76/AbstractLocalSpaceTestCase.java/buggy/src/test/java/org/mule/impl/space/AbstractLocalSpaceTestCase.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1842, 13391, 6426, 1435, 1216, 1185, 288, 3639, 727, 587, 5980, 3819, 3476, 273, 1322, 909, 1733, 7675, 2640, 2932, 3813, 8863, 3639, 727, 511, 505, 23313, 273, 394, 511, 505, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 13391, 6426, 1435, 1216, 1185, 288, 3639, 727, 587, 5980, 3819, 3476, 273, 1322, 909, 1733, 7675, 2640, 2932, 3813, 8863, 3639, 727, 511, 505, 23313, 273, 394, 511, 505, ...
flushToOutput(true);
if (theos != null) { flushToOutput(true); }
public void close() throws IOException { if(debug) { log.debug("Closing output stream " + agent + " : " + new Date()); } flushToOutput(true); if (ci != null) encryptionService.returnCipher(policy.symmSpec, ci); super.close(); }
12869 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12869/3bb156e6cb0094857d396795cee6930d5bfb1b4a/DataProtectionOutputStream.java/buggy/securityservices/src/org/cougaar/core/security/dataprotection/DataProtectionOutputStream.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 1746, 1435, 1216, 1860, 288, 565, 309, 12, 4148, 13, 288, 1377, 613, 18, 4148, 2932, 15745, 876, 1407, 315, 397, 4040, 397, 315, 294, 315, 397, 394, 2167, 10663, 565, 289, 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, 282, 1071, 918, 1746, 1435, 1216, 1860, 288, 565, 309, 12, 4148, 13, 288, 1377, 613, 18, 4148, 2932, 15745, 876, 1407, 315, 397, 4040, 397, 315, 294, 315, 397, 394, 2167, 10663, 565, 289, 56...
_model.newTestCase(testName, true, true);
_model.newTestCase(testName, false, false);
public void actionPerformed(ActionEvent ae) { String testName = JOptionPane.showInputDialog(MainFrame.this, "Please enter a name for the test class:", "New JUnit Test Case", JOptionPane.QUESTION_MESSAGE); if (testName != null) { String ext = ".java"; if (testName.endsWith(ext)) { testName = testName.substring(0, testName.length() - ext.length()); } _model.newTestCase(testName, true, true); } }
11192 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11192/ba6205cad42ae00df3c37c5cbd4625770848df66/MainFrame.java/clean/drjava/src/edu/rice/cs/drjava/ui/MainFrame.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 26100, 12, 1803, 1133, 14221, 13, 288, 1377, 514, 1842, 461, 273, 804, 1895, 8485, 18, 4500, 1210, 6353, 12, 6376, 3219, 18, 2211, 16, 4766, 10792, 315, 8496, 6103, 279, 508, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 26100, 12, 1803, 1133, 14221, 13, 288, 1377, 514, 1842, 461, 273, 804, 1895, 8485, 18, 4500, 1210, 6353, 12, 6376, 3219, 18, 2211, 16, 4766, 10792, 315, 8496, 6103, 279, 508, ...
System.out.println(tab(n) + "# resolving inheritance for baseType " + baseType); System.out.println(tab(n) + "# - getting complex type " + baseType); System.out.println(tab(n) + "# - read complex type " + hmTypes.get(baseType));
private ArrayList resolveInheritance(ComplexTypeEntry cte, int n) { if (cte.complexContent == null) return cte.alElements; String baseType = cte.complexContent.base; System.out.println(tab(n) + "# resolving inheritance for baseType " + baseType); // RGFIX System.out.println(tab(n) + "# - getting complex type " + baseType); // RGFIX System.out.println(tab(n) + "# - read complex type " + hmTypes.get(baseType)); // RGFIX ComplexTypeEntry baseCTE = (ComplexTypeEntry) hmTypes.get(baseType); System.out.println(tab(n) + "# - baseCTE = " + baseCTE); // RGFIX if (baseCTE == null) throw new IllegalArgumentException("Base type not found for : " + baseType); ArrayList result = new ArrayList(resolveInheritance(baseCTE, n + 1)); ArrayList al = cte.complexContent.alElements; for(int i=0; i<al.size(); i++) result.add(al.get(i)); return result; }
51365 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51365/4777bb92bb3d62130cc5d12eb39ac86879b09162/SchemaLoader.java/clean/src/org/fao/geonet/kernel/schema/SchemaLoader.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 2407, 2245, 28255, 12, 12795, 559, 1622, 276, 736, 16, 509, 290, 13, 202, 95, 202, 202, 430, 261, 299, 73, 18, 14259, 1350, 422, 446, 13, 1082, 202, 2463, 276, 736, 18, 287...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2407, 2245, 28255, 12, 12795, 559, 1622, 276, 736, 16, 509, 290, 13, 202, 95, 202, 202, 430, 261, 299, 73, 18, 14259, 1350, 422, 446, 13, 1082, 202, 2463, 276, 736, 18, 287...
if(tempDir.equals(new File(val))) return;
if(nodeDir.equals(new File(val))) return;
public void set(String val) throws InvalidConfigValueException { if(tempDir.equals(new File(val))) return; // FIXME throw new InvalidConfigValueException("Moving temp directory on the fly not supported at present"); }
8026 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8026/0e73e63698410905555b43e69172b80870e39ae5/Node.java/clean/src/freenet/node/Node.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 4405, 202, 482, 918, 444, 12, 780, 1244, 13, 1216, 1962, 809, 9738, 288, 25083, 202, 430, 12, 5814, 1621, 18, 14963, 12, 2704, 1387, 12, 1125, 20349, 327, 31, 25083, 202, 759, 9852, 25083, 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, 4405, 202, 482, 918, 444, 12, 780, 1244, 13, 1216, 1962, 809, 9738, 288, 25083, 202, 430, 12, 5814, 1621, 18, 14963, 12, 2704, 1387, 12, 1125, 20349, 327, 31, 25083, 202, 759, 9852, 25083, 2...
public void setValue(int iCurrent) { this.iCurrentValue = iCurrent; this.txtValue.setText(String.valueOf(iCurrentValue)); }
public void setValue( int iCurrent ) { this.iCurrentValue = iCurrent; this.txtValue.setText( String.valueOf( iCurrentValue ) ); }
public void setValue(int iCurrent) { this.iCurrentValue = iCurrent; this.txtValue.setText(String.valueOf(iCurrentValue)); }
46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/f1ce4e986ba7ee73c547361498dd010e8e764ca7/IntegerSpinControl.java/buggy/chart/org.eclipse.birt.chart.ui.extension/src/org/eclipse/birt/chart/ui/swt/composites/IntegerSpinControl.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 5524, 12, 474, 277, 3935, 13, 565, 288, 3639, 333, 18, 77, 3935, 620, 273, 277, 3935, 31, 3639, 333, 18, 5830, 620, 18, 542, 1528, 12, 780, 18, 1132, 951, 12, 77, 3935, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 5524, 12, 474, 277, 3935, 13, 565, 288, 3639, 333, 18, 77, 3935, 620, 273, 277, 3935, 31, 3639, 333, 18, 5830, 620, 18, 542, 1528, 12, 780, 18, 1132, 951, 12, 77, 3935, 6...
SetSplitter(DUPLICATE);
SetSplitter(DUPLICATE ());
public void Init() { SetSplitter(DUPLICATE); Add(new Filter() { public void InitIO () { input = new FloatChannel(); output = new FloatChannel(); } public void Work() { float val = input.Pop(); output.Push(val - input.Pop()); } }); Add(new Filter() { public void InitIO () { input = new FloatChannel(); output = new FloatChannel(); } public void Work() { float val = input.Pop(); output.Push(val + input.Pop()); } }); SetJoiner(WEIGHTED_ROUND_ROBIN(N, N)); }});
5955 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5955/ca08101ccba65e529ef4dc89b5600373f939b218/radio.java/buggy/streams/library/radio.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1850, 1071, 918, 4378, 1435, 288, 5411, 1000, 26738, 12, 30387, 26042, 1832, 1769, 5411, 1436, 12, 2704, 4008, 1435, 288, 10402, 1071, 918, 4378, 4294, 1832, 7734, 288, 10402, 810, 273, 394, 545...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1850, 1071, 918, 4378, 1435, 288, 5411, 1000, 26738, 12, 30387, 26042, 1832, 1769, 5411, 1436, 12, 2704, 4008, 1435, 288, 10402, 1071, 918, 4378, 4294, 1832, 7734, 288, 10402, 810, 273, 394, 545...
return TextProcessor.process(getLocationText(element));
return TextProcessor.process(IDEResourceInfoUtils.getLocationText(element));
public Object getPropertyValue(Object name) { if (name.equals(IBasicPropertyConstants.P_TEXT)) { return element.getName(); } if (name.equals(IResourcePropertyConstants.P_PATH_RES)) { return TextProcessor.process(element.getFullPath().toString()); } if (name.equals(IResourcePropertyConstants.P_LAST_MODIFIED_RES)) { return getDateStringValue(element); } if (name.equals(IResourcePropertyConstants.P_EDITABLE_RES)) { if (element.getResourceAttributes().isReadOnly()) { return IDEPropertiesMessages.ResourceProperty_false; } return IDEPropertiesMessages.ResourceProperty_true; } if (name.equals(IResourcePropertyConstants.P_DERIVED_RES)) { return String.valueOf(element.isDerived()); } if (name.equals(IResourcePropertyConstants.P_LINKED_RES)) { return String.valueOf(element.isLinked()); } if (name.equals(IResourcePropertyConstants.P_LOCATION_RES)) { return TextProcessor.process(getLocationText(element)); } if (name.equals(IResourcePropertyConstants.P_RESOLVED_LOCATION_RES)) { return TextProcessor.process(getResolvedLocationText(element)); } return null; }
56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/5690ece9aeb4c7797b943ff9f7d3f5e124ce4981/ResourcePropertySource.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/properties/ResourcePropertySource.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 1033, 21694, 12, 921, 508, 13, 288, 3639, 309, 261, 529, 18, 14963, 12, 45, 8252, 1396, 2918, 18, 52, 67, 5151, 3719, 288, 5411, 327, 930, 18, 17994, 5621, 3639, 289, 3639, 309, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 21694, 12, 921, 508, 13, 288, 3639, 309, 261, 529, 18, 14963, 12, 45, 8252, 1396, 2918, 18, 52, 67, 5151, 3719, 288, 5411, 327, 930, 18, 17994, 5621, 3639, 289, 3639, 309, ...
sb.append( "-alias \"" ); sb.append( alias ); sb.append( "\" " );
cmd.createArg().setValue( "-alias" ); cmd.createArg().setValue( alias );
public void execute() throws TaskException { if( project.getJavaVersion().equals( Project.JAVA_1_1 ) ) { throw new TaskException( "The genkey task is only available on JDK" + " versions 1.2 or greater" ); } if( null == alias ) { throw new TaskException( "alias attribute must be set" ); } if( null == storepass ) { throw new TaskException( "storepass attribute must be set" ); } if( null == dname && null == expandedDname ) { throw new TaskException( "dname must be set" ); } final StringBuffer sb = new StringBuffer(); sb.append( "keytool -genkey " ); if( verbose ) { sb.append( "-v " ); } sb.append( "-alias \"" ); sb.append( alias ); sb.append( "\" " ); if( null != dname ) { sb.append( "-dname \"" ); sb.append( dname ); sb.append( "\" " ); } if( null != expandedDname ) { sb.append( "-dname \"" ); sb.append( expandedDname ); sb.append( "\" " ); } if( null != keystore ) { sb.append( "-keystore \"" ); sb.append( keystore ); sb.append( "\" " ); } if( null != storepass ) { sb.append( "-storepass \"" ); sb.append( storepass ); sb.append( "\" " ); } if( null != storetype ) { sb.append( "-storetype \"" ); sb.append( storetype ); sb.append( "\" " ); } sb.append( "-keypass \"" ); if( null != keypass ) { sb.append( keypass ); } else { sb.append( storepass ); } sb.append( "\" " ); if( null != sigalg ) { sb.append( "-sigalg \"" ); sb.append( sigalg ); sb.append( "\" " ); } if( null != keyalg ) { sb.append( "-keyalg \"" ); sb.append( keyalg ); sb.append( "\" " ); } if( 0 < keysize ) { sb.append( "-keysize \"" ); sb.append( keysize ); sb.append( "\" " ); } if( 0 < validity ) { sb.append( "-validity \"" ); sb.append( validity ); sb.append( "\" " ); } log( "Generating Key for " + alias ); final ExecTask cmd = (ExecTask)project.createTask( "exec" ); cmd.setCommand( new Commandline( sb.toString() ) ); cmd.setFailonerror( true ); cmd.execute(); }
639 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/639/89c618a4ba5166ec11651fd7dc29807eb861650e/GenerateKey.java/clean/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/GenerateKey.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1836, 1435, 3639, 1216, 3837, 503, 565, 288, 3639, 309, 12, 1984, 18, 588, 5852, 1444, 7675, 14963, 12, 5420, 18, 27264, 67, 21, 67, 21, 262, 262, 3639, 288, 5411, 604, 394, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1836, 1435, 3639, 1216, 3837, 503, 565, 288, 3639, 309, 12, 1984, 18, 588, 5852, 1444, 7675, 14963, 12, 5420, 18, 27264, 67, 21, 67, 21, 262, 262, 3639, 288, 5411, 604, 394, ...
for (QName pqname : undeployed) { _odeServer.getBpelServer().unload(pqname, true); }
private void check() { File[] files = _deployDir.listFiles(_fileFilter); // Checking for new deployment directories for (File file : files) { File deployXml = new File(file, "deploy.xml"); File deployedMarker = new File(_deployDir, file.getName() + ".deployed"); if (!deployXml.exists()) { // Skip if deploy.xml is abset __log.debug("Not deploying " + file + " (missing deploy.xml)"); } if (deployedMarker.exists()) { continue; } try { deployedMarker.createNewFile(); } catch (IOException e1) { __log.error("Error creating deployed marker file, " + file + " will not be deployed"); continue; } try { Collection<QName> deployed = _odeServer.getProcessStore().deploy(file); for (QName pqname : deployed) { _odeServer.getBpelServer().load(pqname, true); } __log.info("Deployment of artifact " + file.getName() + " successful."); } catch (Exception e) { __log.error("Deployment of " + file.getName() + " failed, aborting for now.", e); } } // Removing deployments that disappeared String[] deployed = _odeServer.getProcessStore().listDeployedPackages(); for (String s : deployed) { if (s != null) { File deployDir = new File(_deployDir, s); if (!deployDir.exists()) { Collection<QName> undeployed = _odeServer.getProcessStore().undeploy(deployDir); for (QName pqname : undeployed) { _odeServer.getBpelServer().unload(pqname, true); } File marker = new File(_deployDir, s + ".deployed"); marker.delete(); if (undeployed.size() > 0) __log.info("Successfully undeployed " + s); } } } }
45373 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45373/7512124f757dc01ef69acfd5242181679ec0293d/DeploymentPoller.java/clean/axis2/src/main/java/org/apache/ode/axis2/deploy/DeploymentPoller.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 866, 1435, 288, 3639, 1387, 8526, 1390, 273, 389, 12411, 1621, 18, 1098, 2697, 24899, 768, 1586, 1769, 3639, 368, 24471, 364, 394, 6314, 6402, 3639, 364, 261, 812, 585, 294, 13...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 866, 1435, 288, 3639, 1387, 8526, 1390, 273, 389, 12411, 1621, 18, 1098, 2697, 24899, 768, 1586, 1769, 3639, 368, 24471, 364, 394, 6314, 6402, 3639, 364, 261, 812, 585, 294, 13...
int headerHeight = parent.getHeaderHeight (); return new Rectangle (rect.x, rect.y + headerHeight, w [0], rect.height);
return new Rectangle (rect.x, rect.y, w [0], rect.height);
public Rectangle getImageBounds (int index) { checkWidget (); int parentHandle = parent.handle; int column = OS.gtk_tree_view_get_column (parentHandle, index); if (column == 0) return new Rectangle (0, 0, 0, 0); int list = OS.gtk_tree_view_column_get_cell_renderers (column); if (list == 0) return new Rectangle (0, 0, 0, 0); int count = OS.g_list_length (list); int pixbufRenderer = 0, i = 0; while (i < count) { int renderer = OS.g_list_nth_data (list, i); if (OS.GTK_IS_CELL_RENDERER_PIXBUF (renderer)) { pixbufRenderer = renderer; break; } i++; } OS.g_list_free (list); if (pixbufRenderer == 0) return new Rectangle (0, 0, 0, 0); GdkRectangle rect = new GdkRectangle (); int path = OS.gtk_tree_model_get_path (parent.modelHandle, handle); OS.gtk_widget_realize (parentHandle); OS.gtk_tree_view_get_cell_area (parentHandle, path, column, rect); OS.gtk_tree_path_free (path); /* * The OS call gtk_cell_renderer_get_size provides the width of image to be drawn * by the cell renderer. If there is no image in the cell, the width is zero. If the table contains * images of varying widths, gtk_cell_renderer_get_size will return the width of the image, * not the width of the area in which the image is drawn. * New API was added in GTK 2.1.3 for determining the full width of the renderer area. * For earlier versions of GTK, the result is only correct if all rows have images of the same * width. */ int [] w = new int[1]; if (OS.gtk_major_version () * 100 + OS.gtk_minor_version () * 10 + OS.gtk_micro_version () < 213) { OS.gtk_tree_view_column_cell_set_cell_data (column, parent.modelHandle, handle, false, false); OS.gtk_cell_renderer_get_size (pixbufRenderer, parentHandle, null, null, null, w, null); } else { OS.gtk_tree_view_column_cell_get_position (column, pixbufRenderer, null, w); } int headerHeight = parent.getHeaderHeight (); return new Rectangle (rect.x, rect.y + headerHeight, w [0], rect.height);}
12413 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12413/6fa4e7ae92ac0e181f52b7ea81d50f714de9c627/TableItem.java/buggy/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableItem.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1071, 13264, 10567, 5694, 261, 474, 770, 13, 288, 202, 1893, 4609, 261, 1769, 202, 474, 982, 3259, 273, 982, 18, 4110, 31, 202, 474, 1057, 273, 5932, 18, 4521, 79, 67, 3413, 67, 1945, 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, 1071, 13264, 10567, 5694, 261, 474, 770, 13, 288, 202, 1893, 4609, 261, 1769, 202, 474, 982, 3259, 273, 982, 18, 4110, 31, 202, 474, 1057, 273, 5932, 18, 4521, 79, 67, 3413, 67, 1945, 67, ...
public LinkListener( BasicPanel panel ) {
public LinkListener(BasicPanel panel) {
public LinkListener( BasicPanel panel ) { this.panel = panel; }
52947 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52947/0bcb35d367c0f0b2a89eb6aabedfe9807525ad3a/LinkListener.java/buggy/src/java/org/xhtmlrenderer/swing/LinkListener.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 4048, 2223, 12, 8252, 5537, 6594, 13, 288, 3639, 333, 18, 13916, 273, 6594, 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...
[ 1, 1, 1, 1, 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, 377, 1071, 4048, 2223, 12, 8252, 5537, 6594, 13, 288, 3639, 333, 18, 13916, 273, 6594, 31, 565, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
if (player.isAdmin()) {
if (Administration.isPlayerAllowedToExecuteAdminCommand(player, "alter", false)) {
protected void createDialog() { Behaviours.addGreeting(this); Behaviours.addJob(this, "Hehehe! Job! hehehe! Muahahaha!"); Behaviours.addHelp(this, "I can't help you, but you can help Stendhal: tell your friends about Stendhal and help us to create maps."); Behaviours.addGoodbye(this); add(ConversationStates.ATTENDING, Behaviours.QUEST_MESSAGES, null, ConversationStates.ATTENDING, null, new SpeakerNPC.ChatAction() { public void fire(Player player, String text, SpeakerNPC engine) { // randomly select between two different messages switch (Rand.rand(2)) { case 0: say("Ah, quests... just like the old days when I was young! I remember one quest that was about... Oh look, a bird!hmm, what?! Oh, Oops! I forgot it! :("); break; case 1: say("I have been told that on the deepest place of the dungeon under this city someone also buy sheeps, but *it* pays better!"); break; } } }); add(ConversationStates.ATTENDING, "cleanme!", null, ConversationStates.ATTENDING, "What?", new SpeakerNPC.ChatAction() { public void fire(Player player, String text, SpeakerNPC engine) { if (player.isAdmin()) { for (String quest : player.getQuests()) { player.removeQuest(quest); } } else { say("Ummm! No, you clean me! begin with my back!"); player.setHP(player.getHP() - 5); world.modify(player); } } }); }
4438 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4438/3d53a55b550c0719a9e6bea045186fbb1ca09439/Semos.java/buggy/src/games/stendhal/server/maps/Semos.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1875, 202, 1117, 918, 752, 6353, 1435, 288, 9506, 202, 19376, 4390, 18, 1289, 43, 9015, 310, 12, 2211, 1769, 9506, 202, 19376, 4390, 18, 1289, 2278, 12, 2211, 16, 315, 5256, 580, 580, 5, 395...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1875, 202, 1117, 918, 752, 6353, 1435, 288, 9506, 202, 19376, 4390, 18, 1289, 43, 9015, 310, 12, 2211, 1769, 9506, 202, 19376, 4390, 18, 1289, 2278, 12, 2211, 16, 315, 5256, 580, 580, 5, 395...
sb.append(getResolvedType(returnType, declaringType));
sb.append(resolvedType);
public static String createMethodSignature(IMethod iMethod) throws JavaModelException { StringBuffer sb = new StringBuffer(); // Eclipse put class name as constructor name - we change it! if (iMethod.isConstructor()) { sb.append("<init>"); //$NON-NLS-1$ } else { sb.append(iMethod.getElementName()); } if (iMethod.isBinary()) { // iMethod instanceof BinaryMember // binary info should be full qualified return sb.append(iMethod.getSignature()).toString(); } sb.append('('); IType declaringType = iMethod.getDeclaringType(); String[] parameterTypes = iMethod.getParameterTypes(); // doSomething(Lgenerics/DummyForAsmGenerics;)Lgenerics/DummyForAsmGenerics; for (int i = 0; i < parameterTypes.length; i++) { String resolvedType = getResolvedType(parameterTypes[i], declaringType); if(resolvedType != null && resolvedType.length() > 0){ sb.append(resolvedType); } else { // this is a generic type appendGenericType(sb, iMethod, parameterTypes[i]); } } sb.append(')'); // continue here with adding resolved return type String returnType = iMethod.getReturnType(); String resolvedType = getResolvedType(returnType, declaringType); if(resolvedType != null && resolvedType.length() > 0){ sb.append(getResolvedType(returnType, declaringType)); } else { // this is a generic type appendGenericType(sb, iMethod, returnType); } return sb.toString(); }
2697 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2697/0334217d41252d89232eb6277b01e80c4b2a91aa/JdtUtils.java/clean/eclipse/plugin/src/de/loskutov/bco/ui/JdtUtils.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 760, 514, 752, 1305, 5374, 12, 45, 1305, 277, 1305, 13, 3639, 1216, 5110, 1488, 503, 288, 3639, 6674, 2393, 273, 394, 6674, 5621, 3639, 368, 20840, 10472, 1378, 667, 508, 487, 3885,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 514, 752, 1305, 5374, 12, 45, 1305, 277, 1305, 13, 3639, 1216, 5110, 1488, 503, 288, 3639, 6674, 2393, 273, 394, 6674, 5621, 3639, 368, 20840, 10472, 1378, 667, 508, 487, 3885,...
RubyClass rubyTimeClass = runtime.defineClass("Time", runtime.getClasses().getObjectClass());
RubyClass rubyTimeClass = runtime.defineClass("Time", runtime.getObject());
public static RubyClass createTimeClass(Ruby runtime) { RubyClass rubyTimeClass = runtime.defineClass("Time", runtime.getClasses().getObjectClass()); CallbackFactory callbackFactory = runtime.callbackFactory(RubyTime.class); rubyTimeClass.includeModule(runtime.getClasses().getComparableModule()); rubyTimeClass.defineSingletonMethod("new", callbackFactory.getSingletonMethod("s_new")); rubyTimeClass.defineSingletonMethod("now", callbackFactory.getSingletonMethod("s_new")); rubyTimeClass.defineSingletonMethod("at", callbackFactory.getOptSingletonMethod("new_at")); rubyTimeClass.defineSingletonMethod("local", callbackFactory.getOptSingletonMethod("new_local")); rubyTimeClass.defineSingletonMethod("mktime", callbackFactory.getOptSingletonMethod("new_local")); rubyTimeClass.defineSingletonMethod("utc", callbackFactory.getOptSingletonMethod("new_utc")); rubyTimeClass.defineSingletonMethod("gm", callbackFactory.getOptSingletonMethod("new_utc")); rubyTimeClass.defineMethod("<=>", callbackFactory.getMethod("op_cmp", IRubyObject.class)); rubyTimeClass.defineMethod("-", callbackFactory.getMethod("op_minus", IRubyObject.class)); rubyTimeClass.defineMethod("+", callbackFactory.getMethod("op_plus", IRubyObject.class)); rubyTimeClass.defineMethod("sec", callbackFactory.getMethod("sec")); rubyTimeClass.defineMethod("min", callbackFactory.getMethod("min")); rubyTimeClass.defineMethod("hour", callbackFactory.getMethod("hour")); rubyTimeClass.defineMethod("mday", callbackFactory.getMethod("mday")); rubyTimeClass.defineMethod("day", callbackFactory.getMethod("mday")); rubyTimeClass.defineMethod("month", callbackFactory.getMethod("month")); rubyTimeClass.defineMethod("mon", callbackFactory.getMethod("month")); rubyTimeClass.defineMethod("year", callbackFactory.getMethod("year")); rubyTimeClass.defineMethod("wday", callbackFactory.getMethod("wday")); rubyTimeClass.defineMethod("yday", callbackFactory.getMethod("yday")); rubyTimeClass.defineMethod("isdst", callbackFactory.getMethod("isdst")); rubyTimeClass.defineMethod("zone", callbackFactory.getMethod("zone")); rubyTimeClass.defineMethod("to_a", callbackFactory.getMethod("to_a")); rubyTimeClass.defineMethod("to_f", callbackFactory.getMethod("to_f")); rubyTimeClass.defineMethod("asctime", callbackFactory.getMethod("asctime")); rubyTimeClass.defineMethod("ctime", callbackFactory.getMethod("asctime")); rubyTimeClass.defineMethod("to_s", callbackFactory.getMethod("to_s")); rubyTimeClass.defineMethod("inspect", callbackFactory.getMethod("inspect")); rubyTimeClass.defineMethod("strftime", callbackFactory.getMethod("strftime", IRubyObject.class)); rubyTimeClass.defineMethod("usec", callbackFactory.getMethod("usec")); rubyTimeClass.defineMethod("tv_usec", callbackFactory.getMethod("usec")); rubyTimeClass.defineMethod("to_i", callbackFactory.getMethod("to_i")); rubyTimeClass.defineMethod("tv_sec", callbackFactory.getMethod("to_i")); rubyTimeClass.defineMethod("gmtime", callbackFactory.getMethod("gmtime")); rubyTimeClass.defineMethod("utc", callbackFactory.getMethod("gmtime")); rubyTimeClass.defineMethod("gmt?", callbackFactory.getMethod("gmt")); rubyTimeClass.defineMethod("gmtime?", callbackFactory.getMethod("gmt")); rubyTimeClass.defineMethod("utc?", callbackFactory.getMethod("gmt")); rubyTimeClass.defineMethod("localtime", callbackFactory.getMethod("localtime")); rubyTimeClass.defineMethod("hash", callbackFactory.getMethod("hash")); return rubyTimeClass; }
45298 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45298/ca6b16e996ea9af83ce593594b9c69b9364a9924/RubyTime.java/clean/src/org/jruby/RubyTime.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 760, 19817, 797, 752, 950, 797, 12, 54, 10340, 3099, 13, 288, 202, 202, 54, 10340, 797, 22155, 950, 797, 273, 3099, 18, 11255, 797, 2932, 950, 3113, 3099, 18, 588, 921, 10663, 377...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 19817, 797, 752, 950, 797, 12, 54, 10340, 3099, 13, 288, 202, 202, 54, 10340, 797, 22155, 950, 797, 273, 3099, 18, 11255, 797, 2932, 950, 3113, 3099, 18, 588, 921, 10663, 377...
if (person.getNome() != null) { String personName = person.getNome().toLowerCase();
String personName = person.getNome(); if (personName != null) { personName = normalize(personName);
private List<IPerson> getValidPersons(String[] nameWords, List<IPerson> persons) { List<IPerson> persons_ = new ArrayList(); for (IPerson person : persons) { if (person.getNome() != null) { String personName = person.getNome().toLowerCase(); int count = 0; for (int i = 0; i < nameWords.length; i++) { String name_ = nameWords[i].toLowerCase(); if (personName.indexOf(name_) != -1) { count++; } } if (count == nameWords.length) { persons_.add(person); } } } return persons_; }
2645 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2645/751cb6de66ee18ca704e0df02e0bb8fd0a596449/SearchPerson.java/buggy/src/net/sourceforge/fenixedu/applicationTier/Servico/person/SearchPerson.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 987, 32, 2579, 3565, 34, 22574, 8346, 87, 12, 780, 8526, 508, 7363, 16, 987, 32, 2579, 3565, 34, 6175, 87, 13, 288, 3639, 987, 32, 2579, 3565, 34, 6175, 87, 67, 273, 394, 2407, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 987, 32, 2579, 3565, 34, 22574, 8346, 87, 12, 780, 8526, 508, 7363, 16, 987, 32, 2579, 3565, 34, 6175, 87, 13, 288, 3639, 987, 32, 2579, 3565, 34, 6175, 87, 67, 273, 394, 2407, ...
return NAME_SIZE;
return getMaxNameLength();
public int getMaxUserNameLength() throws SQLException { return NAME_SIZE; }
52628 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52628/7c553901d7ab010ad1cb5bf44f9ca2fdae83909a/AbstractJdbc1DatabaseMetaData.java/buggy/src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1DatabaseMetaData.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 509, 7288, 15296, 1782, 1435, 1216, 6483, 202, 95, 202, 202, 2463, 6048, 67, 4574, 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,...
[ 1, 1, 1, 1, 1, 1, 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, 225, 202, 482, 509, 7288, 15296, 1782, 1435, 1216, 6483, 202, 95, 202, 202, 2463, 6048, 67, 4574, 31, 202, 97, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
for (i = idx; sfound && (i - idx) < bbxName.length; i++) { if (bbxName[i - idx] != data.epsFile[i])
for (i = idx; sfound && (i - idx) < BOUNDINGBOX.length; i++) { if (BOUNDINGBOX[i - idx] != data.epsFile[i]) {
private long[] readBBox(EPSImage.EPSData data) { long[] mbbox = null; int idx = 0; byte[] bbxName = "%%BoundingBox: ".getBytes(); boolean found = false; while (!found && (data.epsFile.length > (idx + bbxName.length))) { boolean sfound = true; int i = idx; for (i = idx; sfound && (i - idx) < bbxName.length; i++) { if (bbxName[i - idx] != data.epsFile[i]) sfound = false; } if (sfound) { found = true; idx = i; } else { idx++; } } if (!found) return mbbox; mbbox = new long[4]; idx += readLongString(data, mbbox, 0, idx); idx += readLongString(data, mbbox, 1, idx); idx += readLongString(data, mbbox, 2, idx); idx += readLongString(data, mbbox, 3, idx); return mbbox; }
5268 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5268/4e5fe60cb9134363e50dbd8da5c5e82e3c6e9afc/EPSReader.java/clean/src/org/apache/fop/image/analyser/EPSReader.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 1525, 8526, 855, 30944, 12, 41, 5857, 2040, 18, 41, 5857, 751, 501, 13, 288, 3639, 1525, 8526, 4903, 2147, 273, 446, 31, 3639, 509, 2067, 273, 374, 31, 3639, 1160, 8526, 7129, 92,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1525, 8526, 855, 30944, 12, 41, 5857, 2040, 18, 41, 5857, 751, 501, 13, 288, 3639, 1525, 8526, 4903, 2147, 273, 446, 31, 3639, 509, 2067, 273, 374, 31, 3639, 1160, 8526, 7129, 92,...
public static BugzillaReport getBug(String repositoryUrl, String userName, String password, Proxy proxySettings,
public static RepositoryReport getBug(String repositoryUrl, String userName, String password, Proxy proxySettings,
public static BugzillaReport getBug(String repositoryUrl, String userName, String password, Proxy proxySettings, String characterEncoding, int id) throws IOException, MalformedURLException, LoginException, GeneralSecurityException { BugzillaReport bugReport = new BugzillaReport(id, repositoryUrl); setupExistingBugAttributes(repositoryUrl, bugReport); RepositoryReportFactory reportFactory = RepositoryReportFactory.getInstance(); reportFactory.populateReport(bugReport, repositoryUrl, proxySettings, userName, password, characterEncoding); updateBugAttributeOptions(repositoryUrl, proxySettings, userName, password, bugReport, characterEncoding); addValidOperations(bugReport, userName); return bugReport; }
51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/c717ee49c0ed2bda835a14099a7fa166ec9f5b51/BugzillaRepositoryUtil.java/buggy/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, 760, 16907, 15990, 4820, 2882, 637, 12, 780, 3352, 1489, 16, 514, 12065, 16, 514, 2201, 16, 7659, 2889, 2628, 16, 1082, 202, 780, 3351, 4705, 16, 509, 612, 13, 1216, 1860, 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, 225, 202, 482, 760, 16907, 15990, 4820, 2882, 637, 12, 780, 3352, 1489, 16, 514, 12065, 16, 514, 2201, 16, 7659, 2889, 2628, 16, 1082, 202, 780, 3351, 4705, 16, 509, 612, 13, 1216, 1860, 16,...
for ( int i = 0; i < namesOfCachedSimpleNestedColumns.length; i++) { int j = getColumnIndex( namesOfCachedSimpleNestedColumns[i]); if( j!= INVALID_COLUMN_INDEX ) cachedResultSet[cachedResultSetRowNo][j] = this.nestedColumnUtil.getNestedColumnValue( namesOfCachedSimpleNestedColumns[i], currentRootPath );
for ( int i = 0; i < namesOfCachedSimpleNestedColumns.length; i++ ) { int j = getColumnIndex( namesOfCachedSimpleNestedColumns[i] ); if ( j != INVALID_COLUMN_INDEX ) cachedResultSet[cachedResultSetRowNo][j] = this.nestedColumnUtil.getNestedColumnValue( namesOfCachedSimpleNestedColumns[i], currentRootPath ); }
private void populateNestedXMLDataMappingColumns( String currentRootPath ) { for ( int i = 0; i < namesOfCachedComplexNestedColumns.length; i++) { int j = getColumnIndex( namesOfCachedComplexNestedColumns[i]); if ( j!= INVALID_COLUMN_INDEX) cachedResultSet[cachedResultSetRowNo][j] = this.spNestedQueryHelper.getNestedColumnUtil().getNestedColumnValue(namesOfCachedComplexNestedColumns[i],currentRootPath); } for ( int i = 0; i < namesOfCachedSimpleNestedColumns.length; i++) { int j = getColumnIndex( namesOfCachedSimpleNestedColumns[i]); if( j!= INVALID_COLUMN_INDEX ) cachedResultSet[cachedResultSetRowNo][j] = this.nestedColumnUtil.getNestedColumnValue( namesOfCachedSimpleNestedColumns[i], currentRootPath ); } }
12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/857f08d2976a6c670029ef1e5217acb85d868190/SaxParserConsumer.java/buggy/data/org.eclipse.birt.report.data.oda.xml/src/org/eclipse/birt/report/data/oda/xml/util/SaxParserConsumer.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 918, 6490, 8649, 4201, 751, 3233, 3380, 12, 514, 783, 21302, 262, 202, 95, 202, 202, 1884, 261, 509, 277, 273, 374, 31, 277, 411, 1257, 951, 9839, 12795, 8649, 3380, 18, 2469...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6490, 8649, 4201, 751, 3233, 3380, 12, 514, 783, 21302, 262, 202, 95, 202, 202, 1884, 261, 509, 277, 273, 374, 31, 277, 411, 1257, 951, 9839, 12795, 8649, 3380, 18, 2469...
reportReferenceInfo = needReferenceInfo;
public void parseCompilationUnit( ICompilationUnit unit, boolean needReferenceInfo) { CompilationUnitDeclaration result; boolean old = diet; if (needReferenceInfo) { unknownRefs = new NameReference[10]; unknownRefsCounter = 0; } try { diet = !needReferenceInfo; reportReferenceInfo = needReferenceInfo; CompilationResult compilationUnitResult = new CompilationResult(unit, 0, 0); result = parse(unit, compilationUnitResult); } catch (AbortCompilation e) { } finally { if (scanner.recordLineSeparator) { requestor.acceptLineSeparatorPositions(scanner.lineEnds()); } diet = old; }}
10698 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10698/0ea299ebf767a99b8c60a0e465d456db5539b922/SourceElementParser.java/buggy/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/SourceElementParser.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1071, 918, 1109, 19184, 2802, 12, 202, 45, 19184, 2802, 2836, 16, 225, 202, 6494, 1608, 2404, 966, 13, 288, 202, 19184, 2802, 6094, 563, 31, 202, 6494, 1592, 273, 4314, 278, 31, 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, 1071, 918, 1109, 19184, 2802, 12, 202, 45, 19184, 2802, 2836, 16, 225, 202, 6494, 1608, 2404, 966, 13, 288, 202, 19184, 2802, 6094, 563, 31, 202, 6494, 1592, 273, 4314, 278, 31, 202, 430, 26...
Debug.printStackTrace(be.getNestedException());
Debug.printStackTrace(be.getNestedException() == null ? be : be.getNestedException());
protected boolean suspendBundle(AbstractBundle bundle, boolean lock) { boolean changed = false; if (!bundle.isActive() || bundle.isFragment()) { // if bundle is not active or is a fragment then do nothing. return changed; } try { if (Debug.DEBUG && Debug.DEBUG_GENERAL) { Debug.println("Trying to suspend bundle " + bundle); //$NON-NLS-1$ } bundle.suspend(lock); } catch (BundleException be) { if (Debug.DEBUG && Debug.DEBUG_GENERAL) { Debug.println("Bundle suspend exception: " + be.getMessage()); //$NON-NLS-1$ Debug.printStackTrace(be.getNestedException()); } publishFrameworkEvent(FrameworkEvent.ERROR, bundle, be); } if (!bundle.isActive()) { changed = true; } return (changed); }
2516 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2516/477187c2b9d6fae51a363df141cb1bef906af102/Framework.java/buggy/bundles/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/core/Framework.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1117, 1250, 20413, 3405, 12, 7469, 3405, 3440, 16, 1250, 2176, 13, 288, 202, 202, 6494, 3550, 273, 629, 31, 202, 202, 430, 16051, 9991, 18, 291, 3896, 1435, 747, 3440, 18, 291, 745...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1250, 20413, 3405, 12, 7469, 3405, 3440, 16, 1250, 2176, 13, 288, 202, 202, 6494, 3550, 273, 629, 31, 202, 202, 430, 16051, 9991, 18, 291, 3896, 1435, 747, 3440, 18, 291, 745...
{ return createTriggerAdapter(); }
{ return createTriggerAdapter(); }
public Object caseTrigger(Trigger object) { return createTriggerAdapter(); }
5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/e5c78f0e8317166d02fa384e14c3dd7aa1796f2c/DataAdapterFactory.java/buggy/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/model/data/util/DataAdapterFactory.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 2398, 1071, 1033, 648, 6518, 12, 6518, 733, 13, 5411, 288, 7734, 327, 752, 6518, 4216, 5621, 5411, 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, ...
[ 1, 1, 1, 1, 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, 2398, 1071, 1033, 648, 6518, 12, 6518, 733, 13, 5411, 288, 7734, 327, 752, 6518, 4216, 5621, 5411, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
List ret = new ArrayList();
List<Ability> ret = new ArrayList<Ability>();
protected List getFeatList(PlayerCharacter pc) { List ret = new ArrayList(); ret.addAll(pc.getRealFeatsList()); ret.addAll(pc.featAutoList()); ret.addAll(pc.getVirtualFeatList()); return ret; }
48301 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48301/746f9fbe7d3bb98c609b2f38fbc5ffad4e685726/DFeatAllToken.java/clean/code/src/java/plugin/exporttokens/DFeatAllToken.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1117, 987, 13683, 270, 682, 12, 12148, 7069, 6125, 13, 202, 95, 202, 202, 682, 325, 273, 394, 2407, 5621, 202, 202, 1349, 18, 1289, 1595, 12, 2436, 18, 588, 6955, 2954, 2323, 682, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1117, 987, 13683, 270, 682, 12, 12148, 7069, 6125, 13, 202, 95, 202, 202, 682, 325, 273, 394, 2407, 5621, 202, 202, 1349, 18, 1289, 1595, 12, 2436, 18, 588, 6955, 2954, 2323, 682, ...
if (vmargs != null) result.append(vmargs);
if (vmargs != null) { result.append(vmargs); }
private String buildCommandLine(String workspace) { String property = System.getProperty(PROP_VM); if (property == null) { MessageDialog .openError( window.getShell(), IDEWorkbenchMessages.OpenWorkspaceAction_errorTitle, NLS.bind(IDEWorkbenchMessages.OpenWorkspaceAction_errorMessage, PROP_VM)); return null; } StringBuffer result = new StringBuffer(512); result.append(property); result.append(NEW_LINE); // append the vmargs and commands. Assume that these already end in \n String vmargs = System.getProperty(PROP_VMARGS); if (vmargs != null) result.append(vmargs); // append the rest of the args, replacing or adding -data as required property = System.getProperty(PROP_COMMANDS); if (property == null) { result.append(CMD_DATA); result.append(NEW_LINE); result.append(workspace); result.append(NEW_LINE); } else { // find the index of the arg to replace its value int cmd_data_pos = property.lastIndexOf(CMD_DATA); if (cmd_data_pos != -1) { cmd_data_pos += CMD_DATA.length() + 1; result.append(property.substring(0, cmd_data_pos)); result.append(workspace); result.append(property.substring(property.indexOf('\n', cmd_data_pos))); } else { result.append(CMD_DATA); result.append(NEW_LINE); result.append(workspace); result.append(NEW_LINE); result.append(property); } } // put the vmargs back at the very end (the eclipse.commands property // already contains the -vm arg) if (vmargs != null) { result.append(CMD_VMARGS); result.append(NEW_LINE); result.append(vmargs); } return result.toString(); }
56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/e38d295ea613cf9f08aadb93a84a33d2e91abc5f/OpenWorkspaceAction.java/clean/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/actions/OpenWorkspaceAction.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 514, 1361, 21391, 12, 780, 6003, 13, 288, 3639, 514, 1272, 273, 2332, 18, 588, 1396, 12, 15811, 67, 7397, 1769, 3639, 309, 261, 4468, 422, 446, 13, 288, 5411, 2350, 6353, 10792, 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, 3238, 514, 1361, 21391, 12, 780, 6003, 13, 288, 3639, 514, 1272, 273, 2332, 18, 588, 1396, 12, 15811, 67, 7397, 1769, 3639, 309, 261, 4468, 422, 446, 13, 288, 5411, 2350, 6353, 10792, 2...
public GlobalVariable(VariableDescriptor obj, MIVar v) {
public GlobalVariable(VariableDescriptor obj, MIVarCreate v) {
public GlobalVariable(VariableDescriptor obj, MIVar v) { super(obj, v); }
6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/55872940c2323d2bc6159446d3d36830d34f067c/GlobalVariable.java/buggy/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/GlobalVariable.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 8510, 3092, 12, 3092, 3187, 1081, 16, 20806, 1537, 331, 13, 288, 202, 202, 9565, 12, 2603, 16, 331, 1769, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 8510, 3092, 12, 3092, 3187, 1081, 16, 20806, 1537, 331, 13, 288, 202, 202, 9565, 12, 2603, 16, 331, 1769, 202, 97, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
line = line.substring("PUTFILE:".length());
if(getCHKOnly) { line = line.substring(("GETCHKFILE:").length()); } else { line = line.substring("PUTFILE:".length()); }
private void processLine(BufferedReader reader) throws IOException { String line; try { line = reader.readLine(); } catch (IOException e) { System.err.println("Bye... ("+e+")"); return; } boolean getCHKOnly = false; if(line == null) line = "QUIT"; String uline = line.toUpperCase(); Logger.minor(this, "Command: "+line); if(uline.startsWith("GET:")) { // Should have a key next String key = line.substring("GET:".length()); while(key.length() > 0 && key.charAt(0) == ' ') key = key.substring(1); while(key.length() > 0 && key.charAt(key.length()-1) == ' ') key = key.substring(0, key.length()-2); Logger.normal(this, "Key: "+key); FreenetURI uri; try { uri = new FreenetURI(key); Logger.normal(this, "Key: "+uri); } catch (MalformedURLException e2) { System.out.println("Malformed URI: "+key+" : "+e2); return; } try { FetchResult result = client.fetch(uri); ClientMetadata cm = result.getMetadata(); System.out.println("Content MIME type: "+cm.getMIMEType()); System.out.println("Data:\n"); Bucket data = result.asBucket(); BucketTools.copyTo(data, System.out, Long.MAX_VALUE); System.out.println(); } catch (FetchException e) { System.out.println("Error: "+e.getMessage()); } } else if(uline.startsWith("GETFILE:")) { // Should have a key next String key = line.substring("GETFILE:".length()); while(key.length() > 0 && key.charAt(0) == ' ') key = key.substring(1); while(key.length() > 0 && key.charAt(key.length()-1) == ' ') key = key.substring(0, key.length()-2); Logger.normal(this, "Key: "+key); FreenetURI uri; try { uri = new FreenetURI(key); } catch (MalformedURLException e2) { System.out.println("Malformed URI: "+key+" : "+e2); return; } try { long startTime = System.currentTimeMillis(); FetchResult result = client.fetch(uri); ClientMetadata cm = result.getMetadata(); System.out.println("Content MIME type: "+cm.getMIMEType()); Bucket data = result.asBucket(); // Now calculate filename String fnam = uri.getDocName(); fnam = sanitize(fnam); if(fnam.length() == 0) { fnam = "freenet-download-"+HexUtil.bytesToHex(BucketTools.hash(data), 0, 10); String ext = DefaultMIMETypes.getExtension(cm.getMIMEType()); if(ext != null && !ext.equals("")) fnam += "." + ext; } if(new File(fnam).exists()) { System.out.println("File exists already: "+fnam); fnam = "freenet-"+System.currentTimeMillis()+"-"+fnam; } FileOutputStream fos = null; try { fos = new FileOutputStream(fnam); BucketTools.copyTo(data, fos, Long.MAX_VALUE); fos.close(); System.out.println("Written to "+fnam); } catch (IOException e) { System.out.println("Could not write file: caught "+e); e.printStackTrace(); } finally { if(fos != null) try { fos.close(); } catch (IOException e1) { // Ignore } } long endTime = System.currentTimeMillis(); long sz = data.size(); double rate = 1000.0 * sz / (endTime-startTime); System.out.println("Download rate: "+rate+" bytes / second"); } catch (FetchException e) { System.out.println("Error: "+e.getMessage()); if(e.getMode() == e.SPLITFILE_ERROR && e.errorCodes != null) { System.out.println(e.errorCodes.toVerboseString()); } } } else if(uline.startsWith("QUIT")) { System.out.println("Goodbye."); System.exit(0); } else if(uline.startsWith("PUT:") || (getCHKOnly = uline.startsWith("GETCHK:"))) { // Just insert to local store line = line.substring("PUT:".length()); while(line.length() > 0 && line.charAt(0) == ' ') line = line.substring(1); while(line.length() > 0 && line.charAt(line.length()-1) == ' ') line = line.substring(0, line.length()-2); String content; if(line.length() > 0) { // Single line insert content = line; } else { // Multiple line insert content = readLines(reader, false); } // Insert byte[] data = content.getBytes(); InsertBlock block = new InsertBlock(new ArrayBucket(data), null, FreenetURI.EMPTY_CHK_URI); FreenetURI uri; try { uri = client.insert(block, getCHKOnly); } catch (InserterException e) { System.out.println("Error: "+e.getMessage()); if(e.uri != null) System.out.println("URI would have been: "+e.uri); int mode = e.getMode(); if(mode == InserterException.FATAL_ERRORS_IN_BLOCKS || mode == InserterException.TOO_MANY_RETRIES_IN_BLOCKS) { System.out.println("Splitfile-specific error:\n"+e.errorCodes.toVerboseString()); } return; } System.out.println("URI: "+uri); } else if(uline.startsWith("PUTFILE:") || (getCHKOnly = uline.startsWith("GETCHKFILE:"))) { // Just insert to local store line = line.substring("PUTFILE:".length()); while(line.length() > 0 && line.charAt(0) == ' ') line = line.substring(1); while(line.length() > 0 && line.charAt(line.length()-1) == ' ') line = line.substring(0, line.length()-2); File f = new File(line); System.out.println("Attempting to read file "+line); long startTime = System.currentTimeMillis(); try { if(!(f.exists() && f.canRead())) { throw new FileNotFoundException(); } // Guess MIME type String mimeType = DefaultMIMETypes.guessMIMEType(line); System.out.println("Using MIME type: "+mimeType); FileBucket fb = new FileBucket(f, true, false, false); InsertBlock block = new InsertBlock(fb, new ClientMetadata(mimeType), FreenetURI.EMPTY_CHK_URI); startTime = System.currentTimeMillis(); FreenetURI uri = client.insert(block, getCHKOnly); // FIXME depends on CHK's still being renamable //uri = uri.setDocName(f.getName()); System.out.println("URI: "+uri); long endTime = System.currentTimeMillis(); long sz = f.length(); double rate = 1000.0 * sz / (endTime-startTime); System.out.println("Upload rate: "+rate+" bytes / second"); } catch (FileNotFoundException e1) { System.out.println("File not found"); } catch (InserterException e) { System.out.println("Finished insert but: "+e.getMessage()); if(e.uri != null) { System.out.println("URI would have been: "+e.uri); long endTime = System.currentTimeMillis(); long sz = f.length(); double rate = 1000.0 * sz / (endTime-startTime); System.out.println("Upload rate: "+rate+" bytes / second"); } if(e.errorCodes != null) { System.out.println("Splitfile errors breakdown:"); System.out.println(e.errorCodes.toVerboseString()); } } catch (Throwable t) { System.out.println("Insert threw: "+t); t.printStackTrace(); } } else if(uline.startsWith("STATUS")) { SimpleFieldSet fs = n.exportFieldSet(); System.out.println(fs.toString()); System.out.println(); System.out.println(n.getStatus()); } else if(uline.startsWith("CONNECT:")) { String key = line.substring("CONNECT:".length()); while(key.length() > 0 && key.charAt(0) == ' ') key = key.substring(1); while(key.length() > 0 && key.charAt(key.length()-1) == ' ') key = key.substring(0, key.length()-2); if(key.length() > 0) { // Filename System.out.println("Trying to connect to noderef in "+key); File f = new File(key); System.out.println("Attempting to read file "+key); try { FileInputStream fis = new FileInputStream(key); DataInputStream dis = new DataInputStream(fis); int length = (int)f.length(); byte[] data = new byte[length]; dis.readFully(data); dis.close(); connect(new String(data)); } catch (IOException e) { System.err.println("Could not read file: "+e); e.printStackTrace(System.err); } } else { String content = readLines(reader, true); if(content == null) return; if(content.equals("")) return; connect(content); } } else if(uline.startsWith("NAME:")) { System.out.println("Node name currently: "+n.myName); String key = line.substring("NAME:".length()); while(key.length() > 0 && key.charAt(0) == ' ') key = key.substring(1); while(key.length() > 0 && key.charAt(key.length()-1) == ' ') key = key.substring(0, key.length()-2); System.out.println("New name: "+key); n.setName(key); } else { if(uline.length() > 0) printHeader(); } }
50493 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50493/687cd7df9ca2fc1641aa45031094dae84f5317ea/TextModeClientInterface.java/clean/src/freenet/node/TextModeClientInterface.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 1207, 1670, 12, 17947, 2514, 2949, 13, 1216, 1860, 288, 3639, 514, 980, 31, 3639, 775, 288, 5411, 980, 273, 2949, 18, 896, 1670, 5621, 3639, 289, 1044, 261, 14106, 425, 13, 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, 3238, 918, 1207, 1670, 12, 17947, 2514, 2949, 13, 1216, 1860, 288, 3639, 514, 980, 31, 3639, 775, 288, 5411, 980, 273, 2949, 18, 896, 1670, 5621, 3639, 289, 1044, 261, 14106, 425, 13, 2...
public PatternDescr lhs_exist() throws RecognitionException { PatternDescr d; Token loc=null; PatternDescr column = null; d = null; try { // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:639:17: (loc= 'exists' column= lhs_column ) // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:639:17: loc= 'exists' column= lhs_column { loc=(Token)input.LT(1); match(input,50,FOLLOW_50_in_lhs_exist2133); following.push(FOLLOW_lhs_column_in_lhs_exist2137); column=lhs_column(); following.pop(); d = new ExistsDescr( (ColumnDescr) column ); d.setLocation( loc.getLine(), loc.getCharPositionInLine() ); } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { } return d; }
6736 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6736/98b0281519badd8cb1b48eb12934438a300e99b8/RuleParser.java/clean/drools-compiler/src/main/java/org/drools/lang/RuleParser.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 6830, 16198, 8499, 67, 7398, 1435, 1216, 9539, 288, 6647, 6830, 16198, 302, 31, 3639, 3155, 1515, 33, 2011, 31, 3639, 6830, 16198, 1057, 273, 446, 31, 540, 202, 202, 72, 273, 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, 6830, 16198, 8499, 67, 7398, 1435, 1216, 9539, 288, 6647, 6830, 16198, 302, 31, 3639, 3155, 1515, 33, 2011, 31, 3639, 6830, 16198, 1057, 273, 446, 31, 540, 202, 202, 72, 273, 446, ...
setDatasets( new HashSet( i.eachLinkedDataset( block ))); setAllPixels( new HashSet( i.collectPixels( block ))); setAnnotations( new HashSet( i.collectAnnotations( block )));
setDatasets( makeSet( i.sizeOfDatasetLinks(), i.eachLinkedDataset( block ))); setAllPixels( makeSet( i.sizeOfPixels(), i.collectPixels( block ))); setAnnotations( makeSet( i.sizeOfAnnotations(), i.collectAnnotations( block )));
public void copy(IObject model, ModelMapper mapper) { if (model instanceof Image) { Image i = (Image) model; super.copy(model,mapper); // Details if (i.getDetails() != null){ Details d = i.getDetails(); this.setCreated(mapper.event2timestamp(d.getCreationEvent())); this.setInserted(mapper.event2timestamp(d.getUpdateEvent()));//TODO this.setOwner((ExperimenterData) mapper.findTarget(d.getOwner())); if ( d.getCounts() != null ) { Object annotationCount = d.getCounts().get( Image.ANNOTATIONS ); if ( annotationCount instanceof Integer ) this.setAnnotationCount( (Integer) annotationCount ); Object classificationCount = d.getCounts().get( Image.CATEGORYLINKS ); if ( classificationCount instanceof Integer ) this.setClassificationCount( (Integer) classificationCount ); } } // Fields this.setName(i.getName()); this.setDescription(i.getDescription()); this.setDefaultPixels((PixelsData)mapper.findTarget(i.getDefaultPixels())); // Collections MapperBlock block = new MapperBlock( mapper ); setDatasets( new HashSet( i.eachLinkedDataset( block ))); setAllPixels( new HashSet( i.collectPixels( block ))); setAnnotations( new HashSet( i.collectAnnotations( block ))); } else { throw new IllegalArgumentException("ImageData copies only from Image"); } }
13273 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13273/9638b50efec05ce0b3d19bbef1c149c757b964aa/ImageData.java/buggy/components/shoola-adapter/src/pojos/ImageData.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1610, 12, 45, 921, 938, 16, 3164, 4597, 5815, 13, 288, 377, 202, 430, 261, 2284, 1276, 3421, 13, 288, 1082, 202, 2040, 277, 273, 261, 2040, 13, 938, 31, 5411, 2240, 18, 353...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1610, 12, 45, 921, 938, 16, 3164, 4597, 5815, 13, 288, 377, 202, 430, 261, 2284, 1276, 3421, 13, 288, 1082, 202, 2040, 277, 273, 261, 2040, 13, 938, 31, 5411, 2240, 18, 353...
retval = new SelectionRecord( rectype, size, data );
retval = new SelectionRecord( in );
private static Record createRecord( short rectype, short size, byte[] data ) { Record retval = null; switch ( rectype ) { case ChartRecord.sid: retval = new ChartRecord( rectype, size, data ); break; case ChartFormatRecord.sid: retval = new ChartFormatRecord( rectype, size, data ); break; case SeriesRecord.sid: retval = new SeriesRecord( rectype, size, data ); break; case BeginRecord.sid: retval = new BeginRecord( rectype, size, data ); break; case EndRecord.sid: retval = new EndRecord( rectype, size, data ); break; case BOFRecord.sid: retval = new BOFRecord( rectype, size, data ); break; case InterfaceHdrRecord.sid: retval = new InterfaceHdrRecord( rectype, size, data ); break; case MMSRecord.sid: retval = new MMSRecord( rectype, size, data ); break; case InterfaceEndRecord.sid: retval = new InterfaceEndRecord( rectype, size, data ); break; case WriteAccessRecord.sid: retval = new WriteAccessRecord( rectype, size, data ); break; case CodepageRecord.sid: retval = new CodepageRecord( rectype, size, data ); break; case DSFRecord.sid: retval = new DSFRecord( rectype, size, data ); break; case TabIdRecord.sid: retval = new TabIdRecord( rectype, size, data ); break; case FnGroupCountRecord.sid: retval = new FnGroupCountRecord( rectype, size, data ); break; case WindowProtectRecord.sid: retval = new WindowProtectRecord( rectype, size, data ); break; case ProtectRecord.sid: retval = new ProtectRecord( rectype, size, data ); break; case PasswordRecord.sid: retval = new PasswordRecord( rectype, size, data ); break; case ProtectionRev4Record.sid: retval = new ProtectionRev4Record( rectype, size, data ); break; case PasswordRev4Record.sid: retval = new PasswordRev4Record( rectype, size, data ); break; case WindowOneRecord.sid: retval = new WindowOneRecord( rectype, size, data ); break; case BackupRecord.sid: retval = new BackupRecord( rectype, size, data ); break; case HideObjRecord.sid: retval = new HideObjRecord( rectype, size, data ); break; case DateWindow1904Record.sid: retval = new DateWindow1904Record( rectype, size, data ); break; case PrecisionRecord.sid: retval = new PrecisionRecord( rectype, size, data ); break; case RefreshAllRecord.sid: retval = new RefreshAllRecord( rectype, size, data ); break; case BookBoolRecord.sid: retval = new BookBoolRecord( rectype, size, data ); break; case FontRecord.sid: retval = new FontRecord( rectype, size, data ); break; case FormatRecord.sid: retval = new FormatRecord( rectype, size, data ); break; case ExtendedFormatRecord.sid: retval = new ExtendedFormatRecord( rectype, size, data ); break; case StyleRecord.sid: retval = new StyleRecord( rectype, size, data ); break; case UseSelFSRecord.sid: retval = new UseSelFSRecord( rectype, size, data ); break; case BoundSheetRecord.sid: retval = new BoundSheetRecord( rectype, size, data ); break; case CountryRecord.sid: retval = new CountryRecord( rectype, size, data ); break; case SSTRecord.sid: retval = new SSTRecord( rectype, size, data ); break; case ExtSSTRecord.sid: retval = new ExtSSTRecord( rectype, size, data ); break; case EOFRecord.sid: retval = new EOFRecord( rectype, size, data ); break; case IndexRecord.sid: retval = new IndexRecord( rectype, size, data ); break; case CalcModeRecord.sid: retval = new CalcModeRecord( rectype, size, data ); break; case CalcCountRecord.sid: retval = new CalcCountRecord( rectype, size, data ); break; case RefModeRecord.sid: retval = new RefModeRecord( rectype, size, data ); break; case IterationRecord.sid: retval = new IterationRecord( rectype, size, data ); break; case DeltaRecord.sid: retval = new DeltaRecord( rectype, size, data ); break; case SaveRecalcRecord.sid: retval = new SaveRecalcRecord( rectype, size, data ); break; case PrintHeadersRecord.sid: retval = new PrintHeadersRecord( rectype, size, data ); break; case PrintGridlinesRecord.sid: retval = new PrintGridlinesRecord( rectype, size, data ); break; case GridsetRecord.sid: retval = new GridsetRecord( rectype, size, data ); break; case DrawingGroupRecord.sid: retval = new DrawingGroupRecord( rectype, size, data ); break; case DrawingRecordForBiffViewer.sid: retval = new DrawingRecordForBiffViewer( rectype, size, data ); break; case DrawingSelectionRecord.sid: retval = new DrawingSelectionRecord( rectype, size, data ); break; case GutsRecord.sid: retval = new GutsRecord( rectype, size, data ); break; case DefaultRowHeightRecord.sid: retval = new DefaultRowHeightRecord( rectype, size, data ); break; case WSBoolRecord.sid: retval = new WSBoolRecord( rectype, size, data ); break; case HeaderRecord.sid: retval = new HeaderRecord( rectype, size, data ); break; case FooterRecord.sid: retval = new FooterRecord( rectype, size, data ); break; case HCenterRecord.sid: retval = new HCenterRecord( rectype, size, data ); break; case VCenterRecord.sid: retval = new VCenterRecord( rectype, size, data ); break; case PrintSetupRecord.sid: retval = new PrintSetupRecord( rectype, size, data ); break; case DefaultColWidthRecord.sid: retval = new DefaultColWidthRecord( rectype, size, data ); break; case DimensionsRecord.sid: retval = new DimensionsRecord( rectype, size, data ); break; case RowRecord.sid: retval = new RowRecord( rectype, size, data ); break; case LabelSSTRecord.sid: retval = new LabelSSTRecord( rectype, size, data ); break; case RKRecord.sid: retval = new RKRecord( rectype, size, data ); break; case NumberRecord.sid: retval = new NumberRecord( rectype, size, data ); break; case DBCellRecord.sid: retval = new DBCellRecord( rectype, size, data ); break; case WindowTwoRecord.sid: retval = new WindowTwoRecord( rectype, size, data ); break; case SelectionRecord.sid: retval = new SelectionRecord( rectype, size, data ); break; case ContinueRecord.sid: retval = new ContinueRecord( rectype, size, data ); break; case LabelRecord.sid: retval = new LabelRecord( rectype, size, data ); break; case MulRKRecord.sid: retval = new MulRKRecord( rectype, size, data ); break; case MulBlankRecord.sid: retval = new MulBlankRecord( rectype, size, data ); break; case BlankRecord.sid: retval = new BlankRecord( rectype, size, data ); break; case BoolErrRecord.sid: retval = new BoolErrRecord( rectype, size, data ); break; case ColumnInfoRecord.sid: retval = new ColumnInfoRecord( rectype, size, data ); break; case MergeCellsRecord.sid: retval = new MergeCellsRecord( rectype, size, data ); break; case AreaRecord.sid: retval = new AreaRecord( rectype, size, data ); break; case DataFormatRecord.sid: retval = new DataFormatRecord( rectype, size, data ); break; case BarRecord.sid: retval = new BarRecord( rectype, size, data ); break; case DatRecord.sid: retval = new DatRecord( rectype, size, data ); break; case PlotGrowthRecord.sid: retval = new PlotGrowthRecord( rectype, size, data ); break; case UnitsRecord.sid: retval = new UnitsRecord( rectype, size, data ); break; case FrameRecord.sid: retval = new FrameRecord( rectype, size, data ); break; case ValueRangeRecord.sid: retval = new ValueRangeRecord( rectype, size, data ); break; case SeriesListRecord.sid: retval = new SeriesListRecord( rectype, size, data ); break; case FontBasisRecord.sid: retval = new FontBasisRecord( rectype, size, data ); break; case FontIndexRecord.sid: retval = new FontIndexRecord( rectype, size, data ); break; case LineFormatRecord.sid: retval = new LineFormatRecord( rectype, size, data ); break; case AreaFormatRecord.sid: retval = new AreaFormatRecord( rectype, size, data ); break; case LinkedDataRecord.sid: retval = new LinkedDataRecord( rectype, size, data ); break; case FormulaRecord.sid: retval = new FormulaRecord( rectype, size, data ); break; case SheetPropertiesRecord.sid: retval = new SheetPropertiesRecord( rectype, size, data ); break; case DefaultDataLabelTextPropertiesRecord.sid: retval = new DefaultDataLabelTextPropertiesRecord( rectype, size, data ); break; case TextRecord.sid: retval = new TextRecord( rectype, size, data ); break; case AxisParentRecord.sid: retval = new AxisParentRecord( rectype, size, data ); break; case AxisLineFormatRecord.sid: retval = new AxisLineFormatRecord( rectype, size, data ); break; case SupBookRecord.sid: retval = new SupBookRecord( rectype, size, data ); break; case ExternSheetRecord.sid: retval = new ExternSheetRecord( rectype, size, data ); break; case SCLRecord.sid: retval = new SCLRecord( rectype, size, data ); break; case SeriesToChartGroupRecord.sid: retval = new SeriesToChartGroupRecord( rectype, size, data ); break; case AxisUsedRecord.sid: retval = new AxisUsedRecord( rectype, size, data ); break; case AxisRecord.sid: retval = new AxisRecord( rectype, size, data ); break; case CategorySeriesAxisRecord.sid: retval = new CategorySeriesAxisRecord( rectype, size, data ); break; case AxisOptionsRecord.sid: retval = new AxisOptionsRecord( rectype, size, data ); break; case TickRecord.sid: retval = new TickRecord( rectype, size, data ); break; case SeriesTextRecord.sid: retval = new SeriesTextRecord( rectype, size, data ); break; case ObjectLinkRecord.sid: retval = new ObjectLinkRecord( rectype, size, data ); break; case PlotAreaRecord.sid: retval = new PlotAreaRecord( rectype, size, data ); break; case SeriesIndexRecord.sid: retval = new SeriesIndexRecord( rectype, size, data ); break; case LegendRecord.sid: retval = new LegendRecord( rectype, size, data ); break; case LeftMarginRecord.sid: retval = new LeftMarginRecord( rectype, size, data ); break; case RightMarginRecord.sid: retval = new RightMarginRecord( rectype, size, data ); break; case TopMarginRecord.sid: retval = new TopMarginRecord( rectype, size, data ); break; case BottomMarginRecord.sid: retval = new BottomMarginRecord( rectype, size, data ); break; case PaletteRecord.sid: retval = new PaletteRecord( rectype, size, data ); break; case StringRecord.sid: retval = new StringRecord( rectype, size, data ); break; case NameRecord.sid: retval = new NameRecord( rectype, size, data ); break; case PaneRecord.sid: retval = new PaneRecord( rectype, size, data ); break; case SharedFormulaRecord.sid: retval = new SharedFormulaRecord( rectype, size, data); break; case ObjRecord.sid: retval = new ObjRecord( rectype, size, data); break; case TextObjectRecord.sid: retval = new TextObjectRecord( rectype, size, data); break; case HorizontalPageBreakRecord.sid: retval = new HorizontalPageBreakRecord( rectype, size, data); break; case VerticalPageBreakRecord.sid: retval = new VerticalPageBreakRecord( rectype, size, data); break; default: retval = new UnknownRecord( rectype, size, data ); } return retval; }
509 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/509/ada69333b277a95ccfc608144b991cfd8d1a9d37/BiffViewer.java/clean/src/java/org/apache/poi/hssf/dev/BiffViewer.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 760, 5059, 752, 2115, 12, 3025, 4917, 388, 16, 3025, 963, 16, 4766, 1850, 1160, 8526, 501, 262, 565, 288, 3639, 5059, 5221, 273, 446, 31, 3639, 1620, 261, 4917, 388, 262, 3639, 28...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 760, 5059, 752, 2115, 12, 3025, 4917, 388, 16, 3025, 963, 16, 4766, 1850, 1160, 8526, 501, 262, 565, 288, 3639, 5059, 5221, 273, 446, 31, 3639, 1620, 261, 4917, 388, 262, 3639, 28...
(Stack)threadContext.getClassStack().clone());
threadContext.getRubyClass());
public void visitDefsNode(DefsNode iVisited) { IRubyObject receiver = eval(iVisited.getReceiverNode()); if (runtime.getSafeLevel() >= 4 && !receiver.isTaint()) { throw new SecurityError(runtime, "Insecure; can't define singleton method."); } if (receiver.isFrozen()) { throw new FrozenError(runtime, "object"); } if (! receiver.singletonMethodsAllowed()) { throw new TypeError(runtime, "can't define singleton method \"" + iVisited.getName() + "\" for " + receiver.getType()); } RubyClass rubyClass = receiver.getSingletonClass(); if (runtime.getSafeLevel() >= 4) { ICallable method = (ICallable) rubyClass.getMethods().get(iVisited.getName()); if (method != null) { throw new SecurityError(runtime, "Redefining method prohibited."); } } DefaultMethod newMethod = new DefaultMethod(iVisited.getBodyNode(), (ArgsNode) iVisited.getArgsNode(), Visibility.PUBLIC, (Stack)threadContext.getClassStack().clone()); iVisited.getBodyNode().accept(new CreateJumpTargetVisitor(newMethod)); rubyClass.addMethod(iVisited.getName(), newMethod); receiver.callMethod("singleton_method_added", runtime.newSymbol(iVisited.getName())); result = runtime.getNil(); }
50993 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50993/abfe85d15f992ecf4447b155d177050fe2239c3b/EvaluateVisitor.java/clean/src/org/jruby/evaluator/EvaluateVisitor.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 3757, 14554, 907, 12, 14554, 907, 277, 30019, 13, 288, 3639, 15908, 10340, 921, 5971, 273, 5302, 12, 77, 30019, 18, 588, 12952, 907, 10663, 3639, 309, 261, 9448, 18, 588, 9890,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3757, 14554, 907, 12, 14554, 907, 277, 30019, 13, 288, 3639, 15908, 10340, 921, 5971, 273, 5302, 12, 77, 30019, 18, 588, 12952, 907, 10663, 3639, 309, 261, 9448, 18, 588, 9890,...
MailboxIndex mbidx, int chunkSize) throws ServiceException, IOException {
MailboxIndex mbidx, int chunkSize) throws ServiceException, IOException {
protected void prepare(Mailbox mbx, ZimbraQueryResultsImpl res, MailboxIndex mbidx, int chunkSize) throws ServiceException, IOException { // scale up the chunk size since we are doing an intersection... chunkSize = (chunkSize+1) * 3; mMessageGrouper = new HitGrouper[mQueryOperations.size()]; this.setupResults(mbx, res); for (int i = 0; i < mQueryOperations.size(); i++) { QueryOperation op = (QueryOperation) mQueryOperations.get(i); op.prepare(mbx, res, mbidx, chunkSize); mMessageGrouper[i] = new HitGrouper(op, res.getSortBy()); if (!op.hasNext()) { // // This operation has no terms at all. Since we're an // Intersection query, that means that // this entire query has no results. Sooo, lets release all of // the operations we've already // prepare()d and create a single operation, a // NullQueryOperation below us. // if (mLog.isDebugEnabled()) { mLog.debug("*Dropping out of intersect query since we got to 0 results on execution " + Integer.toString(i + 1) + " out of " + mQueryOperations.size()); } // first, we need to be DONE with all unused query operations.. for (int j = 0; j <= i; j++) { ((QueryOperation) mQueryOperations.get(j)) .doneWithSearchResults(); } mQueryOperations.clear(); mMessageGrouper = new HitGrouper[1]; QueryOperation nullOp = new NullQueryOperation(); addQueryOp(nullOp); mMessageGrouper[0] = new HitGrouper(nullOp, res .getSortBy()); return; } } }
6965 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6965/c7b09e1d7d93702be0f8805764ca6618ea4c165e/IntersectionQueryOperation.java/buggy/ZimbraServer/src/java/com/zimbra/cs/index/IntersectionQueryOperation.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 918, 2911, 12, 30239, 4903, 92, 16, 2285, 381, 15397, 1138, 3447, 2828, 400, 16, 7734, 11542, 2147, 1016, 4903, 3465, 16, 509, 17791, 13, 1216, 16489, 16, 1860, 1171, 288, 3639, 368...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2911, 12, 30239, 4903, 92, 16, 2285, 381, 15397, 1138, 3447, 2828, 400, 16, 7734, 11542, 2147, 1016, 4903, 3465, 16, 509, 17791, 13, 1216, 16489, 16, 1860, 1171, 288, 3639, 368...
return identifiers.get(key);
return userFileIdentifiers.get(key);
private Long getIdentifierForUserFile(String type) { String key = makeKeyForUserFile(type); return identifiers.get(key); }
48076 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48076/c49798ac892fce395e10fd06f084263060c4fd6e/Cache.java/clean/src/web/onClient/hr/fer/zemris/vhdllab/applets/main/Cache.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 3196, 202, 1152, 3407, 9650, 19894, 812, 12, 780, 618, 13, 288, 1082, 202, 780, 498, 273, 1221, 653, 19894, 812, 12, 723, 1769, 1082, 202, 2463, 9863, 18, 588, 12, 856, 1769, 202, 202, 97, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 3196, 202, 1152, 3407, 9650, 19894, 812, 12, 780, 618, 13, 288, 1082, 202, 780, 498, 273, 1221, 653, 19894, 812, 12, 723, 1769, 1082, 202, 2463, 9863, 18, 588, 12, 856, 1769, 202, 202, 97, ...
public FilteredTree(Composite parent, int treeStyle, PatternFilter filter) { super(parent, SWT.NONE); patternFilter = filter; GridLayout layout = new GridLayout(); layout.marginHeight = 0; layout.marginWidth = 0; setLayout(layout); filterParent = new Composite(this, SWT.NONE); GridLayout filterLayout = new GridLayout(); filterLayout.numColumns = 2; filterLayout.marginHeight = 0; filterLayout.marginWidth = 0; filterParent.setLayout(filterLayout); filterParent.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL)); createFilterControl(filterParent); getFilterControl().addKeyListener(new KeyAdapter() { /* * (non-Javadoc) * * @see org.eclipse.swt.events.KeyAdapter#keyReleased(org.eclipse.swt.events.KeyEvent) */ public void keyReleased(KeyEvent e) { if(e.keyCode == SWT.ARROW_DOWN || e.keyCode == SWT.CR) treeViewer.getTree().setFocus(); else textChanged(); } }); GridData data = new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL); getFilterControl().setLayoutData(data); ToolBar toolBar = new ToolBar(filterParent, SWT.FLAT | SWT.HORIZONTAL); filterToolBar = new ToolBarManager(toolBar); createClearText(filterToolBar); filterToolBar.update(false); filterToolBar.getControl().setVisible(false); treeViewer = new TreeViewer(this, treeStyle); data = new GridData(GridData.FILL_BOTH); treeViewer.getControl().setLayoutData(data); treeViewer.addFilter(patternFilter);
public FilteredTree(Composite parent, int treeStyle) { this(parent, treeStyle, new PatternFilter());
public FilteredTree(Composite parent, int treeStyle, PatternFilter filter) { super(parent, SWT.NONE); patternFilter = filter; GridLayout layout = new GridLayout(); layout.marginHeight = 0; layout.marginWidth = 0; setLayout(layout); filterParent = new Composite(this, SWT.NONE); GridLayout filterLayout = new GridLayout(); filterLayout.numColumns = 2; filterLayout.marginHeight = 0; filterLayout.marginWidth = 0; filterParent.setLayout(filterLayout); filterParent.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL)); createFilterControl(filterParent); getFilterControl().addKeyListener(new KeyAdapter() { /* * (non-Javadoc) * * @see org.eclipse.swt.events.KeyAdapter#keyReleased(org.eclipse.swt.events.KeyEvent) */ public void keyReleased(KeyEvent e) { // on a CR we want to transfer focus to the list if(e.keyCode == SWT.ARROW_DOWN || e.keyCode == SWT.CR) treeViewer.getTree().setFocus(); else textChanged(); } }); GridData data = new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL); getFilterControl().setLayoutData(data); ToolBar toolBar = new ToolBar(filterParent, SWT.FLAT | SWT.HORIZONTAL); filterToolBar = new ToolBarManager(toolBar); createClearText(filterToolBar); filterToolBar.update(false); // initially there is no text to clear filterToolBar.getControl().setVisible(false); treeViewer = new TreeViewer(this, treeStyle); data = new GridData(GridData.FILL_BOTH); treeViewer.getControl().setLayoutData(data); treeViewer.addFilter(patternFilter); }
55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/0437213cf2cfde869b98a6f03eea00e0e428d4f2/FilteredTree.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/FilteredTree.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 4008, 329, 2471, 12, 9400, 982, 16, 509, 2151, 2885, 16, 6830, 1586, 1034, 13, 288, 3639, 2240, 12, 2938, 16, 348, 8588, 18, 9826, 1769, 3639, 1936, 1586, 273, 1034, 31, 3639, 714...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4008, 329, 2471, 12, 9400, 982, 16, 509, 2151, 2885, 16, 6830, 1586, 1034, 13, 288, 3639, 2240, 12, 2938, 16, 348, 8588, 18, 9826, 1769, 3639, 1936, 1586, 273, 1034, 31, 3639, 714...
if (getRubyClass() != other.getRubyClass()) { return getRuby().getFalse(); } else { return super.equal(other); } }
if (getRubyClass() != other.getRubyClass()) { return getRuby().getFalse(); } else { return super.equal(other); } }
public RubyBoolean eql(RubyObject other) { if (getRubyClass() != other.getRubyClass()) { return getRuby().getFalse(); } else { return super.equal(other); // +++ rb_equal } }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/e3f72aab20ef1fc8576d8fa6823d9722ed33c55c/RubyNumeric.java/buggy/org/jruby/RubyNumeric.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 19817, 5507, 425, 1217, 12, 54, 10340, 921, 1308, 13, 288, 3639, 309, 261, 588, 54, 10340, 797, 1435, 480, 1308, 18, 588, 54, 10340, 797, 10756, 288, 5411, 327, 4170, 10340, 7675, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 19817, 5507, 425, 1217, 12, 54, 10340, 921, 1308, 13, 288, 3639, 309, 261, 588, 54, 10340, 797, 1435, 480, 1308, 18, 588, 54, 10340, 797, 10756, 288, 5411, 327, 4170, 10340, 7675, ...
return manager.getChildren(inputElement);
return input.getChildren(inputElement);
public Object[] getElements(Object inputElement) { return manager.getChildren(inputElement); }
58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/37b8e551c368c0ea13a0c34840143e15ad8d93db/MarkerTreeContentProvider.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerTreeContentProvider.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 1033, 8526, 8886, 12, 921, 810, 1046, 13, 288, 202, 202, 2463, 3301, 18, 588, 4212, 12, 2630, 1046, 1769, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 1033, 8526, 8886, 12, 921, 810, 1046, 13, 288, 202, 202, 2463, 3301, 18, 588, 4212, 12, 2630, 1046, 1769, 202, 97, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
RunTimeContext rtc = new RunTimeContext( ); rtc.setScriptClassLoader( iscl ); final Chart cmRunTime = (Chart) EcoreUtil.copy( model ); rtc.setLocale( Locale.getDefault( ) ); ChartScriptContext csc = new ChartScriptContext( ); csc.setChartInstance( cmRunTime ); csc.setExternalContext( externalContext ); csc.setLocale( rtc.getLocale( ) ); csc.setLogger( logger ); rtc.setScriptContext( csc ); ScriptHandler sh = new ScriptHandler( ); rtc.setScriptHandler( sh ); sh.setScriptClassLoader( iscl ); try { if ( externalContext != null && externalContext.getScriptable( ) != null ) { sh.init( externalContext.getScriptable( ) ); } else { sh.init( null ); } sh.setRunTimeModel( cmRunTime ); final String sScriptContent = cmRunTime.getScript( ); if ( sScriptContent != null ) { sh.register( sScriptContent ); } } catch ( ChartException sx ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, sx ); } /* * ScriptHandler.callFunction( sh, ScriptHandler.ON_PREPARE, cmRunTime, * rtc.getScriptContext( ) ); */ return rtc;
return prepare( model, externalContext, iscl, ULocale.forLocale( locale ) );
public RunTimeContext prepare( Chart model, IExternalContext externalContext, IScriptClassLoader iscl, Locale locale ) throws ChartException { RunTimeContext rtc = new RunTimeContext( ); rtc.setScriptClassLoader( iscl ); // Update the context with a locale if it is undefined. final Chart cmRunTime = (Chart) EcoreUtil.copy( model ); rtc.setLocale( Locale.getDefault( ) ); ChartScriptContext csc = new ChartScriptContext( ); csc.setChartInstance( cmRunTime ); csc.setExternalContext( externalContext ); csc.setLocale( rtc.getLocale( ) ); csc.setLogger( logger ); rtc.setScriptContext( csc ); ScriptHandler sh = new ScriptHandler( ); rtc.setScriptHandler( sh ); sh.setScriptClassLoader( iscl ); // initialize scripthandler. try { if ( externalContext != null && externalContext.getScriptable( ) != null ) { sh.init( externalContext.getScriptable( ) ); } else { sh.init( null ); } sh.setRunTimeModel( cmRunTime ); final String sScriptContent = cmRunTime.getScript( ); if ( sScriptContent != null ) { sh.register( sScriptContent ); } } catch ( ChartException sx ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, sx ); } // Call the onPrepare script event function. // not supported yet /* * ScriptHandler.callFunction( sh, ScriptHandler.ON_PREPARE, cmRunTime, * rtc.getScriptContext( ) ); */ return rtc; }
46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/ae8909f5c697c610266e491d0af9a02eed14e2e4/Generator.java/buggy/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/factory/Generator.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 1939, 950, 1042, 2911, 12, 14804, 938, 16, 1082, 202, 45, 6841, 1042, 3903, 1042, 16, 467, 3651, 7805, 353, 830, 16, 1082, 202, 3916, 2573, 262, 1216, 14804, 503, 202, 95, 202...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 1939, 950, 1042, 2911, 12, 14804, 938, 16, 1082, 202, 45, 6841, 1042, 3903, 1042, 16, 467, 3651, 7805, 353, 830, 16, 1082, 202, 3916, 2573, 262, 1216, 14804, 503, 202, 95, 202...
ctx.sendEvent(new MuleMessage(msg), endpoint);
ctx.sendEvent(new MuleMessage(msg, ctx.getMessage()), endpoint);
protected void routeException(UMOMessage message, UMOEndpoint failedEndpoint, Throwable t) { UMOEndpoint endpoint = getEndpoint(t); if (endpoint != null) { try { logger.error("Message being processed is: " + (message == null ? "null" : message.toString())); UMOEventContext ctx = RequestContext.getEventContext(); ExceptionMessage msg = null; if (failedEndpoint != null) { msg = new ExceptionMessage(getErrorMessagePayload(message), failedEndpoint, t, ctx); } else { msg = new ExceptionMessage(getErrorMessagePayload(message), t, ctx); } ctx.sendEvent(new MuleMessage(msg), endpoint); if (logger.isDebugEnabled()) { logger.debug("routed Exception message via " + endpoint); } } catch (UMOException e) { logFatal(message, e); } } else { markTransactionForRollback(); } }
28323 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/28323/5ca0e18b8620775bc5a69929f971205864e68bea/AbstractExceptionListener.java/clean/src/java/org/mule/impl/AbstractExceptionListener.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 918, 1946, 503, 12, 2799, 51, 1079, 883, 16, 587, 5980, 3293, 2535, 3293, 16, 4206, 268, 13, 565, 288, 3639, 587, 5980, 3293, 2494, 273, 18563, 12, 88, 1769, 3639, 309, 261, 8003,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1946, 503, 12, 2799, 51, 1079, 883, 16, 587, 5980, 3293, 2535, 3293, 16, 4206, 268, 13, 565, 288, 3639, 587, 5980, 3293, 2494, 273, 18563, 12, 88, 1769, 3639, 309, 261, 8003,...
public synchronized void close() { try { if (connected && socket != null) { socket.close (); //this will cause exceptions when trying to read from //the streams. Better than "nulling" them. if( in_stream != null ) { in_stream.close(); } if( out_stream != null ) { out_stream.close(); } //for testing purposes --openTransports; } connected = false; } catch (IOException ex) { throw to_COMM_FAILURE (ex); } if (logger.isInfoEnabled()) { logger.info("Client-side TCP transport to " + connection_info + " closed."); } }
46355 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46355/b9e614c7400c1367aac9cb543b398e9b6ba1628a/ClientIIOPConnection.java/clean/src/org/jacorb/orb/iiop/ClientIIOPConnection.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 3852, 918, 1746, 1435, 565, 288, 3639, 775, 3639, 288, 5411, 309, 261, 8537, 597, 2987, 480, 446, 13, 5411, 288, 7734, 2987, 18, 4412, 261, 1769, 18701, 368, 2211, 903, 4620, 4798, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 3852, 918, 1746, 1435, 565, 288, 3639, 775, 3639, 288, 5411, 309, 261, 8537, 597, 2987, 480, 446, 13, 5411, 288, 7734, 2987, 18, 4412, 261, 1769, 18701, 368, 2211, 903, 4620, 4798, ...
private void addToZip(File file, ZipOutputStream zos) throws IOException { ZipEntry entry = new ZipEntry(file.getName()); zos.putNextEntry(entry); FileInputStream is = new FileInputStream(file); int size = (int) file.length(); byte[] bytes = new byte[size]; is.read(bytes); is.close(); zos.write(bytes, 0, size); }
49587 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49587/ec2576158a28bfaeeb5879001e3d4802a1e122b1/FileSystemPage.java/buggy/src/fitnesse/wiki/FileSystemPage.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 6459, 1289, 774, 9141, 12, 812, 768, 16, 9141, 4632, 94, 538, 13, 15069, 14106, 202, 95, 202, 202, 9141, 1622, 4099, 33, 2704, 9141, 1622, 12, 768, 18, 17994, 10663, 202, 202...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 6459, 1289, 774, 9141, 12, 812, 768, 16, 9141, 4632, 94, 538, 13, 15069, 14106, 202, 95, 202, 202, 9141, 1622, 4099, 33, 2704, 9141, 1622, 12, 768, 18, 17994, 10663, 202, 202...
Thread t = new Thread(this, "SimpleToadletServer$SocketHandler");
Thread t = new Thread(this, toString());
void start() { Thread t = new Thread(this, "SimpleToadletServer$SocketHandler"); t.setDaemon(true); t.start(); }
48807 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48807/2b5b0f9ce5bcab23a8e654cda8e823d60974c559/SimpleToadletServer.java/clean/src/freenet/clients/http/SimpleToadletServer.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 3196, 202, 6459, 787, 1435, 288, 1082, 202, 3830, 268, 273, 394, 4884, 12, 2211, 16, 315, 5784, 774, 361, 1810, 2081, 8, 4534, 1503, 8863, 1082, 202, 88, 18, 542, 12858, 12, 3767, 1769, 1082...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 3196, 202, 6459, 787, 1435, 288, 1082, 202, 3830, 268, 273, 394, 4884, 12, 2211, 16, 315, 5784, 774, 361, 1810, 2081, 8, 4534, 1503, 8863, 1082, 202, 88, 18, 542, 12858, 12, 3767, 1769, 1082...
break; } case 8:{
break; } case 8: {
public void mousePressed(MouseEvent e) { int col = header.columnAtPoint(e.getPoint()); renderer.setPressedColumn(col); renderer.setSelectedColumn(col); header.repaint(); if (header.getTable().isEditing()) { header.getTable().getCellEditor().stopCellEditing(); } boolean isAscent; if (SortButtonRenderer.UP == renderer.getState(col)) { isAscent = true; } else { isAscent = false; } DownloadRootNode rootNode = ((DownloadRootNode)downloadModel.getRoot()); switch(col){ case 0:{ rootNode.setSortCriteria(DownloadRootNode.SORT_DOWNLOADNAME, isAscent); break; } case 2:{ rootNode.setSortCriteria(DownloadRootNode.SORT_GROESSE, isAscent); break; } case 3:{ rootNode.setSortCriteria(DownloadRootNode.SORT_BEREITS_GELADEN, isAscent); break; } case 4:{ rootNode.setSortCriteria(DownloadRootNode.SORT_GESCHWINDIGKEIT, isAscent); break; } case 5:{ rootNode.setSortCriteria(DownloadRootNode.SORT_RESTZEIT, isAscent); break; } case 6:{ rootNode.setSortCriteria(DownloadRootNode.SORT_PROZENT, isAscent); break; } case 7:{ rootNode.setSortCriteria(DownloadRootNode.SORT_REST_ZU_LADEN, isAscent); break; } case 8:{ rootNode.setSortCriteria(DownloadRootNode.SORT_PWDL, isAscent); break; } default: break; } downloadTable.updateUI(); }
13641 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13641/5f96be0d35e9331531bcb226de3305451f274b97/DownloadPanel.java/buggy/AJClientGUI/src/de/applejuicenet/client/gui/DownloadPanel.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 2398, 1071, 918, 7644, 24624, 12, 9186, 1133, 425, 13, 288, 2868, 509, 645, 273, 1446, 18, 2827, 861, 2148, 12, 73, 18, 588, 2148, 10663, 2868, 5690, 18, 542, 24624, 1494, 12, 1293, 1769, 28...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 2398, 1071, 918, 7644, 24624, 12, 9186, 1133, 425, 13, 288, 2868, 509, 645, 273, 1446, 18, 2827, 861, 2148, 12, 73, 18, 588, 2148, 10663, 2868, 5690, 18, 542, 24624, 1494, 12, 1293, 1769, 28...
if ((n > 0) && !(n + 1 == wdsz) && (local.charAt(n - 1) == 'M')) {
if ((n > 0) && !(n + 1 == wdsz) && (local.charAt(n - 1) == 'M')) {
public String metaphone(String txt) { int mtsz = 0 ; boolean hard = false ; if ((txt == null) || (txt.length() == 0)) { return "" ; } // single character is itself if (txt.length() == 1) { return txt.toUpperCase() ; } char[] inwd = txt.toUpperCase().toCharArray() ; String tmpS ; StringBuffer local = new StringBuffer(40); // manipulate StringBuffer code = new StringBuffer(10) ; // output // handle initial 2 characters exceptions switch(inwd[0]) { case 'K' : case 'G' : case 'P' : /* looking for KN, etc*/ if (inwd[1] == 'N') { local.append(inwd, 1, inwd.length - 1); } else { local.append(inwd); } break; case 'A': /* looking for AE */ if (inwd[1] == 'E') { local.append(inwd, 1, inwd.length - 1); } else { local.append(inwd); } break; case 'W' : /* looking for WR or WH */ if (inwd[1] == 'R') { // WR -> R local.append(inwd, 1, inwd.length - 1); break ; } if (inwd[1] == 'H') { local.append(inwd, 1, inwd.length - 1); local.setCharAt(0, 'W'); // WH -> W } else { local.append(inwd); } break; case 'X' : /* initial X becomes S */ inwd[0] = 'S'; local.append(inwd); break ; default : local.append(inwd); } // now local has working string with initials fixed int wdsz = local.length(); int n = 0 ; while ((mtsz < maxCodeLen) // max code size of 4 works well && (n < wdsz)) { char symb = local.charAt(n) ; // remove duplicate letters except C if ((symb != 'C') && (n > 0) && (local.charAt(n - 1) == symb)) { n++ ; } else { // not dup switch(symb) { case 'A' : case 'E' : case 'I' : case 'O' : case 'U' : if (n == 0) { code.append(symb); mtsz++; } break ; // only use vowel if leading char case 'B' : if ((n > 0) && !(n + 1 == wdsz) // not MB at end of word && (local.charAt(n - 1) == 'M')) { code.append(symb); } else { code.append(symb); } mtsz++; break; case 'C' : // lots of C special cases /* discard if SCI, SCE or SCY */ if ((n > 0) && (local.charAt(n - 1) == 'S') && (n + 1 < wdsz) && (frontv.indexOf(local.charAt(n + 1)) >= 0)) { break ; } tmpS = local.toString(); if (tmpS.indexOf("CIA", n) == n) { // "CIA" -> X code.append('X'); mtsz++; break ; } if ((n + 1 < wdsz) && (frontv.indexOf(local.charAt(n + 1)) >= 0)) { code.append('S'); mtsz++; break ; // CI,CE,CY -> S } if ((n > 0) && (tmpS.indexOf("SCH", n - 1) == n - 1)) { // SCH->sk code.append('K') ; mtsz++; break ; } if (tmpS.indexOf("CH", n) == n) { // detect CH if ((n == 0) && (wdsz >= 3) // CH consonant -> K consonant && (vowels.indexOf(local.charAt(2)) < 0)) { code.append('K'); } else { code.append('X'); // CHvowel -> X } mtsz++; } else { code.append('K'); mtsz++; } break ; case 'D' : if ((n + 2 < wdsz) // DGE DGI DGY -> J && (local.charAt(n + 1) == 'G') && (frontv.indexOf(local.charAt(n + 2)) >= 0)) { code.append('J'); n += 2 ; } else { code.append('T'); } mtsz++; break ; case 'G' : // GH silent at end or before consonant if ((n + 2 == wdsz) && (local.charAt(n + 1) == 'H')) { break; } if ((n + 2 < wdsz) && (local.charAt(n + 1) == 'H') && (vowels.indexOf(local.charAt(n + 2)) < 0)) { break; } tmpS = local.toString(); if ((n > 0) && (tmpS.indexOf("GN", n) == n) || (tmpS.indexOf("GNED", n) == n)) { break; // silent G } if ((n > 0) && (local.charAt(n - 1) == 'G')) { hard = true ; } else { hard = false ; } if ((n + 1 < wdsz) && (frontv.indexOf(local.charAt(n + 1)) >= 0) && (!hard)) { code.append('J'); } else { code.append('K'); } mtsz++; break ; case 'H': if (n + 1 == wdsz) { break ; // terminal H } if ((n > 0) && (varson.indexOf(local.charAt(n - 1)) >= 0)) { break; } if (vowels.indexOf(local.charAt(n + 1)) >= 0) { code.append('H'); mtsz++;// Hvowel } break; case 'F': case 'J' : case 'L' : case 'M': case 'N' : case 'R' : code.append(symb); mtsz++; break; case 'K' : if (n > 0) { // not initial if (local.charAt(n - 1) != 'C') { code.append(symb); } } else { code.append(symb); // initial K } mtsz++ ; break ; case 'P' : if ((n + 1 < wdsz) && (local.charAt(n + 1) == 'H')) { // PH -> F code.append('F'); } else { code.append(symb); } mtsz++; break ; case 'Q' : code.append('K'); mtsz++; break; case 'S' : tmpS = local.toString(); if ((tmpS.indexOf("SH", n) == n) || (tmpS.indexOf("SIO", n) == n) || (tmpS.indexOf("SIA", n) == n)) { code.append('X'); } else { code.append('S'); } mtsz++; break; case 'T' : tmpS = local.toString(); // TIA TIO -> X if ((tmpS.indexOf("TIA", n) == n) || (tmpS.indexOf("TIO", n) == n)) { code.append('X'); mtsz++; break; } if (tmpS.indexOf("TCH", n) == n) { break; } // substitute numeral 0 for TH (resembles theta after all) if (tmpS.indexOf("TH", n) == n) { code.append('0'); } else { code.append('T'); } mtsz++ ; break ; case 'V' : code.append('F'); mtsz++;break ; case 'W' : case 'Y' : // silent if not followed by vowel if ((n + 1 < wdsz) && (vowels.indexOf(local.charAt(n + 1)) >= 0)) { code.append(symb); mtsz++; } break ; case 'X' : code.append('K'); code.append('S');mtsz += 2; break ; case 'Z' : code.append('S'); mtsz++; break ; } // end switch n++ ; } // end else from symb != 'C' if (mtsz > maxCodeLen) { code.setLength(maxCodeLen); } } return code.toString(); }
7890 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7890/1078329ade725b36e3617dd7c6dd7a714810795c/Metaphone.java/buggy/src/java/org/apache/commons/codec/language/Metaphone.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 514, 5100, 16003, 476, 12, 780, 6463, 13, 288, 3639, 509, 312, 3428, 94, 273, 374, 225, 274, 3639, 1250, 7877, 273, 629, 274, 3639, 309, 14015, 5830, 422, 446, 13, 2398, 747, 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, 1071, 514, 5100, 16003, 476, 12, 780, 6463, 13, 288, 3639, 509, 312, 3428, 94, 273, 374, 225, 274, 3639, 1250, 7877, 273, 629, 274, 3639, 309, 14015, 5830, 422, 446, 13, 2398, 747, 261,...
if (conn != null) {
try {
protected void recoverJobs() throws JobPersistenceException { Connection conn = null; boolean transOwner = false; try { conn = getNonManagedTXConnection(); getLockHandler().obtainLock(conn, LOCK_TRIGGER_ACCESS); transOwner = true; //getLockHandler().obtainLock(conn, LOCK_JOB_ACCESS); recoverJobs(conn); conn.commit(); } catch (JobPersistenceException e) { rollbackConnection(conn); throw e; } catch (Exception e) { rollbackConnection(conn); throw new JobPersistenceException("Error recovering jobs: " + e.getMessage(), e); } finally { if (conn != null) { releaseLock(conn, LOCK_TRIGGER_ACCESS, transOwner); closeConnection(conn); } } }
15562 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15562/d057f412939d0a42147cb6cb3d618634fd3b59cd/JobStoreCMT.java/clean/src/java/org/quartz/impl/jdbcjobstore/JobStoreCMT.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 918, 5910, 7276, 1435, 1216, 3956, 13182, 503, 288, 3639, 4050, 1487, 273, 446, 31, 3639, 1250, 906, 5541, 273, 629, 31, 3639, 775, 288, 5411, 1487, 273, 28207, 10055, 16556, 1952, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5910, 7276, 1435, 1216, 3956, 13182, 503, 288, 3639, 4050, 1487, 273, 446, 31, 3639, 1250, 906, 5541, 273, 629, 31, 3639, 775, 288, 5411, 1487, 273, 28207, 10055, 16556, 1952, ...