rem
stringlengths
1
53.3k
add
stringlengths
0
80.5k
context
stringlengths
6
326k
meta
stringlengths
141
403
input_ids
list
attention_mask
list
labels
list
public Object fetch(Object[] fields,Object identity)
public Object fetch(Object[] fields,Object identity)
public Object fetch(Object[] fields,Object identity) throws ObjectNotFoundException, PersistenceException { int count; Object stamp = null; boolean newId = false; Object[] sqlIdentity = new Object[_engine._ids.length]; try { // Load all the fields of the object including one-one relations Object[] temp = new Object[10]; // bad pratice, assume complex field smaller than 10 count = _engine._ids.length; // load all the fields for ( int i = 0 ; i < _engine._fields.length ; ++i ) { if ( !_engine._fields[i].load ) continue; if ( !_engine._fields[i].multi ) { boolean notNull = false; if ( _engine._fields[i].columns.length == 1 ) { Object value = _engine.toJava( i, 0, SQLTypes.getObject( _rs, count++, _engine._fields[i].columns[0].sqlType ) ); if ( !_rs.wasNull() ) fields[i] = value; else fields[i] = null; } else { Complex inner = (Complex) fields[i]; for ( int j=0; j<_engine._fields[i].columns.length; j++ ) { Object value = _engine.toJava( i, j, SQLTypes.getObject( _rs, count++, _engine._fields[i].columns[j].sqlType ) ); if ( !_rs.wasNull() ) { temp[j] = value ; notNull = true; } else { temp[j] = null; } } fields[i] = null; if ( notNull ) fields[i] = new Complex( _engine._fields[i].columns.length, temp ); } } else { ArrayList res = new ArrayList(); boolean notNull = false; for ( int j=0; j<_engine._fields[i].columns.length; j++ ) { Object value = _engine.toJava( i, j, SQLTypes.getObject( _rs, count, _engine._fields[i].columns[j].sqlType ) ); if ( !_rs.wasNull() ) { temp[j] = value; notNull = true; } else { temp[j] = null; } count++; } if ( notNull ) { if ( _engine._fields[i].columns.length == 1 ) res.add( temp[0] ); else res.add( new Complex( _engine._fields[i].columns.length, temp ) ); } fields[i] = res; } } // add other one-to-many fields if ( !_resultSetDone && _rs.next() ) { count = 1; if ( _lastIdentity == null ) _lastIdentity = new Object[_engine._ids.length]; // check if the table row consists data of the interested identity for ( int i=0; i<_lastIdentity.length; i++ ) { Object o = SQLTypes.getObject( _rs, count, _identSqlType[i] ); if ( !o.equals( sqlIdentity[i] ) ) { newId = true; _lastIdentity[i] = o; } count++; } // move forward in the ResultSet, until we see // another identity while ( !newId ) { for ( int i = 0 ; i < _engine._fields.length ; ++i ) { if ( !_engine._fields[i].load ) continue; if ( _engine._fields[i].multi ) { ArrayList res = (ArrayList)fields[i]; boolean notNull = false; for ( int j=0; j<_engine._fields[i].columns.length; j++ ) { Object value = _engine.toJava( i, j, SQLTypes.getObject( _rs, count, _engine._fields[i].columns[j].sqlType ) ); if ( !_rs.wasNull() ) { temp[j] = value ; notNull = true; } else { temp[j] = null; } count++; } if ( notNull ) { if ( _engine._fields[i].columns.length == 1 ) { if ( !res.contains( temp[0] ) ) res.add( temp[0] ); } else { Complex com = new Complex( _engine._fields[i].columns.length, temp ); if ( !res.contains( com ) ) res.add( new Complex( _engine._fields[i].columns.length, temp ) ); } } } else { // non-multi fields have to be done one only // so, skip to next count += _engine._fields[i].columns.length; } } if ( _rs.next() ) { // check if the table row consists data of the interested identity for ( int i=0; i<_lastIdentity.length; i++ ) { Object o = SQLTypes.getObject( _rs, count, _identSqlType[i] ); if ( !o.equals( sqlIdentity[i] ) ) { newId = true; _lastIdentity[i] = o; } count++; } } else { _resultSetDone = true; _lastIdentity = null; } } } else { _lastIdentity = null; _resultSetDone = true; } } catch ( SQLException except ) { throw new PersistenceException( Messages.format("persist.nested", except) ); } return stamp; }
3614 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3614/de4eb7bb5d2ecddf85d11a2b5cf8b69f388e96a3/SQLEngine.java/buggy/trunk/castor-2002/castor/src/main/org/exolab/castor/jdo/engine/SQLEngine.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 540, 1071, 1033, 2158, 12, 921, 8526, 1466, 16, 921, 4215, 13, 1171, 1216, 1033, 3990, 16, 13381, 503, 288, 5411, 509, 565, 1056, 31, 5411, 1033, 14429, 273, 446, 31, 5411, 1250, 27598, 273, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 540, 1071, 1033, 2158, 12, 921, 8526, 1466, 16, 921, 4215, 13, 1171, 1216, 1033, 3990, 16, 13381, 503, 288, 5411, 509, 565, 1056, 31, 5411, 1033, 14429, 273, 446, 31, 5411, 1250, 27598, 273, ...
try { setOnkeydown((String) evalAttr("onkeydown", getOnkeydownExpr(), String.class)); } catch (NullAttributeException ex) { }
if ((string = EvalHelper.evalString("onfocus", getOnfocusExpr(), this, pageContext)) != null) setOnfocus(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 { 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 { setReadonly(((Boolean) evalAttr("readonly", getReadonlyExpr(), Boolean.class)). booleanValue()); } catch (NullAttributeException ex) { } try { setStyle((String) evalAttr("style", getStyleExpr(), String.class)); } catch (NullAttributeException ex) { } try { setSize((String) evalAttr("size", getSizeExpr(), 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/ELTextTag.java/clean/contrib/struts-el/src/share/org/apache/strutsel/taglib/html/ELTextTag.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, ...
templateIdScopes.pop();
templateIdScopes.pop();
protected List templateArgumentList() throws EndOfFileException, BacktrackException { IToken start = LA(1); int startingOffset = start.getOffset(); int endOffset = 0; start = null; List list = new ArrayList(); boolean completedArg = false; boolean failed = false; templateIdScopes.push(IToken.tLT); while (LT(1) != IToken.tGT && LT(1) != IToken.tEOC) { completedArg = false; IToken mark = mark(); try { IASTTypeId typeId = typeId(false, false); list.add(typeId); completedArg = true; } catch (BacktrackException e) { backup(mark); } /* * catch (ASTSemanticException e) { backup(mark); } */ if (!completedArg) { try { IASTExpression expression = assignmentExpression(); list.add(expression); completedArg = true; } catch (BacktrackException e) { backup(mark); } } if (LT(1) == IToken.tCOMMA) { consume(); } else if (LT(1) != IToken.tGT && LT(1) != IToken.tEOC) { failed = true; endOffset = LA(1).getEndOffset(); break; } } templateIdScopes.pop(); if (failed) throwBacktrack(startingOffset, endOffset - startingOffset); return list; }
54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/c4c31b724fe73e8f69d2d4f9fcd98d3ff359a2d3/GNUCPPSourceParser.java/clean/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GNUCPPSourceParser.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1117, 987, 1542, 1379, 682, 1435, 1216, 4403, 951, 812, 503, 16, 1082, 202, 2711, 4101, 503, 288, 202, 202, 1285, 969, 787, 273, 2928, 12, 21, 1769, 202, 202, 474, 5023, 2335, 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, 1117, 987, 1542, 1379, 682, 1435, 1216, 4403, 951, 812, 503, 16, 1082, 202, 2711, 4101, 503, 288, 202, 202, 1285, 969, 787, 273, 2928, 12, 21, 1769, 202, 202, 474, 5023, 2335, 273,...
return new PipeSpec[0];
return pipeSpec;
protected PipeSpec[] getPipeSpecs() { return new PipeSpec[0]; }
49954 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49954/8fd3d5010acab502bb6f2b795ec89c1eff32abb4/AirgapTransformImpl.java/clean/tran/airgap/main/com/metavize/tran/airgap/AirgapTransformImpl.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 20024, 1990, 8526, 1689, 3151, 15999, 1435, 565, 288, 3639, 327, 6010, 1990, 31, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 20024, 1990, 8526, 1689, 3151, 15999, 1435, 565, 288, 3639, 327, 6010, 1990, 31, 565, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
log.error( "EntityGroupNameFinderFactory.newFinder(): " + e); throw new GroupsException(e.getMessage());
log.error(e.getMessage(), e); throw new GroupsException(e);
public IEntityNameFinder newFinder () throws GroupsException { try { return EntityGroupNameFinder.singleton(); } catch (Exception e) { log.error( "EntityGroupNameFinderFactory.newFinder(): " + e); throw new GroupsException(e.getMessage()); } }
1895 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1895/948a50c00c52659556ab3183d5ea2e316077d789/EntityGroupNameFinderFactory.java/buggy/source/org/jasig/portal/groups/EntityGroupNameFinderFactory.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 467, 19441, 8441, 394, 8441, 1832, 1216, 14712, 503, 288, 3639, 775, 288, 5411, 327, 225, 3887, 3943, 8441, 18, 24487, 5621, 3639, 289, 1044, 261, 503, 425, 13, 288, 5411, 613, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 467, 19441, 8441, 394, 8441, 1832, 1216, 14712, 503, 288, 3639, 775, 288, 5411, 327, 225, 3887, 3943, 8441, 18, 24487, 5621, 3639, 289, 1044, 261, 503, 425, 13, 288, 5411, 613, 18, ...
return s22; case 21:
public DFA.State transition(IntStream input) throws RecognitionException { switch ( input.LA(1) ) { case 49: return s16; case EOL: case 15: return s21; case ID: return s22; case 21: return s23; default: NoViableAltException nvae = new NoViableAltException("", 4, 13, input); throw nvae; } }
31577 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/31577/35c3932466a0269c296ae52afa8a1f8048a309d2/RuleParser.java/buggy/drools-compiler/src/main/java/org/drools/lang/RuleParser.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 2398, 1071, 463, 2046, 18, 1119, 6007, 12, 1702, 1228, 810, 13, 1216, 9539, 288, 7734, 1620, 261, 810, 18, 2534, 12, 21, 13, 262, 288, 7734, 648, 17160, 30, 10792, 327, 272, 2313, 31, 7734, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 2398, 1071, 463, 2046, 18, 1119, 6007, 12, 1702, 1228, 810, 13, 1216, 9539, 288, 7734, 1620, 261, 810, 18, 2534, 12, 21, 13, 262, 288, 7734, 648, 17160, 30, 10792, 327, 272, 2313, 31, 7734, ...
public org.quickfix.field.BidDescriptor getBidDescriptor() throws FieldNotFound { org.quickfix.field.BidDescriptor value = new org.quickfix.field.BidDescriptor();
public quickfix.field.BidDescriptor getBidDescriptor() throws FieldNotFound { quickfix.field.BidDescriptor value = new quickfix.field.BidDescriptor();
public org.quickfix.field.BidDescriptor getBidDescriptor() throws FieldNotFound { org.quickfix.field.BidDescriptor value = new org.quickfix.field.BidDescriptor(); getField(value); return value; }
8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/BidRequest.java/buggy/src/java/src/quickfix/fix44/BidRequest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 2358, 18, 19525, 904, 18, 1518, 18, 17763, 3187, 2882, 350, 3187, 1435, 1216, 2286, 2768, 225, 288, 2358, 18, 19525, 904, 18, 1518, 18, 17763, 3187, 460, 273, 394, 2358, 18, 19525, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 2358, 18, 19525, 904, 18, 1518, 18, 17763, 3187, 2882, 350, 3187, 1435, 1216, 2286, 2768, 225, 288, 2358, 18, 19525, 904, 18, 1518, 18, 17763, 3187, 460, 273, 394, 2358, 18, 19525, ...
buildAction.setActionDefinitionId(buildActionDefId);
private void makeActions() { // The actions in jface do not have menu vs. enable, vs. disable vs. color // There are actions in here being passed the workbench - problem // Get services for notification. IPartService partService = window.getPartService(); WWinKeyBindingService keyBindingService = window.getKeyBindingService(); // Many actions need the workbench. IWorkbench workbench = window.getWorkbench(); newWizardAction = new NewWizardAction(); // images for this action are set in its constructor newWizardDropDownAction = new NewWizardDropDownAction(workbench, newWizardAction); newWizardDropDownAction.setImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_NEW_WIZ)); newWizardDropDownAction.setHoverImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_NEW_WIZ_HOVER)); newWizardDropDownAction.setDisabledImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_NEW_WIZ_DISABLED)); importResourcesAction = new ImportResourcesAction(workbench); importResourcesAction.setImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_IMPORT_WIZ)); importResourcesAction.setHoverImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_IMPORT_WIZ_HOVER)); importResourcesAction.setDisabledImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_IMPORT_WIZ_DISABLED)); exportResourcesAction = new ExportResourcesAction(workbench,WorkbenchMessages.getString("ExportResourcesAction.fileMenuText")); exportResourcesAction.setImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_EXPORT_WIZ)); exportResourcesAction.setHoverImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_EXPORT_WIZ_HOVER)); exportResourcesAction.setDisabledImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_EXPORT_WIZ_DISABLED)); rebuildAllAction = new GlobalBuildAction(window, IncrementalProjectBuilder.FULL_BUILD); // 1G82IWC - a new icon is needed for Rebuild All or Build // rebuildAllAction.setImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_BUILD_EXEC)); // rebuildAllAction.setHoverImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_BUILD_EXEC_HOVER)); // rebuildAllAction.setDisabledImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_BUILD_EXEC_DISABLED)); buildAction = new GlobalBuildAction(window, IncrementalProjectBuilder.INCREMENTAL_BUILD); buildAction.setImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_BUILD_EXEC)); buildAction.setHoverImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_BUILD_EXEC_HOVER)); buildAction.setDisabledImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_BUILD_EXEC_DISABLED)); saveAction = new SaveAction(window); saveAction.setImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_SAVE_EDIT)); saveAction.setHoverImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_SAVE_EDIT_HOVER)); saveAction.setDisabledImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_SAVE_EDIT_DISABLED)); partService.addPartListener(saveAction); saveAction.setActionDefinitionId(saveActionDefId); keyBindingService.registerGlobalAction(saveAction); saveAsAction = new SaveAsAction(window); saveAsAction.setImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_SAVEAS_EDIT)); saveAsAction.setHoverImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_SAVEAS_EDIT_HOVER)); saveAsAction.setDisabledImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_SAVEAS_EDIT_DISABLED)); partService.addPartListener(saveAsAction); saveAllAction = new SaveAllAction(window); saveAllAction.setImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_SAVEALL_EDIT)); saveAllAction.setHoverImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_SAVEALL_EDIT_HOVER)); saveAllAction.setDisabledImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_SAVEALL_EDIT_DISABLED)); partService.addPartListener(saveAllAction); saveAllAction.setActionDefinitionId(saveAllActionDefId); keyBindingService.registerGlobalAction(saveAllAction); undoAction = new LabelRetargetAction(IWorkbenchActionConstants.UNDO, WorkbenchMessages.getString("Workbench.undo")); //$NON-NLS-1$ undoAction.setToolTipText(WorkbenchMessages.getString("Workbench.undoToolTip")); //$NON-NLS-1$ undoAction.setImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_UNDO_EDIT)); undoAction.setHoverImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_UNDO_EDIT_HOVER)); undoAction.setDisabledImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_UNDO_EDIT_DISABLED)); undoAction.setAccelerator(SWT.CTRL | 'z'); partService.addPartListener(undoAction); undoAction.setActionDefinitionId(undoActionDefId); keyBindingService.registerGlobalAction(undoAction); redoAction = new LabelRetargetAction(IWorkbenchActionConstants.REDO, WorkbenchMessages.getString("Workbench.redo")); //$NON-NLS-1$ redoAction.setToolTipText(WorkbenchMessages.getString("Workbench.redoToolTip")); //$NON-NLS-1$ redoAction.setImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_REDO_EDIT)); redoAction.setHoverImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_REDO_EDIT_HOVER)); redoAction.setDisabledImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_REDO_EDIT_DISABLED)); redoAction.setAccelerator(SWT.CTRL | 'y'); partService.addPartListener(redoAction); redoAction.setActionDefinitionId(redoActionDefId); keyBindingService.registerGlobalAction(redoAction); cutAction = new RetargetAction(IWorkbenchActionConstants.CUT, WorkbenchMessages.getString("Workbench.cut")); //$NON-NLS-1$ cutAction.setToolTipText(WorkbenchMessages.getString("Workbench.cutToolTip")); //$NON-NLS-1$ cutAction.setImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_CUT_EDIT)); cutAction.setHoverImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_CUT_EDIT_HOVER)); cutAction.setDisabledImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_CUT_EDIT_DISABLED)); cutAction.setAccelerator(SWT.CTRL | 'x'); partService.addPartListener(cutAction); cutAction.setActionDefinitionId(cutActionDefId); keyBindingService.registerGlobalAction(cutAction); copyAction = new RetargetAction(IWorkbenchActionConstants.COPY, WorkbenchMessages.getString("Workbench.copy")); //$NON-NLS-1$ copyAction.setToolTipText(WorkbenchMessages.getString("Workbench.copyToolTip")); //$NON-NLS-1$ copyAction.setImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_COPY_EDIT)); copyAction.setHoverImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_COPY_EDIT_HOVER)); copyAction.setDisabledImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_COPY_EDIT_DISABLED)); copyAction.setAccelerator(SWT.CTRL | 'c'); partService.addPartListener(copyAction); copyAction.setActionDefinitionId(copyActionDefId); keyBindingService.registerGlobalAction(copyAction); pasteAction = new RetargetAction(IWorkbenchActionConstants.PASTE, WorkbenchMessages.getString("Workbench.paste")); //$NON-NLS-1$ pasteAction.setToolTipText(WorkbenchMessages.getString("Workbench.pasteToolTip")); //$NON-NLS-1$ pasteAction.setImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_PASTE_EDIT)); pasteAction.setHoverImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_PASTE_EDIT_HOVER)); pasteAction.setDisabledImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_PASTE_EDIT_DISABLED)); pasteAction.setAccelerator(SWT.CTRL | 'v'); partService.addPartListener(pasteAction); pasteAction.setActionDefinitionId(pasteActionDefId); keyBindingService.registerGlobalAction(pasteAction); printAction = new RetargetAction(IWorkbenchActionConstants.PRINT, WorkbenchMessages.getString("Workbench.print")); //$NON-NLS-1$ printAction.setToolTipText(WorkbenchMessages.getString("Workbench.printToolTip")); //$NON-NLS-1$ printAction.setImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_PRINT_EDIT)); printAction.setHoverImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_PRINT_EDIT_HOVER)); printAction.setDisabledImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_PRINT_EDIT_DISABLED)); printAction.setAccelerator(SWT.CTRL | 'p'); partService.addPartListener(printAction); printAction.setActionDefinitionId(printActionDefId); keyBindingService.registerGlobalAction(printAction); selectAllAction = new RetargetAction(IWorkbenchActionConstants.SELECT_ALL, WorkbenchMessages.getString("Workbench.selectAll")); //$NON-NLS-1$ selectAllAction.setToolTipText(WorkbenchMessages.getString("Workbench.selectAllToolTip")); //$NON-NLS-1$ selectAllAction.setAccelerator(SWT.CTRL | 'a'); partService.addPartListener(selectAllAction); selectAllAction.setActionDefinitionId(selectAllActionDefId); keyBindingService.registerGlobalAction(selectAllAction); findAction = new RetargetAction(IWorkbenchActionConstants.FIND, WorkbenchMessages.getString("Workbench.findReplace")); //$NON-NLS-1$ findAction.setToolTipText(WorkbenchMessages.getString("Workbench.findReplaceToolTip")); //$NON-NLS-1$// Find's images commented out due to conflict with Search.// See bug 16412.// findAction.setImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_SEARCH_SRC));// findAction.setHoverImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_SEARCH_SRC_HOVER));// findAction.setDisabledImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_SEARCH_SRC_DISABLED)); findAction.setAccelerator(SWT.CONTROL | 'f'); partService.addPartListener(findAction); findAction.setActionDefinitionId(findActionDefId); keyBindingService.registerGlobalAction(findAction); closeAction = new CloseEditorAction(window); partService.addPartListener(closeAction); closeAction.setActionDefinitionId(closeActionDefId); keyBindingService.registerGlobalAction(closeAction); closeAllAction = new CloseAllAction(window); partService.addPartListener(closeAllAction); closeAllAction.setActionDefinitionId(closeAllActionDefId); keyBindingService.registerGlobalAction(closeAllAction); closeAllSavedAction = new CloseAllSavedAction(window); partService.addPartListener(closeAllSavedAction); closeAllSavedAction.setActionDefinitionId(closeAllSavedActionDefId); keyBindingService.registerGlobalAction(closeAllSavedAction); pinEditorAction = new PinEditorAction(window); partService.addPartListener(pinEditorAction); pinEditorAction.setImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_PIN_EDITOR)); pinEditorAction.setHoverImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_PIN_EDITOR_HOVER)); pinEditorAction.setDisabledImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_PIN_EDITOR_DISABLED)); aboutAction = new AboutAction(window); aboutAction.setImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_OBJS_DEFAULT_PROD)); openPreferencesAction = new OpenPreferencesAction(window); addBookmarkAction = new RetargetAction(IWorkbenchActionConstants.BOOKMARK, WorkbenchMessages.getString("Workbench.addBookMark")); //$NON-NLS-1$ partService.addPartListener(addBookmarkAction); addBookmarkAction.setToolTipText(WorkbenchMessages.getString("Workbench.addBookMarkToolTip")); //$NON-NLS-1$ addBookmarkAction.setActionDefinitionId(addBookmarkActionDefId); keyBindingService.registerGlobalAction(addBookmarkAction); addTaskAction = createGlobalAction(IWorkbenchActionConstants.ADD_TASK, "edit", false); //$NON-NLS-1$ deleteAction = new RetargetAction(IWorkbenchActionConstants.DELETE, WorkbenchMessages.getString("Workbench.delete")); //$NON-NLS-1$ deleteAction.setToolTipText(WorkbenchMessages.getString("Workbench.deleteToolTip")); //$NON-NLS-1$ deleteAction.setImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_DELETE_EDIT)); deleteAction.setHoverImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_DELETE_EDIT_HOVER)); deleteAction.setDisabledImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_DELETE_EDIT_DISABLED)); deleteAction.enableAccelerator(false); WorkbenchHelp.setHelp(deleteAction, IHelpContextIds.DELETE_RETARGET_ACTION); partService.addPartListener(deleteAction); deleteAction.setActionDefinitionId(deleteActionDefId); keyBindingService.registerGlobalAction(deleteAction); // See if a welcome page is specified AboutInfo[] infos = ((Workbench)workbench).getFeaturesInfo(); for (int i = 0; i < infos.length; i++) { if (infos[i].getWelcomePageURL() != null) { quickStartAction = new QuickStartAction(workbench); break; } } // Actions for invisible accelerators showViewMenuAction = new ShowViewMenuAction(window); showViewMenuAction.setActionDefinitionId(showViewMenuActionDefId); keyBindingService.registerGlobalAction(showViewMenuAction); showPartPaneMenuAction = new ShowPartPaneMenuAction(window); showPartPaneMenuAction.setActionDefinitionId(showPartPaneMenuActionDefId); keyBindingService.registerGlobalAction(showPartPaneMenuAction); nextEditorAction = new CycleEditorAction(window, true); nextEditorAction.setActionDefinitionId(nextEditorActionDefId); keyBindingService.registerGlobalAction(nextEditorAction); prevEditorAction = new CycleEditorAction(window, false); prevEditorAction.setActionDefinitionId(prevEditorActionDefId); keyBindingService.registerGlobalAction(prevEditorAction); nextPartAction = new CyclePartAction(window, true); nextPartAction.setActionDefinitionId(nextPartActionDefId); keyBindingService.registerGlobalAction(nextPartAction); prevPartAction = new CyclePartAction(window, false); prevPartAction.setActionDefinitionId(prevPartActionDefId); keyBindingService.registerGlobalAction(prevPartAction); nextPerspectiveAction = new CyclePerspectiveAction(window, true); nextPerspectiveAction.setActionDefinitionId(nextPerspectiveActionDefId); keyBindingService.registerGlobalAction(nextPerspectiveAction); prevPerspectiveAction = new CyclePerspectiveAction(window, false); prevPerspectiveAction.setActionDefinitionId(prevPerspectiveActionDefId); keyBindingService.registerGlobalAction(prevPerspectiveAction); activateEditorAction = new ActivateEditorAction(window); activateEditorAction.setActionDefinitionId(activateEditorActionDefId); keyBindingService.registerGlobalAction(activateEditorAction); workbenchEditorsAction = new WorkbenchEditorsAction(window); workbenchEditorsAction.setActionDefinitionId(workbenchEditorsActionDefId); keyBindingService.registerGlobalAction(workbenchEditorsAction); hideShowEditorAction = new ToggleEditorsVisibilityAction(window); savePerspectiveAction = new SavePerspectiveAction(window); editActionSetAction = new EditActionSetsAction(window); lockToolBarAction = new LockToolBarAction(window); resetToolBarAction = new ResetToolBarAction(window); resetPerspectiveAction = new ResetPerspectiveAction(window); closePerspAction = new ClosePerspectiveAction(window); closeAllPerspsAction = new CloseAllPerspectivesAction(window); // menu reorg if (usingMenuReorg) { // create the new actions needed for the reorg revertAction = createGlobalAction(IWorkbenchActionConstants.REVERT, "file", false); //$NON-NLS-1$ refreshAction = createGlobalAction(IWorkbenchActionConstants.REFRESH, "file", false); //$NON-NLS-1$ propertiesAction = createGlobalAction(IWorkbenchActionConstants.PROPERTIES, "file", false); //$NON-NLS-1$ propertiesAction.setAccelerator(SWT.ALT | SWT.CR); moveAction = createGlobalAction(IWorkbenchActionConstants.MOVE, "edit", false); //$NON-NLS-1$ renameAction = createGlobalAction(IWorkbenchActionConstants.RENAME, "edit", false); //$NON-NLS-1$ goIntoAction = createGlobalAction(IWorkbenchActionConstants.GO_INTO, "navigate", false); //$NON-NLS-1$ backAction = createGlobalAction(IWorkbenchActionConstants.BACK, "navigate", true); //$NON-NLS-1$ forwardAction = createGlobalAction(IWorkbenchActionConstants.FORWARD, "navigate", true); //$NON-NLS-1$ upAction = createGlobalAction(IWorkbenchActionConstants.UP, "navigate", true); //$NON-NLS-1$ nextAction = createGlobalAction(IWorkbenchActionConstants.NEXT, "navigate", true); //$NON-NLS-1$ nextAction.setImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_NEXT_NAV)); previousAction = createGlobalAction(IWorkbenchActionConstants.PREVIOUS, "navigate", true); //$NON-NLS-1$ previousAction.setImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_PREVIOUS_NAV)); buildProjectAction = createGlobalAction(IWorkbenchActionConstants.BUILD_PROJECT, "project", false); //$NON-NLS-1$ rebuildProjectAction = createGlobalAction(IWorkbenchActionConstants.REBUILD_PROJECT, "project", false); //$NON-NLS-1$ openProjectAction = createGlobalAction(IWorkbenchActionConstants.OPEN_PROJECT, "project", false); //$NON-NLS-1$ closeProjectAction = createGlobalAction(IWorkbenchActionConstants.CLOSE_PROJECT, "project", false); //$NON-NLS-1$ // override the text and tooltip for certain actions, // either to get the new text or a different mnemonic savePerspectiveAction.setText(WorkbenchMessages.getString("Workbench.savePerspectiveAs")); //$NON-NLS-1$ editActionSetAction.setText(WorkbenchMessages.getString("Workbench.customizePerspective")); //$NON-NLS-1$ lockToolBarAction.setText(WorkbenchMessages.getString("Workbench.lockPerspectiveToolBar")); //$NON-NLS-1$ resetToolBarAction.setText(WorkbenchMessages.getString("Workbench.resetPerspectiveToolBar")); //$NON-NLS-1$ resetPerspectiveAction.setText(WorkbenchMessages.getString("Workbench.resetPerspective")); //$NON-NLS-1$ closePerspAction.setText(WorkbenchMessages.getString("Workbench.closePerspective")); //$NON-NLS-1$ closeAllPerspsAction.setText(WorkbenchMessages.getString("Workbench.closeAllPerspectives")); //$NON-NLS-1$ buildAction.setText(WorkbenchMessages.getString("Workbench.buildAll")); //$NON-NLS-1$ buildAction.setToolTipText(WorkbenchMessages.getString("Workbench.buildAllToolTip")); //$NON-NLS-1$ buildAction.setAccelerator(SWT.CTRL | 'B'); rebuildAllAction.setText(WorkbenchMessages.getString("Workbench.rebuildAll")); //$NON-NLS-1$ rebuildAllAction.setToolTipText(WorkbenchMessages.getString("Workbench.rebuildAllToolTip")); //$NON-NLS-1$ } // end menu reorg }
56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/cd0f53aa11c37c79489614d63e7842b5d7fc281f/WorkbenchActionBuilder.java/clean/bundles/org.eclipse.ui/Eclipse UI/org/eclipse/ui/internal/WorkbenchActionBuilder.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 3510, 1803, 18, 542, 1803, 21768, 12, 3510, 1803, 3262, 548, 1769, 225, 918, 3510, 1803, 18, 542, 1803, 21768, 12, 3510, 1803, 3262, 548, 1769, 225, 1221, 6100, 1435, 3510, 180...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 3510, 1803, 18, 542, 1803, 21768, 12, 3510, 1803, 3262, 548, 1769, 225, 918, 3510, 1803, 18, 542, 1803, 21768, 12, 3510, 1803, 3262, 548, 1769, 225, 1221, 6100, 1435, 3510, 180...
eDynamicUnset( eFeature );
super.eUnset( featureID );
public void eUnset( EStructuralFeature eFeature ) { switch ( eDerivedStructuralFeatureID( eFeature ) ) { case AttributePackage.EMBEDDED_IMAGE__TYPE : unsetType( ); return; case AttributePackage.EMBEDDED_IMAGE__URL : setURL( URL_EDEFAULT ); return; case AttributePackage.EMBEDDED_IMAGE__DATA : setData( DATA_EDEFAULT ); return; } eDynamicUnset( eFeature ); }
46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/036e8c78765730b146e5854b9d6c397a296fed86/EmbeddedImageImpl.java/buggy/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/model/attribute/impl/EmbeddedImageImpl.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 19698, 12, 512, 14372, 4595, 425, 4595, 262, 202, 95, 202, 202, 9610, 261, 425, 21007, 14372, 4595, 734, 12, 425, 4595, 262, 262, 202, 202, 95, 1082, 202, 3593, 3601, 226...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 19698, 12, 512, 14372, 4595, 425, 4595, 262, 202, 95, 202, 202, 9610, 261, 425, 21007, 14372, 4595, 734, 12, 425, 4595, 262, 262, 202, 202, 95, 1082, 202, 3593, 3601, 226...
gl.glEnable(GL.GL_VERTEX_PROGRAM_NV); gl.glProgramParameter4fNV(GL.GL_VERTEX_PROGRAM_NV, 62, fresnel, fresnel, fresnel, 1.0f);
gl.glEnable(GL.GL_VERTEX_PROGRAM_ARB); gl.glProgramEnvParameter4fARB(GL.GL_VERTEX_PROGRAM_ARB, 62, fresnel, fresnel, fresnel, 1.0f);
public void display(GLDrawable drawable) { if (quit) { return; } time.update(); GL gl = drawable.getGL(); GLU glu = drawable.getGLU(); gl.glClear(GL.GL_COLOR_BUFFER_BIT|GL.GL_DEPTH_BUFFER_BIT); if (doViewAll) { viewer.viewAll(gl); doViewAll = false; } if (getFlag(' ')) { viewer.rotateAboutFocalPoint(new Rotf(Vec3f.Y_AXIS, (float) (time.deltaT() * animRate))); } if (toggleWire) { toggleWire = false; wire = !wire; if (wire) { gl.glPolygonMode(GL.GL_FRONT_AND_BACK, GL.GL_LINE); } else { gl.glPolygonMode(GL.GL_FRONT_AND_BACK, GL.GL_FILL); } } // draw background gl.glDisable(GL.GL_DEPTH_TEST); drawSkyBox(gl, glu); gl.glEnable(GL.GL_DEPTH_TEST); gl.glPushMatrix(); viewer.update(gl); ManipManager.getManipManager().updateCameraParameters(drawable, viewer.getCameraParameters()); ManipManager.getManipManager().render(drawable, gl); gl.glBindProgramNV(GL.GL_VERTEX_PROGRAM_NV, vtxProg); gl.glEnable(GL.GL_VERTEX_PROGRAM_NV); gl.glProgramParameter4fNV(GL.GL_VERTEX_PROGRAM_NV, 62, fresnel, fresnel, fresnel, 1.0f); // set texture transforms gl.glActiveTextureARB(GL.GL_TEXTURE0_ARB); gl.glBindTexture(GL.GL_TEXTURE_CUBE_MAP_ARB, cubemap); gl.glEnable(GL.GL_TEXTURE_CUBE_MAP_ARB); gl.glMatrixMode(GL.GL_TEXTURE); gl.glLoadIdentity(); gl.glScalef(1.0f, -1.0f, 1.0f); viewer.updateInverseRotation(gl); gl.glActiveTextureARB(GL.GL_TEXTURE1_ARB); gl.glBindTexture(GL.GL_TEXTURE_CUBE_MAP_ARB, cubemap); gl.glEnable(GL.GL_TEXTURE_CUBE_MAP_ARB); gl.glMatrixMode(GL.GL_TEXTURE); gl.glLoadIdentity(); gl.glScalef(1.0f, -1.0f, 1.0f); viewer.updateInverseRotation(gl); gl.glEnable(GL.GL_REGISTER_COMBINERS_NV); gl.glColor3f(1.0f, 1.0f, 1.0f); if (getFlag('s')) { // single pass setRefraction(gl, refract); drawObj(gl, glu, obj); } else { // red pass gl.glColorMask(true, false, false, false); setRefraction(gl, refract); drawObj(gl, glu, obj); gl.glDepthMask(false); gl.glDepthFunc(GL.GL_EQUAL); // green pass gl.glColorMask(false, true, false, false); setRefraction(gl, refract + wavelengthDelta); drawObj(gl, glu, obj); // blue pass gl.glColorMask(false, false, true, false); setRefraction(gl, refract + (wavelengthDelta * 2)); drawObj(gl, glu, obj); gl.glDepthMask(true); gl.glDepthFunc(GL.GL_LESS); gl.glColorMask(true, true, true, false); } gl.glDisable(GL.GL_REGISTER_COMBINERS_NV); gl.glDisable(GL.GL_VERTEX_PROGRAM_NV); gl.glMatrixMode(GL.GL_MODELVIEW); gl.glPopMatrix(); }
6783 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6783/8f15869ac9decfc880b4d82dbd6e0a96b54a6004/VertexProgRefract.java/clean/src/demos/vertexProgRefract/VertexProgRefract.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 2562, 12, 11261, 16149, 19021, 13, 288, 1377, 309, 261, 27176, 13, 288, 3639, 327, 31, 1377, 289, 1377, 813, 18, 2725, 5621, 1377, 10252, 5118, 273, 19021, 18, 588, 11261, 5621...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 2562, 12, 11261, 16149, 19021, 13, 288, 1377, 309, 261, 27176, 13, 288, 3639, 327, 31, 1377, 289, 1377, 813, 18, 2725, 5621, 1377, 10252, 5118, 273, 19021, 18, 588, 11261, 5621...
IMAPResponse response = in.next ();
IMAPResponse response = in.next();
protected IMAPResponse readResponse () throws IOException { IMAPResponse response = in.next (); if (debug) { Logger logger = Logger.getInstance (); if (response == null) { logger.log("imap", "<EOF"); } else if (ansiDebug) { logger.log("imap", "< " + response.toANSIString ()); } else { logger.log("imap", "< " + response.toString ()); } } if (response == null) { throw new IOException ("EOF"); } return response; }
45713 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45713/32651f721fa7044d71e84f6431a1ca18d965af13/IMAPConnection.java/buggy/libraries/javalib/gnu/inet/imap/IMAPConnection.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 4750, 6246, 2203, 1064, 26694, 1832, 565, 1216, 1860, 225, 288, 565, 6246, 2203, 1064, 766, 273, 316, 18, 4285, 5621, 565, 309, 261, 4148, 13, 1377, 288, 3639, 4242, 1194, 273, 4242, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 4750, 6246, 2203, 1064, 26694, 1832, 565, 1216, 1860, 225, 288, 565, 6246, 2203, 1064, 766, 273, 316, 18, 4285, 5621, 565, 309, 261, 4148, 13, 1377, 288, 3639, 4242, 1194, 273, 4242, 18, ...
setSelection(new Selection.Range(lineStart + wordStart, lineStart + wordEnd));
extendSelection(lineStart + wordStart,lineStart + wordEnd);
public void selectWord() { int line = getCaretLine(); int lineStart = getLineStartOffset(line); int offset = getCaretPosition() - lineStart; if(getLineLength(line) == 0) return; String lineText = getLineText(line); String noWordSep = (String)buffer.getProperty("noWordSep"); if(offset == getLineLength(line)) offset--; int wordStart = TextUtilities.findWordStart(lineText,offset,noWordSep); int wordEnd = TextUtilities.findWordEnd(lineText,offset+1,noWordSep); setSelection(new Selection.Range(lineStart + wordStart, lineStart + wordEnd)); moveCaretPosition(lineStart + wordEnd); } //}}}
8690 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8690/63eb27d59f2f966a49c7cb74c0b7123f8126b5ca/JEditTextArea.java/clean/org/gjt/sp/jedit/textarea/JEditTextArea.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 2027, 3944, 1435, 202, 95, 202, 202, 474, 980, 273, 1927, 20731, 1670, 5621, 202, 202, 474, 29208, 273, 9851, 1685, 2335, 12, 1369, 1769, 202, 202, 474, 1384, 273, 1927, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2027, 3944, 1435, 202, 95, 202, 202, 474, 980, 273, 1927, 20731, 1670, 5621, 202, 202, 474, 29208, 273, 9851, 1685, 2335, 12, 1369, 1769, 202, 202, 474, 1384, 273, 1927, ...
label.setFont( FontManager.getFont( label.getFont( ).toString( ), 10,
label.setFont( FontManager.getFont( label.getFont( ).toString( ), 10,
private Composite createTitleArea( Composite parent ) { int margins = 2; final Composite titleArea = new Composite( parent, SWT.NONE ); FormLayout layout = new FormLayout( ); layout.marginHeight = margins; layout.marginWidth = margins; titleArea.setLayout( layout ); Display display = parent.getDisplay( ); Color background = JFaceColors.getBannerBackground( display ); GridData layoutData = new GridData( GridData.FILL_HORIZONTAL ); layoutData.heightHint = 20 + ( margins * 3 ); titleArea.setLayoutData( layoutData ); titleArea.setBackground( background ); titleArea.addPaintListener( new PaintListener( ) { public void paintControl( PaintEvent e ) { e.gc.setForeground( titleArea.getDisplay( ) .getSystemColor( SWT.COLOR_WIDGET_NORMAL_SHADOW ) ); Rectangle bounds = titleArea.getClientArea( ); bounds.height = bounds.height - 2; bounds.width = bounds.width - 1; e.gc.drawRectangle( bounds ); } } ); Label label = new Label( titleArea, SWT.NONE ); label.setBackground( background ); label.setFont( FontManager.getFont( label.getFont( ).toString( ), 10, SWT.BOLD ) ); label.setText( getTitle( ) ); //$NON-NLS-1$ return titleArea; }
15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/0259bf7e90fb00d8350d4373f648a82b62d3ecd5/MapRuleBuilder.java/clean/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/ui/dialogs/MapRuleBuilder.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 14728, 752, 4247, 5484, 12, 14728, 982, 262, 202, 95, 202, 202, 474, 24889, 273, 576, 31, 202, 202, 6385, 14728, 2077, 5484, 273, 394, 14728, 12, 982, 16, 348, 8588, 18, 9826...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 14728, 752, 4247, 5484, 12, 14728, 982, 262, 202, 95, 202, 202, 474, 24889, 273, 576, 31, 202, 202, 6385, 14728, 2077, 5484, 273, 394, 14728, 12, 982, 16, 348, 8588, 18, 9826...
public String getLoaderNameForResource( String resourceName )
public String getLoaderNameForResource(String resourceName)
public String getLoaderNameForResource( String resourceName ) { return resourceManager.getLoaderNameForResource( resourceName ); }
9291 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9291/e128e4125429834f73621c8aa67036ca877e731e/RuntimeInstance.java/clean/src/java/org/apache/velocity/runtime/RuntimeInstance.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 514, 336, 2886, 461, 20977, 12, 780, 9546, 13, 565, 288, 3639, 327, 1058, 1318, 18, 588, 2886, 461, 20977, 12, 9546, 11272, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 377, 1071, 514, 336, 2886, 461, 20977, 12, 780, 9546, 13, 565, 288, 3639, 327, 1058, 1318, 18, 588, 2886, 461, 20977, 12, 9546, 11272, 565, 289, 2, -100, -100, -100, -100, -100, -100, -100, ...
public void addLocal(String vName) {
public void addLocal(String vName, Object varObj) {
public void addLocal(String vName) { int vIndex = itsVariableNames.get(vName, -1); if (vIndex != -1) { // There's already a variable or parameter with this name. return; } int index = itsVariables.size(); LocalVariable lVar = createLocalVariable(vName, false); itsVariables.add(lVar); itsVariableNames.put(vName, index); }
54155 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54155/e497d2b898e781a5052344191ab878cd469f3f53/VariableTable.java/buggy/js/rhino/src/org/mozilla/javascript/VariableTable.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 527, 2042, 12, 780, 331, 461, 16, 1033, 569, 2675, 13, 288, 3639, 509, 331, 1016, 273, 2097, 3092, 1557, 18, 588, 12, 90, 461, 16, 300, 21, 1769, 3639, 309, 261, 90, 1016, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2042, 12, 780, 331, 461, 16, 1033, 569, 2675, 13, 288, 3639, 509, 331, 1016, 273, 2097, 3092, 1557, 18, 588, 12, 90, 461, 16, 300, 21, 1769, 3639, 309, 261, 90, 1016, ...
remapAliases(mapping, query.getFrom());
remapAliases(mapping, originalQuery.getFrom());
protected static Set mergeGroupBy(PrecomputedTable precomputedTable, Query query) { Query precompQuery = precomputedTable.getQuery(); Set retval = new HashSet(); if (precompQuery.getGroupBy().size() != query.getGroupBy().size()) { // GROUP BY clauses are unequal in size. return retval; } if (precompQuery.getFrom().size() != query.getFrom().size()) { // FROM lists are unequal in size. return retval; } // Find the possible mappings from tables in the // PrecomputedTable query to tables in the Query Set mappings = MappingUtil.findCombinations(precompQuery.getFrom(), query.getFrom(), new AbstractTableComparator()); // Create a map from AbstractValue to SelectValue for the PrecomputedTable Map valueMap = precomputedTable.getValueMap(); // Iterate through the mappings and compare combinations. Note that each mapping is a case // where the precomputed table has the same set of tables as the Query. Iterator mappingsIter = mappings.iterator(); while (mappingsIter.hasNext()) { Map mapping = (Map) mappingsIter.next(); // Remap the aliases // TODO: query.getFrom() is really the wrong thing to use. To be extra-specially // paranoid about realiasing things so they clash, this should be the getFrom() of the // original Query, before any precomputed tables have been inserted. remapAliases(mapping, query.getFrom()); // The constraints must all be exactly the same as those in the Query. // TODO: This should probably be replaced by // compareConstraints(precompWhere, queryWhere) // && compareConstraints(queryWhere, precompWhere) // This will catch the case where the precompWhere and the QueryWhere are actually // equal, but expressed in different terms (such as a = 5, compared to // a <= 5 and a >= 5, although I don't think the algorithm is quite clever enough to // spot this particular example). if (!precompQuery.getWhere().equals(query.getWhere())) { continue; } // Constraints are equal, now check the group by. We can use .equals on the Sets, // because AbstractValue.equals relies on AbstractTable.equals, which should be happy // now that the aliases have been matched up. if (!precompQuery.getGroupBy().equals(query.getGroupBy())) { continue; } // Also, we must compare the HAVING clauses - each constraint in the PrecomputedTable // must EQUAL or IMPLIES some constraint in the Query. Set constraintEqualsSet = new HashSet(); // NOTE: this if line has a side-effect... Careful. if (!compareConstraints(precompQuery.getHaving(), query.getHaving(), constraintEqualsSet)) { continue; } // So now constraintEqualsSet contains all the constraints that can be left out // If the PrecomputedTable is distinct, then the Query can't be. if (precompQuery.isDistinct() && (!query.isDistinct())) { continue; } Table precomputedSqlTable = new Table(precomputedTable.getName(), ALIAS_PREFIX + StringUtil.uniqueString()); Query newQuery = new Query(); try { // Populate the SELECT list of the new Query. This method will throw an exception // if any of the AbstractValues required are not present in the precomputed table. reconstructSelectValues(query.getSelect(), precomputedSqlTable, valueMap, precompQuery.getFrom(), true, newQuery); // Populate the FROM list - in this case it is only the precomputed table newQuery.addFrom(precomputedSqlTable); // Populate the WHERE clause of the new query with the contents of the HAVING clause // of the original query, leaving out those constraints in constraintEqualsSet. reconstructAbstractConstraints(query.getHaving(), precomputedSqlTable, valueMap, precompQuery.getFrom(), true, newQuery.getWhere(), constraintEqualsSet, null, 0, null); // Now populate the ORDER BY clause of the new query from the contents of the ORDER // BY clause of the original query. reconstructAbstractValues(query.getOrderBy(), precomputedSqlTable, valueMap, precompQuery.getFrom(), true, newQuery.getOrderBy()); // Now copy the EXPLAIN, DISTINCT, LIMIT, and OFFSET status to the new query: newQuery.setDistinct(query.isDistinct()); newQuery.setExplain(query.isExplain()); newQuery.setLimitOffset(query.getLimit(), query.getOffset()); } catch (QueryOptimiserException e) { continue; } retval.add(newQuery); } return retval; }
7196 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7196/a1240b8cf1675c1ecad1af2224e153bba730ae4d/QueryOptimiser.java/clean/intermine/src/java/org/intermine/sql/precompute/QueryOptimiser.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 760, 1000, 2691, 26257, 12, 1386, 20307, 1388, 675, 20307, 1388, 16, 2770, 843, 13, 288, 3639, 2770, 675, 2919, 1138, 273, 675, 20307, 1388, 18, 588, 1138, 5621, 3639, 1000, 5221, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 760, 1000, 2691, 26257, 12, 1386, 20307, 1388, 675, 20307, 1388, 16, 2770, 843, 13, 288, 3639, 2770, 675, 2919, 1138, 273, 675, 20307, 1388, 18, 588, 1138, 5621, 3639, 1000, 5221, 2...
for (int j = i+1; j < dPrime.getLength(i); j++){
for (int j = i+1; j < i + dPrime.getLength(i); j++){
public void colorDPrime(int scheme){ currentScheme = scheme; DPrimeTable dPrime = theData.dpTable; noImage = true; if (scheme == STD_SCHEME){ // set coloring based on LOD and D' for (int i = 0; i < Chromosome.getSize()-1; i++){ for (int j = i+1; j < dPrime.getLength(i)+i; j++){ PairwiseLinkage thisPair = dPrime.getLDStats(i,j); if (thisPair == null){ continue; } double d = thisPair.getDPrime(); double l = thisPair.getLOD(); Color boxColor = null; if (l > 2) { if (d < 0.5) { //high LOD, low D' boxColor = new Color(255, 224, 224); } else { //high LOD, high D' shades of red double blgr = (255-32)*2*(1-d); boxColor = new Color(255, (int) blgr, (int) blgr); //boxColor = new Color(224, (int) blgr, (int) blgr); } } else if (d > 0.99) { //high D', low LOD blueish color boxColor = new Color(192, 192, 240); } else { //no LD boxColor = Color.white; } thisPair.setColor(boxColor); } } }else if (scheme == SFS_SCHEME){ for (int x = 0; x < Chromosome.getSize()-1; x++){ for (int y = x+1; y < Chromosome.getSize(); y++){ PairwiseLinkage thisPair = dPrime.getLDStats(x,y); if (thisPair == null){ continue; } //get the right bits double lowCI = thisPair.getConfidenceLow(); double highCI = thisPair.getConfidenceHigh(); //color in squares if (lowCI >= FindBlocks.cutLowCI && highCI >= FindBlocks.cutHighCI) { thisPair.setColor(Color.darkGray); //strong LD }else if (highCI >= FindBlocks.recHighCI) { thisPair.setColor(Color.lightGray); //uninformative } else { thisPair.setColor(Color.white); //recomb } } } }else if (scheme == GAM_SCHEME){ for (int x = 0; x < Chromosome.getSize()-1; x++){ for (int y = x+1; y < Chromosome.getSize(); y++){ PairwiseLinkage thisPair = dPrime.getLDStats(x,y); if (thisPair == null) { continue; } double[] freqs = thisPair.getFreqs(); int numGam = 0; for (int i = 0; i < freqs.length; i++){ //add a little bump for EM probs which should be zero but are really like 10^-10 if (freqs[i] > FindBlocks.fourGameteCutoff + 1E-8) numGam++; } //color in squares if(numGam > 3){ thisPair.setColor(Color.white); }else{ thisPair.setColor(Color.darkGray); } } } }else if (scheme == WMF_SCHEME){ // set coloring based on LOD and D', but without (arbitrary) cutoffs to introduce // "color damage" (Tufte) // first get the maximum LOD score so we can scale relative to that. double max_l = 0.0; for (int i = 0; i < Chromosome.getSize(); i++){ for (int j = i+1; j < dPrime.getLength(i); j++){ PairwiseLinkage thisPair = dPrime.getLDStats(i,j); if (thisPair == null){ continue; } if (thisPair.getLOD() > max_l) max_l = thisPair.getLOD(); } } // cap the max LOD score if (max_l > 5.0) max_l = 5.0; for (int i = 0; i < Chromosome.getSize(); i++){ for (int j = i+1; j < dPrime.getLength(i); j++){ PairwiseLinkage thisPair = dPrime.getLDStats(i,j); if (thisPair == null){ continue; } double d = thisPair.getDPrime(); double l = thisPair.getLOD(); Color boxColor = null; double lod_scale = l / max_l; // if greater than the cap, call it the cap if (lod_scale > 1.0) lod_scale = 1.0; // there can be negative LOD scores, apparently if (lod_scale < 0.0) lod_scale = 0.0; // also, scale the D' so anything under .2 is white. d = (1.0 / 0.8) * (d - 0.2); if (d < 0.0) d = 0.0; // if there is low(er) D' but big LOD score, this should be in a gray scale // scaled to the D' value if (lod_scale > d) { lod_scale = d; } int r, g, b; // r = (int)(200.0 * d + 55.0 * lod_scale); // g = (int)(255.0 * d - 255.0 * lod_scale); // b = (int)(255.0 * d - 255.0 * lod_scale); double ap, cp, dp, ep, jp, kp; ap = 0.0; cp = -255.0; dp = -55.0; ep = -200.0; jp = 255.0; kp = 255.0; r = (int)(ap * d + cp * lod_scale + jp); g = b = (int)(dp * d + ep * lod_scale + kp); if (r < 0) r = 0; if (g < 0) g = 0; if (b < 0) b = 0; boxColor = new Color(r, g, b); thisPair.setColor(boxColor); } } }else if (scheme == RSQ_SCHEME){ // set coloring based on R-squared values for (int i = 0; i < Chromosome.getSize(); i++){ for (int j = i+1; j < dPrime.getLength(i); j++){ PairwiseLinkage thisPair = dPrime.getLDStats(i,j); if (thisPair == null){ continue; } double rsq = thisPair.getRSquared(); Color boxColor = null; int r, g, b; r = g = b = (int)(255.0 * (1.0 - rsq)); boxColor = new Color(r, g, b); thisPair.setColor(boxColor); } } } }
51222 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51222/b2aaca65488a77e0aa4ac9ea3393313a17fd8e76/DPrimeDisplay.java/buggy/edu/mit/wi/haploview/DPrimeDisplay.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 2036, 40, 23327, 12, 474, 4355, 15329, 3639, 783, 9321, 273, 4355, 31, 3639, 463, 23327, 1388, 302, 23327, 273, 326, 751, 18, 9295, 1388, 31, 3639, 1158, 2040, 273, 638, 31, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 2036, 40, 23327, 12, 474, 4355, 15329, 3639, 783, 9321, 273, 4355, 31, 3639, 463, 23327, 1388, 302, 23327, 273, 326, 751, 18, 9295, 1388, 31, 3639, 1158, 2040, 273, 638, 31, ...
setStringProperty( ReportItem.DATA_SET_PROP, valueToSet );
setStringProperty( IReportItemModel.DATA_SET_PROP, valueToSet );
public void setDataSet( DataSetHandle handle ) throws SemanticException { if ( handle == null ) setStringProperty( DATA_SET_PROP, null ); else { ModuleHandle moduleHandle = handle.getRoot( ); String valueToSet = handle.getName( ); if ( moduleHandle instanceof LibraryHandle ) { String namespace = ( (LibraryHandle) moduleHandle ) .getNamespace( ); valueToSet = StringUtil.buildQualifiedReference( namespace, handle.getName( ) ); } setStringProperty( ReportItem.DATA_SET_PROP, valueToSet ); } }
5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/d802c33711e0d111551ae23575895cd060f085b6/ReportItemHandle.java/buggy/model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/api/ReportItemHandle.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 7929, 694, 12, 14065, 3259, 1640, 262, 1216, 24747, 503, 202, 95, 202, 202, 430, 261, 1640, 422, 446, 262, 1082, 202, 542, 780, 1396, 12, 8730, 67, 4043, 67, 15811, 16, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 7929, 694, 12, 14065, 3259, 1640, 262, 1216, 24747, 503, 202, 95, 202, 202, 430, 261, 1640, 422, 446, 262, 1082, 202, 542, 780, 1396, 12, 8730, 67, 4043, 67, 15811, 16, ...
tmp2 = cyclicRightShift11(wordAt(A, i) + tmp1);
aI = cyclicRightShift11(wordAt(A, i) + tC);
private void stepAlongPath() throws MemoryBoundFunctionException { // update indices into A and wrap them i += 4; // i is a word index into a byte array i &= 0x3fc; j += wordAt(A, i); j &= 0x3fc; // logger.info("Step at " + c + " indices [" + i + "," + j + "]"); // feed bits from T into A[i] and rotate them int tmp1 = wordAt(T, c); int tmp2 = 0; switch (T.length) { case 16*1024*1024: tmp2 = cyclicRightShift11(wordAt(A, i) + tmp1); break; case 1024*1024: tmp2 = cyclicRightShift15(wordAt(A, i) + tmp1); break; } setWordAt(A, i, tmp2); // swap A[i] and A[j] tmp2 = wordAt(A, i); int tmp3 = wordAt(A, j); setWordAt(A, i, tmp3); setWordAt(A, j, tmp2); // update c switch (T.length) { case 16*1024*1024: c = (tmp1 ^ wordAt(A, (tmp2 + tmp3) & 0x3fc)) & 0x00fffffc; break; case 1024*1024: c = (tmp1 ^ wordAt(A, (tmp2 + tmp3) & 0x3fc)) & 0x000ffffc; break; } if (c < 0 || c > (T.length-4) || ( c & 0x3 ) != 0) throw new MemoryBoundFunctionException("bad c " + c + " T[" + T.length + "]"); pathIndex++; }
8150 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8150/6c240c5104bc8aea4f8c949afaefb548db954942/MBF1.java/buggy/src/org/lockss/mbf/MBF1.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 3238, 918, 2235, 1067, 932, 743, 1435, 1216, 9251, 3499, 2083, 503, 288, 565, 368, 1089, 4295, 1368, 432, 471, 2193, 2182, 565, 277, 1011, 1059, 31, 368, 277, 353, 279, 2076, 770, 1368, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 3238, 918, 2235, 1067, 932, 743, 1435, 1216, 9251, 3499, 2083, 503, 288, 565, 368, 1089, 4295, 1368, 432, 471, 2193, 2182, 565, 277, 1011, 1059, 31, 368, 277, 353, 279, 2076, 770, 1368, ...
return severity; }
return severity; }
public int getSeverity() { return severity; }
58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/09a4c864bb83fb62a685d497a2df9ce5451376bd/ProblemFilter.java/clean/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/ProblemFilter.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 509, 1322, 6084, 560, 1435, 288, 3639, 327, 11426, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 509, 1322, 6084, 560, 1435, 288, 3639, 327, 11426, 31, 565, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
iCodeTop = addByte((byte) TokenStream.NEWTEMP, iCodeTop); iCodeTop = addByte((byte)theLocalSlot, iCodeTop); iCodeTop = addByte((byte) TokenStream.POP, iCodeTop); Integer finallyLabel = (Integer)(finallyTarget.getProp(Node.LABEL_PROP)); iCodeTop = addGoto(finallyLabel.intValue(),
iCodeTop = addByte(TokenStream.NEWTEMP, iCodeTop); iCodeTop = addByte(theLocalSlot, iCodeTop); iCodeTop = addByte(TokenStream.POP, iCodeTop); int finallyLabel = finallyTarget.getExistingIntProp(Node.LABEL_PROP); iCodeTop = addGoto(finallyLabel,
private int generateICode(Node node, int iCodeTop) { int type = node.getType(); Node child = node.getFirstChild(); Node firstChild = child; switch (type) { case TokenStream.FUNCTION : { iCodeTop = addByte((byte) TokenStream.CLOSURE, iCodeTop); Node fn = (Node) node.getProp(Node.FUNCTION_PROP); Short index = (Short) fn.getProp(Node.FUNCTION_PROP); iCodeTop = addByte((byte)(index.shortValue() >> 8), iCodeTop); iCodeTop = addByte((byte)(index.shortValue() & 0xff), iCodeTop); itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; } break; case TokenStream.SCRIPT : iCodeTop = updateLineNumber(node, iCodeTop); while (child != null) { if (child.getType() != TokenStream.FUNCTION) iCodeTop = generateICode(child, iCodeTop); child = child.getNextSibling(); } break; case TokenStream.CASE : iCodeTop = updateLineNumber(node, iCodeTop); child = child.getNextSibling(); while (child != null) { iCodeTop = generateICode(child, iCodeTop); child = child.getNextSibling(); } break; case TokenStream.LABEL : case TokenStream.WITH : case TokenStream.LOOP : case TokenStream.DEFAULT : case TokenStream.BLOCK : case TokenStream.VOID : case TokenStream.NOP : iCodeTop = updateLineNumber(node, iCodeTop); while (child != null) { iCodeTop = generateICode(child, iCodeTop); child = child.getNextSibling(); } break; case TokenStream.COMMA : iCodeTop = generateICode(child, iCodeTop); iCodeTop = addByte((byte) TokenStream.POP, iCodeTop); itsStackDepth--; child = child.getNextSibling(); iCodeTop = generateICode(child, iCodeTop); break; case TokenStream.SWITCH : { iCodeTop = updateLineNumber(node, iCodeTop); iCodeTop = generateICode(child, iCodeTop); int theLocalSlot = itsData.itsMaxLocals++; iCodeTop = addByte((byte) TokenStream.NEWTEMP, iCodeTop); iCodeTop = addByte((byte)theLocalSlot, iCodeTop); iCodeTop = addByte((byte) TokenStream.POP, iCodeTop); itsStackDepth--; /* reminder - below we construct new GOTO nodes that aren't linked into the tree just for the purpose of having a node to pass to the addGoto routine. (Parallels codegen here). Seems unnecessary. */ Vector cases = (Vector) node.getProp(Node.CASES_PROP); for (int i = 0; i < cases.size(); i++) { Node thisCase = (Node)cases.elementAt(i); Node first = thisCase.getFirstChild(); // the case expression is the firstmost child // the rest will be generated when the case // statements are encountered as siblings of // the switch statement. iCodeTop = generateICode(first, iCodeTop); iCodeTop = addByte((byte) TokenStream.USETEMP, iCodeTop); itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; iCodeTop = addByte((byte) theLocalSlot, iCodeTop); iCodeTop = addByte((byte) TokenStream.SHEQ, iCodeTop); Node target = new Node(TokenStream.TARGET); thisCase.addChildAfter(target, first); Node branch = new Node(TokenStream.IFEQ); branch.putProp(Node.TARGET_PROP, target); iCodeTop = addGoto(branch, TokenStream.IFEQ, iCodeTop); itsStackDepth--; } Node defaultNode = (Node) node.getProp(Node.DEFAULT_PROP); if (defaultNode != null) { Node defaultTarget = new Node(TokenStream.TARGET); defaultNode.getFirstChild().addChildToFront(defaultTarget); Node branch = new Node(TokenStream.GOTO); branch.putProp(Node.TARGET_PROP, defaultTarget); iCodeTop = addGoto(branch, TokenStream.GOTO, iCodeTop); } Node breakTarget = (Node) node.getProp(Node.BREAK_PROP); Node branch = new Node(TokenStream.GOTO); branch.putProp(Node.TARGET_PROP, breakTarget); iCodeTop = addGoto(branch, TokenStream.GOTO, iCodeTop); } break; case TokenStream.TARGET : { Object lblObect = node.getProp(Node.LABEL_PROP); if (lblObect == null) { int label = markLabel(acquireLabel(), iCodeTop); node.putProp(Node.LABEL_PROP, new Integer(label)); } else { int label = ((Integer)lblObect).intValue(); markLabel(label, iCodeTop); } // if this target has a FINALLY_PROP, it is a JSR target // and so has a PC value on the top of the stack if (node.getProp(Node.FINALLY_PROP) != null) { itsStackDepth = 1; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; } } break; case TokenStream.EQOP : case TokenStream.RELOP : { iCodeTop = generateICode(child, iCodeTop); child = child.getNextSibling(); iCodeTop = generateICode(child, iCodeTop); int op = node.getInt(); if (version == Context.VERSION_1_2) { if (op == TokenStream.EQ) op = TokenStream.SHEQ; else if (op == TokenStream.NE) op = TokenStream.SHNE; } iCodeTop = addByte((byte) op, iCodeTop); itsStackDepth--; } break; case TokenStream.NEW : case TokenStream.CALL : { if (itsSourceFile != null && (itsData.itsSourceFile == null || ! itsSourceFile.equals(itsData.itsSourceFile))) itsData.itsSourceFile = itsSourceFile; iCodeTop = addByte((byte)TokenStream.SOURCEFILE, iCodeTop); int childCount = 0; short nameIndex = -1; while (child != null) { iCodeTop = generateICode(child, iCodeTop); if (nameIndex == -1) { if (child.getType() == TokenStream.NAME) nameIndex = (short)(itsData.itsStringTableIndex - 1); else if (child.getType() == TokenStream.GETPROP) nameIndex = (short)(itsData.itsStringTableIndex - 1); } child = child.getNextSibling(); childCount++; } if (node.getProp(Node.SPECIALCALL_PROP) != null) { // embed line number and source filename iCodeTop = addByte((byte) TokenStream.CALLSPECIAL, iCodeTop); iCodeTop = addByte((byte)(itsLineNumber >> 8), iCodeTop); iCodeTop = addByte((byte)(itsLineNumber & 0xff), iCodeTop); iCodeTop = addString(itsSourceFile, iCodeTop); } else { iCodeTop = addByte((byte) type, iCodeTop); iCodeTop = addByte((byte)(nameIndex >> 8), iCodeTop); iCodeTop = addByte((byte)(nameIndex & 0xFF), iCodeTop); } itsStackDepth -= (childCount - 1); // always a result value // subtract from child count to account for [thisObj &] fun if (type == TokenStream.NEW) childCount -= 1; else childCount -= 2; iCodeTop = addByte((byte)(childCount >> 8), iCodeTop); iCodeTop = addByte((byte)(childCount & 0xff), iCodeTop); if (childCount > itsData.itsMaxArgs) itsData.itsMaxArgs = childCount; iCodeTop = addByte((byte)TokenStream.SOURCEFILE, iCodeTop); } break; case TokenStream.NEWLOCAL : case TokenStream.NEWTEMP : { iCodeTop = generateICode(child, iCodeTop); iCodeTop = addByte((byte) TokenStream.NEWTEMP, iCodeTop); iCodeTop = addLocalRef(node, iCodeTop); } break; case TokenStream.USELOCAL : { if (node.getProp(Node.TARGET_PROP) != null) iCodeTop = addByte((byte) TokenStream.RETSUB, iCodeTop); else { iCodeTop = addByte((byte) TokenStream.USETEMP, iCodeTop); itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; } Node temp = (Node) node.getProp(Node.LOCAL_PROP); iCodeTop = addLocalRef(temp, iCodeTop); } break; case TokenStream.USETEMP : { iCodeTop = addByte((byte) TokenStream.USETEMP, iCodeTop); Node temp = (Node) node.getProp(Node.TEMP_PROP); iCodeTop = addLocalRef(temp, iCodeTop); itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; } break; case TokenStream.IFEQ : case TokenStream.IFNE : iCodeTop = generateICode(child, iCodeTop); itsStackDepth--; // after the conditional GOTO, really // fall thru... case TokenStream.GOTO : iCodeTop = addGoto(node, (byte) type, iCodeTop); break; case TokenStream.JSR : { /* mark the target with a FINALLY_PROP to indicate that it will have an incoming PC value on the top of the stack. !!! This only works if the target follows the JSR in the tree. !!! */ Node target = (Node)(node.getProp(Node.TARGET_PROP)); target.putProp(Node.FINALLY_PROP, node); iCodeTop = addGoto(node, TokenStream.GOSUB, iCodeTop); } break; case TokenStream.AND : { iCodeTop = generateICode(child, iCodeTop); iCodeTop = addByte((byte) TokenStream.DUP, iCodeTop); itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; int falseTarget = acquireLabel(); iCodeTop = addGoto(falseTarget, TokenStream.IFNE, iCodeTop); iCodeTop = addByte((byte) TokenStream.POP, iCodeTop); itsStackDepth--; child = child.getNextSibling(); iCodeTop = generateICode(child, iCodeTop); markLabel(falseTarget, iCodeTop); } break; case TokenStream.OR : { iCodeTop = generateICode(child, iCodeTop); iCodeTop = addByte((byte) TokenStream.DUP, iCodeTop); itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; int trueTarget = acquireLabel(); iCodeTop = addGoto(trueTarget, TokenStream.IFEQ, iCodeTop); iCodeTop = addByte((byte) TokenStream.POP, iCodeTop); itsStackDepth--; child = child.getNextSibling(); iCodeTop = generateICode(child, iCodeTop); markLabel(trueTarget, iCodeTop); } break; case TokenStream.GETPROP : { iCodeTop = generateICode(child, iCodeTop); String s = (String) node.getProp(Node.SPECIAL_PROP_PROP); if (s != null) { if (s.equals("__proto__")) iCodeTop = addByte((byte) TokenStream.GETPROTO, iCodeTop); else if (s.equals("__parent__")) iCodeTop = addByte((byte) TokenStream.GETSCOPEPARENT, iCodeTop); else badTree(node); } else { child = child.getNextSibling(); iCodeTop = generateICode(child, iCodeTop); iCodeTop = addByte((byte) TokenStream.GETPROP, iCodeTop); itsStackDepth--; } } break; case TokenStream.DELPROP : case TokenStream.BITAND : case TokenStream.BITOR : case TokenStream.BITXOR : case TokenStream.LSH : case TokenStream.RSH : case TokenStream.URSH : case TokenStream.ADD : case TokenStream.SUB : case TokenStream.MOD : case TokenStream.DIV : case TokenStream.MUL : case TokenStream.GETELEM : iCodeTop = generateICode(child, iCodeTop); child = child.getNextSibling(); iCodeTop = generateICode(child, iCodeTop); iCodeTop = addByte((byte) type, iCodeTop); itsStackDepth--; break; case TokenStream.CONVERT : { iCodeTop = generateICode(child, iCodeTop); Object toType = node.getProp(Node.TYPE_PROP); if (toType == ScriptRuntime.NumberClass) iCodeTop = addByte((byte) TokenStream.POS, iCodeTop); else badTree(node); } break; case TokenStream.UNARYOP : iCodeTop = generateICode(child, iCodeTop); switch (node.getInt()) { case TokenStream.VOID : iCodeTop = addByte((byte) TokenStream.POP, iCodeTop); iCodeTop = addByte((byte) TokenStream.UNDEFINED, iCodeTop); break; case TokenStream.NOT : { int trueTarget = acquireLabel(); int beyond = acquireLabel(); iCodeTop = addGoto(trueTarget, TokenStream.IFEQ, iCodeTop); iCodeTop = addByte((byte) TokenStream.TRUE, iCodeTop); iCodeTop = addGoto(beyond, TokenStream.GOTO, iCodeTop); markLabel(trueTarget, iCodeTop); iCodeTop = addByte((byte) TokenStream.FALSE, iCodeTop); markLabel(beyond, iCodeTop); } break; case TokenStream.BITNOT : iCodeTop = addByte((byte) TokenStream.BITNOT, iCodeTop); break; case TokenStream.TYPEOF : iCodeTop = addByte((byte) TokenStream.TYPEOF, iCodeTop); break; case TokenStream.SUB : iCodeTop = addByte((byte) TokenStream.NEG, iCodeTop); break; case TokenStream.ADD : iCodeTop = addByte((byte) TokenStream.POS, iCodeTop); break; default: badTree(node); break; } break; case TokenStream.SETPROP : { iCodeTop = generateICode(child, iCodeTop); child = child.getNextSibling(); iCodeTop = generateICode(child, iCodeTop); String s = (String) node.getProp(Node.SPECIAL_PROP_PROP); if (s != null) { if (s.equals("__proto__")) iCodeTop = addByte((byte) TokenStream.SETPROTO, iCodeTop); else if (s.equals("__parent__")) iCodeTop = addByte((byte) TokenStream.SETPARENT, iCodeTop); else badTree(node); } else { child = child.getNextSibling(); iCodeTop = generateICode(child, iCodeTop); iCodeTop = addByte((byte) TokenStream.SETPROP, iCodeTop); itsStackDepth -= 2; } } break; case TokenStream.SETELEM : iCodeTop = generateICode(child, iCodeTop); child = child.getNextSibling(); iCodeTop = generateICode(child, iCodeTop); child = child.getNextSibling(); iCodeTop = generateICode(child, iCodeTop); iCodeTop = addByte((byte) type, iCodeTop); itsStackDepth -= 2; break; case TokenStream.SETNAME : iCodeTop = generateICode(child, iCodeTop); child = child.getNextSibling(); iCodeTop = generateICode(child, iCodeTop); iCodeTop = addByte((byte) TokenStream.SETNAME, iCodeTop); iCodeTop = addString(firstChild.getString(), iCodeTop); itsStackDepth--; break; case TokenStream.TYPEOF : { String name = node.getString(); int index = -1; // use typeofname if an activation frame exists // since the vars all exist there instead of in jregs if (itsInFunctionFlag && !itsData.itsNeedsActivation) index = itsVariableTable.getOrdinal(name); if (index == -1) { iCodeTop = addByte((byte) TokenStream.TYPEOFNAME, iCodeTop); iCodeTop = addString(name, iCodeTop); } else { iCodeTop = addByte((byte) TokenStream.GETVAR, iCodeTop); iCodeTop = addByte((byte) index, iCodeTop); iCodeTop = addByte((byte) TokenStream.TYPEOF, iCodeTop); } itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; } break; case TokenStream.PARENT : iCodeTop = generateICode(child, iCodeTop); iCodeTop = addByte((byte) TokenStream.GETPARENT, iCodeTop); break; case TokenStream.GETBASE : case TokenStream.BINDNAME : case TokenStream.NAME : case TokenStream.STRING : iCodeTop = addByte((byte) type, iCodeTop); iCodeTop = addString(node.getString(), iCodeTop); itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; break; case TokenStream.INC : case TokenStream.DEC : { int childType = child.getType(); switch (childType) { case TokenStream.GETVAR : { String name = child.getString(); if (itsData.itsNeedsActivation) { iCodeTop = addByte((byte) TokenStream.SCOPE, iCodeTop); iCodeTop = addByte((byte) TokenStream.STRING, iCodeTop); iCodeTop = addString(name, iCodeTop); itsStackDepth += 2; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; iCodeTop = addByte((byte) (type == TokenStream.INC ? TokenStream.PROPINC : TokenStream.PROPDEC), iCodeTop); itsStackDepth--; } else { iCodeTop = addByte((byte) (type == TokenStream.INC ? TokenStream.VARINC : TokenStream.VARDEC), iCodeTop); int i = itsVariableTable.getOrdinal(name); iCodeTop = addByte((byte)i, iCodeTop); itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; } } break; case TokenStream.GETPROP : case TokenStream.GETELEM : { Node getPropChild = child.getFirstChild(); iCodeTop = generateICode(getPropChild, iCodeTop); getPropChild = getPropChild.getNextSibling(); iCodeTop = generateICode(getPropChild, iCodeTop); if (childType == TokenStream.GETPROP) iCodeTop = addByte((byte) (type == TokenStream.INC ? TokenStream.PROPINC : TokenStream.PROPDEC), iCodeTop); else iCodeTop = addByte((byte) (type == TokenStream.INC ? TokenStream.ELEMINC : TokenStream.ELEMDEC), iCodeTop); itsStackDepth--; } break; default : { iCodeTop = addByte((byte) (type == TokenStream.INC ? TokenStream.NAMEINC : TokenStream.NAMEDEC), iCodeTop); iCodeTop = addString(child.getString(), iCodeTop); itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; } break; } } break; case TokenStream.NUMBER : { double num = node.getDouble(); if (num == 0.0) { iCodeTop = addByte((byte) TokenStream.ZERO, iCodeTop); } else if (num == 1.0) { iCodeTop = addByte((byte) TokenStream.ONE, iCodeTop); } else { iCodeTop = addByte((byte) TokenStream.NUMBER, iCodeTop); iCodeTop = addNumber(num, iCodeTop); } itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; break; } case TokenStream.POP : case TokenStream.POPV : iCodeTop = updateLineNumber(node, iCodeTop); case TokenStream.ENTERWITH : iCodeTop = generateICode(child, iCodeTop); iCodeTop = addByte((byte) type, iCodeTop); itsStackDepth--; break; case TokenStream.GETTHIS : iCodeTop = generateICode(child, iCodeTop); iCodeTop = addByte((byte) type, iCodeTop); break; case TokenStream.NEWSCOPE : iCodeTop = addByte((byte) type, iCodeTop); itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; break; case TokenStream.LEAVEWITH : iCodeTop = addByte((byte) type, iCodeTop); break; case TokenStream.TRY : { itsTryDepth++; if (itsTryDepth > itsData.itsMaxTryDepth) itsData.itsMaxTryDepth = itsTryDepth; Node catchTarget = (Node)node.getProp(Node.TARGET_PROP); Node finallyTarget = (Node)node.getProp(Node.FINALLY_PROP); if (catchTarget == null) { iCodeTop = addByte((byte) TokenStream.TRY, iCodeTop); iCodeTop = addByte((byte)0, iCodeTop); iCodeTop = addByte((byte)0, iCodeTop); } else iCodeTop = addGoto(node, TokenStream.TRY, iCodeTop); int finallyHandler = 0; if (finallyTarget != null) { finallyHandler = acquireLabel(); int theLabel = finallyHandler & 0x7FFFFFFF; itsLabelTable[theLabel].addFixup(iCodeTop); } iCodeTop = addByte((byte)0, iCodeTop); iCodeTop = addByte((byte)0, iCodeTop); Node lastChild = null; /* when we encounter the child of the catchTarget, we set the stackDepth to 1 to account for the incoming exception object. */ boolean insertedEndTry = false; while (child != null) { if (catchTarget != null && lastChild == catchTarget) { itsStackDepth = 1; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; } /* When the following child is the catchTarget (or the finallyTarget if there are no catches), the current child is the goto at the end of the try statemets, we need to emit the endtry before that goto. */ Node nextSibling = child.getNextSibling(); if (!insertedEndTry && nextSibling != null && (nextSibling == catchTarget || nextSibling == finallyTarget)) { iCodeTop = addByte((byte) TokenStream.ENDTRY, iCodeTop); insertedEndTry = true; } iCodeTop = generateICode(child, iCodeTop); lastChild = child; child = child.getNextSibling(); } itsStackDepth = 0; if (finallyTarget != null) { // normal flow goes around the finally handler stublet int skippy = acquireLabel(); iCodeTop = addGoto(skippy, TokenStream.GOTO, iCodeTop); // on entry the stack will have the exception object markLabel(finallyHandler, iCodeTop); itsStackDepth = 1; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; int theLocalSlot = itsData.itsMaxLocals++; iCodeTop = addByte((byte) TokenStream.NEWTEMP, iCodeTop); iCodeTop = addByte((byte)theLocalSlot, iCodeTop); iCodeTop = addByte((byte) TokenStream.POP, iCodeTop); Integer finallyLabel = (Integer)(finallyTarget.getProp(Node.LABEL_PROP)); iCodeTop = addGoto(finallyLabel.intValue(), TokenStream.GOSUB, iCodeTop); iCodeTop = addByte((byte) TokenStream.USETEMP, iCodeTop); iCodeTop = addByte((byte)theLocalSlot, iCodeTop); iCodeTop = addByte((byte) TokenStream.JTHROW, iCodeTop); itsStackDepth = 0; markLabel(skippy, iCodeTop); } itsTryDepth--; } break; case TokenStream.THROW : iCodeTop = updateLineNumber(node, iCodeTop); iCodeTop = generateICode(child, iCodeTop); iCodeTop = addByte((byte) TokenStream.THROW, iCodeTop); itsStackDepth--; break; case TokenStream.RETURN : iCodeTop = updateLineNumber(node, iCodeTop); if (child != null) iCodeTop = generateICode(child, iCodeTop); else { iCodeTop = addByte((byte) TokenStream.UNDEFINED, iCodeTop); itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; } iCodeTop = addGoto(node, TokenStream.RETURN, iCodeTop); itsStackDepth--; break; case TokenStream.GETVAR : { String name = node.getString(); if (itsData.itsNeedsActivation) { // SETVAR handled this by turning into a SETPROP, but // we can't do that to a GETVAR without manufacturing // bogus children. Instead we use a special op to // push the current scope. iCodeTop = addByte((byte) TokenStream.SCOPE, iCodeTop); iCodeTop = addByte((byte) TokenStream.STRING, iCodeTop); iCodeTop = addString(name, iCodeTop); itsStackDepth += 2; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; iCodeTop = addByte((byte) TokenStream.GETPROP, iCodeTop); itsStackDepth--; } else { int index = itsVariableTable.getOrdinal(name); iCodeTop = addByte((byte) TokenStream.GETVAR, iCodeTop); iCodeTop = addByte((byte)index, iCodeTop); itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; } } break; case TokenStream.SETVAR : { if (itsData.itsNeedsActivation) { child.setType(TokenStream.BINDNAME); node.setType(TokenStream.SETNAME); iCodeTop = generateICode(node, iCodeTop); } else { String name = child.getString(); child = child.getNextSibling(); iCodeTop = generateICode(child, iCodeTop); int index = itsVariableTable.getOrdinal(name); iCodeTop = addByte((byte) TokenStream.SETVAR, iCodeTop); iCodeTop = addByte((byte)index, iCodeTop); } } break; case TokenStream.PRIMARY: iCodeTop = addByte((byte) node.getInt(), iCodeTop); itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; break; case TokenStream.ENUMINIT : iCodeTop = generateICode(child, iCodeTop); iCodeTop = addByte((byte) TokenStream.ENUMINIT, iCodeTop); iCodeTop = addLocalRef(node, iCodeTop); itsStackDepth--; break; case TokenStream.ENUMNEXT : { iCodeTop = addByte((byte) TokenStream.ENUMNEXT, iCodeTop); Node init = (Node)node.getProp(Node.ENUM_PROP); iCodeTop = addLocalRef(init, iCodeTop); itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; } break; case TokenStream.ENUMDONE : // could release the local here?? break; case TokenStream.OBJECT : { Node regexp = (Node) node.getProp(Node.REGEXP_PROP); int index = ((Integer)(regexp.getProp( Node.REGEXP_PROP))).intValue(); iCodeTop = addByte((byte) TokenStream.OBJECT, iCodeTop); iCodeTop = addByte((byte)(index >> 8), iCodeTop); iCodeTop = addByte((byte)(index & 0xff), iCodeTop); itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; } break; default : badTree(node); break; } return iCodeTop; }
12376 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12376/f6c346cc7699c007b0b9b27d9c3cdb5446052c64/Interpreter.java/buggy/js/rhino/src/org/mozilla/javascript/Interpreter.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 509, 2103, 45, 1085, 12, 907, 756, 16, 509, 277, 1085, 3401, 13, 288, 3639, 509, 618, 273, 756, 18, 588, 559, 5621, 3639, 2029, 1151, 273, 756, 18, 588, 3759, 1763, 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, 3238, 509, 2103, 45, 1085, 12, 907, 756, 16, 509, 277, 1085, 3401, 13, 288, 3639, 509, 618, 273, 756, 18, 588, 559, 5621, 3639, 2029, 1151, 273, 756, 18, 588, 3759, 1763, 5621, 3639, ...
public static void main(String[] args){
public static void main(String[] args) {
public static void main(String[] args){ if (args.length > 0) TestRunner.run( TestClass(args[0]) ); else TestRunner.run( suite() ); }
2000 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2000/42e92240032e00cfa75b72717c9bec7a49e9f639/AttributeTest.java/buggy/src/java/org/ensembl/mart/explorer/test/AttributeTest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 3196, 1071, 760, 918, 2774, 12, 780, 8526, 833, 15329, 202, 202, 430, 261, 1968, 18, 2469, 405, 374, 13, 1082, 565, 7766, 9709, 18, 2681, 12, 7766, 797, 12, 1968, 63, 20, 5717, 11272, 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, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 3196, 1071, 760, 918, 2774, 12, 780, 8526, 833, 15329, 202, 202, 430, 261, 1968, 18, 2469, 405, 374, 13, 1082, 565, 7766, 9709, 18, 2681, 12, 7766, 797, 12, 1968, 63, 20, 5717, 11272, 202, ...
reuseEditorsThreshold.getLabelControl(groupComposite).setEnabled(reuseEditors.getSelection()); reuseEditorsThreshold.getTextControl(groupComposite).setEnabled(reuseEditors.getSelection());
reuseEditorsThreshold.getLabelControl(editorReuseGroup).setEnabled(reuseEditors.getSelection()); reuseEditorsThreshold.getTextControl(editorReuseGroup).setEnabled(reuseEditors.getSelection());
private void createEditorReuseGroup(Composite composite) { final Composite groupComposite = new Composite(composite, SWT.LEFT); GridLayout layout = new GridLayout(); layout.numColumns = 2; groupComposite.setLayout(layout); GridData gd = new GridData(); gd.horizontalAlignment = gd.FILL; gd.grabExcessHorizontalSpace = true; groupComposite.setLayoutData(gd); reuseEditors = new Button(groupComposite, SWT.CHECK); reuseEditors.setText(WorkbenchMessages.getString("WorkbenchPreference.reuseEditors")); //$NON-NLS-1$ GridData reuseEditorsData = new GridData(); reuseEditorsData.horizontalSpan = layout.numColumns; reuseEditors.setLayoutData(reuseEditorsData); IPreferenceStore store = WorkbenchPlugin.getDefault().getPreferenceStore(); reuseEditors.setSelection(store.getBoolean(IPreferenceConstants.REUSE_EDITORS_BOOLEAN)); reuseEditors.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e){ reuseEditorsThreshold.getLabelControl(groupComposite).setEnabled(reuseEditors.getSelection()); reuseEditorsThreshold.getTextControl(groupComposite).setEnabled(reuseEditors.getSelection()); } }); reuseEditorsThreshold = new IntegerFieldEditor(IPreferenceConstants.REUSE_EDITORS, WorkbenchMessages.getString("WorkbenchPreference.reuseEditorsThreshold"), groupComposite); //$NON-NLS-1$ reuseEditorsThreshold.setPreferenceStore(WorkbenchPlugin.getDefault().getPreferenceStore()); reuseEditorsThreshold.setPreferencePage(this); reuseEditorsThreshold.setTextLimit(2); reuseEditorsThreshold.setErrorMessage(WorkbenchMessages.getString("WorkbenchPreference.reuseEditorsThresholdError")); //$NON-NLS-1$ reuseEditorsThreshold.setValidateStrategy(StringFieldEditor.VALIDATE_ON_KEY_STROKE); reuseEditorsThreshold.setValidRange(1, 99); reuseEditorsThreshold.load(); reuseEditorsThreshold.getLabelControl(groupComposite).setEnabled(reuseEditors.getSelection()); reuseEditorsThreshold.getTextControl(groupComposite).setEnabled(reuseEditors.getSelection()); reuseEditorsThreshold.setPropertyChangeListener(new IPropertyChangeListener() { public void propertyChange(PropertyChangeEvent event) { if (event.getProperty().equals(FieldEditor.IS_VALID)) setValid(reuseEditorsThreshold.isValid()); } }); }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/1ef7395895b00a9c2f0f7a619909190edfdcadd2/WorkbenchPreferencePage.java/buggy/bundles/org.eclipse.ui/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkbenchPreferencePage.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 918, 752, 6946, 31704, 1114, 12, 9400, 9635, 13, 288, 202, 202, 6385, 14728, 1041, 9400, 273, 394, 14728, 12, 27676, 16, 348, 8588, 18, 10066, 1769, 202, 202, 6313, 3744, 3511,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6946, 31704, 1114, 12, 9400, 9635, 13, 288, 202, 202, 6385, 14728, 1041, 9400, 273, 394, 14728, 12, 27676, 16, 348, 8588, 18, 10066, 1769, 202, 202, 6313, 3744, 3511,...
StringTokenizer attributesTokenizer = new StringTokenizer( stringToSplit, ", " ); String[] tokens = new String[attributesTokenizer.countTokens()]; for( int i = 0; i < tokens.length; ++i ) { tokens[i] = attributesTokenizer.nextToken(); } return tokens; }
StringTokenizer attributesTokenizer = new StringTokenizer( stringToSplit, ", " ); String[] tokens = new String[attributesTokenizer.countTokens()]; for ( int i = 0; i < tokens.length; ++i ) { tokens[i] = attributesTokenizer.nextToken(); } return tokens; }
private static String[] splitStringOnCommasAndSpaces( String stringToSplit ) { StringTokenizer attributesTokenizer = new StringTokenizer( stringToSplit, ", " ); String[] tokens = new String[attributesTokenizer.countTokens()]; for( int i = 0; i < tokens.length; ++i ) { tokens[i] = attributesTokenizer.nextToken(); } return tokens; }
8781 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8781/2e6cb3ce5ba9d3a9f7f42c7014d3a9874e8126ea/LdapUserAndRoleMapper.java/buggy/server/src/imcode/server/user/LdapUserAndRoleMapper.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 565, 3238, 760, 514, 8526, 1416, 780, 1398, 12136, 345, 1876, 12077, 12, 514, 14134, 5521, 262, 288, 1377, 16370, 1677, 10524, 273, 394, 16370, 12, 14134, 5521, 16, 3104, 315, 11272, 1377, 514, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 565, 3238, 760, 514, 8526, 1416, 780, 1398, 12136, 345, 1876, 12077, 12, 514, 14134, 5521, 262, 288, 1377, 16370, 1677, 10524, 273, 394, 16370, 12, 14134, 5521, 16, 3104, 315, 11272, 1377, 514, ...
if (canComplain) cat.warn ("Unable to load configuration " + url + "\n");
if (canComplain) { LOG.warn("Unable to load configuration " + url + "\n"); }
public boolean loadURL(URL url) { try { propertyBundle.load(url.openStream()); cat.info ("Configuration loaded from " + url + "\n"); return true; } catch (Exception e) { if (canComplain) cat.warn ("Unable to load configuration " + url + "\n"); canComplain = false; return false; } }
7166 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7166/2bca90cd19361bbc94b4bf9813d1e3efd96e52fe/ConfigurationProperties.java/clean/src_new/org/argouml/application/configuration/ConfigurationProperties.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 1250, 1262, 1785, 12, 1785, 880, 13, 288, 202, 698, 288, 202, 565, 1272, 3405, 18, 945, 12, 718, 18, 3190, 1228, 10663, 202, 565, 6573, 18, 1376, 7566, 1750, 4203, 628, 315, 397, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 1250, 1262, 1785, 12, 1785, 880, 13, 288, 202, 698, 288, 202, 565, 1272, 3405, 18, 945, 12, 718, 18, 3190, 1228, 10663, 202, 565, 6573, 18, 1376, 7566, 1750, 4203, 628, 315, 397, ...
private final boolean processGreyObject(VM_Address object, AddressDequeue tgt,
private final boolean processGreyObject(VM_Address object, AddressDeque tgt,
private final boolean processGreyObject(VM_Address object, AddressDequeue tgt, long timeCap) throws VM_PragmaInline { if (VM_Interface.VerifyAssertions) VM_Interface._assert(!RCBaseHeader.isGreen(object)); if (RCBaseHeader.isPurple(object)) { if (VM_Interface.VerifyAssertions) VM_Interface._assert(RCBaseHeader.isLiveRC(object)); if (!markGrey(object, timeCap)) { scanBlack(object); return false; } else tgt.push(object); } else { if (VM_Interface.VerifyAssertions) { if (!(RCBaseHeader.isGrey(object) || RCBaseHeader.isBlack(object))) { RCBaseHeader.print(object); } VM_Interface._assert(RCBaseHeader.isGrey(object) || RCBaseHeader.isBlack(object)); } RCBaseHeader.clearBufferedBit(object); } return true; }
5245 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5245/a2d31fa1bc95145b8e2016e9bdeeb119aa707383/TrialDeletion.java/clean/rvm/src/vm/memoryManagers/JMTk/utility/TrialDeletion.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 3238, 727, 1250, 1207, 43, 266, 93, 921, 12, 7397, 67, 1887, 733, 16, 5267, 758, 4000, 11680, 16, 25083, 225, 1525, 813, 4664, 13, 565, 1216, 8251, 67, 2050, 9454, 10870, 288, 565, 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, 282, 3238, 727, 1250, 1207, 43, 266, 93, 921, 12, 7397, 67, 1887, 733, 16, 5267, 758, 4000, 11680, 16, 25083, 225, 1525, 813, 4664, 13, 565, 1216, 8251, 67, 2050, 9454, 10870, 288, 565, 309,...
pl.setSubjectEnd(new Integer((childLength - (childOnChr.getEnd() - parentOnChr.getEnd())) + 1));
pl.setSubjectEnd(new Integer(parentOnChr.getEnd() - childOnChr.getStart() + 1));
protected Location createLocation(BioEntity parent, SimpleLoc parentOnChr, BioEntity child, SimpleLoc childOnChr) { if (!overlap(childOnChr, parentOnChr)) { throw new IllegalArgumentException("parent (" + parentOnChr.getStart() + ", " + parentOnChr.getEnd() + ") and child (" + childOnChr.getStart() + ", " + childOnChr.getEnd() + ") do not overlap."); } boolean startIsPartial = false; boolean endIsPartial = false; // want inclusive co-ordinates int parentLength = (parentOnChr.getEnd() - parentOnChr.getStart()) + 1; int childLength = (childOnChr.getEnd() - childOnChr.getStart()) + 1; if (childOnChr.getStart() < parentOnChr.getStart()) { startIsPartial = true; } if (childOnChr.getEnd() > parentOnChr.getEnd()) { endIsPartial = true; } Location childOnParent = null; if (startIsPartial && endIsPartial) { // -------- parent // | | // -------------- child PartialLocation pl = (PartialLocation) DynamicUtil.createObject(Collections.singleton(PartialLocation.class)); pl.setSubjectStart(new Integer((parentOnChr.getStart() - childOnChr.getStart()) + 1)); // ? +1 // pl.setSubjectEnd(new Integer((childLength // - (childOnChr.getEnd() - parentOnChr.getEnd())) + 1)); pl.setSubjectEnd(new Integer((parentOnChr.getEnd() - childOnChr.getEnd()) + 1)); childOnParent = pl; } else if (startIsPartial) { // -------------- parent // | // ---------- child PartialLocation pl = (PartialLocation) DynamicUtil.createObject(Collections.singleton(PartialLocation.class)); pl.setSubjectStart(new Integer((parentOnChr.getStart() - childOnChr.getStart()) + 1)); pl.setSubjectEnd(new Integer(childLength)); childOnParent = pl; } else if (endIsPartial) { // ------------ parent // | // --------- child PartialLocation pl = (PartialLocation) DynamicUtil.createObject(Collections.singleton(PartialLocation.class)); pl.setSubjectStart(new Integer(1)); pl.setSubjectEnd(new Integer((childLength - (childOnChr.getEnd() - parentOnChr.getEnd())) + 1)); childOnParent = pl; } else { // ------------------ parent // | | // ---------- child childOnParent = (Location) DynamicUtil.createObject(Collections.singleton(Location.class)); } childOnParent.setObject(parent); childOnParent.setSubject(child); childOnParent.setStartIsPartial(startIsPartial ? Boolean.TRUE : Boolean.FALSE); childOnParent.setEndIsPartial(endIsPartial ? Boolean.TRUE : Boolean.FALSE); childOnParent.setStart(new Integer(startIsPartial ? 1 : ((childOnChr.getStart() - parentOnChr.getStart()) + 1))); childOnParent.setEnd(new Integer(endIsPartial ? parentLength : ((childOnChr.getEnd() - parentOnChr.getStart()) + 1))); childOnParent.setStrand(new Integer(childOnChr.getStrand())); // TODO evidence? return childOnParent; }
29158 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/29158/169e945717cb52a4dd672cadad642a0972adb04c/CalculateLocations.java/clean/flymine/model/genomic/src/java/org/flymine/postprocess/CalculateLocations.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 7050, 752, 2735, 12, 38, 1594, 1943, 982, 16, 4477, 1333, 982, 1398, 782, 86, 16, 4766, 1377, 21209, 1943, 1151, 16, 4477, 1333, 1151, 1398, 782, 86, 13, 288, 3639, 309, 16051, 17...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 7050, 752, 2735, 12, 38, 1594, 1943, 982, 16, 4477, 1333, 982, 1398, 782, 86, 16, 4766, 1377, 21209, 1943, 1151, 16, 4477, 1333, 1151, 1398, 782, 86, 13, 288, 3639, 309, 16051, 17...
private List getProjectSourcePath( IProject project ) { List retValue = new ArrayList( ); if ( !hasJavaNature( project ) ) { return null; } // IJavaProject fCurrJProject = JavaCore.create( project ); // // IClasspathEntry[] paths = fCurrJProject.readRawClasspath( ); // if (paths == null || paths.length == 0) // { // return retValue; // } // int len = paths.length; // for (int i=0; i<len; i++) // { // IPath temp = paths[i].getPath(); // // String curPath = temp.toOSString( ); // String directPath = project.getLocation( ).toOSString( ); // int index = directPath.lastIndexOf( File.separator ); // String absPath = directPath.substring( 0, index ) + curPath; // // retValue.add(directPath); // } retValue.add( project.getLocation( ).toOSString( ) ); return retValue; }
12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/a0f8f97025c04bc3e7fc3377d4c9c4c99928bced/ReportLaunchConfigurationDelegate.java/clean/UI/org.eclipse.birt.report.debug.ui/src/org/eclipse/birt/report/debug/ui/launcher/ReportLaunchConfigurationDelegate.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 987, 11080, 1830, 743, 12, 467, 4109, 1984, 262, 202, 95, 202, 202, 682, 21236, 273, 394, 2407, 12, 11272, 202, 202, 430, 261, 401, 5332, 5852, 50, 1231, 12, 1984, 262, 262, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 987, 11080, 1830, 743, 12, 467, 4109, 1984, 262, 202, 95, 202, 202, 682, 21236, 273, 394, 2407, 12, 11272, 202, 202, 430, 261, 401, 5332, 5852, 50, 1231, 12, 1984, 262, 262, ...
addClasspathEntryButtonActionPerformed(evt); }
addClasspathEntryButtonActionPerformed(evt); }
public void actionPerformed(java.awt.event.ActionEvent evt) { addClasspathEntryButtonActionPerformed(evt); }
7352 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7352/32df36439994c14fbd4bb097f19c24c015ecf59d/FindBugsFrame.java/clean/findbugs/src/java/edu/umd/cs/findbugs/gui/FindBugsFrame.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 2398, 1071, 918, 26100, 12, 6290, 18, 2219, 88, 18, 2575, 18, 1803, 1133, 6324, 13, 288, 7734, 9058, 803, 1622, 3616, 19449, 12, 73, 11734, 1769, 5411, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 2398, 1071, 918, 26100, 12, 6290, 18, 2219, 88, 18, 2575, 18, 1803, 1133, 6324, 13, 288, 7734, 9058, 803, 1622, 3616, 19449, 12, 73, 11734, 1769, 5411, 289, 2, -100, -100, -100, -100, -100, ...
if (trig.getNextFireTime() == null) storeTrigger(conn, ctxt, trig,
if (trig.getNextFireTime() == null) { storeTrigger(conn, ctxt, trig,
protected boolean updateMisfiredTrigger(Connection conn, SchedulingContext ctxt, String triggerName, String groupName, String newStateIfNotComplete, boolean forceState) // TODO: probably // get rid of // this throws JobPersistenceException { try { Trigger trig = getDelegate().selectTrigger(conn, triggerName, groupName); long misfireTime = System.currentTimeMillis(); if (getMisfireThreshold() > 0) misfireTime -= getMisfireThreshold(); if (trig.getNextFireTime().getTime() > misfireTime) return false; Calendar cal = null; if (trig.getCalendarName() != null) cal = retrieveCalendar(conn, ctxt, trig.getCalendarName()); signaler.notifyTriggerListenersMisfired(trig); trig.updateAfterMisfire(cal); if (trig.getNextFireTime() == null) storeTrigger(conn, ctxt, trig, null, true, STATE_COMPLETE, forceState, false); else { storeTrigger(conn, ctxt, trig, null, true, newStateIfNotComplete, forceState, false); } return true; } catch (Exception e) { throw new JobPersistenceException( "Couldn't update misfired trigger '" + groupName + "." + triggerName + "': " + e.getMessage(), e); } }
3431 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3431/0ca5d7d851637eb8695746dba9608de14253a225/JobStoreSupport.java/clean/src/java/org/quartz/impl/jdbcjobstore/JobStoreSupport.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 1250, 1089, 49, 7396, 2921, 6518, 12, 1952, 1487, 16, 5411, 348, 13252, 1042, 14286, 16, 514, 3080, 461, 16, 514, 11619, 16, 5411, 514, 15907, 10288, 6322, 16, 1250, 2944, 1119, 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, 4750, 1250, 1089, 49, 7396, 2921, 6518, 12, 1952, 1487, 16, 5411, 348, 13252, 1042, 14286, 16, 514, 3080, 461, 16, 514, 11619, 16, 5411, 514, 15907, 10288, 6322, 16, 1250, 2944, 1119, 13,...
Log.logln(lastActiveLeafNode != null, "pop: zeroing last leafNode: " + lastActiveLeafNode);
Log.logln(SHOW_ALL && lastActiveLeafNode != null, "pop: zeroing last leafNode: " + lastActiveLeafNode);
private void pop(String qName) { Log.logln("pop\t" + qName); if (lastChars.length() != 0 || justPopped == false) { target.add(currentXPath, currentFullXPath, lastChars); lastChars = ""; lastLeafNode = lastActiveLeafNode = currentXPath; } else { Log.logln(lastActiveLeafNode != null, "pop: zeroing last leafNode: " + lastActiveLeafNode); lastActiveLeafNode = null; if (comment != null) { target.addComment(lastLeafNode, comment, XPathParts.Comments.POSTBLOCK); comment = null; } } currentXPath = stripAfter(currentXPath, qName); currentFullXPath = stripAfter(currentFullXPath, qName); justPopped = true; }
27800 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/27800/075b48db8e6ba892d285c732efeec97879c4fe58/CLDRFile.java/buggy/tools/java/org/unicode/cldr/util/CLDRFile.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 3196, 202, 1152, 918, 1843, 12, 780, 22914, 13, 288, 1082, 202, 1343, 18, 1330, 2370, 2932, 5120, 64, 88, 6, 397, 22914, 1769, 5411, 309, 261, 2722, 7803, 18, 2469, 1435, 480, 374, 747, 2537...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 3196, 202, 1152, 918, 1843, 12, 780, 22914, 13, 288, 1082, 202, 1343, 18, 1330, 2370, 2932, 5120, 64, 88, 6, 397, 22914, 1769, 5411, 309, 261, 2722, 7803, 18, 2469, 1435, 480, 374, 747, 2537...
protected Properties getRenameForumParameters( HttpServletRequest req, Properties params) throws ServletException, IOException { // Lets check if we shall create a new properties if( params == null ) params = new Properties() ; // Lets get the standard metainformation String newConfName = (req.getParameter("NEW_FORUM_NAME")==null) ? "" : (req.getParameter("NEW_FORUM_NAME")) ; String renForumId = (req.getParameter("FORUM_ID")==null) ? "" : (req.getParameter("FORUM_ID")) ; params.setProperty("NEW_FORUM_NAME", newConfName) ; params.setProperty("FORUM_ID", renForumId) ; return params ; }
8781 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8781/a270627916b37a677a391dd9f45c54d3d6f12503/ConfAdmin.java/clean/servlets/conf/ConfAdmin.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1117, 6183, 4170, 1069, 1290, 379, 2402, 12, 9984, 1111, 16, 6183, 859, 13, 202, 15069, 16517, 16, 1860, 288, 202, 202, 759, 511, 2413, 866, 309, 732, 24315, 752, 279, 394, 1790, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1117, 6183, 4170, 1069, 1290, 379, 2402, 12, 9984, 1111, 16, 6183, 859, 13, 202, 15069, 16517, 16, 1860, 288, 202, 202, 759, 511, 2413, 866, 309, 732, 24315, 752, 279, 394, 1790, 2...
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { if (featureID >= 0) { switch (eDerivedStructuralFeatureID(featureID, baseClass)) { case NotationPackage.DIAGRAM_STYLE__HORIZONTAL_GUIDES: return ((InternalEList)getHorizontalGuides()).basicRemove(otherEnd, msgs); case NotationPackage.DIAGRAM_STYLE__VERTICAL_GUIDES: return ((InternalEList)getVerticalGuides()).basicRemove(otherEnd, msgs); default: return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); } } return eBasicSetContainer(null, featureID, msgs); }
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case NotationPackage.DIAGRAM_STYLE__HORIZONTAL_GUIDES: return ((InternalEList)getHorizontalGuides()).basicRemove(otherEnd, msgs); case NotationPackage.DIAGRAM_STYLE__VERTICAL_GUIDES: return ((InternalEList)getVerticalGuides()).basicRemove(otherEnd, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); }
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { if (featureID >= 0) { switch (eDerivedStructuralFeatureID(featureID, baseClass)) { case NotationPackage.DIAGRAM_STYLE__HORIZONTAL_GUIDES: return ((InternalEList)getHorizontalGuides()).basicRemove(otherEnd, msgs); case NotationPackage.DIAGRAM_STYLE__VERTICAL_GUIDES: return ((InternalEList)getVerticalGuides()).basicRemove(otherEnd, msgs); default: return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); } } return eBasicSetContainer(null, featureID, msgs); }
1758 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1758/1d1e28c0f7853dd16bd3fe819770773ed4e61d20/DiagramStyleImpl.java/buggy/org.eclipse.gmf.notation/plugins/org.eclipse.gmf.runtime.notation/src/org/eclipse/gmf/runtime/notation/impl/DiagramStyleImpl.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 27050, 425, 16376, 3288, 12, 3061, 8029, 1308, 1638, 16, 509, 6966, 16, 1659, 23955, 16, 27050, 8733, 13, 288, 202, 202, 430, 261, 7238, 734, 1545, 374, 13, 288, 1082, 202, 96...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 27050, 425, 16376, 3288, 12, 3061, 8029, 1308, 1638, 16, 509, 6966, 16, 1659, 23955, 16, 27050, 8733, 13, 288, 202, 202, 430, 261, 7238, 734, 1545, 374, 13, 288, 1082, 202, 96...
if (method == null) { return (null); } if (!Modifier.isPublic(method.getModifiers())) { return (null); } Class clazz = method.getDeclaringClass(); if (Modifier.isPublic(clazz.getModifiers())) { return (method); } method = getAccessibleMethodFromInterfaceNest(clazz, method.getName(), method.getParameterTypes()); return (method);
Class[] parameterTypes = {parameterType}; return getAccessibleMethod(clazz, methodName, parameterTypes);
public static Method getAccessibleMethod(Method method) { // Make sure we have a method to check if (method == null) { return (null); } // If the requested method is not public we cannot call it if (!Modifier.isPublic(method.getModifiers())) { return (null); } // If the declaring class is public, we are done Class clazz = method.getDeclaringClass(); if (Modifier.isPublic(clazz.getModifiers())) { return (method); } // Check the implemented interfaces and subinterfaces method = getAccessibleMethodFromInterfaceNest(clazz, method.getName(), method.getParameterTypes()); return (method); }
54521 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54521/3a08220d010216caae97991073d08a60df10c2ff/MethodUtils.java/buggy/src/java/org/apache/commons/beanutils/MethodUtils.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 760, 2985, 336, 10451, 1305, 12, 1305, 707, 13, 288, 3639, 368, 4344, 3071, 732, 1240, 279, 707, 358, 866, 3639, 309, 261, 2039, 422, 446, 13, 288, 5411, 327, 261, 2011, 1769, 363...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2985, 336, 10451, 1305, 12, 1305, 707, 13, 288, 3639, 368, 4344, 3071, 732, 1240, 279, 707, 358, 866, 3639, 309, 261, 2039, 422, 446, 13, 288, 5411, 327, 261, 2011, 1769, 363...
MAssociationEnd ae0 = (MAssociationEnd)((Object[])(as.getConnections()).toArray())[0]; MAssociationEnd ae1 = (MAssociationEnd)((Object[])(as.getConnections()).toArray())[1]; updateEnd(_srcMult, _srcRole, _srcOrdering, ae0); updateEnd(_destMult, _destRole, _destOrdering, ae1);
MAssociationEnd ae0 = (MAssociationEnd) ((Object[]) (as.getConnections()).toArray())[0]; MAssociationEnd ae1 = (MAssociationEnd) ((Object[]) (as.getConnections()).toArray())[1]; updateEnd(_srcMult, _srcRole, _srcOrdering, ae0); updateEnd(_destMult, _destRole, _destOrdering, ae1);
protected void modelChanged(MElementEvent e) { super.modelChanged(e); MAssociation as = (MAssociation) getOwner(); if (as == null || getLayer() == null) return; MAssociationEnd ae0 = (MAssociationEnd)((Object[])(as.getConnections()).toArray())[0]; MAssociationEnd ae1 = (MAssociationEnd)((Object[])(as.getConnections()).toArray())[1]; updateEnd(_srcMult, _srcRole, _srcOrdering, ae0); updateEnd(_destMult, _destRole, _destOrdering, ae1); boolean srcNav = ae0.isNavigable(); boolean destNav = ae1.isNavigable(); if (srcNav && destNav && SUPPRESS_BIDIRECTIONAL_ARROWS) srcNav = destNav = false; sourceArrowHead = chooseArrowHead(ae0.getAggregation(), srcNav); destArrowHead = chooseArrowHead(ae1.getAggregation(), destNav); setSourceArrowHead(sourceArrowHead); setDestArrowHead(destArrowHead); _srcGroup.calcBounds(); _destGroup.calcBounds(); _middleGroup.calcBounds(); this.computeRoute(); }
7166 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7166/ca3bcb5d6dd283c4553bcbfe50b108dc5d499768/FigAssociation.java/buggy/src_new/org/argouml/uml/diagram/ui/FigAssociation.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 4750, 918, 938, 5033, 12, 12310, 1133, 425, 13, 288, 565, 2240, 18, 2284, 5033, 12, 73, 1769, 565, 490, 7174, 487, 273, 261, 49, 7174, 13, 13782, 5621, 565, 309, 261, 345, 422, 446, 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, 282, 4750, 918, 938, 5033, 12, 12310, 1133, 425, 13, 288, 565, 2240, 18, 2284, 5033, 12, 73, 1769, 565, 490, 7174, 487, 273, 261, 49, 7174, 13, 13782, 5621, 565, 309, 261, 345, 422, 446, 7...
configDialog.storeValues(); jfritz.saveProperties();
public void showConfigDialog() { configDialog = new ConfigDialog(this); configDialog.setLocationRelativeTo(this); if (configDialog.showDialog()) { if (configDialog.getSipModel().getData().size() == 0) { // Noch keine SipProvider eingelesen. try { Vector data = JFritzUtils.retrieveSipProvider(JFritz.getProperty("box.address","192.168.178.1"), JFritz.getProperty("box.password"), new FritzBoxFirmware(JFritz.getProperty("box.firmware"))); configDialog.getSipModel().setData(data); configDialog.getSipModel().fireTableDataChanged(); jfritz.getCallerlist().fireTableDataChanged(); } catch (WrongPasswordException e1) { jfritz.errorMsg("Passwort ungltig!"); } catch (IOException e1) { jfritz.errorMsg("FRITZ!Box-Adresse ungltig!"); } catch (InvalidFirmwareException e1) { jfritz.errorMsg("Firmware-Erkennung gescheitert!"); } } configDialog.storeValues(); jfritz.saveProperties(); monitorButton.setEnabled((Integer.parseInt(JFritz.getProperty( "option.callMonitorType", "0")) > 0)); // Show / hide CallByCall column if (JFritzUtils.parseBoolean(JFritz.getProperty( "option.showCallByCall", "false"))) { TableColumnModel colModel = jfritz.getJframe().getCallerTable() .getColumnModel(); if (!colModel.getColumn(2).getHeaderValue().toString().equals( "Call-By-Call")) { colModel.addColumn(jfritz.getJframe().getCallerTable() .getCallByCallColumn()); colModel.moveColumn(colModel.getColumnCount() - 1, 2); colModel.getColumn(2).setPreferredWidth( Integer.parseInt(JFritz.getProperty( "column2.width", "60"))); getCallerListPanel().getCallByCallButton().setEnabled(true); } } else { TableColumnModel colModel = jfritz.getJframe().getCallerTable() .getColumnModel(); if (colModel.getColumn(2).getHeaderValue().toString().equals( "Call-By-Call")) { colModel.removeColumn(colModel.getColumn(2)); getCallerListPanel().getCallByCallButton() .setEnabled(false); } } } configDialog.dispose(); }
7476 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7476/f6a40b2836ab0d281c9823859247cdb4eb595978/JFritzWindow.java/clean/jfritz/src/de/moonflower/jfritz/JFritzWindow.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 2405, 809, 6353, 1435, 288, 202, 202, 1425, 6353, 273, 394, 1903, 6353, 12, 2211, 1769, 202, 202, 1425, 6353, 18, 542, 2735, 8574, 774, 12, 2211, 1769, 202, 202, 430, 261...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 2405, 809, 6353, 1435, 288, 202, 202, 1425, 6353, 273, 394, 1903, 6353, 12, 2211, 1769, 202, 202, 1425, 6353, 18, 542, 2735, 8574, 774, 12, 2211, 1769, 202, 202, 430, 261...
return handler != null;
return receiverThread != null;
boolean established() { return handler != null; }
50160 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50160/d9e4a8710e373a36e9ca41a4d244afda624c6344/ConnectionTable.java/buggy/src/org/jgroups/blocks/ConnectionTable.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 540, 1250, 19703, 1435, 288, 5411, 327, 5971, 3830, 480, 446, 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, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 540, 1250, 19703, 1435, 288, 5411, 327, 5971, 3830, 480, 446, 31, 3639, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
int offset = VM_Entrypoints.saveThreadStateInstructionsField.getOffsetAsInt();
Offset offset = VM_Entrypoints.saveThreadStateInstructionsField.getOffset();
private final boolean genMagic (VM_MethodReference m) { VM_Atom methodName = m.getName(); if (m.getType() == VM_TypeReference.Address) { // Address magic VM_TypeReference[] types = m.getParameterTypes(); // Loads all take the form: // ..., Address, [Offset] -> ..., Value if (methodName == VM_MagicNames.loadAddress || methodName == VM_MagicNames.prepareAddress || methodName == VM_MagicNames.prepareObjectReference || methodName == VM_MagicNames.loadWord || methodName == VM_MagicNames.loadObjectReference || methodName == VM_MagicNames.prepareWord || methodName == VM_MagicNames.loadInt || methodName == VM_MagicNames.prepareInt || methodName == VM_MagicNames.loadFloat) { if (types.length == 0) { // No offset asm.emitPOP_Reg(T0); // address asm.emitPUSH_RegInd(T0); // pushes [T0+0] } else { // Load at offset asm.emitPOP_Reg (S0); // offset asm.emitPOP_Reg (T0); // object ref asm.emitPUSH_RegIdx(T0, S0, asm.BYTE, 0); // pushes [T0+S0] } return true; } if (methodName == VM_MagicNames.loadByte) { if (types.length == 0) { // No offset asm.emitPOP_Reg (T0); // base asm.emitMOVZX_Reg_RegInd_Byte(T0, T0) ; asm.emitPUSH_Reg (T0); } else { // Load at offset asm.emitPOP_Reg (S0); // offset asm.emitPOP_Reg (T0); // base asm.emitMOVZX_Reg_RegIdx_Byte(T0, T0, S0, asm.BYTE, 0); // load and zero extend byte [T0+S0] asm.emitPUSH_Reg (T0); } return true; } if (methodName == VM_MagicNames.loadShort || methodName == VM_MagicNames.loadChar) { if (types.length == 0) { // No offset asm.emitPOP_Reg (T0); // base asm.emitMOVZX_Reg_RegInd_Word(T0, T0); asm.emitPUSH_Reg (T0); } else { // Load at offset asm.emitPOP_Reg (S0); // offset asm.emitPOP_Reg (T0); // base asm.emitMOVZX_Reg_RegIdx_Word(T0, T0, S0, asm.BYTE, 0); // load and zero extend word [T0+S0] asm.emitPUSH_Reg (T0); } return true; } if (methodName == VM_MagicNames.loadLong || methodName == VM_MagicNames.loadDouble) { if (types.length == 0) { // No offset throw new RuntimeException("Magic not implemented"); } else { // Load at offset asm.emitPOP_Reg (S0); // offset asm.emitPOP_Reg (T0); // base asm.emitPUSH_RegIdx(T0, S0, asm.BYTE, 4); // pushes [T0+S0+4] asm.emitPUSH_RegIdx(T0, S0, asm.BYTE, 0); // pushes [T0+S0] } return true; } // Stores all take the form: // ..., Address, [Offset], Value -> ... if (methodName == VM_MagicNames.store) { // Always at least one parameter to a store. // First parameter is the type to be stored. VM_TypeReference storeType = types[0]; if (storeType == VM_TypeReference.Int || storeType == VM_TypeReference.Address || storeType == VM_TypeReference.ObjectReference || storeType == VM_TypeReference.Word || storeType == VM_TypeReference.Float) { if (types.length == 1) { // No offset asm.emitPOP_Reg(T0); // value asm.emitPOP_Reg(S0); // address asm.emitMOV_RegInd_Reg(S0,T0); // [S0+0] <- T0 } else { // Store at offset asm.emitPOP_Reg(S0); // offset asm.emitPOP_Reg(T0); // value asm.emitPOP_Reg(T1); // address asm.emitMOV_RegIdx_Reg(T1, S0, asm.BYTE, 0, T0); // [T1+S0] <- T0 } return true; } if (storeType == VM_TypeReference.Byte) { if (types.length == 1) { // No offset asm.emitPOP_Reg(T0); // value asm.emitPOP_Reg(T1); // base asm.emitMOV_RegInd_Reg_Byte(T1, T0); } else { // Store at offset asm.emitPOP_Reg(S0); // offset asm.emitPOP_Reg(T0); // value asm.emitPOP_Reg(T1); // base asm.emitMOV_RegIdx_Reg_Byte(T1, S0, asm.BYTE, 0, T0); // [T1+S0] <- (byte) T0 } return true; } if (storeType == VM_TypeReference.Short || storeType == VM_TypeReference.Char) { if (types.length == 1) { // No offset asm.emitPOP_Reg(T0); // value asm.emitPOP_Reg(T1); // base asm.emitMOV_RegInd_Reg_Word(T1, T0); } else { // Store at offset asm.emitPOP_Reg(S0); // offset asm.emitPOP_Reg(T0); // value asm.emitPOP_Reg(T1); // base asm.emitMOV_RegIdx_Reg_Word(T1, S0, asm.BYTE, 0, T0); // [T1+S0] <- (word) T0 } return true; } if (storeType == VM_TypeReference.Double || storeType == VM_TypeReference.Long) { if (types.length == 1) { // No offset throw new RuntimeException("Magic not implemented"); } else { // Store at offset asm.emitMOV_Reg_RegDisp(T0, SP, +4); // value high asm.emitMOV_Reg_RegInd (S0, SP); // offset asm.emitMOV_Reg_RegDisp(T1, SP, +12); // base asm.emitMOV_RegIdx_Reg (T1, S0, asm.BYTE, 0, T0); // [T1+S0] <- T0 asm.emitMOV_Reg_RegDisp(T0, SP, +8); // value low asm.emitMOV_RegIdx_Reg (T1, S0, asm.BYTE, 4, T0); // [T1+S0+4] <- T0 asm.emitADD_Reg_Imm (SP, WORDSIZE * 4); // pop stack locations } return true; } } else if (methodName == VM_MagicNames.attempt) { // All attempts are similar 32 bit values. if (types.length == 3) { // Offset passed asm.emitPOP_Reg (S0); // S0 = offset } asm.emitPOP_Reg (T1); // newVal asm.emitPOP_Reg (EAX); // oldVal (EAX is implicit arg to LCMPX if (types.length == 3) { asm.emitADD_Reg_RegInd(S0, SP); // S0 += base } else { // No offset asm.emitMOV_Reg_RegInd(S0, SP); // S0 = base } asm.emitLockNextInstruction(); asm.emitCMPXCHG_RegInd_Reg (S0, T1); // atomic compare-and-exchange asm.emitMOV_RegInd_Imm (SP, 0); // 'push' false (overwriting base) VM_ForwardReference fr = asm.forwardJcc(asm.NE); // skip if compare fails asm.emitMOV_RegInd_Imm (SP, 1); // 'push' true (overwriting base) fr.resolve(asm); return true; } } if (methodName == VM_MagicNames.attemptInt || methodName == VM_MagicNames.attemptObject || methodName == VM_MagicNames.attemptAddress || methodName == VM_MagicNames.attemptWord) { // attempt gets called with four arguments: base, offset, oldVal, newVal // returns ([base+offset] == oldVal) // if ([base+offset] == oldVal) [base+offset] := newVal // (operation on memory is atomic) asm.emitPOP_Reg (T1); // newVal asm.emitPOP_Reg (EAX); // oldVal (EAX is implicit arg to LCMPXCNG asm.emitPOP_Reg (S0); // S0 = offset asm.emitADD_Reg_RegInd(S0, SP); // S0 += base asm.emitLockNextInstruction(); asm.emitCMPXCHG_RegInd_Reg (S0, T1); // atomic compare-and-exchange asm.emitMOV_RegInd_Imm (SP, 0); // 'push' false (overwriting base) VM_ForwardReference fr = asm.forwardJcc(asm.NE); // skip if compare fails asm.emitMOV_RegInd_Imm (SP, 1); // 'push' true (overwriting base) fr.resolve(asm); return true; } if (methodName == VM_MagicNames.invokeMain) { // invokeMain gets "called" with two arguments: // String[] mainArgs // the arguments to the main method // INSTRUCTION[] mainCode // the code for the main method asm.emitPOP_Reg (S0); // genParameterRegisterLoad(1); // pass 1 parameter word asm.emitCALL_Reg(S0); // branches to mainCode with mainArgs on the stack return true; } if (methodName == VM_MagicNames.saveThreadState) { int offset = VM_Entrypoints.saveThreadStateInstructionsField.getOffsetAsInt(); genParameterRegisterLoad(1); // pass 1 parameter word asm.emitCALL_RegDisp(JTOC, offset); return true; } if (methodName == VM_MagicNames.threadSwitch) { int offset = VM_Entrypoints.threadSwitchInstructionsField.getOffsetAsInt(); genParameterRegisterLoad(2); // pass 2 parameter words asm.emitCALL_RegDisp(JTOC, offset); return true; } if (methodName == VM_MagicNames.restoreHardwareExceptionState) { int offset = VM_Entrypoints.restoreHardwareExceptionStateInstructionsField.getOffsetAsInt(); genParameterRegisterLoad(1); // pass 1 parameter word asm.emitCALL_RegDisp(JTOC, offset); return true; } if (methodName == VM_MagicNames.invokeClassInitializer) { asm.emitPOP_Reg (S0); asm.emitCALL_Reg(S0); // call address just popped return true; } if (m.getType() == VM_TypeReference.SysCall) { VM_TypeReference[] args = m.getParameterTypes(); VM_TypeReference rtype = m.getReturnType(); int offsetToJavaArg = 3*WORDSIZE; // the three regs saved in (2) int paramBytes = 0; // (1) save three RVM nonvolatile/special registers // we don't have to save EBP: the callee will // treat it as a framepointer and save/restore // it for us. asm.emitPUSH_Reg(EBX); asm.emitPUSH_Reg(ESI); asm.emitPUSH_Reg(EDI); // (2) Push args to target function (reversed) for (int i=args.length-1; i>=0; i--) { VM_TypeReference arg = args[i]; if (arg.isLongType() || arg.isDoubleType()) { asm.emitPUSH_RegDisp(SP, offsetToJavaArg + 4); asm.emitPUSH_RegDisp(SP, offsetToJavaArg + 4); offsetToJavaArg += 16; paramBytes += 8; } else { asm.emitPUSH_RegDisp(SP, offsetToJavaArg); offsetToJavaArg += 8; paramBytes += 4; } } // (3) invoke target function VM_Field ip = VM_Entrypoints.getSysCallField(m.getName().toString()); asm.emitMOV_Reg_RegDisp(S0, JTOC, VM_Entrypoints.the_boot_recordField.getOffsetAsInt()); asm.emitCALL_RegDisp(S0, ip.getOffsetAsInt()); // (4) pop space for arguments asm.emitADD_Reg_Imm(SP, paramBytes); // (5) restore RVM registers asm.emitPOP_Reg(EDI); asm.emitPOP_Reg(ESI); asm.emitPOP_Reg(EBX); // (6) pop expression stack asm.emitADD_Reg_Imm(SP, paramBytes); // (7) push return value if (rtype.isLongType()) { asm.emitPUSH_Reg(T1); asm.emitPUSH_Reg(T0); } else if (rtype.isDoubleType()) { asm.emitSUB_Reg_Imm(SP, 8); asm.emitFSTP_RegInd_Reg_Quad(SP, FP0); } else if (rtype.isFloatType()) { asm.emitSUB_Reg_Imm(SP, 4); asm.emitFSTP_RegInd_Reg(SP, FP0); } else if (!rtype.isVoidType()) { asm.emitPUSH_Reg(T0); } return true; } if (methodName == VM_MagicNames.getFramePointer) { asm.emitLEA_Reg_RegDisp(S0, SP, fp2spOffset(0)); asm.emitPUSH_Reg (S0); return true; } if (methodName == VM_MagicNames.getCallerFramePointer) { asm.emitPOP_Reg(T0); // Callee FP asm.emitPUSH_RegDisp(T0, STACKFRAME_FRAME_POINTER_OFFSET); // Caller FP return true; } if (methodName == VM_MagicNames.setCallerFramePointer) { asm.emitPOP_Reg(T0); // value asm.emitPOP_Reg(S0); // fp asm.emitMOV_RegDisp_Reg(S0, STACKFRAME_FRAME_POINTER_OFFSET, T0); // [S0+SFPO] <- T0 return true; } if (methodName == VM_MagicNames.getCompiledMethodID) { asm.emitPOP_Reg(T0); // Callee FP asm.emitPUSH_RegDisp(T0, STACKFRAME_METHOD_ID_OFFSET); // Callee CMID return true; } if (methodName == VM_MagicNames.setCompiledMethodID) { asm.emitPOP_Reg(T0); // value asm.emitPOP_Reg(S0); // fp asm.emitMOV_RegDisp_Reg(S0, STACKFRAME_METHOD_ID_OFFSET, T0); // [S0+SMIO] <- T0 return true; } if (methodName == VM_MagicNames.getReturnAddressLocation) { asm.emitPOP_Reg(T0); // Callee FP asm.emitADD_Reg_Imm(T0, STACKFRAME_RETURN_ADDRESS_OFFSET); // location containing callee return address asm.emitPUSH_Reg(T0); // Callee return address return true; } if (methodName == VM_MagicNames.getTocPointer || methodName == VM_MagicNames.getJTOC ) { asm.emitPUSH_Reg(JTOC); return true; } // get the processor register (PR) if (methodName == VM_MagicNames.getProcessorRegister) { asm.emitPUSH_Reg(PR); return true; } // set the processor register (PR) if (methodName == VM_MagicNames.setProcessorRegister) { asm.emitPOP_Reg(PR); return true; } // Get the value in ESI if (methodName == VM_MagicNames.getESIAsProcessor) { asm.emitPUSH_Reg(ESI); return true; } // Set the value in ESI if (methodName == VM_MagicNames.setESIAsProcessor) { asm.emitPOP_Reg(ESI); return true; } if (methodName == VM_MagicNames.getIntAtOffset || methodName == VM_MagicNames.getWordAtOffset || methodName == VM_MagicNames.getObjectAtOffset || methodName == VM_MagicNames.getObjectArrayAtOffset || methodName == VM_MagicNames.prepareInt || methodName == VM_MagicNames.prepareObject || methodName == VM_MagicNames.prepareAddress || methodName == VM_MagicNames.prepareWord) { asm.emitPOP_Reg (T0); // object ref asm.emitPOP_Reg (S0); // offset asm.emitPUSH_RegIdx(T0, S0, asm.BYTE, 0); // pushes [T0+S0] return true; } if (methodName == VM_MagicNames.getByteAtOffset) { asm.emitPOP_Reg (T0); // object ref asm.emitPOP_Reg (S0); // offset asm.emitMOVZX_Reg_RegIdx_Byte(T0, T0, S0, asm.BYTE, 0); // load and zero extend byte [T0+S0] asm.emitPUSH_Reg (T0); return true; } if (methodName == VM_MagicNames.getCharAtOffset) { asm.emitPOP_Reg (T0); // object ref asm.emitPOP_Reg (S0); // offset asm.emitMOVZX_Reg_RegIdx_Word(T0, T0, S0, asm.BYTE, 0); // load and zero extend char [T0+S0] asm.emitPUSH_Reg (T0); return true; } if (methodName == VM_MagicNames.setIntAtOffset || methodName == VM_MagicNames.setWordAtOffset || methodName == VM_MagicNames.setObjectAtOffset ) { if (m.getParameterTypes().length == 4) { // discard locationMetadata parameter asm.emitPOP_Reg(T0); // locationMetadata, not needed by baseline compiler. } asm.emitPOP_Reg(T0); // value asm.emitPOP_Reg(S0); // offset asm.emitPOP_Reg(T1); // obj ref asm.emitMOV_RegIdx_Reg(T1, S0, asm.BYTE, 0, T0); // [T1+S0] <- T0 return true; } if (methodName == VM_MagicNames.setByteAtOffset) { asm.emitPOP_Reg(T0); // value asm.emitPOP_Reg(S0); // offset asm.emitPOP_Reg(T1); // obj ref asm.emitMOV_RegIdx_Reg_Byte(T1, S0, asm.BYTE, 0, T0); // [T1+S0] <- (byte) T0 return true; } if (methodName == VM_MagicNames.setCharAtOffset) { asm.emitPOP_Reg(T0); // value asm.emitPOP_Reg(S0); // offset asm.emitPOP_Reg(T1); // obj ref asm.emitMOV_RegIdx_Reg_Word(T1, S0, asm.BYTE, 0, T0); // [T1+S0] <- (char) T0 return true; } if (methodName == VM_MagicNames.getLongAtOffset || methodName == VM_MagicNames.getDoubleAtOffset) { asm.emitPOP_Reg (T0); // object ref asm.emitPOP_Reg (S0); // offset asm.emitPUSH_RegIdx(T0, S0, asm.BYTE, 4); // pushes [T0+S0+4] asm.emitPUSH_RegIdx(T0, S0, asm.BYTE, 0); // pushes [T0+S0] return true; } if (methodName == VM_MagicNames.setLongAtOffset || methodName == VM_MagicNames.setDoubleAtOffset) { asm.emitMOV_Reg_RegInd (T0, SP); // value high asm.emitMOV_Reg_RegDisp(S0, SP, +8 ); // offset asm.emitMOV_Reg_RegDisp(T1, SP, +12); // obj ref asm.emitMOV_RegIdx_Reg (T1, S0, asm.BYTE, 0, T0); // [T1+S0] <- T0 asm.emitMOV_Reg_RegDisp(T0, SP, +4 ); // value low asm.emitMOV_RegIdx_Reg (T1, S0, asm.BYTE, 4, T0); // [T1+S0+4] <- T0 asm.emitADD_Reg_Imm (SP, WORDSIZE * 4); // pop stack locations return true; } if (methodName == VM_MagicNames.addressArrayCreate) { // no resolution problem possible. emit_resolved_newarray(m.getType().resolve().asArray()); return true; } if (methodName == VM_MagicNames.addressArrayLength) { emit_arraylength(); // argument order already correct return true; } if (methodName == VM_MagicNames.addressArrayGet) { if (m.getType() == VM_TypeReference.CodeArray) { emit_baload(); } else { if (VM.BuildFor32Addr) { emit_iaload(); } else if (VM.BuildFor64Addr) { emit_laload(); } else { VM._assert(NOT_REACHED); } } return true; } if (methodName == VM_MagicNames.addressArraySet) { if (m.getType() == VM_TypeReference.CodeArray) { emit_bastore(); } else { if (VM.BuildFor32Addr) { emit_iastore(); } else if (VM.BuildFor64Addr) { VM._assert(false); // not implemented } else { VM._assert(NOT_REACHED); } } return true; } if (methodName == VM_MagicNames.getMemoryInt || methodName == VM_MagicNames.getMemoryWord || methodName == VM_MagicNames.getMemoryAddress) { asm.emitPOP_Reg(T0); // address asm.emitPUSH_RegInd(T0); // pushes [T0+0] return true; } if (methodName == VM_MagicNames.setMemoryInt || methodName == VM_MagicNames.setMemoryWord || methodName == VM_MagicNames.setMemoryAddress) { if (m.getParameterTypes().length == 3) { // discard locationMetadata parameter asm.emitPOP_Reg(T0); // locationMetadata, not needed by baseline compiler. } asm.emitPOP_Reg(T0); // value asm.emitPOP_Reg(S0); // address asm.emitMOV_RegInd_Reg(S0,T0); // [S0+0] <- T0 return true; } if (methodName == VM_MagicNames.objectAsAddress || methodName == VM_MagicNames.addressAsByteArray || methodName == VM_MagicNames.addressAsIntArray || methodName == VM_MagicNames.addressAsObject || methodName == VM_MagicNames.addressAsObjectArray || methodName == VM_MagicNames.addressAsType || methodName == VM_MagicNames.objectAsType || methodName == VM_MagicNames.objectAsShortArray || methodName == VM_MagicNames.objectAsByteArray || methodName == VM_MagicNames.objectAsIntArray || methodName == VM_MagicNames.addressAsThread || methodName == VM_MagicNames.objectAsThread || methodName == VM_MagicNames.objectAsProcessor || methodName == VM_MagicNames.threadAsCollectorThread || methodName == VM_MagicNames.addressAsRegisters || methodName == VM_MagicNames.addressAsStack || methodName == VM_MagicNames.floatAsIntBits || methodName == VM_MagicNames.intBitsAsFloat || methodName == VM_MagicNames.doubleAsLongBits || methodName == VM_MagicNames.longBitsAsDouble) { // no-op (a type change, not a representation change) return true; } // code for VM_Type VM_Magic.getObjectType(Object object) if (methodName == VM_MagicNames.getObjectType) { asm.emitPOP_Reg (T0); // object ref VM_ObjectModel.baselineEmitLoadTIB(asm,S0,T0); asm.emitPUSH_RegDisp(S0, TIB_TYPE_INDEX<<LG_WORDSIZE); // push VM_Type slot of TIB return true; } if (methodName == VM_MagicNames.getArrayLength) { asm.emitPOP_Reg(T0); // object ref asm.emitPUSH_RegDisp(T0, VM_ObjectModel.getArrayLengthOffset().toInt()); return true; } if (methodName == VM_MagicNames.sync) { // nothing required on IA32 return true; } if (methodName == VM_MagicNames.isync) { // nothing required on IA32 return true; } // baseline compiled invocation only: all paramaters on the stack // hi mem // Code // GPRs // FPRs // Spills // low-mem if (methodName == VM_MagicNames.invokeMethodReturningVoid) { int offset = VM_Entrypoints.reflectiveMethodInvokerInstructionsField.getOffsetAsInt(); genParameterRegisterLoad(4); // pass 4 parameter words asm.emitCALL_RegDisp(JTOC, offset); return true; } if (methodName == VM_MagicNames.invokeMethodReturningInt) { int offset = VM_Entrypoints.reflectiveMethodInvokerInstructionsField.getOffsetAsInt(); genParameterRegisterLoad(4); // pass 4 parameter words asm.emitCALL_RegDisp(JTOC, offset); asm.emitPUSH_Reg(T0); return true; } if (methodName == VM_MagicNames.invokeMethodReturningLong) { int offset = VM_Entrypoints.reflectiveMethodInvokerInstructionsField.getOffsetAsInt(); genParameterRegisterLoad(4); // pass 4 parameter words asm.emitCALL_RegDisp(JTOC, offset); asm.emitPUSH_Reg(T0); // high half asm.emitPUSH_Reg(T1); // low half return true; } if (methodName == VM_MagicNames.invokeMethodReturningFloat) { int offset = VM_Entrypoints.reflectiveMethodInvokerInstructionsField.getOffsetAsInt(); genParameterRegisterLoad(4); // pass 4 parameter words asm.emitCALL_RegDisp(JTOC, offset); asm.emitSUB_Reg_Imm (SP, 4); asm.emitFSTP_RegInd_Reg(SP, FP0); return true; } if (methodName == VM_MagicNames.invokeMethodReturningDouble) { int offset = VM_Entrypoints.reflectiveMethodInvokerInstructionsField.getOffsetAsInt(); genParameterRegisterLoad(4); // pass 4 parameter words asm.emitCALL_RegDisp(JTOC, offset); asm.emitSUB_Reg_Imm (SP, 8); asm.emitFSTP_RegInd_Reg_Quad(SP, FP0); return true; } if (methodName == VM_MagicNames.invokeMethodReturningObject) { int offset = VM_Entrypoints.reflectiveMethodInvokerInstructionsField.getOffsetAsInt(); genParameterRegisterLoad(4); // pass 4 parameter words asm.emitCALL_RegDisp(JTOC, offset); asm.emitPUSH_Reg(T0); return true; } // baseline invocation // one paramater, on the stack -- actual code if (methodName == VM_MagicNames.dynamicBridgeTo) { if (VM.VerifyAssertions) VM._assert(klass.isDynamicBridge()); // save the branch address for later asm.emitPOP_Reg (S0); // S0<-code address asm.emitADD_Reg_Imm(SP, fp2spOffset(0) - 4); // just popped 4 bytes above. // restore FPU state asm.emitFRSTOR_RegDisp(SP, FPU_SAVE_OFFSET); // restore GPRs asm.emitMOV_Reg_RegDisp (T0, SP, T0_SAVE_OFFSET); asm.emitMOV_Reg_RegDisp (T1, SP, T1_SAVE_OFFSET); asm.emitMOV_Reg_RegDisp (EBX, SP, EBX_SAVE_OFFSET); asm.emitMOV_Reg_RegDisp (JTOC, SP, JTOC_SAVE_OFFSET); // pop frame asm.emitPOP_RegDisp (PR, VM_Entrypoints.framePointerField.getOffsetAsInt()); // FP<-previous FP // branch asm.emitJMP_Reg (S0); return true; } if (methodName == VM_MagicNames.returnToNewStack) { // SP gets frame pointer for new stack asm.emitPOP_Reg (SP); // restore nonvolatile registers asm.emitMOV_Reg_RegDisp (JTOC, SP, JTOC_SAVE_OFFSET); asm.emitMOV_Reg_RegDisp (EBX, SP, EBX_SAVE_OFFSET); // discard current stack frame asm.emitPOP_RegDisp (PR, VM_Entrypoints.framePointerField.getOffsetAsInt()); // return to caller- pop parameters from stack asm.emitRET_Imm(parameterWords << LG_WORDSIZE); return true; } if (methodName == VM_MagicNames.roundToZero) { // Store the FPU Control Word to a JTOC slot asm.emitFNSTCW_RegDisp(JTOC, VM_Entrypoints.FPUControlWordField.getOffsetAsInt()); // Set the bits in the status word that control round to zero. // Note that we use a 32-bit OR, even though we only care about the // low-order 16 bits asm.emitOR_RegDisp_Imm(JTOC,VM_Entrypoints.FPUControlWordField.getOffsetAsInt(), 0x00000c00); // Now store the result back into the FPU Control Word asm.emitFLDCW_RegDisp(JTOC,VM_Entrypoints.FPUControlWordField.getOffsetAsInt()); return true; } if (methodName == VM_MagicNames.clearFloatingPointState) { // Clear the hardware floating-point state asm.emitFNINIT(); return true; } if (methodName == VM_MagicNames.getTimeBase) { asm.emitRDTSC(); // read timestamp counter instruction asm.emitPUSH_Reg(EDX); // upper 32 bits asm.emitPUSH_Reg(EAX); // lower 32 bits return true; } if (methodName == VM_MagicNames.wordFromInt || methodName == VM_MagicNames.wordFromObject || methodName == VM_MagicNames.wordFromIntZeroExtend || methodName == VM_MagicNames.wordFromIntSignExtend || methodName == VM_MagicNames.wordToInt || methodName == VM_MagicNames.wordToAddress || methodName == VM_MagicNames.wordToOffset || methodName == VM_MagicNames.wordToObject || methodName == VM_MagicNames.wordToObjectReference || methodName == VM_MagicNames.wordToExtent || methodName == VM_MagicNames.wordToWord) { if (VM.BuildFor32Addr) return true; // no-op for 32-bit if (VM.VerifyAssertions) VM._assert(false); } if (methodName == VM_MagicNames.wordToLong) { if (VM.BuildFor32Addr) { asm.emitPOP_Reg(T0); asm.emitPUSH_Imm(0); // upper 32 bits asm.emitPUSH_Reg(T0); // lower 32 bits return true; } // else fill unused stackslot if (VM.VerifyAssertions) VM._assert(false); } if (methodName == VM_MagicNames.wordAnd) { asm.emitPOP_Reg(T0); asm.emitAND_RegInd_Reg(SP, T0); return true; } if (methodName == VM_MagicNames.wordOr) { asm.emitPOP_Reg(T0); asm.emitOR_RegInd_Reg(SP, T0); return true; } if (methodName == VM_MagicNames.wordXor) { asm.emitPOP_Reg(T0); asm.emitXOR_RegInd_Reg(SP, T0); return true; } if (methodName == VM_MagicNames.wordNot) { asm.emitNOT_RegInd (SP); return true; } if (methodName == VM_MagicNames.wordAdd) { asm.emitPOP_Reg(T0); asm.emitADD_RegInd_Reg(SP, T0); return true; } if (methodName == VM_MagicNames.wordSub || methodName == VM_MagicNames.wordDiff) { asm.emitPOP_Reg(T0); asm.emitSUB_RegInd_Reg(SP, T0); return true; } if (methodName == VM_MagicNames.wordZero || methodName == VM_MagicNames.wordNull) { asm.emitPUSH_Imm(0); return true; } if (methodName == VM_MagicNames.wordOne) { asm.emitPUSH_Imm(1); return true; } if (methodName == VM_MagicNames.wordMax) { asm.emitPUSH_Imm(-1); return true; } if (methodName == VM_MagicNames.wordLT) { generateAddrComparison(asm.LLT); return true; } if (methodName == VM_MagicNames.wordLE) { generateAddrComparison(asm.LLE); return true; } if (methodName == VM_MagicNames.wordGT) { generateAddrComparison(asm.LGT); return true; } if (methodName == VM_MagicNames.wordGE) { generateAddrComparison(asm.LGE); return true; } if (methodName == VM_MagicNames.wordsLT) { generateAddrComparison(asm.LT); return true; } if (methodName == VM_MagicNames.wordsLE) { generateAddrComparison(asm.LE); return true; } if (methodName == VM_MagicNames.wordsGT) { generateAddrComparison(asm.GT); return true; } if (methodName == VM_MagicNames.wordsGE) { generateAddrComparison(asm.GE); return true; } if (methodName == VM_MagicNames.wordEQ) { generateAddrComparison(asm.EQ); return true; } if (methodName == VM_MagicNames.wordNE) { generateAddrComparison(asm.NE); return true; } if (methodName == VM_MagicNames.wordIsZero) { asm.emitPUSH_Imm(0); generateAddrComparison(asm.EQ); return true; } if (methodName == VM_MagicNames.wordIsNull) { asm.emitPUSH_Imm(0); generateAddrComparison(asm.EQ); return true; } if (methodName == VM_MagicNames.wordIsMax) { asm.emitPUSH_Imm(-1); generateAddrComparison(asm.EQ); return true; } if (methodName == VM_MagicNames.wordLsh) { if (VM.BuildFor32Addr) { asm.emitPOP_Reg(ECX); asm.emitSHL_RegInd_Reg(SP, ECX); } else VM._assert(false); return true; } if (methodName == VM_MagicNames.wordRshl) { if (VM.BuildFor32Addr) { asm.emitPOP_Reg (ECX); asm.emitSHR_RegInd_Reg (SP, ECX); } else VM._assert(false); return true; } if (methodName == VM_MagicNames.wordRsha) { if (VM.BuildFor32Addr) { asm.emitPOP_Reg (ECX); asm.emitSAR_RegInd_Reg (SP, ECX); } else VM._assert(false); return true; } return false; }
4011 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4011/df5323a1679a545ad5b2e78b0bf88ba178e71da8/VM_Compiler.java/clean/rvm/src/vm/arch/intel/compilers/baseline/VM_Compiler.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 3238, 727, 1250, 3157, 19289, 261, 7397, 67, 1305, 2404, 312, 13, 288, 565, 8251, 67, 3641, 4918, 273, 312, 18, 17994, 5621, 565, 309, 261, 81, 18, 588, 559, 1435, 422, 8251, 67, 7534, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 3238, 727, 1250, 3157, 19289, 261, 7397, 67, 1305, 2404, 312, 13, 288, 565, 8251, 67, 3641, 4918, 273, 312, 18, 17994, 5621, 565, 309, 261, 81, 18, 588, 559, 1435, 422, 8251, 67, 7534, ...
StringBuffer buffer;
protected void startDocument( String rootTagName ) throws IOException { StringBuffer buffer; // Not supported in HTML/XHTML, but we still have to switch // out of DTD mode. _printer.leaveDTD(); if ( ! _started ) { // If the public and system identifiers were not specified // in the output format, use the appropriate ones for HTML // or XHTML. if ( _docTypePublicId == null && _docTypeSystemId == null ) { if ( _xhtml ) { _docTypePublicId = HTMLdtd.XHTMLPublicId; _docTypeSystemId = HTMLdtd.XHTMLSystemId; } else { _docTypePublicId = HTMLdtd.HTMLPublicId; _docTypeSystemId = HTMLdtd.HTMLSystemId; } } if ( ! _format.getOmitDocumentType() ) { // XHTML: If public identifier and system identifier // specified, print them, else print just system identifier // HTML: If public identifier specified, print it with // system identifier, if specified. // XHTML requires that all element names are lower case, so the // root on the DOCTYPE must be 'html'. - mrglavas if ( _docTypePublicId != null && ( ! _xhtml || _docTypeSystemId != null ) ) { if (_xhtml) { _printer.printText( "<!DOCTYPE html PUBLIC " ); } else { _printer.printText( "<!DOCTYPE HTML PUBLIC " ); } printDoctypeURL( _docTypePublicId ); if ( _docTypeSystemId != null ) { if ( _indenting ) { _printer.breakLine(); _printer.printText( " " ); } else _printer.printText( ' ' ); printDoctypeURL( _docTypeSystemId ); } _printer.printText( '>' ); _printer.breakLine(); } else if ( _docTypeSystemId != null ) { if (_xhtml) { _printer.printText( "<!DOCTYPE html SYSTEM " ); } else { _printer.printText( "<!DOCTYPE HTML SYSTEM " ); } printDoctypeURL( _docTypeSystemId ); _printer.printText( '>' ); _printer.breakLine(); } } } _started = true; // Always serialize these, even if not te first root element. serializePreRoot(); }
4434 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4434/5e385937eb19642378543b93e7dfc0b8e86418cc/HTMLSerializer.java/clean/src/org/apache/xml/serialize/HTMLSerializer.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 918, 787, 2519, 12, 514, 1365, 8520, 262, 3639, 1216, 1860, 565, 288, 2868, 368, 2288, 3260, 316, 3982, 19, 60, 4870, 16, 1496, 732, 4859, 1240, 358, 1620, 3639, 368, 596, 434, 10...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 918, 787, 2519, 12, 514, 1365, 8520, 262, 3639, 1216, 1860, 565, 288, 2868, 368, 2288, 3260, 316, 3982, 19, 60, 4870, 16, 1496, 732, 4859, 1240, 358, 1620, 3639, 368, 596, 434, 10...
return new Boolean((String) items.get(key)).booleanValue();
return Boolean.valueOf((String) items.get(key)).booleanValue();
public boolean getBoolean(String key) { return new Boolean((String) items.get(key)).booleanValue(); }
56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/697ae69ada912339625966e0523cea7f4a992d48/DialogSettings.java/clean/bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/DialogSettings.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 1250, 12835, 12, 780, 498, 13, 288, 3639, 327, 3411, 18, 1132, 951, 12443, 780, 13, 1516, 18, 588, 12, 856, 13, 2934, 6494, 620, 5621, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 1250, 12835, 12, 780, 498, 13, 288, 3639, 327, 3411, 18, 1132, 951, 12443, 780, 13, 1516, 18, 588, 12, 856, 13, 2934, 6494, 620, 5621, 565, 289, 2, -100, -100, -100, -100, -100, ...
if (name.equals("_packages_")) return result; Object plist = ScriptableObject.getProperty(start,"_packages_"); if (plist == NOT_FOUND) return result; Object[] elements; Context cx = Context.enter(); try { elements = cx.getElements((Scriptable)plist); } finally { Context.exit(); } for (int i=0; i < elements.length; i++) { NativeJavaPackage p = (NativeJavaPackage) elements[i]; Object v = p.getPkgProperty(name, start, false); if (v != null && !(v instanceof NativeJavaPackage)) { if (result == NOT_FOUND) { result = v; } else { throw Context.reportRuntimeError2( "msg.ambig.import", result.toString(), v.toString()); } } }
result = getPackageProperty(name, start);
public Object get(String name, Scriptable start) { Object result = super.get(name, start); if (result != NOT_FOUND) return result; if (name.equals("_packages_")) return result; Object plist = ScriptableObject.getProperty(start,"_packages_"); if (plist == NOT_FOUND) return result; Object[] elements; Context cx = Context.enter(); try { elements = cx.getElements((Scriptable)plist); } finally { Context.exit(); } for (int i=0; i < elements.length; i++) { NativeJavaPackage p = (NativeJavaPackage) elements[i]; Object v = p.getPkgProperty(name, start, false); if (v != null && !(v instanceof NativeJavaPackage)) { if (result == NOT_FOUND) { result = v; } else { throw Context.reportRuntimeError2( "msg.ambig.import", result.toString(), v.toString()); } } } return result; }
13991 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13991/11d0e9760b6cc948ff81b5f2f26bc7e7e6c13b86/ImporterTopLevel.java/buggy/js/rhino/src/org/mozilla/javascript/ImporterTopLevel.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 1033, 336, 12, 780, 508, 16, 22780, 787, 13, 288, 3639, 1033, 563, 273, 2240, 18, 588, 12, 529, 16, 787, 1769, 3639, 309, 261, 2088, 480, 4269, 67, 9294, 13, 5411, 327, 563, 31,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 1033, 336, 12, 780, 508, 16, 22780, 787, 13, 288, 3639, 1033, 563, 273, 2240, 18, 588, 12, 529, 16, 787, 1769, 3639, 309, 261, 2088, 480, 4269, 67, 9294, 13, 5411, 327, 563, 31,...
target[0] = new CDebugTarget( launch, ICDebugTargetType.TARGET_TYPE_LOCAL_ATTACH,
target[0] = new CDebugTarget( launch, ICDebugTargetType.TARGET_TYPE_LOCAL_RUN,
public void run( IProgressMonitor m ) { target[0] = new CDebugTarget( launch, ICDebugTargetType.TARGET_TYPE_LOCAL_ATTACH, cdiTarget, name, null, project, false, true ); }
54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/97fc7f02f379551586610a36ac715d2aefcbf893/CDebugModel.java/buggy/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/CDebugModel.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1875, 202, 482, 918, 1086, 12, 467, 5491, 7187, 312, 262, 1082, 202, 95, 9506, 202, 3299, 63, 20, 65, 273, 394, 385, 2829, 2326, 12, 8037, 16, 17322, 9506, 225, 26899, 2829, 2326, 559, 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, 1875, 202, 482, 918, 1086, 12, 467, 5491, 7187, 312, 262, 1082, 202, 95, 9506, 202, 3299, 63, 20, 65, 273, 394, 385, 2829, 2326, 12, 8037, 16, 17322, 9506, 225, 26899, 2829, 2326, 559, 18, ...
return _instanceName;
return instanceName;
public String getInstanceName() { return _instanceName; }
12474 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12474/9d2c39c906c6955e17daf4ac239b85d4727ddc83/PropertyLog.java/buggy/modules/interop/src/java/org/apache/geronimo/interop/properties/PropertyLog.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 514, 3694, 461, 1435, 288, 3639, 327, 21090, 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, ...
[ 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, 461, 1435, 288, 3639, 327, 21090, 31, 565, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
parts.add(new RubyString(getRuntime(), inetAddress.getCanonicalHostName()));
parts.add(getRuntime().newString(inetAddress.getCanonicalHostName()));
public RubyArray gethostbyname(IRubyObject hostname) { try { RubyString name = (RubyString) hostname; InetAddress inetAddress = InetAddress.getByName(name.getValue()); List parts = new ArrayList(); parts.add(new RubyString(getRuntime(), inetAddress.getCanonicalHostName())); parts.add(RubyArray.newArray(getRuntime())); parts.add(new RubyFixnum(getRuntime(),2)); parts.add(new RubyString(getRuntime(), RubyString.bytesToString(inetAddress.getAddress()))); return RubyArray.newArray(getRuntime(), parts); } catch (UnknownHostException e) { // DSC throw SystemError("gethostbyname"); return RubyArray.newArray(getRuntime()); } }
48072 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48072/9f2efc63a858fa0507245b207025eab027840a04/SocketMetaClass.java/buggy/src/org/jruby/libraries/SocketMetaClass.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 19817, 1076, 336, 2564, 1637, 529, 12, 7937, 10340, 921, 5199, 13, 288, 202, 202, 698, 288, 1082, 202, 54, 10340, 780, 508, 273, 261, 54, 10340, 780, 13, 5199, 31, 1082, 202, 382,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1076, 336, 2564, 1637, 529, 12, 7937, 10340, 921, 5199, 13, 288, 202, 202, 698, 288, 1082, 202, 54, 10340, 780, 508, 273, 261, 54, 10340, 780, 13, 5199, 31, 1082, 202, 382,...
return id;
return getId();
public String getLocalId() { return id; }
56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/2643ca655274ae30e4ba0c9a52f2b6c959f1f3e8/PerspectiveDescriptor.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/PerspectiveDescriptor.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 514, 6993, 548, 1435, 288, 3639, 327, 2634, 5621, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 6993, 548, 1435, 288, 3639, 327, 2634, 5621, 565, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
KIOConnection(URL u) {
protected KIOConnection(URL u) {
KIOConnection(URL u) { url = u; }
1818 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1818/2357d67959880044113c65defcace40ef133a55a/KJASURLStreamHandlerFactory.java/buggy/khtml/java/org/kde/kjas/server/KJASURLStreamHandlerFactory.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 1475, 4294, 1952, 12, 1785, 582, 13, 288, 3639, 880, 273, 582, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 1475, 4294, 1952, 12, 1785, 582, 13, 288, 3639, 880, 273, 582, 31, 565, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
public void waitUntilFinished() { synchronized(this) { while(true) { if(status != NOT_FINISHED) return; try { wait(10000); } catch (InterruptedException e) { } } }
public synchronized void waitUntilFinished() { while(true) { if(status != NOT_FINISHED) return; try { wait(10000); } catch (InterruptedException e) { } }
public void waitUntilFinished() { synchronized(this) { while(true) { if(status != NOT_FINISHED) return; try { wait(10000); } catch (InterruptedException e) { // Ignore } } } }
51834 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51834/0400e73e7503ab43211657c44d8448afd6346cce/RequestSender.java/buggy/src/freenet/node/RequestSender.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 2529, 9716, 10577, 1435, 288, 3639, 3852, 12, 2211, 13, 288, 5411, 1323, 12, 3767, 13, 288, 7734, 309, 12, 2327, 480, 4269, 67, 23259, 2056, 13, 327, 31, 7734, 775, 288, 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, 377, 1071, 918, 2529, 9716, 10577, 1435, 288, 3639, 3852, 12, 2211, 13, 288, 5411, 1323, 12, 3767, 13, 288, 7734, 309, 12, 2327, 480, 4269, 67, 23259, 2056, 13, 327, 31, 7734, 775, 288, 1079...
public RubyNumeric op_uminus() {
public IRubyObject op_uminus() {
public RubyNumeric op_uminus() { return bigNorm(getRuntime(), getValue().negate()); }
48072 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48072/803c66ee682936beecc8a43fe2cfc90fe5645b22/RubyBignum.java/buggy/src/org/jruby/RubyBignum.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 15908, 10340, 921, 1061, 67, 20668, 407, 1435, 288, 3639, 327, 5446, 14624, 12, 588, 5576, 9334, 2366, 7675, 82, 4784, 10663, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 15908, 10340, 921, 1061, 67, 20668, 407, 1435, 288, 3639, 327, 5446, 14624, 12, 588, 5576, 9334, 2366, 7675, 82, 4784, 10663, 565, 289, 2, -100, -100, -100, -100, -100, -100, -100, ...
long startTime = System.currentTimeMillis();
public void handleChunk(IPDataEvent event, IPSession session, boolean isServer) { try { //long startTime = System.nanoTime(); SessionStats stats = session.stats(); if(stats.s2tChunks() > maxChunks || stats.c2tChunks() > maxChunks) session.release(); IDSSessionInfo info = (IDSSessionInfo) session.attachment(); info.setEvent(event); info.setFlow(isServer); if(isServer) info.processC2SSignatures(); else info.processS2CSignatures(); //log.debug("Time: " + (float)(System.nanoTime() - startTime)/1000000f); } catch (Exception e) { log.error("Error parsing chunk: " +e.getMessage()); } }
49954 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49954/381edd842bf34a861c960598a5a52fcc1d95bf71/IDSDetectionEngine.java/buggy/tran/ids/main/com/metavize/tran/ids/IDSDetectionEngine.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1525, 8657, 273, 2332, 18, 2972, 28512, 5621, 1525, 8657, 273, 2332, 18, 2972, 28512, 5621, 1525, 8657, 273, 2332, 18, 2972, 28512, 5621, 1525, 8657, 273, 2332, 18, 2972, 28512, 5621, 1071, 5748...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1525, 8657, 273, 2332, 18, 2972, 28512, 5621, 1525, 8657, 273, 2332, 18, 2972, 28512, 5621, 1525, 8657, 273, 2332, 18, 2972, 28512, 5621, 1525, 8657, 273, 2332, 18, 2972, 28512, 5621, 1071, 5748...
link.add( new Label("id",new Model(sd.getId())));
link.add( new Label("id",new Model(sd.getSessionId())));
public LiveSessionsPage() { add(new Image("bug")); add(new ApplicationView("application", Application.get())); Link link = new Link("togglelink") { private static final long serialVersionUID = 1L; public void onClick() { WebApplication webApplication = (WebApplication)Application.get(); RequestLogger requestLogger = webApplication.getRequestLogger(); if(requestLogger == null) { webApplication.setRequestLogger(new RequestLogger()); } else { webApplication.setRequestLogger(null); } } }; link.add( new Label("toggletext", new Model() { private static final long serialVersionUID = 1L; public Object getObject(Component component) { WebApplication webApplication = (WebApplication)Application.get(); RequestLogger requestLogger = webApplication.getRequestLogger(); if(requestLogger == null) { return "Enable request recording"; } else { return "Disable request recording"; } }; })); add(link); add(new Label("totalSessions",new Model() { private static final long serialVersionUID = 1L; public Object getObject(Component component) { return new Integer(getRequestLogger().getTotalCreatedSessions()); } })); add(new Label("peakSessions",new Model() { private static final long serialVersionUID = 1L; public Object getObject(Component component) { return new Integer(getRequestLogger().getLiveSessions().size()); } })); add(new Label("liveSessions",new Model() { private static final long serialVersionUID = 1L; public Object getObject(Component component) { return new Integer(getRequestLogger().getPeakSessions()); } })); Model sessionModel = new Model() { private static final long serialVersionUID = 1L; public Object getObject(Component component) { List lst = new ArrayList(getRequestLogger().getLiveSessions()); Collections.sort(lst,new Comparator() { public int compare(Object o1, Object o2) { return (int)(((SessionData)o2).getLastRequestTime() - ((SessionData)o1).getLastRequestTime()); } }); return lst; } }; PageableListView listView = new PageableListView("sessions",sessionModel,50) { private static final long serialVersionUID = 1L; private final SimpleDateFormat sdf = new SimpleDateFormat("dd MMM hh:mm:ss.SSS"); protected void populateItem(ListItem item) { final SessionData sd = (SessionData)item.getModelObject(); Link link = new Link("id") { private static final long serialVersionUID = 1L; /** * @see wicket.markup.html.link.Link#onClick() */ public void onClick() { setResponsePage(new RequestsPage(sd)); } }; link.add( new Label("id",new Model(sd.getId()))); item.add( link); item.add( new Label("lastRequestTime",new Model(sdf.format(new Date(sd.getLastRequestTime())))) ); item.add( new Label("requestCount",new Model(new Integer(sd.getRequests().size()))) ); item.add( new Label("requestsTime",new Model(sd.getRequestsTime())) ); item.add( new Label("sessionSize",new Model(Bytes.bytes(sd.getSessionSize()))) ); } }; add(listView); PagingNavigator navigator = new PagingNavigator("navigator",listView); add(navigator); }
46434 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46434/0f04e7639de8f4ed4ed57e471c7fd447af7cf9aa/LiveSessionsPage.java/clean/wicket-examples/src/main/java/wicket/examples/debug/LiveSessionsPage.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 21559, 13566, 1964, 1435, 202, 95, 202, 202, 1289, 12, 2704, 3421, 2932, 925, 7923, 1769, 9506, 202, 1289, 12, 2704, 4257, 1767, 2932, 3685, 3113, 4257, 18, 588, 1435, 10019, 95...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 21559, 13566, 1964, 1435, 202, 95, 202, 202, 1289, 12, 2704, 3421, 2932, 925, 7923, 1769, 9506, 202, 1289, 12, 2704, 4257, 1767, 2932, 3685, 3113, 4257, 18, 588, 1435, 10019, 95...
return totalHeight;
return totalHeight == 0 ? 100 : totalHeight;
protected int getPopupHeightForRowCount(int maxRowCount) { int totalHeight = 0; ListCellRenderer rend = list.getCellRenderer(); if (comboBox.getItemCount() < maxRowCount) maxRowCount = comboBox.getItemCount(); for (int i = 0; i < maxRowCount; i++) { Component comp = rend.getListCellRendererComponent(list, comboBox.getModel() .getElementAt(i), -1, false, false); Dimension dim = comp.getPreferredSize(); totalHeight += dim.height; } return totalHeight; }
50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/7cc107e01ff95c250142dda3e246542e1b0c0794/BasicComboPopup.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicComboPopup.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 4750, 509, 1689, 556, 416, 2686, 1290, 26359, 12, 474, 943, 26359, 13, 225, 288, 565, 509, 2078, 2686, 273, 374, 31, 565, 987, 4020, 6747, 1654, 72, 273, 666, 18, 588, 4020, 6747, 5621,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 4750, 509, 1689, 556, 416, 2686, 1290, 26359, 12, 474, 943, 26359, 13, 225, 288, 565, 509, 2078, 2686, 273, 374, 31, 565, 987, 4020, 6747, 1654, 72, 273, 666, 18, 588, 4020, 6747, 5621,...
if( (newPasswd.length > 0) && (newPasswd.length < MIN_PASSWD_LENGTH) ){ throw new Exception("The \"new\" and }
private void prevalidate() throws Exception { loginHashtable.clear(); boolean oneValidAccount = false; int rowIndex = 0; // go through all the rows and perform some tests Util.printMessage("STATUS: STARTING VERIFICATION of " + this.getOriginalDataVector().size() + " user(s)"); for( Vector tempUser : (Vector<Vector>) this.getOriginalDataVector() ){ rowIndex++; byte[] origPasswd = ((MPasswordField)tempUser.elementAt(4)).getByteArray(); char[] newPasswd = ((MPasswordField)tempUser.elementAt(5)).getPassword(); char[] newConfPasswd = ((MPasswordField)tempUser.elementAt(6)).getPassword(); char[] proceedPasswd = ((MPasswordField)tempUser.elementAt(7)).getPassword(); String loginName = (String) tempUser.elementAt(3); // verify that the login name is not duplicated if( loginHashtable.containsKey(loginName) ){ throw new Exception("The login name: \"" + loginName + "\" in row: " + rowIndex + " already exists."); } else{ loginHashtable.put(loginName, loginName); } // verify that all of the new and new confirm passwords and match up (and they are of the proper size) if( !java.util.Arrays.equals(newPasswd, newConfPasswd) ){ throw new Exception("The \"new\" and \"new confirm\" passwords are not the same for: \"" + loginName + "\" in row: " + rowIndex + "."); } if( (newPasswd.length > 0) && (newPasswd.length < MIN_PASSWD_LENGTH) ){ throw new Exception("The \"new\" and//or \"new confirm\" passwords for: \"" + loginName + "\" in row: " + rowIndex + " are shorter than the minimum " + MIN_PASSWD_LENGTH + " characters."); } // verify that all of the original and proceed passwords are the same for any non saved row if( !((String)tempUser.elementAt(0)).equals(super.ROW_SAVED) && !PasswordUtil.check( String.valueOf(proceedPasswd), origPasswd )){ throw new Exception("The \"original\" password is not correct for: \"" + loginName + "\" in row: " + rowIndex + "."); } // verify that if this is a new row, a new password has been chosen if( ((String)tempUser.elementAt(0)).equals(super.ROW_ADD) && (newPasswd.length == 0) ){ throw new Exception("The \"new\" password has not been set for: \"" + loginName + "\" in row: " + rowIndex + "."); } // record if the row was not removed, that way we know we had at least one valid account if( !((String)tempUser.elementAt(0)).equals(super.ROW_REMOVE) ){ oneValidAccount = true; } } // verify that there is at least one valid entry after all operations if(!oneValidAccount){ throw new Exception("There must always be at least one valid account."); } }
49954 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49954/ff039aa0a88558bd57c3af5130d7d059b60c42c3/AdminConfigJDialog.java/buggy/gui/main/com/metavize/gui/configuration/AdminConfigJDialog.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 309, 12, 261, 2704, 6433, 3623, 18, 2469, 405, 374, 13, 597, 261, 2704, 6433, 3623, 18, 2469, 411, 6989, 67, 10884, 16006, 67, 7096, 13, 262, 95, 604, 394, 1185, 2932, 1986, 1239, 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, 309, 12, 261, 2704, 6433, 3623, 18, 2469, 405, 374, 13, 597, 261, 2704, 6433, 3623, 18, 2469, 411, 6989, 67, 10884, 16006, 67, 7096, 13, 262, 95, 604, 394, 1185, 2932, 1986, 1239, 2704,...
_includePeerRankings = false;
_includePeerRankings = false;
public StatisticsManager() { _includePeerRankings = false; }
27437 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/27437/86759d2f9c63d203488c7e8b34e64be162a16ce9/StatisticsManager.java/clean/router/java/src/net/i2p/router/StatisticsManager.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 22964, 1318, 1435, 288, 202, 67, 6702, 6813, 12925, 899, 273, 629, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 22964, 1318, 1435, 288, 202, 67, 6702, 6813, 12925, 899, 273, 629, 31, 565, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
myEditor = new StringEditor();
myEditor = new StringEditor(myProject);
public PropertyEditor getEditor() { if (myEditor == null) { myEditor = new StringEditor(); } return myEditor; }
56627 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56627/0a8c7f6f897798de90c99991927c43760777d651/BorderProperty.java/buggy/ui-designer/impl/com/intellij/uiDesigner/propertyInspector/properties/BorderProperty.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 4276, 6946, 336, 6946, 1435, 288, 1377, 309, 261, 4811, 6946, 422, 446, 13, 288, 3639, 3399, 6946, 273, 394, 514, 6946, 12, 4811, 4109, 1769, 1377, 289, 1377, 327, 3399, 6946, 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, 4276, 6946, 336, 6946, 1435, 288, 1377, 309, 261, 4811, 6946, 422, 446, 13, 288, 3639, 3399, 6946, 273, 394, 514, 6946, 12, 4811, 4109, 1769, 1377, 289, 1377, 327, 3399, 6946, 31, ...
/*If target cell represents some empty collection, target cell's node is not a member of that collection,
String role = (String) targetCell.getUserObject(EditorCell.ROLE); if (role != null) return role; LOG.warning("PASTE: tagret cell's user object 'ROLE' is null. Trying to get cell's role in the old manner"); /*If target cell represents some empty collection, target cell's node is not a member of that collection,
private static String getRoleFromCell(EditorCell targetCell) { /*If target cell represents some empty collection, target cell's node is not a member of that collection, but its future members' parent. Hence, if we consider that node as an anchor and hence its role as role-in-parent for the node we want to paste - we'll not be able to paste our node as a child of that very target node. But we want to process such case, too. Hence we search for the first collection which contains our target cell and has not-null handler (i.e. not-null cell nodes role). */ String role = null; EditorCell_Collection actualCollection = (targetCell instanceof EditorCell_Collection)? (EditorCell_Collection) targetCell : targetCell.getParent(); if (actualCollection != null) role = actualCollection.getCellNodesRole(); while (actualCollection != null && role == null) { actualCollection = actualCollection.getParent(); if (actualCollection == null) break; role = actualCollection.getCellNodesRole(); } if (role == null) { SNode pasteTarget = targetCell.getSNode(); role = pasteTarget.getRole_(); } return role; }
14939 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/14939/27220d0c7736a3dda6f480ed55bcf43dc2d616dc/PasteUtil.java/buggy/source/jetbrains/mps/datatransfer/PasteUtil.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 3238, 760, 514, 15673, 1265, 4020, 12, 6946, 4020, 1018, 4020, 13, 288, 377, 514, 2478, 273, 261, 780, 13, 1018, 4020, 18, 588, 1299, 921, 12, 6946, 4020, 18, 16256, 1769, 309, 261, 461...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 3238, 760, 514, 15673, 1265, 4020, 12, 6946, 4020, 1018, 4020, 13, 288, 377, 514, 2478, 273, 261, 780, 13, 1018, 4020, 18, 588, 1299, 921, 12, 6946, 4020, 18, 16256, 1769, 309, 261, 461...
returnType.ext().translate(w, tr);
returnType.translate(w, tr);
public void translate_(CodeWriter w, Translator tr) { Context c = tr.context(); Flags flags = flags(); if (c.currentClass().flags().isInterface()) { flags = flags.clearPublic(); flags = flags.clearAbstract(); } w.begin(0); w.write(flags.translate()); returnType.ext().translate(w, tr); w.write(" " + name + "("); w.begin(0); for (Iterator i = formals.iterator(); i.hasNext(); ) { Formal f = (Formal) i.next(); f.ext().translate(w, tr); if (i.hasNext()) { w.write(","); w.allowBreak(0, " "); } } w.end(); w.write(")"); if (! exceptionTypes.isEmpty()) { w.allowBreak(6); w.write("throws "); for (Iterator i = exceptionTypes.iterator(); i.hasNext(); ) { TypeNode tn = (TypeNode) i.next(); tn.ext().translate(w, tr); if (i.hasNext()) { w.write(","); w.allowBreak(4, " "); } } } w.end(); if (body != null) { enterScope(c); translateSubstmt(body, w, tr); leaveScope(c); } else { w.write(";"); } }
11982 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11982/7335022712984bae07f6e015bcc31027c155c131/MethodDecl_c.java/clean/src/polyglot/ast/MethodDecl_c.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 4204, 67, 12, 1085, 2289, 341, 16, 18669, 433, 13, 288, 3639, 1772, 276, 273, 433, 18, 2472, 5621, 202, 5094, 2943, 273, 2943, 5621, 202, 430, 261, 71, 18, 2972, 797, 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, 918, 4204, 67, 12, 1085, 2289, 341, 16, 18669, 433, 13, 288, 3639, 1772, 276, 273, 433, 18, 2472, 5621, 202, 5094, 2943, 273, 2943, 5621, 202, 430, 261, 71, 18, 2972, 797, 7675, ...
msgContext, inStream, baos, request.getContentType(),
msgContext, baos,
public boolean processRequest(final SimpleHttpServerConnection conn, final SimpleRequest request) throws IOException { MessageContext msgContext = null; SimpleResponse response = new SimpleResponse(); ByteArrayOutputStream baos = new ByteArrayOutputStream(); try { if (configurationContext == null) { throw new AxisFault(Messages.getMessage("cannotBeNullConfigurationContext")); } InputStream inStream = request.getBody(); TransportOutDescription transportOut = configurationContext.getAxisConfiguration().getTransportOut( new QName(Constants.TRANSPORT_HTTP)); String cookieID = request.getCookieID(); SessionContext sessionContext = getSessionContext(cookieID); msgContext = new MessageContext(); msgContext.setIncomingTransportName(Constants.TRANSPORT_HTTP); msgContext.setConfigurationContext(configurationContext); msgContext.setSessionContext(sessionContext); msgContext.setTransportIn(configurationContext.getAxisConfiguration().getTransportIn( new QName(Constants.TRANSPORT_HTTP))); msgContext.setTransportOut(transportOut); msgContext.setServerSide(true); HttpVersion ver = request.getRequestLine().getHttpVersion(); if (ver == null) { throw new AxisFault("HTTP version can not be Null"); } if (HttpVersion.HTTP_1_0.equals(ver)) {// httpVersion = HTTPConstants.HEADER_PROTOCOL_10; } else if (HttpVersion.HTTP_1_1.equals(ver)) {// httpVersion = HTTPConstants.HEADER_PROTOCOL_11; /** * Transport Sender configuration via axis2.xml */ this.transportOutConfiguration(configurationContext, response); } else { throw new AxisFault("Unknown supported protocol version " + ver); } msgContext.setProperty(MessageContext.TRANSPORT_OUT, baos); // set the transport Headers msgContext.setProperty(MessageContext.TRANSPORT_HEADERS, getHeaders(request)); msgContext.setServiceGroupContextId(UUIDGenerator.getUUID()); // This is way to provide access to the transport information to the transport Sender msgContext.setProperty(Constants.OUT_TRANSPORT_INFO, new SimpleHTTPOutTransportInfo(response)); msgContext.setProperty(Constants.Configuration.TRANSPORT_IN_URL, request.getRequestLine().getUri()); String soapAction = null; if (request.getFirstHeader(HTTPConstants.HEADER_SOAP_ACTION) != null) { soapAction = request.getFirstHeader(HTTPConstants.HEADER_SOAP_ACTION).getValue(); } if (HTTPConstants.HEADER_GET.equals(request.getRequestLine().getMethod())) { String uri = request.getRequestLine().getUri(); log.debug("HTTP GET:" + uri); if (uri.equals("/favicon.ico")) { response.setStatusLine(request.getRequestLine().getHttpVersion(), 301, "Redirect"); response.addHeader(new Header("Location", "http://ws.apache.org/favicon.ico")); conn.writeResponse(response); return true; } if (!uri.startsWith("/axis2/services/")) { response.setStatusLine(request.getRequestLine().getHttpVersion(), 301, "Redirect"); response.addHeader(new Header("Location", "/axis2/services/")); conn.writeResponse(response); return true; } if (uri.indexOf("?") < 0) { if (!(uri.endsWith("/axis2/services/") || uri.endsWith("/axis2/services"))) { String serviceName = uri.replaceAll("/axis2/services/", ""); if (serviceName.indexOf("/") < 0) { response.addHeader(new Header("Content-Type", "text/html")); String res = HTTPTransportReceiver.printServiceHTML(serviceName, configurationContext); byte[] buf = res.getBytes(); response.setBody(new ByteArrayInputStream(buf)); conn.writeResponse(response); return true; } } } if (uri.endsWith("?wsdl")) { String serviceName = uri.substring(uri.lastIndexOf("/") + 1, uri.length() - 5); HashMap services = configurationContext.getAxisConfiguration().getServices(); AxisService service = (AxisService) services.get(serviceName); if (service != null) { response.addHeader(new Header("Content-Type", "text/xml"));// String url = conn.getURL(uri.substring(1, uri.length() - 5)); String url = conn.getURL(""); int ipindex = url.indexOf("//"); String ip = null; if (ipindex >= 0) { ip = url.substring(ipindex + 2, url.length()); int seperatorIndex = ip.indexOf(":"); if (seperatorIndex > 0) { ip = ip.substring(0, seperatorIndex); } } service.printWSDL(baos, ip); byte[] buf = baos.toByteArray(); response.setBody(new ByteArrayInputStream(buf)); conn.writeResponse(response); return true; } } if (uri.endsWith("?xsd")) { String serviceName = uri.substring(uri.lastIndexOf("/") + 1, uri.length() - 4); HashMap services = configurationContext.getAxisConfiguration().getServices(); AxisService service = (AxisService) services.get(serviceName); if (service != null) { response.addHeader(new Header("Content-Type", "text/xml")); service.printSchema(baos); byte[] buf = baos.toByteArray(); response.setBody(new ByteArrayInputStream(buf)); conn.writeResponse(response); return true; } } // It is GET handle the Get request boolean processed = HTTPTransportUtils.processHTTPGetRequest( msgContext, inStream, baos, request.getContentType(), soapAction, request.getRequestLine().getUri(), configurationContext, HTTPTransportReceiver.getGetRequestParameters( request.getRequestLine().getUri())); if (!processed) { response.setStatusLine(request.getRequestLine().getHttpVersion(), 200, "OK"); response.addHeader(new Header("Content-Type", "text/html")); response.setBodyString( HTTPTransportReceiver.getServicesHTML(configurationContext)); setResponseHeaders(conn, request, response, 0, msgContext); conn.writeResponse(response); return true; } } else { ByteArrayOutputStream baosIn = new ByteArrayOutputStream(); byte[] bytes = new byte[8192]; int size; while ((size = inStream.read(bytes)) > 0) { baosIn.write(bytes, 0, size); } inStream = new ByteArrayInputStream(baosIn.toByteArray()); // It is POST, handle it HTTPTransportUtils.processHTTPPostRequest(msgContext, inStream, baos, request.getContentType(), soapAction, request.getRequestLine().getUri()); } OperationContext operationContext = msgContext.getOperationContext(); Object contextWritten = null; if (operationContext != null) { contextWritten = operationContext.getProperty(Constants.RESPONSE_WRITTEN); } if ((contextWritten != null) && Constants.VALUE_TRUE.equals(contextWritten)) { response.setStatusLine(request.getRequestLine().getHttpVersion(), 200, "OK"); } else { response.setStatusLine(request.getRequestLine().getHttpVersion(), 202, "OK"); } byte[] buf = baos.toByteArray(); response.setBody(new ByteArrayInputStream(buf)); setResponseHeaders(conn, request, response, buf.length, msgContext); conn.writeResponse(response); } catch (Throwable e) { if (!(e instanceof java.net.SocketException)) { log.debug(e.getMessage(), e); } try { AxisEngine engine = new AxisEngine(configurationContext); if (msgContext != null) { msgContext.setProperty(MessageContext.TRANSPORT_OUT, baos); MessageContext faultContext = engine.createFaultMessageContext(msgContext, e); response.setStatusLine(request.getRequestLine().getHttpVersion(), 500, "Internal server error"); engine.sendFault(faultContext); byte[] buf = baos.toByteArray(); response.setBody(new ByteArrayInputStream(buf)); setResponseHeaders(conn, request, response, buf.length, msgContext); conn.writeResponse(response); } } catch (SocketException e1) { log.debug(e1.getMessage(), e1); } catch (Exception e1) { log.warn(e1.getMessage(), e1); } } return true; }
49300 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49300/641186fbe200233d0a5a9fd4f6e4be03f48fdef5/HTTPWorker.java/clean/modules/core/src/org/apache/axis2/transport/http/HTTPWorker.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 1250, 1207, 691, 12, 6385, 4477, 2940, 2081, 1952, 1487, 16, 21394, 727, 4477, 691, 590, 13, 5411, 1216, 1860, 288, 3639, 2350, 1042, 1234, 1042, 273, 446, 31, 3639, 4477, 1064, 766...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1207, 691, 12, 6385, 4477, 2940, 2081, 1952, 1487, 16, 21394, 727, 4477, 691, 590, 13, 5411, 1216, 1860, 288, 3639, 2350, 1042, 1234, 1042, 273, 446, 31, 3639, 4477, 1064, 766...
TerrainBlock tb = new TerrainBlock("Terrain", heightMap.getSize(), 5, heightMap.getHeightMap(), new Vector3f(0,0,0), true);
TerrainBlock tb = new TerrainBlock("Terrain", heightMap.getSize(), 5, heightMap.getHeightMap(), new Vector3f(0,0,0), false);
protected void initGame() { Vector3f max = new Vector3f(0.5f, 0.5f, 0.5f); Vector3f min = new Vector3f(-0.5f, -0.5f, -0.5f); WireframeState ws = display.getRenderer().getWireframeState(); ws.setEnabled(false); FogState fs = display.getRenderer().getFogState(); AlphaState as1 = display.getRenderer().getAlphaState(); as1.setBlendEnabled(true); as1.setSrcFunction(AlphaState.SB_SRC_ALPHA); as1.setDstFunction(AlphaState.DB_ONE); as1.setTestEnabled(true); as1.setTestFunction(AlphaState.TF_GREATER); as1.setEnabled(true); DirectionalLight dr = new DirectionalLight(); dr.setEnabled(true); dr.setDiffuse(new ColorRGBA(1.0f, 1.0f, 1.0f, 1.0f)); dr.setAmbient(new ColorRGBA(0.5f, 0.5f, 0.5f, 1.0f)); dr.setDirection(new Vector3f(0.5f, -0.5f, 0)); CullState cs = display.getRenderer().getCullState(); cs.setCullMode(CullState.CS_BACK); cs.setEnabled(true); LightState lightstate = display.getRenderer().getLightState(); lightstate.setTwoSidedLighting(true); lightstate.setEnabled(true); lightstate.attach(dr); Node scene = new Node("scene"); scene.setRenderState(ws); scene.setRenderState(lightstate); root = new Node("Root node"); //MidPointHeightMap heightMap = new MidPointHeightMap(128, 1.9f); FaultFractalHeightMap heightMap = new FaultFractalHeightMap(129, 32, 0, 255, 0.75f); TerrainBlock tb = new TerrainBlock("Terrain", heightMap.getSize(), 5, heightMap.getHeightMap(), new Vector3f(0,0,0), true); tb.setDetailTexture(1, 4); tb.setModelBound(new BoundingBox()); tb.updateModelBound(); scene.attachChild(tb); scene.setRenderState(cs); ProceduralTextureGenerator pt = new ProceduralTextureGenerator(heightMap); pt.addTexture(new ImageIcon(TestTerrain.class.getClassLoader().getResource("jmetest/data/texture/grassb.png")), -128, 0, 128); pt.addTexture(new ImageIcon(TestTerrain.class.getClassLoader().getResource("jmetest/data/texture/dirt.jpg")), 0, 128, 255); pt.addTexture(new ImageIcon(TestTerrain.class.getClassLoader().getResource("jmetest/data/texture/highest.jpg")), 128, 255, 384); pt.createTexture(512); TextureState ts = display.getRenderer().getTextureState(); ts.setEnabled(true); Texture t1 = TextureManager.loadTexture( pt.getImageIcon().getImage(), Texture.MM_LINEAR, Texture.FM_LINEAR, true, true); ts.setTexture(t1 ,0); Texture t2 = TextureManager.loadTexture(TestTerrain.class.getClassLoader().getResource("jmetest/data/texture/Detail.jpg"), Texture.MM_LINEAR, Texture.FM_LINEAR, true); ts.setTexture( t2,1); t2.setWrap(Texture.WM_WRAP_S_WRAP_T); t1.setApply(Texture.AM_COMBINE); t1.setCombineFuncRGB(Texture.ACF_MODULATE); t1.setCombineSrc0RGB(Texture.ACS_TEXTURE); t1.setCombineOp0RGB(Texture.ACO_SRC_COLOR); t1.setCombineSrc1RGB(Texture.ACS_PRIMARY_COLOR); t1.setCombineOp1RGB(Texture.ACO_SRC_COLOR); t1.setCombineScaleRGB(0); t2.setApply(Texture.AM_COMBINE); t2.setCombineFuncRGB(Texture.ACF_ADD_SIGNED); t2.setCombineSrc0RGB(Texture.ACS_TEXTURE); t2.setCombineOp0RGB(Texture.ACO_SRC_COLOR); t2.setCombineSrc1RGB(Texture.ACS_PREVIOUS); t2.setCombineOp1RGB(Texture.ACO_SRC_COLOR); t2.setCombineScaleRGB(0); scene.setRenderState(ts); ZBufferState buf = display.getRenderer().getZBufferState(); buf.setEnabled(true); buf.setFunction(ZBufferState.CF_LEQUAL); TextureState font = display.getRenderer().getTextureState(); font.setTexture( TextureManager.loadTexture( TestTerrain.class.getClassLoader().getResource( "jmetest/data/font/font.png"), Texture.MM_LINEAR, Texture.FM_LINEAR, true)); font.setEnabled(true); fps = new Text("FPS counter", ""); fps.setRenderState(font); fps.setRenderState(as1); scene.setRenderState(buf); root.attachChild(scene); root.attachChild(fps); root.setForceView(true); root.updateGeometricState(0.0f, true); root.updateRenderState(); }
19503 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/19503/fe893c95ddddf22d5c613bcabc6201a5d7fa4501/TestTerrain.java/buggy/src/jmetest/terrain/TestTerrain.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 918, 1208, 12496, 1435, 288, 3639, 5589, 23, 74, 943, 273, 394, 5589, 23, 74, 12, 20, 18, 25, 74, 16, 374, 18, 25, 74, 16, 374, 18, 25, 74, 1769, 3639, 5589, 23, 74, 1131, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 918, 1208, 12496, 1435, 288, 3639, 5589, 23, 74, 943, 273, 394, 5589, 23, 74, 12, 20, 18, 25, 74, 16, 374, 18, 25, 74, 16, 374, 18, 25, 74, 1769, 3639, 5589, 23, 74, 1131, 2...
public short getRed() { return r_; }
public short getRed() { return r_; }
public short getRed() { return r_; }
49871 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49871/57a34fa3e6e607d84b46e06082997a4771a25a85/Color.java/buggy/MMTk/src/org/mmtk/utility/gcspy/Color.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 3025, 336, 3715, 1435, 288, 327, 436, 67, 31, 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, 0, ...
[ 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, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 3025, 336, 3715, 1435, 288, 327, 436, 67, 31, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
public Cell addTopCell(Node node, int x, int y) throws Exception {
public Cell addTopCell(Node node, int x, int y) {
public Cell addTopCell(Node node, int x, int y) throws Exception { Cell cl = addCell(node, x, y); top_cells.add(cl); return cl; }
52947 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52947/e8e0eb314a46ddb6d7381b336fded7fb403ce0f5/Table.java/buggy/src/java/org/joshy/html/table/Table.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 8614, 527, 3401, 4020, 12, 907, 756, 16, 509, 619, 16, 509, 677, 13, 288, 3639, 8614, 927, 273, 527, 4020, 12, 2159, 16, 619, 16, 677, 1769, 3639, 1760, 67, 14741, 18, 1289, 12,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 8614, 527, 3401, 4020, 12, 907, 756, 16, 509, 619, 16, 509, 677, 13, 288, 3639, 8614, 927, 273, 527, 4020, 12, 2159, 16, 619, 16, 677, 1769, 3639, 1760, 67, 14741, 18, 1289, 12,...
public void send(AMQMessage msg, AMQQueue queue) throws AMQException
public void send(AMQMessage msg, AMQQueue queue) throws FailedDequeueException
public void send(AMQMessage msg, AMQQueue queue) throws AMQException { if (msg != null) { synchronized(channel) { long deliveryTag = channel.getNextDeliveryTag(); if (_acks) { channel.addUnacknowledgedMessage(msg, deliveryTag, consumerTag, queue); } ByteBuffer deliver = createEncodedDeliverFrame(deliveryTag, msg.getRoutingKey(), msg.getExchangeName()); AMQDataBlock frame = msg.getDataBlock(deliver, channel.getChannelId()); protocolSession.writeFrame(frame); } // if we do not need to wait for client acknowledgements we can decrement // the reference count immediately if (!_acks) { msg.decrementReference(); msg.dequeue(queue); } } else { _logger.error("Attempt to send Null message", new NullPointerException()); } }
45585 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45585/3f3f6238cdf09b62ebc6a7bc63150d996dd29f35/SubscriptionImpl.java/buggy/qpid/java/broker/src/org/apache/qpid/server/queue/SubscriptionImpl.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1366, 12, 2192, 53, 1079, 1234, 16, 16549, 3183, 2389, 13, 1216, 11175, 758, 4000, 503, 565, 288, 3639, 309, 261, 3576, 480, 446, 13, 3639, 288, 5411, 3852, 12, 4327, 13, 541...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1366, 12, 2192, 53, 1079, 1234, 16, 16549, 3183, 2389, 13, 1216, 11175, 758, 4000, 503, 565, 288, 3639, 309, 261, 3576, 480, 446, 13, 3639, 288, 5411, 3852, 12, 4327, 13, 541...
throw new RuntimeException("[BUG] ParserHelper#logop: Nodetype=" + type);
public Node logop(/*node_type*/ int type, Node left, Node right) { value_expr(left); // return nf.newDefaultNode(type, cond1(left, 1), cond1(right, 1), null); throw new RuntimeException("[BUG] ParserHelper#logop: Nodetype=" + type); }
46217 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46217/9fd6d1b2b629d2c29cb2dc7346da08720e95598c/ParserHelper.java/buggy/org/jruby/parser/ParserHelper.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 2029, 613, 556, 12, 20308, 2159, 67, 723, 5549, 509, 618, 16, 2029, 2002, 16, 2029, 2145, 13, 288, 3639, 460, 67, 8638, 12, 4482, 1769, 7734, 368, 327, 13958, 18, 2704, 1868, 907,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 2029, 613, 556, 12, 20308, 2159, 67, 723, 5549, 509, 618, 16, 2029, 2002, 16, 2029, 2145, 13, 288, 3639, 460, 67, 8638, 12, 4482, 1769, 7734, 368, 327, 13958, 18, 2704, 1868, 907,...
AST tmp627_AST_in = (AST)_t;
AST tmp637_AST_in = (AST)_t;
public final void widname(AST _t) throws RecognitionException { AST widname_AST_in = (_t == ASTNULL) ? null : (AST)_t; AST f = null; AST b = null; if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case AAMEMORY: case ACTIVEWINDOW: case CLIPBOARD: case CODEBASELOCATOR: case COLORTABLE: case COMPILER: case COMSELF: case CURRENTWINDOW: case DEBUGGER: case DEFAULTWINDOW: case ERRORSTATUS: case FILEINFORMATION: case FOCUS: case FONTTABLE: case LASTEVENT: case MOUSE: case PROFILER: case RCODEINFORMATION: case SELF: case SESSION: case SOURCEPROCEDURE: case SUPER: case TARGETPROCEDURE: case TEXTCURSOR: case THISPROCEDURE: case WEBCONTEXT: case LOGMANAGER: case SECURITYPOLICY: case AUDITCONTROL: case AUDITPOLICY: case THISOBJECT: { systemhandlename(_t); _t = _retTree; break; } case DATASET: { AST tmp622_AST_in = (AST)_t; match(_t,DATASET); _t = _t.getNextSibling(); AST tmp623_AST_in = (AST)_t; match(_t,ID); _t = _t.getNextSibling(); break; } case DATASOURCE: { AST tmp624_AST_in = (AST)_t; match(_t,DATASOURCE); _t = _t.getNextSibling(); AST tmp625_AST_in = (AST)_t; match(_t,ID); _t = _t.getNextSibling(); break; } case FIELD: { AST tmp626_AST_in = (AST)_t; match(_t,FIELD); _t = _t.getNextSibling(); fld(_t,CQ.REF); _t = _retTree; break; } case FRAME: { AST tmp627_AST_in = (AST)_t; match(_t,FRAME); _t = _t.getNextSibling(); f = (AST)_t; match(_t,ID); _t = _t.getNextSibling(); if ( inputState.guessing==0 ) { action.frameRef(f); } break; } case MENU: { AST tmp628_AST_in = (AST)_t; match(_t,MENU); _t = _t.getNextSibling(); AST tmp629_AST_in = (AST)_t; match(_t,ID); _t = _t.getNextSibling(); break; } case SUBMENU: { AST tmp630_AST_in = (AST)_t; match(_t,SUBMENU); _t = _t.getNextSibling(); AST tmp631_AST_in = (AST)_t; match(_t,ID); _t = _t.getNextSibling(); break; } case MENUITEM: { AST tmp632_AST_in = (AST)_t; match(_t,MENUITEM); _t = _t.getNextSibling(); AST tmp633_AST_in = (AST)_t; match(_t,ID); _t = _t.getNextSibling(); break; } case BROWSE: { AST tmp634_AST_in = (AST)_t; match(_t,BROWSE); _t = _t.getNextSibling(); b = (AST)_t; match(_t,ID); _t = _t.getNextSibling(); if ( inputState.guessing==0 ) { action.browseRef(b); } break; } case QUERY: { AST tmp635_AST_in = (AST)_t; match(_t,QUERY); _t = _t.getNextSibling(); AST tmp636_AST_in = (AST)_t; match(_t,ID); _t = _t.getNextSibling(); break; } case TEMPTABLE: { AST tmp637_AST_in = (AST)_t; match(_t,TEMPTABLE); _t = _t.getNextSibling(); AST tmp638_AST_in = (AST)_t; match(_t,ID); _t = _t.getNextSibling(); break; } case BUFFER: { AST tmp639_AST_in = (AST)_t; match(_t,BUFFER); _t = _t.getNextSibling(); AST tmp640_AST_in = (AST)_t; match(_t,ID); _t = _t.getNextSibling(); break; } case XDOCUMENT: { AST tmp641_AST_in = (AST)_t; match(_t,XDOCUMENT); _t = _t.getNextSibling(); AST tmp642_AST_in = (AST)_t; match(_t,ID); _t = _t.getNextSibling(); break; } case XNODEREF: { AST tmp643_AST_in = (AST)_t; match(_t,XNODEREF); _t = _t.getNextSibling(); AST tmp644_AST_in = (AST)_t; match(_t,ID); _t = _t.getNextSibling(); break; } case SOCKET: { AST tmp645_AST_in = (AST)_t; match(_t,SOCKET); _t = _t.getNextSibling(); AST tmp646_AST_in = (AST)_t; match(_t,ID); _t = _t.getNextSibling(); break; } default: { throw new NoViableAltException(_t); } } _retTree = _t; }
13952 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13952/f492fd11e745beb562b4e209643ba003aa8a6271/TreeParser01.java/clean/trunk/org.prorefactor.core/src/org/prorefactor/treeparser01/TreeParser01.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 727, 918, 15481, 529, 12, 9053, 389, 88, 13, 1216, 9539, 288, 9506, 202, 9053, 15481, 529, 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, 15481, 529, 12, 9053, 389, 88, 13, 1216, 9539, 288, 9506, 202, 9053, 15481, 529, 67, 9053, 67, 267, 273, 261, 67, 88, 422, 9183, 8560, 13, 692, 446, 294, 261, 9053...
return RubyBoolean.newBoolean(recv.getRuntime(), obj.isTrue());
return recv.getRuntime().newBoolean(obj.isTrue());
public static RubyBoolean op_or(IRubyObject recv, IRubyObject obj) { return RubyBoolean.newBoolean(recv.getRuntime(), obj.isTrue()); }
47273 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47273/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubyNil.java/buggy/src/org/jruby/RubyNil.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 760, 19817, 5507, 1061, 67, 280, 12, 7937, 10340, 921, 10665, 16, 15908, 10340, 921, 1081, 13, 288, 3639, 327, 10665, 18, 588, 5576, 7675, 2704, 5507, 12, 2603, 18, 291, 5510, 10663...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 760, 19817, 5507, 1061, 67, 280, 12, 7937, 10340, 921, 10665, 16, 15908, 10340, 921, 1081, 13, 288, 3639, 327, 10665, 18, 588, 5576, 7675, 2704, 5507, 12, 2603, 18, 291, 5510, 10663...
lo3d.set( dXEnd, y3d, dZ );
lo3d.set( sx2, y3d, dZ );
public final void renderEachAxis( IPrimitiveRenderer ipr, Plot pl, OneAxis ax, int iWhatToDraw ) throws ChartException { final RunTimeContext rtc = getRunTimeContext( ); final Axis axModel = ax.getModelAxis( ); final PlotWithAxes pwa = (PlotWithAxes) getComputations( ); final Insets insCA = pwa.getAxes( ).getInsets( ); final ScriptHandler sh = getRunTimeContext( ).getScriptHandler( ); double dLocation = ax.getAxisCoordinate( ); double dAngleInDegrees = ax.getLabel( ) .getCaption( ) .getFont( ) .getRotation( ); AutoScale sc = ax.getScale( ); IntersectionValue iv = ax.getIntersectionValue( ); int iMajorTickStyle = ax.getGrid( ).getTickStyle( IConstants.MAJOR ); int iMinorTickStyle = ax.getGrid( ).getTickStyle( IConstants.MINOR ); int iLabelLocation = ax.getLabelPosition( ); int iOrientation = ax.getOrientation( ); IDisplayServer xs = this.getDevice( ).getDisplayServer( ); double[] daEndPoints = sc.getEndPoints( ); double[] da = sc.getTickCordinates( ); double[] daMinor = sc.getMinorCoordinates( ax.getGrid( ) .getMinorCountPerMajor( ) ); String sText = null; int iDimension = pwa.getDimension( ); double dSeriesThickness = pwa.getSeriesThickness( ); final NumberDataElement nde = NumberDataElementImpl.create( 0 ); final FormatSpecifier fs = ax.getModelAxis( ).getFormatSpecifier( ); DecimalFormat df = null; LineAttributes lia = ax.getLineAttributes( ); LineAttributes liaMajorTick = ax.getGrid( ) .getTickAttributes( IConstants.MAJOR ); LineAttributes liaMinorTick = ax.getGrid( ) .getTickAttributes( IConstants.MINOR ); if ( !lia.isSetVisible( ) ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, "exception.unset.axis.visibility", //$NON-NLS-1$ ResourceBundle.getBundle( Messages.ENGINE, getRunTimeContext( ).getLocale( ) ) ); } Label la = ax.getLabel( ); final boolean bRenderAxisLabels = ( ( iWhatToDraw & IConstants.LABELS ) == IConstants.LABELS && la.isVisible( ) ); Location lo = LocationImpl.create( 0, 0 ); final TransformationEvent trae = (TransformationEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), TransformationEvent.class ); final TextRenderEvent tre = (TextRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), TextRenderEvent.class ); tre.setLabel( la ); tre.setTextPosition( iLabelLocation ); tre.setLocation( lo ); final LineRenderEvent lre = (LineRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), LineRenderEvent.class ); lre.setLineAttributes( lia ); lre.setStart( LocationImpl.create( 0, 0 ) ); lre.setEnd( LocationImpl.create( 0, 0 ) ); // Prepare 3D rendering variables. final boolean bRendering3D = iDimension == IConstants.THREE_D; final boolean bRenderOrthogonal3DAxis = ( iWhatToDraw & IConstants.ORTHOGONAL_AXIS ) == IConstants.ORTHOGONAL_AXIS && bRendering3D; final boolean bRenderBase3DAxis = ( iWhatToDraw & IConstants.BASE_AXIS ) == IConstants.BASE_AXIS && bRendering3D; final boolean bRenderAncillary3DAxis = ( iWhatToDraw & IConstants.ANCILLARY_AXIS ) == IConstants.ANCILLARY_AXIS && bRendering3D; final DeferredCache dc = getDeferredCache( ); final int axisType = ax.getAxisType( ); double[] daEndPoints3D = null; double[] da3D = null; Location3D lo3d = null; Text3DRenderEvent t3dre = null; Line3DRenderEvent l3dre = null; double dXStart = 0; double dZStart = 0; double dXEnd = 0; double dZEnd = 0; if ( iDimension == IConstants.THREE_D ) { AllAxes aax = pwa.getAxes( ); dXEnd = aax.getPrimaryBase( ).getScale( ).getNormalizedEnd( ); dZEnd = aax.getAncillaryBase( ).getScale( ).getNormalizedEnd( ); dXStart = aax.getPrimaryBase( ).getScale( ).getNormalizedStart( ); dZStart = aax.getAncillaryBase( ).getScale( ).getNormalizedStart( ); daEndPoints3D = sc.getNormalizedEndPoints( ); da3D = sc.getNormalizedTickCoordinates( ); lo3d = Location3DImpl.create( 0, 0, 0 ); t3dre = (Text3DRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), Text3DRenderEvent.class ); t3dre.setLabel( la ); t3dre.setAction( Text3DRenderEvent.RENDER_TEXT_AT_LOCATION ); t3dre.setTextPosition( iLabelLocation ); t3dre.setLocation3D( lo3d ); l3dre = (Line3DRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), Line3DRenderEvent.class ); l3dre.setLineAttributes( lia ); l3dre.setStart3D( Location3DImpl.create( 0, 0, 0 ) ); l3dre.setEnd3D( Location3DImpl.create( 0, 0, 0 ) ); } if ( iOrientation == IConstants.VERTICAL ) { int y; int y3d = 0; double dX = dLocation; double dZ = 0; if ( bRendering3D ) { Location3D l3d = ax.getAxisCoordinate3D( ); dX = l3d.getX( ); dZ = l3d.getZ( ); } if ( iv != null && iv.getType( ) == IntersectionValue.MAX && iDimension == IConstants.TWO_5_D ) { trae.setTransform( TransformationEvent.TRANSLATE ); trae.setTranslation( dSeriesThickness, -dSeriesThickness ); ipr.applyTransformation( trae ); } double dXTick1 = ( ( iMajorTickStyle & IConstants.TICK_LEFT ) == IConstants.TICK_LEFT ) ? ( dX - IConstants.TICK_SIZE ) : dX; double dXTick2 = ( ( iMajorTickStyle & IConstants.TICK_RIGHT ) == IConstants.TICK_RIGHT ) ? dX + IConstants.TICK_SIZE : dX; if ( ( iWhatToDraw & IConstants.AXIS ) == IConstants.AXIS && lia.isVisible( ) ) { if ( bRenderOrthogonal3DAxis ) { final double dStart = daEndPoints3D[0]; final double dEnd = daEndPoints3D[1]; l3dre.setLineAttributes( lia ); // center l3dre.setStart3D( dX, dStart, dZ ); l3dre.setEnd3D( dX, dEnd, dZ ); dc.addLine( l3dre ); // left l3dre.setStart3D( dXStart, dStart, dZEnd ); l3dre.setEnd3D( dXStart, dEnd, dZEnd ); dc.addLine( l3dre ); // right l3dre.setStart3D( dXEnd, dStart, dZStart ); l3dre.setEnd3D( dXEnd, dEnd, dZStart ); dc.addLine( l3dre ); } else { final double dStart = daEndPoints[0] + insCA.getBottom( ), dEnd = daEndPoints[1] - insCA.getTop( ); if ( iv != null && iv.getType( ) == IntersectionValue.VALUE && iDimension == IConstants.TWO_5_D ) { final Location[] loa = new Location[4]; loa[0] = LocationImpl.create( dX, dStart ); loa[1] = LocationImpl.create( dX + dSeriesThickness, dStart - dSeriesThickness ); loa[2] = LocationImpl.create( dX + dSeriesThickness, dEnd - dSeriesThickness ); loa[3] = LocationImpl.create( dX, dEnd ); final PolygonRenderEvent pre = (PolygonRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), PolygonRenderEvent.class ); pre.setPoints( loa ); pre.setBackground( ColorDefinitionImpl.create( 255, 255, 255, 127 ) ); pre.setOutline( lia ); ipr.fillPolygon( pre ); } lre.setLineAttributes( lia ); lre.getStart( ).set( dX, dStart ); lre.getEnd( ).set( dX, dEnd ); ipr.drawLine( lre ); } } if ( ( sc.getType( ) & IConstants.TEXT ) == IConstants.TEXT || sc.isCategoryScale( ) ) { double dAngleInRadians = ( -dAngleInDegrees * Math.PI ) / 180; double dSineTheta = Math.abs( Math.sin( dAngleInRadians ) ); double dCosTheta = Math.abs( Math.cos( dAngleInRadians ) ); double dOffset = 0, dW, dH, dHCosTheta; double dUnitSize = sc.getUnitSize( ); DataSetIterator dsi = sc.getData( ); final int iDateTimeUnit = ( sc.getType( ) == IConstants.DATE_TIME ) ? CDateTime.computeUnit( dsi ) : IConstants.UNDEFINED; final ITextMetrics itmText = xs.getTextMetrics( la ); if ( dAngleInDegrees == 90 || dAngleInDegrees == 0 ) { dOffset = -dUnitSize / 2; } double x = ( iLabelLocation == IConstants.LEFT ) ? dXTick1 - 1 : dXTick2 + 1; dsi.reset( ); for ( int i = 0; i < da.length - 1; i++ ) { if ( bRenderAxisLabels ) { la.getCaption( ) .setValue( sc.formatCategoryValue( sc.getType( ), dsi.next( ), iDateTimeUnit ) ); if ( sc.isTickLabelVisible( i ) ) { ScriptHandler.callFunction( sh, ScriptHandler.BEFORE_DRAW_AXIS_LABEL, axModel, la ); getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.BEFORE_DRAW_AXIS_LABEL, la ); itmText.reuse( la ); // RECYCLED dH = itmText.getFullHeight( ); dW = itmText.getFullWidth( ); dHCosTheta = dH * dCosTheta; if ( dAngleInDegrees > 0 && dAngleInDegrees < 90 ) { if ( iLabelLocation == IConstants.LEFT ) { dOffset = ( dHCosTheta + dW * dSineTheta - dUnitSize ) / 2 - dW * dSineTheta; } else if ( iLabelLocation == IConstants.RIGHT ) { dOffset = ( dHCosTheta + dW * dSineTheta - dUnitSize ) / 2 - dHCosTheta; } } else if ( dAngleInDegrees < 0 && dAngleInDegrees > -90 ) { if ( iLabelLocation == IConstants.LEFT ) { dOffset = ( dHCosTheta + dW * dSineTheta - dUnitSize ) / 2 - dHCosTheta; } else if ( iLabelLocation == IConstants.RIGHT ) { dOffset = ( dHCosTheta + dW * dSineTheta - dUnitSize ) / 2 - dW * dSineTheta; } } else if ( dAngleInDegrees == 0 || dAngleInDegrees == 90 || dAngleInDegrees == -90 ) { dOffset = -dUnitSize / 2; } } } y = (int) da[i]; if ( bRendering3D ) { y3d = (int) da3D[i]; } if ( ( iWhatToDraw & IConstants.AXIS ) == IConstants.AXIS ) { double dXMinorTick1 = ( ( iMinorTickStyle & IConstants.TICK_LEFT ) == IConstants.TICK_LEFT ) ? ( dX - IConstants.TICK_SIZE ) : dX; double dXMinorTick2 = ( ( iMinorTickStyle & IConstants.TICK_RIGHT ) == IConstants.TICK_RIGHT ) ? dX + IConstants.TICK_SIZE : dX; if ( dXMinorTick1 != dXMinorTick2 ) { // RENDER THE MINOR TICKS FIRST (For ALL but the // last Major tick) if ( i != da.length - 1 ) { if ( bRenderOrthogonal3DAxis ) { Line3DRenderEvent l3dreMinor = null; for ( int k = 0; k < daMinor.length - 1; k++ ) { l3dreMinor = (Line3DRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), Line3DRenderEvent.class ); l3dreMinor.setLineAttributes( liaMinorTick ); l3dreMinor.setStart3D( Location3DImpl.create( dXMinorTick1, y3d + daMinor[k], dZ ) ); l3dreMinor.setEnd3D( Location3DImpl.create( dXMinorTick2, y3d + daMinor[k], dZ ) ); dc.addLine( l3dreMinor ); } } else { LineRenderEvent lreMinor = null; for ( int k = 0; k < daMinor.length - 1; k++ ) { lreMinor = (LineRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), LineRenderEvent.class ); lreMinor.setLineAttributes( liaMinorTick ); lreMinor.setStart( LocationImpl.create( dXMinorTick1, y - daMinor[k] ) ); lreMinor.setEnd( LocationImpl.create( dXMinorTick2, y - daMinor[k] ) ); ipr.drawLine( lreMinor ); } } } } if ( dXTick1 != dXTick2 ) { if ( bRenderOrthogonal3DAxis ) { l3dre.setLineAttributes( liaMajorTick ); l3dre.setStart3D( dXTick1, y3d, dZ ); l3dre.setEnd3D( dXTick2, y3d, dZ ); dc.addLine( l3dre ); } else { lre.setLineAttributes( liaMajorTick ); lre.getStart( ).set( dXTick1, y ); lre.getEnd( ).set( dXTick2, y ); ipr.drawLine( lre ); } if ( iv != null && iDimension == IConstants.TWO_5_D && iv.getType( ) == IntersectionValue.VALUE ) { lre.setStart( LocationImpl.create( dX, y ) ); lre.setEnd( LocationImpl.create( dX + dSeriesThickness, y - dSeriesThickness ) ); ipr.drawLine( lre ); } } } if ( bRenderAxisLabels && sc.isTickLabelVisible( i ) ) { if ( bRendering3D ) { // Left wall lo3d.set( x, y3d + dOffset, dZEnd ); t3dre.setLocation3D( lo3d ); t3dre.setTextPosition( TextRenderEvent.LEFT ); t3dre.setAction( TextRenderEvent.RENDER_TEXT_AT_LOCATION ); dc.addLabel( t3dre ); // Right wall lo3d.set( dXEnd, y3d + dOffset, dZ ); t3dre.setLocation3D( lo3d ); t3dre.setTextPosition( TextRenderEvent.RIGHT ); t3dre.setAction( TextRenderEvent.RENDER_TEXT_AT_LOCATION ); dc.addLabel( t3dre ); } else { lo.set( x, y + dOffset ); tre.setAction( TextRenderEvent.RENDER_TEXT_AT_LOCATION ); ipr.drawText( tre ); } ScriptHandler.callFunction( sh, ScriptHandler.AFTER_DRAW_AXIS_LABEL, axModel, la ); getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.AFTER_DRAW_AXIS_LABEL, la ); } } y = (int) da[da.length - 1]; if ( bRendering3D ) { y3d = (int) da3D[da3D.length - 1]; } if ( dXTick1 != dXTick2 ) { if ( bRenderOrthogonal3DAxis ) { l3dre.setLineAttributes( liaMajorTick ); l3dre.setStart3D( dXTick1, y3d, dZ ); l3dre.setEnd3D( dXTick2, y3d, dZ ); dc.addLine( l3dre ); } else { lre.setLineAttributes( liaMajorTick ); lre.getStart( ).set( dXTick1, y ); lre.getEnd( ).set( dXTick2, y ); ipr.drawLine( lre ); } if ( iv != null && iDimension == IConstants.TWO_5_D && iv.getType( ) == IntersectionValue.VALUE ) { lre.setStart( LocationImpl.create( dX, y ) ); lre.setEnd( LocationImpl.create( dX + dSeriesThickness, y - dSeriesThickness ) ); ipr.drawLine( lre ); } } itmText.dispose( );// DISPOSED } else if ( ( sc.getType( ) & IConstants.LOGARITHMIC ) == IConstants.LOGARITHMIC ) { double dAxisValue = Methods.asDouble( sc.getMinimum( ) ) .doubleValue( ); final double dAxisStep = Methods.asDouble( sc.getStep( ) ) .doubleValue( ); dAxisValue = Methods.asDouble( sc.getMinimum( ) ).doubleValue( ); // RESET double x = ( iLabelLocation == IConstants.LEFT ) ? dXTick1 - 1 : dXTick2 + 1; for ( int i = 0; i < da.length; i++ ) { if ( bRenderAxisLabels ) // PERFORM COMPUTATIONS ONLY IF // AXIS LABEL IS VISIBLE { if ( fs == null ) { df = new DecimalFormat( sc.getNumericPattern( dAxisValue ) ); } nde.setValue( dAxisValue ); try { sText = ValueFormatter.format( nde, fs, ax.getRunTimeContext( ).getLocale( ), df ); } catch ( ChartException dfex ) { logger.log( dfex ); sText = IConstants.NULL_STRING; } } y = (int) da[i]; if ( bRendering3D ) { y3d = (int) da3D[i]; } if ( ( iWhatToDraw & IConstants.AXIS ) == IConstants.AXIS ) { double dXMinorTick1 = ( ( iMinorTickStyle & IConstants.TICK_LEFT ) == IConstants.TICK_LEFT ) ? ( dX - IConstants.TICK_SIZE ) : dX; double dXMinorTick2 = ( ( iMinorTickStyle & IConstants.TICK_RIGHT ) == IConstants.TICK_RIGHT ) ? dX + IConstants.TICK_SIZE : dX; if ( dXMinorTick1 != dXMinorTick2 ) { // RENDER THE MINOR TICKS FIRST (For ALL but the // last Major tick) if ( i != da.length - 1 ) { if ( bRenderOrthogonal3DAxis ) { Line3DRenderEvent l3dreMinor = null; for ( int k = 0; k < daMinor.length - 1; k++ ) { l3dreMinor = (Line3DRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), Line3DRenderEvent.class ); l3dreMinor.setLineAttributes( liaMinorTick ); l3dreMinor.setStart3D( Location3DImpl.create( dXMinorTick1, y3d + daMinor[k], dZ ) ); l3dreMinor.setEnd3D( Location3DImpl.create( dXMinorTick2, y3d + daMinor[k], dZ ) ); dc.addLine( l3dreMinor ); } } else { LineRenderEvent lreMinor = null; for ( int k = 0; k < daMinor.length - 1; k++ ) { lreMinor = (LineRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), LineRenderEvent.class ); lreMinor.setLineAttributes( liaMinorTick ); lreMinor.setStart( LocationImpl.create( dXMinorTick1, y - daMinor[k] ) ); lreMinor.setEnd( LocationImpl.create( dXMinorTick2, y - daMinor[k] ) ); ipr.drawLine( lreMinor ); } } } } if ( dXTick1 != dXTick2 ) { if ( bRenderOrthogonal3DAxis ) { l3dre.setLineAttributes( liaMajorTick ); l3dre.setStart3D( dXTick1, y3d, dZ ); l3dre.setEnd3D( dXTick2, y3d, dZ ); dc.addLine( l3dre ); } else { lre.setLineAttributes( liaMajorTick ); lre.getStart( ).set( dXTick1, y ); lre.getEnd( ).set( dXTick2, y ); ipr.drawLine( lre ); } if ( iv != null && iDimension == IConstants.TWO_5_D && iv.getType( ) == IntersectionValue.VALUE ) { lre.setLineAttributes( lia ); lre.setStart( LocationImpl.create( dX, y ) ); lre.setEnd( LocationImpl.create( dX + dSeriesThickness, y - dSeriesThickness ) ); ipr.drawLine( lre ); } } } if ( bRenderAxisLabels ) // RENDER LABELS ONLY IF // REQUESTED { ScriptHandler.callFunction( sh, ScriptHandler.BEFORE_DRAW_AXIS_LABEL, axModel, la ); getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.BEFORE_DRAW_AXIS_LABEL, la ); if ( bRendering3D ) { // Left wall lo3d.set( x, y3d, dZEnd ); la.getCaption( ).setValue( sText ); t3dre.setLocation3D( lo3d ); t3dre.setTextPosition( TextRenderEvent.LEFT ); t3dre.setAction( TextRenderEvent.RENDER_TEXT_AT_LOCATION ); dc.addLabel( t3dre ); // Right wall lo3d.set( dXEnd, y3d, dZ ); la.getCaption( ).setValue( sText ); t3dre.setLocation3D( lo3d ); t3dre.setTextPosition( TextRenderEvent.RIGHT ); t3dre.setAction( TextRenderEvent.RENDER_TEXT_AT_LOCATION ); dc.addLabel( t3dre ); } else { lo.set( x, y ); la.getCaption( ).setValue( sText ); tre.setAction( TextRenderEvent.RENDER_TEXT_AT_LOCATION ); ipr.drawText( tre ); } ScriptHandler.callFunction( sh, ScriptHandler.AFTER_DRAW_AXIS_LABEL, axModel, la ); getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.AFTER_DRAW_AXIS_LABEL, la ); } dAxisValue *= dAxisStep; } } else if ( ( sc.getType( ) & IConstants.LINEAR ) == IConstants.LINEAR ) { double dAxisValue = Methods.asDouble( sc.getMinimum( ) ) .doubleValue( ); final double dAxisStep = Methods.asDouble( sc.getStep( ) ) .doubleValue( ); if ( fs == null ) { df = new DecimalFormat( sc.getNumericPattern( ) ); } dAxisValue = Methods.asDouble( sc.getMinimum( ) ).doubleValue( ); // RESET double x = ( iLabelLocation == IConstants.LEFT ) ? dXTick1 - 1 : dXTick2 + 1; for ( int i = 0; i < da.length; i++ ) { nde.setValue( dAxisValue ); try { sText = ValueFormatter.format( nde, fs, ax.getRunTimeContext( ).getLocale( ), df ); } catch ( ChartException dfex ) { logger.log( dfex ); sText = IConstants.NULL_STRING; } y = (int) da[i]; if ( bRendering3D ) { y3d = (int) da3D[i]; } if ( ( iWhatToDraw & IConstants.AXIS ) == IConstants.AXIS ) { double dXMinorTick1 = ( ( iMinorTickStyle & IConstants.TICK_LEFT ) == IConstants.TICK_LEFT ) ? ( dX - IConstants.TICK_SIZE ) : dX, dXMinorTick2 = ( ( iMinorTickStyle & IConstants.TICK_RIGHT ) == IConstants.TICK_RIGHT ) ? dX + IConstants.TICK_SIZE : dX; if ( dXMinorTick1 != dXMinorTick2 ) { // RENDER THE MINOR TICKS FIRST (For ALL but the // last Major tick) if ( i != da.length - 1 ) { if ( bRenderOrthogonal3DAxis ) { Line3DRenderEvent l3dreMinor = null; for ( int k = 0; k < daMinor.length - 1; k++ ) { l3dreMinor = (Line3DRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), Line3DRenderEvent.class ); l3dreMinor.setLineAttributes( liaMinorTick ); l3dreMinor.setStart3D( Location3DImpl.create( dXMinorTick1, y3d + daMinor[k], dZ ) ); l3dreMinor.setEnd3D( Location3DImpl.create( dXMinorTick2, y3d + daMinor[k], dZ ) ); dc.addLine( l3dreMinor ); } } else { LineRenderEvent lreMinor = null; for ( int k = 0; k < daMinor.length - 1; k++ ) { lreMinor = (LineRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), LineRenderEvent.class ); lreMinor.setLineAttributes( liaMinorTick ); lreMinor.setStart( LocationImpl.create( dXMinorTick1, y - daMinor[k] ) ); lreMinor.setEnd( LocationImpl.create( dXMinorTick2, y - daMinor[k] ) ); ipr.drawLine( lreMinor ); } } } } if ( dXTick1 != dXTick2 ) { if ( bRenderOrthogonal3DAxis ) { l3dre.setLineAttributes( liaMajorTick ); l3dre.setStart3D( dXTick1, y3d, dZ ); l3dre.setEnd3D( dXTick2, y3d, dZ ); dc.addLine( l3dre ); } else { lre.setLineAttributes( liaMajorTick ); lre.getStart( ).set( dXTick1, y ); lre.getEnd( ).set( dXTick2, y ); ipr.drawLine( lre ); } if ( iv != null && iDimension == IConstants.TWO_5_D && iv.getType( ) == IntersectionValue.VALUE ) { lre.setLineAttributes( lia ); lre.setStart( LocationImpl.create( dX, y ) ); lre.setEnd( LocationImpl.create( dX + dSeriesThickness, y - dSeriesThickness ) ); ipr.drawLine( lre ); } } } if ( bRenderAxisLabels ) { ScriptHandler.callFunction( sh, ScriptHandler.BEFORE_DRAW_AXIS_LABEL, axModel, la ); getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.BEFORE_DRAW_AXIS_LABEL, la ); if ( bRendering3D ) { // Left wall lo3d.set( x, y3d, dZEnd ); la.getCaption( ).setValue( sText ); t3dre.setLocation3D( lo3d ); t3dre.setTextPosition( TextRenderEvent.LEFT ); t3dre.setAction( TextRenderEvent.RENDER_TEXT_AT_LOCATION ); dc.addLabel( t3dre ); // Right wall lo3d.set( dXEnd, y3d, dZ ); la.getCaption( ).setValue( sText ); t3dre.setLocation3D( lo3d ); t3dre.setTextPosition( TextRenderEvent.RIGHT ); t3dre.setAction( TextRenderEvent.RENDER_TEXT_AT_LOCATION ); dc.addLabel( t3dre ); } else { lo.set( x, y ); la.getCaption( ).setValue( sText ); tre.setAction( TextRenderEvent.RENDER_TEXT_AT_LOCATION ); ipr.drawText( tre ); } ScriptHandler.callFunction( sh, ScriptHandler.AFTER_DRAW_AXIS_LABEL, axModel, la ); getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.AFTER_DRAW_AXIS_LABEL, la ); } dAxisValue += dAxisStep; } } else if ( ( sc.getType( ) & IConstants.DATE_TIME ) == IConstants.DATE_TIME ) { CDateTime cdt, cdtAxisValue = Methods.asDateTime( sc.getMinimum( ) ); final int iUnit = Methods.asInteger( sc.getUnit( ) ); final int iStep = Methods.asInteger( sc.getStep( ) ); SimpleDateFormat sdf = null; if ( fs == null ) { sdf = new SimpleDateFormat( CDateTime.getPreferredFormat( iUnit ) ); } cdt = cdtAxisValue; double x = ( iLabelLocation == IConstants.LEFT ) ? dXTick1 - 1 : dXTick2 + 1; for ( int i = 0; i < da.length; i++ ) { try { sText = ValueFormatter.format( cdt, ax.getFormatSpecifier( ), ax.getRunTimeContext( ).getLocale( ), sdf ); } catch ( ChartException dfex ) { logger.log( dfex ); sText = IConstants.NULL_STRING; } y = (int) da[i]; if ( bRendering3D ) { y3d = (int) da3D[i]; } if ( ( iWhatToDraw & IConstants.AXIS ) == IConstants.AXIS ) { double dXMinorTick1 = ( ( iMinorTickStyle & IConstants.TICK_LEFT ) == IConstants.TICK_LEFT ) ? ( dX - IConstants.TICK_SIZE ) : dX, dXMinorTick2 = ( ( iMinorTickStyle & IConstants.TICK_RIGHT ) == IConstants.TICK_RIGHT ) ? dX + IConstants.TICK_SIZE : dX; if ( dXMinorTick1 != dXMinorTick2 ) { // RENDER THE MINOR TICKS FIRST (For ALL but the // last Major tick) if ( i != da.length - 1 ) { if ( bRenderOrthogonal3DAxis ) { Line3DRenderEvent l3dreMinor = null; for ( int k = 0; k < daMinor.length - 1; k++ ) { l3dreMinor = (Line3DRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), Line3DRenderEvent.class ); l3dreMinor.setLineAttributes( liaMinorTick ); l3dreMinor.setStart3D( Location3DImpl.create( dXMinorTick1, y3d + daMinor[k], dZ ) ); l3dreMinor.setEnd3D( Location3DImpl.create( dXMinorTick2, y3d + daMinor[k], dZ ) ); dc.addLine( l3dreMinor ); } } else { LineRenderEvent lreMinor = null; for ( int k = 0; k < daMinor.length - 1; k++ ) { lreMinor = (LineRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), LineRenderEvent.class ); lreMinor.setLineAttributes( liaMinorTick ); lreMinor.setStart( LocationImpl.create( dXMinorTick1, y - daMinor[k] ) ); lreMinor.setEnd( LocationImpl.create( dXMinorTick2, y - daMinor[k] ) ); ipr.drawLine( lreMinor ); } } } } if ( dXTick1 != dXTick2 ) { if ( bRenderOrthogonal3DAxis ) { l3dre.setLineAttributes( liaMajorTick ); l3dre.setStart3D( dXTick1, y3d, dZ ); l3dre.setEnd3D( dXTick2, y3d, dZ ); dc.addLine( l3dre ); } else { lre.setLineAttributes( liaMajorTick ); lre.getStart( ).set( dXTick1, y ); lre.getEnd( ).set( dXTick2, y ); ipr.drawLine( lre ); } if ( iv != null && iDimension == IConstants.TWO_5_D && iv.getType( ) == IntersectionValue.VALUE ) { lre.setStart( LocationImpl.create( dX, y ) ); lre.setEnd( LocationImpl.create( dX + dSeriesThickness, y - dSeriesThickness ) ); ipr.drawLine( lre ); } } } if ( bRenderAxisLabels ) { ScriptHandler.callFunction( sh, ScriptHandler.BEFORE_DRAW_AXIS_LABEL, axModel, la ); getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.BEFORE_DRAW_AXIS_LABEL, la ); if ( bRendering3D ) { // Left wall lo3d.set( x, y3d, dZEnd ); la.getCaption( ).setValue( sText ); t3dre.setLocation3D( lo3d ); t3dre.setTextPosition( TextRenderEvent.LEFT ); t3dre.setAction( TextRenderEvent.RENDER_TEXT_AT_LOCATION ); dc.addLabel( t3dre ); // Right wall lo3d.set( dXEnd, y3d, dZ ); la.getCaption( ).setValue( sText ); t3dre.setLocation3D( lo3d ); t3dre.setTextPosition( TextRenderEvent.RIGHT ); t3dre.setAction( TextRenderEvent.RENDER_TEXT_AT_LOCATION ); dc.addLabel( t3dre ); } else { lo.set( x, y ); la.getCaption( ).setValue( sText ); tre.setAction( TextRenderEvent.RENDER_TEXT_AT_LOCATION ); ipr.drawText( tre ); } ScriptHandler.callFunction( sh, ScriptHandler.AFTER_DRAW_AXIS_LABEL, axModel, la ); getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.AFTER_DRAW_AXIS_LABEL, la ); } cdt = cdtAxisValue.forward( iUnit, iStep * ( i + 1 ) ); // ALWAYS // W.R.T // START // VALUE } } la = ax.getTitle( ); // TEMPORARILY USE FOR AXIS TITLE if ( la.isVisible( ) && bRenderAxisLabels ) { ScriptHandler.callFunction( sh, ScriptHandler.BEFORE_DRAW_AXIS_TITLE, axModel, la ); getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.BEFORE_DRAW_AXIS_TITLE, la ); final String sRestoreValue = la.getCaption( ).getValue( ); la.getCaption( ) .setValue( rtc.externalizedMessage( sRestoreValue ) ); BoundingBox bb = null; try { bb = Methods.computeBox( xs, ax.getTitlePosition( ), la, 0, 0 ); } catch ( IllegalArgumentException uiex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, uiex ); } if ( bRendering3D ) { Bounds cbo = getPlotBounds( ); tre.setBlockBounds( BoundsImpl.create( cbo.getLeft( ) + ( cbo.getWidth( ) / 3d - bb.getWidth( ) ) / 2d, cbo.getTop( ) + 30, bb.getWidth( ), bb.getHeight( ) ) ); tre.setLabel( la ); tre.setBlockAlignment( null ); tre.setAction( TextRenderEvent.RENDER_TEXT_IN_BLOCK ); ipr.drawText( tre ); tre.setBlockBounds( BoundsImpl.create( cbo.getLeft( ) + cbo.getWidth( ) - bb.getWidth( ), cbo.getTop( ) + 30 * 2, bb.getWidth( ), bb.getHeight( ) ) ); ipr.drawText( tre ); } else { final Bounds bo = BoundsImpl.create( ax.getTitleCoordinate( ), daEndPoints[1], bb.getWidth( ), daEndPoints[0] - daEndPoints[1] ); tre.setBlockBounds( bo ); tre.setLabel( la ); tre.setBlockAlignment( null ); tre.setAction( TextRenderEvent.RENDER_TEXT_IN_BLOCK ); ipr.drawText( tre ); } la.getCaption( ).setValue( sRestoreValue ); ScriptHandler.callFunction( sh, ScriptHandler.AFTER_DRAW_AXIS_TITLE, axModel, la ); getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.AFTER_DRAW_AXIS_TITLE, la ); } la = ax.getLabel( ); if ( iv != null && iv.getType( ) == IntersectionValue.MAX && iDimension == IConstants.TWO_5_D ) { trae.setTranslation( -dSeriesThickness, dSeriesThickness ); ipr.applyTransformation( trae ); } } else if ( iOrientation == IConstants.HORIZONTAL ) { int x; int x3d = 0; int z3d = 0; double dY = dLocation; double dX = 0; double dZ = 0; if ( bRendering3D ) { Location3D l3d = ax.getAxisCoordinate3D( ); dX = l3d.getX( ); dY = l3d.getY( ); dZ = l3d.getZ( ); } double dYTick1 = ( ( iMajorTickStyle & IConstants.TICK_ABOVE ) == IConstants.TICK_ABOVE ) ? ( dY - IConstants.TICK_SIZE ) : dY; double dYTick2 = ( ( iMajorTickStyle & IConstants.TICK_BELOW ) == IConstants.TICK_BELOW ) ? dY + IConstants.TICK_SIZE : dY; if ( iv != null && iv.getType( ) == IntersectionValue.MAX && iDimension == IConstants.TWO_5_D ) { trae.setTransform( TransformationEvent.TRANSLATE ); trae.setTranslation( dSeriesThickness, -dSeriesThickness ); ipr.applyTransformation( trae ); } if ( ( iWhatToDraw & IConstants.AXIS ) == IConstants.AXIS && lia.isVisible( ) ) { if ( bRenderBase3DAxis ) { final double dStart = daEndPoints3D[0]; final double dEnd = daEndPoints3D[1]; l3dre.setLineAttributes( lia ); l3dre.setStart3D( dStart, dY, dZ ); l3dre.setEnd3D( dEnd, dY, dZ ); dc.addLine( l3dre ); } else if ( bRenderAncillary3DAxis ) { final double dStart = daEndPoints3D[0]; final double dEnd = daEndPoints3D[1]; l3dre.setLineAttributes( lia ); l3dre.setStart3D( dX, dY, dStart ); l3dre.setEnd3D( dX, dY, dEnd ); dc.addLine( l3dre ); } else { final double dStart = daEndPoints[0] - insCA.getLeft( ), dEnd = daEndPoints[1] + insCA.getRight( ); if ( iv != null && iv.getType( ) == IntersectionValue.VALUE && iDimension == IConstants.TWO_5_D ) { // Zero plane. final Location[] loa = new Location[4]; loa[0] = LocationImpl.create( dStart, dY ); loa[1] = LocationImpl.create( dStart + dSeriesThickness, dY - dSeriesThickness ); loa[2] = LocationImpl.create( dEnd + dSeriesThickness, dY - dSeriesThickness ); loa[3] = LocationImpl.create( dEnd, dY ); final PolygonRenderEvent pre = (PolygonRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), PolygonRenderEvent.class ); pre.setPoints( loa ); pre.setBackground( ColorDefinitionImpl.create( 255, 255, 255, 127 ) ); pre.setOutline( lia ); ipr.fillPolygon( pre ); } lre.setLineAttributes( lia ); lre.getStart( ).set( dStart, dY ); lre.getEnd( ).set( dEnd, dY ); ipr.drawLine( lre ); } } if ( ( sc.getType( ) & IConstants.TEXT ) == IConstants.TEXT || sc.isCategoryScale( ) ) { double dAngleInRadians = ( -dAngleInDegrees * Math.PI ) / 180; double dSineTheta = Math.abs( Math.sin( dAngleInRadians ) ); double dCosTheta = Math.abs( Math.cos( dAngleInRadians ) ); double dOffset = 0, dW, dH, dHSineTheta; double dUnitSize = sc.getUnitSize( ); DataSetIterator dsi = sc.getData( ); final int iDateTimeUnit = ( sc.getType( ) == IConstants.DATE_TIME ) ? CDateTime.computeUnit( dsi ) : IConstants.UNDEFINED; final ITextMetrics itmText = xs.getTextMetrics( la ); if ( dAngleInDegrees == 90 || dAngleInDegrees == 0 ) { dOffset = dUnitSize / 2; } double y = ( iLabelLocation == IConstants.ABOVE ) ? dYTick1 - 1 : dYTick2 + 1; dsi.reset( ); for ( int i = 0; i < da.length - 1; i++ ) { x = (int) da[i]; if ( bRendering3D ) { x3d = (int) da3D[i]; z3d = (int) da3D[i]; } if ( ( iWhatToDraw & IConstants.AXIS ) == IConstants.AXIS ) { double dYMinorTick1 = ( ( iMinorTickStyle & IConstants.TICK_ABOVE ) == IConstants.TICK_ABOVE ) ? ( dY - IConstants.TICK_SIZE ) : dY, dYMinorTick2 = ( ( iMinorTickStyle & IConstants.TICK_BELOW ) == IConstants.TICK_BELOW ) ? dY + IConstants.TICK_SIZE : dY; if ( dYMinorTick1 != -dYMinorTick2 ) { // RENDER THE MINOR TICKS FIRST (For ALL but the // last Major tick) if ( i != da.length - 1 ) { if ( bRenderBase3DAxis ) { Line3DRenderEvent l3dreMinor = null; for ( int k = 0; k < daMinor.length - 1; k++ ) { l3dreMinor = (Line3DRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), Line3DRenderEvent.class ); l3dreMinor.setLineAttributes( liaMinorTick ); l3dreMinor.setStart3D( Location3DImpl.create( x3d + daMinor[k], dYMinorTick1, dZ ) ); l3dreMinor.setEnd3D( Location3DImpl.create( x3d + daMinor[k], dYMinorTick2, dZ ) ); dc.addLine( l3dreMinor ); } } else if ( bRenderAncillary3DAxis ) { Line3DRenderEvent l3dreMinor = null; for ( int k = 0; k < daMinor.length - 1; k++ ) { l3dreMinor = (Line3DRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), Line3DRenderEvent.class ); l3dreMinor.setLineAttributes( liaMinorTick ); l3dreMinor.setStart3D( Location3DImpl.create( dX, dYMinorTick1, z3d + daMinor[k] ) ); l3dreMinor.setEnd3D( Location3DImpl.create( dX, dYMinorTick2, z3d + daMinor[k] ) ); dc.addLine( l3dreMinor ); } } else { LineRenderEvent lreMinor = null; for ( int k = 0; k < daMinor.length - 1; k++ ) { lreMinor = (LineRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), LineRenderEvent.class ); lreMinor.setLineAttributes( liaMinorTick ); lreMinor.setStart( LocationImpl.create( x + daMinor[k], dYMinorTick1 ) ); lreMinor.setEnd( LocationImpl.create( x + daMinor[k], dYMinorTick2 ) ); ipr.drawLine( lreMinor ); } } } } if ( dYTick1 != dYTick2 ) { if ( bRenderBase3DAxis ) { l3dre.setLineAttributes( liaMajorTick ); l3dre.setStart3D( x3d, dYTick1, dZ ); l3dre.setEnd3D( x3d, dYTick2, dZ ); dc.addLine( l3dre ); } else if ( bRenderAncillary3DAxis ) { l3dre.setLineAttributes( liaMajorTick ); l3dre.setStart3D( dX, dYTick1, z3d ); l3dre.setEnd3D( dX, dYTick2, z3d ); dc.addLine( l3dre ); } else { lre.setLineAttributes( liaMajorTick ); lre.getStart( ).set( x, dYTick1 ); lre.getEnd( ).set( x, dYTick2 ); ipr.drawLine( lre ); } if ( iv != null && iDimension == IConstants.TWO_5_D && iv.getType( ) == IntersectionValue.VALUE ) { lre.getStart( ).set( x, dY ); lre.getEnd( ).set( x + dSeriesThickness, dY - dSeriesThickness ); ipr.drawLine( lre ); } } } if ( bRenderAxisLabels ) { la.getCaption( ) .setValue( sc.formatCategoryValue( sc.getType( ), dsi.next( ), // step to next value. iDateTimeUnit ) ); if ( sc.isTickLabelVisible( i ) ) { ScriptHandler.callFunction( sh, ScriptHandler.BEFORE_DRAW_AXIS_LABEL, axModel, la ); getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.BEFORE_DRAW_AXIS_LABEL, la ); itmText.reuse( la );// RECYCLED dH = itmText.getFullHeight( ); dW = itmText.getFullWidth( ); dHSineTheta = dH * dSineTheta; if ( dAngleInDegrees > 0 && dAngleInDegrees < 90 ) { if ( iLabelLocation == IConstants.ABOVE ) { dOffset = dUnitSize / 2 - ( dW * dCosTheta + dHSineTheta ) / 2 + dHSineTheta; } else if ( iLabelLocation == IConstants.BELOW ) { dOffset = dUnitSize + dHSineTheta - ( dUnitSize - dW * dCosTheta + dHSineTheta ) / 2 - dHSineTheta; } } else if ( dAngleInDegrees < 0 && dAngleInDegrees > -90 ) { if ( iLabelLocation == IConstants.ABOVE ) { dOffset = dUnitSize / 2 - dHSineTheta / 2 + ( dW * dCosTheta + dHSineTheta ) / 2; } else if ( iLabelLocation == IConstants.BELOW ) { dOffset = ( dUnitSize - dW * dCosTheta + dHSineTheta ) / 2; } } else if ( dAngleInDegrees == 0 || dAngleInDegrees == 90 || dAngleInDegrees == -90 ) { dOffset = dUnitSize / 2; } if ( bRendering3D ) { if ( axisType == IConstants.BASE_AXIS ) { lo3d.set( x3d + dOffset, y, dZEnd ); } else { lo3d.set( dXEnd, y, z3d + dOffset ); } t3dre.setLocation3D( lo3d ); t3dre.setAction( TextRenderEvent.RENDER_TEXT_AT_LOCATION ); dc.addLabel( t3dre ); } else { lo.set( x + dOffset, y ); tre.setAction( TextRenderEvent.RENDER_TEXT_AT_LOCATION ); ipr.drawText( tre ); } ScriptHandler.callFunction( sh, ScriptHandler.AFTER_DRAW_AXIS_LABEL, axModel, la ); getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.AFTER_DRAW_AXIS_LABEL, la ); } } } // ONE LAST TICK x = (int) da[da.length - 1]; if ( ( iWhatToDraw & IConstants.AXIS ) == IConstants.AXIS ) { if ( dYTick1 != dYTick2 ) { if ( bRenderBase3DAxis ) { l3dre.setLineAttributes( liaMajorTick ); l3dre.setStart3D( x3d, dYTick1, dZ ); l3dre.setEnd3D( x3d, dYTick2, dZ ); dc.addLine( l3dre ); } else if ( bRenderAncillary3DAxis ) { l3dre.setLineAttributes( liaMajorTick ); l3dre.setStart3D( dX, dYTick1, z3d ); l3dre.setEnd3D( dX, dYTick2, z3d ); dc.addLine( l3dre ); } else { lre.setLineAttributes( liaMajorTick ); lre.getStart( ).set( x, dYTick1 ); lre.getEnd( ).set( x, dYTick2 ); ipr.drawLine( lre ); } if ( iv != null && iDimension == IConstants.TWO_5_D && iv.getType( ) == IntersectionValue.VALUE ) { lre.getStart( ).set( x, dY ); lre.getEnd( ).set( x + dSeriesThickness, dY - dSeriesThickness ); ipr.drawLine( lre ); } } } itmText.dispose( ); // DISPOSED } else if ( ( sc.getType( ) & IConstants.LINEAR ) == IConstants.LINEAR ) { double dAxisValue = Methods.asDouble( sc.getMinimum( ) ) .doubleValue( ); final double dAxisStep = Methods.asDouble( sc.getStep( ) ) .doubleValue( ); if ( fs == null ) { df = new DecimalFormat( sc.getNumericPattern( ) ); } dAxisValue = Methods.asDouble( sc.getMinimum( ) ).doubleValue( ); // RESET double y = ( iLabelLocation == IConstants.ABOVE ) ? dYTick1 - 1 : dYTick2 + 1; for ( int i = 0; i < da.length; i++ ) { x = (int) da[i]; if ( bRendering3D ) { x3d = (int) da3D[i]; z3d = (int) da3D[i]; } if ( ( iWhatToDraw & IConstants.AXIS ) == IConstants.AXIS ) { double dYMinorTick1 = ( ( iMinorTickStyle & IConstants.TICK_ABOVE ) == IConstants.TICK_ABOVE ) ? ( dY - IConstants.TICK_SIZE ) : dY, dYMinorTick2 = ( ( iMinorTickStyle & IConstants.TICK_BELOW ) == IConstants.TICK_BELOW ) ? dY + IConstants.TICK_SIZE : dY; if ( dYMinorTick1 != -dYMinorTick2 ) { // RENDER THE MINOR TICKS FIRST (For ALL but the // last Major tick) if ( i != da.length - 1 ) { if ( bRenderBase3DAxis ) { Line3DRenderEvent l3dreMinor = null; for ( int k = 0; k < daMinor.length - 1; k++ ) { l3dreMinor = (Line3DRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), Line3DRenderEvent.class ); l3dreMinor.setLineAttributes( liaMinorTick ); l3dreMinor.setStart3D( Location3DImpl.create( x3d + daMinor[k], dYMinorTick1, dZ ) ); l3dreMinor.setEnd3D( Location3DImpl.create( x3d + daMinor[k], dYMinorTick2, dZ ) ); dc.addLine( l3dreMinor ); } } else if ( bRenderAncillary3DAxis ) { Line3DRenderEvent l3dreMinor = null; for ( int k = 0; k < daMinor.length - 1; k++ ) { l3dreMinor = (Line3DRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), Line3DRenderEvent.class ); l3dreMinor.setLineAttributes( liaMinorTick ); l3dreMinor.setStart3D( Location3DImpl.create( dX, dYMinorTick1, z3d + daMinor[k] ) ); l3dreMinor.setEnd3D( Location3DImpl.create( dX, dYMinorTick2, z3d + daMinor[k] ) ); dc.addLine( l3dreMinor ); } } else { LineRenderEvent lreMinor = null; for ( int k = 0; k < daMinor.length - 1; k++ ) { lreMinor = (LineRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), LineRenderEvent.class ); lreMinor.setLineAttributes( liaMinorTick ); lreMinor.setStart( LocationImpl.create( x + daMinor[k], dYMinorTick1 ) ); lreMinor.setEnd( LocationImpl.create( x + daMinor[k], dYMinorTick2 ) ); ipr.drawLine( lreMinor ); } } } } if ( dYTick1 != dYTick2 ) { if ( bRenderBase3DAxis ) { l3dre.setLineAttributes( liaMajorTick ); l3dre.setStart3D( x3d, dYTick1, dZ ); l3dre.setEnd3D( x3d, dYTick2, dZ ); dc.addLine( l3dre ); } else if ( bRenderAncillary3DAxis ) { l3dre.setLineAttributes( liaMajorTick ); l3dre.setStart3D( dX, dYTick1, z3d ); l3dre.setEnd3D( dX, dYTick2, z3d ); dc.addLine( l3dre ); } else { lre.setLineAttributes( liaMajorTick ); lre.getStart( ).set( x, dYTick1 ); lre.getEnd( ).set( x, dYTick2 ); ipr.drawLine( lre ); } if ( iv != null && iDimension == IConstants.TWO_5_D && iv.getType( ) == IntersectionValue.VALUE ) { lre.getStart( ).set( x, dY ); lre.getEnd( ).set( x + dSeriesThickness, dY - dSeriesThickness ); ipr.drawLine( lre ); } } } if ( bRenderAxisLabels ) // OPTIMIZED: ONLY PROCESS IF // AXES // LABELS ARE VISIBLE OR REQUESTED // FOR { nde.setValue( dAxisValue ); try { sText = ValueFormatter.format( nde, ax.getFormatSpecifier( ), ax.getRunTimeContext( ).getLocale( ), df ); } catch ( ChartException dfex ) { logger.log( dfex ); sText = IConstants.NULL_STRING; } ScriptHandler.callFunction( sh, ScriptHandler.BEFORE_DRAW_AXIS_LABEL, axModel, la ); getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.BEFORE_DRAW_AXIS_LABEL, la ); if ( bRendering3D ) { if ( axisType == IConstants.BASE_AXIS ) { lo3d.set( x3d, y, dZEnd ); } else { lo3d.set( dXEnd, y, z3d ); } la.getCaption( ).setValue( sText ); t3dre.setLocation3D( lo3d ); t3dre.setAction( TextRenderEvent.RENDER_TEXT_AT_LOCATION ); dc.addLabel( t3dre ); } else { lo.set( x, y ); la.getCaption( ).setValue( sText ); tre.setAction( TextRenderEvent.RENDER_TEXT_AT_LOCATION ); ipr.drawText( tre ); } ScriptHandler.callFunction( sh, ScriptHandler.AFTER_DRAW_AXIS_LABEL, axModel, la ); getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.AFTER_DRAW_AXIS_LABEL, la ); } dAxisValue += dAxisStep; } } else if ( ( sc.getType( ) & IConstants.LOGARITHMIC ) == IConstants.LOGARITHMIC ) { double dAxisValue = Methods.asDouble( sc.getMinimum( ) ) .doubleValue( ); final double dAxisStep = Methods.asDouble( sc.getStep( ) ) .doubleValue( ); dAxisValue = Methods.asDouble( sc.getMinimum( ) ).doubleValue( ); // RESET double y = ( iLabelLocation == IConstants.ABOVE ) ? dYTick1 - 1 : dYTick2 + 1; for ( int i = 0; i < da.length; i++ ) { x = (int) da[i]; if ( bRendering3D ) { x3d = (int) da3D[i]; z3d = (int) da3D[i]; } if ( ( iWhatToDraw & IConstants.AXIS ) == IConstants.AXIS ) { double dYMinorTick1 = ( ( iMinorTickStyle & IConstants.TICK_ABOVE ) == IConstants.TICK_ABOVE ) ? ( dY - IConstants.TICK_SIZE ) : dY, dYMinorTick2 = ( ( iMinorTickStyle & IConstants.TICK_BELOW ) == IConstants.TICK_BELOW ) ? dY + IConstants.TICK_SIZE : dY; if ( dYMinorTick1 != -dYMinorTick2 ) { // RENDER THE MINOR TICKS FIRST (For ALL but the // last Major tick) if ( i != da.length - 1 ) { if ( bRenderBase3DAxis ) { Line3DRenderEvent l3dreMinor = null; for ( int k = 0; k < daMinor.length - 1; k++ ) { l3dreMinor = (Line3DRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), Line3DRenderEvent.class ); l3dreMinor.setLineAttributes( liaMinorTick ); l3dreMinor.setStart3D( Location3DImpl.create( x3d + daMinor[k], dYMinorTick1, dZ ) ); l3dreMinor.setEnd3D( Location3DImpl.create( x3d + daMinor[k], dYMinorTick2, dZ ) ); dc.addLine( l3dreMinor ); } } else if ( bRenderAncillary3DAxis ) { Line3DRenderEvent l3dreMinor = null; for ( int k = 0; k < daMinor.length - 1; k++ ) { l3dreMinor = (Line3DRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), Line3DRenderEvent.class ); l3dreMinor.setLineAttributes( liaMinorTick ); l3dreMinor.setStart3D( Location3DImpl.create( dX, dYMinorTick1, z3d + daMinor[k] ) ); l3dreMinor.setEnd3D( Location3DImpl.create( dX, dYMinorTick2, z3d + daMinor[k] ) ); dc.addLine( l3dreMinor ); } } else { LineRenderEvent lreMinor = null; for ( int k = 0; k < daMinor.length - 1; k++ ) { lreMinor = (LineRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), LineRenderEvent.class ); lreMinor.setLineAttributes( liaMinorTick ); lreMinor.setStart( LocationImpl.create( x + daMinor[k], dYMinorTick1 ) ); lreMinor.setEnd( LocationImpl.create( x + daMinor[k], dYMinorTick2 ) ); ipr.drawLine( lreMinor ); } } } } if ( dYTick1 != dYTick2 ) { if ( bRenderBase3DAxis ) { l3dre.setLineAttributes( liaMajorTick ); l3dre.setStart3D( x3d, dYTick1, dZ ); l3dre.setEnd3D( x3d, dYTick2, dZ ); dc.addLine( l3dre ); } else if ( bRenderAncillary3DAxis ) { l3dre.setLineAttributes( liaMajorTick ); l3dre.setStart3D( dX, dYTick1, z3d ); l3dre.setEnd3D( dX, dYTick2, z3d ); dc.addLine( l3dre ); } else { lre.setLineAttributes( lia ); lre.getStart( ).set( x, dYTick1 ); lre.getEnd( ).set( x, dYTick2 ); ipr.drawLine( lre ); } if ( iv != null && iDimension == IConstants.TWO_5_D && iv.getType( ) == IntersectionValue.VALUE ) { lre.getStart( ).set( x, dY ); lre.getEnd( ).set( x + dSeriesThickness, dY - dSeriesThickness ); ipr.drawLine( lre ); } } } if ( bRenderAxisLabels ) // OPTIMIZED: ONLY PROCESS IF // AXES // LABELS ARE VISIBLE OR REQUESTED // FOR { if ( fs == null ) { df = new DecimalFormat( sc.getNumericPattern( dAxisValue ) ); } nde.setValue( dAxisValue ); try { sText = ValueFormatter.format( nde, ax.getFormatSpecifier( ), ax.getRunTimeContext( ).getLocale( ), df ); } catch ( ChartException dfex ) { logger.log( dfex ); sText = IConstants.NULL_STRING; } ScriptHandler.callFunction( sh, ScriptHandler.BEFORE_DRAW_AXIS_LABEL, axModel, la ); getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.BEFORE_DRAW_AXIS_LABEL, la ); if ( bRendering3D ) { if ( axisType == IConstants.BASE_AXIS ) { lo3d.set( x3d, y, dZEnd ); } else { lo3d.set( dXEnd, y, z3d ); } la.getCaption( ).setValue( sText ); t3dre.setLocation3D( lo3d ); t3dre.setAction( TextRenderEvent.RENDER_TEXT_AT_LOCATION ); dc.addLabel( t3dre ); } else { lo.set( x, y ); la.getCaption( ).setValue( sText ); tre.setAction( TextRenderEvent.RENDER_TEXT_AT_LOCATION ); ipr.drawText( tre ); } ScriptHandler.callFunction( sh, ScriptHandler.AFTER_DRAW_AXIS_LABEL, axModel, la ); getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.AFTER_DRAW_AXIS_LABEL, la ); } dAxisValue *= dAxisStep; } } else if ( ( sc.getType( ) & IConstants.DATE_TIME ) == IConstants.DATE_TIME ) { CDateTime cdt, cdtAxisValue = Methods.asDateTime( sc.getMinimum( ) ); final int iUnit = Methods.asInteger( sc.getUnit( ) ); final int iStep = Methods.asInteger( sc.getStep( ) ); SimpleDateFormat sdf = null; if ( fs == null ) { sdf = new SimpleDateFormat( CDateTime.getPreferredFormat( iUnit ) ); } cdt = cdtAxisValue; double y = ( iLabelLocation == IConstants.ABOVE ) ? dYTick1 - 1 : dYTick2 + 1; for ( int i = 0; i < da.length; i++ ) { x = (int) da[i]; if ( bRendering3D ) { x3d = (int) da3D[i]; z3d = (int) da3D[i]; } if ( ( iWhatToDraw & IConstants.AXIS ) == IConstants.AXIS ) { double dYMinorTick1 = ( ( iMinorTickStyle & IConstants.TICK_ABOVE ) == IConstants.TICK_ABOVE ) ? ( dY - IConstants.TICK_SIZE ) : dY, dYMinorTick2 = ( ( iMinorTickStyle & IConstants.TICK_BELOW ) == IConstants.TICK_BELOW ) ? dY + IConstants.TICK_SIZE : dY; if ( dYMinorTick1 != -dYMinorTick2 ) { // RENDER THE MINOR TICKS FIRST (For ALL but the // last Major tick) if ( i != da.length - 1 ) { if ( bRenderBase3DAxis ) { Line3DRenderEvent l3dreMinor = null; for ( int k = 0; k < daMinor.length - 1; k++ ) { l3dreMinor = (Line3DRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), Line3DRenderEvent.class ); l3dreMinor.setLineAttributes( liaMinorTick ); l3dreMinor.setStart3D( Location3DImpl.create( x3d + daMinor[k], dYMinorTick1, dZ ) ); l3dreMinor.setEnd3D( Location3DImpl.create( x3d + daMinor[k], dYMinorTick2, dZ ) ); dc.addLine( l3dreMinor ); } } else if ( bRenderAncillary3DAxis ) { Line3DRenderEvent l3dreMinor = null; for ( int k = 0; k < daMinor.length - 1; k++ ) { l3dreMinor = (Line3DRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), Line3DRenderEvent.class ); l3dreMinor.setLineAttributes( liaMinorTick ); l3dreMinor.setStart3D( Location3DImpl.create( dX, dYMinorTick1, z3d + daMinor[k] ) ); l3dreMinor.setEnd3D( Location3DImpl.create( dX, dYMinorTick2, z3d + daMinor[k] ) ); dc.addLine( l3dreMinor ); } } else { LineRenderEvent lreMinor = null; for ( int k = 0; k < daMinor.length - 1; k++ ) { lreMinor = (LineRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ), LineRenderEvent.class ); lreMinor.setLineAttributes( liaMinorTick ); lreMinor.setStart( LocationImpl.create( x + daMinor[k], dYMinorTick1 ) ); lreMinor.setEnd( LocationImpl.create( x + daMinor[k], dYMinorTick2 ) ); ipr.drawLine( lreMinor ); } } } } if ( dYTick1 != dYTick2 ) { if ( bRenderBase3DAxis ) { l3dre.setLineAttributes( liaMajorTick ); l3dre.setStart3D( x3d, dYTick1, dZ ); l3dre.setEnd3D( x3d, dYTick2, dZ ); dc.addLine( l3dre ); } else if ( bRenderAncillary3DAxis ) { l3dre.setLineAttributes( liaMajorTick ); l3dre.setStart3D( dX, dYTick1, z3d ); l3dre.setEnd3D( dX, dYTick2, z3d ); dc.addLine( l3dre ); } else { lre.setLineAttributes( liaMajorTick ); lre.getStart( ).set( x, dYTick1 ); lre.getEnd( ).set( x, dYTick2 ); ipr.drawLine( lre ); } if ( iv != null && iDimension == IConstants.TWO_5_D && iv.getType( ) == IntersectionValue.VALUE ) { lre.getStart( ).set( x, dY ); lre.getEnd( ).set( x + dSeriesThickness, dY - dSeriesThickness ); ipr.drawLine( lre ); } } } if ( bRenderAxisLabels ) // OPTIMIZED: ONLY PROCESS IF // AXES // LABELS ARE VISIBLE OR REQUESTED // FOR { try { sText = ValueFormatter.format( cdt, ax.getFormatSpecifier( ), ax.getRunTimeContext( ).getLocale( ), sdf ); } catch ( ChartException dfex ) { logger.log( dfex ); sText = IConstants.NULL_STRING; } ScriptHandler.callFunction( sh, ScriptHandler.BEFORE_DRAW_AXIS_LABEL, axModel, la ); getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.BEFORE_DRAW_AXIS_LABEL, la ); if ( bRendering3D ) { if ( axisType == IConstants.BASE_AXIS ) { lo3d.set( x3d, y, dZEnd ); } else { lo3d.set( dXEnd, y, z3d ); } la.getCaption( ).setValue( sText ); t3dre.setLocation3D( lo3d ); t3dre.setAction( TextRenderEvent.RENDER_TEXT_AT_LOCATION ); dc.addLabel( t3dre ); } else { lo.set( x, y ); la.getCaption( ).setValue( sText ); tre.setAction( TextRenderEvent.RENDER_TEXT_AT_LOCATION ); ipr.drawText( tre ); } ScriptHandler.callFunction( sh, ScriptHandler.AFTER_DRAW_AXIS_LABEL, axModel, la ); getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.AFTER_DRAW_AXIS_LABEL, la ); } cdt = cdtAxisValue.forward( iUnit, iStep * ( i + 1 ) ); // ALWAYS // W.R.T // START // VALUE } } // RENDER THE AXIS TITLE la = ax.getTitle( ); // TEMPORARILY USE FOR AXIS TITLE if ( la.isVisible( ) && bRenderAxisLabels ) { ScriptHandler.callFunction( sh, ScriptHandler.BEFORE_DRAW_AXIS_TITLE, axModel, la ); getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.BEFORE_DRAW_AXIS_TITLE, la ); final String sRestoreValue = la.getCaption( ).getValue( ); la.getCaption( ) .setValue( rtc.externalizedMessage( sRestoreValue ) ); // EXTERNALIZE BoundingBox bb = null; try { bb = Methods.computeBox( xs, ax.getTitlePosition( ), la, 0, 0 ); } catch ( IllegalArgumentException uiex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, uiex ); } if ( bRendering3D ) { Bounds cbo = getPlotBounds( ); if ( axisType == IConstants.BASE_AXIS ) { tre.setBlockBounds( BoundsImpl.create( cbo.getLeft( ) + ( cbo.getWidth( ) / 3d - bb.getWidth( ) ), cbo.getTop( ) + cbo.getHeight( ) - Math.min( bb.getHeight( ), bb.getWidth( ) ) - 30, bb.getWidth( ), bb.getHeight( ) ) ); } else { tre.setBlockBounds( BoundsImpl.create( cbo.getLeft( ) + cbo.getWidth( ) * 2 / 3d + ( cbo.getWidth( ) / 3d - bb.getWidth( ) ) / 2d, cbo.getTop( ) + cbo.getHeight( ) - Math.min( bb.getHeight( ), bb.getWidth( ) ) - 30 * 2, bb.getWidth( ), bb.getHeight( ) ) ); } tre.setLabel( la ); tre.setBlockAlignment( null ); tre.setAction( TextRenderEvent.RENDER_TEXT_IN_BLOCK ); ipr.drawText( tre ); } else { final Bounds bo = BoundsImpl.create( daEndPoints[0], ax.getTitleCoordinate( ), daEndPoints[1] - daEndPoints[0], bb.getHeight( ) ); tre.setBlockBounds( bo ); tre.setLabel( la ); tre.setBlockAlignment( null ); tre.setAction( TextRenderEvent.RENDER_TEXT_IN_BLOCK ); ipr.drawText( tre ); } la.getCaption( ).setValue( sRestoreValue ); // RESTORE ScriptHandler.callFunction( sh, ScriptHandler.AFTER_DRAW_AXIS_TITLE, axModel, la ); getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.AFTER_DRAW_AXIS_TITLE, la ); } la = ax.getLabel( ); // RESTORE BACK TO AXIS LABEL if ( iv != null && iv.getType( ) == IntersectionValue.MAX && iDimension == IConstants.TWO_5_D ) { trae.setTranslation( -dSeriesThickness, dSeriesThickness ); ipr.applyTransformation( trae ); } } }
46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/80924662e5927eac5b3e28e6cc9516f0ee88c721/AxesRenderer.java/clean/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/render/AxesRenderer.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 727, 918, 1743, 3442, 6558, 12, 467, 9840, 6747, 277, 683, 16, 15211, 886, 16, 1082, 202, 3335, 6558, 1740, 16, 509, 277, 23801, 774, 6493, 262, 1216, 14804, 503, 202, 95, 202...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 727, 918, 1743, 3442, 6558, 12, 467, 9840, 6747, 277, 683, 16, 15211, 886, 16, 1082, 202, 3335, 6558, 1740, 16, 509, 277, 23801, 774, 6493, 262, 1216, 14804, 503, 202, 95, 202...
System.err.println("!!! Destroyed OpenGL context " + hglrc);
System.err.println(getThreadName() + ": !!! Destroyed OpenGL context " + hglrc);
protected void destroyImpl() throws GLException { if (hglrc != 0) { if (!WGL.wglDeleteContext(hglrc)) { throw new GLException("Unable to delete OpenGL context"); } if (DEBUG) { System.err.println("!!! Destroyed OpenGL context " + hglrc); } hglrc = 0; } }
47282 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47282/7f0f3e8038d45b41796892d9ee7a59fb03fcbcb9/WindowsGLContext.java/clean/src/net/java/games/jogl/impl/windows/WindowsGLContext.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 4750, 918, 5546, 2828, 1435, 1216, 10252, 503, 288, 565, 309, 261, 76, 7043, 1310, 480, 374, 13, 288, 1377, 309, 16051, 59, 11261, 18, 91, 7043, 2613, 1042, 12, 76, 7043, 1310, 3719, 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, 282, 4750, 918, 5546, 2828, 1435, 1216, 10252, 503, 288, 565, 309, 261, 76, 7043, 1310, 480, 374, 13, 288, 1377, 309, 16051, 59, 11261, 18, 91, 7043, 2613, 1042, 12, 76, 7043, 1310, 3719, 28...
CorrelatorDaoImpl corr = new CorrelatorDaoImpl(correlator); _correlators.put(corr.getCorrelatorId(), corr); }
CorrelatorDaoImpl corr = new CorrelatorDaoImpl(correlator); _correlators.put(corr.getCorrelatorId(), corr); }
public void addCorrelator(String correlator) { CorrelatorDaoImpl corr = new CorrelatorDaoImpl(correlator); _correlators.put(corr.getCorrelatorId(), corr); }
47044 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47044/40604da2488c0e0e9de3a307e5a05bd456b9a02a/ProcessDaoImpl.java/clean/bpel-runtime/src/main/java/org/apache/ode/bpel/memdao/ProcessDaoImpl.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 527, 6217, 2878, 639, 12, 780, 1858, 2878, 639, 13, 288, 565, 9557, 2878, 639, 11412, 2828, 19480, 273, 394, 9557, 2878, 639, 11412, 2828, 12, 3850, 2878, 639, 1769, 565, 389, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 527, 6217, 2878, 639, 12, 780, 1858, 2878, 639, 13, 288, 565, 9557, 2878, 639, 11412, 2828, 19480, 273, 394, 9557, 2878, 639, 11412, 2828, 12, 3850, 2878, 639, 1769, 565, 389, ...
if(pos < end) { return namespaceUri[ newpos ]; } else {
if(pos >= end) {
public String getNamespaceURI(int pos) { if (!isElementEvent(eventType)) { throwIllegalState(new int[] { START_ELEMENT, END_ELEMENT }); } int currentDepth = depth; int end = getNamespaceCount(currentDepth); //eventType == XMLStreamConstants.END_ELEMENT ? elNamespaceCount[ depth + 1 ] : namespaceEnd; int newpos = pos + elNamespaceCount[currentDepth-1]; if(pos < end) { return namespaceUri[ newpos ]; } else { throw new ArrayIndexOutOfBoundsException( "position "+pos+" exceedded number of available namespaces "+end); } }
2047 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2047/12d883b0d45385ab71d167bd74d2c04d0ccd7c2f/MXParser.java/buggy/dev/src/com/bea/xml/stream/MXParser.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 514, 11153, 3098, 12, 474, 949, 13, 565, 288, 3639, 309, 16051, 291, 1046, 1133, 12, 2575, 559, 3719, 288, 5411, 604, 12195, 1119, 12, 2704, 509, 8526, 288, 10485, 67, 10976, 16, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 514, 11153, 3098, 12, 474, 949, 13, 565, 288, 3639, 309, 16051, 291, 1046, 1133, 12, 2575, 559, 3719, 288, 5411, 604, 12195, 1119, 12, 2704, 509, 8526, 288, 10485, 67, 10976, 16, ...
context.operands.push(new Float(1.0f));
if(!PAContext.IgnoreUnknownCommands) context.operands.push(new Double(1.0f));
protected HashMap constructSystemDict() { HashMap systemDict = new HashMap(); // newpath systemDict.put("newpath", new PACommand() { public void execute(PAContext context) throws PainterException { context.pencil.newpath(); } }); // moveto systemDict.put("moveto", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(2); context.pencil.moveto(data[0], data[1]); } }); // rmoveto systemDict.put("rmoveto", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(2); context.pencil.rmoveto(data[0], data[1]); } }); // lineto systemDict.put("lineto", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(2); context.pencil.lineto(data[0], data[1]); } }); // rlineto systemDict.put("rlineto", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(2); context.pencil.rlineto(data[0], data[1]); } }); // arc systemDict.put("arc", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(5); context.pencil.arc(data[0], data[1], data[2], data[3], data[4]); } }); // arcn systemDict.put("arcn", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(5); context.pencil.arcn(data[0], data[1], data[2], data[3], data[4]); } }); // curveto systemDict.put("curveto", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(6); context.pencil.curveto(data[0], data[1], data[2], data[3], data[4], data[5]); } }); // rcurveto systemDict.put("rcurveto", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(6); context.pencil.rcurveto(data[0], data[1], data[2], data[3], data[4], data[5]); } }); // closepath systemDict.put("closepath", new PACommand() { public void execute(PAContext context) throws PainterException { context.pencil.closepath(); } }); // gsave systemDict.put("gsave", new PACommand() { public void execute(PAContext context) throws PainterException { context.pencil.gsave(); } }); // grestore systemDict.put("grestore", new PACommand() { public void execute(PAContext context) throws PainterException { context.pencil.grestore(); } }); // translate systemDict.put("translate", new PACommand() { public void execute(PAContext context) throws PainterException { if (context.peekOperand() instanceof Number) { double data[]; AffineTransform at = new AffineTransform(); AffineTransform ctm = context.pencil.graphics.getTransform(); data = context.popNumberOperands(2); at.translate(data[0], data[1]); ctm.concatenate(at); context.pencil.graphics.setTransform(ctm); } else { Object data[]; data = context.popOperands(3); if (! (data[0] instanceof Number)) { throw new PainterException("wrong arguments"); } if (! (data[1] instanceof Number)) { throw new PainterException("wrong arguments"); } if (! (data[2] instanceof ArrayList)) { throw new PainterException("wrong arguments"); } ArrayList array = (ArrayList) data[2]; if (! (array.size() == 6)) { throw new PainterException("wrong arguments"); } AffineTransform at = new AffineTransform(); at.translate( ( (Number) data[0]).doubleValue(), ( (Number) data[1]).doubleValue()); double[] entries = new double[6]; at.getMatrix(entries); for (int i = 0; i < 6; i++) { array.set(i, new Double(entries[i])); } context.operands.push(array); } } }); // rotate systemDict.put("rotate", new PACommand() { public void execute(PAContext context) throws PainterException { if (context.peekOperand() instanceof Number) { double data[]; AffineTransform at = new AffineTransform(); AffineTransform ctm = context.pencil.graphics.getTransform(); data = context.popNumberOperands(1); at.rotate(data[0] * Math.PI / 180.0d); ctm.concatenate(at); context.pencil.graphics.setTransform(ctm); } else { Object data[]; AffineTransform at = new AffineTransform(); data = context.popOperands(2); if (! (data[0] instanceof Number)) { throw new PainterException("wrong arguments"); } if (! (data[1] instanceof ArrayList)) { throw new PainterException("wrong arguments"); } ArrayList array = (ArrayList) data[1]; if (! (array.size() == 6)) { throw new PainterException("wrong arguments"); } at.rotate( ( (Number) data[0]).doubleValue()); double[] entries = new double[6]; at.getMatrix(entries); for (int i = 0; i < 6; i++) { array.set(i, new Double(entries[i])); } context.operands.push(array); } } }); // scale systemDict.put("scale", new PACommand() { public void execute(PAContext context) throws PainterException { if (context.peekOperand() instanceof Number) { double data[]; AffineTransform at = new AffineTransform(); AffineTransform ctm = context.pencil.graphics.getTransform(); data = context.popNumberOperands(2); at.scale(data[0], data[1]); ctm.concatenate(at); context.pencil.graphics.setTransform(ctm); } else { Object data[]; data = context.popOperands(3); if (! (data[0] instanceof Number)) { throw new PainterException("wrong arguments"); } if (! (data[1] instanceof Number)) { throw new PainterException("wrong arguments"); } if (! (data[2] instanceof ArrayList)) { throw new PainterException("wrong arguments"); } ArrayList array = (ArrayList) data[2]; double[] entries = new double[6]; if (! (array.size() == 6)) { throw new PainterException("wrong arguments"); } entries[0] = ( (Number) data[0]).doubleValue(); entries[1] = 0.0d; entries[2] = 0.0d; entries[3] = ( (Number) data[1]).doubleValue(); entries[4] = 0.0d; entries[5] = 0.0d; for (int i = 0; i < 6; i++) { array.set(i, new Double(entries[i])); } context.operands.push(array); } } }); // stroke systemDict.put("stroke", new PACommand() { public void execute(PAContext context) throws PainterException { context.pencil.stroke(); } }); // fill systemDict.put("fill", new PACommand() { public void execute(PAContext context) throws PainterException { context.pencil.fill(); } }); // eofill systemDict.put("eofill", new PACommand() { public void execute(PAContext context) throws PainterException { context.pencil.eofill(); } }); // show systemDict.put("show", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; data = context.popOperands(1); if (! (data[0] instanceof String)) { throw new PainterException("wrong arguments"); } context.pencil.show( (String) data[0]); } }); // stringwidth systemDict.put("stringwidth", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; float[] result; Font font; data = context.popOperands(1); if (! (data[0] instanceof String)) { throw new PainterException("wrong arguments"); } font = context.pencil.graphics.getFont(); Rectangle2D rect = font.getStringBounds( (String) data[0], context.pencil.graphics. getFontRenderContext()); context.operands.push(new Float(rect.getWidth())); context.operands.push(new Float(rect.getHeight())); } }); // showpage systemDict.put("showpage", new PACommand() { public void execute(PAContext context) throws PainterException { context.pencil.showpage(); } }); // findfont systemDict.put("findfont", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; PAToken patoken; data = context.popOperands(1); if (! (data[0] instanceof PAToken)) { throw new PainterException("wrong arguments"); } patoken = (PAToken) data[0]; if (! (patoken.type == PAToken.KEY)) { throw new PainterException("wrong arguments"); } context.operands.push(context.pencil.findFont( (String) patoken.value)); } }); // scalefont systemDict.put("scalefont", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; data = context.popOperands(2); if (! (data[0] instanceof Font)) { throw new PainterException("wrong arguments"); } if (! (data[1] instanceof Number)) { throw new PainterException("wrong arguments"); } context.operands.push( ( (Font) data[0]).deriveFont( ( (Number) data[1]). floatValue())); } }); // setfont systemDict.put("setfont", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; data = context.popOperands(1); if (! (data[0] instanceof Font)) { throw new PainterException("wrong arguments"); } context.pencil.graphics.setFont( (Font) data[0]); } }); // def systemDict.put("def", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; PAToken patoken; data = context.popOperands(2); if (! (data[0] instanceof PAToken)) { throw new PainterException("wrong arguments"); } patoken = (PAToken) data[0]; if (! (patoken.type == PAToken.KEY)) { throw new PainterException("wrong arguments"); } try { ( (HashMap) context.dictionaries.peek()).put(patoken.value, data[1]); } catch (EmptyStackException e) { throw new PainterException(e.toString()); } } }); // bind systemDict.put("bind", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; PAToken patoken; data = context.popOperands(1); if (! (data[0] instanceof PAToken)) { throw new PainterException("wrong arguments"); } patoken = (PAToken) data[0]; if (! (patoken.type == PAToken.PROCEDURE)) { throw new PainterException("wrong arguments"); } context.engine.bindProcedure(patoken); context.operands.push(patoken); } }); // mul systemDict.put("mul", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(2); context.operands.push(new Double(data[0] * data[1])); } }); // div systemDict.put("div", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(2); context.operands.push(new Double(data[0] / data[1])); } }); // mod systemDict.put("mod", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(2); int a, b, m; a = (int) data[0]; b = (int) data[1]; m = a % b; context.operands.push(new Integer(m)); } }); // add systemDict.put("add", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(2); context.operands.push(new Double(data[0] + data[1])); } }); // neg systemDict.put("neg", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(1); context.operands.push(new Double( -data[0])); } }); // sub systemDict.put("sub", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(2); context.operands.push(new Double(data[0] - data[1])); } }); // atan systemDict.put("atan", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(2); context.operands.push(new Double(Math.atan2(data[0], data[1]))); } }); // sin systemDict.put("sin", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(1); context.operands.push(new Double(Math.sin(data[0] * Math.PI / 180.0))); } }); // cos systemDict.put("cos", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(1); context.operands.push(new Double(Math.cos(data[0] * Math.PI / 180.0))); } }); // sqrt systemDict.put("sqrt", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(1); context.operands.push(new Double(Math.sqrt(data[0]))); } }); // exch systemDict.put("exch", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; data = context.popOperands(2); context.operands.push(data[1]); context.operands.push(data[0]); } }); // dup systemDict.put("dup", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; data = context.popOperands(1); context.operands.push(data[0]); context.operands.push(data[0]); } }); // roll systemDict.put("roll", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; Object rollData[]; data = context.popOperands(2); if (! (data[0] instanceof Number)) { throw new PainterException("wrong arguments"); } if (! (data[1] instanceof Number)) { throw new PainterException("wrong arguments"); } int numberOfElements, numberOfPositions, i; numberOfElements = ( (Number) data[0]).intValue(); numberOfPositions = ( (Number) data[1]).intValue(); if (numberOfPositions == 0 || numberOfElements <= 0) { return; } rollData = context.popOperands(numberOfElements); if (numberOfPositions < 0) { numberOfPositions = -numberOfPositions; numberOfPositions = numberOfPositions % numberOfElements; // downward roll for (i = numberOfPositions; i < numberOfElements; i++) { context.operands.push(rollData[i]); } for (i = 0; i < numberOfPositions; i++) { context.operands.push(rollData[i]); } } else { numberOfPositions = numberOfPositions % numberOfElements; // upward roll for (i = numberOfElements - numberOfPositions; i < numberOfElements; i++) { context.operands.push(rollData[i]); } for (i = 0; i < numberOfElements - numberOfPositions; i++) { context.operands.push(rollData[i]); } } } }); // pop systemDict.put("pop", new PACommand() { public void execute(PAContext context) throws PainterException { context.popOperands(1); } }); // index systemDict.put("index", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; data = context.popOperands(1); if (! (data[0] instanceof Number)) { throw new PainterException("wrong arguments"); } int index = ( (Number) data[0]).intValue(); try { context.operands.push(context.operands.elementAt(index)); } catch (ArrayIndexOutOfBoundsException e) { throw new PainterException(e.toString()); } } }); // mark systemDict.put("mark", new PACommand() { public void execute(PAContext context) throws PainterException { context.operands.push(new PAToken(null, PAToken.MARK)); } }); // cleartomark systemDict.put("cleartomark", new PACommand() { public void execute(PAContext context) throws PainterException { Object data; boolean finished = false; while (!finished) { try { data = context.operands.pop(); if (data instanceof PAToken) { if ( ( (PAToken) data).type == PAToken.MARK) { finished = true; } } } catch (EmptyStackException e) { throw new PainterException(e.toString()); } } } }); // copy systemDict.put("copy", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; data = context.popOperands(2); // decide if it's a simple copy or a composite object copy if ( (data[0] instanceof PAToken) && (data[1] instanceof PAToken)) { // composite object copy if ( ( (PAToken) data[0]).type == ( (PAToken) data[1]).type) { // our tokens are immutable so a copy is easy context.operands.push(data[0]); context.operands.push(data[0]); } else { throw new PainterException( "copy operation failed because composite objects on stack are not of same type"); } } else { // restore first arg, we're not interested in it in this simple case context.operands.push(data[0]); if (data[1] instanceof Number) { int index = ( (Number) data[1]).intValue(); int i, n; n = context.operands.size(); Object[] copyData = new Object[index]; for (i = n - index; i < n; i++) { try { copyData[i - n + index] = context.operands.elementAt(i); } catch (ArrayIndexOutOfBoundsException e) { throw new PainterException(e.toString()); } } for (i = 0; i < index; i++) { context.operands.push(copyData[i]); } } else { throw new PainterException("I expect a number on stack, dude"); } } } }); // setgray systemDict.put("setgray", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(1); context.pencil.graphics.setPaint(new Color( (float) data[0], (float) data[0], (float) data[0])); } }); // setrgbcolor systemDict.put("setrgbcolor", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(3); float[] fv = new float[3]; fv[0] = (float) Math.max(Math.min(data[0], 1.0d), 0.0d); fv[1] = (float) Math.max(Math.min(data[1], 1.0d), 0.0d); fv[2] = (float) Math.max(Math.min(data[2], 1.0d), 0.0d); context.pencil.graphics.setPaint(new Color(fv[0], fv[1], fv[2])); } }); // PENDING(uweh): color stuff still shaky // sethsbcolor systemDict.put("sethsbcolor", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(3); float[] fv = new float[3]; fv[0] = (float) Math.max(Math.min(data[0], 1.0d), 0.0d); fv[1] = (float) Math.max(Math.min(data[1], 1.0d), 0.0d); fv[2] = (float) Math.max(Math.min(data[2], 1.0d), 0.0d); context.pencil.graphics.setPaint(new Color(fv[0], fv[1], fv[2])); } }); // PENDING(uweh): I have to convert these puppies myself to rgb ? // setcmykcolor systemDict.put("setcmykcolor", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; int rd, gr, bl; data = context.popNumberOperands(4); float[] fv = new float[4]; fv[0] = (float) data[0]; fv[1] = (float) data[1]; fv[2] = (float) data[2]; fv[3] = (float) data[3]; rd = (int) (255 * Math.max(0, 1 - fv[0] - fv[3])); gr = (int) (255 * Math.max(0, 1 - fv[1] - fv[3])); bl = (int) (255 * Math.max(0, 1 - fv[2] - fv[3])); context.pencil.graphics.setPaint(new Color(rd, gr, bl)); } }); // setlinewidth systemDict.put("setlinewidth", new PACommand() { private double minLineWidth(double w, AffineTransform at) { double matrix[] = new double[4]; at.getMatrix(matrix); double scale = matrix[0] * matrix[3] - matrix[1] * matrix[2]; double minlw = .25 / Math.sqrt(Math.abs(scale)); if (w < minlw) { w = minlw; } return w; } public void execute(PAContext context) throws PainterException { double data[]; BasicStroke newStroke; Stroke oldStroke = context.pencil.graphics.getStroke(); data = context.popNumberOperands(1); data[0] = this.minLineWidth(data[0], context.pencil.graphics.getTransform()); if (oldStroke instanceof BasicStroke) { newStroke = new BasicStroke( (float) data[0], ( (BasicStroke) oldStroke).getEndCap(), ( (BasicStroke) oldStroke).getLineJoin(), ( (BasicStroke) oldStroke).getMiterLimit(), ( (BasicStroke) oldStroke).getDashArray(), ( (BasicStroke) oldStroke).getDashPhase()); } else { newStroke = new BasicStroke( (float) data[0], BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND); } context.pencil.graphics.setStroke(newStroke); } }); // setlinecap systemDict.put("setlinecap", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; BasicStroke newStroke; Stroke oldStroke = context.pencil.graphics.getStroke(); data = context.popNumberOperands(1); if (oldStroke instanceof BasicStroke) { newStroke = new BasicStroke( ( (BasicStroke) oldStroke).getLineWidth(), (int) data[0], ( (BasicStroke) oldStroke).getLineJoin(), ( (BasicStroke) oldStroke).getMiterLimit(), ( (BasicStroke) oldStroke).getDashArray(), ( (BasicStroke) oldStroke).getDashPhase()); } else { newStroke = new BasicStroke(1.0f, (int) data[0], BasicStroke.JOIN_ROUND); } context.pencil.graphics.setStroke(newStroke); } }); // setmiterlimit systemDict.put("setmiterlimit", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; BasicStroke newStroke; Stroke oldStroke = context.pencil.graphics.getStroke(); data = context.popNumberOperands(1); if (oldStroke instanceof BasicStroke) { newStroke = new BasicStroke( ( (BasicStroke) oldStroke).getLineWidth(), ( (BasicStroke) oldStroke).getEndCap(), ( (BasicStroke) oldStroke).getLineJoin(), (float) data[0], ( (BasicStroke) oldStroke).getDashArray(), ( (BasicStroke) oldStroke).getDashPhase()); } else { newStroke = new BasicStroke(1.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND, (float) data[0]); } context.pencil.graphics.setStroke(newStroke); } }); // setdash systemDict.put("setdash", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; BasicStroke newStroke; Stroke oldStroke = context.pencil.graphics.getStroke(); data = context.popOperands(2); if (! (data[0] instanceof ArrayList)) { throw new PainterException("wrong arguments"); } if (! (data[1] instanceof Number)) { throw new PainterException("wrong arguments"); } ArrayList list = (ArrayList) data[0]; if (list.size() == 0) { return; } float[] dashpattern = new float[list.size()]; for (int i = 0; i < dashpattern.length; i++) { dashpattern[i] = ( (Number) list.get(i)).floatValue(); } float dashoffset = ( (Number) data[1]).floatValue(); if (oldStroke instanceof BasicStroke) { newStroke = new BasicStroke( ( (BasicStroke) oldStroke).getLineWidth(), ( (BasicStroke) oldStroke).getEndCap(), ( (BasicStroke) oldStroke).getLineJoin(), ( (BasicStroke) oldStroke).getMiterLimit(), dashpattern, dashoffset); } else { newStroke = new BasicStroke(1.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND, 1.0f, dashpattern, dashoffset); } context.pencil.graphics.setStroke(newStroke); } }); // setlinejoin systemDict.put("setlinejoin", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; BasicStroke newStroke; Stroke oldStroke = context.pencil.graphics.getStroke(); data = context.popNumberOperands(1); if (oldStroke instanceof BasicStroke) { newStroke = new BasicStroke( ( (BasicStroke) oldStroke).getLineWidth(), ( (BasicStroke) oldStroke).getEndCap(), (int) data[0], ( (BasicStroke) oldStroke).getMiterLimit(), ( (BasicStroke) oldStroke).getDashArray(), ( (BasicStroke) oldStroke).getDashPhase()); } else { newStroke = new BasicStroke(1.0f, BasicStroke.CAP_ROUND, (int) data[0]); } context.pencil.graphics.setStroke(newStroke); } }); // dumpstack systemDict.put("dumpstack", new PACommand() { public void execute(PAContext context) throws PainterException { Enumeration enumx = context.operands.elements(); System.out.println("-------------Stack--------------"); while (enumx.hasMoreElements()) { System.out.println(enumx.nextElement()); } System.out.println("--------------------------------"); } }); // for systemDict.put("for", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; PAToken patoken; data = context.popOperands(4); if (! (data[3] instanceof PAToken)) { throw new PainterException("wrong arguments"); } if (! (data[0] instanceof Number)) { throw new PainterException("wrong arguments"); } if (! (data[1] instanceof Number)) { throw new PainterException("wrong arguments"); } if (! (data[2] instanceof Number)) { throw new PainterException("wrong arguments"); } patoken = (PAToken) data[3]; if (! (patoken.type == PAToken.PROCEDURE)) { throw new PainterException("wrong arguments"); } int i0, i1, i2; i0 = ( (Number) data[0]).intValue(); i1 = ( (Number) data[1]).intValue(); i2 = ( (Number) data[2]).intValue(); if (i1 > 0) { for (int i = i0; i <= i2; i += i1) { context.operands.push(new Integer(i)); context.engine.process(patoken); } } else { for (int i = i0; i >= i2; i -= i1) { context.operands.push(new Integer(i)); context.engine.process(patoken); } } } }); // repeat systemDict.put("repeat", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; PAToken patoken; data = context.popOperands(2); if (! (data[1] instanceof PAToken)) { throw new PainterException("wrong arguments"); } if (! (data[0] instanceof Number)) { throw new PainterException("wrong arguments"); } patoken = (PAToken) data[1]; if (! (patoken.type == PAToken.PROCEDURE)) { throw new PainterException("wrong arguments"); } int n = ( (Number) data[0]).intValue(); for (int i = 0; i < n; i++) { context.engine.process(patoken); } } }); // true systemDict.put("true", new PACommand() { public void execute(PAContext context) throws PainterException { context.operands.push(new Boolean(true)); } }); // false systemDict.put("false", new PACommand() { public void execute(PAContext context) throws PainterException { context.operands.push(new Boolean(false)); } }); // lt systemDict.put("lt", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; data = context.popOperands(2); if (! (data[0] instanceof Number) && ! (data[0] instanceof String)) { throw new PainterException("wrong arguments"); } if (data[0] instanceof Number) { if (! (data[1] instanceof Number)) { throw new PainterException("wrong arguments"); } double d0, d1; d0 = ( (Number) data[0]).doubleValue(); d1 = ( (Number) data[1]).doubleValue(); if (d0 < d1) { context.operands.push(new Boolean(true)); } else { context.operands.push(new Boolean(false)); } } else { if (! (data[1] instanceof String)) { throw new PainterException("wrong arguments"); } String s0, s1; s0 = (String) data[0]; s1 = (String) data[1]; if (s0.compareTo(s1) < 0) { context.operands.push(new Boolean(true)); } else { context.operands.push(new Boolean(false)); } } } }); // gt systemDict.put("gt", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; data = context.popOperands(2); if (! (data[0] instanceof Number) && ! (data[0] instanceof String)) { throw new PainterException("wrong arguments"); } if (data[0] instanceof Number) { if (! (data[1] instanceof Number)) { throw new PainterException("wrong arguments"); } double d0, d1; d0 = ( (Number) data[0]).doubleValue(); d1 = ( (Number) data[1]).doubleValue(); if (d0 > d1) { context.operands.push(new Boolean(true)); } else { context.operands.push(new Boolean(false)); } } else { if (! (data[1] instanceof String)) { throw new PainterException("wrong arguments"); } String s0, s1; s0 = (String) data[0]; s1 = (String) data[1]; if (s0.compareTo(s1) > 0) { context.operands.push(new Boolean(true)); } else { context.operands.push(new Boolean(false)); } } } }); // ne systemDict.put("ne", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; data = context.popOperands(2); if (! (data[0] instanceof Number) && ! (data[0] instanceof String)) { throw new PainterException("wrong arguments"); } if (data[0] instanceof Number) { if (! (data[1] instanceof Number)) { throw new PainterException("wrong arguments"); } double d0, d1; d0 = ( (Number) data[0]).doubleValue(); d1 = ( (Number) data[1]).doubleValue(); if (d0 != d1) { context.operands.push(new Boolean(true)); } else { context.operands.push(new Boolean(false)); } } else { if (! (data[1] instanceof String)) { throw new PainterException("wrong arguments"); } String s0, s1; s0 = (String) data[0]; s1 = (String) data[1]; if (s0.equals(s1)) { context.operands.push(new Boolean(false)); } else { context.operands.push(new Boolean(true)); } } } }); // eq systemDict.put("eq", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; data = context.popOperands(2); if (! (data[0] instanceof Number) && ! (data[0] instanceof String)) { throw new PainterException("wrong arguments"); } if (data[0] instanceof Number) { if (! (data[1] instanceof Number)) { throw new PainterException("wrong arguments"); } double d0, d1; d0 = ( (Number) data[0]).doubleValue(); d1 = ( (Number) data[1]).doubleValue(); if (d0 == d1) { context.operands.push(new Boolean(true)); } else { context.operands.push(new Boolean(false)); } } else { if (! (data[1] instanceof String)) { throw new PainterException("wrong arguments"); } String s0, s1; s0 = (String) data[0]; s1 = (String) data[1]; if (s0.compareTo(s1) == 0) { context.operands.push(new Boolean(true)); } else { context.operands.push(new Boolean(false)); } } } }); // if systemDict.put("if", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; PAToken patoken; data = context.popOperands(2); if (! (data[0] instanceof Boolean)) { throw new PainterException("wrong arguments"); } if (! (data[1] instanceof PAToken)) { throw new PainterException("wrong arguments"); } patoken = (PAToken) data[1]; if (! (patoken.type == PAToken.PROCEDURE)) { throw new PainterException("wrong arguments"); } if ( ( (Boolean) data[0]).booleanValue()) { context.engine.process(patoken); } } }); // ifelse systemDict.put("ifelse", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; PAToken patoken1, patoken2; data = context.popOperands(3); if (! (data[0] instanceof Boolean)) { throw new PainterException("wrong arguments"); } if (! (data[1] instanceof PAToken)) { throw new PainterException("wrong arguments"); } if (! (data[2] instanceof PAToken)) { throw new PainterException("wrong arguments"); } patoken1 = (PAToken) data[1]; patoken2 = (PAToken) data[2]; if (! (patoken1.type == PAToken.PROCEDURE)) { throw new PainterException("wrong arguments"); } if (! (patoken2.type == PAToken.PROCEDURE)) { throw new PainterException("wrong arguments"); } if ( ( (Boolean) data[0]).booleanValue()) { context.engine.process(patoken1); } else { context.engine.process(patoken2); } } }); // dict systemDict.put("dict", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(1); context.operands.push(new HashMap()); } }); // userdict systemDict.put("userdict", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(1); context.operands.push(new HashMap()); } }); // put systemDict.put("put", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; PAToken patoken; data = context.popOperands(3); if (! (data[0] instanceof HashMap)) { throw new PainterException("wrong arguments"); } if (! (data[1] instanceof PAToken)) { throw new PainterException("wrong arguments"); } patoken = (PAToken) data[1]; if (! (patoken.type == PAToken.KEY)) { throw new PainterException("wrong arguments"); } ( (HashMap) data[0]).put(patoken.value, data[2]); } }); // get systemDict.put("get", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; PAToken patoken; data = context.popOperands(2); if (! (data[0] instanceof HashMap) && ! (data[0] instanceof ArrayList)) { throw new PainterException("wrong arguments"); } if (data[0] instanceof HashMap) { if (! (data[1] instanceof PAToken)) { throw new PainterException("wrong arguments"); } patoken = (PAToken) data[1]; if (! (patoken.type == PAToken.KEY)) { throw new PainterException("wrong arguments"); } context.operands.push( ( (HashMap) data[0]).get(patoken.value)); } else if (data[0] instanceof ArrayList) { if (! (data[1] instanceof Number)) { throw new PainterException("wrong arguments"); } context.operands.push( ( (ArrayList) data[0]).get( ( (Number) data[1]). intValue())); } } }); // load systemDict.put("load", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; PAToken patoken; data = context.popOperands(1); if (! (data[0] instanceof PAToken)) { throw new PainterException("wrong arguments"); } patoken = (PAToken) data[0]; if (! (patoken.type == PAToken.KEY)) { throw new PainterException("wrong arguments"); } context.operands.push(context.findIdentifier(patoken.value)); } }); // length systemDict.put("length", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; PAToken patoken; int size = 0; data = context.popOperands(1); if (data[0] instanceof PAToken) { patoken = (PAToken) data[0]; if (! (patoken.type == PAToken.KEY)) { throw new PainterException("wrong arguments"); } size = ( (String) patoken.value).length(); } else if (data[0] instanceof HashMap) { size = ( (HashMap) data[0]).size(); } else if (data[0] instanceof ArrayList) { size = ( (ArrayList) data[0]).size(); } else if (data[0] instanceof String) { size = ( (String) data[0]).length(); } else { throw new PainterException("wrong arguments"); } context.operands.push(new Integer(size)); } }); // begin systemDict.put("begin", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; data = context.popOperands(1); if (! (data[0] instanceof HashMap)) { throw new PainterException("wrong arguments"); } context.dictionaries.push(data[0]); } }); // end systemDict.put("end", new PACommand() { public void execute(PAContext context) throws PainterException { try { context.dictionaries.pop(); } catch (EmptyStackException e) { throw new PainterException("Dictionary stack is empty"); } } }); // undef systemDict.put("undef", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; PAToken patoken; data = context.popOperands(2); if (! (data[0] instanceof HashMap)) { throw new PainterException("wrong arguments"); } if (! (data[1] instanceof PAToken)) { throw new PainterException("wrong arguments"); } patoken = (PAToken) data[1]; if (! (patoken.type == PAToken.KEY)) { throw new PainterException("wrong arguments"); } // we don't do an actual undef because we don't care } }); // known systemDict.put("known", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[], foundObject; PAToken patoken; data = context.popOperands(1); if (! (data[0] instanceof PAToken)) { throw new PainterException("wrong arguments"); } patoken = (PAToken) data[0]; if (! (patoken.type == PAToken.KEY)) { throw new PainterException("wrong arguments"); } foundObject = context.findIdentifier(patoken.value); if (foundObject != null) { context.operands.push(new Boolean(true)); } else { context.operands.push(new Boolean(false)); } } }); // where systemDict.put("where", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[], foundObject; PAToken patoken; data = context.popOperands(1); if (! (data[0] instanceof PAToken)) { throw new PainterException("wrong arguments"); } patoken = (PAToken) data[0]; if (! (patoken.type == PAToken.KEY)) { throw new PainterException("wrong arguments"); } foundObject = context.findDictionary(patoken.value); if (foundObject != null) { context.operands.push(foundObject); context.operands.push(new Boolean(true)); } else { context.operands.push(new Boolean(false)); } } }); // aload systemDict.put("aload", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; ArrayList list; data = context.popOperands(1); if (! (data[0] instanceof ArrayList)) { throw new PainterException("wrong arguments"); } list = (ArrayList) data[0]; Iterator iterator = list.iterator(); while (iterator.hasNext()) { context.operands.push(iterator.next()); } context.operands.push(data[0]); } }); // forall systemDict.put("forall", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; ArrayList list; PAToken patoken; data = context.popOperands(2); if (! (data[0] instanceof ArrayList)) { throw new PainterException("wrong arguments"); } if (! (data[1] instanceof PAToken)) { throw new PainterException("wrong arguments"); } patoken = (PAToken) data[1]; if (! (patoken.type == PAToken.PROCEDURE)) { throw new PainterException("wrong arguments"); } list = (ArrayList) data[0]; Iterator iterator = list.iterator(); while (iterator.hasNext()) { context.operands.push(iterator.next()); context.engine.process(patoken); } } }); // currentflat PENDING(uweh):placeholder for now systemDict.put("currentflat", new PACommand() { public void execute(PAContext context) throws PainterException { context.operands.push(new Float(1.0f)); } }); // setflat PENDING(uweh):placeholder for now systemDict.put("setflat", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(1); } }); // round systemDict.put("round", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(1); context.operands.push(new Long(Math.round(data[0]))); } }); // abs systemDict.put("abs", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(1); context.operands.push(new Double(Math.abs(data[0]))); } }); // transform systemDict.put("transform", new PACommand() { public void execute(PAContext context) throws PainterException { if (context.peekOperand() instanceof Number) { double data[]; double[] transformedData = new double[2]; data = context.popNumberOperands(2); AffineTransform at = context.pencil.graphics.getTransform(); at.transform(data, 0, transformedData, 0, 1); context.operands.push(new Double(transformedData[0])); context.operands.push(new Double(transformedData[1])); } else { Object data[]; data = context.popOperands(3); if (! (data[0] instanceof Number)) { throw new PainterException("wrong arguments"); } if (! (data[1] instanceof Number)) { throw new PainterException("wrong arguments"); } if (! (data[2] instanceof ArrayList)) { throw new PainterException("wrong arguments"); } ArrayList array = (ArrayList) data[2]; double[] entries = new double[6]; if (! (array.size() == 6)) { throw new PainterException("wrong arguments"); } for (int i = 0; i < 6; i++) { entries[i] = ( (Number) array.get(i)).doubleValue(); } AffineTransform at = new AffineTransform(entries); double numberdata[] = new double[2]; numberdata[0] = ( (Number) data[0]).doubleValue(); numberdata[1] = ( (Number) data[0]).doubleValue(); double[] transformedData = new double[2]; at.transform(numberdata, 0, transformedData, 0, 1); context.operands.push(new Double(transformedData[0])); context.operands.push(new Double(transformedData[1])); } } }); // itransform systemDict.put("itransform", new PACommand() { public void execute(PAContext context) throws PainterException { if (context.peekOperand() instanceof Number) { double data[]; double[] transformedData = new double[2]; data = context.popNumberOperands(2); AffineTransform at = context.pencil.graphics.getTransform(); try { at.inverseTransform(data, 0, transformedData, 0, 1); } catch (NoninvertibleTransformException e) { throw new PainterException(e.toString()); } context.operands.push(new Double(transformedData[0])); context.operands.push(new Double(transformedData[1])); } else { Object data[]; data = context.popOperands(3); if (! (data[0] instanceof Number)) { throw new PainterException("wrong arguments"); } if (! (data[1] instanceof Number)) { throw new PainterException("wrong arguments"); } if (! (data[2] instanceof ArrayList)) { throw new PainterException("wrong arguments"); } ArrayList array = (ArrayList) data[2]; double[] entries = new double[6]; if (! (array.size() == 6)) { throw new PainterException("wrong arguments"); } for (int i = 0; i < 6; i++) { entries[i] = ( (Number) array.get(i)).doubleValue(); } AffineTransform at = new AffineTransform(entries); double numberdata[] = new double[2]; numberdata[0] = ( (Number) data[0]).doubleValue(); numberdata[1] = ( (Number) data[0]).doubleValue(); double[] transformedData = new double[2]; try { at.inverseTransform(numberdata, 0, transformedData, 0, 1); } catch (NoninvertibleTransformException e) { throw new PainterException(e.toString()); } context.operands.push(new Double(transformedData[0])); context.operands.push(new Double(transformedData[1])); } } }); // currentpoint // PENDING(uweh): what about CTM, same thing when you construct path // this is different than ps, might not work in a few instances systemDict.put("currentpoint", new PACommand() { public void execute(PAContext context) throws PainterException { Point2D currentPoint = context.pencil.state.path.getCurrentPoint(); context.operands.push(new Double(currentPoint.getX())); context.operands.push(new Double(currentPoint.getY())); } }); // clippath systemDict.put("clippath", new PACommand() { public void execute(PAContext context) throws PainterException { context.pencil.clippath(); } }); // matrix systemDict.put("matrix", new PACommand() { public void execute(PAContext context) throws PainterException { ArrayList identityMatrix = new ArrayList(6); identityMatrix.add(new Double(1.0d)); identityMatrix.add(new Double(0.0d)); identityMatrix.add(new Double(0.0d)); identityMatrix.add(new Double(1.0d)); identityMatrix.add(new Double(0.0d)); identityMatrix.add(new Double(0.0d)); context.operands.push(identityMatrix); } }); // concatmatrix systemDict.put("concatmatrix", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; data = context.popOperands(3); if (! (data[0] instanceof ArrayList)) { throw new PainterException("wrong arguments"); } if (! (data[1] instanceof ArrayList)) { throw new PainterException("wrong arguments"); } if (! (data[2] instanceof ArrayList)) { throw new PainterException("wrong arguments"); } ArrayList arrayOne, arrayTwo, arrayThree; AffineTransform atOne, atTwo; arrayOne = (ArrayList) data[0]; arrayTwo = (ArrayList) data[1]; arrayThree = (ArrayList) data[2]; double[] entries = new double[6]; if (! (arrayOne.size() == 6)) { throw new PainterException("wrong arguments"); } if (! (arrayTwo.size() == 6)) { throw new PainterException("wrong arguments"); } if (! (arrayThree.size() == 6)) { throw new PainterException("wrong arguments"); } for (int i = 0; i < 6; i++) { entries[i] = ( (Number) arrayOne.get(i)).doubleValue(); } atOne = new AffineTransform(entries); for (int i = 0; i < 6; i++) { entries[i] = ( (Number) arrayTwo.get(i)).doubleValue(); } atTwo = new AffineTransform(entries); atOne.concatenate(atTwo); atOne.getMatrix(entries); for (int i = 0; i < 6; i++) { arrayThree.set(i, new Double(entries[i])); } context.operands.push(arrayThree); } }); // pathbbox systemDict.put("pathbbox", new PACommand() { public void execute(PAContext context) throws PainterException { Rectangle2D pathBounds = context.pencil.state.path.getBounds2D(); context.operands.push(new Double(pathBounds.getMinX())); context.operands.push(new Double(pathBounds.getMinY())); context.operands.push(new Double(pathBounds.getMaxX())); context.operands.push(new Double(pathBounds.getMaxY())); } }); // truncate systemDict.put("truncate", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; double truncated; data = context.popNumberOperands(1); if (data[0] < 0) { truncated = Math.ceil(data[0]); } else { truncated = Math.floor(data[0]); } context.operands.push(new Double(truncated)); } }); // rand systemDict.put("rand", new PACommand() { public void execute(PAContext context) throws PainterException { context.operands.push(new Integer(randomNumberGenerator.nextInt(231))); } }); // srand systemDict.put("srand", new PACommand() { public void execute(PAContext context) throws PainterException { double data[]; data = context.popNumberOperands(1); randomNumberGenerator = new Random(Math.round(data[0])); } }); // cvi systemDict.put("cvi", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; data = context.popOperands(1); if (! (data[0] instanceof Number) && ! (data[0] instanceof String)) { throw new PainterException("wrong arguments"); } if (data[0] instanceof Number) { int d; d = ( (Number) data[0]).intValue(); context.operands.push(new Integer(d)); } else { String s; s = (String) data[0]; context.operands.push(new Integer(s)); } } }); // usertime systemDict.put("usertime", new PACommand() { public void execute(PAContext context) throws PainterException { context.operands.push(new Long(System.currentTimeMillis())); } });// save systemDict.put("save", new PACommand() { public void execute(PAContext context) throws PainterException { // context.operands.push(new Long(System.currentTimeMillis())); } });// restore systemDict.put("restore", new PACommand() { public void execute(PAContext context) throws PainterException { // Object data[]; // data = context.popOperands(1); } });// clear systemDict.put("clear", new PACommand() { public void execute(PAContext context) throws PainterException { // Object data[]; // data = context.popOperands(1); } });// cleardictstack systemDict.put("cleardictstack", new PACommand() { public void execute(PAContext context) throws PainterException { // Object data[]; // data = context.popOperands(1); } }); // charpath systemDict.put("charpath", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; data = context.popOperands(2); if (! (data[0] instanceof String)) { throw new PainterException("wrong arguments"); } if (! (data[1] instanceof Boolean)) { throw new PainterException("wrong arguments"); } context.pencil.charpath( (String) data[0], ( (Boolean) data[1]).booleanValue()); } }); // PENDING(uweh): we only support procedure right now and always push false on the stack // stopped systemDict.put("stopped", new PACommand() { public void execute(PAContext context) throws PainterException { Object data[]; PAToken patoken; data = context.popOperands(1); if (! (data[0] instanceof PAToken)) { throw new PainterException("wrong arguments"); } patoken = (PAToken) data[0]; if (! (patoken.type == PAToken.PROCEDURE)) { throw new PainterException("wrong arguments"); } context.engine.process(patoken); context.operands.push(new Boolean(false)); } }); return systemDict; }
3506 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3506/a9e36ef1e4e4be2e6d4839ed4e5a42aabe172a12/PAContext.java/buggy/itext/src/com/lowagie/text/pdf/codec/postscript/PAContext.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 4750, 4317, 4872, 3163, 5014, 1435, 288, 565, 4317, 2619, 5014, 273, 394, 4317, 5621, 565, 368, 25094, 565, 2619, 5014, 18, 458, 2932, 2704, 803, 3113, 394, 15662, 2189, 1435, 288, 1377, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 4750, 4317, 4872, 3163, 5014, 1435, 288, 565, 4317, 2619, 5014, 273, 394, 4317, 5621, 565, 368, 25094, 565, 2619, 5014, 18, 458, 2932, 2704, 803, 3113, 394, 15662, 2189, 1435, 288, 1377, ...
Log.log_1005(DOORMAN_CLASSNAME, "leaveAsReader()", null);
Log.log_1005(DOORMAN_CLASSNAME, THIS_METHOD, null);
public void leaveAsReader() { // TRACE: Enter method Log.log_1003(DOORMAN_CLASSNAME, "leaveAsReader()", null); Thread reader = Thread.currentThread(); synchronized (_currentActorLock) { boolean readerRemoved = _currentReaders.remove(reader); if (!readerRemoved) { // TODO: Remove from queue if it is in there? String message = _asString + ": " + reader.getName() + " attempts to leave protected area as reader, but it is not an active reader."; Log.log_1050(DOORMAN_CLASSNAME, "leaveAsReader()", Utils.getCallingClass(), Utils.getCallingMethod(), message); if (_strict) { throw new ProgrammingError(message); // TODO: Pass all details } else { // TRACE: Leave method Log.log_1005(DOORMAN_CLASSNAME, "leaveAsReader()", null); return; } } if (_currentReaders.isEmpty()) { synchronized (_queue) { // Determine if the queue has a writer atop, a reader atop or is // empty QueueEntryType type = _queue.getTypeOfFirst(); if (type == WRITE_QUEUE_ENTRY_TYPE) { // If a writer is waiting, activate it _currentWriter = _queue.pop(); _currentWriter.interrupt(); } else if (type == READ_QUEUE_ENTRY_TYPE) { // If a reader leaves, the queue cannot contain a reader at the // top, it must be either empty or have a writer at the top String message = _asString + ": Found reader at top of queue while a reader is leaving the protected area."; throw Utils.logProgrammingError(DOORMAN_CLASSNAME, "leaveAsReader()", Utils.getCallingClass(), Utils.getCallingMethod(), message); } } } } // TRACE: Leave method Log.log_1005(DOORMAN_CLASSNAME, "leaveAsReader()", null); }
45757 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45757/5e7b70a06c6e8519476e186d26c384ee26204cf2/Doorman.java/clean/src/java-common/org/xins/common/threads/Doorman.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 565, 1071, 918, 8851, 1463, 2514, 1435, 288, 1377, 368, 12734, 30, 15439, 707, 1377, 1827, 18, 1330, 67, 6625, 23, 12, 3191, 3466, 1258, 67, 5237, 1985, 16, 315, 19574, 1463, 2514, 1435, 3113,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 565, 1071, 918, 8851, 1463, 2514, 1435, 288, 1377, 368, 12734, 30, 15439, 707, 1377, 1827, 18, 1330, 67, 6625, 23, 12, 3191, 3466, 1258, 67, 5237, 1985, 16, 315, 19574, 1463, 2514, 1435, 3113,...
this(new SameShellProvider(parentShell)); if (parentShell == null && Policy.DEBUG_DIALOG_NO_PARENT) Policy.getLog().log( new Status(IStatus.INFO, Policy.JFACE, IStatus.INFO, this .getClass() + " created with no shell", new Exception())); }
this(new SameShellProvider(parentShell)); if (parentShell == null && Policy.DEBUG_DIALOG_NO_PARENT) Policy.getLog().log( new Status(IStatus.INFO, Policy.JFACE, IStatus.INFO, this .getClass() + " created with no shell", new Exception())); }
protected Dialog(Shell parentShell) { this(new SameShellProvider(parentShell)); if (parentShell == null && Policy.DEBUG_DIALOG_NO_PARENT) Policy.getLog().log( new Status(IStatus.INFO, Policy.JFACE, IStatus.INFO, this .getClass() + " created with no shell",//$NON-NLS-1$ new Exception())); }
56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/428d5c79264b25bd2a774407a6202b1bb1e628e5/Dialog.java/clean/bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/Dialog.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 17242, 12, 13220, 982, 13220, 13, 288, 3639, 333, 12, 2704, 17795, 13220, 2249, 12, 2938, 13220, 10019, 3639, 309, 261, 2938, 13220, 422, 446, 597, 7436, 18, 9394, 67, 2565, 18683, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 17242, 12, 13220, 982, 13220, 13, 288, 3639, 333, 12, 2704, 17795, 13220, 2249, 12, 2938, 13220, 10019, 3639, 309, 261, 2938, 13220, 422, 446, 597, 7436, 18, 9394, 67, 2565, 18683, ...
this.requestStarter = requestStarterClient; this.insertStarter = insertStarterClient;
public HighLevelSimpleClientImpl(SimpleLowLevelClient client, ArchiveManager mgr, BucketFactory bf, RandomSource r, RequestStarterClient requestStarterClient, RequestStarterClient insertStarterClient, boolean cacheLocalRequests) { this.client = client; archiveManager = mgr; bucketFactory = bf; random = r; this.globalEventProducer = new SimpleEventProducer(); globalEventProducer.addEventListener(new EventLogger(Logger.MINOR)); curMaxLength = Long.MAX_VALUE; curMaxTempLength = Long.MAX_VALUE; curMaxMetadataLength = 1024 * 1024; this.requestStarter = requestStarterClient; this.insertStarter = insertStarterClient; this.cacheLocalRequests = cacheLocalRequests; }
51834 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51834/d32229c02576d531c915059f111c468591f30e84/HighLevelSimpleClientImpl.java/buggy/src/freenet/client/HighLevelSimpleClientImpl.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 15207, 2355, 5784, 1227, 2828, 12, 5784, 10520, 2355, 1227, 1004, 16, 13124, 1318, 13333, 16, 7408, 1733, 16222, 16, 8072, 1830, 436, 16, 1567, 510, 14153, 1227, 590, 510, 14153, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 15207, 2355, 5784, 1227, 2828, 12, 5784, 10520, 2355, 1227, 1004, 16, 13124, 1318, 13333, 16, 7408, 1733, 16222, 16, 8072, 1830, 436, 16, 1567, 510, 14153, 1227, 590, 510, 14153, ...
ASTNode leftNeibour = TreeUtil.prevLeaf(element.getNode()); while (leftNeibour != null && (leftNeibour.getElementType() == TokenType.WHITE_SPACE || leftNeibour.getPsi() instanceof PsiComment)) leftNeibour = TreeUtil.prevLeaf(leftNeibour);
ASTNode leftNeibour = prevLeaf(element.getNode()); while (leftNeibour != null && (leftNeibour.getElementType() == TokenType.WHITE_SPACE || leftNeibour.getPsi() instanceof PsiComment)){ leftNeibour = prevLeaf(leftNeibour); }
public static PsiElement searchNonSpaceNonCommentBack(PsiElement element) { if(element == null || element.getNode() == null) return null; ASTNode leftNeibour = TreeUtil.prevLeaf(element.getNode()); while (leftNeibour != null && (leftNeibour.getElementType() == TokenType.WHITE_SPACE || leftNeibour.getPsi() instanceof PsiComment)) leftNeibour = TreeUtil.prevLeaf(leftNeibour); return leftNeibour != null ? leftNeibour.getPsi() : null; }
56598 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56598/87681ff19901d3f226c9d73e111340897a633091/FilterUtil.java/clean/source/com/intellij/psi/filters/FilterUtil.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 760, 453, 7722, 1046, 1623, 3989, 3819, 3989, 4469, 2711, 12, 52, 7722, 1046, 930, 13, 288, 565, 309, 12, 2956, 422, 446, 747, 930, 18, 588, 907, 1435, 422, 446, 13, 327, 446, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 760, 453, 7722, 1046, 1623, 3989, 3819, 3989, 4469, 2711, 12, 52, 7722, 1046, 930, 13, 288, 565, 309, 12, 2956, 422, 446, 747, 930, 18, 588, 907, 1435, 422, 446, 13, 327, 446, 3...
int nameIndex = -1;
String functionName = null;
private int generateICode(Node node, int iCodeTop) { int type = node.getType(); Node child = node.getFirstChild(); Node firstChild = child; switch (type) { case TokenStream.FUNCTION : { Node fn = (Node) node.getProp(Node.FUNCTION_PROP); int index = fn.getExistingIntProp(Node.FUNCTION_PROP); iCodeTop = addByte(TokenStream.CLOSURE, iCodeTop); iCodeTop = addShort(index, iCodeTop); itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; } break; case TokenStream.SCRIPT : iCodeTop = updateLineNumber(node, iCodeTop); while (child != null) { if (child.getType() != TokenStream.FUNCTION) iCodeTop = generateICode(child, iCodeTop); child = child.getNextSibling(); } break; case TokenStream.CASE : iCodeTop = updateLineNumber(node, iCodeTop); child = child.getNextSibling(); while (child != null) { iCodeTop = generateICode(child, iCodeTop); child = child.getNextSibling(); } break; case TokenStream.LABEL : case TokenStream.WITH : case TokenStream.LOOP : case TokenStream.DEFAULT : case TokenStream.BLOCK : case TokenStream.VOID : case TokenStream.NOP : iCodeTop = updateLineNumber(node, iCodeTop); while (child != null) { iCodeTop = generateICode(child, iCodeTop); child = child.getNextSibling(); } break; case TokenStream.COMMA : iCodeTop = generateICode(child, iCodeTop); iCodeTop = addByte(TokenStream.POP, iCodeTop); itsStackDepth--; child = child.getNextSibling(); iCodeTop = generateICode(child, iCodeTop); break; case TokenStream.SWITCH : { iCodeTop = updateLineNumber(node, iCodeTop); iCodeTop = generateICode(child, iCodeTop); int theLocalSlot = itsData.itsMaxLocals++; iCodeTop = addByte(TokenStream.NEWTEMP, iCodeTop); iCodeTop = addByte(theLocalSlot, iCodeTop); iCodeTop = addByte(TokenStream.POP, iCodeTop); itsStackDepth--; ObjArray cases = (ObjArray) node.getProp(Node.CASES_PROP); for (int i = 0; i < cases.size(); i++) { Node thisCase = (Node)cases.get(i); Node first = thisCase.getFirstChild(); // the case expression is the firstmost child // the rest will be generated when the case // statements are encountered as siblings of // the switch statement. iCodeTop = generateICode(first, iCodeTop); iCodeTop = addByte(TokenStream.USETEMP, iCodeTop); iCodeTop = addByte(theLocalSlot, iCodeTop); itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; iCodeTop = addByte(TokenStream.SHEQ, iCodeTop); itsStackDepth--; Node target = new Node(TokenStream.TARGET); thisCase.addChildAfter(target, first); iCodeTop = addGoto(target, TokenStream.IFEQ, iCodeTop); } Node defaultNode = (Node) node.getProp(Node.DEFAULT_PROP); if (defaultNode != null) { Node defaultTarget = new Node(TokenStream.TARGET); defaultNode.getFirstChild(). addChildToFront(defaultTarget); iCodeTop = addGoto(defaultTarget, TokenStream.GOTO, iCodeTop); } Node breakTarget = (Node) node.getProp(Node.BREAK_PROP); iCodeTop = addGoto(breakTarget, TokenStream.GOTO, iCodeTop); } break; case TokenStream.TARGET : { markTargetLabel(node, iCodeTop); // if this target has a FINALLY_PROP, it is a JSR target // and so has a PC value on the top of the stack if (node.getProp(Node.FINALLY_PROP) != null) { itsStackDepth = 1; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; } } break; case TokenStream.EQOP : case TokenStream.RELOP : { iCodeTop = generateICode(child, iCodeTop); child = child.getNextSibling(); iCodeTop = generateICode(child, iCodeTop); int op = node.getOperation(); if (version == Context.VERSION_1_2) { if (op == TokenStream.EQ) op = TokenStream.SHEQ; else if (op == TokenStream.NE) op = TokenStream.SHNE; } iCodeTop = addByte(op, iCodeTop); itsStackDepth--; } break; case TokenStream.NEW : case TokenStream.CALL : { if (itsSourceFile != null && (itsData.itsSourceFile == null || !itsSourceFile.equals(itsData.itsSourceFile))) { itsData.itsSourceFile = itsSourceFile; } iCodeTop = addByte(SOURCEFILE_ICODE, iCodeTop); int childCount = 0; int nameIndex = -1; while (child != null) { iCodeTop = generateICode(child, iCodeTop); if (nameIndex == -1) { int childType = child.getType(); if (childType == TokenStream.NAME || childType == TokenStream.GETPROP) { nameIndex = lastStringIndex; } } child = child.getNextSibling(); childCount++; } if (node.getProp(Node.SPECIALCALL_PROP) != null) { // embed line number and source filename iCodeTop = addByte(TokenStream.CALLSPECIAL, iCodeTop); iCodeTop = addShort(itsLineNumber, iCodeTop); iCodeTop = addString(itsSourceFile, iCodeTop); } else { iCodeTop = addByte(type, iCodeTop); iCodeTop = addShort(nameIndex, iCodeTop); } itsStackDepth -= (childCount - 1); // always a result value // subtract from child count to account for [thisObj &] fun if (type == TokenStream.NEW) childCount -= 1; else childCount -= 2; iCodeTop = addShort(childCount, iCodeTop); if (childCount > itsData.itsMaxCalleeArgs) itsData.itsMaxCalleeArgs = childCount; iCodeTop = addByte(SOURCEFILE_ICODE, iCodeTop); } break; case TokenStream.NEWLOCAL : case TokenStream.NEWTEMP : { iCodeTop = generateICode(child, iCodeTop); iCodeTop = addByte(TokenStream.NEWTEMP, iCodeTop); iCodeTop = addLocalRef(node, iCodeTop); } break; case TokenStream.USELOCAL : { if (node.getProp(Node.TARGET_PROP) != null) iCodeTop = addByte(TokenStream.RETSUB, iCodeTop); else { iCodeTop = addByte(TokenStream.USETEMP, iCodeTop); itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; } Node temp = (Node) node.getProp(Node.LOCAL_PROP); iCodeTop = addLocalRef(temp, iCodeTop); } break; case TokenStream.USETEMP : { iCodeTop = addByte(TokenStream.USETEMP, iCodeTop); Node temp = (Node) node.getProp(Node.TEMP_PROP); iCodeTop = addLocalRef(temp, iCodeTop); itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; } break; case TokenStream.IFEQ : case TokenStream.IFNE : iCodeTop = generateICode(child, iCodeTop); itsStackDepth--; // after the conditional GOTO, really // fall thru... case TokenStream.GOTO : { Node target = (Node)(node.getProp(Node.TARGET_PROP)); iCodeTop = addGoto(target, (byte) type, iCodeTop); } break; case TokenStream.JSR : { /* mark the target with a FINALLY_PROP to indicate that it will have an incoming PC value on the top of the stack. !!! This only works if the target follows the JSR in the tree. !!! */ Node target = (Node)(node.getProp(Node.TARGET_PROP)); target.putProp(Node.FINALLY_PROP, node); // Bug 115717 is due to adding a GOSUB here before // we insert an ENDTRY. I'm not sure of the best way // to fix this; perhaps we need to maintain a stack // of pending trys and have some knowledge of how // many trys we need to close when we perform a // GOTO or GOSUB. iCodeTop = addGoto(target, TokenStream.GOSUB, iCodeTop); } break; case TokenStream.AND : { iCodeTop = generateICode(child, iCodeTop); iCodeTop = addByte(TokenStream.DUP, iCodeTop); itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; int falseJumpStart = iCodeTop; iCodeTop = addForwardGoto(TokenStream.IFNE, iCodeTop); iCodeTop = addByte(TokenStream.POP, iCodeTop); itsStackDepth--; child = child.getNextSibling(); iCodeTop = generateICode(child, iCodeTop); resolveForwardGoto(falseJumpStart, iCodeTop); } break; case TokenStream.OR : { iCodeTop = generateICode(child, iCodeTop); iCodeTop = addByte(TokenStream.DUP, iCodeTop); itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; int trueJumpStart = iCodeTop; iCodeTop = addForwardGoto(TokenStream.IFEQ, iCodeTop); iCodeTop = addByte(TokenStream.POP, iCodeTop); itsStackDepth--; child = child.getNextSibling(); iCodeTop = generateICode(child, iCodeTop); resolveForwardGoto(trueJumpStart, iCodeTop); } break; case TokenStream.GETPROP : { iCodeTop = generateICode(child, iCodeTop); String s = (String) node.getProp(Node.SPECIAL_PROP_PROP); if (s != null) { if (s.equals("__proto__")) iCodeTop = addByte(TokenStream.GETPROTO, iCodeTop); else if (s.equals("__parent__")) iCodeTop = addByte(TokenStream.GETSCOPEPARENT, iCodeTop); else badTree(node); } else { child = child.getNextSibling(); iCodeTop = generateICode(child, iCodeTop); iCodeTop = addByte(TokenStream.GETPROP, iCodeTop); itsStackDepth--; } } break; case TokenStream.DELPROP : case TokenStream.BITAND : case TokenStream.BITOR : case TokenStream.BITXOR : case TokenStream.LSH : case TokenStream.RSH : case TokenStream.URSH : case TokenStream.ADD : case TokenStream.SUB : case TokenStream.MOD : case TokenStream.DIV : case TokenStream.MUL : case TokenStream.GETELEM : iCodeTop = generateICode(child, iCodeTop); child = child.getNextSibling(); iCodeTop = generateICode(child, iCodeTop); iCodeTop = addByte(type, iCodeTop); itsStackDepth--; break; case TokenStream.CONVERT : { iCodeTop = generateICode(child, iCodeTop); Object toType = node.getProp(Node.TYPE_PROP); if (toType == ScriptRuntime.NumberClass) iCodeTop = addByte(TokenStream.POS, iCodeTop); else badTree(node); } break; case TokenStream.UNARYOP : iCodeTop = generateICode(child, iCodeTop); switch (node.getOperation()) { case TokenStream.VOID : iCodeTop = addByte(TokenStream.POP, iCodeTop); iCodeTop = addByte(TokenStream.UNDEFINED, iCodeTop); break; case TokenStream.NOT : { int trueJumpStart = iCodeTop; iCodeTop = addForwardGoto(TokenStream.IFEQ, iCodeTop); iCodeTop = addByte(TokenStream.TRUE, iCodeTop); int beyondJumpStart = iCodeTop; iCodeTop = addForwardGoto(TokenStream.GOTO, iCodeTop); resolveForwardGoto(trueJumpStart, iCodeTop); iCodeTop = addByte(TokenStream.FALSE, iCodeTop); resolveForwardGoto(beyondJumpStart, iCodeTop); } break; case TokenStream.BITNOT : iCodeTop = addByte(TokenStream.BITNOT, iCodeTop); break; case TokenStream.TYPEOF : iCodeTop = addByte(TokenStream.TYPEOF, iCodeTop); break; case TokenStream.SUB : iCodeTop = addByte(TokenStream.NEG, iCodeTop); break; case TokenStream.ADD : iCodeTop = addByte(TokenStream.POS, iCodeTop); break; default: badTree(node); break; } break; case TokenStream.SETPROP : { iCodeTop = generateICode(child, iCodeTop); child = child.getNextSibling(); iCodeTop = generateICode(child, iCodeTop); String s = (String) node.getProp(Node.SPECIAL_PROP_PROP); if (s != null) { if (s.equals("__proto__")) iCodeTop = addByte(TokenStream.SETPROTO, iCodeTop); else if (s.equals("__parent__")) iCodeTop = addByte(TokenStream.SETPARENT, iCodeTop); else badTree(node); } else { child = child.getNextSibling(); iCodeTop = generateICode(child, iCodeTop); iCodeTop = addByte(TokenStream.SETPROP, iCodeTop); itsStackDepth -= 2; } } break; case TokenStream.SETELEM : iCodeTop = generateICode(child, iCodeTop); child = child.getNextSibling(); iCodeTop = generateICode(child, iCodeTop); child = child.getNextSibling(); iCodeTop = generateICode(child, iCodeTop); iCodeTop = addByte(type, iCodeTop); itsStackDepth -= 2; break; case TokenStream.SETNAME : iCodeTop = generateICode(child, iCodeTop); child = child.getNextSibling(); iCodeTop = generateICode(child, iCodeTop); iCodeTop = addByte(TokenStream.SETNAME, iCodeTop); iCodeTop = addString(firstChild.getString(), iCodeTop); itsStackDepth--; break; case TokenStream.TYPEOF : { String name = node.getString(); int index = -1; // use typeofname if an activation frame exists // since the vars all exist there instead of in jregs if (itsInFunctionFlag && !itsData.itsNeedsActivation) index = itsVariableTable.getOrdinal(name); if (index == -1) { iCodeTop = addByte(TokenStream.TYPEOFNAME, iCodeTop); iCodeTop = addString(name, iCodeTop); } else { iCodeTop = addByte(TokenStream.GETVAR, iCodeTop); iCodeTop = addByte(index, iCodeTop); iCodeTop = addByte(TokenStream.TYPEOF, iCodeTop); } itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; } break; case TokenStream.PARENT : iCodeTop = generateICode(child, iCodeTop); iCodeTop = addByte(TokenStream.GETPARENT, iCodeTop); break; case TokenStream.GETBASE : case TokenStream.BINDNAME : case TokenStream.NAME : case TokenStream.STRING : iCodeTop = addByte(type, iCodeTop); iCodeTop = addString(node.getString(), iCodeTop); itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; break; case TokenStream.INC : case TokenStream.DEC : { int childType = child.getType(); switch (childType) { case TokenStream.GETVAR : { String name = child.getString(); if (itsData.itsNeedsActivation) { iCodeTop = addByte(TokenStream.SCOPE, iCodeTop); iCodeTop = addByte(TokenStream.STRING, iCodeTop); iCodeTop = addString(name, iCodeTop); itsStackDepth += 2; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; iCodeTop = addByte(type == TokenStream.INC ? TokenStream.PROPINC : TokenStream.PROPDEC, iCodeTop); itsStackDepth--; } else { int i = itsVariableTable.getOrdinal(name); iCodeTop = addByte(type == TokenStream.INC ? TokenStream.VARINC : TokenStream.VARDEC, iCodeTop); iCodeTop = addByte(i, iCodeTop); itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; } } break; case TokenStream.GETPROP : case TokenStream.GETELEM : { Node getPropChild = child.getFirstChild(); iCodeTop = generateICode(getPropChild, iCodeTop); getPropChild = getPropChild.getNextSibling(); iCodeTop = generateICode(getPropChild, iCodeTop); if (childType == TokenStream.GETPROP) iCodeTop = addByte(type == TokenStream.INC ? TokenStream.PROPINC : TokenStream.PROPDEC, iCodeTop); else iCodeTop = addByte(type == TokenStream.INC ? TokenStream.ELEMINC : TokenStream.ELEMDEC, iCodeTop); itsStackDepth--; } break; default : { iCodeTop = addByte(type == TokenStream.INC ? TokenStream.NAMEINC : TokenStream.NAMEDEC, iCodeTop); iCodeTop = addString(child.getString(), iCodeTop); itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; } break; } } break; case TokenStream.NUMBER : { double num = node.getDouble(); int inum = (int)num; if (inum == num) { if (inum == 0) { iCodeTop = addByte(TokenStream.ZERO, iCodeTop); } else if (inum == 1) { iCodeTop = addByte(TokenStream.ONE, iCodeTop); } else if ((short)inum == inum) { iCodeTop = addByte(SHORTNUMBER_ICODE, iCodeTop); iCodeTop = addShort(inum, iCodeTop); } else { iCodeTop = addByte(INTNUMBER_ICODE, iCodeTop); iCodeTop = addInt(inum, iCodeTop); } } else { iCodeTop = addByte(TokenStream.NUMBER, iCodeTop); iCodeTop = addDouble(num, iCodeTop); } itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; break; } case TokenStream.POP : case TokenStream.POPV : iCodeTop = updateLineNumber(node, iCodeTop); case TokenStream.ENTERWITH : iCodeTop = generateICode(child, iCodeTop); iCodeTop = addByte(type, iCodeTop); itsStackDepth--; break; case TokenStream.GETTHIS : iCodeTop = generateICode(child, iCodeTop); iCodeTop = addByte(type, iCodeTop); break; case TokenStream.NEWSCOPE : iCodeTop = addByte(type, iCodeTop); itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; break; case TokenStream.LEAVEWITH : iCodeTop = addByte(type, iCodeTop); break; case TokenStream.TRY : { itsTryDepth++; if (itsTryDepth > itsData.itsMaxTryDepth) itsData.itsMaxTryDepth = itsTryDepth; Node catchTarget = (Node)node.getProp(Node.TARGET_PROP); Node finallyTarget = (Node)node.getProp(Node.FINALLY_PROP); int tryStart = iCodeTop; if (catchTarget == null) { iCodeTop = addByte(TokenStream.TRY, iCodeTop); iCodeTop = addShort(0, iCodeTop); } else { iCodeTop = addGoto(catchTarget, TokenStream.TRY, iCodeTop); } iCodeTop = addShort(0, iCodeTop); Node lastChild = null; /* when we encounter the child of the catchTarget, we set the stackDepth to 1 to account for the incoming exception object. */ boolean insertedEndTry = false; while (child != null) { if (catchTarget != null && lastChild == catchTarget) { itsStackDepth = 1; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; } /* When the following child is the catchTarget (or the finallyTarget if there are no catches), the current child is the goto at the end of the try statemets, we need to emit the endtry before that goto. */ Node nextSibling = child.getNextSibling(); if (!insertedEndTry && nextSibling != null && (nextSibling == catchTarget || nextSibling == finallyTarget)) { iCodeTop = addByte(TokenStream.ENDTRY, iCodeTop); insertedEndTry = true; } iCodeTop = generateICode(child, iCodeTop); lastChild = child; child = child.getNextSibling(); } itsStackDepth = 0; if (finallyTarget != null) { // normal flow goes around the finally handler stublet int skippyJumpStart = iCodeTop; iCodeTop = addForwardGoto(TokenStream.GOTO, iCodeTop); int finallyOffset = iCodeTop - tryStart; recordJumpOffset(tryStart + 3, finallyOffset); // on entry the stack will have the exception object itsStackDepth = 1; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; int theLocalSlot = itsData.itsMaxLocals++; iCodeTop = addByte(TokenStream.NEWTEMP, iCodeTop); iCodeTop = addByte(theLocalSlot, iCodeTop); iCodeTop = addByte(TokenStream.POP, iCodeTop); iCodeTop = addGoto(finallyTarget, TokenStream.GOSUB, iCodeTop); iCodeTop = addByte(TokenStream.USETEMP, iCodeTop); iCodeTop = addByte(theLocalSlot, iCodeTop); iCodeTop = addByte(TokenStream.JTHROW, iCodeTop); itsStackDepth = 0; resolveForwardGoto(skippyJumpStart, iCodeTop); } itsTryDepth--; } break; case TokenStream.THROW : iCodeTop = updateLineNumber(node, iCodeTop); iCodeTop = generateICode(child, iCodeTop); iCodeTop = addByte(TokenStream.THROW, iCodeTop); itsStackDepth--; break; case TokenStream.RETURN : iCodeTop = updateLineNumber(node, iCodeTop); if (child != null) { iCodeTop = generateICode(child, iCodeTop); iCodeTop = addByte(TokenStream.RETURN, iCodeTop); itsStackDepth--; } else { iCodeTop = addByte(RETURN_UNDEF_ICODE, iCodeTop); } break; case TokenStream.GETVAR : { String name = node.getString(); if (itsData.itsNeedsActivation) { // SETVAR handled this by turning into a SETPROP, but // we can't do that to a GETVAR without manufacturing // bogus children. Instead we use a special op to // push the current scope. iCodeTop = addByte(TokenStream.SCOPE, iCodeTop); iCodeTop = addByte(TokenStream.STRING, iCodeTop); iCodeTop = addString(name, iCodeTop); itsStackDepth += 2; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; iCodeTop = addByte(TokenStream.GETPROP, iCodeTop); itsStackDepth--; } else { int index = itsVariableTable.getOrdinal(name); iCodeTop = addByte(TokenStream.GETVAR, iCodeTop); iCodeTop = addByte(index, iCodeTop); itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; } } break; case TokenStream.SETVAR : { if (itsData.itsNeedsActivation) { child.setType(TokenStream.BINDNAME); node.setType(TokenStream.SETNAME); iCodeTop = generateICode(node, iCodeTop); } else { String name = child.getString(); child = child.getNextSibling(); iCodeTop = generateICode(child, iCodeTop); int index = itsVariableTable.getOrdinal(name); iCodeTop = addByte(TokenStream.SETVAR, iCodeTop); iCodeTop = addByte(index, iCodeTop); } } break; case TokenStream.PRIMARY: iCodeTop = addByte(node.getOperation(), iCodeTop); itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; break; case TokenStream.ENUMINIT : iCodeTop = generateICode(child, iCodeTop); iCodeTop = addByte(TokenStream.ENUMINIT, iCodeTop); iCodeTop = addLocalRef(node, iCodeTop); itsStackDepth--; break; case TokenStream.ENUMNEXT : { iCodeTop = addByte(TokenStream.ENUMNEXT, iCodeTop); Node init = (Node)node.getProp(Node.ENUM_PROP); iCodeTop = addLocalRef(init, iCodeTop); itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; } break; case TokenStream.ENUMDONE : // could release the local here?? break; case TokenStream.REGEXP : { Node regexp = (Node) node.getProp(Node.REGEXP_PROP); int index = regexp.getExistingIntProp(Node.REGEXP_PROP); iCodeTop = addByte(TokenStream.REGEXP, iCodeTop); iCodeTop = addShort(index, iCodeTop); itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; } break; default : badTree(node); break; } return iCodeTop; }
19000 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/19000/2e16b18d0d24c5129e654d820e6c7f2155b1b7e0/Interpreter.java/buggy/src/org/mozilla/javascript/Interpreter.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 509, 2103, 45, 1085, 12, 907, 756, 16, 509, 277, 1085, 3401, 13, 288, 3639, 509, 618, 273, 756, 18, 588, 559, 5621, 3639, 2029, 1151, 273, 756, 18, 588, 3759, 1763, 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, 3238, 509, 2103, 45, 1085, 12, 907, 756, 16, 509, 277, 1085, 3401, 13, 288, 3639, 509, 618, 273, 756, 18, 588, 559, 5621, 3639, 2029, 1151, 273, 756, 18, 588, 3759, 1763, 5621, 3639, ...
{ String s = getString(columnIndex); DateFormat df = DateFormat.getDateInstance(); if (s != null) { try { java.sql.Date d = (java.sql.Date)df.parse(s); return new Timestamp(d.getTime()); } catch (ParseException e) { throw new SQLException("Bad Timestamp Format: " + s); } } return null; }
{ String s = getString(columnIndex); DateFormat df = DateFormat.getDateInstance(); if (s != null) { try { java.sql.Date d = (java.sql.Date)df.parse(s); return new Timestamp(d.getTime()); } catch (ParseException e) { throw new SQLException("Bad Timestamp Format: " + s); } } return null; }
public Timestamp getTimestamp(int columnIndex) throws SQLException { String s = getString(columnIndex); DateFormat df = DateFormat.getDateInstance(); if (s != null) { try { java.sql.Date d = (java.sql.Date)df.parse(s); return new Timestamp(d.getTime()); } catch (ParseException e) { throw new SQLException("Bad Timestamp Format: " + s); } } return null; // SQL NULL }
47293 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47293/6a061da272f04e1463864065f87f1f3fd61d6162/ResultSet.java/buggy/src/interfaces/jdbc/postgresql/ResultSet.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 8159, 11940, 12, 474, 14882, 13, 1216, 6483, 202, 95, 202, 202, 780, 272, 273, 4997, 12, 2827, 1016, 1769, 202, 202, 11878, 3013, 273, 18371, 18, 588, 1626, 1442, 5621, 202, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 8159, 11940, 12, 474, 14882, 13, 1216, 6483, 202, 95, 202, 202, 780, 272, 273, 4997, 12, 2827, 1016, 1769, 202, 202, 11878, 3013, 273, 18371, 18, 588, 1626, 1442, 5621, 202, 2...
switch(column) {
switch (column) {
public Object getValueAt(int row, int column) { switch(column) { case 0: return expressions.elementAt(row); case 1: return values.elementAt(row); } return ""; }
54155 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54155/b9766e81693411fa600b26b9a0763dcf621b2770/Main.java/clean/js/rhino/toolsrc/org/mozilla/javascript/tools/debugger/Main.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 1033, 2366, 861, 12, 474, 1027, 16, 509, 1057, 13, 288, 3639, 1620, 261, 2827, 13, 288, 3639, 648, 374, 30, 5411, 327, 8041, 18, 2956, 861, 12, 492, 1769, 3639, 648, 404, 30, 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, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 1033, 2366, 861, 12, 474, 1027, 16, 509, 1057, 13, 288, 3639, 1620, 261, 2827, 13, 288, 3639, 648, 374, 30, 5411, 327, 8041, 18, 2956, 861, 12, 492, 1769, 3639, 648, 404, 30, 54...
suite.addTest(new ApiTest(jniClassLoader.loadClass(classname)));
Class jniClass = jniClassLoader.loadClass(classname); if (!ignoredItems.isIgnoredClass(jniClass)) { suite.addTest(new ApiTest(jniClass, ignoredItems)); }
public static Test suite() { TestSuite suite = new TestSuite(); try { String jarPath = "../quickfix_cvs/lib/quickfix.jar"; URL[] urls = new URL[] { new URL("file:" + jarPath) }; ClassLoader jniClassLoader = new URLClassLoader(urls, null); JarFile jar = new JarFile(new File(jarPath), false, ZipFile.OPEN_READ); Enumeration entries = jar.entries(); while (entries.hasMoreElements()) { ZipEntry entry = (ZipEntry) entries.nextElement(); String path = entry.getName(); String directory = path.substring(0, path.lastIndexOf('/')); String name = path.substring(path.lastIndexOf('/') + 1); if (directory.equals("quickfix") && !name.equals("")) { String classname = path.substring(0, path.lastIndexOf(".class")).replace('/', '.'); suite.addTest(new ApiTest(jniClassLoader.loadClass(classname))); } } } catch (Exception e) { e.printStackTrace(); } return suite; }
6791 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6791/85cde20b07abbd94fda393adfe4199363f08c3be/TestApiCompatibility.java/buggy/test/quickfix/TestApiCompatibility.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 760, 7766, 11371, 1435, 288, 3639, 7766, 13587, 11371, 273, 394, 7766, 13587, 5621, 3639, 775, 288, 5411, 514, 7334, 743, 273, 315, 6216, 19525, 904, 67, 71, 6904, 19, 2941, 19, 195...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7766, 11371, 1435, 288, 3639, 7766, 13587, 11371, 273, 394, 7766, 13587, 5621, 3639, 775, 288, 5411, 514, 7334, 743, 273, 315, 6216, 19525, 904, 67, 71, 6904, 19, 2941, 19, 195...
g.setColor(new Color(200, 200, 255)); g.fillOval(w / 3, h / 3, w * 3 / 6, h * 3 / 6);
g.setColor(ActiveObjectPanel.COLOR_WHEN_SERVING_REQUEST); g.fillOval(w/4, 0, w/2, h);
public void paintComponent(Graphics g) { Dimension dim = getSize(); int w = dim.width; int h = dim.height; g.setColor(new Color(200, 200, 255)); g.fillOval(w / 3, h / 3, w * 3 / 6, h * 3 / 6); }
50951 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50951/2666230e00db643175e81dac0b52f3f8ba384784/Legend.java/buggy/src/org/objectweb/proactive/ic2d/gui/Legend.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 6647, 1071, 918, 12574, 1841, 12, 17558, 314, 13, 288, 5411, 13037, 2464, 273, 9950, 5621, 5411, 509, 341, 273, 2464, 18, 2819, 31, 5411, 509, 366, 273, 2464, 18, 4210, 31, 5411, 314, 18, 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, 6647, 1071, 918, 12574, 1841, 12, 17558, 314, 13, 288, 5411, 13037, 2464, 273, 9950, 5621, 5411, 509, 341, 273, 2464, 18, 2819, 31, 5411, 509, 366, 273, 2464, 18, 4210, 31, 5411, 314, 18, 54...
if (percentDone >= 0 && percentDone <= 100 && percentDone != progressBar.getSelection()){ progressBar.setSelection(percentDone); }
if (percentDone >= 0 && percentDone <= 100 && percentDone != progressBar.getSelection()) { progressBar.setSelection(percentDone); }
void refresh() { if (isDisposed()) return; progressLabel.setText(getMainTitle()); int percentDone = getPercentDone(); JobInfo[] infos = getJobInfos(); if (isRunning()) { if (progressBar == null){ if(percentDone == IProgressMonitor.UNKNOWN){ //Only do it if there is an indeterminate task //There may be no task so we don't want to create it //until we know for sure for (int i = 0; i < infos.length; i++) { if(infos[i].hasTaskInfo() && infos[i].getTaskInfo().totalWork == IProgressMonitor.UNKNOWN){ createProgressBar(SWT.INDETERMINATE); break; } } } else{ createProgressBar(SWT.NONE); progressBar.setMinimum(0); progressBar.setMaximum(100); } } // Protect against bad counters if (percentDone >= 0 && percentDone <= 100 && percentDone != progressBar.getSelection()){ progressBar.setSelection(percentDone); } } else if (isCompleted()) { if (progressBar != null) { progressBar.dispose(); progressBar = null; } setLayoutsForNoProgress(); actionButton.setImage(JFaceResources .getImage(CLEAR_FINISHED_JOB_KEY)); actionButton.setDisabledImage(JFaceResources .getImage(DISABLED_CLEAR_FINISHED_JOB_KEY)); } int taskCount = 0; for (int i = 0; i < infos.length; i++) { JobInfo jobInfo = infos[i]; if (jobInfo.hasTaskInfo()) { String taskString = jobInfo.getTaskInfo().getTaskName(); String subTaskString = null; Object[] jobChildren = jobInfo.getChildren(); if (jobChildren.length > 0) subTaskString = ((JobTreeElement) jobChildren[0]) .getDisplayString(); if (subTaskString != null) { if (taskString == null) taskString = subTaskString; else taskString = NLS.bind( ProgressMessages.JobInfo_DoneNoProgressMessage, taskString, subTaskString); } if (taskString != null) { setLinkText(infos[i].getJob(), taskString, taskCount); taskCount++; } } else {// Check for the finished job state Job job = jobInfo.getJob(); if (job.getResult() != null) { IStatus result = job.getResult(); String message = EMPTY_STRING; if(result != null) message = result.getMessage(); setLinkText(job,message, i); taskCount++; } } setColor(i); } // Remove completed tasks if (taskCount < taskEntries.size()) { for (int i = taskCount; i < taskEntries.size(); i++) { ((Link) taskEntries.get(i)).dispose(); } taskEntries = taskEntries.subList(0, taskCount); } }
58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/02901f3a15fd4a62722aa6cfeff6b75a3f17f252/ProgressInfoItem.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressInfoItem.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 6459, 4460, 1435, 288, 202, 202, 430, 261, 291, 1669, 7423, 10756, 1082, 202, 2463, 31, 202, 202, 8298, 2224, 18, 542, 1528, 12, 588, 6376, 4247, 10663, 202, 202, 474, 5551, 7387, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 6459, 4460, 1435, 288, 202, 202, 430, 261, 291, 1669, 7423, 10756, 1082, 202, 2463, 31, 202, 202, 8298, 2224, 18, 542, 1528, 12, 588, 6376, 4247, 10663, 202, 202, 474, 5551, 7387, ...
final Boolean doesVersionExist;
void handleArtifactPublished(final UUID uniqueId, final Long versionId, final String name, final UUID artifactUniqueId, final Long artifactVersionId, final String artifactName, final ArtifactType artifactType, final String artifactChecksum, final String artifactStreamId, final JabberId publishedBy, final Calendar publishedOn) { logger.logApiId(); logger.logVariable("uniqueId", uniqueId); logger.logVariable("versionId", versionId); logger.logVariable("name", name); logger.logVariable("artifactUniqueId", artifactUniqueId); logger.logVariable("artifactVersionId", artifactVersionId); logger.logVariable("artifactName", artifactName); logger.logVariable("artifactType", artifactType); logger.logVariable("artifactChecksum", artifactChecksum); logger.logVariable("artifactStreamId", artifactStreamId); logger.logVariable("publishedBy", publishedBy); logger.logVariable("publishedOn", publishedOn); try { assertIsNotLocalUserId(publishedBy); // determine the existance of the container and the version. final InternalArtifactModel artifactModel = getInternalArtifactModel(); final Boolean doesExist = artifactModel.doesExist(uniqueId); final Boolean doesVersionExist; final Long containerId; final Container container; final ContainerVersion version; if (doesExist) { containerId = artifactModel.readId(uniqueId); container = read(containerId); doesVersionExist = artifactModel.doesVersionExist(containerId, versionId); if (doesVersionExist) { version = readVersion(container.getId(), versionId); } else { version = createVersion(container.getId(), versionId, publishedBy, publishedOn); } } else { doesVersionExist = Boolean.FALSE; // ensure the published by user exists locally getInternalUserModel().readLazyCreate(publishedBy); container = new Container(); container.setCreatedBy(publishedBy); container.setCreatedOn(publishedOn); container.setName(name); container.setState(ArtifactState.ACTIVE); container.setType(ArtifactType.CONTAINER); container.setUniqueId(uniqueId); container.setUpdatedBy(container.getCreatedBy()); container.setUpdatedOn(container.getCreatedOn()); // create containerIO.create(container); // create version version = createVersion(container.getId(), versionId, publishedBy, publishedOn); // create remote info artifactModel.createRemoteInfo(container.getId(), publishedBy, container.getCreatedOn()); // index getIndexModel().indexContainer(container.getId()); } // handle the artifact by specific type final ArtifactVersion artifactVersion; switch(artifactType) { case DOCUMENT: artifactVersion = handleDocumentPublished(artifactUniqueId, artifactVersionId, artifactName, artifactChecksum, artifactStreamId, publishedBy, publishedOn); break; case CONTAINER: default: throw Assert.createUnreachable("UNKNOWN ARTIFACT TYPE"); } containerIO.addVersion(version.getArtifactId(), version.getVersionId(), artifactVersion.getArtifactId(), artifactVersion.getVersionId(), artifactVersion.getArtifactType()); final Container postPublish = read(container.getId()); final ContainerVersion postPublishVersion = readVersion(version.getArtifactId(), version.getVersionId()); notifyContainerPublished(postPublish, null, postPublishVersion, remoteEventGenerator); } catch(final Throwable t) { throw translateError(t); } }
53635 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/53635/b48d5f12cfbd55a079090b6bb3853ec3e1ca1f28/ContainerModelImpl.java/clean/local/model/src/main/java/com/thinkparity/ophelia/model/container/ContainerModelImpl.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 918, 1640, 7581, 16451, 12, 6385, 5866, 22345, 16, 727, 3407, 15287, 16, 5411, 727, 514, 508, 16, 727, 5866, 6462, 24174, 16, 5411, 727, 3407, 6462, 28039, 16, 727, 514, 6462, 461, 16, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 918, 1640, 7581, 16451, 12, 6385, 5866, 22345, 16, 727, 3407, 15287, 16, 5411, 727, 514, 508, 16, 727, 5866, 6462, 24174, 16, 5411, 727, 3407, 6462, 28039, 16, 727, 514, 6462, 461, 16, ...
addedSymbols = ScannerConfigUtil.scAddSymbolsSet2SymbolEntryMap(sumSymbols, symbols, false);
addedSymbols = ScannerConfigUtil.scAddSymbolsList2SymbolEntryMap(sumSymbols, symbols, false);
private boolean scannerConfigNeedsUpdate(MakeScannerInfo makeScanInfo, String projectName) { // TODO : VMIR to implement other variants List includes = (List) discoveredIncludes.get(projectName); List dSymbols = (List) discoveredSymbols.get(projectName); if (includes == null && dSymbols == null) return false; Set symbols = new HashSet(dSymbols); // Step 1. Add discovered scanner config to the existing discovered scanner config // add the includes from the latest discovery boolean addedIncludes = false; List sumIncludes = (List) sumDiscoveredIncludes.get(projectName); if (sumIncludes == null) { sumIncludes = new ArrayList(includes); sumDiscoveredIncludes.put(projectName, sumIncludes); addedIncludes = true; } else { for (Iterator i = includes.iterator(); i.hasNext(); ) { String include = (String) i.next(); if (!sumIncludes.contains(include)) { addedIncludes |= sumIncludes.add(include); } } } // try to translate cygpaths to absolute paths List finalSumIncludes = translateIncludePaths(sumIncludes); // add the symbols from the latest discovery boolean addedSymbols = false; Map sumSymbols = (Map) sumDiscoveredSymbols.get(projectName); if (sumSymbols == null) { sumSymbols = new HashMap(); sumDiscoveredSymbols.put(projectName, sumSymbols); } addedSymbols = ScannerConfigUtil.scAddSymbolsSet2SymbolEntryMap(sumSymbols, symbols, false); // Step 2. Get project's scanner config String[] persistedIncludes = makeScanInfo.getIncludePaths(); Map persistedSymbols = makeScanInfo.getDefinedSymbols(); // TODO VMIR this is likely to change when new UI is introduced // Step 3. Merge scanner config from steps 1 and 2 List candidateIncludes = new ArrayList(Arrays.asList(persistedIncludes)); for (Iterator i = finalSumIncludes.iterator(); i.hasNext(); ) { String include = (String) i.next(); if (!candidateIncludes.contains(include)) { addedIncludes |= candidateIncludes.add(include); } } Map candidateSymbols = new HashMap(sumSymbols); Set persistedSymbolsSet = ScannerConfigUtil.scSymbolsMap2Set(persistedSymbols); addedSymbols |= ScannerConfigUtil.scAddSymbolsSet2SymbolEntryMap(candidateSymbols, persistedSymbolsSet, true); // Step 4. Set resulting scanner config makeScanInfo.setIncludePaths((String[])candidateIncludes.toArray(new String[candidateIncludes.size()])); makeScanInfo.setPreprocessorSymbols((String[])ScannerConfigUtil. scSymbolsSymbolEntryMap2Set(candidateSymbols).toArray(new String[candidateSymbols.size()])); // invalidate discovered include paths and symbol definitions discoveredIncludes.put(projectName, null); discoveredSymbols.put(projectName, null); return (addedIncludes | addedSymbols); }
54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/e75bafa4a4e6c14b60634418bc08cee3200fcd49/ScannerInfoCollector.java/clean/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/ScannerInfoCollector.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 1250, 7683, 809, 26419, 1891, 12, 6464, 11338, 966, 1221, 7972, 966, 16, 514, 17234, 13, 288, 202, 202, 759, 2660, 294, 776, 7492, 54, 358, 2348, 1308, 12935, 202, 202, 682, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 1250, 7683, 809, 26419, 1891, 12, 6464, 11338, 966, 1221, 7972, 966, 16, 514, 17234, 13, 288, 202, 202, 759, 2660, 294, 776, 7492, 54, 358, 2348, 1308, 12935, 202, 202, 682, ...
Component destination)
Component destination)
public static Point convertPoint(Component source, int x, int y, Component destination) { Point pt = new Point(x, y); if (source == null && destination == null) return pt; if (source == null) source = getRoot(destination); if (destination == null) destination = getRoot(source); convertPointToScreen(pt, source); convertPointFromScreen(pt, destination); return pt; }
47947 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47947/4b45eff077986f9697953d5599679db4cc52a0d5/AWTUtilities.java/buggy/gnu/java/awt/AWTUtilities.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 760, 4686, 1765, 2148, 12, 1841, 1084, 16, 509, 619, 16, 509, 677, 16, 6862, 6862, 6862, 25083, 5435, 2929, 13, 225, 288, 565, 4686, 5818, 273, 394, 4686, 12, 92, 16, 677, 1769, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 760, 4686, 1765, 2148, 12, 1841, 1084, 16, 509, 619, 16, 509, 677, 16, 6862, 6862, 6862, 25083, 5435, 2929, 13, 225, 288, 565, 4686, 5818, 273, 394, 4686, 12, 92, 16, 677, 1769, ...
public String getPageWidth( );
public DimensionType getPageWidth( );
public String getPageWidth( );
15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/83de512a7dc3a128ad54fa2607c01f0ef928234c/IPageContent.java/buggy/engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/content/IPageContent.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 514, 8957, 2384, 12, 11272, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 514, 8957, 2384, 12, 11272, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
public basic(String args[]) throws ClassNotFoundException, FileNotFoundException, IOException, SQLException { String url = args[0]; String usr = args[1]; String pwd = args[2]; // Load the driver Class.forName("org.postgresql.Driver"); // Connect to database System.out.println("Connecting to Database URL = " + url); db = DriverManager.getConnection(url, usr, pwd); System.out.println("Connected...Now creating a statement"); st = db.createStatement(); // Clean up the database (in case we failed earlier) then initialise cleanup(); // Now run tests using JDBC methods doexample(); // Clean up the database cleanup(); // Finally close the database System.out.println("Now closing the connection"); st.close(); db.close(); //throw postgresql.Driver.notImplemented(); }
52522 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52522/8439a83d84fb159a790ed2b6d14d4151b9890857/basic.java/clean/src/interfaces/jdbc/example/basic.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 5337, 12, 780, 833, 63, 5717, 1216, 10403, 16, 13707, 16, 1860, 16, 6483, 225, 288, 565, 514, 880, 273, 833, 63, 20, 15533, 565, 514, 16575, 273, 833, 63, 21, 15533, 565, 514, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5337, 12, 780, 833, 63, 5717, 1216, 10403, 16, 13707, 16, 1860, 16, 6483, 225, 288, 565, 514, 880, 273, 833, 63, 20, 15533, 565, 514, 16575, 273, 833, 63, 21, 15533, 565, 514, 1...
if ((flags & 0x00004000) != 0 && resultLength >= 40) {
long contextH = -1; long contextL = -1; boolean containsContext = false; if (targetNameOffset != 32 && resultLength >= 40) {
public void parseChallenge(String challenge){ byte[] challengeBase64Bytes = HTTPAuthentication.getBytes(challenge, DEFAULT_CHARSET); byte[] resultBuffer = new byte[challengeBase64Bytes.length]; int resultLength = SVNBase64.base64ToByteArray(new StringBuffer(new String(challengeBase64Bytes)), resultBuffer); myNonce = new byte[8]; for (int i = 0; i < 8; i++) { myNonce[i] = resultBuffer[i + 24]; } byte[] flagBytes = new byte[4]; for (int i = 0; i < 4; i++) { flagBytes[i] = resultBuffer[i + 20]; } long flags = fromLong(flagBytes); //check for local call if ((flags & 0x00004000) != 0 && resultLength >= 40) { byte[] contextHBytes = new byte[4]; for (int i = 0; i < 4; i++) { contextHBytes[i] = resultBuffer[i + 32]; } long contextH = fromLong(contextHBytes); if (contextH != 0) { myIsNegotiateLocalCall = true; } else { myIsNegotiateLocalCall = false; } } else { myIsNegotiateLocalCall = false; } }
5695 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5695/6d6a01181844ebbf5b8ca0899185d3eb8ee8f064/HTTPNTLMAuthentication.java/clean/javasvn/src/org/tmatesoft/svn/core/internal/io/dav/http/HTTPNTLMAuthentication.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1109, 18359, 12, 780, 12948, 15329, 3639, 1160, 8526, 12948, 2171, 1105, 2160, 273, 2239, 6492, 18, 588, 2160, 12, 25092, 16, 3331, 67, 26977, 1769, 3639, 1160, 8526, 563, 1892, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1109, 18359, 12, 780, 12948, 15329, 3639, 1160, 8526, 12948, 2171, 1105, 2160, 273, 2239, 6492, 18, 588, 2160, 12, 25092, 16, 3331, 67, 26977, 1769, 3639, 1160, 8526, 563, 1892, ...
MonoReconciler reconciler= new MonoReconciler(new CReconcilingStrategy(fEditor), false);
MonoReconciler reconciler= new MonoReconciler(new CReconcilingStrategy(fTextEditor), false);
public IReconciler getReconciler(ISourceViewer sourceViewer) { if (fEditor != null && fEditor.isEditable()) { //Delay changed and non-incremental reconciler used due to //PR 130089 MonoReconciler reconciler= new MonoReconciler(new CReconcilingStrategy(fEditor), false); reconciler.setDelay(500); return reconciler; } return null; }
54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/0482b3954404fd528d629e737114a70d018a10db/CSourceViewerConfiguration.java/clean/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/CSourceViewerConfiguration.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 467, 426, 11504, 2895, 5561, 11504, 2895, 12, 45, 1830, 18415, 1084, 18415, 13, 288, 202, 202, 430, 261, 74, 6946, 480, 446, 597, 284, 6946, 18, 291, 15470, 10756, 288, 1082, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 467, 426, 11504, 2895, 5561, 11504, 2895, 12, 45, 1830, 18415, 1084, 18415, 13, 288, 202, 202, 430, 261, 74, 6946, 480, 446, 597, 284, 6946, 18, 291, 15470, 10756, 288, 1082, ...
try {
if ( file.canRead() && ! file.isDirectory() ) { try {
public JComponent getFullView() { if ( fullView == null ) { DetailViewer dv = new DetailViewer( this ); fullView = dv.getComponent(); dv.addSeparator(); dv.addKeyedItem( "Size", file.length() ); dv.addKeyedItem( "Last modified", new Date( file.lastModified() ).toString() ); dv.addKeyedItem( "Read access", file.canRead() ? "yes" : "no" ); dv.addKeyedItem( "Write access", file.canWrite() ? "yes" : "no" ); /* If it looks like a text file, add the option to view the * content. */ try { /* Use a DataSource to characterise it, making sure that it * doesn't try to decompress the thing. */ DataSource datsrc = new FileDataSource( file ) .forceCompression( Compression.NONE ); boolean isText = datsrc.isASCII(); boolean isHTML = datsrc.isHTML(); datsrc.close(); // HTML viewing does work but there are problems with it; // for one thing I can't make the HTML load asynchronously. // If I do have HTML viewing, I'm not sure if it should be // here or (more likely) an HTMLDataNode. // if ( isHTML ) { // dv.addPane( "HTML view", new ComponentMaker() { // public JComponent getComponent() throws IOException { // return new HTMLViewer( file ); // } // } ); // } if ( isText ) { dv.addPane( "File text", new ComponentMaker() { public JComponent getComponent() throws IOException { return new TextViewer( new FileReader( file ) ); } } ); } else { dv.addPane( "Hex dump", new ComponentMaker() { public JComponent getComponent() throws IOException { RandomAccessFile raf = new RandomAccessFile( file, "r" ); return new HexDumper( raf ); } } ); } } catch ( final IOException e ) { dv.addPane( "Error reading file", new ComponentMaker() { public JComponent getComponent() { return new TextViewer( e ); } } ); } } return fullView; }
48494 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48494/8b3f8610efbfee556558fb616a253f56118767a8/FileDataNode.java/clean/treeview/src/main/uk/ac/starlink/treeview/FileDataNode.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 29058, 10208, 1767, 1435, 288, 3639, 309, 261, 1983, 1767, 422, 446, 262, 288, 5411, 27931, 18415, 12494, 273, 394, 27931, 18415, 12, 333, 11272, 5411, 1983, 1767, 273, 12494, 18, 588...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 29058, 10208, 1767, 1435, 288, 3639, 309, 261, 1983, 1767, 422, 446, 262, 288, 5411, 27931, 18415, 12494, 273, 394, 27931, 18415, 12, 333, 11272, 5411, 1983, 1767, 273, 12494, 18, 588...
public void disposeComponent() { if (myTimer != null) { myTimer.stop(); myTimer = null; } }
56598 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56598/4972de74093751aa507c641e7a852c8feb15d5e3/ActionManagerImpl.java/clean/action-system/impl/com/intellij/openapi/actionSystem/impl/ActionManagerImpl.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1071, 6459, 2251, 4150, 1841, 1435, 95, 430, 12, 4811, 6777, 5, 33, 2011, 15329, 4811, 6777, 18, 5681, 5621, 4811, 6777, 33, 2011, 31, 9090, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1071, 6459, 2251, 4150, 1841, 1435, 95, 430, 12, 4811, 6777, 5, 33, 2011, 15329, 4811, 6777, 18, 5681, 5621, 4811, 6777, 33, 2011, 31, 9090, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
{}
{ return null; }
public Object getParsedDefaultValue() { if (_defaultValue != null) { try { switch (_typeCode) { case Types.TINYINT: case Types.SMALLINT: return new Short(_defaultValue); case Types.INTEGER: return new Integer(_defaultValue); case Types.BIGINT: return new Long(_defaultValue); case Types.DECIMAL: case Types.NUMERIC: return new BigDecimal(_defaultValue); case Types.REAL: return new Float(_defaultValue); case Types.DOUBLE: case Types.FLOAT: return new Double(_defaultValue); case Types.DATE: return Date.valueOf(_defaultValue); case Types.TIME: return Time.valueOf(_defaultValue); case Types.TIMESTAMP: return Timestamp.valueOf(_defaultValue); case Types.BIT: return ConvertUtils.convert(_defaultValue, Boolean.class); default: if (Jdbc3Utils.supportsJava14JdbcTypes() && (_typeCode == Jdbc3Utils.determineBooleanTypeCode())) { return ConvertUtils.convert(_defaultValue, Boolean.class); } break; } } catch (NumberFormatException ex) {} catch (IllegalArgumentException ex) {} } return _defaultValue; }
1224 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1224/90ae3bb67e0608ac43d591663ba238c23ed68500/Column.java/buggy/src/java/org/apache/ddlutils/model/Column.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 1033, 25406, 15646, 1435, 565, 288, 3639, 309, 261, 67, 27652, 480, 446, 13, 3639, 288, 5411, 775, 5411, 288, 7734, 1620, 261, 67, 723, 1085, 13, 7734, 288, 10792, 648, 7658, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 1033, 25406, 15646, 1435, 565, 288, 3639, 309, 261, 67, 27652, 480, 446, 13, 3639, 288, 5411, 775, 5411, 288, 7734, 1620, 261, 67, 723, 1085, 13, 7734, 288, 10792, 648, 7658, 18, ...
super.reset(); checkMonitorCanceled();
public synchronized void reset() throws IOException { // TODO }
45713 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45713/4cfb23bf0c3cfbad22f148e981d49bf1ca6def84/ProgressMonitorInputStream.java/clean/libraries/javalib/javax/swing/ProgressMonitorInputStream.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 2240, 18, 6208, 5621, 225, 866, 7187, 23163, 5621, 565, 2240, 18, 6208, 5621, 225, 866, 7187, 23163, 5621, 565, 1071, 9565, 18, 6208, 5621, 225, 866, 7187, 23163, 5621, 565, 3852, 9565, 18, 62...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 2240, 18, 6208, 5621, 225, 866, 7187, 23163, 5621, 565, 2240, 18, 6208, 5621, 225, 866, 7187, 23163, 5621, 565, 1071, 9565, 18, 6208, 5621, 225, 866, 7187, 23163, 5621, 565, 3852, 9565, 18, 62...
case 192: break;
case 195: break;
public Symbol next_token() throws java.io.IOException { int yyFlexInput; int yyFlexAction; int [] yyFlexTransL = YY_TRANS; int [] yyFlexRowMapL = YY_ROWMAP; int [] yyFlexAttrL = YY_ATTRIBUTE; int yyFlexPushbackPos_l = yyFlexPushbackPos = -1; boolean yy_was_pushback; while (true) { // cached fields: int yyFlexCurrentPosL; int yyFlexMarkedPosL = yyFlexMarkedPos; int yyFlexEndReadL = yyFlexEndRead; char [] yyFlexBufferL = yyFlexBuffer; char [] yyCMapL = YY_CMAP; boolean yyFlexR = false; for (yyFlexCurrentPosL = yyFlexStartRead; yyFlexCurrentPosL < yyFlexMarkedPosL; yyFlexCurrentPosL++) { switch (yyFlexBufferL[yyFlexCurrentPosL]) { case '\u000B': case '\u000C': case '\u0085': case '\u2028': case '\u2029': yyline++; yycolumn = 0; yyFlexR = false; break; case '\r': yyline++; yycolumn = 0; yyFlexR = true; break; case '\n': if (yyFlexR) yyFlexR = false; else { yyline++; yycolumn = 0; } break; default: yyFlexR = false; yycolumn++; } } if (yyFlexR) { // peek one character ahead if it is \n (if we have counted one line too much) boolean yyFlexPeek; if (yyFlexMarkedPosL < yyFlexEndReadL) yyFlexPeek = yyFlexBufferL[yyFlexMarkedPosL] == '\n'; else if (yyFlexAtEOF) yyFlexPeek = false; else { boolean eof = yyFlexRefill(); yyFlexMarkedPosL = yyFlexMarkedPos; yyFlexBufferL = yyFlexBuffer; if (eof) yyFlexPeek = false; else yyFlexPeek = yyFlexBufferL[yyFlexMarkedPosL] == '\n'; } if (yyFlexPeek) yyline--; } if (yyFlexMarkedPosL > yyFlexStartRead) { switch (yyFlexBufferL[yyFlexMarkedPosL-1]) { case '\n': case '\u000B': case '\u000C': case '\u0085': case '\u2028': case '\u2029': yyFlexAtBOL = true; break; case '\r': if (yyFlexMarkedPosL < yyFlexEndReadL) yyFlexAtBOL = yyFlexBufferL[yyFlexMarkedPosL] != '\n'; else if (yyFlexAtEOF) yyFlexAtBOL = false; else { boolean eof = yyFlexRefill(); yyFlexMarkedPosL = yyFlexMarkedPos; yyFlexBufferL = yyFlexBuffer; if (eof) yyFlexAtBOL = false; else yyFlexAtBOL = yyFlexBufferL[yyFlexMarkedPosL] != '\n'; } break; default: yyFlexAtBOL = false; } } yyFlexAction = -1; yyFlexCurrentPosL = yyFlexCurrentPos = yyFlexStartRead = yyFlexMarkedPosL; if (yyFlexAtBOL) yyFlexState = YY_LEXSTATE[yyFlexLexicalState+1]; else yyFlexState = YY_LEXSTATE[yyFlexLexicalState]; yy_was_pushback = false; yy_forAction: { while (true) { if (yyFlexCurrentPosL < yyFlexEndReadL) yyFlexInput = yyFlexBufferL[yyFlexCurrentPosL++]; else if (yyFlexAtEOF) { yyFlexInput = YYEOF; break yy_forAction; } else { // store back cached positions yyFlexCurrentPos = yyFlexCurrentPosL; yyFlexMarkedPos = yyFlexMarkedPosL; yyFlexPushbackPos = yyFlexPushbackPos_l; boolean eof = yyFlexRefill(); // get translated positions and possibly new buffer yyFlexCurrentPosL = yyFlexCurrentPos; yyFlexMarkedPosL = yyFlexMarkedPos; yyFlexBufferL = yyFlexBuffer; yyFlexEndReadL = yyFlexEndRead; yyFlexPushbackPos_l = yyFlexPushbackPos; if (eof) { yyFlexInput = YYEOF; break yy_forAction; } else { yyFlexInput = yyFlexBufferL[yyFlexCurrentPosL++]; } } int yyFlexNext = yyFlexTransL[ yyFlexRowMapL[yyFlexState] + yyCMapL[yyFlexInput] ]; if (yyFlexNext == -1) break yy_forAction; yyFlexState = yyFlexNext; int yyFlexAttributes = yyFlexAttrL[yyFlexState]; if ( (yyFlexAttributes & 2) == 2 ) yyFlexPushbackPos_l = yyFlexCurrentPosL; if ( (yyFlexAttributes & 1) == 1 ) { yy_was_pushback = (yyFlexAttributes & 4) == 4; yyFlexAction = yyFlexState; yyFlexMarkedPosL = yyFlexCurrentPosL; if ( (yyFlexAttributes & 8) == 8 ) break yy_forAction; } } } // store back cached position yyFlexMarkedPos = yyFlexMarkedPosL; if (yy_was_pushback) yyFlexMarkedPos = yyFlexPushbackPos_l; switch (yyFlexAction < 0 ? yyFlexAction : YY_ACTION[yyFlexAction]) { case 85: { return symbol(FULL); } case 141: break; case 92: { debugOption = true; } case 142: break; case 57: { return symbol(CHAR,new Character('\t')); } case 143: break; case 107: { throw new ScannerException(file,ErrorMessages.NO_BUFFER_SIZE, yyline); } case 144: break; case 91: { isYYEOF = true; } case 145: break; case 54: { return symbol(CHAR, new Character(yytext().charAt(1))); } case 146: break; case 11: { yybegin(REGEXP); } case 147: break; case 112: { isAbstract = true; } case 148: break; case 101: { initCode = conc(initCode,string); yybegin(MACROS); } case 149: break; case 45: { throw new ScannerException(file,ErrorMessages.UNEXPECTED_NL, yyline, yycolumn); } case 150: break; case 12: { return symbol_countUpdate(RBRACE, null); } case 151: break; case 74: { return symbol(REPEAT, new Integer(yytext().substring(1).trim())); } case 152: break; case 55: { return symbol(CHAR, new Character( (char) Integer.parseInt(yytext().substring(1,yytext().length()), 8))); } case 153: break; case 97: { columnCount = true; } case 154: break; case 122: { return symbol(LETTERCLASS); } case 155: break; case 15: { if (macroDefinition) { yybegin(MACROS); } return symbol(REGEXPEND); } case 156: break; case 77: { inclusive_states = true; yybegin(STATELIST); } case 157: break; case 56: { return symbol(CHAR,new Character('\n')); } case 158: break; case 81: { return symbol(MACROUSE, yytext().substring(1,yytext().length()-1)); } case 159: break; case 25: { return symbol(OPENBRACKET); } case 160: break; case 123: { throw new ScannerException(file,ErrorMessages.QUIL_INITTHROW, yyline); } case 161: break; case 126: { visibility = "private"; Skeleton.makePrivate(); } case 162: break; case 49: { commentbalance++; } case 163: break; case 9: { throw new ScannerException(file,ErrorMessages.UNKNOWN_OPTION, yyline, yycolumn); } case 164: break; case 68: { string.append('\n'); } case 165: break; case 33: { balance++; actionText.append('{'); } case 166: break; case 48: { if (commentbalance > 0) commentbalance--; else yybegin(nextState); } case 167: break; case 67: { string.append('\"'); } case 168: break; case 95: { tokenType = yytext().substring(6).trim(); } case 169: break; case 79: { return symbol_countUpdate(MACROUSE, makeMacroIdent()); } case 170: break; case 14: { return symbol(CHAR, new Character(yytext().charAt(0))); } case 171: break; case 32: { if (balance > 0) { balance--; actionText.append('}'); } else { yybegin(REGEXPSTART); Action a = new Action(actionText.toString(), action_line); actions.addElement(a); return symbol(ACTION, a); } } case 172: break; case 108: { actionText.setLength(0); yybegin(JAVA_CODE); action_line = yyline+1; return symbol_countUpdate(EOFRULE, null); } case 173: break; case 120: { isExtending = yytext().substring(9).trim(); } case 174: break; case 113: { cupSymbol = yytext().substring(8).trim(); if (cupCompatible) Out.warning(ErrorMessages.CUPSYM_AFTER_CUP, yyline); } case 175: break; case 63: { yybegin(REPEATEXP); return symbol(REPEAT, new Integer(yytext().trim().substring(1).trim())); } case 176: break; case 88: { packed = true; useRowMap = true; } case 177: break; case 27: { return symbol(PLUS); } case 178: break; case 99: { isPublic = true; } case 179: break; case 70: { string.append('\r'); } case 180: break; case 76: { inclusive_states = false; yybegin(STATELIST); } case 181: break; case 3: { userCode.append(yytext()); } case 182: break; case 19: { lookAheadUsed = true; return symbol(LOOKAHEAD); } case 183: break; case 110: { lexThrow = concExc(lexThrow,yytext().substring(8).trim()); } case 184: break; case 26: { return symbol(CLOSEBRACKET); } case 185: break; case 80: { string.append( (char) Integer.parseInt(yytext().substring(2,yytext().length()), 16)); } case 186: break; case 37: { throw new ScannerException(file,ErrorMessages.UNTERMINATED_STR, yyline, yycolumn); } case 187: break; case 111: { eofCode = conc(eofCode, " yyclose();"); eofThrow = concExc(eofThrow, "java.io.IOException"); } case 188: break; case 69: { string.append('\t'); } case 189: break; case 23: { return symbol(BANG); } case 190: break; case 17: { yybegin(CHARCLASS); return symbol(OPENCLASS); } case 191: break; case 114: { cupDebug = true; } case 192: break; case 87: { charCount = true; } case 193: break; case 58: { return symbol(CHAR,new Character('\r')); } case 194: break; case 66: { string.append( (char) Integer.parseInt(yytext().substring(1,yytext().length()), 8)); } case 195: break; case 134: { scanErrorException = yytext().substring(11).trim(); } case 196: break; case 60: { return symbol(CHAR,new Character('\b')); } case 197: break; case 35: { yybegin(REGEXP); return symbol(MORETHAN); } case 198: break; case 132: { isImplementing = concExc(isImplementing, yytext().substring(12).trim()); } case 199: break; case 78: { return symbol(CHAR, new Character( (char) Integer.parseInt(yytext().substring(2,yytext().length()), 16))); } case 200: break; case 90: { isFinal = true; } case 201: break; case 137: { return symbol(UPPERCLASS); } case 202: break; case 46: { yybegin(REGEXP); return symbol(RBRACE); } case 203: break; case 51: { Out.warning(ErrorMessages.NOT_AT_BOL, yyline); yypushback(1); } case 204: break; case 28: { return symbol(QUESTION); } case 205: break; case 36: { string.append(yytext()); } case 206: break; case 135: { initThrow = concExc(initThrow,string); yybegin(MACROS); } case 207: break; case 140: { return symbol(JLETTERDIGITCLASS); } case 208: break; case 53: { nextState = REGEXPSTART; yybegin(COMMENT); } case 209: break; case 130: { eofThrow = concExc(eofThrow,string); yybegin(MACROS); } case 210: break; case 61: { actionText.setLength(0); yybegin(JAVA_CODE); action_line = yyline+1; return symbol(REGEXPEND); } case 211: break; case 138: { return symbol(LOWERCLASS); } case 212: break; case 38: { yybegin(nextState); return symbol(STRING, string.toString()); } case 213: break; case 82: { classCode = conc(classCode,string); yybegin(MACROS); } case 214: break; case 8: { return symbol(IDENT, yytext()); } case 215: break; case 43: { return symbol(HAT); } case 216: break; case 29: { lookAheadUsed = true; return symbol(DOLLAR); } case 217: break; case 124: { eofThrow = concExc(eofThrow,yytext().substring(10).trim()); } case 218: break; case 5: { states.insert(yytext(),inclusive_states); } case 219: break; case 84: { cupCompatible = true; isImplementing = concExc(isImplementing, "java_cup.runtime.Scanner"); if (functionName == null) functionName = "next_token"; if (tokenType == null) tokenType = "java_cup.runtime.Symbol"; if (eofVal == null) eofVal = "return new java_cup.runtime.Symbol("+cupSymbol+".EOF);"; eofCode = conc(eofCode, " yyclose();"); eofThrow = concExc(eofThrow, "java.io.IOException"); } case 220: break; case 127: { standalone = true; isInteger = true; } case 221: break; case 4: { throw new ScannerException(file,ErrorMessages.UNEXPECTED_CHAR, yyline, yycolumn); } case 222: break; case 47: { t.start(); yybegin(MACROS); macroDefinition = true; return symbol(USERCODE,userCode); } case 223: break; case 59: { return symbol(CHAR,new Character('\f')); } case 224: break; case 94: { eofCode = conc(eofCode,string); yybegin(MACROS); } case 225: break; case 65: { string.append(yytext().charAt(1)); } case 226: break; case 115: { caseless = true; } case 227: break; case 39: { throw new ScannerException(file,ErrorMessages.EOL_IN_CHARCLASS,yyline,yycolumn); } case 228: break; case 117: { return symbol(DIGITCLASS); } case 229: break; case 64: { if (macroDefinition) { yybegin(EATWSPNL); return symbol(BAR); } else { yybegin(REGEXPSTART); return symbol(NOACTION); } } case 230: break; case 30: { bolUsed = true; return symbol(HAT); } case 231: break; case 105: { throw new ScannerException(file,ErrorMessages.QUIL_CUPSYM, yyline); } case 232: break; case 102: { isIntWrap = true; } case 233: break; case 41: { if (balance > 0) balance--; else yybegin(REGEXP); return symbol(CLOSECLASS); } case 234: break; case 116: { bufferSize = Integer.parseInt(yytext().substring(8).trim()); } case 235: break; case 31: { actionText.append(yytext()); } case 236: break; case 86: { lineCount = true; } case 237: break; case 128: { throw new ScannerException(file,ErrorMessages.QUIL_SCANERROR, yyline); } case 238: break; case 104: { throw new ScannerException(file,ErrorMessages.QUIL_THROW, yyline); } case 239: break; case 83: { isInteger = true; } case 240: break; case 129: { return symbol(JLETTERCLASS); } case 241: break; case 98: { isInteger = true; if (eofVal == null) eofVal = "return 0;"; eofCode = conc(eofCode, " yyclose();"); eofThrow = concExc(eofThrow, "java.io.IOException"); } case 242: break; case 18: { return symbol(STAR); } case 243: break; case 121: { throw new ScannerException(file,ErrorMessages.QUIL_EOFTHROW, yyline); } case 244: break; case 44: { return symbol(DASH); } case 245: break; case 106: { className = yytext().substring(7).trim(); } case 246: break; case 62: { nextState = REGEXP; yybegin(COMMENT); } case 247: break; case 136: { lexThrow = concExc(lexThrow,yytext().substring(12).trim()); } case 248: break; case 22: { return symbol(BAR); } case 249: break; case 125: { functionName = yytext().substring(10).trim(); } case 250: break; case 13: { yybegin(STATES); return symbol_countUpdate(LESSTHAN, null); } case 251: break; case 119: { eofVal = string.toString(); yybegin(MACROS); } case 252: break; case 73: { yypushback(1); yycolumn--; return symbol(CHAR, new Character(yytext().charAt(0))); } case 253: break; case 24: { return symbol(TILDE); } case 254: break; case 139: { lexThrow = concExc(lexThrow,string); yybegin(MACROS); } case 255: break; case 103: { notUnix = true; } case 256: break; case 89: { packed = false; useRowMap = true; } case 257: break; case 20: { string.setLength(0); nextState = REGEXP; yybegin(STRING_CONTENT); } case 258: break; case 2: { /* ignore */ } case 259: break; case 93: { return symbol(UNICODE); } case 260: break; case 16: { return symbol(POINT); } case 261: break; case 72: { string.append('\b'); } case 262: break; case 21: { yybegin(REGEXPSTART); return symbol(LBRACE); } case 263: break; case 131: { initThrow = concExc(initThrow,yytext().substring(11).trim()); } case 264: break; case 96: { packed = false; useRowMap = false; } case 265: break; case 7: { yybegin(MACROS); } case 266: break; case 75: { string.setLength(0); yybegin(COPY); } case 267: break; case 42: { string.setLength(0); nextState = CHARCLASS; yybegin(STRING_CONTENT); } case 268: break; case 118: { actionText.setLength(0); yybegin(JAVA_CODE); action_line = yyline+1; return symbol(EOFRULE); } case 269: break; case 52: { macroDefinition = false; yybegin(REGEXPSTART); return symbol(DELIMITER); } case 270: break; case 50: { nextState = MACROS; yybegin(COMMENT); } case 271: break; case 10: { yybegin(REGEXP); return symbol(EQUALS); } case 272: break; case 34: { return symbol(COMMA); } case 273: break; case 1: { return symbol(EOF); } case 274: break; case 100: { throw new ScannerException(file,ErrorMessages.EOF_WO_ACTION); } case 275: break; case 71: { string.append('\f'); } case 276: break; case 40: { balance++; return symbol(OPENCLASS); } case 277: break; case 133: { throw new ScannerException(file,ErrorMessages.QUIL_YYLEXTHROW, yyline); } case 278: break; case 109: { File f = new File(yytext().substring(9).trim()); if ( !f.canRead() ) throw new ScannerException(file,ErrorMessages.NOT_READABLE, yyline); // check for cycle if (files.search(f) > 0) throw new ScannerException(file,ErrorMessages.FILE_CYCLE, yyline); try { yypushStream( new FileReader(f) ); files.push(file); file = f; Out.println("Including \""+file+"\""); } catch (FileNotFoundException e) { throw new ScannerException(file,ErrorMessages.NOT_READABLE, yyline); } } case 279: break; case 6: { } case 280: break; default: if (yyFlexInput == YYEOF && yyFlexStartRead == yyFlexCurrentPos) { yyFlexAtEOF = true; yyFlexDoEOF(); switch (yyFlexLexicalState) { case STRING_CONTENT: { throw new ScannerException(file,ErrorMessages.EOF_IN_STRING); } case 745: break; case MACROS: { if ( yymoreStreams() ) { file = (File) files.pop(); yypopStream(); } else throw new ScannerException(file,ErrorMessages.EOF_IN_MACROS); } case 746: break; case STATELIST: { throw new ScannerException(file,ErrorMessages.EOF_IN_MACROS); } case 747: break; case CHARCLASS: { throw new ScannerException(file,ErrorMessages.EOF_IN_REGEXP); } case 748: break; case JAVA_CODE: { throw new ScannerException(file,ErrorMessages.EOF_IN_ACTION, action_line-1); } case 749: break; case REPEATEXP: { throw new ScannerException(file,ErrorMessages.EOF_IN_REGEXP); } case 750: break; case COMMENT: { throw new ScannerException(file,ErrorMessages.EOF_IN_COMMENT); } case 751: break; case STATES: { throw new ScannerException(file,ErrorMessages.EOF_IN_STATES); } case 752: break; case COPY: { throw new ScannerException(file,ErrorMessages.EOF_IN_MACROS); } case 753: break; default: { if ( yymoreStreams() ) { file = (File) files.pop(); yypopStream(); } else return symbol(EOF); } } } else { yyFlexScanError(YY_NO_MATCH); } } } }
6220 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6220/9b61944465740d14ca2a4b7d70253b3cd65d7570/LexScan.java/clean/jflex/src/JFlex/LexScan.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 8565, 1024, 67, 2316, 1435, 1216, 2252, 18, 1594, 18, 14106, 288, 565, 509, 9016, 19667, 1210, 31, 565, 509, 9016, 19667, 1803, 31, 565, 509, 5378, 9016, 19667, 1429, 48, 273, 1624,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8565, 1024, 67, 2316, 1435, 1216, 2252, 18, 1594, 18, 14106, 288, 565, 509, 9016, 19667, 1210, 31, 565, 509, 9016, 19667, 1803, 31, 565, 509, 5378, 9016, 19667, 1429, 48, 273, 1624,...
this.peerCryptoGroup = DSAGroup.create(fs.subset("dsaGroup")); this.peerPubKey = DSAPublicKey.create(fs.subset("dsaPubKey"), peerCryptoGroup);
SimpleFieldSet sfs = fs.subset("dsaGroup"); if(sfs == null) this.peerCryptoGroup = null; else this.peerCryptoGroup = DSAGroup.create(sfs); sfs = fs.subset("dsaPubKey"); if(sfs == null) this.peerPubKey = null; else this.peerPubKey = DSAPublicKey.create(sfs, peerCryptoGroup);
public PeerNode(SimpleFieldSet fs, Node node2, boolean fromLocal) throws FSParseException, PeerParseException, ReferenceSignatureVerificationException { logMINOR = Logger.shouldLog(Logger.MINOR, this); this.node = node2; String identityString = fs.get("identity"); if(identityString == null) throw new PeerParseException("No identity!"); try { identity = Base64.decode(identityString); } catch (NumberFormatException e) { throw new FSParseException(e); } catch (IllegalBase64Exception e) { throw new FSParseException(e); } MessageDigest md; try { md = MessageDigest.getInstance("SHA-256"); } catch (NoSuchAlgorithmException e2) { throw new Error(e2); } if(identity == null) throw new FSParseException("No identity"); identityHash = md.digest(identity); hashCode = Fields.hashCode(identityHash); version = fs.get("version"); Version.seenVersion(version); String locationString = fs.get("location"); if(locationString == null) throw new FSParseException("No location"); currentLocation = new Location(locationString); // FIXME make mandatory once everyone has upgraded lastGoodVersion = fs.get("lastGoodVersion"); String name = fs.get("myName"); if(name == null) throw new FSParseException("No name"); myName = name; String testnet = fs.get("testnet"); testnetEnabled = testnet == null ? false : (testnet.equalsIgnoreCase("true") || testnet.equalsIgnoreCase("yes")); if(testnetEnabled != node.testnetEnabled) { String err = "Ignoring incompatible node "+detectedPeer+" - peer.testnet="+testnetEnabled+"("+testnet+") but node.testnet="+node.testnetEnabled; Logger.error(this, err); throw new PeerParseException(err); } nominalPeer=new Vector(); nominalPeer.removeAllElements(); try{ String physical[]=fs.getAll("physical.udp"); if(physical==null){ // Be tolerant of nonexistent domains. Peer p = new Peer(fs.get("physical.udp"), true); if(p != null) nominalPeer.addElement(p); }else{ for(int i=0;i<physical.length;i++){ Peer p = new Peer(physical[i], true); if(!nominalPeer.contains(p)) nominalPeer.addElement(p); } } } catch (Exception e1) { throw new FSParseException(e1); } if(nominalPeer.isEmpty()) { Logger.normal(this, "No IP addresses found for identity '"+Base64.encode(identity)+"', possibly at location '"+Double.toString(currentLocation.getValue())+"' with name '"+getName()+"'"); detectedPeer = null; } else { detectedPeer = (Peer) nominalPeer.firstElement(); } /* Read the DSA key material for the peer */ try { this.peerCryptoGroup = DSAGroup.create(fs.subset("dsaGroup")); this.peerPubKey = DSAPublicKey.create(fs.subset("dsaPubKey"), peerCryptoGroup); String signature = fs.get("sig"); fs.removeValue("sig"); this.isSignatureVerificationSuccessfull = DSA.verify(peerPubKey, new DSASignature(signature), new BigInteger(fs.toOrderedString().getBytes())); if(!isSignatureVerificationSuccessfull){ Logger.error(this, "The integrity of the reference has been compromized!"); throw new ReferenceSignatureVerificationException("The integrity of the reference has been compromized!"); } } catch (IllegalBase64Exception e) { Logger.error(this, "Caught "+e, e); throw new FSParseException(e); } catch (NullPointerException npe){ /* FIXME: REMOVE: backward compatibility hack */ Logger.normal(this, "Probably trying to add an old reference : "+npe); this.isSignatureVerificationSuccessfull=false; } /* FIXME: All the following is useless once we have definitely switched to STS! */ // Setup incoming and outgoing setup ciphers byte[] nodeKey = node.identityHash; byte[] nodeKeyHash = node.identityHashHash; byte[] setupKeyHash = md.digest(identityHash); int digestLength = md.getDigestLength(); incomingSetupKey = new byte[digestLength]; for(int i=0;i<incomingSetupKey.length;i++) incomingSetupKey[i] = (byte) (nodeKey[i] ^ setupKeyHash[i]); outgoingSetupKey = new byte[digestLength]; for(int i=0;i<outgoingSetupKey.length;i++) outgoingSetupKey[i] = (byte) (nodeKeyHash[i] ^ identityHash[i]); if(logMINOR) Logger.minor(this, "Keys:\nIdentity: "+HexUtil.bytesToHex(node.myIdentity)+ "\nThisIdent: "+HexUtil.bytesToHex(identity)+ "\nNode: "+HexUtil.bytesToHex(nodeKey)+ "\nNode hash: "+HexUtil.bytesToHex(nodeKeyHash)+ "\nThis: "+HexUtil.bytesToHex(identityHash)+ "\nThis hash: "+HexUtil.bytesToHex(setupKeyHash)+ "\nFor: "+getDetectedPeer()); try { incomingSetupCipher = new Rijndael(256,256); incomingSetupCipher.initialize(incomingSetupKey); outgoingSetupCipher = new Rijndael(256,256); outgoingSetupCipher.initialize(outgoingSetupKey); } catch (UnsupportedCipherException e1) { Logger.error(this, "Caught: "+e1); throw new Error(e1); } // Don't create trackers until we have a key currentTracker = null; previousTracker = null; timeLastSentPacket = -1; timeLastReceivedPacket = -1; timeLastReceivedSwapRequest = -1; timeLastConnected = -1; timeLastRoutable = -1; randomizeMaxTimeBetweenPacketSends(); swapRequestsInterval = new SimpleRunningAverage(50, Node.MIN_INTERVAL_BETWEEN_INCOMING_SWAP_REQUESTS); // Not connected yet; need to handshake isConnected = false; node.addPeerNodeStatus(Node.PEER_NODE_STATUS_DISCONNECTED, this); messagesToSendNow = new LinkedList(); decrementHTLAtMaximum = node.random.nextFloat() < Node.DECREMENT_AT_MAX_PROB; decrementHTLAtMinimum = node.random.nextFloat() < Node.DECREMENT_AT_MIN_PROB; pingNumber = node.random.nextLong(); // A SimpleRunningAverage would be a bad choice because it would cause oscillations. // So go for a filter. pingAverage = new TimeDecayingRunningAverage(1, 600*1000 /* should be significantly longer than a typical transfer */, 0, Long.MAX_VALUE); // TDRA for probability of rejection pRejected = new TimeDecayingRunningAverage(0, 600*1000, 0.0, 1.0); // ARK stuff. parseARK(fs, true); // Now for the metadata. // The metadata sub-fieldset contains data about the node which is not part of the node reference. // It belongs to this node, not to the node being described. // Therefore, if we are parsing a remotely supplied ref, ignore it. long now = System.currentTimeMillis(); if(fromLocal) { SimpleFieldSet metadata = fs.subset("metadata"); if(metadata != null) { // Don't be tolerant of nonexistant domains; this should be an IP address. Peer p; try { String detectedUDPString = metadata.get("detected.udp"); p = null; if(detectedUDPString != null) p = new Peer(detectedUDPString, false); } catch (UnknownHostException e) { p = null; Logger.error(this, "detected.udp = "+metadata.get("detected.udp")+" - "+e, e); } catch (PeerParseException e) { p = null; Logger.error(this, "detected.udp = "+metadata.get("detected.udp")+" - "+e, e); } if(p != null) detectedPeer = p; String tempTimeLastReceivedPacketString = metadata.get("timeLastReceivedPacket"); if(tempTimeLastReceivedPacketString != null) { long tempTimeLastReceivedPacket = Long.parseLong(tempTimeLastReceivedPacketString); timeLastReceivedPacket = tempTimeLastReceivedPacket; } String tempTimeLastConnectedString = metadata.get("timeLastConnected"); if(tempTimeLastConnectedString != null) { long tempTimeLastConnected = Long.parseLong(tempTimeLastConnectedString); timeLastConnected = tempTimeLastConnected; } String tempTimeLastRoutableString = metadata.get("timeLastRoutable"); if(tempTimeLastRoutableString != null) { long tempTimeLastRoutable = Long.parseLong(tempTimeLastRoutableString); timeLastRoutable = tempTimeLastRoutable; } if(timeLastConnected < 1 && timeLastReceivedPacket > 1) { timeLastConnected = timeLastReceivedPacket; } if(timeLastRoutable < 1 && timeLastReceivedPacket > 1) { timeLastRoutable = timeLastReceivedPacket; } String tempPeerAddedTimeString = metadata.get("peerAddedTime"); if(tempPeerAddedTimeString != null) { long tempPeerAddedTime = Long.parseLong(tempPeerAddedTimeString); peerAddedTime = tempPeerAddedTime; } else { peerAddedTime = 0; } neverConnected = Fields.stringToBool(metadata.get("neverConnected"), false); if((now - peerAddedTime) > (((long) 30)*24*60*60*1000)) { // 30 days peerAddedTime = 0; // don't store anymore } if(!neverConnected) { peerAddedTime = 0; // don't store anymore } isDisabled = Fields.stringToBool(metadata.get("isDisabled"), false); isListenOnly = Fields.stringToBool(metadata.get("isListenOnly"), false); isBurstOnly = Fields.stringToBool(metadata.get("isBurstOnly"), false); allowLocalAddresses = Fields.stringToBool(metadata.get("allowLocalAddresses"), false); } } else { neverConnected = true; peerAddedTime = now; } // populate handshakeIPs so handshakes can start ASAP lastAttemptedHandshakeIPUpdateTime=0; maybeUpdateHandshakeIPs(true); sendHandshakeTime = now; // Be sure we're ready to handshake right away listeningHandshakeBurstCount = 0; listeningHandshakeBurstSize = Node.MIN_BURSTING_HANDSHAKE_BURST_SIZE + node.random.nextInt(Node.RANDOMIZED_BURSTING_HANDSHAKE_BURST_SIZE); if(isBurstOnly) { Logger.minor(this, "First BurstOnly mode handshake in "+(sendHandshakeTime - now)+"ms for "+getName()+" (count: "+listeningHandshakeBurstCount+", size: "+listeningHandshakeBurstSize+")"); } // status may have changed from PEER_NODE_STATUS_DISCONNECTED to PEER_NODE_STATUS_NEVER_CONNECTED setPeerNodeStatus(now); // Setup the private darknet comment note privateDarknetComment = new String(); privateDarknetCommentFileNumber = -1; // Setup the extraPeerDataFileNumbers extraPeerDataFileNumbers = new Vector(); extraPeerDataFileNumbers.removeAllElements(); // Setup the queuedToSendN2NTMExtraPeerDataFileNumbers queuedToSendN2NTMExtraPeerDataFileNumbers = new Vector(); queuedToSendN2NTMExtraPeerDataFileNumbers.removeAllElements(); }
46035 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46035/54b58d5a98907bfb2296c0fea2a4e5f0489e9e75/PeerNode.java/clean/src/freenet/node/PeerNode.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 10669, 907, 12, 5784, 974, 694, 2662, 16, 2029, 756, 22, 16, 1250, 628, 2042, 13, 1216, 9247, 13047, 16, 10669, 13047, 16, 6268, 5374, 13483, 503, 288, 377, 202, 1330, 6236, 916, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 10669, 907, 12, 5784, 974, 694, 2662, 16, 2029, 756, 22, 16, 1250, 628, 2042, 13, 1216, 9247, 13047, 16, 10669, 13047, 16, 6268, 5374, 13483, 503, 288, 377, 202, 1330, 6236, 916, ...
CLIENT_SETTINGS.put( "relayMovesManeuver", "true" );
private static synchronized void initializeMaps() { // Do not initialize the maps more than once, as this // would not serve any purpose. if ( !CLIENT_SETTINGS.isEmpty() ) return; CLIENT_SETTINGS.put( "alwaysGetBreakfast", "true" ); CLIENT_SETTINGS.put( "autoLogin", "" ); CLIENT_SETTINGS.put( "autoRepairBoxes", "false" ); CLIENT_SETTINGS.put( "autoSatisfyChecks", "false" ); CLIENT_SETTINGS.put( "autoSaveChatLogs", "true" ); CLIENT_SETTINGS.put( "battleStop", "0.0" ); CLIENT_SETTINGS.put( "breakfastSoftcore", "Summon Snowcone,Summon Hilarious Objects,Advanced Saucecrafting,Pastamastery,Advanced Cocktailcrafting" ); CLIENT_SETTINGS.put( "breakfastHardcore", "Summon Snowcone,Advanced Saucecrafting,Pastamastery,Advanced Cocktailcrafting" ); CLIENT_SETTINGS.put( "browserBookmarks", "" ); CLIENT_SETTINGS.put( "chatStyle", "0" ); CLIENT_SETTINGS.put( "chosenTrip", "" ); CLIENT_SETTINGS.put( "clanRosterHeader", ClanSnapshotTable.getDefaultHeader() ); CLIENT_SETTINGS.put( "cloverProtectActive", "false" ); CLIENT_SETTINGS.put( "createWithoutBoxServants", "false" ); CLIENT_SETTINGS.put( "defaultDropdown1", "0" ); CLIENT_SETTINGS.put( "defaultDropdown2", "1" ); CLIENT_SETTINGS.put( "defaultLimit", "5" ); CLIENT_SETTINGS.put( "defaultToRelayBrowser", "true" ); CLIENT_SETTINGS.put( "eSoluScriptType", "0" ); CLIENT_SETTINGS.put( "fontSize", "3" ); CLIENT_SETTINGS.put( "guiUsesOneWindow", "false" ); CLIENT_SETTINGS.put( "highlightList", "" ); CLIENT_SETTINGS.put( "http.proxyHost", "" ); CLIENT_SETTINGS.put( "http.proxyPort", "" ); CLIENT_SETTINGS.put( "http.proxyUser", "" ); CLIENT_SETTINGS.put( "http.proxyPassword", "" ); CLIENT_SETTINGS.put( "initialDesktop", "AdventureFrame,MallSearchFrame,SkillBuffFrame" ); CLIENT_SETTINGS.put( "initialFrames", "EventsFrame" ); CLIENT_SETTINGS.put( "lastUsername", "" ); CLIENT_SETTINGS.put( "loginServer", "0" ); CLIENT_SETTINGS.put( "luckySewerAdventure", "stolen accordion" ); CLIENT_SETTINGS.put( "makeBrowserDecisions", "false" ); CLIENT_SETTINGS.put( "proxySet", "false" ); CLIENT_SETTINGS.put( "relayAddsCommandLineLinks", "true" ); CLIENT_SETTINGS.put( "relayAddsSimulatorLinks", "true" ); CLIENT_SETTINGS.put( "relayAddsUseLinks", "true" ); CLIENT_SETTINGS.put( "relayMovesManeuver", "true" ); CLIENT_SETTINGS.put( "relayAddsPlinking", "false" ); CLIENT_SETTINGS.put( "saveState", "" ); CLIENT_SETTINGS.put( "scriptButtonPosition", "0" ); CLIENT_SETTINGS.put( "scriptList", "win game" ); CLIENT_SETTINGS.put( "serverFriendly", "false" ); CLIENT_SETTINGS.put( "showAdventureZone", "true" ); CLIENT_SETTINGS.put( "showAllRequests", "false" ); CLIENT_SETTINGS.put( "showClosetDrivenCreations", "true" ); CLIENT_SETTINGS.put( "sortAdventures", "false" ); CLIENT_SETTINGS.put( "toolbarPosition", "1" ); CLIENT_SETTINGS.put( "useSystemTrayIcon", "false" ); CLIENT_SETTINGS.put( "usePopupContacts", "1" ); CLIENT_SETTINGS.put( "useTabbedChat", "1" ); CLIENT_SETTINGS.put( "useTextHeavySidepane", "true" ); CLIENT_SETTINGS.put( "useToolbars", "true" ); CLIENT_SETTINGS.put( "violetFogGoal", "0" ); CLIENT_SETTINGS.put( "zoneExcludeList", "Removed" ); PLAYER_SETTINGS.put( "battleAction", "attack" ); PLAYER_SETTINGS.put( "betweenBattleScript", "" ); PLAYER_SETTINGS.put( "buffBotCasting", "" ); PLAYER_SETTINGS.put( "buffBotMessageDisposal", "0" ); PLAYER_SETTINGS.put( "currentMood", "default" ); PLAYER_SETTINGS.put( "hpAutoRecovery", "0.3" ); PLAYER_SETTINGS.put( "hpAutoRecoveryTarget", "1.0" ); PLAYER_SETTINGS.put( "hpAutoRecoveryItems", "tongue of the otter;soft green echo eyedrop antidote;tiny house;cannelloni cocoon;scroll of drastic healing;medicinal herb's medicinal herbs;tongue of the walrus;lasagna bandages;disco power nap;disco nap;phonics down;cast;doc galaktik's homeopathic elixir;doc galaktik's restorative balm;doc galaktik's pungent unguent;doc galaktik's ailment ointment" ); PLAYER_SETTINGS.put( "invalidBuffMessage", "You sent an amount which was not a valid buff amount." ); PLAYER_SETTINGS.put( "lastFaucetLocation", "-1" ); PLAYER_SETTINGS.put( "lastFaucetUse", "0: " ); PLAYER_SETTINGS.put( "lastAdventure", "" ); PLAYER_SETTINGS.put( "lastMessageID", "" ); PLAYER_SETTINGS.put( "mpAutoRecovery", "0.0" ); PLAYER_SETTINGS.put( "mpAutoRecoveryTarget", "0.0" ); PLAYER_SETTINGS.put( "mpAutoRecoveryItems", "Dyspepsi-Cola;Cloaca-Cola;phonics down;Knob Goblin superseltzer;Knob Goblin seltzer;magical mystery juice;soda water" ); PLAYER_SETTINGS.put( "nextAdventure", "" ); PLAYER_SETTINGS.put( "retrieveContacts", "true" ); PLAYER_SETTINGS.put( "thanksMessage", "Thank you for the donation!" ); PLAYER_SETTINGS.put( "whiteList", "" ); // These are settings related to choice adventures. // Ensure that they exist, and if they do not, load // them to their default settings. // KoL no longer allows you to "ignore" a choice adventure, // although some of them have a setting that is the equivalent // of "ignore". // Choices that have an "ignore" setting: use ensureProperty // Choices that have no "ignore" setting: use ensureNonZeroProperty CLIENT_SETTINGS.put( "choiceAdventure2", "2" ); CLIENT_SETTINGS.put( "choiceAdventure3", "3" ); CLIENT_SETTINGS.put( "choiceAdventure4", "3" ); CLIENT_SETTINGS.put( "choiceAdventure5", "2" ); CLIENT_SETTINGS.put( "choiceAdventure7", "2" ); CLIENT_SETTINGS.put( "choiceAdventure8", "3" ); CLIENT_SETTINGS.put( "choiceAdventure9", "1" ); CLIENT_SETTINGS.put( "choiceAdventure10", "1" ); CLIENT_SETTINGS.put( "choiceAdventure11", "3" ); CLIENT_SETTINGS.put( "choiceAdventure12", "2" ); CLIENT_SETTINGS.put( "choiceAdventure14", "4" ); CLIENT_SETTINGS.put( "choiceAdventure15", "4" ); CLIENT_SETTINGS.put( "choiceAdventure16", "4" ); CLIENT_SETTINGS.put( "choiceAdventure17", "4" ); CLIENT_SETTINGS.put( "choiceAdventure18", "4" ); CLIENT_SETTINGS.put( "choiceAdventure19", "4" ); CLIENT_SETTINGS.put( "choiceAdventure20", "4" ); CLIENT_SETTINGS.put( "choiceAdventure21", "2" ); CLIENT_SETTINGS.put( "choiceAdventure22", "4" ); CLIENT_SETTINGS.put( "choiceAdventure23", "4" ); CLIENT_SETTINGS.put( "choiceAdventure24", "4" ); CLIENT_SETTINGS.put( "choiceAdventure25", "2" ); CLIENT_SETTINGS.put( "choiceAdventure26", "3" ); CLIENT_SETTINGS.put( "choiceAdventure27", "2" ); CLIENT_SETTINGS.put( "choiceAdventure28", "2" ); CLIENT_SETTINGS.put( "choiceAdventure29", "2" ); CLIENT_SETTINGS.put( "choiceAdventure40", "3" ); CLIENT_SETTINGS.put( "choiceAdventure41", "3" ); CLIENT_SETTINGS.put( "choiceAdventure42", "3" ); CLIENT_SETTINGS.put( "choiceAdventure45", "0" ); CLIENT_SETTINGS.put( "choiceAdventure46", "3" ); CLIENT_SETTINGS.put( "choiceAdventure47", "2" ); CLIENT_SETTINGS.put( "choiceAdventure71", "1" ); }
50364 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50364/2db6d820dba70b467c1f49f720ab8d4d16b9cbea/KoLSettings.java/buggy/src/net/sourceforge/kolmafia/KoLSettings.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 760, 3852, 918, 4046, 8903, 1435, 202, 95, 202, 202, 759, 2256, 486, 4046, 326, 7565, 1898, 2353, 3647, 16, 487, 333, 202, 202, 759, 4102, 486, 12175, 1281, 13115, 18, 202, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 760, 3852, 918, 4046, 8903, 1435, 202, 95, 202, 202, 759, 2256, 486, 4046, 326, 7565, 1898, 2353, 3647, 16, 487, 333, 202, 202, 759, 4102, 486, 12175, 1281, 13115, 18, 202, 2...
public org.quickfix.field.MiscFeeCurr getMiscFeeCurr() throws FieldNotFound { org.quickfix.field.MiscFeeCurr value = new org.quickfix.field.MiscFeeCurr();
public quickfix.field.MiscFeeCurr getMiscFeeCurr() throws FieldNotFound { quickfix.field.MiscFeeCurr value = new quickfix.field.MiscFeeCurr();
public org.quickfix.field.MiscFeeCurr getMiscFeeCurr() throws FieldNotFound { org.quickfix.field.MiscFeeCurr value = new org.quickfix.field.MiscFeeCurr(); getField(value); return value; }
8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/ExecutionReport.java/buggy/src/java/src/quickfix/fix44/ExecutionReport.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 2358, 18, 19525, 904, 18, 1518, 18, 11729, 71, 14667, 20143, 2108, 291, 71, 14667, 20143, 1435, 1216, 2286, 2768, 225, 288, 2358, 18, 19525, 904, 18, 1518, 18, 11729, 71, 14667, 201...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 2358, 18, 19525, 904, 18, 1518, 18, 11729, 71, 14667, 20143, 2108, 291, 71, 14667, 20143, 1435, 1216, 2286, 2768, 225, 288, 2358, 18, 19525, 904, 18, 1518, 18, 11729, 71, 14667, 201...
public AttributeDescr auto_focus() throws RecognitionException { AttributeDescr d; Token loc=null; Token t=null; d = null; try { // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:487:17: ( (loc= 'auto-focus' opt_eol ( ';' )? opt_eol ) | (loc= 'auto-focus' t= BOOL opt_eol ( ';' )? opt_eol ) ) int alt36=2; int LA36_0 = input.LA(1); if ( LA36_0==35 ) { int LA36_1 = input.LA(2); if ( LA36_1==BOOL ) { alt36=2; } else if ( LA36_1==EOL||LA36_1==15||LA36_1==22||LA36_1==27||LA36_1==29||LA36_1==31||(LA36_1>=33 && LA36_1<=38) ) { alt36=1; } else { NoViableAltException nvae = new NoViableAltException("482:1: auto_focus returns [AttributeDescr d] : ( (loc= \'auto-focus\' opt_eol ( \';\' )? opt_eol ) | (loc= \'auto-focus\' t= BOOL opt_eol ( \';\' )? opt_eol ) );", 36, 1, input); throw nvae; } } else { NoViableAltException nvae = new NoViableAltException("482:1: auto_focus returns [AttributeDescr d] : ( (loc= \'auto-focus\' opt_eol ( \';\' )? opt_eol ) | (loc= \'auto-focus\' t= BOOL opt_eol ( \';\' )? opt_eol ) );", 36, 0, input); throw nvae; } switch (alt36) { case 1 : // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:487:17: (loc= 'auto-focus' opt_eol ( ';' )? opt_eol ) { // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:487:17: (loc= 'auto-focus' opt_eol ( ';' )? opt_eol ) // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:488:25: loc= 'auto-focus' opt_eol ( ';' )? opt_eol { loc=(Token)input.LT(1); match(input,35,FOLLOW_35_in_auto_focus1035); following.push(FOLLOW_opt_eol_in_auto_focus1037); opt_eol(); following.pop(); // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:488:50: ( ';' )? int alt34=2; int LA34_0 = input.LA(1); if ( LA34_0==15 ) { alt34=1; } else if ( LA34_0==EOL||LA34_0==22||LA34_0==27||LA34_0==29||LA34_0==31||(LA34_0>=33 && LA34_0<=38) ) { alt34=2; } else { NoViableAltException nvae = new NoViableAltException("488:50: ( \';\' )?", 34, 0, input); throw nvae; } switch (alt34) { case 1 : // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:488:50: ';' { match(input,15,FOLLOW_15_in_auto_focus1039); } break; } following.push(FOLLOW_opt_eol_in_auto_focus1042); opt_eol(); following.pop(); d = new AttributeDescr( "auto-focus", "true" ); d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() ); } } break; case 2 : // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:495:17: (loc= 'auto-focus' t= BOOL opt_eol ( ';' )? opt_eol ) { // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:495:17: (loc= 'auto-focus' t= BOOL opt_eol ( ';' )? opt_eol ) // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:496:25: loc= 'auto-focus' t= BOOL opt_eol ( ';' )? opt_eol { loc=(Token)input.LT(1); match(input,35,FOLLOW_35_in_auto_focus1067); t=(Token)input.LT(1); match(input,BOOL,FOLLOW_BOOL_in_auto_focus1071); following.push(FOLLOW_opt_eol_in_auto_focus1073); opt_eol(); following.pop(); // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:496:57: ( ';' )? int alt35=2; int LA35_0 = input.LA(1); if ( LA35_0==15 ) { alt35=1; } else if ( LA35_0==EOL||LA35_0==22||LA35_0==27||LA35_0==29||LA35_0==31||(LA35_0>=33 && LA35_0<=38) ) { alt35=2; } else { NoViableAltException nvae = new NoViableAltException("496:57: ( \';\' )?", 35, 0, input); throw nvae; } switch (alt35) { case 1 : // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:496:57: ';' { match(input,15,FOLLOW_15_in_auto_focus1075); } break; } following.push(FOLLOW_opt_eol_in_auto_focus1078); opt_eol(); following.pop(); d = new AttributeDescr( "auto-focus", t.getText() ); d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() ); } } break; } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { } return d; }
6736 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6736/e3fb9256ae6e5fcb8c78a2c3dbd47f678d9b1287/RuleParser.java/buggy/drools-compiler/src/main/java/org/drools/lang/RuleParser.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 3601, 16198, 3656, 67, 13923, 1435, 1216, 9539, 288, 6647, 3601, 16198, 302, 31, 3639, 3155, 1515, 33, 2011, 31, 3639, 3155, 268, 33, 2011, 31, 1171, 202, 202, 72, 273, 446, 31, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 3601, 16198, 3656, 67, 13923, 1435, 1216, 9539, 288, 6647, 3601, 16198, 302, 31, 3639, 3155, 1515, 33, 2011, 31, 3639, 3155, 268, 33, 2011, 31, 1171, 202, 202, 72, 273, 446, 31, 5...
getDTDModel().beginRecording(this, DTDPlugin.getDTDString("_UI_LABEL_DTD_FILE_ADD_COMMENT"));
getDTDModel().beginRecording(this, DTDCorePlugin.getDTDString("_UI_LABEL_DTD_FILE_ADD_COMMENT"));
public void createComment(DTDNode node, String name, boolean isAfter) { getDTDModel().beginRecording(this, DTDPlugin.getDTDString("_UI_LABEL_DTD_FILE_ADD_COMMENT")); //$NON-NLS-1$ DTDNode topLevelNode = null; String newStream = "<!-- " + name + " -->\n"; //$NON-NLS-1$ //$NON-NLS-2$ int offset = getInsertOffset(node, isAfter); getStructuredDocument().replaceText(this, offset, 0, newStream); getDTDModel().endRecording(this); }
13989 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13989/425ffe7b68526a8574007dbae9d4ecfb097cff08/DTDFile.java/buggy/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/DTDFile.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 752, 4469, 12, 25728, 907, 756, 16, 514, 508, 16, 1250, 353, 4436, 13, 288, 202, 202, 588, 25728, 1488, 7675, 10086, 21037, 12, 2211, 16, 10696, 40, 4670, 3773, 18, 588, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 752, 4469, 12, 25728, 907, 756, 16, 514, 508, 16, 1250, 353, 4436, 13, 288, 202, 202, 588, 25728, 1488, 7675, 10086, 21037, 12, 2211, 16, 10696, 40, 4670, 3773, 18, 588, ...
System.err.println( this.slaves.size() + " slaves registered" );
public void addSlave(NodeInfo slave, int jvmId) { System.err.println( "add slave : " + slave ); synchronized ( this.slaves ) { this.slaves.add( new SlaveInfo( slave, jvmId ) ); if ( this.slaves.size() == getSystemTestInfo().getTotalJvms() ) { System.err.println( this.slaves.size() + " slaves registered" ); this.slaves.notifyAll(); } } }
4523 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4523/44f09ca0fa0653b2cd30b8be246b5339f9c3c0ef/MasterNode.java/clean/sysunit/src/main/org/sysunit/testmesh/master/MasterNode.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 527, 20302, 12, 25392, 11735, 16, 7682, 509, 13555, 548, 13, 565, 288, 3639, 2332, 18, 370, 18, 8222, 12, 315, 1289, 11735, 294, 315, 397, 11735, 11272, 3639, 3852, 261, 333, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 20302, 12, 25392, 11735, 16, 7682, 509, 13555, 548, 13, 565, 288, 3639, 2332, 18, 370, 18, 8222, 12, 315, 1289, 11735, 294, 315, 397, 11735, 11272, 3639, 3852, 261, 333, ...
if ( !ExtensionManager.getInstance( ).getEmitterExtensions( ) .containsKey( format ) )
if ( !ExtensionManager.getInstance( ).getSupportedFormat() .contains( format ) )
protected void doRender( long pageNumber ) throws EngineException { // create the emitter services object that is needed in the emitters. EngineEmitterServices services = new EngineEmitterServices( this ); services.setRenderOption( renderOptions ); EngineConfig config = engine.getConfig( ); if ( config != null ) services .setEmitterConfig( engine.getConfig( ).getEmitterConfigs( ) ); services.setRenderContext( context ); services.setReportRunnable( runnable ); // register default parameters usingParameterValues( ); // After setting up the parameter values and before executing the // report, we need to call onPrepare on all items. // Create IReportContext and set it to execution context ReportContextImpl reportContext = new ReportContextImpl( executionContext.getParams( ), config.getConfigMap( ), executionContext.getAppContext( ) ); executionContext.setReportContext( reportContext ); // setup runtime configurations // user defined configs are overload using system properties. executionContext.getConfigs( ).putAll( runnable.getTestConfig( ) ); executionContext.getConfigs( ).putAll( System.getProperties( ) ); // Set up rendering environment and check for supported format executionContext.setRenderOption( renderOptions ); String format = renderOptions.getOutputFormat( ); if ( format == null || format.length( ) == 0 ) // $NON-NLS-1 { renderOptions.setOutputFormat( "html" ); // $NON-NLS-1 format = "html"; // $NON-NLS-1 } else if ( renderOptions != null && format.equalsIgnoreCase( "fo" ) // $NON-NLS-1 && ( (FORenderOption) renderOptions ).getTailoredForFOP( ) ) { format = "fop"; // $NON-NLS-1 } if ( !ExtensionManager.getInstance( ).getEmitterExtensions( ) .containsKey( format ) ) { log.log( Level.SEVERE, MessageConstants.FORMAT_NOT_SUPPORTED_EXCEPTION, format ); throw new EngineException( MessageConstants.FORMAT_NOT_SUPPORTED_EXCEPTION, format ); } IContentEmitter emitter = ExtensionManager.getInstance( ) .createEmitter( format, emitterID ); if ( emitter == null ) { log.log( Level.SEVERE, "Report engine can not create {0} emitter.", format ); // $NON-NLS-1$ throw new EngineException( MessageConstants.CANNOT_CREATE_EMITTER_EXCEPTION ); } ReportExecutor executor = new ReportExecutor( executionContext ); services.setExecutor( executor ); // localized emitter emitter = new LocalizedEmitter( executionContext, emitter ); // emitter is not null emitter.initialize( services ); try { ReportContentLoader loader = new ReportContentLoader( executionContext ); loader.loadPage( pageNumber, emitter ); } catch ( Exception ex ) { log.log( Level.SEVERE, "An error happened while running the report. Cause:", ex ); //$NON-NLS-1$ } catch ( OutOfMemoryError err ) { log.log( Level.SEVERE, "An OutOfMemory error happened while running the report." ); //$NON-NLS-1$ throw err; } }
5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/1d8d582eae226915b0af0dada3168441cc0fb0a2/RenderTask.java/buggy/engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/api/impl/RenderTask.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1117, 918, 741, 3420, 12, 1525, 26484, 262, 1216, 10507, 503, 202, 95, 202, 202, 759, 752, 326, 11520, 4028, 733, 716, 353, 3577, 316, 326, 3626, 5432, 18, 202, 202, 4410, 13476, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1117, 918, 741, 3420, 12, 1525, 26484, 262, 1216, 10507, 503, 202, 95, 202, 202, 759, 752, 326, 11520, 4028, 733, 716, 353, 3577, 316, 326, 3626, 5432, 18, 202, 202, 4410, 13476, 5...
IMemento[] mementos = memento.getChildren("stroke");
IMemento[] mementos = memento.getChildren("stroke");
private static int[] readDeprecatedSequence(IMemento memento) { if (memento == null) throw new NullPointerException(); IMemento[] mementos = memento.getChildren("stroke"); //$NON-NLS-1$ if (mementos == null) throw new NullPointerException(); int[] strokes = new int[mementos.length]; for (int i = 0; i < mementos.length; i++) strokes[i] = readDeprecatedStroke(mementos[i]); return strokes; }
58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/664efbbd6fd6dba5c4d118b10afe31ab34b6890a/Persistence.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/commands/Persistence.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 760, 509, 8526, 855, 13534, 4021, 12, 3445, 820, 83, 312, 820, 83, 13, 288, 202, 202, 430, 261, 81, 820, 83, 422, 446, 13, 1082, 202, 12849, 394, 10108, 5621, 202, 202, 344...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 760, 509, 8526, 855, 13534, 4021, 12, 3445, 820, 83, 312, 820, 83, 13, 288, 202, 202, 430, 261, 81, 820, 83, 422, 446, 13, 1082, 202, 12849, 394, 10108, 5621, 202, 202, 344...
+ "declare function make-file ($x as string) {File:new($x)};\n" + "declare function parent ($x) {java.io.File:getParent($x)};\n" + "parent(make-file('dir/mine.txt'))", "dir");
+ "declare function local:make-file ($x as string) {File:new($x)};\n" + "declare function local:parent ($x) {java.io.File:getParent($x)};\n" + "local:parent(local:make-file('dir/mine.txt'))", "dir");
public static void main(String[] args) { // gnu.expr.ModuleExp.dumpZipPrefix = "kawa-zip-dump-"; // gnu.expr.ModuleExp.debugPrintExpr = true; // Compilation.debugPrintFinalExpr = true; evalTest("3.5+1", "4.5"); evalTest("3.5+1 ,4*2.5", "4.5 10.0"); evalTest("3<5", "true"); evalTest("let $x:=3+4 return $x", "7"); evalTest("let $x:=3+4 return <a>{$x}</a>", "<a>7</a>"); // We resolve $request and $response to servlet request/response, // but only when they're not lexially bound. evalTest("let $request:=2, $response:=3 return ($request+$response)", "5"); evalTest("some $x in (1, 2, 3), $y in (2, 3, 4)" + " satisfies $x + $y = 4", "true"); evalTest("every $x in (1, 2, 3), $y in (2, 3, 4)" + " satisfies $x + $y = 4", "false"); evalTest("every $x in (11, 12, 13), $y in (2, 3, 4)" + " satisfies $x > $y", "true"); evalTest("for $y in (4,5,2+4) return <b>{10+$y}</b>", "<b>14</b><b>15</b><b>16</b>"); evalTest("for $i in (1 to 10) where ($i mod 2)=1 return 20+$i", "21 23 25 27 29"); evalTest("for $car at $i in ('Ford', 'Chevy')," + "$pet at $j in ('Cat', 'Dog') " + "return ($i, '/', $car, '/', $j, '/', $pet, ';')", "1/Ford/1/Cat;1/Ford/2/Dog;2/Chevy/1/Cat;2/Chevy/2/Dog;"); evalTest("(3,4,5)[3]", "5"); evalTest("1,((2,3)[false()]),5", "1 5"); evalTest("1,((2 to 4)[true()]),5", "1 2 3 4 5"); evalTest("(for $y in (5,4) return <b>{10+$y}</b>)[2]", "<b>14</b>"); evalTest("for $a in (<a><b c='1' d='3'/><b c='2' d='6'/></a>)/b/@c" + " return concat('c: ', $a, ' d: ', $a/../@d, ';')", "c: 1 d: 3;c: 2 d: 6;"); String tabNsNodes = " xmlns:h=\"H\" xmlns:j=\"J\" xmlns:k=\"J\""; evalTest("doc('tab.xml')/result", "<result"+tabNsNodes+">\n" + "<row>\n" + "<fld1>a1</fld1>\n" + "<fld2 align=\"right\"><!--ignore-this-comment-->12</fld2>\n" + "</row>\n" + "<row>\n" + "<fld1 align=\"left\">b1</fld1>\n" + "<fld2 align=\"right\">22</fld2>\n" + "</row>\n" + "<h:row>\n" + "<j:fld1><![CDATA[c]]><![CDATA[1]]></j:fld1>\n" + "<h:fld2><![CDATA[33]]></h:fld2>\n" + "<j:fld3>44</j:fld3>\n" + "<k:fld1>c2</k:fld1>\n" + "</h:row>\n" + "</result>"); evalTest("doc('tab.xml')/result/row/fld2", "<fld2"+tabNsNodes+" align=\"right\"><!--ignore-this-comment-->12</fld2>" +"<fld2"+tabNsNodes+" align=\"right\">22</fld2>"); evalTest("doc('tab.xml')/result/row[fld2]", "<row"+tabNsNodes+">\n" + "<fld1>a1</fld1>\n" + "<fld2 align=\"right\"><!--ignore-this-comment-->12</fld2>\n</row>" + "<row"+tabNsNodes+">\n" + "<fld1 align=\"left\">b1</fld1>\n" + "<fld2 align=\"right\">22</fld2>\n" + "</row>"); evalTest("doc('tab.xml')/result/row/*", "<fld1"+tabNsNodes+">a1</fld1><fld2"+tabNsNodes+" align=\"right\"><!--ignore-this-comment-->12</fld2><fld1"+tabNsNodes+" align=\"left\">b1</fld1><fld2"+tabNsNodes+" align=\"right\">22</fld2>"); evalTest("doc('tab.xml')/result/row[2]", "<row"+tabNsNodes+">\n" + "<fld1 align=\"left\">b1</fld1>\n" + "<fld2 align=\"right\">22</fld2>\n" + "</row>"); evalTest("for $x in doc('tab.xml')/result/row[2]/node()" + " return ('[',$x,']')", "[\n][<fld1"+tabNsNodes+" align=\"left\">b1</fld1>][\n" + "][<fld2"+tabNsNodes+" align=\"right\">22</fld2>][\n]"); evalTest("for $x in doc('tab.xml')/result/row[2]/text()" + " return ('[',$x,']')", "[\n][\n][\n]"); evalTest("for $x in doc('tab.xml')/result/row[2]//text()" + " return ('[',$x,']')", "[\n][b1][\n][22][\n]"); evalTest("doc('tab.xml')/result/row/*[2]", "<fld2"+tabNsNodes+" align=\"right\"><!--ignore-this-comment-->12</fld2>" + "<fld2"+tabNsNodes+" align=\"right\">22</fld2>"); evalTest("for $x in <T>r1<fld1>a1</fld1><fld3/>r2<fld2>12</fld2></T>" + " /node()" + " return ('[',$x,']')", "[r1][<fld1>a1</fld1>][<fld3 />][r2][<fld2>12</fld2>]"); evalTest("(doc('tab.xml')/result/row/*)[2]", "<fld2"+tabNsNodes+" align=\"right\"><!--ignore-this-comment-->12</fld2>"); evalTest("(doc('tab.xml')/result/row/*)[2 to 3]", "<fld2"+tabNsNodes+" align=\"right\"><!--ignore-this-comment-->12</fld2>" +" <fld1"+tabNsNodes+" align=\"left\">b1</fld1>"); evalTest("(doc('tab.xml')/result/row/*)[position()>1]", "<fld2"+tabNsNodes+" align=\"right\"><!--ignore-this-comment-->12</fld2>" +"<fld1"+tabNsNodes+" align=\"left\">b1</fld1>" +"<fld2"+tabNsNodes+" align=\"right\">22</fld2>"); evalTest("(doc('tab.xml')/result/row/*)[position()>1][2]", "<fld1"+tabNsNodes+" align=\"left\">b1</fld1>"); evalTest("doc('tab.xml')/result/row/(fld2,fld1)", "<fld1"+tabNsNodes+">a1</fld1>" +"<fld2"+tabNsNodes+" align=\"right\"><!--ignore-this-comment-->12</fld2>" +"<fld1"+tabNsNodes+" align=\"left\">b1</fld1>" +"<fld2"+tabNsNodes+" align=\"right\">22</fld2>"); evalTest("string-value(doc('tab.xml'))", "\n\na1\n12\n\n\nb1\n22\n\n\nc1\n33\n44\nc2\n\n\n"); evalTest("string(doc('tab.xml'))", "\n\na1\n12\n\n\nb1\n22\n\n\nc1\n33\n44\nc2\n\n\n"); evalTest("string(doc('tab.xml')/result/row/fld1/@align)", "left"); evalTest("string(doc('tab.xml')/result/row/fld2/@align)", "rightright"); evalTest("for $x in children(<a>xy{3+4}kl<c>def</c>{9}{11}</a>)" + " return ('[',$x,']')", "[xy 7 kl][<c>def</c>][9 11]"); evalTest("children(<a>xy{3+4}kl<c>def</c>{9}{11}</a>)", "xy 7 kl<c>def</c>9 11"); evalTest("<a>aab</a> ='aab'", "true"); evalTest("<a>abc</a>='abb'", "false"); evalTest("string(<a>{'aa''bb&#88;cc&#x5a;dd'}</a>)", "aa'bbXccZdd"); evalTest("doc('tab.xml')/result/row[fld1]", "<row"+tabNsNodes+">\n" + "<fld1>a1</fld1>\n" + "<fld2 align=\"right\"><!--ignore-this-comment-->12</fld2>\n</row>" + "<row"+tabNsNodes+">\n" + "<fld1 align=\"left\">b1</fld1>\n" + "<fld2 align=\"right\">22</fld2>\n" + "</row>"); evalTest("doc('tab.xml')/result/row[fld3]", ""); evalTest("doc('tab.xml')/result/row/fld1[@align]", "<fld1"+tabNsNodes+" align=\"left\">b1</fld1>"); evalTest("doc('tab.xml')/result/row/fld2[@align]", "<fld2"+tabNsNodes+" align=\"right\"><!--ignore-this-comment-->12</fld2>" +"<fld2"+tabNsNodes+" align=\"right\">22</fld2>"); evalTest("'a',doc('tab.xml')/result/row/fld1[@align='left']", "a<fld1"+tabNsNodes+" align=\"left\">b1</fld1>"); evalTest("'a',doc('tab.xml')/result/row/fld1[@align='right']", "a"); evalTest("let $x:=12,\n" + " $y:=<a>{$x+$x}</a>\n" + " return <b atr1='11' atr2=\"{$x}\">{($y,99,$y)}</b>", "<b atr1=\"11\" atr2=\"12\"><a>24</a>99<a>24</a></b>"); evalTest("let $el := 'elm' return " + "document{element {$el} {attribute at{\"abc\"}, \"data\"}}/elm", "<elm at=\"abc\">data</elm>"); evalTest("let $a := <a at1='val1'><b/><c/></a>," + " $b0 := <b/>," + " $b := $a/b return" + " ($a is $a, $a << $b, $b >> $b," + " $a isnot $b, $b, $b0, $b is $b0)", "true true false true <b /> <b /> false"); evalTest("let $a := <a at1='val1'><b/><c/></a>," + " $b := $a/b, $c := $a/c return" + " for $n in distinct-nodes(($c, $a/@at1, $a, $c, $b, $b, $c))" + " return ('[', $n, ']')", "[<a at1=\"val1\"><b /><c /></a>][ at1=\"val1\"][<b />][<c />]"); // Boundary whitsapce (xmlspace) tests: evalTest("declare xmlspace preserve;\n" + "for $n in (<a> <b/> {' x '} </a>)/node() return ($n,';')", " ;<b/>; x ;"); evalTest("declare xmlspace skip;\n" + "for $n in (<a> <b/> {' x '} </a>)/node() return ($n,';')", "<b/>; x ;"); evalTest("declare xmlspace skip;\n" + "for $n in (<a> x <b/> y<c/>&#x20;</a>)/node() return ($n,';')", " x ;<b/>; y;<c/>; ;"); evalTest("for $n in (<a> <b/> </a>)/node() return ($n,';')", "<b/>;"); evalTest("<a> {3} {4} </a>", "<a>34</a>"); // This actually succeeds because evalTest ignores spaces. // failureExpectedNext = "fix space handling in constructors"; evalTest("<a>{3,4}{5,6}</a>", "<a>3 45 6</a>"); failureExpectedNext = "fix space handling in constructors"; evalTest("let $x := <a>{3,4}{5,6}</a> return <b>{$x, $x}</b>", "<ba><a>3 45 6</a><a>3 45 6</a></b>"); evalTest("for $n in <a><?xq doit?>abc<![CDATA[<X>]]>d<!--a comment--></a>/node()" + " return ($n,';')", "<?xq doit?>;abc<![CDATA[<X>]]>d;<!--a comment-->;"); evalTest("for $n in <a><?xq doit?>abc<![CDATA[<X>]]>d<!--a comment--></a>/node()" + " return (string($n),';')", "doit;abc&lt;X&gt;d;a comment;"); evalTest("string(<a><?xq doit?>abc<![CDATA[<X>]]>d<!--a comment--></a>)", "abc&lt;X&gt;d"); // Simple namespace tests. evalTest("declare namespace xx='XXX';\n <xx:a>XX</xx:a>", "<xx:a xmlns:xx=\"XXX\">XX</xx:a>"); evalTest("declare namespace x1='XXX';\n declare namespace x2='XXX';\n" + "string((<top><x1:ab>X1</x1:ab><x2:ab>X2</x2:ab></top>)/x2:ab)", "X1X2"); evalTest("declare namespace x1='XXX';\n declare namespace x2='YYY';\n" + "string((<top><x1:ab>X1</x1:ab><x2:ab>X2</x2:ab></top>)/x2:ab)", "X2"); evalTest("declare namespace x1='XXX';\n declare namespace x2='YYY';\n" + "string((<top><x1:ab>X1</x1:ab><x2:ab>X2</x2:ab></top>)/*)", "X1X2"); evalTest("declare namespace x1='XXX';\n declare namespace x2='YYY';\n" + "string((<top><x1:ab>X1</x1:ab><x2:ab>X2</x2:ab></top>)/*:*)", "X1X2"); evalTest("declare namespace x1='XXX';\n declare namespace x2='YYY';\n" + "string((<top><x1:ab>X1</x1:ab><x2:ab>X2</x2:ab></top>)/x1:*)", "X1"); evalTest("declare namespace x1='XXX';\n declare namespace x2='YYY';\n" + "string((<top><x1:ab>X1</x1:ab><x2:ab>X2</x2:ab></top>)/*:ab)", "X1X2"); evalTest("declare namespace x1='XXX';\n declare namespace x2='YYY';\n" + "string((<top><x1:ab>X1</x1:ab><x2:cd>X2</x2:cd></top>)/*:cd)", "X2"); evalTest("declare namespace h='H';\n" + "string(doc('tab.xml')/result/h:row)", "\nc1\n33\n44\nc2\n"); evalTest("declare namespace xx='H';\n" + "string(doc('tab.xml')/result/xx:row)", "\nc1\n33\n44\nc2\n"); evalTest("string(doc('tab.xml')/result/*:row)", "\na1\n12\n\nb1\n22\n\nc1\n33\n44\nc2\n"); evalTest("string(doc('tab.xml')/result/*:row/*:fld1)", "a1b1c1c2"); evalTest("declare namespace k='J';\n" + "string(doc('tab.xml')/result/*:row/k:fld1)", "c1c2"); evalTest("declare namespace k='J';\n" + "string(doc('tab.xml')/result/*:row[k:fld1])", "\nc1\n33\n44\nc2\n"); evalTest("declare namespace m1 = 'bb'; declare namespace m2 = 'cc';" + "let $m1:x := 3 return let $m2:x := 4 return" + " <m2:a a:c='{$a:x}' xmlns:a='bb'>{ count($a:x) }</m2:a>", "<m2:a xmlns:m2=\"cc\" xmlns:a=\"bb\" a:c=\"3\">1</m2:a>"); evalTest("doc('tab.xml')/result/row[1]/descendant::*", "<fld1"+tabNsNodes+">a1</fld1>" +"<fld2"+tabNsNodes+" align=\"right\"><!--ignore-this-comment-->12</fld2>"); evalTest("for $x in doc('tab.xml')/result/row[1]/descendant::node() return ($x,';')", "\n;<fld1"+tabNsNodes+">a1</fld1>;a1;\n;" + "<fld2"+tabNsNodes+" align=\"right\"><!--ignore-this-comment-->12</fld2>;<!--ignore-this-comment-->;12;\n;"); evalTest("doc('tab.xml')/result/row[1]/descendant::text()", "a112"); evalTest("doc('tab.xml')/result/row[1]/descendant-or-self::*", "<row"+tabNsNodes+"><fld1>a1</fld1>" + "<fld2 align=\"right\"><!--ignore-this-comment-->12</fld2></row>" + "<fld1"+tabNsNodes+">a1</fld1>" + "<fld2"+tabNsNodes+" align=\"right\"><!--ignore-this-comment-->12</fld2>"); evalTest("for $n in doc('tab.xml')/result/* return node-name($n)", // Should perhaps be: "row row h:row" FIXME "row row {H}row"); evalTest("for $n in doc('tab.xml')/result/row/* " + "return local-name-from-QName(node-name($n))", "fld1 fld2 fld1 fld2"); evalTest("for $n in doc('tab.xml')/result/*:row/*:fld1 " + "return <n>{namespace-uri-from-QName(node-name($n))}</n>", "<n></n><n></n><n>J</n><n>J</n>"); evalTest("for $n in doc('tab.xml')/result/*:row/*:fld1 return " + "('[', for $p in ('', 'k', 'h') return" + " (namespace-uri-for-prefix($p,$n),';'), ']')", "[;J;H;][;J;H;][;J;H;][;J;H;]"); // Based on bugs reported by Francois Leygues <vizawalou@wanadoo.fr>: evalTest("let $bx := <b x='xx'></b> return" + " let $x := <a>{for $y in $bx return $y}</a>" + " return $x/b", "<b x=\"xx\" />"); evalTest("element r {let $y := <b x='1'/>" + " let $x:=<a>{$y}</a> return $x/b/@x}", "<r x=\"1\" />"); evalTest("declare function x(){<a><b x='1'/><b x='2'/></a>};" + " let $i := <a>{for $a in x()/b return $a}</a> return $i/b/@x", " x=\"1\" x=\"2\""); evalTest("declare function s(){ <a x='10'>{for $n in (<b x='2'/>) return ($n) }</a>};" + " let $st := s()/b return (" + " '[',$st/@x ,'] [',$st ,']')", "[ x=\"2\"] [<b x=\"2\" />]"); // Testcase from <Seshukumar_Adiraju@infosys.com>: evalTest("let $books := " + "<books><book id='book1'/><book id='book2'/></books> " + "for $book in $books/book return <p>{string($book/@id)}</p>", "<p>book1</p><p>book2</p>"); evalTest("for $n in children(<a>xx<b/>yy</a>) return $n instanceof node()", "true true true"); evalTest("for $n in children(<a>xx<b/>yy</a>) return $n instanceof text ( )", "true false true"); evalTest("for $n in children(<a>xx<b/>yy</a>) return $n instanceof element(a,*)", "false false false"); evalTest("for $n in <a>xx<b/>yy</a>/node() return $n instanceof element(b,*)", "false true false"); // FIXME: evalTest("<a>xx<b/>yy</a>/node() instanceof node()", "false"); evalTest("<a>xx<b/>yy</a>/node() instanceof node()?", "false"); evalTest("<a>xx<b/>yy</a>/node() instanceof node()+", "true"); evalTest("<a>xx<b/>yy</a>/node() instanceof node()*", "true"); evalTest("<a>xx<b/>yy</a>/node() instanceof item()+", "true"); evalTest("(3,4,5) instanceof item()+", "true"); evalTest("('a','b') instanceof string+", "true"); evalTest("(2,3) instanceof string?", "false"); evalTest("(2,3) instanceof string+", "false"); evalTest("() instanceof string?", "true"); evalTest("() instanceof string+", "false"); evalTest("() instanceof string*", "true"); evalTest("('2') instanceof string?", "true"); evalTest("('2') instanceof string+", "true"); evalTest("('2') instanceof string*", "true"); evalTest("('2','3') instanceof string?", "false"); evalTest("('2','3') instanceof string+", "true"); evalTest("('2','3') instanceof string*", "true"); evalTest("declare namespace Int='class:java.lang.Integer';\n" + "Int:toHexString(266)", "10a"); evalTest("declare namespace File='class:java.io.File';\n" + "declare function make-file ($x as string) {File:new($x)};\n" + "declare function parent ($x) {java.io.File:getParent($x)};\n" + "parent(make-file('dir/mine.txt'))", "dir"); evalTest("java.lang.Integer:toHexString(255)", "ff"); // String functions evalTest("substring('motor car', 6)", "car"); evalTest("substring('metadata', 4, 3)", "ada"); // evalTest("substring('metadata', -INF, 3)", "met"); evalTest("(1 to 20)[. mod 5 = 0]", "5 10 15 20"); evalTest("(1 to 20)[. mod 5 ge 3]", "3 4 8 9 13 14 18 19"); evalTest("1,(99 to 0),3", "1 3"); evalTest("-10 to -2", "-10 -9 -8 -7 -6 -5 -4 -3 -2"); String some_elements = "let $top := <top><a/><b/><c/><d/></top>," + " $a:=$top/a, $b:=$top/b, $c:=$top/c, $d:=$top/d return "; evalNodeNames(some_elements+"($b, $a) union ($a, $b)", "a;b;"); evalNodeNames(some_elements+"($b, $a) union ($b, $c)", "a;b;c;"); evalNodeNames(some_elements+"($b, $a) intersect ($a, $b)", "a;b;"); evalNodeNames(some_elements+"($b, $a) intersect ($b, $c)", "b;"); evalNodeNames(some_elements+"($b, $a) except ($a, $b)", ""); evalNodeNames(some_elements+"($b, $a) except ($b, $c)", "a;"); evalNodeNames(some_elements+"($b, $a, $b, $d) intersect ($b, $d)", "b;d;"); evalNodeNames(some_elements+"($b, $a, $b, $d) except ($b, $d)", "a;"); evalNodeNames(some_elements+"($b, $a, $b, $d) except ()", "a;b;d;"); // Check for catching errors: evalTest("+ +", "*** syntax error - <string>:1:3: missing expression"); evalTest("declare namespace x1='XXX", "*** caught SyntaxException - <string>:1:26: " + "unexpected end-of-file in string"); evalTest("unescaped-data('<?--->'),let $x:=unescaped-data('an &amp;oslash;') return <b>{unescaped-data('<![CDATA[saw]]>')} {$x}</b>", "<?---><b><![CDATA[saw]]> an &oslash;</b>"); evalTestIdAttrs("doc('outline.xml')/book/part/chapter/ancestor::*", "b1;P1;"); evalTestIdAttrs("doc('outline.xml')/book/part/" +"chapter/ancestor-or-self::node()", ";b1;P1;c1;c2;"); evalTestIdAttrs("doc('outline.xml')//" +"section[@id='s1']/following-sibling::*", "s2;s3;"); evalTestIdAttrs("doc('outline.xml')//chapter/self::*", "c1;c2;"); evalTestIdAttrs("doc('outline.xml')//" +"para[@id='p31']/preceding::*", "s1;s11;s2;"); evalTestIdAttrs("doc('outline.xml')//" +"section[@id='s5']/preceding-sibling::*", "s4;"); evalTestIdAttrs("doc('outline.xml')//" +"chapter[@id='c1']/following::*", "c2;s4;s5;"); evalTestIdAttrs("doc('outline.xml')//" +"section[@id='s1']/(/book)", "b1;"); evalTestIdAttrs("doc('outline.xml')//" +"section[@id='s1']/(//chapter)", "c1;c2;"); evalTest("declare namespace XQuery = 'class:gnu.xquery.lang.XQuery';" + "XQuery:eval-with-focus(XQuery:getInstance()," + " '<r pos=\"{position()}\">{.}</r>', (<b/>, 3))", "<r pos=\"1\"><b /></r><r pos=\"2\">3</r>"); evalTest("declare namespace XQuery = 'class:gnu.xquery.lang.XQuery';" + "XQuery:eval-with-focus(XQuery:getInstance()," + " '<r pos=\"{position()}\">{.}</r>', <b/>, 3, 4)", "<r pos=\"3\"><b /></r>"); Object r; String e = "<r pos='{position()}' size='{last()}'>{.}</r>"; try { r = toString(interp.evalWithFocus(e, interp.eval("2,3,4"))); } catch (Throwable ex) { r = ex; } matchTest(e, r, "<r pos=\"1\" size=\"3\">2</r>" + "<r pos=\"2\" size=\"3\">3</r>" + "<r pos=\"3\" size=\"3\">4</r>"); try { r = toString(interp.evalWithFocus(e, interp.eval("<b/>"), 4, 10)); } catch (Throwable ex) { r = ex; } matchTest(e, r, "<r pos=\"4\" size=\"10\"><b/></r>"); printSummary(); }
41089 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/41089/a66e09dca5fb4e0596774e8446f60e583e93eee8/TestMisc.java/clean/gnu/xquery/testsuite/TestMisc.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 760, 918, 2774, 12, 780, 8526, 833, 13, 225, 288, 565, 368, 314, 13053, 18, 8638, 18, 3120, 2966, 18, 8481, 9141, 2244, 273, 315, 79, 2219, 69, 17, 4450, 17, 8481, 10951, 31, 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, 760, 918, 2774, 12, 780, 8526, 833, 13, 225, 288, 565, 368, 314, 13053, 18, 8638, 18, 3120, 2966, 18, 8481, 9141, 2244, 273, 315, 79, 2219, 69, 17, 4450, 17, 8481, 10951, 31, 56...