rem stringlengths 1 226k | add stringlengths 0 227k | context stringlengths 6 326k | meta stringlengths 143 403 | input_ids listlengths 256 256 | attention_mask listlengths 256 256 | labels listlengths 128 128 |
|---|---|---|---|---|---|---|
else columnNamePattern = columnNamePattern.toLowerCase(); | public java.sql.ResultSet getColumnPrivileges(String catalog, String schema, String table, String columnNamePattern) throws SQLException { Field f[] = new Field[8]; Vector v = new Vector(); if (table == null) table = "%"; if (columnNamePattern == null) columnNamePattern = "%"; else columnNamePattern = columnNamePattern.toLowerCase(); f[0] = new Field(connection, "TABLE_CAT", iVarcharOid, getMaxNameLength()); f[1] = new Field(connection, "TABLE_SCHEM", iVarcharOid, getMaxNameLength()); f[2] = new Field(connection, "TABLE_NAME", iVarcharOid, getMaxNameLength()); f[3] = new Field(connection, "COLUMN_NAME", iVarcharOid, getMaxNameLength()); f[4] = new Field(connection, "GRANTOR", iVarcharOid, getMaxNameLength()); f[5] = new Field(connection, "GRANTEE", iVarcharOid, getMaxNameLength()); f[6] = new Field(connection, "PRIVILEGE", iVarcharOid, getMaxNameLength()); f[7] = new Field(connection, "IS_GRANTABLE", iVarcharOid, getMaxNameLength()); String sql; if (connection.haveMinimumServerVersion("7.3")) { sql = "SELECT n.nspname,c.relname,u.usename,c.relacl,a.attname "+ " FROM pg_catalog.pg_namespace n, pg_catalog.pg_class c, pg_catalog.pg_user u, pg_catalog.pg_attribute a "+ " WHERE c.relnamespace = n.oid "+ " AND u.usesysid = c.relowner "+ " AND c.oid = a.attrelid "+ " AND c.relkind = 'r' "+ " AND a.attnum > 0 AND NOT a.attisdropped "; if (schema != null && !"".equals(schema)) { sql += " AND n.nspname = '"+escapeQuotes(schema.toLowerCase())+"' "; } } else { sql = "SELECT NULL::text AS nspname,c.relname,u.usename,c.relacl,a.attname "+ "FROM pg_class c, pg_user u,pg_attribute a "+ " WHERE u.usesysid = c.relowner "+ " AND c.oid = a.attrelid "+ " AND a.attnum > 0 "+ " AND c.relkind = 'r' "; } sql += " AND c.relname = '"+escapeQuotes(table.toLowerCase())+"' "; if (columnNamePattern != null && !"".equals(columnNamePattern)) { sql += " AND a.attname LIKE '"+escapeQuotes(columnNamePattern.toLowerCase())+"' "; } sql += " ORDER BY attname "; ResultSet rs = connection.createStatement().executeQuery(sql); while (rs.next()) { byte schemaName[] = rs.getBytes("nspname"); byte tableName[] = rs.getBytes("relname"); byte column[] = rs.getBytes("attname"); String owner = rs.getString("usename"); String acl = rs.getString("relacl"); Hashtable permissions = parseACL(acl); String permNames[] = new String[permissions.size()]; Enumeration e = permissions.keys(); int i=0; while (e.hasMoreElements()) { permNames[i++] = (String)e.nextElement(); } sortStringArray(permNames); for (i=0; i<permNames.length; i++) { byte[] privilege = permNames[i].getBytes(); Vector grantees = (Vector)permissions.get(permNames[i]); for (int j=0; j<grantees.size(); j++) { String grantee = (String)grantees.elementAt(j); String grantable = owner.equals(grantee) ? "YES" : "NO"; byte[][] tuple = new byte[8][]; tuple[0] = null; tuple[1] = schemaName; tuple[2] = tableName; tuple[3] = column; tuple[4] = owner.getBytes(); tuple[5] = grantee.getBytes(); tuple[6] = privilege; tuple[7] = grantable.getBytes(); v.addElement(tuple); } } } rs.close(); return connection.getResultSet(null, f, v, "OK", 1); } | 45454 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45454/fdf6b4ff936167388fc18276cbcf88c54dd0d3b7/AbstractJdbc1DatabaseMetaData.java/clean/src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1DatabaseMetaData.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2252,
18,
4669,
18,
13198,
6716,
27692,
12,
780,
6222,
16,
514,
1963,
16,
514,
1014,
16,
514,
7578,
3234,
13,
1216,
6483,
202,
95,
202,
202,
974,
284,
8526,
273,
394,
2286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2252,
18,
4669,
18,
13198,
6716,
27692,
12,
780,
6222,
16,
514,
1963,
16,
514,
1014,
16,
514,
7578,
3234,
13,
1216,
6483,
202,
95,
202,
202,
974,
284,
8526,
273,
394,
2286,
... | |
for (Iterator i = threads.iterator(); i.hasNext(); ) { Thread t = (Thread)i.next(); | for (Iterator i = threads.iterator(); i.hasNext();) { Thread t = (Thread) i.next(); | public static void main(String[] args) throws Throwable { if (args.length != 3) { System.err.println("Usage: "); System.err.println(" java org.apache.james.testing.MultiThreadDeliveryPounder <threadcount> <loops> <user>"); System.exit(1); } int threadCount = Integer.parseInt(args[0]); int loops = Integer.parseInt(args[1]); String user = args[2]; Collection threads = new Vector(); long start = System.currentTimeMillis(); for (int i = 0; i < threadCount; i++) { threads.add(new MultiThreadDeliveryPounder(loops, user)); } for (Iterator i = threads.iterator(); i.hasNext(); ) { Thread t = (Thread)i.next(); t.join(); } long end = System.currentTimeMillis(); System.out.println((end - start) + " milliseconds"); } | 47102 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47102/77a98b01b9de83ba1ed24e71826d23297a1de145/MultiThreadDeliveryPounder.java/buggy/trunk/tests/src/java/org/apache/james/testing/MultiThreadDeliveryPounder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
2774,
12,
780,
8526,
833,
13,
1216,
4206,
288,
3639,
309,
261,
1968,
18,
2469,
480,
890,
13,
288,
5411,
2332,
18,
370,
18,
8222,
2932,
5357,
30,
315,
1769,
5411,
2332,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
2774,
12,
780,
8526,
833,
13,
1216,
4206,
288,
3639,
309,
261,
1968,
18,
2469,
480,
890,
13,
288,
5411,
2332,
18,
370,
18,
8222,
2932,
5357,
30,
315,
1769,
5411,
2332,
... |
boolean containers, | boolean collections, | public static List harvest(Context context, DSpaceObject scope, String startDate, String endDate, int offset, int limit, boolean items, boolean containers, boolean withdrawn) throws SQLException { // SQL to add to the list of tables after the SELECT String scopeTableSQL = ""; // SQL to add to the WHERE clause of the query String scopeWhereSQL = ""; if (scope != null) { if (scope.getType() == Constants.COMMUNITY) { // Getting things within a community scopeTableSQL = ", community2item"; scopeWhereSQL = " AND community2item.community_id=" + scope.getID() + " AND community2item.item_id=handle.resource_id"; } else if (scope.getType() == Constants.COLLECTION) { scopeTableSQL = ", collection2item"; scopeWhereSQL = " AND collection2item.collection_id=" + scope.getID() + " AND collection2item.item_id=handle.resource_id"; } // Theoretically, no other possibilities, won't bother to check } // Put together our query. Note there is no need for an // "in_archive=true" condition, we are using the existence of // Handles as our 'existence criterion'. String query = "SELECT handle.handle, handle.resource_id, item.withdrawn, item.last_modified FROM handle, item" + scopeTableSQL + " WHERE handle.resource_type_id=" + Constants.ITEM + " AND handle.resource_id=item.item_id" + scopeWhereSQL; if (startDate != null) { query = query + " AND item.last_modified >= '" + startDate + "'"; } if (endDate != null) { query = query + " AND item.last_modified <= '" + endDate + "'"; } if (withdrawn = false) { // Exclude withdrawn items query = query + " AND withdrawn=false"; } // Order by item ID, so that for a given harvest the order will be // consistent. This is so that big harvests can be broken up into // several smaller operations (e.g. for OAI resumption tokens.) query = query + " ORDER BY handle.resource_id"; log.debug(LogManager.getHeader(context, "harvest SQL", query)); // Execute TableRowIterator tri = DatabaseManager.query(context, query); List infoObjects = new LinkedList(); int index = 0; // Process results of query into HarvestedItemInfo objects while (tri.hasNext()) { TableRow row = tri.next(); /* * This conditional ensures that we only process items within * any constraints specified by 'offset' and 'limit' parameters. */ if (index >= offset && (limit == 0 || index < offset + limit)) { HarvestedItemInfo itemInfo = new HarvestedItemInfo(); itemInfo.handle = row.getStringColumn("handle"); itemInfo.itemID = row.getIntColumn("resource_id"); // Put datestamp in ISO8601 itemInfo.datestamp = row.getDateColumn("last_modified"); itemInfo.withdrawn = row.getBooleanColumn("withdrawn"); if (containers) { fillContainers(context, itemInfo); } if (items) { // Get the item itemInfo.item = Item.find(context, itemInfo.itemID); } infoObjects.add(itemInfo); } index++; } return infoObjects; } | 1868 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1868/564aa767ae3958fb227322d346195962712ce24e/Harvest.java/clean/dspace/src/org/dspace/search/Harvest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
987,
17895,
26923,
12,
1042,
819,
16,
3639,
463,
3819,
921,
2146,
16,
3639,
514,
12572,
16,
3639,
514,
13202,
16,
3639,
509,
1384,
16,
3639,
509,
1800,
16,
3639,
1250,
1516,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
987,
17895,
26923,
12,
1042,
819,
16,
3639,
463,
3819,
921,
2146,
16,
3639,
514,
12572,
16,
3639,
514,
13202,
16,
3639,
509,
1384,
16,
3639,
509,
1800,
16,
3639,
1250,
1516,
... |
(PsiLocalVariable) iterator.next(); | (PsiLocalVariable) declaredVar; | private static boolean containsConflictingDeclarations(PsiCodeBlock block, PsiCodeBlock parentBlock){ final PsiStatement[] statements = block.getStatements(); if(statements == null){ return false; } final Set declaredVars = new HashSet(); for(int i = 0; i < statements.length; i++){ final PsiStatement statement = statements[i]; if(statement instanceof PsiDeclarationStatement){ final PsiDeclarationStatement declaration = (PsiDeclarationStatement) statement; final PsiElement[] vars = declaration.getDeclaredElements(); for(int j = 0; j < vars.length; j++){ if(vars[j] instanceof PsiLocalVariable){ declaredVars.add(vars[j]); } } } } for(Iterator iterator = declaredVars.iterator(); iterator.hasNext();){ final PsiLocalVariable variable = (PsiLocalVariable) iterator.next(); final String variableName = variable.getName(); if(conflictingDeclarationExists(variableName, parentBlock, block)){ return true; } } return false; } | 56598 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56598/2d46d291193579a7564649b4881c7ea8e02eda5b/UnnecessaryBlockStatementInspection.java/clean/plugins/InspectionGadgets/src/com/siyeh/ig/verbose/UnnecessaryBlockStatementInspection.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
3238,
760,
1250,
1914,
10732,
310,
21408,
12,
52,
7722,
1085,
1768,
1203,
16,
4766,
1171,
9079,
453,
7722,
1085,
1768,
982,
1768,
15329,
5411,
727,
453,
7722,
3406,
8526,
6317,
273,
1203,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3238,
760,
1250,
1914,
10732,
310,
21408,
12,
52,
7722,
1085,
1768,
1203,
16,
4766,
1171,
9079,
453,
7722,
1085,
1768,
982,
1768,
15329,
5411,
727,
453,
7722,
3406,
8526,
6317,
273,
1203,
... |
Iterator iter = rsets.iterator( ); | public Object get( String name, Scriptable start ) { if ( "_outer".equals( name ) ) { LinkedList outRsets = new LinkedList( ); outRsets.addAll( rsets ); if ( outRsets != null ) { outRsets.removeFirst( ); } return new NativeRowObject( start, outRsets ); } Iterator iter = rsets.iterator( ); if ( "__rownum".equals( name ) ) { if ( iter.hasNext( ) ) { IResultSet rset = (IResultSet) iter.next( ); return new Long( rset.getCurrentPosition( ) ); } } else { //now only find the expression in the current resultSet. //while ( iter.hasNext( ) ) //{ IResultSet rset = (IResultSet) iter.next( ); try { return rset.getValue( name ); } catch ( BirtException ex ) { throw new EvaluatorException( ex.toString( ) ); } //} } throw new EvaluatorException("Can't find the column: " + name); } | 5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/7ea04b5ec88d061ddc98e46e17cf573f0439a4b7/NativeRowObject.java/buggy/engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/data/dte/NativeRowObject.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1033,
336,
12,
514,
508,
16,
22780,
787,
262,
202,
95,
202,
202,
430,
261,
4192,
14068,
9654,
14963,
12,
508,
262,
262,
202,
202,
95,
1082,
202,
13174,
682,
596,
54,
4424,
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,
1033,
336,
12,
514,
508,
16,
22780,
787,
262,
202,
95,
202,
202,
430,
261,
4192,
14068,
9654,
14963,
12,
508,
262,
262,
202,
202,
95,
1082,
202,
13174,
682,
596,
54,
4424,
2... | |
rowPath, rowPathForInsert, | rowPath, rowPathForInsert, | public JXPathBindingBase buildBinding(Element bindingElm, JXPathBindingManager.Assistant assistant) throws BindingException { if (bindingElm.hasAttribute("unique-row-id")) { throw new BindingException("Attribute 'unique-row-id' is no more supported, use <fb:identity> instead", LocationAttributes.getLocation(bindingElm)); } if (bindingElm.hasAttribute("unique-path")) { throw new BindingException("Attribute 'unique-path' is no more supported, use <fb:identity> instead", LocationAttributes.getLocation(bindingElm)); } try { CommonAttributes commonAtts = JXPathBindingBuilderBase.getCommonAttributes(bindingElm); String repeaterId = DomHelper.getAttribute(bindingElm, "id", null); String parentPath = DomHelper.getAttribute(bindingElm, "parent-path", null); String rowPath = DomHelper.getAttribute(bindingElm, "row-path", null); String rowPathForInsert = DomHelper.getAttribute(bindingElm, "row-path-insert", rowPath); // do inheritance RepeaterJXPathBinding otherBinding = (RepeaterJXPathBinding)assistant.getContext().getSuperBinding(); JXPathBindingBase[] existingOnBind = null; JXPathBindingBase[] existingOnDelete = null; JXPathBindingBase[] existingOnInsert = null; JXPathBindingBase[] existingIdentity = null; if(otherBinding!=null) { commonAtts = JXPathBindingBuilderBase.mergeCommonAttributes(otherBinding.getCommonAtts(),commonAtts); if(repeaterId==null) repeaterId = otherBinding.getId(); if(parentPath==null) parentPath = otherBinding.getRepeaterPath(); if(rowPath==null) rowPath = otherBinding.getRowPath(); if(rowPathForInsert==null) rowPathForInsert = otherBinding.getInsertRowPath(); if(otherBinding.getRowBinding() != null) existingOnBind = otherBinding.getRowBinding().getChildBindings(); if(otherBinding.getDeleteRowBinding() != null) existingOnDelete = otherBinding.getDeleteRowBinding().getChildBindings(); if(otherBinding.getIdentityBinding() != null) existingIdentity = otherBinding.getIdentityBinding().getChildBindings(); if(otherBinding.getInsertRowBinding() != null) existingOnInsert = new JXPathBindingBase[] { otherBinding.getInsertRowBinding() }; } // Simple mode will be used if no fb:identity, fb:on-bind, fb:on-delete-row, fb:on-insert-row exists. // in that case, the children of fb:repeater will be used as child bindings boolean simpleMode = true; Element childWrapElement = DomHelper.getChildElement(bindingElm, BindingManager.NAMESPACE, "on-bind"); if (childWrapElement != null) simpleMode = false; JXPathBindingBase[] childBindings = assistant.makeChildBindings(childWrapElement,existingOnBind); if(childBindings == null) childBindings = existingOnBind; Element deleteWrapElement = DomHelper.getChildElement(bindingElm, BindingManager.NAMESPACE, "on-delete-row"); if (deleteWrapElement != null) simpleMode = false; JXPathBindingBase[] deleteBindings = null; if (deleteWrapElement != null) { deleteBindings = assistant.makeChildBindings(deleteWrapElement,existingOnDelete); if(deleteBindings == null) deleteBindings = existingOnDelete; } Element insertWrapElement = DomHelper.getChildElement(bindingElm, BindingManager.NAMESPACE, "on-insert-row"); if (insertWrapElement != null) simpleMode = false; JXPathBindingBase insertBinding = null; if (insertWrapElement != null) { insertBinding = assistant.makeChildBindings(insertWrapElement,existingOnInsert)[0]; // TODO: we now safely take only the first element here, // but we should in fact send out a warning to the log // if more were available! if(insertBinding == null && existingOnInsert != null) insertBinding = existingOnInsert[0]; } Element identityWrapElement = DomHelper.getChildElement(bindingElm, BindingManager.NAMESPACE, "identity"); if (identityWrapElement != null) simpleMode = false; JXPathBindingBase[] identityBinding = null; if (identityWrapElement != null) { // TODO: we can only handle ValueJXPathBinding at the moment: // http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=107906438632484&w=4 identityBinding = assistant.makeChildBindings(identityWrapElement,existingIdentity); if (identityBinding != null) { for (int i = 0; i < identityBinding.length;i++) { if (!(identityBinding[i] instanceof ValueJXPathBinding)) { throw new BindingException("Error building repeater binding defined at " + DomHelper.getLocation(bindingElm) + ": Only value binding (i.e. fb:value) " + "can be used inside fb:identity at the moment. You can read " + "http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=107906438632484&w=4" + " if you want to know more on this."); } } } else { identityBinding = existingIdentity; } } if (simpleMode) { // Use the children of the current element childBindings = assistant.makeChildBindings(bindingElm,existingOnBind); } RepeaterJXPathBinding repeaterBinding = new RepeaterJXPathBinding(commonAtts, repeaterId, parentPath, rowPath, rowPathForInsert, childBindings, insertBinding, deleteBindings, identityBinding); return repeaterBinding; } catch (BindingException e) { throw e; } catch (Exception e) { throw new BindingException( "Error building repeater binding defined at " + DomHelper.getLocation(bindingElm), e); } } | 46428 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46428/1f14e3a741fdf21f099391190df8bf5d42c62480/RepeaterJXPathBindingBuilder.java/buggy/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/RepeaterJXPathBindingBuilder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
804,
14124,
5250,
2171,
1361,
5250,
12,
1046,
5085,
28439,
16,
5411,
804,
14124,
5250,
1318,
18,
2610,
17175,
28779,
13,
1216,
15689,
503,
288,
7734,
309,
261,
7374,
28439,
18,
5332,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
804,
14124,
5250,
2171,
1361,
5250,
12,
1046,
5085,
28439,
16,
5411,
804,
14124,
5250,
1318,
18,
2610,
17175,
28779,
13,
1216,
15689,
503,
288,
7734,
309,
261,
7374,
28439,
18,
5332,
... |
Cell.createMountPoint( cell.getCellHandle(), directory, getName(), readWrite, false ); | createMountPoint(directory, true); | public void createMountPoint( String directory, boolean readWrite ) throws AFSException { Cell.createMountPoint( cell.getCellHandle(), directory, getName(), readWrite, false ); } | 9493 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9493/2a4a4f417dd4193df9e0a3deae14aacd3f94ccb1/Volume.java/buggy/src/JAVA/classes/org/openafs/jafs/Volume.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
752,
8725,
2148,
12,
514,
1867,
16,
1250,
855,
3067,
262,
377,
1216,
432,
4931,
503,
225,
288,
565,
8614,
18,
2640,
8725,
2148,
12,
2484,
18,
588,
4020,
3259,
9334,
1867,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
752,
8725,
2148,
12,
514,
1867,
16,
1250,
855,
3067,
262,
377,
1216,
432,
4931,
503,
225,
288,
565,
8614,
18,
2640,
8725,
2148,
12,
2484,
18,
588,
4020,
3259,
9334,
1867,
16,... |
eNotify(new ENotificationImpl(this, Notification.SET, LayoutPackage.LEGEND__VERTICAL_SPACING, oldVerticalSpacing, verticalSpacing, !oldVerticalSpacingESet)); | eNotify(new ENotificationImpl(this, Notification.SET, LayoutPackage.LEGEND__VERTICAL_SPACING, oldVerticalSpacing, verticalSpacing, !oldVerticalSpacingESet)); | public void setVerticalSpacing(int newVerticalSpacing) { int oldVerticalSpacing = verticalSpacing; verticalSpacing = newVerticalSpacing; boolean oldVerticalSpacingESet = verticalSpacingESet; verticalSpacingESet = true; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, LayoutPackage.LEGEND__VERTICAL_SPACING, oldVerticalSpacing, verticalSpacing, !oldVerticalSpacingESet)); } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/e5c78f0e8317166d02fa384e14c3dd7aa1796f2c/LegendImpl.java/clean/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/model/layout/impl/LegendImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
444,
15704,
18006,
12,
474,
394,
15704,
18006,
13,
565,
288,
3639,
509,
1592,
15704,
18006,
273,
9768,
18006,
31,
3639,
9768,
18006,
273,
394,
15704,
18006,
31,
3639,
1250,
1592,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
444,
15704,
18006,
12,
474,
394,
15704,
18006,
13,
565,
288,
3639,
509,
1592,
15704,
18006,
273,
9768,
18006,
31,
3639,
9768,
18006,
273,
394,
15704,
18006,
31,
3639,
1250,
1592,... |
if ( value == null ) | if ( value == null || value.length() == 0 ) | protected void serializeElement( Element elem ) { Attr attr; NamedNodeMap attrMap; int i; Node child; ElementState state; boolean preserveSpace; String name; String value; String tagName; tagName = elem.getTagName(); state = getElementState(); if ( state == null ) { // If this is the root element handle it differently. // If the first root element in the document, serialize // the document's DOCTYPE. Space preserving defaults // to that of the output format. if ( ! _started ) startDocument( tagName ); preserveSpace = _format.getPreserveSpace(); } else { // For any other element, if first in parent, then // close parent's opening tag and use the parnet's // space preserving. if ( state.empty ) printText( ">" ); preserveSpace = state.preserveSpace; // Indent this element on a new line if the first // content of the parent element or immediately // following an element. if ( _format.getIndenting() && ! state.preserveSpace && ( state.empty || state.afterElement ) ) breakLine(); } // Do not change the current element state yet. // This only happens in endElement(). // XHTML: element names are lower case, DOM will be different if ( _xhtml ) printText( '<' + tagName.toLowerCase() ); else printText( '<' + tagName ); indent(); // Lookup the element's attribute, but only print specified // attributes. (Unspecified attributes are derived from the DTD. // For each attribute print it's name and value as one part, // separated with a space so the element can be broken on // multiple lines. attrMap = elem.getAttributes(); if ( attrMap != null ) { for ( i = 0 ; i < attrMap.getLength() ; ++i ) { attr = (Attr) attrMap.item( i ); name = attr.getName().toLowerCase(); value = attr.getValue(); if ( attr.getSpecified() ) { printSpace(); if ( _xhtml ) { // XHTML: print empty string for null values. if ( value == null ) printText( name + "=\"\"" ); else printText( name + "=\"" + escape( value ) + '"' ); } else { // HTML: Empty values print as attribute name, no value. // HTML: URI attributes will print unescaped if ( value == null ) printText( name ); else if ( HTMLdtd.isURI( tagName, name ) ) printText( name + "=\"" + escapeURI( value ) + '"' ); else printText( name + "=\"" + escape( value ) + '"' ); } } } } if ( HTMLdtd.isPreserveSpace( tagName ) ) preserveSpace = true; // If element has children, or if element is not an empty tag, // serialize an opening tag. if ( elem.hasChildNodes() || ! HTMLdtd.isEmptyTag( tagName ) ) { // Enter an element state, and serialize the children // one by one. Finally, end the element. enterElementState( tagName, preserveSpace ); // Handle SCRIPT and STYLE specifically by changing the // state of the current element to CDATA (XHTML) or // unescaped (HTML). if ( tagName.equalsIgnoreCase( "SCRIPT" ) || tagName.equalsIgnoreCase( "STYLE" ) ) { if ( _xhtml ) // XHTML: Print contents as CDATA section getElementState().cdata = true; else // HTML: Print contents unescaped getElementState().unescaped = true; } child = elem.getFirstChild(); while ( child != null ) { serializeNode( child ); child = child.getNextSibling(); } endElement( tagName ); } else { unindent(); // XHTML: Close empty tag with ' />' so it's XML and HTML compatible. // HTML: Empty tags are defined as such in DTD no in document. if ( _xhtml ) printText( " />" ); else printText( ">" ); if ( state != null ) { // After element but parent element is no longer empty. state.afterElement = true; state.empty = false; } } } | 4434 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4434/f4cb21d45e88907e63ac565fc722a4c7b00bfc5f/HTMLSerializer.java/clean/src/org/apache/xml/serialize/HTMLSerializer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
4472,
1046,
12,
3010,
3659,
262,
565,
288,
202,
3843,
540,
1604,
31,
202,
7604,
907,
863,
1604,
863,
31,
202,
474,
1850,
277,
31,
202,
907,
540,
1151,
31,
202,
1046,
1119,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4472,
1046,
12,
3010,
3659,
262,
565,
288,
202,
3843,
540,
1604,
31,
202,
7604,
907,
863,
1604,
863,
31,
202,
474,
1850,
277,
31,
202,
907,
540,
1151,
31,
202,
1046,
1119,
... |
if ((value < 0 && otherValue < 0 && (result > 0 || result < -MAX)) || | if (other instanceof RubyBignum || (value < 0 && otherValue < 0 && (result > 0 || result < -MAX)) || | public RubyNumeric op_plus(RubyNumeric other) { if (other instanceof RubyFloat) { return ((RubyFloat)other).op_plus(this); } else if (other instanceof RubyBignum) { return ((RubyBignum)other).op_plus(this); } else { long otherValue = other.getLongValue(); long result = value + otherValue; if ((value < 0 && otherValue < 0 && (result > 0 || result < -MAX)) || (value > 0 && otherValue > 0 && (result < 0 || result > MAX))) { return RubyBignum.newBignum(getRuntime(), value).op_plus(other); } return newFixnum(result); } } | 46454 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46454/81d863f72452a85654d8e0c299b8251df8b8922a/RubyFixnum.java/buggy/src/org/jruby/RubyFixnum.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19817,
9902,
1061,
67,
10103,
12,
54,
10340,
9902,
1308,
13,
288,
3639,
309,
261,
3011,
1276,
19817,
4723,
13,
288,
5411,
327,
14015,
54,
10340,
4723,
13,
3011,
2934,
556,
67,
10103... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
9902,
1061,
67,
10103,
12,
54,
10340,
9902,
1308,
13,
288,
3639,
309,
261,
3011,
1276,
19817,
4723,
13,
288,
5411,
327,
14015,
54,
10340,
4723,
13,
3011,
2934,
556,
67,
10103... |
int state; | public void interrupt(MIInferior inferior) { if (fGDBProcess instanceof Spawner) { Spawner gdbSpawner = (Spawner) fGDBProcess; gdbSpawner.interrupt(); int state; synchronized (inferior) { // Allow (5 secs) for the interrupt to propagate. for (int i = 0; inferior.isRunning() && i < 5; i++) { try { inferior.wait(1000); } catch (InterruptedException e) { } } } // If we are still running try to drop the sig to the PID if (inferior.isRunning() && inferior.getInferiorPID() > 0) { // lets try something else. gdbSpawner.raise(inferior.getInferiorPID(), gdbSpawner.INT); synchronized (inferior) { for (int i = 0; inferior.isRunning() && i < 5; i++) { try { inferior.wait(1000); } catch (InterruptedException e) { } } } } } } | 54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/db8bcbda608aa7e5381f8a093e90182138dd8317/MIProcessAdapter.java/buggy/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/MIProcessAdapter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
13123,
12,
7492,
382,
586,
9659,
12455,
9659,
13,
288,
202,
202,
430,
261,
74,
43,
2290,
2227,
1276,
5878,
2219,
1224,
13,
288,
1082,
202,
3389,
2219,
1224,
314,
1966,
33... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
13123,
12,
7492,
382,
586,
9659,
12455,
9659,
13,
288,
202,
202,
430,
261,
74,
43,
2290,
2227,
1276,
5878,
2219,
1224,
13,
288,
1082,
202,
3389,
2219,
1224,
314,
1966,
33... | |
public DomModelTreeView(Project project) { this(null, DomManager.getDomManager(project), false); | public DomModelTreeView(@NotNull DomElement rootElement) { this(rootElement, rootElement.getManager(), new DomModelTreeStructure(rootElement)); | public DomModelTreeView(Project project) { this(null, DomManager.getDomManager(project), false); } | 12814 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12814/58d7e940e66891bde34d0c9eeaafa8768bbe9870/DomModelTreeView.java/clean/dom/openapi/src/com/intellij/util/xml/tree/DomModelTreeView.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
12965,
1488,
2471,
1767,
12,
4109,
1984,
13,
288,
565,
333,
12,
2011,
16,
12965,
1318,
18,
588,
8832,
1318,
12,
4406,
3631,
629,
1769,
225,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
12965,
1488,
2471,
1767,
12,
4109,
1984,
13,
288,
565,
333,
12,
2011,
16,
12965,
1318,
18,
588,
8832,
1318,
12,
4406,
3631,
629,
1769,
225,
289,
2,
-100,
-100,
-100,
-100,
-100,
-... |
FileBuilder fileBuilder = (FileBuilder) builder.getFileBuilders().get(currentFilename); if (!fileBuilder.existRevision() || (fileBuilder.existRevision() && !fileBuilder.getFirstRevision().isCreation())) { | private void endLogEntry() throws SAXException { checkLastElement(LOGENTRY); lastElement = LOG; for (int i = 0; i < currentFilenames.size(); i++) { RevisionData revisionData = (RevisionData) currentRevisions.get(i); revisionData.setComment(currentRevisionData.getComment()); revisionData.setDate(currentRevisionData.getDate()); revisionData.setLoginName(currentRevisionData.getLoginName()); String currentFilename = currentFilenames.get(i).toString(); // if this file is not in the current working folder, discard it. if (SvnInfoUtils.getRevisionNumber(currentFilename) == null) continue; // check to see if binary in local copy (cached) boolean isBinary = SvnPropgetUtils.getBinaryFiles().contains(currentFilename); builder.buildFile(currentFilename, isBinary, revisionData.isDeletion(), new HashMap()); FileBuilder fileBuilder = (FileBuilder) builder.getFileBuilders().get(currentFilename); if (!fileBuilder.existRevision() || (fileBuilder.existRevision() && !fileBuilder.getFirstRevision().isCreation())) { builder.buildRevision(revisionData); } } } | 48585 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48585/b36f25f93459c469a8443e740973ce8c09f71c52/SvnXmlLogFileHandler.java/buggy/statsvn/src/net/sf/statcvs/input/SvnXmlLogFileHandler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
679,
25548,
1435,
1216,
14366,
288,
3639,
866,
3024,
1046,
12,
4842,
19083,
1769,
3639,
1142,
1046,
273,
2018,
31,
3639,
364,
261,
474,
277,
273,
374,
31,
277,
411,
783,
25579,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
679,
25548,
1435,
1216,
14366,
288,
3639,
866,
3024,
1046,
12,
4842,
19083,
1769,
3639,
1142,
1046,
273,
2018,
31,
3639,
364,
261,
474,
277,
273,
374,
31,
277,
411,
783,
25579,... | |
return fm.stringWidth(text) + 30; | return fm.stringWidth(text); | public float getPreferredSpan(int axis) { if (axis != X_AXIS && axis != Y_AXIS) throw new IllegalArgumentException(); FontMetrics fm = getFontMetrics(); if (axis == Y_AXIS) return super.getPreferredSpan(axis); String text; Element elem = getElement(); try { text = elem.getDocument().getText(elem.getStartOffset(), elem.getEndOffset()); } catch (BadLocationException e) { // This should never happen. text = ""; } return fm.stringWidth(text) + 30; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/74171de2560e91a8fc81940ffc40e047ca41f4a0/FieldView.java/clean/core/src/classpath/javax/javax/swing/text/FieldView.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1431,
12822,
4193,
6952,
12,
474,
2654,
13,
225,
288,
565,
309,
261,
4890,
480,
1139,
67,
25614,
597,
2654,
480,
1624,
67,
25614,
13,
1377,
604,
394,
2754,
5621,
565,
10063,
5653,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1431,
12822,
4193,
6952,
12,
474,
2654,
13,
225,
288,
565,
309,
261,
4890,
480,
1139,
67,
25614,
597,
2654,
480,
1624,
67,
25614,
13,
1377,
604,
394,
2754,
5621,
565,
10063,
5653,
... |
c.popStyle(); | static int paintInline(Context c, InlineBox ib, int lx, int ly, LineBox line, boolean restyle, LinkedList pushedStyles, LinkedList decorations, int padX) { //Uu.p("paint inline: " + ib); restyle = restyle || ib.restyle;//cascade it down ib.restyle = false;//reset if (ib.pushstyles != null) { for (Iterator i = ib.pushstyles.iterator(); i.hasNext();) { StylePush sp = (StylePush) i.next(); Element e = sp.getElement(); CascadedStyle cascaded; if (e == null) {//anonymous inline box cascaded = CascadedStyle.emptyCascadedStyle; } else { cascaded = c.getCss().getCascadedStyle(e, restyle); } if (pushedStyles != null) pushedStyles.addLast(cascaded); padX = handleInlineElementStart(c, cascaded, line, ib, padX, decorations); } } if (ib.floated) { LinkedList unpropagated = (LinkedList) decorations.clone(); decorations.clear(); paintFloat(c, ib, restyle); decorations.addAll(unpropagated); debugInlines(c, ib, lx, ly); } // Uu.p("paintInline: " + inline); else if (ib instanceof InlineBlockBox) { //no text-decorations on inline-block LinkedList restarted = new LinkedList(); for (Iterator i = decorations.iterator(); i.hasNext();) { TextDecoration td = (TextDecoration) i.next(); td.setEnd(ib.x); //Uu.p("painting decoration"); td.paint(c, line); i.remove(); restarted.addLast(td.getRestarted(ib.x + ib.getWidth())); } decorations.clear(); c.pushStyle(c.getCss().getCascadedStyle(ib.element, restyle)); //int textAlign = getTextAlign(c, line); //Uu.p("line.x = " + line.x + " text align = " + textAlign); //Uu.p("ib.x .y = " + ib.x + " " + ib.y); c.translate(line.x, line.y + (line.getBaseline() - VerticalAlign.getBaselineOffset(c, line, ib) - ib.height)); c.getGraphics().translate(line.x, line.y + (line.getBaseline() - VerticalAlign.getBaselineOffset(c, line, ib) - ib.height)); c.translate(ib.x, ib.y); c.getGraphics().translate(ib.x, ib.y); BoxRendering.paint(c, ((InlineBlockBox) ib).sub_block, false, restyle); c.getGraphics().translate(-ib.x, -ib.y); c.translate(-ib.x, -ib.y); c.getGraphics().translate(-line.x, -(line.y + (line.getBaseline() - VerticalAlign.getBaselineOffset(c, line, ib) - ib.height))); c.translate(-line.x, -(line.y + (line.getBaseline() - VerticalAlign.getBaselineOffset(c, line, ib) - ib.height))); debugInlines(c, ib, lx, ly); c.popStyle(); decorations.addAll(restarted); } else { InlineTextBox inline = (InlineTextBox) ib; //Uu.p("inline = " + inline); //Uu.p("line.x = " + line.x + " lx = " + lx); //Uu.p("ib.x .y = " + ib.x + " " + ib.y); c.updateSelection(inline); // calculate the Xx and y relative to the baseline of the line (ly) and the // left edge of the line (lx) int iy = ly - VerticalAlign.getBaselineOffset(c, line, inline); int ix = lx + inline.x;//TODO: find the right way to work this out // account for padding // Uu.p("adjusted inline by: " + inline.totalLeftPadding()); // Uu.p("inline = " + inline); // Uu.p("padding = " + inline.padding); // JMM: new adjustments to move the text to account for horizontal insets //int padding_xoff = inline.totalLeftPadding(c.getCurrentStyle()); c.translate(padX, 0); c.getGraphics().translate(padX, 0); LineMetrics lm = FontUtil.getLineMetrics(c, inline); paintBackground(c, line, inline); paintSelection(c, inline, lx, ly, lm); paintText(c, ix, iy, inline, lm); c.getGraphics().translate(-padX, 0); c.translate(-padX, 0); debugInlines(c, inline, lx, ly); } padX = ib.getWidth() - ib.rightPadding; if (ib.popstyles != 0) { for (int i = 0; i < ib.popstyles; i++) { padX = handleInlineElementEnd(c, decorations, ib, padX, line, pushedStyles); } } return padX; } | 8125 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8125/d78edbe00854320b48eb4ef97095b253df533dd8/InlineRendering.java/clean/src/java/org/xhtmlrenderer/render/InlineRendering.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
760,
509,
12574,
10870,
12,
1042,
276,
16,
16355,
3514,
9834,
16,
509,
15855,
16,
509,
18519,
16,
5377,
3514,
980,
16,
1250,
3127,
1362,
16,
10688,
18543,
9725,
16,
10688,
4839,
1012,
16,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
760,
509,
12574,
10870,
12,
1042,
276,
16,
16355,
3514,
9834,
16,
509,
15855,
16,
509,
18519,
16,
5377,
3514,
980,
16,
1250,
3127,
1362,
16,
10688,
18543,
9725,
16,
10688,
4839,
1012,
16,... | |
sbNewRepresentation.append("'"); | sbNewRepresentation.append("'"); | private String getConvertedBaseSampleDataRepresentation(String sOldRepresentation) { StringTokenizer strtok = new StringTokenizer(sOldRepresentation, ","); StringBuffer sbNewRepresentation = new StringBuffer(""); while (strtok.hasMoreTokens()) { String sElement = strtok.nextToken().trim(); if (!sElement.startsWith("'")) { sbNewRepresentation.append("'"); sbNewRepresentation.append(sElement); sbNewRepresentation.append("'"); } else { sbNewRepresentation.append(sElement); } sbNewRepresentation.append(","); } return sbNewRepresentation.toString().substring(0, sbNewRepresentation.length() - 1); } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/7793e94b4d7fab5891f226c6c937e37d85bebad8/LineChart.java/clean/chart/org.eclipse.birt.chart.ui.extension/src/org/eclipse/birt/chart/ui/swt/type/LineChart.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
514,
336,
22063,
2171,
8504,
751,
13742,
12,
780,
272,
7617,
13742,
13,
565,
288,
3639,
16370,
609,
17692,
273,
394,
16370,
12,
87,
7617,
13742,
16,
5753,
1769,
3639,
6674,
2393,
19... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
514,
336,
22063,
2171,
8504,
751,
13742,
12,
780,
272,
7617,
13742,
13,
565,
288,
3639,
16370,
609,
17692,
273,
394,
16370,
12,
87,
7617,
13742,
16,
5753,
1769,
3639,
6674,
2393,
19... |
return StyleConstants.getBackground(atts); | return (Color) atts.getAttribute(StyleConstants.Background); | public Color getBackground() { Element el = getElement(); AttributeSet atts = el.getAttributes(); return StyleConstants.getBackground(atts); } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/8f1176391e1d000d946793693906d6dc8af29e19/GlyphView.java/buggy/core/src/classpath/javax/javax/swing/text/GlyphView.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
5563,
336,
8199,
1435,
225,
288,
565,
3010,
415,
273,
7426,
5621,
565,
3601,
694,
15687,
273,
415,
18,
588,
2498,
5621,
3639,
327,
261,
2957,
13,
15687,
18,
588,
1499,
12,
2885,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
5563,
336,
8199,
1435,
225,
288,
565,
3010,
415,
273,
7426,
5621,
565,
3601,
694,
15687,
273,
415,
18,
588,
2498,
5621,
3639,
327,
261,
2957,
13,
15687,
18,
588,
1499,
12,
2885,
2... |
if (self.getInternalClass().isMethodBound(iVisited.getName(), 0)) { | if (self.getInternalClass().isMethodBound(iVisited.getName(), false)) { | public void visitFCallNode(FCallNode iVisited) { if (self.getInternalClass().isMethodBound(iVisited.getName(), 0)) { definition = getArgumentDefinition(iVisited.getArgsNode(), "method"); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/f05423516c2d1bfe54c4363eedb9654f7cfb6898/DefinedVisitor.java/clean/org/jruby/evaluator/DefinedVisitor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
3757,
42,
1477,
907,
12,
42,
1477,
907,
277,
30019,
13,
288,
3639,
309,
261,
2890,
18,
588,
3061,
797,
7675,
291,
1305,
3499,
12,
77,
30019,
18,
17994,
9334,
629,
3719,
288,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
3757,
42,
1477,
907,
12,
42,
1477,
907,
277,
30019,
13,
288,
3639,
309,
261,
2890,
18,
588,
3061,
797,
7675,
291,
1305,
3499,
12,
77,
30019,
18,
17994,
9334,
629,
3719,
288,
... |
SchemaParserTestUtils.testNumericOid( parser ); | SchemaParserTestUtils.testNumericOid( parser, "SYNTAX 1.1" ); | public void testNumericOid() throws Exception { SchemaParserTestUtils.testNumericOid( parser ); } | 54578 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54578/ff44f37d485d24a3daa2141ea35c2b831557c20a/SchemaParserMatchingRuleDescriptionTest.java/buggy/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/SchemaParserMatchingRuleDescriptionTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
9902,
19105,
1435,
1216,
1185,
565,
288,
3639,
4611,
2678,
4709,
1989,
18,
3813,
9902,
19105,
12,
2082,
16,
315,
7474,
28614,
404,
18,
21,
6,
11272,
565,
289,
2,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
9902,
19105,
1435,
1216,
1185,
565,
288,
3639,
4611,
2678,
4709,
1989,
18,
3813,
9902,
19105,
12,
2082,
16,
315,
7474,
28614,
404,
18,
21,
6,
11272,
565,
289,
2,
-100,
... |
public boolean moveFocusToElement( final HtmlElement newElement ) { | public boolean moveFocusToElement( final FocusableElement newElement ) { if( newElement == null ) { throw new IllegalArgumentException("Cannot move focus to null"); } | public boolean moveFocusToElement( final HtmlElement newElement ) { if( elementWithFocus_ == newElement ) { // nothing to do return true; } // TODO: This is an incredibly inefficient way to find out if the element is tabbable. // Refactor this into something reasonable. if( newElement != null && newElement.getPage().getTabbableElements().contains(newElement) == false ) { // This element isn't tabbable. return false; } if( elementWithFocus_ != null ) { final String onBlurHandler = elementWithFocus_.getAttributeValue("onblur"); if( onBlurHandler.length() != 0 ) { elementWithFocus_.getPage().executeJavaScriptIfPossible( onBlurHandler, "OnBlur handler", true, elementWithFocus_); } } if( newElement != null ) { final String onFocusHandler = newElement.getAttributeValue("onfocus"); if( onFocusHandler.length() != 0 ) { final HtmlPage currentPage = newElement.getPage(); final Page newPage = currentPage.executeJavaScriptIfPossible( onFocusHandler, "OnFocus handler", true, newElement).getNewPage(); // If a page reload happened as a result of the focus change then obviously this // element will not have the focus because its page has gone away. if( currentPage != newPage ) { elementWithFocus_ = null; return false; } } } elementWithFocus_ = newElement; return true; } | 3508 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3508/efd75a9ac94ddbd24e3b33ff0b28e78acaaa4af1/WebClient.java/clean/htmlunit/src/java/com/gargoylesoftware/htmlunit/WebClient.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
3635,
9233,
774,
1046,
12,
727,
478,
4560,
429,
1046,
31308,
262,
288,
225,
309,
12,
31308,
422,
446,
262,
288,
604,
394,
2754,
2932,
4515,
3635,
7155,
358,
446,
8863,
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,
1250,
3635,
9233,
774,
1046,
12,
727,
478,
4560,
429,
1046,
31308,
262,
288,
225,
309,
12,
31308,
422,
446,
262,
288,
604,
394,
2754,
2932,
4515,
3635,
7155,
358,
446,
8863,
289,
... |
if (fastViewSash != null) { hider.setEnabled(false); fastViewSash.setBounds(new Rectangle(0, 0, 0, 0)); | if (sash != null) { sash.setVisible(false); | public void hideFastViewSash() { if (fastViewSash != null) { hider.setEnabled(false); fastViewSash.setBounds(new Rectangle(0, 0, 0, 0)); } } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/58cc7651815facc4fc9e4bbb808d6e4996c3f650/FastViewPane.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/FastViewPane.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
6853,
12305,
1767,
55,
961,
1435,
288,
202,
202,
430,
261,
8076,
1767,
55,
961,
480,
446,
13,
288,
1082,
202,
76,
3585,
18,
542,
1526,
12,
5743,
1769,
1082,
202,
8076,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6853,
12305,
1767,
55,
961,
1435,
288,
202,
202,
430,
261,
8076,
1767,
55,
961,
480,
446,
13,
288,
1082,
202,
76,
3585,
18,
542,
1526,
12,
5743,
1769,
1082,
202,
8076,
... |
int index = columnIndex + 1; | public String getColumnName (int columnIndex) { int index = columnIndex + 1; StringBuffer buffer = new StringBuffer(); while (index > 0) { buffer.insert (0, (char) ('A' + ((index - 1) % 26))); index = (index - 1) / 26; } // Return column name. return buffer.toString(); } | 47947 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47947/c8c0388229d95e98d2882abd60e05f65cc47bc37/AbstractTableModel.java/buggy/javax/swing/table/AbstractTableModel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
514,
20248,
261,
474,
14882,
13,
225,
288,
4202,
6674,
1613,
273,
394,
6674,
5621,
565,
1323,
261,
1615,
405,
374,
13,
1377,
288,
202,
4106,
18,
6387,
261,
20,
16,
261,
3001,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
514,
20248,
261,
474,
14882,
13,
225,
288,
4202,
6674,
1613,
273,
394,
6674,
5621,
565,
1323,
261,
1615,
405,
374,
13,
1377,
288,
202,
4106,
18,
6387,
261,
20,
16,
261,
3001,
13,
... | |
JPanel p = new JPanel(); p.setLayout(new GridLayout(3, 1)); JLabel colorKeyLabel = new JLabel("color key:"); JLabel yourTasksLabel = new JLabel("your tasks"); yourTasksLabel.setForeground(AUTHORITY_MINE_COLOR); JLabel broadTasksLabel = new JLabel("Broad tasks"); JLabel otherTasksLabel = new JLabel("other tasks"); otherTasksLabel.setForeground(AUTHORITY_FOREIGN_COLOR); p.add(yourTasksLabel); p.add(broadTasksLabel); p.add(otherTasksLabel); Container c = new JPanel(); c.setLayout(new BorderLayout()); c.add(p, BorderLayout.CENTER); javax.swing.JScrollPane sp = new javax.swing.JScrollPane(c); javax.swing.JOptionPane.showMessageDialog(GenePattern.getDialogParent(), sp, "Module Color Key", JOptionPane.INFORMATION_MESSAGE); | AnalysisMenuItem mi = (AnalysisMenuItem) e.getSource(); analysisServicePanel.loadTask(mi.svc); | public void actionPerformed(ActionEvent e) { JPanel p = new JPanel(); p.setLayout(new GridLayout(3, 1)); JLabel colorKeyLabel = new JLabel("color key:"); JLabel yourTasksLabel = new JLabel("your tasks"); yourTasksLabel.setForeground(AUTHORITY_MINE_COLOR); JLabel broadTasksLabel = new JLabel("Broad tasks"); JLabel otherTasksLabel = new JLabel("other tasks"); otherTasksLabel.setForeground(AUTHORITY_FOREIGN_COLOR); p.add(yourTasksLabel); p.add(broadTasksLabel); p.add(otherTasksLabel); Container c = new JPanel(); c.setLayout(new BorderLayout()); // c.add(colorKeyLabel, BorderLayout.NORTH); c.add(p, BorderLayout.CENTER); javax.swing.JScrollPane sp = new javax.swing.JScrollPane(c); javax.swing.JOptionPane.showMessageDialog(GenePattern.getDialogParent(), sp, "Module Color Key", JOptionPane.INFORMATION_MESSAGE); } | 57344 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57344/e70edb3fc297661316b6beeb14c5e60c6bed1f34/MainFrame.java/clean/clients/JavaGE/src/org/genepattern/gpge/ui/maindisplay/MainFrame.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
7734,
1071,
918,
26100,
12,
1803,
1133,
425,
13,
288,
5375,
24048,
293,
273,
394,
24048,
5621,
5375,
293,
18,
542,
3744,
12,
2704,
7145,
3744,
12,
23,
16,
404,
10019,
5375,
21403,
2036,
653,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
7734,
1071,
918,
26100,
12,
1803,
1133,
425,
13,
288,
5375,
24048,
293,
273,
394,
24048,
5621,
5375,
293,
18,
542,
3744,
12,
2704,
7145,
3744,
12,
23,
16,
404,
10019,
5375,
21403,
2036,
653,
... |
assertNull( RiserType.get("No Match") ); assertNull( RiserType.get(2) ); | assertNull( RiserType.get("No Match") ); | public void testGet() { assertEquals( RiserType.RECTANGLE_LITERAL, RiserType.get(RiserType.RECTANGLE) ); assertEquals( RiserType.TRIANGLE_LITERAL, RiserType.get(1) ); assertEquals( RiserType.RECTANGLE_LITERAL, RiserType.get("Rectangle") ); assertEquals( RiserType.TRIANGLE_LITERAL, RiserType.get("Triangle") ); assertNull( RiserType.get("No Match") ); assertNull( RiserType.get(2) ); } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/e757044daa53d502ecf969354d3f5ec94aa76fd1/RiserTypeTest.java/buggy/chart/org.eclipse.birt.chart.tests/src/org/eclipse/birt/chart/tests/engine/model/attribute/RiserTypeTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
967,
1435,
225,
202,
95,
202,
202,
11231,
8867,
12,
534,
15914,
559,
18,
4512,
30978,
67,
23225,
16,
534,
15914,
559,
18,
588,
12,
54,
15914,
559,
18,
4512,
30978,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
967,
1435,
225,
202,
95,
202,
202,
11231,
8867,
12,
534,
15914,
559,
18,
4512,
30978,
67,
23225,
16,
534,
15914,
559,
18,
588,
12,
54,
15914,
559,
18,
4512,
30978,
... |
for (int i = ordering.size() - 1; i >= 0; i--) | for (int i = components.size() - 1; i >= 0; i--) | public String toString( boolean reverse, Hashtable oidSymbols) { StringBuffer buf = new StringBuffer(); boolean first = true; if (reverse) { for (int i = ordering.size() - 1; i >= 0; i--) { if (first) { first = false; } else { if (((Boolean)added.elementAt(i + 1)).booleanValue()) { buf.append('+'); } else { buf.append(','); } } appendValue(buf, oidSymbols, (DERObjectIdentifier)ordering.elementAt(i), (String)values.elementAt(i)); } } else { for (int i = 0; i < ordering.size(); i++) { if (first) { first = false; } else { if (((Boolean)added.elementAt(i)).booleanValue()) { buf.append('+'); } else { buf.append(','); } } appendValue(buf, oidSymbols, (DERObjectIdentifier)ordering.elementAt(i), (String)values.elementAt(i)); } } return buf.toString(); } | 14767 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/14767/c1d6539e68d49b62d2793aa3b5750e16e29eaf40/X509Name.java/clean/crypto/src/org/bouncycastle/asn1/x509/X509Name.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
1762,
12,
3639,
1250,
377,
4219,
16,
3639,
18559,
282,
7764,
14821,
13,
565,
288,
3639,
6674,
5411,
1681,
273,
394,
6674,
5621,
3639,
1250,
1171,
1122,
273,
638,
31,
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,
514,
1762,
12,
3639,
1250,
377,
4219,
16,
3639,
18559,
282,
7764,
14821,
13,
565,
288,
3639,
6674,
5411,
1681,
273,
394,
6674,
5621,
3639,
1250,
1171,
1122,
273,
638,
31,
3639,
309,... |
processSyntaxException(new NoExpressionValueException()); | processSyntaxException(new NoExpressionValueException("Proxy id: "+proxyid)); | public final void pushExpressionProxy(int proxyid) { boolean ignore =(ignoreExpression != null || errorOccurred); if (traceOn) printTrace("Push Expression Proxy #"+proxyid, ignore); //$NON-NLS-1$ try { if (ignore) return; if (expressionProxies != null && expressionProxies.size() > proxyid) { InternalExpressionProxy proxy = (InternalExpressionProxy) expressionProxies.get(proxyid); if (proxy != null && proxy.isSet()) { if (traceOn) printObjectAndType(proxy.getValue(), proxy.getType()); pushExpressionValue(proxy.getValue(), proxy.getType()); // Can push a VariableReference. This is ok. When used it will then deref with the current value. } else processSyntaxException(new NoExpressionValueException()); } else processSyntaxException(new NoExpressionValueException()); } finally { if (traceOn) printTraceEnd(); } } | 8196 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8196/d40f79967a360552542dd5928938c24345a23d88/ExpressionProcesser.java/clean/plugins/org.eclipse.jem.proxy/initParser/org/eclipse/jem/internal/proxy/initParser/tree/ExpressionProcesser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
1817,
2300,
3886,
12,
474,
2889,
350,
13,
288,
202,
202,
6494,
2305,
273,
12,
6185,
2300,
480,
446,
747,
555,
30096,
1769,
202,
202,
430,
261,
5129,
1398,
13,
1082,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
1817,
2300,
3886,
12,
474,
2889,
350,
13,
288,
202,
202,
6494,
2305,
273,
12,
6185,
2300,
480,
446,
747,
555,
30096,
1769,
202,
202,
430,
261,
5129,
1398,
13,
1082,
... |
} | } | public void actionPerformed (ActionEvent e) { ListSelectionModel rowModel = table.getSelectionModel(); ListSelectionModel colModel = table.getColumnModel().getSelectionModel(); int rowLead = rowModel.getLeadSelectionIndex(); int rowMax = table.getModel().getRowCount() - 1; int colLead = colModel.getLeadSelectionIndex(); int colMax = table.getModel().getColumnCount() - 1; if (e.getActionCommand().equals("selectPreviousRowExtendSelection")) { rowModel.setLeadSelectionIndex(Math.max(rowLead - 1, 0)); colModel.setLeadSelectionIndex(colLead); } else if (e.getActionCommand().equals("selectLastColumn")) { table.clearSelection(); rowModel.setSelectionInterval(rowLead, rowLead); colModel.setSelectionInterval(colMax, colMax); } else if (e.getActionCommand().equals("startEditing")) { if (table.isCellEditable(rowLead, colLead)) table.editCellAt(rowLead,colLead); } else if (e.getActionCommand().equals("selectFirstRowExtendSelection")) { rowModel.setLeadSelectionIndex(0); colModel.setLeadSelectionIndex(colLead); } else if (e.getActionCommand().equals("selectFirstColumn")) { rowModel.setSelectionInterval(rowLead, rowLead); colModel.setSelectionInterval(0, 0); } else if (e.getActionCommand().equals("selectFirstColumnExtendSelection")) { colModel.setLeadSelectionIndex(0); rowModel.setLeadSelectionIndex(rowLead); } else if (e.getActionCommand().equals("selectLastRow")) { rowModel.setSelectionInterval(rowMax,rowMax); colModel.setSelectionInterval(colLead, colLead); } else if (e.getActionCommand().equals("selectNextRowExtendSelection")) { rowModel.setLeadSelectionIndex(Math.min(rowLead + 1, rowMax)); colModel.setLeadSelectionIndex(colLead); } else if (e.getActionCommand().equals("selectFirstRow")) { rowModel.setSelectionInterval(0,0); colModel.setSelectionInterval(colLead, colLead); } else if (e.getActionCommand().equals("selectNextColumnExtendSelection")) { colModel.setLeadSelectionIndex(Math.min(colLead + 1, colMax)); rowModel.setLeadSelectionIndex(rowLead); } else if (e.getActionCommand().equals("selectLastColumnExtendSelection")) { colModel.setLeadSelectionIndex(colMax); rowModel.setLeadSelectionIndex(rowLead); } else if (e.getActionCommand().equals("selectPreviousColumnExtendSelection")) { colModel.setLeadSelectionIndex(Math.max(colLead - 1, 0)); rowModel.setLeadSelectionIndex(rowLead); } else if (e.getActionCommand().equals("selectNextRow")) { rowModel.setSelectionInterval(Math.min(rowLead + 1, rowMax), Math.min(rowLead + 1, rowMax)); colModel.setSelectionInterval(colLead,colLead); } else if (e.getActionCommand().equals("scrollUpExtendSelection")) { int target; if (rowLead == getFirstVisibleRowIndex()) target = Math.max (0, rowLead - (getLastVisibleRowIndex() - getFirstVisibleRowIndex() + 1)); else target = getFirstVisibleRowIndex(); rowModel.setLeadSelectionIndex(target); colModel.setLeadSelectionIndex(colLead); } else if (e.getActionCommand().equals("selectPreviousRow")) { rowModel.setSelectionInterval(Math.max(rowLead - 1, 0), Math.max(rowLead - 1, 0)); colModel.setSelectionInterval(colLead,colLead); } else if (e.getActionCommand().equals("scrollRightChangeSelection")) { int target; if (colLead == getLastVisibleColumnIndex()) target = Math.min (colMax, colLead + (getLastVisibleColumnIndex() - getFirstVisibleColumnIndex() + 1)); else target = getLastVisibleColumnIndex(); colModel.setSelectionInterval(target, target); rowModel.setSelectionInterval(rowLead, rowLead); } else if (e.getActionCommand().equals("selectPreviousColumn")) { rowModel.setSelectionInterval(rowLead,rowLead); colModel.setSelectionInterval(Math.max(colLead - 1, 0), Math.max(colLead - 1, 0)); } else if (e.getActionCommand().equals("scrollLeftChangeSelection")) { int target; if (colLead == getFirstVisibleColumnIndex()) target = Math.max (0, colLead - (getLastVisibleColumnIndex() - getFirstVisibleColumnIndex() + 1)); else target = getFirstVisibleColumnIndex(); colModel.setSelectionInterval(target, target); rowModel.setSelectionInterval(rowLead, rowLead); } else if (e.getActionCommand().equals("clearSelection")) { table.clearSelection(); } else if (e.getActionCommand().equals("cancel")) { // FIXME: implement other parts of "cancel" like undo-ing last // selection. Right now it just calls editingCancelled if // we're currently editing. if (table.isEditing()) table.editingCanceled(new ChangeEvent("cancel")); } else if (e.getActionCommand().equals("selectNextRowCell") || e.getActionCommand().equals("selectPreviousRowCell") || e.getActionCommand().equals("selectNextColumnCell") || e.getActionCommand().equals("selectPreviousColumnCell")) { // If nothing is selected, select the first cell in the table if (table.getSelectedRowCount() == 0 && table.getSelectedColumnCount() == 0) { rowModel.setSelectionInterval(0, 0); colModel.setSelectionInterval(0, 0); return; } // If the lead selection index isn't selected (ie a remove operation // happened, then set the lead to the first selected cell in the // table if (!table.isCellSelected(rowLead, colLead)) { rowModel.addSelectionInterval(rowModel.getMinSelectionIndex(), rowModel.getMinSelectionIndex()); colModel.addSelectionInterval(colModel.getMinSelectionIndex(), colModel.getMinSelectionIndex()); return; } // multRowsSelected and multColsSelected tell us if multiple rows or // columns are selected, respectively boolean multRowsSelected, multColsSelected; multRowsSelected = table.getSelectedRowCount() > 1 && table.getRowSelectionAllowed(); multColsSelected = table.getSelectedColumnCount() > 1 && table.getColumnSelectionAllowed(); // If there is just one selection, select the next cell, and wrap // when you get to the edges of the table. if (!multColsSelected && !multRowsSelected) { if (e.getActionCommand().indexOf("Column") != -1) advanceSingleSelection(colModel, colMax, rowModel, rowMax, (e.getActionCommand().equals ("selectPreviousColumnCell"))); else advanceSingleSelection(rowModel, rowMax, colModel, colMax, (e.getActionCommand().equals ("selectPreviousRowCell"))); return; } // rowMinSelected and rowMaxSelected are the minimum and maximum // values respectively of selected cells in the row selection model // Similarly for colMinSelected and colMaxSelected. int rowMaxSelected = table.getRowSelectionAllowed() ? rowModel.getMaxSelectionIndex() : table.getModel().getRowCount() - 1; int rowMinSelected = table.getRowSelectionAllowed() ? rowModel.getMinSelectionIndex() : 0; int colMaxSelected = table.getColumnSelectionAllowed() ? colModel.getMaxSelectionIndex() : table.getModel().getColumnCount() - 1; int colMinSelected = table.getColumnSelectionAllowed() ? colModel.getMinSelectionIndex() : 0; // If there are multiple rows and columns selected, select the next // cell and wrap at the edges of the selection. if (e.getActionCommand().indexOf("Column") != -1) advanceMultipleSelection(colModel, colMinSelected, colMaxSelected, rowModel, rowMinSelected, rowMaxSelected, (e.getActionCommand().equals ("selectPreviousColumnCell")), true); else advanceMultipleSelection(rowModel, rowMinSelected, rowMaxSelected, colModel, colMinSelected, colMaxSelected, (e.getActionCommand().equals ("selectPreviousRowCell")), false); } else if (e.getActionCommand().equals("selectNextColumn")) { rowModel.setSelectionInterval(rowLead,rowLead); colModel.setSelectionInterval(Math.min(colLead + 1, colMax), Math.min(colLead + 1, colMax)); } else if (e.getActionCommand().equals("scrollLeftExtendSelection")) { int target; if (colLead == getFirstVisibleColumnIndex()) target = Math.max (0, colLead - (getLastVisibleColumnIndex() - getFirstVisibleColumnIndex() + 1)); else target = getFirstVisibleColumnIndex(); colModel.setLeadSelectionIndex(target); rowModel.setLeadSelectionIndex(rowLead); } else if (e.getActionCommand().equals("scrollDownChangeSelection")) { int target; if (rowLead == getLastVisibleRowIndex()) target = Math.min (rowMax, rowLead + (getLastVisibleRowIndex() - getFirstVisibleRowIndex() + 1)); else target = getLastVisibleRowIndex(); rowModel.setSelectionInterval(target, target); colModel.setSelectionInterval(colLead, colLead); } else if (e.getActionCommand().equals("scrollRightExtendSelection")) { int target; if (colLead == getLastVisibleColumnIndex()) target = Math.min (colMax, colLead + (getLastVisibleColumnIndex() - getFirstVisibleColumnIndex() + 1)); else target = getLastVisibleColumnIndex(); colModel.setLeadSelectionIndex(target); rowModel.setLeadSelectionIndex(rowLead); } else if (e.getActionCommand().equals("selectAll")) { table.selectAll(); } else if (e.getActionCommand().equals("selectLastRowExtendSelection")) { rowModel.setLeadSelectionIndex(rowMax); colModel.setLeadSelectionIndex(colLead); } else if (e.getActionCommand().equals("scrollDownExtendSelection")) { int target; if (rowLead == getLastVisibleRowIndex()) target = Math.min (rowMax, rowLead + (getLastVisibleRowIndex() - getFirstVisibleRowIndex() + 1)); else target = getLastVisibleRowIndex(); rowModel.setLeadSelectionIndex(target); colModel.setLeadSelectionIndex(colLead); } else if (e.getActionCommand().equals("scrollUpChangeSelection")) { int target; if (rowLead == getFirstVisibleRowIndex()) target = Math.max (0, rowLead - (getLastVisibleRowIndex() - getFirstVisibleRowIndex() + 1)); else target = getFirstVisibleRowIndex(); rowModel.setSelectionInterval(target, target); colModel.setSelectionInterval(colLead, colLead); } else { // If we're here that means we bound this TableAction class // to a keyboard input but we either want to ignore that input // or we just haven't implemented its action yet. } if (table.isEditing() && e.getActionCommand() != "startEditing") table.editingCanceled(new ChangeEvent("update")); table.repaint(); table.scrollRectToVisible (table.getCellRect(rowModel.getLeadSelectionIndex(), colModel.getLeadSelectionIndex(), false)); } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTableUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicTableUI.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
26100,
261,
1803,
1133,
425,
13,
5411,
288,
1377,
987,
6233,
1488,
1027,
1488,
273,
1014,
18,
588,
6233,
1488,
5621,
1377,
987,
6233,
1488,
645,
1488,
273,
1014,
18,
588,
1494,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
261,
1803,
1133,
425,
13,
5411,
288,
1377,
987,
6233,
1488,
1027,
1488,
273,
1014,
18,
588,
6233,
1488,
5621,
1377,
987,
6233,
1488,
645,
1488,
273,
1014,
18,
588,
1494,... |
return yaccValue; } | return yaccValue; } | public Object value() { return yaccValue; } | 47619 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47619/af104711597d4d5b2089320e2517b95b8df14492/RubyYaccLexer.java/buggy/org/jruby/lexer/yacc/RubyYaccLexer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1033,
460,
1435,
288,
202,
202,
2463,
677,
8981,
620,
31,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1033,
460,
1435,
288,
202,
202,
2463,
677,
8981,
620,
31,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
case TA_MAType_MAMA: dummyBuffer = new double[(endIdx - startIdx + 1)]; retCode = MAMA(startIdx, endIdx, inReal, 0.5, 0.05, outBegIdx, outNbElement, outReal, dummyBuffer); | case TA_MAType_WMA : retCode = WMA ( startIdx, endIdx, inReal, optInTimePeriod, outBegIdx, outNbElement, outReal ); break; | public TA_RetCode MA(int startIdx, int endIdx, double inReal[], int optInTimePeriod, TA_MAType optInMAType, MInteger outBegIdx, MInteger outNbElement, double outReal[]) { double[] dummyBuffer; TA_RetCode retCode; int nbElement; int outIdx, todayIdx; if (startIdx < 0) return TA_RetCode.TA_OUT_OF_RANGE_START_INDEX; if ((endIdx < 0) || (endIdx < startIdx)) return TA_RetCode.TA_OUT_OF_RANGE_END_INDEX; if ((int) optInTimePeriod == (Integer.MIN_VALUE )) optInTimePeriod = 30; else if (((int) optInTimePeriod < 1) || ((int) optInTimePeriod > 100000)) return TA_RetCode.TA_BAD_PARAM; if (optInTimePeriod == 1) { nbElement = endIdx - startIdx + 1; outNbElement.value = nbElement; for (todayIdx = startIdx, outIdx = 0; outIdx < nbElement; outIdx++, todayIdx++) outReal[outIdx] = inReal[todayIdx]; outBegIdx.value = startIdx; return TA_RetCode.TA_SUCCESS; } switch (optInMAType) { case TA_MAType_SMA: retCode = INT_SMA(startIdx, endIdx, inReal, optInTimePeriod, outBegIdx, outNbElement, outReal); break; case TA_MAType_EMA: retCode = INT_EMA(startIdx, endIdx, inReal, optInTimePeriod, ((double) 2.0 / ((double) (optInTimePeriod + 1))), outBegIdx, outNbElement, outReal); break; case TA_MAType_WMA: retCode = WMA(startIdx, endIdx, inReal, optInTimePeriod, outBegIdx, outNbElement, outReal); break; case TA_MAType_DEMA: retCode = DEMA(startIdx, endIdx, inReal, optInTimePeriod, outBegIdx, outNbElement, outReal); break; case TA_MAType_TEMA: retCode = TEMA(startIdx, endIdx, inReal, optInTimePeriod, outBegIdx, outNbElement, outReal); break; case TA_MAType_TRIMA: retCode = TRIMA(startIdx, endIdx, inReal, optInTimePeriod, outBegIdx, outNbElement, outReal); break; case TA_MAType_KAMA: retCode = KAMA(startIdx, endIdx, inReal, optInTimePeriod, outBegIdx, outNbElement, outReal); break; case TA_MAType_MAMA: dummyBuffer = new double[(endIdx - startIdx + 1)]; retCode = MAMA(startIdx, endIdx, inReal, 0.5, 0.05, outBegIdx, outNbElement, outReal, dummyBuffer); ; break; case TA_MAType_T3: retCode = T3(startIdx, endIdx, inReal, optInTimePeriod, 0.7, outBegIdx, outNbElement, outReal); break; default: retCode = TA_RetCode.TA_BAD_PARAM; break; } return retCode; } | 2365 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2365/8c26ea7a2c59f9148f3db0db7ab39ed48689e601/Core.java/buggy/ta-lib/java/src/TA/Lib/Core.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
399,
37,
67,
7055,
1085,
19316,
12,
474,
27108,
16,
509,
679,
4223,
16,
1645,
316,
6955,
63,
6487,
1082,
202,
474,
2153,
382,
26540,
16,
399,
37,
67,
5535,
559,
2153,
382,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
399,
37,
67,
7055,
1085,
19316,
12,
474,
27108,
16,
509,
679,
4223,
16,
1645,
316,
6955,
63,
6487,
1082,
202,
474,
2153,
382,
26540,
16,
399,
37,
67,
5535,
559,
2153,
382,
5... |
write(pad,0,((4 - len+2) & 3)); | public void writeBlobBuffer(byte[] buffer) throws IOException { int len = buffer.length ; // 2 for short for buffer length if (log != null) log.debug("writeBlobBuffer len: " + len); if (len > Short.MAX_VALUE) { throw new IOException(""); //Need a value??? } writeInt(len + 2); writeInt(len + 2); //bizarre but true! three copies of the length write((len >> 0) & 0xff); write((len >> 8) & 0xff); write(buffer, 0, len); if (log != null) log.debug("writeBlobBuffer wrotebuffer bytes: " + len); write(pad,0,((4 - len+2) & 3)); } | 6960 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6960/0c85e5b9e025d1d2fc963451a40165c59f1cd5f4/XdrOutputStream.java/buggy/src/main/org/firebirdsql/jgds/XdrOutputStream.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1045,
9405,
1892,
12,
7229,
8526,
1613,
13,
1216,
1860,
288,
3639,
509,
562,
273,
1613,
18,
2469,
274,
368,
576,
364,
3025,
364,
1613,
769,
3639,
309,
261,
1330,
480,
446,
13... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1045,
9405,
1892,
12,
7229,
8526,
1613,
13,
1216,
1860,
288,
3639,
509,
562,
273,
1613,
18,
2469,
274,
368,
576,
364,
3025,
364,
1613,
769,
3639,
309,
261,
1330,
480,
446,
13... | |
m_ssn.set(this, convert(property), value); | getSsn().set(this, convert(property), value); | public void set(String property, Object value) { validate(true); // all entry points for empty strings need to be converted to null if ("".equals(value)) { value = null; } try { Property prop = getObjectType().getProperty(property); if (prop == null) { throw new PersistenceException ("no such property: " + property + " for " + this); } if (prop.isKeyProperty()) { m_oid.set(property, value); if (m_oid.isInitialized()) { m_ssn.create(this); } } else { m_ssn.set(this, convert(property), value); } } catch (ProtoException pe) { throw PersistenceException.newInstance(pe); } } | 12196 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12196/86c10411236f30a173721038b0c6e4934fe759d0/DataObjectImpl.java/clean/archive/core-platform/src/com/arsdigita/persistence/DataObjectImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
444,
12,
780,
1272,
16,
1033,
460,
13,
288,
3639,
1954,
12,
3767,
1769,
3639,
368,
777,
1241,
3143,
364,
1008,
2064,
1608,
358,
506,
5970,
358,
446,
3639,
309,
261,
3660,
18,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
444,
12,
780,
1272,
16,
1033,
460,
13,
288,
3639,
1954,
12,
3767,
1769,
3639,
368,
777,
1241,
3143,
364,
1008,
2064,
1608,
358,
506,
5970,
358,
446,
3639,
309,
261,
3660,
18,... |
for (int i = 0; i < methods.length; i++) { final PsiMethod method = methods[i]; if (!method.isConstructor()) { | for(final PsiMethod method : methods){ if(!method.isConstructor()){ | private static int calculateTotalMethodCount(PsiClass aClass) { final PsiMethod[] methods = aClass.getMethods(); int totalCount = 0; for (int i = 0; i < methods.length; i++) { final PsiMethod method = methods[i]; if (!method.isConstructor()) { totalCount++; } } return totalCount; } | 17306 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17306/2d46d291193579a7564649b4881c7ea8e02eda5b/AnonymousClassMethodCountInspection.java/buggy/plugins/InspectionGadgets/src/com/siyeh/ig/classmetrics/AnonymousClassMethodCountInspection.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
509,
4604,
5269,
1305,
1380,
12,
52,
7722,
797,
20148,
13,
288,
3639,
727,
453,
7722,
1305,
8526,
2590,
273,
20148,
18,
588,
4712,
5621,
3639,
509,
20578,
273,
374,
31,
3639,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
509,
4604,
5269,
1305,
1380,
12,
52,
7722,
797,
20148,
13,
288,
3639,
727,
453,
7722,
1305,
8526,
2590,
273,
20148,
18,
588,
4712,
5621,
3639,
509,
20578,
273,
374,
31,
3639,
... |
" for arguments (" + signature(args) + ")"); | " for arguments (" + scriptSignature(args) + ")"); | private static void printDebug(String msg, Member member, Object[] args) { if (debug) { System.err.println(" ----- " + msg + member.getDeclaringClass().getName() + "." + signature(member) + " for arguments (" + signature(args) + ")"); } } | 13991 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13991/a66a71b8d7fdff3115a1305db27d683777b6080b/NativeJavaMethod.java/buggy/js/rhino/src/org/mozilla/javascript/NativeJavaMethod.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
918,
1172,
2829,
12,
780,
1234,
16,
8596,
3140,
16,
1033,
8526,
833,
13,
288,
3639,
309,
261,
4148,
13,
288,
5411,
2332,
18,
370,
18,
8222,
2932,
9135,
315,
397,
1234,
397,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
918,
1172,
2829,
12,
780,
1234,
16,
8596,
3140,
16,
1033,
8526,
833,
13,
288,
3639,
309,
261,
4148,
13,
288,
5411,
2332,
18,
370,
18,
8222,
2932,
9135,
315,
397,
1234,
397,
... |
MessageDialogWrapper.showMessageDialog(db, "Can't load scripts: no scope available", "Run", JOptionPane.ERROR_MESSAGE); | MessageDialogWrapper.showMessageDialog(debugGui, "Can't load scripts: no scope available", "Run", JOptionPane.ERROR_MESSAGE); | void load() { Scriptable scope = db.getScope(); if (scope == null) { MessageDialogWrapper.showMessageDialog(db, "Can't load scripts: no scope available", "Run", JOptionPane.ERROR_MESSAGE); } else { String url = getUrl(); if (url != null) { new Thread(new LoadFile(db,scope,url)).start(); } } } | 12376 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12376/7ceadc8e69bfcf427fd421373c750f8de120f15c/Main.java/buggy/js/rhino/toolsrc/org/mozilla/javascript/tools/debugger/Main.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
1262,
1435,
288,
3639,
22780,
2146,
273,
1319,
18,
588,
3876,
5621,
3639,
309,
261,
4887,
422,
446,
13,
288,
5411,
2350,
6353,
3611,
18,
4500,
1079,
6353,
12,
4148,
18070,
16,
315,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
1262,
1435,
288,
3639,
22780,
2146,
273,
1319,
18,
588,
3876,
5621,
3639,
309,
261,
4887,
422,
446,
13,
288,
5411,
2350,
6353,
3611,
18,
4500,
1079,
6353,
12,
4148,
18070,
16,
315,
... |
super.add(drag); | private void init(IWContext iwc) { IWBundle iwb = getBundle(iwc); //details for divs and layout are changed in the stylesheet //initilize stuff super.add(new Text("<!-- idegaweb-module starts -->")); this.containerLayer = new Layer(Layer.DIV); this.containerLayer.setZIndex(this.number); this.containerLayer.setStyleClass("moduleContainer"); //must have a parent before getId super.add(this.containerLayer); String containerId = this.containerLayer.getID(); this.handleAndMenuLayer = new Layer(Layer.DIV); this.handleAndMenuLayer.setStyleClass("moduleHandle"); this.handleAndMenuLayer.setID("handle_"+containerId); this.contentLayer = new Layer(Layer.DIV); this.contentLayer.setStyleClass("moduleContent"); this.contentLayer.setID("content_"+containerId); this.buttonsLayer = new Layer(Layer.DIV); this.buttonsLayer.setStyleClass("moduleButtons"); this.dropAreaLayer = new Layer(Layer.DIV); this.dropAreaLayer.setStyleClass("moduleDropArea"); this.dropAreaLayer.setID("dropArea_"+containerId); this.nameLayer = new Layer(Layer.DIV); this.nameLayer.setStyleClass("moduleName"); this.nameLayer.setID("moduleName_"+containerId); //temporary table solution //because I cannot figure out how do the css so the drop area extends under the button layer but not the name layer Table tempDragDropContainer = new Table(2,1); tempDragDropContainer.setStyleClass("DnDAreaTable"); tempDragDropContainer.setColumnWidth(1,"60"); tempDragDropContainer.setColumnWidth(2,"100%"); tempDragDropContainer.setCellpaddingAndCellspacing(0); //now added in the iwbuilder.js script via Behaviour// Script drag = new Script();// drag.addFunction("", getBuilderLogic().getDraggableScript(containerId,this.nameLayer.getID()));// Script drop = new Script(); drop.addFunction("", getBuilderLogic().getModuleToModuleDroppableScript(containerId, this.dropAreaLayer.getID(),"moduleContainer","moduleDropAreaHover",iwb.getResourcesVirtualPath()+"/services/IWBuilderWS.jws")); //add scripts// super.add(drag); super.add(drop); super.add(new Text("<!-- idegaweb-module ends -->")); //finally add the object to the contentlayer if (this._theObject != null) { Text text = null; if(this.isPresentationObject){ text = new Text(((PresentationObject)this._theObject).getBuilderName(iwc)); } else{ //TODO make this localizable and remove getBuilderName from PO String className = this._theObject.getClass().getName(); int indexOfDot = className.lastIndexOf("."); String objectName = null; if(indexOfDot!=-1){ objectName = className.substring(indexOfDot+1,className.length()); } else{ objectName = className; } text = new Text(objectName); } this.nameLayer.add(text); //TODO change icobjectinstanceid to String String instanceId = BuilderLogic.getInstance().getInstanceId(this._theObject); HiddenInput instanceIdHidden = new HiddenInput("instanceId_"+containerId,instanceId); instanceIdHidden.setID("instanceId_"+containerId); HiddenInput parentIdHidden = new HiddenInput("parentId_"+containerId,this._parentKey); parentIdHidden.setID("parentId_"+containerId); HiddenInput pageIdHidden = new HiddenInput("pageId_"+containerId,BuilderLogic.getInstance().getCurrentIBPage(iwc)); pageIdHidden.setID("pageId_"+containerId); this.containerLayer.add(instanceIdHidden); this.containerLayer.add(parentIdHidden); this.containerLayer.add(pageIdHidden); XMLElement pasted = (XMLElement) iwc.getSessionAttribute(BuilderLogic.CLIPBOARD); if (pasted == null) { this.buttonsLayer.add(getCutIcon(instanceId, this._parentKey, iwc)); this.buttonsLayer.add(getCopyIcon(instanceId, this._parentKey, iwc)); this.buttonsLayer.add(getDeleteIcon(instanceId, this._parentKey, iwc)); this.buttonsLayer.add(getPermissionIcon(instanceId, iwc)); this.buttonsLayer.add(getEditIcon(instanceId, iwc)); } else { this.buttonsLayer.add(getCutIcon(instanceId, this._parentKey, iwc)); this.buttonsLayer.add(getCopyIcon(instanceId, this._parentKey, iwc)); this.buttonsLayer.add(getPasteAboveIcon(instanceId, this._parentKey, iwc)); this.buttonsLayer.add(getDeleteIcon(instanceId, this._parentKey, iwc)); this.buttonsLayer.add(getPermissionIcon(instanceId, iwc)); this.buttonsLayer.add(getEditIcon(instanceId, iwc)); } this.dropAreaLayer.add(this.buttonsLayer); tempDragDropContainer.add(this.nameLayer,1,1); tempDragDropContainer.add(this.dropAreaLayer,2,1); this.containerLayer.add(tempDragDropContainer); this.containerLayer.add(this.contentLayer); //experimental so the box always is around everything this.containerLayer.add(new CSSSpacer()); // handleAndMenuLayer.add(nameLayer);// handleAndMenuLayer.add(buttonsLayer); } else {//object being added is null for some reason! //setup layout this.containerLayer.add(this.handleAndMenuLayer); this.containerLayer.add(this.contentLayer); this.handleAndMenuLayer.add(getDeleteIcon("0", this._parentKey, iwc)); this.handleAndMenuLayer.add(getEditIcon("0", iwc)); } } | 54061 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54061/8d5d670eda53f8e2acef81b2d5f1490d487420c9/IBObjectControl.java/clean/src/java/com/idega/builder/presentation/IBObjectControl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
11365,
815,
416,
264,
18,
1289,
12,
15997,
1769,
918,
9565,
18,
1289,
12,
15997,
1769,
1208,
12,
45,
59,
1042,
9565,
18,
1289,
12,
15997,
1769,
25522,
71,
13,
9565,
18,
1289,
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,
11365,
815,
416,
264,
18,
1289,
12,
15997,
1769,
918,
9565,
18,
1289,
12,
15997,
1769,
1208,
12,
45,
59,
1042,
9565,
18,
1289,
12,
15997,
1769,
25522,
71,
13,
9565,
18,
1289,
12,
... | |
public AID ShowAIDGui(AID agentIdentifier, boolean ed, boolean checkMandatorySlots) { this.out = null; this.editable = ed; this.checkSlots = checkMandatorySlots; if(agentIdentifier == null) this.agentAID = new AID(); else this.agentAID = agentIdentifier; JLabel label; JPanel mainPanel = new JPanel(); mainPanel.setLayout(new BoxLayout(mainPanel,BoxLayout.Y_AXIS)); //Name JPanel namePanel = new JPanel(); namePanel.setLayout(new BoxLayout(namePanel,BoxLayout.X_AXIS)); label = new JLabel("NAME"); label.setPreferredSize(new Dimension(80,26)); label.setMinimumSize(new Dimension(80,26)); label.setMaximumSize(new Dimension(80,26)); namePanel.add(label); isLocalName = new JCheckBox(); isLocalName.setVisible(ed); //if the AID is editable then the checkbox is show otherwise no. isLocalName.setToolTipText("Select if the name is not a GUID."); namePanel.add(isLocalName); nameText = new JTextField(); nameText.setBackground(Color.white); nameText.setText(agentAID.getName()); nameText.setPreferredSize(new Dimension(125,26)); nameText.setMinimumSize(new Dimension(125,26)); nameText.setMaximumSize(new Dimension(125,26)); nameText.setEditable(editable); namePanel.add(nameText); mainPanel.add(namePanel); //Addresses JPanel addressesPanel = new JPanel(); addressesPanel.setLayout(new BorderLayout()); addressesPanel.setBorder(BorderFactory.createTitledBorder("Addresses")); addressListPanel = new VisualStringList(agentAID.getAllAddresses(),parentGUI); addressListPanel.setDimension(new Dimension(200,40)); addressListPanel.setEnabled(editable); addressesPanel.add(addressListPanel); mainPanel.add(addressesPanel); //Resolvers JPanel resolversPanel = new JPanel(); resolversPanel.setLayout(new BorderLayout()); resolversPanel.setBorder(BorderFactory.createTitledBorder("Resolvers")); resolverListPanel = new VisualAIDList(agentAID.getAllResolvers(),parentGUI); resolverListPanel.setDimension(new Dimension(200,40)); resolverListPanel.setEnabled(editable); resolverListPanel.setCheckMandatorySlots(checkMandatorySlots); resolversPanel.add(resolverListPanel); mainPanel.add(resolversPanel); //Properties JPanel propertiesPanel = new JPanel(); propertiesPanel.setLayout(new BorderLayout()); propertiesPanel.setBorder(BorderFactory.createTitledBorder("Properties")); propertiesListPanel = new VisualPropertiesList(agentAID.getAllUserDefinedSlot(),parentGUI); propertiesListPanel.setDimension(new Dimension(200,40)); propertiesListPanel.setEnabled(editable); propertiesPanel.add(propertiesListPanel); mainPanel.add(propertiesPanel); //Button Ok-Cancel JPanel buttonPanel = new JPanel(); buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.X_AXIS)); JButton okButton = new JButton("OK"); okButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { String param = (String)e.getActionCommand(); if(param.equals("OK")) { if(editable) { String name = (nameText.getText()).trim(); if (checkSlots) if (name.length() == 0) { JOptionPane.showMessageDialog(thisGUI,"AID must have a non-empty name.","Error Message",JOptionPane.ERROR_MESSAGE); return; } out = new AID(); if(isLocalName.isSelected()) out.setLocalName(name); else out.setName(name); //addresses Enumeration addresses = addressListPanel.getContent(); while(addresses.hasMoreElements()) out.addAddresses((String)addresses.nextElement()); //resolvers Enumeration resolvers = resolverListPanel.getContent(); while(resolvers.hasMoreElements()) out.addResolvers((AID)resolvers.nextElement()); //Properties Properties new_prop = propertiesListPanel.getContentProperties(); Enumeration key_en = new_prop.propertyNames(); while(key_en.hasMoreElements()) { String key = (String)key_en.nextElement(); out.addUserDefinedSlot(key, new_prop.getProperty(key)); } } else out = agentAID; dispose(); } } }); buttonPanel.add(okButton); if(editable) { JButton cancelButton = new JButton("Cancel"); cancelButton.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent e) { String param = e.getActionCommand(); if(param.equals("Cancel")) { out = null; dispose(); } } }); buttonPanel.add(cancelButton); } mainPanel.add(buttonPanel); getContentPane().add(mainPanel, BorderLayout.CENTER); pack(); setResizable(false); setModal(true); //setVisible(true); ShowCorrect(); return out; } | 5505 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5505/ad924c3d04e4f347c7ea98a9308ba643a00b946b/AIDGui.java/buggy/src/jade/gui/AIDGui.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
202,
482,
432,
734,
9674,
37,
734,
18070,
12,
37,
734,
4040,
3004,
16,
1250,
1675,
16,
1250,
866,
49,
10018,
16266,
13,
225,
202,
95,
3196,
225,
333,
18,
659,
273,
446,
31,
3196,
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,
282,
202,
482,
432,
734,
9674,
37,
734,
18070,
12,
37,
734,
4040,
3004,
16,
1250,
1675,
16,
1250,
866,
49,
10018,
16266,
13,
225,
202,
95,
3196,
225,
333,
18,
659,
273,
446,
31,
3196,
202,... | ||
public Object clone() throws CloneNotSupportedException { | public Object clone() { | public Object clone() throws CloneNotSupportedException { Object clone = null; try { clone = super.clone(); } catch (Exception exception) { exception.printStackTrace(System.err); } if (point2d != null) { ((Atom)clone).setPoint2d(new Point2d(point2d.x, point2d.y)); } if (point3d != null) { ((Atom)clone).setPoint3d(new Point3d(point3d.x, point3d.y, point3d.z)); } if (fractionalPoint3d != null) { ((Atom)clone).setFractionalPoint3d(new Point3d(fractionalPoint3d.x, fractionalPoint3d.y, fractionalPoint3d.z)); } return clone; } | 46046 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46046/b9ce725c806d0d5ec8a14eb18a4b2f66906d8fb7/Atom.java/buggy/src/org/openscience/cdk/Atom.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
1033,
3236,
1435,
288,
5411,
1033,
3236,
273,
446,
31,
5411,
775,
288,
7734,
3236,
273,
2240,
18,
14056,
5621,
5411,
289,
1044,
261,
503,
1520,
13,
288,
7734,
1520,
18,
1188,
6332,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1033,
3236,
1435,
288,
5411,
1033,
3236,
273,
446,
31,
5411,
775,
288,
7734,
3236,
273,
2240,
18,
14056,
5621,
5411,
289,
1044,
261,
503,
1520,
13,
288,
7734,
1520,
18,
1188,
6332,
... |
Platform.run(new SafeRunnable(WorkbenchMessages.format("DecoratorManager.ErrorActivatingDecorator", new String[] { getName()})) { | Platform.run(new ISafeRunnable() { | protected ILightweightLabelDecorator internalGetDecorator() throws CoreException { if (labelProviderCreationFailed) return null; final CoreException[] exceptions = new CoreException[1]; if (decorator == null) { if (definingElement.getAttribute(WizardsRegistryReader.ATT_CLASS) == null) decorator = new DeclarativeDecorator(definingElement, iconLocation); else { Platform.run(new SafeRunnable(WorkbenchMessages.format("DecoratorManager.ErrorActivatingDecorator", new String[] { getName()})) { //$NON-NLS-1$ public void run() { try { decorator = ( ILightweightLabelDecorator) WorkbenchPlugin .createExtension( definingElement, WizardsRegistryReader.ATT_CLASS); decorator.addListener( WorkbenchPlugin .getDefault() .getDecoratorManager()); } catch (CoreException exception) { exceptions[0] = exception; } } }); } } else return decorator; if (decorator == null) { this.labelProviderCreationFailed = true; setEnabled(false); } if (exceptions[0] != null) throw exceptions[0]; return decorator; } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/bfa7f5ee6406817348030553ccdf3ea916ee7372/LightweightDecoratorDefinition.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/decorators/LightweightDecoratorDefinition.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
467,
12128,
4865,
2224,
10361,
2713,
967,
10361,
1435,
202,
202,
15069,
30015,
288,
202,
202,
430,
261,
1925,
2249,
9906,
2925,
13,
1082,
202,
2463,
446,
31,
202,
202,
6385,
30... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
467,
12128,
4865,
2224,
10361,
2713,
967,
10361,
1435,
202,
202,
15069,
30015,
288,
202,
202,
430,
261,
1925,
2249,
9906,
2925,
13,
1082,
202,
2463,
446,
31,
202,
202,
6385,
30... |
boolean messageDeletionsInBatch = false; boolean messageUpdatesInBatch = false; | protected void handleBeforeRollback(List refsToAdd, Transaction tx) throws Exception { //remove refs marked with + //and update rows marked with - to C PreparedStatement psDeleteMessage = null; PreparedStatement psUpdateMessage = null; Connection conn = null; TransactionWrapper wrap = new TransactionWrapper(); List refs = new ArrayList(refsToAdd.size()); Iterator iter = refsToAdd.iterator(); while (iter.hasNext()) { ChannelRefPair pair = (ChannelRefPair)iter.next(); refs.add(pair.ref); } orderReferences(refs); List removesToReverse = new ArrayList(); try { this.getLocks(refs); conn = ds.getConnection(); rollbackPreparedTransaction(tx, conn); iter = refsToAdd.iterator(); boolean batch = usingBatchUpdates && refsToAdd.size() > 1; boolean messageDeletionsInBatch = false; boolean messageUpdatesInBatch = false; if (batch) { psDeleteMessage = conn.prepareStatement(getSQLStatement("DELETE_MESSAGE")); psUpdateMessage = conn.prepareStatement(getSQLStatement("UPDATE_MESSAGE_CHANNELCOUNT")); } while (iter.hasNext()) { ChannelRefPair pair = (ChannelRefPair) iter.next(); if (!batch) { psDeleteMessage = conn.prepareStatement(getSQLStatement("DELETE_MESSAGE")); psUpdateMessage = conn.prepareStatement(getSQLStatement("UPDATE_MESSAGE_CHANNELCOUNT")); } Message m = pair.ref.getMessage(); //We may need to remove the message for messages added during the prepare stage m.decPersistentChannelCount(); removesToReverse.add(pair.ref); boolean removed; if (m.getPersistentChannelCount() == 0) { //remove message removeMessage(m, psDeleteMessage); removed = true; } else { //update message channel count updateMessageChannelCount(m, psUpdateMessage); removed = false; } if (batch) { if (removed) { psDeleteMessage.addBatch(); messageDeletionsInBatch = true; } else { psUpdateMessage.addBatch(); messageUpdatesInBatch = true; } } else { if (removed) { int rows = psDeleteMessage.executeUpdate(); if (trace) { log.trace("deleted " + rows + " rows"); } } else { int rows = psUpdateMessage.executeUpdate(); if (trace) { log.trace("updated " + rows + " rows"); } } psDeleteMessage.close(); psDeleteMessage = null; psUpdateMessage.close(); psUpdateMessage = null; } } if (batch) { if (messageDeletionsInBatch) { int[] rows = psDeleteMessage.executeBatch(); if (trace) { logBatchUpdate(getSQLStatement("DELETE_MESSAGE"), rows, "deleted"); } psDeleteMessage.close(); psDeleteMessage = null; } if (messageUpdatesInBatch) { int[] rows = psUpdateMessage.executeBatch(); if (trace) { logBatchUpdate(getSQLStatement("UPDATE_MESSAGE_CHANNELCOUNT"), rows, "updated"); } psUpdateMessage.close(); psUpdateMessage = null; } } } catch (Exception e) { wrap.exceptionOccurred(); throw e; } finally { if (psDeleteMessage != null) { try { psDeleteMessage.close(); } catch (Throwable t) { } } if (psUpdateMessage != null) { try { psUpdateMessage.close(); } catch (Throwable t) { } } if (conn != null) { try { conn.close(); } catch (Throwable e) { } } try { wrap.end(); } finally { if (wrap.isFailed()) { //reverse any removes this.incPersistentCounts(removesToReverse); } //release locks this.releaseLocks(refs); } } } | 3806 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3806/c76bb6fc248174ae054686357cd08c7ff1cdbb75/JDBCPersistenceManager.java/clean/src/main/org/jboss/messaging/core/plugin/JDBCPersistenceManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
4750,
918,
1640,
4649,
12703,
12,
682,
9047,
13786,
16,
5947,
2229,
13,
1216,
1185,
282,
288,
1377,
368,
4479,
9047,
9350,
598,
397,
1377,
368,
464,
1089,
2595,
9350,
598,
300,
358,
385,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
4750,
918,
1640,
4649,
12703,
12,
682,
9047,
13786,
16,
5947,
2229,
13,
1216,
1185,
282,
288,
1377,
368,
4479,
9047,
9350,
598,
397,
1377,
368,
464,
1089,
2595,
9350,
598,
300,
358,
385,
... | |
throw new CmsException("["+this.getClass().getName()+"] "+e.getMessage(),CmsException.C_SQL_ERROR, e); | throw new CmsException("["+this.getClass().getName()+"] "+e.getMessage(),CmsException.C_SQL_ERROR, e); | protected byte[] readFileContent(int fileId) throws CmsException { //System.out.println("PL/SQL: readFileContent"); PreparedStatement statement = null; Connection con = null; ResultSet res = null; byte[] returnValue = null; try { // read fileContent from database con = DriverManager.getConnection(m_poolName); statement = con.prepareStatement(m_cq.C_FILE_READ); statement.setInt(1,fileId); res = statement.executeQuery(); if (res.next()) { oracle.sql.BLOB blob = ((OracleResultSet) res).getBLOB(m_cq.C_FILE_CONTENT); byte[] content = new byte[(int) blob.length()]; content = blob.getBytes(1, (int) blob.length()); returnValue = content;// output for testing:// String out_buffer = new String(content);// System.out.println(out_buffer); } else { throw new CmsException("["+this.getClass().getName()+"]"+fileId,CmsException.C_NOT_FOUND); } } catch (SQLException e){ throw new CmsException("["+this.getClass().getName()+"] "+e.getMessage(),CmsException.C_SQL_ERROR, e); }finally { if (res != null) { try { res.close(); } catch (SQLException se) { } } if( statement != null) { try { statement.close(); } catch (SQLException exc) { } } if (con != null) { try { con.close(); } catch (SQLException se) { } } } return returnValue; } | 51784 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51784/2650e41d0ec3cf443ac9d32172a68296418865b7/CmsDbAccess.java/clean/src/com/opencms/file/oracleplsql/CmsDbAccess.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
1160,
8526,
10413,
1350,
12,
474,
21223,
13,
202,
202,
15069,
11228,
288,
202,
202,
759,
3163,
18,
659,
18,
8222,
2932,
6253,
19,
3997,
30,
10413,
1350,
8863,
202,
202,
29325,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1160,
8526,
10413,
1350,
12,
474,
21223,
13,
202,
202,
15069,
11228,
288,
202,
202,
759,
3163,
18,
659,
18,
8222,
2932,
6253,
19,
3997,
30,
10413,
1350,
8863,
202,
202,
29325,
... |
myResult = new FieldEvaluator(myResult, type.getCanonicalText(), name); | myResult = new FieldEvaluator(myResult, JVMNameUtil.getJVMQualifiedName(type), name); | public void visitReferenceExpression(PsiReferenceExpression expression) { if (LOG.isDebugEnabled()) { LOG.debug("visitReferenceExpression " + expression); } PsiExpression qualifier = expression.getQualifierExpression(); PsiElement element = expression.resolve(); if (element instanceof PsiLocalVariable || element instanceof PsiParameter) { //synthetic variable final PsiFile containingFile = element.getContainingFile(); if(containingFile instanceof PsiCodeFragment && myCurrentFragmentEvaluator != null && myVisitedFragments.contains(((PsiCodeFragment)containingFile))) { // psiVariable may live in PsiCodeFragment not only in debugger editors, for example Fabrique has such variables. // So treat it as synthetic var only when this code fragment is located in DebuggerEditor, // that's why we need to check that containing code fragment is the one we visited myResult = new SyntheticVariableEvaluator(myCurrentFragmentEvaluator, ((PsiVariable)element).getName()); return; } // local variable PsiVariable psiVar = (PsiVariable)element; String localName = psiVar.getName(); PsiClass variableClass = getContainingClass(psiVar); if (getContextPsiClass() == null || getContextPsiClass().equals(variableClass)) { myResult = new LocalVariableEvaluator(localName, ContextUtil.isJspImplicit(element)); return; } // the expression references final var outside the context's class (in some of the outer classes) int iterationCount = 0; PsiClass aClass = getOuterClass(getContextPsiClass()); while (aClass != null && !aClass.equals(variableClass)) { iterationCount++; aClass = getOuterClass(aClass); } if (aClass != null) { if(psiVar.getInitializer() != null) { Object value = psiVar.getManager().getConstantEvaluationHelper().computeConstantExpression(psiVar.getInitializer()); if(value != null) { myResult = new LiteralEvaluator(value, psiVar.getType().getCanonicalText()); return; } } Evaluator objectEvaluator = new ThisEvaluator(iterationCount); //noinspection HardCodedStringLiteral myResult = new FieldEvaluator(objectEvaluator, getContextPsiClass().getQualifiedName(), "val$" + localName); return; } throw new EvaluateRuntimeException(EvaluateExceptionUtil.createEvaluateException( DebuggerBundle.message("evaluation.error.local.variable.missing.from.class.closure", localName)) ); } else if (element instanceof PsiField) { PsiField psiField = (PsiField)element; PsiClass fieldClass = psiField.getContainingClass(); if(fieldClass == null) { throw new EvaluateRuntimeException(EvaluateExceptionUtil.createEvaluateException( DebuggerBundle.message("evaluation.error.cannot.resolve.field.class", psiField.getName()))); } Evaluator objectEvaluator; if (psiField.hasModifierProperty(PsiModifier.STATIC)) { objectEvaluator = new TypeEvaluator(JVMNameUtil.getJVMQualifiedName(fieldClass)); } else if(qualifier != null) { qualifier.accept(this); objectEvaluator = myResult; } else if (fieldClass.equals(getContextPsiClass()) || getContextPsiClass().isInheritor(fieldClass, true)) { objectEvaluator = new ThisEvaluator(); } else { // myContextPsiClass != fieldClass && myContextPsiClass is not a subclass of fieldClass int iterationCount = 0; PsiClass aClass = getContextPsiClass(); while (aClass != null && !(aClass.equals(fieldClass) || aClass.isInheritor(fieldClass, true))) { iterationCount++; aClass = getOuterClass(aClass); } if (aClass == null) { throw new EvaluateRuntimeException(EvaluateExceptionUtil.createEvaluateException( DebuggerBundle.message("evaluation.error.cannot.sources.for.field.class", psiField.getName()))); } objectEvaluator = new ThisEvaluator(iterationCount); } myResult = new FieldEvaluator(objectEvaluator, fieldClass.getQualifiedName(), psiField.getName()); } else { //let's guess what this could be PsiElement nameElement = expression.getReferenceNameElement(); // get "b" part String name; if (nameElement instanceof PsiIdentifier) { name = nameElement.getText(); } else { //noinspection HardCodedStringLiteral final String elementDisplayString = (nameElement != null ? nameElement.getText() : "(null)"); throw new EvaluateRuntimeException(EvaluateExceptionUtil.createEvaluateException( DebuggerBundle.message("evaluation.error.identifier.expected", elementDisplayString))); } if(qualifier != null) { final PsiElement qualifierTarget = (qualifier instanceof PsiReferenceExpression) ? ((PsiReferenceExpression)qualifier).resolve() : null; if (qualifierTarget instanceof PsiClass) { // this is a call to a 'static' field PsiClass psiClass = (PsiClass)qualifierTarget; myResult = new FieldEvaluator(new TypeEvaluator(JVMNameUtil.getJVMQualifiedName(psiClass)), psiClass.getQualifiedName(), name); } else { PsiType type = qualifier.getType(); if(type == null) throw new EvaluateRuntimeException(EvaluateExceptionUtil.createEvaluateException( DebuggerBundle.message("evaluation.error.qualifier.type.unknown", qualifier.getText())) ); qualifier.accept(this); if (myResult == null) { throw new EvaluateRuntimeException(EvaluateExceptionUtil.createEvaluateException( DebuggerBundle.message("evaluation.error.cannot.evaluate.qualifier", qualifier.getText())) ); } myResult = new FieldEvaluator(myResult, type.getCanonicalText(), name); } } else { myResult = new LocalVariableEvaluator(name, false); } } } | 17306 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17306/d9d82a5455e33c5fbaa5b9ebd016d08c54249284/EvaluatorBuilderImpl.java/buggy/debugger/impl/com/intellij/debugger/engine/evaluation/expression/EvaluatorBuilderImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
3757,
2404,
2300,
12,
52,
7722,
2404,
2300,
2652,
13,
288,
1377,
309,
261,
4842,
18,
291,
2829,
1526,
10756,
288,
3639,
2018,
18,
4148,
2932,
11658,
2404,
2300,
315,
397,
2652,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2404,
2300,
12,
52,
7722,
2404,
2300,
2652,
13,
288,
1377,
309,
261,
4842,
18,
291,
2829,
1526,
10756,
288,
3639,
2018,
18,
4148,
2932,
11658,
2404,
2300,
315,
397,
2652,... |
process = null; | public synchronized void stop() { watch = false; notifyAll(); process = null; } | 506 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/506/da10e54de9442a412e0bd1ccf9cf235f49e6c2b7/ExecuteWatchdog.java/buggy/src/main/org/apache/tools/ant/taskdefs/ExecuteWatchdog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3852,
918,
2132,
1435,
288,
3639,
4267,
273,
629,
31,
3639,
5066,
1595,
5621,
6647,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3852,
918,
2132,
1435,
288,
3639,
4267,
273,
629,
31,
3639,
5066,
1595,
5621,
6647,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
private void parse(final URL url) throws IOException { final StreamTokenizer in = new StreamTokenizer(new InputStreamReader( url.openStream())); | private void parse(final URL url) throws IOException { final StreamTokenizer in = new StreamTokenizer(new InputStreamReader(url.openStream())); | private void parse(final URL url) throws IOException { final StreamTokenizer in = new StreamTokenizer(new InputStreamReader( url.openStream())); in.resetSyntax(); in.slashSlashComments(true); in.slashStarComments(true); in.wordChars('A', 'Z'); in.wordChars('a', 'z'); in.wordChars('0', '9'); in.wordChars('.', '.'); in.wordChars('_', '_'); in.wordChars('$', '$'); in.whitespaceChars(' ', ' '); in.whitespaceChars('\t', '\t'); in.whitespaceChars('\f', '\f'); in.whitespaceChars('\n', '\n'); in.whitespaceChars('\r', '\r'); in.quoteChar('\''); in.quoteChar('"'); int tok; int state = STATE_BEGIN; List keystores = new LinkedList(); URL currentBase = null; List currentCerts = new LinkedList(); Permissions currentPerms = new Permissions(); while ((tok = in.nextToken()) != StreamTokenizer.TT_EOF) { switch (tok) { case '{': if (state != STATE_GRANT) error(url, in, "spurious '{'"); state = STATE_PERMS; tok = in.nextToken(); break; case '}': if (state != STATE_PERMS) error(url, in, "spurious '}'"); state = STATE_BEGIN; currentPerms.setReadOnly(); Certificate[] c = null; if (!currentCerts.isEmpty()) c = (Certificate[]) currentCerts .toArray(new Certificate[ currentCerts.size()]); cs2pc.put(new CodeSource(currentBase, c), currentPerms); currentCerts.clear(); currentPerms = new Permissions(); currentBase = null; tok = in.nextToken(); if (tok != ';') in.pushBack(); continue; } if (tok != StreamTokenizer.TT_WORD) { error(url, in, "expecting word token"); } // keystore "<keystore-path>" [',' "<keystore-type>"] ';' if (in.sval.equalsIgnoreCase("keystore")) { String alg = KeyStore.getDefaultType(); tok = in.nextToken(); if (tok != '"' && tok != '\'') error(url, in, "expecting key store URL"); String store = in.sval; tok = in.nextToken(); if (tok == ',') { tok = in.nextToken(); if (tok != '"' && tok != '\'') error(url, in, "expecting key store type"); alg = in.sval; tok = in.nextToken(); } if (tok != ';') error(url, in, "expecting semicolon"); try { KeyStore keystore = KeyStore.getInstance(alg); keystore.load(new URL(url, store).openStream(), null); keystores.add(keystore); } catch (Exception x) { error(url, in, x.toString()); } } else if (in.sval.equalsIgnoreCase("grant")) { if (state != STATE_BEGIN) error(url, in, "extraneous grant keyword"); state = STATE_GRANT; } else if (in.sval.equalsIgnoreCase("signedBy")) { if (state != STATE_GRANT && state != STATE_PERMS) error(url, in, "spurious 'signedBy'"); if (keystores.isEmpty()) error(url, in, "'signedBy' with no keystores"); tok = in.nextToken(); if (tok != '"' && tok != '\'') error(url, in, "expecting signedBy name"); StringTokenizer st = new StringTokenizer(in.sval, ","); while (st.hasMoreTokens()) { String alias = st.nextToken(); for (Iterator it = keystores.iterator(); it.hasNext();) { KeyStore keystore = (KeyStore) it.next(); try { if (keystore.isCertificateEntry(alias)) currentCerts.add(keystore .getCertificate(alias)); } catch (KeyStoreException kse) { error(url, in, kse.toString()); } } } tok = in.nextToken(); if (tok != ',') { if (state != STATE_GRANT) error(url, in, "spurious ','"); in.pushBack(); } } else if (in.sval.equalsIgnoreCase("codeBase")) { if (state != STATE_GRANT) error(url, in, "spurious 'codeBase'"); tok = in.nextToken(); if (tok != '"' && tok != '\'') error(url, in, "expecting code base URL"); String base = expand(in.sval); if (File.separatorChar != '/') base = base.replace(File.separatorChar, '/'); try { currentBase = new URL(base); } catch (MalformedURLException mue) { error(url, in, mue.toString()); } tok = in.nextToken(); if (tok != ',') in.pushBack(); } else if (in.sval.equalsIgnoreCase("principal")) { if (state != STATE_GRANT) error(url, in, "spurious 'principal'"); tok = in.nextToken(); if (tok == StreamTokenizer.TT_WORD) { tok = in.nextToken(); if (tok != '"' && tok != '\'') error(url, in, "expecting principal name"); String name = in.sval; Principal p = null; try { Class pclass = Class.forName(in.sval); Constructor c = pclass .getConstructor(new Class[] { String.class}); p = (Principal) c.newInstance(new Object[] { name}); } catch (Exception x) { error(url, in, x.toString()); } for (Iterator it = keystores.iterator(); it.hasNext();) { KeyStore ks = (KeyStore) it.next(); try { for (Enumeration e = ks.aliases(); e .hasMoreElements();) { String alias = (String) e.nextElement(); if (ks.isCertificateEntry(alias)) { Certificate cert = ks.getCertificate(alias); if (!(cert instanceof X509Certificate)) continue; if (p.equals(((X509Certificate) cert) .getSubjectDN()) || p .equals(((X509Certificate) cert) .getSubjectX500Principal())) currentCerts.add(cert); } } } catch (KeyStoreException kse) { error(url, in, kse.toString()); } } } else if (tok == '"' || tok == '\'') { String alias = in.sval; for (Iterator it = keystores.iterator(); it.hasNext();) { KeyStore ks = (KeyStore) it.next(); try { if (ks.isCertificateEntry(alias)) currentCerts.add(ks.getCertificate(alias)); } catch (KeyStoreException kse) { error(url, in, kse.toString()); } } } else error(url, in, "expecting principal"); tok = in.nextToken(); if (tok != ',') in.pushBack(); } else if (in.sval.equalsIgnoreCase("permission")) { if (state != STATE_PERMS) error(url, in, "spurious 'permission'"); tok = in.nextToken(); if (tok != StreamTokenizer.TT_WORD) error(url, in, "expecting permission class name"); String className = in.sval; Class clazz = null; try { clazz = Class.forName(className); } catch (ClassNotFoundException cnfe) { } tok = in.nextToken(); if (tok == ';') { if (clazz == null) { currentPerms.add(new UnresolvedPermission(className, null, null, (Certificate[]) currentCerts .toArray(new Certificate[ 0]))); continue; } try { currentPerms.add((Permission) clazz.newInstance()); } catch (Exception x) { error(url, in, x.toString()); } continue; } if (tok != '"' && tok != '\'') error(url, in, "expecting permission target"); String target = expand(in.sval); tok = in.nextToken(); if (tok == ';') { if (clazz == null) { currentPerms.add(new UnresolvedPermission(className, target, null, (Certificate[]) currentCerts .toArray(new Certificate[ 0]))); continue; } try { Constructor c = clazz .getConstructor(new Class[] { String.class}); currentPerms.add((Permission) c .newInstance(new Object[] { target})); } catch (Exception x) { error(url, in, x.toString()); } continue; } if (tok != ',') error(url, in, "expecting ','"); tok = in.nextToken(); if (tok == StreamTokenizer.TT_WORD) { if (!in.sval.equalsIgnoreCase("signedBy")) error(url, in, "expecting 'signedBy'"); try { Constructor c = clazz .getConstructor(new Class[] { String.class}); currentPerms.add((Permission) c .newInstance(new Object[] { target})); } catch (Exception x) { error(url, in, x.toString()); } in.pushBack(); continue; } if (tok != '"' && tok != '\'') error(url, in, "expecting permission action"); String action = in.sval; if (clazz == null) { currentPerms.add(new UnresolvedPermission(className, target, action, (Certificate[]) currentCerts .toArray(new Certificate[ 0]))); continue; } else { try { Constructor c = clazz.getConstructor(new Class[] { String.class, String.class}); currentPerms.add((Permission) c .newInstance(new Object[] { target, action})); } catch (Exception x) { error(url, in, x.toString()); } } tok = in.nextToken(); if (tok != ';' && tok != ',') error(url, in, "expecting ';' or ','"); } } } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/a7d00a0887a14efd1decaed4a9310cdaa2e752aa/PolicyFile.java/buggy/core/src/classpath/gnu/gnu/java/security/PolicyFile.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1109,
12,
6385,
1976,
880,
13,
1216,
1860,
288,
3639,
727,
3961,
10524,
316,
273,
394,
3961,
10524,
12,
2704,
15322,
12,
7734,
880,
18,
3190,
1228,
1435,
10019,
3639,
316,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1109,
12,
6385,
1976,
880,
13,
1216,
1860,
288,
3639,
727,
3961,
10524,
316,
273,
394,
3961,
10524,
12,
2704,
15322,
12,
7734,
880,
18,
3190,
1228,
1435,
10019,
3639,
316,
18,
... |
_watchTable.setDefaultEditor(_watchTable.getColumnClass(0), new WatchEditor()); _watchTable.setDefaultRenderer(_watchTable.getColumnClass(0), new WatchRenderer()); | _watchTable.setDefaultEditor(_watchTable.getColumnClass(0), new WatchEditor()); _watchTable.setDefaultRenderer(_watchTable.getColumnClass(0), new WatchRenderer()); | private void _initWatchTable() { _watchTable = new JTable( new WatchTableModel()); _watchTable.setDefaultEditor(_watchTable.getColumnClass(0), new WatchEditor()); _watchTable.setDefaultRenderer(_watchTable.getColumnClass(0), new WatchRenderer()); _leftPane.addTab("Watches", new JScrollPane(_watchTable)); } | 11192 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11192/db91dcc7aa4674cfe5508cd82ff717a758a32bca/DebugPanel.java/clean/drjava/src/edu/rice/cs/drjava/ui/DebugPanel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
389,
2738,
5234,
1388,
1435,
288,
565,
389,
7585,
1388,
273,
394,
804,
1388,
12,
394,
9736,
1388,
1488,
10663,
565,
389,
7585,
1388,
18,
542,
1868,
6946,
24899,
7585,
1388,
18,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
389,
2738,
5234,
1388,
1435,
288,
565,
389,
7585,
1388,
273,
394,
804,
1388,
12,
394,
9736,
1388,
1488,
10663,
565,
389,
7585,
1388,
18,
542,
1868,
6946,
24899,
7585,
1388,
18,... |
return tokens.elements(); | if(lastToken != null) { lastToken.nextValid = false; return firstToken; } else return null; | public Enumeration markTokens(String line, int lineIndex) { ensureCapacity(lineIndex); String token = lineIndex == 0 ? null : lineInfo[lineIndex - 1]; tokens.removeAllElements(); int lastOffset = 0; int length = line.length();loop: for(int i = 0; i < length; i++) { char c = line.charAt(i); if(token == COMMAND) { if(!Character.isLetter(c)) { token = null; tokens.addElement(new JSToken(line .substring(lastOffset,i + 1),COMMAND)); lastOffset = i + 1; continue; } } switch(c) { case '%': if(i != 0 && line.charAt(i - 1) == '\\') break; tokens.addElement(new JSToken(line.substring( lastOffset,i),token)); tokens.addElement(new JSToken(line.substring(i), COMMENT)); lastOffset = length; break loop; case '\\': if(token == null) { token = COMMAND; tokens.addElement(new JSToken(line .substring(lastOffset,i),null)); lastOffset = i; } break; case '$': if(token == null) // singe $ { token = FORMULA; tokens.addElement(new JSToken(line .substring(lastOffset,i),null)); lastOffset = i; } else if(token == COMMAND) // \...$ { token = FORMULA; tokens.addElement(new JSToken(line .substring(lastOffset,i), COMMAND)); lastOffset = i; } else if(token == FORMULA) // $$aaa { if(i != 0 && line.charAt(i - 1) == '$') { token = BDFORMULA; break; } token = null; tokens.addElement(new JSToken(line .substring(lastOffset,i + 1), FORMULA)); lastOffset = i + 1; } else if(token == BDFORMULA) // $$aaa$ { token = EDFORMULA; } else if(token == EDFORMULA) // $$aaa$$ { token = null; tokens.addElement(new JSToken(line .substring(lastOffset,i + 1), FORMULA)); lastOffset = i + 1; } break; } } if(lastOffset != length) tokens.addElement(new JSToken(line.substring( lastOffset,length),token)); lineInfo[lineIndex] = (token == FORMULA || token == BDFORMULA || token == EDFORMULA) ? token : null; lastLine = lineIndex; return tokens.elements(); } | 6564 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6564/b69ef3aa1d645f6c297aa60629214d16914c66ff/TeXTokenMarker.java/clean/org/gjt/sp/jedit/syntax/TeXTokenMarker.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
13864,
2267,
5157,
12,
780,
980,
16,
509,
980,
1016,
13,
202,
95,
202,
202,
15735,
7437,
12,
1369,
1016,
1769,
202,
202,
780,
1147,
273,
980,
1016,
422,
374,
692,
446,
294,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
13864,
2267,
5157,
12,
780,
980,
16,
509,
980,
1016,
13,
202,
95,
202,
202,
15735,
7437,
12,
1369,
1016,
1769,
202,
202,
780,
1147,
273,
980,
1016,
422,
374,
692,
446,
294,
... |
if(email.equals("") || userLastname.equals("") | if(email.equals("") || userLastname.equals("") | public byte[] getContent(CmsObject cms, String templateFile, String elementName, Hashtable parameters, String templateSelector) throws CmsException { if(C_DEBUG && A_OpenCms.isLogging()) { A_OpenCms.log(C_OPENCMS_DEBUG, this.getClassName() + "getting content of element " + ((elementName == null) ? "<root>" : elementName)); A_OpenCms.log(C_OPENCMS_DEBUG, this.getClassName() + "template file is: " + templateFile); A_OpenCms.log(C_OPENCMS_DEBUG, this.getClassName() + "selected template section is: " + ((templateSelector == null) ? "<default>" : templateSelector)); } I_CmsSession session = cms.getRequestContext().getSession(true); CmsRequestContext reqCont = cms.getRequestContext(); CmsXmlWpTemplateFile xmlTemplateDocument = new CmsXmlWpTemplateFile(cms, templateFile); boolean userYetChanged = true; boolean userYetEstablished = true; // find out which template (=perspective) should be used String perspective = (String)parameters.get("perspective"); if(perspective != null && perspective.equals("user")) { session.removeValue("ERROR"); if(reqCont.getRequest().getParameter("CHANGE") != null) { // change data of selected user perspective = "changeuser"; userYetChanged = false; } else { if(reqCont.getRequest().getParameter("DELETE") != null) { // delete the selected user perspective = "deleteuser"; } else { if(reqCont.getRequest().getParameter("NEW") != null) { // establish a new user perspective = "newuser"; userYetEstablished = false; } } } } if(perspective == null) { // display the first template, which lets you chose the action perspective = new String("user"); } if(perspective.equals("newuser") || perspective.equals("changeuser")) { // first the common part of the two actions: // read the common parameters like first name, description, ... String firstname, desc, street, pwd, pwd2, user, userLastname, town, zipcode, email, defaultGroup; if(session.getValue("ERROR") == null) { firstname = (String)parameters.get("USERFIRSTNAME"); desc = (String)parameters.get("USERDESC"); street = (String)parameters.get("USERSTREET"); pwd = (String)parameters.get("PWD"); pwd2 = (String)parameters.get("PWD2"); user = (String)parameters.get("USER"); userLastname = (String)parameters.get("USERNAME"); town = (String)parameters.get("TOWN"); zipcode = (String)parameters.get("ZIP"); email = (String)parameters.get("USEREMAIL"); defaultGroup = (String)parameters.get("DEFAULTGROUP"); } else { // an error has occurred before, retrieve the form data from the session firstname = (String)session.getValue("USERFIRSTNAME"); desc = (String)session.getValue("USERDESC"); street = (String)session.getValue("USERSTREET"); pwd = (String)session.getValue("PWD"); pwd2 = (String)session.getValue("PWD2"); user = (String)session.getValue("USER"); userLastname = (String)session.getValue("USERNAME"); town = (String)session.getValue("TOWN"); zipcode = (String)session.getValue("ZIP"); email = (String)session.getValue("USEREMAIL"); defaultGroup = (String)session.getValue("DEFAULTGROUP"); session.removeValue("ERROR"); } if(firstname == null) { firstname = ""; } if(desc == null) { desc = ""; } if(street == null) { street = ""; } if(pwd == null) { pwd = ""; } if(pwd2 == null) { pwd2 = ""; } if(user == null) { user = ""; } if(userLastname == null) { userLastname = ""; } if(town == null) { town = ""; } if(zipcode == null) { zipcode = ""; } if(email == null) { email = ""; } if(defaultGroup == null) { defaultGroup = ""; } // vectors of Strings that hold the selected and not selected Groups Vector selectedGroups = (Vector)session.getValue("selectedGroups"); Vector notSelectedGroups = (Vector)session.getValue("notSelectedGroups"); if(perspective.equals("newuser")) { // input is the form for establishing new users templateSelector = "newuser"; if(!userYetEstablished) { // first time the form is visited user = ""; selectedGroups = new Vector(); notSelectedGroups = new Vector(); selectedGroups.addElement(C_GROUP_USERS); // preselect Users Vector groups = cms.getGroups(); for(int z = 0;z < groups.size();z++) { String aName = (String)((CmsGroup)groups.elementAt(z)).getName(); if(!C_GROUP_USERS.equals(aName)) { notSelectedGroups.addElement(aName); } } session.putValue("selectedGroups", selectedGroups); session.putValue("notSelectedGroups", notSelectedGroups); } if(reqCont.getRequest().getParameter("ADD") != null) { // add a new group to selectedGroups String groupname = (String)parameters.get("notselectgroup"); if(groupname != null) { selectedGroups.addElement(groupname); notSelectedGroups.removeElement(groupname); } session.putValue("selectedGroups", selectedGroups); session.putValue("notSelectedGroups", notSelectedGroups); } else { if(reqCont.getRequest().getParameter("REMOVE") != null) { // delete a new group from selectedGroups // and move it to notSelectedGroups String groupname = (String)parameters.get("selectgroup"); if(groupname != null) { notSelectedGroups.addElement(groupname); selectedGroups.removeElement(groupname); if(groupname.equals(defaultGroup)) { defaultGroup = ""; } } session.putValue("selectedGroups", selectedGroups); session.putValue("notSelectedGroups", notSelectedGroups); } else { if(reqCont.getRequest().getParameter("OK") != null) { // form submitted, try to establish new user try { if(email.equals("") || userLastname.equals("") || user.equals("")) { throw new CmsException("user data missing", CmsException.C_NO_USER); } if(!pwd.equals(pwd2)) { throw new CmsException("unequal passwords", CmsException.C_SHORT_PASSWORD); } if(pwd.length() < C_PASSWORD_MINIMUMSIZE) { throw new CmsException("password too short", CmsException.C_SHORT_PASSWORD); } Hashtable additionalInfo = new Hashtable(); // additionalInfo.put(C_ADDITIONAL_INFO_ZIPCODE, zipcode); // additionalInfo.put(C_ADDITIONAL_INFO_TOWN, town); CmsUser newUser = cms.addUser(user, pwd, defaultGroup, desc, additionalInfo, C_FLAG_ENABLED); newUser.setEmail(email); newUser.setFirstname(firstname); newUser.setLastname(userLastname); newUser.setAddress(street); newUser.setAdditionalInfo(C_ADDITIONAL_INFO_ZIPCODE, zipcode); newUser.setAdditionalInfo(C_ADDITIONAL_INFO_TOWN, town); for(int z = 0;z < selectedGroups.size();z++) { String groupname = (String)selectedGroups.elementAt(z); if(!groupname.equals(defaultGroup)) { cms.addUserToGroup(user, groupname); } } cms.writeUser(newUser); // update in the database session.removeValue("selectedGroups"); session.removeValue("notSelectedGroups"); session.removeValue("ERROR"); templateSelector = ""; //successful } catch(CmsException e) { // save the form data in the session, so it can be displayed again later session.putValue("ERROR", new String("yes")); // remeber that an error has occurred session.putValue("USERFIRSTNAME", firstname); session.putValue("USERDESC", desc); session.putValue("USERSTREET", street); session.putValue("PWD", pwd); session.putValue("PWD2", pwd2); session.putValue("USER", user); session.putValue("USERNAME", userLastname); session.putValue("ZIP", zipcode); session.putValue("TOWN", town); session.putValue("USEREMAIL", email); session.putValue("DEFAULTGROUP", defaultGroup); if(e.getType() == CmsException.C_SHORT_PASSWORD) { if(e.getMessage().equals("unequal passwords")) { templateSelector = "passworderror1"; } else { if(e.getMessage().equals("password too short")) { templateSelector = "passworderror2"; } else { throw e; } } } else { if(e.getType() == CmsException.C_NO_GROUP) { templateSelector = "errornogroup1"; } else { if(e.getType() == CmsException.C_NO_USER && e.getMessage().equals("user data missing")) { templateSelector = "errordatamissing1"; } else { throw e; // hand the exception down } } } } // catch block } // OK } } } else { // input is the form for changing the user data templateSelector = "changeuser"; boolean disabled = false; if(!userYetChanged) { // form visited for the first time, not yet changed // read the data from the user object CmsUser theUser = (CmsUser)cms.readUser(user); if(theUser == null) { throw new CmsException("user does not exist"); } firstname = theUser.getFirstname(); desc = theUser.getDescription(); street = theUser.getAddress(); userLastname = theUser.getLastname(); email = theUser.getEmail(); disabled = theUser.getDisabled(); zipcode = (String)theUser.getAdditionalInfo(C_ADDITIONAL_INFO_ZIPCODE); town = (String)theUser.getAdditionalInfo(C_ADDITIONAL_INFO_TOWN); defaultGroup = theUser.getDefaultGroup().getName(); Vector groups = cms.getDirectGroupsOfUser(user); if(groups != null) { selectedGroups = new Vector(); for(int z = 0;z < groups.size();z++) { selectedGroups.addElement(((CmsGroup)groups.elementAt(z)).getName()); } } else { throw new CmsException(CmsException.C_NO_GROUP); } groups = cms.getGroups(); if(groups != null) { notSelectedGroups = new Vector(); for(int z = 0;z < groups.size();z++) { String name = ((CmsGroup)groups.elementAt(z)).getName(); if(!selectedGroups.contains(name)) { notSelectedGroups.addElement(name); } } } } else { // fetch data from the form if((String)parameters.get("LOCK") != null) { disabled = true; } if(reqCont.getRequest().getParameter("ADD") != null) { // add a new group to selectedGroups String groupname = (String)parameters.get("notselectgroup"); if(groupname != null) { selectedGroups.addElement(groupname); notSelectedGroups.removeElement(groupname); } } else { if(reqCont.getRequest().getParameter("REMOVE") != null) { // delete a group from selectedGroups // and move it to notSelectedGroups String groupname = (String)parameters.get("selectgroup"); if(groupname != null) { notSelectedGroups.addElement(groupname); selectedGroups.removeElement(groupname); if(groupname.equals(defaultGroup)) { defaultGroup = ""; } } } else { if(reqCont.getRequest().getParameter("OK") != null) { // form submitted, try to change the user data try { if(email.equals("") || userLastname.equals("") || user.equals("")) { throw new CmsException("user data missing", CmsException.C_NO_USER); } if(!pwd.equals(pwd2)) { throw new CmsException("unequal passwords", CmsException.C_SHORT_PASSWORD); } if(!pwd.equals("")) { if(pwd.length() < C_PASSWORD_MINIMUMSIZE) { throw new CmsException("password too short", CmsException.C_SHORT_PASSWORD); } cms.setPassword(user, pwd); } // if nothing is entered don't change the password CmsUser theUser = (CmsUser)cms.readUser(user); theUser.setEmail(email); theUser.setFirstname(firstname); theUser.setLastname(userLastname); theUser.setAddress(street); theUser.setAdditionalInfo(C_ADDITIONAL_INFO_ZIPCODE, zipcode); theUser.setAdditionalInfo(C_ADDITIONAL_INFO_TOWN, town); if((C_USER_ADMIN.equals(theUser.getName())) && (!selectedGroups.contains(C_GROUP_ADMIN))) { throw new CmsException("cant remove Admin from " + C_GROUP_ADMIN, CmsException.C_NOT_ADMIN); } if(disabled && selectedGroups.contains(C_GROUP_ADMIN)) { throw new CmsException("disabled admin", CmsException.C_NOT_ADMIN); } if(disabled == true) { theUser.setDisabled(); } else { theUser.setEnabled(); } changeGroups(cms, theUser, defaultGroup, selectedGroups); session.removeValue("selectedGroups"); session.removeValue("notSelectedGroups"); session.removeValue("DEFAULTGROUP"); session.removeValue("ERROR"); templateSelector = ""; //successful } catch(CmsException e) { session.putValue("ERROR", new String("yes")); // remeber that an error has occurred session.putValue("USERFIRSTNAME", firstname); session.putValue("USERDESC", desc); session.putValue("USERSTREET", street); session.putValue("PWD", pwd); session.putValue("PWD2", pwd2); session.putValue("USER", user); session.putValue("USERNAME", userLastname); session.putValue("ZIP", zipcode); session.putValue("TOWN", town); session.putValue("USEREMAIL", email); session.putValue("DEFAULTGROUP", defaultGroup); if(e.getType() == CmsException.C_SHORT_PASSWORD) { if(e.getMessage().equals("unequal passwords")) { templateSelector = "passworderror3"; } else { if(e.getMessage().equals("password too short")) { templateSelector = "passworderror4"; } else { throw e; } } } else { if(e.getType() == CmsException.C_NO_GROUP) { templateSelector = "errornogroup2"; } else { if(e.getType() == CmsException.C_NO_USER && e.getMessage().equals("user data missing")) { templateSelector = "errordatamissing2"; } else { if(e.getType() == CmsException.C_NOT_ADMIN && e.getMessage().equals("disabled admin")) { templateSelector = "errordisabledadmin"; } else { throw e; // hand the exception down } } } } } // catch block } // OK } } } // userYetEstablished session.putValue("selectedGroups", selectedGroups); session.putValue("notSelectedGroups", notSelectedGroups); session.putValue("DEFAULTGROUP", defaultGroup); xmlTemplateDocument.setData("DISABLED", disabled ? "checked" : ""); } // again common part for 'newuser' and 'changeuser': // set the variables for display in the document if(firstname == null) { firstname = ""; } if(desc == null) { desc = ""; } if(street == null) { street = ""; } if(pwd == null) { pwd = ""; } if(pwd2 == null) { pwd2 = ""; } if(user == null) { user = ""; } if(userLastname == null) { userLastname = ""; } if(town == null) { town = ""; } if(zipcode == null) { zipcode = ""; } if(email == null) { email = ""; } xmlTemplateDocument.setData("USERFIRSTNAME", firstname); xmlTemplateDocument.setData("USERDESC", desc); xmlTemplateDocument.setData("USERSTREET", street); xmlTemplateDocument.setData("PWD", pwd); xmlTemplateDocument.setData("PWD2", pwd2); xmlTemplateDocument.setData("USER", user); xmlTemplateDocument.setData("USERNAME", userLastname); xmlTemplateDocument.setData("TOWN", town); xmlTemplateDocument.setData("ZIP", zipcode); xmlTemplateDocument.setData("EMAIL", email); } // belongs to: 'if perspective is newuser or changeuser' else { if(perspective.equals("deleteuser")) { String user = (String)parameters.get("USER"); xmlTemplateDocument.setData("USER", user); templateSelector = "RUsureDelete"; } else { if(perspective.equals("reallydeleteuser")) { // deleting a user String user = (String)parameters.get("USER"); try { cms.deleteUser(user); templateSelector = ""; } catch(Exception e) { // user == null or delete failed xmlTemplateDocument.setData("DELETEDETAILS", Utils.getStackTrace(e)); templateSelector = "deleteerror"; } } // delete user } } // Now load the template file and start the processing return startProcessing(cms, xmlTemplateDocument, elementName, parameters, templateSelector); } | 8585 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8585/4441f9abf854daec115ad9c599fdd4770f19035e/CmsAdminUsers.java/clean/src/com/opencms/workplace/CmsAdminUsers.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1160,
8526,
5154,
12,
4747,
921,
6166,
16,
514,
28215,
16,
514,
14453,
16,
2398,
18559,
1472,
16,
514,
1542,
4320,
13,
1216,
11228,
288,
3639,
309,
12,
39,
67,
9394,
597,
432,
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,
377,
1071,
1160,
8526,
5154,
12,
4747,
921,
6166,
16,
514,
28215,
16,
514,
14453,
16,
2398,
18559,
1472,
16,
514,
1542,
4320,
13,
1216,
11228,
288,
3639,
309,
12,
39,
67,
9394,
597,
432,
67,... |
public static CastExpression asExpression(String typeName, Expression expression) { CastExpression answer = new CastExpression(typeName, expression); | public static CastExpression asExpression(Type type, Expression expression) { CastExpression answer = new CastExpression(type, expression); | public static CastExpression asExpression(String typeName, Expression expression) { CastExpression answer = new CastExpression(typeName, expression); answer.setCoerce(true); return answer; } | 6462 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6462/0e621fdecf3e8ab9db2fe9eea10bae5d2dc4b695/CastExpression.java/buggy/src/main/org/codehaus/groovy/ast/expr/CastExpression.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
19782,
2300,
487,
2300,
12,
780,
8173,
16,
5371,
2652,
13,
288,
3639,
19782,
2300,
5803,
273,
394,
19782,
2300,
12,
723,
461,
16,
2652,
1769,
3639,
5803,
18,
542,
4249,
2765,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
377,
1071,
760,
19782,
2300,
487,
2300,
12,
780,
8173,
16,
5371,
2652,
13,
288,
3639,
19782,
2300,
5803,
273,
394,
19782,
2300,
12,
723,
461,
16,
2652,
1769,
3639,
5803,
18,
542,
4249,
2765,
... |
"URL context can't accept non-composite name: " + name); | Messages.getString("jndi.26", name)); | public void unbind(Name name) throws NamingException { if (!(name instanceof CompositeName)) { throw new InvalidNameException( "URL context can't accept non-composite name: " + name); } if (name.size() == 1) { unbind(name.get(0)); } else { Context context = getContinuationContext(name); try { context.unbind(name.getSuffix(1)); } finally { context.close(); } } } | 54769 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54769/a019071d67c658acaf59b3bed874ed07bb31de07/GenericURLContext.java/clean/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/GenericURLContext.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
17449,
12,
461,
508,
13,
1216,
26890,
288,
3639,
309,
16051,
12,
529,
1276,
14728,
461,
3719,
288,
5411,
604,
394,
1962,
26771,
12,
10792,
4838,
18,
588,
780,
2932,
78,
16564,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
17449,
12,
461,
508,
13,
1216,
26890,
288,
3639,
309,
16051,
12,
529,
1276,
14728,
461,
3719,
288,
5411,
604,
394,
1962,
26771,
12,
10792,
4838,
18,
588,
780,
2932,
78,
16564,
... |
MylarUiPlugin.getDefault().addAdapter(BugzillaStructureBridge.EXTENSION, new BugzillaUiBridge()); | public void start(BundleContext context) throws Exception { super.start(context); cache = new BugzillaReportCache(); cache.readCacheFile(); MylarUiPlugin.getDefault().addAdapter(BugzillaStructureBridge.EXTENSION, new BugzillaUiBridge()); MylarPlugin.getDefault().getSelectionMonitors().add(new BugzillaEditingMonitor()); IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow(); if (window != null) { // create a new bridge and initialize it bridge = new BugzillaMylarBridge(); } } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/ffea9ed89adc29b1ae1184818ee9577e822d6fde/MylarBugsPlugin.java/clean/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/bugs/MylarBugsPlugin.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
787,
12,
3405,
1042,
819,
13,
1216,
1185,
288,
202,
202,
9565,
18,
1937,
12,
2472,
1769,
202,
202,
2493,
273,
394,
16907,
15990,
4820,
1649,
5621,
202,
202,
2493,
18,
896... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
787,
12,
3405,
1042,
819,
13,
1216,
1185,
288,
202,
202,
9565,
18,
1937,
12,
2472,
1769,
202,
202,
2493,
273,
394,
16907,
15990,
4820,
1649,
5621,
202,
202,
2493,
18,
896... | |
public final void printStackTrace(int instructionOffset, | public final void printStackTrace(Offset instructionOffset, | public final void printStackTrace(int instructionOffset, PrintLN out) { out.print("\tat "); out.print(method.getDeclaringClass()); // VM_Class out.print('.'); out.print(method.getName()); // a VM_Atom, returned via VM_MemberReference.getName(). out.print("("); out.print(method.getDeclaringClass().getSourceName()); // a VM_Atom int lineNumber = findLineNumberForInstruction(instructionOffset); if (lineNumber <= 0) { // unknown line out.print("; machine code offset: "); out.printHex(instructionOffset); } else { out.print(':'); out.print(lineNumber); } out.print(')'); out.println(); } | 4011 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4011/c42f16e27537b49de27664c6bee883b20c4d11f8/VM_QuickCompiledMethod.java/buggy/rvm/src/vm/compilers/quick/VM_QuickCompiledMethod.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
727,
918,
7973,
12,
2335,
7592,
2335,
16,
19694,
3038,
48,
50,
596,
13,
282,
288,
565,
596,
18,
1188,
31458,
88,
270,
315,
1769,
565,
596,
18,
1188,
12,
2039,
18,
588,
3456,
146... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
727,
918,
7973,
12,
2335,
7592,
2335,
16,
19694,
3038,
48,
50,
596,
13,
282,
288,
565,
596,
18,
1188,
31458,
88,
270,
315,
1769,
565,
596,
18,
1188,
12,
2039,
18,
588,
3456,
146... |
lookupID.setActual(id); if (lookupIDError != null) { throw lookupIDError; } else { return lookupIDResult; } } | lookupID.setActual(id); if (lookupIDError != null) { throw lookupIDError; } else { return lookupIDResult; } } | public MatchBuilder lookupID( String id ) { lookupID.setActual(id); if (lookupIDError != null) { throw lookupIDError; } else { return lookupIDResult; } } | 57371 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57371/c26c57f3ac4851e6bc9c5df8515ac73f4045eebf/MockBuilderIdentityTable.java/clean/jmock/core/src/test/jmock/builder/testsupport/MockBuilderIdentityTable.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
4639,
1263,
3689,
734,
12,
514,
612,
262,
288,
202,
202,
8664,
734,
18,
542,
11266,
12,
350,
1769,
202,
202,
430,
261,
8664,
734,
668,
480,
446,
13,
288,
1082,
202,
12849,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
4639,
1263,
3689,
734,
12,
514,
612,
262,
288,
202,
202,
8664,
734,
18,
542,
11266,
12,
350,
1769,
202,
202,
430,
261,
8664,
734,
668,
480,
446,
13,
288,
1082,
202,
12849,
3... |
final PsiExpression[] args1 = argumentList1.getExpressions(); | if(argumentList1 == null) { return false; } final PsiExpression[] args1 = argumentList1.getExpressions(); | private static boolean methodCallExpressionsAreEquivalent(PsiMethodCallExpression methodExp1, PsiMethodCallExpression methodExp2){ final PsiReferenceExpression methodExpression1 = methodExp1.getMethodExpression(); final PsiReferenceExpression methodExpression2 = methodExp2.getMethodExpression(); if(!expressionsAreEquivalent(methodExpression1, methodExpression2)){ return false; } final PsiExpressionList argumentList1 = methodExp1.getArgumentList(); final PsiExpression[] args1 = argumentList1.getExpressions(); final PsiExpressionList argumentList2 = methodExp2.getArgumentList(); final PsiExpression[] args2 = argumentList2.getExpressions(); return expressionListsAreEquivalent(args1, args2); } | 56627 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56627/bfd992e322e7a4460064ead02e35d530f627faec/EquivalenceChecker.java/clean/plugins/InspectionGadgets/src/com/siyeh/ig/psiutils/EquivalenceChecker.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
1250,
707,
1477,
8927,
4704,
22606,
12,
52,
7722,
12592,
2300,
707,
2966,
21,
16,
4766,
17311,
453,
7722,
12592,
2300,
707,
2966,
22,
15329,
3639,
727,
453,
7722,
2404,
2300,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
1250,
707,
1477,
8927,
4704,
22606,
12,
52,
7722,
12592,
2300,
707,
2966,
21,
16,
4766,
17311,
453,
7722,
12592,
2300,
707,
2966,
22,
15329,
3639,
727,
453,
7722,
2404,
2300,
7... |
public RtfFont(RtfDocument doc, Font font, float superSubScript) { this.document = doc; if(font instanceof RtfFont) { this.fontName = ((RtfFont) font).getFontName(); } else { switch (Font.getFamilyIndex(font.getFamilyname())) { case Font.COURIER: this.fontName = "Courier"; break; case Font.HELVETICA: this.fontName = "Arial"; break; case Font.SYMBOL: this.fontName = "Symbol"; this.charset = 2; break; case Font.TIMES_ROMAN: this.fontName = "Times New Roman"; break; case Font.ZAPFDINGBATS: this.fontName = "Windings"; break; default: this.fontName = font.getFamilyname(); } } if(font.getFamilyname().equalsIgnoreCase("unknown")) { color = new RtfColor(doc, 0, 0, 0); return; } this.fontSize = (int)font.size(); if(font.isBold()) { this.fontStyle = this.fontStyle | STYLE_BOLD; } if(font.isItalic()) { this.fontStyle = this.fontStyle | STYLE_ITALIC; } if(font.isUnderlined()) { this.fontStyle = this.fontStyle | STYLE_UNDERLINE; } if(font.isStrikethru()) { this.fontStyle = this.fontStyle | STYLE_STRIKETHROUGH; } if(document != null) { this.fontNumber = document.getDocumentHeader().getFontNumber(this); } color = new RtfColor(doc, font.color()); | public RtfFont(String fontName) { super(Font.UNDEFINED, Font.DEFAULTSIZE, Font.NORMAL, new Color(0, 0, 0)); this.fontName = fontName; | public RtfFont(RtfDocument doc, Font font, float superSubScript) { this.document = doc; if(font instanceof RtfFont) { this.fontName = ((RtfFont) font).getFontName(); } else { switch (Font.getFamilyIndex(font.getFamilyname())) { case Font.COURIER: this.fontName = "Courier"; break; case Font.HELVETICA: this.fontName = "Arial"; break; case Font.SYMBOL: this.fontName = "Symbol"; this.charset = 2; break; case Font.TIMES_ROMAN: this.fontName = "Times New Roman"; break; case Font.ZAPFDINGBATS: this.fontName = "Windings"; break; default: this.fontName = font.getFamilyname(); } } if(font.getFamilyname().equalsIgnoreCase("unknown")) { color = new RtfColor(doc, 0, 0, 0); return; } this.fontSize = (int)font.size(); if(font.isBold()) { this.fontStyle = this.fontStyle | STYLE_BOLD; } if(font.isItalic()) { this.fontStyle = this.fontStyle | STYLE_ITALIC; } if(font.isUnderlined()) { this.fontStyle = this.fontStyle | STYLE_UNDERLINE; } if(font.isStrikethru()) { this.fontStyle = this.fontStyle | STYLE_STRIKETHROUGH; } if(document != null) { this.fontNumber = document.getDocumentHeader().getFontNumber(this); } color = new RtfColor(doc, font.color()); } | 3506 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3506/0c6c17000f496d26a659330393dcd3513f5293fa/RtfFont.java/buggy/itext/src/com/lowagie/text/rtf/style/RtfFont.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
24958,
5711,
12,
54,
6632,
2519,
997,
16,
10063,
3512,
16,
1431,
2240,
1676,
3651,
13,
288,
3639,
333,
18,
5457,
273,
997,
31,
3639,
309,
12,
5776,
1276,
24958,
5711,
13,
288,
541... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
24958,
5711,
12,
54,
6632,
2519,
997,
16,
10063,
3512,
16,
1431,
2240,
1676,
3651,
13,
288,
3639,
333,
18,
5457,
273,
997,
31,
3639,
309,
12,
5776,
1276,
24958,
5711,
13,
288,
541... |
if (index < bytes.length) index++; | if (index < bytes.length) index++; | public String getLine(int line) { int index = lineNumber <= line ? nextIndex : (lineNumber = 0); for (; index < bytes.length && lineNumber < line; lineNumber++) { lineStart = index; for (; index < bytes.length; index++) { if (bytes[index] == CR) break; if (bytes[index] == LF) break; if (bytes[index] == FF) break; } lineLength = index - lineStart; if (index < bytes.length) index++; if (index < bytes.length) if (bytes[index - 1] == CR && bytes[index] == LF) index++; } nextIndex = index; try { return encoding != null ? new String(bytes, lineStart, lineLength, encoding) : new String(bytes, lineStart, lineLength); } catch (UnsupportedEncodingException exception) { throw new Error(exception); // !!! use ApplicationError } } | 55146 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55146/b088688a0c9fc3ca63a28439d34e05feeaa5810b/SourceFile.java/clean/sources/ch/epfl/lamp/util/SourceFile.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
9851,
12,
474,
980,
13,
288,
3639,
509,
770,
273,
13629,
1648,
980,
692,
22262,
294,
261,
1369,
1854,
273,
374,
1769,
3639,
364,
261,
31,
770,
411,
1731,
18,
2469,
597,
13629... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
9851,
12,
474,
980,
13,
288,
3639,
509,
770,
273,
13629,
1648,
980,
692,
22262,
294,
261,
1369,
1854,
273,
374,
1769,
3639,
364,
261,
31,
770,
411,
1731,
18,
2469,
597,
13629... |
public List getModifications(Date lastBuild, Date now) { mailAliases = getMailAliases(); List mods = null; try { mods = execHistoryCommand(buildHistoryCommand(lastBuild, now)); } catch (Exception e) { log.error("Log command failed to execute succesfully", e); } if (mods == null) { return new ArrayList(); } return mods; } | 55334 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55334/fdc64098e18eb6b69a974b8a283a41d469f27fcf/CVS.java/clean/main/src/net/sourceforge/cruisecontrol/sourcecontrols/CVS.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
987,
336,
28340,
12,
1626,
1142,
3116,
16,
2167,
2037,
13,
288,
3639,
4791,
9667,
273,
31991,
9667,
5621,
7734,
987,
15546,
273,
446,
31,
3639,
775,
288,
5411,
15546,
273,
1196,
562... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
987,
336,
28340,
12,
1626,
1142,
3116,
16,
2167,
2037,
13,
288,
3639,
4791,
9667,
273,
31991,
9667,
5621,
7734,
987,
15546,
273,
446,
31,
3639,
775,
288,
5411,
15546,
273,
1196,
562... | ||
block.setSourceLines( createSourceLines( factory, locator, instructions ) ); block.initializeAddresses(); | block.initialize( factory, locator, instructions ); | public static DisassemblyBlock create( IDisassembly disassembly, ICDIMixedInstruction[] instructions ) { DisassemblyBlock block = new DisassemblyBlock( disassembly ); block.setMixedMode( true ); ISourceLocator locator = disassembly.getDebugTarget().getLaunch().getSourceLocator(); IAddressFactory factory = ((CDebugTarget)disassembly.getDebugTarget()).getAddressFactory(); block.setSourceLines( createSourceLines( factory, locator, instructions ) ); block.initializeAddresses(); return block; } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/288e94d28e58e9e919cb33249e4690e266ea40bd/DisassemblyBlock.java/buggy/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/DisassemblyBlock.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
3035,
28050,
1768,
752,
12,
1599,
291,
28050,
1015,
28050,
16,
26899,
2565,
19846,
11983,
8526,
12509,
262,
288,
202,
202,
1669,
28050,
1768,
1203,
273,
394,
3035,
28050,
176... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
3035,
28050,
1768,
752,
12,
1599,
291,
28050,
1015,
28050,
16,
26899,
2565,
19846,
11983,
8526,
12509,
262,
288,
202,
202,
1669,
28050,
1768,
1203,
273,
394,
3035,
28050,
176... |
FileUtil.readPropertiesFile(messagesFile, '=', rawTranslations ); | readPropertiesFile(messagesFile, rawTranslations ); | private Map loadRawTranslations( File[] resourceDirs ) throws IOException { //System.out.println("Loading translations for locale " + this.locale); // load the translations by following scheme: // first load the base-translations: // resources // resources/vendor // resources/group1..n // resources/vendor/device // Then load the locale specific resources: // resources/locale // resources/vendor/locale // resources/group1..n/locale // resources/vendor/device/locale Map rawTranslations = new HashMap(); // load general resources: String messagesFileName = File.separator + this.localizationSetting.getMessagesFileName(); String localeFileName; int splitPos = messagesFileName.lastIndexOf('.'); if (splitPos != -1) { localeFileName = messagesFileName.substring(0, splitPos) + "_" + this.locale.toString() + messagesFileName.substring(splitPos); } else { localeFileName = messagesFileName + this.locale.toString(); } String languageFileName = null; if (this.locale.getCountry().length() > 0) { // okay, this locale has also a country defined, // so we need to look at the language-resources as well: if (splitPos != -1) { languageFileName = messagesFileName.substring(0, splitPos) + "_" + this.locale.getLanguage() + messagesFileName.substring(splitPos); } else { languageFileName = messagesFileName + this.locale.getLanguage(); } } for (int i = 0; i < resourceDirs.length; i++) { File dir = resourceDirs[i]; String dirPath = dir.getAbsolutePath(); File messagesFile = new File( dirPath + messagesFileName ); if (messagesFile.exists()) { //System.out.println("Loading translations from " + messagesFile.getAbsolutePath() ); if (messagesFile.lastModified() > this.lastModificationTime) { this.lastModificationTime = messagesFile.lastModified(); } //System.out.println("Reading translations from " + messagesFile.getAbsolutePath() ); FileUtil.readPropertiesFile(messagesFile, '=', rawTranslations ); } if (languageFileName != null) { messagesFile = new File( dirPath + languageFileName ); if (messagesFile.exists()) { //System.out.println("Loading translations from " + messagesFile.getAbsolutePath() ); if (messagesFile.lastModified() > this.lastModificationTime) { this.lastModificationTime = messagesFile.lastModified(); } //System.out.println("Reading translations from " + messagesFile.getAbsolutePath() ); FileUtil.readPropertiesFile(messagesFile, '=', rawTranslations ); } } messagesFile = new File( dirPath + localeFileName ); if (messagesFile.exists()) { //System.out.println("Loading translations from " + messagesFile.getAbsolutePath() ); if (messagesFile.lastModified() > this.lastModificationTime) { this.lastModificationTime = messagesFile.lastModified(); } //System.out.println("Reading translations from " + messagesFile.getAbsolutePath() ); FileUtil.readPropertiesFile(messagesFile, '=', rawTranslations ); } } return rawTranslations; } | 9804 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9804/758f42c2d40e5346898ebb802507c5472b9fef12/TranslationManager.java/clean/build/source/src/de/enough/polish/resources/TranslationManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
1635,
1262,
4809,
12297,
12,
1387,
8526,
1058,
9872,
262,
1216,
1860,
288,
202,
202,
759,
3163,
18,
659,
18,
8222,
2932,
10515,
7863,
364,
2573,
315,
397,
333,
18,
6339,
1769,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
1635,
1262,
4809,
12297,
12,
1387,
8526,
1058,
9872,
262,
1216,
1860,
288,
202,
202,
759,
3163,
18,
659,
18,
8222,
2932,
10515,
7863,
364,
2573,
315,
397,
333,
18,
6339,
1769,
... |
} | }, IResource.NONE); | protected void collectFiles(IContainer parent, List result) { try { IResource[] resources = parent.members(); for (int i = 0; i < resources.length; i++) { IResource resource = resources[i]; if (resource instanceof IFile) { result.add(resource); } else if (resource instanceof IContainer) { collectFiles((IContainer) resource, result); } } } catch (CoreException e) { CCorePlugin.log(e.getStatus()); } } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/757c7b486066f40c8ca6003a922133450b7196f5/ErrorParserManager.java/buggy/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/ErrorParserManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
3274,
2697,
12,
45,
2170,
982,
16,
987,
563,
13,
288,
202,
202,
698,
288,
1082,
202,
45,
1420,
8526,
2703,
273,
982,
18,
7640,
5621,
1082,
202,
1884,
261,
474,
277,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
3274,
2697,
12,
45,
2170,
982,
16,
987,
563,
13,
288,
202,
202,
698,
288,
1082,
202,
45,
1420,
8526,
2703,
273,
982,
18,
7640,
5621,
1082,
202,
1884,
261,
474,
277,
27... |
public TA_RetCode PLUS_DM( int startIdx, int endIdx, double inHigh[], double inLow[], int optInTimePeriod, MInteger outBegIdx, MInteger outNbElement, double outReal[] ){ int today, lookbackTotal, outIdx; double prevHigh, prevLow, tempReal; double prevPlusDM; double diffP, diffM; int i; if( startIdx < 0 ) return TA_RetCode. TA_OUT_OF_RANGE_START_INDEX; if( (endIdx < 0) || (endIdx < startIdx)) return TA_RetCode. TA_OUT_OF_RANGE_END_INDEX; if( (int)optInTimePeriod == ( Integer.MIN_VALUE ) ) optInTimePeriod = 14; else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) return TA_RetCode. TA_BAD_PARAM; if( optInTimePeriod > 1 ) lookbackTotal = optInTimePeriod + (this.unstablePeriod[TA_FuncUnstId.TA_FUNC_UNST_PLUS_DM.ordinal()]) - 1; else lookbackTotal = 1; if( startIdx < lookbackTotal ) startIdx = lookbackTotal; if( startIdx > endIdx ) { outBegIdx.value = 0 ; outNbElement.value = 0 ; return TA_RetCode. TA_SUCCESS; } outIdx = 0; if( optInTimePeriod <= 1 ) { outBegIdx.value = startIdx; today = startIdx-1; prevHigh = inHigh[today]; prevLow = inLow[today]; while( today < endIdx ) { today++; tempReal = inHigh[today]; diffP = tempReal-prevHigh; prevHigh = tempReal; tempReal = inLow[today]; diffM = prevLow-tempReal; prevLow = tempReal; if( (diffP > 0) && (diffP > diffM) ) { outReal[outIdx++] = diffP; } else outReal[outIdx++] = 0; } outNbElement.value = outIdx; return TA_RetCode. TA_SUCCESS; } outBegIdx.value = startIdx; prevPlusDM = 0.0; today = startIdx - lookbackTotal; prevHigh = inHigh[today]; prevLow = inLow[today]; i = optInTimePeriod-1; while( i-- > 0 ) { today++; tempReal = inHigh[today]; diffP = tempReal-prevHigh; prevHigh = tempReal; tempReal = inLow[today]; diffM = prevLow-tempReal; prevLow = tempReal; if( (diffP > 0) && (diffP > diffM) ) { prevPlusDM += diffP; } } i = (this.unstablePeriod[TA_FuncUnstId.TA_FUNC_UNST_PLUS_DM.ordinal()]) ; while( i-- != 0 ) { today++; tempReal = inHigh[today]; diffP = tempReal-prevHigh; prevHigh = tempReal; tempReal = inLow[today]; diffM = prevLow-tempReal; prevLow = tempReal; if( (diffP > 0) && (diffP > diffM) ) { prevPlusDM = prevPlusDM - (prevPlusDM/optInTimePeriod) + diffP; } else { prevPlusDM = prevPlusDM - (prevPlusDM/optInTimePeriod); } } outReal[0] = prevPlusDM; outIdx = 1; while( today < endIdx ) { today++; tempReal = inHigh[today]; diffP = tempReal-prevHigh; prevHigh = tempReal; tempReal = inLow[today]; diffM = prevLow-tempReal; prevLow = tempReal; if( (diffP > 0) && (diffP > diffM) ) { prevPlusDM = prevPlusDM - (prevPlusDM/optInTimePeriod) + diffP; } else { prevPlusDM = prevPlusDM - (prevPlusDM/optInTimePeriod); } outReal[outIdx++] = prevPlusDM; } outNbElement.value = outIdx; return TA_RetCode. TA_SUCCESS;} | 2365 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2365/69e0567047ad75d101e30d35826ecbb51165ba43/Core.java/buggy/ta-lib/java/src/TA/Lib/Core.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
9833,
67,
7055,
1085,
6253,
3378,
67,
16125,
12,
474,
1937,
4223,
16,
474,
409,
4223,
16,
9056,
267,
8573,
63,
6487,
9056,
267,
10520,
63,
6487,
474,
3838,
382,
26540,
16,
49,
4522,
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,
1071,
9833,
67,
7055,
1085,
6253,
3378,
67,
16125,
12,
474,
1937,
4223,
16,
474,
409,
4223,
16,
9056,
267,
8573,
63,
6487,
9056,
267,
10520,
63,
6487,
474,
3838,
382,
26540,
16,
49,
4522,
65... | ||
processFaultToEPR(messageContextOptions, envelope, addressingNamespaceObject); | processFaultToEPR(messageContextOptions, envelope, addressingNamespaceObject, namespace); | public void invoke(MessageContext msgContext) throws AxisFault { SOAPFactory factory = (SOAPFactory)msgContext.getEnvelope().getOMFactory(); OMNamespace addressingNamespaceObject; // it should be able to disable addressing by some one. Boolean property = (Boolean) msgContext.getProperty(Constants.Configuration.DISABLE_ADDRESSING_FOR_OUT_MESSAGES); if (property == null && msgContext.getOperationContext() != null) { // check in the IN message context, if available MessageContext inMsgCtxt = msgContext.getOperationContext().getMessageContext(WSDLConstants.MESSAGE_LABEL_IN_VALUE); if (inMsgCtxt != null) { property = (Boolean) inMsgCtxt.getProperty(Constants.Configuration.DISABLE_ADDRESSING_FOR_OUT_MESSAGES); } } if (property != null && property.booleanValue()) { log.debug("Addressing is disabled ....."); return; } Object addressingVersionFromCurrentMsgCtxt = msgContext.getProperty(WS_ADDRESSING_VERSION); if (addressingVersionFromCurrentMsgCtxt != null) { // since we support only two addressing versions I can avoid multiple ifs here. // see that if message context property holds something other than Final.WSA_NAMESPACE // we always defaults to Submission.WSA_NAMESPACE. Hope this is fine. addressingNamespace = Final.WSA_NAMESPACE.equals(addressingVersionFromCurrentMsgCtxt) ? Final.WSA_NAMESPACE : Submission.WSA_NAMESPACE; } else if (msgContext.getOperationContext() != null) { // check for a IN message context, else default to WSA Final MessageContext inMessageContext = msgContext.getOperationContext() .getMessageContext(WSDLConstants.MESSAGE_LABEL_IN_VALUE); if (inMessageContext != null) { addressingNamespace = (String) inMessageContext.getProperty( WS_ADDRESSING_VERSION); } } if (addressingNamespace == null || "".equals(addressingNamespace)) { addressingNamespace = Final.WSA_NAMESPACE; } addressingNamespaceObject = factory.createOMNamespace( addressingNamespace, WSA_DEFAULT_PREFIX); anonymousURI = addressingNamespace.equals(Final.WSA_NAMESPACE) ? Final.WSA_ANONYMOUS_URL : Submission.WSA_ANONYMOUS_URL; Options messageContextOptions = msgContext.getOptions(); SOAPEnvelope envelope = msgContext.getEnvelope(); SOAPHeader soapHeader = envelope.getHeader(); // if there is no soap header in the envelope being processed, add one. if (soapHeader == null) {// SOAPFactory soapFac = msgContext.isSOAP11() ? OMAbstractFactory.getSOAP11Factory() : OMAbstractFactory.getSOAP12Factory(); soapHeader = factory.createSOAPHeader(envelope); } // by this time, we definitely have some addressing information to be sent. This is because, // we have tested at the start of this whether messageInformationHeaders are null or not. // So rather than declaring addressing namespace in each and every addressing header, lets // define that in the Header itself. envelope.declareNamespace(addressingNamespaceObject); // processing WSA To processToEPR(messageContextOptions, envelope, addressingNamespaceObject); // processing WSA replyTo processReplyTo(envelope, messageContextOptions, msgContext, addressingNamespaceObject); // processing WSA From processFromEPR(messageContextOptions, envelope, addressingNamespaceObject); // processing WSA FaultTo processFaultToEPR(messageContextOptions, envelope, addressingNamespaceObject); String messageID = messageContextOptions.getMessageId(); if (messageID != null && !isAddressingHeaderAlreadyAvailable(WSA_MESSAGE_ID, envelope, addressingNamespaceObject)) {//optional processStringInfo(messageID, WSA_MESSAGE_ID, envelope, addressingNamespaceObject); } // processing WSA Action processWSAAction(messageContextOptions, envelope, msgContext, addressingNamespaceObject); // processing WSA RelatesTo processRelatesTo(envelope, messageContextOptions, addressingNamespaceObject); // process fault headers, if present processFaultsInfoIfPresent(envelope, msgContext, addressingNamespaceObject); // We are done, cleanup the references addressingNamespaceObject = null; addressingNamespace = null; } | 49300 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49300/ce2f3c98dad10104d03dfc73395c1281182a3945/AddressingOutHandler.java/clean/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingOutHandler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
4356,
12,
1079,
1042,
1234,
1042,
13,
1216,
15509,
7083,
288,
3639,
16434,
1733,
3272,
273,
261,
27952,
1733,
13,
3576,
1042,
18,
588,
10862,
7675,
588,
1872,
1733,
5621,
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,
918,
4356,
12,
1079,
1042,
1234,
1042,
13,
1216,
15509,
7083,
288,
3639,
16434,
1733,
3272,
273,
261,
27952,
1733,
13,
3576,
1042,
18,
588,
10862,
7675,
588,
1872,
1733,
5621,
7734,
... |
{ | retry: for (;;) { | public int getToken() throws IOException { int c; tokenno++; // Check for pushed-back token if (this.pushbackToken != EOF) { int result = this.pushbackToken; this.pushbackToken = EOF; return result; } { // Eat whitespace, possibly sensitive to newlines. for (;;) { c = getChar(); if (c == EOF_CHAR) { return EOF; } else if (c == '\n') { flags &= ~TSF_DIRTYLINE; if ((flags & TSF_NEWLINES) != 0) { break; } } else if (!isJSSpace(c)) { if (c != '-') { flags |= TSF_DIRTYLINE; } break; } } // identifier/keyword/instanceof? // watch out for starting with a <backslash> boolean identifierStart; boolean isUnicodeEscapeStart = false; if (c == '\\') { c = getChar(); if (c == 'u') { identifierStart = true; isUnicodeEscapeStart = true; stringBufferTop = 0; } else { identifierStart = false; ungetChar(c); c = '\\'; } } else { identifierStart = Character.isJavaIdentifierStart((char)c); if (identifierStart) { stringBufferTop = 0; addToString(c); } } if (identifierStart) { boolean containsEscape = isUnicodeEscapeStart; for (;;) { if (isUnicodeEscapeStart) { // strictly speaking we should probably push-back // all the bad characters if the <backslash>uXXXX // sequence is malformed. But since there isn't a // correct context(is there?) for a bad Unicode // escape sequence in an identifier, we can report // an error here. int escapeVal = 0; for (int i = 0; i != 4; ++i) { c = getChar(); escapeVal = (escapeVal << 4) | xDigitToInt(c); // Next check takes care about c < 0 and bad escape if (escapeVal < 0) { break; } } if (escapeVal < 0) { reportSyntaxError("msg.invalid.escape", null); return ERROR; } addToString(escapeVal); isUnicodeEscapeStart = false; } else { c = getChar(); if (c == '\\') { c = getChar(); if (c == 'u') { isUnicodeEscapeStart = true; containsEscape = true; } else { reportSyntaxError("msg.illegal.character", null); return ERROR; } } else { if (c == EOF_CHAR || !Character.isJavaIdentifierPart((char)c)) { break; } addToString(c); } } } ungetChar(c); String str = getStringFromBuffer(); if (!containsEscape) { // OPT we shouldn't have to make a string (object!) to // check if it's a keyword. // Return the corresponding token if it's a keyword int result = stringToKeyword(str); if (result != EOF) { if (result != RESERVED) { return result; } else if (!Context.getContext().hasFeature( Context.FEATURE_RESERVED_KEYWORD_AS_IDENTIFIER)) { return result; } else { // If implementation permits to use future reserved // keywords in violation with the EcmaScript standard, // treat it as name but issue warning Object[] errArgs = { str }; reportSyntaxWarning("msg.reserved.keyword", errArgs); } } } this.string = (String)allStrings.intern(str); return NAME; } // is it a number? if (isDigit(c) || (c == '.' && isDigit(peekChar()))) { stringBufferTop = 0; int base = 10; if (c == '0') { c = getChar(); if (c == 'x' || c == 'X') { base = 16; c = getChar(); } else if (isDigit(c)) { base = 8; } else { addToString('0'); } } if (base == 16) { while (0 <= xDigitToInt(c)) { addToString(c); c = getChar(); } } else { while ('0' <= c && c <= '9') { /* * We permit 08 and 09 as decimal numbers, which * makes our behavior a superset of the ECMA * numeric grammar. We might not always be so * permissive, so we warn about it. */ if (base == 8 && c >= '8') { Object[] errArgs = { c == '8' ? "8" : "9" }; reportSyntaxWarning("msg.bad.octal.literal", errArgs); base = 10; } addToString(c); c = getChar(); } } boolean isInteger = true; if (base == 10 && (c == '.' || c == 'e' || c == 'E')) { isInteger = false; if (c == '.') { do { addToString(c); c = getChar(); } while (isDigit(c)); } if (c == 'e' || c == 'E') { addToString(c); c = getChar(); if (c == '+' || c == '-') { addToString(c); c = getChar(); } if (!isDigit(c)) { reportSyntaxError("msg.missing.exponent", null); return ERROR; } do { addToString(c); c = getChar(); } while (isDigit(c)); } } ungetChar(c); String numString = getStringFromBuffer(); double dval; if (base == 10 && !isInteger) { try { // Use Java conversion to number from string... dval = (Double.valueOf(numString)).doubleValue(); } catch (NumberFormatException ex) { Object[] errArgs = { ex.getMessage() }; reportSyntaxError("msg.caught.nfe", errArgs); return ERROR; } } else { dval = ScriptRuntime.stringToNumber(numString, 0, base); } this.number = dval; return NUMBER; } // is it a string? if (c == '"' || c == '\'') { // We attempt to accumulate a string the fast way, by // building it directly out of the reader. But if there // are any escaped characters in the string, we revert to // building it out of a StringBuffer. int quoteChar = c; stringBufferTop = 0; c = getChar(); strLoop: while (c != quoteChar) { if (c == '\n' || c == EOF_CHAR) { ungetChar(c); reportSyntaxError("msg.unterminated.string.lit", null); return ERROR; } if (c == '\\') { // We've hit an escaped character int escapeVal; c = getChar(); switch (c) { case 'b': c = '\b'; break; case 'f': c = '\f'; break; case 'n': c = '\n'; break; case 'r': c = '\r'; break; case 't': c = '\t'; break; // \v a late addition to the ECMA spec, // it is not in Java, so use 0xb case 'v': c = 0xb; break; case 'u': // Get 4 hex digits; if the u escape is not // followed by 4 hex digits, use 'u' + the // literal character sequence that follows. int escapeStart = stringBufferTop; addToString('u'); escapeVal = 0; for (int i = 0; i != 4; ++i) { c = getChar(); escapeVal = (escapeVal << 4) | xDigitToInt(c); if (escapeVal < 0) { continue strLoop; } addToString(c); } // prepare for replace of stored 'u' sequence // by escape value stringBufferTop = escapeStart; c = escapeVal; break; case 'x': // Get 2 hex digits, defaulting to 'x'+literal // sequence, as above. c = getChar(); escapeVal = xDigitToInt(c); if (escapeVal < 0) { addToString('x'); continue strLoop; } else { int c1 = c; c = getChar(); escapeVal = (escapeVal << 4) | xDigitToInt(c); if (escapeVal < 0) { addToString('x'); addToString(c1); continue strLoop; } else { // got 2 hex digits c = escapeVal; } } break; default: if ('0' <= c && c < '8') { int val = c - '0'; c = getChar(); if ('0' <= c && c < '8') { val = 8 * val + c - '0'; c = getChar(); if ('0' <= c && c < '8' && val <= 037) { // c is 3rd char of octal sequence only // if the resulting val <= 0377 val = 8 * val + c - '0'; c = getChar(); } } ungetChar(c); c = val; } } } addToString(c); c = getChar(); } String str = getStringFromBuffer(); this.string = (String)allStrings.intern(str); return STRING; } switch (c) { case '\n': return EOL; case ';': return SEMI; case '[': return LB; case ']': return RB; case '{': return LC; case '}': return RC; case '(': return LP; case ')': return RP; case ',': return COMMA; case '?': return HOOK; case ':': return COLON; case '.': return DOT; case '|': if (matchChar('|')) { return OR; } else if (matchChar('=')) { this.op = BITOR; return ASSIGN; } else { return BITOR; } case '^': if (matchChar('=')) { this.op = BITXOR; return ASSIGN; } else { return BITXOR; } case '&': if (matchChar('&')) { return AND; } else if (matchChar('=')) { this.op = BITAND; return ASSIGN; } else { return BITAND; } case '=': if (matchChar('=')) { if (matchChar('=')) this.op = SHEQ; else this.op = EQ; return EQOP; } else { this.op = NOP; return ASSIGN; } case '!': if (matchChar('=')) { if (matchChar('=')) this.op = SHNE; else this.op = NE; return EQOP; } else { this.op = NOT; return UNARYOP; } case '<': /* NB:treat HTML begin-comment as comment-till-eol */ if (matchChar('!')) { if (matchChar('-')) { if (matchChar('-')) { skipLine(); return getToken(); // in place of 'goto retry' } ungetChar('-'); } ungetChar('!'); } if (matchChar('<')) { if (matchChar('=')) { this.op = LSH; return ASSIGN; } else { this.op = LSH; return SHOP; } } else { if (matchChar('=')) { this.op = LE; return RELOP; } else { this.op = LT; return RELOP; } } case '>': if (matchChar('>')) { if (matchChar('>')) { if (matchChar('=')) { this.op = URSH; return ASSIGN; } else { this.op = URSH; return SHOP; } } else { if (matchChar('=')) { this.op = RSH; return ASSIGN; } else { this.op = RSH; return SHOP; } } } else { if (matchChar('=')) { this.op = GE; return RELOP; } else { this.op = GT; return RELOP; } } case '*': if (matchChar('=')) { this.op = MUL; return ASSIGN; } else { return MUL; } case '/': // is it a // comment? if (matchChar('/')) { skipLine(); return getToken(); } if (matchChar('*')) { while ((c = getChar()) != -1 && !(c == '*' && matchChar('/'))) { ; // empty loop body } if (c == EOF_CHAR) { reportSyntaxError("msg.unterminated.comment", null); return ERROR; } return getToken(); // `goto retry' } // is it a regexp? if ((flags & TSF_REGEXP) != 0) { stringBufferTop = 0; while ((c = getChar()) != '/') { if (c == '\n' || c == EOF_CHAR) { ungetChar(c); reportSyntaxError("msg.unterminated.re.lit", null); return ERROR; } if (c == '\\') { addToString(c); c = getChar(); } addToString(c); } int reEnd = stringBufferTop; while (true) { if (matchChar('g')) addToString('g'); else if (matchChar('i')) addToString('i'); else if (matchChar('m')) addToString('m'); else break; } if (isAlpha(peekChar())) { reportSyntaxError("msg.invalid.re.flag", null); return ERROR; } this.string = new String(stringBuffer, 0, reEnd); this.regExpFlags = new String(stringBuffer, reEnd, stringBufferTop - reEnd); return REGEXP; } if (matchChar('=')) { this.op = DIV; return ASSIGN; } else { return DIV; } case '%': this.op = MOD; if (matchChar('=')) { return ASSIGN; } else { return MOD; } case '~': this.op = BITNOT; return UNARYOP; case '+': if (matchChar('=')) { this.op = ADD; return ASSIGN; } else if (matchChar('+')) { return INC; } else { return ADD; } case '-': if (matchChar('=')) { this.op = SUB; c = ASSIGN; } else if (matchChar('-')) { if (0 == (flags & TSF_DIRTYLINE)) { // treat HTML end-comment after possible whitespace // after line start as comment-utill-eol if (matchChar('>')) { skipLine(); return getToken(); } } c = DEC; } else { c = SUB; } flags |= TSF_DIRTYLINE; return c; default: reportSyntaxError("msg.illegal.character", null); return ERROR; } } } | 12564 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12564/374e4e7071ea7fde505ab834e8b4f8054a9f5c75/TokenStream.java/buggy/src/org/mozilla/javascript/TokenStream.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
9162,
1435,
1216,
1860,
3300,
30,
364,
261,
25708,
13,
288,
3639,
509,
276,
31,
3639,
1147,
2135,
9904,
31,
3639,
368,
2073,
364,
18543,
17,
823,
1147,
3639,
309,
261,
2211,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
9162,
1435,
1216,
1860,
3300,
30,
364,
261,
25708,
13,
288,
3639,
509,
276,
31,
3639,
1147,
2135,
9904,
31,
3639,
368,
2073,
364,
18543,
17,
823,
1147,
3639,
309,
261,
2211,
... |
return super.hashCode(); | throw new RuntimeException("Domain object idInternal not set!"); | public int hashCode() { if (getIdInternal() != null) { return getIdInternal().intValue(); } return super.hashCode(); } | 2645 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2645/795de4c2365e378bdd49ef18ceda967f111a7e34/DomainObject.java/buggy/src/net/sourceforge/fenixedu/domain/DomainObject.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
13374,
1435,
288,
3639,
309,
261,
26321,
3061,
1435,
480,
446,
13,
288,
5411,
327,
2634,
3061,
7675,
474,
620,
5621,
3639,
289,
540,
604,
394,
3235,
2932,
3748,
733,
612,
3061,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
509,
13374,
1435,
288,
3639,
309,
261,
26321,
3061,
1435,
480,
446,
13,
288,
5411,
327,
2634,
3061,
7675,
474,
620,
5621,
3639,
289,
540,
604,
394,
3235,
2932,
3748,
733,
612,
3061,... |
cover.setCornerRadius(getHalfHeight()); | cover.setCornerRadius(getHeight() / 2); | public FigSubactivityState() { FigRRect bigPort = new FigRRect(X, Y, W, H, Color.cyan, Color.cyan); bigPort.setCornerRadius(bigPort.getHalfHeight()); cover = new FigRRect(X, Y, W, H, Color.black, Color.white); cover.setCornerRadius(getHalfHeight()); bigPort.setLineWidth(0); //icon = makeSubStatesIcon(X + W, Y); // the substate icon in the corner getNameFig().setLineWidth(0); getNameFig().setBounds(10 + PADDING, 10, 90 - PADDING * 2, 25); getNameFig().setFilled(false); getNameFig().setMultiLine(true); // add Figs to the FigNode in back-to-front order addFig(bigPort); addFig(cover); addFig(getNameFig()); //addFig(icon); makeSubStatesIcon(X + W, Y); setBigPort(bigPort); Rectangle r = getBounds(); setBounds(r.x, r.y, r.width, r.height); } | 7166 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7166/55b1a2bf9e5a1ff91e4f97c63ed8d76eb2a68f27/FigSubactivityState.java/buggy/src_new/org/argouml/uml/diagram/activity/ui/FigSubactivityState.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
478,
360,
1676,
9653,
1119,
1435,
288,
3639,
478,
360,
54,
6120,
5446,
2617,
273,
394,
478,
360,
54,
6120,
12,
60,
16,
1624,
16,
678,
16,
670,
16,
7734,
5563,
18,
25879,
16,
556... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
478,
360,
1676,
9653,
1119,
1435,
288,
3639,
478,
360,
54,
6120,
5446,
2617,
273,
394,
478,
360,
54,
6120,
12,
60,
16,
1624,
16,
678,
16,
670,
16,
7734,
5563,
18,
25879,
16,
556... |
footHeightSection.setLayoutNum( 4 ); footHeightSection.setGridPlaceholder( 2, true ); | footHeightSection.setLayoutNum( 2 ); | public void buildUI( Composite parent ) { super.buildUI( parent ); container.setLayout( WidgetUtil.createGridLayout( 6 ) ); TextPropertyDescriptorProvider nameProvider = new TextPropertyDescriptorProvider( MasterPageHandle.NAME_PROP, ReportDesignConstants.MASTER_PAGE_ELEMENT ); TextSection nameSection = new TextSection( nameProvider.getDisplayName( ), container, true ); nameSection.setProvider( nameProvider ); nameSection.setWidth( 200 ); nameSection.setLayoutNum( 2 ); addSection( PageSectionId.MASTER_PAGE_NAME, nameSection ); ColorPropertyDescriptorProvider colorProvider = new ColorPropertyDescriptorProvider( StyleHandle.BACKGROUND_COLOR_PROP, ReportDesignConstants.STYLE_ELEMENT ); ColorSection colorSection = new ColorSection( colorProvider.getDisplayName( ), container, true ); colorSection.setProvider( colorProvider ); colorSection.setWidth( 200 ); colorSection.setLayoutNum( 4 ); colorSection.setGridPlaceholder( 2, true ); addSection( PageSectionId.MASTER_PAGE_COLOR, colorSection ); UnitPropertyDescriptorProvider headHeightProvider = new UnitPropertyDescriptorProvider( SimpleMasterPageHandle.HEADER_HEIGHT_PROP, ReportDesignConstants.SIMPLE_MASTER_PAGE_ELEMENT ); UnitSection headHeightSection = new UnitSection( headHeightProvider.getDisplayName( ), container, true ); headHeightSection.setProvider( headHeightProvider ); headHeightSection.setWidth( 200 ); headHeightSection.setLayoutNum( 2 ); addSection( PageSectionId.MASTER_PAGE_HEAD_HEIGHT, headHeightSection ); UnitPropertyDescriptorProvider footHeightProvider = new UnitPropertyDescriptorProvider( SimpleMasterPageHandle.FOOTER_HEIGHT_PROP, ReportDesignConstants.SIMPLE_MASTER_PAGE_ELEMENT ); UnitSection footHeightSection = new UnitSection( headHeightProvider.getDisplayName( ), container, true ); footHeightSection.setProvider( footHeightProvider ); footHeightSection.setWidth( 200 ); footHeightSection.setLayoutNum( 4 ); footHeightSection.setGridPlaceholder( 2, true ); addSection( PageSectionId.MASTER_PAGE_FOOT_HEIGHT, footHeightSection ); ComboPropertyDescriptorProvider orientationProvider = new ComboPropertyDescriptorProvider( MasterPageHandle.ORIENTATION_PROP, ReportDesignConstants.MASTER_PAGE_ELEMENT ); ComboSection orientationSection = new ComboSection( orientationProvider.getDisplayName( ), container, true ); orientationSection.setProvider( orientationProvider ); orientationSection.setGridPlaceholder( 4, true ); orientationSection.setWidth( 200 ); addSection( PageSectionId.MASTER_PAGE_ORIENTATION, orientationSection ); SeperatorSection seperatorSection = new SeperatorSection( container, SWT.HORIZONTAL ); addSection( PageSectionId.MASTER_PAGE_SEPERATOR, seperatorSection ); ComboPropertyDescriptorProvider typeProvider = new ComboPropertyDescriptorProvider( MasterPageHandle.TYPE_PROP, ReportDesignConstants.MASTER_PAGE_ELEMENT ); ComboSection typeSection = new ComboSection( typeProvider.getDisplayName( ), container, true ); typeSection.setProvider( typeProvider ); typeSection.setGridPlaceholder( 4, true ); typeSection.setWidth( 200 ); addSection( PageSectionId.MASTER_PAGE_TYPE, typeSection ); UnitPropertyDescriptorProvider widthProvider = new UnitPropertyDescriptorProvider( MasterPageHandle.WIDTH_PROP, ReportDesignConstants.MASTER_PAGE_ELEMENT ); UnitSection widthSection = new UnitSection( widthProvider.getDisplayName( ), container, true ); widthSection.setProvider( widthProvider ); widthSection.setWidth( 200 ); widthSection.setLayoutNum( 2 ); addSection( PageSectionId.MASTER_PAGE_WIDTH, widthSection ); UnitPropertyDescriptorProvider heightProvider = new UnitPropertyDescriptorProvider( MasterPageHandle.HEIGHT_PROP, ReportDesignConstants.MASTER_PAGE_ELEMENT ); UnitSection heightSection = new UnitSection( heightProvider.getDisplayName( ), container, true ); heightSection.setProvider( heightProvider ); heightSection.setWidth( 200 ); heightSection.setLayoutNum( 4 ); heightSection.setGridPlaceholder( 2, true ); addSection( PageSectionId.MASTER_PAGE_HEIGHT, heightSection ); // WidgetUtil.buildGridControl( container, propertiesMap, // ReportDesignConstants.MASTER_PAGE_ELEMENT, // MasterPageHandle.NAME_PROP, 1, false ); // WidgetUtil.buildGridControl( container, propertiesMap, // ReportDesignConstants.STYLE_ELEMENT, // StyleHandle.BACKGROUND_COLOR_PROP, 1, false ); // // WidgetUtil.createGridPlaceholder( container, 1, true ); /* * WidgetUtil.buildGridControl( container, propertiesMap, * ReportDesignConstants.MASTER_PAGE_ELEMENT, * MasterPageHandle.ORIENTATION_PROP, 1, false ); * * Label separator = new Label( container, SWT.SEPARATOR | SWT.HORIZONTAL ); * GridData data = new GridData( ); data.horizontalSpan = 5; * data.grabExcessHorizontalSpace = false; data.horizontalAlignment = * GridData.FILL; separator.setLayoutData( data ); * * WidgetUtil.buildGridControl( container, propertiesMap, * ReportDesignConstants.MASTER_PAGE_ELEMENT, * MasterPageHandle.TYPE_PROP, 1, false ); pageSizeDescriptor = * (IPropertyDescriptor) propertiesMap.get( MasterPageHandle.TYPE_PROP ); * * WidgetUtil.createGridPlaceholder( container, 3, false ); * * widthPane = (Composite) WidgetUtil.buildGridControl( container, * propertiesMap, ReportDesignConstants.MASTER_PAGE_ELEMENT, * MasterPageHandle.WIDTH_PROP, 1, false ); * * heightPane = (Composite) WidgetUtil.buildGridControl( container, * propertiesMap, ReportDesignConstants.MASTER_PAGE_ELEMENT, * MasterPageHandle.HEIGHT_PROP, 1, false ); */ createSections( ); layoutSections( ); } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/b1c54a82f7e0fded60b986c55329f90d6daefd16/MasterPageGeneralPage.java/buggy/UI/org.eclipse.birt.report.designer.ui.views/src/org/eclipse/birt/report/designer/internal/ui/views/attributes/page/MasterPageGeneralPage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1361,
5370,
12,
14728,
982,
225,
262,
202,
95,
202,
202,
9565,
18,
3510,
5370,
12,
982,
11272,
202,
202,
3782,
18,
542,
3744,
12,
11103,
1304,
18,
2640,
6313,
3744,
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,
1361,
5370,
12,
14728,
982,
225,
262,
202,
95,
202,
202,
9565,
18,
3510,
5370,
12,
982,
11272,
202,
202,
3782,
18,
542,
3744,
12,
11103,
1304,
18,
2640,
6313,
3744,
12,
... |
if ((sides & LEFT) == LEFT) { | else if (currentSide == LEFT) { | private static void paintSolid(final Graphics g, final Rectangle bounds, final Border border, final BorderColor color, final int sides) { int rightCorner = (((sides & RIGHT) == RIGHT) ? border.right : 1); int leftCorner = (((sides & LEFT) == LEFT) ? border.left - 1 : 0);//adjust for bug in polygon filling? int topCorner = (((sides & TOP) == TOP) ? border.top - 1 : 0); int bottomCorner = (((sides & BOTTOM) == BOTTOM) ? border.bottom : 1); Polygon poly; // CLEAN: duplicate, except for color, with paintGoodBevel() for BOTTOM (PWW 25-01-05) if ((sides & TOP) == TOP) { // skip 0 border /* do earlier if (border.top == 0) { return; }*/ // set the color g.setColor(color.topColor); // draw a 1px border with a line instead of a polygon if (border.top == 1) { g.drawLine(bounds.x, bounds.y, bounds.x + bounds.width - 1, bounds.y); //no, doing all at once return; } else { // use polygons for borders over 1px wide poly = new Polygon(); poly.addPoint(bounds.x, bounds.y); poly.addPoint(bounds.x + bounds.width - 1, bounds.y); poly.addPoint(bounds.x + bounds.width - rightCorner, bounds.y + border.top - 1); poly.addPoint(bounds.x + leftCorner, bounds.y + border.top - 1); g.fillPolygon(poly); } //return; } // CLEAN: duplicate, except for color, with paintGoodBevel() for BOTTOM (PWW 25-01-05) if ((sides & BOTTOM) == BOTTOM) { /*check earlier if (border.bottom == 0) { return; }*/ g.setColor(color.bottomColor); if (border.bottom == 1) { g.drawLine(bounds.x, bounds.y + bounds.height - 1, bounds.x + bounds.width - 1, bounds.y + bounds.height - 1); //return; } else { poly = new Polygon(); // upper right poly.addPoint(bounds.x + bounds.width - rightCorner, bounds.y + bounds.height - border.bottom); // upper left poly.addPoint(bounds.x + leftCorner, bounds.y + bounds.height - border.bottom); // lower left poly.addPoint(bounds.x, bounds.y + bounds.height - 1); // lower right poly.addPoint(bounds.x + bounds.width - 1, bounds.y + bounds.height - 1); g.fillPolygon(poly); } //return; } // CLEAN: duplicate, except for color, with paintGoodBevel() for BOTTOM (PWW 25-01-05) if ((sides & RIGHT) == RIGHT) { /*if (border.right == 0) { return; }*/ g.setColor(color.rightColor); if (border.right == 1) { g.drawLine(bounds.x + bounds.width - 1, bounds.y, bounds.x + bounds.width - 1, bounds.y + bounds.height - 1); //return; } else { poly = new Polygon(); poly.addPoint(bounds.x + bounds.width - 1, bounds.y); poly.addPoint(bounds.x + bounds.width - border.right, bounds.y + topCorner); poly.addPoint(bounds.x + bounds.width - border.right, bounds.y + bounds.height - bottomCorner); poly.addPoint(bounds.x + bounds.width - 1, bounds.y + bounds.height - 1); g.fillPolygon(poly); } //return; } // CLEAN: duplicate, except for color, with paintGoodBevel() for BOTTOM (PWW 25-01-05) if ((sides & LEFT) == LEFT) { /*if (border.left == 0) { return; }*/ g.setColor(color.leftColor); if (border.left == 1) { g.drawLine(bounds.x, bounds.y, bounds.x, bounds.y + bounds.height - 1); //return; } else { poly = new Polygon(); poly.addPoint(bounds.x, bounds.y); poly.addPoint(bounds.x + border.left - 1, bounds.y + topCorner); poly.addPoint(bounds.x + border.left - 1, bounds.y + bounds.height - bottomCorner); poly.addPoint(bounds.x, bounds.y + bounds.height - 1); g.fillPolygon(poly); } //return; } } | 8125 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8125/cdd53fac1870407b7499c8e553eab14bb755c9d1/BorderPainter.java/clean/src/java/org/xhtmlrenderer/render/BorderPainter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
918,
12574,
25044,
12,
6385,
16830,
314,
16,
727,
13264,
4972,
16,
727,
13525,
5795,
16,
727,
13525,
2957,
2036,
16,
727,
509,
22423,
13,
288,
3639,
509,
2145,
23145,
273,
261,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
918,
12574,
25044,
12,
6385,
16830,
314,
16,
727,
13264,
4972,
16,
727,
13525,
5795,
16,
727,
13525,
2957,
2036,
16,
727,
509,
22423,
13,
288,
3639,
509,
2145,
23145,
273,
261,... |
public org.quickfix.field.Product getProduct() throws FieldNotFound { org.quickfix.field.Product value = new org.quickfix.field.Product(); | public quickfix.field.Product getProduct() throws FieldNotFound { quickfix.field.Product value = new quickfix.field.Product(); | public org.quickfix.field.Product getProduct() throws FieldNotFound { org.quickfix.field.Product value = new org.quickfix.field.Product(); getField(value); return value; } | 8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/PositionMaintenanceRequest.java/buggy/src/java/src/quickfix/fix44/PositionMaintenanceRequest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
4133,
15880,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
4133,
460,
273,
394,
2358,
18,
19525,
904,
18,
1518,
18,
413... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
4133,
15880,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
4133,
460,
273,
394,
2358,
18,
19525,
904,
18,
1518,
18,
413... |
public void visitDXStrNode(Node iVisited) { visit(iVisited); leave(iVisited); } | public void visitDXStrNode(Node iVisited) { visit(iVisited); leave(iVisited); } | public void visitDXStrNode(Node iVisited) { visit(iVisited); leave(iVisited); } | 52337 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52337/d31a76ee29d5978a9bec41e3ac9134cee024bcab/NodeVisitorAdapter.java/buggy/org/jruby/nodes/NodeVisitorAdapter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
3757,
28826,
1585,
907,
12,
907,
277,
30019,
13,
202,
95,
202,
202,
11658,
12,
77,
30019,
1769,
202,
202,
19574,
12,
77,
30019,
1769,
202,
97,
2,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
3757,
28826,
1585,
907,
12,
907,
277,
30019,
13,
202,
95,
202,
202,
11658,
12,
77,
30019,
1769,
202,
202,
19574,
12,
77,
30019,
1769,
202,
97,
2,
-100,
-100,
-100,
-100,
... |
hits = Compute.missilesHit(wtype.getRackSize(), nSalvoBonus + nMissilesModifier, maxtechmissiles); | hits = Compute.missilesHit(wtype.getRackSize(), nSalvoBonus + nMissilesModifier + glancingMissileMod, maxtechmissiles | glancing); | private void resolveWeaponAttack(WeaponResult wr, int lastEntityId) { // System.out.println("rwa"); final Entity ae = game.getEntity(wr.waa.getEntityId()); final Targetable target = game.getTarget(wr.waa.getTargetType(), wr.waa.getTargetId()); Entity entityTarget = null; if (target.getTargetType() == Targetable.TYPE_ENTITY) { entityTarget = (Entity) target; } final Mounted weapon = ae.getEquipment(wr.waa.getWeaponId()); final WeaponType wtype = (WeaponType) weapon.getType(); final boolean isWeaponInfantry = wtype.hasFlag(WeaponType.F_INFANTRY); // 2002-09-16 Infantry weapons have unlimited ammo. final boolean usesAmmo = wtype.getAmmoType() != AmmoType.T_NA && wtype.getAmmoType() != AmmoType.T_BA_MG && wtype.getAmmoType() != AmmoType.T_BA_SMALL_LASER && !isWeaponInfantry; final Mounted ammo = usesAmmo ? weapon.getLinked() : null; final AmmoType atype = ammo == null ? null : (AmmoType) ammo.getType(); Infantry platoon = null; final boolean isBattleArmorAttack = wtype.hasFlag(WeaponType.F_BATTLEARMOR); ToHitData toHit = wr.toHit; boolean bInferno = (usesAmmo && atype.getMunitionType() == AmmoType.M_INFERNO); boolean bFragmentation = (usesAmmo && atype.getMunitionType() == AmmoType.M_FRAGMENTATION); boolean bFlechette = (usesAmmo && atype.getMunitionType() == AmmoType.M_FLECHETTE); boolean bArtillery = target.getTargetType() == Targetable.TYPE_HEX_ARTILLERY; if (!bInferno) { // also check for inferno infantry bInferno = (isWeaponInfantry && wtype.hasFlag(WeaponType.F_INFERNO)); } final boolean targetInBuilding = Compute.isInBuilding(game, entityTarget); if(bArtillery && game.getPhase()==Game.PHASE_FIRING) { //if direct artillery wr.artyAttackerCoords=ae.getPosition(); } // Which building takes the damage? Building bldg = game.board.getBuildingAt(target.getPosition()); if (lastEntityId != ae.getId()) { phaseReport.append("\nWeapons fire for ").append(ae.getDisplayName()). append("\n"); } // Swarming infantry can stop during any weapons phase after start. if (Infantry.STOP_SWARM.equals(wtype.getInternalName())) { // ... but only as their *only* attack action. if (toHit.getValue() == ToHitData.IMPOSSIBLE) { phaseReport.append("Swarm attack can not be ended (" + toHit.getDesc()).append(")\n"); return; } else { phaseReport.append("Swarm attack ended.\n"); // Only apply the "stop swarm 'attack'" to the swarmed Mek. if (ae.getSwarmTargetId() != target.getTargetId()) { Entity other = game.getEntity(ae.getSwarmTargetId()); other.setSwarmAttackerId(Entity.NONE); } else { entityTarget.setSwarmAttackerId(Entity.NONE); } ae.setSwarmTargetId(Entity.NONE); return; } } // Report weapon attack and its to-hit value. phaseReport.append(" ").append(wtype.getName()).append(" at ").append( target.getDisplayName()); if (toHit.getValue() == ToHitData.IMPOSSIBLE) { phaseReport.append(", but the shot is impossible (").append(toHit.getDesc()). append(")\n"); return; } else if (toHit.getValue() == ToHitData.AUTOMATIC_FAIL) { phaseReport.append(", the shot is an automatic miss (").append(toHit. getDesc()).append("), "); } else if (toHit.getValue() == ToHitData.AUTOMATIC_SUCCESS) { phaseReport.append(", the shot is an automatic hit (").append(toHit. getDesc()).append("), "); } else { phaseReport.append("; needs ").append(toHit.getValue()).append(", "); } // if firing an HGR unbraced, schedule a PSR if (wtype.getAmmoType() == AmmoType.T_GAUSS_HEAVY && ae.mpUsed > 0) { // the mod is weight-based int nMod; if (ae.getWeight() <= Entity.WEIGHT_LIGHT) { nMod = 2; } else if (ae.getWeight() <= Entity.WEIGHT_MEDIUM) { nMod = 1; } else if (ae.getWeight() <= Entity.WEIGHT_HEAVY) { nMod = 0; } else { nMod = -1; } PilotingRollData psr = new PilotingRollData(ae.getId(), nMod, "fired HeavyGauss unbraced"); psr.setCumulative(false); game.addPSR(psr); } // dice have been rolled, thanks phaseReport.append("rolls ").append(wr.roll).append(" : "); // check for AC jams int nShots = weapon.howManyShots(); if (nShots > 1) { int jamCheck = 0; if (wtype.getAmmoType() == AmmoType.T_AC_ULTRA && weapon.curMode().equals("Ultra")) { jamCheck = 2; } else if (wtype.getAmmoType() == AmmoType.T_AC_ROTARY) { if (nShots == 2) { jamCheck = 2; } else if (nShots == 4) { jamCheck = 3; } else if (nShots == 6) { jamCheck = 4; } } if (jamCheck > 0 && wr.roll <= jamCheck) { phaseReport.append("misses AND THE AUTOCANNON JAMS.\n"); weapon.setJammed(true); // ultras are destroyed by jamming if (wtype.getAmmoType() == AmmoType.T_AC_ULTRA) { weapon.setHit(true); } return; } } // Resolve roll for disengaged field inhibitors on PPCs, if needed if (game.getOptions().booleanOption("maxtech_ppc_inhibitors") && wtype.hasModes() && weapon.curMode().equals("Field Inhibitor OFF") ) { int rollTarget = 0; int dieRoll = Compute.d6(2); int distance = Compute.effectiveDistance(game, ae, target); if (distance>=3) { rollTarget = 3; } else if (distance == 2) { rollTarget = 6; } else if (distance == 1) { rollTarget = 10; } phaseReport.append("\n Fired PPC without field inhibitor, checking for damage:\n"); phaseReport.append(" Needs "); phaseReport.append(rollTarget); phaseReport.append(" to avoid damage, rolls "); phaseReport.append(dieRoll); phaseReport.append(": "); if (dieRoll<rollTarget) { // Oops, we ruined our day... int wlocation = weapon.getLocation(); int wid = ae.getEquipmentNum(weapon); int slot = 0; weapon.setDestroyed (true); for (int i=0; i<ae.getNumberOfCriticals(wlocation); i++) { CriticalSlot slot1 = ae.getCritical (wlocation, i); if (slot1 == null || slot1.getType() != CriticalSlot.TYPE_SYSTEM) { continue; } Mounted mounted = ae.getEquipment(slot1.getIndex()); if (mounted.equals(weapon)) { ae.hitAllCriticals(wlocation,i); } } // Bug 1066147 : damage is *not* like an ammo explosion, // but it *does* get applied directly to the IS. phaseReport.append( "fails." ) .append( damageEntity(ae, new HitData(wlocation), 10, false, 0, true) ) .append( "\n (continuing hit report):" ); } else { phaseReport.append("Succeeds.\n "); } } // do we hit? boolean bMissed = wr.roll < toHit.getValue(); // special case minefield delivery, no damage and scatters if misses. if (target.getTargetType() == Targetable.TYPE_MINEFIELD_DELIVER) { Coords coords = target.getPosition(); if (!bMissed) { phaseReport.append("hits the intended hex ") .append(coords.getBoardNum()) .append("\n"); } else { coords = Compute.scatter(coords); if (game.board.contains(coords)) { phaseReport.append("misses and scatters to hex ") .append(coords.getBoardNum()) .append("\n"); } else { phaseReport.append("misses and scatters off the board\n"); return; } } // Handle the thunder munitions. if (atype.getMunitionType() == AmmoType.M_THUNDER_AUGMENTED) { deliverThunderAugMinefield(coords, ae.getOwner().getId(), atype.getRackSize()); } else if (atype.getMunitionType() == AmmoType.M_THUNDER) { deliverThunderMinefield(coords, ae.getOwner().getId(), atype.getRackSize()); } else if (atype.getMunitionType() == AmmoType.M_THUNDER_INFERNO) deliverThunderInfernoMinefield(coords, ae.getOwner().getId(), atype.getRackSize()); else if (atype.getMunitionType() == AmmoType.M_THUNDER_VIBRABOMB) deliverThunderVibraMinefield(coords, ae.getOwner().getId(), atype.getRackSize(), wr.waa.getOtherAttackInfo()); else if (atype.getMunitionType() == AmmoType.M_THUNDER_ACTIVE) deliverThunderActiveMinefield(coords, ae.getOwner().getId(), atype.getRackSize()); //else //{ //...This is an error, but I'll just ignore it for now. //} return; } // FASCAM Artillery if (target.getTargetType() == Targetable.TYPE_HEX_FASCAM) { Coords coords = target.getPosition(); if (!bMissed) { phaseReport.append("hits the intended hex ") .append(coords.getBoardNum()) .append("\n"); } else { coords = Compute.scatter(coords); if (game.board.contains(coords)) { phaseReport.append("misses and scatters to hex ") .append(coords.getBoardNum()) .append("\n"); } else { phaseReport.append("misses and scatters off the board\n"); return; } } if (game.board.contains(coords)) { deliverFASCAMMinefield(coords, ae.getOwner().getId()); } return; } // Vibrabomb-IV Artillery if (target.getTargetType() == Targetable.TYPE_HEX_VIBRABOMB_IV) { Coords coords = target.getPosition(); if (!bMissed) { phaseReport.append("hits the intended hex ") .append(coords.getBoardNum()) .append("\n"); } else { coords = Compute.scatter(coords); if (game.board.contains(coords)) { phaseReport.append("misses and scatters to hex ") .append(coords.getBoardNum()) .append("\n"); } else { phaseReport.append("misses and scatters off the board\n"); } } if (game.board.contains(coords)) { deliverThunderVibraMinefield(coords, ae.getOwner().getId(), 20, wr.waa.getOtherAttackInfo()); } return; } // Inferno IV artillery if (target.getTargetType() == Targetable.TYPE_HEX_INFERNO_IV) { Coords coords = target.getPosition(); if (!bMissed) { phaseReport.append("hits the intended hex ") .append(coords.getBoardNum()) .append("\n"); } else { coords = Compute.scatter(coords); if (game.board.contains(coords)) { phaseReport.append("misses and scatters to hex ") .append(coords.getBoardNum()) .append("\n"); } else { phaseReport.append("misses and scatters off the board\n"); return; } } Hex h = game.getBoard().getHex(coords); //Unless there is a fire in the hex already, start one. if ( !h.contains( Terrain.FIRE ) ) { phaseReport.append( " Fire started in hex " ) .append( coords.getBoardNum() ) .append( ".\n" ); h.addTerrain(new Terrain(Terrain.FIRE, 1)); } game.board.addInfernoTo( coords, InfernoTracker.INFERNO_IV_ROUND, 1 ); sendChangedHex(coords); for(Enumeration impactHexHits = game.getEntities(coords);impactHexHits.hasMoreElements();) { Entity entity = (Entity)impactHexHits.nextElement(); entity.infernos.add( InfernoTracker.INFERNO_IV_ROUND, 1 ); phaseReport.append( entity.getDisplayName() ) .append( " now on fire for ") .append( entity.infernos.getTurnsLeftToBurn() ) .append(" turns.\n"); } for(int dir=0;dir<=5;dir++) { Coords tempcoords=coords.translated(dir); if(!game.board.contains(tempcoords)) { continue; } if(coords.equals(tempcoords)) { continue; } h = game.getBoard().getHex(tempcoords); // Unless there is a fire in the hex already, start one. if ( !h.contains( Terrain.FIRE ) ) { phaseReport.append( " Fire started in hex " ) .append( tempcoords.getBoardNum() ) .append( ".\n" ); h.addTerrain(new Terrain(Terrain.FIRE, 1)); } game.board.addInfernoTo( tempcoords, InfernoTracker.INFERNO_IV_ROUND, 1 ); sendChangedHex(tempcoords); for(Enumeration splashHexHits = game.getEntities(tempcoords);splashHexHits.hasMoreElements();) { Entity entity = (Entity)splashHexHits.nextElement(); entity.infernos.add( InfernoTracker.INFERNO_IV_ROUND, 1 ); phaseReport.append( entity.getDisplayName() ) .append( " now on fire for ") .append( entity.infernos.getTurnsLeftToBurn() ) .append(" turns.\n"); } } return; } //special case artillery if (target.getTargetType() == Targetable.TYPE_HEX_ARTILLERY) { Coords coords = target.getPosition(); if (!bMissed) { phaseReport.append("hits the intended hex ") .append(coords.getBoardNum()) .append("\n"); } else { coords = Compute.scatter(coords); if (game.board.contains(coords)) { phaseReport.append("misses and scatters to hex ") .append(coords.getBoardNum()) .append("\n"); } else { phaseReport.append("misses and scatters off the board\n"); return; } } int nCluster = 5; for(Enumeration impactHexHits = game.getEntities(coords);impactHexHits.hasMoreElements();) { Entity entity = (Entity)impactHexHits.nextElement(); int hits = wtype.getRackSize(); while(hits>0) { if(wr.artyAttackerCoords!=null) { toHit.setSideTable(Compute.targetSideTable(wr.artyAttackerCoords,entity.getPosition(),entity.getFacing(),entity instanceof Tank)); } HitData hit = entity.rollHitLocation ( toHit.getHitTable(), toHit.getSideTable(), wr.waa.getAimedLocation(), wr.waa.getAimingMode() ); phaseReport.append(damageEntity(entity, hit, Math.min(nCluster, hits), false, 0, false, true) + "\n"); hits -= Math.min(nCluster,hits); } } for(int dir=0;dir<=5;dir++) { Coords tempcoords=coords.translated(dir); if(!game.board.contains(tempcoords)) { continue; } if(coords.equals(tempcoords)) { continue; } Enumeration splashHexHits = game.getEntities(tempcoords); if(splashHexHits.hasMoreElements()) { phaseReport.append("in hex " + tempcoords.getBoardNum()); } for(;splashHexHits.hasMoreElements();) {; Entity entity = (Entity)splashHexHits.nextElement(); int hits = wtype.getRackSize()/2; while(hits>0) { HitData hit = entity.rollHitLocation ( toHit.getHitTable(), toHit.getSideTable(), wr.waa.getAimedLocation(), wr.waa.getAimingMode() ); phaseReport.append(damageEntity(entity, hit, Math.min(nCluster, hits)) + "\n"); hits -= Math.min(nCluster,hits); } } } return; } // End artillery if (bMissed) { // Report the miss. if ( wtype.getAmmoType() == AmmoType.T_SRM_STREAK ) { phaseReport.append( "fails to achieve lock.\n" ); } else { phaseReport.append("misses.\n"); } // Report any AMS action. for (int i=0; i < wr.amsShotDown.length; i++) { if (wr.amsShotDown[i] > 0) { phaseReport.append( "\tAMS activates, firing " ) .append( wr.amsShotDown[i] ) .append( " shot(s).\n" ); } } // Figure out the maximum number of missile hits. // TODO: handle this in a different place. int maxMissiles = 0; if ( usesAmmo ) { maxMissiles = wtype.getRackSize(); if ( wtype.hasFlag(WeaponType.F_DOUBLE_HITS) ) { maxMissiles *= 2; } if ( ae instanceof BattleArmor ) { platoon = (Infantry) ae; maxMissiles *= platoon.getShootingStrength(); } } // If the AMS shot down *all* incoming missiles, if // the shot is an automatic failure, or if it's from // a Streak rack, then Infernos can't ignite the hex // and any building is safe from damage. if ( (usesAmmo && wr.amsShotDownTotal >= maxMissiles) || toHit.getValue() == TargetRoll.AUTOMATIC_FAIL || wtype.getAmmoType() == AmmoType.T_SRM_STREAK ) { return; } // Shots that miss an entity can set fires. // Infernos always set fires. Otherwise // Buildings can't be accidentally ignited, // and some weapons can't ignite fires. if ( entityTarget != null && ( bInferno || ( bldg == null && wtype.getFireTN() != TargetRoll.IMPOSSIBLE ) ) ) { tryIgniteHex(target.getPosition(), bInferno, 11); } // BMRr, pg. 51: "All shots that were aimed at a target inside // a building and miss do full damage to the building instead." if ( !targetInBuilding ) { return; } } // special case NARC hits. No damage, but a beacon is appended if (!bMissed && wtype.getAmmoType() == AmmoType.T_NARC && atype.getMunitionType() != AmmoType.M_NARC_EX) { if (wr.amsShotDownTotal > 0) { phaseReport.append("would hit, but..."); for (int i=0; i < wr.amsShotDown.length; i++) { phaseReport.append("\n\tAMS engages, firing ") .append(wr.amsShotDown[i]).append(" shots"); } phaseReport.append("\nThe pod is destroyed by AMS fire.\n"); } else if (entityTarget == null) { phaseReport.append("hits, but doesn't do anything.\n"); } else { entityTarget.setNarcedBy(ae.getOwner().getTeam()); phaseReport.append("hits. Pod attached.\n"); } return; } // attempt to clear minefield by LRM/MRM fire. if (!bMissed && target.getTargetType() == Targetable.TYPE_MINEFIELD_CLEAR) { int clearAttempt = Compute.d6(2); if (clearAttempt >= Minefield.CLEAR_NUMBER_WEAPON) { phaseReport.append("\n\thits and clears it.\n"); Coords coords = target.getPosition(); Enumeration minefields = game.getMinefields(coords).elements(); while (minefields.hasMoreElements()) { Minefield mf = (Minefield) minefields.nextElement(); removeMinefield(mf); } } else { phaseReport.append("\n\thits, but fails to clear it.\n"); } return; } // yeech. handle damage. . different weapons do this in very different ways int hits = 1, nCluster = 1, nSalvoBonus = 0; int nDamPerHit = wtype.getDamage(); boolean bSalvo = false; // ecm check is heavy, so only do it once boolean bCheckedECM = false; boolean bECMAffected = false; boolean bMekStealthActive = false; String sSalvoType = " shot(s) "; boolean bAllShotsHit = false; int nRange = ae.getPosition().distance(target.getPosition()); int nMissilesModifier = 0; boolean maxtechmissiles = game.getOptions().booleanOption("maxtech_mslhitpen"); if (maxtechmissiles) { if (nRange<=1) { nMissilesModifier = +1; } else if (nRange <= wtype.getShortRange()) { nMissilesModifier = 0; } else if (nRange <= wtype.getMediumRange()) { nMissilesModifier = -1; } else { nMissilesModifier = -2; } } // All shots fired by a Streak SRM weapon, during // a Mech Swarm hit, or at an adjacent building. if ( wtype.getAmmoType() == AmmoType.T_SRM_STREAK || wtype.getAmmoType() == AmmoType.T_NARC || ae.getSwarmTargetId() == wr.waa.getTargetId() || ( ( target.getTargetType() == Targetable.TYPE_BLDG_IGNITE || target.getTargetType() == Targetable.TYPE_BUILDING ) && ae.getPosition().distance( target.getPosition() ) <= 1 ) ) { bAllShotsHit = true; } // Mek swarms attach the attacker to the target. if ( !bMissed && Infantry.SWARM_MEK.equals( wtype.getInternalName() ) ) { // Is the target already swarmed? if ( Entity.NONE != entityTarget.getSwarmAttackerId() ) { phaseReport.append( "succeds, but the defender is " ); phaseReport.append( "already swarmed by another unit.\n" ); } // Did the target get destroyed by weapons fire? else if ( entityTarget.isDoomed() || entityTarget.isDestroyed() || entityTarget.getCrew().isDead() ) { phaseReport.append( "succeds, but the defender was " ); phaseReport.append( "destroyed by weapons fire.\n" ); } else { phaseReport.append( "succeeds! Defender swarmed.\n" ); ae.setSwarmTargetId( wr.waa.getTargetId() ); entityTarget.setSwarmAttackerId( wr.waa.getEntityId() ); } return; } // Magnetic Mine Launchers roll number of hits on battle armor // hits table but use # mines firing instead of men shooting. else if ( wtype.getInternalName().equals(BattleArmor.MINE_LAUNCHER) ) { hits = nShots; if ( !bAllShotsHit ) { hits = Compute.getBattleArmorHits( hits ); } bSalvo = true; sSalvoType = " mine(s) "; } // Other battle armor attacks use # of men firing to determine hits. // Each hit can be in a new location. The damage per shot comes from // the "racksize". else if ( isBattleArmorAttack ) { bSalvo = true; platoon = (Infantry) ae; nCluster = 1; nDamPerHit = wtype.getRackSize(); hits = platoon.getShootingStrength(); // All attacks during Mek Swarms hit; all // others use the Battle Armor hits table. if ( !bAllShotsHit ) { hits = Compute.getBattleArmorHits( hits ); } // Handle Inferno SRM squads. if (bInferno) { nCluster = hits; nDamPerHit = 0; sSalvoType = " Inferno missle(s) "; bSalvo = false; } } // Infantry damage depends on # men left in platoon. else if (isWeaponInfantry) { bSalvo = true; platoon = (Infantry)ae; nCluster = 5; nDamPerHit = 1; hits = platoon.getDamage(platoon.getShootingStrength()); // Handle Inferno SRM infantry. if (bInferno) { nCluster = hits; nDamPerHit = 0; sSalvoType = " Inferno missle(s) "; bSalvo = false; } } else if (wtype.getDamage() == WeaponType.DAMAGE_MISSILE || wtype.hasFlag(WeaponType.F_MISSILE_HITS) ) { bSalvo = true; // Weapons with ammo type T_BA_MG or T_BA_SMALL_LASER // don't have an atype object. if ( wtype.getAmmoType() == AmmoType.T_BA_MG || wtype.getAmmoType() == AmmoType.T_BA_SMALL_LASER ) { nDamPerHit = Math.abs( wtype.getAmmoType() ); } else { sSalvoType = " missile(s) "; // Get the damage from the linked ammo. nDamPerHit = atype.getDamagePerShot(); } if ( wtype.getAmmoType() == AmmoType.T_LRM || wtype.getAmmoType() == AmmoType.T_MRM || wtype.getAmmoType() == AmmoType.T_ATM || wtype.getAmmoType() == AmmoType.T_ROCKET_LAUNCHER ) { nCluster = 5; } // calculate # of missiles hitting if ( wtype.getAmmoType() == AmmoType.T_LRM || wtype.getAmmoType() == AmmoType.T_SRM || wtype.getAmmoType() == AmmoType.T_ATM ) { // check for artemis, else check for narc Mounted mLinker = weapon.getLinkedBy(); if ( wtype.getAmmoType() == AmmoType.T_ATM || ( mLinker != null && mLinker.getType() instanceof MiscType && !mLinker.isDestroyed() && !mLinker.isMissing() && !mLinker.isBreached() && mLinker.getType().hasFlag(MiscType.F_ARTEMIS) ) ) { // check ECM interference if (!bCheckedECM) { // Attacking Meks using stealth suffer ECM effects. if ( ae instanceof Mech ) { bMekStealthActive = ae.isStealthActive(); } bECMAffected = Compute.isAffectedByECM(ae, ae.getPosition(), target.getPosition()); bCheckedECM = true; } // also no artemis for IDF, and only use standard ammo (excepot for ATMs) if (!bECMAffected&& !bMekStealthActive && (!weapon.getType().hasModes() || !weapon.curMode().equals("Indirect")) && (atype.getMunitionType() == AmmoType.M_STANDARD || atype.getMunitionType() == AmmoType.M_EXTENDED_RANGE || atype.getMunitionType() == AmmoType.M_HIGH_EXPLOSIVE) ) { nSalvoBonus += 2; } } else if (entityTarget != null && entityTarget.isNarcedBy(ae.getOwner().getTeam())) { // check ECM interference if (!bCheckedECM) { // Attacking Meks using stealth suffer ECM effects. if ( ae instanceof Mech ) { bMekStealthActive = ae.isStealthActive(); } bECMAffected = Compute.isAffectedByECM(ae, ae.getPosition(), target.getPosition()); bCheckedECM = true; } // only apply Narc bonus if we're not suffering ECM effect // and we are using standard ammo. if (!bECMAffected && !bMekStealthActive && atype.getMunitionType() == AmmoType.M_STANDARD) { nSalvoBonus += 2; } } } // If dealing with Inferno rounds set damage to zero and reset // all salvo bonuses (cannot mix with other special munitions). if (bInferno) { nDamPerHit = 0; nSalvoBonus = 0; sSalvoType = " inferno missile(s) "; bSalvo = false; } // If dealing with fragmentation missiles, // it does double damage to infantry... if (bFragmentation) { sSalvoType = " fragmentation missile(s) "; } // Large MRM missile racks roll twice. // MRM missiles never recieve hit bonuses. if ( wtype.getRackSize() == 30 || wtype.getRackSize() == 40 ) { hits = Compute.missilesHit(wtype.getRackSize() / 2, nMissilesModifier, maxtechmissiles) + Compute.missilesHit(wtype.getRackSize() / 2, nMissilesModifier, maxtechmissiles); } // Battle Armor units multiply their racksize by the number // of men shooting and they can't get missile hit bonuses. else if ( ae instanceof BattleArmor ) { platoon = (Infantry) ae; int temp = wtype.getRackSize() * platoon.getShootingStrength(); // Do all shots hit? if ( bAllShotsHit ) { hits = temp; } else { // Account for more than 20 missles hitting. hits = 0; while ( temp > 20 ) { hits += Compute.missilesHit( 20, nMissilesModifier, maxtechmissiles ); temp -= 20; } hits += Compute.missilesHit( temp, nMissilesModifier, maxtechmissiles ); } // End not-all-shots-hit } // If all shots hit, use the full racksize. else if ( bAllShotsHit ) { hits = wtype.getRackSize(); } // In all other circumstances, roll for hits. else { hits = Compute.missilesHit(wtype.getRackSize(), nSalvoBonus + nMissilesModifier, maxtechmissiles); } // Advanced SRM's only hit with even numbers of missles. if ( null != atype && atype.getAmmoType() == AmmoType.T_SRM_ADVANCED ) { hits = 2 * (int) Math.floor( (1.0 + (float) hits) / 2.0); } } else if (atype != null && atype.getMunitionType() == AmmoType.M_CLUSTER) { // Cluster shots break into single point clusters. bSalvo = true; hits = wtype.getRackSize(); if ( !bAllShotsHit ) { hits = Compute.missilesHit( hits ); } nDamPerHit = 1; } else if (nShots > 1) { // this should handle multiple attacks from ultra and rotary ACs bSalvo = true; hits = nShots; if ( !bAllShotsHit ) { hits = Compute.missilesHit( hits ); } } else if (wtype.getAmmoType() == AmmoType.T_GAUSS_HEAVY) { // HGR does range-dependent damage if (nRange <= wtype.getShortRange()) { nDamPerHit = 25; } else if (nRange <= wtype.getMediumRange()) { nDamPerHit = 20; } else { nDamPerHit = 10; } } else if (wtype.hasFlag(WeaponType.F_ENERGY)) { // Check for Altered Damage from Energy Weapons (MTR, pg.22) nDamPerHit = wtype.getDamage(); if (game.getOptions().booleanOption("maxtech_altdmg")) { if (nRange<=1) { nDamPerHit++; } else if (nRange <= wtype.getMediumRange()) { // Do NOthing for Short and Medium Range } else if (nRange <= wtype.getLongRange()) { nDamPerHit--; } else if (nRange <= wtype.getExtremeRange()) { nDamPerHit = (int)Math.floor((double)nDamPerHit/2.0); } } } // Some weapons double the number of hits scored. if ( wtype.hasFlag(WeaponType.F_DOUBLE_HITS) ) { hits *= 2; } // We've calculated how many hits. At this point, any missed // shots damage the building instead of the target. if ( bMissed ) { if ( targetInBuilding && bldg != null ) { // Reduce the number of hits by AMS hits. if (wr.amsShotDownTotal > 0) { for (int i=0; i < wr.amsShotDown.length; i++) { int shotDown = Math.min(wr.amsShotDown[i], hits); phaseReport.append("\tAMS shoots down ") .append(shotDown).append(" missile(s).\n"); } hits -= wr.amsShotDownTotal; } // Is the building hit by Inferno rounds? if ( bInferno && hits > 0 ) { // start a fire in the targets hex Coords c = target.getPosition(); Hex h = game.getBoard().getHex(c); // Is there a fire in the hex already? if ( h.contains( Terrain.FIRE ) ) { phaseReport.append( " " ) .append( hits ) .append( " Inferno rounds added to hex " ) .append( c.getBoardNum() ) .append( ".\n" ); } else { phaseReport.append( " " ) .append( hits ) .append( " Inferno rounds start fire in hex " ) .append( c.getBoardNum() ) .append( ".\n" ); h.addTerrain(new Terrain(Terrain.FIRE, 1)); } game.board.addInfernoTo ( c, InfernoTracker.STANDARD_ROUND, hits ); sendChangedHex(c); } // Damage the building in one big lump. else { // Only report if damage was done to the building. int toBldg = hits * nDamPerHit; if ( toBldg > 0 ) { phaseReport.append( " " ) .append( damageBuilding( bldg, toBldg ) ) .append( "\n" ); } } // End rounds-hit } // End missed-target-in-building return; } // End missed-target // The building shields all units from a certain amount of damage. // The amount is based upon the building's CF at the phase's start. int bldgAbsorbs = 0; if ( targetInBuilding && bldg != null ) { bldgAbsorbs = (int) Math.ceil( bldg.getPhaseCF() / 10.0 ); } // All attacks (except from infantry weapons) // during Mek Swarms hit the same location. if ( !isWeaponInfantry && ae.getSwarmTargetId() == wr.waa.getTargetId() ) { nCluster = hits; } // Battle Armor MGs do one die of damage per hit to PBI. if ( wtype.getAmmoType() == AmmoType.T_BA_MG && (target instanceof Infantry) && !(target instanceof BattleArmor) ) { // ASSUMPTION: Building walls protect infantry from BA MGs. if ( bldgAbsorbs > 0 ) { int toBldg = nDamPerHit * hits; phaseReport.append( hits ) .append( sSalvoType ) .append( "hit,\n but " ) .append( damageBuilding( bldg, Math.min( toBldg, bldgAbsorbs ), " absorbs the shots, taking " ) ) .append( "\n" ); return; } nDamPerHit = Compute.d6(hits); phaseReport.append( "riddles the target with " ).append( nDamPerHit ).append( sSalvoType ).append( "and " ); hits = 1; } // Mech and Vehicle MGs do *DICE* of damage to PBI. else if (atype != null && atype.hasFlag(AmmoType.F_MG) && !isWeaponInfantry && (target instanceof Infantry) && !(target instanceof BattleArmor) ) { int dice = wtype.getDamage(); // A building may absorb the entire shot. if ( nDamPerHit <= bldgAbsorbs ) { int toBldg = nDamPerHit * hits; int curCF = bldg.getCurrentCF(); curCF = Math.min( curCF, toBldg ); bldg.setCurrentCF( curCF ); if ( bSalvo ) { phaseReport.append( hits ) .append( sSalvoType ) .append( "hit,\n" ); } else{ phaseReport.append( "hits,\n" ); } phaseReport.append( " but " ) .append( damageBuilding( bldg, Math.min( toBldg, bldgAbsorbs ), " absorbs the shots, taking " ) ) .append( "\n" ); return; } // If a building absorbs partial damage, reduce the dice of damage. else if ( bldgAbsorbs > 0 ) { dice -= bldgAbsorbs; } nDamPerHit = Compute.d6( dice ); phaseReport.append( "riddles the target with " ).append( nDamPerHit ).append( sSalvoType ).append( ".\n" ); bSalvo = true; // If a building absorbed partial damage, report it now // instead of later and then clear the variable. if ( bldgAbsorbs > 0 ) { phaseReport.append( " " ) .append( damageBuilding( bldg, bldgAbsorbs ) ); bldgAbsorbs = 0; } } // Report the number of hits. Infernos have their own reporting else if (bSalvo && !bInferno) { phaseReport.append( hits ).append( sSalvoType ).append( "hit" ) .append( toHit.getTableDesc() ); if (bECMAffected) { phaseReport.append(" (ECM prevents bonus)"); } else if (bMekStealthActive) { phaseReport.append(" (active Stealth prevents bonus)"); } if (nSalvoBonus > 0) { phaseReport.append(" (w/ +") .append(nSalvoBonus) .append(" bonus)"); } phaseReport.append("."); if (wr.amsShotDownTotal > 0) { for (int i=0; i < wr.amsShotDown.length; i++) { int shotDown = Math.min(wr.amsShotDown[i], hits); phaseReport.append("\n\tAMS engages, firing ") .append(wr.amsShotDown[i]).append(" shots, shooting down ") .append(shotDown).append(" missile(s)."); } hits -= wr.amsShotDownTotal; phaseReport.append("\n "); if (hits < 1) { phaseReport.append("AMS shoots down all incoming missiles!"); } else { phaseReport.append(hits); if (1 == hits) { phaseReport.append(" missile gets through."); } else { phaseReport.append(" missiles get through."); }; }; } } // convert the ATM missile damages to LRM type 5 point cluster damage // done here after AMS has been performed if (wtype.getAmmoType() == AmmoType.T_ATM) { hits = nDamPerHit * hits; nDamPerHit = 1; } // Make sure the player knows when his attack causes no damage. if ( hits == 0 ) { phaseReport.append( "attack deals zero damage.\n" ); } // for each cluster of hits, do a chunk of damage while (hits > 0) { int nDamage; // If the attack was with inferno rounds then // do heat and fire instead of damage. if ( bInferno ) { // AMS can shoot down infernos, too. if (wr.amsShotDownTotal > 0) { for (int i=0; i < wr.amsShotDown.length; i++) { int shotDown = Math.min(wr.amsShotDown[i], hits); phaseReport.append("\n\tAMS engages, firing ") .append(wr.amsShotDown[i]).append(" shots, shooting down ") .append(shotDown).append(" missile(s)."); } hits -= wr.amsShotDownTotal; phaseReport.append("\n "); if (hits < 1) { phaseReport.append("AMS shoots down all incoming missiles!"); } else { phaseReport.append(hits); if (1 == hits) { phaseReport.append(" missile gets through."); } else { phaseReport.append(" missiles get through."); }; }; if ( hits <= 0 ) { continue; } } // targeting a hex for ignition if( target.getTargetType() == Targetable.TYPE_HEX_IGNITE || target.getTargetType() == Targetable.TYPE_BLDG_IGNITE ) { phaseReport.append( "hits with " ) .append( hits ) .append( " inferno missles.\n" ); // Unless there a fire in the hex already, start one. Coords c = target.getPosition(); Hex h = game.getBoard().getHex(c); if ( !h.contains( Terrain.FIRE ) ) { phaseReport.append( " Fire started in hex " ) .append( c.getBoardNum() ) .append( ".\n" ); h.addTerrain(new Terrain(Terrain.FIRE, 1)); } game.board.addInfernoTo ( c, InfernoTracker.STANDARD_ROUND, hits ); sendChangedHex(c); return; } // Targeting an entity if (entityTarget != null ) { entityTarget.infernos.add( InfernoTracker.STANDARD_ROUND, hits ); phaseReport.append( "hits with " ) .append( hits ) .append( " inferno missles." ); phaseReport.append("\n " ) .append( target.getDisplayName() ) .append( " now on fire for ") .append( entityTarget.infernos.getTurnsLeftToBurn() ) .append(" turns.\n"); // start a fire in the targets hex Coords c = target.getPosition(); Hex h = game.getBoard().getHex(c); // Unless there a fire in the hex already, start one. if ( !h.contains( Terrain.FIRE ) ) { phaseReport.append( " Fire started in hex " ) .append( c.getBoardNum() ) .append( ".\n" ); h.addTerrain(new Terrain(Terrain.FIRE, 1)); } game.board.addInfernoTo ( c, InfernoTracker.STANDARD_ROUND, 1 ); sendChangedHex(c); return; } } // End is-inferno // targeting a hex for igniting if( target.getTargetType() == Targetable.TYPE_HEX_IGNITE || target.getTargetType() == Targetable.TYPE_BLDG_IGNITE ) { if ( !bSalvo ) { phaseReport.append("hits!"); } // We handle Inferno rounds above. int tn = wtype.getFireTN(); if (tn != TargetRoll.IMPOSSIBLE) { if ( bldg != null ) { tn += bldg.getType() - 1; } phaseReport.append( "\n" ); tryIgniteHex( target.getPosition(), bInferno, tn, true ); } return; } // targeting a hex for clearing if (target.getTargetType() == Targetable.TYPE_HEX_CLEAR) { nDamage = nDamPerHit * hits; if ( !bSalvo ) { phaseReport.append("hits!"); } if (ae instanceof Infantry) { phaseReport.append("\n But infantry cannot try to clear hexes!\n"); return; } phaseReport.append(" Terrain takes " ).append( nDamage ).append( " damage.\n"); // Any clear attempt can result in accidental ignition, even // weapons that can't normally start fires. that's weird. // Buildings can't be accidentally ignited. if ( bldg == null) { boolean alreadyIgnited = game.board.getHex(target.getPosition()).contains(Terrain.FIRE); boolean ignited = tryIgniteHex(target.getPosition(), bInferno, 9); if (!alreadyIgnited && ignited) return; } int tn = 14 - nDamage; tryClearHex(target.getPosition(), tn); return; } // Targeting a building. if ( target.getTargetType() == Targetable.TYPE_BUILDING ) { // The building takes the full brunt of the attack. nDamage = nDamPerHit * hits; if ( !bSalvo ) { phaseReport.append( "hits." ); } phaseReport.append( "\n " ) .append( damageBuilding( bldg, nDamage ) ) .append( "\n" ); // Damage any infantry in the hex. this.damageInfantryIn( bldg, nDamage ); // And we're done! return; } // Battle Armor squads equipped with fire protection // gear automatically avoid flaming death. if ( wtype.hasFlag(WeaponType.F_FLAMER) && target instanceof BattleArmor ) { for ( Enumeration iter = entityTarget.getMisc(); iter.hasMoreElements(); ) { Mounted mount = (Mounted) iter.nextElement(); EquipmentType equip = mount.getType(); if ( BattleArmor.FIRE_PROTECTION.equals (equip.getInternalName()) ) { if ( !bSalvo ) { phaseReport.append( "hits." ); } phaseReport.append( "\n However, " ) .append(target.getDisplayName() ) .append( " has fire protection gear so no damage is done.\n" ); // A building may be damaged, even if the squad is not. if ( bldgAbsorbs > 0 ) { int toBldg = nDamPerHit * Math.min( bldgAbsorbs, hits ); phaseReport.append( " " ) .append( damageBuilding( bldg, toBldg ) ) .append( "\n" ); } return; } } } // End target-may-be-immune // Flamers do heat to mechs instead damage if the option is // available and the mode is set. if ( entityTarget != null && (entityTarget instanceof Mech) && wtype.hasFlag(WeaponType.F_FLAMER) && game.getOptions().booleanOption("flamer_heat") && wtype.hasModes() && weapon.curMode().equals("Heat") ) { nDamage = nDamPerHit * hits; if ( !bSalvo ) { phaseReport.append( "hits." ); } phaseReport.append("\n Target gains ").append(nDamage).append(" more heat during heat phase."); entityTarget.heatBuildup += nDamage; hits = 0; } else if (entityTarget != null) { HitData hit = entityTarget.rollHitLocation ( toHit.getHitTable(), toHit.getSideTable(), wr.waa.getAimedLocation(), wr.waa.getAimingMode() ); // If a leg attacks hit a leg that isn't // there, then hit the other leg. if ( wtype.getInternalName().equals("LegAttack") && entityTarget.getInternal(hit) <= 0 ) { if ( hit.getLocation() == Mech.LOC_RLEG ) { hit = new HitData( Mech.LOC_LLEG ); } else { hit = new HitData( Mech.LOC_RLEG ); } } // Mine Launchers automatically hit the // CT of a Mech or the front of a Tank. if ( wtype.getInternalName() .equals(BattleArmor.MINE_LAUNCHER) ) { if ( target instanceof Mech ) { hit = new HitData( Mech.LOC_CT ); } else { // te instanceof Tank hit = new HitData( Tank.LOC_FRONT ); } } // Each hit in the salvo get's its own hit location. if (!bSalvo) { phaseReport.append("hits" ).append( toHit.getTableDesc() ).append( " " ). append( entityTarget.getLocationAbbr(hit)); if (hit.hitAimedLocation()) { phaseReport.append("(hit aimed location)"); } } // Special weapons do criticals instead of damage. if ( nDamPerHit == WeaponType.DAMAGE_SPECIAL ) { // Do criticals. String specialDamage = criticalEntity( entityTarget, hit.getLocation() ); // Replace "no effect" results with 4 points of damage. if ( specialDamage.endsWith(" no effect.") ) { // ASSUMPTION: buildings CAN'T absorb *this* damage. specialDamage = damageEntity(entityTarget, hit, 4); } else { specialDamage = "\n" + specialDamage; } // Report the result phaseReport.append( specialDamage ); } else { // Resolve damage normally. nDamage = nDamPerHit * Math.min(nCluster, hits); // A building may be damaged, even if the squad is not. if ( bldgAbsorbs > 0 ) { int toBldg = Math.min( bldgAbsorbs, nDamage ); nDamage -= toBldg; phaseReport.append( "\n " ) .append( damageBuilding( bldg, toBldg ) ); } // A building may absorb the entire shot. if ( nDamage == 0 ) { phaseReport.append( "\n " ) .append( entityTarget.getDisplayName() ) .append( " suffers no damage." ); } else if (bFragmentation) { // If it's a frag missile... phaseReport.append ( damageEntity(entityTarget, hit, nDamage, false, 1) ); } else if (bFlechette) { // If it's a frag missile... phaseReport.append ( damageEntity(entityTarget, hit, nDamage, false, 2) ); } else { if ((atype != null) && (atype.getMunitionType() == AmmoType.M_ARMOR_PIERCING)) hit.makeArmorPiercing(atype); phaseReport.append ( damageEntity(entityTarget, hit, nDamage) ); } } hits -= nCluster; creditKill(entityTarget, ae); } } // Handle the next cluster. phaseReport.append("\n"); } | 4135 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4135/e9c9879c067eb6888ee703f97c529969d0f49d37/Server.java/buggy/megamek/src/megamek/server/Server.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
2245,
3218,
28629,
3075,
484,
12,
3218,
28629,
1253,
12408,
16,
509,
1142,
18029,
13,
288,
3639,
368,
1377,
2332,
18,
659,
18,
8222,
2932,
21878,
69,
8863,
1377,
727,
3887,
142... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2245,
3218,
28629,
3075,
484,
12,
3218,
28629,
1253,
12408,
16,
509,
1142,
18029,
13,
288,
3639,
368,
1377,
2332,
18,
659,
18,
8222,
2932,
21878,
69,
8863,
1377,
727,
3887,
142... |
if (this.executing != null) | if (this.executing != null) { | public void start() { super.start(); if ( ( this.getMakesGui() ) && ( this.network != null ) ) { Dimension d = this.getSize(); int st = ( this.shadows ? SHADOW : 0 ); int tpw = d.width - ( 2 + st ); //System.out.print("Setting bounds on cardPanel to : 2, 2,"); //System.out.print( tpw ); //System.out.print(", "); //System.out.println(d.height - (2 + st)); //cardPanel.setBounds( 2, 2, tpw, d.height - ( 2 + st ) ); } if (this.executing != null) this.executing.setVisible(false); } | 10460 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10460/74455600036760c894c4b0a19954568ff461095e/DXApplication.java/buggy/dx/src/uipp/java/dx/net/DXApplication.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
787,
1435,
288,
3639,
2240,
18,
1937,
5621,
3639,
309,
261,
261,
333,
18,
588,
14534,
18070,
1435,
262,
597,
261,
333,
18,
5185,
480,
446,
262,
262,
288,
5411,
13037,
302,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
787,
1435,
288,
3639,
2240,
18,
1937,
5621,
3639,
309,
261,
261,
333,
18,
588,
14534,
18070,
1435,
262,
597,
261,
333,
18,
5185,
480,
446,
262,
262,
288,
5411,
13037,
302,
27... |
setCompletionValues( parameterScope, CompletionKind.ARGUMENT_TYPE, Key.DECL_SPECIFIER_SEQUENCE ); | setCompletionValues( parameterScope, CompletionKind.ARGUMENT_TYPE, KeywordSetKey.DECL_SPECIFIER_SEQUENCE ); | protected Declarator declarator( IDeclaratorOwner owner, IASTScope scope, SimpleDeclarationStrategy strategy, CompletionKind kind ) throws EndOfFileException, BacktrackException { Declarator d = null; DeclarationWrapper sdw = owner.getDeclarationWrapper(); overallLoop : do { d = new Declarator(owner); consumePointerOperators(d); if (LT(1) == IToken.tLPAREN) { consume(); declarator(d, scope, strategy, kind ); consume(IToken.tRPAREN); } else consumeTemplatedOperatorName(d, kind); for (;;) { switch (LT(1)) { case IToken.tLPAREN : boolean failed = false; IASTScope parameterScope = astFactory.getDeclaratorScope( scope, d.getNameDuple() ); // temporary fix for initializer/function declaration ambiguity if ( queryLookaheadCapability(2) && !LA(2).looksLikeExpression() && strategy != SimpleDeclarationStrategy.TRY_VARIABLE ) { if( LT(2) == IToken.tIDENTIFIER ) { IToken newMark = mark(); consume( IToken.tLPAREN ); ITokenDuple queryName = null; try { try { queryName = name(parameterScope, CompletionKind.TYPE_REFERENCE, Key.EMPTY ); if( ! astFactory.queryIsTypeName( parameterScope, queryName ) ) failed = true; } catch (Exception e) { logException( "declarator:queryIsTypeName", e ); //$NON-NLS-1$ throw backtrack; } } catch( BacktrackException b ) { failed = true; } if( queryName != null ) queryName.freeReferences(astFactory.getReferenceManager()); backup( newMark ); } } if( ( queryLookaheadCapability(2) && !LA(2).looksLikeExpression() && strategy != SimpleDeclarationStrategy.TRY_VARIABLE && !failed) || ! queryLookaheadCapability(3) ) { // parameterDeclarationClause d.setIsFunction(true); // TODO need to create a temporary scope object here consume(IToken.tLPAREN); setCompletionValues( scope, CompletionKind.ARGUMENT_TYPE, Key.DECL_SPECIFIER_SEQUENCE ); boolean seenParameter = false; parameterDeclarationLoop : for (;;) { switch (LT(1)) { case IToken.tRPAREN : consume(); setCompletionValues( parameterScope, CompletionKind.NO_SUCH_KIND, KeywordSets.Key.FUNCTION_MODIFIER ); break parameterDeclarationLoop; case IToken.tELLIPSIS : consume(); d.setIsVarArgs( true ); break; case IToken.tCOMMA : consume(); setCompletionValues( parameterScope, CompletionKind.ARGUMENT_TYPE, Key.DECL_SPECIFIER_SEQUENCE ); seenParameter = false; break; default : if (seenParameter) throw backtrack; parameterDeclaration(d, parameterScope); seenParameter = true; } } } if (LT(1) == IToken.tCOLON || LT(1) == IToken.t_try ) break overallLoop; IToken beforeCVModifier = mark(); IToken [] cvModifiers = new IToken[2]; int numCVModifiers = 0; IToken afterCVModifier = beforeCVModifier; // const-volatile // 2 options: either this is a marker for the method, // or it might be the beginning of old K&R style parameter declaration, see // void getenv(name) const char * name; {} // This will be determined further below while( (LT(1) == IToken.t_const || LT(1) == IToken.t_volatile) && numCVModifiers < 2 ) { cvModifiers[numCVModifiers++] = consume(); afterCVModifier = mark(); } //check for throws clause here List exceptionSpecIds = null; if (LT(1) == IToken.t_throw) { exceptionSpecIds = new ArrayList(); consume(); // throw consume(IToken.tLPAREN); // ( boolean done = false; IASTTypeId exceptionTypeId = null; while (!done) { switch (LT(1)) { case IToken.tRPAREN : consume(); done = true; break; case IToken.tCOMMA : consume(); break; default : try { exceptionTypeId = typeId(scope, false, CompletionKind.EXCEPTION_REFERENCE ); exceptionSpecIds.add(exceptionTypeId); exceptionTypeId.acceptElement( requestor, astFactory.getReferenceManager() ); } catch (BacktrackException e) { failParse(); consume(); // eat this token anyway continue; } break; } } if (exceptionSpecIds != null) try { d.setExceptionSpecification( astFactory .createExceptionSpecification( d.getDeclarationWrapper().getScope(), exceptionSpecIds)); } catch (ASTSemanticException e) { failParse(); throw backtrack; } catch (Exception e) { logException( "declarator:createExceptionSpecification", e ); //$NON-NLS-1$ throw backtrack; } } // check for optional pure virtual if (LT(1) == IToken.tASSIGN && LT(2) == IToken.tINTEGER && LA(2).getImage().equals("0")) //$NON-NLS-1$ { consume(IToken.tASSIGN); consume(IToken.tINTEGER); d.setPureVirtual(true); } if (afterCVModifier != LA(1) || LT(1) == IToken.tSEMI) { // There were C++-specific clauses after const/volatile modifier // Then it is a marker for the method if ( numCVModifiers > 0 ) { for( int i = 0; i < numCVModifiers; i++ ){ if( cvModifiers[i].getType() == IToken.t_const ) d.setConst(true); if( cvModifiers[i].getType() == IToken.t_volatile ) d.setVolatile(true); } } afterCVModifier = mark(); // In this case (method) we can't expect K&R parameter declarations, // but we'll check anyway, for errorhandling } break; case IToken.tLBRACKET : consumeArrayModifiers(d, sdw.getScope()); continue; case IToken.tCOLON : consume(IToken.tCOLON); IASTExpression exp = constantExpression(scope, CompletionKind.SINGLE_NAME_REFERENCE, Key.EXPRESSION ); d.setBitFieldExpression(exp); default : break; } break; } if (LA(1).getType() != IToken.tIDENTIFIER) break; } while (true); if (d.getOwner() instanceof IDeclarator) ((Declarator)d.getOwner()).setOwnedDeclarator(d); return d; } | 54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/fb57293d470c0087b6edd9673084d38ceb95e5c2/Parser.java/buggy/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/Parser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
16110,
5880,
3496,
5880,
12,
3639,
1599,
557,
80,
5880,
5541,
3410,
16,
467,
9053,
3876,
2146,
16,
4477,
6094,
4525,
6252,
16,
20735,
5677,
3846,
262,
3639,
1216,
4403,
951,
812,
50... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
16110,
5880,
3496,
5880,
12,
3639,
1599,
557,
80,
5880,
5541,
3410,
16,
467,
9053,
3876,
2146,
16,
4477,
6094,
4525,
6252,
16,
20735,
5677,
3846,
262,
3639,
1216,
4403,
951,
812,
50... |
Vector data = JFritzUtils.retrieveSipProvider(JFritz.getProperty("box.address","192.168.178.1"), JFritz.getProperty("box.password"), new FritzBoxFirmware(JFritz.getProperty("box.firmware"))); | Vector data = JFritzUtils.retrieveSipProvider(JFritz.getProperty("box.address","192.168.178.1"), Encryption.decrypt(JFritz.getProperty("box.password")), new FritzBoxFirmware(JFritz.getProperty("box.firmware"))); | public void showConfigDialog() { configDialog = new ConfigDialog(this); configDialog.setLocationRelativeTo(this); if (configDialog.showDialog()) { configDialog.storeValues(); jfritz.saveProperties(); if (jfritz.getSIPProviderTableModel().getProviderList().size() == 0) { // Noch keine SipProvider eingelesen. try { Vector data = JFritzUtils.retrieveSipProvider(JFritz.getProperty("box.address","192.168.178.1"), JFritz.getProperty("box.password"), new FritzBoxFirmware(JFritz.getProperty("box.firmware"))); jfritz.getSIPProviderTableModel().updateProviderList(data); jfritz.getSIPProviderTableModel().fireTableDataChanged(); jfritz.getSIPProviderTableModel().saveToXMLFile(JFritz.SIPPROVIDER_FILE); jfritz.getCallerlist().fireTableDataChanged(); } catch (WrongPasswordException e1) { jfritz.errorMsg("Passwort ungltig!"); } catch (IOException e1) { jfritz.errorMsg("FRITZ!Box-Adresse ungltig!"); } catch (InvalidFirmwareException e1) { jfritz.errorMsg("Firmware-Erkennung gescheitert!"); } } monitorButton.setEnabled((Integer.parseInt(JFritz.getProperty( "option.callMonitorType", "0")) > 0)); // Show / hide CallByCall column if (JFritzUtils.parseBoolean(JFritz.getProperty( "option.showCallByCall", "false"))) { TableColumnModel colModel = jfritz.getJframe().getCallerTable() .getColumnModel(); if (!colModel.getColumn(2).getHeaderValue().toString().equals( "Call-By-Call")) { colModel.addColumn(jfritz.getJframe().getCallerTable() .getCallByCallColumn()); colModel.moveColumn(colModel.getColumnCount() - 1, 2); colModel.getColumn(2).setPreferredWidth( Integer.parseInt(JFritz.getProperty( "column2.width", "60"))); getCallerListPanel().getCallByCallButton().setEnabled(true); } } else { TableColumnModel colModel = jfritz.getJframe().getCallerTable() .getColumnModel(); if (colModel.getColumn(2).getHeaderValue().toString().equals( "Call-By-Call")) { colModel.removeColumn(colModel.getColumn(2)); getCallerListPanel().getCallByCallButton() .setEnabled(false); } } } configDialog.dispose(); } | 7476 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7476/e740af011ac4163fb71438731809f3f16b900979/JFritzWindow.java/clean/jfritz/src/de/moonflower/jfritz/JFritzWindow.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
2405,
809,
6353,
1435,
288,
202,
202,
1425,
6353,
273,
394,
1903,
6353,
12,
2211,
1769,
202,
202,
1425,
6353,
18,
542,
2735,
8574,
774,
12,
2211,
1769,
202,
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,
918,
2405,
809,
6353,
1435,
288,
202,
202,
1425,
6353,
273,
394,
1903,
6353,
12,
2211,
1769,
202,
202,
1425,
6353,
18,
542,
2735,
8574,
774,
12,
2211,
1769,
202,
202,
430,
261... |
public org.quickfix.field.SecuritySettlAgentContactName getSecuritySettlAgentContactName() throws FieldNotFound { org.quickfix.field.SecuritySettlAgentContactName value = new org.quickfix.field.SecuritySettlAgentContactName(); | public quickfix.field.SecuritySettlAgentContactName getSecuritySettlAgentContactName() throws FieldNotFound { quickfix.field.SecuritySettlAgentContactName value = new quickfix.field.SecuritySettlAgentContactName(); | public org.quickfix.field.SecuritySettlAgentContactName getSecuritySettlAgentContactName() throws FieldNotFound { org.quickfix.field.SecuritySettlAgentContactName value = new org.quickfix.field.SecuritySettlAgentContactName(); getField(value); return value; } | 5926 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5926/fecc27f98261270772ff182a1d4dfd94b5daa73d/SettlementInstructions.java/buggy/src/java/src/quickfix/fix41/SettlementInstructions.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
4368,
694,
6172,
3630,
6567,
461,
19288,
694,
6172,
3630,
6567,
461,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
4368,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4368,
694,
6172,
3630,
6567,
461,
19288,
694,
6172,
3630,
6567,
461,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
4368,
... |
do { uniqueId = String.valueOf(generatedUniqueIdCount++); } while (uniqueIdToBugInstanceMap.get(uniqueId) != null); | while (true) { uniqueId = String.valueOf(nextUniqueId++); BugInstance bug2 = uniqueIdToBugInstanceMap.get(uniqueId); if (bug2 == null) break; if (debug) System.out.println("found collision for "+uniqueId); }; | private String assignUniqueId(BugInstance bugInstance) { String uniqueId; do { uniqueId = String.valueOf(generatedUniqueIdCount++); } while (uniqueIdToBugInstanceMap.get(uniqueId) != null); bugInstance.setUniqueId(uniqueId); return uniqueId; } | 7352 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7352/0b20f72f3de86c7d94f6461064899a25083e5985/SortedBugCollection.java/buggy/findbugs/src/java/edu/umd/cs/findbugs/SortedBugCollection.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
514,
2683,
24174,
12,
19865,
1442,
7934,
1442,
13,
288,
202,
202,
780,
22345,
31,
202,
202,
2896,
288,
1082,
202,
6270,
548,
273,
514,
18,
1132,
951,
12,
11168,
24174,
1380,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
514,
2683,
24174,
12,
19865,
1442,
7934,
1442,
13,
288,
202,
202,
780,
22345,
31,
202,
202,
2896,
288,
1082,
202,
6270,
548,
273,
514,
18,
1132,
951,
12,
11168,
24174,
1380,
... |
float curvePA[] = {cp[0] + (lastPoint[0] - lastLastPoint[0]), | float curvePA[] = {cp[0] + (lastPoint[0] - lastLastPoint[0]), | public Path(XMLElement properties){ super(properties); String pathDataBuffer = ""; if (!properties.hasAttribute("d")) return; pathDataBuffer = properties.getStringAttribute("d"); StringBuffer pathChars = new StringBuffer(); boolean lastSeparate = false; for (int i = 0; i < pathDataBuffer.length(); i++){ char c = pathDataBuffer.charAt(i); boolean separate = false; if (c == 'M' || c == 'm' || c == 'L' || c == 'l' || c == 'H' || c == 'h' || c == 'V' || c == 'v' || c == 'C' || c == 'c' || c == 'S' || c == 's' || c == 'Z' || c == 'z' || c == ',') { separate = true; if (i != 0) { pathChars.append("|"); } } if (c == 'Z' || c == 'z') { separate = false; } if (c == '-' && !lastSeparate) { pathChars.append("|"); } if (c != ',') { pathChars.append("" + pathDataBuffer.charAt(i)); } if (separate && c != ',' && c != '-') { pathChars.append("|"); } lastSeparate = separate; } pathDataBuffer = pathChars.toString(); //String pathDataKeys[] = PApplet.split(pathDataBuffer, '|'); // use whitespace constant to get rid of extra spaces and CR or LF String pathDataKeys[] = PApplet.split(pathDataBuffer, "|" + PConstants.WHITESPACE); //for (int j = 0; j < pathDataKeys.length; j++) { // PApplet.println(j + "\t" + pathDataKeys[j]); //} //PApplet.println(pathDataKeys); //PApplet.println(); //float cp[] = {0, 0}; float cx = 0; float cy = 0; int i = 0; //for (int i = 0; i < pathDataKeys.length; i++){ while (i < pathDataKeys.length) { char c = pathDataKeys[i].charAt(0); switch (c) { //M - move to (absolute) case 'M': /* cp[0] = PApplet.parseFloat(pathDataKeys[i + 1]); cp[1] = PApplet.parseFloat(pathDataKeys[i + 2]); float s[] = {cp[0], cp[1]}; i += 2; points.add(s); */ cx = PApplet.parseFloat(pathDataKeys[i + 1]); cy = PApplet.parseFloat(pathDataKeys[i + 2]); moveto(cx, cy); i += 3; break; //m - move to (relative) case 'm': /* cp[0] = cp[0] + PApplet.parseFloat(pathDataKeys[i + 1]); cp[1] = cp[1] + PApplet.parseFloat(pathDataKeys[i + 2]); float s[] = {cp[0], cp[1]}; i += 2; points.add(s); */ cx = cx + PApplet.parseFloat(pathDataKeys[i + 1]); cy = cy + PApplet.parseFloat(pathDataKeys[i + 2]); moveto(cx, cy); i += 3; break; case 'L': cx = PApplet.parseFloat(pathDataKeys[i + 1]); cy = PApplet.parseFloat(pathDataKeys[i + 2]); lineto(cx, cy); i += 3; break; case 'l': cx = cx + PApplet.parseFloat(pathDataKeys[i + 1]); cy = cy + PApplet.parseFloat(pathDataKeys[i + 2]); lineto(cx, cy); i += 3; break; // horizontal lineto absolute case 'H': cx = PApplet.parseFloat(pathDataKeys[i + 1]); lineto(cx, cy); i += 2; break; // horizontal lineto relative case 'h': cx = cx + PApplet.parseFloat(pathDataKeys[i + 1]); lineto(cx, cy); i += 2; break; case 'V': cy = PApplet.parseFloat(pathDataKeys[i + 1]); lineto(cx, cy); i += 2; break; case 'v': cy = cy + PApplet.parseFloat(pathDataKeys[i + 1]); lineto(cx, cy); i += 2; break; //C - curve to (absolute) case 'C': { /* float curvePA[] = {PApplet.parseFloat(pathDataKeys[i + 1]), PApplet.parseFloat(pathDataKeys[i + 2])}; float curvePB[] = {PApplet.parseFloat(pathDataKeys[i + 3]), PApplet.parseFloat(pathDataKeys[i + 4])}; float endP[] = {PApplet.parseFloat(pathDataKeys[i + 5]), PApplet.parseFloat(pathDataKeys[i + 6])}; cp[0] = endP[0]; cp[1] = endP[1]; i += 6; points.add(curvePA); points.add(curvePB); points.add(endP); */ float ctrlX1 = PApplet.parseFloat(pathDataKeys[i + 1]); float ctrlY1 = PApplet.parseFloat(pathDataKeys[i + 2]); float ctrlX2 = PApplet.parseFloat(pathDataKeys[i + 3]); float ctrlY2 = PApplet.parseFloat(pathDataKeys[i + 4]); float endX = PApplet.parseFloat(pathDataKeys[i + 5]); float endY = PApplet.parseFloat(pathDataKeys[i + 6]); curveto(ctrlX1, ctrlY1, ctrlX2, ctrlY2, endX, endY); cx = endX; cy = endY; i += 7; } break; //c - curve to (relative) case 'c': { /* float curvePA[] = {cp[0] + PApplet.parseFloat(pathDataKeys[i + 1]), cp[1] + PApplet.parseFloat(pathDataKeys[i + 2])}; float curvePB[] = {cp[0] + PApplet.parseFloat(pathDataKeys[i + 3]), cp[1] + PApplet.parseFloat(pathDataKeys[i + 4])}; float endP[] = {cp[0] + PApplet.parseFloat(pathDataKeys[i + 5]), cp[1] + PApplet.parseFloat(pathDataKeys[i + 6])}; cp[0] = endP[0]; cp[1] = endP[1]; i += 6; points.add(curvePA); points.add(curvePB); points.add(endP); */ float ctrlX1 = cx + PApplet.parseFloat(pathDataKeys[i + 1]); float ctrlY1 = cy + PApplet.parseFloat(pathDataKeys[i + 2]); float ctrlX2 = cx + PApplet.parseFloat(pathDataKeys[i + 3]); float ctrlY2 = cy + PApplet.parseFloat(pathDataKeys[i + 4]); float endX = cx + PApplet.parseFloat(pathDataKeys[i + 5]); float endY = cy + PApplet.parseFloat(pathDataKeys[i + 6]); curveto(ctrlX1, ctrlY1, ctrlX2, ctrlY2, endX, endY); cx = endX; cy = endY; i += 7; } break; //S - curve to shorthand (absolute) case 'S': { /* float lastPoint[] = (float[]) points.get(points.size() - 1); float lastLastPoint[] = (float[]) points.get(points.size() - 2); float curvePA[] = {cp[0] + (lastPoint[0] - lastLastPoint[0]), cp[1] + (lastPoint[1] - lastLastPoint[1])}; float curvePB[] = {PApplet.parseFloat(pathDataKeys[i + 1]), PApplet.parseFloat(pathDataKeys[i + 2])}; float e[] = {PApplet.parseFloat(pathDataKeys[i + 3]), PApplet.parseFloat(pathDataKeys[i + 4])}; cp[0] = e[0]; cp[1] = e[1]; points.add(curvePA); points.add(curvePB); points.add(e); i += 4; */ float ppx = x[count-2]; float ppy = y[count-2]; float px = x[count-1]; float py = y[count-1]; float ctrlX1 = px + (px - ppx); float ctrlY1 = py + (py - ppy); float ctrlX2 = PApplet.parseFloat(pathDataKeys[i + 1]); float ctrlY2 = PApplet.parseFloat(pathDataKeys[i + 2]); float endX = PApplet.parseFloat(pathDataKeys[i + 3]); float endY = PApplet.parseFloat(pathDataKeys[i + 4]); curveto(ctrlX1, ctrlY1, ctrlX2, ctrlY2, endX, endY); cx = endX; cy = endY; i += 5; } break; //s - curve to shorthand (relative) case 's': { /* float lastPoint[] = (float[]) points.get(points.size() - 1); float lastLastPoint[] = (float[]) points.get(points.size() - 2); float curvePA[] = {cp[0] + (lastPoint[0] - lastLastPoint[0]), cp[1] + (lastPoint[1] - lastLastPoint[1])}; float curvePB[] = {cp[0] + PApplet.parseFloat(pathDataKeys[i + 1]), cp[1] + PApplet.parseFloat(pathDataKeys[i + 2])}; float e[] = {cp[0] + PApplet.parseFloat(pathDataKeys[i + 3]), cp[1] + PApplet.parseFloat(pathDataKeys[i + 4])}; cp[0] = e[0]; cp[1] = e[1]; points.add(curvePA); points.add(curvePB); points.add(e); i += 4; */ float ppx = x[count-2]; float ppy = y[count-2]; float px = x[count-1]; float py = y[count-1]; float ctrlX1 = px + (px - ppx); float ctrlY1 = py + (py - ppy); float ctrlX2 = cx + PApplet.parseFloat(pathDataKeys[i + 1]); float ctrlY2 = cy + PApplet.parseFloat(pathDataKeys[i + 2]); float endX = cx + PApplet.parseFloat(pathDataKeys[i + 3]); float endY = cy + PApplet.parseFloat(pathDataKeys[i + 4]); curveto(ctrlX1, ctrlY1, ctrlX2, ctrlY2, endX, endY); cx = endX; cy = endY; i += 5; } break; case 'Z': case 'z': closed = true; i++; break; default: throw new RuntimeException("shape command not handled: " + pathDataKeys[i]); } } } | 8833 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8833/13daee0b7fef1293294248c7b5dbf6bc6b650b3c/SVG.java/clean/candy/src/processing/candy/SVG.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
2666,
12,
15223,
1790,
15329,
5411,
2240,
12,
4738,
1769,
5411,
514,
589,
751,
1892,
273,
1408,
31,
5411,
309,
16051,
4738,
18,
5332,
1499,
2932,
72,
6,
3719,
7734,
327,
31,
5411,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
2666,
12,
15223,
1790,
15329,
5411,
2240,
12,
4738,
1769,
5411,
514,
589,
751,
1892,
273,
1408,
31,
5411,
309,
16051,
4738,
18,
5332,
1499,
2932,
72,
6,
3719,
7734,
327,
31,
5411,
... |
if (url.startsWith("jdbc:postgresql:")) { query = new PostgresEsqlQuery(getConnection(),queryString); | if (database.indexOf("postgresql") > -1) { query = new PostgresEsqlQuery(connection,queryString); | public AbstractEsqlQuery createQuery(final String type, final String queryString) throws SQLException { AbstractEsqlQuery query; if ("".equals(type) || "auto".equalsIgnoreCase(type)) { String url = getURL(); if (url.startsWith("jdbc:postgresql:")) { query = new PostgresEsqlQuery(getConnection(),queryString); } else if (url.startsWith("jdbc:mysql:")) { query = new MysqlEsqlQuery(getConnection(),queryString); } else if (url.startsWith("jdbc:sybase:")) { query = new SybaseEsqlQuery(getConnection(),queryString); } else if (url.startsWith("jdbc:oracle:")) { query = new OracleEsqlQuery(getConnection(),queryString); } else if (url.startsWith("jdbc:pervasive:")) { query = new PervasiveEsqlQuery(getConnection(),queryString); } else { getLogger().warn("Cannot guess database type from jdbc url: " + String.valueOf(url) +" - Defaulting to JDBC"); query = new JdbcEsqlQuery(getConnection(),queryString); } } else if ("sybase".equalsIgnoreCase(type)) { query = new SybaseEsqlQuery(getConnection(),queryString); } else if ("postgresql".equalsIgnoreCase(type)) { query = new PostgresEsqlQuery(getConnection(),queryString); } else if ("postgresql-old".equalsIgnoreCase(type)) { query = new PostgresOldEsqlQuery(getConnection(),queryString); } else if ("mysql".equalsIgnoreCase(type)) { query = new MysqlEsqlQuery(getConnection(),queryString); } else if ("oracle".equalsIgnoreCase(type)) { query = new OracleEsqlQuery(getConnection(),queryString); } else if ("pervasive".equalsIgnoreCase(type)) { query = new PervasiveEsqlQuery(getConnection(),queryString); } else if ("jdbc".equalsIgnoreCase(type)) { query = new JdbcEsqlQuery(getConnection(),queryString); } else { getLogger().error("Unknown database type: " + String.valueOf(type)); throw new SQLException("Unknown database type: " + String.valueOf(type)); } setupLogger(query); return(query); } | 46428 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46428/5b03b9aaf6bd1be3f972bff102987c56627c2cc8/AbstractEsqlConnection.java/clean/src/blocks/databases/java/org/apache/cocoon/components/language/markup/xsp/AbstractEsqlConnection.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
4115,
41,
4669,
1138,
17698,
12,
6385,
514,
618,
16,
727,
514,
11337,
13,
1216,
6483,
288,
3639,
4115,
41,
4669,
1138,
843,
31,
3639,
309,
261,
3660,
18,
14963,
12,
723,
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,
377,
1071,
4115,
41,
4669,
1138,
17698,
12,
6385,
514,
618,
16,
727,
514,
11337,
13,
1216,
6483,
288,
3639,
4115,
41,
4669,
1138,
843,
31,
3639,
309,
261,
3660,
18,
14963,
12,
723,
13,
747,
... |
public void setDefaultString(String defaultString) { _default = defaultString; } | public void setDefaultString(final String defaultString) { _default = defaultString; } | public void setDefaultString(String defaultString) { _default = defaultString; } //-- setDefaultString | 57307 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57307/639ed93115321ad51c2450f306c4d50d146ede46/JAnnotationTypeElement.java/buggy/src/main/java/org/exolab/javasource/JAnnotationTypeElement.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
9277,
780,
12,
780,
805,
780,
13,
202,
95,
202,
202,
67,
1886,
273,
805,
780,
31,
202,
97,
368,
413,
9277,
780,
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
9277,
780,
12,
780,
805,
780,
13,
202,
95,
202,
202,
67,
1886,
273,
805,
780,
31,
202,
97,
368,
413,
9277,
780,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
_createBreakpointRequest(vm); | _initializeRequest(); DrJava.consoleOut().println("Breakpoint lineNumber is " + lineNumber); | public Breakpoint( OpenDefinitionsDocument doc, int lineNumber, VirtualMachine vm) throws DebugException { _doc = doc; _lineNumber = lineNumber; _createBreakpointRequest(vm); } | 11192 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11192/fc098bf0e8c385557d32ed3c183745582612add6/Breakpoint.java/clean/drjava/src/edu/rice/cs/drjava/model/debug/Breakpoint.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
17030,
1153,
12,
3502,
7130,
2519,
997,
16,
509,
13629,
16,
18452,
4268,
13,
377,
1216,
4015,
503,
288,
3639,
389,
2434,
273,
997,
31,
565,
389,
1369,
1854,
273,
13629,
31,
4202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
17030,
1153,
12,
3502,
7130,
2519,
997,
16,
509,
13629,
16,
18452,
4268,
13,
377,
1216,
4015,
503,
288,
3639,
389,
2434,
273,
997,
31,
565,
389,
1369,
1854,
273,
13629,
31,
4202,
... |
add(new CharGenerator(".....Hello World!.....\0")); | add(new CharGenerator()); | public void init () { add(new CharGenerator(".....Hello World!.....\0")); add(new SplitJoin() { public void init() { setSplitter(ROUND_ROBIN ()); add(new ChannelConnectFilter (Character.TYPE)); add(new XORLoop()); //add(new ChannelConnectFilter (Character.TYPE)); //add(new ChannelConnectFilter (Character.TYPE)); setJoiner(ROUND_ROBIN()); } }); add(new BufferedCharPrinter()); } | 47772 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47772/96c9b2cce5ef002f82d8caf94c457a2a81394461/HelloWorld3.java/clean/streams/apps/tests/hello-splits/HelloWorld3.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1208,
1832,
565,
288,
3639,
527,
12,
2704,
3703,
3908,
10663,
3639,
527,
12,
2704,
5385,
4572,
1435,
5411,
288,
7734,
1071,
918,
1208,
1435,
7734,
288,
10792,
444,
26738,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1208,
1832,
565,
288,
3639,
527,
12,
2704,
3703,
3908,
10663,
3639,
527,
12,
2704,
5385,
4572,
1435,
5411,
288,
7734,
1071,
918,
1208,
1435,
7734,
288,
10792,
444,
26738,
12,
1... |
ExpressionEvaluator expressionEvaluator ) | PlexusContainer pluginContainer, ExpressionEvaluator expressionEvaluator ) | private void populatePluginFields( Mojo plugin, MojoDescriptor mojoDescriptor, PlexusConfiguration configuration, ExpressionEvaluator expressionEvaluator ) throws PluginConfigurationException { ComponentConfigurator configurator = null; try { String configuratorId = mojoDescriptor.getComponentConfigurator(); // TODO: should this be known to the component factory instead? And if so, should configuration be part of lookup? if ( StringUtils.isNotEmpty( configuratorId ) ) { configurator = (ComponentConfigurator) container.lookup( ComponentConfigurator.ROLE, configuratorId ); } else { configurator = (ComponentConfigurator) container.lookup( ComponentConfigurator.ROLE ); } configurator.configureComponent( plugin, configuration, expressionEvaluator ); } catch ( ComponentConfigurationException e ) { throw new PluginConfigurationException( "Unable to parse the created DOM for plugin configuration", e ); } catch ( ComponentLookupException e ) { throw new PluginConfigurationException( "Unable to retrieve component configurator for plugin configuration", e ); } finally { if ( configurator != null ) { try { container.release( configurator ); } catch ( ComponentLifecycleException e ) { } } } } | 47160 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47160/a96a03d0a0c5e023c0935bcb92977454bd45fadd/DefaultPluginManager.java/clean/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
6490,
3773,
2314,
12,
15931,
1909,
16,
15931,
3187,
312,
10007,
3187,
16,
453,
4149,
407,
1750,
1664,
16,
4766,
4202,
453,
4149,
407,
2170,
1909,
2170,
16,
5371,
15876,
2652,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6490,
3773,
2314,
12,
15931,
1909,
16,
15931,
3187,
312,
10007,
3187,
16,
453,
4149,
407,
1750,
1664,
16,
4766,
4202,
453,
4149,
407,
2170,
1909,
2170,
16,
5371,
15876,
2652,
1... |
source.append((char)ts.COMMA); pn = nf.createBinary(ts.COMMA, pn, assignExpr(ts, source, inForInit)); | sourceAdd((char)ts.COMMA); pn = nf.createBinary(ts.COMMA, pn, assignExpr(ts, inForInit)); | private Object expr(TokenStream ts, Source source, boolean inForInit) throws IOException, JavaScriptException { Object pn = assignExpr(ts, source, inForInit); while (ts.matchToken(ts.COMMA)) { source.append((char)ts.COMMA); pn = nf.createBinary(ts.COMMA, pn, assignExpr(ts, source, inForInit)); } return pn; } | 51996 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51996/3d2e81a014b22cf4d1eb8921bd4229c2ca7ff017/Parser.java/buggy/js/rhino/src/org/mozilla/javascript/Parser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1033,
3065,
12,
1345,
1228,
3742,
16,
4998,
1084,
16,
1250,
316,
1290,
2570,
13,
3639,
1216,
1860,
16,
11905,
503,
565,
288,
3639,
1033,
11059,
273,
2683,
4742,
12,
3428,
16,
1084,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1033,
3065,
12,
1345,
1228,
3742,
16,
4998,
1084,
16,
1250,
316,
1290,
2570,
13,
3639,
1216,
1860,
16,
11905,
503,
565,
288,
3639,
1033,
11059,
273,
2683,
4742,
12,
3428,
16,
1084,
... |
} } if (hiddenMode != null) { if (isValueReference(hiddenMode)) { ValueBinding vb = application.createValueBinding(hiddenMode); component.setHiddenMode(vb); } else { component.setHiddenMode(hiddenMode); | protected void setProperties(UIComponent uiComponent) { if (LOG.isDebugEnabled()) { if (UIImageItemComponent.COMPONENT_TYPE==getComponentType()) { LOG.debug("Component id='"+getId()+"' type='"+getComponentType()+"'."); } LOG.debug(" visible='"+visible+"'"); LOG.debug(" hiddenMode='"+hiddenMode+"'"); LOG.debug(" toolTipText='"+toolTipText+"'"); LOG.debug(" imageURL='"+imageURL+"'"); LOG.debug(" disabledImageURL='"+disabledImageURL+"'"); LOG.debug(" hoverImageURL='"+hoverImageURL+"'"); LOG.debug(" selectedImageURL='"+selectedImageURL+"'"); LOG.debug(" rendered='"+rendered+"'"); } super.setProperties(uiComponent); if ((uiComponent instanceof UIImageItemComponent)==false) { throw new IllegalStateException("Component specified by tag is not instanceof of 'UIImageItemComponent'."); } UIImageItemComponent component = (UIImageItemComponent) uiComponent; FacesContext facesContext = getFacesContext(); Application application = facesContext.getApplication(); if (visible != null) { if (isValueReference(visible)) { ValueBinding vb = application.createValueBinding(visible); component.setVisible(vb); } else { component.setVisible(getBoolean(visible)); } } if (hiddenMode != null) { if (isValueReference(hiddenMode)) { ValueBinding vb = application.createValueBinding(hiddenMode); component.setHiddenMode(vb); } else { component.setHiddenMode(hiddenMode); } } if (toolTipText != null) { if (isValueReference(toolTipText)) { ValueBinding vb = application.createValueBinding(toolTipText); component.setToolTipText(vb); } else { component.setToolTipText(toolTipText); } } if (imageURL != null) { if (isValueReference(imageURL)) { ValueBinding vb = application.createValueBinding(imageURL); component.setImageURL(vb); } else { component.setImageURL(imageURL); } } if (disabledImageURL != null) { if (isValueReference(disabledImageURL)) { ValueBinding vb = application.createValueBinding(disabledImageURL); component.setDisabledImageURL(vb); } else { component.setDisabledImageURL(disabledImageURL); } } if (hoverImageURL != null) { if (isValueReference(hoverImageURL)) { ValueBinding vb = application.createValueBinding(hoverImageURL); component.setHoverImageURL(vb); } else { component.setHoverImageURL(hoverImageURL); } } if (selectedImageURL != null) { if (isValueReference(selectedImageURL)) { ValueBinding vb = application.createValueBinding(selectedImageURL); component.setSelectedImageURL(vb); } else { component.setSelectedImageURL(selectedImageURL); } } if (rendered != null) { if (isValueReference(rendered)) { ValueBinding vb = application.createValueBinding(rendered); component.setVisible(vb); } else { component.setVisible(getBoolean(rendered)); } } } | 6232 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6232/1f1850be471d4b8bfd2f3c50aa61bc39bf91259a/UIImageItemTag.java/buggy/org.rcfaces.core/src/org/rcfaces/core/internal/taglib/UIImageItemTag.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
23126,
12,
5370,
1841,
5915,
1841,
13,
288,
202,
202,
430,
261,
4842,
18,
291,
2829,
1526,
10756,
288,
1082,
202,
430,
261,
5370,
2040,
1180,
1841,
18,
22922,
67,
2399,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
23126,
12,
5370,
1841,
5915,
1841,
13,
288,
202,
202,
430,
261,
4842,
18,
291,
2829,
1526,
10756,
288,
1082,
202,
430,
261,
5370,
2040,
1180,
1841,
18,
22922,
67,
2399,
... | |
Composite group= createGroup(composite, MultiFixMessages.CleanUpRefactoringWizard_UnusedCodeSection_description); | Composite group= createGroup(groups, MultiFixMessages.CleanUpRefactoringWizard_UnusedCodeSection_description); | private Composite fillUnnecessaryCodeTab(ScrolledComposite parent, final IJavaProject project, IDialogSettings section) { Composite composite= new Composite(parent, SWT.NONE); composite.setLayout(new GridLayout(1, false)); composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); //Unused Code Group Composite group= createGroup(composite, MultiFixMessages.CleanUpRefactoringWizard_UnusedCodeSection_description); fCleanUps[2]= new UnusedCodeCleanUp(section); fCleanUps[2].createConfigurationControl(group, project); group= createGroup(composite, MultiFixMessages.CleanUpRefactoringWizard_UnnecessaryCode_section ); fCleanUps[5]= new UnnecessaryCodeCleanUp(section); fCleanUps[5].createConfigurationControl(group, project); fCleanUps[6]= new StringCleanUp(section); fCleanUps[6].createConfigurationControl(group, project); return composite; } | 9698 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9698/5275b827c92bbc95b9015da6af090d870bd7a539/CleanUpRefactoringWizard.java/clean/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/CleanUpRefactoringWizard.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
1152,
14728,
3636,
984,
82,
4128,
1085,
5661,
12,
1541,
25054,
9400,
982,
16,
727,
467,
5852,
4109,
1984,
16,
1599,
3529,
2628,
2442,
13,
288,
1082,
202,
9400,
9635,
33,
394,
14728,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
1152,
14728,
3636,
984,
82,
4128,
1085,
5661,
12,
1541,
25054,
9400,
982,
16,
727,
467,
5852,
4109,
1984,
16,
1599,
3529,
2628,
2442,
13,
288,
1082,
202,
9400,
9635,
33,
394,
14728,... |
public /*@non_null*/ SList append(/*@non_null*/ SList x) { | public /*@ non_null @*/ SList append(/*@ non_null @*/ SList x) { | public /*@non_null*/ SList append(/*@non_null*/ SList x) { if (this instanceof SNil) return x; else { SPair us = (SPair)this; //@ nowarn Cast; return new SPair(us.head, us.tail.append(x)); } } | 46634 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46634/1f0e380371151ec65e4eeaff686caa9a79686bb3/SList.java/buggy/src/escjava/trunk/ESCTools/Escjava/java/escjava/prover/SList.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1748,
36,
5836,
67,
2011,
5549,
348,
682,
714,
12,
20308,
36,
5836,
67,
2011,
5549,
348,
682,
619,
13,
288,
202,
430,
261,
2211,
1276,
348,
12616,
13,
202,
565,
327,
619,
31,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1748,
36,
5836,
67,
2011,
5549,
348,
682,
714,
12,
20308,
36,
5836,
67,
2011,
5549,
348,
682,
619,
13,
288,
202,
430,
261,
2211,
1276,
348,
12616,
13,
202,
565,
327,
619,
31,
20... |
final PsiKeyword classKeyword = (PsiKeyword)PsiTreeUtil.getPrevSiblingOfType(nameIdentifier, PsiKeyword.class); | final PsiKeyword classKeyword = PsiTreeUtil.getPrevSiblingOfType(nameIdentifier, PsiKeyword.class); | private static void changeClassToInterface(PsiClass aClass) throws IncorrectOperationException { final PsiIdentifier nameIdentifier = aClass.getNameIdentifier(); final PsiKeyword classKeyword = (PsiKeyword)PsiTreeUtil.getPrevSiblingOfType(nameIdentifier, PsiKeyword.class); final PsiManager manager = aClass.getManager(); final PsiElementFactory factory = manager.getElementFactory(); final PsiKeyword interfaceKeyword = factory.createKeyword("interface"); classKeyword.replace(interfaceKeyword); } | 17306 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17306/2d46d291193579a7564649b4881c7ea8e02eda5b/ClassMayBeInterfaceInspection.java/buggy/plugins/InspectionGadgets/src/com/siyeh/ig/classlayout/ClassMayBeInterfaceInspection.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
3238,
760,
918,
2549,
797,
774,
1358,
12,
52,
7722,
797,
20148,
13,
7734,
1216,
657,
6746,
10602,
288,
5411,
727,
453,
7722,
3004,
508,
3004,
273,
20148,
18,
17994,
3004,
5621,
5411,
727,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3238,
760,
918,
2549,
797,
774,
1358,
12,
52,
7722,
797,
20148,
13,
7734,
1216,
657,
6746,
10602,
288,
5411,
727,
453,
7722,
3004,
508,
3004,
273,
20148,
18,
17994,
3004,
5621,
5411,
727,... |
throw new CRLException(ioe.toString()); | CRLException crle = new CRLException(ioe.getMessage()); crle.initCause (ioe); throw crle; | public CRL engineGenerateCRL(InputStream inStream) throws CRLException { try { return generateCRL(inStream); } catch (IOException ioe) { throw new CRLException(ioe.toString()); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ec415b5ab69e9516c29619bb561ab024d22ce1f2/X509CertificateFactory.java/buggy/core/src/classpath/gnu/gnu/java/security/provider/X509CertificateFactory.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
26526,
4073,
4625,
29524,
12,
4348,
28987,
13,
1216,
26526,
503,
225,
288,
565,
775,
1377,
288,
3639,
327,
2103,
29524,
12,
267,
1228,
1769,
1377,
289,
565,
1044,
261,
14106,
10847,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
26526,
4073,
4625,
29524,
12,
4348,
28987,
13,
1216,
26526,
503,
225,
288,
565,
775,
1377,
288,
3639,
327,
2103,
29524,
12,
267,
1228,
1769,
1377,
289,
565,
1044,
261,
14106,
10847,
... |
_scopeFrame.resolve(_oinvoke.partnerLink), (Element) fromEpr); | _scopeFrame.resolve(_oinvoke.partnerLink), (Element) fromEpr); | public final void run() { Element outboundMsg; try { outboundMsg = setupOutbound(_oinvoke, _oinvoke.initCorrelationsInput); } catch (FaultException e) { __log.error(e); FaultData fault = createFault(e.getQName(), _oinvoke); _self.parent.completed(fault, CompensationHandler.emptySet()); return; } ++_invoked; // if there is no output variable, then this is a one-way invoke boolean isTwoWay = _oinvoke.outputVar != null; try { if (!isTwoWay) { FaultData faultData = null; getBpelRuntimeContext().invoke( _scopeFrame.resolve(_oinvoke.partnerLink), _oinvoke.operation, outboundMsg, null); _self.parent.completed(faultData, CompensationHandler.emptySet()); } else /* two-way */{ final VariableInstance outputVar = _scopeFrame .resolve(_oinvoke.outputVar); InvokeResponseChannel invokeResponseChannel = newChannel(InvokeResponseChannel.class); final String mexId = getBpelRuntimeContext().invoke( _scopeFrame.resolve(_oinvoke.partnerLink), _oinvoke.operation, outboundMsg, invokeResponseChannel); object(new InvokeResponseChannelListener(invokeResponseChannel) { private static final long serialVersionUID = 4496880438819196765L; public void onResponse() { // we don't have to write variable data -> this already // happened in the nativeAPI impl FaultData fault = null; Element response; try { response = getBpelRuntimeContext().getPartnerResponse(mexId); } catch (Exception ex) { // TODO: Better error handling throw new RuntimeException(ex); } getBpelRuntimeContext().initializeVariable(outputVar, response); try { for (OScope.CorrelationSet anInitCorrelationsOutput : _oinvoke.initCorrelationsOutput) { initializeCorrelation(_scopeFrame.resolve(anInitCorrelationsOutput), outputVar); } if (_oinvoke.partnerLink.hasPartnerRole()) { // Trying to initialize partner epr based on a message-provided epr/session. if (!getBpelRuntimeContext().isPartnerRoleEndpointInitialized(_scopeFrame .resolve(_oinvoke.partnerLink))) { Node fromEpr = getBpelRuntimeContext().getSourceEPR(mexId); if (fromEpr != null) { getBpelRuntimeContext().writeEndpointReference( _scopeFrame.resolve(_oinvoke.partnerLink), (Element) fromEpr); } } String partnersSessionId = getBpelRuntimeContext().getSourceSessionId(mexId); if (partnersSessionId != null) getBpelRuntimeContext().initializePartnersSessionId(_scopeFrame.resolve(_oinvoke.partnerLink), partnersSessionId); } } catch (FaultException e) { __log.error(e); fault = createFault(e.getQName(), _oinvoke); } // TODO update output variable with data from non-initiate // correlation sets _self.parent.completed(fault, CompensationHandler.emptySet()); } public void onFault() { QName faultName = getBpelRuntimeContext().getPartnerFault(mexId); Element msg = getBpelRuntimeContext().getPartnerResponse(mexId); QName msgType = getBpelRuntimeContext().getPartnerResponseType( mexId); FaultData fault = createFault(faultName, msg, _oinvoke.getOwner().messageTypes.get(msgType), _self.o); _self.parent.completed(fault, CompensationHandler.emptySet()); } public void onFailure() { // This indicates a communication failure. We don't throw a fault, // because there is no fault, instead we'll re-incarnate the invoke // and either retry or indicate failure condition. // admin to resume the process. INVOKE.this.retryOrFailure(getBpelRuntimeContext().getPartnerFaultExplanation(mexId), null); } }); } } catch (FaultException fault) { __log.error(fault); FaultData faultData = createFault(fault.getQName(), _oinvoke, fault .getMessage()); _self.parent.completed(faultData, CompensationHandler.emptySet()); } } | 47044 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47044/10abf63eca983e7dd1c20e443c52eb981a8696f1/INVOKE.java/clean/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/INVOKE.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
727,
918,
1086,
1435,
288,
3639,
3010,
11663,
3332,
31,
3639,
775,
288,
5411,
11663,
3332,
273,
3875,
17873,
24899,
885,
90,
3056,
16,
389,
885,
90,
3056,
18,
2738,
6217,
15018,
121... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
727,
918,
1086,
1435,
288,
3639,
3010,
11663,
3332,
31,
3639,
775,
288,
5411,
11663,
3332,
273,
3875,
17873,
24899,
885,
90,
3056,
16,
389,
885,
90,
3056,
18,
2738,
6217,
15018,
121... |
log("Skipping email notifications for successful builds"); | log("Skipping email notifications for fixed and " + "successful builds"); | private void performBuild() throws Exception { //Reload the properties file. props = new CruiseControlProperties(_propsFileName); logCurrentBuildStatus(true); int messageLevel = props.isDebug() ? Project.MSG_DEBUG : (props.isVerbose() ? Project.MSG_VERBOSE : Project.MSG_INFO); CruiseLogger logger = new CruiseLogger(messageLevel); log("Opening build file: " + props.getAntFile()); String target = null; // remember: Null target means default target. if (((_buildCounter % props.getCleanBuildEvery()) == 0) && props.getCleanAntTarget() != "") { log("Using clean target: " + props.getCleanAntTarget()); target = props.getCleanAntTarget(); } else if (props.getAntTarget() != "") { log("Using normal target: " + props.getAntTarget()); target = props.getAntTarget(); } BuildRunner runner = new BuildRunner(props.getAntFile(), target, info.getLastGoodBuild(), info.getLastBuild (), info.getLabel(), logger); boolean successful = runner.runBuild(); logCurrentBuildStatus(false); checkModificationSetInvoked(runner.getProject()); buildFinished(runner.getProject(), successful); //(PENDING) do this in buildFinished? if (info.isBuildNotNecessary()) { if (!info.isLastBuildSuccessful() && props.shouldSpamWhileBroken()) { sendBuildEmail(_projectName + "Build still failing..."); } } else { if (info.isLastBuildSuccessful()) { _buildCounter++; if(props.shouldReportSuccess()) { sendBuildEmail(_projectName + " Build " + info.getLabel() + " Successful"); } else { log("Skipping email notifications for successful builds"); } info.incrementLabel(props.getLabelIncrementerClassName()); } else { sendBuildEmail(_projectName + "Build Failed"); } info.write(); } runner.reset(); } | 52149 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52149/40899f25abc5f8a6248d43a10cf5058ed2f78341/MasterBuild.java/buggy/main/src/net/sourceforge/cruisecontrol/MasterBuild.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
3073,
3116,
1435,
1216,
1185,
288,
3639,
368,
13013,
326,
1790,
585,
18,
3639,
3458,
273,
394,
385,
8653,
784,
3367,
2297,
24899,
9693,
4771,
1769,
3639,
613,
3935,
3116,
1482,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3073,
3116,
1435,
1216,
1185,
288,
3639,
368,
13013,
326,
1790,
585,
18,
3639,
3458,
273,
394,
385,
8653,
784,
3367,
2297,
24899,
9693,
4771,
1769,
3639,
613,
3935,
3116,
1482,
... |
return bodyToTree(patNode.and); | return bodyToTree(node.and); | protected Tree defaultBody(PatternNode patNode, Tree otherwise) { while (patNode != null) { PatternNode node = patNode; while ((node = node.or) != null) switch (node) { case DefaultPat(): return bodyToTree(patNode.and); } patNode = patNode.next(); } return otherwise; } | 5590 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5590/fafeb42979594eb9e197df5c2c9248fbe9592515/PatternMatcher.java/buggy/sources/scalac/transformer/matching/PatternMatcher.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
202,
1117,
4902,
805,
2250,
12,
3234,
907,
9670,
907,
16,
4902,
3541,
13,
288,
565,
202,
202,
17523,
261,
16330,
907,
480,
446,
13,
288,
565,
1082,
202,
3234,
907,
756,
273,
9670,
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,
565,
202,
1117,
4902,
805,
2250,
12,
3234,
907,
9670,
907,
16,
4902,
3541,
13,
288,
565,
202,
202,
17523,
261,
16330,
907,
480,
446,
13,
288,
565,
1082,
202,
3234,
907,
756,
273,
9670,
907,
... |
source.append((char)ts.SHOP); source.append((char)ts.getOp()); pn = nf.createBinary(ts.getOp(), pn, addExpr(ts, source)); | sourceAdd((char)ts.SHOP); sourceAdd((char)ts.getOp()); pn = nf.createBinary(ts.getOp(), pn, addExpr(ts)); | private Object shiftExpr(TokenStream ts, Source source) throws IOException, JavaScriptException { Object pn = addExpr(ts, source); while (ts.matchToken(ts.SHOP)) { source.append((char)ts.SHOP); source.append((char)ts.getOp()); pn = nf.createBinary(ts.getOp(), pn, addExpr(ts, source)); } return pn; } | 19042 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/19042/92ccdd736e7a1516e4fb6d1eaf915e7021c8dc95/Parser.java/clean/src/org/mozilla/javascript/Parser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1033,
4654,
4742,
12,
1345,
1228,
3742,
16,
4998,
1084,
13,
3639,
1216,
1860,
16,
11905,
503,
565,
288,
3639,
1033,
11059,
273,
527,
4742,
12,
3428,
16,
1084,
1769,
3639,
1323,
261,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1033,
4654,
4742,
12,
1345,
1228,
3742,
16,
4998,
1084,
13,
3639,
1216,
1860,
16,
11905,
503,
565,
288,
3639,
1033,
11059,
273,
527,
4742,
12,
3428,
16,
1084,
1769,
3639,
1323,
261,... |
Declaration lookup (Symbol sym) | Declaration lookup (String sym) | Declaration lookup (Symbol sym) { for (Variable var = firstVar (); var != null; var = var.nextVar ()) { Declaration decl = (Declaration) var; if (decl.sym == sym) return decl; } return null; } | 36870 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/36870/9933571afc04a317d6c4f5d01a969d3b5695a14e/ScopeExp.java/buggy/kawa/lang/ScopeExp.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
16110,
4302,
3689,
261,
780,
5382,
13,
225,
288,
565,
364,
261,
3092,
569,
273,
1122,
1537,
261,
1769,
225,
569,
480,
446,
31,
225,
569,
273,
569,
18,
4285,
1537,
1832,
13,
1377,
288,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
16110,
4302,
3689,
261,
780,
5382,
13,
225,
288,
565,
364,
261,
3092,
569,
273,
1122,
1537,
261,
1769,
225,
569,
480,
446,
31,
225,
569,
273,
569,
18,
4285,
1537,
1832,
13,
1377,
288,
... |
{ DefaultTreeModel treeModel = (DefaultTreeModel) view.tree.getModel(); DefaultMutableTreeNode pNode; List pSummaries = agentCtrl.getUserProjects(); if (pSummaries != null) { Iterator j = pSummaries.iterator(); ProjectSummary ps; Integer projectID; while (j.hasNext()) { ps = (ProjectSummary) j.next(); projectID = new Integer(ps.getID()); pNode = (DefaultMutableTreeNode) pNodes.get(projectID); pNode.removeAllChildren(); addDatasets(ps.getDatasets(), pNode, false); treeModel.reload(pNode); } } } | { DefaultTreeModel treeModel = (DefaultTreeModel) view.tree.getModel(); DefaultMutableTreeNode pNode; List pSummaries = agentCtrl.getUserProjects(); if (pSummaries != null) { Iterator j = pSummaries.iterator(); ProjectSummary ps; Integer projectID; while (j.hasNext()) { ps = (ProjectSummary) j.next(); projectID = new Integer(ps.getID()); pNode = (DefaultMutableTreeNode) pNodes.get(projectID); pNode.removeAllChildren(); addDatasets(ps.getDatasets(), pNode, false); treeModel.reload(pNode); } } } | void updateProjectInTree() { DefaultTreeModel treeModel = (DefaultTreeModel) view.tree.getModel(); DefaultMutableTreeNode pNode; List pSummaries = agentCtrl.getUserProjects(); if (pSummaries != null) { Iterator j = pSummaries.iterator(); ProjectSummary ps; Integer projectID; while (j.hasNext()) { ps = (ProjectSummary) j.next(); projectID = new Integer(ps.getID()); pNode = (DefaultMutableTreeNode) pNodes.get(projectID); pNode.removeAllChildren(); addDatasets(ps.getDatasets(), pNode, false); treeModel.reload(pNode); } } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/0f6adad8d8ff39bdd3e4f95c09c34b2489329435/ExplorerPaneManager.java/clean/SRC/org/openmicroscopy/shoola/agents/datamng/ExplorerPaneManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
6459,
1089,
4109,
382,
2471,
1435,
202,
95,
202,
202,
1868,
2471,
1488,
2151,
1488,
273,
261,
1868,
2471,
1488,
13,
1476,
18,
3413,
18,
588,
1488,
5621,
202,
202,
1868,
19536,
12513,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1089,
4109,
382,
2471,
1435,
202,
95,
202,
202,
1868,
2471,
1488,
2151,
1488,
273,
261,
1868,
2471,
1488,
13,
1476,
18,
3413,
18,
588,
1488,
5621,
202,
202,
1868,
19536,
12513,... |
destinationNameField.setFocus(); } | destinationNameField.setFocus(); } | protected void giveFocusToDestination() { destinationNameField.setFocus(); } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/901694a204e2e98a8a01b05f67351a3c900227dc/WizardPreferencesPage.java/clean/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/preferences/WizardPreferencesPage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
8492,
9233,
774,
5683,
1435,
288,
3639,
2929,
461,
974,
18,
542,
9233,
5621,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
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,
4750,
918,
8492,
9233,
774,
5683,
1435,
288,
3639,
2929,
461,
974,
18,
542,
9233,
5621,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
System.out.println("lowerBound " + lowerBound); | public double[] distributionForInstance(Instance instance) throws Exception { double[] probs = new double[m_Instances.numClasses()]; double prob, sum, temp; double lowerBound = Math.pow(Double.MIN_VALUE, 1.0 / (instance.numAttributes() - 1.0)); System.out.println("lowerBound " + lowerBound); sum = Math.sqrt(Utils.sum(m_Counts)); updateMinMax(instance); for (int i = 0; i < m_Instances.numInstances(); i++) { Instance inst = m_Instances.instance(i); if (!inst.classIsMissing()) { prob = 1; for (int j = 0; j < m_Instances.numAttributes(); j++) { if (j != m_Instances.classIndex()) { temp = normalKernel(distance(instance, inst, j) * sum) * sum; if (temp < lowerBound) { prob *= lowerBound; } else { prob *= temp; } } } probs[(int) inst.classValue()] += prob; } } Utils.normalize(probs); return probs; } | 6866 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6866/47de702252bd50bfd08648b3957145aa31b86d06/KernelDensity.java/clean/classifiers/KernelDensity.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1645,
8526,
7006,
1290,
1442,
12,
1442,
791,
13,
1216,
1185,
288,
3639,
1645,
8526,
18989,
273,
394,
1645,
63,
81,
67,
5361,
18,
2107,
4818,
1435,
15533,
565,
1645,
3137,
16,
2142,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1645,
8526,
7006,
1290,
1442,
12,
1442,
791,
13,
1216,
1185,
288,
3639,
1645,
8526,
18989,
273,
394,
1645,
63,
81,
67,
5361,
18,
2107,
4818,
1435,
15533,
565,
1645,
3137,
16,
2142,
... | |
return columnTypes; } | return columnTypes; } | public String[] getColumnTypes() { return columnTypes; } | 56322 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56322/c47d471f98161725d59e8556a68f59018532c486/ExportResultSetForObject.java/buggy/java/engine/org/apache/derby/impl/load/ExportResultSetForObject.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
514,
8526,
6716,
2016,
1435,
288,
565,
327,
1057,
2016,
31,
225,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
514,
8526,
6716,
2016,
1435,
288,
565,
327,
1057,
2016,
31,
225,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
ParserParameters paramsToParser = new ParserParameters(); | ParserParameters paramsToParser = new ParserParameters(documentRequest, documentMapper ); | public static String getDoc(int meta_id, HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException { ImcmsServices imcref = Imcms.getServices(); Vector vec = new Vector(); SystemData sysData = imcref.getSystemData(); String eMailServerMaster = sysData.getServerMasterAddress(); vec.add( "#EMAIL_SERVER_MASTER#" ); vec.add( eMailServerMaster ); HttpSession session = req.getSession( true ); UserDomainObject user = Utility.getLoggedOnUser( req ); Stack history = (Stack)user.get( "history" ); if ( history == null ) { history = new Stack(); user.put( "history", history ); } Integer meta_int = new Integer( meta_id ); if ( history.empty() || !history.peek().equals( meta_int ) ) { history.push( meta_int ); } DocumentMapper documentMapper = imcref.getDocumentMapper(); DocumentDomainObject document = documentMapper.getDocument( meta_id ); if ( null == document ) { res.setStatus( HttpServletResponse.SC_NOT_FOUND ); return imcref.getAdminTemplate( NO_PAGE_URL, user, vec ); } DocumentRequest documentRequest; Revisits revisits; String referrer = req.getHeader( HTTP_HEADER_REFERRER ); DocumentDomainObject referringDocument = null; Perl5Util perlrx = new Perl5Util(); if ( null != referrer && perlrx.match( "/meta_id=(\\d+)/", referrer ) ) { int referring_meta_id = Integer.parseInt( perlrx.group( 1 ) ); referringDocument = documentMapper.getDocument( referring_meta_id ); } documentRequest = new DocumentRequest( imcref, user, document, referringDocument, req, res ); documentRequest.setEmphasize( req.getParameterValues( "emp" ) ); Cookie[] cookies = req.getCookies(); Hashtable cookieHash = new Hashtable(); for ( int i = 0; cookies != null && i < cookies.length; ++i ) { Cookie currentCookie = cookies[i]; cookieHash.put( currentCookie.getName(), currentCookie.getValue() ); } revisits = new Revisits(); if ( cookieHash.get( "imVisits" ) == null ) { Date now = new Date(); long lNow = now.getTime(); String sNow = "" + lNow; Cookie resCookie = new Cookie( "imVisits", session.getId() + sNow ); resCookie.setMaxAge( 31500000 ); resCookie.setPath( "/" ); res.addCookie( resCookie ); revisits.setRevisitsId( session.getId() ); revisits.setRevisitsDate( sNow ); } else { revisits.setRevisitsId( cookieHash.get( "imVisits" ).toString() ); } documentRequest.setRevisits( revisits ); // FIXME: One of the places that need fixing. Number one, we should put the no-permission-page // among the templates for the default-language. Number two, we should use just one function for // checking permissions. Number three, since the user obviously has logged in, give him the page in his own language! if ( !documentMapper.userHasAtLeastDocumentReadPermission( user, document ) ) { session.setAttribute( "login.target", req.getRequestURL().append( "?" ).append( req.getQueryString() ).toString() ); String redirect = "/imcms/" + user.getLanguageIso639_2() + "/login/" + NO_PERMISSION_URL; res.setStatus( HttpServletResponse.SC_FORBIDDEN ); req.getRequestDispatcher( redirect ).forward( req,res ); return null; } if ( !document.isPublished() && !documentMapper.userHasMoreThanReadPermissionOnDocument( user, document ) ) { res.setStatus( HttpServletResponse.SC_FORBIDDEN ); return imcref.getAdminTemplate( NO_ACTIVE_DOCUMENT_URL, user, null ); } if ( document instanceof FormerExternalDocumentDomainObject ) { Utility.setDefaultHtmlContentType( res ); redirectToExternalDocumentTypeWithAction( document, res, "view" ); // Log to accesslog trackLog.info( documentRequest ); return null; } else if ( document instanceof UrlDocumentDomainObject ) { String url_ref = imcref.isUrlDoc( meta_id ); Perl5Util regexp = new Perl5Util(); if ( !regexp.match( "m!^\\w+:|^[/.]!", url_ref ) ) { url_ref = "http://" + url_ref; } res.sendRedirect( url_ref ); // Log to accesslog trackLog.info( documentRequest ); return null; } else if ( document instanceof BrowserDocumentDomainObject ) { String br_id = req.getHeader( "User-Agent" ); if ( br_id == null ) { br_id = ""; } String tmp = imcref.sqlQueryStr( "select top 1 to_meta_id\n" + "from browser_docs\n" + "join browsers on browsers.browser_id = browser_docs.browser_id\n" + "where meta_id = ? and ? like user_agent order by value desc", new String[]{"" + meta_id, br_id} ); if ( tmp != null && ( !"".equals( tmp ) ) ) { meta_id = Integer.parseInt( tmp ); } else { Map browserDocumentIdMap = ( (BrowserDocumentDomainObject)document ).getBrowserDocumentIdMap(); meta_id = ( (Integer)browserDocumentIdMap.get( BrowserDocumentDomainObject.Browser.DEFAULT ) ).intValue(); } res.sendRedirect( "GetDoc?meta_id=" + meta_id ); // Log to accesslog trackLog.info( documentRequest ); return null; } else if ( document instanceof HtmlDocumentDomainObject ) { Utility.setDefaultHtmlContentType( res ); String html_str_temp = imcref.isFramesetDoc( meta_id ); if ( html_str_temp == null ) { throw new RuntimeException( "Null-frameset encountered." ); } String htmlStr = html_str_temp; // Log to accesslog trackLog.info( documentRequest ); return htmlStr; } else if ( document instanceof FileDocumentDomainObject ) { String fileId = req.getParameter(REQUEST_PARAMETER__FILE_ID); FileDocumentDomainObject fileDocument = (FileDocumentDomainObject)document; FileDocumentDomainObject.FileDocumentFile file = fileDocument.getFileOrDefault(fileId) ; String filename = file.getFilename(); String mimetype = file.getMimeType(); InputStream fr; try { fr = new BufferedInputStream( file.getInputStreamSource().getInputStream() ); } catch ( IOException ex ) { return imcref.getAdminTemplate( NO_PAGE_URL, user, vec ); } int len = fr.available(); ServletOutputStream out = res.getOutputStream(); res.setContentLength( len ); res.setContentType( mimetype ); String content_disposition = ( null != req.getParameter( "download" ) ? "attachment" : "inline" ) + "; filename=\"" + filename + "\""; res.setHeader( "Content-Disposition", content_disposition ); try { int bytes_read; byte[] buffer = new byte[32768]; while ( -1 != ( bytes_read = fr.read( buffer ) ) ) { out.write( buffer, 0, bytes_read ); } } catch ( java.net.SocketException ex ) { log.debug( "Exception occured", ex ); } fr.close(); out.flush(); out.close(); // Log to accesslog trackLog.info( documentRequest ); return null; } else { Utility.setDefaultHtmlContentType( res ); String externalparam = null; if ( req.getParameter( "externalClass" ) != null || req.getAttribute( "externalClass" ) != null ) { String className; if ( req.getParameter( "externalClass" ) != null ) { className = req.getParameter( "externalClass" ); } else { className = (String)req.getAttribute( "externalClass" ); } try { Class cl = Class.forName( className ); imcode.external.GetDocControllerInterface obj = (imcode.external.GetDocControllerInterface)cl.newInstance(); externalparam = obj.createString( req ); } catch ( Exception e ) { StringWriter sw = new StringWriter(); e.printStackTrace( new PrintWriter( sw ) ); externalparam = "<!-- Exception: " + sw.toString() + " -->"; } } user.setTemplateGroup( null ); ParserParameters paramsToParser = new ParserParameters(); paramsToParser.setTemplate( req.getParameter( "template" ) ); paramsToParser.setParameter( req.getParameter( "param" ) ); paramsToParser.setExternalParameter( externalparam ); paramsToParser.setDocumentRequest( documentRequest ); // Log to accesslog trackLog.info( documentRequest ); String result = imcref.parsePage( paramsToParser ); return result; } } | 8781 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8781/a5433fd5f77312028d4ffc660c1e5be0d482365e/GetDoc.java/buggy/server/src/com/imcode/imcms/servlet/GetDoc.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
514,
17999,
12,
474,
2191,
67,
350,
16,
9984,
1111,
16,
12446,
400,
13,
5411,
1216,
1860,
16,
16517,
288,
3639,
2221,
6851,
5676,
709,
71,
1734,
273,
2221,
6851,
18,
588,
567... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
17999,
12,
474,
2191,
67,
350,
16,
9984,
1111,
16,
12446,
400,
13,
5411,
1216,
1860,
16,
16517,
288,
3639,
2221,
6851,
5676,
709,
71,
1734,
273,
2221,
6851,
18,
588,
567... |
mainLayout.add(part); | LayoutPart relative = mainLayout.findBottomRight(); if(relative != null && !(relative instanceof EditorArea)) { stack(part,relative); } else { mainLayout.add(part); } | public void addPart(LayoutPart part) { // If part added / removed always zoom out. if (isZoomed()) zoomOut(); // Look for a placeholder. PartPlaceholder placeholder = null; LayoutPart testPart = findPart(part.getID()); if (testPart != null && testPart instanceof PartPlaceholder) placeholder = (PartPlaceholder)testPart; // If there is no placeholder do a simple add. Otherwise, replace the placeholder. if (placeholder == null) { /* * Detached window no longer supported - remove when confirmed * * part.reparent(mainLayout.getParent()); */ mainLayout.add(part); } else { ILayoutContainer container = placeholder.getContainer(); if (container != null) { /* * Detached window no longer supported - remove when confirmed * * if (container instanceof DetachedPlaceHolder) { * //Create a detached window add the part on it. * DetachedPlaceHolder holder = (DetachedPlaceHolder)container; * detachedPlaceHolderList.remove(holder); * container.remove(testPart); * DetachedWindow window = new DetachedWindow(page); * detachedWindowList.add(window); * window.create(); * part.createControl(window.getShell()); * // Open window. * window.getShell().setBounds(holder.getBounds()); * window.open(); * // add part to detached window. * ViewPane pane = (ViewPane) part; * window.getShell().setText(pane.getPart().getTitle()); * window.add(pane, partDropListener); * LayoutPart otherChildren[] = holder.getChildren(); * for (int i = 0; i < otherChildren.length; i++) * part.getContainer().add(otherChildren[i]); * } else { */ // reconsistute parent if necessary if (container instanceof ContainerPlaceholder) { ContainerPlaceholder containerPlaceholder = (ContainerPlaceholder)container; ILayoutContainer parentContainer = containerPlaceholder.getContainer(); container = (ILayoutContainer)containerPlaceholder.getRealContainer(); if (container instanceof LayoutPart) { parentContainer.replace(containerPlaceholder, (LayoutPart)container); } containerPlaceholder.setRealContainer(null); } // reparent part. if (container instanceof PartTabFolder) { PartTabFolder folder = (PartTabFolder)container; part.reparent(folder.getControl().getParent()); } else { part.reparent(mainLayout.getParent()); } // replace placeholder with real part container.replace(placeholder, part); /* * Detached window no longer supported - remove when confirmed * * } */ } } // enable direct manipulation if (part instanceof ViewPane) enableDrag((ViewPane)part); enableDrop(part);} | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/106fa76699263fef6358428b892e0ba387109831/PerspectivePresentation.java/buggy/bundles/org.eclipse.ui/Eclipse UI/org/eclipse/ui/internal/PerspectivePresentation.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
918,
527,
1988,
12,
3744,
1988,
1087,
13,
288,
202,
759,
971,
1087,
3096,
342,
3723,
3712,
7182,
596,
18,
202,
430,
261,
291,
11497,
329,
10756,
202,
202,
14932,
1182,
5621,
1082,
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,
1071,
918,
527,
1988,
12,
3744,
1988,
1087,
13,
288,
202,
759,
971,
1087,
3096,
342,
3723,
3712,
7182,
596,
18,
202,
430,
261,
291,
11497,
329,
10756,
202,
202,
14932,
1182,
5621,
1082,
202,
... |
source.append((char)ts.FINALLY); source.append((char)ts.LC); source.append((char)ts.EOL); finallyblock = statement(ts, source); source.append((char)ts.RC); source.append((char)ts.EOL); | sourceAdd((char)ts.FINALLY); sourceAdd((char)ts.LC); sourceAdd((char)ts.EOL); finallyblock = statement(ts); sourceAdd((char)ts.RC); sourceAdd((char)ts.EOL); | private Object statementHelper(TokenStream ts, Source source) throws IOException, JavaScriptException { Object pn = null; // If skipsemi == true, don't add SEMI + EOL to source at the // end of this statment. For compound statements, IF/FOR etc. boolean skipsemi = false; int tt; int lastExprType = 0; // For wellTerminated. 0 to avoid warning. tt = ts.getToken(); switch(tt) { case TokenStream.IF: { skipsemi = true; source.append((char)ts.IF); int lineno = ts.getLineno(); Object cond = condition(ts, source); source.append((char)ts.LC); source.append((char)ts.EOL); Object ifTrue = statement(ts, source); Object ifFalse = null; if (ts.matchToken(ts.ELSE)) { source.append((char)ts.RC); source.append((char)ts.ELSE); source.append((char)ts.LC); source.append((char)ts.EOL); ifFalse = statement(ts, source); } source.append((char)ts.RC); source.append((char)ts.EOL); pn = nf.createIf(cond, ifTrue, ifFalse, lineno); break; } case TokenStream.SWITCH: { skipsemi = true; source.append((char)ts.SWITCH); pn = nf.createSwitch(ts.getLineno()); Object cur_case = null; // to kill warning Object case_statements; mustMatchToken(ts, ts.LP, "msg.no.paren.switch"); source.append((char)ts.LP); nf.addChildToBack(pn, expr(ts, source, false)); mustMatchToken(ts, ts.RP, "msg.no.paren.after.switch"); source.append((char)ts.RP); mustMatchToken(ts, ts.LC, "msg.no.brace.switch"); source.append((char)ts.LC); source.append((char)ts.EOL); while ((tt = ts.getToken()) != ts.RC && tt != ts.EOF) { switch(tt) { case TokenStream.CASE: source.append((char)ts.CASE); cur_case = nf.createUnary(ts.CASE, expr(ts, source, false)); source.append((char)ts.COLON); source.append((char)ts.EOL); break; case TokenStream.DEFAULT: cur_case = nf.createLeaf(ts.DEFAULT); source.append((char)ts.DEFAULT); source.append((char)ts.COLON); source.append((char)ts.EOL); // XXX check that there isn't more than one default break; default: reportError(ts, "msg.bad.switch"); break; } mustMatchToken(ts, ts.COLON, "msg.no.colon.case"); case_statements = nf.createLeaf(TokenStream.BLOCK); while ((tt = ts.peekToken()) != ts.RC && tt != ts.CASE && tt != ts.DEFAULT && tt != ts.EOF) { nf.addChildToBack(case_statements, statement(ts, source)); } // assert cur_case nf.addChildToBack(cur_case, case_statements); nf.addChildToBack(pn, cur_case); } source.append((char)ts.RC); source.append((char)ts.EOL); break; } case TokenStream.WHILE: { skipsemi = true; source.append((char)ts.WHILE); int lineno = ts.getLineno(); Object cond = condition(ts, source); source.append((char)ts.LC); source.append((char)ts.EOL); Object body = statement(ts, source); source.append((char)ts.RC); source.append((char)ts.EOL); pn = nf.createWhile(cond, body, lineno); break; } case TokenStream.DO: { source.append((char)ts.DO); source.append((char)ts.LC); source.append((char)ts.EOL); int lineno = ts.getLineno(); Object body = statement(ts, source); source.append((char)ts.RC); mustMatchToken(ts, ts.WHILE, "msg.no.while.do"); source.append((char)ts.WHILE); Object cond = condition(ts, source); pn = nf.createDoWhile(body, cond, lineno); break; } case TokenStream.FOR: { skipsemi = true; source.append((char)ts.FOR); int lineno = ts.getLineno(); Object init; // Node init is also foo in 'foo in Object' Object cond; // Node cond is also object in 'foo in Object' Object incr = null; // to kill warning Object body; mustMatchToken(ts, ts.LP, "msg.no.paren.for"); source.append((char)ts.LP); tt = ts.peekToken(); if (tt == ts.SEMI) { init = nf.createLeaf(ts.VOID); } else { if (tt == ts.VAR) { // set init to a var list or initial ts.getToken(); // throw away the 'var' token init = variables(ts, source, true); } else { init = expr(ts, source, true); } } tt = ts.peekToken(); if (tt == ts.RELOP && ts.getOp() == ts.IN) { ts.matchToken(ts.RELOP); source.append((char)ts.IN); // 'cond' is the object over which we're iterating cond = expr(ts, source, false); } else { // ordinary for loop mustMatchToken(ts, ts.SEMI, "msg.no.semi.for"); source.append((char)ts.SEMI); if (ts.peekToken() == ts.SEMI) { // no loop condition cond = nf.createLeaf(ts.VOID); } else { cond = expr(ts, source, false); } mustMatchToken(ts, ts.SEMI, "msg.no.semi.for.cond"); source.append((char)ts.SEMI); if (ts.peekToken() == ts.RP) { incr = nf.createLeaf(ts.VOID); } else { incr = expr(ts, source, false); } } mustMatchToken(ts, ts.RP, "msg.no.paren.for.ctrl"); source.append((char)ts.RP); source.append((char)ts.LC); source.append((char)ts.EOL); body = statement(ts, source); source.append((char)ts.RC); source.append((char)ts.EOL); if (incr == null) { // cond could be null if 'in obj' got eaten by the init node. pn = nf.createForIn(init, cond, body, lineno); } else { pn = nf.createFor(init, cond, incr, body, lineno); } break; } case TokenStream.TRY: { int lineno = ts.getLineno(); Object tryblock; Object catchblocks = null; Object finallyblock = null; skipsemi = true; source.append((char)ts.TRY); source.append((char)ts.LC); source.append((char)ts.EOL); tryblock = statement(ts, source); source.append((char)ts.RC); source.append((char)ts.EOL); catchblocks = nf.createLeaf(TokenStream.BLOCK); boolean sawDefaultCatch = false; int peek = ts.peekToken(); if (peek == ts.CATCH) { while (ts.matchToken(ts.CATCH)) { if (sawDefaultCatch) { reportError(ts, "msg.catch.unreachable"); } source.append((char)ts.CATCH); mustMatchToken(ts, ts.LP, "msg.no.paren.catch"); source.append((char)ts.LP); mustMatchToken(ts, ts.NAME, "msg.bad.catchcond"); String varName = ts.getString(); source.addString(ts.NAME, varName); Object catchCond = null; if (ts.matchToken(ts.IF)) { source.append((char)ts.IF); catchCond = expr(ts, source, false); } else { sawDefaultCatch = true; } mustMatchToken(ts, ts.RP, "msg.bad.catchcond"); source.append((char)ts.RP); mustMatchToken(ts, ts.LC, "msg.no.brace.catchblock"); source.append((char)ts.LC); source.append((char)ts.EOL); nf.addChildToBack(catchblocks, nf.createCatch(varName, catchCond, statements(ts, source), ts.getLineno())); mustMatchToken(ts, ts.RC, "msg.no.brace.after.body"); source.append((char)ts.RC); source.append((char)ts.EOL); } } else if (peek != ts.FINALLY) { mustMatchToken(ts, ts.FINALLY, "msg.try.no.catchfinally"); } if (ts.matchToken(ts.FINALLY)) { source.append((char)ts.FINALLY); source.append((char)ts.LC); source.append((char)ts.EOL); finallyblock = statement(ts, source); source.append((char)ts.RC); source.append((char)ts.EOL); } pn = nf.createTryCatchFinally(tryblock, catchblocks, finallyblock, lineno); break; } case TokenStream.THROW: { int lineno = ts.getLineno(); source.append((char)ts.THROW); pn = nf.createThrow(expr(ts, source, false), lineno); if (lineno == ts.getLineno()) wellTerminated(ts, ts.ERROR); break; } case TokenStream.BREAK: { int lineno = ts.getLineno(); source.append((char)ts.BREAK); // matchLabel only matches if there is one String label = matchLabel(ts); if (label != null) { source.addString(ts.NAME, label); } pn = nf.createBreak(label, lineno); break; } case TokenStream.CONTINUE: { int lineno = ts.getLineno(); source.append((char)ts.CONTINUE); // matchLabel only matches if there is one String label = matchLabel(ts); if (label != null) { source.addString(ts.NAME, label); } pn = nf.createContinue(label, lineno); break; } case TokenStream.WITH: { skipsemi = true; source.append((char)ts.WITH); int lineno = ts.getLineno(); mustMatchToken(ts, ts.LP, "msg.no.paren.with"); source.append((char)ts.LP); Object obj = expr(ts, source, false); mustMatchToken(ts, ts.RP, "msg.no.paren.after.with"); source.append((char)ts.RP); source.append((char)ts.LC); source.append((char)ts.EOL); Object body = statement(ts, source); source.append((char)ts.RC); source.append((char)ts.EOL); pn = nf.createWith(obj, body, lineno); break; } case TokenStream.VAR: { int lineno = ts.getLineno(); pn = variables(ts, source, false); if (ts.getLineno() == lineno) wellTerminated(ts, ts.ERROR); break; } case TokenStream.RETURN: { Object retExpr = null; int lineno = 0; source.append((char)ts.RETURN); // bail if we're not in a (toplevel) function if ((ts.flags & ts.TSF_FUNCTION) == 0) reportError(ts, "msg.bad.return"); /* This is ugly, but we don't want to require a semicolon. */ ts.flags |= ts.TSF_REGEXP; tt = ts.peekTokenSameLine(); ts.flags &= ~ts.TSF_REGEXP; if (tt != ts.EOF && tt != ts.EOL && tt != ts.SEMI && tt != ts.RC) { lineno = ts.getLineno(); retExpr = expr(ts, source, false); if (ts.getLineno() == lineno) wellTerminated(ts, ts.ERROR); ts.flags |= ts.TSF_RETURN_EXPR; } else { ts.flags |= ts.TSF_RETURN_VOID; } // XXX ASSERT pn pn = nf.createReturn(retExpr, lineno); break; } case TokenStream.LC: skipsemi = true; pn = statements(ts, source); mustMatchToken(ts, ts.RC, "msg.no.brace.block"); break; case TokenStream.ERROR: // Fall thru, to have a node for error recovery to work on case TokenStream.EOL: case TokenStream.SEMI: pn = nf.createLeaf(ts.VOID); skipsemi = true; break; default: { lastExprType = tt; int tokenno = ts.getTokenno(); ts.ungetToken(tt); int lineno = ts.getLineno(); pn = expr(ts, source, false); if (ts.peekToken() == ts.COLON) { /* check that the last thing the tokenizer returned was a * NAME and that only one token was consumed. */ if (lastExprType != ts.NAME || (ts.getTokenno() != tokenno)) reportError(ts, "msg.bad.label"); ts.getToken(); // eat the COLON /* in the C source, the label is associated with the * statement that follows: * nf.addChildToBack(pn, statement(ts)); */ String name = ts.getString(); pn = nf.createLabel(name, lineno); // depend on decompiling lookahead to guess that that // last name was a label. source.append((char)ts.COLON); source.append((char)ts.EOL); return pn; } if (lastExprType == ts.FUNCTION) nf.setFunctionExpressionStatement(pn); pn = nf.createExprStatement(pn, lineno); /* * Check explicitly against (multi-line) function * statement. * lastExprEndLine is a hack to fix an * automatic semicolon insertion problem with function * expressions; the ts.getLineno() == lineno check was * firing after a function definition even though the * next statement was on a new line, because * speculative getToken calls advanced the line number * even when they didn't succeed. */ if (ts.getLineno() == lineno || (lastExprType == ts.FUNCTION && ts.getLineno() == lastExprEndLine)) { wellTerminated(ts, lastExprType); } break; } } ts.matchToken(ts.SEMI); if (!skipsemi) { source.append((char)ts.SEMI); source.append((char)ts.EOL); } return pn; } | 7555 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7555/3d2e81a014b22cf4d1eb8921bd4229c2ca7ff017/Parser.java/clean/js/rhino/src/org/mozilla/javascript/Parser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1033,
3021,
2276,
12,
1345,
1228,
3742,
16,
4998,
1084,
13,
3639,
1216,
1860,
16,
11905,
503,
565,
288,
3639,
1033,
11059,
273,
446,
31,
3639,
368,
971,
2488,
307,
9197,
422,
638,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1033,
3021,
2276,
12,
1345,
1228,
3742,
16,
4998,
1084,
13,
3639,
1216,
1860,
16,
11905,
503,
565,
288,
3639,
1033,
11059,
273,
446,
31,
3639,
368,
971,
2488,
307,
9197,
422,
638,
... |
private void updateElements() { | void updateElements() { | private void updateElements() { fNewFilteredList.setFilter(fTextWidget.getText()); } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/9766cb70c62b71c3d08bd2866ef0736046c8b83b/TypeSelectionDialog.java/clean/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/ui/browser/typeinfo/TypeSelectionDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1089,
3471,
1435,
288,
202,
202,
74,
1908,
14478,
682,
18,
542,
1586,
12,
74,
1528,
4609,
18,
588,
1528,
10663,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1089,
3471,
1435,
288,
202,
202,
74,
1908,
14478,
682,
18,
542,
1586,
12,
74,
1528,
4609,
18,
588,
1528,
10663,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
throw new ClassNotFoundException("Class:" + name); | throw new ClassNotFoundException("Class: " + name); | public synchronized Class findClass( String name ) throws ClassNotFoundException { Class rval = null; try { //check for a system class rval = findSystemClass( name ); } catch (ClassNotFoundException e ) { String displayName = name; // we lie a bit and do not display the inner // classes because their names are ugly int idx = name.indexOf('$'); if (idx > 0) { displayName = name.substring(0, idx); } showStatus("Loading Class: " + displayName + "..."); //check the loaded classes rval = findLoadedClass( name ); if( rval == null ) { try { rval = super.findClass(name); } catch (ClassFormatError cfe) { Main.debug(name + ": Catched " + cfe + ". Trying to repair..."); rval = loadFixedClass( name ); } catch (Exception ex) { Main.debug("findClass " + name + " " + ex.getMessage()); } } } if (rval == null) { throw new ClassNotFoundException("Class:" + name); } return rval; } | 1818 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1818/ca03a0a3f6f1b2413fcbff0cc373b9dc1d8e6dcd/KJASAppletClassLoader.java/buggy/khtml/java/org/kde/kjas/server/KJASAppletClassLoader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3852,
1659,
1104,
797,
12,
514,
508,
262,
1216,
10403,
565,
288,
3639,
1659,
14267,
273,
446,
31,
3639,
775,
3639,
288,
5411,
368,
1893,
364,
279,
2619,
667,
5411,
14267,
273,
1104,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1659,
1104,
797,
12,
514,
508,
262,
1216,
10403,
565,
288,
3639,
1659,
14267,
273,
446,
31,
3639,
775,
3639,
288,
5411,
368,
1893,
364,
279,
2619,
667,
5411,
14267,
273,
1104,... |
parent.scheduler.register(this); | if(getCHKOnly) { ClientKeyBlock block = encode(); cb.onEncode(block.getClientKey(), this); cb.onSuccess(this); parent.completedBlock(false); finished = true; } else { parent.scheduler.register(this); } | public void schedule() { if(finished) return; parent.scheduler.register(this); } | 56348 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56348/21208e342489c2a0c49f6715dd86892930851371/SingleBlockInserter.java/clean/src/freenet/client/async/SingleBlockInserter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
4788,
1435,
288,
202,
202,
430,
12,
13527,
13,
327,
31,
202,
202,
2938,
18,
19972,
18,
4861,
12,
2211,
1769,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
4788,
1435,
288,
202,
202,
430,
12,
13527,
13,
327,
31,
202,
202,
2938,
18,
19972,
18,
4861,
12,
2211,
1769,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.