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 |
|---|---|---|---|---|---|---|
dMinAxis -= dStep; | if ( dMinValue < 0 ) { dMinAxis = -( dMinAxis + dStep ); } else if ( dMinAxis >= dMinValue && dMinAxis != 0 ) { dMinAxis -= dStep; } | public final void updateAxisMinMax( Object oMinValue, Object oMaxValue ) { if ( ( iType & LOGARITHMIC ) == LOGARITHMIC ) { if ( ( iType & PERCENT ) == PERCENT ) { oMaximum = new Double( 100 ); oMinimum = new Double( 1 ); oStep = new Double( 10 ); bMaximumFixed = true; bMinimumFixed = true; bStepFixed = true; return; } final double dMinValue = asDouble( oMinValue ).doubleValue( ); final double dMaxValue = asDouble( oMaxValue ).doubleValue( ); final double dAbsMax = Math.abs( dMaxValue ); final double dAbsMin = Math.abs( dMinValue ); final double dStep = asDouble( oStep ).doubleValue( ); final double dStepLog = Math.log( dStep ); int iPow = (int) Math.floor( Math.log( dAbsMax ) / dStepLog ) + 1; double dMaxAxis = Math.pow( dStep, iPow ); iPow = (int) Math.floor( Math.log( dAbsMin ) / dStepLog ) - 1; double dMinAxis = Math.pow( dStep, iPow + 1 ); if ( !bMaximumFixed ) { oMaximum = new Double( dMaxAxis ); } if ( !bMinimumFixed ) { oMinimum = new Double( dMinAxis ); } } else if ( ( iType & DATE_TIME ) == DATE_TIME ) { int iUnit = asInteger( oUnit ); int iStep = asInteger( oStep ); CDateTime cdtMinValue = asDateTime( oMinValue ); CDateTime cdtMaxValue = asDateTime( oMaxValue ); if ( !bMinimumFixed ) { oMinimum = cdtMinValue.backward( iUnit, iStep ); } ( (CDateTime) oMinimum ).clearBelow( iUnit ); if ( !bMaximumFixed ) { oMaximum = cdtMaxValue.forward( iUnit, iStep ); } ( (CDateTime) oMaximum ).clearBelow( iUnit ); } else { final double dMinValue = asDouble( oMinValue ).doubleValue( ); final double dMaxValue = asDouble( oMaxValue ).doubleValue( ); final double dAbsMax = Math.abs( dMaxValue ); final double dAbsMin = Math.abs( dMinValue ); final double dStep = asDouble( oStep ).doubleValue( ); double dMinAxis = ( dStep > 1 ) ? Math.floor( dAbsMin / dStep ) : Math.round( dAbsMin / dStep ); dMinAxis *= dStep; if ( dMinAxis == dAbsMin ) { dMinAxis += dStep; if ( dMinValue < 0 ) { dMinAxis = -dMinAxis; } else if ( dMinValue == 0 ) { dMinAxis = 0; } } else { if ( dMinValue < 0 ) { dMinAxis = -( dMinAxis + dStep ); } else if ( dMinAxis >= dMinValue && dMinAxis != 0 ) { dMinAxis -= dStep; } } double dMaxAxis = ( dStep > 1 ) ? Math.floor( dAbsMax / dStep ) : Math.round( dAbsMax / dStep ); dMaxAxis *= dStep; if ( dMaxAxis == dAbsMax ) { dMaxAxis += dStep; if ( dMaxValue == 0 ) { dMaxAxis = 0; } } else if ( dMinAxis != dMaxValue ) { if ( dMaxValue < 0 ) { dMaxAxis = -( dMaxAxis - dStep ); } else if ( dMaxValue > 0 ) { if ( dMaxAxis < dMaxValue ) { dMaxAxis += dStep; } } } if ( dMinValue < 0 && dMaxValue < 0 ) { if ( dMaxAxis <= dMaxValue - dStep ) { dMaxAxis += 2 * dStep; } } if ( dMinValue > 0 && dMaxValue > 0 ) { if ( dMinAxis >= dMinValue + dStep ) { dMinAxis -= 2 * dStep; } } // handle special case for min/max are both zero if ( dMinValue == 0 && dMaxValue == 0 ) { if ( dMinAxis >= 0 ) { dMinAxis = -1; } if ( dMaxAxis <= 0 ) { dMaxAxis = 1; } } // To make sure the boundary is always 100, -100 in percent type if ( ( iType & PERCENT ) == PERCENT ) { if ( dMaxAxis > 0 ) { dMaxAxis = 100; } if ( dMinAxis < 0 ) { dMinAxis = -100; } } if ( !bMaximumFixed ) { oMaximum = new Double( dMaxAxis ); } if ( !bMinimumFixed ) { oMinimum = new Double( dMinAxis ); } } } | 5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/dc626a374fa0c6b97bab401a4f404d0bef266013/AutoScale.java/clean/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/computation/withaxes/AutoScale.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
1089,
6558,
17454,
12,
1033,
320,
2930,
620,
16,
1033,
320,
2747,
620,
262,
202,
95,
202,
202,
430,
261,
261,
277,
559,
473,
2018,
985,
6379,
22972,
262,
422,
2018,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1089,
6558,
17454,
12,
1033,
320,
2930,
620,
16,
1033,
320,
2747,
620,
262,
202,
95,
202,
202,
430,
261,
261,
277,
559,
473,
2018,
985,
6379,
22972,
262,
422,
2018,
... |
) ); | ) ); | public final BaseRenderer getRenderer( Class cSeries ) throws ChartException { final String sFQClassName = cSeries.getName( ); if ( inEclipseEnv( ) ) { final Object oSeriesRenderer = getPluginXmlObject( "modelrenderers", "modelRenderer", "series", "renderer", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ sFQClassName ); if ( oSeriesRenderer != null ) { logger.log( ILogger.INFORMATION, Messages.getString( "info.eclenv.creating.series.renderer", //$NON-NLS-1$ new Object[]{ oSeriesRenderer.getClass( ).getName( ) }, ULocale.getDefault( ) // LOCALE? ) ); return (BaseRenderer) oSeriesRenderer; } logger.log( ILogger.ERROR, Messages.getString( "error.eclenv.cannot.find.series.renderer", //$NON-NLS-1$ new Object[]{ sFQClassName }, ULocale.getDefault( ) // LOCALE? ) ); } else { for ( int i = 0; i < saSeries.length; i++ ) { if ( sFQClassName.equals( saSeries[i] ) ) { if ( saRenderers[i] == null ) { break; } logger.log( ILogger.INFORMATION, Messages.getString( "info.stdenv.creating.series.renderer", //$NON-NLS-1$ new Object[]{ saRenderers[i] }, ULocale.getDefault( ) // LOCALE? ) ); return (BaseRenderer) newInstance( saRenderers[i] ); } } logger.log( ILogger.ERROR, Messages.getString( "error.stdenv.cannot.find.series.renderer", //$NON-NLS-1$ new Object[]{ sFQClassName }, ULocale.getDefault( ) // LOCALE? ) ); } return null; } | 5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/3a248471a09dcbb2bfd6df035e94feca08e93a41/PluginSettings.java/buggy/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/util/PluginSettings.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
3360,
6747,
336,
6747,
12,
1659,
276,
6485,
262,
1082,
202,
15069,
14804,
503,
202,
95,
202,
202,
6385,
514,
272,
23032,
3834,
273,
276,
6485,
18,
17994,
12,
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,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
3360,
6747,
336,
6747,
12,
1659,
276,
6485,
262,
1082,
202,
15069,
14804,
503,
202,
95,
202,
202,
6385,
514,
272,
23032,
3834,
273,
276,
6485,
18,
17994,
12,
11272,
202,
... |
FindBindingByLinkageConstant finder = new FindBindingByLinkageConstant(this, name.toCharArray(), CPPNAMESPACE); getIndex().accept(finder); return finder.getResult(); | return searchCurrentScope(name.toCharArray(), CPPNAMESPACE); | private PDOMBinding _resolveBinding(IASTName name) throws CoreException, DOMException { // mstodo revisit IBinding origBinding = name.getBinding(); if (origBinding != null) return adaptBinding(origBinding); if (name instanceof ICPPASTQualifiedName) { IASTName[] names = ((ICPPASTQualifiedName)name).getNames(); if (names.length == 1) return resolveBinding(names[0]); IASTName lastName = names[names.length - 1]; PDOMBinding nsBinding = adaptBinding(names[names.length - 2].resolveBinding()); // aftodo - namespace aliases? if (nsBinding instanceof IScope) { return (PDOMBinding) ((IScope)nsBinding).getBinding(lastName, true); } } IASTNode parent = name.getParent(); if (parent instanceof ICPPASTQualifiedName) { ICPPASTQualifiedName qualName = (ICPPASTQualifiedName)parent; IASTName lastName = qualName.getLastName(); if (name != lastName) { return resolveInQualifiedName(name); } else { // Drop down to the rest of the resolution procedure // with the parent of the qualified name parent = parent.getParent(); } } if (parent instanceof IASTIdExpression) { // reference IASTNode eParent = parent.getParent(); if (eParent instanceof IASTFunctionCallExpression) { if (parent.getPropertyInParent().equals(IASTFunctionCallExpression.FUNCTION_NAME)) { return resolveFunctionCall( (IASTFunctionCallExpression) eParent, (IASTIdExpression) parent, name); } else if (parent.getPropertyInParent().equals(IASTFunctionCallExpression.PARAMETERS)) { int constant = (name.getParent() instanceof ICPPASTQualifiedName && ((ICPPASTQualifiedName) name.getParent()).getLastName() != name) ? CPPNAMESPACE : CPPVARIABLE; FindBindingByLinkageConstant finder = new FindBindingByLinkageConstant( this, name.toCharArray(), constant); getIndex().accept(finder); return finder.getResult(); } } else { // if the address of me is taken, and assigned to something, // find out the type of the thing I'm assigned to if (eParent instanceof IASTUnaryExpression) { IASTUnaryExpression unaryExp = (IASTUnaryExpression) eParent; if (unaryExp.getOperator() == IASTUnaryExpression.op_amper) { IASTNode epParent = eParent.getParent(); if (epParent instanceof IASTBinaryExpression) { if (((IASTBinaryExpression) epParent).getOperator() == IASTBinaryExpression.op_assign) { IASTExpression left = ((IASTBinaryExpression) epParent).getOperand1(); IType type = CPPSemantics.getUltimateType(left.getExpressionType(), false); if (type instanceof IFunctionType) { ILocalBindingIdentity lbi = new CPPBindingIdentity.Holder( new String(name.toCharArray()), CPPFUNCTION, ((IFunctionType) type).getParameterTypes()); FindEquivalentBinding feb = new FindEquivalentBinding(this, lbi); getIndex().accept(feb); return feb.getResult(); } } } } } FindBindingByLinkageConstant finder = new FindBindingByLinkageConstant(this, name.toCharArray(), CPPVARIABLE); getIndex().accept(finder); if (finder.getResult() == null) { finder = new FindBindingByLinkageConstant(this, name .toCharArray(), CPPENUMERATOR); getIndex().accept(finder); } return finder.getResult(); } } else if (parent instanceof IASTNamedTypeSpecifier) { FindBindingByLinkageConstant finder = new FindBindingByLinkageConstant(this, name.toCharArray(), CPPCLASSTYPE); getIndex().accept(finder); PDOMBinding result = finder.getResult(); if(result==null) { finder = new FindBindingByLinkageConstant(this, name.toCharArray(), CPPENUMERATION); getIndex().accept(finder); result = finder.getResult(); } if(result==null) { finder = new FindBindingByLinkageConstant(this, name.toCharArray(), CPPTYPEDEF); getIndex().accept(finder); result = finder.getResult(); } return result; } else if (parent instanceof ICPPASTNamespaceAlias) { FindBindingByLinkageConstant finder = new FindBindingByLinkageConstant(this, name.toCharArray(), CPPNAMESPACE); getIndex().accept(finder); return finder.getResult(); } else if(parent instanceof ICPPASTFieldReference) { ICPPASTFieldReference ref = (ICPPASTFieldReference) parent; IASTExpression exp = ref.getFieldOwner(); if(exp instanceof IASTIdExpression) { IASTIdExpression fieldOwner = (IASTIdExpression) exp; IASTNode eParent = parent.getParent(); if (eParent instanceof IASTFunctionCallExpression) { if(name.getPropertyInParent().equals(IASTFieldReference.FIELD_NAME)) { return resolveFunctionCall((IASTFunctionCallExpression) eParent, fieldOwner, name); } } else { IBinding fieldOwnerBinding = fieldOwner.getName().getBinding(); if(fieldOwnerBinding instanceof ICPPVariable) { IType type = ((ICPPVariable)fieldOwnerBinding).getType(); if(type instanceof ICompositeType) { PDOMBinding pdomFOB = adaptBinding( (ICompositeType) type); FindBindingByLinkageConstant visitor = new FindBindingByLinkageConstant(this, name.toCharArray(), PDOMCPPLinkage.CPPFIELD); try { ((PDOMBinding)pdomFOB).accept(visitor); } catch (CoreException e) { if (e.getStatus().equals(Status.OK_STATUS)) { return visitor.getResult(); } else { throw e; } } } } } } } else if(parent instanceof ICPPASTBaseSpecifier) { FindBindingByLinkageConstant finder = new FindBindingByLinkageConstant(this, name.toCharArray(), CPPCLASSTYPE); getIndex().accept(finder); return finder.getResult(); } return null; } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/e714b8461209f89ffefebbd2f87034f993511e1a/PDOMCPPLinkage.java/clean/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPLinkage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
453,
8168,
5250,
389,
10828,
5250,
12,
45,
9053,
461,
508,
13,
1216,
30015,
16,
4703,
503,
288,
202,
202,
759,
312,
334,
7370,
283,
11658,
202,
202,
45,
5250,
1647,
5250,
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,
1152,
453,
8168,
5250,
389,
10828,
5250,
12,
45,
9053,
461,
508,
13,
1216,
30015,
16,
4703,
503,
288,
202,
202,
759,
312,
334,
7370,
283,
11658,
202,
202,
45,
5250,
1647,
5250,
273... |
if (tv != null && tv.length() > 0) sb.append(INDENT).append(tv).append('\n'); | if (tv != null && tv.length() > 0) { sb.append(INDENT).append(tv).append('\n'); } | public String generateClassifier(Object handle) { MClassifier cls = (MClassifier) handle; String generatedName = generateName(cls.getName()); String classifierKeyword; if (cls instanceof MClass) classifierKeyword = "class"; else if (cls instanceof MInterface) classifierKeyword = "interface"; else return ""; // actors and use cases StringBuffer sb = new StringBuffer(80); sb.append(DocumentationManager.getComments(cls)); // Add the comments for this classifier first. /* * Replaced 2001-09-26 STEFFEN ZSCHALER * * Was: * sb.append(DocumentationManager.getDocs(cls)).append("\n"); */ sb.append (generateConstraintEnrichedDocComment (cls)).append ("\n"); sb.append(generateVisibility(cls.getVisibility())); if (cls.isAbstract() && !(cls instanceof MInterface)) { if (VERBOSE) sb.append("/* abstract */ "); } if (cls.isLeaf()) { if (VERBOSE) sb.append("/* final */ "); } sb.append(classifierKeyword).append(" ").append(generatedName); String baseClass = generateGeneralzation(cls.getGeneralizations()); String tv = null; if (!baseClass.equals("")) sb.append(' ').append(": ").append(baseClass); // nsuml: realizations! if (cls instanceof MClass) { String interfaces = generateSpecification((MClass) cls); if (!interfaces.equals("")) { if (baseClass.equals("")) sb.append(": "); else sb.append(", "); sb.append(interfaces); } } sb.append("\n{"); tv = generateTaggedValues(cls); if (tv != null && tv.length() > 0) sb.append(INDENT).append(tv); // sb.append(generateConstraints(cls)); Removed 2001-09-26 STEFFEN ZSCHALER // generate constructor (Marian Heddesheimer) String make_constructor = cls.getTaggedValue("constructor"); if ( (make_constructor != null) && (make_constructor.equals("true")) ) { sb.append(INDENT).append("function ").append(cls.getName()).append("() {\n"); sb.append(generateSection(cls)); sb.append(INDENT).append("}\n"); } Collection strs = UmlHelper.getHelper().getCore().getAttributes(cls); if (strs != null) { sb.append('\n'); if (cls instanceof MClass) sb.append(INDENT).append("// Attributes\n"); Iterator strEnum = strs.iterator(); while (strEnum.hasNext()) { MStructuralFeature sf = (MStructuralFeature) strEnum.next(); sb.append('\n').append(INDENT).append(generate(sf)); tv = generateTaggedValues(sf); if (tv != null && tv.length() > 0) sb.append(INDENT).append(tv).append('\n'); } } Collection ends = cls.getAssociationEnds(); if (ends != null) { sb.append('\n'); if (cls instanceof MClass) sb.append(INDENT).append("// Associations\n"); Iterator endEnum = ends.iterator(); while (endEnum.hasNext()) { MAssociationEnd ae = (MAssociationEnd) endEnum.next(); MAssociation a = ae.getAssociation(); sb.append('\n').append(INDENT).append(generateAssociationFrom(a, ae)); tv = generateTaggedValues(a); if (tv != null && tv.length() > 0) sb.append(INDENT).append(tv); // sb.append(generateConstraints(a)); Removed 2001-09-26 STEFFEN ZSCHALER Why was this not in generateAssociationFrom ? } } // TODO: constructors Collection behs = UmlHelper.getHelper().getCore().getOperations(cls); if (behs != null) { sb.append ('\n'); sb.append (INDENT).append ("// Operations\n"); Iterator behEnum = behs.iterator(); while (behEnum.hasNext()) { MBehavioralFeature bf = (MBehavioralFeature) behEnum.next(); sb.append ('\n').append (INDENT).append (generate (bf)); tv = generateTaggedValues((MModelElement) bf); if ((cls instanceof MClass) && (bf instanceof MOperation) && (!((MOperation) bf).isAbstract())) { sb.append ('\n').append (INDENT).append ("{\n"); if (tv.length() > 0) sb.append (INDENT).append (tv); sb.append (generateMethodBody ((MOperation) bf)).append ('\n') .append (INDENT).append ("}\n"); } else { sb.append (";\n"); if (tv.length() > 0) sb.append (INDENT).append (tv).append ('\n'); } } } sb.append("} /* end ").append(classifierKeyword).append(' ').append(generatedName).append(" */\n"); return sb.toString(); } | 7166 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7166/1866ce2aba8057ad992b7d3853a02863d492ab25/GeneratorCSharp.java/buggy/modules/csharp/src/org/argouml/language/csharp/generator/GeneratorCSharp.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
2103,
13860,
12,
921,
1640,
13,
288,
202,
49,
13860,
2028,
273,
261,
49,
13860,
13,
1640,
31,
202,
780,
4374,
461,
273,
2103,
461,
12,
6429,
18,
17994,
10663,
202,
780,
14622... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2103,
13860,
12,
921,
1640,
13,
288,
202,
49,
13860,
2028,
273,
261,
49,
13860,
13,
1640,
31,
202,
780,
4374,
461,
273,
2103,
461,
12,
6429,
18,
17994,
10663,
202,
780,
14622... |
private void entryToString(ACL.Entry entry, StringBuffer response) | private void entryToString( ACL.Entry entry, StringBuffer buffer ) | private void entryToString(ACL.Entry entry, StringBuffer response) { response.append(entry.getUser() + '\t' + entry.getPermissionsMask() + '\n'); } | 53206 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/53206/af1a0ea039223063b582cb44e55a4b58d1ec2836/ACL.java/clean/src/JAVA/classes/org/openafs/jafs/ACL.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
1241,
5808,
12,
10098,
18,
1622,
1241,
16,
6674,
1613,
262,
225,
288,
565,
766,
18,
6923,
12,
4099,
18,
588,
1299,
1435,
397,
2337,
88,
11,
397,
1241,
18,
588,
6521,
5796,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
1241,
5808,
12,
10098,
18,
1622,
1241,
16,
6674,
1613,
262,
225,
288,
565,
766,
18,
6923,
12,
4099,
18,
588,
1299,
1435,
397,
2337,
88,
11,
397,
1241,
18,
588,
6521,
5796,
... |
public int getDepth() {return depth;} | public int getDepth() { return depth; } | public int getDepth() {return depth;} | 49473 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49473/bfb9bd59721162f108d868081fc831e6f3108346/NodeImpl.java/clean/outliner/src/com/organic/maynard/outliner/NodeImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
509,
31038,
1435,
288,
2463,
3598,
31,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
509,
31038,
1435,
288,
2463,
3598,
31,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if(this.getDepartmentID() != null && !this.getDepartmentID().equals("#")){ | if (this.getDepartmentID() != null && !this.getDepartmentID().equals("#")) { | public String createSubUnit() throws FenixFilterException, FenixServiceException { if (verifyCostCenterCode()) { return ""; } PrepareDatesResult datesResult = prepareDates(this.getUnitBeginDate(), this.getUnitEndDate()); if (datesResult.isTest()) { return ""; } UnitType type = getUnitType(); Integer departmentID = null, degreeID = null; if(this.getDepartmentID() != null && !this.getDepartmentID().equals("#")){ departmentID = Integer.valueOf(this.getDepartmentID()); } if(this.getDegreeID() != null && !this.getDegreeID().equals("#")){ degreeID = Integer.valueOf(this.getDegreeID()); } final Object[] argsToRead = { null, this.getUnit().getIdInternal(), this.getUnitName(), this.getUnitCostCenter(), datesResult.getBeginDate(), datesResult.getEndDate(), type, departmentID, degreeID }; try { ServiceUtils.executeService(getUserView(), "CreateNewUnit", argsToRead); } catch (FenixServiceException e) { setErrorMessage(e.getMessage()); return ""; } return "backToUnitDetails"; } | 2645 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2645/3a1a68ba706e5c6b1fa93deb780b0876ecf1d59d/OrganizationalStructureBackingBean.java/clean/src/net/sourceforge/fenixedu/presentationTier/backBeans/manager/organizationalStructureManagement/OrganizationalStructureBackingBean.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
752,
1676,
2802,
1435,
1216,
478,
275,
697,
1586,
503,
16,
478,
275,
697,
15133,
288,
3639,
309,
261,
8705,
8018,
8449,
1085,
10756,
288,
5411,
327,
1408,
31,
3639,
289,
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,
1071,
514,
752,
1676,
2802,
1435,
1216,
478,
275,
697,
1586,
503,
16,
478,
275,
697,
15133,
288,
3639,
309,
261,
8705,
8018,
8449,
1085,
10756,
288,
5411,
327,
1408,
31,
3639,
289,
3639,
... |
i); | i ); | public void renderLegend( IPrimitiveRenderer ipr, Legend lg, Map htRenderers ) throws ChartException { if ( !lg.isVisible( ) ) // CHECK VISIBILITY { return; } renderBlock( ipr, lg, StructureSource.createLegend( lg ) ); final IDisplayServer xs = getDevice( ).getDisplayServer( ); final double dScale = xs.getDpiResolution( ) / 72d; Bounds bo = lg.getBounds( ).scaledInstance( dScale ); Size sz = null; /* --- Start bound computing --- */ // TODO Refactoring: create function double dX, dY; if ( lg.getPosition( ) != Position.INSIDE_LITERAL ) { try { sz = lg.getPreferredSize( xs, cm, rtc ); } catch ( Exception ex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, ex ); } sz.scale( dScale ); // USE ANCHOR IN POSITIONING THE LEGEND CLIENT AREA WITHIN THE BLOCK // SLACK SPACE dX = bo.getLeft( ) + ( bo.getWidth( ) - sz.getWidth( ) ) / 2; dY = 0; if ( lg.isSetAnchor( ) ) { int iAnchor = lg.getAnchor( ).getValue( ); // swap west/east if ( isRightToLeft( ) ) { if ( iAnchor == Anchor.EAST ) { iAnchor = Anchor.WEST; } else if ( iAnchor == Anchor.NORTH_EAST ) { iAnchor = Anchor.NORTH_WEST; } else if ( iAnchor == Anchor.SOUTH_EAST ) { iAnchor = Anchor.SOUTH_WEST; } else if ( iAnchor == Anchor.WEST ) { iAnchor = Anchor.EAST; } else if ( iAnchor == Anchor.NORTH_WEST ) { iAnchor = Anchor.NORTH_EAST; } else if ( iAnchor == Anchor.SOUTH_WEST ) { iAnchor = Anchor.SOUTH_EAST; } } switch ( iAnchor ) { case Anchor.NORTH : case Anchor.NORTH_EAST : case Anchor.NORTH_WEST : dY = bo.getTop( ); break; case Anchor.SOUTH : case Anchor.SOUTH_EAST : case Anchor.SOUTH_WEST : dY = bo.getTop( ) + bo.getHeight( ) - sz.getHeight( ); break; default : // CENTERED dY = bo.getTop( ) + ( bo.getHeight( ) - sz.getHeight( ) ) / 2; break; } switch ( iAnchor ) { case Anchor.WEST : case Anchor.NORTH_WEST : dX = bo.getLeft( ); break; case Anchor.EAST : case Anchor.SOUTH_EAST : dX = bo.getLeft( ) + bo.getWidth( ) - sz.getWidth( ); break; default : // CENTERED dX = bo.getLeft( ) + ( bo.getWidth( ) - sz.getWidth( ) ) / 2; break; } } else { dX = bo.getLeft( ) + ( bo.getWidth( ) - sz.getWidth( ) ) / 2; dY = bo.getTop( ) + ( bo.getHeight( ) - sz.getHeight( ) ) / 2; } } else { // USE PREVIOUSLY COMPUTED POSITION IN THE GENERATOR FOR LEGEND // 'INSIDE' PLOT dX = bo.getLeft( ); dY = bo.getTop( ); sz = SizeImpl.create( bo.getWidth( ), bo.getHeight( ) ); } // get cached legend info. final LegendLayoutHints lilh = rtc.getLegendLayoutHints( ); // consider legend title size. Label lgTitle = lg.getTitle( ); double lgTitleWidth = 0, lgTitleHeight = 0; double yOffset = 0, xOffset = 0, wOffset = 0, hOffset = 0; final boolean bRenderLegendTitle = lgTitle != null && lgTitle.isSetVisible( ) && lgTitle.isVisible( ); int iTitlePos = Position.ABOVE; if ( bRenderLegendTitle ) { lgTitle = LabelImpl.copyInstance( lgTitle ); // handle external resource string final String sPreviousValue = lgTitle.getCaption( ).getValue( ); lgTitle.getCaption( ) .setValue( rtc.externalizedMessage( sPreviousValue ) ); if ( lilh != null ) { // use cached value Size titleSize = lilh.getTitleSize( ); lgTitleWidth = titleSize.getWidth( ); lgTitleHeight = titleSize.getHeight( ); } else { BoundingBox bb = null; try { bb = Methods.computeBox( xs, IConstants.ABOVE, lgTitle, 0, 0 ); } catch ( IllegalArgumentException uiex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, uiex ); } lgTitleWidth = bb.getWidth( ); lgTitleHeight = bb.getHeight( ); } iTitlePos = lg.getTitlePosition( ).getValue( ); // swap left/right if ( isRightToLeft( ) ) { if ( iTitlePos == Position.LEFT ) { iTitlePos = Position.RIGHT; } else if ( iTitlePos == Position.RIGHT ) { iTitlePos = Position.LEFT; } } switch ( iTitlePos ) { case Position.ABOVE : yOffset = lgTitleHeight; hOffset = -yOffset; break; case Position.BELOW : hOffset = -lgTitleHeight; break; case Position.LEFT : xOffset = lgTitleWidth; wOffset = -xOffset; break; case Position.RIGHT : wOffset = -lgTitleWidth; break; } } // RENDER THE LEGEND CLIENT AREA final ClientArea ca = lg.getClientArea( ); final Insets lgIns = lg.getInsets( ).scaledInstance( dScale ); LineAttributes lia = ca.getOutline( ); bo = BoundsImpl.create( dX, dY, sz.getWidth( ), sz.getHeight( ) ); bo = bo.adjustedInstance( lgIns ); dX = bo.getLeft( ); dY = bo.getTop( ); // Adjust bounds. bo.delta( xOffset, yOffset, wOffset, hOffset ); dX = bo.getLeft( ); dY = bo.getTop( ); /* --- End of bounds computing --- */ final double dBaseX = dX; final double dBaseY = dY; final RectangleRenderEvent rre = (RectangleRenderEvent) ( (EventObjectCache) ir ).getEventObject( StructureSource.createLegend( lg ), RectangleRenderEvent.class ); // render client area shadow. if ( ca.getShadowColor( ) != null ) { rre.setBounds( bo.translateInstance( 3, 3 ) ); rre.setBackground( ca.getShadowColor( ) ); ipr.fillRectangle( rre ); } // render client area rre.setBounds( bo ); rre.setOutline( lia ); rre.setBackground( ca.getBackground( ) ); ipr.fillRectangle( rre ); ipr.drawRectangle( rre ); lia = LineAttributesImpl.copyInstance( lia ); lia.setVisible( true ); // SEPARATOR LINES MUST BE VISIBLE LineAttributes liSep = lg.getSeparator( ) == null ? lia : lg.getSeparator( ); final SeriesDefinition[] seda = cm.getSeriesForLegend( ); // INITIALIZATION OF VARS USED IN FOLLOWING LOOPS final Orientation o = lg.getOrientation( ); final Direction d = lg.getDirection( ); final Label la = LabelImpl.create( ); la.setCaption( TextImpl.copyInstance( lg.getText( ) ) ); la.getCaption( ).setValue( "X" ); //$NON-NLS-1$ final ITextMetrics itm = xs.getTextMetrics( la ); final double maxWrappingSize = lg.getWrappingSize( ); final double dItemHeight = itm.getFullHeight( ); final double dHorizontalSpacing = 4; final double dVerticalSpacing = 4; double dSeparatorThickness = lia.getThickness( ); Insets insCA = ca.getInsets( ).scaledInstance( dScale ); Series seBase; ArrayList al; LegendItemRenderingHints lirh; Palette pa; int iPaletteCount; EList elPaletteEntries; Fill fPaletteEntry; final boolean bPaletteByCategory = ( cm.getLegend( ) .getItemType( ) .getValue( ) == LegendItemType.CATEGORIES ); // Get available maximum block width/height. Block bl = cm.getBlock( ); Bounds boFull = bl.getBounds( ).scaledInstance( dScale ); Insets ins = bl.getInsets( ).scaledInstance( dScale ); double dMaxX = boFull.getLeft( ) + boFull.getWidth( ) - ins.getRight( ) - lgIns.getRight( ); double dMaxY = boFull.getTop( ) + boFull.getHeight( ) - ins.getBottom( ) - lgIns.getBottom( ); // Calculate if minSlice applicable. String sMinSliceLabel = null; boolean bMinSliceApplied = false; if ( lilh != null ) { // use cached value. sMinSliceLabel = lilh.getMinSliceText( ); bMinSliceApplied = lilh.isMinSliceApplied( ); } else { boolean bMinSliceDefined = false; double dMinSlice = 0; boolean bPercentageMinSlice = false; if ( cm instanceof ChartWithoutAxes ) { bMinSliceDefined = ( (ChartWithoutAxes) cm ).isSetMinSlice( ); dMinSlice = ( (ChartWithoutAxes) cm ).getMinSlice( ); bPercentageMinSlice = ( (ChartWithoutAxes) cm ).isMinSlicePercent( ); sMinSliceLabel = ( (ChartWithoutAxes) cm ).getMinSliceLabel( ); if ( sMinSliceLabel == null || sMinSliceLabel.length( ) == 0 ) { sMinSliceLabel = IConstants.UNDEFINED_STRING; } else { sMinSliceLabel = rtc.externalizedMessage( sMinSliceLabel ); } } // calculate if need an extra legend item when minSlice defined. if ( bMinSliceDefined && bPaletteByCategory && cm instanceof ChartWithoutAxes ) { if ( !( (ChartWithoutAxes) cm ).getSeriesDefinitions( ) .isEmpty( ) ) { // OK TO ASSUME THAT 1 BASE SERIES DEFINITION EXISTS SeriesDefinition sdBase = (SeriesDefinition) ( (ChartWithoutAxes) cm ).getSeriesDefinitions( ) .get( 0 ); SeriesDefinition[] sdOrtho = (SeriesDefinition[]) sdBase.getSeriesDefinitions( ) .toArray( ); DataSetIterator dsiOrtho = null; double dCurrentMinSlice = 0; for ( int i = 0; i < sdOrtho.length && !bMinSliceApplied; i++ ) { try { dsiOrtho = new DataSetIterator( ( (Series) sdOrtho[i].getRunTimeSeries( ) .get( 0 ) ).getDataSet( ) ); } catch ( Exception ex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, ex ); } // TODO Check dataset type, throw exception or ignore?. if ( bPercentageMinSlice ) { double total = 0; while ( dsiOrtho.hasNext( ) ) { Object obj = dsiOrtho.next( ); if ( obj instanceof Number ) { total += ( (Number) obj ).doubleValue( ); } } dsiOrtho.reset( ); dCurrentMinSlice = total * dMinSlice / 100d; } else { dCurrentMinSlice = dMinSlice; } while ( dsiOrtho.hasNext( ) ) { Object obj = dsiOrtho.next( ); if ( obj instanceof Number ) { double val = ( (Number) obj ).doubleValue( ); if ( val < dCurrentMinSlice ) { bMinSliceApplied = true; break; } } } } } } } // COMPUTATIONS HERE MUST BE IN SYNC WITH THE ACTUAL RENDERER if ( o.getValue( ) == Orientation.VERTICAL ) { double dXOffset = 0, dMaxW = 0; if ( bPaletteByCategory ) { SeriesDefinition sdBase = null; FormatSpecifier fs = null; if ( cm instanceof ChartWithAxes ) { // ONLY SUPPORT 1 BASE AXIS FOR NOW final Axis axPrimaryBase = ( (ChartWithAxes) cm ).getBaseAxes( )[0]; if ( axPrimaryBase.getSeriesDefinitions( ).isEmpty( ) ) { // NOTHING TO RENDER (BASE AXIS HAS NO SERIES // DEFINITIONS) return; } // OK TO ASSUME THAT 1 BASE SERIES DEFINITION EXISTS sdBase = (SeriesDefinition) axPrimaryBase.getSeriesDefinitions( ) .get( 0 ); } else if ( cm instanceof ChartWithoutAxes ) { if ( ( (ChartWithoutAxes) cm ).getSeriesDefinitions( ) .isEmpty( ) ) { // NOTHING TO RENDER (BASE AXIS HAS NO SERIES // DEFINITIONS) return; } // OK TO ASSUME THAT 1 BASE SERIES DEFINITION EXISTS sdBase = (SeriesDefinition) ( (ChartWithoutAxes) cm ).getSeriesDefinitions( ) .get( 0 ); } // OK TO ASSUME THAT 1 BASE RUNTIME SERIES EXISTS seBase = (Series) sdBase.getRunTimeSeries( ).get( 0 ); pa = sdBase.getSeriesPalette( ); elPaletteEntries = pa.getEntries( ); iPaletteCount = elPaletteEntries.size( ); if ( lilh != null && lilh.getLegendItemHints( ) != null ) { // use cached value LegendItemHints[] liha = lilh.getLegendItemHints( ); LegendItemHints lih; Map columnCache = searchMaxColumnWidth( liha ); for ( int i = 0; i < liha.length; i++ ) { // render each legend item. lih = liha[i]; if ( ( lih.getType( ) & IConstants.LEGEND_ENTRY ) == IConstants.LEGEND_ENTRY ) { la.getCaption( ).setValue( lih.getText( ) ); // CYCLE THROUGH THE PALETTE fPaletteEntry = (Fill) elPaletteEntries.get( lih.getCategoryIndex( ) % iPaletteCount ); lirh = (LegendItemRenderingHints) htRenderers.get( seBase ); double columnWidth = bo.getWidth( ); Double cachedWidth = (Double) columnCache.get( lih ); if ( cachedWidth != null ) { columnWidth = cachedWidth.doubleValue( ) + 3 * dItemHeight / 2 + 2 * insCA.getLeft( ); } renderLegendItem( ipr, lg, la, null, dBaseX + lih.getLeft( ), dBaseY + lih.getTop( ) + insCA.getTop( ), lih.getWidth( ), dItemHeight, lih.getHeight( ), 0, columnWidth, insCA.getLeft( ), dHorizontalSpacing, seBase, fPaletteEntry, lirh, i); } } } else { DataSetIterator dsiBase = null; try { dsiBase = new DataSetIterator( seBase.getDataSet( ) ); } catch ( Exception ex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, ex ); } if ( sdBase != null ) { fs = sdBase.getFormatSpecifier( ); } int i = 0; while ( dsiBase.hasNext( ) ) { Object obj = dsiBase.next( ); // TODO filter the not-used legend. // render legend item. dY += insCA.getTop( ); String lgtext = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, getRunTimeContext( ).getULocale( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } la.getCaption( ).setValue( lgtext ); itm.reuse( la, maxWrappingSize ); // RECYCLED fPaletteEntry = (Fill) elPaletteEntries.get( i++ % iPaletteCount ); // CYCLE THROUGH THE PALETTE lirh = (LegendItemRenderingHints) htRenderers.get( seBase ); if ( dY + itm.getFullHeight( ) + insCA.getBottom( ) > dMaxY ) { dXOffset += dMaxW + insCA.getLeft( ) + insCA.getRight( ) + ( 3 * dItemHeight ) / 2 + dHorizontalSpacing; dMaxW = 0; dY = bo.getTop( ) + insCA.getTop( ); dX = bo.getLeft( ) + dXOffset; } dMaxW = Math.max( dMaxW, itm.getFullWidth( ) ); renderLegendItem( ipr, lg, la, null, dX, dY, itm.getFullWidth( ), dItemHeight, itm.getFullHeight( ), 0, bo.getWidth( ), insCA.getLeft( ), dHorizontalSpacing, seBase, fPaletteEntry, lirh, i); dY += itm.getFullHeight( ) + insCA.getBottom( ); } // render the extra MinSlice legend item if applicable. if ( bMinSliceApplied ) { dY += insCA.getTop( ); la.getCaption( ).setValue( sMinSliceLabel ); itm.reuse( la, maxWrappingSize ); // RECYCLED fPaletteEntry = (Fill) elPaletteEntries.get( dsiBase.size( ) % iPaletteCount ); // CYCLE THROUGH THE PALETTE lirh = (LegendItemRenderingHints) htRenderers.get( seBase ); if ( dY + itm.getFullHeight( ) + insCA.getBottom( ) > dMaxY ) { dXOffset += dMaxW + insCA.getLeft( ) + insCA.getRight( ) + ( 3 * dItemHeight ) / 2 + dHorizontalSpacing; dMaxW = 0; dY = bo.getTop( ) + insCA.getTop( ); dX = bo.getLeft( ) + dXOffset; } dMaxW = Math.max( dMaxW, itm.getFullWidth( ) ); renderLegendItem( ipr, lg, la, null, dX, dY, itm.getFullWidth( ), dItemHeight, itm.getFullHeight( ), 0, bo.getWidth( ), insCA.getLeft( ), dHorizontalSpacing, seBase, fPaletteEntry, lirh, i); dY += itm.getFullHeight( ) + insCA.getBottom( ); } } } else if ( d.getValue( ) == Direction.TOP_BOTTOM ) { if ( lilh != null && lilh.getLegendItemHints( ) != null ) { LegendItemHints[] liha = lilh.getLegendItemHints( ); LegendItemHints lih; int k = 0; Map columnCache = searchMaxColumnWidth( liha ); for ( int j = 0; j < seda.length; j++ ) { al = seda[j].getRunTimeSeries( ); pa = seda[j].getSeriesPalette( ); elPaletteEntries = pa.getEntries( ); iPaletteCount = elPaletteEntries.size( ); for ( int i = 0; i < al.size( ); i++ ) { seBase = (Series) al.get( i ); lirh = (LegendItemRenderingHints) htRenderers.get( seBase ); lih = liha[k++]; if ( lih.getType( ) == IConstants.LEGEND_ENTRY ) { la.getCaption( ).setValue( lih.getText( ) ); Label valueLa = null; if ( lg.isShowValue( ) ) { valueLa = LabelImpl.copyInstance( seBase.getLabel( ) ); valueLa.getCaption( ) .setValue( lih.getExtraText( ) ); } // CYCLE THROUGH THE PALETTE fPaletteEntry = (Fill) elPaletteEntries.get( i % iPaletteCount ); double columnWidth = bo.getWidth( ); Double cachedWidth = (Double) columnCache.get( lih ); if ( cachedWidth != null ) { columnWidth = cachedWidth.doubleValue( ) + 3 * dItemHeight / 2 + 2 * insCA.getLeft( ); } renderLegendItem( ipr, lg, la, valueLa, dBaseX + lih.getLeft( ), dBaseY + lih.getTop( ) + insCA.getTop( ), lih.getWidth( ), dItemHeight, lih.getHeight( ), lih.getExtraHeight( ), columnWidth, insCA.getLeft( ), dHorizontalSpacing, seBase, fPaletteEntry, lirh, i); } } if ( j < seda.length - 1 ) { lih = liha[k]; if ( lih.getType( ) == IConstants.LEGEND_SEPERATOR ) { k++; renderSeparator( ipr, lg, liSep, dBaseX + lih.getLeft( ), dBaseY + lih.getTop( ), lih.getWidth( ), Orientation.HORIZONTAL_LITERAL ); } } } } else { dSeparatorThickness += dVerticalSpacing; for ( int j = 0; j < seda.length; j++ ) { al = seda[j].getRunTimeSeries( ); pa = seda[j].getSeriesPalette( ); elPaletteEntries = pa.getEntries( ); iPaletteCount = elPaletteEntries.size( ); FormatSpecifier fs = seda[j].getFormatSpecifier( ); for ( int i = 0; i < al.size( ); i++ ) { seBase = (Series) al.get( i ); lirh = (LegendItemRenderingHints) htRenderers.get( seBase ); dY += insCA.getTop( ); Object obj = seBase.getSeriesIdentifier( ); String lgtext = rtc.externalizedMessage( String.valueOf( obj ) ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, getRunTimeContext( ).getULocale( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } la.getCaption( ).setValue( lgtext ); itm.reuse( la, maxWrappingSize ); // RECYCLED double dFWidth = itm.getFullWidth( ); double dFHeight = itm.getFullHeight( ); Label valueLa = null; double valueHeight = 0; if ( lg.isShowValue( ) ) { DataSetIterator dsiBase = null; try { dsiBase = new DataSetIterator( seBase.getDataSet( ) ); } catch ( Exception ex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, ex ); } // Use first value for each series. if ( dsiBase.hasNext( ) ) { obj = dsiBase.next( ); String valueText = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, rtc.getULocale( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } valueLa = LabelImpl.copyInstance( seBase.getLabel( ) ); valueLa.getCaption( ).setValue( valueText ); itm.reuse( valueLa ); dFWidth = Math.max( dFWidth, itm.getFullWidth( ) ); valueHeight = itm.getFullHeight( ); } } if ( dY + dFHeight + valueHeight + 2 + insCA.getBottom( ) > dMaxY ) { dXOffset += dMaxW + insCA.getLeft( ) + insCA.getRight( ) + ( 3 * dItemHeight ) / 2 + dHorizontalSpacing; dMaxW = 0; dY = bo.getTop( ) + insCA.getTop( ); dX = bo.getLeft( ) + dXOffset; } dMaxW = Math.max( dMaxW, dFWidth ); fPaletteEntry = (Fill) elPaletteEntries.get( i % iPaletteCount ); // CYCLE THROUGH THE // PALETTE renderLegendItem( ipr, lg, la, valueLa, dX, dY, dFWidth, dItemHeight, dFHeight, valueHeight, bo.getWidth( ), insCA.getLeft( ), dHorizontalSpacing, seBase, fPaletteEntry, lirh, i); dY += dFHeight + insCA.getBottom( ) + valueHeight + 2; } if ( j < seda.length - 1 ) { renderSeparator( ipr, lg, liSep, dX, dY + dSeparatorThickness / 2, dMaxW + insCA.getLeft( ) + insCA.getRight( ) + ( 3 * dItemHeight ) / 2, Orientation.HORIZONTAL_LITERAL ); dY += dSeparatorThickness; } } } } else if ( d.getValue( ) == Direction.LEFT_RIGHT ) { if ( lilh != null && lilh.getLegendItemHints( ) != null ) { LegendItemHints[] liha = lilh.getLegendItemHints( ); LegendItemHints lih; int k = 0; Map columnCache = searchMaxColumnWidth( liha ); for ( int j = 0; j < seda.length; j++ ) { al = seda[j].getRunTimeSeries( ); pa = seda[j].getSeriesPalette( ); elPaletteEntries = pa.getEntries( ); iPaletteCount = elPaletteEntries.size( ); for ( int i = 0; i < al.size( ); i++ ) { seBase = (Series) al.get( i ); lirh = (LegendItemRenderingHints) htRenderers.get( seBase ); lih = liha[k++]; if ( lih.getType( ) == IConstants.LEGEND_ENTRY ) { la.getCaption( ).setValue( lih.getText( ) ); Label valueLa = null; if ( lg.isShowValue( ) ) { valueLa = LabelImpl.copyInstance( seBase.getLabel( ) ); valueLa.getCaption( ) .setValue( lih.getExtraText( ) ); } // CYCLE THROUGH THE PALETTE fPaletteEntry = (Fill) elPaletteEntries.get( i % iPaletteCount ); double columnWidth = bo.getWidth( ); Double cachedWidth = (Double) columnCache.get( lih ); if ( cachedWidth != null ) { columnWidth = cachedWidth.doubleValue( ) + 3 * dItemHeight / 2 + 2 * insCA.getLeft( ); } renderLegendItem( ipr, lg, la, valueLa, dBaseX + lih.getLeft( ), dBaseY + lih.getTop( ) + insCA.getTop( ), lih.getWidth( ), dItemHeight, lih.getHeight( ), lih.getExtraHeight( ), columnWidth, insCA.getLeft( ), dHorizontalSpacing, seBase, fPaletteEntry, lirh, i); } } if ( j < seda.length - 1 ) { lih = liha[k]; if ( lih.getType( ) == IConstants.LEGEND_SEPERATOR ) { k++; renderSeparator( ipr, lg, liSep, dBaseX + lih.getLeft( ), dBaseY + lih.getTop( ), bo.getHeight( ), Orientation.VERTICAL_LITERAL ); } } } } else { dSeparatorThickness += dHorizontalSpacing; for ( int j = 0; j < seda.length; j++ ) { dMaxW = 0; al = seda[j].getRunTimeSeries( ); pa = seda[j].getSeriesPalette( ); elPaletteEntries = pa.getEntries( ); iPaletteCount = elPaletteEntries.size( ); FormatSpecifier fs = seda[j].getFormatSpecifier( ); for ( int i = 0; i < al.size( ); i++ ) { dY += insCA.getTop( ); seBase = (Series) al.get( i ); lirh = (LegendItemRenderingHints) htRenderers.get( seBase ); Object obj = seBase.getSeriesIdentifier( ); String lgtext = rtc.externalizedMessage( String.valueOf( obj ) ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, getRunTimeContext( ).getULocale( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } la.getCaption( ).setValue( lgtext ); itm.reuse( la, maxWrappingSize ); // RECYCLED double dFWidth = itm.getFullWidth( ); double dFHeight = itm.getFullHeight( ); Label valueLa = null; double valueHeight = 0; if ( lg.isShowValue( ) ) { DataSetIterator dsiBase = null; try { dsiBase = new DataSetIterator( seBase.getDataSet( ) ); } catch ( Exception ex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, ex ); } // Use first value for each series. if ( dsiBase.hasNext( ) ) { obj = dsiBase.next( ); String valueText = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, rtc.getULocale( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } valueLa = LabelImpl.copyInstance( seBase.getLabel( ) ); valueLa.getCaption( ).setValue( valueText ); itm.reuse( valueLa ); dFWidth = Math.max( dFWidth, itm.getFullWidth( ) ); valueHeight = itm.getFullHeight( ); } } if ( dY + dFHeight + valueHeight + 2 + insCA.getBottom( ) > dMaxY ) { dXOffset += dMaxW + insCA.getLeft( ) + insCA.getRight( ) + ( 3 * dItemHeight ) / 2 + dHorizontalSpacing; dMaxW = 0; dY = bo.getTop( ); dX = bo.getLeft( ) + dXOffset; } dMaxW = Math.max( dMaxW, dFWidth ); fPaletteEntry = (Fill) elPaletteEntries.get( i % iPaletteCount ); // CYCLE THROUGH THE // PALETTE renderLegendItem( ipr, lg, la, valueLa, dX, dY, dFWidth, dItemHeight, dFHeight, valueHeight, bo.getWidth( ), insCA.getLeft( ), dHorizontalSpacing, seBase, fPaletteEntry, lirh, i); dY += dFHeight + insCA.getBottom( ) + valueHeight + 2; } // LEFT INSETS + LEGEND ITEM WIDTH + HORIZONTAL SPACING // + // MAX ITEM WIDTH + RIGHT INSETS dXOffset += insCA.getLeft( ) + ( 3 * dItemHeight / 2 ) + dHorizontalSpacing + dMaxW + insCA.getRight( ); dX += insCA.getLeft( ) + ( 3 * dItemHeight / 2 ) + dHorizontalSpacing + dMaxW + insCA.getRight( ); dY = bo.getTop( ); // SETUP VERTICAL SEPARATOR SPACING if ( j < seda.length - 1 ) { renderSeparator( ipr, lg, liSep, dX + dSeparatorThickness / 2, dY, bo.getHeight( ), Orientation.VERTICAL_LITERAL ); dX += dSeparatorThickness; } } } } else { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, "exception.illegal.legend.direction", //$NON-NLS-1$ new Object[]{ d.getName( ) }, Messages.getResourceBundle( rtc.getULocale( ) ) ); } } else if ( o.getValue( ) == Orientation.HORIZONTAL ) { double dYOffset = 0, dMaxH = 0; if ( bPaletteByCategory ) { SeriesDefinition sdBase = null; FormatSpecifier fs = null; if ( cm instanceof ChartWithAxes ) { // ONLY SUPPORT 1 BASE AXIS FOR NOW final Axis axPrimaryBase = ( (ChartWithAxes) cm ).getBaseAxes( )[0]; if ( axPrimaryBase.getSeriesDefinitions( ).isEmpty( ) ) { // NOTHING TO RENDER (BASE AXIS HAS NO SERIES // DEFINITIONS) return; } // OK TO ASSUME THAT 1 BASE SERIES DEFINITION EXISTS sdBase = (SeriesDefinition) axPrimaryBase.getSeriesDefinitions( ) .get( 0 ); } else if ( cm instanceof ChartWithoutAxes ) { if ( ( (ChartWithoutAxes) cm ).getSeriesDefinitions( ) .isEmpty( ) ) { // NOTHING TO RENDER (BASE AXIS HAS NO SERIES // DEFINITIONS) return; } // OK TO ASSUME THAT 1 BASE SERIES DEFINITION EXISTS sdBase = (SeriesDefinition) ( (ChartWithoutAxes) cm ).getSeriesDefinitions( ) .get( 0 ); } // OK TO ASSUME THAT 1 BASE RUNTIME SERIES EXISTS seBase = (Series) sdBase.getRunTimeSeries( ).get( 0 ); pa = sdBase.getSeriesPalette( ); elPaletteEntries = pa.getEntries( ); iPaletteCount = elPaletteEntries.size( ); if ( lilh != null && lilh.getLegendItemHints( ) != null ) { // use cached value LegendItemHints[] liha = lilh.getLegendItemHints( ); LegendItemHints lih; for ( int i = 0; i < liha.length; i++ ) { // render each legend item. lih = liha[i]; if ( ( lih.getType( ) & IConstants.LEGEND_ENTRY ) == IConstants.LEGEND_ENTRY ) { la.getCaption( ).setValue( lih.getText( ) ); // CYCLE THROUGH THE PALETTE fPaletteEntry = (Fill) elPaletteEntries.get( lih.getCategoryIndex( ) % iPaletteCount ); lirh = (LegendItemRenderingHints) htRenderers.get( seBase ); renderLegendItem( ipr, lg, la, null, dBaseX + lih.getLeft( ), dBaseY + lih.getTop( ) + insCA.getTop( ), lih.getWidth( ), dItemHeight, lih.getHeight( ), 0, lih.getWidth( ) + 3 * dItemHeight / 2 + 2 * insCA.getLeft( ), insCA.getLeft( ), dHorizontalSpacing, seBase, fPaletteEntry, lirh, i); } } } else { DataSetIterator dsiBase = null; try { dsiBase = new DataSetIterator( seBase.getDataSet( ) ); } catch ( Exception ex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, ex ); } if ( sdBase != null ) { fs = sdBase.getFormatSpecifier( ); } int i = 0; double dFullWidth = 0; dY += insCA.getTop( ); while ( dsiBase.hasNext( ) ) { Object obj = dsiBase.next( ); // TODO filter the not-used legend. dX += insCA.getLeft( ); String lgtext = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, getRunTimeContext( ).getULocale( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } la.getCaption( ).setValue( lgtext ); itm.reuse( la, maxWrappingSize ); // RECYCLED fPaletteEntry = (Fill) elPaletteEntries.get( i++ % iPaletteCount ); // CYCLE THROUGH THE PALETTE lirh = (LegendItemRenderingHints) htRenderers.get( seBase ); dFullWidth = itm.getFullWidth( ); if ( dX + dFullWidth + ( 3 * dItemHeight ) / 2 + insCA.getRight( ) > dMaxX ) { dYOffset += dMaxH + insCA.getTop( ) + insCA.getBottom( ) + dVerticalSpacing; dMaxH = 0; dX = bo.getLeft( ) + insCA.getLeft( ); dY = bo.getTop( ) + insCA.getTop( ) + dYOffset; } dMaxH = Math.max( dMaxH, itm.getFullHeight( ) ); renderLegendItem( ipr, lg, la, null, dX, dY, dFullWidth, dItemHeight, itm.getFullHeight( ), 0, dFullWidth + 3 * dItemHeight / 2 + 2 * insCA.getLeft( ), insCA.getLeft( ), dHorizontalSpacing, seBase, fPaletteEntry, lirh, i); dX += dFullWidth + ( 3 * dItemHeight ) / 2 + insCA.getRight( ); } // render the extra MinSlice legend item if applicable. if ( bMinSliceApplied ) { dX += insCA.getLeft( ); la.getCaption( ).setValue( sMinSliceLabel ); itm.reuse( la, maxWrappingSize ); // RECYCLED fPaletteEntry = (Fill) elPaletteEntries.get( dsiBase.size( ) % iPaletteCount ); // CYCLE THROUGH THE PALETTE lirh = (LegendItemRenderingHints) htRenderers.get( seBase ); dFullWidth = itm.getFullWidth( ); if ( dX + dFullWidth + ( 3 * dItemHeight ) / 2 + insCA.getRight( ) > dMaxX ) { dYOffset += dMaxH + insCA.getTop( ) + insCA.getBottom( ) + dVerticalSpacing; dMaxH = 0; dX = bo.getLeft( ) + insCA.getLeft( ); dY = bo.getTop( ) + insCA.getTop( ) + dYOffset; } dMaxH = Math.max( dMaxH, itm.getFullHeight( ) ); renderLegendItem( ipr, lg, la, null, dX, dY, dFullWidth, dItemHeight, itm.getFullHeight( ), 0, dFullWidth + 3 * dItemHeight / 2 + 2 * insCA.getLeft( ), insCA.getLeft( ), dHorizontalSpacing, seBase, fPaletteEntry, lirh, i); // LEFT INSETS + LEGEND ITEM WIDTH + HORIZONTAL SPACING // + MAX ITEM WIDTH + RIGHT INSETS dX += dFullWidth + ( 3 * dItemHeight ) / 2 + insCA.getRight( ); } } } else if ( d.getValue( ) == Direction.TOP_BOTTOM ) { if ( lilh != null && lilh.getLegendItemHints( ) != null ) { LegendItemHints[] liha = lilh.getLegendItemHints( ); LegendItemHints lih; int k = 0; for ( int j = 0; j < seda.length; j++ ) { al = seda[j].getRunTimeSeries( ); pa = seda[j].getSeriesPalette( ); elPaletteEntries = pa.getEntries( ); iPaletteCount = elPaletteEntries.size( ); for ( int i = 0; i < al.size( ); i++ ) { seBase = (Series) al.get( i ); lirh = (LegendItemRenderingHints) htRenderers.get( seBase ); lih = liha[k++]; if ( lih.getType( ) == IConstants.LEGEND_ENTRY ) { la.getCaption( ).setValue( lih.getText( ) ); Label valueLa = null; if ( lg.isShowValue( ) ) { valueLa = LabelImpl.copyInstance( seBase.getLabel( ) ); valueLa.getCaption( ) .setValue( lih.getExtraText( ) ); } // CYCLE THROUGH THE PALETTE fPaletteEntry = (Fill) elPaletteEntries.get( i % iPaletteCount ); renderLegendItem( ipr, lg, la, valueLa, dBaseX + lih.getLeft( ), dBaseY + lih.getTop( ) + insCA.getTop( ), lih.getWidth( ), dItemHeight, lih.getHeight( ), lih.getExtraHeight( ), lih.getWidth( ) + 3 * dItemHeight / 2 + 2 * insCA.getLeft( ), insCA.getLeft( ), dHorizontalSpacing, seBase, fPaletteEntry, lirh, i); } } if ( j < seda.length - 1 ) { lih = liha[k]; if ( lih.getType( ) == IConstants.LEGEND_SEPERATOR ) { k++; renderSeparator( ipr, lg, liSep, dBaseX + lih.getLeft( ), dBaseY + lih.getTop( ), bo.getWidth( ), Orientation.HORIZONTAL_LITERAL ); } } } } else { dSeparatorThickness += dVerticalSpacing; for ( int j = 0; j < seda.length; j++ ) { dMaxH = 0; dY += insCA.getTop( ); dX = bo.getLeft( ) + insCA.getLeft( ); al = seda[j].getRunTimeSeries( ); pa = seda[j].getSeriesPalette( ); elPaletteEntries = pa.getEntries( ); iPaletteCount = elPaletteEntries.size( ); FormatSpecifier fs = seda[j].getFormatSpecifier( ); for ( int i = 0; i < al.size( ); i++ ) { seBase = (Series) al.get( i ); lirh = (LegendItemRenderingHints) htRenderers.get( seBase ); Object obj = seBase.getSeriesIdentifier( ); String lgtext = rtc.externalizedMessage( String.valueOf( obj ) ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, getRunTimeContext( ).getULocale( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } la.getCaption( ).setValue( lgtext ); itm.reuse( la, maxWrappingSize ); // RECYCLED double dFWidth = itm.getFullWidth( ); double dFHeight = itm.getFullHeight( ); Label valueLa = null; double valueHeight = 0; if ( lg.isShowValue( ) ) { DataSetIterator dsiBase = null; try { dsiBase = new DataSetIterator( seBase.getDataSet( ) ); } catch ( Exception ex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, ex ); } // Use first value for each series. if ( dsiBase.hasNext( ) ) { obj = dsiBase.next( ); String valueText = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, rtc.getULocale( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } valueLa = LabelImpl.copyInstance( seBase.getLabel( ) ); valueLa.getCaption( ).setValue( valueText ); itm.reuse( valueLa ); dFWidth = Math.max( dFWidth, itm.getFullWidth( ) ); valueHeight = itm.getFullHeight( ); } } if ( dX + insCA.getLeft( ) + dFWidth + ( 3 * dItemHeight ) / 2 + insCA.getRight( ) > dMaxX ) { dYOffset += dMaxH + insCA.getTop( ) + insCA.getBottom( ) + dVerticalSpacing; dMaxH = 0; dX = bo.getLeft( ) + insCA.getLeft( ); dY = bo.getTop( ) + insCA.getTop( ) + dYOffset; } dMaxH = Math.max( dMaxH, dFHeight + valueHeight + 2 ); fPaletteEntry = (Fill) elPaletteEntries.get( i % iPaletteCount ); // CYCLE THROUGH THE // PALETTE renderLegendItem( ipr, lg, la, valueLa, dX, dY, dFWidth, dItemHeight, dFHeight, valueHeight, dFWidth + 3 * dItemHeight / 2 + 2 * insCA.getLeft( ), insCA.getLeft( ), dHorizontalSpacing, seBase, fPaletteEntry, lirh, i); // LEFT INSETS + LEGEND ITEM WIDTH + HORIZONTAL // SPACING // + MAX ITEM WIDTH + RIGHT INSETS dX += insCA.getLeft( ) + ( 3 * dItemHeight ) / 2 + dFWidth + insCA.getRight( ); } dYOffset += insCA.getTop( ) + insCA.getBottom( ) + dMaxH + dVerticalSpacing; dY += insCA.getTop( ) + insCA.getBottom( ) + dMaxH + dVerticalSpacing; dX = bo.getLeft( ) + insCA.getLeft( ); // SETUP HORIZONTAL SEPARATOR SPACING if ( j < seda.length - 1 ) { renderSeparator( ipr, lg, liSep, dX, dY + dSeparatorThickness / 2, bo.getWidth( ), Orientation.HORIZONTAL_LITERAL ); dY += dSeparatorThickness; } } } } else if ( d.getValue( ) == Direction.LEFT_RIGHT ) { if ( lilh != null && lilh.getLegendItemHints( ) != null ) { LegendItemHints[] liha = lilh.getLegendItemHints( ); LegendItemHints lih; int k = 0; for ( int j = 0; j < seda.length; j++ ) { al = seda[j].getRunTimeSeries( ); pa = seda[j].getSeriesPalette( ); elPaletteEntries = pa.getEntries( ); iPaletteCount = elPaletteEntries.size( ); for ( int i = 0; i < al.size( ); i++ ) { seBase = (Series) al.get( i ); lirh = (LegendItemRenderingHints) htRenderers.get( seBase ); lih = liha[k++]; if ( lih.getType( ) == IConstants.LEGEND_ENTRY ) { la.getCaption( ).setValue( lih.getText( ) ); Label valueLa = null; if ( lg.isShowValue( ) ) { valueLa = LabelImpl.copyInstance( seBase.getLabel( ) ); valueLa.getCaption( ) .setValue( lih.getExtraText( ) ); } // CYCLE THROUGH THE PALETTE fPaletteEntry = (Fill) elPaletteEntries.get( i % iPaletteCount ); renderLegendItem( ipr, lg, la, valueLa, dBaseX + lih.getLeft( ), dBaseY + lih.getTop( ) + insCA.getTop( ), lih.getWidth( ), dItemHeight, lih.getHeight( ), lih.getExtraHeight( ), lih.getWidth( ) + 3 * dItemHeight / 2 + 2 * insCA.getLeft( ), insCA.getLeft( ), dHorizontalSpacing, seBase, fPaletteEntry, lirh, i); } } if ( j < seda.length - 1 ) { lih = liha[k]; if ( lih.getType( ) == IConstants.LEGEND_SEPERATOR ) { k++; renderSeparator( ipr, lg, liSep, dBaseX + lih.getLeft( ), dBaseY + lih.getTop( ), lih.getHeight( ), Orientation.VERTICAL_LITERAL ); } } } } else { dSeparatorThickness += dHorizontalSpacing; dX += insCA.getLeft( ); dY += insCA.getTop( ); for ( int j = 0; j < seda.length; j++ ) { al = seda[j].getRunTimeSeries( ); pa = seda[j].getSeriesPalette( ); elPaletteEntries = pa.getEntries( ); iPaletteCount = elPaletteEntries.size( ); FormatSpecifier fs = seda[j].getFormatSpecifier( ); for ( int i = 0; i < al.size( ); i++ ) { seBase = (Series) al.get( i ); lirh = (LegendItemRenderingHints) htRenderers.get( seBase ); Object obj = seBase.getSeriesIdentifier( ); String lgtext = rtc.externalizedMessage( String.valueOf( obj ) ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, getRunTimeContext( ).getULocale( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } la.getCaption( ).setValue( lgtext ); itm.reuse( la, maxWrappingSize ); // RECYCLED double dFWidth = itm.getFullWidth( ); double dFHeight = itm.getFullHeight( ); Label valueLa = null; double valueHeight = 0; if ( lg.isShowValue( ) ) { DataSetIterator dsiBase = null; try { dsiBase = new DataSetIterator( seBase.getDataSet( ) ); } catch ( Exception ex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, ex ); } // Use first value for each series. if ( dsiBase.hasNext( ) ) { obj = dsiBase.next( ); String valueText = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, rtc.getULocale( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } valueLa = LabelImpl.copyInstance( seBase.getLabel( ) ); valueLa.getCaption( ).setValue( valueText ); itm.reuse( valueLa ); dFWidth = Math.max( dFWidth, itm.getFullWidth( ) ); valueHeight = itm.getFullHeight( ); } } if ( dX + insCA.getLeft( ) + dFWidth + ( 3 * dItemHeight ) / 2 + insCA.getRight( ) > dMaxX ) { dYOffset += dMaxH + insCA.getTop( ) + insCA.getBottom( ) + dVerticalSpacing; dMaxH = 0; dX = bo.getLeft( ) + insCA.getLeft( ); dY = bo.getTop( ) + dYOffset; } dMaxH = Math.max( dMaxH, dFHeight + valueHeight + 2 ); fPaletteEntry = (Fill) elPaletteEntries.get( i % iPaletteCount ); // CYCLE THROUGH THE // PALETTE renderLegendItem( ipr, lg, la, valueLa, dX, dY, dFWidth, dItemHeight, dFHeight, valueHeight, dFWidth + 3 * dItemHeight / 2 + 2 * insCA.getLeft( ), insCA.getLeft( ), dHorizontalSpacing, seBase, fPaletteEntry, lirh, i); // LEFT INSETS + LEGEND ITEM WIDTH + HORIZONTAL // SPACING // + MAX ITEM WIDTH + RIGHT INSETS dX += insCA.getLeft( ) + ( 3 * dItemHeight ) / 2 + dHorizontalSpacing + dFWidth + insCA.getRight( ); } // SETUP VERTICAL SEPARATOR SPACING if ( j < seda.length - 1 ) { renderSeparator( ipr, lg, liSep, dX + dSeparatorThickness / 2, dY, dMaxH, Orientation.VERTICAL_LITERAL ); dX += dSeparatorThickness; } } } } else { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, "exception.illegal.legend.direction", //$NON-NLS-1$ new Object[]{ d.getName( ) }, Messages.getResourceBundle( rtc.getULocale( ) ) ); } } else { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, "exception.illegal.legend.orientation", //$NON-NLS-1$ new Object[]{ o.getName( ) }, Messages.getResourceBundle( rtc.getULocale( ) ) ); } // Render legend title if defined. if ( bRenderLegendTitle ) { double lX = bo.getLeft( ); double lY = bo.getTop( ); switch ( iTitlePos ) { case Position.ABOVE : lX = bo.getLeft( ) + ( bo.getWidth( ) - lgTitleWidth ) / 2d; lY = bo.getTop( ) - lgTitleHeight; break; case Position.BELOW : lX = bo.getLeft( ) + ( bo.getWidth( ) - lgTitleWidth ) / 2d; lY = bo.getTop( ) + bo.getHeight( ); break; case Position.LEFT : lX = bo.getLeft( ) - lgTitleWidth; lY = bo.getTop( ) + ( bo.getHeight( ) - lgTitleHeight ) / 2d; break; case Position.RIGHT : lX = bo.getLeft( ) + bo.getWidth( ); lY = bo.getTop( ) + ( bo.getHeight( ) - lgTitleHeight ) / 2d; break; } final TextRenderEvent tre = (TextRenderEvent) ( (EventObjectCache) ir ).getEventObject( WrappedStructureSource.createLegendTitle( lg, lgTitle ), TextRenderEvent.class ); tre.setBlockBounds( BoundsImpl.create( lX, lY, lgTitleWidth, lgTitleHeight ) ); TextAlignment ta = TextAlignmentImpl.create( ); ta.setHorizontalAlignment( HorizontalAlignment.CENTER_LITERAL ); ta.setVerticalAlignment( VerticalAlignment.CENTER_LITERAL ); tre.setBlockAlignment( ta ); tre.setLabel( lgTitle ); tre.setAction( TextRenderEvent.RENDER_TEXT_IN_BLOCK ); ipr.drawText( tre ); } itm.dispose( ); // DISPOSE RESOURCES AFTER USE } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/be5773dc2bda91795f2d0d13fd3cd93a5ec0c82f/BaseRenderer.java/clean/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/render/BaseRenderer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1743,
16812,
12,
467,
9840,
6747,
277,
683,
16,
17167,
409,
15266,
16,
1635,
14049,
3420,
414,
262,
1082,
202,
15069,
14804,
503,
202,
95,
202,
202,
430,
261,
401,
23623,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1743,
16812,
12,
467,
9840,
6747,
277,
683,
16,
17167,
409,
15266,
16,
1635,
14049,
3420,
414,
262,
1082,
202,
15069,
14804,
503,
202,
95,
202,
202,
430,
261,
401,
23623,
... |
assert id2Pass.get(id) != null : id; topPasses.remove(id2Pass.get(id)); | TextEditorHighlightingPass pred = id2Pass.get(id); if (pred != null) { topPasses.remove(pred); } | private static List<TextEditorHighlightingPass> topoSort(final TIntObjectHashMap<TextEditorHighlightingPass> id2Pass) { final Set<TextEditorHighlightingPass> topPasses = new THashSet<TextEditorHighlightingPass>(id2Pass.size()); id2Pass.forEachValue(new TObjectProcedure<TextEditorHighlightingPass>() { public boolean execute(TextEditorHighlightingPass object) { topPasses.add(object); return true; } }); id2Pass.forEachValue(new TObjectProcedure<TextEditorHighlightingPass>() { public boolean execute(TextEditorHighlightingPass pass) { for (int id : pass.getCompletionPredecessorIds()) { assert id2Pass.get(id) != null : id; topPasses.remove(id2Pass.get(id)); } for (int id : pass.getStartingPredecessorIds()) { assert id2Pass.get(id) != null : id; topPasses.remove(id2Pass.get(id)); } return true; } }); List<TextEditorHighlightingPass> result = new ArrayList<TextEditorHighlightingPass>(); for (TextEditorHighlightingPass topPass : topPasses) { layout(topPass, result, id2Pass); } return result; } | 12814 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12814/034f32c3c1891334051f61678e27be4272fde111/TextEditorHighlightingPassRegistrarImpl.java/clean/codeInsight/impl/com/intellij/codeInsight/daemon/impl/TextEditorHighlightingPassRegistrarImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
760,
987,
32,
1528,
6946,
16205,
310,
6433,
34,
17671,
4416,
12,
6385,
399,
1702,
921,
8658,
32,
1528,
6946,
16205,
310,
6433,
34,
612,
22,
6433,
13,
288,
565,
727,
1000,
32,
1528... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
987,
32,
1528,
6946,
16205,
310,
6433,
34,
17671,
4416,
12,
6385,
399,
1702,
921,
8658,
32,
1528,
6946,
16205,
310,
6433,
34,
612,
22,
6433,
13,
288,
565,
727,
1000,
32,
1528... |
return dst_raster; | return dst_raster; | private Raster createCompatibleRaster(Raster raster) { //todo fix gif images (index color model?), optimize final ColorModel dst_model = surface.getColorModel(); final int[] samples = new int[4]; final int w = raster.getWidth(); final int h = raster.getHeight(); final WritableRaster dst_raster = dst_model.createCompatibleWritableRaster(w, h); for (int y = 0; y < h; y++) { for (int x = 0; x < w; x++) { raster.getPixel(x, y, samples); dst_raster.setPixel(x, y, samples); } } return dst_raster; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/558542f2f668a53027929612941782dbdbb712e1/AbstractSurfaceGraphics.java/clean/gui/src/awt/org/jnode/awt/util/AbstractSurfaceGraphics.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
30757,
752,
14599,
18637,
12,
18637,
12553,
13,
288,
3639,
368,
9012,
2917,
27618,
4602,
261,
1615,
2036,
938,
35,
3631,
10979,
3639,
727,
5563,
1488,
3046,
67,
2284,
273,
9034,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
30757,
752,
14599,
18637,
12,
18637,
12553,
13,
288,
3639,
368,
9012,
2917,
27618,
4602,
261,
1615,
2036,
938,
35,
3631,
10979,
3639,
727,
5563,
1488,
3046,
67,
2284,
273,
9034,
... |
return new String("Nearby terrain blocks front weapons."); | return "Nearby terrain blocks front weapons."; | private static String toHitIsImpossible(IGame game, Entity ae, Targetable target, Mounted weapon, AmmoType atype, WeaponType wtype, int ttype, boolean exchangeSwarmTarget, boolean usesAmmo, Entity te, boolean isTAG, boolean isInferno, boolean isAttackerInfantry, boolean isIndirect, int attackerId, int weaponId, boolean isArtilleryIndirect, Mounted ammo, boolean isArtilleryFLAK, boolean targetInBuilding, boolean isArtilleryDirect) { boolean isHoming = false; ToHitData toHit = null; if ( ae.hasShield() && ae.hasActiveShield(weapon.getLocation(),weapon.isRearMounted()) ) return new String("Weapon blocked by active shield"); // missing, breached or jammed weapons can't fire if (!weapon.canFire()) { return new String("Weapon is not in a state where it can be fired"); } // If we're lying mines, we can't shoot. if (ae.isLayingMines()) { return new String("Can't fire weapons when laying mines"); } // make sure weapon can deliver minefield if (target.getTargetType() == Targetable.TYPE_MINEFIELD_DELIVER && !AmmoType.canDeliverMinefield(atype)) { return new String("Weapon can't deliver minefields"); } if (target.getTargetType() == Targetable.TYPE_FLARE_DELIVER && !(usesAmmo && atype.getAmmoType() == AmmoType.T_LRM && atype.getMunitionType() == AmmoType.M_FLARE)) { return new String("Weapon can't deliver flares"); } if ((game.getPhase() == IGame.PHASE_TARGETING) && !isArtilleryIndirect) { return new String("Only indirect artillery can be fired in the targeting phase"); } if ((game.getPhase() == IGame.PHASE_OFFBOARD) && !isTAG) { return new String("Only TAG can be fired in the offboard attack phase"); } if ((game.getPhase() != IGame.PHASE_OFFBOARD) && isTAG) { return new String("TAG can only be fired in the offboard attack phase"); } if ( atype != null && atype.getAmmoType() == AmmoType.T_LRM && ( atype.getMunitionType() == AmmoType.M_THUNDER || atype.getMunitionType() == AmmoType.M_THUNDER_ACTIVE || atype.getMunitionType() == AmmoType.M_THUNDER_INFERNO || atype.getMunitionType() == AmmoType.M_THUNDER_VIBRABOMB|| atype.getMunitionType() == AmmoType.M_THUNDER_AUGMENTED ) && target.getTargetType() != Targetable.TYPE_MINEFIELD_DELIVER) { return new String("Weapon can only deliver minefields" ); } if ( atype != null && atype.getAmmoType() == AmmoType.T_LRM && atype.getMunitionType() == AmmoType.M_FLARE && target.getTargetType() != Targetable.TYPE_FLARE_DELIVER) { return new String("Weapon can only deliver flares" ); } // some weapons can only target infantry if ( wtype.hasFlag(WeaponType.F_INFANTRY_ONLY) ) { if (te != null && !(te instanceof Infantry) || target.getTargetType() != Targetable.TYPE_ENTITY) { return new String("Weapon can only be used against infantry" ); } } // make sure weapon can clear minefield if (target instanceof MinefieldTarget && !AmmoType.canClearMinefield(atype)) { return new String("Weapon can't clear minefields"); } // Arty shots have to be with arty, non arty shots with non arty. if (wtype.hasFlag(WeaponType.F_ARTILLERY)) { //check artillery is targetted appropriately for its ammo long munition = AmmoType.M_STANDARD; if (atype != null) { munition = atype.getMunitionType(); } if (munition == AmmoType.M_HOMING) { //target type checked later because its different for direct/indirect (BMRr p77 on board arrow IV) isHoming = true; } else if (ttype != Targetable.TYPE_HEX_ARTILLERY && !isArtilleryFLAK) { return new String("Weapon must make artillery attacks."); } } else { //weapon is not artillery if (ttype == Targetable.TYPE_HEX_ARTILLERY) { return new String("Weapon can't make artillery attacks."); } } // can't target yourself, unless those are swarm missiles that // continued to a new target if (ae.equals(te) && !exchangeSwarmTarget) { return new String("You can't target yourself"); } // weapon operational? if (weapon.isDestroyed() || weapon.isBreached()) { return new String("Weapon not operational."); } // got ammo? // don't check if it's a swarm-missile-follow-on-attack, we used the ammo previously if ( usesAmmo && !exchangeSwarmTarget && (ammo == null || ammo.getShotsLeft() == 0 || ammo.isBreached()) ) { return new String("Weapon out of ammo."); } // Are we dumping that ammo? if ( usesAmmo && ammo.isDumping() ) { ae.loadWeaponWithSameAmmo( weapon ); if ( ammo.getShotsLeft() == 0 || ammo.isDumping() ) { return new String("Dumping remaining ammo." ); } } // is the attacker even active? if (ae.isShutDown() || !ae.getCrew().isActive()) { return new String("Attacker is in no condition to fire weapons."); } // sensors operational? int sensorHits = ae.getBadCriticals(CriticalSlot.TYPE_SYSTEM, Mech.SYSTEM_SENSORS, Mech.LOC_HEAD); if ((ae instanceof Mech) && ((Mech)ae).getCockpitType() == Mech.COCKPIT_TORSO_MOUNTED) { sensorHits += ae.getBadCriticals(CriticalSlot.TYPE_SYSTEM, Mech.SYSTEM_SENSORS, Mech.LOC_CT); if (sensorHits > 2) return new String("Attacker sensors destroyed."); } else if (sensorHits > 1) { return new String("Attacker sensors destroyed."); } // Is the weapon blocked by a passenger? if ( ae.isWeaponBlockedAt(weapon.getLocation(), weapon.isRearMounted()) ) { return new String("Weapon blocked by passenger."); } // Can't target an entity conducting a swarm attack. if ( te != null && Entity.NONE != te.getSwarmTargetId() ) { return new String("Target is swarming a Mek."); } // can't target non-wood hexes for clearing (except thin ice) if (Targetable.TYPE_HEX_CLEAR == target.getTargetType()) { IHex hexTarget = game.getBoard().getHex(target.getPosition()); if(!hexTarget.containsTerrain(Terrains.WOODS) && !hexTarget.containsTerrain(Terrains.JUNGLE) && !(hexTarget.containsTerrain(Terrains.ICE) && hexTarget.containsTerrain(Terrains.WATER))) { return new String("Target terrain cannot be cleared."); } // Infantry can't clear woods. if ( isAttackerInfantry ) { return new String("Infantry can not clear terrain."); } } // Infantry can't clear woods. if ( isAttackerInfantry && Targetable.TYPE_HEX_CLEAR == target.getTargetType() ) { return new String("Infantry can not clear woods."); } // Some weapons can't cause fires, but Infernos always can. if ( wtype.hasFlag(WeaponType.F_NO_FIRES) && !isInferno && Targetable.TYPE_HEX_IGNITE == target.getTargetType() ) { return new String("Weapon can not cause fires."); } // only woods and buildings can be set intentionally on fire if (target.getTargetType() == Targetable.TYPE_HEX_IGNITE && game.getOptions().booleanOption("no_ignite_clear") && !((game.getBoard().getHex(((HexTarget)target).getPosition()).containsTerrain(Terrains.WOODS)) || (game.getBoard().getHex(((HexTarget)target).getPosition()).containsTerrain(Terrains.JUNGLE)) || (game.getBoard().getHex(((HexTarget)target).getPosition()).containsTerrain(Terrains.BUILDING)))) { return new String("Only woods and building hexes can be set on fire intentionally."); } // Can't target infantry with Inferno rounds (BMRr, pg. 141). // Also, enforce options for keeping vehicles and protos safe // if those options are checked. if ( isInferno && (te instanceof Infantry || (te instanceof Tank && game.getOptions().booleanOption("vehicles_safe_from_infernos")) || (te instanceof Protomech && game.getOptions().booleanOption("protos_safe_from_infernos"))) ) { return new String("Can not target that unit type with Inferno rounds." ); } // The TAG system cannot target infantry. if( isTAG && te instanceof Infantry ) { return new String("Can not target infantry with TAG." ); } // Can't raise the heat of infantry or tanks. if ( wtype.hasFlag(WeaponType.F_FLAMER) && wtype.hasModes() && weapon.curMode().equals("Heat") && !(te instanceof Mech) ) { return new String("Can only raise the heat level of Meks."); } // Handle solo attack weapons. if ( wtype.hasFlag(WeaponType.F_SOLO_ATTACK) ) { for ( Enumeration i = game.getActions(); i.hasMoreElements(); ) { Object o = i.nextElement(); if (!(o instanceof WeaponAttackAction)) { continue; } WeaponAttackAction prevAttack = (WeaponAttackAction)o; if (prevAttack.getEntityId() == attackerId) { // If the attacker fires another weapon, this attack fails. if ( weaponId != prevAttack.getWeaponId() ) { return new String("Other weapon attacks declared."); } } } } else if(isAttackerInfantry && !(ae instanceof BattleArmor)) { // check for trying to fire field gun after moving if(!wtype.hasFlag(WeaponType.F_INFANTRY) && ae.moved != IEntityMovementType.MOVE_NONE) { return new String("Can't fire field guns in same turn as moving"); } //check for mixing infantry and field gun attacks for ( Enumeration i = game.getActions(); i.hasMoreElements(); ) { Object o = i.nextElement(); if (!(o instanceof WeaponAttackAction)) { continue; } WeaponAttackAction prevAttack = (WeaponAttackAction)o; if (prevAttack.getEntityId() == attackerId) { Mounted prevWeapon = ae.getEquipment(prevAttack.getWeaponId()); if( ((WeaponType)(prevWeapon.getType())).hasFlag(WeaponType.F_INFANTRY) != wtype.hasFlag(WeaponType.F_INFANTRY) ) { return new String("Can't fire field guns and small arms at the same time."); } } } } // check if indirect fire is valid if (isIndirect && !game.getOptions().booleanOption("indirect_fire")) { return new String("Indirect fire option not enabled"); } if (isIndirect && game.getOptions().booleanOption("indirect_fire") && !game.getOptions().booleanOption("indirect_always_possible") && LosEffects.calculateLos(game, attackerId, target).canSee()) { return new String("Indirect fire impossible with direct LOS"); } // hull down vees can't fire front weapons if(ae instanceof Tank && ae.isHullDown() && weapon.getLocation() == Tank.LOC_FRONT) { return new String("Nearby terrain blocks front weapons."); } // Weapon in arc? if (!Compute.isInArc(game, attackerId, weaponId, target)) { return new String("Target not in arc."); } // BA Micro bombs only when flying if (atype != null && atype.getAmmoType() == AmmoType.T_BA_MICRO_BOMB) { if (ae.getElevation() == 0) { return new String("attacker must be at least at elevation 1"); } else if (target.getTargetType() != Targetable.TYPE_HEX_BOMB) { return new String("must target hex with bombs"); } } if (target.getTargetType() == Targetable.TYPE_HEX_BOMB && !(usesAmmo && atype.getAmmoType() == AmmoType.T_BA_MICRO_BOMB)) { return new String("Weapon can't deliver bombs"); } Entity spotter = null; if (isIndirect) { spotter = Compute.findSpotter(game, ae, target); if (spotter == null) { return new String("No available spotter"); } } int eistatus=0; // check LOS (indirect LOS is from the spotter) LosEffects los; ToHitData losMods; if (!isIndirect) { los = LosEffects.calculateLos(game, attackerId, target); if(ae.hasActiveEiCockpit()) { if(los.getLightWoods() > 0) eistatus = 2; else eistatus = 1; } losMods = los.losModifiers(game, eistatus); } else { los = LosEffects.calculateLos(game, spotter.getId(), target); // do not count attacker partial cover in indirect fire los.setAttackerCover(LosEffects.COVER_NONE); if(spotter.hasActiveEiCockpit()) { if(los.getLightWoods() > 0) eistatus = 2; else eistatus = 1; } losMods = los.losModifiers(game); } // if LOS is blocked, block the shot if (losMods.getValue() == ToHitData.IMPOSSIBLE && !isArtilleryIndirect) { return losMods.getDesc(); } // Must target infantry in buildings from the inside. if ( targetInBuilding && te instanceof Infantry && null == los.getThruBldg() ) { return new String("Attack on infantry crosses building exterior wall."); } // attacker partial cover means no leg weapons if (los.isAttackerCover() && ae.locationIsLeg(weapon.getLocation()) && ae.getLocationStatus(weapon.getLocation()) != ILocationExposureStatus.WET) { return new String("Nearby terrain blocks leg weapons."); } // Leg attacks, Swarm attacks, and // Mine Launchers don't use gunnery. if ( Infantry.LEG_ATTACK.equals( wtype.getInternalName() ) ) { toHit = Compute.getLegAttackBaseToHit( ae, te ); // Return if the attack is impossible. if ( ToHitData.IMPOSSIBLE == toHit.getValue() ) { return toHit.getDesc(); } } else if ( Infantry.SWARM_MEK.equals( wtype.getInternalName() ) ) { toHit = Compute.getSwarmMekBaseToHit( ae, te ); // Return if the attack is impossible. if ( ToHitData.IMPOSSIBLE == toHit.getValue() ) { return toHit.getDesc(); } } else if ( Infantry.STOP_SWARM.equals( wtype.getInternalName() ) ) { // Can't stop if we're not swarming, otherwise automatic. if ( Entity.NONE == ae.getSwarmTargetId() ) { return new String("Not swarming a Mek." ); } } else if ( BattleArmor.MINE_LAUNCHER.equals(wtype.getInternalName()) ) { // Mine launchers can not hit infantry. if ( te instanceof Infantry ) { return new String("Can not attack infantry." ); } } // Swarming infantry always hit their target, but // they can only target the Mek they're swarming. else if ( te != null && ae.getSwarmTargetId() == te.getId() ) { // Only certain weapons can be used in a swarm attack. if ( wtype.getDamage() == 0 ) { return new String("Weapon causes no damage." ); } } else if ( Entity.NONE != ae.getSwarmTargetId() ) { return new String("Must target the Mek being swarmed." ); } int aElev = ae.getElevation(); int tElev = target.getElevation(); int distance = Compute.effectiveDistance(game, ae, target); if(atype != null && atype.getAmmoType() == AmmoType.T_LRM && atype.getMunitionType() == AmmoType.M_SEMIGUIDED) { if (te == null || te.getTaggedBy() == -1) { // from a rules clarification return new String("Semi-guided LRMs must target a unit tagged this turn"); } } // Handle direct artillery attacks. if (isArtilleryDirect) { if (distance >17) { return new String("Direct artillery attack at range >17 hexes."); } if (isHoming) { if (te == null || te.getTaggedBy() == -1) { // see BMRr p77 on board arrow IV return new String("On board homing shot must target a unit tagged this turn"); } } } if (isArtilleryIndirect) { int boardRange=(int)Math.ceil((distance)/17f); if (boardRange>wtype.getLongRange()) { return new String("Indirect artillery attack out of range"); } if (distance<=17 && !(losMods.getValue()==ToHitData.IMPOSSIBLE)) { return new String("Cannot fire indirectly at range <=17 hexes unless no LOS."); } if (isHoming) { if(ttype != Targetable.TYPE_HEX_ARTILLERY) { return new String("Off board homing shot must target a map sheet"); } } } return null; } | 3464 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3464/c2a90fca192b338ebf5162499c52b535aed6382b/WeaponAttackAction.java/clean/megamek/src/megamek/common/actions/WeaponAttackAction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
514,
358,
13616,
2520,
1170,
12708,
12,
3047,
339,
7920,
16,
3887,
14221,
16,
1171,
9079,
5916,
429,
1018,
16,
13076,
329,
732,
28629,
16,
3986,
8683,
559,
30965,
16,
17311,
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,
3238,
760,
514,
358,
13616,
2520,
1170,
12708,
12,
3047,
339,
7920,
16,
3887,
14221,
16,
1171,
9079,
5916,
429,
1018,
16,
13076,
329,
732,
28629,
16,
3986,
8683,
559,
30965,
16,
17311,
16... |
public String toString() { StringBuffer buffer; buffer = new StringBuffer(super.toString()); buffer.append('['); if (specificationResourcePath != null) buffer.append(specificationResourcePath); else if (componentClassName != null) buffer.append(componentClassName); buffer.append(']'); return buffer.toString(); } | 4433 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4433/e9d5abfcc637eabe88c54feb52ad561f2c9e5d77/ComponentSpecification.java/buggy/framework/src/com/primix/tapestry/spec/ComponentSpecification.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
1762,
1435,
202,
95,
202,
202,
780,
1892,
1613,
31,
202,
202,
4106,
273,
394,
6674,
12,
9565,
18,
10492,
10663,
202,
202,
4106,
18,
6923,
2668,
3292,
1769,
202,
202,
430,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
1762,
1435,
202,
95,
202,
202,
780,
1892,
1613,
31,
202,
202,
4106,
273,
394,
6674,
12,
9565,
18,
10492,
10663,
202,
202,
4106,
18,
6923,
2668,
3292,
1769,
202,
202,
430,... | ||
if ( synPredMatched151 ) { | if ( synPredMatched152 ) { | public final void comparisonExpr() throws RecognitionException, TokenStreamException, XPathException { returnAST = null; ASTPair currentAST = new ASTPair(); org.exist.xquery.parser.XQueryAST comparisonExpr_AST = null; rangeExpr(); astFactory.addASTChild(currentAST, returnAST); { switch ( LA(1)) { case LITERAL_eq: case LITERAL_ne: case LITERAL_lt: case LITERAL_le: case LITERAL_gt: case LITERAL_ge: { { { switch ( LA(1)) { case LITERAL_eq: { org.exist.xquery.parser.XQueryAST tmp166_AST = null; tmp166_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.makeASTRoot(currentAST, tmp166_AST); match(LITERAL_eq); break; } case LITERAL_ne: { org.exist.xquery.parser.XQueryAST tmp167_AST = null; tmp167_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.makeASTRoot(currentAST, tmp167_AST); match(LITERAL_ne); break; } case LITERAL_lt: { org.exist.xquery.parser.XQueryAST tmp168_AST = null; tmp168_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.makeASTRoot(currentAST, tmp168_AST); match(LITERAL_lt); break; } case LITERAL_le: { org.exist.xquery.parser.XQueryAST tmp169_AST = null; tmp169_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.makeASTRoot(currentAST, tmp169_AST); match(LITERAL_le); break; } case LITERAL_gt: { org.exist.xquery.parser.XQueryAST tmp170_AST = null; tmp170_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.makeASTRoot(currentAST, tmp170_AST); match(LITERAL_gt); break; } case LITERAL_ge: { org.exist.xquery.parser.XQueryAST tmp171_AST = null; tmp171_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.makeASTRoot(currentAST, tmp171_AST); match(LITERAL_ge); break; } default: { throw new NoViableAltException(LT(1), getFilename()); } } } rangeExpr(); astFactory.addASTChild(currentAST, returnAST); } break; } case LITERAL_is: case LITERAL_isnot: { { { switch ( LA(1)) { case LITERAL_is: { org.exist.xquery.parser.XQueryAST tmp172_AST = null; tmp172_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.makeASTRoot(currentAST, tmp172_AST); match(LITERAL_is); break; } case LITERAL_isnot: { org.exist.xquery.parser.XQueryAST tmp173_AST = null; tmp173_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.makeASTRoot(currentAST, tmp173_AST); match(LITERAL_isnot); break; } default: { throw new NoViableAltException(LT(1), getFilename()); } } } rangeExpr(); astFactory.addASTChild(currentAST, returnAST); } break; } case ANDEQ: case OREQ: { { { switch ( LA(1)) { case ANDEQ: { org.exist.xquery.parser.XQueryAST tmp174_AST = null; tmp174_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.makeASTRoot(currentAST, tmp174_AST); match(ANDEQ); break; } case OREQ: { org.exist.xquery.parser.XQueryAST tmp175_AST = null; tmp175_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.makeASTRoot(currentAST, tmp175_AST); match(OREQ); break; } default: { throw new NoViableAltException(LT(1), getFilename()); } } } rangeExpr(); astFactory.addASTChild(currentAST, returnAST); } break; } case EOF: case RPAREN: case LITERAL_default: case LITERAL_collation: case RCURLY: case COMMA: case LITERAL_empty: case LITERAL_for: case LITERAL_let: case LITERAL_where: case LITERAL_return: case LITERAL_order: case LITERAL_ascending: case LITERAL_descending: case LITERAL_satisfies: case LITERAL_case: case LITERAL_else: case LITERAL_or: case LITERAL_and: case LITERAL_instance: case LITERAL_castable: case LITERAL_cast: case RPPAREN: { break; } default: boolean synPredMatched149 = false; if (((LA(1)==LT))) { int _m149 = mark(); synPredMatched149 = true; inputState.guessing++; try { { match(LT); match(LT); } } catch (RecognitionException pe) { synPredMatched149 = false; } rewind(_m149); inputState.guessing--; } if ( synPredMatched149 ) { match(LT); match(LT); rangeExpr(); astFactory.addASTChild(currentAST, returnAST); if ( inputState.guessing==0 ) { comparisonExpr_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; comparisonExpr_AST = (org.exist.xquery.parser.XQueryAST)astFactory.make( (new ASTArray(2)).add((org.exist.xquery.parser.XQueryAST)astFactory.create(BEFORE,"<<")).add(comparisonExpr_AST)); currentAST.root = comparisonExpr_AST; currentAST.child = comparisonExpr_AST!=null &&comparisonExpr_AST.getFirstChild()!=null ? comparisonExpr_AST.getFirstChild() : comparisonExpr_AST; currentAST.advanceChildToEnd(); } } else { boolean synPredMatched151 = false; if (((LA(1)==GT))) { int _m151 = mark(); synPredMatched151 = true; inputState.guessing++; try { { match(GT); match(GT); } } catch (RecognitionException pe) { synPredMatched151 = false; } rewind(_m151); inputState.guessing--; } if ( synPredMatched151 ) { match(GT); match(GT); rangeExpr(); astFactory.addASTChild(currentAST, returnAST); if ( inputState.guessing==0 ) { comparisonExpr_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; comparisonExpr_AST = (org.exist.xquery.parser.XQueryAST)astFactory.make( (new ASTArray(2)).add((org.exist.xquery.parser.XQueryAST)astFactory.create(AFTER,">>")).add(comparisonExpr_AST)); currentAST.root = comparisonExpr_AST; currentAST.child = comparisonExpr_AST!=null &&comparisonExpr_AST.getFirstChild()!=null ? comparisonExpr_AST.getFirstChild() : comparisonExpr_AST; currentAST.advanceChildToEnd(); } } else if ((_tokenSet_4.member(LA(1)))) { { { switch ( LA(1)) { case EQ: { org.exist.xquery.parser.XQueryAST tmp180_AST = null; tmp180_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.makeASTRoot(currentAST, tmp180_AST); match(EQ); break; } case NEQ: { org.exist.xquery.parser.XQueryAST tmp181_AST = null; tmp181_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.makeASTRoot(currentAST, tmp181_AST); match(NEQ); break; } case GT: { org.exist.xquery.parser.XQueryAST tmp182_AST = null; tmp182_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.makeASTRoot(currentAST, tmp182_AST); match(GT); break; } case GTEQ: { org.exist.xquery.parser.XQueryAST tmp183_AST = null; tmp183_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.makeASTRoot(currentAST, tmp183_AST); match(GTEQ); break; } case LT: { org.exist.xquery.parser.XQueryAST tmp184_AST = null; tmp184_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.makeASTRoot(currentAST, tmp184_AST); match(LT); break; } case LTEQ: { org.exist.xquery.parser.XQueryAST tmp185_AST = null; tmp185_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.makeASTRoot(currentAST, tmp185_AST); match(LTEQ); break; } default: { throw new NoViableAltException(LT(1), getFilename()); } } } rangeExpr(); astFactory.addASTChild(currentAST, returnAST); } } else { throw new NoViableAltException(LT(1), getFilename()); } }} } comparisonExpr_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; returnAST = comparisonExpr_AST; } | 2909 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2909/10544e5ec103a411822c6180ed81ef38eab15de8/XQueryParser.java/buggy/src/org/exist/xquery/parser/XQueryParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
5826,
4742,
1435,
1216,
9539,
16,
3155,
1228,
503,
16,
10172,
503,
288,
9506,
202,
2463,
9053,
273,
446,
31,
202,
202,
9053,
4154,
783,
9053,
273,
394,
9183,
4154,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
5826,
4742,
1435,
1216,
9539,
16,
3155,
1228,
503,
16,
10172,
503,
288,
9506,
202,
2463,
9053,
273,
446,
31,
202,
202,
9053,
4154,
783,
9053,
273,
394,
9183,
4154,
5... |
s_log.warn("generateSinglePropertyAdd: " + | s_log.warn("generateSinglePropertyAdd: " + | protected Event generateSinglePropertyAdd(ObjectType type, Property prop) { StringBuffer sb = new StringBuffer(); List path = prop.getJoinPath().getPath(); if (path.size() > 2) { s_log.warn("generateSinglePropertyAdd: " + prop.getName() + " has a join path longer than 2"); return null; } if (path.size() == 1) { Column from = ((JoinElement)path.get(0)).getFrom(); Column refkey = Utilities.getColumn(type); Property typekey = Utilities.getKeyProperty((ObjectType)prop.getType()); if ((typekey == null) || (refkey == null) || (Utilities.getKeyProperty(type) == null)) { s_log.warn("generateSinglePropertyAdd: " + type.getName() + "." + prop.getName() + "\ntypekey: " + typekey + "\ntype: " + prop.getType().getName() + "\nrefkey: " + refkey + "\nUtilities.getKeyProperty(type): " + Utilities.getKeyProperty(type)); return null; } if (!refkey.getTableName().equals(from.getTableName())) { s_log.warn("generateSinglePropertyAdd: JoinPath for " + prop.getName() + " in " + type.getQualifiedName() + " does not start in the primary table."); return null; } sb.append("update ") .append(from.getTableName()) .append("\nset ") .append(from.getColumnName()) .append(" = :") .append(prop.getName()) .append(".") .append(typekey.getName()) .append("\nwhere ") .append(refkey.getTableName()) .append(".") .append(refkey.getColumnName()) .append(" = :") .append(Utilities.getKeyProperty(type).getName()); } else { Column type1Ref = ((JoinElement)path.get(0)).getTo(); Column type2Ref = ((JoinElement)path.get(1)).getFrom(); Property type1Key = Utilities.getKeyProperty(type); Property type2Key = Utilities.getKeyProperty((ObjectType)prop.getType()); if ((type1Key == null) || (type2Key == null)) { s_log.warn("generateSinglePropertyAdd: no key property " + "defined for either " + type.getName() + " or " + prop.getType().getName()); return null; } if (!type1Ref.getTableName().equals(type2Ref.getTableName())) { s_log.warn("generateSinglePropertyAdd: JoinPath for " + prop.getName() + " is not continuous."); return null; } sb.append("insert into ") .append(type1Ref.getTableName()) .append(" (\n") .append(type1Ref.getColumnName()) .append(", ") .append(type2Ref.getColumnName()) .append(") values (\n:") .append(type1Key.getName()) .append(", :") .append(prop.getName()) .append(".") .append(type2Key.getName()) .append(")"); } Event event = new Event(); event.setLineInfo(prop); Operation op = new Operation(sb.toString()); op.setLineInfo(prop); event.addOperation(op); return event; } | 12196 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12196/558097820abc0198518796cedde797658cda9a5e/BaseMDSQLGenerator.java/buggy/archive/core-platform/src/com/arsdigita/persistence/metadata/BaseMDSQLGenerator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
2587,
2103,
5281,
1396,
986,
12,
17610,
618,
16,
4276,
2270,
13,
288,
3639,
6674,
2393,
273,
394,
6674,
5621,
3639,
987,
589,
273,
2270,
18,
588,
4572,
743,
7675,
588,
743,
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,
4750,
2587,
2103,
5281,
1396,
986,
12,
17610,
618,
16,
4276,
2270,
13,
288,
3639,
6674,
2393,
273,
394,
6674,
5621,
3639,
987,
589,
273,
2270,
18,
588,
4572,
743,
7675,
588,
743,
5621,
... |
private boolean match() { // scan a common literal suffix scanLiteralPrefix(); // if we are already at the end of both strings // than the pattern matched if(ipat >= lpat && istr >= lstr) return true; // if hole string has matched the pattern so far and the rest of the pattern only has wildcard(s) // we match too otherwise we clearly don't match if(ipat < lpat && istr >= lstr) { while(ipat < lpat && apat[ipat] == STAR) ipat++; if(ipat >= lpat) { add(""); return true; } else { return false; } } // if hole pattern has matched the string so far but the string has more characters left // we don't match if(ipat >= lpat && istr < lstr) return false; // if we have not stopped at a wildcard character // a character doesn't match and thus we do not match at all if(apat[ipat] != STAR) return false; // if it is a double (or more) wildcard pattern if(ipat < lpat - 1 && apat[ipat + 1] == STAR) { // skip to first non star charater in the pattern while(++ipat < lpat && apat[ipat] == STAR); // if we are at the end of the pattern we've matched and are finish scanning if(ipat >= lpat) { add(new String(astr, istr, lstr - istr)); return true; } // Now we need to scan for the end of the literal characters in the pattern final int sipat = ipat; // start position of a literal character used for substring operations while(ipat < lpat && (apat[ipat] != STAR || (ipat > 0 && apat[ipat - 1] == ESC))) ipat++; // if we reached the end of the pattern just do a string compare with the corresponding part from // the end of the string if(ipat >= lpat) { return checkEnds(sipat); } // Now we need to check whether the litteral substring of the pattern // is contained in the string somewhere final int l = ipat - sipat; int eistr = lstr - l; // beause the '**' wildcard need to be greedy we scan from the end of the string for a match while(istr < eistr && ! strncmp(apat, sipat, astr, eistr, l)) eistr--; if(istr >= eistr) return false; add(new String(astr, istr, eistr - istr)); istr = eistr + l; } else {// if it is a single star pattern // skip the star ++ipat; // if we are at the beginning of the pattern we have to check there is not PATH_SEP in string if(ipat >= lpat) { final int sistr = istr; while(istr < lstr && (astr[istr] != PATHSEP)) istr++; if(istr >= lstr) { add(new String(astr, sistr, lstr - sistr)); return true; } // otherwise we do not match return false; } // Now we need to search for the start of either a path sparator or another wildcard characters // in the pattern final int sipat = ipat; while(ipat < lpat && apat[ipat] != STAR && (apat[ipat] != ESC || ipat < lpat - 1 && apat[ipat + 1] != STAR) && apat[ipat] != PATHSEP) { ipat++; } // if we reached the end of the pattern just do a string compare with the corresponding part from // the end of the string if(ipat >= lpat) { return checkEnds(sipat); } // If we stopped at an other wildcard // we exclude it from being compared if(apat[ipat] == STAR) { ipat--; } // Now we need to check whether the litteral substring of the pattern // is contained in the string somewhere final int l = ipat- sipat + 1; final int sistr = istr; while(istr < lstr && ! strncmp(apat, sipat, astr, istr, l)) istr++; if(istr >= lstr) return false; add(new String(astr, sistr, istr - sistr)); ipat++; istr += l; } return match(); } | 46428 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46428/cfbe2b0b28539985cc38292f38c7bf7ff7496b32/WildcardMatcherHelper.java/buggy/core/cocoon-core/src/main/java/org/apache/cocoon/util/WildcardMatcherHelper.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
3238,
1250,
845,
1435,
288,
5411,
368,
4135,
279,
2975,
7158,
3758,
5411,
4135,
6177,
2244,
5621,
5411,
368,
309,
732,
854,
1818,
622,
326,
679,
434,
3937,
2064,
2398,
368,
2353,
326,
193... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
3238,
1250,
845,
1435,
288,
5411,
368,
4135,
279,
2975,
7158,
3758,
5411,
4135,
6177,
2244,
5621,
5411,
368,
309,
732,
854,
1818,
622,
326,
679,
434,
3937,
2064,
2398,
368,
2353,
326,
193... | ||
IOption option = (IOption)i.nextElement(); | IBasicOption option = (IBasicOption)i.nextElement(); | private boolean receiveGameOptions(Packet packet, int connId) { Player player = game.getPlayer( connId ); // Check player if ( null == player ) { System.err.print ( "Server does not recognize player at connection " ); System.err.println( connId ); return false; } // check password if (password != null && password.length() > 0 && !password.equals(packet.getObject(0))) { sendServerChat(connId, "The password you specified to change game options is incorrect."); return false; } int changed = 0; for (Enumeration i = ((Vector)packet.getObject(1)).elements(); i.hasMoreElements();) { IOption option = (IOption)i.nextElement(); IOption originalOption = game.getOptions().getOption(option.getName()); if (originalOption == null) { continue; } StringBuffer message = new StringBuffer(); message.append( "Player " ) .append( player.getName() ) .append( " changed option \"" ) .append( originalOption.getDisplayableName() ) .append( "\" to " ) .append( option.stringValue() ) .append( "." ); sendServerChat( message.toString() ); originalOption.setValue(option.getValue()); changed++; } // Set proper RNG Compute.setRNG(game.getOptions().intOption("rng_type")); return changed > 0; } | 3464 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3464/6b0f88132457286e708eaa41034884c156e58301/Server.java/clean/megamek/src/megamek/server/Server.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1250,
6798,
12496,
1320,
12,
6667,
4414,
16,
509,
1487,
548,
13,
288,
3639,
19185,
7291,
273,
7920,
18,
588,
12148,
12,
1487,
548,
11272,
3639,
368,
2073,
7291,
3639,
309,
261,
446,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1250,
6798,
12496,
1320,
12,
6667,
4414,
16,
509,
1487,
548,
13,
288,
3639,
19185,
7291,
273,
7920,
18,
588,
12148,
12,
1487,
548,
11272,
3639,
368,
2073,
7291,
3639,
309,
261,
446,... |
assert defn.getTypeCode( ) == PropertyType.STRUCT_TYPE; | assert defn.getTypeCode( ) == IPropertyType.STRUCT_TYPE; | public static Structure findNativeStructure( Module module, StructureDefn targetDefn, String name ) { if ( StringUtil.isBlank( name ) || targetDefn == null ) return null; IElementPropertyDefn defn = module .getReferencablePropertyDefn( targetDefn.getName( ) ); if ( defn == null ) return null; assert defn.getTypeCode( ) == PropertyType.STRUCT_TYPE; if ( defn.isList( ) ) { List list = module.getListProperty( module, defn.getName( ) ); if ( list == null ) return null; for ( int i = 0; i < list.size( ); i++ ) { Structure struct = (Structure) list.get( i ); if ( name.equals( struct.getReferencableProperty( ) ) ) return struct; } } else { Structure struct = (Structure) module.getProperty( module, defn .getName( ) ); if ( name.equals( struct.getReferencableProperty( ) ) ) return struct; } return null; } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/d802c33711e0d111551ae23575895cd060f085b6/StructureRefUtil.java/clean/model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/util/StructureRefUtil.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
13348,
1104,
9220,
6999,
12,
5924,
1605,
16,
1082,
202,
6999,
3262,
82,
1018,
3262,
82,
16,
514,
508,
262,
202,
95,
202,
202,
430,
261,
14205,
18,
291,
7796,
12,
508,
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,
760,
13348,
1104,
9220,
6999,
12,
5924,
1605,
16,
1082,
202,
6999,
3262,
82,
1018,
3262,
82,
16,
514,
508,
262,
202,
95,
202,
202,
430,
261,
14205,
18,
291,
7796,
12,
508,
2... |
return binding.getBinding(operation, part, mode); | BindingOperation bo = binding.get(operation); if(bo == null){ throw new RuntimeModelerException("runtime.operation.noBinding", operation, portName); } return binding.getBinding(bo, part, mode); | private ParameterBinding getBinding(com.sun.xml.ws.wsdl.parser.Binding binding, String operation, String part, boolean isHeader, Mode mode){ if(binding == null){ if(isHeader) return ParameterBinding.HEADER; else return ParameterBinding.BODY; } return binding.getBinding(operation, part, mode); } | 9667 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9667/351c2e24833c7bf14f0acd8cf935d05be70255f7/RuntimeModeler.java/clean/jaxws-ri/rt/src/com/sun/xml/ws/modeler/RuntimeModeler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
5498,
5250,
29471,
12,
832,
18,
16924,
18,
2902,
18,
4749,
18,
4749,
5761,
18,
4288,
18,
5250,
5085,
16,
514,
1674,
16,
514,
1087,
16,
1250,
353,
1864,
16,
8126,
1965,
15329,
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,
5498,
5250,
29471,
12,
832,
18,
16924,
18,
2902,
18,
4749,
18,
4749,
5761,
18,
4288,
18,
5250,
5085,
16,
514,
1674,
16,
514,
1087,
16,
1250,
353,
1864,
16,
8126,
1965,
15329,
3639... |
Component comp = children[index]; | Component comp = (Component) i.next(); | public Dimension minimumLayoutSize(Container parent) { if (parent != container) throw new AWTError("invalid parent"); Insets insets = parent.getInsets(); int x = insets.left + insets.right; int y = insets.bottom + insets.top; Component[] children = AWTUtilities.getVisibleChildren(parent); if (isHorizontalIn(parent)) { // sum up preferred widths of components, find maximum of preferred // heights for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getMinimumSize(); x += sz.width; y = Math.max(y, sz.height); } } else { // sum up preferred heights of components, find maximum of // preferred widths for (int index = 0; index < children.length; index++) { Component comp = children[index]; Dimension sz = comp.getMinimumSize(); y += sz.height; x = Math.max(x, sz.width); } } return new Dimension(x, y); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/50cfc3ee73e2e377b07c91f0e40a2f172b10fd27/BoxLayout.java/clean/core/src/classpath/javax/javax/swing/BoxLayout.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
13037,
5224,
3744,
1225,
12,
2170,
982,
13,
225,
288,
565,
309,
261,
2938,
480,
1478,
13,
1377,
604,
394,
432,
8588,
668,
2932,
5387,
982,
8863,
3639,
22300,
23576,
273,
982,
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,
1071,
13037,
5224,
3744,
1225,
12,
2170,
982,
13,
225,
288,
565,
309,
261,
2938,
480,
1478,
13,
1377,
604,
394,
432,
8588,
668,
2932,
5387,
982,
8863,
3639,
22300,
23576,
273,
982,
18,
... |
for (Iterator it = elements.iterator(); it.hasNext(); ) | for (Iterator it = inElements.iterator(); it.hasNext(); ) | SecureSet (final Subject subject, final int type, final Collection elements) { this (subject, type); for (Iterator it = elements.iterator(); it.hasNext(); ) { Object o = it.next(); if (type == PRINCIPALS && !(o instanceof Principal)) { throw new IllegalArgumentException(o+" is not a Principal"); } if (!elements.contains (o)) { elements.add (o); } } } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/Subject.java/clean/core/src/classpath/javax/javax/security/auth/Subject.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
15653,
694,
261,
6385,
9912,
3221,
16,
727,
509,
618,
16,
727,
2200,
2186,
13,
565,
288,
1377,
333,
261,
7857,
16,
618,
1769,
1377,
364,
261,
3198,
518,
273,
316,
3471,
18,
9838,
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,
15653,
694,
261,
6385,
9912,
3221,
16,
727,
509,
618,
16,
727,
2200,
2186,
13,
565,
288,
1377,
333,
261,
7857,
16,
618,
1769,
1377,
364,
261,
3198,
518,
273,
316,
3471,
18,
9838,
5621,
... |
return value; | return dateValue; | protected Object openDialogBox( Control cellEditorWindow ) { TimeOptionDialog dialog = new TimeOptionDialog( cellEditorWindow.getShell( ) ); Date value = (Date) getValue( ); if ( value != null ) { TimeDialogInfo time = new TimeDialogInfo( ); time.setTime( value.getTime( ) ); dialog.setInfo( time ); } dialog.open( ); if ( dialog.getReturnCode( ) == SelectionDialog.OK ) { TimeDialogInfo result = (TimeDialogInfo) dialog.getInfo( ); return new Date( result.getTime( ) ); } return value; } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/0048f09fbb5d5ca480934f0c4ae73f54f63db944/DateTimeCellEditor.java/buggy/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/views/property/widgets/DateTimeCellEditor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
1033,
1696,
6353,
3514,
12,
8888,
2484,
6946,
3829,
262,
202,
95,
202,
202,
950,
1895,
6353,
6176,
273,
394,
2647,
1895,
6353,
12,
2484,
6946,
3829,
18,
588,
13220,
12,
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,
1117,
1033,
1696,
6353,
3514,
12,
8888,
2484,
6946,
3829,
262,
202,
95,
202,
202,
950,
1895,
6353,
6176,
273,
394,
2647,
1895,
6353,
12,
2484,
6946,
3829,
18,
588,
13220,
12,
262,
... |
log("Executing file: " + tSrcFile.getAbsolutePath(), | log("Executing file: " + tSrcFile.getAbsolutePath(), | private void runTransaction(PrintStream out) throws IOException, SQLException { if (tSqlCommand.length() != 0) { log("Executing commands", Project.MSG_INFO); runStatements(new StringReader(tSqlCommand), out); } if (tSrcFile != null) { log("Executing file: " + tSrcFile.getAbsolutePath(), Project.MSG_INFO); Reader reader = (encoding == null) ? new FileReader(tSrcFile) : new InputStreamReader( new FileInputStream(tSrcFile), encoding); try { runStatements(reader, out); } finally { reader.close(); } } } | 639 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/639/2270580b7724fb28e357cd2ea4da561778bc8fa8/SQLExec.java/clean/src/main/org/apache/tools/ant/taskdefs/SQLExec.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
3238,
918,
1086,
3342,
12,
5108,
1228,
596,
13,
5411,
1216,
1860,
16,
6483,
288,
5411,
309,
261,
88,
5101,
2189,
18,
2469,
1435,
480,
374,
13,
288,
7734,
613,
2932,
22134,
4364,
3113,
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,
540,
3238,
918,
1086,
3342,
12,
5108,
1228,
596,
13,
5411,
1216,
1860,
16,
6483,
288,
5411,
309,
261,
88,
5101,
2189,
18,
2469,
1435,
480,
374,
13,
288,
7734,
613,
2932,
22134,
4364,
3113,
5... |
File fortune_path = Utility.getDomainPrefPath("FortunePath",host); File files[] = fortune_path.listFiles(); | File fortune_path = Utility.getDomainPrefPath("FortunePath",host); File files[] = fortune_path.listFiles(); | public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { res.setContentType("text/html"); Writer out = res.getWriter(); // Lets get the server this request was aimed for String host = req.getHeader("Host") ; String imcServer = Utility.getDomainPref("adminserver",host) ; // Lets validate the session if (super.checkSession(req,res) == false) return ; // Lets get an user object imcode.server.User user = super.getUserObj(req,res) ; if(user == null) { String header = "Error in AdminQuestions." ; String msg = "Couldnt create an user object."+ "<BR>" ; this.log(header + msg) ; AdminError err = new AdminError(req,res,header,msg) ; return ; } // Lets verify that the user who tries to admin a fortune is an admin if (super.checkAdminRights(imcServer, user) == false) { String header = "Error in AdminQuestions." ; String msg = "The user is not an administrator."+ "<BR>" ; this.log(header + msg) ; // Lets get the path to the admin templates folder String server = Utility.getDomainPref("adminserver",host) ; File templateLib = getAdminTemplateFolder(server, user) ; AdminError err = new AdminError(req,res,header,msg) ; return ; } //get fortunefiles File fortune_path = Utility.getDomainPrefPath("FortunePath",host); File files[] = fortune_path.listFiles(); String options = IMCServiceRMI.parseExternalDoc(imcServer, null, OPTION_LINE , user.getLangPrefix(), DOCTYPE_FORTUNES+""); for(int i=0;i<files.length;i++) { //remove suffixes and create optionstring String filename=files[i].getName() ; int index = filename.lastIndexOf("."); String name=filename.substring(0,index); if ( name.endsWith(".poll") ){ options = options + "<option value=\"" + name.substring(0,name.lastIndexOf(".poll")) + "\" > " + name.substring(0,name.lastIndexOf(".poll")) + "</option>"; } } //Add info for parsing to a Vector and parse it with a template to a htmlString that is printed Vector values = new Vector(); values.add("#options#"); values.add(options); String parsed = IMCServiceRMI.parseExternalDoc(imcServer, values, ADMIN_QUESTION , user.getLangPrefix(), DOCTYPE_FORTUNES+""); out.write(parsed); } // End doGet | 8781 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8781/e122df9985d9d9a235d0001a19f58802b2584023/AdminQuestions.java/clean/servlets/AdminQuestions.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
23611,
12,
2940,
18572,
1111,
16,
12446,
400,
13,
1216,
16517,
16,
1860,
288,
202,
202,
455,
18,
542,
8046,
2932,
955,
19,
2620,
8863,
202,
202,
2289,
596,
273,
400,
18,
588,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
23611,
12,
2940,
18572,
1111,
16,
12446,
400,
13,
1216,
16517,
16,
1860,
288,
202,
202,
455,
18,
542,
8046,
2932,
955,
19,
2620,
8863,
202,
202,
2289,
596,
273,
400,
18,
588,... |
if (applicationContext.containsLocalBean(beanName)) { tracker.subTaskStarted("Loading " + beanName + " ..."); tracker.worked(1); | public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException { return bean; | public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException { beanFactory.addBeanPostProcessor(new BeanPostProcessor() { private int max = -1; public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException { if (max == -1) { max = 0; ConfigurableListableBeanFactory configurableListBeanFactory = applicationContext.getBeanFactory(); String[] beanNames = applicationContext.getBeanDefinitionNames(); for (int i = 0; i < beanNames.length; i++) { // using beanDefinition to check singleton property because when accessing through // context (applicationContext.isSingleton(beanName)), bean will be created already, // possibly bypassing other BeanFactoryPostProcessors if (configurableListBeanFactory.getBeanDefinition(beanNames[i]).isSingleton()) max++; } tracker.taskStarted("Loading Application Context ...", max); } if (applicationContext.containsLocalBean(beanName)) { tracker.subTaskStarted("Loading " + beanName + " ..."); tracker.worked(1); } return bean; } public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException { return bean; } }); } | 55916 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55916/998a31fac2a3a70e3fb1176fa64052672d852f57/ApplicationLauncher.java/buggy/support/src/main/java/org/springframework/richclient/application/ApplicationLauncher.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
918,
1603,
2227,
3381,
1733,
12,
31660,
682,
429,
3381,
1733,
3931,
1733,
13,
1216,
4823,
634,
503,
288,
7734,
3931,
1733,
18,
1289,
3381,
3349,
5164,
12,
2704,
7704,
3349,
5164,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
918,
1603,
2227,
3381,
1733,
12,
31660,
682,
429,
3381,
1733,
3931,
1733,
13,
1216,
4823,
634,
503,
288,
7734,
3931,
1733,
18,
1289,
3381,
3349,
5164,
12,
2704,
7704,
3349,
5164,
1... |
public void endElement(String name) throws org.xml.sax.SAXException | public void endElement(String namespaceURI, String localName, String name) throws org.xml.sax.SAXException | public void endElement(String name) throws org.xml.sax.SAXException { endElement(null, null, name); } | 46591 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46591/05ed8d19e86b562b4b81150c9f4903f3f4fc5f7d/ToStream.java/buggy/src/org/apache/xml/serializer/ToStream.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
14840,
12,
780,
19421,
16,
514,
11927,
16,
514,
508,
13,
1216,
2358,
18,
2902,
18,
87,
651,
18,
55,
2501,
503,
565,
288,
3639,
14840,
12,
2011,
16,
446,
16,
508,
1769,
565,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
14840,
12,
780,
19421,
16,
514,
11927,
16,
514,
508,
13,
1216,
2358,
18,
2902,
18,
87,
651,
18,
55,
2501,
503,
565,
288,
3639,
14840,
12,
2011,
16,
446,
16,
508,
1769,
565,... |
final String relativePath = SVNUtil.getWorkspacePath(workspace, absolutePath); DebugLog.log("Workspace/path is '" + workspace.getID() + "'/'" + relativePath + "'"); workspace.delete(relativePath, force); } } | final String relativePath = SVNUtil.getWorkspacePath(workspace, absolutePath); workspace.delete(relativePath, force); } } | private void runLocally(final PrintStream out) throws SVNException { for (int i = 0; i < getCommandLine().getPathCount(); i++) { final String absolutePath = getCommandLine().getPathAt(i); final String workspacePath = absolutePath; final ISVNWorkspace workspace = createWorkspace(absolutePath); boolean force = getCommandLine().hasArgument(SVNArgument.FORCE); workspace.addWorkspaceListener(new SVNWorkspaceAdapter() { public void modified(String path, int kind) { try { path = convertPath(workspacePath, workspace, path); } catch (IOException e) { } DebugLog.log("D " + path); out.println("D " + path); } }); final String relativePath = SVNUtil.getWorkspacePath(workspace, absolutePath); DebugLog.log("Workspace/path is '" + workspace.getID() + "'/'" + relativePath + "'"); workspace.delete(relativePath, force); } } | 5695 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5695/361abb3f2b60edf9d7118d2818fa082a63ad66ca/DeleteCommand.java/clean/javasvn/src/org/tmatesoft/svn/cli/command/DeleteCommand.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1086,
1333,
1230,
12,
6385,
21677,
596,
13,
1216,
29537,
50,
503,
288,
202,
202,
1884,
261,
474,
277,
273,
374,
31,
277,
411,
12856,
1670,
7675,
588,
743,
1380,
5621,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1086,
1333,
1230,
12,
6385,
21677,
596,
13,
1216,
29537,
50,
503,
288,
202,
202,
1884,
261,
474,
277,
273,
374,
31,
277,
411,
12856,
1670,
7675,
588,
743,
1380,
5621,
27... |
line.append(md.getColumnName(columnCount)); out.println(line); line.setLength(0); | while (rs.next()) { boolean first = true; for (int col = 1; col <= columnCount; col++) { String columnValue = rs.getString(col); if (columnValue != null) { columnValue = columnValue.trim(); } if (first) { first = false; } else { line.append(","); } line.append(columnValue); } out.println(line); line.setLength(0); } | protected void printResults() throws java.sql.SQLException { ResultSet rs = null; PrintStream out = System.out; try { if (output != null) { log("Opening PrintStream to output file " + output, Project.MSG_VERBOSE); out = new PrintStream(new BufferedOutputStream(new FileOutputStream(output))); } while ((rs = statement.getResultSet()) != null) { log("Processing new result set.", Project.MSG_VERBOSE); ResultSetMetaData md = rs.getMetaData(); int columnCount = md.getColumnCount(); StringBuffer line = new StringBuffer(); if (showheaders) { for (int col = 1; col < columnCount; col++) { line.append(md.getColumnName(col)); line.append(","); } line.append(md.getColumnName(columnCount)); out.println(line); line.setLength(0); } while (rs.next()) { for (int col = 1; col < columnCount; col++) { line.append(rs.getString(col).trim()); line.append(","); } line.append(rs.getString(columnCount).trim()); out.println(line); line.setLength(0); } statement.getMoreResults(); } } catch (IOException ioe) { throw new BuildException("Error writing " + output.getAbsolutePath(), ioe, location); } finally { if (out != null && out != System.out) { out.close(); } } } | 17033 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17033/c856d86259418d80acde9cbeab85d6cc31ef18b0/SQLExec.java/clean/src/main/org/apache/tools/ant/taskdefs/SQLExec.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
1172,
3447,
1435,
1216,
2252,
18,
4669,
18,
23116,
288,
3639,
10842,
3597,
273,
446,
31,
3639,
21677,
596,
273,
2332,
18,
659,
31,
3639,
775,
288,
5411,
309,
261,
2844,
480,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1172,
3447,
1435,
1216,
2252,
18,
4669,
18,
23116,
288,
3639,
10842,
3597,
273,
446,
31,
3639,
21677,
596,
273,
2332,
18,
659,
31,
3639,
775,
288,
5411,
309,
261,
2844,
480,
... |
return true; } | return true; } | protected boolean compareTransformation(DoubleArray trafo1, DoubleArray trafo2) { return true; } | 25414 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/25414/3f03748295bf663ee79544b9fcb8b692ec556184/AbstractDeviceMouse.java/clean/src-tool/de/jreality/toolsystem/raw/AbstractDeviceMouse.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
4750,
1250,
3400,
15292,
12,
5265,
1076,
1284,
617,
21,
16,
3698,
1076,
1284,
617,
22,
13,
288,
1850,
327,
638,
31,
3639,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
4750,
1250,
3400,
15292,
12,
5265,
1076,
1284,
617,
21,
16,
3698,
1076,
1284,
617,
22,
13,
288,
1850,
327,
638,
31,
3639,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
return entry; | public static Entry findOrCreateEntry(Object jdkObject) { if (jdkObject == null) return nullEntry; Key key = new Key(jdkObject); Entry entry = (Entry) keyToEntry.get(key); if (entry == null) { entry = new Entry(newId(), jdkObject, OBJECT_NOT_ALLOCATED); keyToEntry.put(key, entry); objectIdToEntry.add(entry); } return entry; } | 4011 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4011/8d6fb04a208bbf3fe50d125be87502539defa088/BootImageMap.java/clean/rvm/src/tools/bootImageWriter/BootImageMap.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
3841,
1104,
17717,
1622,
12,
921,
525,
2883,
921,
13,
288,
565,
309,
261,
78,
2883,
921,
422,
446,
13,
1377,
327,
446,
1622,
31,
565,
1929,
498,
282,
273,
394,
1929,
12,
78... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3841,
1104,
17717,
1622,
12,
921,
525,
2883,
921,
13,
288,
565,
309,
261,
78,
2883,
921,
422,
446,
13,
1377,
327,
446,
1622,
31,
565,
1929,
498,
282,
273,
394,
1929,
12,
78... | |
if(ASS)ER.T(false,"abort called when not really stopped",this); | if(AS.S)ER.T(false,"abort called when not really stopped",this); | public synchronized void abort() { if( _state != STOPPED || _semaphore.available() || null == _threadState ) { if(ASS)ER.T(false,"abort called when not really stopped",this); return; } _threadState.setContinueState( ThreadStateBase.DEBUG_STATE_THROW ); _continueAndNotify(true); } | 47609 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47609/2de73cf99dce60cce549e7757f841284b68d1220/ControlTyrant.java/buggy/js/jsdj/classes/com/netscape/jsdebugging/ifcui/ControlTyrant.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3852,
918,
6263,
1435,
565,
288,
3639,
309,
12,
389,
2019,
480,
17815,
12120,
747,
389,
307,
1458,
76,
479,
18,
5699,
1435,
747,
446,
422,
389,
5930,
1119,
262,
3639,
288,
5411,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3852,
918,
6263,
1435,
565,
288,
3639,
309,
12,
389,
2019,
480,
17815,
12120,
747,
389,
307,
1458,
76,
479,
18,
5699,
1435,
747,
446,
422,
389,
5930,
1119,
262,
3639,
288,
5411,
3... |
System.out.println("running with full colors"); | Logger.debug("running with full colors"); | public static void setDisplay(Display d) { if (d.isColor()) { if (d.numColors() >= 16) { setColors(COLORS_FULL); System.out.println("running with full colors"); return; } } else { if (d.numColors() >= 16) { setColors(COLORS_GREY16); System.out.println("running with grey16"); return; } } setColors(COLORS_GREY8); System.out.println("running with grey8"); } | 11724 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11724/ca3b05ce3964cac16952eb093badfebe72b5d698/ColorMgmt.java/buggy/trunk/simme/src/at/einspiel/simme/client/ui/ColorMgmt.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
1071,
760,
918,
23512,
12,
4236,
302,
13,
288,
1377,
309,
261,
72,
18,
291,
2957,
10756,
288,
540,
309,
261,
72,
18,
2107,
12570,
1435,
1545,
2872,
13,
288,
5411,
444,
12570,
12,
10989,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
760,
918,
23512,
12,
4236,
302,
13,
288,
1377,
309,
261,
72,
18,
291,
2957,
10756,
288,
540,
309,
261,
72,
18,
2107,
12570,
1435,
1545,
2872,
13,
288,
5411,
444,
12570,
12,
10989,... |
DEBUG ("(POP) XMLValidator.appendContentSpecNode: ...\n"); | if (DEBUG) print("(POP) XMLValidator.appendContentSpecNode: ...\n"); | private void appendContentSpecNode(int contentSpecIndex, StringBuffer sb, boolean noParen) { //****DEBUG**** DEBUG ("(POP) XMLValidator.appendContentSpecNode: ...\n"); //****DEBUG**** int chunk = contentSpecIndex >> CHUNK_SHIFT; int index = contentSpecIndex & CHUNK_MASK; int type = fNodeType[chunk][index]; int value = fNodeValue[chunk][index]; switch (type) { case XMLContentSpec.CONTENTSPECNODE_LEAF: sb.append(value == -1 ? "#PCDATA" : fStringPool.toString(value)); return; case XMLContentSpec.CONTENTSPECNODE_ZERO_OR_ONE: appendContentSpecNode(value, sb, false); sb.append('?'); return; case XMLContentSpec.CONTENTSPECNODE_ZERO_OR_MORE: appendContentSpecNode(value, sb, false); sb.append('*'); return; case XMLContentSpec.CONTENTSPECNODE_ONE_OR_MORE: appendContentSpecNode(value, sb, false); sb.append('+'); return; case XMLContentSpec.CONTENTSPECNODE_CHOICE: case XMLContentSpec.CONTENTSPECNODE_SEQ: if (!noParen) sb.append('('); int leftChunk = value >> CHUNK_SHIFT; int leftIndex = value & CHUNK_MASK; int leftType = fNodeType[leftChunk][leftIndex]; appendContentSpecNode(value, sb, leftType == type); sb.append(type == XMLContentSpec.CONTENTSPECNODE_CHOICE ? '|' : ','); if (++index == CHUNK_SIZE) { chunk++; index = 0; } appendContentSpecNode(fNodeValue[chunk][index], sb, false); if (!noParen) sb.append(')'); return; default: return; } } | 6373 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6373/3aa2926e7035395f8d1b5e35cb25d4e6aad6a281/XMLValidator.java/clean/src/org/apache/xerces/validators/common/XMLValidator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
714,
1350,
1990,
907,
12,
474,
29617,
1016,
16,
6674,
2393,
16,
1250,
1158,
25520,
13,
288,
202,
202,
759,
1007,
9394,
1007,
202,
202,
9394,
7566,
12,
30374,
13,
3167,
5126,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
714,
1350,
1990,
907,
12,
474,
29617,
1016,
16,
6674,
2393,
16,
1250,
1158,
25520,
13,
288,
202,
202,
759,
1007,
9394,
1007,
202,
202,
9394,
7566,
12,
30374,
13,
3167,
5126,
... |
return getSourceFileFromPaths(filename, sourcepath); | return getSourceFileFromPaths(fileName, sourcepath); | public File getSourceFile(String filename) { File[] sourceRoots = getSourceRootSet(); for (File s: sourceRoots) { File f = _getSourceFileFromPath(filename, s); if (f != null) return f; } Vector<File> sourcepath = DrJava.getConfig().getSetting(OptionConstants.DEBUG_SOURCEPATH); return getSourceFileFromPaths(filename, sourcepath); } | 11192 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11192/aafaf7b848d738e58eee48a6cbc4b800c8027685/AbstractGlobalModel.java/buggy/drjava/src/edu/rice/cs/drjava/model/AbstractGlobalModel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1387,
7889,
812,
12,
780,
1544,
13,
288,
565,
1387,
8526,
1084,
17540,
273,
7889,
2375,
694,
5621,
565,
364,
261,
812,
272,
30,
1084,
17540,
13,
288,
1377,
1387,
284,
273,
389,
58... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1387,
7889,
812,
12,
780,
1544,
13,
288,
565,
1387,
8526,
1084,
17540,
273,
7889,
2375,
694,
5621,
565,
364,
261,
812,
272,
30,
1084,
17540,
13,
288,
1377,
1387,
284,
273,
389,
58... |
public org.quickfix.field.EncodedLegSecurityDesc getEncodedLegSecurityDesc() throws FieldNotFound { org.quickfix.field.EncodedLegSecurityDesc value = new org.quickfix.field.EncodedLegSecurityDesc(); | public quickfix.field.EncodedLegSecurityDesc getEncodedLegSecurityDesc() throws FieldNotFound { quickfix.field.EncodedLegSecurityDesc value = new quickfix.field.EncodedLegSecurityDesc(); | public org.quickfix.field.EncodedLegSecurityDesc getEncodedLegSecurityDesc() throws FieldNotFound { org.quickfix.field.EncodedLegSecurityDesc value = new org.quickfix.field.EncodedLegSecurityDesc(); getField(value); return value; } | 8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/SecurityStatusRequest.java/clean/src/java/src/quickfix/fix44/SecurityStatusRequest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
10397,
8329,
4368,
4217,
28799,
8329,
4368,
4217,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
10397,
8329,
4368,
4217,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
10397,
8329,
4368,
4217,
28799,
8329,
4368,
4217,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
10397,
8329,
4368,
4217,
... |
setModified(true); | public void setSkypeSn(String skypeSn) { if (((skypeSn == null) && (_skypeSn != null)) || ((skypeSn != null) && (_skypeSn == null)) || ((skypeSn != null) && (_skypeSn != null) && !skypeSn.equals(_skypeSn))) { if (!XSS_ALLOW_SKYPESN) { skypeSn = XSSUtil.strip(skypeSn); } _skypeSn = skypeSn; setModified(true); } } | 57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/f4d6afc6707f57fd84bf6b624f0c119657b0a766/ContactModel.java/clean/portal-ejb/src/com/liferay/portal/model/ContactModel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
444,
5925,
388,
10461,
12,
780,
4343,
388,
10461,
13,
288,
202,
202,
430,
261,
12443,
7771,
388,
10461,
422,
446,
13,
597,
261,
67,
7771,
388,
10461,
480,
446,
3719,
747,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
444,
5925,
388,
10461,
12,
780,
4343,
388,
10461,
13,
288,
202,
202,
430,
261,
12443,
7771,
388,
10461,
422,
446,
13,
597,
261,
67,
7771,
388,
10461,
480,
446,
3719,
747,... | |
assertTrue(hc.getNumUltrapeerHosts()==1); assertTrue(hc.getNumNormalHosts()==0); assertTrue(hc.getNumPrivateHosts()==0); | assertEquals("ultrapeer PingReply not added as ultrapeer", 1, hc.getNumUltrapeerHosts()); assertEquals("ultrapeer PingReply added as normal", 0, hc.getNumNormalHosts()); assertEquals("ultrapeer PingReply added as private", 0, hc.getNumPrivateHosts()); | public void testAddPriorities() { //Endpoints. setUp(); hc.add(new Endpoint("192.168.0.1"), false); assertEquals("should not be any Ultrapeer hosts in catcher", 0,hc.getNumUltrapeerHosts()); assertTrue(hc.getNumNormalHosts()==0); assertTrue(hc.getNumPrivateHosts()==1); setUp(); hc.add(new Endpoint("18.239.0.1"), false); assertTrue(hc.getNumUltrapeerHosts()==0); assertTrue(hc.getNumNormalHosts()==1); assertTrue(hc.getNumPrivateHosts()==0); setUp(); hc.add(new Endpoint("18.239.0.1"), true); assertTrue(hc.getNumUltrapeerHosts()==1); assertTrue(hc.getNumNormalHosts()==0); assertTrue(hc.getNumPrivateHosts()==0); //PingReply's. setUp(); hc.add(new PingReply(new byte[16], (byte)3, 6346, new byte[] {(byte)192,(byte)168,(byte)0,(byte)1}, 0, 0), null); assertTrue(hc.getNumUltrapeerHosts()==0); assertTrue(hc.getNumNormalHosts()==0); assertTrue(hc.getNumPrivateHosts()==1); setUp(); hc.add(new PingReply(new byte[16], (byte)3, 6346, new byte[] {(byte)18,(byte)239,(byte)0,(byte)1}, 0, 0), null); assertTrue(hc.getNumUltrapeerHosts()==0); assertTrue(hc.getNumNormalHosts()==1); assertTrue(hc.getNumPrivateHosts()==0); setUp(); hc.add(new PingReply(new byte[16], (byte)3, 6346, new byte[] {(byte)18,(byte)239,(byte)0,(byte)1}, 0, 0, true), null); assertTrue(hc.getNumUltrapeerHosts()==1); assertTrue(hc.getNumNormalHosts()==0); assertTrue(hc.getNumPrivateHosts()==0); } | 5134 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5134/6c256ea83970775e868c2f191d0bc64e91357840/HostCatcherTest.java/clean/components/gnutella-core/src/test/java/com/limegroup/gnutella/HostCatcherTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
986,
25355,
1961,
1435,
288,
3639,
368,
10357,
18,
3639,
24292,
5621,
3639,
11684,
18,
1289,
12,
2704,
6961,
2932,
15561,
18,
23329,
18,
20,
18,
21,
6,
3631,
629,
1769,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
986,
25355,
1961,
1435,
288,
3639,
368,
10357,
18,
3639,
24292,
5621,
3639,
11684,
18,
1289,
12,
2704,
6961,
2932,
15561,
18,
23329,
18,
20,
18,
21,
6,
3631,
629,
1769,
... |
public void setAngleBendingFirstDerivative(GVector coord3d) { dDeltav = new double[coord3d.getSize()][]; Double forAtomNumber = null; int atomNumber = 0; int coordinate; for (int m = 0; m < dDeltav.length; m++) { dDeltav[m] = new double[angleNumber]; forAtomNumber = new Double(m/3); coordinate = m % 3; //System.out.println("coordinate = " + coordinate); atomNumber = forAtomNumber.intValue(); //System.out.println("atomNumber = " + atomNumber); for (int l = 0; l < angleNumber; l++) { if ((angleAtomPosition[l][0] == atomNumber) | (angleAtomPosition[l][1] == atomNumber) | (angleAtomPosition[l][2] == atomNumber)) { Point3d xi = new Point3d(coord3d.getElement(3 * angleAtomPosition[l][0]), coord3d.getElement(3 * angleAtomPosition[l][0] + 1),coord3d.getElement( 3 * angleAtomPosition[l][0] + 2)); //System.out.println("xi = " + xi); Point3d xj = new Point3d(coord3d.getElement(3 * angleAtomPosition[l][1]), coord3d.getElement(3 * angleAtomPosition[l][1] + 1),coord3d.getElement( 3 * angleAtomPosition[l][1] + 2)); //System.out.println("xj = " + xj); Point3d xk = new Point3d(coord3d.getElement(3 * angleAtomPosition[l][2]), coord3d.getElement(3 * angleAtomPosition[l][2] + 1),coord3d.getElement( 3 * angleAtomPosition[l][2] + 2)); //System.out.println("xk = " + xk); Vector3d xij = new Vector3d(); xij.sub(xi,xj); //System.out.println("xij = " + xij); Vector3d xkj = new Vector3d(); xkj.sub(xk,xj); //System.out.println("xkj = " + xkj); double rji = xj.distance(xi); //System.out.println("rji = " + rji); double rjk = xj.distance(xk); //System.out.println("rji = " + rjk); dDeltav[m][l] = (-1/Math.sqrt(1-Math.pow(xij.dot(xkj)/(rji * rjk),2))) * (1/(Math.pow(rji,2) * Math.pow(rjk,2))); if (angleAtomPosition[l][0] == atomNumber) { switch (coordinate) { case 0: dDeltav[m][l] = dDeltav[m][l] * ((xk.x-xj.x) * rji * rjk - (xij.dot(xkj)) * rjk * (-(xj.x-xi.x)/rji)); break; case 1: dDeltav[m][l] = dDeltav[m][l] * ((xk.y-xj.y) * rji * rjk - (xij.dot(xkj)) * rjk * (-(xj.y-xi.y)/rji)); break; case 2: dDeltav[m][l] = dDeltav[m][l] * ((xk.z-xj.z) * rji * rjk - (xij.dot(xkj)) * rjk * (-(xj.z-xi.z)/rji)); break; } } if (angleAtomPosition[l][1] == atomNumber) { switch (coordinate) { case 0: dDeltav[m][l] = dDeltav[m][l] * ((2 * xj.x - xk.x - xi.x) * rji * rjk - (xij.dot(xkj)) * (((xj.x-xi.x)/rji) * rjk + ((xj.x-xk.x)/rjk) * rji)); break; case 1: dDeltav[m][l] = dDeltav[m][l] * ((2 * xj.y - xk.y - xi.y) * rji * rjk - (xij.dot(xkj)) * (((xj.y-xi.y)/rji) * rjk + ((xj.y-xk.y)/rjk) * rji)); break; case 2: dDeltav[m][l] = dDeltav[m][l] * ((2 * xj.z - xk.z - xi.z) * rji * rjk - (xij.dot(xkj)) * (((xj.z-xi.z)/rji) * rjk + ((xj.z-xk.z)/rjk) * rji)); break; } } if (angleAtomPosition[l][2] == atomNumber) { switch (coordinate) { case 0: dDeltav[m][l] = dDeltav[m][l] * ((xi.x-xj.x) * rji * rjk - (xij.dot(xkj)) * rji * (-(xj.x-xk.x)/rjk)); break; case 1: dDeltav[m][l] = dDeltav[m][l] * ((xi.y-xj.y) * rji * rjk - (xij.dot(xkj)) * rji * (-(xj.y-xk.y)/rjk)); break; case 2: dDeltav[m][l] = dDeltav[m][l] * ((xi.z-xj.z) * rji * rjk - (xij.dot(xkj)) * rji * (-(xj.z-xk.z)/rjk)); break; } } } else { dDeltav[m][l] = 0; } //System.out.println("dDeltav[" + m + "][" + l + "] = " + dDeltav[m][l]); } } } | 1306 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1306/9adcbd5769512fe518277f87ee5cc7c84de1ccb0/AngleBending.java/buggy/src/org/openscience/cdk/modeling/forcefield/AngleBending.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
444,
8467,
38,
2846,
3759,
26239,
1535,
12,
43,
5018,
2745,
23,
72,
13,
288,
9506,
202,
72,
2837,
88,
842,
273,
394,
1645,
63,
5732,
23,
72,
18,
588,
1225,
1435,
6362,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
444,
8467,
38,
2846,
3759,
26239,
1535,
12,
43,
5018,
2745,
23,
72,
13,
288,
9506,
202,
72,
2837,
88,
842,
273,
394,
1645,
63,
5732,
23,
72,
18,
588,
1225,
1435,
6362,
... | ||
retractRelativePath(getPcgenCustomDir().getAbsolutePath())); | retractRelativePath(getPcgenCustomDir().getAbsolutePath())); | public static void setOptionsProperties(final PlayerCharacter aPC) { if (getPcgPath() != null) { getOptions().setProperty("pcgen.files.characters", retractRelativePath(getPcgPath().getAbsolutePath())); //$NON-NLS-1$ } else { // hasn't been set properly yet getOptions().setProperty("pcgen.files.characters", retractRelativePath(Globals.getDefaultPath())); //$NON-NLS-1$ } if (!getBackupPcgPath().getPath().equals("")) { getOptions().setProperty("pcgen.files.characters.backup", retractRelativePath(getBackupPcgPath().getAbsolutePath())); //$NON-NLS-1$ } else { getOptions().setProperty("pcgen.files.characters.backup", ""); //$NON-NLS-1$ } getOptions().setProperty("pcgen.files.portraits", retractRelativePath(getPortraitsPath().getAbsolutePath())); //$NON-NLS-1$ getOptions().setProperty("pcgen.files.selectedSpellOutputSheet", retractRelativePath(getSelectedSpellSheet())); //$NON-NLS-1$ getOptions().setProperty("pcgen.files.selectedCharacterHTMLOutputSheet", //$NON-NLS-1$ retractRelativePath(getSelectedCharacterHTMLOutputSheet(aPC))); getOptions().setProperty("pcgen.files.selectedCharacterPDFOutputSheet", //$NON-NLS-1$ retractRelativePath(getSelectedCharacterPDFOutputSheet(aPC))); getOptions().setProperty("pcgen.files.selectedPartyHTMLOutputSheet", //$NON-NLS-1$ retractRelativePath(getSelectedPartyHTMLOutputSheet())); getOptions().setProperty("pcgen.files.selectedPartyPDFOutputSheet", //$NON-NLS-1$ retractRelativePath(getSelectedPartyPDFOutputSheet())); getOptions().setProperty("pcgen.files.selectedEqSetTemplate", retractRelativePath(getSelectedEqSetTemplate())); //$NON-NLS-1$ getOptions().setProperty("pcgen.files.chosenCampaignSourcefiles", //$NON-NLS-1$ CoreUtility.join(PersistenceManager.getInstance().getChosenCampaignSourcefiles(), ',')); getOptions().setProperty("pcgen.options.custColumnWidth", CoreUtility.join(Globals.getCustColumnWidth(), ',')); //$NON-NLS-1$ if (getPcgenCustomDir() != null) { getOptions().setProperty("pcgen.files.pcgenCustomDir", //$NON-NLS-1$ retractRelativePath(getPcgenCustomDir().getAbsolutePath())); } else { getOptions().setProperty("pcgen.files.pcgenCustomDir", ""); //$NON-NLS-1$ //$NON-NLS-2$ } if (getPcgenVendorDataDir() != null) { getOptions().setProperty("pcgen.files.pcgenVendorDataDir", //$NON-NLS-1$ retractRelativePath(getPcgenVendorDataDir().getAbsolutePath())); } else { getOptions().setProperty("pcgen.files.pcgenVendorDataDir", ""); //$NON-NLS-1$ //$NON-NLS-2$ } if (getPcgenDocsDir() != null) { getOptions().setProperty("pcgen.files.pcgenDocsDir", //$NON-NLS-1$ retractRelativePath(getPcgenDocsDir().getAbsolutePath())); } else { getOptions().setProperty("pcgen.files.pcgenDocsDir", ""); //$NON-NLS-1$ //$NON-NLS-2$ } if (getPcgenSystemDir() != null) { getOptions().setProperty("pcgen.files.pcgenSystemDir", //$NON-NLS-1$ retractRelativePath(getPcgenSystemDir().getAbsolutePath())); } else { getOptions().setProperty("pcgen.files.pcgenSystemDir", ""); //$NON-NLS-1$ //$NON-NLS-2$ } if (getPcgenOutputSheetDir() != null) { getOptions().setProperty("pcgen.files.pcgenOutputSheetDir", //$NON-NLS-1$ retractRelativePath(getPcgenOutputSheetDir().getAbsolutePath())); } else { getOptions().setProperty("pcgen.files.pcgenOutputSheetDir", ""); //$NON-NLS-1$ //$NON-NLS-2$ } if (getGmgenPluginDir() != null) { getOptions().setProperty("gmgen.files.gmgenPluginDir", //$NON-NLS-1$ retractRelativePath(getGmgenPluginDir().getAbsolutePath())); } else { getOptions().setProperty("gmgen.files.gmgenPluginDir", ""); //$NON-NLS-1$ //$NON-NLS-2$ } if (getPcgenThemePackDir() != null) { getOptions().setProperty("pcgen.files.pcgenThemePackDir", //$NON-NLS-1$ retractRelativePath(getPcgenThemePackDir().getAbsolutePath())); } else { getOptions().setProperty("pcgen.files.pcgenThemePackDir", ""); //$NON-NLS-1$ //$NON-NLS-2$ } if (getBrowserPath() != null) { setPCGenOption("browserPath", getBrowserPath()); //$NON-NLS-1$ } else { setPCGenOption("browserPath", ""); //$NON-NLS-1$ //$NON-NLS-2$ } if (Globals.getRootFrame() != null) { setOpenRecentOption("openRecentPCs", PCGen_Frame1.getInst().getOpenRecentPCs()); //$NON-NLS-1$ setOpenRecentOption("openRecentParties", PCGen_Frame1.getInst().getOpenRecentParties()); //$NON-NLS-1$ } if (getGame() != null) { setPCGenOption("game", getGame().getName()); //$NON-NLS-1$ } else { setPCGenOption("game", ""); //$NON-NLS-1$ //$NON-NLS-2$ } try { setPCGenOption("skinLFThemePack", getSkinLFThemePack()); //$NON-NLS-1$ } catch (NullPointerException e) { //TODO: Should this really be ignored??? XXX } if (getPccFilesLocation() != null) { setPCGenOption("pccFilesLocation", retractRelativePath(getPccFilesLocation().getAbsolutePath())); //$NON-NLS-1$ } else { setPCGenOption("pccFilesLocation", ""); //$NON-NLS-1$ //$NON-NLS-2$ } if (getLeftUpperCorner() != null) { setPCGenOption("windowLeftUpperCorner.X", getLeftUpperCorner().getX()); //$NON-NLS-1$ setPCGenOption("windowLeftUpperCorner.Y", getLeftUpperCorner().getY()); //$NON-NLS-1$ } setPCGenOption("windowState",getWindowState()); //$NON-NLS-1$ if (Globals.getRootFrame() != null) { setPCGenOption("windowWidth", Globals.getRootFrame().getSize().getWidth()); //$NON-NLS-1$ setPCGenOption("windowHeight", Globals.getRootFrame().getSize().getHeight()); //$NON-NLS-1$ } if (getCustomizerLeftUpperCorner() != null) { setPCGenOption("customizer.windowLeftUpperCorner.X", getCustomizerLeftUpperCorner().getX()); //$NON-NLS-1$ setPCGenOption("customizer.windowLeftUpperCorner.Y", getCustomizerLeftUpperCorner().getY()); //$NON-NLS-1$ } if (getCustomizerDimension() != null) { setPCGenOption("customizer.windowWidth", getCustomizerDimension().getWidth()); //$NON-NLS-1$ setPCGenOption("customizer.windowHeight", getCustomizerDimension().getHeight()); //$NON-NLS-1$ } final String paperName = Globals.getPaperInfo(Constants.PAPERINFO_NAME); if (paperName != null) { setPCGenOption("paperName", paperName); //$NON-NLS-1$ } // // Remove old-style option values // setPCGenOption("allStatsValue", null); setPCGenOption("purchaseMethodName", null); setPCGenOption("rollMethod", null); setPCGenOption("rollMethodExpression", null); for (int idx = 0; idx < SystemCollections.getUnmodifiableGameModeList().size(); idx++) { final GameMode gameMode = (GameMode)SystemCollections.getUnmodifiableGameModeList().get(idx); if (gameMode.getUnitSet() != null && gameMode.getUnitSet().getName() != null) { setPCGenOption("gameMode." + gameMode.getName() + ".unitSetName", gameMode.getUnitSet().getName()); } setPCGenOption("gameMode." + gameMode.getName() + ".purchaseMethodName", gameMode.getPurchaseModeMethodName()); //$NON-NLS-1$ setPCGenOption("gameMode." + gameMode.getName() + ".rollMethod", gameMode.getRollMethod()); //$NON-NLS-1$ setPCGenOption("gameMode." + gameMode.getName() + ".rollMethodExpression", gameMode.getRollMethodExpressionName()); //$NON-NLS-1$ setPCGenOption("gameMode." + gameMode.getName() + ".allStatsValue", gameMode.getAllStatsValue()); } setRuleChecksInOptions("ruleChecks"); //$NON-NLS-1$ setPCGenOption("abilitiesShownAsTab", isAbilitiesShownAsATab()); //$NON-NLS-1$ setPCGenOption("allowMetamagicInCustomizer", isMetamagicAllowedInEqBuilder()); //$NON-NLS-1$ setPCGenOption("allowOverride", allowOverride); //$NON-NLS-1$ setPCGenOption("alwaysOverwrite", getAlwaysOverwrite()); //$NON-NLS-1$ setPCGenOption("autoFeatsRefundable", isAutoFeatsRefundable()); //$NON-NLS-1$ setPCGenOption("useFeatBenefits", useFeatBenefits()); //$NON-NLS-1$ setPCGenOption("autoGenerateExoticMaterial", isAutogenExoticMaterial()); //$NON-NLS-1$ setPCGenOption("autoGenerateMagic", isAutogenMagic()); //$NON-NLS-1$ setPCGenOption("autoGenerateMasterwork", isAutogenMasterwork()); //$NON-NLS-1$ setPCGenOption("autoGenerateRacial", isAutogenRacial()); //$NON-NLS-1$ setPCGenOption("chaTabPlacement", convertTabPlacementToString(chaTabPlacement)); //$NON-NLS-1$ setPCGenOption("ChooserSingleChoiceMethod", getSingleChoicePreference()); //$NON-NLS-1$ setPCGenOption("ClassTab.availableListMode", getClassTab_AvailableListMode()); //$NON-NLS-1$ setPCGenOption("ClassTab.selectedListMode", getClassTab_SelectedListMode()); //$NON-NLS-1$ setPCGenOption("cleanupTempFiles", getCleanupTempFiles()); //$NON-NLS-1$ setPCGenOption("country", Globals.getCountry()); //$NON-NLS-1$ setPCGenOption("createPcgBackup", getCreatePcgBackup()); //$NON-NLS-1$ setPCGenOption("customizer.split1", getCustomizerSplit1()); //$NON-NLS-1$ setPCGenOption("customizer.split2", getCustomizerSplit2()); //$NON-NLS-1$ setPCGenOption("dmnotes", getDmNotes()); //$NON-NLS-1$ setPCGenOption("DomainTab.ListMode", getDomainTab_ListMode()); //$NON-NLS-1$ setPCGenOption("EquipTab.availableListMode", getEquipTab_AvailableListMode()); //$NON-NLS-1$ setPCGenOption("EquipTab.selectedListMode", getEquipTab_SelectedListMode()); //$NON-NLS-1$// setPCGenOption("excSkillCost", getExcSkillCost()); //$NON-NLS-1$ setPCGenOption("expertGUI", isExpertGUI()); //$NON-NLS-1$ setPCGenOption("featAutoColor", "0x" + Integer.toHexString(getFeatAutoColor())); //$NON-NLS-1$ //$NON-NLS-2$ setPCGenOption("FeatTab.availableListMode", getFeatTab_AvailableListMode()); //$NON-NLS-1$ setPCGenOption("FeatTab.selectedListMode", getFeatTab_SelectedListMode()); //$NON-NLS-1$ setPCGenOption("featVirtualColor", "0x" + Integer.toHexString(getFeatVirtualColor())); //$NON-NLS-1$ //$NON-NLS-2$ setPCGenOption("GearTab.allowDebt", getGearTab_AllowDebt()); //$NON-NLS-1$ setPCGenOption("GearTab.autoResize", getGearTab_AutoResize()); //$NON-NLS-1$ setPCGenOption("GearTab.availableListMode", getGearTab_AvailableListMode()); //$NON-NLS-1$ setPCGenOption("GearTab.buyRate", getGearTab_BuyRate()); //$NON-NLS-1$ setPCGenOption("GearTab.ignoreCost", getGearTab_IgnoreCost()); //$NON-NLS-1$ setPCGenOption("GearTab.selectedListMode", getGearTab_SelectedListMode()); //$NON-NLS-1$ setPCGenOption("GearTab.sellRate", getGearTab_SellRate()); //$NON-NLS-1$ setPCGenOption("grimHPMode", isGrimHPMode()); //$NON-NLS-1$ setPCGenOption("grittyACMode", isGrittyACMode()); //$NON-NLS-1$ setPCGenOption("GUIUsesOutputNameEquipment", guiUsesOutputNameEquipment()); //$NON-NLS-1$ setPCGenOption("GUIUsesOutputNameSpells", guiUsesOutputNameSpells()); //$NON-NLS-1$ setPCGenOption("hideMonsterClasses", hideMonsterClasses()); //$NON-NLS-1$ setPCGenOption("hpMaxAtFirstLevel", isHPMaxAtFirstLevel()); //$NON-NLS-1$ setPCGenOption("hpPct", getHPPct()); //$NON-NLS-1$ setPCGenOption("hpRollMethod", getHPRollMethod()); //$NON-NLS-1$ setPCGenOption("ignoreMonsterHDCap", isIgnoreMonsterHDCap()); //$NON-NLS-1$ setPCGenOption("includeSkills", getIncludeSkills()); //$NON-NLS-1$ setPCGenOption("skillsTab_IncludeSkills", getSkillsTab_IncludeSkills()); //$NON-NLS-1$// setPCGenOption("intCrossClassSkillCost", getIntCrossClassSkillCost()); //$NON-NLS-1$ setPCGenOption("invalidDmgText", getInvalidDmgText()); //$NON-NLS-1$ setPCGenOption("invalidToHitText", getInvalidToHitText()); //$NON-NLS-1$ setPCGenOption("language", Globals.getLanguage()); //$NON-NLS-1$ setPCGenOption("lastTipOfTheDayTipShown", getLastTipShown()); //$NON-NLS-1$ setPCGenOption("loadCampaignsAtStart", isLoadCampaignsAtStart()); //$NON-NLS-1$ setPCGenOption("loadCampaignsWithPC", isLoadCampaignsWithPC()); //$NON-NLS-1$ setPCGenOption("loadMasterworkAndMagicFromLst", wantToLoadMasterworkAndMagic()); //$NON-NLS-1$ setPCGenOption("loadURLs", loadURLs); //$NON-NLS-1$ setPCGenOption("looknFeel", getLookAndFeel()); //$NON-NLS-1$ setPCGenOption("aaText", isAaText()); //$NON-NLS-1$ setPCGenOption("maxPotionSpellLevel", getMaxPotionSpellLevel()); //$NON-NLS-1$ setPCGenOption("maxWandSpellLevel", getMaxWandSpellLevel()); //$NON-NLS-1$ setPCGenOption("nameDisplayStyle", getNameDisplayStyle()); //$NON-NLS-1$ setPCGenOption("optionAllowedInSources", isOptionAllowedInSources()); //$NON-NLS-1$ setPCGenOption("postExportCommandStandard", SettingsHandler.getPostExportCommandStandard()); //$NON-NLS-1$ setPCGenOption("postExportCommandPDF", SettingsHandler.getPostExportCommandPDF()); //$NON-NLS-1$ setPCGenOption("prereqFailColor", "0x" + Integer.toHexString(getPrereqFailColor())); //$NON-NLS-1$ //$NON-NLS-2$ setPCGenOption("prereqQualifyColor", "0x" + Integer.toHexString(getPrereqQualifyColor())); //$NON-NLS-1$ //$NON-NLS-2$ setPCGenOption("previewTabShown", isPreviewTabShown()); //$NON-NLS-1$ setPCGenOption("RaceTab.ListMode", getRaceTab_ListMode()); //$NON-NLS-1$ setPCGenOption("ranStartingWizard", ranStartingWizard); //$NON-NLS-1$ setPCGenOption("saveCustomInLst", isSaveCustomInLst()); //$NON-NLS-1$ setPCGenOption("saveOutputSheetWithPC", getSaveOutputSheetWithPC()); //$NON-NLS-1$ setPCGenOption("printSpellsWithPC", getPrintSpellsWithPC()); //$NON-NLS-1$ setPCGenOption("showD20InfoAtStart", showD20InfoAtStart); //$NON-NLS-1$ setPCGenOption("showFeatDialogAtLevelUp", getShowFeatDialogAtLevelUp()); //$NON-NLS-1$ setPCGenOption("enforceSpendingBeforeLevelUp", getEnforceSpendingBeforeLevelUp()); //$NON-NLS-1$ setPCGenOption("showHPDialogAtLevelUp", getShowHPDialogAtLevelUp()); //$NON-NLS-1$ setPCGenOption("showMemoryArea", isShowMemoryArea()); //$NON-NLS-1$ setPCGenOption("showImagePreview", isShowImagePreview()); //$NON-NLS-1$ setPCGenOption("showNatWeaponTab", showNatWeaponTab); //$NON-NLS-1$ setPCGenOption("showOGLOnLoad", showOGLOnLoad); //$NON-NLS-1$ setPCGenOption("showSponsorsOnLoad", showSponsorsOnLoad); //$NON-NLS-1$ setPCGenOption("showStatDialogAtLevelUp", getShowStatDialogAtLevelUp()); //$NON-NLS-1$ setPCGenOption("showTipOfTheDay", getShowTipOfTheDay()); //$NON-NLS-1$ setPCGenOption("showToolBar", isShowToolBar()); //$NON-NLS-1$ setPCGenOption("showSkillModifier", getShowSkillModifier()); //$NON-NLS-1$ setPCGenOption("showWarningAtFirstLevelUp", isShowWarningAtFirstLevelUp()); //$NON-NLS-1$ setPCGenOption("SkillsTab.availableListMode", getSkillsTab_AvailableListMode()); //$NON-NLS-1$ setPCGenOption("SkillsTab.selectedListMode", getSkillsTab_SelectedListMode()); //$NON-NLS-1$ setPCGenOption("sourceDisplay", Globals.getSourceDisplay()); //$NON-NLS-1$ setPCGenOption("spellMarketPriceAdjusted", isSpellMarketPriceAdjusted()); //$NON-NLS-1$ setPCGenOption("SpellsTab.availableListMode", getSpellsTab_AvailableListMode()); //$NON-NLS-1$ setPCGenOption("SpellsTab.selectedListMode", getSpellsTab_SelectedListMode()); //$NON-NLS-1$ setPCGenOption("summaryTabShown", isSummaryTabShown()); //$NON-NLS-1$ setPCGenOption("tabPlacement", convertTabPlacementToString(tabPlacement)); //$NON-NLS-1$ setPCGenOption("toolTipTextShown", isToolTipTextShown()); //$NON-NLS-1$ setPCGenOption("useHigherLevelSlotsDefault", isUseHigherLevelSlotsDefault()); //$NON-NLS-1$ setPCGenOption("useMonsterDefault", isUseMonsterDefault()); //$NON-NLS-1$ setPCGenOption("useWaitCursor", getUseWaitCursor()); //$NON-NLS-1$ setPCGenOption("validateBonuses", validateBonuses); //$NON-NLS-1$ setPCGenOption("weaponProfPrintout", SettingsHandler.getWeaponProfPrintout()); //$NON-NLS-1$ setPCGenOption("debugFeats", debugFeats); //$NON-NLS-1$ } | 48301 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48301/746f9fbe7d3bb98c609b2f38fbc5ffad4e685726/SettingsHandler.java/buggy/code/src/java/pcgen/core/SettingsHandler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
918,
16526,
2297,
12,
6385,
19185,
7069,
279,
3513,
13,
202,
95,
202,
202,
430,
261,
588,
52,
26275,
743,
1435,
480,
446,
13,
202,
202,
95,
1082,
202,
588,
1320,
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,
225,
202,
482,
760,
918,
16526,
2297,
12,
6385,
19185,
7069,
279,
3513,
13,
202,
95,
202,
202,
430,
261,
588,
52,
26275,
743,
1435,
480,
446,
13,
202,
202,
95,
1082,
202,
588,
1320,
7675,
... |
tempFile = DBUtils.generateXMLFile(5000, 7, wordList); | tempFile = DBUtils.generateXMLFile(50000, 7, wordList); | protected void setUp() throws Exception { super.setUp(); String[] wordList = DBUtils.wordList(rootCol); tempFile = DBUtils.generateXMLFile(5000, 7, wordList); DBUtils.addXMLResource(getTestCollection(), "R1.xml", tempFile); String query0 = "/ROOT-ELEMENT/ELEMENT/ELEMENT-1"; String query1 = "distinct-values(//ELEMENT/@attribute-2)"; String query2 = "/ROOT-ELEMENT//ELEMENT-1[@attribute-3]"; addAction(new XQueryAction(URI + "/C1", "R1.xml", query0), 50, 500, 0); addAction(new XQueryAction(URI + "/C1", "R1.xml", query1), 50, 250, 0); addAction(new XQueryAction(URI + "/C1", "R1.xml", query2), 50, 0, 0); } | 2909 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2909/fc995ec0356b880c0f1167497625f824be9461d7/ConcurrentQueryTest.java/clean/src/org/exist/xmldb/test/concurrent/ConcurrentQueryTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
24292,
1435,
1216,
1185,
288,
202,
202,
9565,
18,
542,
1211,
5621,
9506,
202,
780,
8526,
2076,
682,
273,
2383,
1989,
18,
1095,
682,
12,
3085,
914,
1769,
202,
202,
5814,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
24292,
1435,
1216,
1185,
288,
202,
202,
9565,
18,
542,
1211,
5621,
9506,
202,
780,
8526,
2076,
682,
273,
2383,
1989,
18,
1095,
682,
12,
3085,
914,
1769,
202,
202,
5814,
... |
{ return eventManager.getReferenceFrame(); } | { return eventManager.getReferenceFrame(); } | RenderingAgtUIF getReferenceFrame() { return eventManager.getReferenceFrame(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1722ebf9ac60fc8e45cdc8d0049e85db5b86715c/QuantumPaneManager.java/buggy/SRC/org/openmicroscopy/shoola/agents/rnd/pane/QuantumPaneManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
14261,
2577,
88,
5370,
42,
13223,
3219,
1435,
202,
95,
202,
202,
2463,
23040,
18,
588,
2404,
3219,
5621,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
14261,
2577,
88,
5370,
42,
13223,
3219,
1435,
202,
95,
202,
202,
2463,
23040,
18,
588,
2404,
3219,
5621,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
void acquireComponentForMouseEvent (MouseEvent me) { int x = me.getX (); int y = me.getY (); Component candidate = mouseEventTarget; boolean candidate_is_container_with_children = ((candidate != null) && (candidate instanceof Container) && (((Container)candidate).getComponentCount () > 0)); boolean candidate_does_not_contain_point = ((candidate != null) && (! candidate.contains (x - candidate.getX (), y - candidate.getY ()))); if (candidate == null || candidate_is_container_with_children || candidate_does_not_contain_point) { // Try to reacquire. candidate = nativeContainer.findComponentAt (x, y); } if (mouseEventTarget != null && mouseEventTarget != candidate) { int nx = x - mouseEventTarget.getX (); int ny = y - mouseEventTarget.getY (); MouseEvent exited = new MouseEvent (mouseEventTarget, MouseEvent.MOUSE_EXITED, me.getWhen (), me.getModifiers (), nx, ny, me.getClickCount (), me.isPopupTrigger (), me.getButton ()); mouseEventTarget.dispatchEvent (exited); mouseEventTarget = null; } if (candidate != null) { // Possibly set new state. if (candidate.isLightweight() && candidate != nativeContainer && candidate != mouseEventTarget) { mouseEventTarget = candidate; int nx = x - mouseEventTarget.getX (); int ny = y - mouseEventTarget.getY (); // If acquired, enter it. MouseEvent entered = new MouseEvent (mouseEventTarget, MouseEvent.MOUSE_ENTERED, me.getWhen (), me.getModifiers (), nx, ny, me.getClickCount (), me.isPopupTrigger (), me.getButton ()); mouseEventTarget.dispatchEvent (entered); } } } | 1739 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1739/a969e4b30bfe4dfbec01c97d2652768b3b2da81f/Container.java/buggy/libjava/java/awt/Container.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
918,
1077,
1039,
1841,
1290,
9186,
1133,
12,
9186,
1133,
3501,
15329,
474,
92,
33,
3501,
18,
588,
60,
5621,
474,
93,
33,
3501,
18,
588,
61,
5621,
1841,
19188,
33,
11697,
1133,
2326,
31,
6494... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
918,
1077,
1039,
1841,
1290,
9186,
1133,
12,
9186,
1133,
3501,
15329,
474,
92,
33,
3501,
18,
588,
60,
5621,
474,
93,
33,
3501,
18,
588,
61,
5621,
1841,
19188,
33,
11697,
1133,
2326,
31,
6494... | ||
((DataCarryingMessage)msg).readFrom(lis, handler.bf); | try { ((DataCarryingMessage)msg).readFrom(lis, handler.bf, handler.server); } catch (MessageInvalidException e) { FCPMessage err = new ProtocolErrorMessage(e.protocolCode, false, e.getMessage(), e.ident); handler.outputHandler.queue(err); continue; } | public void realRun() throws IOException { InputStream is = handler.sock.getInputStream(); LineReadingInputStream lis = new LineReadingInputStream(is); boolean firstMessage = true; while(true) { SimpleFieldSet fs; // Read a message String messageType = lis.readLine(64, 64); if(messageType == null) { is.close(); return; } if(messageType.equals("")) continue; fs = new SimpleFieldSet(lis, 4096, 128, false, false); FCPMessage msg; try { msg = FCPMessage.create(messageType, fs); if(msg == null) continue; } catch (MessageInvalidException e) { FCPMessage err = new ProtocolErrorMessage(e.protocolCode, false, e.getMessage(), e.ident); handler.outputHandler.queue(err); continue; } if(firstMessage && !(msg instanceof ClientHelloMessage)) { FCPMessage err = new ProtocolErrorMessage(ProtocolErrorMessage.CLIENT_HELLO_MUST_BE_FIRST_MESSAGE, true, null, null); handler.outputHandler.queue(err); handler.close(); continue; } if(msg instanceof DataCarryingMessage) { ((DataCarryingMessage)msg).readFrom(lis, handler.bf); } if((!firstMessage) && msg instanceof ClientHelloMessage) { FCPMessage err = new ProtocolErrorMessage(ProtocolErrorMessage.NO_LATE_CLIENT_HELLOS, false, null, null); handler.outputHandler.queue(err); continue; } try { msg.run(handler, handler.server.node); } catch (MessageInvalidException e) { FCPMessage err = new ProtocolErrorMessage(e.protocolCode, false, e.getMessage(), e.ident); handler.outputHandler.queue(err); continue; } firstMessage = false; if(handler.isClosed()) return; } } | 46731 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46731/c3bd1101bcadc7c347643a2d0afd01491a0565ce/FCPConnectionInputHandler.java/buggy/src/freenet/node/fcp/FCPConnectionInputHandler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
2863,
1997,
1435,
1216,
1860,
288,
202,
202,
4348,
353,
273,
1838,
18,
15031,
18,
588,
4348,
5621,
202,
202,
1670,
15714,
4348,
328,
291,
273,
394,
5377,
15714,
4348,
12,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
2863,
1997,
1435,
1216,
1860,
288,
202,
202,
4348,
353,
273,
1838,
18,
15031,
18,
588,
4348,
5621,
202,
202,
1670,
15714,
4348,
328,
291,
273,
394,
5377,
15714,
4348,
12,
... |
option.addChild("a", "href", basePath + key.toString(false) + "?force=" + getForceValue(key, now)+extras, "Click here"); | option.addChild("a", "href", basePath + key.toString() + "?force=" + getForceValue(key, now)+extras, "Click here"); | public static void handleDownload(ToadletContext context, Bucket data, BucketFactory bucketFactory, String mimeType, String requestedMimeType, String forceString, boolean forceDownload, String basePath, FreenetURI key, String extras, String referrer) throws ToadletContextClosedException, IOException { if(requestedMimeType != null) { if(mimeType == null || !requestedMimeType.equals(mimeType)) { if(extras == null) extras = ""; extras = extras + "&type=" + requestedMimeType; } mimeType = requestedMimeType; } long now = System.currentTimeMillis(); boolean force = false; if(forceString != null) { if(forceString.equals(getForceValue(key, now)) || forceString.equals(getForceValue(key, now-FORCE_GRAIN_INTERVAL))) force = true; } try { if((!force) && (!forceDownload)) { FilterOutput fo = ContentFilter.filter(data, bucketFactory, mimeType, new URI(basePath + URLEncoder.encode(key.toString(false))), null); data = fo.data; mimeType = fo.type; if(horribleEvilHack(data) && !(mimeType.startsWith("application/rss+xml"))) { HTMLNode pageNode = context.getPageMaker().getPageNode("Potentially Dangerous Content (RSS)"); HTMLNode contentNode = context.getPageMaker().getContentNode(pageNode); HTMLNode infobox = contentNode.addChild("div", "class", "infobox infobox-alert"); infobox.addChild("div", "class", "infobox-header", "RSS feed may be dangerous"); HTMLNode infoboxContent = infobox.addChild("div", "class", "infobox-content"); infoboxContent.addChild("#", "Freenet has detected that the file you are trying to fetch might be RSS. "+ "RSS cannot be properly filtered by Freenet, and may contain web-bugs (inline images etc which may "+ "expose your IP address to a malicious site author and therefore break your anonymity). "+ "Firefox 2.0 and Internet Explorer 7.0 will open the file as RSS even though its content type is \""+HTMLEncoder.encode(mimeType)+"\"."); infoboxContent.addChild("p", "Your options are:"); HTMLNode optionList = infoboxContent.addChild("ul"); HTMLNode option = optionList.addChild("li"); option.addChild("a", "href", basePath + key.toString(false) + "?type=text/plain&force=" + getForceValue(key, now)+extras, "Click here"); option.addChild("%", " to open the file as plain text (this <b>may be dangerous</b> if you are running IE7 or FF2)."); // FIXME: is this safe? See bug #131 option = optionList.addChild("li"); option.addChild("a", "href", basePath + key.toString(false) + "?forcedownload"+extras, "Click here"); option.addChild("%", " to try to force your browser to download the file to disk (<b>this may also be dangerous if you run Firefox 2.0.0 (2.0.1 should fix this)</b>)."); if(!mimeType.startsWith("text/plain")) { option = optionList.addChild("li"); option.addChild("a", "href", basePath + key.toString(false) + "?force=" + getForceValue(key, now)+extras, "Click here"); option.addChild("#", " to open the file as " + mimeType); option.addChild("%", " (<b>this may also be dangerous</b>)."); } option = optionList.addChild("li"); option.addChild("a", "href", basePath + key.toString(false) + "?type=application/xml+rss&force=" + getForceValue(key, now)+extras, "Click here"); option.addChild("%", " to open the file as RSS (<b>this is dangerous if the site author is malicious</b>)."); if(referrer != null) { option = optionList.addChild("li"); option.addChild("a", "href", referrer, "Click here"); option.addChild("#", " to go back to the referring page."); } option = optionList.addChild("li"); option.addChild("a", "href", "/", "Click here"); option.addChild("#", " to go to the FProxy home page."); byte[] pageBytes = pageNode.generate().getBytes(); context.sendReplyHeaders(200, "OK", new MultiValueTable(), "text/html; charset=utf-8", pageBytes.length); context.writeData(pageBytes); return; } } if (forceDownload) { MultiValueTable headers = new MultiValueTable(); headers.put("Content-Disposition", "attachment; filename=\"" + key.getPreferredFilename() + '"'); context.sendReplyHeaders(200, "OK", headers, "application/x-msdownload", data.size()); context.writeData(data); } else { // Send the data, intact context.sendReplyHeaders(200, "OK", new MultiValueTable(), mimeType, data.size()); context.writeData(data); } } catch (URISyntaxException use1) { /* shouldn't happen */ use1.printStackTrace(); Logger.error(FProxyToadlet.class, "could not create URI", use1); } catch (UnsafeContentTypeException e) { HTMLNode pageNode = context.getPageMaker().getPageNode("Potentially Dangerous Content"); HTMLNode contentNode = context.getPageMaker().getContentNode(pageNode); HTMLNode infobox = contentNode.addChild("div", "class", "infobox infobox-alert"); infobox.addChild("div", "class", "infobox-header", e.getRawTitle()); HTMLNode infoboxContent = infobox.addChild("div", "class", "infobox-content"); infoboxContent.addChild(e.getHTMLExplanation()); infoboxContent.addChild("p", "Your options are:"); HTMLNode optionList = infoboxContent.addChild("ul"); HTMLNode option = optionList.addChild("li"); option.addChild("a", "href", basePath + key.toString(false) + "?type=text/plain"+extras, "Click here"); option.addChild("#", " to open the file as plain text (this should not be dangerous but it may be garbled)."); // FIXME: is this safe? See bug #131 option = optionList.addChild("li"); option.addChild("a", "href", basePath + key.toString(false) + "?forcedownload"+extras, "Click here"); option.addChild("#", " to force your browser to download the file to disk."); option = optionList.addChild("li"); option.addChild("a", "href", basePath + key.toString(false) + "?force=" + getForceValue(key, now)+extras, "Click here"); option.addChild("#", " to open the file as " + mimeType + '.'); if(referrer != null) { option = optionList.addChild("li"); option.addChild("a", "href", referrer, "Click here"); option.addChild("#", " to go back to the referring page."); } option = optionList.addChild("li"); option.addChild("a", "href", "/", "Click here"); option.addChild("#", " to go to the FProxy home page."); byte[] pageBytes = pageNode.generate().getBytes(); context.sendReplyHeaders(200, "OK", new MultiValueTable(), "text/html; charset=utf-8", pageBytes.length); context.writeData(pageBytes); } } | 50493 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50493/1c876261ab73159d57a26624667ec7bf7acd15b8/FProxyToadlet.java/buggy/src/freenet/clients/http/FProxyToadlet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
918,
1640,
7109,
12,
774,
361,
1810,
1042,
819,
16,
7408,
501,
16,
7408,
1733,
2783,
1733,
16,
514,
10707,
16,
514,
3764,
16821,
16,
514,
2944,
780,
16,
1250,
2944,
7109,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
918,
1640,
7109,
12,
774,
361,
1810,
1042,
819,
16,
7408,
501,
16,
7408,
1733,
2783,
1733,
16,
514,
10707,
16,
514,
3764,
16821,
16,
514,
2944,
780,
16,
1250,
2944,
7109,... |
if (scdProfileId == null) { ManagedBuildCPathEntryContainer.outputError(project.getName(), "Scanner config discovery profile not specified for the configuration"); return (IPathEntry[])entries.toArray(new IPathEntry[entries.size()]); | IScannerInfoCollector collector = null; SCProfileInstance profileInstance = null; if (scdProfileId != null) { profileInstance = ScannerConfigProfileManager.getInstance(). getSCProfileInstance(project, scdProfileId); collector = profileInstance.createScannerInfoCollector(); | public IPathEntry[] getPathEntries() { info = (ManagedBuildInfo) ManagedBuildManager.getBuildInfo(project); if (info == null) { ManagedBuildCPathEntryContainer.outputError(project.getName(), "Build information is null"); //$NON-NLS-1$ return (IPathEntry[])entries.toArray(new IPathEntry[entries.size()]); } IConfiguration defaultConfig = info.getDefaultConfiguration(); if (defaultConfig == null) { // The build information has not been loaded yet ManagedBuildCPathEntryContainer.outputError(project.getName(), "Build information has not been loaded yet"); //$NON-NLS-1$ return (IPathEntry[])entries.toArray(new IPathEntry[entries.size()]); } // get the associated scanner config discovery profile id String scdProfileId = ManagedBuildManager.getScannerInfoProfileId(defaultConfig); if (scdProfileId == null) { // scanner config profile not defined ManagedBuildCPathEntryContainer.outputError(project.getName(), "Scanner config discovery profile not specified for the configuration"); //$NON-NLS-1$ return (IPathEntry[])entries.toArray(new IPathEntry[entries.size()]); } // See if we can load a dynamic resolver SCProfileInstance profileInstance = ScannerConfigProfileManager.getInstance(). getSCProfileInstance(project, scdProfileId); IScannerInfoCollector collector = profileInstance.createScannerInfoCollector(); synchronized(this) { if (collector instanceof IManagedScannerInfoCollector) { IManagedScannerInfoCollector mCollector = (IManagedScannerInfoCollector) collector; mCollector.setProject(project); ManagedBuildCPathEntryContainer.outputTrace(project.getName(), "Path entries collected dynamically"); //$NON-NLS-1$ calculateEntriesDynamically((IProject)info.getOwner(), profileInstance, collector); addIncludePaths(mCollector.getIncludePaths()); addDefinedSymbols(mCollector.getDefinedSymbols()); addEntries(info.getManagedBuildValues()); } else { // If none supplied, use the built-ins if (defaultConfig != null) { addEntries(info.getManagedBuildValues()); addEntries(info.getManagedBuildBuiltIns()); ManagedBuildCPathEntryContainer.outputTrace(project.getName(), "Path entries set using built-in definitions from " + defaultConfig.getName()); //$NON-NLS-1$ } else { ManagedBuildCPathEntryContainer.outputError(project.getName(), "Configuration is null"); //$NON-NLS-1$ return (IPathEntry[])entries.toArray(new IPathEntry[entries.size()]); } } return (IPathEntry[])entries.toArray(new IPathEntry[entries.size()]); } // end synchronized } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/f6656c68c4680b5da0f8224556983d4273800ae8/ManagedBuildCPathEntryContainer.java/clean/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/scannerconfig/ManagedBuildCPathEntryContainer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
467,
743,
1622,
8526,
4339,
5400,
1435,
288,
202,
202,
1376,
273,
261,
10055,
3116,
966,
13,
10024,
3116,
1318,
18,
588,
3116,
966,
12,
4406,
1769,
202,
202,
430,
261,
1376,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
743,
1622,
8526,
4339,
5400,
1435,
288,
202,
202,
1376,
273,
261,
10055,
3116,
966,
13,
10024,
3116,
1318,
18,
588,
3116,
966,
12,
4406,
1769,
202,
202,
430,
261,
1376,
4... |
Iterator<String> i = resourceNameIterator(); | ICodeBaseIterator i = iterator(); | public boolean containsSourceFiles() { if (!checkedForSourceFiles) { Iterator<String> i = resourceNameIterator(); while (i.hasNext()) { String resourceName = i.next(); if (resourceName.endsWith(".java")) { containsSourceFiles = true; break; } } checkedForSourceFiles = true; } return containsSourceFiles; } | 7352 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7352/c597b34e0181d7a28cc58e7f94b2bcff8eb86573/AbstractScannableCodeBase.java/buggy/findbugs/src/java/edu/umd/cs/findbugs/classfile/impl/AbstractScannableCodeBase.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
1914,
1830,
2697,
1435,
288,
202,
202,
430,
16051,
4532,
1290,
1830,
2697,
13,
288,
1082,
202,
3198,
32,
780,
34,
277,
273,
9546,
3198,
5621,
1082,
202,
17523,
261,
77,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
1914,
1830,
2697,
1435,
288,
202,
202,
430,
16051,
4532,
1290,
1830,
2697,
13,
288,
1082,
202,
3198,
32,
780,
34,
277,
273,
9546,
3198,
5621,
1082,
202,
17523,
261,
77,
... |
workflowGroup[step-1] = Group.create(ourContext); workflowGroup[step-1].setName( "COLLECTION_" + getID() + "_WORKFLOW_STEP_" + step); workflowGroup[step-1].update(); | Group g = Group.create(ourContext); g.setName("COLLECTION_" + getID() + "_WORKFLOW_STEP_" + step); g.update(); setWorkflowGroup(step, g); | public Group createWorkflowGroup(int step) throws SQLException, AuthorizeException { // Check authorisation AuthorizeManager.authorizeAction(ourContext, this, Constants.WRITE); if (workflowGroup[step-1] == null) { workflowGroup[step-1] = Group.create(ourContext); workflowGroup[step-1].setName( "COLLECTION_" + getID() + "_WORKFLOW_STEP_" + step); workflowGroup[step-1].update(); } return workflowGroup[step-1]; } | 49711 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49711/582002e23b9a4e3e8ece5db8bb6c4f33500a6726/Collection.java/buggy/dspace/src/org/dspace/content/Collection.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3756,
752,
8484,
1114,
12,
474,
2235,
13,
3639,
1216,
6483,
16,
23859,
503,
565,
288,
3639,
368,
2073,
2869,
10742,
3639,
23859,
1318,
18,
22488,
1803,
12,
477,
1042,
16,
333,
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,
3756,
752,
8484,
1114,
12,
474,
2235,
13,
3639,
1216,
6483,
16,
23859,
503,
565,
288,
3639,
368,
2073,
2869,
10742,
3639,
23859,
1318,
18,
22488,
1803,
12,
477,
1042,
16,
333,
16,
... |
} else { System.out.println("No hits"); } return noHits; } | } else { System.out.println("No hits"); } return noHits; } | private int doXQueryC(String qry) throws RemoteException { QueryResponse rsp = query.xquery(sessionId,qry.getBytes()); int noHits = rsp.getHits(); if (noHits > 0) { String[] rsps = query.retrieveByDocument(sessionId,1,noHits,testColl + "/docA",true,false,"none"); for (int i = 0; i < rsps.length; i++) { System.out.println(rsps[i]); } noHits = rsps.length;// assertEquals(noHits,rsps.length); } else { System.out.println("No hits"); } return noHits; } | 2909 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2909/d8a9a41bcfc2db91febaa509dd518ba24c92cfe6/XQueryTest.java/buggy/src/org/exist/soap/test/XQueryTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
509,
741,
60,
1138,
39,
12,
780,
16788,
13,
1216,
18361,
202,
95,
202,
202,
1138,
1064,
12049,
273,
843,
18,
92,
2271,
12,
3184,
548,
16,
85,
1176,
18,
588,
2160,
10663,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
509,
741,
60,
1138,
39,
12,
780,
16788,
13,
1216,
18361,
202,
95,
202,
202,
1138,
1064,
12049,
273,
843,
18,
92,
2271,
12,
3184,
548,
16,
85,
1176,
18,
588,
2160,
10663,
20... |
private boolean resolveNativeMethod() { nativeProcedureName = getMangledName(false); String nativeProcedureNameWithSigniture = getMangledName(true); // get the library in VM_ClassLoader // resolve the native routine in the libraries VM_DynamicLibrary libs[] = VM_ClassLoader.getDynamicLibraries(); VM_Address symbolAddress = VM_Address.zero(); if (libs!=null) { for (int i=1; i<libs.length && symbolAddress.isZero(); i++) { VM_DynamicLibrary lib = libs[i]; if (lib!=null && symbolAddress==VM_Address.zero()) { symbolAddress = lib.getSymbol(nativeProcedureNameWithSigniture); if (symbolAddress != VM_Address.zero()) { nativeProcedureName = nativeProcedureNameWithSigniture; break; } } if (lib != null && symbolAddress==VM_Address.zero()) { symbolAddress = lib.getSymbol(nativeProcedureName); if (symbolAddress != VM_Address.zero()) { nativeProcedureName = nativeProcedureName; break; } } } } if (symbolAddress.isZero()) { // native procedure not found in library return false; } else { //-#if RVM_FOR_LINUX // both intel and linux use direct address nativeIP = symbolAddress; // Intel use direct branch address nativeTOC = VM_Address.zero(); // not used //-#else nativeIP = VM_Magic.getMemoryAddress(symbolAddress); // AIX use a triplet linkage nativeTOC = VM_Magic.getMemoryAddress(symbolAddress.add(BYTES_IN_ADDRESS)); //-#endif // VM.sysWrite("resolveNativeMethod: " + nativeProcedureName + ", IP = " + VM.intAsHexString(nativeIP) + ", TOC = " + VM.intAsHexString(nativeTOC) + "\n"); return true; } } | 49871 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49871/cf91c23b758dc3eca593c02229848c551a554aca/VM_NativeMethod.java/buggy/rvm/src/vm/classLoader/VM_NativeMethod.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
1250,
2245,
9220,
1305,
1435,
288,
565,
6448,
17213,
461,
273,
2108,
539,
1259,
461,
12,
5743,
1769,
565,
514,
6448,
17213,
461,
1190,
2766,
305,
594,
273,
2108,
539,
1259,
461,
12,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
1250,
2245,
9220,
1305,
1435,
288,
565,
6448,
17213,
461,
273,
2108,
539,
1259,
461,
12,
5743,
1769,
565,
514,
6448,
17213,
461,
1190,
2766,
305,
594,
273,
2108,
539,
1259,
461,
12,... | ||
System.out.println(">>>>>>>>>>>>>1"); | public SampleNewWizard() { super(); setNeedsProgressMonitor(true); System.out.println(">>>>>>>>>>>>>1"); } | 11120 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11120/6b30e419c238d4bc3e4778a67a8555eeba17fa4a/SampleNewWizard.java/buggy/trunk/qedomodeller/CCMEditor/src/ccm/wizards/SampleNewWizard.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
11474,
1908,
27130,
1435,
288,
202,
202,
9565,
5621,
202,
202,
542,
26419,
5491,
7187,
12,
3767,
1769,
202,
202,
3163,
18,
659,
18,
8222,
2932,
9778,
9778,
9778,
9778,
9778,
230... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
11474,
1908,
27130,
1435,
288,
202,
202,
9565,
5621,
202,
202,
542,
26419,
5491,
7187,
12,
3767,
1769,
202,
202,
3163,
18,
659,
18,
8222,
2932,
9778,
9778,
9778,
9778,
9778,
230... | |
Logger.minor(this, "Probe rejected: "+id+" "+target+" "+best+" "+nearest+" "+htl+" "+counter+" "+reason); | Logger.minor(this, "Probe rejected: "+id+ ' ' +target+ ' ' +best+ ' ' +nearest+ ' ' +htl+ ' ' +counter+ ' ' +reason); | private boolean handleProbeRejected(Message m, PeerNode src) { long id = m.getLong(DMT.UID); Long lid = new Long(id); double target = m.getDouble(DMT.TARGET_LOCATION); double best = m.getDouble(DMT.BEST_LOCATION); double nearest = m.getDouble(DMT.NEAREST_LOCATION); short htl = m.getShort(DMT.HTL); short counter = m.getShort(DMT.COUNTER); short reason = m.getShort(DMT.REASON); if(logMINOR) Logger.minor(this, "Probe rejected: "+id+" "+target+" "+best+" "+nearest+" "+htl+" "+counter+" "+reason); ProbeContext ctx; synchronized(recentProbeContexts) { ctx = (ProbeContext) recentProbeContexts.get(lid); if(ctx == null) { Logger.normal(this, "Unknown rejected probe request ID "+id); return false; } recentProbeContexts.push(lid, ctx); // promote or add while(recentProbeContexts.size() > MAX_PROBE_CONTEXTS) recentProbeContexts.popValue(); } return innerHandleProbeRequest(src, id, lid, target, best, nearest, htl, counter, false, false, null); } | 45341 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45341/62fd59041864b4ed1f43adc676de6bfb5ea977f3/NodeDispatcher.java/buggy/src/freenet/node/NodeDispatcher.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1250,
1640,
21042,
19902,
12,
1079,
312,
16,
10669,
907,
1705,
13,
288,
202,
202,
5748,
612,
273,
312,
18,
588,
3708,
12,
40,
6152,
18,
3060,
1769,
202,
202,
3708,
328,
350,
273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1250,
1640,
21042,
19902,
12,
1079,
312,
16,
10669,
907,
1705,
13,
288,
202,
202,
5748,
612,
273,
312,
18,
588,
3708,
12,
40,
6152,
18,
3060,
1769,
202,
202,
3708,
328,
350,
273,
... |
Context cx = Context.enter(); errorReporter = new ToolErrorReporter(false, err); cx.setErrorReporter(errorReporter); global = new Global(); args = processOptions(cx, args); Object[] array = args; if (args.length > 0) { int length = args.length - 1; array = new Object[length]; System.arraycopy(args, 1, array, 0, length); } Scriptable argsObj = cx.newArray(global, array); global.defineProperty("arguments", argsObj, ScriptableObject.DONTENUM); Environment.defineClass(global); Environment environment = new Environment(global); global.defineProperty("environment", environment, ScriptableObject.DONTENUM); global.history = (NativeArray) cx.newArray(global, 0); global.defineProperty("history", global.history, ScriptableObject.DONTENUM); /* TODO: enable debugger if (global.debug) { global.debug_dm = new DebugManager(); global.debug_stm = new SourceTextManagerImpl(); global.debug_dm.setSourceTextManager(global.debug_stm); cx.setSourceTextManager(global.debug_stm); global.debug_dm.createdContext(cx); if (global.showDebuggerUI) { out.println("Launching JSDebugger..."); try { Class clazz = Class.forName( "org.mozilla.jsdebugging.ifcui.launcher.rhino.LaunchNetscapeJavaScriptDebugger"); ILaunchableDebugger debugger = (ILaunchableDebugger) clazz.newInstance(); debugger.launch(global.debug_dm, global.debug_stm, false); } catch (Exception e) { out.println(e); out.println("Failed to launch the JSDebugger"); } } out.println("Debug level set to "+cx.getDebugLevel()); } */ if (global.processStdin) processSource(cx, args.length == 0 ? null : args[0]); cx.exit(); System.exit(global.exitCode); | int result = exec(args); System.exit(result); | public static void main(String args[]) { Context cx = Context.enter(); errorReporter = new ToolErrorReporter(false, err); cx.setErrorReporter(errorReporter); // Create the "global" object where top-level variables will live. global = new Global(); args = processOptions(cx, args); // Set up "arguments" in the global scope to contain the command // line arguments after the name of the script to execute Object[] array = args; if (args.length > 0) { int length = args.length - 1; array = new Object[length]; System.arraycopy(args, 1, array, 0, length); } Scriptable argsObj = cx.newArray(global, array); global.defineProperty("arguments", argsObj, ScriptableObject.DONTENUM); // Set up "environment" in the global scope to provide access to the // System environment variables. Environment.defineClass(global); Environment environment = new Environment(global); global.defineProperty("environment", environment, ScriptableObject.DONTENUM); global.history = (NativeArray) cx.newArray(global, 0); global.defineProperty("history", global.history, ScriptableObject.DONTENUM); /* TODO: enable debugger if (global.debug) { global.debug_dm = new DebugManager(); global.debug_stm = new SourceTextManagerImpl(); global.debug_dm.setSourceTextManager(global.debug_stm); cx.setSourceTextManager(global.debug_stm); global.debug_dm.createdContext(cx); if (global.showDebuggerUI) { out.println("Launching JSDebugger..."); try { Class clazz = Class.forName( "org.mozilla.jsdebugging.ifcui.launcher.rhino.LaunchNetscapeJavaScriptDebugger"); ILaunchableDebugger debugger = (ILaunchableDebugger) clazz.newInstance(); debugger.launch(global.debug_dm, global.debug_stm, false); } catch (Exception e) { // eat it... out.println(e); out.println("Failed to launch the JSDebugger"); } } out.println("Debug level set to "+cx.getDebugLevel()); } */ if (global.processStdin) processSource(cx, args.length == 0 ? null : args[0]); cx.exit(); System.exit(global.exitCode); } | 7555 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7555/913e66ba3cba216a4eaf9778710a58738f9afd42/Main.java/clean/js/rhino/org/mozilla/javascript/tools/shell/Main.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
2774,
12,
780,
833,
63,
5717,
288,
3639,
1772,
9494,
273,
1772,
18,
2328,
5621,
3639,
555,
13289,
273,
394,
13288,
668,
13289,
12,
5743,
16,
393,
1769,
3639,
9494,
18,
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,
760,
918,
2774,
12,
780,
833,
63,
5717,
288,
3639,
1772,
9494,
273,
1772,
18,
2328,
5621,
3639,
555,
13289,
273,
394,
13288,
668,
13289,
12,
5743,
16,
393,
1769,
3639,
9494,
18,
5... |
public ValenceConnectivityOrderZeroDescriptor() { } | public ValenceConnectivityOrderZeroDescriptor() { logger = new LoggingTool(this); } | public ValenceConnectivityOrderZeroDescriptor() { } | 1306 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1306/0a7f0ac7459a9f9ba3f69e907ae5192937b6f0bd/ValenceConnectivityOrderZeroDescriptor.java/buggy/src/org/openscience/cdk/qsar/ValenceConnectivityOrderZeroDescriptor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
12747,
802,
5215,
2818,
2448,
7170,
3187,
1435,
288,
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,
225,
202,
482,
12747,
802,
5215,
2818,
2448,
7170,
3187,
1435,
288,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
return tableTree; } | return tableTree; } | public Control getControl() { return tableTree; } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/98f48f47b2fd4c2b264a8e2e689bcbe9c594c5d2/TableTreeViewer.java/buggy/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/TableTreeViewer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
8888,
27174,
1435,
288,
3639,
327,
1014,
2471,
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,
8888,
27174,
1435,
288,
3639,
327,
1014,
2471,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Tree tpe1 = transform(tpe); Tree rhs1 = transform(rhs, sym); | rhs = transform(rhs, sym); | public Tree transform(Tree tree) { //global.debugPrinter.print("lifting ").print(tree).println().end();//DEBUG //System.out.print(tree.type + " --> ");//DEBUG tree.type = descr.transform(tree.type, currentOwner); //System.out.println(tree.type);//DEBUG switch (tree) { case Block(Tree[] stats): for (int i = 0; i < stats.length; i++) liftSymbol(stats[i]); return copy.Block(tree, transform(stats)); case ClassDef(int mods, _, AbsTypeDef[] tparams, ValDef[][] vparams, Tree tpe, Template impl): Symbol sym = tree.symbol(); if ((mods & LIFTED) != 0) { ((ClassDef) tree).mods &= ~LIFTED; Tree tree1 = copy.ClassDef( tree, sym, addTypeParams(transform(tparams, sym), newtparams(sym.primaryConstructor())), new ValDef[][]{ addParams(transform(vparams, sym)[0], newparams(sym.primaryConstructor()))}, transform(tpe, sym), transform(impl, sym)); liftedDefs.append(tree1); return Tree.Empty; } else { assert !sym.isLocal() : sym; return copy.ClassDef( tree, sym, transform(tparams, sym), transform(vparams, sym), transform(tpe, sym), transform(impl, sym)); } case DefDef(int mods, _, AbsTypeDef[] tparams, ValDef[][] vparams, Tree tpe, Tree rhs): Symbol sym = tree.symbol(); if ((mods & LIFTED) != 0) { ((DefDef) tree).mods &= ~LIFTED; Tree tree1 = copy.DefDef( tree, sym, addTypeParams(transform(tparams, sym), newtparams(sym)), new ValDef[][]{ addParams(transform(vparams, sym)[0], newparams(sym))}, transform(tpe, sym), transform(rhs, sym)); liftedDefs.append(tree1); return Tree.Empty; } else { assert !sym.isLocal() : sym; return copy.DefDef( tree, sym, transform(tparams, sym), transform(vparams, sym), transform(tpe, sym), transform(rhs, sym)); } case AbsTypeDef(int mods, Name name, Tree rhs, Tree lobound): // ignore type definition as owner. // reason: it might be in a refinement // todo: handle type parameters? return copy.AbsTypeDef( tree, tree.symbol(), transform(rhs, currentOwner), transform(lobound, currentOwner)); case AliasTypeDef(int mods, Name name, AbsTypeDef[] tparams, Tree rhs): // ignore type definition as owner. // reason: it might be in a refinement // todo: handle type parameters? return copy.AliasTypeDef( tree, tree.symbol(), transform(tparams, currentOwner), transform(rhs, currentOwner)); case ValDef(_, _, Tree tpe, Tree rhs): Symbol sym = tree.symbol(); Tree tpe1 = transform(tpe); Tree rhs1 = transform(rhs, sym); if ((sym.flags & CAPTURED) != 0) { assert sym.isLocal(); Type boxedType = sym.nextType(); tpe1 = gen.mkType(tpe.pos, boxedType); rhs1 = gen.New( gen.mkPrimaryConstr(rhs.pos, boxedType, new Tree[]{rhs1})); } return copy.ValDef(tree, sym, tpe1, rhs1); case Sequence(Tree[] args): Tree tree1 = gen.mkNewList(tree.pos, tree.type.typeArgs()[0], transform(args)); //new scalac.ast.printer.TextTreePrinter().print("TUPLE: ").print(tree).print("\n ==> \n").print(tree1).println().end();//DEBUG return tree1; case Return(Tree expr): if (tree.symbol() != currentOwner.enclMethod()) { unit.error(tree.pos, "non-local return not yet implemented"); } return super.transform(tree); case Apply(Tree fn, Tree[] args): Symbol fsym = TreeInfo.methSymbol(fn); Tree fn1 = transform(fn); switch (fn1) { case TypeApply(Tree fn2, Tree[] targs): if (args.length == 1 && fn2.symbol() == definitions.PREDEF_ARRAY()) { switch (args[0]) { case Sequence(Tree[] items): assert targs.length == 1: tree; Tree array = gen.mkNewArray( args[0].pos, targs[0].type(), transform(items), currentOwner); // fn2 may be like "{ println("hello"); Predef}.Array" switch (fn2) { case Select(Tree qualifier, _): return gen.Block( args[0].pos, new Tree[] {qualifier, array}); default: throw Debug.abort("illegal case", fn2); } } } fn1 = copy.TypeApply( fn1, fn2, addFreeArgs(tree.pos, get(free.ftvs, fsym), targs, true)); break; default: Tree[] targs = addFreeArgs( tree.pos, get(free.ftvs, fsym), Tree.EMPTY_ARRAY, true); if (targs.length > 0) fn1 = gen.TypeApply(fn1, targs); } Tree[] args1 = transform(args); return copy.Apply( tree, fn1, addFreeArgs(tree.pos, get(free.fvs, fsym), args1, false)); case Ident(Name name): Symbol sym = tree.symbol(); if (isLocal(sym, currentOwner) && (sym.kind == TYPE || (sym.kind == VAL && !sym.isMethod()))) { sym = descr.proxy(sym, currentOwner); } Tree tree1 = (sym.owner().kind == CLASS) ? gen.mkRef(tree.pos, sym) : copy.Ident(tree, sym).setType(sym.nextType()); if (name != sym.name) { if (tree1 instanceof Ident) ((Ident)tree1).name = sym.name; else ((Select)tree1).selector = sym.name; } if ((sym.flags & CAPTURED) != 0) return gen.Select(tree1, definitions.REF_ELEM()); else return tree1; default: return super.transform(tree); } } | 32355 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/32355/ec2cf46df2a18f9bcc56e8ac63f27d7fed5c12a6/LambdaLift.java/clean/sources/scalac/transformer/LambdaLift.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
4902,
2510,
12,
2471,
2151,
13,
288,
202,
759,
6347,
18,
4148,
12149,
18,
1188,
2932,
10256,
1787,
315,
2934,
1188,
12,
3413,
2934,
8222,
7675,
409,
5621,
759,
9394,
202,
759,
3163,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4902,
2510,
12,
2471,
2151,
13,
288,
202,
759,
6347,
18,
4148,
12149,
18,
1188,
2932,
10256,
1787,
315,
2934,
1188,
12,
3413,
2934,
8222,
7675,
409,
5621,
759,
9394,
202,
759,
3163,... |
vaildateDecliningInterestSvcChargeDeductedAtDisbursement(errors, request); | vaildateDecliningInterestSvcChargeDeductedAtDisbursement(errors, request); validatePrincDueOnLastInstAndPrincGraceType(errors); | private void validateForPreview(HttpServletRequest request, ActionErrors errors) { prdDefLogger .debug("start validateForPreview method of Loan Product Action form method :" + prdOfferingName); validateStartDate(request, errors); validateEndDate(request, errors); validateMinMaxDefLoanAmounts(errors); if (StringUtils.isNullOrEmpty(getInterestTypes())) addError(errors, "interestTypes", ProductDefinitionConstants.ERRORSSELECTCONFIG, getLabel( ConfigurationConstants.INTEREST, request), ProductDefinitionConstants.RATETYPE); validateMinMaxDefInterestRates(errors, request); vaildateDecliningInterestSvcChargeDeductedAtDisbursement(errors, request); setSelectedFeesAndFundsAndValidateForFrequency(request, errors); prdDefLogger .debug("validateForPreview method of Loan Product Action form method called :" + prdOfferingName); } | 45468 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45468/27d3f3127db1733989f7a0951f74f29e6ece4da7/LoanPrdActionForm.java/buggy/mifos/src/org/mifos/application/productdefinition/struts/actionforms/LoanPrdActionForm.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1954,
1290,
11124,
12,
2940,
18572,
590,
16,
1082,
202,
1803,
4229,
1334,
13,
288,
202,
202,
683,
72,
3262,
3328,
9506,
202,
18,
4148,
2932,
1937,
1954,
1290,
11124,
707,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1954,
1290,
11124,
12,
2940,
18572,
590,
16,
1082,
202,
1803,
4229,
1334,
13,
288,
202,
202,
683,
72,
3262,
3328,
9506,
202,
18,
4148,
2932,
1937,
1954,
1290,
11124,
707,
... |
public static CookieSession retrieve(String s) { CookieSession c = (CookieSession)gHash.get(s); | public static CookieSession retrieve(String sessionid) { CookieSession c = retrieveWithoutTouch(sessionid); | public static CookieSession retrieve(String s) { CookieSession c = (CookieSession)gHash.get(s); if(c != null) { c.touch(); } return c; } | 27800 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/27800/3964318eac7d7868e93893cc5707e590de87537d/CookieSession.java/buggy/tools/java/org/unicode/cldr/web/CookieSession.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
10201,
2157,
4614,
12,
780,
272,
13,
288,
3639,
10201,
2157,
276,
273,
261,
6151,
2157,
13,
75,
2310,
18,
588,
12,
87,
1769,
3639,
309,
12,
71,
480,
446,
13,
288,
5411,
276... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
10201,
2157,
4614,
12,
780,
272,
13,
288,
3639,
10201,
2157,
276,
273,
261,
6151,
2157,
13,
75,
2310,
18,
588,
12,
87,
1769,
3639,
309,
12,
71,
480,
446,
13,
288,
5411,
276... |
return (int)(value.toLong() >>> VM_SizeConstants.LOG_BYTES_IN_ADDRESS); return value.toInt() >>> VM_SizeConstants.LOG_BYTES_IN_ADDRESS; | return value.toWord().rshl(VM_SizeConstants.LOG_BYTES_IN_ADDRESS).toInt(); | public int hashCode() { //-#if RVM_FOR_64_ADDR return (int)(value.toLong() >>> VM_SizeConstants.LOG_BYTES_IN_ADDRESS); //-#elif RVM_FOR_32_ADDR return value.toInt() >>> VM_SizeConstants.LOG_BYTES_IN_ADDRESS; //-#endif } | 49871 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49871/f48fdea56df99c8c627e9d03888f336de8132de3/OPT_AddressConstantOperand.java/buggy/rvm/src/vm/compilers/optimizing/ir/instruction/operand/OPT_AddressConstantOperand.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
509,
13374,
1435,
288,
565,
368,
17,
7,
430,
534,
7397,
67,
7473,
67,
1105,
67,
14142,
565,
327,
261,
474,
21433,
1132,
18,
869,
3708,
1435,
4080,
8251,
67,
1225,
2918,
18,
4842,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
509,
13374,
1435,
288,
565,
368,
17,
7,
430,
534,
7397,
67,
7473,
67,
1105,
67,
14142,
565,
327,
261,
474,
21433,
1132,
18,
869,
3708,
1435,
4080,
8251,
67,
1225,
2918,
18,
4842,
... |
public Timestamp getTimestamp(int columnIndex) throws SQLException { String s = getString(columnIndex); if (s == null) return null; StringBuffer sbuf = new StringBuffer(s); SimpleDateFormat df = null; int slen = s.length(); if (slen > 19) { // The len of the ISO string to the second value is 19 chars. If // greater then 19, there should be tz info and perhaps fractional // second info which we need to change to java to read it. // cut the copy to second value "2001-12-07 16:29:22" int i = 19; sbuf.setLength(i); char c = s.charAt(i++); if (c == '.') { // Found a fractional value. Append up to 3 digits including // the leading '.' do { if (i < 24) sbuf.append(c); c = s.charAt(i++); } while (i < slen && Character.isDigit(c)); // If there wasn't at least 3 digits we should add some zeros // to make up the 3 digits we tell java to expect. for (int j = i; j < 24; j++) sbuf.append('0'); } else { // No fractional seconds, lets add some. sbuf.append(".000"); } if (i < slen) { // prepend the GMT part and then add the remaining bit of // the string. sbuf.append(" GMT"); sbuf.append(c); sbuf.append(s.substring(i, slen)); // Lastly, if the tz part doesn't specify the :MM part then // we add ":00" for java. if (slen - i < 5) sbuf.append(":00"); // we'll use this dateformat string to parse the result. df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS z"); } else { //if type is timestamptz then data is in GMT, else it is in local timezone if (fields[columnIndex - 1].getPGType().equals("timestamptz")) { sbuf.append(" GMT"); df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS z"); } else { df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS"); } } } else if (slen == 19) { // No tz or fractional second info. // if type is timestamptz then data is in GMT, else it is in local timezone if (fields[columnIndex - 1].getPGType().equals("timestamptz")) { sbuf.append(" GMT"); df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss z"); } else { df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); } } else { // We must just have a date. This case is // needed if this method is called on a date column df = new SimpleDateFormat("yyyy-MM-dd"); } try { // All that's left is to parse the string and return the ts. return new Timestamp(df.parse(sbuf.toString()).getTime()); } catch (ParseException e) { throw new PSQLException("postgresql.res.badtimestamp", new Integer(e.getErrorOffset()), s); } } | 11803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11803/d676e29d41e213661929442c6dec4627862975ba/ResultSet.java/buggy/src/interfaces/jdbc/org/postgresql/jdbc1/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,
430,
261,
87,
422,
446,
13,
1082,
202,
2463,
446,
31,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
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,
430,
261,
87,
422,
446,
13,
1082,
202,
2463,
446,
31,
20... | ||
|| e.getKeyCode() == KeyEvent.VK_KP_LEFT) | || e.getKeyCode() == KeyEvent.VK_KP_LEFT) | public void keyPressed(KeyEvent e) { TreePath start = BasicTreeUI.this.tree.getLeadSelectionPath(); TreeNode last = null; if (start != null) last = (TreeNode) start.getLastPathComponent(); if (last != null) { // DOWN, KP_DOWN if (e.getKeyCode() == KeyEvent.VK_DOWN || e.getKeyCode() == KeyEvent.VK_KP_DOWN) { TreeNode next = (TreeNode) BasicTreeUI.this. getNextVisibleNode(last); if (next != null) { TreePath newPath = new TreePath(getPathToRoot(next, 0)); BasicTreeUI.this.selectPath(BasicTreeUI.this.tree, newPath); if (e.isControlDown()) tree.setLeadSelectionPath(newPath); else if (!next.isLeaf() && e.isShiftDown()) { BasicTreeUI.this.tree.expandPath(newPath); BasicTreeUI.this.tree.fireTreeExpanded(newPath); } } } // UP, KP_UP else if (e.getKeyCode() == KeyEvent.VK_UP || e.getKeyCode() == KeyEvent.VK_KP_UP) { TreeNode prev = (TreeNode) BasicTreeUI.this. getPreviousVisibleNode(last); if (prev != null) { TreePath newPath = new TreePath(getPathToRoot(prev, 0)); BasicTreeUI.this.selectPath(BasicTreeUI.this.tree, new TreePath(getPathToRoot(prev, 0))); if (e.isControlDown()) tree.setLeadSelectionPath(newPath); else if (!prev.isLeaf() && e.isShiftDown()) { BasicTreeUI.this.tree.expandPath(newPath); BasicTreeUI.this.tree.fireTreeExpanded(newPath); } } } // LEFT, KP_LEFT else if (e.getKeyCode() == KeyEvent.VK_LEFT || e.getKeyCode() == KeyEvent.VK_KP_LEFT) { TreePath path = new TreePath(getPathToRoot(last, 0)); TreeNode p = last.getParent(); if (!last.isLeaf() && BasicTreeUI.this.tree.isExpanded(path)) { BasicTreeUI.this.tree.collapsePath(path); BasicTreeUI.this.tree.fireTreeCollapsed(path); } else if (p != null) BasicTreeUI.this.selectPath(BasicTreeUI.this.tree, new TreePath(getPathToRoot(p, 0))); } // RIGHT, KP_RIGHT else if (e.getKeyCode() == KeyEvent.VK_RIGHT || e.getKeyCode() == KeyEvent.VK_KP_RIGHT) { TreePath path = new TreePath(getPathToRoot(last, 0)); if (!last.isLeaf() && BasicTreeUI.this.tree.isCollapsed(path)) { BasicTreeUI.this.tree.expandPath(path); BasicTreeUI.this.tree.fireTreeExpanded(path); } else { TreeNode next = (TreeNode) BasicTreeUI.this. getNextVisibleNode(last); if (next != null) BasicTreeUI.this.selectPath(BasicTreeUI.this.tree, new TreePath(getPathToRoot(next, 0))); } } // Enter else if (e.getKeyCode() == KeyEvent.VK_ENTER) { TreePath path = new TreePath(getPathToRoot(last, 0)); if (!last.isLeaf()) { if (BasicTreeUI.this.tree.isExpanded(path)) { BasicTreeUI.this.tree.collapsePath(path); BasicTreeUI.this.tree.fireTreeCollapsed(path); } else { BasicTreeUI.this.tree.expandPath(path); BasicTreeUI.this.tree.fireTreeExpanded(path); } } } } } | 45713 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45713/4cf1551f330f4df0982837a197f03c4e0d450b2f/BasicTreeUI.java/buggy/libraries/javalib/javax/swing/plaf/basic/BasicTreeUI.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
498,
24624,
12,
653,
1133,
425,
13,
565,
288,
1377,
4902,
743,
787,
273,
7651,
2471,
5370,
18,
2211,
18,
3413,
18,
588,
9678,
6233,
743,
5621,
1377,
20270,
1142,
273,
446,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
498,
24624,
12,
653,
1133,
425,
13,
565,
288,
1377,
4902,
743,
787,
273,
7651,
2471,
5370,
18,
2211,
18,
3413,
18,
588,
9678,
6233,
743,
5621,
1377,
20270,
1142,
273,
446,
31... |
if(A_OpenCms.isLogging()) { | if((A_OpenCms.isLogging() && I_CmsLogChannels.C_PREPROCESSOR_IS_LOGGING)) { | protected I_CmsTemplate getTemplateClass(CmsObject cms, String classname) throws CmsException { if(C_DEBUG && A_OpenCms.isLogging()) { A_OpenCms.log(C_OPENCMS_DEBUG, getClassName() + "Getting start template class " + classname + ". "); } Object o = CmsTemplateClassManager.getClassInstance(cms, classname); // Check, if the loaded class really is a OpenCms template class. // This is done be checking the implemented interface. if(!(o instanceof I_CmsTemplate)) { String errorMessage = "Class " + classname + " is no OpenCms template class."; if(A_OpenCms.isLogging()) { A_OpenCms.log(C_OPENCMS_CRITICAL, "[CmsTemplateClassManager] " + errorMessage); } throw new CmsException(errorMessage, CmsException.C_XML_NO_TEMPLATE_CLASS); } I_CmsTemplate cmsTemplate = (I_CmsTemplate)o; if(!cmsTemplate.isTemplateCacheSet()) { cmsTemplate.setTemplateCache(m_templateCache); } return cmsTemplate; } | 8585 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8585/65fec749058083642e3e85283287c65357fa8690/A_CmsLauncher.java/clean/src/com/opencms/launcher/A_CmsLauncher.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
467,
67,
4747,
2283,
10646,
797,
12,
4747,
921,
6166,
16,
514,
7479,
13,
1216,
11228,
288,
3639,
309,
12,
39,
67,
9394,
597,
432,
67,
3678,
4747,
18,
291,
7735,
10756,
288,
5411,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
467,
67,
4747,
2283,
10646,
797,
12,
4747,
921,
6166,
16,
514,
7479,
13,
1216,
11228,
288,
3639,
309,
12,
39,
67,
9394,
597,
432,
67,
3678,
4747,
18,
291,
7735,
10756,
288,
5411,
... |
+ xmlReaderClass +". Please check classpath. Use value 'default' in " + | + xmlReaderClass + ". Please check classpath. Use value 'default' in " + | public static final XMLReader newXMLReader() { XMLReader xmlReader = null; String xmlReaderClass = Configuration.valueFor("xr.load.xml-reader"); //TODO: if it doesn't find the parser, note that in a static boolean--otherwise // you get exceptions on every load try { if ( xmlReaderClass != null && !xmlReaderClass.toLowerCase().equals("default") && XMLResource.useConfiguredParser ) { try { Class.forName(xmlReaderClass); } catch (Exception ex) { XMLResource.useConfiguredParser = false; XRLog.load(Level.WARNING, "The XMLReader class you specified as a configuration property " + "could not be found. Class.forName() failed on " + xmlReaderClass +". Please check classpath. Use value 'default' in " + "FS configuration if necessary. Will now try JDK default."); } if ( XMLResource.useConfiguredParser ) { xmlReader = XMLReaderFactory.createXMLReader( xmlReaderClass ); } } } catch ( Exception ex ) { XRLog.load(Level.WARNING, "Could not instantiate custom XMLReader class for XML parsing: " + xmlReaderClass +". Please check classpath. Use value 'default' in " + "FS configuration if necessary. Will now try JDK default.", ex); } if ( xmlReader == null ) { try { // JDK default // HACK: if if ( System.getProperty("org.xml.sax.driver") == null ) { String newDefault = "org.apache.crimson.parser.XMLReaderImpl"; XRLog.load(Level.WARNING, "No value for system property 'org.xml.sax.driver'."); } xmlReader = XMLReaderFactory.createXMLReader(); xmlReaderClass = "{JDK default}"; } catch ( Exception ex ) { XRLog.general(ex.getMessage()); } } if ( xmlReader == null ) { try { XRLog.load(Level.WARNING, "falling back on the default parser"); SAXParser parser = SAXParserFactory.newInstance().newSAXParser(); xmlReader = parser.getXMLReader(); xmlReaderClass = "SAXParserFactory default"; } catch ( Exception ex ) { XRLog.general(ex.getMessage()); } } if ( xmlReader == null ) { throw new XRRuntimeException("Could not instantiate any SAX 2 parser, including JDK default. " + "The name of the class to use should have been read from the org.xml.sax.driver System " + "property, which is set to: " + System.getProperty("org.xml.sax.driver")); } XRLog.load( "SAX XMLReader in use (parser): " + xmlReader.getClass().getName() ); return xmlReader; } | 8125 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8125/b2c3ac9b3acc975e472da2805929707f4c06b168/XMLResource.java/buggy/src/java/org/xhtmlrenderer/resource/XMLResource.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
727,
3167,
2514,
394,
4201,
2514,
1435,
288,
3639,
3167,
2514,
2025,
2514,
273,
446,
31,
3639,
514,
2025,
2514,
797,
273,
4659,
18,
1132,
1290,
2932,
92,
86,
18,
945,
18,
290... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
727,
3167,
2514,
394,
4201,
2514,
1435,
288,
3639,
3167,
2514,
2025,
2514,
273,
446,
31,
3639,
514,
2025,
2514,
797,
273,
4659,
18,
1132,
1290,
2932,
92,
86,
18,
945,
18,
290... |
mbd.accountId = rs.getString(1); mbd.size = rs.getLong(2); | mbd.accountId = rs.getString(pos++); if (DebugConfig.enableMailboxGroup) mbd.schemaGroupId = rs.getInt(pos++); mbd.size = rs.getLong(pos++); | public static Mailbox.MailboxData getMailboxStats(Connection conn, int mailboxId) throws ServiceException { PreparedStatement stmt = null; ResultSet rs = null; try { stmt = conn.prepareStatement( "SELECT account_id, size_checkpoint, contact_count, item_id_checkpoint, change_checkpoint, tracking_sync," + " tracking_imap, index_volume_id " + "FROM mailbox mb WHERE mb.id = ?"); stmt.setInt(1, mailboxId); rs = stmt.executeQuery(); if (!rs.next()) return null; Mailbox.MailboxData mbd = new Mailbox.MailboxData(); mbd.id = mailboxId; mbd.accountId = rs.getString(1); mbd.size = rs.getLong(2); if (rs.wasNull()) mbd.size = -1; mbd.contacts = rs.getInt(3); if (rs.wasNull()) mbd.contacts = -1; mbd.lastItemId = rs.getInt(4) + ITEM_CHECKPOINT_INCREMENT - 1; mbd.lastChangeId = rs.getInt(5) + CHANGE_CHECKPOINT_INCREMENT - 1; mbd.trackSync = rs.getInt(6); mbd.trackImap = rs.getBoolean(7); mbd.indexVolumeId = rs.getShort(8); // round lastItemId and lastChangeId up so that they get written on the next change long rounding = mbd.lastItemId % ITEM_CHECKPOINT_INCREMENT; if (rounding != ITEM_CHECKPOINT_INCREMENT - 1) mbd.lastItemId -= rounding + 1; rounding = mbd.lastChangeId % CHANGE_CHECKPOINT_INCREMENT; if (rounding != CHANGE_CHECKPOINT_INCREMENT - 1) mbd.lastChangeId -= rounding + 1; rs.close(); stmt.close(); stmt = conn.prepareStatement("SELECT section FROM mailbox_metadata WHERE mailbox_id = ?"); stmt.setInt(1, mailboxId); rs = stmt.executeQuery(); while (rs.next()) { if (mbd.configKeys == null) mbd.configKeys = new HashSet<String>(); mbd.configKeys.add(rs.getString(1)); } return mbd; } catch (SQLException e) { throw ServiceException.FAILURE("fetching stats on mailbox " + mailboxId, e); } finally { DbPool.closeResults(rs); DbPool.closeStatement(stmt); } } | 6965 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6965/ddefc0e424e4cccf845f5a987c40274fece99e76/DbMailbox.java/clean/ZimbraServer/src/java/com/zimbra/cs/db/DbMailbox.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
11542,
2147,
18,
30239,
751,
31991,
2147,
4195,
12,
1952,
1487,
16,
509,
14187,
548,
13,
1216,
16489,
288,
3639,
16913,
3480,
273,
446,
31,
3639,
10842,
3597,
273,
446,
31,
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,
11542,
2147,
18,
30239,
751,
31991,
2147,
4195,
12,
1952,
1487,
16,
509,
14187,
548,
13,
1216,
16489,
288,
3639,
16913,
3480,
273,
446,
31,
3639,
10842,
3597,
273,
446,
31,
363... |
public JMethodDeclaration getInitStageMethod() { JBlock statements = new JBlock(null, new JStatement[0], null); FilterContent filter = filterInfo.filter; List paramList = filter.getParams(); JExpression[] paramArray; if (paramList == null || paramList.size() == 0) paramArray = new JExpression[0]; else paramArray = (JExpression[])paramList.toArray(new JExpression[0]); statements.addStatement (new JExpressionStatement(null, new JMethodCallExpression (null, new JThisExpression(null), filter.getInit().getName(), paramArray), null)); if (filterInfo.isTwoStage()) { JBlock body = (JBlock)ObjectDeepCloner.deepCopy (filter.getInitWork().getBody()); statements.addStatement (makeForLoop(receiveCode(filter, filter.getInputType(), generatedVariables), generatedVariables.exeIndex, new JIntLiteral(filterInfo.peek))); statements.addStatement(body); if (isSimple()) { statements.addStatement (new JExpressionStatement(null, (new JAssignmentExpression (null, new JLocalVariableExpression (null, generatedVariables.simpleIndex), new JIntLiteral(-1))), null)); } } if (initFire - 1 > 0) { if (filterInfo.bottomPeek > 0) { statements.addStatement (makeForLoop(receiveCode(filter, filter.getInputType(), generatedVariables), generatedVariables.exeIndex, new JIntLiteral(filterInfo.bottomPeek))); } statements.addStatement(generateInitWorkLoop (filter, generatedVariables)); } if (filterInfo.remaining > 0) { statements.addStatement (makeForLoop(receiveCode(filter, filter.getInputType(), generatedVariables), generatedVariables.exeIndex, new JIntLiteral(filterInfo.remaining))); } if (SpaceTimeBackend.FILTER_DEBUG_MODE) { statements.addStatement (new SIRPrintStatement(null, new JStringLiteral(null, filter.getName() + " Starting Steady-State"), null)); } return new JMethodDeclaration(null, at.dms.kjc.Constants.ACC_PUBLIC, CStdType.Void, initStage + uniqueID, JFormalParameter.EMPTY, CClassType.EMPTY, statements, null, null); } | public abstract JMethodDeclaration getInitStageMethod(); | public JMethodDeclaration getInitStageMethod() { JBlock statements = new JBlock(null, new JStatement[0], null); FilterContent filter = filterInfo.filter; //create the call to the init function //create the params list, for some reason //calling toArray() on the list breaks a later pass List paramList = filter.getParams(); JExpression[] paramArray; if (paramList == null || paramList.size() == 0) paramArray = new JExpression[0]; else paramArray = (JExpression[])paramList.toArray(new JExpression[0]); //add the call to the init function statements.addStatement (new JExpressionStatement(null, new JMethodCallExpression (null, new JThisExpression(null), filter.getInit().getName(), paramArray), null)); //add the call to initWork if (filterInfo.isTwoStage()) { //FilterContent two = filter; JBlock body = (JBlock)ObjectDeepCloner.deepCopy (filter.getInitWork().getBody()); //add the code to receive the items into the buffer statements.addStatement (makeForLoop(receiveCode(filter, filter.getInputType(), generatedVariables), generatedVariables.exeIndex, new JIntLiteral(filterInfo.peek))); //now inline the init work body statements.addStatement(body); //if a simple filter, reset the simpleIndex if (isSimple()) { statements.addStatement (new JExpressionStatement(null, (new JAssignmentExpression (null, new JLocalVariableExpression (null, generatedVariables.simpleIndex), new JIntLiteral(-1))), null)); } } if (initFire - 1 > 0) { //add the code to collect enough data necessary to fire the //work function for the first time if (filterInfo.bottomPeek > 0) { statements.addStatement (makeForLoop(receiveCode(filter, filter.getInputType(), generatedVariables), generatedVariables.exeIndex, new JIntLiteral(filterInfo.bottomPeek))); } //add the calls for the work function in the initialization stage statements.addStatement(generateInitWorkLoop (filter, generatedVariables)); } //add the code to collect all data produced by the upstream filter //but not consumed by this filter in the initialization stage if (filterInfo.remaining > 0) { statements.addStatement (makeForLoop(receiveCode(filter, filter.getInputType(), generatedVariables), generatedVariables.exeIndex, new JIntLiteral(filterInfo.remaining))); } if (SpaceTimeBackend.FILTER_DEBUG_MODE) { statements.addStatement (new SIRPrintStatement(null, new JStringLiteral(null, filter.getName() + " Starting Steady-State"), null)); } return new JMethodDeclaration(null, at.dms.kjc.Constants.ACC_PUBLIC, CStdType.Void, initStage + uniqueID, JFormalParameter.EMPTY, CClassType.EMPTY, statements, null, null); } | 47772 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47772/e0196318cf15932ae930e8647a283ba3d6984d5b/RawExecutionCode.java/buggy/streams/src/at/dms/kjc/spacetime/RawExecutionCode.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
804,
1305,
6094,
26458,
8755,
1305,
1435,
377,
288,
202,
46,
1768,
6317,
273,
394,
804,
1768,
12,
2011,
16,
394,
804,
3406,
63,
20,
6487,
446,
1769,
202,
1586,
1350,
1034,
273,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
804,
1305,
6094,
26458,
8755,
1305,
1435,
377,
288,
202,
46,
1768,
6317,
273,
394,
804,
1768,
12,
2011,
16,
394,
804,
3406,
63,
20,
6487,
446,
1769,
202,
1586,
1350,
1034,
273,
10... |
int width = getWidth(); int pos; | protected int calculateBreakPosition(int p0, int p1) { Container c = getContainer(); int li = getLeftInset(); int ti = getTopInset(); Rectangle alloc = new Rectangle(li, ti, getWidth()-getRightInset()-li, getHeight()-getBottomInset()-ti); // Mimic a behavior observed in the RI. if (alloc.isEmpty()) return 0; updateMetrics(); try { getDocument().getText(p0, p1 - p0, getLineBuffer()); } catch (BadLocationException ble) { // this shouldn't happen throw new InternalError("Invalid offsets p0: " + p0 + " - p1: " + p1); } if (wordWrap) return p0 + Utilities.getBreakLocation(lineBuffer, metrics, alloc.x, alloc.x + alloc.width, this, 0); else return p0 + Utilities.getTabbedTextOffset(lineBuffer, metrics, alloc.x, alloc.x + alloc.width, this, 0, true); } | 47947 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47947/8de7a58b583ed7a20103e0de8fefff476740e75e/WrappedPlainView.java/buggy/javax/swing/text/WrappedPlainView.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
509,
1835,
273,
8557,
5621,
509,
949,
31,
509,
1835,
273,
8557,
5621,
509,
949,
31,
4750,
474,
1835,
273,
8557,
5621,
509,
949,
31,
509,
474,
1835,
273,
8557,
5621,
509,
949,
31,
4604,
7634,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
509,
1835,
273,
8557,
5621,
509,
949,
31,
509,
1835,
273,
8557,
5621,
509,
949,
31,
4750,
474,
1835,
273,
8557,
5621,
509,
949,
31,
509,
474,
1835,
273,
8557,
5621,
509,
949,
31,
4604,
7634,... | |
setErrorMessage("Insufficient privileges to change forum settings"); | setErrorMessage(getResourceBundleString(INSUFFICIENT_PRIVILEGES_CHAGNE_FORUM)); | public String processActionSaveForumSettings() { LOG.debug("processActionSaveForumSettings()"); if(selectedForum !=null && selectedForum.getForum()!=null && (selectedForum.getForum().getShortDescription()!=null) && (selectedForum.getForum().getShortDescription().length() > 255)) { setErrorMessage(getResourceBundleString(SHORT_DESC_TOO_LONG)); return null; } if(!uiPermissionsManager.isChangeSettings(selectedForum.getForum())) { setErrorMessage("Insufficient privileges to change forum settings"); return MAIN; } if(selectedForum!=null && selectedForum.getForum()!=null && (selectedForum.getForum().getTitle()==null ||selectedForum.getForum().getTitle().trim().length()<1 )) { setErrorMessage("Please enter a valid forum title"); return FORUM_SETTING_REVISE; } saveForumSettings(false); reset(); return MAIN; } | 48936 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48936/daf96dee19a568b9d9699beb307fd7e9e3f46696/DiscussionForumTool.java/clean/messageforums-app/src/java/org/sakaiproject/tool/messageforums/DiscussionForumTool.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
514,
1207,
1803,
4755,
1290,
379,
2628,
1435,
225,
288,
565,
2018,
18,
4148,
2932,
2567,
1803,
4755,
1290,
379,
2628,
1435,
8863,
3639,
309,
12,
8109,
1290,
379,
480,
2011,
597,
317... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
514,
1207,
1803,
4755,
1290,
379,
2628,
1435,
225,
288,
565,
2018,
18,
4148,
2932,
2567,
1803,
4755,
1290,
379,
2628,
1435,
8863,
3639,
309,
12,
8109,
1290,
379,
480,
2011,
597,
317... |
ImageDescriptor imageDescriptor = null; if( node instanceof IASTClassSpecifier ){ ASTClassKind kind = ((IASTClassSpecifier)node).getClassKind(); if( kind == ASTClassKind.CLASS ){ imageDescriptor = CPluginImages.DESC_OBJS_CLASS; } else if ( kind == ASTClassKind.STRUCT ){ imageDescriptor = CPluginImages.DESC_OBJS_STRUCT; } else if ( kind == ASTClassKind.UNION ){ imageDescriptor = CPluginImages.DESC_OBJS_UNION; } } else if ( node instanceof IASTNamespaceDefinition ){ imageDescriptor = CPluginImages.DESC_OBJS_CONTAINER; } else if ( node instanceof IASTEnumerationSpecifier ){ imageDescriptor = CPluginImages.DESC_OBJS_ENUMERATION; | if( node instanceof IASTReference ){ offsetable = (IASTOffsetableNamedElement) ((IASTReference)node).getReferencedElement(); name = ((IASTReference)node).getName(); } else if( node instanceof IASTOffsetableNamedElement ){ offsetable = (IASTOffsetableNamedElement)node; name = offsetable.getName(); } else { return null; | public IMatch createMatch(IASTOffsetableNamedElement node, IASTScope parent ) { String name = node.getName(); String parentName = ""; if( parent instanceof IASTQualifiedNameElement ){ String [] names = ((IASTQualifiedNameElement)parent).getFullyQualifiedName(); for( int i = 0; i < names.length; i++ ){ if( i > 0 ) parentName += "::"; parentName += names[ i ]; } } ImageDescriptor imageDescriptor = null; if( node instanceof IASTClassSpecifier ){ ASTClassKind kind = ((IASTClassSpecifier)node).getClassKind(); if( kind == ASTClassKind.CLASS ){ imageDescriptor = CPluginImages.DESC_OBJS_CLASS; } else if ( kind == ASTClassKind.STRUCT ){ imageDescriptor = CPluginImages.DESC_OBJS_STRUCT; } else if ( kind == ASTClassKind.UNION ){ imageDescriptor = CPluginImages.DESC_OBJS_UNION; } } else if ( node instanceof IASTNamespaceDefinition ){ imageDescriptor = CPluginImages.DESC_OBJS_CONTAINER; } else if ( node instanceof IASTEnumerationSpecifier ){ imageDescriptor = CPluginImages.DESC_OBJS_ENUMERATION; } Image image = CUIPlugin.getImageDescriptorRegistry().get( imageDescriptor ); IMatch match = new Match(name, parentName, image, node.getNameOffset(), name.length() ); return match; } | 54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/7a408c3e1d654808f080fcb472cdcf92f1938829/CSearchResultCollector.java/clean/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/CSearchResultCollector.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
467,
2060,
752,
2060,
12,
45,
9053,
2335,
429,
7604,
1046,
756,
16,
467,
9053,
3876,
982,
262,
288,
202,
202,
780,
508,
273,
756,
18,
17994,
5621,
9506,
202,
780,
26119,
273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
467,
2060,
752,
2060,
12,
45,
9053,
2335,
429,
7604,
1046,
756,
16,
467,
9053,
3876,
982,
262,
288,
202,
202,
780,
508,
273,
756,
18,
17994,
5621,
9506,
202,
780,
26119,
273,
... |
testCounters=null; | private void clearAllCounters() { if(testCounters!=null) { testCounters.clear(); testCounters=null; } log("Cleared all counters"); } | 28323 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/28323/c27c965b7b342eea1fb9eaf17b266ee40e17e73c/AbstractMuleTestCase.java/clean/mule/src/main/java/org/mule/tck/AbstractMuleTestCase.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
29453,
18037,
1435,
288,
3639,
309,
12,
3813,
18037,
5,
33,
2011,
13,
288,
5411,
1842,
18037,
18,
8507,
5621,
10402,
289,
3639,
613,
2932,
4756,
2258,
777,
13199,
8863,
565,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
29453,
18037,
1435,
288,
3639,
309,
12,
3813,
18037,
5,
33,
2011,
13,
288,
5411,
1842,
18037,
18,
8507,
5621,
10402,
289,
3639,
613,
2932,
4756,
2258,
777,
13199,
8863,
565,
28... | |
dumpElementln("ARRAY"); | if(dump) dumpElementln("ARRAY"); | public final Object readObject() throws ClassNotFoundException, IOException { if (this.useSubclassMethod) return readObjectOverride(); boolean was_deserializing; Object ret_val; was_deserializing = this.isDeserializing; boolean is_consumed = false; boolean old_mode = setBlockDataMode(false); this.isDeserializing = true; byte marker = this.realInputStream.readByte(); dumpElement("MARKER: 0x" + Integer.toHexString(marker) + " "); try { switch (marker) { case TC_ENDBLOCKDATA: { ret_val = null; is_consumed = true; break; } case TC_BLOCKDATA: case TC_BLOCKDATALONG: { if (marker == TC_BLOCKDATALONG) dumpElementln("BLOCKDATALONG"); else dumpElementln("BLOCKDATA"); readNextBlock(marker); throw new StreamCorruptedException("Unexpected blockData"); } case TC_NULL: { dumpElementln("NULL"); ret_val = null; break; } case TC_REFERENCE: { dumpElement("REFERENCE "); Integer oid = new Integer(this.realInputStream.readInt()); dumpElementln(Integer.toHexString(oid.intValue())); ret_val = ((ObjectIdentityWrapper) this.objectLookupTable.get(oid)).object; break; } case TC_CLASS: { dumpElementln("CLASS"); ObjectStreamClass osc = (ObjectStreamClass)readObject(); Class clazz = osc.forClass(); assignNewHandle(clazz); ret_val = clazz; break; } case TC_PROXYCLASSDESC: { dumpElementln("PROXYCLASS"); int n_intf = this.realInputStream.readInt(); String[] intfs = new String[n_intf]; for (int i = 0; i < n_intf; i++) { intfs[i] = this.realInputStream.readUTF(); System.out.println(intfs[i]); } boolean oldmode = setBlockDataMode(true); Class cl = resolveProxyClass(intfs); setBlockDataMode(oldmode); ObjectStreamClass osc = lookupClass(cl); assignNewHandle(osc); if (!is_consumed) { byte b = this.realInputStream.readByte(); if (b != TC_ENDBLOCKDATA) throw new IOException("Data annotated to class was not consumed." + b); } else is_consumed = false; ObjectStreamClass superosc = (ObjectStreamClass)readObject(); osc.setSuperclass(superosc); ret_val = osc; break; } case TC_CLASSDESC: { ObjectStreamClass osc = readClassDescriptor(); if (!is_consumed) { byte b = this.realInputStream.readByte(); if (b != TC_ENDBLOCKDATA) throw new IOException("Data annotated to class was not consumed." + b); } else is_consumed = false; osc.setSuperclass ((ObjectStreamClass)readObject()); ret_val = osc; break; } case TC_STRING: case TC_LONGSTRING: { dumpElement("STRING="); String s = this.realInputStream.readUTF(); dumpElementln(s); ret_val = processResolution(s, assignNewHandle(s)); break; } case TC_ARRAY: { dumpElementln("ARRAY"); ObjectStreamClass osc = (ObjectStreamClass)readObject(); Class componentType = osc.forClass().getComponentType(); dumpElement("ARRAY LENGTH="); int length = this.realInputStream.readInt(); dumpElementln (length + "; COMPONENT TYPE=" + componentType); Object array = Array.newInstance(componentType, length); int handle = assignNewHandle(array); readArrayElements(array, componentType); for (int i = 0, len = Array.getLength(array); i < len; i++) dumpElementln(" ELEMENT[" + i + "]=" + Array.get(array, i)); ret_val = processResolution(array, handle); break; } case TC_OBJECT: { dumpElementln("OBJECT"); ObjectStreamClass osc = (ObjectStreamClass)readObject(); Class clazz = osc.forClass(); if (!Serializable.class.isAssignableFrom(clazz)) throw new NotSerializableException (clazz + " is not Serializable, and thus cannot be deserialized."); if (Externalizable.class.isAssignableFrom(clazz)) { Externalizable obj = null; try { obj = (Externalizable)clazz.newInstance(); } catch (InstantiationException e) { throw new ClassNotFoundException ("Instance of " + clazz + " could not be created"); } catch (IllegalAccessException e) { throw new ClassNotFoundException ("Instance of " + clazz + " could not be created because class or " + "zero-argument constructor is not accessible"); } catch (NoSuchMethodError e) { throw new ClassNotFoundException ("Instance of " + clazz + " could not be created because zero-argument constructor is not defined"); } int handle = assignNewHandle(obj); boolean read_from_blocks = ((osc.getFlags() & SC_BLOCK_DATA) != 0); boolean oldmode = this.readDataFromBlock; if (read_from_blocks) setBlockDataMode(true); obj.readExternal(this); if (read_from_blocks) setBlockDataMode(oldmode); ret_val = processResolution(obj, handle); break; } // end if (Externalizable.class.isAssignableFrom (clazz)) // find the first non-serializable, non-abstract // class in clazz's inheritance hierarchy Class first_nonserial = clazz.getSuperclass(); while (Serializable.class.isAssignableFrom(first_nonserial) || Modifier.isAbstract(first_nonserial.getModifiers())) first_nonserial = first_nonserial.getSuperclass(); Object obj = null; obj = newObject(clazz, first_nonserial); if (obj == null) throw new ClassNotFoundException ("Instance of " + clazz + " could not be created"); int handle = assignNewHandle(obj); this.currentObject = obj; ObjectStreamClass[] hierarchy = inputGetObjectStreamClasses(clazz); for (int i = 0; i < hierarchy.length; i++) { this.currentObjectStreamClass = hierarchy[i]; dumpElementln("Reading fields of " + this.currentObjectStreamClass.getName ()); // XXX: should initialize fields in classes in the hierarchy // that aren't in the stream // should skip over classes in the stream that aren't in the // real classes hierarchy if (this.currentObjectStreamClass.hasReadMethod()) { fieldsAlreadyRead = false; boolean oldmode = setBlockDataMode(true); callReadMethod(obj, this.currentObjectStreamClass); setBlockDataMode(oldmode); dumpElement("ENDBLOCKDATA? "); try { // FIXME: XXX: This try block is to catch EOF which is // thrown for some objects. That indicates a bug in the logic. if (this.realInputStream.readByte() != TC_ENDBLOCKDATA) throw new IOException ("No end of block data seen for class with readObject (ObjectInputStream) method."); dumpElementln("yes"); } catch (EOFException e) { dumpElementln("no, got EOFException"); } catch (IOException e) { dumpElementln("no, got IOException"); } } else { readFields(obj, currentObjectStreamClass); } } this.currentObject = null; this.currentObjectStreamClass = null; ret_val = processResolution(obj, handle); break; } case TC_RESET: dumpElementln("RESET"); clearHandles(); ret_val = readObject(); break; case TC_EXCEPTION: { dumpElement("EXCEPTION="); Exception e = (Exception)readObject(); dumpElementln(e.toString()); clearHandles(); throw new WriteAbortedException("Exception thrown during writing of stream", e); } default: throw new IOException("Unknown marker on stream: " + marker); } } finally { setBlockDataMode(old_mode); this.isDeserializing = was_deserializing; if (! was_deserializing) { if (validators.size() > 0) invokeValidators(); } } return ret_val; } | 5916 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5916/287ecb3eab399e579158e4cbd037261f67ffbc1b/ObjectInputStream.java/clean/libjava/java/io/ObjectInputStream.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
727,
1033,
17362,
1435,
1216,
10403,
16,
1860,
225,
288,
565,
309,
261,
2211,
18,
1202,
1676,
1106,
1305,
13,
1377,
327,
17362,
6618,
5621,
565,
1250,
1703,
67,
5489,
24662,
6894,
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,
727,
1033,
17362,
1435,
1216,
10403,
16,
1860,
225,
288,
565,
309,
261,
2211,
18,
1202,
1676,
1106,
1305,
13,
1377,
327,
17362,
6618,
5621,
565,
1250,
1703,
67,
5489,
24662,
6894,
3... |
return RubyFixnum.newFixnum(getRuntime(), pos); | return getRuntime().newFixnum(pos); | public IRubyObject rewind() { pos = 0; return RubyFixnum.newFixnum(getRuntime(), pos); } | 45753 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45753/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubyDir.java/buggy/src/org/jruby/RubyDir.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
15908,
10340,
921,
12881,
1435,
288,
3639,
949,
273,
374,
31,
3639,
327,
18814,
7675,
2704,
8585,
2107,
12,
917,
1769,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
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,
12881,
1435,
288,
3639,
949,
273,
374,
31,
3639,
327,
18814,
7675,
2704,
8585,
2107,
12,
917,
1769,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
this(null); | this(null, "stable"); | public JChemPaintViewerOnlyPanel() { this(null); } | 45254 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45254/fc6ed375ec516699b207eeef5c75d29bd0fc7dc2/JChemPaintViewerOnlyPanel.java/buggy/src/org/openscience/cdk/applications/jchempaint/JChemPaintViewerOnlyPanel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
804,
20200,
12699,
18415,
3386,
5537,
1435,
288,
202,
202,
2211,
12,
2011,
1769,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
804,
20200,
12699,
18415,
3386,
5537,
1435,
288,
202,
202,
2211,
12,
2011,
1769,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
myFileChooser.requestFocusInWindow(); | if (myFileChooser != null) { myFileChooser.requestFocusInWindow(); } else { myViewingPanel.requestFocusInWindow(); } | public void run() { myFileChooser.requestFocusInWindow(); } | 56627 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56627/00c1daa523aa004c3bcced6f2bf1473102f1ad90/ImplementationViewComponent.java/clean/source/com/intellij/codeInsight/hint/ImplementationViewComponent.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4202,
1071,
918,
1086,
1435,
288,
3639,
309,
261,
4811,
812,
17324,
480,
446,
13,
288,
3399,
812,
17324,
18,
2293,
9233,
382,
3829,
5621,
289,
469,
288,
3399,
1767,
310,
5537,
18,
2293,
9233,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4202,
1071,
918,
1086,
1435,
288,
3639,
309,
261,
4811,
812,
17324,
480,
446,
13,
288,
3399,
812,
17324,
18,
2293,
9233,
382,
3829,
5621,
289,
469,
288,
3399,
1767,
310,
5537,
18,
2293,
9233,
... |
try { Thread.sleep(handler.getQueueInterval() + 1000); } catch (InterruptedException ie) { | try { Thread.sleep(handler.getQueueInterval() + 1000); } catch (InterruptedException ie) { } | public TabIconHandler(final String ident) { this.ident = ident; new Thread(new Runnable() { public void run() { while (true) { //if this tab is active, remove the icon if ((getTabbedPane().getSelectedIndex() > -1) && (getTabbedPane().getSelectedIndex() == getTabbedPane() .indexOfTab(ident))) { getTabbedPane() .setIconAt(getTabbedPane().indexOfTab(ident), null); //reset fields so no icon will display lastCount = currentCount; hasNewEvents = false; } else { //don't process undocked tabs if (getTabbedPane().indexOfTab(ident) > -1) { //if the tab is not active and the counts don't match, set the // new events icon if (lastCount != currentCount) { getTabbedPane() .setIconAt(getTabbedPane().indexOfTab(ident), NEW_EVENTS); lastCount = currentCount; hasNewEvents = true; } else { if (hasNewEvents) { getTabbedPane() .setIconAt(getTabbedPane().indexOfTab(ident), HAS_EVENTS); } } } } try { Thread.sleep(handler.getQueueInterval() + 1000); } catch (InterruptedException ie) { } } } }).start(); } | 45952 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45952/3d13a775b379e3dcb56bfa1b7fbefd5c5dc2b470/LogUI.java/clean/src/java/org/apache/log4j/chainsaw/LogUI.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
9483,
5554,
1503,
12,
6385,
514,
3390,
13,
565,
288,
1377,
333,
18,
6392,
273,
3390,
31,
1377,
394,
4884,
12,
2704,
10254,
1435,
1377,
288,
3639,
1071,
918,
1086,
1435,
3639,
288,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
9483,
5554,
1503,
12,
6385,
514,
3390,
13,
565,
288,
1377,
333,
18,
6392,
273,
3390,
31,
1377,
394,
4884,
12,
2704,
10254,
1435,
1377,
288,
3639,
1071,
918,
1086,
1435,
3639,
288,
... |
assert getTile(src) != null; | RawTile srcTile = getTile(src); assert srcTile != null; | private double getStaticCost(StaticStreamGraph ssg, HashSet usedTiles) { //the tiles used by THIS SSG for routing //this set is filled with tiles that are not assigned but //have been used to route items previously by this SSG HashSet routers = new HashSet(); //allt tiles used for this SSG, add it to used tiles at the end, if legal HashSet tiles = new HashSet(); Iterator nodes = ssg.getFlatNodes().iterator(); double cost = 0.0; //calculate the communication cost for each node that is assign a tile in //the ssg while (nodes.hasNext()) { FlatNode src = (FlatNode)nodes.next(); if (!(assigned.contains(src))) continue; assert getTile(src) != null; //add the src tile to the list of tiles used by this SSG tiles.add(getTile(src)); //make sure we have not previously tried to route through this tile //in a previous SSG if (usedTiles.contains(getTile(src))) { System.out.println(getTile(src)); return -1.0; } //don't worry about nodes that aren't assigned tiles if (!assigned.contains(src)) continue; //get all the dests for this node that are assigned tiles Iterator dsts = getDownStream(src).iterator(); while (dsts.hasNext()) { FlatNode dst = (FlatNode)dsts.next(); assert assigned.contains(dst); assert getTile(dst) != null; //add the dst tile to the list of tiles used by this SSG tiles.add(getTile(dst)); //make sure we have not previously (in another SSG) tried to route //thru the tile assigned to the dst if (usedTiles.contains(getTile(dst))) { //System.out.println(getTile(dst)); return -1.0; } RawTile[] route = (RawTile[])router.getRoute(ssg, getTile(src), getTile(dst)).toArray(new RawTile[0]); //find the cost of the route, penalize routes that go thru //tiles assigned to filters or joiners, reward routes that go thru //non-assigned tiles double numAssigned = 0.0; for (int i = 1; i < route.length - 1; i++) { //make sure that this route does not pass thru any tiles assigned to other SSGs //otherwise we have a illegal layout!!!! if (usedTiles.contains(route[i])) return -1.0; //add this tile to the set of tiles used by this SSG tiles.add(route[i]); if (getNode(route[i]) != null) //assigned tile numAssigned += 100.0; else { //router tile, only penalize it if we have routed through it before if (routers.contains(route[i])) numAssigned += 0.5; else //now it is a router tile routers.add(route[i]); } } int hops = route.length - 2; //the number of items sent over this channel for one execution of entire //SSG, from src to dest int items = 0; //now calculate the number of items sent per firing of SSG //if we are sending thru a splitter we have to be careful because not //all the data that the src produces goes to the dest if (src.edges[0].isSplitter()) { //if the dest is a filter, then just calculate the number of items //the dest filter receives if (dst.isFilter()) items = ssg.getMult(dst, false) * dst.getFilter().getPopInt(); else { //this is a joiner assert dst.isJoiner(); //the percentage of items that go to this dest double rate = 1.0; //we are sending to a joiner thru a splitter, this will only happen //for a feedback loop, the feedback path is always way 0 thru the joiner if (dst.inputs > 1) rate = ((double)dst.incomingWeights[0]) / ((double) dst.getTotalIncomingWeights()); //now calculate the rate at which the splitter sends to the joiner rate = rate * (((double)src.edges[0].weights[0]) / ((double)src.edges[0].getTotalOutgoingWeights())); //now calculate the number of items sent to this dest by this filter items = (int) rate * ssg.getMult(dst, false) * src.getFilter().getPopInt(); } } else { //sending without intermediate splitter //get the number of items sent int push = 0; if (src.isFilter()) push = src.getFilter().getPushInt(); else //joiner push = 1; items = ssg.getMult(src, false) * push; } //calculate communication cost of this node and add it to the cost sum cost += ((items * hops) + (items * Util.getTypeSize(Util.getOutputType(src)) * numAssigned * 10)); } } SpaceDynamicBackend.addAll(usedTiles, tiles); return cost; } | 47772 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47772/2040e9b31664fa13b46747a4d3c03dc2795d3b92/Layout.java/clean/streams/src/at/dms/kjc/spacedynamic/Layout.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1645,
23414,
8018,
12,
5788,
1228,
4137,
272,
1055,
16,
6847,
1399,
27669,
13,
377,
288,
202,
759,
5787,
12568,
1399,
635,
20676,
12867,
43,
364,
7502,
202,
759,
2211,
444,
353,
630... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1645,
23414,
8018,
12,
5788,
1228,
4137,
272,
1055,
16,
6847,
1399,
27669,
13,
377,
288,
202,
759,
5787,
12568,
1399,
635,
20676,
12867,
43,
364,
7502,
202,
759,
2211,
444,
353,
630... |
Logger.error(this, "Unclaimed: "+removed); | Logger.normal(this, "Unclaimed: "+removed); | public void checkFilters(Message m) { boolean matched = false; if (!(m.getSpec().equals(DMT.packetTransmit))) { if (m.getSpec().equals(DMT.ping) || m.getSpec().equals(DMT.pong)) { Logger.debug(this, "" + (System.currentTimeMillis() % 60000) + " " + _sock.getLocalPort() + " <- " + m.getSource() + " : " + m); } else { Logger.minor(this, "" + (System.currentTimeMillis() % 60000) + " " + _sock.getLocalPort() + " <- " + m.getSource() + " : " + m); } } synchronized (_filters) { for (ListIterator i = _filters.listIterator(); i.hasNext();) { MessageFilter f = (MessageFilter) i.next(); if (f.match(m)) { matched = true; f.setMessage(m); synchronized (f) { i.remove(); f.notify(); } Logger.minor(this, "Matched"); break; // Only one match permitted per message } } } // Feed unmatched messages to the dispatcher if (!matched && (_dispatcher != null)) { try { Logger.minor(this, "Feeding to dispatcher: "+m); matched = _dispatcher.handleMessage(m); } catch (Throwable t) { Logger.error(this, "Dispatcher threw "+t, t); } } // Keep the last few _unclaimed messages around in case the intended receiver isn't receiving yet if (!matched) { Logger.minor(this, "Unclaimed: "+m); /** Check filters and then add to _unmatched is ATOMIC * It has to be atomic, because otherwise we can get a * race condition that results in timeouts on MFs. * * Specifically: * - Thread A receives packet * - Thread A checks filters. It doesn't match any. * - Thread A feeds to Dispatcher. * - Thread B creates filter. * - Thread B checks _unmatched. * - Thread B adds filter. * - Thread B sleeps. * - Thread A returns from Dispatcher. Which didn't match. * - Thread A adds to _unmatched. * * OOPS! * The only way to fix this is to have checking the * filters and unmatched be a single atomic operation. * Another race is possible if we merely recheck the * filters after we return from dispatcher, for example. */ synchronized (_filters) { for (ListIterator i = _filters.listIterator(); i.hasNext();) { MessageFilter f = (MessageFilter) i.next(); if (f.match(m)) { matched = true; f.setMessage(m); synchronized (f) { i.remove(); f.notify(); } break; // Only one match permitted per message } } if(!matched) { while (_unclaimed.size() > 500) { Message removed = (Message)_unclaimed.removeFirst(); Logger.error(this, "Unclaimed: "+removed); } _unclaimed.addLast(m); } } } } | 45341 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45341/27f407d086a1dbf43da0232680fb0f61503732d4/UdpSocketManager.java/buggy/src/freenet/io/comm/UdpSocketManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
866,
5422,
12,
1079,
312,
13,
288,
202,
202,
6494,
4847,
273,
629,
31,
202,
202,
430,
16051,
12,
81,
18,
588,
1990,
7675,
14963,
12,
40,
6152,
18,
11482,
1429,
1938,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
866,
5422,
12,
1079,
312,
13,
288,
202,
202,
6494,
4847,
273,
629,
31,
202,
202,
430,
16051,
12,
81,
18,
588,
1990,
7675,
14963,
12,
40,
6152,
18,
11482,
1429,
1938,
20... |
public final void setSampleSize(int newSampleSize) { | public final void setSampleSize(int newSampleSize) throws VM_PragmaInterruptible { | public final void setSampleSize(int newSampleSize) { sampleSize = newSampleSize; if (sampleSize > samples.length) { samples = new int[newSampleSize]; nextIndex = 0; numSamples = 0; } } | 4011 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4011/d4f447f6c0b972fd2d59f65abdf645b8b71d0dae/VM_MethodListener.java/buggy/rvm/src/vm/adaptive/runtimeMeasurements/listeners/VM_MethodListener.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
727,
918,
444,
8504,
1225,
12,
474,
394,
8504,
1225,
13,
1216,
8251,
67,
2050,
9454,
14126,
1523,
288,
565,
3296,
1225,
273,
394,
8504,
1225,
31,
377,
309,
261,
6358,
1225,
405,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
727,
918,
444,
8504,
1225,
12,
474,
394,
8504,
1225,
13,
1216,
8251,
67,
2050,
9454,
14126,
1523,
288,
565,
3296,
1225,
273,
394,
8504,
1225,
31,
377,
309,
261,
6358,
1225,
405,
5... |
if (MylarPlugin.getContextManager().hasContext(getContextPath())) { | if (MylarPlugin.getContextManager().hasContext(handle)) { | public Image getStatusIcon() { if (isActive()) { return TaskListImages.getImage(TaskListImages.TASK_ACTIVE); } else { if (MylarPlugin.getContextManager().hasContext(getContextPath())) { return TaskListImages.getImage(TaskListImages.TASK_INACTIVE_CONTEXT); } else { return TaskListImages.getImage(TaskListImages.TASK_INACTIVE); } } } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/7d100b41d7eaa401e4972ad2611ee9b6f3c9ccdf/Task.java/buggy/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/internal/Task.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3421,
5870,
5554,
1435,
288,
202,
202,
430,
261,
291,
3896,
10756,
288,
1082,
202,
2463,
3837,
682,
8946,
18,
588,
2040,
12,
2174,
682,
8946,
18,
15580,
67,
13301,
1769,
202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3421,
5870,
5554,
1435,
288,
202,
202,
430,
261,
291,
3896,
10756,
288,
1082,
202,
2463,
3837,
682,
8946,
18,
588,
2040,
12,
2174,
682,
8946,
18,
15580,
67,
13301,
1769,
202,
... |
astFactory = ParserFactory.createASTFactory(mode, language); | astFactory = ParserFactory.createASTFactory( mode, language); | public Parser( IScanner scanner, ISourceElementRequestor callback, ParserMode mode, ParserLanguage language, IProblemReporter problemReporter, ITranslationResult unitResult) { this.scanner = scanner; this.problemReporter = problemReporter; this.unitResult = unitResult; requestor = callback; this.mode = mode; this.language = language; astFactory = ParserFactory.createASTFactory(mode, language); scanner.setASTFactory(astFactory); } | 54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/e95da4dadebf96c72bbb248f97571b58e92fb39c/Parser.java/buggy/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/Parser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
6783,
12,
3639,
467,
11338,
7683,
16,
3639,
467,
1830,
1046,
691,
280,
1348,
16,
3639,
6783,
2309,
1965,
16,
3639,
6783,
3779,
2653,
16,
3639,
467,
13719,
13289,
6199,
13289,
16,
36... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6783,
12,
3639,
467,
11338,
7683,
16,
3639,
467,
1830,
1046,
691,
280,
1348,
16,
3639,
6783,
2309,
1965,
16,
3639,
6783,
3779,
2653,
16,
3639,
467,
13719,
13289,
6199,
13289,
16,
36... |
if (providers != null) for (int i = 0; i < providers.length; ++i) { | if (providers != null) { for (int i = 0; i < providers.length; ++i) { | public AboutDialog(Shell parentShell) { super(parentShell); product = Platform.getProduct(); if (product != null) productName = product.getName(); if (productName == null) productName = WorkbenchMessages.AboutDialog_defaultProductName; // create a descriptive object for each BundleGroup IBundleGroupProvider[] providers = Platform.getBundleGroupProviders(); LinkedList groups = new LinkedList(); if (providers != null) for (int i = 0; i < providers.length; ++i) { IBundleGroup[] bundleGroups = providers[i].getBundleGroups(); for (int j = 0; j < bundleGroups.length; ++j) groups.add(new AboutBundleGroupData(bundleGroups[j])); } bundleGroupInfos = (AboutBundleGroupData[]) groups .toArray(new AboutBundleGroupData[0]); } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/fa4a8cff0e027f8d3c6b1fcb92b30f46767dd191/AboutDialog.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/AboutDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
9771,
659,
6353,
12,
13220,
982,
13220,
13,
288,
3639,
2240,
12,
2938,
13220,
1769,
3639,
3017,
273,
11810,
18,
588,
4133,
5621,
3639,
309,
261,
5896,
480,
446,
13,
5411,
3017,
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,
377,
1071,
9771,
659,
6353,
12,
13220,
982,
13220,
13,
288,
3639,
2240,
12,
2938,
13220,
1769,
3639,
3017,
273,
11810,
18,
588,
4133,
5621,
3639,
309,
261,
5896,
480,
446,
13,
5411,
3017,
461,... |
public void testFactoryCreateFromAny () { StructType type = null; org.omg.CORBA.Any any = null; type = new StructType (1, "Hello"); any = orb.create_any (); StructTypeHelper.insert (any, type); createDynAnyFromAny (any); } | 46355 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46355/8f8c68b638239e127bed454a75fc4a720a4cee82/DynAnyStructTest.java/buggy/test/regression/src/org/jacorb/test/orb/dynany/DynAnyStructTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
1071,
918,
1842,
1733,
1684,
1265,
2961,
1832,
282,
288,
1377,
7362,
559,
618,
273,
446,
31,
1377,
2358,
18,
362,
75,
18,
9428,
12536,
18,
2961,
1281,
273,
446,
31,
1377,
618,
273,
394,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
1071,
918,
1842,
1733,
1684,
1265,
2961,
1832,
282,
288,
1377,
7362,
559,
618,
273,
446,
31,
1377,
2358,
18,
362,
75,
18,
9428,
12536,
18,
2961,
1281,
273,
446,
31,
1377,
618,
273,
394,... | ||
m_joinPoints.put(methodHash, joinPoint); | threadLocal.set(joinPoint); m_joinPoints.put(methodHash, threadLocal); if (adviceIndexes.length == 0) { s_registry.setAdvised(m_classHash, methodHash); } else { s_registry.setHasAdvices(m_classHash, methodHash); } | public Object proceedWithExecutionJoinPoint(final int methodHash, final Object[] parameters, final Object targetInstance, final int joinPointType, final String methodSignature) throws Throwable { // get the state for the join point final long joinPointState = s_registry.getStateForJoinPoint(m_classHash, methodHash); if (joinPointState == JoinPointState.NOT_ADVISED) { registerJoinPoint( joinPointType, methodHash, methodSignature, m_targetClass, m_targetClassMetaData ); } JoinPoint joinPoint = null; if (ENABLE_JIT_COMPILATION) { joinPoint = handleJitCompilation(methodHash, joinPointState); } if (joinPoint == null) { // get the join point from the cache joinPoint = (JoinPoint)m_joinPoints.get(methodHash); // if null or redefined -> create a new join point and cache it if (joinPoint == null || joinPointState == JoinPointState.REDEFINED) { Map pointcutTypeToAdvicesMap = s_registry.getAdvicesForJoinPoint(m_classHash, methodHash); AdviceContainer[] adviceIndexes = null; switch (joinPointType) { case JoinPointType.METHOD_EXECUTION: adviceIndexes = (AdviceContainer[])pointcutTypeToAdvicesMap.get(PointcutType.EXECUTION); joinPoint = createMethodJoinPoint( methodHash, joinPointType, m_targetClass, adviceIndexes ); break; case JoinPointType.CONSTRUCTOR_EXECUTION: adviceIndexes = (AdviceContainer[])pointcutTypeToAdvicesMap.get(PointcutType.EXECUTION); joinPoint = createConstructorJoinPoint( methodHash, joinPointType, m_targetClass, adviceIndexes ); break; default: throw new RuntimeException("join point type not valid"); } // create the join point m_joinPoints.put(methodHash, joinPoint); } } // intialize the join point before each usage ((MethodJoinPoint)joinPoint).initialize(targetInstance, parameters); return joinPoint.proceed(); } | 7954 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7954/0b1ef1528b538062f303a20b78f1d9b9eedd2b56/JoinPointManager.java/buggy/aspectwerkz2/src/main/org/codehaus/aspectwerkz/joinpoint/management/JoinPointManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
11247,
1190,
3210,
4572,
2148,
12,
6385,
509,
707,
2310,
16,
4766,
7734,
727,
1033,
8526,
1472,
16,
4766,
7734,
727,
1033,
1018,
1442,
16,
4766,
7734,
727,
509,
1233,
2148,
55... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
11247,
1190,
3210,
4572,
2148,
12,
6385,
509,
707,
2310,
16,
4766,
7734,
727,
1033,
8526,
1472,
16,
4766,
7734,
727,
1033,
1018,
1442,
16,
4766,
7734,
727,
509,
1233,
2148,
55... |
byte[] bytes = new byte[mailSize]; for (int i = 0; i < mailSize; i++) bytes[i] = getRandomByte(); | byte[] bytes = new byte[mailSize]; for (int i = 0; i < mailSize; i++) bytes[i] = getRandomByte(); | protected void populateMessage(MimeMessage message, MailSender mailSender, MailProcessingRecord mailProcessingRecord) throws MessagingException { message.addHeader("Mime-Version", "1.0"); message.addHeader("Content-Type", "multipart/mixed"); Multipart multipart = new MimeMultipart("mixed"); if (mailSender.sendTextPart()) { int sizeMinText = mailSender.getSizeMinText(); int sizeMaxText = mailSender.getSizeMaxText(); MimeBodyPart part = new MimeBodyPart(); int mailSize = generateRandomPartSize(sizeMinText, sizeMaxText); mailProcessingRecord.setByteSendText(mailSize); StringBuffer textBody = new StringBuffer(mailSize); for (int i = 0; i < mailSize; i++) textBody.append(getRandomChar()); part.setText(textBody.toString());// part.setDataHandler(new DataHandler(textBody.toString(), "text/plain")); multipart.addBodyPart(part); } if (mailSender.sendBinaryPart()) { int sizeMinBinary = mailSender.getSizeMinBinary(); int sizeMaxBinary = mailSender.getSizeMaxBinary(); MimeBodyPart part = new MimeBodyPart(); int mailSize = generateRandomPartSize(sizeMinBinary, sizeMaxBinary); mailProcessingRecord.setByteSendBinary(mailSize); byte[] bytes = new byte[mailSize]; for (int i = 0; i < mailSize; i++) bytes[i] = getRandomByte(); part.setDataHandler(new DataHandler(new ByteArrayDataSource(bytes, "application/octet-stream"))); multipart.addBodyPart(part); } message.setContent(multipart); } | 51804 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51804/b0e52531b84ac4cce56e01a3978524990086983e/DefaultMailFactory.java/clean/src/main/java/org/apache/james/postage/mail/DefaultMailFactory.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
6490,
1079,
12,
13320,
1079,
883,
16,
11542,
12021,
4791,
12021,
16,
11542,
7798,
2115,
4791,
7798,
2115,
13,
1216,
23794,
503,
288,
3639,
883,
18,
1289,
1864,
2932,
13320,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6490,
1079,
12,
13320,
1079,
883,
16,
11542,
12021,
4791,
12021,
16,
11542,
7798,
2115,
4791,
7798,
2115,
13,
1216,
23794,
503,
288,
3639,
883,
18,
1289,
1864,
2932,
13320,
... |
row.set(DimensionCardinality.name, 0); | Hierarchy hier = dimension.getHierarchies()[0]; Level[] ls = hier.getLevels(); Level l = ls[ls.length-1]; int n = connection.getSchemaReader().getLevelMembers(l, false).length; row.set(DimensionCardinality.name, n+1); | public void populate(XmlaResponse response, List rows) throws XmlaException { DataSourcesConfig.DataSource ds = handler.getDataSource(request); DataSourcesConfig.Catalog[] catalogs = handler.getCatalogs(request, ds); String role = request.getRole(); for (int h = 0; h < catalogs.length; h++) { DataSourcesConfig.Catalog dsCatalog = catalogs[h]; if (dsCatalog == null || dsCatalog.definition == null) { continue; } Connection connection = handler.getConnection(dsCatalog, role); if (connection == null) { continue; } String catalogName = dsCatalog.name; final Cube[] cubes = connection.getSchema().getCubes(); for (int i = 0; i < cubes.length; i++) { Cube cube = cubes[i]; String cubeName = cube.getName(); final Dimension[] dimensions = cube.getDimensions(); for (int j = 0; j < dimensions.length; j++) { Dimension dimension = dimensions[j]; // Access control if (!canAccess(connection, dimension)) { continue; } String desc = dimension.getDescription(); if (desc == null) { desc = cubeName + " Cube - " + dimension.getName() + " Dimension"; } Row row = new Row(); row.set(CatalogName.name, catalogName); // NOTE: SQL Server does not return this //row.set(SchemaName.name, cube.getSchema().getName()); row.set(CubeName.name, cube.getName()); row.set(DimensionName.name, dimension.getName()); row.set(DimensionUniqueName.name, dimension.getUniqueName()); row.set(DimensionCaption.name, dimension.getCaption()); row.set(DimensionOrdinal.name, dimension.getOrdinal(cube)); row.set(DimensionType.name, getDimensionType(dimension)); //TODO: Is this the number of primaryKey members there are?? row.set(DimensionCardinality.name, 0); // TODO: I think that this is just the dimension name row.set(DefaultHierarchy.name, dimension.getUniqueName()); row.set(Description.name, desc); row.set(IsVirtual.name, false); // SQL Server always returns false row.set(IsReadWrite.name, false); // TODO: don't know what to do here // Are these the levels with uniqueMembers == true? // How are they mapped to specific column numbers? row.set(DimensionUniqueSettings.name, 0); row.set(DimensionIsVisible.name, true); addRow(row, rows); } } } } | 51263 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51263/cbb6bc6cd20e83916a47f0fabaa4e8d816bdc902/RowsetDefinition.java/buggy/src/main/mondrian/xmla/RowsetDefinition.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
6490,
12,
4432,
69,
1064,
766,
16,
987,
2595,
13,
1216,
5714,
69,
503,
288,
5411,
1910,
8628,
809,
18,
8597,
3780,
273,
1838,
18,
588,
8597,
12,
2293,
1769,
5411,
1910,
8628,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
6490,
12,
4432,
69,
1064,
766,
16,
987,
2595,
13,
1216,
5714,
69,
503,
288,
5411,
1910,
8628,
809,
18,
8597,
3780,
273,
1838,
18,
588,
8597,
12,
2293,
1769,
5411,
1910,
8628,... |
context.rules); | context); | public LineContext markTokens(LineContext prevContext, TokenHandler tokenHandler, Segment line, String noWordSep) { //{{{ Set up some instance variables // this is to avoid having to pass around lots and lots of // parameters. this.tokenHandler = tokenHandler; this.line = line; lastOffset = line.offset; lineLength = line.count + line.offset; context = new LineContext(); if(prevContext == null) context.rules = getMainRuleSet(); else { context.parent = prevContext.parent; context.inRule = prevContext.inRule; context.rules = prevContext.rules; } keywords = context.rules.getKeywords(); escaped = false; //}}} //{{{ Main parser loop ParserRule rule; int terminateChar = context.rules.getTerminateChar(); boolean terminated = false;main_loop: for(pos = line.offset; pos < lineLength; pos++) { //{{{ check if we have to stop parsing if(terminateChar >= 0 && pos >= terminateChar && !terminated) { terminated = true; context = new LineContext(ParserRuleSet .getStandardRuleSet(context.rules .getDefault()),context); keywords = context.rules.getKeywords(); } //}}} //{{{ check for end of delegate if(context.parent != null) { rule = context.parent.inRule; if(rule != null && rule.end != null) { if(checkDelegateEnd()) continue main_loop; } } //}}} totalRuleScans++; //{{{ check every rule char ch = line.array[pos]; rule = context.rules.getRules(ch); while(rule != null) { totalRuleChecks++; // stop checking rules if there was a match if (handleRule(rule,false)) { matchedRule++; continue main_loop; } rule = rule.next; } //}}} //{{{ check if current character is a word separator if(keywords != null) { String noWordSep2 = keywords.getNonAlphaNumericChars(); if(!Character.isLetterOrDigit(ch) && noWordSep.indexOf(ch) == -1 && noWordSep2.indexOf(ch) == -1) { markKeyword(true); tokenHandler.handleToken(1, context.rules.getDefault(), context.rules); lastOffset = pos + 1; matchedWordSep++; } } //}}} escaped = false; } //}}} //{{{ Mark all remaining characters pos = lineLength; handleSoftSpan(); markKeyword(true); if(context.parent != null) { rule = context.parent.inRule; if((rule != null && (context.parent.inRule.action & NO_LINE_BREAK) == NO_LINE_BREAK) || terminated) { context = context.parent; keywords = context.rules.getKeywords(); context.inRule = null; } } //}}} tokenHandler.handleToken(0,Token.END,context.rules); return context.intern(); } //}}} | 8690 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8690/cf9b17d1d79ed5cb1c359e7679b7ae2f7ba1728c/TokenMarker.java/clean/org/gjt/sp/jedit/syntax/TokenMarker.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
5377,
1042,
2267,
5157,
12,
1670,
1042,
2807,
1042,
16,
202,
202,
1345,
1503,
1147,
1503,
16,
10807,
980,
16,
202,
202,
780,
1158,
3944,
5097,
13,
202,
95,
202,
202,
759,
1218... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5377,
1042,
2267,
5157,
12,
1670,
1042,
2807,
1042,
16,
202,
202,
1345,
1503,
1147,
1503,
16,
10807,
980,
16,
202,
202,
780,
1158,
3944,
5097,
13,
202,
95,
202,
202,
759,
1218... |
private void insertAttemptingPush(String host, int index) { | private synchronized void insertAttemptingPush(String host, int index) { | private void insertAttemptingPush(String host, int index) { _attemptingPushes.add(new PushedFile(host, index)); } | 5134 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5134/27f4e15031f2c979d32de5a2443ecdb755548156/PushManager.java/buggy/components/gnutella-core/src/main/java/com/limegroup/gnutella/PushManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
2243,
23089,
7621,
12,
780,
1479,
16,
509,
770,
13,
288,
202,
202,
67,
11764,
310,
7621,
281,
18,
1289,
12,
2704,
8547,
329,
812,
12,
2564,
16,
770,
10019,
202,
97,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
2243,
23089,
7621,
12,
780,
1479,
16,
509,
770,
13,
288,
202,
202,
67,
11764,
310,
7621,
281,
18,
1289,
12,
2704,
8547,
329,
812,
12,
2564,
16,
770,
10019,
202,
97,
2,... |
selectPath(tree, current.getParentPath()); | { if (current == null) return; if (tree.isExpanded(current)) { tree.collapsePath(current); } else { TreePath parent = current.getParentPath(); if (parent != null && !(parent.getPathCount()==1 && !tree.isRootVisible()) ) tree.setSelectionPath(parent); } } | public void actionPerformed(ActionEvent e) { TreePath current = tree.getLeadSelectionPath(); if (current == null) return; if (e.getActionCommand().equals("selectParent")) selectPath(tree, current.getParentPath()); else if (e.getActionCommand().equals("selectChild")) { Object node = current.getLastPathComponent(); int nc = treeModel.getChildCount(node); if (nc > 0) node = treeModel.getChild(node, 0); TreePath path = current.pathByAddingChild(node); selectPath(tree, path); } } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/8e6a933c7311b8af73a149d26777089b7dc8bd68/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
26100,
12,
1803,
1133,
425,
13,
565,
288,
1377,
4902,
743,
783,
273,
2151,
18,
588,
9678,
6233,
743,
5621,
1377,
309,
261,
2972,
422,
446,
13,
3639,
327,
31,
1377,
309,
261,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
26100,
12,
1803,
1133,
425,
13,
565,
288,
1377,
4902,
743,
783,
273,
2151,
18,
588,
9678,
6233,
743,
5621,
1377,
309,
261,
2972,
422,
446,
13,
3639,
327,
31,
1377,
309,
261,
... |
throw new ArgumentError(runtime, "wrong number of arguments (" + args.length + " for " + min + ")"); | throw getRuntime().newArgumentError("wrong number of arguments (" + args.length + " for " + min + ")"); | public int checkArgumentCount(IRubyObject[] args, int min, int max) { int length = args.length; if (length < min) { throw new ArgumentError(runtime, "wrong number of arguments (" + args.length + " for " + min + ")"); } if (max > -1 && length > max) { throw new ArgumentError(runtime, "wrong number of arguments (" + args.length + " for " + max + ")"); } return length; } | 46454 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46454/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubyObject.java/clean/src/org/jruby/RubyObject.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
10788,
1380,
12,
7937,
10340,
921,
8526,
833,
16,
509,
1131,
16,
509,
943,
13,
288,
3639,
509,
769,
273,
833,
18,
2469,
31,
3639,
309,
261,
2469,
411,
1131,
13,
288,
5411,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
10788,
1380,
12,
7937,
10340,
921,
8526,
833,
16,
509,
1131,
16,
509,
943,
13,
288,
3639,
509,
769,
273,
833,
18,
2469,
31,
3639,
309,
261,
2469,
411,
1131,
13,
288,
5411,
... |
if (targetFeatures[i].isOptional() || plugins[j].isFragment()) optional.add(plugins[j].getId()); else required.put(plugins[j].getId(), plugins[j]); | if (isValidFeatureObj(plugins[j], envInfo)) { if (targetFeatures[i].isOptional() || plugins[j].isFragment()) optional.add(plugins[j].getId()); else required.put(plugins[j].getId(), plugins[j]); } | protected void loadTargetProfile(ITarget target) { if (target.useAllPlugins()) { handleSelectAll(true); return; } Map required = new HashMap(); Set optional = new HashSet(); ArrayList missingFeatures = new ArrayList(); ITargetFeature[] targetFeatures = target.getFeatures(); Stack features = new Stack(); FeatureModelManager featureManager = null; if (fCurrentFeatures == null) featureManager = PDECore.getDefault().getFeatureModelManager(); for (int i = 0 ; i < targetFeatures.length; i++) { IFeatureModel model = (featureManager != null) ? featureManager.findFeatureModel(targetFeatures[i].getId()) : (IFeatureModel)fCurrentFeatures.get(targetFeatures[i].getId()); if (model != null) features.push(model.getFeature()); else if (!targetFeatures[i].isOptional()) { missingFeatures.add(targetFeatures[i]); break; } while (!features.isEmpty()) { IFeature feature = (IFeature) features.pop(); IFeaturePlugin [] plugins = feature.getPlugins(); for (int j = 0; j < plugins.length; j++) { if (targetFeatures[i].isOptional() || plugins[j].isFragment()) optional.add(plugins[j].getId()); else required.put(plugins[j].getId(), plugins[j]); } IFeatureChild[] children = feature.getIncludedFeatures(); for (int j = 0; j < children.length; j++) { model = (featureManager != null) ? featureManager.findFeatureModel(children[j].getId()) : (IFeatureModel)fCurrentFeatures.get(children[j].getId()); if (model != null) features.push(model.getFeature()); } } } ITargetPlugin[] plugins = target.getPlugins(); for (int i = 0 ; i < plugins.length; i++) { if (plugins[i].isOptional()) optional.add(plugins[i].getId()); else required.put(plugins[i].getId(), plugins[i]); } IPluginModelBase workspacePlugins[] = PDECore.getDefault().getModelManager().getWorkspaceModels(); for (int i = 0; i < workspacePlugins.length; i++) { if (workspacePlugins[i].isEnabled()) required.remove(workspacePlugins[i].getBundleDescription().getSymbolicName()); } IPluginModelBase[] models = getCurrentModels(); int counter = 0; for (int i = 0; i < models.length; i++) { String id = models[i].getPluginBase().getId(); if (id == null) continue; if (required.containsKey(id) || optional.contains(id)) { ++counter; if (!fPluginListViewer.getChecked(models[i])) { fPluginTreeViewer.setChecked(models[i], true); fPluginListViewer.setChecked(models[i], true); if (!models[i].isEnabled()) fChangedModels.add(models[i]); // handle checking the parent String path = models[i].getInstallLocation(); if (path != null) { File parent = new File(path).getParentFile(); fPluginTreeViewer.setChecked(parent, true); handleGrayChecked(parent, false); } } required.remove(id); } else { if (fPluginListViewer.getChecked(models[i])) { fPluginTreeViewer.setChecked(models[i], false); fPluginListViewer.setChecked(models[i], false); if (models[i].isEnabled()) fChangedModels.add(models[i]); // handle updating parent String path = models[i].getInstallLocation(); if (path != null) { File parent = new File(path).getParentFile(); handleGrayChecked(parent, true); } } } } setCounter(counter); if (!required.isEmpty() || !missingFeatures.isEmpty()) TargetErrorDialog.showDialog(fPage.getShell(), missingFeatures.toArray(), required.values().toArray()); } | 14404 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/14404/dc0a0f4f159c39adc9969f072482d018e8ee6128/TargetPluginsTab.java/buggy/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/preferences/TargetPluginsTab.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
1262,
2326,
4029,
12,
1285,
826,
1018,
13,
288,
202,
202,
430,
261,
3299,
18,
1202,
1595,
9461,
10756,
288,
1082,
202,
4110,
3391,
1595,
12,
3767,
1769,
1082,
202,
2463,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1262,
2326,
4029,
12,
1285,
826,
1018,
13,
288,
202,
202,
430,
261,
3299,
18,
1202,
1595,
9461,
10756,
288,
1082,
202,
4110,
3391,
1595,
12,
3767,
1769,
1082,
202,
2463,
... |
TreeSet set = new TreeSet( nodeComparator ); | Set<ExprNode> set = new TreeSet<ExprNode>( nodeComparator ); | public void visit( ExprNode node ) { if ( !( node instanceof BranchNode ) ) { return; } BranchNode branch = ( BranchNode ) node; if ( branch.getOperator() == AssertionEnum.NOT ) { return; } Comparator nodeComparator = new NodeComparator(); TreeSet set = new TreeSet( nodeComparator ); List<ExprNode> children = branch.getChildren(); for ( int ii = 0; ii < children.size(); ii++ ) { ExprNode child = ( ExprNode ) children.get( ii ); if ( !child.isLeaf() ) { visit( child ); } set.add( child ); } children.clear(); children.addAll( set ); } | 54578 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54578/5f20146f954d36b86956a3feb0f6bf589dbf6918/BranchNormalizedVisitor.java/buggy/ldap/src/main/java/org/apache/directory/shared/ldap/filter/BranchNormalizedVisitor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
3757,
12,
8074,
907,
756,
262,
565,
288,
3639,
309,
261,
401,
12,
756,
1276,
15449,
907,
262,
262,
3639,
288,
5411,
327,
31,
3639,
289,
3639,
15449,
907,
3803,
273,
261,
1544... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
3757,
12,
8074,
907,
756,
262,
565,
288,
3639,
309,
261,
401,
12,
756,
1276,
15449,
907,
262,
262,
3639,
288,
5411,
327,
31,
3639,
289,
3639,
15449,
907,
3803,
273,
261,
1544... |
public void setValue(String name, String value); | public void setValue(String name, double value); | public void setValue(String name, String value); | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/9348cf8b215781ed0ab6af1285c7f7282d9ebbb3/IPreferenceStore.java/buggy/bundles/org.eclipse.jface/src/org/eclipse/jface/preference/IPreferenceStore.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
918,
5524,
12,
780,
508,
16,
514,
460,
1769,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
918,
5524,
12,
780,
508,
16,
514,
460,
1769,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
String contentType = (String) message.getProperty("Content-Type"); | HttpResponse httpResponse = null; if(message.getAdapter() instanceof WriterMessageAdapter) { WriterMessageAdapter adapter = (WriterMessageAdapter)message.getAdapter(); httpResponse = new HttpResponse(); httpResponse.setBodyString(adapter.getPayloadAsString()); } else { httpResponse = (HttpResponse)message.getPayload(); } String contentType = httpResponse.getFirstHeader("Content-Type").getValue(); | protected void writeResponse(HttpServletResponse response, UMOMessage message) throws Exception { if (message == null) { response.setStatus(HttpServletResponse.SC_NO_CONTENT); if (feedback) { response.setStatus(HttpServletResponse.SC_OK); response.getWriter().write("Action was processed successfully. There was no result"); } } else { String contentType = (String) message.getProperty("Content-Type"); if (contentType == null) contentType = defaultContentType; if (!contentType.startsWith("text")) { response.setContentType(contentType); response.getOutputStream().write(message.getPayloadAsBytes()); } else { response.setContentType(contentType); response.getWriter().write(message.getPayloadAsString()); } response.setStatus(HttpServletResponse.SC_OK); } } | 28323 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/28323/b656e0806058d87c5db05880209b51a8d57416d0/AbstractReceiverServlet.java/buggy/providers/http/src/java/org/mule/providers/http/servlet/AbstractReceiverServlet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
1045,
1064,
12,
2940,
29910,
766,
16,
587,
5980,
1079,
883,
13,
1216,
1185,
565,
288,
3639,
309,
261,
2150,
422,
446,
13,
288,
5411,
766,
18,
542,
1482,
12,
2940,
29910,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
1045,
1064,
12,
2940,
29910,
766,
16,
587,
5980,
1079,
883,
13,
1216,
1185,
565,
288,
3639,
309,
261,
2150,
422,
446,
13,
288,
5411,
766,
18,
542,
1482,
12,
2940,
29910,
18,
... |
Method[] m = FunctionObject.findMethods(NativeWith.class, "With"); | Method[] m = FunctionObject.findMethods(NativeWith.class, "jsConstructor"); | public static void init(Scriptable scope) { NativeWith w = new NativeWith(); w.setPrototype(ScriptableObject.getObjectPrototype(scope)); Method[] m = FunctionObject.findMethods(NativeWith.class, "With"); FunctionObject f = new FunctionObject("With", m[0], scope); f.addAsConstructor(scope, w); } | 19042 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/19042/d83c7dc5cf112a5ef927e29997c704a42423d705/NativeWith.java/clean/src/org/mozilla/javascript/NativeWith.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
1208,
12,
3651,
429,
2146,
13,
288,
3639,
16717,
1190,
341,
273,
394,
16717,
1190,
5621,
3639,
341,
18,
542,
15846,
12,
3651,
429,
921,
18,
588,
921,
15846,
12,
4887,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
1208,
12,
3651,
429,
2146,
13,
288,
3639,
16717,
1190,
341,
273,
394,
16717,
1190,
5621,
3639,
341,
18,
542,
15846,
12,
3651,
429,
921,
18,
588,
921,
15846,
12,
4887,
10... |
.setType(CheckStatus.errorType) | .setCause(this).setType(CheckStatus.errorType) | public CheckCLDR handleCheck(String path, String fullPath, String value, Map options, List result) { if (path.indexOf("/dates") < 0 || path.indexOf("gregorian") < 0) return this; try { if (path.indexOf("[@type=\"narrow\"]") >= 0) { int end = getFirstGraphemeClusterBoundary(value); if (end != value.length()) { result.add(new CheckStatus() .setType(CheckStatus.errorType) .setMessage( "Illegal narrow value. Must be only one grapheme cluster {0}~{1}", new Object[]{value.substring(0,end), value.substring(end)})); } } if (path.indexOf("/pattern") >= 0 && path.indexOf("/dateTimeFormat") < 0) { checkPattern(path, fullPath, value, result); } } catch (Exception e) { CheckStatus item = new CheckStatus().setType(CheckStatus.errorType) .setMessage("Error in creating date format", new Object[]{e}); result.add(item); } return this; } | 27800 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/27800/27dd737aaa4119a515e7e17bde9e63081008c55d/CheckDates.java/buggy/tools/java/org/unicode/cldr/test/CheckDates.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2073,
5017,
6331,
1640,
1564,
12,
780,
589,
16,
514,
11225,
16,
514,
460,
16,
1635,
702,
16,
987,
563,
13,
288,
202,
202,
430,
261,
803,
18,
31806,
2932,
19,
9683,
7923,
411... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2073,
5017,
6331,
1640,
1564,
12,
780,
589,
16,
514,
11225,
16,
514,
460,
16,
1635,
702,
16,
987,
563,
13,
288,
202,
202,
430,
261,
803,
18,
31806,
2932,
19,
9683,
7923,
411... |
if (id == null) | if (id == null) { | private final void readObjectContributions( final IConfigurationElement[] configurationElements, final int configurationElementCount) { final List warningsToLog = new ArrayList(1); for (int i = 0; i < configurationElementCount; i++) { final IConfigurationElement element = configurationElements[i]; // Read the object contribution identifier. final String id = readRequired(element, ATT_ID, warningsToLog, "Object contributions need an id"); //$NON-NLS-1$ if (id == null) continue; // Read the object class. This influences the visibility. final String objectClass = readRequired(element, ATT_OBJECTCLASS, warningsToLog, "Object contributions need an object class", id); //$NON-NLS-1$ if (objectClass == null) continue; // TODO Read the name filter. This influences the visibility. // final String nameFilter = readOptional(element, // ATT_NAME_FILTER); // TODO Read the object class. This influences the visibility. // final boolean adaptable = readBoolean(element, // ATT_ADAPTABLE, // false); // TODO Read the filter elements. // TODO Read the enablement elements. // TODO Figure out an appropriate visibility expression. // Read the visibility element, if any. final Expression visibleWhenExpression = readVisibility(element, id, warningsToLog); // Read all of the child elements from the registry. readActionsAndMenus(element, id, warningsToLog, visibleWhenExpression, null); } logWarnings( warningsToLog, "Warnings while parsing the object contributions from the 'org.eclipse.ui.popupMenus' extension point"); //$NON-NLS-1$ } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/fa4a8cff0e027f8d3c6b1fcb92b30f46767dd191/LegacyActionHandlerPersistence.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/LegacyActionHandlerPersistence.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
727,
918,
17362,
442,
15326,
12,
1082,
202,
6385,
467,
1750,
1046,
8526,
1664,
3471,
16,
1082,
202,
6385,
509,
1664,
1046,
1380,
13,
288,
202,
202,
6385,
987,
5599,
774,
1343,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
727,
918,
17362,
442,
15326,
12,
1082,
202,
6385,
467,
1750,
1046,
8526,
1664,
3471,
16,
1082,
202,
6385,
509,
1664,
1046,
1380,
13,
288,
202,
202,
6385,
987,
5599,
774,
1343,
... |
dataEngine.defineDataSource( adaptor.createDataSourceDesign( dataSource)); | dataEngine.defineDataSource( adaptor .createDataSourceDesign( dataSource ) ); | public void prepare( Report report, Map appContext ) { ReportDesignHandle rptHandle = report.getReportDesign( ); ModelDteApiAdapter adaptor = new ModelDteApiAdapter( context.getReportContext(), context.getSharedScope() ); // Handling data sources List dataSourceList = rptHandle.getAllDataSources( ); for ( int i = 0; i < dataSourceList.size( ); i++ ) { DataSourceHandle dataSource = ( DataSourceHandle ) dataSourceList .get( i ); try { dataEngine.defineDataSource( adaptor.createDataSourceDesign( dataSource)); } catch ( BirtException be ) { logger.log( Level.SEVERE, be.getMessage( ), be ); context.addException( dataSource, be ); } } // Handling data sets List dataSetList = rptHandle.getAllDataSets( ); for ( int i = 0; i < dataSetList.size( ); i++ ) { DataSetHandle dataset = ( DataSetHandle ) dataSetList.get( i ); try { dataEngine.defineDataSet( adaptor.createDataSetDesign( dataset)); } catch ( BirtException be ) { logger.log( Level.SEVERE, be.getMessage( ), be ); context.addException( dataset, be ); } } // build report queries new ReportQueryBuilder( ).build( report, context ); doPrepareQueryID( report, appContext ); } | 5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/c0422a1db84842d1e332663c3d4c7e2a8109aca8/AbstractDataEngine.java/clean/engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/data/dte/AbstractDataEngine.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
2911,
12,
8706,
2605,
16,
1635,
595,
1042,
262,
202,
95,
202,
202,
4820,
15478,
3259,
31656,
3259,
273,
2605,
18,
588,
4820,
15478,
12,
11272,
9506,
202,
1488,
40,
736,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
2911,
12,
8706,
2605,
16,
1635,
595,
1042,
262,
202,
95,
202,
202,
4820,
15478,
3259,
31656,
3259,
273,
2605,
18,
588,
4820,
15478,
12,
11272,
9506,
202,
1488,
40,
736,
3... |
return new Double(o0.doubleValue() * o1.doubleValue()); | return new Double(o0.doubleValue() + o1.doubleValue()); | public Object evaluate(Evaluator evaluator, Exp[] args) { Double o0 = getDoubleArg(evaluator, args, 0), o1 = getDoubleArg(evaluator, args, 1); return new Double(o0.doubleValue() * o1.doubleValue()); } | 51263 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51263/be5cbf35035318846261fc9706b0dadd4c54e1a5/BuiltinFunTable.java/buggy/src/main/mondrian/olap/fun/BuiltinFunTable.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
482,
1033,
5956,
12,
15876,
18256,
16,
7784,
8526,
833,
13,
288,
9506,
202,
5265,
320,
20,
273,
16097,
4117,
12,
14168,
639,
16,
833,
16,
374,
3631,
25083,
202,
83,
21,
273,
16097... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
482,
1033,
5956,
12,
15876,
18256,
16,
7784,
8526,
833,
13,
288,
9506,
202,
5265,
320,
20,
273,
16097,
4117,
12,
14168,
639,
16,
833,
16,
374,
3631,
25083,
202,
83,
21,
273,
16097... |
end = i - 1; break; | if(buffer._isLineVisible(i,index) && buffer.getFoldLevel(i) <= initialFoldLevel) { end = i - 1; break; } | public void expandFold(int line, boolean fully) { int initialFoldLevel = buffer.getFoldLevel(line); int lineCount = buffer.getLineCount(); int start = 0; int end = lineCount - 1; //{{{ Find fold start and fold end... if(line != lineCount - 1 && buffer._isLineVisible(line,index) && !buffer._isLineVisible(line + 1,index) && buffer.getFoldLevel(line + 1) > initialFoldLevel) { // this line is the start of a fold start = line + 1; for(int i = line + 1; i < lineCount; i++) { if(buffer._isLineVisible(i,index) && buffer.getFoldLevel(i) <= initialFoldLevel) { end = i - 1; break; } } } else { boolean ok = false; // scan backwards looking for the start for(int i = line - 1; i >= 0; i--) { if(buffer._isLineVisible(i,index) && buffer.getFoldLevel(i) < initialFoldLevel) { start = i + 1; ok = true; break; } } if(!ok) { // no folds in buffer return; } for(int i = line + 1; i < lineCount; i++) { if(buffer._isLineVisible(i,index) && buffer.getFoldLevel(i) < initialFoldLevel) { end = i - 1; break; } } } //}}} //{{{ Expand the fold... int delta = 0; // we need a different value of initialFoldLevel here! initialFoldLevel = buffer.getFoldLevel(start); for(int i = start; i <= end; i++) { if(buffer._isLineVisible(i,index)) { // do nothing } else if(!fully && buffer.getFoldLevel(i) > initialFoldLevel) { // don't expand lines with higher fold // levels } else { delta++; buffer._setLineVisible(i,index,true); } } virtualLineCount += delta; //}}} if(!fully && !buffer._isLineVisible(line,index)) { // this is a hack, and really needs to be done better. expandFold(line,false); return; } foldStructureChanged(); int virtualLine = physicalToVirtual(start); int firstLine = textArea.getFirstLine(); int visibleLines = textArea.getVisibleLines(); if(virtualLine + delta >= firstLine + visibleLines && delta < visibleLines - 1) { textArea.setFirstLine(virtualLine + delta - visibleLines + 1); } } //}}} | 8690 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8690/ba1ec3297d11f3a466feef112603ac39ffe7a66f/FoldVisibilityManager.java/buggy/org/gjt/sp/jedit/textarea/FoldVisibilityManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
4542,
15592,
12,
474,
980,
16,
1250,
7418,
13,
202,
95,
202,
202,
474,
2172,
15592,
2355,
273,
1613,
18,
588,
15592,
2355,
12,
1369,
1769,
202,
202,
474,
980,
1380,
273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
4542,
15592,
12,
474,
980,
16,
1250,
7418,
13,
202,
95,
202,
202,
474,
2172,
15592,
2355,
273,
1613,
18,
588,
15592,
2355,
12,
1369,
1769,
202,
202,
474,
980,
1380,
273,
... |
protected final VM_Address matureCopy(boolean isScalar, int bytes) | protected final VM_Address matureCopy(int bytes, int align, int offset) | protected final VM_Address matureCopy(boolean isScalar, int bytes) throws VM_PragmaInline { return mature.alloc(isScalar, bytes, matureSpace.inMSCollection()); } | 49871 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49871/e5a4d3dd8a79077cd7f4dad18813204330cc76dc/Plan.java/buggy/rvm/src/vm/memoryManagers/JMTk/plan/genMS/Plan.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
727,
8251,
67,
1887,
312,
1231,
2951,
12,
474,
1731,
16,
509,
5689,
16,
509,
1384,
13,
377,
1216,
8251,
67,
2050,
9454,
10870,
288,
565,
327,
312,
1231,
18,
9853,
12,
291,
13639,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
727,
8251,
67,
1887,
312,
1231,
2951,
12,
474,
1731,
16,
509,
5689,
16,
509,
1384,
13,
377,
1216,
8251,
67,
2050,
9454,
10870,
288,
565,
327,
312,
1231,
18,
9853,
12,
291,
13639,
... |
private int sqlInsertIntoMeta(DocumentDomainObject document) { | private int sqlInsertIntoMeta( DocumentDomainObject document ) { | private int sqlInsertIntoMeta(DocumentDomainObject document) { String[] metaColumnNames = { "doc_type", "meta_headline", "meta_text", "meta_image", "owner_id", "permissions", "shared", "show_meta", "lang_prefix", "date_created", "date_modified", "disable_search", "target", "activate", "archived_datetime", "publisher_id", "status", "publication_start_datetime", "publication_end_datetime" }; String sqlPlaceHolders = "?" + StringUtils.repeat(",?", metaColumnNames.length - 1); String sqlStr = "INSERT INTO meta (" + StringUtils.join(metaColumnNames, ",") + ") VALUES (" + sqlPlaceHolders + ") SELECT @@IDENTITY"; List sqlColumnValues = new ArrayList(); sqlColumnValues.add(document.getDocumentTypeId() + ""); sqlColumnValues.add(document.getHeadline()); sqlColumnValues.add(document.getMenuText()); sqlColumnValues.add(document.getMenuImage()); sqlColumnValues.add(document.getCreator().getId() + ""); sqlColumnValues.add(makeSqlStringFromBoolean(document.isPermissionSetOneIsMorePrivilegedThanPermissionSetTwo())); sqlColumnValues.add(makeSqlStringFromBoolean(document.isLinkableByOtherUsers())); sqlColumnValues.add(makeSqlStringFromBoolean(document.isVisibleInMenusForUnauthorizedUsers())); sqlColumnValues.add(document.getLanguageIso639_2()); sqlColumnValues.add(makeSqlStringFromDate(document.getCreatedDatetime())); sqlColumnValues.add(makeSqlStringFromDate(document.getModifiedDatetime())); sqlColumnValues.add(makeSqlStringFromBoolean(document.isSearchDisabled())); sqlColumnValues.add(document.getTarget()); sqlColumnValues.add("1"); sqlColumnValues.add(makeSqlStringFromDate(document.getArchivedDatetime())); sqlColumnValues.add(null != document.getPublisher() ? document.getPublisher().getId() + "" : null); sqlColumnValues.add("" + document.getStatus()); sqlColumnValues.add(makeSqlStringFromDate(document.getPublicationStartDatetime())); sqlColumnValues.add(makeSqlStringFromDate(document.getPublicationEndDatetime())); String metaIdStr = service.sqlQueryStr(sqlStr, (String[]) sqlColumnValues.toArray(new String[sqlColumnValues.size()])); final int metaId = Integer.parseInt(metaIdStr); return metaId; } | 8781 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8781/f203f6fc91c9ae8d2fcd69e28ea9f0981a4ee690/DocumentMapper.java/buggy/server/src/imcode/server/document/DocumentMapper.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
509,
1847,
4600,
5952,
2781,
12,
4319,
3748,
921,
1668,
262,
288,
3639,
514,
8526,
2191,
20718,
273,
288,
5411,
315,
2434,
67,
723,
3113,
315,
3901,
67,
1978,
1369,
3113,
315,
3901,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1847,
4600,
5952,
2781,
12,
4319,
3748,
921,
1668,
262,
288,
3639,
514,
8526,
2191,
20718,
273,
288,
5411,
315,
2434,
67,
723,
3113,
315,
3901,
67,
1978,
1369,
3113,
315,
3901,... |
buffer.append("----- End of stacktrace -----\n"); | while (buffer.charAt(buffer.length() - 1) == '\n') { buffer.deleteCharAt(buffer.length() - 1); } buffer.append("\n----- End of stacktrace -----\n"); | private void copyDetailsToClipBoard() { StringBuffer buffer = new StringBuffer(mErrorMessageTA.getText()); buffer.append("\n\n----- Start of stacktrace -----\n"); Throwable thr = mThrowable; while (thr != null) { if (thr != mThrowable) { buffer.append("\n\nCaused by:\n"); } buffer.append(getStackTrace(thr)); thr = thr.getCause(); } buffer.append("----- End of stacktrace -----\n"); StringSelection content = new StringSelection(buffer.toString()); Toolkit.getDefaultToolkit().getSystemClipboard().setContents(content, null); } | 9266 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9266/48b99a8e774afc120513cb8884fa3e075f3e734d/ErrorHandler.java/buggy/tvbrowser/src/util/exc/ErrorHandler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1610,
3790,
774,
15339,
22233,
1435,
288,
1377,
6674,
1613,
273,
394,
6674,
12,
81,
14935,
9833,
18,
588,
1528,
10663,
5411,
1613,
18,
6923,
31458,
82,
64,
82,
13465,
3603,
434... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1610,
3790,
774,
15339,
22233,
1435,
288,
1377,
6674,
1613,
273,
394,
6674,
12,
81,
14935,
9833,
18,
588,
1528,
10663,
5411,
1613,
18,
6923,
31458,
82,
64,
82,
13465,
3603,
434... |
public BigInteger and(BigInteger y) | private static BigInteger and(BigInteger x, int y) | public BigInteger and(BigInteger y) { if (y.words == null) return and(this, y.ival); else if (words == null) return and(y, ival); BigInteger x = this; if (ival < y.ival) { BigInteger temp = this; x = y; y = temp; } int i; int len = y.isNegative() ? x.ival : y.ival; int[] words = new int[len]; for (i = 0; i < y.ival; i++) words[i] = x.words[i] & y.words[i]; for ( ; i < len; i++) words[i] = x.words[i]; return BigInteger.make(words, len); } | 1023 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1023/4e141f35458b612b492f1f4dd6fb28d4924e7828/BigInteger.java/clean/libjava/java/math/BigInteger.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
760,
10246,
471,
12,
24198,
619,
16,
509,
677,
13,
225,
288,
565,
309,
261,
93,
18,
3753,
422,
446,
13,
1377,
327,
471,
12,
2211,
16,
677,
18,
5162,
1769,
565,
469,
309,
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,
282,
3238,
760,
10246,
471,
12,
24198,
619,
16,
509,
677,
13,
225,
288,
565,
309,
261,
93,
18,
3753,
422,
446,
13,
1377,
327,
471,
12,
2211,
16,
677,
18,
5162,
1769,
565,
469,
309,
261,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.