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 |
|---|---|---|---|---|---|---|
eventsToDispatch.add(new EventSchedule(controlInfo, currentNode, EventSchedule.RELEVANT)); | eventsToDispatch.add(new EventSchedule(controlInfo.getId(), currentNode, EventSchedule.RELEVANT)); | public void doRefresh(final PipelineContext pipelineContext) { // "1. All UI bindings should be reevaluated as necessary." // "2. A node can be changed by confirmed user input to a form control, by // xforms-recalculate (section 4.3.6) or by the setvalue (section 10.1.9) action. If the // value of an instance data node was changed, then the node must be marked for // dispatching the xforms-value-changed event." // "3. If the xforms-value-changed event is marked for dispatching, then all of the // appropriate model item property notification events must also be marked for // dispatching (xforms-optional or xforms-required, xforms-readwrite or xforms-readonly, // and xforms-enabled or xforms-disabled)." // "4. For each form control, each notification event that is marked for dispatching on // the bound node must be dispatched (xforms-value-changed, xforms-valid, // xforms-invalid, xforms-optional, xforms-required, xforms-readwrite, xforms-readonly, // and xforms-enabled, xforms-disabled). The notification events xforms-out-of-range or // xforms-in-range must also be dispatched as appropriate. This specification does not // specify an ordering for the events." final XFormsControls xformsControls = containingDocument.getXFormsControls(); if (xformsControls != null) { // Build list of events to send final List eventsToDispatch = new ArrayList(); // Iterate through controls and check the nodes they are bound to xformsControls.visitAllControlInfo(new XFormsControls.ControlInfoVisitorListener() { public void startVisitControl(ControlInfo controlInfo) { xformsControls.setBinding(pipelineContext, controlInfo); final Node currentNode = xformsControls.getCurrentSingleNode(); if (currentNode == null) // can happen if control is not bound to anything return; final InstanceData updatedInstanceData = XFormsUtils.getInstanceDataUpdateInherited(currentNode); // Check if value has changed final boolean valueChanged = updatedInstanceData.isValueChanged(); // TODO: should check whether value of control has changed, not node. // However, is this compatible with with the way we rebuild the controls? if (valueChanged) { // Value change takes care of everything eventsToDispatch.add(new EventSchedule(controlInfo, currentNode, EventSchedule.ALL)); } else { // Dispatch xforms-optional/xforms-required if needed { final boolean previousRequiredState = updatedInstanceData.getPreviousRequiredState(); final boolean newRequiredState = updatedInstanceData.getRequired().get(); if ((previousRequiredState && !newRequiredState) || (!previousRequiredState && newRequiredState)) eventsToDispatch.add(new EventSchedule(controlInfo, currentNode, EventSchedule.REQUIRED)); } // Dispatch xforms-enabled/xforms-disabled if needed { final boolean previousRelevantState = updatedInstanceData.getPreviousInheritedRelevantState(); final boolean newRelevantState = updatedInstanceData.getInheritedRelevant().get(); if ((previousRelevantState && !newRelevantState) || (!previousRelevantState && newRelevantState)) eventsToDispatch.add(new EventSchedule(controlInfo, currentNode, EventSchedule.RELEVANT)); } // Dispatch xforms-readonly/xforms-readwrite if needed { final boolean previousReadonlyState = updatedInstanceData.getPreviousInheritedReadonlyState(); final boolean newReadonlyState = updatedInstanceData.getInheritedReadonly().get(); if ((previousReadonlyState && !newReadonlyState) || (!previousReadonlyState && newReadonlyState)) eventsToDispatch.add(new EventSchedule(controlInfo, currentNode, EventSchedule.READONLY)); } // Dispatch xforms-valid/xforms-invalid if needed // NOTE: There is no mention in the spec that these events should be // displatched automatically when the value has changed, contrary to the // other events above. { final boolean previousValidState = updatedInstanceData.getPreviousValidState(); final boolean newValidState = updatedInstanceData.getValid().get(); if ((previousValidState && !newValidState) || (!previousValidState && newValidState)) eventsToDispatch.add(new EventSchedule(controlInfo, currentNode, EventSchedule.VALID)); } } } public void endVisitControl(ControlInfo controlInfo) { } }); // Clear InstanceData event state clearInstanceDataEventState(); // Send events and (try to) make sure the event corresponds to the current instance data // NOTE: deferred behavior is broken in XForms 1.0; 1.1 should introduce better // behavior. Also, event order and the exact steps to take are under-specified in 1.0. for (Iterator i = eventsToDispatch.iterator(); i.hasNext();) { final EventSchedule eventSchedule = (XFormsModel.EventSchedule) i.next(); final ControlInfo controlInfo = eventSchedule.getControlInfo(); // Re-obtain node to which control is bound, in case things have shifted // TODO: probably that controls should simply keep a pointer to the nodes they are bound to xformsControls.setBinding(pipelineContext, controlInfo); final Node currentNode = xformsControls.getCurrentSingleNode(); final int type = eventSchedule.getType(); if ((type & EventSchedule.VALUE) != 0) { containingDocument.dispatchEvent(pipelineContext, new XFormsValueChangeEvent(controlInfo)); } if (currentNode != null) { if ((type & EventSchedule.REQUIRED) != 0) { final InstanceData updatedInstanceData = XFormsUtils.getInstanceDataUpdateInherited(currentNode); final boolean currentRequiredState = updatedInstanceData.getRequired().get(); if (currentRequiredState) { containingDocument.dispatchEvent(pipelineContext, new XFormsRequiredEvent(controlInfo)); } else { containingDocument.dispatchEvent(pipelineContext, new XFormsOptionalEvent(controlInfo)); } } if ((type & EventSchedule.RELEVANT) != 0) { final InstanceData updatedInstanceData = XFormsUtils.getInstanceDataUpdateInherited(currentNode); final boolean currentRelevantState = updatedInstanceData.getInheritedRelevant().get(); if (currentRelevantState) { containingDocument.dispatchEvent(pipelineContext, new XFormsEnabledEvent(controlInfo)); } else { containingDocument.dispatchEvent(pipelineContext, new XFormsDisabledEvent(controlInfo)); } } if ((type & EventSchedule.READONLY) != 0) { final InstanceData updatedInstanceData = XFormsUtils.getInstanceDataUpdateInherited(currentNode); final boolean currentReadonlyState = updatedInstanceData.getInheritedReadonly().get(); if (currentReadonlyState) { containingDocument.dispatchEvent(pipelineContext, new XFormsReadonlyEvent(controlInfo)); } else { containingDocument.dispatchEvent(pipelineContext, new XFormsReadwriteEvent(controlInfo)); } } if ((type & EventSchedule.VALID) != 0) { final InstanceData inheritedInstanceData = XFormsUtils.getInstanceDataUpdateInherited(currentNode); final boolean currentValidState = inheritedInstanceData.getValid().get(); if (currentValidState) { containingDocument.dispatchEvent(pipelineContext, new XFormsValidEvent(controlInfo)); } else { containingDocument.dispatchEvent(pipelineContext, new XFormsInvalidEvent(controlInfo)); } } } } // "5. The user interface reflects the state of the model, which means that all forms // controls reflect for their corresponding bound instance data:" if (xformsControls != null) { containingDocument.getXFormsControls().refreshForModel(pipelineContext, this); } } } | 10097 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10097/307578c4c1a2575a77107b9c8ec0b568980a9275/XFormsModel.java/buggy/src/java/org/orbeon/oxf/xforms/XFormsModel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
741,
8323,
12,
6385,
13671,
1042,
5873,
1042,
13,
288,
3639,
368,
315,
21,
18,
4826,
6484,
7394,
1410,
506,
283,
14168,
690,
487,
4573,
1199,
3639,
368,
315,
22,
18,
432,
756... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
741,
8323,
12,
6385,
13671,
1042,
5873,
1042,
13,
288,
3639,
368,
315,
21,
18,
4826,
6484,
7394,
1410,
506,
283,
14168,
690,
487,
4573,
1199,
3639,
368,
315,
22,
18,
432,
756... |
} | } | public void endTable() { // Switch the ref back to the current textflow curFlow=bookComponent.curTextFlow(); } | 5268 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5268/cd264ba6a67a155375a4ba85cdb6dc35503ef593/MIFDocument.java/buggy/src/org/apache/fop/mif/MIFDocument.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
679,
1388,
1435,
288,
202,
759,
13967,
326,
1278,
1473,
358,
326,
783,
977,
2426,
202,
1397,
5249,
33,
3618,
1841,
18,
1397,
1528,
5249,
5621,
225,
289,
2,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
679,
1388,
1435,
288,
202,
759,
13967,
326,
1278,
1473,
358,
326,
783,
977,
2426,
202,
1397,
5249,
33,
3618,
1841,
18,
1397,
1528,
5249,
5621,
225,
289,
2,
-100,
-100,
-100,
... |
+ profileId + " AND SS_ID=" + stylesheetId + " AND SS_TYPE=1 AND STRUCT_ID='" + folderId.substring(1) + "' AND PARAM_NAME='" | + profileId + " AND SS_ID=" + stylesheetId + " AND SS_TYPE=1 AND STRUCT_ID=" + folderId.substring(1) + " AND PARAM_NAME='" | public void setStructureStylesheetUserPreferences (IPerson person, int profileId, StructureStylesheetUserPreferences ssup) throws Exception { int userId = person.getID(); Connection con = RDBMServices.getConnection(); try { // Set autocommit false for the connection int stylesheetId = ssup.getStylesheetId(); RDBMServices.setAutoCommit(con, false); Statement stmt = con.createStatement(); try { // write out params for (Enumeration e = ssup.getParameterValues().keys(); e.hasMoreElements();) { String pName = (String)e.nextElement(); // see if the parameter was already there String sQuery = "SELECT PARAM_VAL FROM UP_SS_USER_PARM WHERE USER_ID=" + userId + " AND PROFILE_ID=" + profileId + " AND SS_ID=" + stylesheetId + " AND SS_TYPE=1 AND PARAM_NAME='" + pName + "'"; LogService.instance().log(LogService.DEBUG, "RDBMUserLayoutStore::setStructureStylesheetUserPreferences(): " + sQuery); ResultSet rs = stmt.executeQuery(sQuery); if (rs.next()) { // update sQuery = "UPDATE UP_SS_USER_PARM SET PARAM_VAL='" + ssup.getParameterValue(pName) + "' WHERE USER_ID=" + userId + " AND PROFILE_ID=" + profileId + " AND SS_ID=" + stylesheetId + " AND SS_TYPE=1 AND PARAM_NAME='" + pName + "'"; } else { // insert sQuery = "INSERT INTO UP_SS_USER_PARM (USER_ID,PROFILE_ID,SS_ID,SS_TYPE,PARAM_NAME,PARAM_VAL) VALUES (" + userId + "," + profileId + "," + stylesheetId + ",1,'" + pName + "','" + ssup.getParameterValue(pName) + "')"; } LogService.instance().log(LogService.DEBUG, "RDBMUserLayoutStore::setStructureStylesheetUserPreferences(): " + sQuery); stmt.executeUpdate(sQuery); } // write out folder attributes for (Enumeration e = ssup.getFolders(); e.hasMoreElements();) { String folderId = (String)e.nextElement(); for (Enumeration attre = ssup.getFolderAttributeNames(); attre.hasMoreElements();) { String pName = (String)attre.nextElement(); String pValue = ssup.getDefinedFolderAttributeValue(folderId, pName); if (pValue != null) { // store user preferences String sQuery = "SELECT PARAM_VAL FROM UP_SS_USER_ATTS WHERE USER_ID=" + userId + " AND PROFILE_ID=" + profileId + " AND SS_ID=" + stylesheetId + " AND SS_TYPE=1 AND STRUCT_ID='" + folderId.substring(1) + "' AND PARAM_NAME='" + pName + "' AND PARAM_TYPE=2"; LogService.instance().log(LogService.DEBUG, "RDBMUserLayoutStore::setStructureStylesheetUserPreferences(): " + sQuery); ResultSet rs = stmt.executeQuery(sQuery); if (rs.next()) { // update sQuery = "UPDATE UP_SS_USER_ATTS SET PARAM_VAL='" + pValue + "' WHERE USER_ID=" + userId + " AND PROFILE_ID=" + profileId + " AND SS_ID=" + stylesheetId + " AND SS_TYPE=1 AND STRUCT_ID='" + folderId.substring(1) + "' AND PARAM_NAME='" + pName + "' AND PARAM_TYPE=2"; } else { // insert sQuery = "INSERT INTO UP_SS_USER_ATTS (USER_ID,PROFILE_ID,SS_ID,SS_TYPE,STRUCT_ID,PARAM_NAME,PARAM_TYPE,PARAM_VAL) VALUES (" + userId + "," + profileId + "," + stylesheetId + ",1,'" + folderId.substring(1) + "','" + pName + "',2,'" + pValue + "')"; } LogService.instance().log(LogService.DEBUG, "RDBMUserLayoutStore::setStructureStylesheetUserPreferences(): " + sQuery); stmt.executeUpdate(sQuery); } } } // write out channel attributes for (Enumeration e = ssup.getChannels(); e.hasMoreElements();) { String channelId = (String)e.nextElement(); for (Enumeration attre = ssup.getChannelAttributeNames(); attre.hasMoreElements();) { String pName = (String)attre.nextElement(); String pValue = ssup.getDefinedChannelAttributeValue(channelId, pName); if (pValue != null) { // store user preferences String sQuery = "SELECT PARAM_VAL FROM UP_SS_USER_ATTS WHERE USER_ID=" + userId + " AND PROFILE_ID=" + profileId + " AND SS_ID=" + stylesheetId + " AND SS_TYPE=1 AND STRUCT_ID='" + channelId.substring(1) + "' AND PARAM_NAME='" + pName + "' AND PARAM_TYPE=3"; LogService.instance().log(LogService.DEBUG, "RDBMUserLayoutStore::setStructureStylesheetUserPreferences(): " + sQuery); ResultSet rs = stmt.executeQuery(sQuery); if (rs.next()) { // update sQuery = "UPDATE UP_SS_USER_ATTS SET PARAM_VAL='" + pValue + "' WHERE USER_ID=" + userId + " AND PROFILE_ID=" + profileId + " AND SS_ID=" + stylesheetId + " AND SS_TYPE=1 AND STRUCT_ID='" + channelId.substring(1) + "' AND PARAM_NAME='" + pName + "' AND PARAM_TYPE=3"; } else { // insert sQuery = "INSERT INTO UP_SS_USER_ATTS (USER_ID,PROFILE_ID,SS_ID,SS_TYPE,STRUCT_ID,PARAM_NAME,PARAM_TYPE,PARAM_VAL) VALUES (" + userId + "," + profileId + "," + stylesheetId + ",1,'" + channelId.substring(1) + "','" + pName + "',3,'" + pValue + "')"; } LogService.instance().log(LogService.DEBUG, "RDBMUserLayoutStore::setStructureStylesheetUserPreferences(): " + sQuery); stmt.executeUpdate(sQuery); } } } // Commit the transaction RDBMServices.commit(con); } catch (Exception e) { // Roll back the transaction RDBMServices.rollback(con); throw e; } finally { stmt.close(); } } finally { RDBMServices.releaseConnection(con); } } | 24959 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/24959/4f267d2f1089d418823d322c5663ce0606d8f83f/RDBMUserLayoutStore.java/buggy/source/org/jasig/portal/RDBMUserLayoutStore.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
444,
6999,
24656,
1299,
12377,
261,
2579,
3565,
6175,
16,
509,
25903,
16,
13348,
24656,
1299,
12377,
272,
2859,
13,
1216,
1185,
288,
565,
509,
6249,
273,
6175,
18,
588,
734,
56... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
444,
6999,
24656,
1299,
12377,
261,
2579,
3565,
6175,
16,
509,
25903,
16,
13348,
24656,
1299,
12377,
272,
2859,
13,
1216,
1185,
288,
565,
509,
6249,
273,
6175,
18,
588,
734,
56... |
public Object setValue(Object aValue) { Object oldValue = myValue; myValue = (null == aValue ? new Null() : aValue); return oldValue; } | public Object setValue( Object aValue ) { Object oldValue = myValue; myValue = (null == aValue ? new Null() : aValue); return oldValue; } | public Object setValue(Object aValue) { Object oldValue = myValue; myValue = (null == aValue ? new Null() : aValue); return oldValue; } | 54028 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54028/4aaf60d8fa76687c3492c508dd98678fbbd3d935/MapEntry.java/clean/jmock/core/src/org/jmock/expectation/MapEntry.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
5524,
12,
921,
24406,
13,
288,
3639,
1033,
11144,
273,
3399,
620,
31,
3639,
3399,
620,
273,
261,
2011,
422,
24406,
692,
394,
4112,
1435,
294,
24406,
1769,
3639,
327,
11144,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1033,
5524,
12,
921,
24406,
13,
288,
3639,
1033,
11144,
273,
3399,
620,
31,
3639,
3399,
620,
273,
261,
2011,
422,
24406,
692,
394,
4112,
1435,
294,
24406,
1769,
3639,
327,
11144,
31... |
if (activityEventsByActivityId != null) notifyActivities(activityEventsByActivityId); | if (activityEventsByActivityId != null) { notifyActivities(activityEventsByActivityId); } | public void setEnabledActivityIds(Set enabledActivityIds) { enabledActivityIds = Util.safeCopy(enabledActivityIds, String.class); Set requiredActivityIds = new HashSet(enabledActivityIds); getRequiredActivityIds(enabledActivityIds, requiredActivityIds); enabledActivityIds = requiredActivityIds; boolean activityManagerChanged = false; Map activityEventsByActivityId = null; Set previouslyEnabledActivityIds = null; if (!this.enabledActivityIds.equals(enabledActivityIds)) { previouslyEnabledActivityIds = this.enabledActivityIds; this.enabledActivityIds = enabledActivityIds; activityManagerChanged = true; activityEventsByActivityId = updateActivities(activitiesById .keySet()); } //don't update identifiers if the enabled activity set has not changed if (activityManagerChanged) { Map identifierEventsByIdentifierId = updateIdentifiers(identifiersById .keySet()); if (identifierEventsByIdentifierId != null) notifyIdentifiers(identifierEventsByIdentifierId); } if (activityEventsByActivityId != null) notifyActivities(activityEventsByActivityId); if (activityManagerChanged) fireActivityManagerChanged(new ActivityManagerEvent(this, false, false, true, null, null, previouslyEnabledActivityIds)); } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/fa4a8cff0e027f8d3c6b1fcb92b30f46767dd191/MutableActivityManager.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/activities/MutableActivityManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
12888,
6193,
2673,
12,
694,
3696,
6193,
2673,
13,
288,
3639,
3696,
6193,
2673,
273,
3564,
18,
4626,
2951,
12,
5745,
6193,
2673,
16,
514,
18,
1106,
1769,
3639,
1000,
1931,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12888,
6193,
2673,
12,
694,
3696,
6193,
2673,
13,
288,
3639,
3696,
6193,
2673,
273,
3564,
18,
4626,
2951,
12,
5745,
6193,
2673,
16,
514,
18,
1106,
1769,
3639,
1000,
1931,
... |
insertRow = newRow(); | insertRow = new ParamInfo[columnCount]; | public void moveToInsertRow() throws SQLException { checkOpen(); checkUpdateable(); insertRow = newRow(); onInsertRow = true; } | 5753 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5753/280391932d64190b4ee42f49e5f8b60382f2fa03/CachedResultSet.java/buggy/src/main/net/sourceforge/jtds/jdbc/CachedResultSet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1377,
1071,
918,
13863,
4600,
1999,
1435,
1216,
6483,
288,
540,
866,
3678,
5621,
540,
866,
1891,
429,
5621,
540,
2243,
1999,
282,
273,
394,
3014,
966,
63,
2827,
1380,
15533,
540,
603,
4600,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1377,
1071,
918,
13863,
4600,
1999,
1435,
1216,
6483,
288,
540,
866,
3678,
5621,
540,
866,
1891,
429,
5621,
540,
2243,
1999,
282,
273,
394,
3014,
966,
63,
2827,
1380,
15533,
540,
603,
4600,
19... |
x.setBody((Statement) value); | x.setLabel((SimpleName) value); | public void set(ASTNode value) { x.setBody((Statement) value); } | 10698 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10698/f7bc2ee5d62baf64b6f044f322b40cdaa75e5dcc/ASTTest.java/clean/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
482,
918,
444,
12,
9053,
907,
460,
13,
288,
9506,
202,
92,
18,
542,
2250,
12443,
3406,
13,
460,
1769,
1082,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
482,
918,
444,
12,
9053,
907,
460,
13,
288,
9506,
202,
92,
18,
542,
2250,
12443,
3406,
13,
460,
1769,
1082,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
return (Closure)this.closure.invokeMethod("curry", arguments); } | return (Closure) this.closure.invokeMethod("curry", arguments); } | public Closure curry(Object arguments) { return (Closure)this.closure.invokeMethod("curry", arguments); } | 6462 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6462/9411e347dd46bbc42695d463bec72ecaed0a490a/Closure.java/clean/src/main/groovy/lang/Closure.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
7255,
662,
1176,
12,
921,
1775,
13,
288,
1082,
202,
2463,
261,
10573,
13,
2211,
18,
20823,
18,
14407,
1305,
2932,
1397,
1176,
3113,
1775,
1769,
202,
202,
97,
2,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3196,
202,
482,
7255,
662,
1176,
12,
921,
1775,
13,
288,
1082,
202,
2463,
261,
10573,
13,
2211,
18,
20823,
18,
14407,
1305,
2932,
1397,
1176,
3113,
1775,
1769,
202,
202,
97,
2,
-100,
-100,
-... |
private void newJDBCExplorerMenuItemActionPerformed(java.awt.event.ActionEvent evt) { try { JInternalFrame jf = new JInternalFrame(); jf.setTitle("JDBC Explorer - " + this.jdbcConnectionUrl); | private void newJDBCExplorerMenuItemActionPerformed(java.awt.event.ActionEvent evt) { try { JInternalFrame jf = new JInternalFrame(); jf.setTitle("JDBC Explorer - " + this.jdbcConnectionUrl); | private void newJDBCExplorerMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_newJDBCExplorerMenuItemActionPerformed try { JInternalFrame jf = new JInternalFrame(); jf.setTitle("JDBC Explorer - " + this.jdbcConnectionUrl); Class.forName(this.jdbcDriverClassName); java.sql.Connection con = java.sql.DriverManager.getConnection(this.jdbcConnectionUrl); JDBCExplorer jdbce = new JDBCExplorer(con); jf.getContentPane().add(jdbce); jf.setBounds(0, 0, 500, 480); jf.setClosable(true); jf.setIconifiable(true); jf.setMaximizable(true); jf.setResizable(true); jf.setVisible(true); desktopPane.add(jf); jf.show(); } catch (Exception ex) { ex.printStackTrace(); } }//GEN-LAST:event_newJDBCExplorerMenuItemActionPerformed | 4891 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4891/d4a93c3315c8aa9b9d64e1c03577610a1dbca61d/Workbench.java/buggy/src/main/mondrian/gui/Workbench.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
394,
30499,
20938,
12958,
19449,
12,
6290,
18,
2219,
88,
18,
2575,
18,
1803,
1133,
6324,
13,
288,
759,
16652,
17,
15354,
30,
2575,
67,
2704,
30499,
20938,
12958,
19449,
3639,
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,
918,
394,
30499,
20938,
12958,
19449,
12,
6290,
18,
2219,
88,
18,
2575,
18,
1803,
1133,
6324,
13,
288,
759,
16652,
17,
15354,
30,
2575,
67,
2704,
30499,
20938,
12958,
19449,
3639,
7... |
double desired = desiredSet.size(); | private Ranges getProbabilityRanges(String id, Set<Integer> desiredSet, List<QueryResult<D>> neighbors) { if (neighbors.isEmpty()) throw new IllegalArgumentException("Empty neighbors!"); D recall = null, inverseRecall = null; D precision = null, inversePrecision = null; double desired = desiredSet.size(); double foundAndDesired = 0; double notDesired = neighbors.size() - desiredSet.size(); double notFoundAndNotDesired = 0; double found = 0; double notFound = neighbors.size(); int size = neighbors.size() - 1; for (int i = 0; i <= size; i++) { found++; QueryResult<D> neighbor = neighbors.get(i); if (desiredSet.contains(neighbor.getID())) { foundAndDesired++; } // precision double p = foundAndDesired / found; // recall double r = foundAndDesired / desired; if (recall == null && r >= 0.9) { recall = neighbor.getDistance(); } if (p >= 0.9) { precision = neighbor.getDistance(); } notFound--; QueryResult<D> i_neighbor = neighbors.get(size - i); if (! desiredSet.contains(i_neighbor.getID())) { notFoundAndNotDesired++; } // inverse precision double ip = notFoundAndNotDesired / notFound; // inverse recall double ir = notFoundAndNotDesired / notDesired; if (inverseRecall == null && ir >= 0.9) { inverseRecall = i_neighbor.getDistance(); } if (ip >= 0.9) inversePrecision = i_neighbor.getDistance(); } return new Ranges(id, precision, inversePrecision, recall, inverseRecall); } | 5508 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5508/a1326e38fea2d597125665e1c67f95ed00335e94/PALME.java/buggy/src/de/lmu/ifi/dbs/algorithm/clustering/PALME.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
534,
2054,
3570,
70,
2967,
9932,
12,
780,
612,
16,
1000,
32,
4522,
34,
6049,
694,
16,
987,
32,
23583,
32,
40,
9778,
11003,
13,
288,
565,
309,
261,
17549,
18,
291,
1921,
10756,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
534,
2054,
3570,
70,
2967,
9932,
12,
780,
612,
16,
1000,
32,
4522,
34,
6049,
694,
16,
987,
32,
23583,
32,
40,
9778,
11003,
13,
288,
565,
309,
261,
17549,
18,
291,
1921,
10756,
1... | |
if (num < ren.max) return matchGreedyKid(state, ren, stop, num, ren.max, | if (num == ren.max) break; return matchGreedyKid(state, ren, stop, num, ren.max, | int matchRENodes(MatchState state, RENode ren, RENode stop, int index) { char[] input = state.input; while ((ren != stop) && (ren != null)) { switch (ren.op) { case REOP_EMPTY: break; case REOP_ALT: { if (ren.next.op != REOP_ALT) { ren = (RENode)ren.kid; continue; } else { int kidMatch = matchRENodes(state, (RENode)ren.kid, stop, index); if (kidMatch != -1) return kidMatch; } } break; case REOP_QUANT: { int num; int lastKid = -1; for (num = 0; num < ren.min; num++) { int kidMatch = matchRENodes(state, (RENode)ren.kid, ren.next, index); if (kidMatch == -1) return -1; else { lastKid = index; index = kidMatch; } } if (num < ren.max) return matchGreedyKid(state, ren, stop, num, ren.max, index, lastKid); // Have matched the exact count required, // need to match the rest of the regexp. break; } case REOP_PLUS: { int kidMatch = matchRENodes(state, (RENode)ren.kid, ren.next, index); if (kidMatch != -1) return matchGreedyKid(state, ren, stop, 1, 0, kidMatch, index); else return -1; } case REOP_STAR: return matchGreedyKid(state, ren, stop, 0, 0, index, -1); case REOP_OPT: { int saveNum = state.parenCount; if (((ren.flags & RENode.MINIMAL) != 0)) { int restMatch = matchRENodes(state, ren.next, stop, index); if (restMatch != -1) return restMatch; } int kidMatch = matchRENodes(state, (RENode)ren.kid, ren.next, index); if (kidMatch == -1) { state.parenCount = saveNum; break; } else { int restMatch = matchRENodes(state, ren.next, stop, kidMatch); if (restMatch == -1) { // need to undo the result of running the kid state.parenCount = saveNum; break; } else return restMatch; } } case REOP_LPARENNON: ren = (RENode)ren.kid; continue; case REOP_RPARENNON: break; case REOP_LPAREN: { int num = ren.num; ren = (RENode)ren.kid; SubString parsub = state.parens[num]; if (parsub == null) { parsub = state.parens[num] = new SubString(); parsub.charArray = input; } parsub.index = index; parsub.length = 0; if (num >= state.parenCount) state.parenCount = num + 1; continue; } case REOP_RPAREN: { int num = ren.num; SubString parsub = state.parens[num]; if (parsub == null) throw new RuntimeException("Paren problem"); parsub.length = index - parsub.index; break; } case REOP_ASSERT: { int kidMatch = matchRENodes(state, (RENode)ren.kid, ren.next, index); if (kidMatch == -1) return -1; break; } case REOP_ASSERT_NOT: { int kidMatch = matchRENodes(state, (RENode)ren.kid, ren.next, index); if (kidMatch != -1) return -1; break; } case REOP_BACKREF: { int num = ren.num; if (num >= state.parens.length) { Context.reportError( ScriptRuntime.getMessage( "msg.bad.backref", null)); return -1; } SubString parsub = state.parens[num]; if (parsub == null) parsub = state.parens[num] = new SubString(); int length = parsub.length; if ((input.length - index) < length) return -1; else { for (int i = 0; i < length; i++, index++) { if (!matchChar(state.flags, input[index], parsub.charArray[parsub.index + i])) return -1; } } } break; case REOP_CCLASS: if (index < input.length) { if (ren.bitmap == null) { char[] source = (ren.s != null) ? ren.s : this.source.toCharArray(); ren.buildBitmap(state, source, ((state.flags & FOLD) != 0)); } char c = input[index]; int b = (c >>> 3); if (b >= ren.bmsize) { if (ren.kid2 == -1) // a ^ class index++; else return -1; } else { int bit = c & 7; bit = 1 << bit; if ((ren.bitmap[b] & bit) != 0) index++; else return -1; } } else return -1; break; case REOP_DOT: if ((index < input.length) && (input[index] != '\n')) index++; else return -1; break; case REOP_DOTSTARMIN: { int cp2; for (cp2 = index; cp2 < input.length; cp2++) { int cp3 = matchRENodes(state, ren.next, stop, cp2); if (cp3 != -1) return cp3; if (input[cp2] == '\n') return -1; } return -1; } case REOP_DOTSTAR: { int cp2; for (cp2 = index; cp2 < input.length; cp2++) if (input[cp2] == '\n') break; while (cp2 >= index) { int cp3 = matchRENodes(state, ren.next, stop, cp2); if (cp3 != -1) return cp3; cp2--; } return -1; } case REOP_WBDRY: if (((index == 0) || !isWord(input[index-1])) ^ ((index >= input.length) || !isWord(input[index]))) ; // leave index else return -1; break; case REOP_WNONBDRY: if (((index == 0) || !isWord(input[index-1])) ^ ((index < input.length) && isWord(input[index]))) ; // leave index else return -1; break; case REOP_EOLONLY: case REOP_EOL: { if (index == input.length) ; // leave index; else { Context cx = Context.getCurrentContext(); RegExpImpl reImpl = getImpl(cx); if ((reImpl.multiline) || ((state.flags & MULTILINE) != 0)) if (input[index] == '\n') ;// leave index else return -1; else return -1; } } break; case REOP_BOL: { Context cx = Context.getCurrentContext(); RegExpImpl reImpl = getImpl(cx); if (index != 0) { if ((index < input.length) && (reImpl.multiline || ((state.flags & MULTILINE) != 0))) { if (input[index - 1] == '\n') { break; } } return -1; } // leave index } break; case REOP_DIGIT: if ((index < input.length) && isDigit(input[index])) index++; else return -1; break; case REOP_NONDIGIT: if ((index < input.length) && !isDigit(input[index])) index++; else return -1; break; case REOP_ALNUM: if ((index < input.length) && isWord(input[index])) index++; else return -1; break; case REOP_NONALNUM: if ((index < input.length) && !isWord(input[index])) index++; else return -1; break; case REOP_SPACE: if ((index < input.length) && (TokenStream.isJSSpace(input[index]) || TokenStream.isJSLineTerminator(input[index]))) index++; else return -1; break; case REOP_NONSPACE: if ((index < input.length) && !(TokenStream.isJSSpace(input[index]) || TokenStream.isJSLineTerminator(input[index]))) index++; else return -1; break; case REOP_FLAT1: if ((index < input.length) && matchChar(state.flags, ren.chr, input[index])) index++; else return -1; break; case REOP_FLAT: { char[] source = (ren.s != null) ? ren.s : this.source.toCharArray(); int start = ((Integer)ren.kid).intValue(); int length = ren.kid2 - start; if ((input.length - index) < length) return -1; else { for (int i = 0; i < length; i++, index++) { if (!matchChar(state.flags, input[index], source[start + i])) return -1; } } } break; case REOP_JUMP: break; case REOP_END: break; default : throw new RuntimeException("Unsupported by node matcher"); } ren = ren.next; } return index; } | 47609 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47609/1a509a268e2e9c089d220ff95a04a25a8208072b/NativeRegExp.java/clean/js/rhino/src/org/mozilla/javascript/regexp/NativeRegExp.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
509,
845,
862,
3205,
12,
2060,
1119,
919,
16,
2438,
907,
1654,
16,
2438,
907,
2132,
16,
509,
770,
13,
565,
288,
202,
202,
3001,
8526,
810,
273,
919,
18,
2630,
31,
3639,
1323,
14015,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
509,
845,
862,
3205,
12,
2060,
1119,
919,
16,
2438,
907,
1654,
16,
2438,
907,
2132,
16,
509,
770,
13,
565,
288,
202,
202,
3001,
8526,
810,
273,
919,
18,
2630,
31,
3639,
1323,
14015,
1... |
setPhase(Phase.SORT) ; | setPhase(TaskStatus.Phase.SORT) ; | public void run(JobConf job, final TaskUmbilicalProtocol umbilical) throws IOException { Class valueClass = job.getMapOutputValueClass(); Reducer reducer = (Reducer)ReflectionUtils.newInstance( job.getReducerClass(), job); reducer.configure(job); FileSystem lfs = FileSystem.getNamed("local", job); copyPhase.complete(); // copy is already complete // open a file to collect map output Path[] mapFiles = new Path[numMaps]; for(int i=0; i < numMaps; i++) { mapFiles[i] = mapOutputFile.getInputFile(i, getTaskId()); } // spawn a thread to give sort progress heartbeats Thread sortProgress = new Thread() { public void run() { while (!sortComplete) { try { reportProgress(umbilical); Thread.sleep(PROGRESS_INTERVAL); } catch (InterruptedException e) { return; } catch (Throwable e) { System.out.println("Thread Exception in " + "reporting sort progress\n" + StringUtils.stringifyException(e)); continue; } } } }; sortProgress.setName("Sort progress reporter for task "+getTaskId()); Path sortedFile = job.getLocalPath(getTaskId()+Path.SEPARATOR+"all.2"); WritableComparator comparator = job.getOutputKeyComparator(); try { setPhase(Phase.SORT) ; sortProgress.start(); // sort the input file SequenceFile.Sorter sorter = new SequenceFile.Sorter(lfs, comparator, valueClass, job); sorter.sort(mapFiles, sortedFile, !conf.getKeepFailedTaskFiles()); // sort } finally { sortComplete = true; } sortPhase.complete(); // sort is complete setPhase(Phase.REDUCE); Reporter reporter = getReporter(umbilical, getProgress()); // make output collector String name = getOutputName(getPartition()); final RecordWriter out = job.getOutputFormat().getRecordWriter(FileSystem.get(job), job, name, reporter); OutputCollector collector = new OutputCollector() { public void collect(WritableComparable key, Writable value) throws IOException { out.write(key, value); myMetrics.reduceOutput(); reportProgress(umbilical); } }; // apply reduce function SequenceFile.Reader in = new SequenceFile.Reader(lfs, sortedFile, job); long length = lfs.getLength(sortedFile); try { ValuesIterator values = new ValuesIterator(in, length, comparator, umbilical); while (values.more()) { myMetrics.reduceInput(); reducer.reduce(values.getKey(), values, collector, reporter); values.nextKey(); } } finally { reducer.close(); in.close(); lfs.delete(sortedFile); // remove sorted out.close(reporter); } done(umbilical); } | 49248 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49248/1e24384b1f84e52afdfd79649a51a55574be4905/ReduceTask.java/buggy/src/java/org/apache/hadoop/mapred/ReduceTask.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1086,
12,
2278,
3976,
1719,
16,
727,
3837,
57,
1627,
330,
1706,
5752,
225,
3592,
330,
1706,
13,
565,
1216,
1860,
288,
565,
1659,
460,
797,
273,
1719,
18,
588,
863,
1447,
620,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1086,
12,
2278,
3976,
1719,
16,
727,
3837,
57,
1627,
330,
1706,
5752,
225,
3592,
330,
1706,
13,
565,
1216,
1860,
288,
565,
1659,
460,
797,
273,
1719,
18,
588,
863,
1447,
620,... |
public Box getLeftFloatX(Box box) { // count backwards through the floats int x = 0; for (int i = left_floats.size() - 1; i >= 0; i--) { Box floater = (Box) left_floats.get(i); // Uu.p("box = " + box); // Uu.p("testing against float = " + floater); x = floater.x + floater.width; if (floater.y + floater.height > box.y) { // Uu.p("float["+i+"] blocks the box vertically"); return floater; } else { // Uu.p("float["+i+"] doesn't block. moving to next"); } } return null; } | 53937 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/53937/3f7f1ad563975d526a941d1eb9629a543d42be24/BlockFormattingContext.java/buggy/src/java/org/xhtmlrenderer/layout/BlockFormattingContext.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
8549,
15930,
4723,
60,
12,
3514,
3919,
13,
288,
3639,
368,
1056,
12727,
3059,
326,
19172,
3639,
509,
619,
273,
374,
31,
3639,
364,
261,
474,
277,
273,
2002,
67,
5659,
87,
18,
1467... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
8549,
15930,
4723,
60,
12,
3514,
3919,
13,
288,
3639,
368,
1056,
12727,
3059,
326,
19172,
3639,
509,
619,
273,
374,
31,
3639,
364,
261,
474,
277,
273,
2002,
67,
5659,
87,
18,
1467... | ||
String filename = accountDirPath + File.separator + | String filename = baseDirPath + File.separator + accountPath + File.separator + | private void submitHandler() { try { config = new WoWConfig(); } catch (WoWConfigException e) { log.error("WoWCompanion: failed to load configuration", e); } String tmp = ""; try { String accountName = (String)accountSelect.getSelectedItem(); if (accountName == null) { throw new FileNotFoundException("an account has not been selected"); } String username = usernameField.getText(); String password = new String(passwordField.getPassword()); String hashedPassword; if (savedPassword != null && !savedPassword.equals("")) { hashedPassword = savedPassword; } else { hashedPassword = MD5.getMD5(password.getBytes("UTF8")); } log.debug("WoWCompanion: got username: '"+usernameField.getText()+"'"); log.debug("WoWCompanion: got password: '"+new String(passwordField.getPassword())+"'"); log.debug("WoWCompanion: hashed password is: '"+hashedPassword+"'"); // save the selected account information to preferences try { config.setPreference("account.selected", accountName); config.setPreference("account."+accountName+".username", username); if (savePasswordCheckBox.isSelected() && savedPassword != null && !savedPassword.equals("********")) { savedPassword = hashedPassword; config.setPreference("account."+accountName+".password", savedPassword); log.debug("WoWCompanion: saving password '"+savedPassword+"'"); } else { config.setPreference("account."+accountName+".password", ""); savedPassword = ""; passwordField.setText(""); log.debug("WoWCompanion: clearing password"); } log.debug("WoWCompanion: saving preferences"); config.savePreferences(); } catch (IOException e) { log.error("WoWCompanion: couldn't save preferences", e); } String filename = accountDirPath + File.separator + accountName + File.separator + savedVarFileName; // send the data to the server if (((username != null) && !username.equals("") && ((password != null) && !password.equals("") && !password.equals("********")))) { log.debug("WoWCompanion: using password"); //WoWUploader.upload(data, username, hashedPassword); uploadTask = new UploadTask(new String[] {filename, username, hashedPassword}); uploadButton.setEnabled(false); frame.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); uploadTask.go(); timer.start(); //statusLabel.setForeground(new Color(0, 150, 0)); //statusLabel.setText("Success"); } else if (((username != null) && !username.equals("") && ((savedPassword != null) && !savedPassword.equals("")))) { log.debug("WoWCompanion: using saved password"); //WoWUploader.upload(data, username, savedPassword); uploadTask = new UploadTask(new String[] {filename, username, savedPassword}); uploadButton.setEnabled(false); frame.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); uploadTask.go(); timer.start(); //statusLabel.setForeground(new Color(0, 150, 0)); //statusLabel.setText("Success"); } else { //dialogText.setText("Please specify a valid username and password"); //dialog.pack(); //dialog.show(); log.error("WoWCompanion: invalid user/pass specified"); statusLabel.setForeground(Color.RED); statusLabel.setText("Invalid user/pass"); } } catch (UnsupportedEncodingException e) { statusLabel.setForeground(Color.RED); statusLabel.setText("Error hashing password"); log.error("WoWCompanion: failed to hash password"); } catch (FileNotFoundException e) { //dialogText.setText("Error opening account: "+e); //dialog.pack(); //dialog.show() statusLabel.setText("Error opening account dir"); log.error("WoWCompanion: error opening account directory");// } catch (WoWParserException e) {// System.err.println(e);// statusLabel.setForeground(Color.RED);// statusLabel.setText("Unable to parse account data");// } catch (WoWUploaderConnectException e) {// System.err.println(e);// statusLabel.setForeground(Color.RED);// statusLabel.setText("Unable to connect");// } catch (InvalidUserPassException e) {// System.err.println(e);// statusLabel.setForeground(Color.RED);// statusLabel.setText("Invalid user/pass");// } catch (WoWUploaderException e) {// System.err.println("error: "+e);// statusLabel.setForeground(Color.RED);// statusLabel.setText("Error sending data"); } } | 7063 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7063/ddaca4d15edfd98a1f7595491c4960c48859fce2/WoWCompanion.java/clean/src/net/sf/wowc/WoWCompanion.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
4879,
1503,
1435,
288,
377,
202,
698,
288,
1082,
202,
1425,
273,
394,
678,
83,
59,
809,
5621,
202,
202,
97,
1044,
261,
59,
83,
59,
18625,
425,
13,
288,
1082,
202,
1330,
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,
4879,
1503,
1435,
288,
377,
202,
698,
288,
1082,
202,
1425,
273,
394,
678,
83,
59,
809,
5621,
202,
202,
97,
1044,
261,
59,
83,
59,
18625,
425,
13,
288,
1082,
202,
1330,
18,... |
public String getContactInfo(String userID, String command) throws IOException, MarshalException, ValidationException { update(); User user = (User) m_users.get(userID); if (user == null) return ""; String value = ""; Enumeration contacts = user.enumerateContact(); while (contacts != null && contacts.hasMoreElements()) { Contact contact = (Contact) contacts.nextElement(); if (contact != null) { if (contact.getType().equals(command)) { value = contact.getInfo(); break; } } } return value; } | 47678 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47678/e76836fb2bf438de9838e2a8a53ea26f8d7d2c23/UserManager.java/clean/src/services/org/opennms/netmgt/config/UserManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
336,
28097,
12,
780,
16299,
16,
514,
1296,
13,
1216,
1860,
16,
5884,
503,
16,
15614,
288,
3639,
1089,
5621,
5411,
2177,
729,
273,
261,
1299,
13,
312,
67,
5577,
18,
588,
12,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
336,
28097,
12,
780,
16299,
16,
514,
1296,
13,
1216,
1860,
16,
5884,
503,
16,
15614,
288,
3639,
1089,
5621,
5411,
2177,
729,
273,
261,
1299,
13,
312,
67,
5577,
18,
588,
12,
... | ||
protected Node getFirstNode (Node node) | protected Node getFirstNode (Node n) | protected Node getFirstNode (Node node) { return node.getParentNode(); } | 47110 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47110/460fb420f492314a410994b92cfc3b23c32d9c13/DocumentNavigator.java/buggy/jaxen/src/java/main/org/jaxen/dom/DocumentNavigator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
5397,
4750,
2029,
7521,
907,
261,
907,
290,
13,
10792,
288,
13491,
327,
756,
18,
588,
3054,
907,
5621,
10792,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
5397,
4750,
2029,
7521,
907,
261,
907,
290,
13,
10792,
288,
13491,
327,
756,
18,
588,
3054,
907,
5621,
10792,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
iVisited.accept(_Payload); | _Payload.visitArrayNode(iVisited); | public void visitArrayNode(ArrayNode iVisited) { iVisited.accept(_Payload); for (Node node = iVisited; node != null; node = node.getNextNode()) { node.getHeadNode().accept(this); } } | 47273 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47273/043fa4419ad506aa6f8843684eb8114b226fe4b5/DefaultIteratorVisitor.java/clean/org/jruby/nodes/visitor/DefaultIteratorVisitor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
3757,
1076,
907,
12,
1076,
907,
277,
30019,
13,
288,
202,
202,
77,
30019,
18,
9436,
24899,
6110,
1769,
202,
202,
1884,
261,
907,
756,
273,
277,
30019,
31,
756,
480,
446,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
3757,
1076,
907,
12,
1076,
907,
277,
30019,
13,
288,
202,
202,
77,
30019,
18,
9436,
24899,
6110,
1769,
202,
202,
1884,
261,
907,
756,
273,
277,
30019,
31,
756,
480,
446,
... |
public ExplorerBrowser(project proj) { super(); p = proj; setLayout(new BorderLayout()); trStructure.setShowsRootHandles(true); trStructure.setRootVisible(false); trStructure.setVisibleRowCount(5); trStructure.setFont(font); trStructure.addMouseListener(this); scrTree.setOpaque(true); setSize(BasicWindow.iScreenWidth/5-20,BasicWindow.iScreenHeight-BasicWindow.iScreenHeight/5); add(scrTree, BorderLayout.CENTER); setVisible(true); oClass = this; } | public ExplorerBrowser() { super(); p = (project)project.oClass; setLayout(new BorderLayout()); trStructure.setShowsRootHandles(true); trStructure.setRootVisible(false); trStructure.setVisibleRowCount(5); trStructure.setFont(font); trStructure.addMouseListener(this); scrTree.setOpaque(true); setSize(BasicWindow.iScreenWidth/5-20,BasicWindow.iScreenHeight-BasicWindow.iScreenHeight/5); add(scrTree, BorderLayout.CENTER); setVisible(true); oClass = this; } | public ExplorerBrowser(project proj) { super(); // get the current project state p = proj; setLayout(new BorderLayout()); trStructure.setShowsRootHandles(true); trStructure.setRootVisible(false); trStructure.setVisibleRowCount(5); trStructure.setFont(font); trStructure.addMouseListener(this); scrTree.setOpaque(true); setSize(BasicWindow.iScreenWidth/5-20,BasicWindow.iScreenHeight-BasicWindow.iScreenHeight/5); add(scrTree, BorderLayout.CENTER); setVisible(true); // set the instance of this object, needed for interaction oClass = this; } | 11744 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11744/dd7b4a9832c16ebc68ddd0715d2bd64eaa6ceb18/ExplorerBrowser.java/clean/src/theatre/ExplorerBrowser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1312,
11766,
9132,
12,
4406,
10296,
13,
202,
95,
202,
202,
9565,
5621,
202,
202,
759,
336,
326,
783,
1984,
919,
202,
202,
84,
273,
10296,
31,
9506,
202,
542,
3744,
12,
2704,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1312,
11766,
9132,
12,
4406,
10296,
13,
202,
95,
202,
202,
9565,
5621,
202,
202,
759,
336,
326,
783,
1984,
919,
202,
202,
84,
273,
10296,
31,
9506,
202,
542,
3744,
12,
2704,
... |
if(result == Undefined.instance) { | if (result == Undefined.instance) { | String eval(String expr) { Context cx = getCurrentContext(); DebuggableEngine engine = cx.getDebuggableEngine(); if(cx == null) return "undefined"; ContextHelper helper = new ContextHelper(); helper.attach(cx); if(frameIndex >= engine.getFrameCount()) { helper.reset(); return "undefined"; } String resultString; engine.setDebugger(null); cx.setGeneratingDebug(false); cx.setOptimizationLevel(-1); boolean breakNextLine = engine.getBreakNextLine(); engine.setBreakNextLine(false); try { Scriptable scope; scope = engine.getFrame(frameIndex).getVariableObject(); Object result; if(scope instanceof NativeCall) { NativeCall call = (NativeCall)scope; result = NativeGlobal.evalSpecial(cx, call, call.getThisObj(), new Object[]{expr}, "", 1); } else { result = cx.evaluateString(scope, expr, "", 0, null); } if(result == Undefined.instance) { result = ""; } try { resultString = ScriptRuntime.toString(result); } catch(RuntimeException exc) { resultString = result.toString(); } } catch(Exception exc) { resultString = exc.getMessage(); } if(resultString == null) { resultString = "null"; } engine.setDebugger(this); cx.setGeneratingDebug(true); cx.setOptimizationLevel(-1); engine.setBreakNextLine(breakNextLine); helper.reset(); return resultString; } | 12904 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12904/5b760bc86060749267746b7d77c0c8da1d3b9c1d/Main.java/buggy/js/rhino/toolsrc/org/mozilla/javascript/tools/debugger/Main.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
514,
5302,
12,
780,
3065,
13,
288,
3639,
1772,
9494,
273,
5175,
1042,
5621,
3639,
4015,
8455,
4410,
4073,
273,
9494,
18,
588,
2829,
8455,
4410,
5621,
3639,
309,
12,
71,
92,
422,
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,
514,
5302,
12,
780,
3065,
13,
288,
3639,
1772,
9494,
273,
5175,
1042,
5621,
3639,
4015,
8455,
4410,
4073,
273,
9494,
18,
588,
2829,
8455,
4410,
5621,
3639,
309,
12,
71,
92,
422,
446,
13... |
public static boolean hasRichEditor(TaskRepository repository, AbstractRepositoryTask task) { return hasRichEditor(repository); | public static boolean hasRichEditor(TaskRepository repository) { return Version.XML_RPC.name().equals(repository.getVersion()); | public static boolean hasRichEditor(TaskRepository repository, AbstractRepositoryTask task) { return hasRichEditor(repository); } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/1c3379fdf418709b655f508e2e5662afac107d22/TracRepositoryConnector.java/buggy/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracRepositoryConnector.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
1250,
711,
22591,
6946,
12,
2174,
3305,
3352,
16,
4115,
3305,
2174,
1562,
13,
288,
202,
202,
2463,
711,
22591,
6946,
12,
9071,
1769,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
1250,
711,
22591,
6946,
12,
2174,
3305,
3352,
16,
4115,
3305,
2174,
1562,
13,
288,
202,
202,
2463,
711,
22591,
6946,
12,
9071,
1769,
202,
97,
2,
-100,
-100,
-100,
-100,
-... |
public DistributionPoint(DistributionPointName distributionPoint, ReasonFlags reasons, GeneralNames cRLIssuer) { if ((reasons != null) && (distributionPoint == null) && (cRLIssuer == null)) { throw new IllegalArgumentException( Messages.getString("security.17F")); } this.distributionPoint = distributionPoint; this.reasons = reasons; this.cRLIssuer = cRLIssuer; | public DistributionPoint() { distributionPoint = null; reasons = null; cRLIssuer = null; | public DistributionPoint(DistributionPointName distributionPoint, ReasonFlags reasons, GeneralNames cRLIssuer) { if ((reasons != null) && (distributionPoint == null) && (cRLIssuer == null)) { throw new IllegalArgumentException( Messages.getString("security.17F")); //$NON-NLS-1$ } this.distributionPoint = distributionPoint; this.reasons = reasons; this.cRLIssuer = cRLIssuer; } | 54769 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54769/f11cfd830ea760eba58b7cead5464ffc5dc7bc8a/DistributionPoint.java/buggy/modules/security/src/main/java/common/org/apache/harmony/security/x509/DistributionPoint.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
17547,
2148,
12,
9003,
2148,
461,
7006,
2148,
16,
5411,
13558,
5094,
14000,
16,
9544,
1557,
276,
54,
2053,
1049,
6211,
13,
288,
3639,
309,
14015,
10579,
87,
480,
446,
13,
597,
261,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
17547,
2148,
12,
9003,
2148,
461,
7006,
2148,
16,
5411,
13558,
5094,
14000,
16,
9544,
1557,
276,
54,
2053,
1049,
6211,
13,
288,
3639,
309,
14015,
10579,
87,
480,
446,
13,
597,
261,
... |
Point p = tabFolder.getControl().toDisplay(event.x, event.y); p.y += +event.height; EditorPresentation.this.showList(tabFolder.getControl().getShell(), p.x, p.y); | showListDefaultLocation(); | public void showList(CTabFolderEvent event) { PaneFolder tabFolder = getTabFolder(); event.doit = false; Point p = tabFolder.getControl().toDisplay(event.x, event.y); p.y += +event.height; EditorPresentation.this.showList(tabFolder.getControl().getShell(), p.x, p.y); } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/b4afc26bd173809fb5c8baa114707cbcb3a04711/EditorPresentation.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/EditorPresentation.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
2405,
682,
12,
1268,
378,
3899,
1133,
871,
13,
288,
5411,
453,
8806,
3899,
3246,
3899,
273,
3181,
378,
3899,
5621,
5411,
871,
18,
2896,
305,
273,
629,
31,
5411,
4686,
293,
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,
540,
1071,
918,
2405,
682,
12,
1268,
378,
3899,
1133,
871,
13,
288,
5411,
453,
8806,
3899,
3246,
3899,
273,
3181,
378,
3899,
5621,
5411,
871,
18,
2896,
305,
273,
629,
31,
5411,
4686,
293,
27... |
public boolean renameRaw(File src, File dst) throws IOException { src = makeAbsolute(src); dst = makeAbsolute(dst); | public boolean renameRaw(Path src, Path dst) throws IOException { | public boolean renameRaw(File src, File dst) throws IOException { src = makeAbsolute(src); dst = makeAbsolute(dst); if (useCopyForRename) { FileUtil.copyContents(this, src, dst, true, getConf()); return fullyDelete(src); } else return src.renameTo(dst); } | 49935 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49935/ee01fef4b4fb82c7492a4a747793839a4d14cd39/LocalFileSystem.java/buggy/src/java/org/apache/hadoop/fs/LocalFileSystem.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
6472,
4809,
12,
812,
1705,
16,
1387,
3046,
13,
1216,
1860,
288,
3639,
1705,
273,
1221,
10368,
12,
4816,
1769,
3639,
3046,
273,
1221,
10368,
12,
11057,
1769,
3639,
309,
261,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
6472,
4809,
12,
812,
1705,
16,
1387,
3046,
13,
1216,
1860,
288,
3639,
1705,
273,
1221,
10368,
12,
4816,
1769,
3639,
3046,
273,
1221,
10368,
12,
11057,
1769,
3639,
309,
261,
12... |
metadataSource.retrieve( artifact, localRepository, remoteRepositories ); | artifactMetadataSource.retrieve( artifact, localRepository, remoteRepositories ); | private String resolveMetaVersion( String groupId, String artifactId, List remoteRepositories, ArtifactRepository localRepository, String metaVersionId ) throws PluginVersionResolutionException { Artifact artifact = artifactFactory.createProjectArtifact( groupId, artifactId, metaVersionId ); String version = null; try { metadataSource.retrieve( artifact, localRepository, remoteRepositories ); MavenProject project = mavenProjectBuilder.buildFromRepository( artifact, remoteRepositories, localRepository ); boolean pluginValid = true; // if we don't have the required Maven version, then ignore an update if ( project.getPrerequesites() != null && project.getPrerequesites().getMaven() != null ) { DefaultArtifactVersion requiredVersion = new DefaultArtifactVersion( project.getPrerequesites().getMaven() ); if ( runtimeInformation.getApplicationVersion().compareTo( requiredVersion ) < 0 ) { getLogger().info( "Ignoring available plugin update: " + artifact.getVersion() + " as it requires Maven version " + requiredVersion ); pluginValid = false; } } if ( pluginValid ) { version = artifact.getVersion(); } } catch ( ArtifactMetadataRetrievalException e ) { getLogger().debug( "Failed to resolve " + metaVersionId + " version", e ); } catch ( ProjectBuildingException e ) { throw new PluginVersionResolutionException( groupId, artifactId, "Unable to build resolve plugin project information", e ); } catch ( IOException e ) { throw new PluginVersionResolutionException( groupId, artifactId, "Unable to determine Maven version for comparison", e ); } return version; } | 1315 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1315/701ef520a30c7b30dcdf2e4a4f06548cc06fbf0b/DefaultPluginVersionManager.java/buggy/maven-core/src/main/java/org/apache/maven/plugin/version/DefaultPluginVersionManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
514,
2245,
2781,
1444,
12,
514,
6612,
16,
514,
25496,
16,
987,
2632,
18429,
16,
4766,
4202,
14022,
3305,
1191,
3305,
16,
514,
2191,
28039,
262,
3639,
1216,
6258,
1444,
11098,
503,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
514,
2245,
2781,
1444,
12,
514,
6612,
16,
514,
25496,
16,
987,
2632,
18429,
16,
4766,
4202,
14022,
3305,
1191,
3305,
16,
514,
2191,
28039,
262,
3639,
1216,
6258,
1444,
11098,
503,
5... |
try { setOnmouseover((String) evalAttr("onmouseover", getOnmouseoverExpr(), String.class)); } catch (NullAttributeException ex) { } | if ((string = EvalHelper.evalString("onmouseout", getOnmouseoutExpr(), this, pageContext)) != null) setOnmouseout(string); | private void evaluateExpressions() throws JspException { try { setAccesskey((String) evalAttr("accesskey", getAccesskeyExpr(), String.class)); } catch (NullAttributeException ex) { } try { setAlt((String) evalAttr("alt", getAltExpr(), String.class)); } catch (NullAttributeException ex) { } try { setAltKey((String) evalAttr("altKey", getAltKeyExpr(), String.class)); } catch (NullAttributeException ex) { } try { setDisabled(((Boolean) evalAttr("disabled", getDisabledExpr(), Boolean.class)). booleanValue()); } catch (NullAttributeException ex) { } try { setIndexed(((Boolean) evalAttr("indexed", getIndexedExpr(), Boolean.class)). booleanValue()); } catch (NullAttributeException ex) { } try { setName((String) evalAttr("name", getNameExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOnblur((String) evalAttr("onblur", getOnblurExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOnchange((String) evalAttr("onchange", getOnchangeExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOnclick((String) evalAttr("onclick", getOnclickExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOndblclick((String) evalAttr("ondblclick", getOndblclickExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOnfocus((String) evalAttr("onfocus", getOnfocusExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOnkeydown((String) evalAttr("onkeydown", getOnkeydownExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOnkeypress((String) evalAttr("onkeypress", getOnkeypressExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOnkeyup((String) evalAttr("onkeyup", getOnkeyupExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOnmousedown((String) evalAttr("onmousedown", getOnmousedownExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOnmousemove((String) evalAttr("onmousemove", getOnmousemoveExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOnmouseout((String) evalAttr("onmouseout", getOnmouseoutExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOnmouseover((String) evalAttr("onmouseover", getOnmouseoverExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOnmouseup((String) evalAttr("onmouseup", getOnmouseupExpr(), String.class)); } catch (NullAttributeException ex) { } try { setProperty((String) evalAttr("property", getPropertyExpr(), String.class)); } catch (NullAttributeException ex) { } try { setStyle((String) evalAttr("style", getStyleExpr(), String.class)); } catch (NullAttributeException ex) { } try { setStyleClass((String) evalAttr("styleClass", getStyleClassExpr(), String.class)); } catch (NullAttributeException ex) { } try { setStyleId((String) evalAttr("styleId", getStyleIdExpr(), String.class)); } catch (NullAttributeException ex) { } try { setTabindex((String) evalAttr("tabindex", getTabindexExpr(), String.class)); } catch (NullAttributeException ex) { } try { setTitle((String) evalAttr("title", getTitleExpr(), String.class)); } catch (NullAttributeException ex) { } try { setTitleKey((String) evalAttr("titleKey", getTitleKeyExpr(), String.class)); } catch (NullAttributeException ex) { } try { setValue((String) evalAttr("value", getValueExpr(), String.class)); } catch (NullAttributeException ex) { } } | 8610 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8610/161d973cb8d39005faf380ea401e605000b8884b/ELCheckboxTag.java/buggy/struts-el/src/share/org/apache/strutsel/taglib/html/ELCheckboxTag.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
5956,
8927,
1435,
1216,
27485,
288,
3639,
775,
288,
5411,
444,
1862,
856,
12443,
780,
13,
5302,
3843,
2932,
3860,
856,
3113,
21909,
856,
4742,
9334,
4766,
6647,
514,
18,
1106,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
5956,
8927,
1435,
1216,
27485,
288,
3639,
775,
288,
5411,
444,
1862,
856,
12443,
780,
13,
5302,
3843,
2932,
3860,
856,
3113,
21909,
856,
4742,
9334,
4766,
6647,
514,
18,
1106,
... |
prop.setValues(new InternalValue[]{InternalValue.create(NodeTypeRegistry.NT_UNSTRUCTURED)}); | prop.setValues(new InternalValue[]{InternalValue.create(NodeTypeRegistry.REP_ROOT)}); | private PersistentNodeState createPersistentRootNodeState(String rootNodeUUID, NodeTypeRegistry ntReg) throws ItemStateException { PersistentNodeState rootState = createNodeState(rootNodeUUID, NodeTypeRegistry.NT_UNSTRUCTURED, null); // @todo FIXME need to manually setup root node by creating mandatory jcr:primaryType property NodeDefId nodeDefId = null; PropDefId propDefId = null; try { // FIXME relies on definition of nt:unstructured and nt:base: // first (and only) child node definition in nt:unstructured is applied to root node nodeDefId = new NodeDefId(ntReg.getNodeTypeDef(NodeTypeRegistry.NT_UNSTRUCTURED).getChildNodeDefs()[0]); // first property definition in nt:base is jcr:primaryType propDefId = new PropDefId(ntReg.getNodeTypeDef(NodeTypeRegistry.NT_BASE).getPropertyDefs()[0]); } catch (NoSuchNodeTypeException nsnte) { String msg = "failed to create root node"; log.error(msg, nsnte); throw new ItemStateException(msg, nsnte); } rootState.setDefinitionId(nodeDefId); QName propName = new QName(NamespaceRegistryImpl.NS_JCR_URI, "primaryType"); rootState.addPropertyEntry(propName); PersistentPropertyState prop = createPropertyState(rootNodeUUID, propName); prop.setValues(new InternalValue[]{InternalValue.create(NodeTypeRegistry.NT_UNSTRUCTURED)}); prop.setType(PropertyType.NAME); prop.setMultiValued(false); prop.setDefinitionId(propDefId); rootState.store(); prop.store(); return rootState; } | 49304 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49304/9b009ef34dfd224b9e2e6907fdf3e54317be6e93/PersistentItemStateManager.java/clean/src/java/org/apache/jackrabbit/core/state/PersistentItemStateManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
11049,
907,
1119,
752,
11906,
29658,
1119,
12,
780,
10181,
5562,
16,
4766,
17311,
20896,
4243,
9513,
1617,
13,
5411,
1216,
4342,
5060,
288,
3639,
11049,
907,
1119,
1365,
1119,
273,
24... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
11049,
907,
1119,
752,
11906,
29658,
1119,
12,
780,
10181,
5562,
16,
4766,
17311,
20896,
4243,
9513,
1617,
13,
5411,
1216,
4342,
5060,
288,
3639,
11049,
907,
1119,
1365,
1119,
273,
24... |
statusLine = new MessageLine(composite); statusLine.setAlignment(SWT.LEFT); statusLine.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); statusLine.setErrorStatus(null); statusLine.setFont(font); | protected Control createDialogArea(Composite parent) { Font font = parent.getFont(); Composite composite = (Composite) super.createDialogArea(parent); composite.setLayout(new GridLayout()); composite.setLayoutData(new GridData(GridData.FILL_BOTH)); createFolderNameGroup(composite); linkedResourceGroup.createContents(composite); statusLine = new MessageLine(composite); statusLine.setAlignment(SWT.LEFT); statusLine.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); statusLine.setErrorStatus(null); statusLine.setFont(font); return composite;} | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/cdf08439f3977fe372c1e2a6cd6e9b934bd6c831/NewFolderDialog.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/NewFolderDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4750,
8888,
752,
6353,
5484,
12,
9400,
982,
13,
288,
202,
5711,
3512,
273,
982,
18,
588,
5711,
5621,
202,
9400,
9635,
273,
261,
9400,
13,
2240,
18,
2640,
6353,
5484,
12,
2938,
1769,
202,
276... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4750,
8888,
752,
6353,
5484,
12,
9400,
982,
13,
288,
202,
5711,
3512,
273,
982,
18,
588,
5711,
5621,
202,
9400,
9635,
273,
261,
9400,
13,
2240,
18,
2640,
6353,
5484,
12,
2938,
1769,
202,
276... | |
"Max-Forwards: 3495\n", | "Max-Forwards: 34\n", | public void testParser() { String content[] = { "Max-Forwards: 3495\n", "Max-Forwards: 0 \n" }; super.testParser(MaxForwardsParser.class,content); } | 7607 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7607/e6ccdcc40ced6a577fbaef1894c5a3d804e3dd61/MaxForwardsParserTest.java/clean/trunk/src/test/unit/gov/nist/javax/sip/parser/MaxForwardsParserTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
2678,
1435,
288,
9506,
202,
780,
913,
8526,
273,
288,
1082,
202,
6,
2747,
17,
1290,
6397,
30,
890,
7616,
25,
64,
82,
3113,
1082,
202,
6,
2747,
17,
1290,
6397,
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,
482,
918,
1842,
2678,
1435,
288,
9506,
202,
780,
913,
8526,
273,
288,
1082,
202,
6,
2747,
17,
1290,
6397,
30,
890,
7616,
25,
64,
82,
3113,
1082,
202,
6,
2747,
17,
1290,
6397,
30,... |
MA_MenuBar(Chart c, DataSetBuilder builder, Vector period_types) { data_builder = builder; chart = c; menu_bar = this; Menu file_menu = new Menu("File"); indicator_menu = new Menu("Indicators"); Menu view_menu = new Menu("View"); indicator_selection = new IndicatorSelection(chart); add(file_menu); add(indicator_menu); add(view_menu); // File menu items, with shortcuts MenuItem new_window, close_window, reload, mkt_selection, print_cmd; MenuItem indicator_selection_menu, print_all, quit; file_menu.add(new_window = new MenuItem("New Window", new MenuShortcut(KeyEvent.VK_N))); file_menu.add(close_window = new MenuItem("Close Window", new MenuShortcut(KeyEvent.VK_W))); file_menu.add(reload = new MenuItem("Reload settings", new MenuShortcut(KeyEvent.VK_Z))); file_menu.addSeparator(); file_menu.add(mkt_selection = new MenuItem("Select Tradable", new MenuShortcut(KeyEvent.VK_S))); file_menu.add(indicator_selection_menu = new MenuItem("Select Indicator", new MenuShortcut(KeyEvent.VK_I))); file_menu.addSeparator(); file_menu.add(print_cmd = new MenuItem("Print", new MenuShortcut(KeyEvent.VK_P))); file_menu.add(print_all = new MenuItem("Print all", new MenuShortcut(KeyEvent.VK_A))); file_menu.addSeparator(); file_menu.add( quit = new MenuItem("Quit", new MenuShortcut(KeyEvent.VK_Q))); // Action listeners for file menu items new_window.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { MA_Configuration.application_instance().reload(); Chart new_chart = new Chart(new DataSetBuilder(data_builder), chart.serialize_filename, chart.options()); } }); mkt_selection.addActionListener(chart.market_selections); indicator_selection_menu.addActionListener(indicator_selection); close_window.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { chart.close(); } }); reload.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) {//!!!!!System.out.println("reloaded");Calendar start_date = data_builder.last_latest_date_time();if (start_date == null) {start_date = chart.start_date();}start_date = protocol_util.one_second_later(start_date);System.out.println("start date: " + start_date);try {//data_builder.old_remove_send_time_delimited_market_data_request(chart.current_tradable, chart.current_period_type, start_date, null);// !!!Do something with the results - perhaps print it for now.// !!!Also - test the indicator request.} catch (Exception x) {} MA_Configuration.application_instance().reload(); } }); print_cmd.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if (! (chart.current_tradable == null || chart.current_tradable.length() == 0)) { chart.main_pane.print(false); } else { final ErrorBox errorbox = new ErrorBox("Printing error", "Nothing to print", chart); } } }); print_all.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if (! (chart.current_tradable == null || chart.current_tradable.length() == 0)) { String original_tradable = chart.current_tradable; chart.print_all_charts(); chart.request_data((String) original_tradable); } else { final ErrorBox errorbox = new ErrorBox("Printing error", "Nothing to print", chart); } } }); quit.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { chart.quit(0); } }); // View menu items final MenuItem replace_toggle; period_menu = new Menu(); final MenuItem indicator_colors_item = new MenuItem("Indicator Colors", new MenuShortcut(KeyEvent.VK_C)); MenuItem next = new MenuItem("Next", new MenuShortcut(KeyEvent.VK_CLOSE_BRACKET)); MenuItem previous = new MenuItem("Previous", new MenuShortcut(KeyEvent.VK_OPEN_BRACKET)); view_menu.add(replace_toggle = new MenuItem("", new MenuShortcut(KeyEvent.VK_R))); view_menu.add(indicator_colors_item); set_replace_indicator_label(replace_toggle); setup_period_menu(period_menu, period_types); view_menu.add(period_menu); view_menu.add(next); view_menu.add(previous); indicator_colors = new IndicatorColors(chart); // Connect the indicator colors dialog/list with the corresponding // menu item: indicator_colors_item.addActionListener(indicator_colors); // Set up so that the indicator colors dialog/list will be updated // whenever an indicator is selected from the indicator menu item. indicator_selection.addActionListener(indicator_colors); update_indicator_menu(); // Action listeners for view menu items replace_toggle.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { chart.toggle_indicator_replacement(); set_replace_indicator_label(replace_toggle); } }); next.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { menu_bar.next_tradable(); } }); previous.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { menu_bar.previous_tradable(); } }); } | 13245 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13245/f2d79bff77febe04aef94aeaae7be8abf07198cd/MA_MenuBar.java/buggy/src/clients/mas_gui/MA_MenuBar.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
5535,
67,
4599,
5190,
12,
7984,
276,
16,
14065,
1263,
2089,
16,
5589,
3879,
67,
2352,
13,
288,
202,
202,
892,
67,
9574,
273,
2089,
31,
202,
202,
11563,
273,
276,
31,
202,
202,
54... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5535,
67,
4599,
5190,
12,
7984,
276,
16,
14065,
1263,
2089,
16,
5589,
3879,
67,
2352,
13,
288,
202,
202,
892,
67,
9574,
273,
2089,
31,
202,
202,
11563,
273,
276,
31,
202,
202,
54... | ||
_senderThread.wait(waitUntil - System.currentTimeMillis()); | long x = waitUntil - System.currentTimeMillis(); if(x > 0) _senderThread.wait(x); | public boolean send() { final PacketThrottle throttle = PacketThrottle.getThrottle(_destination.getPeer(), _prb._packetSize); _receiverThread = Thread.currentThread(); _senderThread = new Thread() { public void run() { int sentSinceLastPing = 0; while (!_sendComplete) { long waitUntil = System.currentTimeMillis() + throttle.getDelay(); try { while (waitUntil > System.currentTimeMillis()) { if(_sendComplete) return; synchronized (_senderThread) { _senderThread.wait(waitUntil - System.currentTimeMillis()); } } while (_unsent.size() == 0) { if(_sendComplete) return; synchronized (_senderThread) { _senderThread.wait(); } } } catch (InterruptedException e) { } int packetNo = ((Integer) _unsent.removeFirst()).intValue(); _sentPackets.setBit(packetNo, true); try { _usm.send(BlockTransmitter.this._destination, DMT.createPacketTransmit(_uid, packetNo, _sentPackets, _prb.getPacket(packetNo))); // We accelerate the ping rate during the transfer to keep a closer eye on round-trip-time sentSinceLastPing++; if (sentSinceLastPing >= PING_EVERY) { sentSinceLastPing = 0; _usm.send(BlockTransmitter.this._destination, DMT.createPing()); } } catch (NotConnectedException e) { Logger.normal(this, "Terminating send: "+e); _sendComplete = true; } } } }; _unsent = _prb.addListener(new PartiallyReceivedBlock.PacketReceivedListener() {; public void packetReceived(int packetNo) { _unsent.addLast(new Integer(packetNo)); _sentPackets.setBit(packetNo, false); synchronized(_senderThread) { _senderThread.notify(); } } public void receiveAborted(int reason, String description) { try { _usm.send(_destination, DMT.createSendAborted(reason, description)); } catch (NotConnectedException e) { Logger.minor(this, "Receive aborted and receiver is not connected"); } } }); _senderThread.start(); while (true) { if (_prb.isAborted()) { _sendComplete = true; return false; } Message msg; try { msg = _usm.waitFor(MessageFilter.create().setTimeout(SEND_TIMEOUT).setType(DMT.missingPacketNotification).setField(DMT.UID, _uid).or(MessageFilter.create().setType(DMT.allReceived).setField(DMT.UID, _uid))); } catch (DisconnectedException e) { Logger.normal(this, "Terminating send "+_uid+" to "+_destination+" from "+_usm.getPortNumber()+" because node disconnected while waiting"); _sendComplete = true; return false; } if (msg == null) { if (getNumSent() == _prb.getNumPackets()) { _sendComplete = true; Logger.error(this, "Terminating send "+_uid+" to "+_destination+" from "+_usm.getPortNumber()+" as we haven't heard from receiver in "+SEND_TIMEOUT+"ms."); return false; } } else if (msg.getSpec().equals(DMT.missingPacketNotification)) { LinkedList missing = (LinkedList) msg.getObject(DMT.MISSING); for (Iterator i = missing.iterator(); i.hasNext();) { Integer packetNo = (Integer) i.next(); if (_prb.isReceived(packetNo.intValue())) { _unsent.addFirst(packetNo); _sentPackets.setBit(packetNo.intValue(), false); synchronized(_senderThread) { _senderThread.notify(); } } } } else if (msg.getSpec().equals(DMT.allReceived)) { _sendComplete = true; return true; } else if(_sendComplete) { // Terminated abnormally return false; } } } | 50915 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50915/6491eac525bcdfc8a20ebd147d2e4134caf69a22/BlockTransmitter.java/buggy/src/freenet/io/xfer/BlockTransmitter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
1366,
1435,
288,
202,
202,
6385,
11114,
27636,
18304,
273,
11114,
27636,
18,
588,
27636,
24899,
10590,
18,
588,
6813,
9334,
389,
683,
70,
6315,
11482,
1225,
1769,
202,
202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
1366,
1435,
288,
202,
202,
6385,
11114,
27636,
18304,
273,
11114,
27636,
18,
588,
27636,
24899,
10590,
18,
588,
6813,
9334,
389,
683,
70,
6315,
11482,
1225,
1769,
202,
202,
... |
htmlCompat = true; | useEmptyElementTag = 2; | public void setStyle (Object style) { this.style = style; htmlCompat = false; if ("html".equals(style)) { isHtml = true; htmlCompat = true; } if ("xhtml".equals(style)) htmlCompat = true; if ("plain".equals(style)) escapeText = false; } | 36952 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/36952/ecd9dc41ffaa40ccc7fff59ad002fc45b18e4c4a/XMLPrinter.java/clean/gnu/xml/XMLPrinter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
18995,
261,
921,
2154,
13,
225,
288,
565,
333,
18,
4060,
273,
2154,
31,
565,
1729,
13322,
273,
629,
31,
565,
309,
7566,
2620,
9654,
14963,
12,
4060,
3719,
1377,
288,
202,
291... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
18995,
261,
921,
2154,
13,
225,
288,
565,
333,
18,
4060,
273,
2154,
31,
565,
1729,
13322,
273,
629,
31,
565,
309,
7566,
2620,
9654,
14963,
12,
4060,
3719,
1377,
288,
202,
291... |
public void processEjbRequest(ObjectInputStream in, ObjectOutputStream out) throws Exception{ EJBRequest req = new EJBRequest(); EJBResponse res = new EJBResponse(); // TODO:2: This method can throw a large number of exceptions, we should // be prepared to handle them all. Look in the ObejctOutputStream code // for a full list of the exceptions thrown. // java.io.WriteAbortedException can be thrown containing a // try { req.readExternal( in ); } catch (java.io.WriteAbortedException e){ if ( e.detail instanceof java.io.NotSerializableException){ //TODO:1: Log this warning better. Include information on what bean is to blame throw new Exception("Client attempting to serialize unserializable object: "+ e.detail.getMessage()); } else { throw e.detail; } } catch (java.io.EOFException e) { throw new Exception("Reached the end of the stream before the full request could be read"); } catch (Throwable t){ throw new Exception("Cannot read client request: "+ t.getClass().getName()+" "+ t.getMessage()); } CallContext call = null; DeploymentInfo di = null; RpcContainer c = null;; try{ di = getDeployment(req); } catch (RemoteException e){ logger.warn( req + "No such deployment: "+e.getMessage()); res.setResponse( EJB_SYS_EXCEPTION, e); res.writeExternal( out ); return; } catch ( Throwable t ){ String message = "Unkown error occured while retreiving deployment:"+t.getMessage(); logger.fatal( req + message, t); RemoteException e = new RemoteException("The server has encountered a fatal error and must be restarted."+message); res.setResponse( EJB_ERROR , e ); res.writeExternal( out ); return; } try { call = CallContext.getCallContext(); call.setEJBRequest( req ); call.setDeploymentInfo( di ); } catch ( Throwable t ){ logger.fatal( req + "Unable to set the thread context for this request: ", t); RemoteException e = new RemoteException("The server has encountered a fatal error and must be restarted."); res.setResponse( EJB_ERROR , e ); res.writeExternal( out ); return; } logger.info( "EJB REQUEST : "+req ); try { switch (req.getRequestMethod()) { // Remote interface methods case EJB_OBJECT_BUSINESS_METHOD: doEjbObject_BUSINESS_METHOD( req, res ); break; // Home interface methods case EJB_HOME_CREATE: doEjbHome_CREATE( req, res ); break; case EJB_HOME_FIND: doEjbHome_FIND( req, res ); break; // javax.ejb.EJBObject methods case EJB_OBJECT_GET_EJB_HOME: doEjbObject_GET_EJB_HOME( req, res ); break; case EJB_OBJECT_GET_HANDLE: doEjbObject_GET_HANDLE( req, res ); break; case EJB_OBJECT_GET_PRIMARY_KEY: doEjbObject_GET_PRIMARY_KEY( req, res ); break; case EJB_OBJECT_IS_IDENTICAL: doEjbObject_IS_IDENTICAL( req, res ); break; case EJB_OBJECT_REMOVE: doEjbObject_REMOVE( req, res ); break; // javax.ejb.EJBHome methods case EJB_HOME_GET_EJB_META_DATA: doEjbHome_GET_EJB_META_DATA( req, res ); break; case EJB_HOME_GET_HOME_HANDLE: doEjbHome_GET_HOME_HANDLE( req, res ); break; case EJB_HOME_REMOVE_BY_HANDLE: doEjbHome_REMOVE_BY_HANDLE( req, res ); break; case EJB_HOME_REMOVE_BY_PKEY: doEjbHome_REMOVE_BY_PKEY( req, res ); break; } } catch (org.openejb.InvalidateReferenceException e) { res.setResponse(EJB_SYS_EXCEPTION, e.getRootCause()); } catch (org.openejb.ApplicationException e) { res.setResponse(EJB_APP_EXCEPTION, e.getRootCause()); } catch (org.openejb.SystemException e){ res.setResponse(EJB_ERROR, e.getRootCause()); // TODO:2: This means a severe error occured in OpenEJB // we should restart the container system or take other // aggressive actions to attempt recovery. logger.fatal( req+": OpenEJB encountered an unknown system error in container: ", e); } catch (java.lang.Throwable t){ //System.out.println(req+": Unkown error in container: "); res.setResponse(EJB_ERROR, t); logger.fatal( req+": Unkown error in container: ", t); } finally { logger.info( "EJB RESPONSE: "+res ); res.writeExternal( out ); call.reset(); } } | 47052 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47052/e6d37e7c20825a3f7812d90f38772c91519a585a/EjbDaemon.java/buggy/openejb0/src/server/org/openejb/server/EjbDaemon.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
6459,
2567,
41,
10649,
691,
12,
921,
4348,
267,
16,
921,
4632,
659,
13,
15069,
503,
95,
22719,
691,
3658,
33,
2704,
22719,
691,
5621,
22719,
607,
500,
550,
281,
33,
2704,
22719,
1064,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
6459,
2567,
41,
10649,
691,
12,
921,
4348,
267,
16,
921,
4632,
659,
13,
15069,
503,
95,
22719,
691,
3658,
33,
2704,
22719,
691,
5621,
22719,
607,
500,
550,
281,
33,
2704,
22719,
1064,
... | ||
if (aoi == null) aoi = getBounds2D(); else { | if (aoi != null) { | protected RenderedImage createRenderingOver(RenderContext rc) { // Just copy over the rendering hints. RenderingHints rh = rc.getRenderingHints(); if (rh == null) rh = new RenderingHints(null); // update the current affine transform AffineTransform at = rc.getTransform(); // Our bounds in device space... Rectangle r = at.createTransformedShape(getBounds2D()).getBounds(); Shape aoi = rc.getAreaOfInterest(); if (aoi == null) aoi = getBounds2D(); else { // Get AOI bounds in device space... Rectangle aoiR = at.createTransformedShape(aoi).getBounds(); Rectangle2D.intersect(r, aoiR, r); aoi = getBounds2D().createIntersection(aoi.getBounds2D()); } AffineTransform translate = AffineTransform.getTranslateInstance(-r.x, -r.y); BufferedImage bi = GraphicsUtil.makeLinearBufferedImage (r.width, r.height, true); Graphics2D g2d = bi.createGraphics(); // Make sure we draw with what hints we have. g2d.setRenderingHints(rh); g2d.setTransform(translate); g2d.transform(at); Iterator i = srcs.iterator(); while (i.hasNext()) { GraphicsUtil.drawImage(g2d, (Filter)i.next()); } return new ConcreteBufferedImageCachableRed(bi, r.x, r.y); } | 46680 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46680/dc27dc059ad1f52f55dd6cd5923eef7671a40cb7/ConcreteCompositeRable.java/clean/sources/org/apache/batik/refimpl/gvt/filter/ConcreteCompositeRable.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
6987,
329,
2040,
752,
14261,
4851,
12,
3420,
1042,
4519,
13,
288,
3639,
368,
12526,
1610,
1879,
326,
9782,
13442,
18,
3639,
22391,
6259,
273,
4519,
18,
588,
14261,
13368,
5621,
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,
4750,
6987,
329,
2040,
752,
14261,
4851,
12,
3420,
1042,
4519,
13,
288,
3639,
368,
12526,
1610,
1879,
326,
9782,
13442,
18,
3639,
22391,
6259,
273,
4519,
18,
588,
14261,
13368,
5621,
3639,
... |
return packageName + "." + name + postfix; | resolved = packageName + "." + name + postfix; | protected String resolveName(String name) { String original = name; name = removeTypeModifiers(name); String postfix = ""; if (original.length() > name.length()) { postfix = original.substring(name.length()); } if (name.indexOf(".") >= 0) { return original; } else if ( name.equals("void") || name.equals("int") || name.equals("boolean") || name.equals("long") || name.equals("short") || name.equals("char") || name.equals("byte") || name.equals("double") || name.equals("float")) { return original; } if (this.imports.containsKey(name)) { return (String) this.imports.get(name) + postfix; } if (packageName != null && packageName.length() > 0) { try { getClassLoader().loadClass(packageName + "." + name); return packageName + "." + name + postfix; } catch (Exception e) { // swallow } catch (Error e) { // swallow } } for (int i = 0; i < DEFAULT_IMPORTS.length; i++) { try { String fullName = DEFAULT_IMPORTS[i] + name; getClassLoader().loadClass(fullName); return fullName + postfix; } catch (Exception e) { // swallow } catch (Error e) { // swallow } } return null; } | 6462 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6462/f07dc9853a376457a771998591158e3a330cf47f/ASTBuilder.java/buggy/src/main/org/codehaus/groovy/syntax/parser/ASTBuilder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
514,
2245,
461,
12,
780,
508,
13,
288,
3639,
514,
2282,
273,
508,
31,
3639,
508,
273,
1206,
559,
11948,
12,
529,
1769,
3639,
514,
18923,
273,
1408,
31,
3639,
309,
261,
8830,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
514,
2245,
461,
12,
780,
508,
13,
288,
3639,
514,
2282,
273,
508,
31,
3639,
508,
273,
1206,
559,
11948,
12,
529,
1769,
3639,
514,
18923,
273,
1408,
31,
3639,
309,
261,
8830,
18,
... |
if (!saveable.isDirty()) return true; if (confirm) { String message = WorkbenchMessages .format( "EditorManager.saveChangesQuestion", new Object[] { part.getTitle() }); String[] buttons = new String[] { IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL, IDialogConstants.CANCEL_LABEL }; MessageDialog d = new MessageDialog(window.getShell(), WorkbenchMessages.getString("Save_Resource"), null, message, MessageDialog.QUESTION, buttons, 0); int choice = d.open(); switch (choice) { case 0: break; case 1: return true; default: case 2: return false; } } IRunnableWithProgress progressOp = new IRunnableWithProgress() { public void run(IProgressMonitor monitor) { IProgressMonitor monitorWrap = new EventLoopProgressMonitor( monitor); saveable.doSave(monitorWrap); } }; return runProgressMonitorOperation( WorkbenchMessages.getString("Save"), progressOp, window); | return SaveableHelper.savePart(saveable, part, window, confirm); | public boolean savePart(final ISaveablePart saveable, IWorkbenchPart part, boolean confirm) { // Short circuit. if (!saveable.isDirty()) return true; // If confirmation is required .. if (confirm) { String message = WorkbenchMessages .format( "EditorManager.saveChangesQuestion", new Object[] { part.getTitle() }); //$NON-NLS-1$ // Show a dialog. String[] buttons = new String[] { IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL, IDialogConstants.CANCEL_LABEL }; MessageDialog d = new MessageDialog(window.getShell(), WorkbenchMessages.getString("Save_Resource"), //$NON-NLS-1$ null, message, MessageDialog.QUESTION, buttons, 0); int choice = d.open(); // Branch on the user choice. // The choice id is based on the order of button labels above. switch (choice) { case 0: //yes break; case 1: //no return true; default: case 2: //cancel return false; } } // Create save block. IRunnableWithProgress progressOp = new IRunnableWithProgress() { public void run(IProgressMonitor monitor) { IProgressMonitor monitorWrap = new EventLoopProgressMonitor( monitor); saveable.doSave(monitorWrap); } }; // Do the save. return runProgressMonitorOperation( WorkbenchMessages.getString("Save"), progressOp, window); //$NON-NLS-1$ } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/6e013d4d76f7da8869da0bf935f38d49265e7685/EditorManager.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
1923,
1988,
12,
6385,
4437,
836,
429,
1988,
1923,
429,
16,
467,
2421,
22144,
1988,
1087,
16,
5411,
1250,
6932,
13,
288,
3639,
368,
7925,
12937,
18,
3639,
309,
16051,
5688,
429... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
1923,
1988,
12,
6385,
4437,
836,
429,
1988,
1923,
429,
16,
467,
2421,
22144,
1988,
1087,
16,
5411,
1250,
6932,
13,
288,
3639,
368,
7925,
12937,
18,
3639,
309,
16051,
5688,
429... |
replaceOne(usage, context, searchContext.getProject(), true); | replaceOne(usage, replaceContext, searchContext.getProject(), true); | public void run() { Set<Usage> selection = context.getUsageView().getSelectedUsages(); if (selection!=null && !selection.isEmpty()) { UsageInfo2UsageAdapter usage = (UsageInfo2UsageAdapter)selection.iterator().next(); if (isValid(usage,context)) { ensureFileWritable(usage); replaceOne(usage, context, searchContext.getProject(), true); } } } | 56627 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56627/89cd11decad19ffa2b802c17af5bee9a564095a0/ReplaceDialog.java/clean/plugins/structuralsearch/source/com/intellij/structuralsearch/plugin/replace/ui/ReplaceDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4202,
1071,
918,
1086,
1435,
288,
3639,
1000,
32,
5357,
34,
4421,
273,
819,
18,
588,
5357,
1767,
7675,
588,
7416,
3477,
1023,
5621,
3639,
309,
261,
10705,
5,
33,
2011,
597,
401,
10705,
18,
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,
4202,
1071,
918,
1086,
1435,
288,
3639,
1000,
32,
5357,
34,
4421,
273,
819,
18,
588,
5357,
1767,
7675,
588,
7416,
3477,
1023,
5621,
3639,
309,
261,
10705,
5,
33,
2011,
597,
401,
10705,
18,
2... |
return "jbigi-osx-none"; | return "jbigi-osx"+sAppend; | private static final String getMiddleName(boolean optimized){ String sAppend; if(optimized) { if(sCPUType == null) return null; else sAppend = "-"+sCPUType; }else sAppend = "-none"; boolean isWindows =(System.getProperty("os.name").toLowerCase().indexOf("windows") != -1); boolean isLinux =(System.getProperty("os.name").toLowerCase().indexOf("linux") != -1); boolean isFreebsd =(System.getProperty("os.name").toLowerCase().indexOf("freebsd") != -1); boolean isMacOS =(System.getProperty("os.name").toLowerCase().indexOf("mac os x") != -1); if(isWindows) return "jbigi-windows"+sAppend; // The convention on Windows if(isLinux) return "jbigi-linux"+sAppend; // The convention on linux... if(isFreebsd) return "jbigi-freebsd"+sAppend; // The convention on freebsd... if(isMacOS) return "jbigi-osx-none"; // The convention on Mac OS X... throw new RuntimeException("Dont know jbigi library name for os type '"+System.getProperty("os.name")+"'"); } | 50619 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50619/6bca71f7dada932c5207680f1b3ceec7166a4ec4/NativeBigInteger.java/buggy/src/net/i2p/util/NativeBigInteger.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
727,
514,
2108,
3132,
461,
12,
6494,
15411,
15329,
377,
202,
377,
202,
780,
272,
5736,
31,
377,
202,
430,
12,
16689,
1235,
13,
377,
202,
95,
377,
202,
202,
430,
12,
87,
152... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
727,
514,
2108,
3132,
461,
12,
6494,
15411,
15329,
377,
202,
377,
202,
780,
272,
5736,
31,
377,
202,
430,
12,
16689,
1235,
13,
377,
202,
95,
377,
202,
202,
430,
12,
87,
152... |
final BugzillaQueryCategory cat = (BugzillaQueryCategory) obj; | public void run() { ISelection selection = this.view.getViewer().getSelection(); Object obj = ((IStructuredSelection) selection).getFirstElement(); final BugzillaQueryCategory cat = (BugzillaQueryCategory) obj; if (obj instanceof BugzillaQueryCategory) { WorkspaceModifyOperation op = new WorkspaceModifyOperation() { protected void execute(IProgressMonitor monitor) throws CoreException { PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() { public void run() { cat.refreshBugs(); RefreshBugzillaAction.this.view.getViewer().refresh(); } }); } }; // Use the progess service to execute the runnable IProgressService service = PlatformUI.getWorkbench().getProgressService(); try { service.run(true, false, op); } catch (InvocationTargetException e) { // Operation was canceled MylarPlugin.log(e, e.getMessage()); } catch (InterruptedException e) { // Handle the wrapped exception MylarPlugin.log(e, e.getMessage()); } } } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/4cebf62c44ec668cabf38d7cc3801d3358ac2e56/RefreshBugzillaAction.java/clean/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/actions/RefreshBugzillaAction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1086,
1435,
288,
202,
202,
45,
6233,
4421,
273,
333,
18,
1945,
18,
588,
18415,
7675,
588,
6233,
5621,
202,
202,
921,
1081,
273,
14015,
45,
30733,
6233,
13,
4421,
2934,
58... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1086,
1435,
288,
202,
202,
45,
6233,
4421,
273,
333,
18,
1945,
18,
588,
18415,
7675,
588,
6233,
5621,
202,
202,
921,
1081,
273,
14015,
45,
30733,
6233,
13,
4421,
2934,
58... | |
designHandle = session.openDesign( getClassFolder( ) + INPUT_FOLDER + "SessionHandleTest_11.xml", options ); | designHandle = session.openDesign( getClassFolder( ) + INPUT_FOLDER + "SessionHandleTest_11.xml", options ); | public void testParserSemanticCheckControl( ) throws Exception { ModuleOption options = new ModuleOption( ); options.setSemanticCheck( false ); designHandle = session.openDesign( getClassFolder( ) + INPUT_FOLDER + "SessionHandleTest_11.xml", options ); //$NON-NLS-1$ assertEquals( 0, designHandle.getModule( ).getAllErrors( ).size( ) ); assertEquals( 0, designHandle .getLibrary( "lib" ).getModule( ).getAllErrors( ).size( ) ); //$NON-NLS-1$ designHandle.close( ); options = null; designHandle = session.openDesign( getClassFolder( ) + INPUT_FOLDER + "SessionHandleTest_11.xml", options ); //$NON-NLS-1$ assertEquals( 1, designHandle.getModule( ).getAllErrors( ).size( ) ); assertEquals( 1, designHandle .getLibrary( "lib" ).getModule( ).getAllErrors( ).size( ) ); //$NON-NLS-1$ } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/de4e32d64d24337e8801521456bb895f21408aa9/SessionHandleTest.java/clean/model/org.eclipse.birt.report.model.tests/test/org/eclipse/birt/report/model/api/SessionHandleTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
2678,
13185,
9941,
1564,
3367,
12,
262,
1216,
1185,
202,
95,
202,
202,
3120,
1895,
702,
273,
394,
5924,
1895,
12,
11272,
202,
202,
2116,
18,
542,
13185,
9941,
1564,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2678,
13185,
9941,
1564,
3367,
12,
262,
1216,
1185,
202,
95,
202,
202,
3120,
1895,
702,
273,
394,
5924,
1895,
12,
11272,
202,
202,
2116,
18,
542,
13185,
9941,
1564,
... |
} new Label( cmpBasic, SWT.NONE ); new Label( cmpBasic, SWT.NONE ).setText( Messages.getString( "ChartSheetImpl.Label.ColorBy" ) ); cmbColorBy = new Combo( cmpBasic, SWT.DROP_DOWN | SWT.READ_ONLY ); { GridData gridData = new GridData( GridData.FILL_HORIZONTAL ); cmbColorBy.setLayoutData( gridData ); NameSet ns = LiteralHelper.legendItemTypeSet; cmbColorBy.setItems( ns.getDisplayNames( ) ); cmbColorBy.select( ns.getSafeNameIndex( getChart( ).getLegend( ) .getItemType( ) .getName( ) ) ); cmbColorBy.addSelectionListener( this ); | public void getComponent( Composite parent ) { init( ); cmpContent = new Composite( parent, SWT.NONE ); { GridLayout glContent = new GridLayout( 3, false ); cmpContent.setLayout( glContent ); GridData gd = new GridData( GridData.FILL_BOTH ); cmpContent.setLayoutData( gd ); } Composite cmpBasic = new Composite( cmpContent, SWT.NONE ); { cmpBasic.setLayout( new GridLayout( 3, false ) ); GridData gd = new GridData( GridData.FILL_HORIZONTAL ); gd.horizontalSpan = 2; cmpBasic.setLayoutData( gd ); } Label lblTitle = new Label( cmpBasic, SWT.NONE ); { lblTitle.setText( Messages.getString( "ChartSheetImpl.Label.ChartTitle" ) ); //$NON-NLS-1$ } List keys = null; if ( getContext( ).getUIServiceProvider( ) != null ) { keys = getContext( ).getUIServiceProvider( ).getRegisteredKeys( ); } txtTitle = new ExternalizedTextEditorComposite( cmpBasic, SWT.BORDER, -1, -1, keys, getContext( ).getUIServiceProvider( ), getChart( ).getTitle( ).getLabel( ).getCaption( ).getValue( ) ); { GridData gdTXTTitle = new GridData( GridData.FILL_HORIZONTAL ); txtTitle.setLayoutData( gdTXTTitle ); txtTitle.setEnabled( getChart( ).getTitle( ).isVisible( ) ); txtTitle.addListener( this ); } btnVisible = new Button( cmpBasic, SWT.CHECK ); { btnVisible.setText( Messages.getString( "ChartSheetImpl.Label.Visible" ) ); //$NON-NLS-1$ btnVisible.setSelection( getChart( ).getTitle( ).isVisible( ) ); btnVisible.addSelectionListener( this ); } Label lblBackground = new Label( cmpBasic, SWT.NONE ); lblBackground.setText( Messages.getString( "ChartSheetImpl.Label.Background" ) ); //$NON-NLS-1$ cmbBackground = new FillChooserComposite( cmpBasic, SWT.NONE, getChart( ).getBlock( ).getBackground( ), true, true ); { GridData gridData = new GridData( GridData.FILL_HORIZONTAL ); cmbBackground.setLayoutData( gridData ); cmbBackground.addListener( this ); } new Label( cmpBasic, SWT.NONE ); new Label( cmpBasic, SWT.NONE ).setText( Messages.getString( "ChartSheetImpl.Label.ColorBy" ) ); //$NON-NLS-1$ cmbColorBy = new Combo( cmpBasic, SWT.DROP_DOWN | SWT.READ_ONLY ); { GridData gridData = new GridData( GridData.FILL_HORIZONTAL ); cmbColorBy.setLayoutData( gridData ); NameSet ns = LiteralHelper.legendItemTypeSet; cmbColorBy.setItems( ns.getDisplayNames( ) ); cmbColorBy.select( ns.getSafeNameIndex( getChart( ).getLegend( ) .getItemType( ) .getName( ) ) ); cmbColorBy.addSelectionListener( this ); } new Label( cmpBasic, SWT.NONE ); new Label( cmpBasic, SWT.NONE ).setText( Messages.getString( "ChartSheetImpl.Label.Style" ) ); //$NON-NLS-1$ cmbStyle = new Combo( cmpBasic, SWT.DROP_DOWN | SWT.READ_ONLY ); { GridData gridData = new GridData( GridData.FILL_HORIZONTAL ); cmbStyle.setLayoutData( gridData ); cmbStyle.addSelectionListener( this ); } btnEnablePreview = new Button( cmpBasic, SWT.CHECK ); { btnEnablePreview.setText( Messages.getString( "ChartSheetImpl.Label.EnableInPreview" ) ); //$NON-NLS-1$ btnEnablePreview.setSelection( ChartPreviewPainter.isProcessorEnabled( ) ); btnEnablePreview.addSelectionListener( this ); } Composite cmpInteractivity = new Composite( cmpBasic, SWT.NONE ); { GridLayout gl = new GridLayout( 4, false ); gl.marginHeight = 0; gl.marginWidth = 0; cmpInteractivity.setLayout( gl ); GridData gd = new GridData( GridData.FILL_HORIZONTAL | GridData.HORIZONTAL_ALIGN_BEGINNING ); gd.horizontalSpan = 3; cmpInteractivity.setLayoutData( gd ); } new Label( cmpInteractivity, SWT.NONE ).setText( Messages.getString( "ChartSheetImpl.Label.Interactivity" ) ); //$NON-NLS-1$ btnEnable = new Button( cmpInteractivity, SWT.CHECK ); { btnEnable.setText( Messages.getString( "ChartSheetImpl.Label.InteractivityEnable" ) ); //$NON-NLS-1$ btnEnable.setSelection( getChart( ).getInteractivity( ).isEnable( ) ); btnEnable.addSelectionListener( this ); } Label lblType = new Label( cmpInteractivity, SWT.NONE ); { GridData gridData = new GridData( ); gridData.horizontalIndent = 10; lblType.setLayoutData( gridData ); lblType.setText( Messages.getString( "ChartSheetImpl.Label.LegendBehaviorType" ) ); //$NON-NLS-1$ } cmbInteractivity = new Combo( cmpInteractivity, SWT.DROP_DOWN | SWT.READ_ONLY ); { GridData gridData = new GridData( GridData.FILL_HORIZONTAL ); cmbInteractivity.setLayoutData( gridData ); cmbInteractivity.addSelectionListener( this ); } new Label( cmpInteractivity, SWT.NONE ); btnTitleTriggers = new Button( cmpInteractivity, SWT.PUSH ); { GridData gd = new GridData( ); btnTitleTriggers.setLayoutData( gd ); btnTitleTriggers.setText( Messages.getString( "ChartSheetImpl.Text.TitleInteractivity" ) ); //$NON-NLS-1$ btnTitleTriggers.addSelectionListener( this ); } btnChartAreaTriggers = new Button( cmpInteractivity, SWT.PUSH ); { GridData gd = new GridData( ); gd.horizontalSpan = 2; btnChartAreaTriggers.setLayoutData( gd ); btnChartAreaTriggers.setText( Messages.getString( "ChartSheetImpl.Text.ChartAreaInteractivity" ) ); //$NON-NLS-1$ btnChartAreaTriggers.addSelectionListener( this ); } enableInteractivity( btnEnable.getSelection( ) ); populateLists( ); createButtonGroup( cmpContent ); } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/037a987c5947853949a14c2cf99272d0b29ee449/ChartSheetImpl.java/buggy/chart/org.eclipse.birt.chart.ui.extension/src/org/eclipse/birt/chart/ui/swt/wizard/format/chart/ChartSheetImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
10322,
12,
14728,
982,
262,
202,
95,
202,
202,
2738,
12,
11272,
202,
202,
9625,
1350,
273,
394,
14728,
12,
982,
16,
348,
8588,
18,
9826,
11272,
202,
202,
95,
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,
225,
202,
482,
918,
10322,
12,
14728,
982,
262,
202,
95,
202,
202,
2738,
12,
11272,
202,
202,
9625,
1350,
273,
394,
14728,
12,
982,
16,
348,
8588,
18,
9826,
11272,
202,
202,
95,
1082,
202,
... | |
List<ITask> activeTasks = MylarTaskListPlugin.getTaskListManager().getTaskList().getActiveTasks(); | List<ITask> activeTasks = MylarTaskListPlugin .getTaskListManager().getTaskList().getActiveTasks(); | public void run() { List<ITask> activeTasks = MylarTaskListPlugin.getTaskListManager().getTaskList().getActiveTasks(); for (ITask t : activeTasks) { getViewer().expandToLevel(t, 0); } } | 51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/1245a92f28a2990bae8373c09891556a69268c75/TaskListView.java/buggy/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/views/TaskListView.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
482,
918,
1086,
1435,
288,
9506,
202,
682,
32,
1285,
835,
34,
2695,
6685,
273,
8005,
7901,
2174,
682,
3773,
18,
588,
2174,
682,
1318,
7675,
588,
2174,
682,
7675,
588,
3896,
6685,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
482,
918,
1086,
1435,
288,
9506,
202,
682,
32,
1285,
835,
34,
2695,
6685,
273,
8005,
7901,
2174,
682,
3773,
18,
588,
2174,
682,
1318,
7675,
588,
2174,
682,
7675,
588,
3896,
6685,
... |
if( symbols == null ) { elf.loadSymbols(); symbols = elf.getSymtabSymbols(); dynsyms = elf.getDynamicSymbols(); | if (symbols == null) { elf.loadSymbols(); symbols = elf.getSymtabSymbols(); dynsyms = elf.getDynamicSymbols(); | private void loadSymbols() throws IOException { if( symbols == null ) { elf.loadSymbols(); symbols = elf.getSymtabSymbols(); dynsyms = elf.getDynamicSymbols(); if( symbols.length <= 0 ) symbols = dynsyms; if( dynsyms.length <= 0 ) dynsyms = symbols; } } | 54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/8ab6e1bb4ccf0b14a0ecb1e9d0c9ee6969761f10/ElfHelper.java/buggy/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/ElfHelper.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1262,
14821,
1435,
1216,
1860,
288,
3639,
309,
12,
7963,
422,
446,
262,
540,
288,
5411,
415,
74,
18,
945,
14821,
5621,
5411,
7963,
273,
415,
74,
18,
588,
10876,
1010,
378,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1262,
14821,
1435,
1216,
1860,
288,
3639,
309,
12,
7963,
422,
446,
262,
540,
288,
5411,
415,
74,
18,
945,
14821,
5621,
5411,
7963,
273,
415,
74,
18,
588,
10876,
1010,
378,
14... |
public void visitPostExeNode(Node iVisited) { visit(iVisited); leave(iVisited); } | public void visitPostExeNode(Node iVisited) { visit(iVisited); leave(iVisited); } | public void visitPostExeNode(Node iVisited) { visit(iVisited); leave(iVisited); } | 47273 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47273/d31a76ee29d5978a9bec41e3ac9134cee024bcab/NodeVisitorAdapter.java/buggy/org/jruby/nodes/NodeVisitorAdapter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
3757,
3349,
424,
73,
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
3757,
3349,
424,
73,
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,
-1... |
public CopyAction(Shell shell, Clipboard clipboard, PasteAction pasteAction) { this(shell, clipboard); this.pasteAction = pasteAction; | public CopyAction(Shell shell, Clipboard clipboard) { super(ResourceNavigatorMessages.CopyAction_title); Assert.isNotNull(shell); Assert.isNotNull(clipboard); this.shell = shell; this.clipboard = clipboard; setToolTipText(ResourceNavigatorMessages.CopyAction_toolTip); setId(CopyAction.ID); PlatformUI.getWorkbench().getHelpSystem().setHelp(this, INavigatorHelpContextIds.COPY_ACTION); | public CopyAction(Shell shell, Clipboard clipboard, PasteAction pasteAction) { this(shell, clipboard); this.pasteAction = pasteAction; } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/3ddb4c83644f8072dc9a9075d6ca528af1a36096/CopyAction.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/CopyAction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
5631,
1803,
12,
13220,
5972,
16,
385,
3169,
3752,
20304,
16,
453,
14725,
1803,
19401,
1803,
13,
288,
3639,
333,
12,
10304,
16,
20304,
1769,
3639,
333,
18,
29795,
1803,
273,
19401,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
5631,
1803,
12,
13220,
5972,
16,
385,
3169,
3752,
20304,
16,
453,
14725,
1803,
19401,
1803,
13,
288,
3639,
333,
12,
10304,
16,
20304,
1769,
3639,
333,
18,
29795,
1803,
273,
19401,
1... |
return RubyFixnum.newFixnum(runtime, decodeIntBigEndian(enc)); | return runtime.newFixnum(decodeIntBigEndian(enc)); | public IRubyObject decode(Ruby runtime, PtrList enc) { return RubyFixnum.newFixnum(runtime, decodeIntBigEndian(enc)); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/870e1da9b41bfdbae259e1fc5f18fc8b76686998/Pack.java/buggy/src/org/jruby/util/Pack.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
15908,
10340,
921,
2495,
12,
54,
10340,
3099,
16,
14898,
682,
2446,
13,
288,
7734,
327,
3099,
18,
2704,
8585,
2107,
12,
3922,
1702,
9901,
7583,
12,
1331,
10019,
5411,
289,
2,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
15908,
10340,
921,
2495,
12,
54,
10340,
3099,
16,
14898,
682,
2446,
13,
288,
7734,
327,
3099,
18,
2704,
8585,
2107,
12,
3922,
1702,
9901,
7583,
12,
1331,
10019,
5411,
289,
2,
-100,... |
int ret = Utility.getSourceLine(range.getStart()); if (ret < 0) return 0; return ret; | sourceline = Utility.getSourceLine(range.getStart()); if (sourceline < 0) sourceline = 0; return sourceline; | public int getSourceLine() { // if the kind of join point for which we are a shadow represents // a method or constructor execution, then the best source line is // the one from the enclosingMethod declarationLineNumber if available. Kind kind = getKind(); if ( (kind == MethodExecution) || (kind == ConstructorExecution) || (kind == AdviceExecution) || (kind == StaticInitialization) || (kind == PreInitialization) || (kind == Initialization)) { if (getEnclosingMethod().hasDeclaredLineNumberInfo()) { return getEnclosingMethod().getDeclarationLineNumber(); } } if (range == null) { if (getEnclosingMethod().hasBody()) { return Utility.getSourceLine(getEnclosingMethod().getBody().getStart()); } else { return 0; } } int ret = Utility.getSourceLine(range.getStart()); if (ret < 0) return 0; return ret; } | 53148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/53148/a0c198f33de6031842024b3ef36314420e535632/BcelShadow.java/buggy/weaver/src/org/aspectj/weaver/bcel/BcelShadow.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
7889,
1670,
1435,
288,
377,
202,
759,
309,
326,
3846,
434,
1233,
1634,
364,
1492,
732,
854,
279,
10510,
8686,
377,
202,
759,
279,
707,
578,
3885,
4588,
16,
1508,
326,
3796,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7889,
1670,
1435,
288,
377,
202,
759,
309,
326,
3846,
434,
1233,
1634,
364,
1492,
732,
854,
279,
10510,
8686,
377,
202,
759,
279,
707,
578,
3885,
4588,
16,
1508,
326,
3796,
1... |
private boolean isUsed() { return m_used; | private boolean isUsed(){ return used; | private boolean isUsed() { return m_used; } | 56598 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56598/dba8b183fc1b08e7ad664812bfc0c64d1e4abd3c/ForLoopThatDoesntUseLoopVariableInspection.java/clean/plugins/InspectionGadgets/src/com/siyeh/ig/bugs/ForLoopThatDoesntUseLoopVariableInspection.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
3238,
1250,
353,
6668,
1435,
288,
5411,
327,
312,
67,
3668,
31,
3639,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
540,
3238,
1250,
353,
6668,
1435,
288,
5411,
327,
312,
67,
3668,
31,
3639,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
e.printStackTrace(); fail("There is a problem that is preventing the tests to continue!"); | fail("" + e.getMessage()); | private void runMyTest(String whichTest, String locale){ pageContext.setAttribute(Globals.LOCALE_KEY, new Locale(locale, locale), PageContext.SESSION_SCOPE); request.setAttribute("runTest", whichTest); try { pageContext.forward("/test/org/apache/struts/taglib/html/TestMessagesTag2.jsp"); } catch (Exception e) { e.printStackTrace(); fail("There is a problem that is preventing the tests to continue!"); } } | 48068 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48068/41f313c7dd7ac74b5445118d14aee50b24296729/TestMessagesTag2.java/buggy/src/test/org/apache/struts/taglib/html/TestMessagesTag2.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1086,
12062,
4709,
12,
780,
1492,
4709,
16,
514,
2573,
15329,
377,
202,
2433,
1042,
18,
542,
1499,
12,
19834,
18,
25368,
67,
3297,
16,
394,
6458,
12,
6339,
16,
2573,
3631,
34... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1086,
12062,
4709,
12,
780,
1492,
4709,
16,
514,
2573,
15329,
377,
202,
2433,
1042,
18,
542,
1499,
12,
19834,
18,
25368,
67,
3297,
16,
394,
6458,
12,
6339,
16,
2573,
3631,
34... |
Object data[]; PAToken patoken; data = context.popOperands(1); if (! (data[0] instanceof PAToken)) { throw new PainterException("stopped: wrong arguments"); } patoken = (PAToken) data[0]; if (! (patoken.type == PAToken.PROCEDURE)) { throw new PainterException("stopped: wrong arguments"); } context.engine.process(patoken); context.operands.push(new Boolean(false)); } | Object data[]; data = context.popOperands(5); } | public void execute(PAContext context) throws PainterException { Object data[]; PAToken patoken; data = context.popOperands(1); if (! (data[0] instanceof PAToken)) { throw new PainterException("stopped: wrong arguments"); } patoken = (PAToken) data[0]; if (! (patoken.type == PAToken.PROCEDURE)) { throw new PainterException("stopped: wrong arguments"); } context.engine.process(patoken); context.operands.push(new Boolean(false)); } | 4174 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4174/e5ece9e232e89c196251741f6c4d8dd7986bff20/PAContext.java/buggy/src/com/lowagie/text/pdf/codec/postscript/PAContext.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4202,
1071,
918,
1836,
12,
4066,
1042,
819,
13,
1216,
453,
11606,
503,
288,
3639,
1033,
501,
8526,
31,
3639,
17988,
969,
9670,
969,
31,
3639,
501,
273,
819,
18,
5120,
3542,
5708,
12,
21,
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,
4202,
1071,
918,
1836,
12,
4066,
1042,
819,
13,
1216,
453,
11606,
503,
288,
3639,
1033,
501,
8526,
31,
3639,
17988,
969,
9670,
969,
31,
3639,
501,
273,
819,
18,
5120,
3542,
5708,
12,
21,
176... |
lirh ); | lirh, i); | public void renderLegend( IPrimitiveRenderer ipr, Legend lg, Map htRenderers ) throws ChartException { if ( !lg.isVisible( ) ) // CHECK VISIBILITY { return; } renderBlock( ipr, lg, StructureSource.createLegend( lg ) ); final IDisplayServer xs = getDevice( ).getDisplayServer( ); final double dScale = xs.getDpiResolution( ) / 72d; Bounds bo = lg.getBounds( ).scaledInstance( dScale ); Size sz = null; double dX, dY; if ( lg.getPosition( ) != Position.INSIDE_LITERAL ) { try { sz = lg.getPreferredSize( xs, cm, rtc ); } catch ( Exception ex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, ex ); } sz.scale( dScale ); // USE ANCHOR IN POSITIONING THE LEGEND CLIENT AREA WITHIN THE BLOCK // SLACK SPACE dX = bo.getLeft( ) + ( bo.getWidth( ) - sz.getWidth( ) ) / 2; dY = 0; if ( lg.isSetAnchor( ) ) { int iAnchor = lg.getAnchor( ).getValue( ); // swap west/east if ( isRightToLeft( ) ) { if ( iAnchor == Anchor.EAST ) { iAnchor = Anchor.WEST; } else if ( iAnchor == Anchor.NORTH_EAST ) { iAnchor = Anchor.NORTH_WEST; } else if ( iAnchor == Anchor.SOUTH_EAST ) { iAnchor = Anchor.SOUTH_WEST; } else if ( iAnchor == Anchor.WEST ) { iAnchor = Anchor.EAST; } else if ( iAnchor == Anchor.NORTH_WEST ) { iAnchor = Anchor.NORTH_EAST; } else if ( iAnchor == Anchor.SOUTH_WEST ) { iAnchor = Anchor.SOUTH_EAST; } } switch ( iAnchor ) { case Anchor.NORTH : case Anchor.NORTH_EAST : case Anchor.NORTH_WEST : dY = bo.getTop( ); break; case Anchor.SOUTH : case Anchor.SOUTH_EAST : case Anchor.SOUTH_WEST : dY = bo.getTop( ) + bo.getHeight( ) - sz.getHeight( ); break; default : // CENTERED dY = bo.getTop( ) + ( bo.getHeight( ) - sz.getHeight( ) ) / 2; break; } switch ( iAnchor ) { case Anchor.WEST : case Anchor.NORTH_WEST : dX = bo.getLeft( ); break; case Anchor.EAST : case Anchor.SOUTH_EAST : dX = bo.getLeft( ) + bo.getWidth( ) - sz.getWidth( ); break; default : // CENTERED dX = bo.getLeft( ) + ( bo.getWidth( ) - sz.getWidth( ) ) / 2; break; } } else { dX = bo.getLeft( ) + ( bo.getWidth( ) - sz.getWidth( ) ) / 2; dY = bo.getTop( ) + ( bo.getHeight( ) - sz.getHeight( ) ) / 2; } } else { // USE PREVIOUSLY COMPUTED POSITION IN THE GENERATOR FOR LEGEND // 'INSIDE' PLOT dX = bo.getLeft( ); dY = bo.getTop( ); sz = SizeImpl.create( bo.getWidth( ), bo.getHeight( ) ); } // get cached legend info. final LegendLayoutHints lilh = rtc.getLegendLayoutHints( ); // consider legend title size. Label lgTitle = lg.getTitle( ); double lgTitleWidth = 0, lgTitleHeight = 0; double yOffset = 0, xOffset = 0, wOffset = 0, hOffset = 0; final boolean bRenderLegendTitle = lgTitle != null && lgTitle.isSetVisible( ) && lgTitle.isVisible( ); int iTitlePos = Position.ABOVE; if ( bRenderLegendTitle ) { lgTitle = LabelImpl.copyInstance( lgTitle ); if ( lilh != null ) { // use cached value Size titleSize = lilh.getTitleSize( ); lgTitleWidth = titleSize.getWidth( ); lgTitleHeight = titleSize.getHeight( ); } else { // handle external resource string final String sPreviousValue = lgTitle.getCaption( ).getValue( ); lgTitle.getCaption( ) .setValue( rtc.externalizedMessage( sPreviousValue ) ); BoundingBox bb = null; try { bb = Methods.computeBox( xs, IConstants.ABOVE, lgTitle, 0, 0 ); } catch ( IllegalArgumentException uiex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, uiex ); } lgTitleWidth = bb.getWidth( ); lgTitleHeight = bb.getHeight( ); } iTitlePos = lg.getTitlePosition( ).getValue( ); // swap left/right if ( isRightToLeft( ) ) { if ( iTitlePos == Position.LEFT ) { iTitlePos = Position.RIGHT; } else if ( iTitlePos == Position.RIGHT ) { iTitlePos = Position.LEFT; } } switch ( iTitlePos ) { case Position.ABOVE : yOffset = lgTitleHeight; hOffset = -yOffset; break; case Position.BELOW : hOffset = -lgTitleHeight; break; case Position.LEFT : xOffset = lgTitleWidth; wOffset = -xOffset; break; case Position.RIGHT : wOffset = -lgTitleWidth; break; } } // RENDER THE LEGEND CLIENT AREA final ClientArea ca = lg.getClientArea( ); final Insets lgIns = lg.getInsets( ).scaledInstance( dScale ); LineAttributes lia = ca.getOutline( ); bo = BoundsImpl.create( dX, dY, sz.getWidth( ), sz.getHeight( ) ); bo = bo.adjustedInstance( lgIns ); dX = bo.getLeft( ); dY = bo.getTop( ); // Adjust bounds. bo.delta( xOffset, yOffset, wOffset, hOffset ); dX = bo.getLeft( ); dY = bo.getTop( ); final double dBaseX = dX; final double dBaseY = dY; final RectangleRenderEvent rre = (RectangleRenderEvent) ( (EventObjectCache) ir ).getEventObject( StructureSource.createLegend( lg ), RectangleRenderEvent.class ); // render client area shadow. if ( ca.getShadowColor( ) != null ) { rre.setBounds( bo.translateInstance( 3, 3 ) ); rre.setBackground( ca.getShadowColor( ) ); ipr.fillRectangle( rre ); } // render client area rre.setBounds( bo ); rre.setOutline( lia ); rre.setBackground( ca.getBackground( ) ); ipr.fillRectangle( rre ); ipr.drawRectangle( rre ); lia = LineAttributesImpl.copyInstance( lia ); lia.setVisible( true ); // SEPARATOR LINES MUST BE VISIBLE LineAttributes liSep = lg.getSeparator( ) == null ? lia : lg.getSeparator( ); final SeriesDefinition[] seda = cm.getSeriesForLegend( ); // INITIALIZATION OF VARS USED IN FOLLOWING LOOPS final Orientation o = lg.getOrientation( ); final Direction d = lg.getDirection( ); final Label la = LabelImpl.create( ); la.setCaption( TextImpl.copyInstance( lg.getText( ) ) ); la.getCaption( ).setValue( "X" ); //$NON-NLS-1$ final ITextMetrics itm = xs.getTextMetrics( la ); final double maxWrappingSize = lg.getWrappingSize( ); final double dItemHeight = itm.getFullHeight( ); final double dHorizontalSpacing = 4; final double dVerticalSpacing = 4; double dSeparatorThickness = lia.getThickness( ); Insets insCA = ca.getInsets( ).scaledInstance( dScale ); Series seBase; ArrayList al; LegendItemRenderingHints lirh; Palette pa; int iPaletteCount; EList elPaletteEntries; Fill fPaletteEntry; final boolean bPaletteByCategory = ( cm.getLegend( ) .getItemType( ) .getValue( ) == LegendItemType.CATEGORIES ); // Get available maximum block width/height. Block bl = cm.getBlock( ); Bounds boFull = bl.getBounds( ).scaledInstance( dScale ); Insets ins = bl.getInsets( ).scaledInstance( dScale ); double dMaxX = boFull.getLeft( ) + boFull.getWidth( ) - ins.getRight( ) - lgIns.getRight( ); double dMaxY = boFull.getTop( ) + boFull.getHeight( ) - ins.getBottom( ) - lgIns.getBottom( ); // Calculate if minSlice applicable. String sMinSliceLabel = null; boolean bMinSliceApplied = false; if ( lilh != null ) { // use cached value. sMinSliceLabel = lilh.getMinSliceText( ); bMinSliceApplied = lilh.isMinSliceApplied( ); } else { boolean bMinSliceDefined = false; double dMinSlice = 0; boolean bPercentageMinSlice = false; if ( cm instanceof ChartWithoutAxes ) { bMinSliceDefined = ( (ChartWithoutAxes) cm ).isSetMinSlice( ); dMinSlice = ( (ChartWithoutAxes) cm ).getMinSlice( ); bPercentageMinSlice = ( (ChartWithoutAxes) cm ).isMinSlicePercent( ); sMinSliceLabel = ( (ChartWithoutAxes) cm ).getMinSliceLabel( ); if ( sMinSliceLabel == null || sMinSliceLabel.length( ) == 0 ) { sMinSliceLabel = IConstants.UNDEFINED_STRING; } else { sMinSliceLabel = rtc.externalizedMessage( sMinSliceLabel ); } } // calculate if need an extra legend item when minSlice defined. if ( bMinSliceDefined && bPaletteByCategory && cm instanceof ChartWithoutAxes ) { if ( !( (ChartWithoutAxes) cm ).getSeriesDefinitions( ) .isEmpty( ) ) { // OK TO ASSUME THAT 1 BASE SERIES DEFINITION EXISTS SeriesDefinition sdBase = (SeriesDefinition) ( (ChartWithoutAxes) cm ).getSeriesDefinitions( ) .get( 0 ); SeriesDefinition[] sdOrtho = (SeriesDefinition[]) sdBase.getSeriesDefinitions( ) .toArray( ); DataSetIterator dsiOrtho = null; double dCurrentMinSlice = 0; for ( int i = 0; i < sdOrtho.length && !bMinSliceApplied; i++ ) { try { dsiOrtho = new DataSetIterator( ( (Series) sdOrtho[i].getRunTimeSeries( ) .get( 0 ) ).getDataSet( ) ); } catch ( Exception ex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, ex ); } // TODO Check dataset type, throw exception or ignore?. if ( bPercentageMinSlice ) { double total = 0; while ( dsiOrtho.hasNext( ) ) { Object obj = dsiOrtho.next( ); if ( obj instanceof Number ) { total += ( (Number) obj ).doubleValue( ); } } dsiOrtho.reset( ); dCurrentMinSlice = total * dMinSlice / 100d; } else { dCurrentMinSlice = dMinSlice; } while ( dsiOrtho.hasNext( ) ) { Object obj = dsiOrtho.next( ); if ( obj instanceof Number ) { double val = ( (Number) obj ).doubleValue( ); if ( val < dCurrentMinSlice ) { bMinSliceApplied = true; break; } } } } } } } // COMPUTATIONS HERE MUST BE IN SYNC WITH THE ACTUAL RENDERER if ( o.getValue( ) == Orientation.VERTICAL ) { double dXOffset = 0, dMaxW = 0; if ( bPaletteByCategory ) { SeriesDefinition sdBase = null; FormatSpecifier fs = null; if ( cm instanceof ChartWithAxes ) { // ONLY SUPPORT 1 BASE AXIS FOR NOW final Axis axPrimaryBase = ( (ChartWithAxes) cm ).getBaseAxes( )[0]; if ( axPrimaryBase.getSeriesDefinitions( ).isEmpty( ) ) { // NOTHING TO RENDER (BASE AXIS HAS NO SERIES // DEFINITIONS) return; } // OK TO ASSUME THAT 1 BASE SERIES DEFINITION EXISTS sdBase = (SeriesDefinition) axPrimaryBase.getSeriesDefinitions( ) .get( 0 ); } else if ( cm instanceof ChartWithoutAxes ) { if ( ( (ChartWithoutAxes) cm ).getSeriesDefinitions( ) .isEmpty( ) ) { // NOTHING TO RENDER (BASE AXIS HAS NO SERIES // DEFINITIONS) return; } // OK TO ASSUME THAT 1 BASE SERIES DEFINITION EXISTS sdBase = (SeriesDefinition) ( (ChartWithoutAxes) cm ).getSeriesDefinitions( ) .get( 0 ); } // OK TO ASSUME THAT 1 BASE RUNTIME SERIES EXISTS seBase = (Series) sdBase.getRunTimeSeries( ).get( 0 ); pa = sdBase.getSeriesPalette( ); elPaletteEntries = pa.getEntries( ); iPaletteCount = elPaletteEntries.size( ); if ( lilh != null && lilh.getLegendItemHints( ) != null ) { // use cached value LegendItemHints[] liha = lilh.getLegendItemHints( ); LegendItemHints lih; Map columnCache = searchMaxColumnWidth( liha ); for ( int i = 0; i < liha.length; i++ ) { // render each legend item. lih = liha[i]; if ( ( lih.getType( ) & IConstants.LEGEND_ENTRY ) == IConstants.LEGEND_ENTRY ) { la.getCaption( ).setValue( lih.getText( ) ); // CYCLE THROUGH THE PALETTE fPaletteEntry = (Fill) elPaletteEntries.get( lih.getCategoryIndex( ) % iPaletteCount ); lirh = (LegendItemRenderingHints) htRenderers.get( seBase ); double columnWidth = bo.getWidth( ); Double cachedWidth = (Double) columnCache.get( lih ); if ( cachedWidth != null ) { columnWidth = cachedWidth.doubleValue( ) + 3 * dItemHeight / 2 + 2 * insCA.getLeft( ); } renderLegendItem( ipr, lg, la, null, dBaseX + lih.getLeft( ), dBaseY + lih.getTop( ) + insCA.getTop( ), lih.getWidth( ), dItemHeight, lih.getHeight( ), 0, columnWidth, insCA.getLeft( ), dHorizontalSpacing, seBase, fPaletteEntry, lirh ); } } } else { DataSetIterator dsiBase = null; try { dsiBase = new DataSetIterator( seBase.getDataSet( ) ); } catch ( Exception ex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, ex ); } if ( sdBase != null ) { fs = sdBase.getFormatSpecifier( ); } int i = 0; while ( dsiBase.hasNext( ) ) { Object obj = dsiBase.next( ); // TODO filter the not-used legend. // render legend item. dY += insCA.getTop( ); String lgtext = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, getRunTimeContext( ).getULocale( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } la.getCaption( ).setValue( lgtext ); itm.reuse( la, maxWrappingSize ); // RECYCLED fPaletteEntry = (Fill) elPaletteEntries.get( i++ % iPaletteCount ); // CYCLE THROUGH THE PALETTE lirh = (LegendItemRenderingHints) htRenderers.get( seBase ); if ( dY + itm.getFullHeight( ) + insCA.getBottom( ) > dMaxY ) { dXOffset += dMaxW + insCA.getLeft( ) + insCA.getRight( ) + ( 3 * dItemHeight ) / 2 + dHorizontalSpacing; dMaxW = 0; dY = bo.getTop( ) + insCA.getTop( ); dX = bo.getLeft( ) + dXOffset; } dMaxW = Math.max( dMaxW, itm.getFullWidth( ) ); renderLegendItem( ipr, lg, la, null, dX, dY, itm.getFullWidth( ), dItemHeight, itm.getFullHeight( ), 0, bo.getWidth( ), insCA.getLeft( ), dHorizontalSpacing, seBase, fPaletteEntry, lirh ); dY += itm.getFullHeight( ) + insCA.getBottom( ); } // render the extra MinSlice legend item if applicable. if ( bMinSliceApplied ) { dY += insCA.getTop( ); la.getCaption( ).setValue( sMinSliceLabel ); itm.reuse( la, maxWrappingSize ); // RECYCLED fPaletteEntry = (Fill) elPaletteEntries.get( dsiBase.size( ) % iPaletteCount ); // CYCLE THROUGH THE PALETTE lirh = (LegendItemRenderingHints) htRenderers.get( seBase ); if ( dY + itm.getFullHeight( ) + insCA.getBottom( ) > dMaxY ) { dXOffset += dMaxW + insCA.getLeft( ) + insCA.getRight( ) + ( 3 * dItemHeight ) / 2 + dHorizontalSpacing; dMaxW = 0; dY = bo.getTop( ) + insCA.getTop( ); dX = bo.getLeft( ) + dXOffset; } dMaxW = Math.max( dMaxW, itm.getFullWidth( ) ); renderLegendItem( ipr, lg, la, null, dX, dY, itm.getFullWidth( ), dItemHeight, itm.getFullHeight( ), 0, bo.getWidth( ), insCA.getLeft( ), dHorizontalSpacing, seBase, fPaletteEntry, lirh ); dY += itm.getFullHeight( ) + insCA.getBottom( ); } } } else if ( d.getValue( ) == Direction.TOP_BOTTOM ) { if ( lilh != null && lilh.getLegendItemHints( ) != null ) { LegendItemHints[] liha = lilh.getLegendItemHints( ); LegendItemHints lih; int k = 0; Map columnCache = searchMaxColumnWidth( liha ); for ( int j = 0; j < seda.length; j++ ) { al = seda[j].getRunTimeSeries( ); pa = seda[j].getSeriesPalette( ); elPaletteEntries = pa.getEntries( ); iPaletteCount = elPaletteEntries.size( ); for ( int i = 0; i < al.size( ); i++ ) { seBase = (Series) al.get( i ); lirh = (LegendItemRenderingHints) htRenderers.get( seBase ); lih = liha[k++]; if ( lih.getType( ) == IConstants.LEGEND_ENTRY ) { la.getCaption( ).setValue( lih.getText( ) ); Label valueLa = null; if ( lg.isShowValue( ) ) { valueLa = LabelImpl.copyInstance( seBase.getLabel( ) ); valueLa.getCaption( ) .setValue( lih.getExtraText( ) ); } // CYCLE THROUGH THE PALETTE fPaletteEntry = (Fill) elPaletteEntries.get( i % iPaletteCount ); double columnWidth = bo.getWidth( ); Double cachedWidth = (Double) columnCache.get( lih ); if ( cachedWidth != null ) { columnWidth = cachedWidth.doubleValue( ) + 3 * dItemHeight / 2 + 2 * insCA.getLeft( ); } renderLegendItem( ipr, lg, la, valueLa, dBaseX + lih.getLeft( ), dBaseY + lih.getTop( ) + insCA.getTop( ), lih.getWidth( ), dItemHeight, lih.getHeight( ), lih.getExtraHeight( ), columnWidth, insCA.getLeft( ), dHorizontalSpacing, seBase, fPaletteEntry, lirh ); } } if ( j < seda.length - 1 ) { lih = liha[k]; if ( lih.getType( ) == IConstants.LEGEND_SEPERATOR ) { k++; renderSeparator( ipr, lg, liSep, dBaseX + lih.getLeft( ), dBaseY + lih.getTop( ), lih.getWidth( ), Orientation.HORIZONTAL_LITERAL ); } } } } else { dSeparatorThickness += dVerticalSpacing; for ( int j = 0; j < seda.length; j++ ) { al = seda[j].getRunTimeSeries( ); pa = seda[j].getSeriesPalette( ); elPaletteEntries = pa.getEntries( ); iPaletteCount = elPaletteEntries.size( ); FormatSpecifier fs = seda[j].getFormatSpecifier( ); for ( int i = 0; i < al.size( ); i++ ) { seBase = (Series) al.get( i ); lirh = (LegendItemRenderingHints) htRenderers.get( seBase ); dY += insCA.getTop( ); Object obj = seBase.getSeriesIdentifier( ); String lgtext = rtc.externalizedMessage( String.valueOf( obj ) ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, getRunTimeContext( ).getULocale( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } la.getCaption( ).setValue( lgtext ); itm.reuse( la, maxWrappingSize ); // RECYCLED double dFWidth = itm.getFullWidth( ); double dFHeight = itm.getFullHeight( ); Label valueLa = null; double valueHeight = 0; if ( lg.isShowValue( ) ) { DataSetIterator dsiBase = null; try { dsiBase = new DataSetIterator( seBase.getDataSet( ) ); } catch ( Exception ex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, ex ); } // Use first value for each series. if ( dsiBase.hasNext( ) ) { obj = dsiBase.next( ); String valueText = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, ULocale.getDefault( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } valueLa = LabelImpl.copyInstance( seBase.getLabel( ) ); valueLa.getCaption( ).setValue( valueText ); itm.reuse( valueLa ); dFWidth = Math.max( dFWidth, itm.getFullWidth( ) ); valueHeight = itm.getFullHeight( ); } } if ( dY + dFHeight + valueHeight + 2 + insCA.getBottom( ) > dMaxY ) { dXOffset += dMaxW + insCA.getLeft( ) + insCA.getRight( ) + ( 3 * dItemHeight ) / 2 + dHorizontalSpacing; dMaxW = 0; dY = bo.getTop( ) + insCA.getTop( ); dX = bo.getLeft( ) + dXOffset; } dMaxW = Math.max( dMaxW, dFWidth ); fPaletteEntry = (Fill) elPaletteEntries.get( i % iPaletteCount ); // CYCLE THROUGH THE // PALETTE renderLegendItem( ipr, lg, la, valueLa, dX, dY, dFWidth, dItemHeight, dFHeight, valueHeight, bo.getWidth( ), insCA.getLeft( ), dHorizontalSpacing, seBase, fPaletteEntry, lirh ); dY += dFHeight + insCA.getBottom( ) + valueHeight + 2; } if ( j < seda.length - 1 ) { renderSeparator( ipr, lg, liSep, dX, dY + dSeparatorThickness / 2, dMaxW + insCA.getLeft( ) + insCA.getRight( ) + ( 3 * dItemHeight ) / 2, Orientation.HORIZONTAL_LITERAL ); dY += dSeparatorThickness; } } } } else if ( d.getValue( ) == Direction.LEFT_RIGHT ) { if ( lilh != null && lilh.getLegendItemHints( ) != null ) { LegendItemHints[] liha = lilh.getLegendItemHints( ); LegendItemHints lih; int k = 0; Map columnCache = searchMaxColumnWidth( liha ); for ( int j = 0; j < seda.length; j++ ) { al = seda[j].getRunTimeSeries( ); pa = seda[j].getSeriesPalette( ); elPaletteEntries = pa.getEntries( ); iPaletteCount = elPaletteEntries.size( ); for ( int i = 0; i < al.size( ); i++ ) { seBase = (Series) al.get( i ); lirh = (LegendItemRenderingHints) htRenderers.get( seBase ); lih = liha[k++]; if ( lih.getType( ) == IConstants.LEGEND_ENTRY ) { la.getCaption( ).setValue( lih.getText( ) ); Label valueLa = null; if ( lg.isShowValue( ) ) { valueLa = LabelImpl.copyInstance( seBase.getLabel( ) ); valueLa.getCaption( ) .setValue( lih.getExtraText( ) ); } // CYCLE THROUGH THE PALETTE fPaletteEntry = (Fill) elPaletteEntries.get( i % iPaletteCount ); double columnWidth = bo.getWidth( ); Double cachedWidth = (Double) columnCache.get( lih ); if ( cachedWidth != null ) { columnWidth = cachedWidth.doubleValue( ) + 3 * dItemHeight / 2 + 2 * insCA.getLeft( ); } renderLegendItem( ipr, lg, la, valueLa, dBaseX + lih.getLeft( ), dBaseY + lih.getTop( ) + insCA.getTop( ), lih.getWidth( ), dItemHeight, lih.getHeight( ), lih.getExtraHeight( ), columnWidth, insCA.getLeft( ), dHorizontalSpacing, seBase, fPaletteEntry, lirh ); } } if ( j < seda.length - 1 ) { lih = liha[k]; if ( lih.getType( ) == IConstants.LEGEND_SEPERATOR ) { k++; renderSeparator( ipr, lg, liSep, dBaseX + lih.getLeft( ), dBaseY + lih.getTop( ), bo.getHeight( ), Orientation.VERTICAL_LITERAL ); } } } } else { dSeparatorThickness += dHorizontalSpacing; for ( int j = 0; j < seda.length; j++ ) { dMaxW = 0; al = seda[j].getRunTimeSeries( ); pa = seda[j].getSeriesPalette( ); elPaletteEntries = pa.getEntries( ); iPaletteCount = elPaletteEntries.size( ); FormatSpecifier fs = seda[j].getFormatSpecifier( ); for ( int i = 0; i < al.size( ); i++ ) { dY += insCA.getTop( ); seBase = (Series) al.get( i ); lirh = (LegendItemRenderingHints) htRenderers.get( seBase ); Object obj = seBase.getSeriesIdentifier( ); String lgtext = rtc.externalizedMessage( String.valueOf( obj ) ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, getRunTimeContext( ).getULocale( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } la.getCaption( ).setValue( lgtext ); itm.reuse( la, maxWrappingSize ); // RECYCLED double dFWidth = itm.getFullWidth( ); double dFHeight = itm.getFullHeight( ); Label valueLa = null; double valueHeight = 0; if ( lg.isShowValue( ) ) { DataSetIterator dsiBase = null; try { dsiBase = new DataSetIterator( seBase.getDataSet( ) ); } catch ( Exception ex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, ex ); } // Use first value for each series. if ( dsiBase.hasNext( ) ) { obj = dsiBase.next( ); String valueText = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, ULocale.getDefault( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } valueLa = LabelImpl.copyInstance( seBase.getLabel( ) ); valueLa.getCaption( ).setValue( valueText ); itm.reuse( valueLa ); dFWidth = Math.max( dFWidth, itm.getFullWidth( ) ); valueHeight = itm.getFullHeight( ); } } if ( dY + dFHeight + valueHeight + 2 + insCA.getBottom( ) > dMaxY ) { dXOffset += dMaxW + insCA.getLeft( ) + insCA.getRight( ) + ( 3 * dItemHeight ) / 2 + dHorizontalSpacing; dMaxW = 0; dY = bo.getTop( ); dX = bo.getLeft( ) + dXOffset; } dMaxW = Math.max( dMaxW, dFWidth ); fPaletteEntry = (Fill) elPaletteEntries.get( i % iPaletteCount ); // CYCLE THROUGH THE // PALETTE renderLegendItem( ipr, lg, la, valueLa, dX, dY, dFWidth, dItemHeight, dFHeight, valueHeight, bo.getWidth( ), insCA.getLeft( ), dHorizontalSpacing, seBase, fPaletteEntry, lirh ); dY += dFHeight + insCA.getBottom( ) + valueHeight + 2; } // LEFT INSETS + LEGEND ITEM WIDTH + HORIZONTAL SPACING // + // MAX ITEM WIDTH + RIGHT INSETS dXOffset += insCA.getLeft( ) + ( 3 * dItemHeight / 2 ) + dHorizontalSpacing + dMaxW + insCA.getRight( ); dX += insCA.getLeft( ) + ( 3 * dItemHeight / 2 ) + dHorizontalSpacing + dMaxW + insCA.getRight( ); dY = bo.getTop( ); // SETUP VERTICAL SEPARATOR SPACING if ( j < seda.length - 1 ) { renderSeparator( ipr, lg, liSep, dX + dSeparatorThickness / 2, dY, bo.getHeight( ), Orientation.VERTICAL_LITERAL ); dX += dSeparatorThickness; } } } } else { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, "exception.illegal.legend.direction", //$NON-NLS-1$ new Object[]{ d.getName( ) }, ResourceBundle.getBundle( Messages.ENGINE, rtc.getLocale( ) ) ); } } else if ( o.getValue( ) == Orientation.HORIZONTAL ) { double dYOffset = 0, dMaxH = 0; if ( bPaletteByCategory ) { SeriesDefinition sdBase = null; FormatSpecifier fs = null; if ( cm instanceof ChartWithAxes ) { // ONLY SUPPORT 1 BASE AXIS FOR NOW final Axis axPrimaryBase = ( (ChartWithAxes) cm ).getBaseAxes( )[0]; if ( axPrimaryBase.getSeriesDefinitions( ).isEmpty( ) ) { // NOTHING TO RENDER (BASE AXIS HAS NO SERIES // DEFINITIONS) return; } // OK TO ASSUME THAT 1 BASE SERIES DEFINITION EXISTS sdBase = (SeriesDefinition) axPrimaryBase.getSeriesDefinitions( ) .get( 0 ); } else if ( cm instanceof ChartWithoutAxes ) { if ( ( (ChartWithoutAxes) cm ).getSeriesDefinitions( ) .isEmpty( ) ) { // NOTHING TO RENDER (BASE AXIS HAS NO SERIES // DEFINITIONS) return; } // OK TO ASSUME THAT 1 BASE SERIES DEFINITION EXISTS sdBase = (SeriesDefinition) ( (ChartWithoutAxes) cm ).getSeriesDefinitions( ) .get( 0 ); } // OK TO ASSUME THAT 1 BASE RUNTIME SERIES EXISTS seBase = (Series) sdBase.getRunTimeSeries( ).get( 0 ); pa = sdBase.getSeriesPalette( ); elPaletteEntries = pa.getEntries( ); iPaletteCount = elPaletteEntries.size( ); if ( lilh != null && lilh.getLegendItemHints( ) != null ) { // use cached value LegendItemHints[] liha = lilh.getLegendItemHints( ); LegendItemHints lih; for ( int i = 0; i < liha.length; i++ ) { // render each legend item. lih = liha[i]; if ( ( lih.getType( ) & IConstants.LEGEND_ENTRY ) == IConstants.LEGEND_ENTRY ) { la.getCaption( ).setValue( lih.getText( ) ); // CYCLE THROUGH THE PALETTE fPaletteEntry = (Fill) elPaletteEntries.get( lih.getCategoryIndex( ) % iPaletteCount ); lirh = (LegendItemRenderingHints) htRenderers.get( seBase ); renderLegendItem( ipr, lg, la, null, dBaseX + lih.getLeft( ), dBaseY + lih.getTop( ) + insCA.getTop( ), lih.getWidth( ), dItemHeight, lih.getHeight( ), 0, lih.getWidth( ) + 3 * dItemHeight / 2 + 2 * insCA.getLeft( ), insCA.getLeft( ), dHorizontalSpacing, seBase, fPaletteEntry, lirh ); } } } else { DataSetIterator dsiBase = null; try { dsiBase = new DataSetIterator( seBase.getDataSet( ) ); } catch ( Exception ex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, ex ); } if ( sdBase != null ) { fs = sdBase.getFormatSpecifier( ); } int i = 0; double dFullWidth = 0; dY += insCA.getTop( ); while ( dsiBase.hasNext( ) ) { Object obj = dsiBase.next( ); // TODO filter the not-used legend. dX += insCA.getLeft( ); String lgtext = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, getRunTimeContext( ).getULocale( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } la.getCaption( ).setValue( lgtext ); itm.reuse( la, maxWrappingSize ); // RECYCLED fPaletteEntry = (Fill) elPaletteEntries.get( i++ % iPaletteCount ); // CYCLE THROUGH THE PALETTE lirh = (LegendItemRenderingHints) htRenderers.get( seBase ); dFullWidth = itm.getFullWidth( ); if ( dX + dFullWidth + ( 3 * dItemHeight ) / 2 + insCA.getRight( ) > dMaxX ) { dYOffset += dMaxH + insCA.getTop( ) + insCA.getBottom( ) + dVerticalSpacing; dMaxH = 0; dX = bo.getLeft( ) + insCA.getLeft( ); dY = bo.getTop( ) + insCA.getTop( ) + dYOffset; } dMaxH = Math.max( dMaxH, itm.getFullHeight( ) ); renderLegendItem( ipr, lg, la, null, dX, dY, dFullWidth, dItemHeight, itm.getFullHeight( ), 0, dFullWidth + 3 * dItemHeight / 2 + 2 * insCA.getLeft( ), insCA.getLeft( ), dHorizontalSpacing, seBase, fPaletteEntry, lirh ); dX += dFullWidth + ( 3 * dItemHeight ) / 2 + insCA.getRight( ); } // render the extra MinSlice legend item if applicable. if ( bMinSliceApplied ) { dX += insCA.getLeft( ); la.getCaption( ).setValue( sMinSliceLabel ); itm.reuse( la, maxWrappingSize ); // RECYCLED fPaletteEntry = (Fill) elPaletteEntries.get( dsiBase.size( ) % iPaletteCount ); // CYCLE THROUGH THE PALETTE lirh = (LegendItemRenderingHints) htRenderers.get( seBase ); dFullWidth = itm.getFullWidth( ); if ( dX + dFullWidth + ( 3 * dItemHeight ) / 2 + insCA.getRight( ) > dMaxX ) { dYOffset += dMaxH + insCA.getTop( ) + insCA.getBottom( ) + dVerticalSpacing; dMaxH = 0; dX = bo.getLeft( ) + insCA.getLeft( ); dY = bo.getTop( ) + insCA.getTop( ) + dYOffset; } dMaxH = Math.max( dMaxH, itm.getFullHeight( ) ); renderLegendItem( ipr, lg, la, null, dX, dY, dFullWidth, dItemHeight, itm.getFullHeight( ), 0, dFullWidth + 3 * dItemHeight / 2 + 2 * insCA.getLeft( ), insCA.getLeft( ), dHorizontalSpacing, seBase, fPaletteEntry, lirh ); dX += dFullWidth + ( 3 * dItemHeight ) / 2 + insCA.getRight( ); } } } else if ( d.getValue( ) == Direction.TOP_BOTTOM ) { if ( lilh != null && lilh.getLegendItemHints( ) != null ) { LegendItemHints[] liha = lilh.getLegendItemHints( ); LegendItemHints lih; int k = 0; for ( int j = 0; j < seda.length; j++ ) { al = seda[j].getRunTimeSeries( ); pa = seda[j].getSeriesPalette( ); elPaletteEntries = pa.getEntries( ); iPaletteCount = elPaletteEntries.size( ); for ( int i = 0; i < al.size( ); i++ ) { seBase = (Series) al.get( i ); lirh = (LegendItemRenderingHints) htRenderers.get( seBase ); lih = liha[k++]; if ( lih.getType( ) == IConstants.LEGEND_ENTRY ) { la.getCaption( ).setValue( lih.getText( ) ); Label valueLa = null; if ( lg.isShowValue( ) ) { valueLa = LabelImpl.copyInstance( seBase.getLabel( ) ); valueLa.getCaption( ) .setValue( lih.getExtraText( ) ); } // CYCLE THROUGH THE PALETTE fPaletteEntry = (Fill) elPaletteEntries.get( i % iPaletteCount ); renderLegendItem( ipr, lg, la, valueLa, dBaseX + lih.getLeft( ), dBaseY + lih.getTop( ) + insCA.getTop( ), lih.getWidth( ), dItemHeight, lih.getHeight( ), lih.getExtraHeight( ), lih.getWidth( ) + 3 * dItemHeight / 2 + 2 * insCA.getLeft( ), insCA.getLeft( ), dHorizontalSpacing, seBase, fPaletteEntry, lirh ); } } if ( j < seda.length - 1 ) { lih = liha[k]; if ( lih.getType( ) == IConstants.LEGEND_SEPERATOR ) { k++; renderSeparator( ipr, lg, liSep, dBaseX + lih.getLeft( ), dBaseY + lih.getTop( ), bo.getWidth( ), Orientation.HORIZONTAL_LITERAL ); } } } } else { dSeparatorThickness += dVerticalSpacing; for ( int j = 0; j < seda.length; j++ ) { dMaxH = 0; dY += insCA.getTop( ); dX = bo.getLeft( ) + insCA.getLeft( ); al = seda[j].getRunTimeSeries( ); pa = seda[j].getSeriesPalette( ); elPaletteEntries = pa.getEntries( ); iPaletteCount = elPaletteEntries.size( ); FormatSpecifier fs = seda[j].getFormatSpecifier( ); for ( int i = 0; i < al.size( ); i++ ) { seBase = (Series) al.get( i ); lirh = (LegendItemRenderingHints) htRenderers.get( seBase ); Object obj = seBase.getSeriesIdentifier( ); String lgtext = rtc.externalizedMessage( String.valueOf( obj ) ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, getRunTimeContext( ).getULocale( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } la.getCaption( ).setValue( lgtext ); itm.reuse( la, maxWrappingSize ); // RECYCLED double dFWidth = itm.getFullWidth( ); double dFHeight = itm.getFullHeight( ); Label valueLa = null; double valueHeight = 0; if ( lg.isShowValue( ) ) { DataSetIterator dsiBase = null; try { dsiBase = new DataSetIterator( seBase.getDataSet( ) ); } catch ( Exception ex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, ex ); } // Use first value for each series. if ( dsiBase.hasNext( ) ) { obj = dsiBase.next( ); String valueText = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, ULocale.getDefault( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } valueLa = LabelImpl.copyInstance( seBase.getLabel( ) ); valueLa.getCaption( ).setValue( valueText ); itm.reuse( valueLa ); dFWidth = Math.max( dFWidth, itm.getFullWidth( ) ); valueHeight = itm.getFullHeight( ); } } if ( dX + insCA.getLeft( ) + dFWidth + ( 3 * dItemHeight ) / 2 + insCA.getRight( ) > dMaxX ) { dYOffset += dMaxH + insCA.getTop( ) + insCA.getBottom( ) + dVerticalSpacing; dMaxH = 0; dX = bo.getLeft( ) + insCA.getLeft( ); dY = bo.getTop( ) + insCA.getTop( ) + dYOffset; } dMaxH = Math.max( dMaxH, dFHeight + valueHeight + 2 ); fPaletteEntry = (Fill) elPaletteEntries.get( i % iPaletteCount ); // CYCLE THROUGH THE // PALETTE renderLegendItem( ipr, lg, la, valueLa, dX, dY, dFWidth, dItemHeight, dFHeight, valueHeight, dFWidth + 3 * dItemHeight / 2 + 2 * insCA.getLeft( ), insCA.getLeft( ), dHorizontalSpacing, seBase, fPaletteEntry, lirh ); // LEFT INSETS + LEGEND ITEM WIDTH + HORIZONTAL // SPACING // + MAX ITEM WIDTH + RIGHT INSETS dX += insCA.getLeft( ) + ( 3 * dItemHeight ) / 2 + dFWidth + insCA.getRight( ); } dYOffset += insCA.getTop( ) + insCA.getBottom( ) + dMaxH + dVerticalSpacing; dY += insCA.getTop( ) + insCA.getBottom( ) + dMaxH + dVerticalSpacing; dX = bo.getLeft( ) + insCA.getLeft( ); // SETUP HORIZONTAL SEPARATOR SPACING if ( j < seda.length - 1 ) { renderSeparator( ipr, lg, liSep, dX, dY + dSeparatorThickness / 2, bo.getWidth( ), Orientation.HORIZONTAL_LITERAL ); dY += dSeparatorThickness; } } } } else if ( d.getValue( ) == Direction.LEFT_RIGHT ) { if ( lilh != null && lilh.getLegendItemHints( ) != null ) { LegendItemHints[] liha = lilh.getLegendItemHints( ); LegendItemHints lih; int k = 0; for ( int j = 0; j < seda.length; j++ ) { al = seda[j].getRunTimeSeries( ); pa = seda[j].getSeriesPalette( ); elPaletteEntries = pa.getEntries( ); iPaletteCount = elPaletteEntries.size( ); for ( int i = 0; i < al.size( ); i++ ) { seBase = (Series) al.get( i ); lirh = (LegendItemRenderingHints) htRenderers.get( seBase ); lih = liha[k++]; if ( lih.getType( ) == IConstants.LEGEND_ENTRY ) { la.getCaption( ).setValue( lih.getText( ) ); Label valueLa = null; if ( lg.isShowValue( ) ) { valueLa = LabelImpl.copyInstance( seBase.getLabel( ) ); valueLa.getCaption( ) .setValue( lih.getExtraText( ) ); } // CYCLE THROUGH THE PALETTE fPaletteEntry = (Fill) elPaletteEntries.get( i % iPaletteCount ); renderLegendItem( ipr, lg, la, valueLa, dBaseX + lih.getLeft( ), dBaseY + lih.getTop( ) + insCA.getTop( ), lih.getWidth( ), dItemHeight, lih.getHeight( ), lih.getExtraHeight( ), lih.getWidth( ) + 3 * dItemHeight / 2 + 2 * insCA.getLeft( ), insCA.getLeft( ), dHorizontalSpacing, seBase, fPaletteEntry, lirh ); } } if ( j < seda.length - 1 ) { lih = liha[k]; if ( lih.getType( ) == IConstants.LEGEND_SEPERATOR ) { k++; renderSeparator( ipr, lg, liSep, dBaseX + lih.getLeft( ), dBaseY + lih.getTop( ), lih.getHeight( ), Orientation.VERTICAL_LITERAL ); } } } } else { dSeparatorThickness += dHorizontalSpacing; dX += insCA.getLeft( ); dY += insCA.getTop( ); for ( int j = 0; j < seda.length; j++ ) { al = seda[j].getRunTimeSeries( ); pa = seda[j].getSeriesPalette( ); elPaletteEntries = pa.getEntries( ); iPaletteCount = elPaletteEntries.size( ); FormatSpecifier fs = seda[j].getFormatSpecifier( ); for ( int i = 0; i < al.size( ); i++ ) { seBase = (Series) al.get( i ); lirh = (LegendItemRenderingHints) htRenderers.get( seBase ); Object obj = seBase.getSeriesIdentifier( ); String lgtext = rtc.externalizedMessage( String.valueOf( obj ) ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, getRunTimeContext( ).getULocale( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } la.getCaption( ).setValue( lgtext ); itm.reuse( la, maxWrappingSize ); // RECYCLED double dFWidth = itm.getFullWidth( ); double dFHeight = itm.getFullHeight( ); Label valueLa = null; double valueHeight = 0; if ( lg.isShowValue( ) ) { DataSetIterator dsiBase = null; try { dsiBase = new DataSetIterator( seBase.getDataSet( ) ); } catch ( Exception ex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, ex ); } // Use first value for each series. if ( dsiBase.hasNext( ) ) { obj = dsiBase.next( ); String valueText = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, ULocale.getDefault( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } valueLa = LabelImpl.copyInstance( seBase.getLabel( ) ); valueLa.getCaption( ).setValue( valueText ); itm.reuse( valueLa ); dFWidth = Math.max( dFWidth, itm.getFullWidth( ) ); valueHeight = itm.getFullHeight( ); } } if ( dX + insCA.getLeft( ) + dFWidth + ( 3 * dItemHeight ) / 2 + insCA.getRight( ) > dMaxX ) { dYOffset += dMaxH + insCA.getTop( ) + insCA.getBottom( ) + dVerticalSpacing; dMaxH = 0; dX = bo.getLeft( ) + insCA.getLeft( ); dY = bo.getTop( ) + dYOffset; } dMaxH = Math.max( dMaxH, dFHeight + valueHeight + 2 ); fPaletteEntry = (Fill) elPaletteEntries.get( i % iPaletteCount ); // CYCLE THROUGH THE // PALETTE renderLegendItem( ipr, lg, la, valueLa, dX, dY, dFWidth, dItemHeight, dFHeight, valueHeight, dFWidth + 3 * dItemHeight / 2 + 2 * insCA.getLeft( ), insCA.getLeft( ), dHorizontalSpacing, seBase, fPaletteEntry, lirh ); // LEFT INSETS + LEGEND ITEM WIDTH + HORIZONTAL // SPACING // + MAX ITEM WIDTH + RIGHT INSETS dX += insCA.getLeft( ) + ( 3 * dItemHeight ) / 2 + dHorizontalSpacing + dFWidth + insCA.getRight( ); } // SETUP VERTICAL SEPARATOR SPACING if ( j < seda.length - 1 ) { renderSeparator( ipr, lg, liSep, dX + dSeparatorThickness / 2, dY, dMaxH, Orientation.VERTICAL_LITERAL ); dX += dSeparatorThickness; } } } } else { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, "exception.illegal.legend.direction", //$NON-NLS-1$ new Object[]{ d.getName( ) }, ResourceBundle.getBundle( Messages.ENGINE, rtc.getLocale( ) ) ); // i18n_CONCATENATIONS_REMOVED } } else { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, "exception.illegal.legend.orientation", //$NON-NLS-1$ new Object[]{ o.getName( ) }, ResourceBundle.getBundle( Messages.ENGINE, rtc.getLocale( ) ) ); } // Render legend title if defined. if ( bRenderLegendTitle ) { double lX = bo.getLeft( ); double lY = bo.getTop( ); switch ( iTitlePos ) { case Position.ABOVE : lX = bo.getLeft( ) + ( bo.getWidth( ) - lgTitleWidth ) / 2d; lY = bo.getTop( ) - lgTitleHeight; break; case Position.BELOW : lX = bo.getLeft( ) + ( bo.getWidth( ) - lgTitleWidth ) / 2d; lY = bo.getTop( ) + bo.getHeight( ); break; case Position.LEFT : lX = bo.getLeft( ) - lgTitleWidth; lY = bo.getTop( ) + ( bo.getHeight( ) - lgTitleHeight ) / 2d; break; case Position.RIGHT : lX = bo.getLeft( ) + bo.getWidth( ); lY = bo.getTop( ) + ( bo.getHeight( ) - lgTitleHeight ) / 2d; break; } final TextRenderEvent tre = (TextRenderEvent) ( (EventObjectCache) ir ).getEventObject( WrappedStructureSource.createLegendTitle( lg, lgTitle ), TextRenderEvent.class ); tre.setBlockBounds( BoundsImpl.create( lX, lY, lgTitleWidth, lgTitleHeight ) ); TextAlignment ta = TextAlignmentImpl.create( ); ta.setHorizontalAlignment( HorizontalAlignment.CENTER_LITERAL ); ta.setVerticalAlignment( VerticalAlignment.CENTER_LITERAL ); tre.setBlockAlignment( ta ); tre.setLabel( lgTitle ); tre.setAction( TextRenderEvent.RENDER_TEXT_IN_BLOCK ); ipr.drawText( tre ); } itm.dispose( ); // DISPOSE RESOURCES AFTER USE } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/2d20506054849c42d48678ae5d0e59f9c37d95e8/BaseRenderer.java/buggy/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/render/BaseRenderer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1743,
16812,
12,
467,
9840,
6747,
277,
683,
16,
17167,
409,
15266,
16,
1635,
14049,
3420,
414,
262,
1082,
202,
15069,
14804,
503,
202,
95,
202,
202,
430,
261,
401,
23623,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1743,
16812,
12,
467,
9840,
6747,
277,
683,
16,
17167,
409,
15266,
16,
1635,
14049,
3420,
414,
262,
1082,
202,
15069,
14804,
503,
202,
95,
202,
202,
430,
261,
401,
23623,
... |
public Object doInHibernate(Session session) throws HibernateException { Integer externalIdConflicts = (Integer)session.iterate( "select count(asn) from Assignment as asn where asn.externalId=? and asn.gradebook.uid=?", new Object[] {externalId, gradebookUid}, new Type[] {Hibernate.STRING, Hibernate.STRING} ).next(); if (externalIdConflicts.intValue() > 0) { throw new ConflictingExternalIdException("An external assessment with that ID already exists in gradebook uid=" + gradebookUid); } Gradebook gradebook = getGradebook(gradebookUid); Assignment asn = new Assignment(gradebook, title, new Double(points), dueDate); asn.setExternallyMaintained(true); asn.setExternalId(externalId); asn.setExternalInstructorLink(externalUrl); asn.setExternalStudentLink(externalUrl); asn.setExternalAppName(externalServiceDescription); session.save(asn); recalculateCourseGradeRecords(gradebook, session); return null; } | public Object doInHibernate(final Session session) { final Query q = session .createQuery("from Gradebook as gb where gb.uid=?"); q.setString(0, gradebookUid); return q.list(); }; | public Object doInHibernate(Session session) throws HibernateException { // Ensure that the externalId is unique within this gradebook Integer externalIdConflicts = (Integer)session.iterate( "select count(asn) from Assignment as asn where asn.externalId=? and asn.gradebook.uid=?", new Object[] {externalId, gradebookUid}, new Type[] {Hibernate.STRING, Hibernate.STRING} ).next(); if (externalIdConflicts.intValue() > 0) { throw new ConflictingExternalIdException("An external assessment with that ID already exists in gradebook uid=" + gradebookUid); } // Get the gradebook Gradebook gradebook = getGradebook(gradebookUid); // Create the external assignment Assignment asn = new Assignment(gradebook, title, new Double(points), dueDate); asn.setExternallyMaintained(true); asn.setExternalId(externalId); asn.setExternalInstructorLink(externalUrl); asn.setExternalStudentLink(externalUrl); asn.setExternalAppName(externalServiceDescription); session.save(asn); recalculateCourseGradeRecords(gradebook, session); return null; } | 48975 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48975/dbcb9fb55ff4d2cadba8989ae4acae0f773ff373/GradebookServiceHibernateImpl.java/clean/service/impl/src/java/org/sakaiproject/component/gradebook/GradebookServiceHibernateImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
482,
1033,
741,
382,
44,
24360,
12,
2157,
1339,
13,
1216,
670,
24360,
503,
288,
9506,
202,
759,
7693,
716,
326,
3903,
548,
353,
3089,
3470,
333,
28073,
9506,
202,
4522,
3903,
548,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
482,
1033,
741,
382,
44,
24360,
12,
2157,
1339,
13,
1216,
670,
24360,
503,
288,
9506,
202,
759,
7693,
716,
326,
3903,
548,
353,
3089,
3470,
333,
28073,
9506,
202,
4522,
3903,
548,
... |
new Content(url, url, bytes, contentType, new ContentProperties()); Parse parse = ParseUtil.parseByParserId("parse-html",content); | new Content(url, url, bytes, contentType, new ContentProperties(), nutchConf); Parse parse = new ParseUtil(nutchConf).parseByParserId("parse-html",content); | public void pageTest(File file, String url, String license, String location, String type) throws Exception { String contentType = "text/html"; InputStream in = new FileInputStream(file); ByteArrayOutputStream out = new ByteArrayOutputStream((int)file.length()); byte[] buffer = new byte[1024]; int i; while ((i = in.read(buffer)) != -1) { out.write(buffer, 0, i); } in.close(); byte[] bytes = out.toByteArray(); Content content = new Content(url, url, bytes, contentType, new ContentProperties()); Parse parse = ParseUtil.parseByParserId("parse-html",content); ContentProperties metadata = parse.getData().getMetadata(); assertEquals(license, metadata.get("License-Url")); assertEquals(location, metadata.get("License-Location")); assertEquals(type, metadata.get("Work-Type")); } | 50818 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50818/329ff64e9d7295aff108f85e9a8103f5e5f8f398/TestCCParseFilter.java/buggy/src/plugin/creativecommons/src/test/org/creativecommons/nutch/TestCCParseFilter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1363,
4709,
12,
812,
585,
16,
514,
880,
16,
15604,
514,
8630,
16,
514,
2117,
16,
514,
618,
13,
565,
1216,
1185,
288,
565,
514,
5064,
273,
315,
955,
19,
2620,
14432,
565,
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,
282,
1071,
918,
1363,
4709,
12,
812,
585,
16,
514,
880,
16,
15604,
514,
8630,
16,
514,
2117,
16,
514,
618,
13,
565,
1216,
1185,
288,
565,
514,
5064,
273,
315,
955,
19,
2620,
14432,
565,
50... |
public JavaResolveResult[] resolve(PsiJavaReference ref, boolean incompleteCode) { | public JavaResolveResult[] resolve(PsiPolyVariantReference ref, boolean incompleteCode) { | public JavaResolveResult[] resolve(PsiJavaReference ref, boolean incompleteCode) { LOG.assertTrue(ref instanceof PsiImportStaticReferenceElementImpl); final PsiImportStaticReferenceElementImpl referenceElement = ((PsiImportStaticReferenceElementImpl)ref); final PsiElement qualifier = referenceElement.getQualifier(); if (!(qualifier instanceof PsiJavaCodeReferenceElement)) return JavaResolveResult.EMPTY_ARRAY; final PsiElement target = ((PsiJavaCodeReferenceElement)qualifier).resolve(); if (!(target instanceof PsiClass)) return JavaResolveResult.EMPTY_ARRAY; final ArrayList<JavaResolveResult> results = new ArrayList<JavaResolveResult>(); target.processDeclarations(referenceElement.new MyScopeProcessor(results), PsiSubstitutor.EMPTY, referenceElement, referenceElement); if (results.size() <= 1) { return results.toArray(new JavaResolveResult[results.size()]); } for(int i = results.size() - 1; i >= 0; i--) { final JavaResolveResult resolveResult = results.get(i); if (!resolveResult.isValidResult()) { results.remove(i); } } return results.toArray(new JavaResolveResult[results.size()]); } | 12814 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12814/d8ffffa406a351c3ca4bfb54c2f58b0b99354f47/PsiImportStaticReferenceElementImpl.java/clean/source/com/intellij/psi/impl/source/PsiImportStaticReferenceElementImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
5110,
8460,
1253,
8526,
2245,
12,
52,
7722,
12487,
9356,
2404,
1278,
16,
1250,
14715,
1085,
13,
288,
1377,
2018,
18,
11231,
5510,
12,
1734,
1276,
453,
7722,
5010,
5788,
2404,
1046,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5110,
8460,
1253,
8526,
2245,
12,
52,
7722,
12487,
9356,
2404,
1278,
16,
1250,
14715,
1085,
13,
288,
1377,
2018,
18,
11231,
5510,
12,
1734,
1276,
453,
7722,
5010,
5788,
2404,
1046,
... |
_setCheck = true; _selectedYear = year; if (_fromYear > _toYear) { if (_fromYear < year) { _fromYear = year; } if (_toYear > year) { _toYear = year; } } else { if (_fromYear > year) { _fromYear = year; } if (_toYear < year) { _toYear = year; } } | _setCheck = true; | public void setYear(int year) { _setCheck = true; // Gimmi 13.10.2002 _selectedYear = year; if (_fromYear > _toYear) { if (_fromYear < year) { _fromYear = year; } if (_toYear > year) { _toYear = year; } } else { if (_fromYear > year) { _fromYear = year; } if (_toYear < year) { _toYear = year; } } } | 52001 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52001/a858e763b64ff5b407d657702b4eedf6616399ce/DateInput.java/buggy/src/java/com/idega/presentation/ui/DateInput.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
444,
5593,
12,
474,
3286,
13,
288,
202,
202,
67,
542,
1564,
273,
638,
31,
202,
202,
759,
611,
381,
9197,
5958,
18,
2163,
18,
6976,
22,
202,
202,
67,
8109,
5593,
273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
444,
5593,
12,
474,
3286,
13,
288,
202,
202,
67,
542,
1564,
273,
638,
31,
202,
202,
759,
611,
381,
9197,
5958,
18,
2163,
18,
6976,
22,
202,
202,
67,
8109,
5593,
273,
... |
public ParameterClassCheckVisitor(PsiParameter parameter){ | ParameterClassCheckVisitor(PsiParameter parameter){ | public ParameterClassCheckVisitor(PsiParameter parameter){ super(); this.parameter = parameter; } | 56627 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56627/dba8b183fc1b08e7ad664812bfc0c64d1e4abd3c/ParameterClassCheckVisitor.java/buggy/plugins/InspectionGadgets/src/com/siyeh/ig/bugs/ParameterClassCheckVisitor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
5498,
797,
1564,
7413,
12,
52,
7722,
1662,
1569,
15329,
3639,
2240,
5621,
3639,
333,
18,
6775,
273,
1569,
31,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
5498,
797,
1564,
7413,
12,
52,
7722,
1662,
1569,
15329,
3639,
2240,
5621,
3639,
333,
18,
6775,
273,
1569,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
super(newCardTag); this.setEnabled(true); } | super(newCardTag); this.setEnabled(true); } | NewCard() { super(newCardTag); this.setEnabled(true); } | 47609 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47609/b0fa2f56cd2dcc90452b768e6b38187cfb8c30eb/AddressBook.java/buggy/grendel/addressbook/AddressBook.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1166,
6415,
1435,
288,
5411,
2240,
12,
2704,
6415,
1805,
1769,
5411,
333,
18,
542,
1526,
12,
3767,
1769,
3639,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1166,
6415,
1435,
288,
5411,
2240,
12,
2704,
6415,
1805,
1769,
5411,
333,
18,
542,
1526,
12,
3767,
1769,
3639,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
manager.add(filterCompleteTask); manager.add(filterOnPriority); } | } manager.add(filterCompleteTask); manager.add(filterOnPriority); | private void fillLocalToolBar(IToolBarManager manager) { manager.removeAll(); // XXX only adding if there are contributions if (MylarTasksPlugin.getDefault().getContributor() != null) { manager.add(createTask); manager.add(createCategory); manager.add(new Separator()); for (IAction action : MylarTasksPlugin.getDefault().getContributor().getToolbarActions(this)) { manager.add(action); } manager.add(new Separator()); manager.add(filterCompleteTask); manager.add(filterOnPriority); } manager.markDirty(); manager.update(true); } | 51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/32c15aa3f27438f813f3ce451d0a6c5778f1c380/TaskListView.java/clean/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/views/TaskListView.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
3636,
2042,
6364,
5190,
12,
45,
6364,
5190,
1318,
3301,
13,
288,
377,
202,
4181,
18,
4479,
1595,
5621,
377,
202,
759,
11329,
1338,
6534,
309,
1915,
854,
13608,
6170,
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,
3238,
918,
3636,
2042,
6364,
5190,
12,
45,
6364,
5190,
1318,
3301,
13,
288,
377,
202,
4181,
18,
4479,
1595,
5621,
377,
202,
759,
11329,
1338,
6534,
309,
1915,
854,
13608,
6170,
3639,
309,... |
} catch (InvocationTargetException e) { throw WrappedException.wrapException(e); } catch (IllegalAccessException e) { throw WrappedException.wrapException(e); | } catch (Exception e) { throw ScriptRuntime.throwAsUncheckedException(e); | private Object getByGetter(GetterSlot slot, Scriptable start) { Object getterThis; Object[] args; if (slot.delegateTo == null) { if (start != this) { // Walk the prototype chain to find an appropriate // object to invoke the getter on. Class clazz = slot.getter.getDeclaringClass(); while (!clazz.isInstance(start)) { start = start.getPrototype(); if (start == this) { break; } if (start == null) { start = this; break; } } } getterThis = start; args = ScriptRuntime.emptyArgs; } else { getterThis = slot.delegateTo; args = new Object[] { this }; } try { return slot.getter.invoke(getterThis, args); } catch (InvocationTargetException e) { throw WrappedException.wrapException(e); } catch (IllegalAccessException e) { throw WrappedException.wrapException(e); } } | 12564 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12564/48b46eb3845fd6cf8fa13cd3def581f9a0ff4339/ScriptableObject.java/clean/src/org/mozilla/javascript/ScriptableObject.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1033,
9979,
8461,
12,
8461,
8764,
4694,
16,
22780,
787,
13,
288,
3639,
1033,
7060,
2503,
31,
3639,
1033,
8526,
833,
31,
3639,
309,
261,
14194,
18,
22216,
774,
422,
446,
13,
288,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1033,
9979,
8461,
12,
8461,
8764,
4694,
16,
22780,
787,
13,
288,
3639,
1033,
7060,
2503,
31,
3639,
1033,
8526,
833,
31,
3639,
309,
261,
14194,
18,
22216,
774,
422,
446,
13,
288,
5... |
entry = directory.addFile(getName(file)); return true; } | entry = directory.addFile(getName(file)); return true; } | public boolean mkFile(String file, VMOpenMode mode) throws IOException { FSEntry entry = getEntry(file); if ((entry != null) || !mode.canWrite()) { return false; } FSDirectory directory = getParentDirectoryEntry(file); if(directory == null) return false; // Ok, make the file entry = directory.addFile(getName(file)); return true; } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/a8360c0112d9f3686ff1ffe02f6e00dd67c206bf/FileSystemAPIImpl.java/buggy/fs/src/fs/org/jnode/fs/service/def/FileSystemAPIImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
5028,
812,
12,
780,
585,
16,
8251,
3678,
2309,
1965,
13,
1216,
1860,
288,
202,
202,
4931,
1622,
1241,
273,
15428,
12,
768,
1769,
202,
202,
430,
14015,
4099,
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,
225,
202,
482,
1250,
5028,
812,
12,
780,
585,
16,
8251,
3678,
2309,
1965,
13,
1216,
1860,
288,
202,
202,
4931,
1622,
1241,
273,
15428,
12,
768,
1769,
202,
202,
430,
14015,
4099,
480,
446,
13... |
p = name_buf.lastIndexOf("."); | p = name_buf.lastIndexOf("."); | private void parse_dir(String rootname, int extent, int len, RandomAccessFile raf, Vector entries, boolean cooked, int level) throws Exception { todo td; int i; isoDr idr; while (len > 0) { raf.seek(sector(extent - sector_offset, cooked)); raf.read(buffer); len -= buffer.length; extent++; i = 0; while (true) { idr = new isoDr(buffer, i); if (idr.length[0] == 0) break; stat fstat_buf = new stat(); StringBuffer name_buf = new StringBuffer(); fstat_buf.st_size = isonum_733(idr.size); if ((idr.flags[0] & 2) > 0) fstat_buf.st_mode |= S_IFDIR; else fstat_buf.st_mode |= S_IFREG; if (idr.name_len[0] == 1 && idr.name[0] == 0) name_buf.append("."); else if (idr.name_len[0] == 1 && idr.name[0] == 1) name_buf.append(".."); else { newString(idr.name, idr.name_len[0] & 0xff, level, name_buf); if (level == 0) { int p = name_buf.lastIndexOf(";"); if (p != -1) name_buf.setLength(p); p = name_buf.lastIndexOf("."); if (p != -1) { int s = name_buf.length() - 1; if (p == s) name_buf.setLength(s); } } } if ((idr.flags[0] & 2) != 0 && (idr.name_len[0] != 1 || (idr.name[0] != 0 && idr.name[0] != 1))) { td = todo_idr; if (td != null) { while (td.next != null) td = td.next; td.next = new todo(); td = td.next; } else { todo_idr = td = new todo(); } td.next = null; td.extent = isonum_733(idr.extent); td.length = isonum_733(idr.size); td.name = rootname + name_buf + "/"; } else { // file only } boolean dir = false; String n = name_buf.toString(); if (!(".".equals(n) || "..".equals(n))) { StringBuffer name = new StringBuffer(rootname); name.append(n); if (S_ISDIR(fstat_buf.st_mode)) { dir = true; if (!n.endsWith("/")) { name.append('/'); } } calendar.set((idr.date[0] & 0xff) + 1900, idr.date[1] - 1, idr.date[2], idr.date[3], idr.date[4], idr.date[5]); // date_buf[6] // offset from Greenwich Mean Time, in 15-minute intervals, as a twos complement signed number, // positive for time zones east of Greenwich, and negative for time zones calendar.setTimeZone(new java.util.SimpleTimeZone(15 * 60 * 1000 * idr.date[6], "")); entries.add(new IsoEntry(name.toString(), calendar.getTimeInMillis(), fstat_buf.st_size, dir, isonum_733(idr.extent) - sector_offset)); } i += (buffer[i] & 0xff); if (i > 2048 - idr.s_length) break; } } } | 51292 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51292/972e6654750691abe2754320860a73ee13a8367e/IsoArchiveFile.java/clean/source/com/mucommander/file/IsoArchiveFile.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1109,
67,
1214,
12,
780,
1365,
529,
16,
509,
11933,
16,
509,
562,
16,
8072,
26933,
24671,
16,
5589,
3222,
16,
1250,
15860,
329,
16,
509,
1801,
13,
1216,
1185,
288,
3639,
1062... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
67,
1214,
12,
780,
1365,
529,
16,
509,
11933,
16,
509,
562,
16,
8072,
26933,
24671,
16,
5589,
3222,
16,
1250,
15860,
329,
16,
509,
1801,
13,
1216,
1185,
288,
3639,
1062... |
visitForDef(aAST.getParent()); | leaveForIter(aAST.getParent()); break; case TokenTypes.FOR_EACH_CLAUSE: leaveForEach(aAST); | public void leaveToken(DetailAST aAST) { switch (aAST.getType()) { case TokenTypes.FOR_ITERATOR: visitForDef(aAST.getParent()); break; case TokenTypes.LITERAL_FOR: leaveForDef(aAST); break; case TokenTypes.OBJBLOCK: exitBlock(); break; case TokenTypes.ASSIGN: case TokenTypes.PLUS_ASSIGN: case TokenTypes.MINUS_ASSIGN: case TokenTypes.STAR_ASSIGN: case TokenTypes.DIV_ASSIGN: case TokenTypes.MOD_ASSIGN: case TokenTypes.SR_ASSIGN: case TokenTypes.BSR_ASSIGN: case TokenTypes.SL_ASSIGN: case TokenTypes.BAND_ASSIGN: case TokenTypes.BXOR_ASSIGN: case TokenTypes.BOR_ASSIGN: case TokenTypes.INC: case TokenTypes.POST_INC: case TokenTypes.DEC: case TokenTypes.POST_DEC: // Do nothing break; default: throw new IllegalStateException(aAST.toString()); } } | 50482 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50482/b344a3113cc9404f60f1d98e7aed886234a26d11/ModifiedControlVariableCheck.java/clean/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/ModifiedControlVariableCheck.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
8851,
1345,
12,
6109,
9053,
279,
9053,
13,
565,
288,
3639,
1620,
261,
69,
9053,
18,
588,
559,
10756,
288,
3639,
648,
3155,
2016,
18,
7473,
67,
11844,
3575,
30,
5411,
8851,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
8851,
1345,
12,
6109,
9053,
279,
9053,
13,
565,
288,
3639,
1620,
261,
69,
9053,
18,
588,
559,
10756,
288,
3639,
648,
3155,
2016,
18,
7473,
67,
11844,
3575,
30,
5411,
8851,
12... |
public boolean readSequence(BufferedReader reader, SymbolParser symParser, SeqIOListener listener) throws IllegalSymbolException, IOException, ParseException { GenbankContext ctx = new GenbankContext(symParser, listener); String line; StreamParser sParser = null; // FIXME? - Is sParser ever not null? KJ boolean hasAnotherSequence = true; listener.startSequence(); while ((line = reader.readLine()) != null) { if(line.length() == 0) { continue; } if (line.startsWith(END_SEQUENCE_TAG)) { if(sParser != null) { // End of symbol data sParser.close(); sParser = null; } reader.mark(2); if (reader.read() == -1) { hasAnotherSequence = false; } else { reader.reset(); } listener.endSequence(); return hasAnotherSequence; } ctx.processLine(line); } // FIXME - This is throwing spurious IOExceptions when reading // the test file AL121903.genbank throw new IOException("Premature end of stream for GENBANK"); } | 50397 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50397/218d83aa16b9e2a6160946a8f7a3e419131ba6e9/GenbankFormat.java/clean/src/org/biojava/bio/seq/io/GenbankFormat.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
1250,
855,
4021,
12,
17947,
2514,
2949,
16,
9506,
202,
5335,
2678,
5382,
2678,
16,
9506,
202,
6926,
4294,
2223,
2991,
13,
202,
15069,
2141,
5335,
503,
16,
1860,
16,
10616,
95,
202,
7642,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
1250,
855,
4021,
12,
17947,
2514,
2949,
16,
9506,
202,
5335,
2678,
5382,
2678,
16,
9506,
202,
6926,
4294,
2223,
2991,
13,
202,
15069,
2141,
5335,
503,
16,
1860,
16,
10616,
95,
202,
7642,... | ||
public void start() throws LifecycleException { mManagerRunning = true; super.start(); //start the javagroups channel try { //the channel is already running if ( mChannelStarted ) return; if(log.isInfoEnabled()) log.info("Starting clustering manager...:"+getName()); if ( cluster == null ) { log.error("Starting... no cluster associated with this context:"+getName()); return; } cluster.addManager(getName(),this); if (cluster.getMembers().length > 0) { Member mbr = cluster.getMembers()[0]; SessionMessage msg = new SessionMessageImpl(this.getName(), SessionMessage.EVT_GET_ALL_SESSIONS, null, "GET-ALL", "GET-ALL-"+this.getName()); cluster.send(msg, mbr); if(log.isWarnEnabled()) log.warn("Manager["+getName()+"], requesting session state from "+mbr+ ". This operation will timeout if no session state has been received within "+ "60 seconds"); long reqStart = System.currentTimeMillis(); long reqNow = 0; boolean isTimeout=false; do { try { Thread.sleep(100); }catch ( Exception sleep) {} reqNow = System.currentTimeMillis(); isTimeout=((reqNow-reqStart)>(1000*60)); } while ( (!isStateTransferred()) && (!isTimeout)); if ( isTimeout || (!isStateTransferred()) ) { log.error("Manager["+getName()+"], No session state received, timing out."); }else { if(log.isInfoEnabled()) log.info("Manager["+getName()+"], session state received in "+(reqNow-reqStart)+" ms."); } } else { if(log.isInfoEnabled()) log.info("Manager["+getName()+"], skipping state transfer. No members active in cluster group."); }//end if mChannelStarted = true; } catch ( Exception x ) { log.error("Unable to start SimpleTcpReplicationManager",x); } } | 46196 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46196/20dfd5010870d7a1aa8744e8a5f32d9645ec5a9e/SimpleTcpReplicationManager.java/buggy/java/org/apache/catalina/ha/session/SimpleTcpReplicationManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
6459,
1937,
1435,
15069,
9977,
503,
95,
81,
1318,
7051,
33,
3767,
31,
9565,
18,
1937,
5621,
759,
1937,
5787,
19207,
346,
656,
87,
4327,
698,
95,
759,
5787,
4327,
291,
17583,
8704,
430,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
6459,
1937,
1435,
15069,
9977,
503,
95,
81,
1318,
7051,
33,
3767,
31,
9565,
18,
1937,
5621,
759,
1937,
5787,
19207,
346,
656,
87,
4327,
698,
95,
759,
5787,
4327,
291,
17583,
8704,
430,
... | ||
protected void addImpl(Component c, Object constraints, int index) { | protected void addImpl(Component c, Object constraints, int index) { if (!isAncestorOf(c)) { super.addImpl(c, constraints, index); } | protected void addImpl(Component c, Object constraints, int index) { // TODO } // addImpl() | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/b12e4b97d99b73f08ccf219bf0a3ffe50371c94a/CellRendererPane.java/buggy/core/src/classpath/javax/javax/swing/CellRendererPane.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
527,
2828,
12,
1841,
276,
16,
1033,
6237,
16,
509,
770,
13,
288,
202,
202,
759,
2660,
202,
97,
368,
527,
2828,
1435,
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,
1117,
918,
527,
2828,
12,
1841,
276,
16,
1033,
6237,
16,
509,
770,
13,
288,
202,
202,
759,
2660,
202,
97,
368,
527,
2828,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
public static byte[] uncompress(byte[] data) throws Exception { byte[] retBytes = new byte[0]; String headerFragment = new String(data, 0, C_HEADER_BEGIN.length()); if (headerFragment.equals(C_HEADER_BEGIN)) { // we have well formed input (so far) headerFragment = new String(data, (C_HEADER_BEGIN.length()), max3(C_HEADER_NONE_VAL.length(), C_HEADER_ZLIB_VAL.length(), C_HEADER_GZIP_VAL.length()) ); if (headerFragment.indexOf(C_HEADER_NONE_VAL) == 0) { retBytes = new byte[data.length-COMPRESS_HEADER_NONE.length()]; System.arraycopy(data, COMPRESS_HEADER_NONE.length(), retBytes, 0, data.length-COMPRESS_HEADER_NONE.length()); } else if (headerFragment.indexOf(C_HEADER_GZIP_VAL) == 0) { retBytes = new byte[data.length-COMPRESS_HEADER_GZIP.length()]; System.arraycopy(data, COMPRESS_HEADER_GZIP.length(), retBytes, 0, data.length-COMPRESS_HEADER_GZIP.length()); retBytes = uncompressGZIP(retBytes); } else if (headerFragment.indexOf(C_HEADER_ZLIB_VAL) == 0) { retBytes = new byte[data.length-COMPRESS_HEADER_ZLIB.length()]; System.arraycopy(data, COMPRESS_HEADER_ZLIB.length(), retBytes, 0, data.length-COMPRESS_HEADER_ZLIB.length()); retBytes = uncompressZLIB(retBytes); } else ; // uncompressible XML, just drop it on the floor.... } else return data; // the Content-Type header is optional, assumes PT return retBytes; } | 5134 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5134/6216927a52c06f74e800b70a40926d1539c87a5e/LimeXMLUtils.java/buggy/components/gnutella-core/src/main/java/com/limegroup/gnutella/xml/LimeXMLUtils.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
3845,
7229,
8526,
551,
362,
1028,
12,
7229,
8526,
892,
13,
15069,
503,
95,
7229,
8526,
1349,
2160,
33,
2704,
7229,
63,
20,
15533,
780,
3374,
7456,
33,
2704,
780,
12,
892,
16,
20,
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,
1071,
3845,
7229,
8526,
551,
362,
1028,
12,
7229,
8526,
892,
13,
15069,
503,
95,
7229,
8526,
1349,
2160,
33,
2704,
7229,
63,
20,
15533,
780,
3374,
7456,
33,
2704,
780,
12,
892,
16,
20,
16,
... | ||
_mexContext = new MessageExchangeContext() { public void invokePartner(PartnerRoleMessageExchange mex) { } public void onAsyncReply(MyRoleMessageExchange myRoleMex) { } }; return _mexContext; } | _mexContext = new MessageExchangeContext() { public void invokePartner(PartnerRoleMessageExchange mex) { } public void onAsyncReply(MyRoleMessageExchange myRoleMex) { } }; return _mexContext; } | protected MessageExchangeContext createMessageExchangeContext() { _mexContext = new MessageExchangeContext() { public void invokePartner(PartnerRoleMessageExchange mex) { } public void onAsyncReply(MyRoleMessageExchange myRoleMex) { } }; return _mexContext; } | 45373 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45373/10abf63eca983e7dd1c20e443c52eb981a8696f1/MockBpelServer.java/clean/bpel-runtime/src/test/java/org/apache/ode/bpel/runtime/MockBpelServer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
2350,
11688,
1042,
23836,
11688,
1042,
1435,
288,
282,
389,
81,
338,
1042,
273,
225,
394,
2350,
11688,
1042,
1435,
288,
1377,
1071,
918,
4356,
1988,
1224,
12,
1988,
1224,
2996,
1079,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
2350,
11688,
1042,
23836,
11688,
1042,
1435,
288,
282,
389,
81,
338,
1042,
273,
225,
394,
2350,
11688,
1042,
1435,
288,
1377,
1071,
918,
4356,
1988,
1224,
12,
1988,
1224,
2996,
1079,
... |
samples[channelNum][ndx] = (byte) (b < 0 ? 256 + b : b); | samples[channelNum][ndx] = (short) (b < 0 ? 256 + b : b); | public static void planarUnpack(byte[][] samples, int startIndex, byte[] bytes, int[] bitsPerSample, int photoInterp, boolean littleEndian, int strip, int numStrips) throws FormatException { int numChannels = bitsPerSample.length; // this should always be 3 // determine which channel the strip belongs to int channelNum = strip % numChannels; if (channelNum > 0) { startIndex = (strip % numChannels) * (strip / numChannels) * bytes.length / numChannels; } int index = 0; int counter = 0; for (int j=0; j<bytes.length; j++) { int numBytes = bitsPerSample[0] / 8; if (bitsPerSample[0] % 8 != 0) { // bits per sample is not a multiple of 8 // // while images in this category are not in violation of baseline TIFF // specs, it's a bad idea to write bits per sample values that aren't // divisible by 8 // -- MELISSA TODO -- improve this as time permits if (index == bytes.length) { //throw new FormatException("bad index : i = " + i + ", j = " + j); index--; } byte b = bytes[index]; index++; int offset = (bitsPerSample[0] * (samples.length*j + channelNum)) % 8; if (offset <= (8 - (bitsPerSample[0] % 8))) { index--; } if (channelNum == 0) counter++; if (counter % 4 == 0 && channelNum == 0) { index++; } int ndx = startIndex + j; if (ndx >= samples[channelNum].length) { ndx = samples[channelNum].length - 1; } samples[channelNum][ndx] = (byte) (b < 0 ? 256 + b : b); if (photoInterp == WHITE_IS_ZERO || photoInterp == CMYK) { samples[channelNum][ndx] = (byte) (255 - samples[channelNum][ndx]); } } else if (numBytes == 1) { byte b = bytes[index]; index++; int ndx = startIndex + j; samples[channelNum][ndx] = (byte) (b < 0 ? 256 + b : b); if (photoInterp == WHITE_IS_ZERO) { // invert color value samples[channelNum][ndx] = (byte) (255 - samples[channelNum][ndx]); } else if (photoInterp == CMYK) { samples[channelNum][ndx] = (byte) (255 - samples[channelNum][ndx]); } } else { byte[] b = new byte[numBytes]; if (numBytes + index < bytes.length) { System.arraycopy(bytes, index, b, 0, numBytes); } else { System.arraycopy(bytes, bytes.length - numBytes, b, 0, numBytes); } index += numBytes; int ndx = startIndex + j; if (ndx >= samples[0].length) ndx = samples[0].length - 1; samples[channelNum][ndx] = (byte) DataTools.bytesToLong(b, !littleEndian); if (photoInterp == WHITE_IS_ZERO) { // invert color value long max = 1; for (int q=0; q<numBytes; q++) max *= 8; samples[channelNum][ndx] = (byte) (max - samples[channelNum][ndx]); } else if (photoInterp == CMYK) { samples[channelNum][ndx] = (byte) (255 - samples[channelNum][ndx]); } } } } | 11426 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11426/86b3568b073b11484ea718fd55cb74ce4f115a24/TiffTools.java/buggy/loci/formats/TiffTools.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
918,
4995,
297,
23649,
12,
7229,
63,
6362,
65,
5216,
16,
509,
10588,
16,
565,
1160,
8526,
1731,
16,
509,
8526,
4125,
2173,
8504,
16,
509,
10701,
2465,
84,
16,
1250,
328,
1060... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
918,
4995,
297,
23649,
12,
7229,
63,
6362,
65,
5216,
16,
509,
10588,
16,
565,
1160,
8526,
1731,
16,
509,
8526,
4125,
2173,
8504,
16,
509,
10701,
2465,
84,
16,
1250,
328,
1060... |
entry.setLink(baseURL + "revinfo.svn?&revision=" + logEntry.getRevision()); | entry.setLink(baseURL + "revinfo.svn?name=" + instanceName + "&revision=" + logEntry.getRevision()); | private List createEntries(final List<SVNLogEntry> logEntries, final String baseURL) { final List<SyndEntry> entries = new ArrayList<SyndEntry>(); SyndEntry entry; SyndContent description; // One logEntry is one commit (or revision) for (SVNLogEntry logEntry : logEntries) { entry = new SyndEntryImpl(); entry.setTitle("Revision " + logEntry.getRevision() + " - " + getAbbreviatedLogMessage(logEntry.getMessage(), logMessageLength)); entry.setAuthor(logEntry.getAuthor()); entry.setLink(baseURL + "revinfo.svn?&revision=" + logEntry.getRevision()); entry.setPublishedDate(logEntry.getDate()); description = new SyndContentImpl(); description.setType("text/html"); //noinspection unchecked final Map<String, SVNLogEntryPath> map = logEntry.getChangedPaths(); final List<String> latestPathsList = new ArrayList<String>(map.keySet()); int added = 0; int modified = 0; int relocated = 0; int deleted = 0; for (String entryPath : latestPathsList) { final LogEntryActionType type = LogEntryActionType.parse(map.get(entryPath).getType()); switch (type) { case ADDED: added++; break; case MODIFIED: modified++; break; case REPLACED: relocated++; break; case DELETED: deleted++; break; } } final StringBuilder sb = new StringBuilder(); sb.append("<table border=\"0\">"); sb.append("<tr colspan=\"2\">"); sb.append("<td>"); sb.append(logEntry.getMessage()); sb.append("</td>"); sb.append("</tr>"); sb.append("<tr>"); sb.append("<td><b>Action</b></td>"); sb.append("<td><b>Count</b></td>"); sb.append("<tr><td>"); sb.append(LogEntryActionType.ADDED); sb.append("</td><td>"); sb.append(added); sb.append("</td></tr>"); sb.append("<tr><td>"); sb.append(LogEntryActionType.MODIFIED); sb.append("</td><td>"); sb.append(modified); sb.append("</td></tr>"); sb.append("<tr><td>"); sb.append(LogEntryActionType.REPLACED); sb.append("</td><td>"); sb.append(relocated); sb.append("</td></tr>"); sb.append("<tr><td>"); sb.append(LogEntryActionType.DELETED); sb.append("</td><td>"); sb.append(deleted); sb.append("</td></tr>"); sb.append("</table>"); description.setValue(sb.toString()); entry.setDescription(description); entries.add(entry); } return entries; } | 50734 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50734/b0b1f2c4f719e538bff67f909af8a1a29b3f298f/SyndFeedGenerator.java/buggy/sventon/dev/java/src/de/berlios/sventon/rss/SyndFeedGenerator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
987,
752,
5400,
12,
6385,
987,
32,
23927,
50,
25548,
34,
613,
5400,
16,
727,
514,
17480,
13,
288,
565,
727,
987,
32,
10503,
72,
1622,
34,
3222,
273,
394,
2407,
32,
10503,
72,
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,
282,
3238,
987,
752,
5400,
12,
6385,
987,
32,
23927,
50,
25548,
34,
613,
5400,
16,
727,
514,
17480,
13,
288,
565,
727,
987,
32,
10503,
72,
1622,
34,
3222,
273,
394,
2407,
32,
10503,
72,
16... |
if (!this.path[i].equals(path.getPathComponent(i))) return false; | otherPathLength--; path = path.getParentPath(); | public boolean isDescendant(TreePath path) { if (path == null) return false; int count = getPathCount(); if (path.getPathCount() < count) return false; for (int i = 0; i < count; i++) { if (!this.path[i].equals(path.getPathComponent(i))) return false; } return true; } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/53983e95556bf4b775130b06570aa2ea08d85628/TreePath.java/buggy/core/src/classpath/javax/javax/swing/tree/TreePath.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1250,
353,
29014,
12,
2471,
743,
589,
13,
225,
288,
565,
309,
261,
803,
422,
446,
13,
1377,
327,
629,
31,
565,
509,
1056,
273,
4339,
1380,
5621,
565,
309,
261,
803,
18,
588,
743... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1250,
353,
29014,
12,
2471,
743,
589,
13,
225,
288,
565,
309,
261,
803,
422,
446,
13,
1377,
327,
629,
31,
565,
509,
1056,
273,
4339,
1380,
5621,
565,
309,
261,
803,
18,
588,
743... |
int ruleAction = id | TokenMarker.IS_ESCAPE; | int ruleAction = TokenMarker.IS_ESCAPE; | public static final ParserRule createEscapeRule(String seq, int id) { int ruleAction = id | TokenMarker.IS_ESCAPE; String[] strings = new String[1]; strings[0] = seq; int[] ruleSeqLengths = new int[1]; char[] ruleChars; if (seq != null) { ruleSeqLengths[0] = seq.length(); ruleChars = seq.toCharArray(); } else { ruleChars = new char[0]; } return new ParserRule(ruleChars, ruleSeqLengths, ruleAction); } | 6564 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6564/126cf713ca2c18e179efa1e4f1f83b29be761128/ParserRuleFactory.java/buggy/org/gjt/sp/jedit/syntax/ParserRuleFactory.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
727,
6783,
2175,
752,
8448,
2175,
12,
780,
3833,
16,
509,
612,
13,
202,
95,
202,
202,
474,
1720,
1803,
273,
612,
571,
3155,
7078,
18,
5127,
67,
24849,
31,
202,
202,
780... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
727,
6783,
2175,
752,
8448,
2175,
12,
780,
3833,
16,
509,
612,
13,
202,
95,
202,
202,
474,
1720,
1803,
273,
612,
571,
3155,
7078,
18,
5127,
67,
24849,
31,
202,
202,
780... |
parentModule.setConstant(name, newModule); | ((RubyModule)parentCRef.getValue()).setConstant(name, newModule); | public RubyModule defineModuleUnder(String name, RubyModule parentModule) { RubyModule newModule = RubyModule.newModule(this, name, parentModule); parentModule.setConstant(name, newModule); return newModule; } | 45298 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45298/a1b8fc1d456e3d5c6e01579b88773383068aa85c/Ruby.java/buggy/src/org/jruby/Ruby.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19817,
3120,
4426,
3120,
14655,
12,
780,
508,
16,
19817,
3120,
982,
3120,
13,
288,
3639,
19817,
3120,
394,
3120,
273,
19817,
3120,
18,
2704,
3120,
12,
2211,
16,
508,
16,
982,
3120,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3120,
4426,
3120,
14655,
12,
780,
508,
16,
19817,
3120,
982,
3120,
13,
288,
3639,
19817,
3120,
394,
3120,
273,
19817,
3120,
18,
2704,
3120,
12,
2211,
16,
508,
16,
982,
3120,
... |
if (names[0].equals("anonymous")) { | if (functionName.equals("anonymous")) { | public String jsGet_name() { if (names == null) return ""; if (names[0].equals("anonymous")) { Context cx = Context.getCurrentContext(); if (cx != null && cx.getLanguageVersion() == Context.VERSION_1_2) return ""; } return names[0]; } | 51275 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51275/49ee5104a9201354fbd63b6b9e1e0ea314785d03/NativeFunction.java/buggy/js/rhino/src/org/mozilla/javascript/NativeFunction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
3828,
967,
67,
529,
1435,
288,
3639,
309,
261,
1973,
422,
446,
13,
5411,
327,
1408,
31,
3639,
309,
261,
915,
461,
18,
14963,
2932,
19070,
6,
3719,
288,
5411,
1772,
9494,
273,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
3828,
967,
67,
529,
1435,
288,
3639,
309,
261,
1973,
422,
446,
13,
5411,
327,
1408,
31,
3639,
309,
261,
915,
461,
18,
14963,
2932,
19070,
6,
3719,
288,
5411,
1772,
9494,
273,... |
shell.setLocation(Display.getCurrent().getClientArea().width / 2 - (shell.getSize().x / 2), Display .getCurrent().getClientArea().height / 2 - (shell.getSize().y / 2)); | UIHelper.centerOnScreen(shell); | public FormatSpecifierDialog(FormatSpecifier formatspecifier) { super(); this.formatspecifier = formatspecifier; fsBackup = (FormatSpecifier) EcoreUtil.copy(formatspecifier); shell = new Shell(Display.getCurrent(), SWT.DIALOG_TRIM | SWT.RESIZE | SWT.APPLICATION_MODAL); GridLayout gridLayout = new GridLayout(); gridLayout.numColumns = 2; shell.setLayout(new FillLayout()); placeComponents(); shell.setText("Format Specifier Dialog:"); shell.setSize(332, 255); shell.setLocation(Display.getCurrent().getClientArea().width / 2 - (shell.getSize().x / 2), Display .getCurrent().getClientArea().height / 2 - (shell.getSize().y / 2)); shell.open(); while (!shell.isDisposed()) { if (!shell.getDisplay().readAndDispatch()) { shell.getDisplay().sleep(); } } } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/258bad0d502f0759055374875005f9978172c4d7/FormatSpecifierDialog.java/buggy/chart/org.eclipse.birt.chart.ui.extension/src/org/eclipse/birt/chart/ui/swt/composites/FormatSpecifierDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
4077,
21416,
6353,
12,
1630,
21416,
740,
2793,
1251,
13,
565,
288,
3639,
2240,
5621,
3639,
333,
18,
2139,
2793,
1251,
273,
740,
2793,
1251,
31,
3639,
2662,
6248,
273,
261,
1630,
214... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4077,
21416,
6353,
12,
1630,
21416,
740,
2793,
1251,
13,
565,
288,
3639,
2240,
5621,
3639,
333,
18,
2139,
2793,
1251,
273,
740,
2793,
1251,
31,
3639,
2662,
6248,
273,
261,
1630,
214... |
public void addSongToEntry (Entry entry, Song song) | public void addSongToEntry (final Entry entry, final Song song) | public void addSongToEntry (Entry entry, Song song) throws SQLException { try { // fill in the appropriate entry id value song.entryid = entry.entryid; // and stick the song into the database _stable.insert(song); // communicate the songid back to the caller song.songid = lastInsertedId(); _session.commit(); } catch (SQLException sqe) { // back out our changes if something got hosed _session.rollback(); throw sqe; } catch (RuntimeException rte) { // back out our changes if something got hosed _session.rollback(); throw rte; } } | 5965 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5965/df34151895023c847a26a60a405a9ba82e178fa6/Repository.java/buggy/projects/robodj/src/java/robodj/repository/Repository.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
527,
55,
932,
774,
1622,
261,
1622,
1241,
16,
348,
932,
17180,
13,
202,
15069,
6483,
565,
288,
202,
698,
288,
202,
565,
368,
3636,
316,
326,
5505,
1241,
612,
460,
202,
565,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
527,
55,
932,
774,
1622,
261,
1622,
1241,
16,
348,
932,
17180,
13,
202,
15069,
6483,
565,
288,
202,
698,
288,
202,
565,
368,
3636,
316,
326,
5505,
1241,
612,
460,
202,
565,
... |
public synchronized boolean moveBranch(int branchFrom, int branchTo, boolean notify) { if (branchFrom==branchTo) return false; else if (!nodeExists(branchFrom) || !nodeExists(branchTo)) return false; else if (descendantOf(branchTo,branchFrom)) return false; else if (branchTo == motherOfNode(branchFrom) && !nodeIsPolytomous(branchTo)) return false; else if (nodesAreSisters(branchTo, branchFrom) && (numberOfDaughtersOfNode(motherOfNode(branchFrom))==2)) return false; else if (numberOfDaughtersOfNode(motherOfNode(branchFrom))==1) //TODO: NOTE that you can't move a branch with return false; checkTreeIntegrity(root); double toLength = getBranchLength(branchTo); //first, pluck out "branchFrom" //next, attach branchFrom clade onto branchTo if (snipClade(branchFrom, false)) { int newMother = graftClade(branchFrom, branchTo, false); if (hasBranchLengths() && MesquiteDouble.isCombinable(toLength)) { //remember length of branches to adjust afterward setBranchLength(newMother, toLength/2.0, false); setBranchLength(branchTo, toLength/2.0, false); } } if (!checkTreeIntegrity(root)) { locked = true; //what to do here? notify? } incrementVersion(MesquiteListener.BRANCHES_REARRANGED,notify); return true; } | 56479 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56479/c150b559bc39c5d510d0bbd29c1d04982a6173bb/MesquiteTree.java/buggy/Source/mesquite/lib/MesquiteTree.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3852,
1250,
3635,
7108,
12,
474,
3803,
1265,
16,
509,
3803,
774,
16,
1250,
5066,
13,
288,
202,
202,
430,
261,
7500,
1265,
631,
7500,
774,
13,
1082,
202,
2463,
629,
31,
202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3852,
1250,
3635,
7108,
12,
474,
3803,
1265,
16,
509,
3803,
774,
16,
1250,
5066,
13,
288,
202,
202,
430,
261,
7500,
1265,
631,
7500,
774,
13,
1082,
202,
2463,
629,
31,
202,
... | ||
if (this == getRuntime().getClasses().getObjectClass()) { | if (this == getRuntime().getObject()) { | public IRubyObject getConstantAt(String name) { IRubyObject constant = getInstanceVariable(name); if (constant != null) { return constant; } if (this == getRuntime().getClasses().getObjectClass()) { return getConstant(name, false); } return null; } | 45827 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45827/ca6b16e996ea9af83ce593594b9c69b9364a9924/RubyModule.java/clean/src/org/jruby/RubyModule.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
15908,
10340,
921,
24337,
861,
12,
780,
508,
13,
288,
377,
202,
7937,
10340,
921,
5381,
273,
3694,
3092,
12,
529,
1769,
377,
202,
377,
202,
430,
261,
14384,
480,
446,
13,
288,
377... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
15908,
10340,
921,
24337,
861,
12,
780,
508,
13,
288,
377,
202,
7937,
10340,
921,
5381,
273,
3694,
3092,
12,
529,
1769,
377,
202,
377,
202,
430,
261,
14384,
480,
446,
13,
288,
377... |
AST __t233 = _t; AST tmp792_AST_in = (AST)_t; | AST __t218 = _t; AST tmp796_AST_in = (AST)_t; | public final void classstate(AST _t) throws RecognitionException { AST classstate_AST_in = (_t == ASTNULL) ? null : (AST)_t; AST c = null; AST __t229 = _t; c = _t==ASTNULL ? null :(AST)_t; match(_t,CLASS); _t = _t.getFirstChild(); if ( inputState.guessing==0 ) { action.classState(c); } AST tmp789_AST_in = (AST)_t; match(_t,TYPE_NAME); _t = _t.getNextSibling(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case INHERITS: { AST __t231 = _t; AST tmp790_AST_in = (AST)_t; match(_t,INHERITS); _t = _t.getFirstChild(); AST tmp791_AST_in = (AST)_t; match(_t,TYPE_NAME); _t = _t.getNextSibling(); _t = __t231; _t = _t.getNextSibling(); break; } case PERIOD: case LEXCOLON: case FINAL: case IMPLEMENTS: { break; } default: { throw new NoViableAltException(_t); } } } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case IMPLEMENTS: { AST __t233 = _t; AST tmp792_AST_in = (AST)_t; match(_t,IMPLEMENTS); _t = _t.getFirstChild(); AST tmp793_AST_in = (AST)_t; match(_t,TYPE_NAME); _t = _t.getNextSibling(); { _loop235: do { if (_t==null) _t=ASTNULL; if ((_t.getType()==COMMA)) { AST tmp794_AST_in = (AST)_t; match(_t,COMMA); _t = _t.getNextSibling(); AST tmp795_AST_in = (AST)_t; match(_t,TYPE_NAME); _t = _t.getNextSibling(); } else { break _loop235; } } while (true); } _t = __t233; _t = _t.getNextSibling(); break; } case PERIOD: case LEXCOLON: case FINAL: { break; } default: { throw new NoViableAltException(_t); } } } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case FINAL: { AST tmp796_AST_in = (AST)_t; match(_t,FINAL); _t = _t.getNextSibling(); break; } case PERIOD: case LEXCOLON: { break; } default: { throw new NoViableAltException(_t); } } } block_colon(_t); _t = _retTree; code_block(_t); _t = _retTree; AST __t237 = _t; AST tmp797_AST_in = (AST)_t; match(_t,END); _t = _t.getFirstChild(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case CLASS: { AST tmp798_AST_in = (AST)_t; match(_t,CLASS); _t = _t.getNextSibling(); break; } case 3: { break; } default: { throw new NoViableAltException(_t); } } } _t = __t237; _t = _t.getNextSibling(); state_end(_t); _t = _retTree; _t = __t229; _t = _t.getNextSibling(); _retTree = _t; } | 13952 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13952/daa15e07422d3491bbbb4d0060450c81983332a4/TreeParser01.java/buggy/trunk/org.prorefactor.core/src/org/prorefactor/treeparser01/TreeParser01.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
667,
2019,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
667,
2019,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
13,
692,
446,
294,
261,
9053,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
667,
2019,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
667,
2019,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
13,
692,
446,
294,
261,
9053,
... |
System.err.println("root(after remove): " + root.toString()); | private String convertPageBody(String content, String fileName) { String nodeName = null; // variables needed for the creation of <template> elements boolean createTemplateTags = false; Hashtable templateElements = new Hashtable(); // first check if any contextpaths are in the content String boolean found = false; for (int i = 0; i < m_webAppNames.size(); i++) { if (content.indexOf((String)m_webAppNames.get(i)) != -1) { found = true; } } // check if edittemplates are in the content string if (content.indexOf("<edittemplate>") != -1 || content.indexOf("<EDITTEMPLATE>") != -1) { found = true; } // only build document when some paths were found or <edittemplate> is missing! if (found) { InputStream in = new ByteArrayInputStream(content.getBytes()); String editString, templateString; try { // create DOM document InputSource source = new InputSource(in); Document doc = CmsXmlUtils.unmarshalHelper(source, null); System.err.println("document: \n" + content); // get all <edittemplate> nodes to check their content nodeName = "edittemplate"; Element root = doc.getRootElement(); List editNodes = root.elements(nodeName.toLowerCase()); editNodes.addAll(root.elements(nodeName.toUpperCase())); System.err.println("editNodes: " + editNodes.toString()); // no <edittemplate> tags present, create them! if (editNodes.size() < 1) { if (DEBUG > 0) { System.err.println("[" + this.getClass().getName() + ".convertPageBody()]: No <edittemplate> found, creating it."); } createTemplateTags = true; nodeName = "TEMPLATE"; List templateNodes = root.elements(nodeName.toLowerCase()); List attributes; templateNodes.addAll(root.elements(nodeName.toUpperCase())); System.err.println("templateNodes: " + templateNodes.toString()); // create an <edittemplate> tag for each <template> tag Element templateTag; for (int i = 0; i < templateNodes.size(); i++) { // get the CDATA content of the <template> tags templateTag = (Element)templateNodes.get(i); System.err.println("templateTag: " + templateTag.toString()); editString = templateTag.getText(); System.err.println("editString: " + editNodes.toString()); templateString = editString; // substitute the links in the <template> tag String try { templateString = CmsXmlTemplateLinkConverter.convertFromImport( templateString, m_webappUrl, fileName); System.err.println("templateSring: " + templateString); } catch (CmsException e) { throw new CmsException("[" + this.getClass().getName() + ".convertPageBody()] can't parse the content: ", e); } // look for the "name" attribute of the <template> tag attributes = ((Element)templateNodes.get(i)).attributes(); String templateName = ""; if (attributes.size() > 0) { templateName = ((Attribute)attributes.get(0)).getName(); } // create the new <edittemplate> node nodeName = "edittemplate"; Element newNode = DocumentHelper.createElement(nodeName.toLowerCase()); if (newNode == null) { newNode = root.addElement(nodeName.toUpperCase()); } newNode.addCDATA(editString); // set the "name" attribute, if necessary attributes = newNode.attributes(); if (!templateName.equals("")) { newNode.addAttribute("name", templateName); } System.err.println("newNode: " + newNode.toString()); // append the new edittemplate node to the document ((Element)root.elements("XMLTEMPLATE").get(0)).add(newNode); System.err.println("root(newnode): " + root.toString()); // store modified <template> node Strings in Hashtable if (templateName.equals("")) { templateName = "noNameKey"; } templateElements.put(templateName, templateString); } // finally, delete old <TEMPLATE> tags from document while (templateNodes.size() > 0) { ((Element)root.elements("XMLTEMPLATE").get(0)).remove((Element)templateNodes.get(0)); } System.err.println("root(after remove): " + root.toString()); } // check the content of the <edittemplate> nodes Element editTemplate; for (int i = 0; i < editNodes.size(); i++) { // editString = editNodes.item(i).getFirstChild().getNodeValue(); editTemplate = (Element)editNodes.get(i); editString = editTemplate.getText(); System.err.println("editString: " + editNodes.toString()); for (int k = 0; k < m_webAppNames.size(); k++) { editString = CmsStringUtil.substitute( editString, (String)m_webAppNames.get(k), I_CmsWpConstants.C_MACRO_OPENCMS_CONTEXT + "/"); System.err.println("editString (mod): " + editNodes.toString()); } // There is a setText(String) but no corresponding setCDATA in dom4j. editTemplate.clearContent(); editTemplate.addCDATA(editString); System.err.println("editNodes.get(i): " + editNodes.get(i).toString()); } // convert XML document back to String content = CmsXmlUtils.marshal(doc, OpenCms.getSystemInfo().getDefaultEncoding()); System.err.println("content: " + content.toString()); // rebuild the template tags in the document! if (createTemplateTags) { content = content.substring(0, content.lastIndexOf("</XMLTEMPLATE>")); // get the keys Enumeration en = templateElements.keys(); while (en.hasMoreElements()) { String key = (String)en.nextElement(); String value = (String)templateElements.get(key); // create the default template if (key.equals("noNameKey")) { content += "\n<TEMPLATE><![CDATA[" + value; } else { // create template with "name" attribute content += "\n<TEMPLATE name=\"" + key + "\"><![CDATA[" + value; } content += "]]></TEMPLATE>\n"; } content += "\n</XMLTEMPLATE>"; } } catch (Exception exc) { // ignore } } return content; } | 8585 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8585/09bfb7425524898bed602ede1154a72d61aacad2/CmsImportVersion1.java/clean/src/com/opencms/legacy/CmsImportVersion1.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
514,
1765,
1964,
2250,
12,
780,
913,
16,
514,
3968,
13,
288,
3639,
514,
7553,
273,
446,
31,
3639,
368,
3152,
3577,
364,
326,
6710,
434,
411,
3202,
34,
2186,
3639,
1250,
752,
2283,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1765,
1964,
2250,
12,
780,
913,
16,
514,
3968,
13,
288,
3639,
514,
7553,
273,
446,
31,
3639,
368,
3152,
3577,
364,
326,
6710,
434,
411,
3202,
34,
2186,
3639,
1250,
752,
2283,... | |
alt68=2; | alt69=2; | public PatternDescr lhs_unary() throws RecognitionException { PatternDescr d; PatternDescr u = null; FromDescr fm = null; d = null; try { // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1147:17: ( (u= lhs_exist | u= lhs_not | u= lhs_eval | u= lhs_column (fm= from_statement )? | '(' opt_eol u= lhs opt_eol ')' ) ) // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1147:17: (u= lhs_exist | u= lhs_not | u= lhs_eval | u= lhs_column (fm= from_statement )? | '(' opt_eol u= lhs opt_eol ')' ) { // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1147:17: (u= lhs_exist | u= lhs_not | u= lhs_eval | u= lhs_column (fm= from_statement )? | '(' opt_eol u= lhs opt_eol ')' ) int alt68=5; switch ( input.LA(1) ) { case 51: alt68=1; break; case 52: alt68=2; break; case 53: alt68=3; break; case ID: alt68=4; break; case 23: alt68=5; break; default: NoViableAltException nvae = new NoViableAltException("1147:17: (u= lhs_exist | u= lhs_not | u= lhs_eval | u= lhs_column (fm= from_statement )? | \'(\' opt_eol u= lhs opt_eol \')\' )", 68, 0, input); throw nvae; } switch (alt68) { case 1 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1147:25: u= lhs_exist { following.push(FOLLOW_lhs_exist_in_lhs_unary3135); u=lhs_exist(); following.pop(); } break; case 2 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1148:25: u= lhs_not { following.push(FOLLOW_lhs_not_in_lhs_unary3143); u=lhs_not(); following.pop(); } break; case 3 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1149:25: u= lhs_eval { following.push(FOLLOW_lhs_eval_in_lhs_unary3151); u=lhs_eval(); following.pop(); } break; case 4 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1150:25: u= lhs_column (fm= from_statement )? { following.push(FOLLOW_lhs_column_in_lhs_unary3163); u=lhs_column(); following.pop(); // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1150:38: (fm= from_statement )? int alt67=2; int LA67_0 = input.LA(1); if ( LA67_0==42 ) { alt67=1; } else if ( (LA67_0>=EOL && LA67_0<=ID)||LA67_0==15||LA67_0==23||LA67_0==25||LA67_0==29||LA67_0==34||(LA67_0>=44 && LA67_0<=45)||(LA67_0>=49 && LA67_0<=53) ) { alt67=2; } else { NoViableAltException nvae = new NoViableAltException("1150:38: (fm= from_statement )?", 67, 0, input); throw nvae; } switch (alt67) { case 1 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1150:39: fm= from_statement { following.push(FOLLOW_from_statement_in_lhs_unary3168); fm=from_statement(); following.pop(); fm.setColumn((ColumnDescr) u); u=fm; } break; } } break; case 5 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:1151:25: '(' opt_eol u= lhs opt_eol ')' { match(input,23,FOLLOW_23_in_lhs_unary3178); following.push(FOLLOW_opt_eol_in_lhs_unary3180); opt_eol(); following.pop(); following.push(FOLLOW_lhs_in_lhs_unary3184); u=lhs(); following.pop(); following.push(FOLLOW_opt_eol_in_lhs_unary3186); opt_eol(); following.pop(); match(input,25,FOLLOW_25_in_lhs_unary3188); } break; } d = u; } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { } return d; } | 31577 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/31577/12c8feffd968f958100f654d836fa3c2ee21ded8/RuleParser.java/buggy/drools-compiler/src/main/java/org/drools/lang/RuleParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
6830,
16198,
8499,
67,
318,
814,
1435,
1216,
9539,
288,
6647,
6830,
16198,
302,
31,
3639,
6830,
16198,
582,
273,
446,
31,
3639,
6338,
16198,
10940,
273,
446,
31,
540,
202,
202,
72,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
6830,
16198,
8499,
67,
318,
814,
1435,
1216,
9539,
288,
6647,
6830,
16198,
302,
31,
3639,
6830,
16198,
582,
273,
446,
31,
3639,
6338,
16198,
10940,
273,
446,
31,
540,
202,
202,
72,
... |
public static void main (String [] args) throws Exception{ | public static void main(String[] args) throws Exception { | public static void main (String [] args) throws Exception{ String USAGE = "Usage: java JobFlagReport [options] <date (YYYY-MM-DD)> Enter -help for a list of options\n"; String HELP = "Where [options] are:\n"+ " -help Displays help\n"+ " -step <day|month> Specifies size of step (day by default)\n"+ " -n <steps> Specifies number of steps to do\n"; if (args.length == 0){ System.err.println(USAGE); System.exit(1); } else if (args.length == 1 && args[0].equalsIgnoreCase("-help")){ System.err.println(USAGE); System.err.println(HELP); System.exit(1); } int n = 1; String stepStr = "day"; for (int i=0;i<args.length-1;i++){ if (args[i].equals("-n")) { n = Integer.parseInt(args[++i]); } else if (args[i].equals("-step")) { stepStr = args[++i]; } else if (args[i].equalsIgnoreCase("-help")) { System.err.println(USAGE); System.err.println(HELP); System.exit(1); } else { System.err.println("Unknown argument: " + args[i]); System.exit(1); } } String inputDate = args[args.length-1]; DatabaseRetriever dbr = new DatabaseRetriever(); TimeStep ts = new TimeStep (stepStr, n, inputDate); HistogramParser hostHist = new HistogramParser("Number of Unique Hostnames Shown by Domain","GFTPhosthistogram","Number of Hosts", n); HistogramParser ipHist = new HistogramParser("Number of Unique IPs Shown by Domain","GFTPiphistogram","Number of IP Addresses",n); while(ts.next()){ Date startD = ts.getTime(); String startS = ts.getFormattedTime(); ts.stepTime(); HashMap iptracker= new HashMap(); hostHist.nextEntry(startS, ts.getFormattedTime()); ipHist.nextEntry(startS, ts.getFormattedTime()); ResultSet rs = dbr.retrieve("gftp_packets", new String [] {"Distinct(hostname)"}, startD, ts.getTime()); while (rs.next()){ String hostname = rs.getString(1); String ip = hostname.substring(hostname.indexOf("/")+1, hostname.length()); hostname = hostname.substring(0,hostname.lastIndexOf("/")); if (hostname.indexOf(".")!= -1 ){ hostname = hostname.substring(hostname.lastIndexOf("."), hostname.length()); hostHist.addData(hostname,1); } else{ hostHist.addData("unknown",1); } iptracker.put(ip,""); } Iterator keys = iptracker.keySet().iterator(); while (keys.hasNext()){ IPEntry ipentry = IPEntry.getIPEntry((String)keys.next()); ipHist.addData(ipentry.getDomain(),1); } rs.close(); } dbr.close(); System.out.println("<report>"); ipHist.output(System.out); hostHist.output(System.out); System.out.println("</report>"); } | 8719 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8719/efb83d08bf3214ba362adb9486345c128a00bae7/HostReport.java/buggy/usage/java/reports/source/src/org/globus/usage/report/gftp/HostReport.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
2774,
12,
780,
8526,
833,
13,
1216,
1185,
288,
3639,
514,
11836,
2833,
273,
315,
5357,
30,
2252,
3956,
4678,
4820,
306,
2116,
65,
411,
712,
261,
26287,
17,
8206,
17,
569... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1185,
288,
3639,
514,
11836,
2833,
273,
315,
5357,
30,
2252,
3956,
4678,
4820,
306,
2116,
65,
411,
712,
261,
26287,
17,
8206,
17,
569... |
} else if (spaces == 1 || spaces == 3) { | } else if (leading) { | private void normalizeWhitespace( XMLString value, boolean collapse) { boolean skipSpace = collapse; boolean sawNonWS = false; int leading = 0; int trailing = 0; char c; int size = value.offset+value.length; // ensure the ch array is big enough if (fNormalizedStr.ch == null || fNormalizedStr.ch.length < value.length+1) { fNormalizedStr.ch = new char[value.length+1]; } // don't include the leading ' ' for now. might include it later. fNormalizedStr.offset = 1; fNormalizedStr.length = 1; for (int i = value.offset; i < size; i++) { c = value.ch[i]; if (XMLChar.isSpace(c)) { if (!skipSpace) { // take the first whitespace as a space and skip the others fNormalizedStr.ch[fNormalizedStr.length++] = ' '; skipSpace = collapse; } if (!sawNonWS) { // this is a leading whitespace, record it leading = 1; } } else { fNormalizedStr.ch[fNormalizedStr.length++] = c; skipSpace = false; sawNonWS = true; } } if (skipSpace) { if ( fNormalizedStr.length > 1) { // if we finished on a space trim it but also record it fNormalizedStr.length--; trailing = 2; } else if (leading != 0 && !sawNonWS) { // if all we had was whitespace we skipped record it as // trailing whitespace as well trailing = 2; } } // 0 if no triming is done or if there is neither leading nor // trailing whitespace, // 1 if there is only leading whitespace, // 2 if there is only trailing whitespace, // 3 if there is both leading and trailing whitespace. int spaces = collapse ? leading + trailing : 0; if (fNormalizedStr.length > 1) { if (!fFirstChunk && (fWhiteSpace==XSSimpleType.WS_COLLAPSE) ) { if (fTrailing) { // previous chunk ended on whitespace // insert whitespace fNormalizedStr.offset = 0; fNormalizedStr.ch[0] = ' '; } else if (spaces == 1 || spaces == 3) { // previous chunk ended on character, // this chunk starts with whitespace fNormalizedStr.offset = 0; fNormalizedStr.ch[0] = ' '; } } } // The length includes the leading ' '. Now removing it. fNormalizedStr.length -= fNormalizedStr.offset; fTrailing = (spaces > 1)?true:false; } | 1831 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1831/b98f15b56745478bc4cbc6d9fb6387bf1f16fa2d/XMLSchemaValidator.java/clean/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
3883,
9431,
12,
3167,
780,
460,
16,
1250,
13627,
13,
288,
3639,
1250,
2488,
3819,
273,
13627,
31,
3639,
1250,
19821,
3989,
2651,
273,
629,
31,
3639,
509,
7676,
273,
374,
31,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
3883,
9431,
12,
3167,
780,
460,
16,
1250,
13627,
13,
288,
3639,
1250,
2488,
3819,
273,
13627,
31,
3639,
1250,
19821,
3989,
2651,
273,
629,
31,
3639,
509,
7676,
273,
374,
31,
... |
if (jj_scan_token(LCURLY)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_scan_token(IDENTIFIER)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3_8()) { jj_scanpos = xsp; break; } if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } if (jj_scan_token(RCURLY)) return true; | if (jj_scan_token(WHITESPACE)) return true; | final private boolean jj_3R_40() { if (jj_scan_token(LCURLY)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_scan_token(IDENTIFIER)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; Token xsp; while (true) { xsp = jj_scanpos; if (jj_3_8()) { jj_scanpos = xsp; break; } if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } if (jj_scan_token(RCURLY)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } | 55820 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55820/e128e4125429834f73621c8aa67036ca877e731e/Parser.java/buggy/src/java/org/apache/velocity/runtime/parser/Parser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
3238,
1250,
10684,
67,
23,
54,
67,
7132,
1435,
288,
565,
309,
261,
78,
78,
67,
9871,
67,
2316,
12,
13394,
1785,
61,
3719,
327,
638,
31,
565,
309,
261,
78,
78,
67,
11821,
422,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
3238,
1250,
10684,
67,
23,
54,
67,
7132,
1435,
288,
565,
309,
261,
78,
78,
67,
9871,
67,
2316,
12,
13394,
1785,
61,
3719,
327,
638,
31,
565,
309,
261,
78,
78,
67,
11821,
422,
3... |
.getDeclaringPluginId(), icon); | .getContribution().getPluginId(), icon); | protected Image retrieveAndStoreImage(String descriptorId) { NavigatorContentDescriptor contentDescriptor = getContentDescriptor(descriptorId); Image image = null; if (contentDescriptor != null) { String icon = contentDescriptor.getIcon(); if (icon != null) { image = getImageRegistry().get(icon); if (image == null || image.isDisposed()) { ImageDescriptor imageDescriptor = AbstractUIPlugin .imageDescriptorFromPlugin(contentDescriptor .getDeclaringPluginId(), icon); if (imageDescriptor != null) { image = imageDescriptor.createImage(); if (image != null) getImageRegistry().put(icon, image); } } } } return image; } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/377029d74a7de25fc7c2c47d145c9fad2b1088ee/NavigatorContentDescriptorManager.java/clean/bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/internal/extensions/NavigatorContentDescriptorManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
3421,
4614,
1876,
2257,
2040,
12,
780,
4950,
548,
13,
288,
202,
202,
22817,
1350,
3187,
913,
3187,
273,
5154,
3187,
12,
12628,
548,
1769,
202,
202,
2040,
1316,
273,
446,
31,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
3421,
4614,
1876,
2257,
2040,
12,
780,
4950,
548,
13,
288,
202,
202,
22817,
1350,
3187,
913,
3187,
273,
5154,
3187,
12,
12628,
548,
1769,
202,
202,
2040,
1316,
273,
446,
31,
... |
cs.bits[byteIndex1] |= ((int)(0xFF) >> (7 - (c2 - c1))) << c1; | cs.bits[byteIndex1] |= ((0xFF) >> (7 - (c2 - c1))) << c1; | addCharacterRangeToCharSet(RECharSet cs, char c1, char c2) { int i; int byteIndex1 = (int)(c1 / 8); int byteIndex2 = (int)(c2 / 8); if ((c2 > cs.length) || (c1 > c2)) throw new RuntimeException(); c1 &= 0x7; c2 &= 0x7; if (byteIndex1 == byteIndex2) { cs.bits[byteIndex1] |= ((int)(0xFF) >> (7 - (c2 - c1))) << c1; } else { cs.bits[byteIndex1] |= 0xFF << c1; for (i = byteIndex1 + 1; i < byteIndex2; i++) cs.bits[i] = (byte)0xFF; cs.bits[byteIndex2] |= (int)(0xFF) >> (7 - c2); } } | 51275 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51275/b89a57f20272e030777780f6c2063bca3617100d/NativeRegExp.java/clean/js/rhino/src/org/mozilla/javascript/regexp/NativeRegExp.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
527,
7069,
2655,
774,
2156,
694,
12,
862,
2156,
694,
2873,
16,
1149,
276,
21,
16,
1149,
276,
22,
13,
565,
288,
3639,
509,
277,
31,
3639,
509,
1160,
1016,
21,
273,
261,
474,
21433,
71,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
527,
7069,
2655,
774,
2156,
694,
12,
862,
2156,
694,
2873,
16,
1149,
276,
21,
16,
1149,
276,
22,
13,
565,
288,
3639,
509,
277,
31,
3639,
509,
1160,
1016,
21,
273,
261,
474,
21433,
71,... |
this.context = new SimpleReadOnlyContext(context); | this.context = EnterpriseNamingContext.createEnterpriseNamingContext(context); | public StaticJndiContextPlugin(Map context, Kernel kernel, ClassLoader classLoader) throws NamingException { // create ReadOnlyContext for (Iterator iterator = context.values().iterator(); iterator.hasNext();) { Object value = iterator.next(); if (value instanceof KernelAwareReference) { ((KernelAwareReference) value).setKernel(kernel); } if (value instanceof ClassLoaderAwareReference) { ((ClassLoaderAwareReference) value).setClassLoader(classLoader); } } this.context = new SimpleReadOnlyContext(context); } | 12474 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12474/a8ce526c9f5631bdeef7eaafccb1817a760e9ec3/StaticJndiContextPlugin.java/buggy/modules/client/src/java/org/apache/geronimo/client/StaticJndiContextPlugin.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
10901,
46,
16564,
1042,
3773,
12,
863,
819,
16,
14556,
5536,
16,
9403,
11138,
13,
1216,
26890,
288,
3639,
368,
752,
20617,
1042,
3639,
364,
261,
3198,
2775,
273,
819,
18,
2372,
7675... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
10901,
46,
16564,
1042,
3773,
12,
863,
819,
16,
14556,
5536,
16,
9403,
11138,
13,
1216,
26890,
288,
3639,
368,
752,
20617,
1042,
3639,
364,
261,
3198,
2775,
273,
819,
18,
2372,
7675... |
contentHandler.processingInstruction(target, data); } | contentHandler.processingInstruction(target, data); } | public void processingInstruction (String target, String data) throws SAXException { if(buffering) { eventTypes.add(new Integer(PROCESSINGINSTRUCTION)); eventArguments.add(new TwoString(target,data)); } else if (contentHandler != null) { contentHandler.processingInstruction(target, data); } } | 1895 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1895/5bd8136256b7a06c2a8f66363fbe38b5e9e9f206/SAX2BufferImpl.java/buggy/source/org/jasig/portal/utils/SAX2BufferImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
4929,
11983,
261,
780,
1018,
16,
514,
501,
13,
1216,
14366,
565,
288,
3639,
309,
12,
4106,
310,
13,
288,
5411,
871,
2016,
18,
1289,
12,
2704,
2144,
12,
16560,
1360,
706,
3902... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4929,
11983,
261,
780,
1018,
16,
514,
501,
13,
1216,
14366,
565,
288,
3639,
309,
12,
4106,
310,
13,
288,
5411,
871,
2016,
18,
1289,
12,
2704,
2144,
12,
16560,
1360,
706,
3902... |
return newFixnum(getRuntime(), 1); | return getRuntime().newFixnum(1); | public RubyNumeric op_pow(RubyNumeric other) { if (other instanceof RubyFloat) { return RubyFloat.newFloat(getRuntime(), getDoubleValue()).op_pow(other); } if (other.getLongValue() == 0) { return newFixnum(getRuntime(), 1); } else if (other.getLongValue() == 1) { return this; } else if (other.getLongValue() > 1) { return RubyBignum.newBignum(getRuntime(), getLongValue()).op_pow(other); } else { return RubyFloat.newFloat(getRuntime(), getDoubleValue()).op_pow(other); } } | 46454 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46454/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubyFixnum.java/buggy/src/org/jruby/RubyFixnum.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19817,
9902,
1061,
67,
23509,
12,
54,
10340,
9902,
1308,
13,
288,
3639,
309,
261,
3011,
1276,
19817,
4723,
13,
288,
5411,
327,
19817,
4723,
18,
2704,
4723,
12,
588,
5576,
9334,
1609... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
23509,
12,
54,
10340,
9902,
1308,
13,
288,
3639,
309,
261,
3011,
1276,
19817,
4723,
13,
288,
5411,
327,
19817,
4723,
18,
2704,
4723,
12,
588,
5576,
9334,
1609... |
elem = location.getCElement(); | elem = info.getCElement(); | private ICElement getCElement(ITypeInfo info) { ITypeReference location = info.getResolvedReference(); if (location == null) { final ITypeInfo[] typesToResolve = new ITypeInfo[] { info }; IRunnableWithProgress runnable = new IRunnableWithProgress() { public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { AllTypesCache.resolveTypeLocation(typesToResolve[0], monitor); if (monitor.isCanceled()) { throw new InterruptedException(); } } }; IRunnableContext runnableContext = new ProgressMonitorDialog(getShell()); try { runnableContext.run(true, true, runnable); } catch (InvocationTargetException e) { String title = OpenTypeMessages.getString("OpenTypeAction.exception.title"); //$NON-NLS-1$ String message = OpenTypeMessages.getString("OpenTypeAction.exception.message"); //$NON-NLS-1$ ExceptionHandler.handle(e, title, message); return null; } catch (InterruptedException e) { // cancelled by user return null; } location = info.getResolvedReference(); } ICElement elem = null; if (location != null) elem = location.getCElement(); if (elem == null) { // could not resolve location String title = OpenTypeMessages.getString("OpenTypeAction.errorTitle"); //$NON-NLS-1$ String message = OpenTypeMessages.getFormattedString("OpenTypeAction.errorTypeNotFound", info.getQualifiedTypeName().toString()); //$NON-NLS-1$ MessageDialog.openError(getShell(), title, message); } return elem; } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/a2e471d3f5a55d6eaddce5da99457a884e4c2cf8/MembersViewContentProvider.java/clean/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/cbrowsing/MembersViewContentProvider.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
26899,
1046,
1927,
1046,
12,
45,
17305,
1123,
13,
288,
202,
202,
45,
7534,
2117,
273,
1123,
18,
588,
12793,
2404,
5621,
202,
202,
430,
261,
3562,
422,
446,
13,
288,
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,
225,
202,
1152,
26899,
1046,
1927,
1046,
12,
45,
17305,
1123,
13,
288,
202,
202,
45,
7534,
2117,
273,
1123,
18,
588,
12793,
2404,
5621,
202,
202,
430,
261,
3562,
422,
446,
13,
288,
1082,
202... |
categoryPageMaps.put( DesignChoiceConstants.DATETIEM_FORMAT_TYPE_SHORT_DATE, | categoryPageMaps.put( DesignChoiceConstants.DATETIEM_FORMAT_TYPE_SHORT_DATE, | private void createCategoryPages( Composite parent ) { categoryPageMaps = new HashMap( ); categoryPageMaps.put( DesignChoiceConstants.DATETIEM_FORMAT_TYPE_UNFORMATTED, getGeneralPage( parent ) ); categoryPageMaps.put( DesignChoiceConstants.DATETIEM_FORMAT_TYPE_GENERAL_DATE, getGeneralPage( parent ) ); categoryPageMaps.put( DesignChoiceConstants.DATETIEM_FORMAT_TYPE_LONG_DATE, getGeneralPage( parent ) ); categoryPageMaps.put( DesignChoiceConstants.DATETIEM_FORMAT_TYPE_MUDIUM_DATE, getGeneralPage( parent ) ); categoryPageMaps.put( DesignChoiceConstants.DATETIEM_FORMAT_TYPE_SHORT_DATE, getGeneralPage( parent ) ); categoryPageMaps.put( DesignChoiceConstants.DATETIEM_FORMAT_TYPE_LONG_TIME, getGeneralPage( parent ) ); categoryPageMaps.put( DesignChoiceConstants.DATETIEM_FORMAT_TYPE_MEDIUM_TIME, getGeneralPage( parent ) ); categoryPageMaps.put( DesignChoiceConstants.DATETIEM_FORMAT_TYPE_SHORT_TIME, getGeneralPage( parent ) ); categoryPageMaps.put( DesignChoiceConstants.DATETIEM_FORMAT_TYPE_CUSTOM, getCustomPage( parent ) ); } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/7a9d1903e4a62501d41fdc20dd59c3d00f4b0a51/FormatDateTimePage.java/clean/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/dialogs/FormatDateTimePage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
752,
4457,
5716,
12,
14728,
982,
262,
202,
95,
202,
202,
4743,
1964,
8903,
273,
394,
4317,
12,
11272,
202,
202,
4743,
1964,
8903,
18,
458,
12,
29703,
10538,
2918,
18,
11... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
752,
4457,
5716,
12,
14728,
982,
262,
202,
95,
202,
202,
4743,
1964,
8903,
273,
394,
4317,
12,
11272,
202,
202,
4743,
1964,
8903,
18,
458,
12,
29703,
10538,
2918,
18,
11... |
System.out.println("vbase = " + vbase); System.out.println("vframe = " + vframe); System.out.println("varsStack.size() = " + varsStack.size()); | public void printInternalState() { System.out.println("-------------------------------------"); System.out.println("AbstractTranslet this = " + this); System.out.println("vbase = " + vbase); System.out.println("vframe = " + vframe); System.out.println("varsStack.size() = " + varsStack.size()); System.out.println("pbase = " + pbase); System.out.println("vframe = " + pframe); System.out.println("paramsStack.size() = " + paramsStack.size()); System.out.println("namesArray.size = " + namesArray.length); System.out.println("namespaceArray.size = " + namespaceArray.length); System.out.println(""); System.out.println("Total memory = " + Runtime.getRuntime().totalMemory()); } | 2723 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2723/00a93536f5d540e84d3bba1a356b60bc17fb7bef/AbstractTranslet.java/buggy/src/org/apache/xalan/xsltc/runtime/AbstractTranslet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1172,
3061,
1119,
1435,
288,
202,
3163,
18,
659,
18,
8222,
2932,
2443,
13465,
8863,
202,
3163,
18,
659,
18,
8222,
2932,
7469,
1429,
1810,
333,
273,
315,
397,
333,
1769,
202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1172,
3061,
1119,
1435,
288,
202,
3163,
18,
659,
18,
8222,
2932,
2443,
13465,
8863,
202,
3163,
18,
659,
18,
8222,
2932,
7469,
1429,
1810,
333,
273,
315,
397,
333,
1769,
202,
... | |
protected Control createProductAttributes(Composite control) { GridData gd; GridLayout layout; // Search expression Group group = new Group(control, SWT.NONE); layout = new GridLayout(); layout.numColumns = 4; group.setLayout(layout); gd = new GridData(GridData.FILL_HORIZONTAL); gd.horizontalSpan = 5; group.setLayoutData(gd); // Labels Label label = new Label(group, SWT.LEFT); label.setText("Product"); label = new Label(group, SWT.LEFT); label.setText("Component"); label = new Label(group, SWT.LEFT); label.setText("Version"); label = new Label(group, SWT.LEFT); label.setText("Milestone"); // Lists product = new List(group, SWT.MULTI | SWT.V_SCROLL | SWT.BORDER); gd = new GridData(GridData.FILL_HORIZONTAL); gd.heightHint = 40; product.setLayoutData(gd); component = new List(group, SWT.MULTI | SWT.V_SCROLL | SWT.BORDER); gd = new GridData(GridData.FILL_HORIZONTAL); gd.heightHint = 40; component.setLayoutData(gd); version = new List(group, SWT.MULTI | SWT.V_SCROLL | SWT.BORDER); gd = new GridData(GridData.FILL_HORIZONTAL); gd.heightHint = 40; version.setLayoutData(gd); target = new List(group, SWT.MULTI | SWT.V_SCROLL | SWT.BORDER); gd = new GridData(GridData.FILL_HORIZONTAL); gd.heightHint = 40; target.setLayoutData(gd); return group; } | 51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/fec7424c90714d3bb3e31f7fbe0ed914b805a795/BugzillaSearchPage.java/clean/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/search/BugzillaSearchPage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
8888,
752,
4133,
2498,
12,
9400,
3325,
13,
288,
202,
202,
6313,
751,
15551,
31,
202,
202,
6313,
3744,
3511,
31,
9506,
202,
759,
5167,
2652,
202,
202,
1114,
1041,
273,
394,
37... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
8888,
752,
4133,
2498,
12,
9400,
3325,
13,
288,
202,
202,
6313,
751,
15551,
31,
202,
202,
6313,
3744,
3511,
31,
9506,
202,
759,
5167,
2652,
202,
202,
1114,
1041,
273,
394,
37... | ||
return "Class name '#ref' is the same as one of it's superclass' names #loc"; | return "Class name '#ref' is the same as one of its superclass' names #loc"; | public String buildErrorString(PsiElement location) { return "Class name '#ref' is the same as one of it's superclass' names #loc"; } | 56627 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56627/5aa35b2df570765c60519b186a4c55bd7ac791a6/ClassNameSameAsAncestorNameInspection.java/buggy/plugins/InspectionGadgets/src/com/siyeh/ig/naming/ClassNameSameAsAncestorNameInspection.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
1361,
668,
780,
12,
52,
7722,
1046,
2117,
13,
288,
3639,
327,
315,
797,
508,
2946,
1734,
11,
353,
326,
1967,
487,
1245,
434,
2097,
12098,
11,
1257,
468,
1829,
14432,
565,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
1361,
668,
780,
12,
52,
7722,
1046,
2117,
13,
288,
3639,
327,
315,
797,
508,
2946,
1734,
11,
353,
326,
1967,
487,
1245,
434,
2097,
12098,
11,
1257,
468,
1829,
14432,
565,
289... |
if( allEmpty ) { cs.clear(); cs.append(make.Sequence(choices[0].pos, Tree.EMPTY_ARRAY)); } | TreeList flattenAlternativeChildren( Tree[] choices ) { TreeList cs = new TreeList(); for( int j = 0; j < choices.length; j++ ) { Tree tree = flattenAlternative( choices[ j ] ); // flatten child switch( tree ) { case Alternative( Tree[] child_choices ): appendNonEmpty( cs, child_choices ); break; default: appendNonEmpty( cs, tree ); } } //System.out.println( cs.length() ); return cs; } | 9617 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9617/bd4b89dfb4d2d52ae05900446dfaebe485dda840/PatternNormalizer.java/buggy/sources/scalac/ast/parser/PatternNormalizer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
309,
12,
777,
1921,
262,
288,
2873,
18,
8507,
5621,
2873,
18,
6923,
12,
6540,
18,
4021,
12,
11937,
63,
20,
8009,
917,
16,
4902,
18,
13625,
67,
8552,
10019,
289,
309,
12,
777,
1921,
262,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
309,
12,
777,
1921,
262,
288,
2873,
18,
8507,
5621,
2873,
18,
6923,
12,
6540,
18,
4021,
12,
11937,
63,
20,
8009,
917,
16,
4902,
18,
13625,
67,
8552,
10019,
289,
309,
12,
777,
1921,
262,
28... | |
try { setDisabled(((Boolean) evalAttr("disabled", getDisabledExpr(), Boolean.class)). booleanValue()); } catch (NullAttributeException ex) { } | if ((string = EvalHelper.evalString("altKey", getAltKeyExpr(), this, pageContext)) != null) setAltKey(string); | private void evaluateExpressions() throws JspException { try { setAccesskey((String) evalAttr("accesskey", getAccesskeyExpr(), String.class)); } catch (NullAttributeException ex) { } try { setAccept((String) evalAttr("accept", getAcceptExpr(), String.class)); } catch (NullAttributeException ex) { } try { setAlt((String) evalAttr("alt", getAltExpr(), String.class)); } catch (NullAttributeException ex) { } try { setAltKey((String) evalAttr("altKey", getAltKeyExpr(), String.class)); } catch (NullAttributeException ex) { } try { setDisabled(((Boolean) evalAttr("disabled", getDisabledExpr(), Boolean.class)). booleanValue()); } catch (NullAttributeException ex) { } try { setIndexed(((Boolean) evalAttr("indexed", getIndexedExpr(), Boolean.class)). booleanValue()); } catch (NullAttributeException ex) { } try { setMaxlength((String) evalAttr("maxlength", getMaxlengthExpr(), String.class)); } catch (NullAttributeException ex) { } try { setName((String) evalAttr("name", getNameExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOnblur((String) evalAttr("onblur", getOnblurExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOnchange((String) evalAttr("onchange", getOnchangeExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOnclick((String) evalAttr("onclick", getOnclickExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOndblclick((String) evalAttr("ondblclick", getOndblclickExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOnfocus((String) evalAttr("onfocus", getOnfocusExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOnkeydown((String) evalAttr("onkeydown", getOnkeydownExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOnkeypress((String) evalAttr("onkeypress", getOnkeypressExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOnkeyup((String) evalAttr("onkeyup", getOnkeyupExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOnmousedown((String) evalAttr("onmousedown", getOnmousedownExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOnmousemove((String) evalAttr("onmousemove", getOnmousemoveExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOnmouseout((String) evalAttr("onmouseout", getOnmouseoutExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOnmouseover((String) evalAttr("onmouseover", getOnmouseoverExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOnmouseup((String) evalAttr("onmouseup", getOnmouseupExpr(), String.class)); } catch (NullAttributeException ex) { } try { setProperty((String) evalAttr("property", getPropertyExpr(), String.class)); } catch (NullAttributeException ex) { } try { setSize((String) evalAttr("size", getSizeExpr(), String.class)); } catch (NullAttributeException ex) { } try { setStyle((String) evalAttr("style", getStyleExpr(), String.class)); } catch (NullAttributeException ex) { } try { setStyleClass((String) evalAttr("styleClass", getStyleClassExpr(), String.class)); } catch (NullAttributeException ex) { } try { setStyleId((String) evalAttr("styleId", getStyleIdExpr(), String.class)); } catch (NullAttributeException ex) { } try { setTabindex((String) evalAttr("tabindex", getTabindexExpr(), String.class)); } catch (NullAttributeException ex) { } try { setTitle((String) evalAttr("title", getTitleExpr(), String.class)); } catch (NullAttributeException ex) { } try { setTitleKey((String) evalAttr("titleKey", getTitleKeyExpr(), String.class)); } catch (NullAttributeException ex) { } try { setValue((String) evalAttr("value", getValueExpr(), String.class)); } catch (NullAttributeException ex) { } } | 48068 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48068/022bd23c954cf673e53731849d562b3c295473f1/ELFileTag.java/buggy/contrib/struts-el/src/share/org/apache/strutsel/taglib/html/ELFileTag.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
5956,
8927,
1435,
1216,
27485,
288,
3639,
775,
288,
5411,
444,
1862,
856,
12443,
780,
13,
5302,
3843,
2932,
3860,
856,
3113,
21909,
856,
4742,
9334,
4766,
6647,
514,
18,
1106,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
5956,
8927,
1435,
1216,
27485,
288,
3639,
775,
288,
5411,
444,
1862,
856,
12443,
780,
13,
5302,
3843,
2932,
3860,
856,
3113,
21909,
856,
4742,
9334,
4766,
6647,
514,
18,
1106,
... |
node.nodeUpdater = new NodeUpdater(node , sc.getBoolean("autoupdate"), new FreenetURI(sc.getString("URI")), new FreenetURI(sc.getString("revocationURI"))); | node.nodeUpdater = new NodeUpdater(node , false, new FreenetURI(NodeUpdater.UPDATE_URI), new FreenetURI(NodeUpdater.REVOCATION_URI)); | public void set(boolean val) throws InvalidConfigValueException { synchronized (node) { if(val == get()) return; if(val){ try{ SubConfig sc = nodeConfig.get("node.updater"); if(node.nodeUpdater != null) node.nodeUpdater.kill(); node.nodeUpdater = new NodeUpdater(node , sc.getBoolean("autoupdate"), new FreenetURI(sc.getString("URI")), new FreenetURI(sc.getString("revocationURI"))); Logger.normal(this, "Starting up the node updater"); }catch (Exception e){ Logger.error(this, "unable to start the node updater up "+e); e.printStackTrace(); throw new InvalidConfigValueException("Unable to enable the Node Updater "+e); } }else{ node.nodeUpdater.kill(); Logger.normal(this, "Shutting down the node updater"); } } } | 51834 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51834/076b0867c113941335061363716c84e84918007c/UpdaterEnabledCallback.java/buggy/src/freenet/node/updater/UpdaterEnabledCallback.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
444,
12,
6494,
1244,
13,
1216,
1962,
809,
9738,
288,
202,
202,
22043,
261,
2159,
13,
288,
1082,
202,
430,
12,
1125,
422,
336,
10756,
327,
31,
1082,
202,
430,
12,
1125,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
444,
12,
6494,
1244,
13,
1216,
1962,
809,
9738,
288,
202,
202,
22043,
261,
2159,
13,
288,
1082,
202,
430,
12,
1125,
422,
336,
10756,
327,
31,
1082,
202,
430,
12,
1125,
... |
} | } | public DefaultMutableTreeNode getLastLeaf() { // Variables TreeNode current; int size; current = this; size = current.getChildCount(); while (size > 0) { current = current.getChildAt(size - 1); size = current.getChildCount(); } // while return (DefaultMutableTreeNode) current; } // getLastLeaf() | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/9e763280cf1369c9681ea91b32ae758840a76dc3/DefaultMutableTreeNode.java/clean/core/src/classpath/javax/javax/swing/tree/DefaultMutableTreeNode.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2989,
19536,
12513,
7595,
9858,
1435,
288,
202,
202,
759,
23536,
202,
202,
12513,
202,
2972,
31,
202,
202,
474,
1082,
202,
1467,
31,
202,
202,
2972,
273,
333,
31,
202,
202,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2989,
19536,
12513,
7595,
9858,
1435,
288,
202,
202,
759,
23536,
202,
202,
12513,
202,
2972,
31,
202,
202,
474,
1082,
202,
1467,
31,
202,
202,
2972,
273,
333,
31,
202,
202,
14... |
public void paintBackground(Context c, Box box) { Box block = box; // cache the background color getBackgroundColor(c, block); // get the css properties String back_image = c.css.getStringProperty(block.getElement(), "background-image", false); block.repeat = c.css.getStringProperty(block.getElement(), "background-repeat"); block.attachment = c.css.getStringProperty(block.getElement(), "background-attachment",false); // handle image positioning issues // need to update this to support vert and horz, not just vert if(c.css.hasProperty(block.getElement(),"background-position",false)) { Point pt = c.css.getFloatPairProperty(block.getElement(),"background-position",false); block.background_position_horizontal = (int)pt.getX(); block.background_position_vertical = (int)pt.getY(); } // load the background image block.background_image = null; if (back_image != null && !"none".equals(back_image)) { try { block.background_image = ImageUtil.loadImage(c,back_image); } catch (Exception ex) { ex.printStackTrace(); u.p(ex); } /* ImageIcon icon = new ImageIcon(back_image); if(icon.getImageLoadStatus() == MediaTracker.COMPLETE) { block.background_image = icon.getImage(); } */ } // actually paint the background BackgroundPainter.paint(c, block); } | 52947 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52947/07ab625b03cad242caa27ac48e830592130b24a1/BoxLayout.java/buggy/src/java/org/joshy/html/BoxLayout.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
6459,
84,
1598,
8199,
12,
1042,
71,
16,
3514,
2147,
15329,
3514,
2629,
33,
2147,
31,
759,
17703,
546,
73,
9342,
3266,
588,
21699,
12,
71,
16,
2629,
1769,
759,
588,
451,
557,
1049,
4738... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
6459,
84,
1598,
8199,
12,
1042,
71,
16,
3514,
2147,
15329,
3514,
2629,
33,
2147,
31,
759,
17703,
546,
73,
9342,
3266,
588,
21699,
12,
71,
16,
2629,
1769,
759,
588,
451,
557,
1049,
4738... | ||
public static IChoiceSet getDEChoiceSet( String property ) { | public static IChoiceSet getDEChoiceSet(String property) { | public static IChoiceSet getDEChoiceSet( String property ) { String unitKey = DesignChoiceConstants.CHOICE_UNITS; if ( AttributeConstant.BACKGROUND_COLOR.equals( property ) ) { unitKey = IColorConstants.COLORS_CHOICE_SET; } else if ( AttributeConstant.FONT_COLOR.equals( property ) ) { unitKey = IColorConstants.COLORS_CHOICE_SET; } else if ( AttributeConstant.FONT_SIZE.equals( property ) ) { unitKey = DesignChoiceConstants.CHOICE_FONT_SIZE; } else if ( AttributeConstant.FONT_FAMILY.equals( property ) ) { unitKey = DesignChoiceConstants.CHOICE_FONT_FAMILY; } else if ( AttributeConstant.TEXT_FORMAT.equals( property ) ) { unitKey = DesignChoiceConstants.CHOICE_TEXT_CONTENT_TYPE; } else if ( AttributeConstant.BORDER_STYLE.equals( property ) ) { unitKey = DesignChoiceConstants.CHOICE_LINE_STYLE; } else if ( AttributeConstant.BORDER_WIDTH.equals( property ) ) { unitKey = DesignChoiceConstants.CHOICE_LINE_WIDTH; } else if ( SortKey.DIRECTION_MEMBER.equals( property ) ) { unitKey = DesignChoiceConstants.CHOICE_SORT_DIRECTION; } else if ( FilterCondition.OPERATOR_MEMBER.equals( property ) ) { unitKey = DesignChoiceConstants.CHOICE_FILTER_OPERATOR; } else if ( StyleHandle.VERTICAL_ALIGN_PROP.equals( property ) ) { unitKey = DesignChoiceConstants.CHOICE_VERTICAL_ALIGN; } else if ( StyleHandle.TEXT_ALIGN_PROP.equals( property ) ) { unitKey = DesignChoiceConstants.CHOICE_TEXT_ALIGN; } else if ( MasterPageHandle.ORIENTATION_PROP.equals( property ) ) { unitKey = DesignChoiceConstants.CHOICE_PAGE_ORIENTATION; } else if ( MasterPageHandle.TYPE_PROP.equals( property ) ) { unitKey = DesignChoiceConstants.CHOICE_PAGE_SIZE; } else if ( GroupHandle.INTERVAL_PROP.equals( property ) ) { unitKey = DesignChoiceConstants.CHOICE_INTERVAL; } else if ( StyleHandle.PAGE_BREAK_BEFORE_PROP.equals( property ) ) { unitKey = DesignChoiceConstants.CHOICE_PAGE_BREAK; } else if ( StyleHandle.PAGE_BREAK_AFTER_PROP.equals( property ) ) { unitKey = DesignChoiceConstants.CHOICE_PAGE_BREAK; } else if ( StyleHandle.PAGE_BREAK_INSIDE_PROP.equals( property ) ) { unitKey = DesignChoiceConstants.CHOICE_PAGE_BREAK_INSIDE; } return DesignEngine.getMetaDataDictionary( ).getChoiceSet( unitKey ); } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/4d78f7686771fae0403ed68a06a850b0f45d97fa/ChoiceSetFactory.java/buggy/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/ui/views/attributes/providers/ChoiceSetFactory.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
467,
10538,
694,
336,
1639,
10538,
694,
12,
514,
1272,
262,
202,
95,
202,
202,
780,
2836,
653,
273,
29703,
10538,
2918,
18,
22213,
11774,
67,
24325,
31,
202,
202,
430,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
467,
10538,
694,
336,
1639,
10538,
694,
12,
514,
1272,
262,
202,
95,
202,
202,
780,
2836,
653,
273,
29703,
10538,
2918,
18,
22213,
11774,
67,
24325,
31,
202,
202,
430,
26... |
System.out.println("Showing view " + viewName); | private void setView(String viewName) { System.out.println("Showing view " + viewName); viewPanelLayout.show(viewPanel, viewName); if (viewName.equals("BugTree")) checkBugDetailsVisibility(); currentView = viewName; } | 10715 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10715/64f364efc27b968619d694494c7342723f14236c/FindBugsFrame.java/clean/findbugs/src/java/edu/umd/cs/findbugs/gui/FindBugsFrame.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
19923,
12,
780,
22244,
13,
288,
7734,
1476,
5537,
3744,
18,
4500,
12,
1945,
5537,
16,
22244,
1769,
3639,
309,
261,
1945,
461,
18,
14963,
2932,
19865,
2471,
6,
3719,
5411,
866,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
19923,
12,
780,
22244,
13,
288,
7734,
1476,
5537,
3744,
18,
4500,
12,
1945,
5537,
16,
22244,
1769,
3639,
309,
261,
1945,
461,
18,
14963,
2932,
19865,
2471,
6,
3719,
5411,
866,
... | |
public String getInstance() { | public String getInstance() { | public String getInstance() { return instance; } | 439 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/439/3f94e4dfe13a5d8efcccafc519c8b3ba326f7af5/TdsDataSource.java/clean/trunk/jtds/src/main/net/sourceforge/jtds/jdbcx/TdsDataSource.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
3694,
1435,
565,
288,
3639,
327,
791,
31,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
3694,
1435,
565,
288,
3639,
327,
791,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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.