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 |
|---|---|---|---|---|---|---|
return quickFixes; | List<QuickFixAction> children = new ArrayList<QuickFixAction>(); for (QuickFixAction fix : quickFixes) { if (fix != null){ children.add(fix); } } return children.toArray(new AnAction[children.size()]); | public AnAction[] getChildren(AnActionEvent e) { return quickFixes; } | 56598 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56598/7d18937b6c277d5ef28a5ed5045f90e8b80e937a/InspectionResultsView.java/clean/source/com/intellij/codeInspection/ui/InspectionResultsView.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
1922,
1803,
8526,
10268,
12,
979,
1803,
1133,
425,
13,
288,
1850,
987,
32,
13663,
8585,
1803,
34,
2325,
273,
394,
2407,
32,
13663,
8585,
1803,
34,
5621,
364,
261,
13663,
8585,
1803,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1922,
1803,
8526,
10268,
12,
979,
1803,
1133,
425,
13,
288,
1850,
987,
32,
13663,
8585,
1803,
34,
2325,
273,
394,
2407,
32,
13663,
8585,
1803,
34,
5621,
364,
261,
13663,
8585,
1803,... |
ChemObjectReader reader = new ReaderFactory().createReader(new FileReader(input)); | InputStream ins = this.getClass().getClassLoader().getResourceAsStream(filename); ChemObjectReader reader = new ReaderFactory().createReader(ins); | public void testAlign() throws ClassNotFoundException, CDKException, java.lang.Exception{ AtomContainer ac; String filename = "data/gravindex.hin"; File input = new File(filename); ChemObjectReader reader = new ReaderFactory().createReader(new FileReader(input)); ChemFile content = (ChemFile)reader.read((ChemObject)new ChemFile()); AtomContainer[] c = ChemFileManipulator.getAllAtomContainers(content); ac = c[0]; KabschAlignment ka = new KabschAlignment(ac,ac); ka.align(); double rmsd = ka.getRMSD(); assertTrue(1e-8 > rmsd); assertNotNull(ka.getRotationMatrix()); double[][] p1 = { {16.754 ,20.462 ,45.049 }, {19.609 ,18.145 ,46.011 }, {17.101 ,17.256 ,48.707 }, {13.963 ,18.314 ,46.820 }, {14.151 ,15.343 ,44.482 }, {14.959 ,12.459 ,46.880 }, {11.987 ,13.842 ,48.862 }, {9.586 ,12.770 ,46.123 }, {11.006 ,9.245 ,46.116 }, {10.755 ,9.090 ,49.885 } }; double[][] p2 = { {70.246 ,317.510 ,188.263 }, {73.457 ,317.369 ,190.340 }, {71.257 ,318.976 ,193.018 }, {68.053 ,317.543 ,191.651 }, {68.786 ,313.954 ,192.637 }, {70.248 ,314.486 ,196.151 }, {67.115 ,316.584 ,196.561 }, {64.806 ,313.610 ,196.423 }, {66.804 ,311.735 ,199.035 }, {66.863 ,314.832 ,201.113 } }; Atom[] a1 = new Atom[10]; Atom[] a2 = new Atom[10]; for (int i = 0; i < 10; i++) { a1[i] = new Atom("C"); a1[i].setX3d( p1[i][0] ); a1[i].setY3d( p1[i][1] ); a1[i].setZ3d( p1[i][2] ); a2[i] = new Atom("C"); a2[i].setX3d( p2[i][0] ); a2[i].setY3d( p2[i][1] ); a2[i].setZ3d( p2[i][2] ); } ka = new KabschAlignment(a1,a2); ka.align(); rmsd = ka.getRMSD(); assertEquals(0.13479726, rmsd, 0.00000001); } | 45167 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45167/fc1b5fcee35924d6c788624d655b2ea2e7703ae0/KabschAlignmentTest.java/buggy/src/org/openscience/cdk/test/geometry/alignment/KabschAlignmentTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
10044,
1435,
1216,
10403,
16,
24570,
16,
2252,
18,
4936,
18,
503,
95,
3639,
7149,
2170,
1721,
31,
3639,
514,
1544,
273,
315,
892,
19,
2752,
90,
1615,
18,
76,
267,
14432... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
10044,
1435,
1216,
10403,
16,
24570,
16,
2252,
18,
4936,
18,
503,
95,
3639,
7149,
2170,
1721,
31,
3639,
514,
1544,
273,
315,
892,
19,
2752,
90,
1615,
18,
76,
267,
14432... |
ITasksCollector inProgressTaskCollector = new InProgressTaskCollector(reportStartDate); parser.addCollector(inProgressTaskCollector); | ITaskCollector inProgressTaskCollector = new InProgressTaskCollector(reportStartDate); taskReportGenerator.addCollector(inProgressTaskCollector); | public TaskPlannerEditorInput(int prevDays, TaskList tlist) { prevDaysToReport = prevDays; long today = new Date().getTime(); long lastDay = prevDaysToReport * DAY; int offsetToday = Calendar.getInstance().get(Calendar.HOUR) * 60 * 60 * 1000 + Calendar.getInstance().get(Calendar.MINUTE) * 60 * 1000 + Calendar.getInstance().get(Calendar.SECOND) * 1000; reportStartDate = new Date(today - offsetToday - lastDay); parser = new TaskReportGenerator(tlist); ITasksCollector completedTaskCollector = new CompletedTaskCollector(reportStartDate); parser.addCollector(completedTaskCollector); ITasksCollector inProgressTaskCollector = new InProgressTaskCollector(reportStartDate); parser.addCollector(inProgressTaskCollector); parser.collectTasks(); completedTasks = completedTaskCollector.getTasks(); inProgressTasks = inProgressTaskCollector.getTasks(); } | 51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/7595eee5bca5acc3004862830a8fd7a286cd30f2/TaskPlannerEditorInput.java/buggy/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/internal/planner/ui/TaskPlannerEditorInput.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3837,
1749,
3818,
6946,
1210,
12,
474,
2807,
9384,
16,
3837,
682,
268,
1098,
13,
288,
202,
202,
10001,
9384,
774,
4820,
273,
2807,
9384,
31,
202,
202,
5748,
10074,
273,
394,
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,
3837,
1749,
3818,
6946,
1210,
12,
474,
2807,
9384,
16,
3837,
682,
268,
1098,
13,
288,
202,
202,
10001,
9384,
774,
4820,
273,
2807,
9384,
31,
202,
202,
5748,
10074,
273,
394,
2... |
SpringConfig config = new SpringConfig(application); ConfigurableApplicationContext appCtx = (ConfigurableApplicationContext) new XmlApplicationContextDriver().getApplicationContext( config.getBeanReferences(), parent); | GrailsRuntimeConfigurator config = new GrailsRuntimeConfigurator(application,parent); ConfigurableApplicationContext appCtx = (ConfigurableApplicationContext)config.configure(new MockServletContext()); | public static ApplicationContext bootstrapGrailsFromClassPath() { LOG.info("Loading Grails environment"); ApplicationContext parent = new ClassPathXmlApplicationContext("applicationContext.xml"); DefaultGrailsApplication application = (DefaultGrailsApplication)parent.getBean("grailsApplication", DefaultGrailsApplication.class); SpringConfig config = new SpringConfig(application); ConfigurableApplicationContext appCtx = (ConfigurableApplicationContext) new XmlApplicationContextDriver().getApplicationContext( config.getBeanReferences(), parent); Assert.notNull(appCtx); return appCtx; } | 51763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51763/a7a3388f513e0061255fbe963d094f868c6646a6/GrailsUtil.java/clean/src/commons/grails/util/GrailsUtil.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
4257,
1042,
7065,
14571,
14573,
1265,
22158,
1435,
288,
202,
202,
4842,
18,
1376,
2932,
10515,
10812,
14573,
3330,
8863,
202,
202,
28278,
982,
273,
394,
1659,
743,
4432,
2827... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4257,
1042,
7065,
14571,
14573,
1265,
22158,
1435,
288,
202,
202,
4842,
18,
1376,
2932,
10515,
10812,
14573,
3330,
8863,
202,
202,
28278,
982,
273,
394,
1659,
743,
4432,
2827... |
throw new MessageInvalidException(ProtocolErrorMessage.MISSING_FIELD, "Missing field: Filename on "+name, identifier); | throw new MessageInvalidException(ProtocolErrorMessage.MISSING_FIELD, "Missing field: Filename on "+name, identifier, global); | public DiskDirPutFile(SimpleFieldSet subset, String identifier) throws MessageInvalidException { super(subset, identifier); String s = subset.get("Filename"); if(s == null) throw new MessageInvalidException(ProtocolErrorMessage.MISSING_FIELD, "Missing field: Filename on "+name, identifier); file = new File(s); } | 45341 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45341/bbb3c23ec38ea1c7abb48040a17f5fc7932248bc/DiskDirPutFile.java/buggy/src/freenet/node/fcp/DiskDirPutFile.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
12951,
1621,
6426,
812,
12,
5784,
974,
694,
7931,
16,
514,
2756,
13,
1216,
2350,
1941,
503,
288,
202,
202,
9565,
12,
15657,
16,
2756,
1769,
202,
202,
780,
272,
273,
7931,
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,
225,
202,
482,
12951,
1621,
6426,
812,
12,
5784,
974,
694,
7931,
16,
514,
2756,
13,
1216,
2350,
1941,
503,
288,
202,
202,
9565,
12,
15657,
16,
2756,
1769,
202,
202,
780,
272,
273,
7931,
18,
... |
return _endpoint; } | return _endpoint; } | public Endpoint getEndpoint() { return _endpoint; } | 45373 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45373/09b7bc81ee0b928ba82939c26ceb06ae7bf923a2/OdeService.java/buggy/jbi/src/main/java/org/apache/ode/jbi/OdeService.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
6961,
18563,
1435,
288,
565,
327,
389,
8003,
31,
225,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
282,
1071,
6961,
18563,
1435,
288,
565,
327,
389,
8003,
31,
225,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
assertTrue(new ExpressionInfo("set(int test.expression.Target.modifier3)", NAMESPACE).getExpression().match( new ExpressionContext(PointcutType.SET, modifier3, null))); assertTrue(new ExpressionInfo("set(protected int test.expression.Target.modifier3)", NAMESPACE).getExpression() .match(new ExpressionContext(PointcutType.SET, modifier3, null))); assertTrue(new ExpressionInfo("set(static protected int test.expression.Target.modifier3)", NAMESPACE) .getExpression().match(new ExpressionContext(PointcutType.SET, modifier3, null))); assertTrue(new ExpressionInfo("set(static int test.expression.Target.modifier3)", NAMESPACE).getExpression() .match(new ExpressionContext(PointcutType.SET, modifier3, null))); assertTrue(new ExpressionInfo("set(transient int test.expression.Target.modifier3)", NAMESPACE).getExpression() .match(new ExpressionContext(PointcutType.SET, modifier3, null))); assertTrue(new ExpressionInfo( "set(static transient protected final int test.expression.Target.modifier3)", NAMESPACE).getExpression().match(new ExpressionContext(PointcutType.SET, modifier3, null))); assertFalse(new ExpressionInfo("set(public int test.expression.Target.modifier3)", NAMESPACE).getExpression() .match(new ExpressionContext(PointcutType.SET, modifier3, null))); | assertTrue( new ExpressionInfo("set(int test.expression.Target.modifier3)", NAMESPACE).getExpression().match( new ExpressionContext(PointcutType.SET, modifier3, null) ) ); assertTrue( new ExpressionInfo("set(protected int test.expression.Target.modifier3)", NAMESPACE).getExpression() .match(new ExpressionContext(PointcutType.SET, modifier3, null)) ); assertTrue( new ExpressionInfo("set(static protected int test.expression.Target.modifier3)", NAMESPACE) .getExpression().match(new ExpressionContext(PointcutType.SET, modifier3, null)) ); assertTrue( new ExpressionInfo("set(static int test.expression.Target.modifier3)", NAMESPACE).getExpression() .match(new ExpressionContext(PointcutType.SET, modifier3, null)) ); assertTrue( new ExpressionInfo("set(transient int test.expression.Target.modifier3)", NAMESPACE).getExpression() .match(new ExpressionContext(PointcutType.SET, modifier3, null)) ); assertTrue( new ExpressionInfo( "set(static transient protected final int test.expression.Target.modifier3)", NAMESPACE ).getExpression().match(new ExpressionContext(PointcutType.SET, modifier3, null)) ); assertFalse( new ExpressionInfo("set(public int test.expression.Target.modifier3)", NAMESPACE).getExpression() .match(new ExpressionContext(PointcutType.SET, modifier3, null)) ); | public void testFieldModifiers3() throws Exception { assertTrue(new ExpressionInfo("set(int test.expression.Target.modifier3)", NAMESPACE).getExpression().match( new ExpressionContext(PointcutType.SET, modifier3, null))); assertTrue(new ExpressionInfo("set(protected int test.expression.Target.modifier3)", NAMESPACE).getExpression() .match(new ExpressionContext(PointcutType.SET, modifier3, null))); assertTrue(new ExpressionInfo("set(static protected int test.expression.Target.modifier3)", NAMESPACE) .getExpression().match(new ExpressionContext(PointcutType.SET, modifier3, null))); assertTrue(new ExpressionInfo("set(static int test.expression.Target.modifier3)", NAMESPACE).getExpression() .match(new ExpressionContext(PointcutType.SET, modifier3, null))); assertTrue(new ExpressionInfo("set(transient int test.expression.Target.modifier3)", NAMESPACE).getExpression() .match(new ExpressionContext(PointcutType.SET, modifier3, null))); assertTrue(new ExpressionInfo( "set(static transient protected final int test.expression.Target.modifier3)", NAMESPACE).getExpression().match(new ExpressionContext(PointcutType.SET, modifier3, null))); assertFalse(new ExpressionInfo("set(public int test.expression.Target.modifier3)", NAMESPACE).getExpression() .match(new ExpressionContext(PointcutType.SET, modifier3, null))); } | 7954 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7954/773e62df340910756fa4992c37d1a6531e796a5c/ExpressionTest.java/clean/aspectwerkz3/src/test/test/expression/ExpressionTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
974,
11948,
23,
1435,
1216,
1185,
288,
3639,
1815,
5510,
12,
2704,
5371,
966,
2932,
542,
12,
474,
1842,
18,
8692,
18,
2326,
18,
20597,
23,
2225,
16,
18494,
2934,
588,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
974,
11948,
23,
1435,
1216,
1185,
288,
3639,
1815,
5510,
12,
2704,
5371,
966,
2932,
542,
12,
474,
1842,
18,
8692,
18,
2326,
18,
20597,
23,
2225,
16,
18494,
2934,
588,
2... |
if( i+1 <= roFieldCount ) objs[i] = ro.getFieldValue( i+1 ); else objs[i] = null; | int roFieldCount = ro.getResultClass( ).getFieldCount( ); for ( int i = 0; i < objs.length; i++ ) { if ( i + 1 <= roFieldCount ) objs[i] = ro.getFieldValue( i + 1 ); else objs[i] = null; } | public IResultObject next( ) throws DataException { IResultObject ro = this.rowResultSet.next( ); if( ro == null ) return null; Object[] objs = new Object[this.resultClass.getFieldCount( )]; int roFieldCount = ro.getResultClass( ).getFieldCount( ); for( int i = 0; i < objs.length; i++) { if( i+1 <= roFieldCount ) objs[i] = ro.getFieldValue( i+1 ); else objs[i] = null; } return new ResultObject( resultClass, objs); } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/96c92cf572b884c45e87abba5b380d5f84c5ce97/ExpandableRowResultSet.java/clean/data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/executor/cache/ExpandableRowResultSet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
467,
1253,
921,
1024,
12,
262,
1216,
1910,
503,
202,
95,
202,
202,
45,
1253,
921,
721,
273,
333,
18,
492,
13198,
18,
4285,
12,
11272,
202,
202,
430,
12,
721,
422,
446,
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,
482,
467,
1253,
921,
1024,
12,
262,
1216,
1910,
503,
202,
95,
202,
202,
45,
1253,
921,
721,
273,
333,
18,
492,
13198,
18,
4285,
12,
11272,
202,
202,
430,
12,
721,
422,
446,
262,
... |
final Class<? extends DomElement> aClass = set.first(); | final Class<? extends DomElement> aClass = set.last(); | Class<? extends DomElement> getImplementation(final Class<? extends DomElement> concreteInterface) { if (myCachedImplementationClasses.containsKey(concreteInterface)) { return myCachedImplementationClasses.get(concreteInterface); } final TreeSet<Class<? extends DomElement>> set = new TreeSet<Class<? extends DomElement>>(new Comparator<Class<? extends DomElement>>() { public int compare(final Class<? extends DomElement> o1, final Class<? extends DomElement> o2) { if (o1.isAssignableFrom(o2)) return 1; if (o2.isAssignableFrom(o1)) return -1; if (o1.equals(o2)) return 0; throw new AssertionError("Incompatible implementation classes: " + o1 + " & " + o2); } }); findImplementationClassDFS(concreteInterface, set); if (!set.isEmpty()) { final Class<? extends DomElement> aClass = set.first(); myCachedImplementationClasses.put(concreteInterface, aClass); return aClass; } final Implementation implementation = DomUtil.findAnnotationDFS(concreteInterface, Implementation.class); final Class<? extends DomElement> aClass1 = implementation == null ? null : implementation.value(); myCachedImplementationClasses.put(concreteInterface, aClass1); return aClass1; } | 56627 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56627/a472e0fb9c37c2a542c0b98426622528bd0ad471/DomManagerImpl.java/clean/source/com/intellij/util/xml/impl/DomManagerImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1659,
12880,
3231,
12965,
1046,
34,
336,
13621,
12,
6385,
1659,
12880,
3231,
12965,
1046,
34,
12220,
1358,
13,
288,
565,
309,
261,
4811,
9839,
13621,
4818,
18,
12298,
653,
12,
23470,
1358,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1659,
12880,
3231,
12965,
1046,
34,
336,
13621,
12,
6385,
1659,
12880,
3231,
12965,
1046,
34,
12220,
1358,
13,
288,
565,
309,
261,
4811,
9839,
13621,
4818,
18,
12298,
653,
12,
23470,
1358,
... |
public String toString() { return null; } | public String toString() { return super.toString() + " limit: " + limit + " indexOfNextAdd: " + indexOfNextAdd; } | public String toString() { return null; // TODO } // toString() | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/8f03053e30bf23122f89e48e88064677b27fdd7c/UndoManager.java/clean/core/src/classpath/javax/javax/swing/undo/UndoManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
1762,
1435,
288,
202,
202,
2463,
446,
31,
368,
2660,
202,
97,
368,
1762,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
1762,
1435,
288,
202,
202,
2463,
446,
31,
368,
2660,
202,
97,
368,
1762,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
setBusy(false); | public void propertyChange(java.beans.PropertyChangeEvent e) { // notification from CV; check for Value being changed if (e.getPropertyName().equals("Busy")) { if (((Boolean)e.getNewValue()).equals(Boolean.FALSE)) setBusy(false); } else if (e.getPropertyName().equals("State")) { CvValue cv = (CvValue)_cvVector.elementAt(getCvNum()); setState(cv.getState()); } else if (e.getPropertyName().equals("Value")) { setBusy(false); // update value of Variable CvValue cv = (CvValue)_cvVector.elementAt(getCvNum()); int newVal = (cv.getValue() & maskVal(getMask())) >>> offsetVal(getMask()); setValue(newVal); // check for duplicate done inside setVal } } | 213 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/213/0cf14c3ff1d05f7658938fb58ccfcc6354d2e059/EnumVariableValue.java/buggy/jmrit/symbolicprog/EnumVariableValue.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1272,
3043,
12,
6290,
18,
2196,
634,
18,
1396,
20930,
425,
13,
288,
202,
202,
759,
3851,
628,
385,
58,
31,
866,
364,
1445,
3832,
3550,
202,
202,
430,
261,
73,
18,
588,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1272,
3043,
12,
6290,
18,
2196,
634,
18,
1396,
20930,
425,
13,
288,
202,
202,
759,
3851,
628,
385,
58,
31,
866,
364,
1445,
3832,
3550,
202,
202,
430,
261,
73,
18,
588,
... | |
textsindex++; | textsindex++; | protected void createCommentLayout(FormToolkit toolkit, final ScrolledForm form) { SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm"); Section section = toolkit.createSection(form.getBody(), ExpandableComposite.TITLE_BAR | Section.TWISTIE); section.setText(LABEL_SECTION_COMMENTS); section.setExpanded(true); section.setLayout(new GridLayout()); section.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); section.addExpansionListener(new IExpansionListener() { public void expansionStateChanging(ExpansionEvent e) { form.reflow(true); } public void expansionStateChanged(ExpansionEvent e) { form.reflow(true); } }); // Additional (read-only) Comments Area Composite addCommentsComposite = toolkit.createComposite(section); section.setClient(addCommentsComposite); GridLayout addCommentsLayout = new GridLayout(); addCommentsLayout.numColumns = 4; addCommentsComposite.setLayout(addCommentsLayout);// addCommentsComposite.setBackground(background); GridData addCommentsData = new GridData(GridData.FILL_BOTH); addCommentsData.horizontalSpan = 1; addCommentsData.grabExcessVerticalSpace = false; addCommentsComposite.setLayoutData(addCommentsData); // End Additional (read-only) Comments Area FormText t = null; for (Iterator<Comment> it = bug.getComments().iterator(); it.hasNext();) { Comment comment = it.next(); String commentHeader = "Additional comment #" + comment.getNumber() + " from " + comment.getAuthorName() + " on " + df.format(comment.getCreated()); t = newLayout(addCommentsComposite, 4, commentHeader, HEADER); t.addListener(SWT.FocusIn, new CommentListener(comment)); t = newLayout(addCommentsComposite, 4, comment.getText(), VALUE); t.setFont(COMMENT_FONT); t.addListener(SWT.FocusIn, new CommentListener(comment)); // code for outline texts.add(textsindex, t); textHash.put(comment, t); textsindex++; } // Additional Comments Text Composite addCommentsTitleComposite = new Composite(addCommentsComposite, SWT.NONE); GridLayout addCommentsTitleLayout = new GridLayout(); addCommentsTitleLayout.horizontalSpacing = 0; addCommentsTitleLayout.marginWidth = 0; addCommentsTitleComposite.setLayout(addCommentsTitleLayout);// addCommentsTitleComposite.setBackground(background); GridData addCommentsTitleData = new GridData(GridData.HORIZONTAL_ALIGN_FILL); addCommentsTitleData.horizontalSpan = 4; addCommentsTitleData.grabExcessVerticalSpace = false; addCommentsTitleComposite.setLayoutData(addCommentsTitleData); newLayout(addCommentsTitleComposite, 4, "Additional Comments:", HEADER).addListener(SWT.FocusIn, new NewCommentListener()); addCommentsText = new Text(addCommentsComposite, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL | SWT.WRAP); addCommentsText.setFont(COMMENT_FONT); GridData addCommentsTextData = new GridData(GridData.HORIZONTAL_ALIGN_FILL); addCommentsTextData.horizontalSpan = 4; addCommentsTextData.widthHint = DESCRIPTION_WIDTH; addCommentsTextData.heightHint = DESCRIPTION_HEIGHT; addCommentsText.setLayoutData(addCommentsTextData); addCommentsText.setText(bug.getNewComment()); addCommentsText.addListener(SWT.KeyUp, new Listener() { public void handleEvent(Event event) { String sel = addCommentsText.getText(); if (!(bug.getNewNewComment().equals(sel))) { bug.setNewNewComment(sel); changeDirtyStatus(true); } validateInput(); } }); addCommentsText.addListener(SWT.FocusIn, new NewCommentListener()); // End Additional Comments Text addCommentsTextBox = addCommentsText; this.createSeparatorSpace(addCommentsComposite); } | 51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/b6fdf4c39d4d5c70a709abf29c786ecdd72915f1/ExistingBugEditor.java/buggy/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/ExistingBugEditor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
752,
4469,
3744,
12,
1204,
6364,
8691,
5226,
8691,
16,
727,
2850,
25054,
1204,
646,
13,
288,
202,
202,
5784,
11878,
3013,
273,
394,
17005,
2932,
17722,
17,
8206,
17,
449,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
752,
4469,
3744,
12,
1204,
6364,
8691,
5226,
8691,
16,
727,
2850,
25054,
1204,
646,
13,
288,
202,
202,
5784,
11878,
3013,
273,
394,
17005,
2932,
17722,
17,
8206,
17,
449,
... |
if(namespaceURI.equals(XUPDATE_NS)) { if(localName.equals("element")) { stack.pop(); } else if(localName.equals("attribute")) inAttribute = false; if(localName.equals("append") || localName.equals("remove") || localName.equals("insert-before") || localName.equals("insert-after")) { inModification = false; modification.setContent(fragment); modifications.add(modification); modification = null; } } else if(inModification) stack.pop(); | if (inModification && charBuf.length() > 0) { final String normalized = charBuf.getNormalizedString(FastStringBuffer.SUPPRESS_BOTH); if (normalized.length() > 0) { Text text = doc.createTextNode(normalized); if (stack.isEmpty()) { LOG.debug("appending text to fragment: " + text.getData()); fragment.appendChild(text); } else { Element last = (Element) stack.peek(); last.appendChild(text); } } charBuf.setLength(0); } if (namespaceURI.equals(XUPDATE_NS)) { if (localName.equals("element")) { stack.pop(); } else if (localName.equals("attribute")) inAttribute = false; if (localName.equals("append") || localName.equals("remove") || localName.equals("insert-before") || localName.equals("insert-after")) { inModification = false; modification.setContent(fragment); modifications.add(modification); modification = null; } } else if (inModification) stack.pop(); | public void endElement(String namespaceURI, String localName, String qName) throws SAXException { if(namespaceURI.equals(XUPDATE_NS)) { if(localName.equals("element")) { stack.pop(); } else if(localName.equals("attribute")) inAttribute = false; if(localName.equals("append") || localName.equals("remove") || localName.equals("insert-before") || localName.equals("insert-after")) { inModification = false; modification.setContent(fragment); modifications.add(modification); modification = null; } } else if(inModification) stack.pop(); } | 2909 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2909/3fbac7093568cbfd0f43cec9d16685fd69f6ce93/XUpdateProcessor.java/buggy/src/org/exist/xupdate/XUpdateProcessor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
14840,
12,
780,
19421,
16,
514,
11927,
16,
514,
22914,
13,
202,
202,
15069,
14366,
288,
3639,
309,
12,
4937,
3098,
18,
14963,
12,
60,
8217,
67,
3156,
3719,
288,
5411,
309... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
14840,
12,
780,
19421,
16,
514,
11927,
16,
514,
22914,
13,
202,
202,
15069,
14366,
288,
3639,
309,
12,
4937,
3098,
18,
14963,
12,
60,
8217,
67,
3156,
3719,
288,
5411,
309... |
protected void initFile(String id) throws FormatException, IOException { super.initFile(id); legacy = new LegacyZVIReader(); OLEParser parser = new OLEParser(id); parser.parse(0); Vector[] files = parser.getFiles(); headerData = new Hashtable(); pixelData = new Hashtable(); int largest = 0; int largestIndex = 0; int nextItem = 0; Vector itemNames = parser.getNames(); for (int i=0; i<files[0].size(); i++) { byte[] data = (byte[]) files[1].get(i); if (data.length > largest) largestIndex = i; String pathName = ((String) files[0].get(i)).trim(); pathName = DataTools.stripString(pathName); boolean isContents = pathName.endsWith("Contents"); boolean isImage = pathName.endsWith("Image"); try { if (((isContents && ((pathName.indexOf("Item") != -1) || pathName.indexOf("Image") != -1) && data.length > 6000)) || (data.length == dataLength)) { header = data; while ((dataLength != 0) && (data.length < dataLength) && isContents && ((pathName.indexOf("Item") != -1) || pathName.indexOf("Image") != -1)) { i++; data = (byte[]) files[1].get(i); if (data.length > largest) largestIndex = i; pathName = ((String) files[0].get(i)).trim(); pathName = DataTools.stripString(pathName); isContents = pathName.endsWith("Contents"); } int imageNum = 0; if (pathName.indexOf("Item") != -1) { String num = pathName.substring(pathName.lastIndexOf("Item") + 5, pathName.lastIndexOf(")")); imageNum = Integer.parseInt(num); } if (nextItem < itemNames.size()) { String num = ((String) itemNames.get(nextItem)).trim(); if (num.length() > 1) num = DataTools.stripString(num); int n = Integer.parseInt(num); // choose whether to use imageNum or n if (n != imageNum) { if (pixelData.containsKey(new Integer(imageNum))) { imageNum = n; } } if (pathName.indexOf("Item") != -1) { num = pathName.substring(0, pathName.lastIndexOf("Item")); while (pixelData.containsKey(new Integer(imageNum)) && (num.indexOf("Item") != -1)) { String s = num.substring(num.lastIndexOf("Item") + 5, num.lastIndexOf(")")); imageNum = Integer.parseInt(s); num = num.substring(0, num.lastIndexOf("Item")); } } // if we *still* don't find a valid key, give up and use // the legacy reader if (pixelData.containsKey(new Integer(imageNum))) { if (legacy.getImageCount(id) == 1) break; needLegacy = true; legacy.initFile(id); return; } nextItem++; } int byteCount = 2; byteCount += 4; // version field byteCount += 6; // type field byteCount += 2; int numBytes = DataTools.bytesToInt(header, byteCount, 2, true); byteCount += 2 + numBytes; byteCount += 2; imageWidth = DataTools.bytesToInt(header, byteCount, 4, true); byteCount += 6; imageHeight = DataTools.bytesToInt(header, byteCount, 4, true); byteCount += 4; byteCount += 6; // depth byteCount += 6; // pixel format byteCount += 6; // count byteCount += 2; bitsPerSample = DataTools.bytesToInt(header, byteCount, 4, true); byteCount += 4; numBytes = DataTools.bytesToInt(header, byteCount, 2, true); byteCount += 2 + numBytes; // plugin CLSID byteCount += 38; // not sure what this is for byteCount += 2; numBytes = DataTools.bytesToInt(header, byteCount, 4, true); byteCount += 4 + numBytes; // layers byteCount += 2; numBytes = DataTools.bytesToInt(header, byteCount, 4, true); byteCount += 4 + numBytes; // scaling byteCount += 2; numBytes = DataTools.bytesToInt(header, byteCount, 2, true); byteCount += 2 + numBytes; // root folder name byteCount += 2; numBytes = DataTools.bytesToInt(header, byteCount, 2, true); byteCount += 2 + numBytes; // display item name byteCount += 28; // streamed header data // get pixel data if (header.length > byteCount) { byte[] head = new byte[byteCount]; System.arraycopy(header, 0, head, 0, head.length); headerData.put(new Integer(imageNum), (Object) head); byte[] px = new byte[header.length - byteCount]; System.arraycopy(header, byteCount, px, 0, px.length); if (!pixelData.containsKey(new Integer(imageNum))) { shuffle = parser.shuffle(); // nasty special case...I pity the person who finds a bug in this if (shuffle > 0) { byte[] chunkOne = new byte[shuffle]; byte[] chunkTwo = new byte[parser.length() - shuffle + 11700]; System.arraycopy(px, 0, chunkOne, 0, chunkOne.length); System.arraycopy(px, chunkOne.length, chunkTwo, 0, chunkTwo.length); byte[] tct = new byte[chunkOne.length]; int bpp = bitsPerSample / 8; int mul = (int) (imageWidth - (imageWidth * 0.01)); mul *= bpp; mul += 2; for (int k=0; k<(chunkOne.length / (bpp*imageWidth)); k++) { System.arraycopy(chunkOne, k*bpp*imageWidth, tct, (k+1)*bpp*imageWidth - mul, mul); System.arraycopy(chunkOne, k*bpp*imageWidth+mul, tct, k*bpp*imageWidth, bpp*imageWidth - mul); } chunkOne = tct; byte[] tco = new byte[chunkTwo.length]; mul = (int) (imageWidth * 0.14); mul *= bpp; for (int k=0; k<(chunkTwo.length / (bpp*imageWidth)); k++) { System.arraycopy(chunkTwo, k*bpp*imageWidth, tco, (k+1)*bpp*imageWidth - mul, mul); System.arraycopy(chunkTwo, k*bpp*imageWidth+mul, tco, k*bpp*imageWidth, bpp*imageWidth - mul); } chunkTwo = tco; px = new byte[px.length]; System.arraycopy(chunkTwo, 0, px, 0, chunkTwo.length); System.arraycopy(chunkOne, 0, px, chunkTwo.length, chunkOne.length); // now we have to shift the whole array to the right by // 0.01 * width pixels mul = imageWidth - ((int) (imageWidth * 0.01)); mul *= bpp; byte[] tmp = new byte[px.length]; for (int k=0; k<imageHeight; k++) { System.arraycopy(px, k*bpp*imageWidth, tmp, (k+1)*bpp*imageWidth - mul, mul); System.arraycopy(px, k*bpp*imageWidth+mul, tmp, k*bpp*imageWidth, bpp*imageWidth - mul); } px = tmp; } pixelData.put(new Integer(imageNum), (Object) px); dataLength = px.length + head.length; nImages++; } } else break; } else if (isContents && isImage) { // we've found the header data header = data; int pointer = 14; int length = DataTools.bytesToInt(header, pointer, 2, true); pointer += 4 + length; imageWidth = DataTools.bytesToInt(header, pointer, 4, true); pointer += 6; imageHeight = DataTools.bytesToInt(header, pointer, 4, true); pointer += 6; pointer += 6; pixelFormat = DataTools.bytesToInt(header, pointer, 4, true); pointer += 6; switch (pixelFormat) { case 1: bytesPerPixel = 3; break; case 2: bytesPerPixel = 4; break; case 3: bytesPerPixel = 1; break; case 4: bytesPerPixel = 2; break; case 6: bytesPerPixel = 4; break; case 8: bytesPerPixel = 6; break; default: bytesPerPixel = 1; } if ((bytesPerPixel % 2) != 0) channels = 3; } else if (pathName.endsWith("Tags") && pathName.startsWith("Root Entry")) { // the main tags stream tags = data; } } catch (Exception e) { } } if (nImages == 0) { // HACK // just grab the largest file header = (byte[]) files[1].get(largestIndex); String pathName = (String) files[0].get(largestIndex); int imageNum = 0; if (pathName.indexOf("Item") != -1) { String num = pathName.substring(pathName.indexOf("Item") + 5, pathName.indexOf(")")); imageNum = Integer.parseInt(num); } int byteCount = 166; byteCount += 2; imageWidth = DataTools.bytesToInt(header, byteCount, 4, true); byteCount += 6; imageHeight = DataTools.bytesToInt(header, byteCount, 4, true); byteCount += 4; byteCount += 6; // depth byteCount += 6; // pixel format byteCount += 6; // count byteCount += 2; bytesPerPixel = DataTools.bytesToInt(header, byteCount, 4, true) / 8; byteCount += 4; int numBytes = DataTools.bytesToInt(header, byteCount, 2, true); byteCount += 2 + numBytes; // plugin CLSID byteCount += 38; // not sure what this is for byteCount += 2; numBytes = DataTools.bytesToInt(header, byteCount, 4, true); byteCount += 4 + numBytes; // layers byteCount += 2; numBytes = DataTools.bytesToInt(header, byteCount, 4, true); byteCount += 4 + numBytes; // scaling byteCount += 2; numBytes = DataTools.bytesToInt(header, byteCount, 2, true); byteCount += 2 + numBytes; // root folder name byteCount += 2; numBytes = DataTools.bytesToInt(header, byteCount, 2, true); byteCount += 2 + numBytes; // display item name byteCount += 28; // streamed header data // get pixel data if (header.length > byteCount) { byte[] head = new byte[byteCount]; System.arraycopy(header, 0, head, 0, head.length); headerData.put(new Integer(nImages), (Object) head); byte[] px = new byte[header.length - byteCount]; System.arraycopy(header, byteCount, px, 0, px.length); pixelData.put(new Integer(nImages), (Object) px); nImages++; } } initMetadata(); } | 49800 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49800/f8fea5aec2de454fd84e68759019ac47d99be52a/ZeissZVIReader.java/buggy/loci/formats/ZeissZVIReader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
918,
1208,
812,
12,
780,
612,
13,
1216,
4077,
503,
16,
1860,
288,
565,
2240,
18,
2738,
812,
12,
350,
1769,
565,
8866,
273,
394,
22781,
62,
4136,
2514,
5621,
4202,
531,
900,
2678,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
918,
1208,
812,
12,
780,
612,
13,
1216,
4077,
503,
16,
1860,
288,
565,
2240,
18,
2738,
812,
12,
350,
1769,
565,
8866,
273,
394,
22781,
62,
4136,
2514,
5621,
4202,
531,
900,
2678,
... | ||
public Value hexDecode() throws KettleValueException { setType(VALUE_TYPE_STRING); if (isNull()) { return this; } setValue( getString() ); String hexString = getString(); int len = hexString.length(); StringBuffer buffer = new StringBuffer((len + 1) / 2); boolean evenByte = true; byte nextByte = 0; // we assume a leading 0 if the length is not even. if ((len % 2) == 1) evenByte = false; int nibble; for (int i = 0; i < len; i++) { char c = hexString.charAt(i); if ((c >= '0') && (c <= '9')) nibble = c - '0'; else if ((c >= 'A') && (c <= 'F')) nibble = c - 'A' + 0x0A; else if ((c >= 'a') && (c <= 'f')) nibble = c - 'a' + 0x0A; else throw new KettleValueException("invalid hex digit '" + c + "'."); if (evenByte) { nextByte = (byte)(nibble << 4); } else { nextByte += (byte)nibble; buffer.append((char)nextByte); } evenByte = ! evenByte; } setValue(buffer); return this; } | 58146 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58146/5feb759e1c8a7cbc254666e55c5efe6d27a70a6e/Value.java/clean/kettle/src/be/ibridge/kettle/core/value/Value.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1445,
3827,
6615,
1435,
1216,
1475,
278,
5929,
9738,
225,
202,
95,
202,
202,
542,
559,
12,
4051,
67,
2399,
67,
5804,
1769,
202,
202,
430,
261,
291,
2041,
10756,
3196,
202,
95,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1445,
3827,
6615,
1435,
1216,
1475,
278,
5929,
9738,
225,
202,
95,
202,
202,
542,
559,
12,
4051,
67,
2399,
67,
5804,
1769,
202,
202,
430,
261,
291,
2041,
10756,
3196,
202,
95,... | ||
public final void visit_lshr() { final IntItem cnt = vstack.popInt(); final LongItem val = vstack.popLong();// final X86RegisterPool pool = eContext.getGPRPool(); // Get cnt into ECX if (!cnt.uses(X86Register.ECX)) { val.spillIfUsing(eContext, X86Register.ECX); L1AHelper.requestRegister(eContext, X86Register.ECX, cnt); cnt.loadTo(eContext, X86Register.ECX); } // Load val val.load(eContext); if (os.isCode32()) { final X86Register.GPR lsb = val.getLsbRegister(eContext); final X86Register.GPR msb = val.getMsbRegister(eContext); final Label curInstrLabel = getCurInstrLabel(); // Calculate os.writeAND(X86Register.ECX, 63); os.writeCMP_Const(X86Register.ECX, 32); final Label gt32Label = new Label(curInstrLabel + "gt32"); final Label endLabel = new Label(curInstrLabel + "end"); os.writeJCC(gt32Label, X86Constants.JAE); // JAE /** ECX < 32 */ os.writeSHRD_CL(lsb, msb); os.writeSAR_CL(msb); os.writeJMP(endLabel); /** ECX >= 32 */ os.setObjectRef(gt32Label); os.writeMOV(INTSIZE, lsb, msb); os.writeSAR(msb, 31); os.writeSAR_CL(lsb); os.setObjectRef(endLabel); } else { final GPR64 valr = val.getRegister(eContext); os.writeSAR_CL(valr); } vstack.push(val); // Release cnt.release(eContext); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/6ad6198b74c08d19e793bf52867682597f899f43/X86BytecodeVisitor.java/buggy/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
6385,
6459,
11658,
67,
80,
674,
86,
1435,
95,
202,
202,
6385,
1702,
1180,
13085,
33,
90,
3772,
18,
5120,
1702,
5621,
202,
202,
6385,
3708,
1180,
1125,
33,
90,
3772,
18,
5120,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6385,
6459,
11658,
67,
80,
674,
86,
1435,
95,
202,
202,
6385,
1702,
1180,
13085,
33,
90,
3772,
18,
5120,
1702,
5621,
202,
202,
6385,
3708,
1180,
1125,
33,
90,
3772,
18,
5120,
... | ||
bind(parameterIndex, x.toString(), PG_INTEGER); | bind(parameterIndex, escapeString(x.toString()), PG_INTEGER); | public void setObject(int parameterIndex, Object x, int targetSqlType, int scale) throws SQLException { if (x == null) { setNull(parameterIndex, targetSqlType); return ; } switch (targetSqlType) { case Types.INTEGER: if (x instanceof Boolean) bind(parameterIndex,((Boolean)x).booleanValue() ? "1" :"0", PG_BOOLEAN); else bind(parameterIndex, x.toString(), PG_INTEGER); break; case Types.TINYINT: case Types.SMALLINT: case Types.BIGINT: case Types.REAL: case Types.FLOAT: case Types.DOUBLE: case Types.DECIMAL: case Types.NUMERIC: if (x instanceof Boolean) bind(parameterIndex, ((Boolean)x).booleanValue() ? "1" : "0", PG_BOOLEAN); else bind(parameterIndex, x.toString(), PG_NUMERIC); break; case Types.CHAR: case Types.VARCHAR: case Types.LONGVARCHAR: setString(parameterIndex, x.toString()); break; case Types.DATE: if (x instanceof java.sql.Date) setDate(parameterIndex, (java.sql.Date)x); else { java.sql.Date tmpd = (x instanceof java.util.Date) ? new java.sql.Date(((java.util.Date)x).getTime()) : dateFromString(x.toString()); setDate(parameterIndex, tmpd); } break; case Types.TIME: if (x instanceof java.sql.Time) setTime(parameterIndex, (java.sql.Time)x); else { java.sql.Time tmpt = (x instanceof java.util.Date) ? new java.sql.Time(((java.util.Date)x).getTime()) : timeFromString(x.toString()); setTime(parameterIndex, tmpt); } break; case Types.TIMESTAMP: if (x instanceof java.sql.Timestamp) setTimestamp(parameterIndex ,(java.sql.Timestamp)x); else { java.sql.Timestamp tmpts = (x instanceof java.util.Date) ? new java.sql.Timestamp(((java.util.Date)x).getTime()) : timestampFromString(x.toString()); setTimestamp(parameterIndex, tmpts); } break; case Types.BIT: if (x instanceof Boolean) { bind(parameterIndex, ((Boolean)x).booleanValue() ? "TRUE" : "FALSE", PG_TEXT); } else if (x instanceof Number) { bind(parameterIndex, ((Number)x).intValue()==1 ? "TRUE" : "FALSE", PG_TEXT); } else { throw new PSQLException("postgresql.prep.type"); } break; case Types.BINARY: case Types.VARBINARY: case Types.LONGVARBINARY: setObject(parameterIndex, x); break; case Types.OTHER: setString(parameterIndex, ((PGobject)x).getValue(), PG_TEXT); break; default: throw new PSQLException("postgresql.prep.type"); } } | 46409 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46409/0a73f69cb4842f46c1a080b3375b0f268ba1e5de/AbstractJdbc1Statement.java/clean/src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
20530,
12,
474,
25412,
16,
1033,
619,
16,
509,
1018,
5101,
559,
16,
509,
3159,
13,
1216,
6483,
202,
95,
202,
202,
430,
261,
92,
422,
446,
13,
202,
202,
95,
1082,
202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
20530,
12,
474,
25412,
16,
1033,
619,
16,
509,
1018,
5101,
559,
16,
509,
3159,
13,
1216,
6483,
202,
95,
202,
202,
430,
261,
92,
422,
446,
13,
202,
202,
95,
1082,
202,
... |
{ } | { } | public JDBC_Test() { } | 45497 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45497/0e583068579748ad528685fa6040636b374177c6/JDBC_Test.java/buggy/src/interfaces/jdbc/JDBC_Test.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
16364,
67,
4709,
1435,
225,
202,
95,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
540,
1071,
16364,
67,
4709,
1435,
225,
202,
95,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
myOutputPathPanel.commit(); myTestsOutputPathPanel.commit(); | public void saveData() { //do nothing } | 56598 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56598/359024059fecf71edad0d4e83ec03e61e8739c3b/BuildElementsEditor.java/clean/source/com/intellij/openapi/roots/ui/configuration/BuildElementsEditor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3399,
1447,
743,
5537,
18,
7371,
5621,
3399,
14650,
1447,
743,
5537,
18,
7371,
5621,
3399,
1447,
743,
5537,
18,
7371,
5621,
3399,
14650,
1447,
743,
5537,
18,
7371,
5621,
1071,
4811,
1447,
743,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3399,
1447,
743,
5537,
18,
7371,
5621,
3399,
14650,
1447,
743,
5537,
18,
7371,
5621,
3399,
1447,
743,
5537,
18,
7371,
5621,
3399,
14650,
1447,
743,
5537,
18,
7371,
5621,
1071,
4811,
1447,
743,
... | |
if (! shadow.isFallsThrough()) { shadow.getRange().append(shadow.getFactory().createReturn(newMethod.getReturnType())); } } | if (!shadow.isFallsThrough()) { shadow.getRange().append( InstructionFactory.createReturn(newMethod.getReturnType())); } } | public void testHello() throws IOException { BcelAdvice p = new BcelAdvice(null, makePointcutAll(), null, 0, -1, -1, null, null) { public void specializeOn(Shadow s) { super.specializeOn(s); ((BcelShadow) s).initializeForAroundClosure(); } public void implementOn(Shadow s) { BcelShadow shadow = (BcelShadow) s; LazyMethodGen newMethod = shadow.extractMethod(shadow.getSignature().getExtractableName() + "_extracted"); shadow.getRange().append(shadow.makeCallToCallback(newMethod)); if (! shadow.isFallsThrough()) { shadow.getRange().append(shadow.getFactory().createReturn(newMethod.getReturnType())); } } }; weaveTest("HelloWorld", "ExtractedHelloWorld", p); } | 7955 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7955/990faf8f05daeac1a2ce1de47d832905d3eb1c5e/MoveInstructionsWeaveTestCase.java/buggy/org.aspectj/modules/weaver/testsrc/org/aspectj/weaver/bcel/MoveInstructionsWeaveTestCase.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
18601,
1435,
1216,
1860,
288,
3639,
605,
2183,
1871,
633,
293,
273,
394,
605,
2183,
1871,
633,
12,
2011,
16,
1221,
2148,
5150,
1595,
9334,
446,
16,
374,
16,
300,
21,
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,
918,
1842,
18601,
1435,
1216,
1860,
288,
3639,
605,
2183,
1871,
633,
293,
273,
394,
605,
2183,
1871,
633,
12,
2011,
16,
1221,
2148,
5150,
1595,
9334,
446,
16,
374,
16,
300,
21,
16... |
private void broadcastToSelectedElementsInSlot( NotificationEvent ev, ReportDesign design, ContainerSlot slot ) | private void broadcastToSelectedElementsInSlot( ReportDesign design, ContainerSlot slot, String selectorName ) | private void broadcastToSelectedElementsInSlot( NotificationEvent ev, ReportDesign design, ContainerSlot slot ) { Iterator iter = slot.iterator( ); while ( iter.hasNext( ) ) { DesignElement element = (DesignElement) iter.next( ); assert element != null; // Broadcast the element which is selected by this style String selector = ( (ElementDefn) element.getDefn( ) ) .getSelector( ); if ( selector != null && selector.equalsIgnoreCase( getName( ) ) ) element.broadcast( ev, design ); String[] selectors = element.getContainer( ).getSelectors( element.getContainerSlot( ) ); for ( int i = 0; i < selectors.length; i++ ) { if ( selectors[i] != null && selectors[i].equalsIgnoreCase( getName( ) ) ) element.broadcast( ev, design ); } int count = element.getDefn( ).getSlotCount( ); for ( int i = 0; i < count; i++ ) { broadcastToSelectedElementsInSlot( ev, design, element .getSlot( i ) ); } } } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/9e72d324f5c53e021d36271f98fc903c3771e4e8/StyleElement.java/clean/model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/core/StyleElement.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
8959,
774,
7416,
3471,
382,
8764,
12,
8050,
1133,
2113,
16,
1082,
202,
4820,
15478,
8281,
16,
4039,
8764,
4694,
262,
202,
95,
202,
202,
3198,
1400,
273,
4694,
18,
9838,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8959,
774,
7416,
3471,
382,
8764,
12,
8050,
1133,
2113,
16,
1082,
202,
4820,
15478,
8281,
16,
4039,
8764,
4694,
262,
202,
95,
202,
202,
3198,
1400,
273,
4694,
18,
9838,
... |
if (!pr.hasFixedNumberOfValues()) { | if (pr.getHasVariableNumberOfValues()) { | public PropertyPanel (Property pr, JPanel par, ConfigUIHelper _uihelper_module) { super(); uihelper_module = _uihelper_module; if (border == null) border = new CompoundBorder ( new BevelBorder (BevelBorder.RAISED), new EmptyBorder (5,5,5,5)); prop = pr; parent = par; int i, n; String label; int newlen; setBorder (border); setLayout(new BorderLayout (1,1)); valuepanels = new Vector(); JPanel westpanel = new JPanel(); westpanel.setLayout (new BoxLayout (westpanel, BoxLayout.Y_AXIS)); JLabel l1 = new JLabel (pr.getName(), JLabel.LEFT); //l1.setFont (core.ui.windowfontbold); westpanel.add (l1); if (!pr.hasFixedNumberOfValues()) { if (pr.getDesc().getValType() == ValType.EMBEDDEDCHUNK) addbutton = new JButton ("Add " + pr.getEmbeddedDesc().getName()); else addbutton = new JButton ("Add Value"); westpanel.add(addbutton); addbutton.addActionListener(this); } add (westpanel, "West"); /* add help message, if there is one */ String h = pr.getDesc().getHelp(); if (!h.equals("")) { JTextField helparea;// if (h.length() < 50)// helparea = new JTextField(h, 10);// else helparea = new JTextField(h,10); helparea.setEditable(false); add(helparea, "South"); } /* east panel holds the individual PropertyPanels */ eastpanel = new JPanel(); eastpanellayout = new GridBagLayout(); c = new GridBagConstraints(); eastpanel.setLayout (eastpanellayout); c.fill = GridBagConstraints.BOTH; c.weightx = 1.0; JLabel lj; n = pr.getNum(); for (i = 0; i < n; i++) { if (pr.getDesc().getValueLabelsSize() > i) lj = new JLabel (valuelabelpad + pr.getDesc().getValueLabel(i)); else if (pr.getDesc().getValType() == ValType.EMBEDDEDCHUNK) lj = new JLabel (valuelabelpad + pr.getValue(i).getEmbeddedChunk().getLastNameComponent()); else lj = new JLabel (valuelabelpad); c.gridwidth = GridBagConstraints.RELATIVE; c.weightx = 0; eastpanellayout.setConstraints (lj, c); eastpanel.add (lj); c.weightx = 1; c.gridwidth = GridBagConstraints.REMAINDER; VarValuePanel p; p = makeVarValuePanel (pr, i); p.setValue(pr.getValue(i)); valuepanels.add(p); eastpanellayout.setConstraints(p, c); eastpanel.add (p); p.addActionListener (this); } add(eastpanel,"Center"); validate(); eastpanel.validate(); } | 49828 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49828/f1e8710249b2b58d825d02550b3c012d76f6fc47/PropertyPanel.java/buggy/modules/jackal/editorgui/org/vrjuggler/jccl/editorgui/configchunkui/PropertyPanel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
4276,
5537,
261,
1396,
846,
16,
24048,
779,
16,
21821,
1903,
5370,
2276,
389,
4881,
4759,
67,
2978,
13,
288,
202,
9565,
5621,
3639,
5915,
4759,
67,
2978,
273,
389,
4881,
4759,
67,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
4276,
5537,
261,
1396,
846,
16,
24048,
779,
16,
21821,
1903,
5370,
2276,
389,
4881,
4759,
67,
2978,
13,
288,
202,
9565,
5621,
3639,
5915,
4759,
67,
2978,
273,
389,
4881,
4759,
67,
... |
public void testPlans() { // File file = new File("foo" + MylarTaskListPlugin.FILE_EXTENSION); // file.deleteOnExit(); // TaskListManager manager = new TaskListManager(file); Task task1 = new Task(MylarTaskListPlugin.getTaskListManager().genUniqueTaskHandle(), "task 1", true); task1.addPlan("default"); manager.moveToRoot(task1); manager.saveTaskList(); assertNotNull(manager.getTaskList()); TaskList list = new TaskList(); manager.setTaskList(list); manager.readExistingOrCreateNewList(); assertNotNull(manager.getTaskList()); Set<ITask> readList = manager.getTaskList().getRootTasks(); ITask task = readList.iterator().next(); assertEquals(1, task.getPlans().size()); assertTrue(task.getPlans().get(0).equals("default")); } | 51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/ce49d932c4c3749a3a6b17ffc0d0e1cd43629cb6/TaskListManagerTest.java/buggy/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasklist/tests/TaskListManagerTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
22846,
1435,
288,
202,
202,
759,
1387,
585,
273,
394,
1387,
2932,
11351,
6,
397,
8005,
7901,
2174,
682,
3773,
18,
3776,
67,
12796,
1769,
202,
202,
759,
585,
18,
373... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
22846,
1435,
288,
202,
202,
759,
1387,
585,
273,
394,
1387,
2932,
11351,
6,
397,
8005,
7901,
2174,
682,
3773,
18,
3776,
67,
12796,
1769,
202,
202,
759,
585,
18,
373... | ||
int h = (rowHeight + rowMargin); int delta = h * direction; | public int getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction) { // FIXME: I don't exactly know what sun does here. in both cases they // pick values which do *not* simply expose the next cell in a given // scroll direction. if (orientation == SwingConstants.VERTICAL) return direction * rowHeight; else { int sum = 0; for (int i = 0; i < getColumnCount(); ++i) sum += columnModel.getColumn(0).getWidth(); int inc = getColumnCount() == 0 ? 10 : sum / getColumnCount(); return direction * inc; } } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/2fe995482ddd93e201e63c55d9ab773c376aa6f3/JTable.java/buggy/core/src/classpath/javax/javax/swing/JTable.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
509,
11971,
30453,
2802,
10798,
12,
19463,
6021,
6120,
16,
509,
9820,
16,
509,
4068,
13,
225,
288,
474,
366,
273,
261,
492,
2686,
397,
1027,
9524,
1769,
509,
3622,
273,
366,
380,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
11971,
30453,
2802,
10798,
12,
19463,
6021,
6120,
16,
509,
9820,
16,
509,
4068,
13,
225,
288,
474,
366,
273,
261,
492,
2686,
397,
1027,
9524,
1769,
509,
3622,
273,
366,
380,
... | |
FloatedBlockBox floater = LayoutUtil.generateFloated(c, content, available, current, pendingFloats); | FloatedBlockBox floater = LayoutUtil.generateFloated( c, (FloatedBlockContent)content, available, current, pendingFloats); | private static int processOutOfFlowContent(LayoutContext c, Content content, LineBox current, int available, List pendingFloats) { int result = 0; c.pushStyle(content.getStyle()); if (content instanceof AbsolutelyPositionedContent) { LayoutUtil.generateAbsolute(c, content, current); } else if (content instanceof FloatedBlockContent) { FloatedBlockBox floater = LayoutUtil.generateFloated(c, content, available, current, pendingFloats); if (!floater.isPending()) { result = floater.getWidth(); } } c.popStyle(); return result; } | 8125 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8125/0756aea1531c992a3edd221241cc666701847e91/InlineBoxing.java/buggy/src/java/org/xhtmlrenderer/layout/InlineBoxing.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
509,
1207,
11224,
5249,
1350,
12,
3744,
1042,
276,
16,
3697,
913,
16,
5377,
3514,
783,
16,
509,
2319,
16,
987,
4634,
4723,
87,
13,
288,
3639,
509,
563,
273,
374,
31,
3639,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
509,
1207,
11224,
5249,
1350,
12,
3744,
1042,
276,
16,
3697,
913,
16,
5377,
3514,
783,
16,
509,
2319,
16,
987,
4634,
4723,
87,
13,
288,
3639,
509,
563,
273,
374,
31,
3639,
... |
if (obj instanceof Scriptable) { | try { | public static Object setProp(Object obj, String id, Object value, Scriptable scope) { Scriptable start; if (obj instanceof Scriptable) { start = (Scriptable) obj; } else { start = toObject(scope, obj); } if (start == null) { throw NativeGlobal.typeError0("msg.null.to.object", scope); } Scriptable m = start; do { if (m.has(id, start)) { m.put(id, start, value); return value; } m = m.getPrototype(); } while (m != null); start.put(id, start, value); return value; } | 11366 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11366/48465ddb686f28881238111ef580326ba9e38236/ScriptRuntime.java/clean/js/rhino/src/org/mozilla/javascript/ScriptRuntime.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1033,
444,
4658,
12,
921,
1081,
16,
514,
612,
16,
1033,
460,
16,
4766,
22780,
2146,
13,
565,
288,
3639,
22780,
787,
31,
3639,
775,
288,
5411,
787,
273,
261,
3651,
429,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1033,
444,
4658,
12,
921,
1081,
16,
514,
612,
16,
1033,
460,
16,
4766,
22780,
2146,
13,
565,
288,
3639,
22780,
787,
31,
3639,
775,
288,
5411,
787,
273,
261,
3651,
429,
13,
... |
org.exist.xquery.parser.XQueryAST tmp225_AST = null; tmp225_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp225_AST); | org.exist.xquery.parser.XQueryAST tmp224_AST = null; tmp224_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp224_AST); | public final void forwardAxisSpecifier() throws RecognitionException, TokenStreamException { returnAST = null; ASTPair currentAST = new ASTPair(); org.exist.xquery.parser.XQueryAST forwardAxisSpecifier_AST = null; switch ( LA(1)) { case LITERAL_child: { org.exist.xquery.parser.XQueryAST tmp220_AST = null; tmp220_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp220_AST); match(LITERAL_child); forwardAxisSpecifier_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_self: { org.exist.xquery.parser.XQueryAST tmp221_AST = null; tmp221_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp221_AST); match(LITERAL_self); forwardAxisSpecifier_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_attribute: { org.exist.xquery.parser.XQueryAST tmp222_AST = null; tmp222_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp222_AST); match(LITERAL_attribute); forwardAxisSpecifier_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_descendant: { org.exist.xquery.parser.XQueryAST tmp223_AST = null; tmp223_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp223_AST); match(LITERAL_descendant); forwardAxisSpecifier_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case 166: { org.exist.xquery.parser.XQueryAST tmp224_AST = null; tmp224_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp224_AST); match(166); forwardAxisSpecifier_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case 167: { org.exist.xquery.parser.XQueryAST tmp225_AST = null; tmp225_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp225_AST); match(167); forwardAxisSpecifier_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } case LITERAL_following: { org.exist.xquery.parser.XQueryAST tmp226_AST = null; tmp226_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp226_AST); match(LITERAL_following); forwardAxisSpecifier_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; break; } default: { throw new NoViableAltException(LT(1), getFilename()); } } returnAST = forwardAxisSpecifier_AST; } | 2909 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2909/a591df0eed7c1c55bc716a7d445195572abcc4e7/XQueryParser.java/clean/src/org/exist/xquery/parser/XQueryParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
5104,
6558,
21416,
1435,
1216,
9539,
16,
3155,
1228,
503,
288,
9506,
202,
2463,
9053,
273,
446,
31,
202,
202,
9053,
4154,
783,
9053,
273,
394,
9183,
4154,
5621,
202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
5104,
6558,
21416,
1435,
1216,
9539,
16,
3155,
1228,
503,
288,
9506,
202,
2463,
9053,
273,
446,
31,
202,
202,
9053,
4154,
783,
9053,
273,
394,
9183,
4154,
5621,
202,
... |
_t = __t1505; | _t = __t1490; | public final void argfunc(AST _t) throws RecognitionException { AST argfunc_AST_in = (_t == ASTNULL) ? null : (AST)_t; if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case AACBIT: { AST __t1411 = _t; AST tmp344_AST_in = (AST)_t; match(_t,AACBIT); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1411; _t = _t.getNextSibling(); break; } case AAMSG: { AST __t1412 = _t; AST tmp345_AST_in = (AST)_t; match(_t,AAMSG); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1412; _t = _t.getNextSibling(); break; } case ABSOLUTE: { AST __t1413 = _t; AST tmp346_AST_in = (AST)_t; match(_t,ABSOLUTE); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1413; _t = _t.getNextSibling(); break; } case ALIAS: { AST __t1414 = _t; AST tmp347_AST_in = (AST)_t; match(_t,ALIAS); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1414; _t = _t.getNextSibling(); break; } case ASC: { AST __t1415 = _t; AST tmp348_AST_in = (AST)_t; match(_t,ASC); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1415; _t = _t.getNextSibling(); break; } case BASE64DECODE: { AST __t1416 = _t; AST tmp349_AST_in = (AST)_t; match(_t,BASE64DECODE); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1416; _t = _t.getNextSibling(); break; } case BASE64ENCODE: { AST __t1417 = _t; AST tmp350_AST_in = (AST)_t; match(_t,BASE64ENCODE); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1417; _t = _t.getNextSibling(); break; } case CANDO: { AST __t1418 = _t; AST tmp351_AST_in = (AST)_t; match(_t,CANDO); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1418; _t = _t.getNextSibling(); break; } case CANQUERY: { AST __t1419 = _t; AST tmp352_AST_in = (AST)_t; match(_t,CANQUERY); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1419; _t = _t.getNextSibling(); break; } case CANSET: { AST __t1420 = _t; AST tmp353_AST_in = (AST)_t; match(_t,CANSET); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1420; _t = _t.getNextSibling(); break; } case CAPS: { AST __t1421 = _t; AST tmp354_AST_in = (AST)_t; match(_t,CAPS); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1421; _t = _t.getNextSibling(); break; } case CHR: { AST __t1422 = _t; AST tmp355_AST_in = (AST)_t; match(_t,CHR); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1422; _t = _t.getNextSibling(); break; } case CODEPAGECONVERT: { AST __t1423 = _t; AST tmp356_AST_in = (AST)_t; match(_t,CODEPAGECONVERT); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1423; _t = _t.getNextSibling(); break; } case COLLATE: { AST __t1424 = _t; AST tmp357_AST_in = (AST)_t; match(_t,COLLATE); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1424; _t = _t.getNextSibling(); break; } case COMPARE: { AST __t1425 = _t; AST tmp358_AST_in = (AST)_t; match(_t,COMPARE); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1425; _t = _t.getNextSibling(); break; } case CONNECTED: { AST __t1426 = _t; AST tmp359_AST_in = (AST)_t; match(_t,CONNECTED); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1426; _t = _t.getNextSibling(); break; } case COUNTOF: { AST __t1427 = _t; AST tmp360_AST_in = (AST)_t; match(_t,COUNTOF); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1427; _t = _t.getNextSibling(); break; } case CURRENTRESULTROW: { AST __t1428 = _t; AST tmp361_AST_in = (AST)_t; match(_t,CURRENTRESULTROW); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1428; _t = _t.getNextSibling(); break; } case DATE: { AST __t1429 = _t; AST tmp362_AST_in = (AST)_t; match(_t,DATE); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1429; _t = _t.getNextSibling(); break; } case DATETIME: { AST __t1430 = _t; AST tmp363_AST_in = (AST)_t; match(_t,DATETIME); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1430; _t = _t.getNextSibling(); break; } case DATETIMETZ: { AST __t1431 = _t; AST tmp364_AST_in = (AST)_t; match(_t,DATETIMETZ); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1431; _t = _t.getNextSibling(); break; } case DAY: { AST __t1432 = _t; AST tmp365_AST_in = (AST)_t; match(_t,DAY); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1432; _t = _t.getNextSibling(); break; } case DBCODEPAGE: { AST __t1433 = _t; AST tmp366_AST_in = (AST)_t; match(_t,DBCODEPAGE); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1433; _t = _t.getNextSibling(); break; } case DBCOLLATION: { AST __t1434 = _t; AST tmp367_AST_in = (AST)_t; match(_t,DBCOLLATION); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1434; _t = _t.getNextSibling(); break; } case DBPARAM: { AST __t1435 = _t; AST tmp368_AST_in = (AST)_t; match(_t,DBPARAM); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1435; _t = _t.getNextSibling(); break; } case DBRESTRICTIONS: { AST __t1436 = _t; AST tmp369_AST_in = (AST)_t; match(_t,DBRESTRICTIONS); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1436; _t = _t.getNextSibling(); break; } case DBTASKID: { AST __t1437 = _t; AST tmp370_AST_in = (AST)_t; match(_t,DBTASKID); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1437; _t = _t.getNextSibling(); break; } case DBTYPE: { AST __t1438 = _t; AST tmp371_AST_in = (AST)_t; match(_t,DBTYPE); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1438; _t = _t.getNextSibling(); break; } case DBVERSION: { AST __t1439 = _t; AST tmp372_AST_in = (AST)_t; match(_t,DBVERSION); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1439; _t = _t.getNextSibling(); break; } case DECIMAL: { AST __t1440 = _t; AST tmp373_AST_in = (AST)_t; match(_t,DECIMAL); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1440; _t = _t.getNextSibling(); break; } case DECRYPT: { AST __t1441 = _t; AST tmp374_AST_in = (AST)_t; match(_t,DECRYPT); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1441; _t = _t.getNextSibling(); break; } case DYNAMICNEXTVALUE: { AST __t1442 = _t; AST tmp375_AST_in = (AST)_t; match(_t,DYNAMICNEXTVALUE); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1442; _t = _t.getNextSibling(); break; } case ENCODE: { AST __t1443 = _t; AST tmp376_AST_in = (AST)_t; match(_t,ENCODE); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1443; _t = _t.getNextSibling(); break; } case ENCRYPT: { AST __t1444 = _t; AST tmp377_AST_in = (AST)_t; match(_t,ENCRYPT); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1444; _t = _t.getNextSibling(); break; } case EXP: { AST __t1445 = _t; AST tmp378_AST_in = (AST)_t; match(_t,EXP); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1445; _t = _t.getNextSibling(); break; } case FILL: { AST __t1446 = _t; AST tmp379_AST_in = (AST)_t; match(_t,FILL); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1446; _t = _t.getNextSibling(); break; } case FIRST: { AST __t1447 = _t; AST tmp380_AST_in = (AST)_t; match(_t,FIRST); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1447; _t = _t.getNextSibling(); break; } case FIRSTOF: { AST __t1448 = _t; AST tmp381_AST_in = (AST)_t; match(_t,FIRSTOF); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1448; _t = _t.getNextSibling(); break; } case GENERATEPBEKEY: { AST __t1449 = _t; AST tmp382_AST_in = (AST)_t; match(_t,GENERATEPBEKEY); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1449; _t = _t.getNextSibling(); break; } case GETBITS: { AST __t1450 = _t; AST tmp383_AST_in = (AST)_t; match(_t,GETBITS); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1450; _t = _t.getNextSibling(); break; } case GETBYTE: { AST __t1451 = _t; AST tmp384_AST_in = (AST)_t; match(_t,GETBYTE); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1451; _t = _t.getNextSibling(); break; } case GETBYTEORDER: { AST __t1452 = _t; AST tmp385_AST_in = (AST)_t; match(_t,GETBYTEORDER); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1452; _t = _t.getNextSibling(); break; } case GETBYTES: { AST __t1453 = _t; AST tmp386_AST_in = (AST)_t; match(_t,GETBYTES); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1453; _t = _t.getNextSibling(); break; } case GETCOLLATIONS: { AST __t1454 = _t; AST tmp387_AST_in = (AST)_t; match(_t,GETCOLLATIONS); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1454; _t = _t.getNextSibling(); break; } case GETDOUBLE: { AST __t1455 = _t; AST tmp388_AST_in = (AST)_t; match(_t,GETDOUBLE); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1455; _t = _t.getNextSibling(); break; } case GETFLOAT: { AST __t1456 = _t; AST tmp389_AST_in = (AST)_t; match(_t,GETFLOAT); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1456; _t = _t.getNextSibling(); break; } case GETLICENSE: { AST __t1457 = _t; AST tmp390_AST_in = (AST)_t; match(_t,GETLICENSE); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1457; _t = _t.getNextSibling(); break; } case GETLONG: { AST __t1458 = _t; AST tmp391_AST_in = (AST)_t; match(_t,GETLONG); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1458; _t = _t.getNextSibling(); break; } case GETPOINTERVALUE: { AST __t1459 = _t; AST tmp392_AST_in = (AST)_t; match(_t,GETPOINTERVALUE); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1459; _t = _t.getNextSibling(); break; } case GETSHORT: { AST __t1460 = _t; AST tmp393_AST_in = (AST)_t; match(_t,GETSHORT); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1460; _t = _t.getNextSibling(); break; } case GETSIZE: { AST __t1461 = _t; AST tmp394_AST_in = (AST)_t; match(_t,GETSIZE); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1461; _t = _t.getNextSibling(); break; } case GETSTRING: { AST __t1462 = _t; AST tmp395_AST_in = (AST)_t; match(_t,GETSTRING); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1462; _t = _t.getNextSibling(); break; } case GETUNSIGNEDSHORT: { AST __t1463 = _t; AST tmp396_AST_in = (AST)_t; match(_t,GETUNSIGNEDSHORT); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1463; _t = _t.getNextSibling(); break; } case HEXDECODE: { AST __t1464 = _t; AST tmp397_AST_in = (AST)_t; match(_t,HEXDECODE); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1464; _t = _t.getNextSibling(); break; } case HEXENCODE: { AST __t1465 = _t; AST tmp398_AST_in = (AST)_t; match(_t,HEXENCODE); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1465; _t = _t.getNextSibling(); break; } case INDEX: { AST __t1466 = _t; AST tmp399_AST_in = (AST)_t; match(_t,INDEX); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1466; _t = _t.getNextSibling(); break; } case INTEGER: { AST __t1467 = _t; AST tmp400_AST_in = (AST)_t; match(_t,INTEGER); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1467; _t = _t.getNextSibling(); break; } case INTERVAL: { AST __t1468 = _t; AST tmp401_AST_in = (AST)_t; match(_t,INTERVAL); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1468; _t = _t.getNextSibling(); break; } case ISCODEPAGEFIXED: { AST __t1469 = _t; AST tmp402_AST_in = (AST)_t; match(_t,ISCODEPAGEFIXED); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1469; _t = _t.getNextSibling(); break; } case ISCOLUMNCODEPAGE: { AST __t1470 = _t; AST tmp403_AST_in = (AST)_t; match(_t,ISCOLUMNCODEPAGE); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1470; _t = _t.getNextSibling(); break; } case ISLEADBYTE: { AST __t1471 = _t; AST tmp404_AST_in = (AST)_t; match(_t,ISLEADBYTE); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1471; _t = _t.getNextSibling(); break; } case ISODATE: { AST __t1472 = _t; AST tmp405_AST_in = (AST)_t; match(_t,ISODATE); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1472; _t = _t.getNextSibling(); break; } case KBLABEL: { AST __t1473 = _t; AST tmp406_AST_in = (AST)_t; match(_t,KBLABEL); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1473; _t = _t.getNextSibling(); break; } case KEYCODE: { AST __t1474 = _t; AST tmp407_AST_in = (AST)_t; match(_t,KEYCODE); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1474; _t = _t.getNextSibling(); break; } case KEYFUNCTION: { AST __t1475 = _t; AST tmp408_AST_in = (AST)_t; match(_t,KEYFUNCTION); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1475; _t = _t.getNextSibling(); break; } case KEYLABEL: { AST __t1476 = _t; AST tmp409_AST_in = (AST)_t; match(_t,KEYLABEL); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1476; _t = _t.getNextSibling(); break; } case KEYWORD: { AST __t1477 = _t; AST tmp410_AST_in = (AST)_t; match(_t,KEYWORD); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1477; _t = _t.getNextSibling(); break; } case KEYWORDALL: { AST __t1478 = _t; AST tmp411_AST_in = (AST)_t; match(_t,KEYWORDALL); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1478; _t = _t.getNextSibling(); break; } case LAST: { AST __t1479 = _t; AST tmp412_AST_in = (AST)_t; match(_t,LAST); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1479; _t = _t.getNextSibling(); break; } case LASTOF: { AST __t1480 = _t; AST tmp413_AST_in = (AST)_t; match(_t,LASTOF); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1480; _t = _t.getNextSibling(); break; } case LC: { AST __t1481 = _t; AST tmp414_AST_in = (AST)_t; match(_t,LC); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1481; _t = _t.getNextSibling(); break; } case LEFTTRIM: { AST __t1482 = _t; AST tmp415_AST_in = (AST)_t; match(_t,LEFTTRIM); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1482; _t = _t.getNextSibling(); break; } case LIBRARY: { AST __t1483 = _t; AST tmp416_AST_in = (AST)_t; match(_t,LIBRARY); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1483; _t = _t.getNextSibling(); break; } case LISTEVENTS: { AST __t1484 = _t; AST tmp417_AST_in = (AST)_t; match(_t,LISTEVENTS); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1484; _t = _t.getNextSibling(); break; } case LISTQUERYATTRS: { AST __t1485 = _t; AST tmp418_AST_in = (AST)_t; match(_t,LISTQUERYATTRS); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1485; _t = _t.getNextSibling(); break; } case LISTSETATTRS: { AST __t1486 = _t; AST tmp419_AST_in = (AST)_t; match(_t,LISTSETATTRS); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1486; _t = _t.getNextSibling(); break; } case LISTWIDGETS: { AST __t1487 = _t; AST tmp420_AST_in = (AST)_t; match(_t,LISTWIDGETS); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1487; _t = _t.getNextSibling(); break; } case LOADPICTURE: { AST __t1488 = _t; AST tmp421_AST_in = (AST)_t; match(_t,LOADPICTURE); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1488; _t = _t.getNextSibling(); break; } case LOG: { AST __t1489 = _t; AST tmp422_AST_in = (AST)_t; match(_t,LOG); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1489; _t = _t.getNextSibling(); break; } case LOGICAL: { AST __t1490 = _t; AST tmp423_AST_in = (AST)_t; match(_t,LOGICAL); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1490; _t = _t.getNextSibling(); break; } case LOOKUP: { AST __t1491 = _t; AST tmp424_AST_in = (AST)_t; match(_t,LOOKUP); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1491; _t = _t.getNextSibling(); break; } case MAXIMUM: { AST __t1492 = _t; AST tmp425_AST_in = (AST)_t; match(_t,MAXIMUM); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1492; _t = _t.getNextSibling(); break; } case MD5DIGEST: { AST __t1493 = _t; AST tmp426_AST_in = (AST)_t; match(_t,MD5DIGEST); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1493; _t = _t.getNextSibling(); break; } case MEMBER: { AST __t1494 = _t; AST tmp427_AST_in = (AST)_t; match(_t,MEMBER); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1494; _t = _t.getNextSibling(); break; } case MINIMUM: { AST __t1495 = _t; AST tmp428_AST_in = (AST)_t; match(_t,MINIMUM); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1495; _t = _t.getNextSibling(); break; } case MONTH: { AST __t1496 = _t; AST tmp429_AST_in = (AST)_t; match(_t,MONTH); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1496; _t = _t.getNextSibling(); break; } case NORMALIZE: { AST __t1497 = _t; AST tmp430_AST_in = (AST)_t; match(_t,NORMALIZE); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1497; _t = _t.getNextSibling(); break; } case NUMENTRIES: { AST __t1498 = _t; AST tmp431_AST_in = (AST)_t; match(_t,NUMENTRIES); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1498; _t = _t.getNextSibling(); break; } case NUMRESULTS: { AST __t1499 = _t; AST tmp432_AST_in = (AST)_t; match(_t,NUMRESULTS); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1499; _t = _t.getNextSibling(); break; } case OSGETENV: { AST __t1500 = _t; AST tmp433_AST_in = (AST)_t; match(_t,OSGETENV); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1500; _t = _t.getNextSibling(); break; } case PDBNAME: { AST __t1501 = _t; AST tmp434_AST_in = (AST)_t; match(_t,PDBNAME); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1501; _t = _t.getNextSibling(); break; } case PROGRAMNAME: { AST __t1502 = _t; AST tmp435_AST_in = (AST)_t; match(_t,PROGRAMNAME); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1502; _t = _t.getNextSibling(); break; } case QUERYOFFEND: { AST __t1503 = _t; AST tmp436_AST_in = (AST)_t; match(_t,QUERYOFFEND); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1503; _t = _t.getNextSibling(); break; } case QUOTER: { AST __t1504 = _t; AST tmp437_AST_in = (AST)_t; match(_t,QUOTER); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1504; _t = _t.getNextSibling(); break; } case RINDEX: { AST __t1505 = _t; AST tmp438_AST_in = (AST)_t; match(_t,RINDEX); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1505; _t = _t.getNextSibling(); break; } case RANDOM: { AST __t1506 = _t; AST tmp439_AST_in = (AST)_t; match(_t,RANDOM); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1506; _t = _t.getNextSibling(); break; } case REPLACE: { AST __t1507 = _t; AST tmp440_AST_in = (AST)_t; match(_t,REPLACE); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1507; _t = _t.getNextSibling(); break; } case RGBVALUE: { AST __t1508 = _t; AST tmp441_AST_in = (AST)_t; match(_t,RGBVALUE); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1508; _t = _t.getNextSibling(); break; } case RIGHTTRIM: { AST __t1509 = _t; AST tmp442_AST_in = (AST)_t; match(_t,RIGHTTRIM); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1509; _t = _t.getNextSibling(); break; } case ROUND: { AST __t1510 = _t; AST tmp443_AST_in = (AST)_t; match(_t,ROUND); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1510; _t = _t.getNextSibling(); break; } case SDBNAME: { AST __t1511 = _t; AST tmp444_AST_in = (AST)_t; match(_t,SDBNAME); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1511; _t = _t.getNextSibling(); break; } case SEARCH: { AST __t1512 = _t; AST tmp445_AST_in = (AST)_t; match(_t,SEARCH); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1512; _t = _t.getNextSibling(); break; } case SETDBCLIENT: { AST __t1513 = _t; AST tmp446_AST_in = (AST)_t; match(_t,SETDBCLIENT); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1513; _t = _t.getNextSibling(); break; } case SETUSERID: { AST __t1514 = _t; AST tmp447_AST_in = (AST)_t; match(_t,SETUSERID); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1514; _t = _t.getNextSibling(); break; } case SHA1DIGEST: { AST __t1515 = _t; AST tmp448_AST_in = (AST)_t; match(_t,SHA1DIGEST); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1515; _t = _t.getNextSibling(); break; } case SQRT: { AST __t1516 = _t; AST tmp449_AST_in = (AST)_t; match(_t,SQRT); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1516; _t = _t.getNextSibling(); break; } case SSLSERVERNAME: { AST __t1517 = _t; AST tmp450_AST_in = (AST)_t; match(_t,SSLSERVERNAME); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1517; _t = _t.getNextSibling(); break; } case STRING: { AST __t1518 = _t; AST tmp451_AST_in = (AST)_t; match(_t,STRING); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1518; _t = _t.getNextSibling(); break; } case SUBSTITUTE: { AST __t1519 = _t; AST tmp452_AST_in = (AST)_t; match(_t,SUBSTITUTE); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1519; _t = _t.getNextSibling(); break; } case TOROWID: { AST __t1520 = _t; AST tmp453_AST_in = (AST)_t; match(_t,TOROWID); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1520; _t = _t.getNextSibling(); break; } case TRIM: { AST __t1521 = _t; AST tmp454_AST_in = (AST)_t; match(_t,TRIM); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1521; _t = _t.getNextSibling(); break; } case TRUNCATE: { AST __t1522 = _t; AST tmp455_AST_in = (AST)_t; match(_t,TRUNCATE); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1522; _t = _t.getNextSibling(); break; } case TYPEOF: { AST __t1523 = _t; AST tmp456_AST_in = (AST)_t; match(_t,TYPEOF); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1523; _t = _t.getNextSibling(); break; } case VALIDEVENT: { AST __t1524 = _t; AST tmp457_AST_in = (AST)_t; match(_t,VALIDEVENT); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1524; _t = _t.getNextSibling(); break; } case VALIDHANDLE: { AST __t1525 = _t; AST tmp458_AST_in = (AST)_t; match(_t,VALIDHANDLE); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1525; _t = _t.getNextSibling(); break; } case VALIDOBJECT: { AST __t1526 = _t; AST tmp459_AST_in = (AST)_t; match(_t,VALIDOBJECT); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1526; _t = _t.getNextSibling(); break; } case WEEKDAY: { AST __t1527 = _t; AST tmp460_AST_in = (AST)_t; match(_t,WEEKDAY); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1527; _t = _t.getNextSibling(); break; } case WIDGETHANDLE: { AST __t1528 = _t; AST tmp461_AST_in = (AST)_t; match(_t,WIDGETHANDLE); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1528; _t = _t.getNextSibling(); break; } case YEAR: { AST __t1529 = _t; AST tmp462_AST_in = (AST)_t; match(_t,YEAR); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t1529; _t = _t.getNextSibling(); break; } default: { throw new NoViableAltException(_t); } } _retTree = _t; } | 13952 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13952/daa15e07422d3491bbbb4d0060450c81983332a4/TreeParser01.java/buggy/trunk/org.prorefactor.core/src/org/prorefactor/treeparser01/TreeParser01.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
1501,
644,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
1501,
644,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
13,
692,
446,
294,
261,
9053,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
1501,
644,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
1501,
644,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
13,
692,
446,
294,
261,
9053,
... |
public static void setupVerticalAlign(Context c, Node node, InlineBox box) { //u.p("setup vertical align: node = " + node + " box = " + box); // get the parent node for styling Node parent = node.getParentNode(); //u.p("parent = " + parent); Element elem = null; if(node.getNodeType() == node.TEXT_NODE) { parent = parent.getParentNode(); elem = (Element)node.getParentNode(); } else { elem = (Element)node; } //u.p("parent = " + parent + " elem = " + elem); //int parent_height = FontUtil.lineHeight(c,parent); Font parent_font = FontUtil.getFont(c,parent); LineMetrics parent_metrics = null; if(!InlineLayout.isReplaced(node)) { if(!InlineLayout.isFloatedBlock(node,c)) { parent_metrics = parent_font.getLineMetrics(box.text, ((Graphics2D)c.getGraphics()).getFontRenderContext()); } else { parent_metrics = parent_font.getLineMetrics("Test", ((Graphics2D)c.getGraphics()).getFontRenderContext()); } } else { parent_metrics = parent_font.getLineMetrics("Test", ((Graphics2D)c.getGraphics()).getFontRenderContext()); } // the height of the font float parent_height = parent_metrics.getHeight(); //u.p("parent strikethrough height = " + parent_metrics.getStrikethroughOffset()); String vertical_align = c.css.getStringProperty(elem,"vertical-align"); // set the height of the box to the height of the font if(!InlineLayout.isReplaced(node)) { box.height = FontUtil.lineHeight(c,node); } //u.p("vertical align = " + vertical_align); if(vertical_align == null) { vertical_align = "baseline"; } box.baseline = 0; // box.y is relative to the parent's baseline box.y = 0; // do nothing for 'baseline' box.vset = true; if(vertical_align.equals("baseline")) { //noop box.y = box.y; } // works okay i think if(vertical_align.equals("super")) { box.y = box.y + (int) (parent_metrics.getStrikethroughOffset()*2.0); } // works okay, i think if(vertical_align.equals("sub")) { box.y = box.y - (int) parent_metrics.getStrikethroughOffset(); } // joshy: this is using the current baseline instead of the parent's baseline // must fix if(vertical_align.equals("text-top")) { // the top of this text is equal to the top of the parent's text // so we take the parent's height above the baseline and subtract our // height above the baseline box.y = -((int)parent_height - box.height);//(int) (parent_metrics.getStrikethroughOffset()*2.0); } // not implemented correctly yet if(vertical_align.equals("text-bottom")) { box.y = 0; } // not implemented correctly yet. if(vertical_align.equals("top")) { //u.p("before y = " + box.y); //u.p("baseline = " + box.baseline); box.y = box.y - box.baseline;//(int) (parent_metrics.getStrikethroughOffset()*2.0); box.top_align = true; //u.p("after y = " + box.y); box.vset = false; } if(vertical_align.equals("bottom")) { //u.p("before y = " + box.y); //u.p("baseline = " + box.baseline); box.y = box.y - box.baseline;//(int) (parent_metrics.getStrikethroughOffset()*2.0); box.bottom_align = true; //u.p("after y = " + box.y); box.vset = false; } //u.p("returning box: " + box);} | 8125 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8125/bc096001a7ca1e7d5b4aec95b8083245ec783d3a/FontUtil.java/clean/src/java/org/joshy/html/util/FontUtil.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
3845,
6459,
8401,
15704,
10044,
12,
1042,
71,
16,
50,
369,
20680,
16,
10870,
3514,
2147,
15329,
759,
89,
18,
84,
2932,
8401,
17824,
7989,
30,
2159,
1546,
15,
2159,
9078,
2147,
1546,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
3845,
6459,
8401,
15704,
10044,
12,
1042,
71,
16,
50,
369,
20680,
16,
10870,
3514,
2147,
15329,
759,
89,
18,
84,
2932,
8401,
17824,
7989,
30,
2159,
1546,
15,
2159,
9078,
2147,
1546,
15,
... | ||
case TokenStream.GETBASE : name = strings[getShort(iCode, pc + 1)]; | } case TokenStream.GETBASE : { String name = strings[getShort(iCode, pc + 1)]; | public static Object interpret(Context cx, Scriptable scope, Scriptable thisObj, Object[] args, NativeFunction fnOrScript, InterpreterData theData) throws JavaScriptException { if (cx.interpreterSecurityDomain != theData.securityDomain) { // If securityDomain is different, update domain in Cotext // and call self under new domain Object savedDomain = cx.interpreterSecurityDomain; cx.interpreterSecurityDomain = theData.securityDomain; try { return interpret(cx, scope, thisObj, args, fnOrScript, theData); } finally { cx.interpreterSecurityDomain = savedDomain; } } int i; Object lhs; final int maxStack = theData.itsMaxStack; final int maxVars = (fnOrScript.argNames == null) ? 0 : fnOrScript.argNames.length; final int maxLocals = theData.itsMaxLocals; final int maxTryDepth = theData.itsMaxTryDepth; final int VAR_SHFT = maxStack; final int LOCAL_SHFT = VAR_SHFT + maxVars; final int TRY_SCOPE_SHFT = LOCAL_SHFT + maxLocals;// stack[0 <= i < VAR_SHFT]: stack data// stack[VAR_SHFT <= i < LOCAL_SHFT]: variables// stack[LOCAL_SHFT <= i < TRY_SCOPE_SHFT]: used for newtemp/usetemp// stack[TRY_SCOPE_SHFT <= i]: try scopes// when 0 <= i < LOCAL_SHFT and stack[x] == DBL_MRK,// sDbl[i] gives the number value final Object DBL_MRK = Interpreter.DBL_MRK; Object[] stack = new Object[TRY_SCOPE_SHFT + maxTryDepth]; double[] sDbl = new double[TRY_SCOPE_SHFT]; int stackTop = -1; byte[] iCode = theData.itsICode; String[] strings = theData.itsStringTable; int pc = 0; int iCodeLength = theData.itsICodeTop; final Scriptable undefined = Undefined.instance; if (maxVars != 0) { int definedArgs = fnOrScript.argCount; if (definedArgs != 0) { if (definedArgs > args.length) { definedArgs = args.length; } for (i = 0; i != definedArgs; ++i) { stack[VAR_SHFT + i] = args[i]; } } for (i = definedArgs; i != maxVars; ++i) { stack[VAR_SHFT + i] = undefined; } } if (theData.itsNestedFunctions != null) { for (i = 0; i < theData.itsNestedFunctions.length; i++) createFunctionObject(theData.itsNestedFunctions[i], scope); } Object id; Object rhs, val; double valDbl; boolean valBln; int count; int slot; String name = null; Object[] outArgs; int lIntValue; double lDbl; int rIntValue; double rDbl;// tryStack[2 * i]: starting pc of catch block// tryStack[2 * i + 1]: starting pc of finally block int[] tryStack = null; int tryStackTop = 0; InterpreterFrame frame = null; if (cx.debugger != null) { frame = new InterpreterFrame(scope, theData, fnOrScript); cx.pushFrame(frame); } Object result = undefined; int pcPrevBranch = pc; final int instructionThreshold = cx.instructionThreshold; // During function call this will be set to -1 so catch can properly // adjust it int instructionCount = cx.instructionCount; // arbitrary number to add to instructionCount when calling // other functions final int INVOCATION_COST = 100; while (pc < iCodeLength) { try { switch (iCode[pc] & 0xff) { case TokenStream.ENDTRY : tryStackTop--; break; case TokenStream.TRY : if (tryStackTop == 0) { tryStack = new int[maxTryDepth * 2]; } i = getTarget(iCode, pc + 1); if (i == pc) i = 0; tryStack[tryStackTop * 2] = i; i = getTarget(iCode, pc + 3); if (i == (pc + 2)) i = 0; tryStack[tryStackTop * 2 + 1] = i; stack[TRY_SCOPE_SHFT + tryStackTop] = scope; ++tryStackTop; pc += 4; break; case TokenStream.GE : --stackTop; rhs = stack[stackTop + 1]; lhs = stack[stackTop]; if (rhs == DBL_MRK || lhs == DBL_MRK) { rDbl = stack_double(stack, sDbl, stackTop + 1); lDbl = stack_double(stack, sDbl, stackTop); valBln = (rDbl == rDbl && lDbl == lDbl && rDbl <= lDbl); } else { valBln = (1 == ScriptRuntime.cmp_LE(rhs, lhs)); } stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; case TokenStream.LE : --stackTop; rhs = stack[stackTop + 1]; lhs = stack[stackTop]; if (rhs == DBL_MRK || lhs == DBL_MRK) { rDbl = stack_double(stack, sDbl, stackTop + 1); lDbl = stack_double(stack, sDbl, stackTop); valBln = (rDbl == rDbl && lDbl == lDbl && lDbl <= rDbl); } else { valBln = (1 == ScriptRuntime.cmp_LE(lhs, rhs)); } stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; case TokenStream.GT : --stackTop; rhs = stack[stackTop + 1]; lhs = stack[stackTop]; if (rhs == DBL_MRK || lhs == DBL_MRK) { rDbl = stack_double(stack, sDbl, stackTop + 1); lDbl = stack_double(stack, sDbl, stackTop); valBln = (rDbl == rDbl && lDbl == lDbl && rDbl < lDbl); } else { valBln = (1 == ScriptRuntime.cmp_LT(rhs, lhs)); } stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; case TokenStream.LT : --stackTop; rhs = stack[stackTop + 1]; lhs = stack[stackTop]; if (rhs == DBL_MRK || lhs == DBL_MRK) { rDbl = stack_double(stack, sDbl, stackTop + 1); lDbl = stack_double(stack, sDbl, stackTop); valBln = (rDbl == rDbl && lDbl == lDbl && lDbl < rDbl); } else { valBln = (1 == ScriptRuntime.cmp_LT(lhs, rhs)); } stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; case TokenStream.IN : rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); valBln = ScriptRuntime.in(lhs, rhs, scope); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; case TokenStream.INSTANCEOF : rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); valBln = ScriptRuntime.instanceOf(scope, lhs, rhs); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; case TokenStream.EQ : --stackTop; valBln = do_eq(stack, sDbl, stackTop); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; case TokenStream.NE : --stackTop; valBln = !do_eq(stack, sDbl, stackTop); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; case TokenStream.SHEQ : --stackTop; valBln = do_sheq(stack, sDbl, stackTop); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; case TokenStream.SHNE : --stackTop; valBln = !do_sheq(stack, sDbl, stackTop); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; case TokenStream.IFNE : val = stack[stackTop]; if (val != DBL_MRK) { valBln = !ScriptRuntime.toBoolean(val); } else { valDbl = sDbl[stackTop]; valBln = !(valDbl == valDbl && valDbl != 0.0); } --stackTop; if (valBln) { if (instructionThreshold != 0) { instructionCount += pc + 3 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount (instructionCount); instructionCount = 0; } } pcPrevBranch = pc = getTarget(iCode, pc + 1); continue; } pc += 2; break; case TokenStream.IFEQ : val = stack[stackTop]; if (val != DBL_MRK) { valBln = ScriptRuntime.toBoolean(val); } else { valDbl = sDbl[stackTop]; valBln = (valDbl == valDbl && valDbl != 0.0); } --stackTop; if (valBln) { if (instructionThreshold != 0) { instructionCount += pc + 3 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount (instructionCount); instructionCount = 0; } } pcPrevBranch = pc = getTarget(iCode, pc + 1); continue; } pc += 2; break; case TokenStream.GOTO : if (instructionThreshold != 0) { instructionCount += pc + 3 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc = getTarget(iCode, pc + 1); continue; case TokenStream.GOSUB : sDbl[++stackTop] = pc + 3; if (instructionThreshold != 0) { instructionCount += pc + 3 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc = getTarget(iCode, pc + 1); continue; case TokenStream.RETSUB : slot = (iCode[pc + 1] & 0xFF); if (instructionThreshold != 0) { instructionCount += pc + 2 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc = (int)sDbl[LOCAL_SHFT + slot]; continue; case TokenStream.POP : stackTop--; break; case TokenStream.DUP : stack[stackTop + 1] = stack[stackTop]; sDbl[stackTop + 1] = sDbl[stackTop]; stackTop++; break; case TokenStream.POPV : result = stack[stackTop]; if (result == DBL_MRK) result = doubleWrap(sDbl[stackTop]); --stackTop; break; case TokenStream.RETURN : result = stack[stackTop]; if (result == DBL_MRK) result = doubleWrap(sDbl[stackTop]); --stackTop; pc = getTarget(iCode, pc + 1); break; case TokenStream.BITNOT : rIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = ~rIntValue; break; case TokenStream.BITAND : rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue & rIntValue; break; case TokenStream.BITOR : rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue | rIntValue; break; case TokenStream.BITXOR : rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue ^ rIntValue; break; case TokenStream.LSH : rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue << rIntValue; break; case TokenStream.RSH : rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue >> rIntValue; break; case TokenStream.URSH : rIntValue = stack_int32(stack, sDbl, stackTop) & 0x1F; --stackTop; lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = ScriptRuntime.toUint32(lDbl) >>> rIntValue; break; case TokenStream.ADD : --stackTop; do_add(stack, sDbl, stackTop); break; case TokenStream.SUB : rDbl = stack_double(stack, sDbl, stackTop); --stackTop; lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lDbl - rDbl; break; case TokenStream.NEG : rDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = -rDbl; break; case TokenStream.POS : rDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = rDbl; break; case TokenStream.MUL : rDbl = stack_double(stack, sDbl, stackTop); --stackTop; lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lDbl * rDbl; break; case TokenStream.DIV : rDbl = stack_double(stack, sDbl, stackTop); --stackTop; lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; // Detect the divide by zero or let Java do it ? sDbl[stackTop] = lDbl / rDbl; break; case TokenStream.MOD : rDbl = stack_double(stack, sDbl, stackTop); --stackTop; lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lDbl % rDbl; break; case TokenStream.BINDNAME : name = strings[getShort(iCode, pc + 1)]; stack[++stackTop] = ScriptRuntime.bind(scope, name); pc += 2; break; case TokenStream.GETBASE : name = strings[getShort(iCode, pc + 1)]; stack[++stackTop] = ScriptRuntime.getBase(scope, name); pc += 2; break; case TokenStream.SETNAME : rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; lhs = stack[stackTop]; // what about class cast exception here for lhs? stack[stackTop] = ScriptRuntime.setName ((Scriptable)lhs, rhs, scope, strings[getShort(iCode, pc + 1)]); pc += 2; break; case TokenStream.DELPROP : rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.delete(lhs, rhs); break; case TokenStream.GETPROP : name = (String)stack[stackTop]; --stackTop; lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.getProp(lhs, name, scope); break; case TokenStream.SETPROP : rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; name = (String)stack[stackTop]; --stackTop; lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.setProp(lhs, name, rhs, scope); break; case TokenStream.GETELEM : do_getElem(cx, stack, sDbl, stackTop, scope); --stackTop; break; case TokenStream.SETELEM : do_setElem(cx, stack, sDbl, stackTop, scope); stackTop -= 2; break; case TokenStream.PROPINC : name = (String)stack[stackTop]; --stackTop; lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.postIncrement(lhs, name, scope); break; case TokenStream.PROPDEC : name = (String)stack[stackTop]; --stackTop; lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.postDecrement(lhs, name, scope); break; case TokenStream.ELEMINC : rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.postIncrementElem(lhs, rhs, scope); break; case TokenStream.ELEMDEC : rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.postDecrementElem(lhs, rhs, scope); break; case TokenStream.GETTHIS : lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.getThis((Scriptable)lhs); break; case TokenStream.NEWTEMP : slot = (iCode[++pc] & 0xFF); stack[LOCAL_SHFT + slot] = stack[stackTop]; sDbl[LOCAL_SHFT + slot] = sDbl[stackTop]; break; case TokenStream.USETEMP : slot = (iCode[++pc] & 0xFF); ++stackTop; stack[stackTop] = stack[LOCAL_SHFT + slot]; sDbl[stackTop] = sDbl[LOCAL_SHFT + slot]; break; case TokenStream.CALLSPECIAL : if (instructionThreshold != 0) { instructionCount += INVOCATION_COST; cx.instructionCount = instructionCount; instructionCount = -1; } int lineNum = getShort(iCode, pc + 1); name = strings[getShort(iCode, pc + 3)]; count = getShort(iCode, pc + 5); outArgs = getArgsArray(stack, sDbl, stackTop, count); stackTop -= count; rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.callSpecial( cx, lhs, rhs, outArgs, thisObj, scope, name, lineNum); pc += 6; instructionCount = cx.instructionCount; break; case TokenStream.CALL : if (instructionThreshold != 0) { instructionCount += INVOCATION_COST; cx.instructionCount = instructionCount; instructionCount = -1; } cx.instructionCount = instructionCount; count = getShort(iCode, pc + 3); outArgs = getArgsArray(stack, sDbl, stackTop, count); stackTop -= count; rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); if (lhs == undefined) { i = getShort(iCode, pc + 1); if (i != -1) lhs = strings[i]; } Scriptable calleeScope = scope; if (theData.itsNeedsActivation) { calleeScope = ScriptableObject. getTopLevelScope(scope); } stack[stackTop] = ScriptRuntime.call(cx, lhs, rhs, outArgs, calleeScope); pc += 4; instructionCount = cx.instructionCount; break; case TokenStream.NEW : if (instructionThreshold != 0) { instructionCount += INVOCATION_COST; cx.instructionCount = instructionCount; instructionCount = -1; } count = getShort(iCode, pc + 3); outArgs = getArgsArray(stack, sDbl, stackTop, count); stackTop -= count; lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); if (lhs == undefined && getShort(iCode, pc + 1) != -1) { // special code for better error message for call // to undefined lhs = strings[getShort(iCode, pc + 1)]; } stack[stackTop] = ScriptRuntime.newObject(cx, lhs, outArgs, scope); pc += 4; instructionCount = cx.instructionCount; break; case TokenStream.TYPEOF : lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.typeof(lhs); break; case TokenStream.TYPEOFNAME : name = strings[getShort(iCode, pc + 1)]; stack[++stackTop] = ScriptRuntime.typeofName(scope, name); pc += 2; break; case TokenStream.STRING : stack[++stackTop] = strings[getShort(iCode, pc + 1)]; pc += 2; break; case SHORTNUMBER_ICODE : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = getShort(iCode, pc + 1); pc += 2; break; case INTNUMBER_ICODE : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = getInt(iCode, pc + 1); pc += 4; break; case TokenStream.NUMBER : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = theData. itsDoubleTable[getShort(iCode, pc + 1)]; pc += 2; break; case TokenStream.NAME : stack[++stackTop] = ScriptRuntime.name (scope, strings[getShort(iCode, pc + 1)]); pc += 2; break; case TokenStream.NAMEINC : stack[++stackTop] = ScriptRuntime.postIncrement (scope, strings[getShort(iCode, pc + 1)]); pc += 2; break; case TokenStream.NAMEDEC : stack[++stackTop] = ScriptRuntime.postDecrement (scope, strings[getShort(iCode, pc + 1)]); pc += 2; break; case TokenStream.SETVAR : slot = (iCode[++pc] & 0xFF); stack[VAR_SHFT + slot] = stack[stackTop]; sDbl[VAR_SHFT + slot] = sDbl[stackTop]; break; case TokenStream.GETVAR : slot = (iCode[++pc] & 0xFF); ++stackTop; stack[stackTop] = stack[VAR_SHFT + slot]; sDbl[stackTop] = sDbl[VAR_SHFT + slot]; break; case TokenStream.VARINC : slot = (iCode[++pc] & 0xFF); ++stackTop; stack[stackTop] = stack[VAR_SHFT + slot]; sDbl[stackTop] = sDbl[VAR_SHFT + slot]; stack[VAR_SHFT + slot] = DBL_MRK; sDbl[VAR_SHFT + slot] = stack_double(stack, sDbl, stackTop) + 1.0; break; case TokenStream.VARDEC : slot = (iCode[++pc] & 0xFF); ++stackTop; stack[stackTop] = stack[VAR_SHFT + slot]; sDbl[stackTop] = sDbl[VAR_SHFT + slot]; stack[VAR_SHFT + slot] = DBL_MRK; sDbl[VAR_SHFT + slot] = stack_double(stack, sDbl, stackTop) - 1.0; break; case TokenStream.ZERO : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = 0; break; case TokenStream.ONE : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = 1; break; case TokenStream.NULL : stack[++stackTop] = null; break; case TokenStream.THIS : stack[++stackTop] = thisObj; break; case TokenStream.THISFN : stack[++stackTop] = fnOrScript; break; case TokenStream.FALSE : stack[++stackTop] = Boolean.FALSE; break; case TokenStream.TRUE : stack[++stackTop] = Boolean.TRUE; break; case TokenStream.UNDEFINED : stack[++stackTop] = Undefined.instance; break; case TokenStream.THROW : result = stack[stackTop]; if (result == DBL_MRK) result = doubleWrap(sDbl[stackTop]); --stackTop; throw new JavaScriptException(result); case TokenStream.JTHROW : result = stack[stackTop]; // No need to check for DBL_MRK: result is Exception --stackTop; if (result instanceof JavaScriptException) throw (JavaScriptException)result; else throw (RuntimeException)result; case TokenStream.ENTERWITH : lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); --stackTop; scope = ScriptRuntime.enterWith(lhs, scope); break; case TokenStream.LEAVEWITH : scope = ScriptRuntime.leaveWith(scope); break; case TokenStream.NEWSCOPE : stack[++stackTop] = ScriptRuntime.newScope(); break; case TokenStream.ENUMINIT : slot = (iCode[++pc] & 0xFF); lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); --stackTop; stack[LOCAL_SHFT + slot] = ScriptRuntime.initEnum(lhs, scope); break; case TokenStream.ENUMNEXT : slot = (iCode[++pc] & 0xFF); val = stack[LOCAL_SHFT + slot]; ++stackTop; stack[stackTop] = ScriptRuntime. nextEnum((Enumeration)val); break; case TokenStream.GETPROTO : lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.getProto(lhs, scope); break; case TokenStream.GETPARENT : lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.getParent(lhs); break; case TokenStream.GETSCOPEPARENT : lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.getParent(lhs, scope); break; case TokenStream.SETPROTO : rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.setProto(lhs, rhs, scope); break; case TokenStream.SETPARENT : rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.setParent(lhs, rhs, scope); break; case TokenStream.SCOPE : stack[++stackTop] = scope; break; case TokenStream.CLOSURE : i = getShort(iCode, pc + 1); stack[++stackTop] = new InterpretedFunction( theData.itsNestedFunctions[i], scope, cx); createFunctionObject( (InterpretedFunction)stack[stackTop], scope); pc += 2; break; case TokenStream.OBJECT : i = getShort(iCode, pc + 1); stack[++stackTop] = theData.itsRegExpLiterals[i]; pc += 2; break; case SOURCEFILE_ICODE : cx.interpreterSourceFile = theData.itsSourceFile; break; case LINE_ICODE : case BREAKPOINT_ICODE : i = getShort(iCode, pc + 1); cx.interpreterLine = i; if (frame != null) frame.setLineNumber(i); if ((iCode[pc] & 0xff) == BREAKPOINT_ICODE || cx.inLineStepMode) { cx.getDebuggableEngine(). getDebugger().handleBreakpointHit(cx); } pc += 2; break; default : dumpICode(theData); throw new RuntimeException("Unknown icode : " + (iCode[pc] & 0xff) + " @ pc : " + pc); } pc++; } catch (Throwable ex) { if (instructionThreshold != 0) { if (instructionCount < 0) { // throw during function call instructionCount = cx.instructionCount; } else { // throw during any other operation instructionCount += pc - pcPrevBranch; cx.instructionCount = instructionCount; } } final int SCRIPT_THROW = 0, ECMA = 1, RUNTIME = 2, OTHER = 3; int exType; Object errObj; // Object seen by catch for (;;) { if (ex instanceof JavaScriptException) { errObj = ScriptRuntime. unwrapJavaScriptException((JavaScriptException)ex); exType = SCRIPT_THROW; } else if (ex instanceof EcmaError) { // an offical ECMA error object, errObj = ((EcmaError)ex).getErrorObject(); exType = ECMA; } else if (ex instanceof WrappedException) { Object w = ((WrappedException) ex).unwrap(); if (w instanceof Throwable) { ex = (Throwable) w; continue; } errObj = ex; exType = RUNTIME; } else if (ex instanceof RuntimeException) { errObj = ex; exType = RUNTIME; } else { errObj = ex; // Error instance exType = OTHER; } break; } if (exType != OTHER && cx.debugger != null) { cx.debugger.handleExceptionThrown(cx, errObj); } boolean rethrow = true; if (exType != OTHER && tryStackTop > 0) { --tryStackTop; if (exType == SCRIPT_THROW || exType == ECMA) { // Check for catch only for // JavaScriptException and EcmaError pc = tryStack[tryStackTop * 2]; if (pc != 0) { // Has catch block rethrow = false; } } if (rethrow) { pc = tryStack[tryStackTop * 2 + 1]; if (pc != 0) { // has finally block rethrow = false; errObj = ex; } } } if (rethrow) { if (frame != null) cx.popFrame(); if (exType == SCRIPT_THROW) throw (JavaScriptException)ex; if (exType == ECMA || exType == RUNTIME) throw (RuntimeException)ex; throw (Error)ex; } // We caught an exception, // Notify instruction observer if necessary // and point pcPrevBranch to start of catch/finally block if (instructionThreshold != 0) { if (instructionCount > instructionThreshold) { // Note: this can throw Error cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc; // prepare stack and restore this function's security domain. scope = (Scriptable)stack[TRY_SCOPE_SHFT + tryStackTop]; stackTop = 0; stack[0] = errObj; } } if (frame != null) cx.popFrame(); if (instructionThreshold != 0) { if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } cx.instructionCount = instructionCount; } return result; } | 19000 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/19000/7ab2eb958bc5d5b8575262b37554c7e600ccf6e9/Interpreter.java/buggy/src/org/mozilla/javascript/Interpreter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1033,
10634,
12,
1042,
9494,
16,
22780,
2146,
16,
4766,
282,
22780,
15261,
16,
1033,
8526,
833,
16,
4766,
282,
16717,
2083,
2295,
1162,
3651,
16,
4766,
282,
5294,
11599,
751,
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,
760,
1033,
10634,
12,
1042,
9494,
16,
22780,
2146,
16,
4766,
282,
22780,
15261,
16,
1033,
8526,
833,
16,
4766,
282,
16717,
2083,
2295,
1162,
3651,
16,
4766,
282,
5294,
11599,
751,
3... |
public void calculateChecksum(IPatch p,int start,int end,int ofs) | public void calculateChecksum(Patch p,int start,int end,int ofs) | public void calculateChecksum(IPatch p,int start,int end,int ofs) { } | 7591 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7591/8de9e9d107eb8c0487bbadf2f24d3a5cc9bc1add/CasioCZ1000BankDriver.java/buggy/JSynthLib/synthdrivers/CasioCZ1000/CasioCZ1000BankDriver.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
4604,
10723,
12,
7332,
293,
16,
474,
787,
16,
474,
679,
16,
474,
26927,
13,
565,
288,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
4604,
10723,
12,
7332,
293,
16,
474,
787,
16,
474,
679,
16,
474,
26927,
13,
565,
288,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
EOEntity entity=EOModelGroup.defaultGroup().entityNamed("Bug"); EOClassDescription aClassDesc=entity.classDescriptionForInstances(); EOEditingContext peerContext=new EOEditingContext(object.editingContext().parentObjectStore()); EOEnterpriseObject localObject=EOUtilities.localInstanceOfObject(peerContext,object); localObject.addObjectToBothSidesOfRelationshipWithKey(TestItemState.BUG,"state"); EOEnterpriseObject aNewEO=(EOEnterpriseObject)aClassDesc.createInstanceWithEditingContext(peerContext, null); peerContext.insertObject(aNewEO); String entityName = object.entityName(); localObject.addObjectToBothSidesOfRelationshipWithKey(aNewEO,"bugs"); EOEnterpriseObject localUser=EOUtilities.localInstanceOfObject(aNewEO.editingContext(), ((Session)session()).getUser()); aNewEO.addObjectToBothSidesOfRelationshipWithKey(localUser,"originator"); aNewEO.addObjectToBothSidesOfRelationshipWithKey((EOEnterpriseObject)localObject.valueForKey("component"),"component"); String pKey=object.primaryKey(); aNewEO.takeValueForKey("[From Test #"+pKey+"]","textDescription"); EditPageInterface epi=(EditPageInterface)D2W.factory().pageForConfigurationNamed("EditNewBug",session()); epi.setObject(aNewEO); epi.setNextPage(context().page()); /* if(0) { EOEditingContext peer = new EOEditingContext(object.editingContext().parentObjectStore()); | EOEditingContext peer = ERXEC.newEditingContext(object.editingContext().parentObjectStore()); EditPageInterface epi = null; peer.lock(); try { | public WOComponent fileBug() { EOEntity entity=EOModelGroup.defaultGroup().entityNamed("Bug"); EOClassDescription aClassDesc=entity.classDescriptionForInstances(); EOEditingContext peerContext=new EOEditingContext(object.editingContext().parentObjectStore()); EOEnterpriseObject localObject=EOUtilities.localInstanceOfObject(peerContext,object); localObject.addObjectToBothSidesOfRelationshipWithKey(TestItemState.BUG,"state"); EOEnterpriseObject aNewEO=(EOEnterpriseObject)aClassDesc.createInstanceWithEditingContext(peerContext, null); peerContext.insertObject(aNewEO); String entityName = object.entityName(); localObject.addObjectToBothSidesOfRelationshipWithKey(aNewEO,"bugs"); EOEnterpriseObject localUser=EOUtilities.localInstanceOfObject(aNewEO.editingContext(), ((Session)session()).getUser()); aNewEO.addObjectToBothSidesOfRelationshipWithKey(localUser,"originator"); aNewEO.addObjectToBothSidesOfRelationshipWithKey((EOEnterpriseObject)localObject.valueForKey("component"),"component"); String pKey=object.primaryKey(); aNewEO.takeValueForKey("[From Test #"+pKey+"]","textDescription"); //aNewEO.takeValueForKey("[From Test #"+pKey+"]","subject"); EditPageInterface epi=(EditPageInterface)D2W.factory().pageForConfigurationNamed("EditNewBug",session()); epi.setObject(aNewEO); epi.setNextPage(context().page()); /* if(0) { EOEditingContext peer = new EOEditingContext(object.editingContext().parentObjectStore()); TestItem testItem = (TestItem)EOUtilities.localInstanceOfObject(peer,object); People user = (People)EOUtilities.localInstanceOfObject(peer,((Session)session()).getUser()); Component component = valueForKey("component"); Bug bug = new Bug(); peer.insertObject(bug); testItem.setState(TestItem.BUG_STATE); bug.setTextDescription("[From Test #"testItem.primaryKey()+"]"); bug.addtoBothSidesOfTestItems(testItem); bug.addtoBothSidesOfOriginator(user); bug.addtoBothSidesOfComponents(component); EditPageInterface epi=(EditPageInterface)D2W.factory().pageForConfigurationNamed("EditNewBug",session()); epi.setObject(bug); epi.setNextPage(context().page()); return (WOComponent)epi; }*/ return (WOComponent)epi; } | 22541 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/22541/a8f1495dff9fbd49d7378b2716c8774c4b27141d/FileBugFromTestItem.java/buggy/Common/Applications/BugTracker/Sources/er/bugtracker/FileBugFromTestItem.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
678,
51,
1841,
585,
19865,
1435,
288,
3639,
512,
51,
1943,
1522,
33,
41,
51,
1488,
1114,
18,
1886,
1114,
7675,
1096,
7604,
2932,
19865,
8863,
3639,
512,
51,
797,
3291,
20148,
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,
377,
1071,
678,
51,
1841,
585,
19865,
1435,
288,
3639,
512,
51,
1943,
1522,
33,
41,
51,
1488,
1114,
18,
1886,
1114,
7675,
1096,
7604,
2932,
19865,
8863,
3639,
512,
51,
797,
3291,
20148,
4217,
... |
public org.quickfix.field.LegBenchmarkCurvePoint getLegBenchmarkCurvePoint() throws FieldNotFound { org.quickfix.field.LegBenchmarkCurvePoint value = new org.quickfix.field.LegBenchmarkCurvePoint(); | public quickfix.field.LegBenchmarkCurvePoint getLegBenchmarkCurvePoint() throws FieldNotFound { quickfix.field.LegBenchmarkCurvePoint value = new quickfix.field.LegBenchmarkCurvePoint(); | public org.quickfix.field.LegBenchmarkCurvePoint getLegBenchmarkCurvePoint() throws FieldNotFound { org.quickfix.field.LegBenchmarkCurvePoint value = new org.quickfix.field.LegBenchmarkCurvePoint(); getField(value); return value; } | 5926 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5926/fecc27f98261270772ff182a1d4dfd94b5daa73d/SecurityList.java/buggy/src/java/src/quickfix/fix44/SecurityList.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
8329,
30672,
9423,
2148,
336,
8329,
30672,
9423,
2148,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
8329,
30672,
9423,
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,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
8329,
30672,
9423,
2148,
336,
8329,
30672,
9423,
2148,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
8329,
30672,
9423,
2... |
Level.FINEST, "setBinding txn:{0}, name:{1} fails", exception, txn, name); | Level.FINEST, "setBinding txn:{0}, name:{1}, oid:{2,number,#} throws", exception, txn, name, oid); | public void setBinding(Transaction txn, String name, long oid) { RuntimeException exception; try { if (name == null) { throw new NullPointerException("Name must not be null"); } checkId(oid); TxnInfo txnInfo = checkTxn(txn); DatabaseEntry key = new DatabaseEntry(); StringBinding.stringToEntry(name, key); DatabaseEntry value = new DatabaseEntry(); LongBinding.longToEntry(oid, value); OperationStatus status = names.put(txnInfo.bdbTxn, key, value); if (status != OperationStatus.SUCCESS) { throw new DataStoreException( "Setting binding failed: " + status); } txnInfo.modified = true; if (logger.isLoggable(Level.FINEST)) { logger.log( Level.FINEST, "setBinding txn:{0}, name:{1} returns", txn, name); } return; } catch (DatabaseException e) { exception = convertDatabaseException(e); } catch (RuntimeException e) { exception = e; } if (logger.isLoggable(Level.FINEST)) { logger.logThrow( Level.FINEST, "setBinding txn:{0}, name:{1} fails", exception, txn, name); } throw exception; } | 55380 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55380/3be8ecaaa7c3a5e0596ab32fe08bd5a1b114ec27/DataStoreImpl.java/buggy/src/server/j2se/com/sun/sgs/impl/service/data/store/DataStoreImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
444,
5250,
12,
3342,
7827,
16,
514,
508,
16,
1525,
7764,
13,
288,
202,
11949,
1520,
31,
202,
698,
288,
202,
565,
309,
261,
529,
422,
446,
13,
288,
202,
202,
12849,
394,
101... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
444,
5250,
12,
3342,
7827,
16,
514,
508,
16,
1525,
7764,
13,
288,
202,
11949,
1520,
31,
202,
698,
288,
202,
565,
309,
261,
529,
422,
446,
13,
288,
202,
202,
12849,
394,
101... |
case ts.ERROR: | case TokenStream.ERROR: | private Object primaryExpr(TokenStream ts, Source source) throws IOException, JavaScriptException { int tt; Object pn; ts.flags |= ts.TSF_REGEXP; tt = ts.getToken(); ts.flags &= ~ts.TSF_REGEXP; switch(tt) { case ts.FUNCTION: return function(ts, source, true); case ts.LB: { source.append((char)ts.LB); pn = nf.createLeaf(ts.ARRAYLIT); ts.flags |= ts.TSF_REGEXP; boolean matched = ts.matchToken(ts.RB); ts.flags &= ~ts.TSF_REGEXP; if (!matched) { boolean first = true; do { ts.flags |= ts.TSF_REGEXP; tt = ts.peekToken(); ts.flags &= ~ts.TSF_REGEXP; if (!first) source.append((char)ts.COMMA); else first = false; if (tt == ts.RB) { // to fix [,,,].length behavior... break; } if (tt == ts.COMMA) { nf.addChildToBack(pn, nf.createLeaf(ts.PRIMARY, ts.UNDEFINED)); } else { nf.addChildToBack(pn, assignExpr(ts, source, false)); } } while (ts.matchToken(ts.COMMA)); mustMatchToken(ts, ts.RB, "msg.no.bracket.arg"); } source.append((char)ts.RB); return nf.createArrayLiteral(pn); } case ts.LC: { pn = nf.createLeaf(ts.OBJLIT); source.append((char)ts.LC); if (!ts.matchToken(ts.RC)) { boolean first = true; commaloop: do { Object property; if (!first) source.append((char)ts.COMMA); else first = false; tt = ts.getToken(); switch(tt) { // map NAMEs to STRINGs in object literal context. case ts.NAME: case ts.STRING: String s = ts.getString(); source.addString(ts.NAME, s); property = nf.createString(ts.getString()); break; case ts.NUMBER: Number n = ts.getNumber(); source.addNumber(n); property = nf.createNumber(n); break; case ts.RC: // trailing comma is OK. ts.ungetToken(tt); break commaloop; default: reportError(ts, "msg.bad.prop"); break commaloop; } mustMatchToken(ts, ts.COLON, "msg.no.colon.prop"); // OBJLIT is used as ':' in object literal for // decompilation to solve spacing ambiguity. source.append((char)ts.OBJLIT); nf.addChildToBack(pn, property); nf.addChildToBack(pn, assignExpr(ts, source, false)); } while (ts.matchToken(ts.COMMA)); mustMatchToken(ts, ts.RC, "msg.no.brace.prop"); } source.append((char)ts.RC); return nf.createObjectLiteral(pn); } case ts.LP: /* Brendan's IR-jsparse.c makes a new node tagged with * TOK_LP here... I'm not sure I understand why. Isn't * the grouping already implicit in the structure of the * parse tree? also TOK_LP is already overloaded (I * think) in the C IR as 'function call.' */ source.append((char)ts.LP); pn = expr(ts, source, false); source.append((char)ts.RP); mustMatchToken(ts, ts.RP, "msg.no.paren"); return pn; case ts.NAME: String name = ts.getString(); source.addString(ts.NAME, name); return nf.createName(name); case ts.NUMBER: Number n = ts.getNumber(); source.addNumber(n); return nf.createNumber(n); case ts.STRING: String s = ts.getString(); source.addString(ts.STRING, s); return nf.createString(s); case ts.OBJECT: { String flags = ts.regExpFlags; ts.regExpFlags = null; String re = ts.getString(); source.addString(ts.OBJECT, '/' + re + '/' + flags); return nf.createRegExp(re, flags); } case ts.PRIMARY: source.append((char)ts.PRIMARY); source.append((char)ts.getOp()); return nf.createLeaf(ts.PRIMARY, ts.getOp()); case ts.RESERVED: reportError(ts, "msg.reserved.id"); break; case ts.ERROR: /* the scanner or one of its subroutines reported the error. */ break; default: reportError(ts, "msg.syntax"); break; } return null; // should never reach here } | 7555 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7555/40ff06028a06e98171197c83b9b067a0c12f72ae/Parser.java/clean/js/rhino/src/org/mozilla/javascript/Parser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1033,
3354,
4742,
12,
1345,
1228,
3742,
16,
4998,
1084,
13,
3639,
1216,
1860,
16,
11905,
503,
565,
288,
3639,
509,
3574,
31,
3639,
1033,
11059,
31,
3639,
3742,
18,
7133,
5626,
3742,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1033,
3354,
4742,
12,
1345,
1228,
3742,
16,
4998,
1084,
13,
3639,
1216,
1860,
16,
11905,
503,
565,
288,
3639,
509,
3574,
31,
3639,
1033,
11059,
31,
3639,
3742,
18,
7133,
5626,
3742,... |
_started = _context.clock().now(); | _started = getContext().clock().now(); | public Success(TunnelInfo tunnel, SessionKey wrappedKey, Set wrappedTags, PublicKey wrappedTo) { super(RequestTunnelJob.this._context); _tunnel = tunnel; _messages = new LinkedList(); _successCompleted = false; _wrappedKey = wrappedKey; _wrappedTags = wrappedTags; _wrappedTo = wrappedTo; _started = _context.clock().now(); } | 27433 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/27433/e737e5c9507ed0d463dc9e45a8f63657f466b177/RequestTunnelJob.java/buggy/router/java/src/net/i2p/router/tunnelmanager/RequestTunnelJob.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
11958,
12,
20329,
966,
14825,
16,
3877,
653,
5805,
653,
16,
1000,
5805,
3453,
16,
11951,
5805,
774,
13,
288,
5411,
2240,
12,
691,
20329,
2278,
18,
2211,
6315,
2472,
1769,
5411,
389,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
11958,
12,
20329,
966,
14825,
16,
3877,
653,
5805,
653,
16,
1000,
5805,
3453,
16,
11951,
5805,
774,
13,
288,
5411,
2240,
12,
691,
20329,
2278,
18,
2211,
6315,
2472,
1769,
5411,
389,... |
page = ( (FormEditor) editor ).getActivePageInstance( ); | page = ( (MultiPageReportEditor) editor ).getCurrentPageInstance( ); | private SourceViewer getViewer( ) { IEditorPart activeEditor = PlatformUI.getWorkbench( ) .getActiveWorkbenchWindow( ) .getActivePage( ) .getActiveEditor( ); IFormPage page = null; if ( activeEditor instanceof MultiPageReportEditor ) { page = ( (MultiPageReportEditor) activeEditor ).getActivePageInstance( ); } else if ( activeEditor instanceof IReportEditor ) { IEditorPart editor = ( (IReportEditor) activeEditor ).getEditorPart( ); if ( editor instanceof FormEditor ) { page = ( (FormEditor) editor ).getActivePageInstance( ); } } if ( page instanceof ReportScriptFormPage ) { if ( ( (ReportScriptFormPage) page ).getScriptEditor( ) instanceof JSEditor ) { return ( (JSEditor) ( (ReportScriptFormPage) page ).getScriptEditor( ) ).getViewer( ); } } return null; } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/b240651a7b95a8fa44d683f5f9fe03804b7e68af/TreeViewPalettePage.java/buggy/UI/org.eclipse.birt.report.designer.ui.editors.schematic/src/org/eclipse/birt/report/designer/internal/ui/editors/script/TreeViewPalettePage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
4998,
18415,
8893,
264,
12,
262,
202,
95,
202,
202,
45,
6946,
1988,
2695,
6946,
273,
11810,
5370,
18,
588,
2421,
22144,
12,
262,
9506,
202,
18,
588,
3896,
2421,
22144,
3829,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
4998,
18415,
8893,
264,
12,
262,
202,
95,
202,
202,
45,
6946,
1988,
2695,
6946,
273,
11810,
5370,
18,
588,
2421,
22144,
12,
262,
9506,
202,
18,
588,
3896,
2421,
22144,
3829,
... |
public static boolean isHex( String isValidString ){ return( isArrayByteHex( isValidString.getBytes())); } | static boolean isHex( byte octect ) { return( hexNumberTable[octect] != -1 ); } | public static boolean isHex( String isValidString ){ return( isArrayByteHex( isValidString.getBytes())); } | 6373 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6373/45e22dff1ad897916568881983b72f7b21d75377/HexBin.java/buggy/src/org/apache/xerces/utils/HexBin.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1250,
353,
7037,
12,
514,
4908,
780,
262,
95,
1377,
327,
12,
5439,
3216,
7037,
12,
4908,
780,
18,
588,
2160,
1435,
10019,
225,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1250,
353,
7037,
12,
514,
4908,
780,
262,
95,
1377,
327,
12,
5439,
3216,
7037,
12,
4908,
780,
18,
588,
2160,
1435,
10019,
225,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
if (fromCache != null) { communities.add(fromCache); } else { communities.add(new Community(ourContext, row)); } | if (owner == null) { owner = new Community(ourContext, row); } communities.add(owner); Community[] parents = owner.getAllParents(); for (int i = 0; i < parents.length; i++) { communities.add(parents[i]); } | public Community[] getCommunities() throws SQLException { // Get the bundle table rows TableRowIterator tri = DatabaseManager.query(ourContext, "community", "SELECT community.* FROM community, community2collection WHERE " + "community.community_id=community2collection.community_id " + "AND community2collection.collection_id=" + getID() + ";"); // Build a list of Community objects List communities = new ArrayList(); while (tri.hasNext()) { TableRow row = tri.next(); // First check the cache Community fromCache = (Community) ourContext.fromCache( Community.class, row.getIntColumn("community_id")); if (fromCache != null) { communities.add(fromCache); } else { communities.add(new Community(ourContext, row)); } } Community[] communityArray = new Community[communities.size()]; communityArray = (Community[]) communities.toArray(communityArray); return communityArray; } | 47292 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47292/32a2e72e6446991eff68d063df482c7f87eefa1e/Collection.java/buggy/dspace/src/org/dspace/content/Collection.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
16854,
13352,
8526,
336,
12136,
318,
1961,
1435,
3639,
1216,
6483,
565,
288,
3639,
368,
968,
326,
3440,
1014,
2595,
3639,
3555,
1999,
3198,
6882,
273,
5130,
1318,
18,
2271,
12,
477,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
16854,
13352,
8526,
336,
12136,
318,
1961,
1435,
3639,
1216,
6483,
565,
288,
3639,
368,
968,
326,
3440,
1014,
2595,
3639,
3555,
1999,
3198,
6882,
273,
5130,
1318,
18,
2271,
12,
477,
... |
sDbl[stackTop] = idata.itsDoubleTable[getShort(iCode, pc + 1)]; | sDbl[stackTop] = idata.itsDoubleTable[getIndex(iCode, pc + 1)]; | static Object interpret(Context cx, Scriptable scope, Scriptable thisObj, Object[] args, double[] argsDbl, int argShift, int argCount, NativeFunction fnOrScript, InterpreterData idata) throws JavaScriptException { if (cx.interpreterSecurityDomain != idata.securityDomain) { return execWithNewDomain(cx, scope, thisObj, args, argsDbl, argShift, argCount, fnOrScript, idata); } final Object DBL_MRK = Interpreter.DBL_MRK; final Scriptable undefined = Undefined.instance; final int VAR_SHFT = 0; final int maxVars = idata.itsMaxVars; final int LOCAL_SHFT = VAR_SHFT + maxVars; final int TRY_STACK_SHFT = LOCAL_SHFT + idata.itsMaxLocals; final int STACK_SHFT = TRY_STACK_SHFT + idata.itsMaxTryDepth;// stack[VAR_SHFT <= i < LOCAL_SHFT]: variables// stack[LOCAL_SHFT <= i < TRY_STACK_SHFT]: used for newtemp/usetemp// stack[TRY_STACK_SHFT <= i < STACK_SHFT]: stack of try scopes// stack[STACK_SHFT <= i < STACK_SHFT + idata.itsMaxStack]: stack data// sDbl[TRY_STACK_SHFT <= i < STACK_SHFT]: stack of try block pc, stored as doubles// sDbl[any other i]: if stack[i] is DBL_MRK, sDbl[i] holds the number value int maxFrameArray = idata.itsMaxFrameArray; if (maxFrameArray != STACK_SHFT + idata.itsMaxStack) Context.codeBug(); Object[] stack = new Object[maxFrameArray]; double[] sDbl = new double[maxFrameArray]; int stackTop = STACK_SHFT - 1; int tryStackTop = 0; // add TRY_STACK_SHFT to get real index int definedArgs = fnOrScript.argCount; if (definedArgs > argCount) { definedArgs = argCount; } for (int i = 0; i != definedArgs; ++i) { Object arg = args[argShift + i]; stack[VAR_SHFT + i] = arg; if (arg == DBL_MRK) { sDbl[VAR_SHFT + i] = argsDbl[argShift + i]; } } for (int i = definedArgs; i != maxVars; ++i) { stack[VAR_SHFT + i] = undefined; } DebugFrame debuggerFrame = null; if (cx.debugger != null) { DebuggableScript dscript = (DebuggableScript)fnOrScript; debuggerFrame = cx.debugger.getFrame(cx, dscript); } if (idata.itsFunctionType != 0) { if (fnOrScript.itsClosure != null) { scope = fnOrScript.itsClosure; } else if (!idata.itsUseDynamicScope) { scope = fnOrScript.getParentScope(); } if (idata.itsCheckThis) { thisObj = ScriptRuntime.getThis(thisObj); } if (idata.itsNeedsActivation) { if (argsDbl != null) { args = getArgsArray(args, argsDbl, argShift, argCount); argShift = 0; argsDbl = null; } scope = ScriptRuntime.initVarObj(cx, scope, fnOrScript, thisObj, args); } } else { scope = ScriptRuntime.initScript(cx, scope, fnOrScript, thisObj, idata.itsFromEvalCode); } if (idata.itsNestedFunctions != null) { if (idata.itsFunctionType != 0 && !idata.itsNeedsActivation) Context.codeBug(); for (int i = 0; i < idata.itsNestedFunctions.length; i++) { createFunctionObject(idata.itsNestedFunctions[i], scope, idata.itsFromEvalCode); } } boolean useActivationVars = false; if (debuggerFrame != null) { if (argsDbl != null) { args = getArgsArray(args, argsDbl, argShift, argCount); argShift = 0; argsDbl = null; } if (idata.itsFunctionType != 0 && !idata.itsNeedsActivation) { useActivationVars = true; scope = ScriptRuntime.initVarObj(cx, scope, fnOrScript, thisObj, args); } debuggerFrame.onEnter(cx, scope, thisObj, args); } Object result = undefined; byte[] iCode = idata.itsICode; String[] strings = idata.itsStringTable; int pc = 0; int pcPrevBranch = pc; final int instructionThreshold = cx.instructionThreshold; // During function call this will be set to -1 so catch can properly // adjust it int instructionCount = cx.instructionCount; // arbitrary number to add to instructionCount when calling // other functions final int INVOCATION_COST = 100; Loop: while (true) { try { switch (iCode[pc] & 0xff) { // Back indent to ease imlementation reading case TokenStream.ENDTRY : tryStackTop--; break; case TokenStream.TRY : stack[TRY_STACK_SHFT + tryStackTop] = scope; sDbl[TRY_STACK_SHFT + tryStackTop] = (double)pc; ++tryStackTop; // Skip starting pc of catch/finally blocks pc += 4; break; case TokenStream.GE : { --stackTop; Object rhs = stack[stackTop + 1]; Object lhs = stack[stackTop]; boolean valBln; if (rhs == DBL_MRK || lhs == DBL_MRK) { double rDbl = stack_double(stack, sDbl, stackTop + 1); double lDbl = stack_double(stack, sDbl, stackTop); valBln = (rDbl == rDbl && lDbl == lDbl && rDbl <= lDbl); } else { valBln = (1 == ScriptRuntime.cmp_LE(rhs, lhs)); } stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case TokenStream.LE : { --stackTop; Object rhs = stack[stackTop + 1]; Object lhs = stack[stackTop]; boolean valBln; if (rhs == DBL_MRK || lhs == DBL_MRK) { double rDbl = stack_double(stack, sDbl, stackTop + 1); double lDbl = stack_double(stack, sDbl, stackTop); valBln = (rDbl == rDbl && lDbl == lDbl && lDbl <= rDbl); } else { valBln = (1 == ScriptRuntime.cmp_LE(lhs, rhs)); } stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case TokenStream.GT : { --stackTop; Object rhs = stack[stackTop + 1]; Object lhs = stack[stackTop]; boolean valBln; if (rhs == DBL_MRK || lhs == DBL_MRK) { double rDbl = stack_double(stack, sDbl, stackTop + 1); double lDbl = stack_double(stack, sDbl, stackTop); valBln = (rDbl == rDbl && lDbl == lDbl && rDbl < lDbl); } else { valBln = (1 == ScriptRuntime.cmp_LT(rhs, lhs)); } stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case TokenStream.LT : { --stackTop; Object rhs = stack[stackTop + 1]; Object lhs = stack[stackTop]; boolean valBln; if (rhs == DBL_MRK || lhs == DBL_MRK) { double rDbl = stack_double(stack, sDbl, stackTop + 1); double lDbl = stack_double(stack, sDbl, stackTop); valBln = (rDbl == rDbl && lDbl == lDbl && lDbl < rDbl); } else { valBln = (1 == ScriptRuntime.cmp_LT(lhs, rhs)); } stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case TokenStream.IN : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); boolean valBln = ScriptRuntime.in(lhs, rhs, scope); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case TokenStream.INSTANCEOF : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); boolean valBln = ScriptRuntime.instanceOf(scope, lhs, rhs); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case TokenStream.EQ : { --stackTop; boolean valBln = do_eq(stack, sDbl, stackTop); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case TokenStream.NE : { --stackTop; boolean valBln = !do_eq(stack, sDbl, stackTop); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case TokenStream.SHEQ : { --stackTop; boolean valBln = do_sheq(stack, sDbl, stackTop); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case TokenStream.SHNE : { --stackTop; boolean valBln = !do_sheq(stack, sDbl, stackTop); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case TokenStream.IFNE : { Object val = stack[stackTop]; boolean valBln; if (val != DBL_MRK) { valBln = !ScriptRuntime.toBoolean(val); } else { double valDbl = sDbl[stackTop]; valBln = !(valDbl == valDbl && valDbl != 0.0); } --stackTop; if (valBln) { if (instructionThreshold != 0) { instructionCount += pc + 3 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc = getTarget(iCode, pc + 1); continue; } pc += 2; break; } case TokenStream.IFEQ : { boolean valBln; Object val = stack[stackTop]; if (val != DBL_MRK) { valBln = ScriptRuntime.toBoolean(val); } else { double valDbl = sDbl[stackTop]; valBln = (valDbl == valDbl && valDbl != 0.0); } --stackTop; if (valBln) { if (instructionThreshold != 0) { instructionCount += pc + 3 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc = getTarget(iCode, pc + 1); continue; } pc += 2; break; } case TokenStream.GOTO : if (instructionThreshold != 0) { instructionCount += pc + 3 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc = getTarget(iCode, pc + 1); continue; case TokenStream.GOSUB : sDbl[++stackTop] = pc + 3; if (instructionThreshold != 0) { instructionCount += pc + 3 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc = getTarget(iCode, pc + 1); continue; case TokenStream.RETSUB : { int slot = (iCode[pc + 1] & 0xFF); if (instructionThreshold != 0) { instructionCount += pc + 2 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc = (int)sDbl[LOCAL_SHFT + slot]; continue; } case TokenStream.POP : stackTop--; break; case TokenStream.DUP : stack[stackTop + 1] = stack[stackTop]; sDbl[stackTop + 1] = sDbl[stackTop]; stackTop++; break; case TokenStream.POPV : result = stack[stackTop]; if (result == DBL_MRK) result = doubleWrap(sDbl[stackTop]); --stackTop; break; case TokenStream.RETURN : result = stack[stackTop]; if (result == DBL_MRK) result = doubleWrap(sDbl[stackTop]); --stackTop; break Loop; case RETURN_UNDEF_ICODE : result = undefined; break Loop; case END_ICODE: break Loop; case TokenStream.BITNOT : { int rIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = ~rIntValue; break; } case TokenStream.BITAND : { int rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; int lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue & rIntValue; break; } case TokenStream.BITOR : { int rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; int lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue | rIntValue; break; } case TokenStream.BITXOR : { int rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; int lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue ^ rIntValue; break; } case TokenStream.LSH : { int rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; int lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue << rIntValue; break; } case TokenStream.RSH : { int rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; int lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue >> rIntValue; break; } case TokenStream.URSH : { int rIntValue = stack_int32(stack, sDbl, stackTop) & 0x1F; --stackTop; double lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = ScriptRuntime.toUint32(lDbl) >>> rIntValue; break; } case TokenStream.ADD : --stackTop; do_add(stack, sDbl, stackTop); break; case TokenStream.SUB : { double rDbl = stack_double(stack, sDbl, stackTop); --stackTop; double lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lDbl - rDbl; break; } case TokenStream.NEG : { double rDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = -rDbl; break; } case TokenStream.POS : { double rDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = rDbl; break; } case TokenStream.MUL : { double rDbl = stack_double(stack, sDbl, stackTop); --stackTop; double lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lDbl * rDbl; break; } case TokenStream.DIV : { double rDbl = stack_double(stack, sDbl, stackTop); --stackTop; double lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; // Detect the divide by zero or let Java do it ? sDbl[stackTop] = lDbl / rDbl; break; } case TokenStream.MOD : { double rDbl = stack_double(stack, sDbl, stackTop); --stackTop; double lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lDbl % rDbl; break; } case TokenStream.BINDNAME : { String name = strings[getShort(iCode, pc + 1)]; stack[++stackTop] = ScriptRuntime.bind(scope, name); pc += 2; break; } case TokenStream.GETBASE : { String name = strings[getShort(iCode, pc + 1)]; stack[++stackTop] = ScriptRuntime.getBase(scope, name); pc += 2; break; } case TokenStream.SETNAME : { String name = strings[getShort(iCode, pc + 1)]; Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; // what about class cast exception here for lhs? Scriptable lhs = (Scriptable)stack[stackTop]; stack[stackTop] = ScriptRuntime.setName(lhs, rhs, scope, name); pc += 2; break; } case TokenStream.DELPROP : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.delete(lhs, rhs); break; } case TokenStream.GETPROP : { String name = (String)stack[stackTop]; --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.getProp(lhs, name, scope); break; } case TokenStream.SETPROP : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; String name = (String)stack[stackTop]; --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.setProp(lhs, name, rhs, scope); break; } case TokenStream.GETELEM : do_getElem(cx, stack, sDbl, stackTop, scope); --stackTop; break; case TokenStream.SETELEM : do_setElem(cx, stack, sDbl, stackTop, scope); stackTop -= 2; break; case TokenStream.PROPINC : { String name = (String)stack[stackTop]; --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.postIncrement(lhs, name, scope); break; } case TokenStream.PROPDEC : { String name = (String)stack[stackTop]; --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.postDecrement(lhs, name, scope); break; } case TokenStream.ELEMINC : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.postIncrementElem(lhs, rhs, scope); break; } case TokenStream.ELEMDEC : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.postDecrementElem(lhs, rhs, scope); break; } case TokenStream.GETTHIS : { Scriptable lhs = (Scriptable)stack[stackTop]; stack[stackTop] = ScriptRuntime.getThis(lhs); break; } case TokenStream.NEWTEMP : { int slot = (iCode[++pc] & 0xFF); stack[LOCAL_SHFT + slot] = stack[stackTop]; sDbl[LOCAL_SHFT + slot] = sDbl[stackTop]; break; } case TokenStream.USETEMP : { int slot = (iCode[++pc] & 0xFF); ++stackTop; stack[stackTop] = stack[LOCAL_SHFT + slot]; sDbl[stackTop] = sDbl[LOCAL_SHFT + slot]; break; } case TokenStream.CALLSPECIAL : { if (instructionThreshold != 0) { instructionCount += INVOCATION_COST; cx.instructionCount = instructionCount; instructionCount = -1; } int lineNum = getShort(iCode, pc + 1); String name = strings[getShort(iCode, pc + 3)]; int count = getShort(iCode, pc + 5); stackTop -= count; Object[] outArgs = getArgsArray(stack, sDbl, stackTop + 1, count); Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.callSpecial( cx, lhs, rhs, outArgs, thisObj, scope, name, lineNum); pc += 6; instructionCount = cx.instructionCount; break; } case TokenStream.CALL : { if (instructionThreshold != 0) { instructionCount += INVOCATION_COST; cx.instructionCount = instructionCount; instructionCount = -1; } cx.instructionCount = instructionCount; int count = getShort(iCode, pc + 3); stackTop -= count; int calleeArgShft = stackTop + 1; Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; Scriptable calleeScope = scope; if (idata.itsNeedsActivation) { calleeScope = ScriptableObject.getTopLevelScope(scope); } Scriptable calleeThis; if (rhs instanceof Scriptable || rhs == null) { calleeThis = (Scriptable)rhs; } else { calleeThis = ScriptRuntime.toObject(cx, calleeScope, rhs); } if (lhs instanceof InterpretedFunction) { // Inlining of InterpretedFunction.call not to create // argument array InterpretedFunction f = (InterpretedFunction)lhs; stack[stackTop] = interpret(cx, calleeScope, calleeThis, stack, sDbl, calleeArgShft, count, f, f.itsData); } else if (lhs instanceof Function) { Function f = (Function)lhs; Object[] outArgs = getArgsArray(stack, sDbl, calleeArgShft, count); stack[stackTop] = f.call(cx, calleeScope, calleeThis, outArgs); } else { if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); else if (lhs == undefined) { // special code for better error message for call // to undefined int i = getShort(iCode, pc + 1); if (i != -1) lhs = strings[i]; } throw NativeGlobal.typeError1 ("msg.isnt.function", ScriptRuntime.toString(lhs), calleeScope); } pc += 4; instructionCount = cx.instructionCount; break; } case TokenStream.NEW : { if (instructionThreshold != 0) { instructionCount += INVOCATION_COST; cx.instructionCount = instructionCount; instructionCount = -1; } int count = getShort(iCode, pc + 3); stackTop -= count; int calleeArgShft = stackTop + 1; Object lhs = stack[stackTop]; if (lhs instanceof InterpretedFunction) { // Inlining of InterpretedFunction.construct not to create // argument array InterpretedFunction f = (InterpretedFunction)lhs; Scriptable newInstance = f.createObject(cx, scope); Object callResult = interpret(cx, scope, newInstance, stack, sDbl, calleeArgShft, count, f, f.itsData); if (callResult instanceof Scriptable && callResult != undefined) { stack[stackTop] = callResult; } else { stack[stackTop] = newInstance; } } else if (lhs instanceof Function) { Function f = (Function)lhs; Object[] outArgs = getArgsArray(stack, sDbl, calleeArgShft, count); stack[stackTop] = f.construct(cx, scope, outArgs); } else { if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); else if (lhs == undefined) { // special code for better error message for call // to undefined int i = getShort(iCode, pc + 1); if (i != -1) lhs = strings[i]; } throw NativeGlobal.typeError1 ("msg.isnt.function", ScriptRuntime.toString(lhs), scope); } pc += 4; instructionCount = cx.instructionCount; break; } case TokenStream.TYPEOF : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.typeof(lhs); break; } case TokenStream.TYPEOFNAME : { String name = strings[getShort(iCode, pc + 1)]; stack[++stackTop] = ScriptRuntime.typeofName(scope, name); pc += 2; break; } case TokenStream.STRING : stack[++stackTop] = strings[getShort(iCode, pc + 1)]; pc += 2; break; case SHORTNUMBER_ICODE : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = getShort(iCode, pc + 1); pc += 2; break; case INTNUMBER_ICODE : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = getInt(iCode, pc + 1); pc += 4; break; case TokenStream.NUMBER : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = idata.itsDoubleTable[getShort(iCode, pc + 1)]; pc += 2; break; case TokenStream.NAME : { String name = strings[getShort(iCode, pc + 1)]; stack[++stackTop] = ScriptRuntime.name(scope, name); pc += 2; break; } case TokenStream.NAMEINC : { String name = strings[getShort(iCode, pc + 1)]; stack[++stackTop] = ScriptRuntime.postIncrement(scope, name); pc += 2; break; } case TokenStream.NAMEDEC : { String name = strings[getShort(iCode, pc + 1)]; stack[++stackTop] = ScriptRuntime.postDecrement(scope, name); pc += 2; break; } case TokenStream.SETVAR : { int slot = (iCode[++pc] & 0xFF); if (!useActivationVars) { stack[VAR_SHFT + slot] = stack[stackTop]; sDbl[VAR_SHFT + slot] = sDbl[stackTop]; } else { Object val = stack[stackTop]; if (val == DBL_MRK) val = doubleWrap(sDbl[stackTop]); activationPut(fnOrScript, scope, slot, val); } break; } case TokenStream.GETVAR : { int slot = (iCode[++pc] & 0xFF); ++stackTop; if (!useActivationVars) { stack[stackTop] = stack[VAR_SHFT + slot]; sDbl[stackTop] = sDbl[VAR_SHFT + slot]; } else { stack[stackTop] = activationGet(fnOrScript, scope, slot); } break; } case TokenStream.VARINC : { int slot = (iCode[++pc] & 0xFF); ++stackTop; if (!useActivationVars) { stack[stackTop] = stack[VAR_SHFT + slot]; sDbl[stackTop] = sDbl[VAR_SHFT + slot]; stack[VAR_SHFT + slot] = DBL_MRK; sDbl[VAR_SHFT + slot] = stack_double(stack, sDbl, stackTop) + 1.0; } else { Object val = activationGet(fnOrScript, scope, slot); stack[stackTop] = val; val = doubleWrap(ScriptRuntime.toNumber(val) + 1.0); activationPut(fnOrScript, scope, slot, val); } break; } case TokenStream.VARDEC : { int slot = (iCode[++pc] & 0xFF); ++stackTop; if (!useActivationVars) { stack[stackTop] = stack[VAR_SHFT + slot]; sDbl[stackTop] = sDbl[VAR_SHFT + slot]; stack[VAR_SHFT + slot] = DBL_MRK; sDbl[VAR_SHFT + slot] = stack_double(stack, sDbl, stackTop) - 1.0; } else { Object val = activationGet(fnOrScript, scope, slot); stack[stackTop] = val; val = doubleWrap(ScriptRuntime.toNumber(val) - 1.0); activationPut(fnOrScript, scope, slot, val); } break; } case TokenStream.ZERO : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = 0; break; case TokenStream.ONE : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = 1; break; case TokenStream.NULL : stack[++stackTop] = null; break; case TokenStream.THIS : stack[++stackTop] = thisObj; break; case TokenStream.THISFN : stack[++stackTop] = fnOrScript; break; case TokenStream.FALSE : stack[++stackTop] = Boolean.FALSE; break; case TokenStream.TRUE : stack[++stackTop] = Boolean.TRUE; break; case TokenStream.UNDEFINED : stack[++stackTop] = Undefined.instance; break; case TokenStream.THROW : { Object exception = stack[stackTop]; if (exception == DBL_MRK) exception = doubleWrap(sDbl[stackTop]); --stackTop; throw new JavaScriptException(exception); } case TokenStream.JTHROW : { Object exception = stack[stackTop]; // No need to check for DBL_MRK: exception must be Exception --stackTop; if (exception instanceof JavaScriptException) throw (JavaScriptException)exception; else throw (RuntimeException)exception; } case TokenStream.ENTERWITH : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); --stackTop; scope = ScriptRuntime.enterWith(lhs, scope); break; } case TokenStream.LEAVEWITH : scope = ScriptRuntime.leaveWith(scope); break; case TokenStream.NEWSCOPE : stack[++stackTop] = ScriptRuntime.newScope(); break; case TokenStream.ENUMINIT : { int slot = (iCode[++pc] & 0xFF); Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); --stackTop; stack[LOCAL_SHFT + slot] = ScriptRuntime.initEnum(lhs, scope); break; } case TokenStream.ENUMNEXT : { int slot = (iCode[++pc] & 0xFF); Object val = stack[LOCAL_SHFT + slot]; ++stackTop; stack[stackTop] = ScriptRuntime.nextEnum(val); break; } case TokenStream.GETPROTO : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.getProto(lhs, scope); break; } case TokenStream.GETPARENT : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.getParent(lhs); break; } case TokenStream.GETSCOPEPARENT : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.getParent(lhs, scope); break; } case TokenStream.SETPROTO : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.setProto(lhs, rhs, scope); break; } case TokenStream.SETPARENT : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.setParent(lhs, rhs, scope); break; } case TokenStream.SCOPE : stack[++stackTop] = scope; break; case TokenStream.CLOSURE : { int i = getShort(iCode, pc + 1); InterpretedFunction f = idata.itsNestedFunctions[i]; InterpretedFunction closure = new InterpretedFunction(f, scope, cx); createFunctionObject(closure, scope, idata.itsFromEvalCode); stack[++stackTop] = closure; pc += 2; break; } case TokenStream.REGEXP : { int i = getShort(iCode, pc + 1); stack[++stackTop] = idata.itsRegExpLiterals[i]; pc += 2; break; } case SOURCEFILE_ICODE : cx.interpreterSourceFile = idata.itsSourceFile; break; case LINE_ICODE : { int line = getShort(iCode, pc + 1); cx.interpreterLine = line; if (debuggerFrame != null) { debuggerFrame.onLineChange(cx, line); } pc += 2; break; } default : { dumpICode(idata); throw new RuntimeException ("Unknown icode : "+(iCode[pc] & 0xff)+" @ pc : "+pc); } // end of interpreter switch } pc++; } catch (Throwable ex) { if (instructionThreshold != 0) { if (instructionCount < 0) { // throw during function call instructionCount = cx.instructionCount; } else { // throw during any other operation instructionCount += pc - pcPrevBranch; cx.instructionCount = instructionCount; } } final int SCRIPT_THROW = 0, ECMA = 1, RUNTIME = 2, OTHER = 3; int exType; Object catchObj = ex; // Object seen by script catch for (;;) { if (catchObj instanceof JavaScriptException) { catchObj = ScriptRuntime.unwrapJavaScriptException ((JavaScriptException)catchObj); exType = SCRIPT_THROW; } else if (catchObj instanceof EcmaError) { // an offical ECMA error object, catchObj = ((EcmaError)catchObj).getErrorObject(); exType = ECMA; } else if (catchObj instanceof RuntimeException) { if (catchObj instanceof WrappedException) { Object w = ((WrappedException) catchObj).unwrap(); if (w instanceof Throwable) { catchObj = ex = (Throwable) w; continue; } } catchObj = null; // script can not catch this exType = RUNTIME; } else { // Error instance catchObj = null; // script can not catch this exType = OTHER; } break; } if (exType != OTHER && debuggerFrame != null) { debuggerFrame.onExceptionThrown(cx, ex); } boolean rethrow = true; if (exType != OTHER && tryStackTop > 0) { // Do not allow for JS to interfere with Error instances // (exType == OTHER), as they can be used to terminate // long running script --tryStackTop; int try_pc = (int)sDbl[TRY_STACK_SHFT + tryStackTop]; if (exType == SCRIPT_THROW || exType == ECMA) { // Allow JS to catch only JavaScriptException and // EcmaError int catch_offset = getShort(iCode, try_pc + 1); if (catch_offset != 0) { // Has catch block rethrow = false; pc = try_pc + catch_offset; stackTop = STACK_SHFT; stack[stackTop] = catchObj; } } if (rethrow) { int finally_offset = getShort(iCode, try_pc + 3); if (finally_offset != 0) { // has finally block rethrow = false; pc = try_pc + finally_offset; stackTop = STACK_SHFT; stack[stackTop] = ex; } } } if (rethrow) { if (debuggerFrame != null) { debuggerFrame.onExit(cx, true, ex); } if (idata.itsNeedsActivation) { ScriptRuntime.popActivation(cx); } if (exType == SCRIPT_THROW) throw (JavaScriptException)ex; if (exType == ECMA || exType == RUNTIME) throw (RuntimeException)ex; throw (Error)ex; } // We caught an exception, // Notify instruction observer if necessary // and point pcPrevBranch to start of catch/finally block if (instructionThreshold != 0) { if (instructionCount > instructionThreshold) { // Note: this can throw Error cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc; // restore scope at try point scope = (Scriptable)stack[TRY_STACK_SHFT + tryStackTop]; } } if (debuggerFrame != null) { debuggerFrame.onExit(cx, false, result); } if (idata.itsNeedsActivation) { ScriptRuntime.popActivation(cx); } if (instructionThreshold != 0) { if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } cx.instructionCount = instructionCount; } return result; } | 47345 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47345/2e16b18d0d24c5129e654d820e6c7f2155b1b7e0/Interpreter.java/buggy/src/org/mozilla/javascript/Interpreter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
760,
1033,
10634,
12,
1042,
9494,
16,
22780,
2146,
16,
22780,
15261,
16,
18701,
1033,
8526,
833,
16,
1645,
8526,
833,
40,
3083,
16,
18701,
509,
1501,
10544,
16,
509,
1501,
1380,
16,
18701... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
760,
1033,
10634,
12,
1042,
9494,
16,
22780,
2146,
16,
22780,
15261,
16,
18701,
1033,
8526,
833,
16,
1645,
8526,
833,
40,
3083,
16,
18701,
509,
1501,
10544,
16,
509,
1501,
1380,
16,
18701... |
super( viewer, "Refresh" ); | super( viewer, ActionMessages.getString("RefreshMemoryAction.1") ); | public RefreshMemoryAction( MemoryViewer viewer ) { super( viewer, "Refresh" ); //$NON-NLS-1$ fMemoryViewer = viewer; CDebugImages.setLocalImageDescriptors( this, CDebugImages.IMG_LCL_REFRESH ); setDescription( ActionMessages.getString( "RefreshMemoryAction.0" ) ); //$NON-NLS-1$ setToolTipText( ActionMessages.getString( "RefreshMemoryAction.1" ) ); //$NON-NLS-1$ WorkbenchHelp.setHelp( this, ICDebugHelpContextIds.REFRESH_MEMORY_ACTION ); } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/0336349ebe28c2c1a4a96029a13bd1894a738ba7/RefreshMemoryAction.java/buggy/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/RefreshMemoryAction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
14179,
6031,
1803,
12,
9251,
18415,
14157,
262,
288,
202,
202,
9565,
12,
14157,
16,
4382,
5058,
18,
588,
780,
2932,
8323,
6031,
1803,
18,
21,
7923,
11272,
4329,
3993,
17,
5106,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
14179,
6031,
1803,
12,
9251,
18415,
14157,
262,
288,
202,
202,
9565,
12,
14157,
16,
4382,
5058,
18,
588,
780,
2932,
8323,
6031,
1803,
18,
21,
7923,
11272,
4329,
3993,
17,
5106,
... |
protected String jniMangle(MethodBinding binding) { StringBuffer buf = new StringBuffer(); buf.append(jniMangle(getName())); buf.append(getImplSuffix()); buf.append("__"); if (binding.hasContainingType()) { jniMangle(java.nio.ByteBuffer.class, buf, true); } for (int i = 0; i < binding.getNumArguments(); i++) { if (binding.isArgumentThisPointer(i)) { continue; } JavaType type = binding.getJavaArgumentType(i); if (type.isVoid()) { if ((i != 0) || (binding.getNumArguments() > 1)) { throw new RuntimeException("Saw illegal \"void\" argument while emitting \"" + getName() + "\""); } } else { Class c = type.getJavaClass(); if (c != null) { jniMangle(c, buf, false); if (type.isNIOBuffer()) { jniMangle(Integer.TYPE, buf, false); } else if (type.isNIOBufferArray()) { int[] intArrayType = new int[0]; c = intArrayType.getClass(); jniMangle(c , buf, true); } if (type.isPrimitiveArray()) { jniMangle(Integer.TYPE, buf, false); } } else if (type.isCompoundTypeWrapper()) { jniMangle(java.nio.ByteBuffer.class, buf, true); } else if (type.isJNIEnv()) { } else { throw new RuntimeException("Unknown kind of JavaType: name="+type.getName()); } } } return buf.toString(); | protected String jniMangle(String name) { return name.replaceAll("_", "_1").replace('.', '_'); | protected String jniMangle(MethodBinding binding) { StringBuffer buf = new StringBuffer(); buf.append(jniMangle(getName())); buf.append(getImplSuffix()); buf.append("__"); if (binding.hasContainingType()) { // "this" argument always comes down in argument 0 as direct buffer jniMangle(java.nio.ByteBuffer.class, buf, true); } for (int i = 0; i < binding.getNumArguments(); i++) { if (binding.isArgumentThisPointer(i)) { continue; } JavaType type = binding.getJavaArgumentType(i); if (type.isVoid()) { // We should only see "void" as the first argument of a 1-argument function // FIXME: should normalize this in the parser if ((i != 0) || (binding.getNumArguments() > 1)) { throw new RuntimeException("Saw illegal \"void\" argument while emitting \"" + getName() + "\""); } } else { Class c = type.getJavaClass(); if (c != null) { jniMangle(c, buf, false); // If Buffer offset arguments were added, we need to mangle the JNI for the // extra arguments if (type.isNIOBuffer()) { jniMangle(Integer.TYPE, buf, false); } else if (type.isNIOBufferArray()) { int[] intArrayType = new int[0]; c = intArrayType.getClass(); jniMangle(c , buf, true); } if (type.isPrimitiveArray()) { jniMangle(Integer.TYPE, buf, false); } } else if (type.isCompoundTypeWrapper()) { // Mangle wrappers for C structs as ByteBuffer jniMangle(java.nio.ByteBuffer.class, buf, true); } else if (type.isJNIEnv()) { // These are not exposed at the Java level } else { // FIXME: add support for char* -> String conversion throw new RuntimeException("Unknown kind of JavaType: name="+type.getName()); } } } return buf.toString(); } | 47282 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47282/875a3de8f54704604d006badf0f0747347319025/CMethodBindingEmitter.java/buggy/src/classes/com/sun/gluegen/CMethodBindingEmitter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
514,
525,
15834,
49,
4341,
12,
1305,
5250,
5085,
13,
288,
565,
6674,
1681,
273,
394,
6674,
5621,
565,
1681,
18,
6923,
12,
78,
15834,
49,
4341,
12,
17994,
1435,
10019,
565,
1681,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
514,
525,
15834,
49,
4341,
12,
1305,
5250,
5085,
13,
288,
565,
6674,
1681,
273,
394,
6674,
5621,
565,
1681,
18,
6923,
12,
78,
15834,
49,
4341,
12,
17994,
1435,
10019,
565,
1681,
1... |
if (table.isCellSelected(r, c)) | if (table.getSelectionModel().getLeadSelectionIndex() == r && table.getColumnModel().getSelectionModel(). getLeadSelectionIndex() == c) | public void paint(Graphics gfx, JComponent ignored) { int ncols = table.getColumnCount(); int nrows = table.getRowCount(); if (nrows == 0 || ncols == 0) return; Rectangle clip = gfx.getClipBounds(); TableColumnModel cols = table.getColumnModel(); int height = table.getRowHeight(); int x0 = 0, y0 = 0; int x = x0; int y = y0; Dimension gap = table.getIntercellSpacing(); int ymax = clip.y + clip.height; int xmax = clip.x + clip.width; // paint the cell contents for (int c = 0; c < ncols && x < xmax; ++c) { y = y0; TableColumn col = cols.getColumn(c); int width = col.getWidth(); int modelCol = col.getModelIndex(); for (int r = 0; r < nrows && y < ymax; ++r) { Rectangle bounds = new Rectangle(x, y, width, height); if (bounds.intersects(clip)) { TableCellRenderer rend = table.getCellRenderer(r, c); Component comp = table.prepareRenderer(rend, r, c); gfx.translate(x, y); comp.setBounds(new Rectangle(0, 0, width, height)); // Set correct border on cell renderer. if (comp instanceof JComponent) { if (table.isCellSelected(r, c)) ((JComponent) comp).setBorder(highlightCellBorder); else ((JComponent) comp).setBorder(cellBorder); } comp.paint(gfx); gfx.translate(-x, -y); } y += height; if (gap != null) y += gap.height; } x += width; if (gap != null) x += gap.width; } // tighten up the x and y max bounds ymax = y; xmax = x; Color grid = table.getGridColor(); // paint vertical grid lines if (grid != null && table.getShowVerticalLines()) { x = x0; Color save = gfx.getColor(); gfx.setColor(grid); boolean paintedLine = false; for (int c = 0; c < ncols && x < xmax; ++c) { x += cols.getColumn(c).getWidth();; if (gap != null) x += gap.width; gfx.drawLine(x, y0, x, ymax); paintedLine = true; } gfx.setColor(save); } // paint horizontal grid lines if (grid != null && table.getShowHorizontalLines()) { y = y0; Color save = gfx.getColor(); gfx.setColor(grid); boolean paintedLine = false; for (int r = 0; r < nrows && y < ymax; ++r) { y += height; if (gap != null) y += gap.height; gfx.drawLine(x0, y, xmax, y); paintedLine = true; } gfx.setColor(save); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/9cc7b60db57475e9252947e71598fd6bdc44e23e/BasicTableUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTableUI.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
12574,
12,
17558,
30940,
16,
29058,
5455,
13,
282,
288,
565,
509,
21330,
273,
1014,
18,
588,
1494,
1380,
5621,
565,
509,
18871,
273,
1014,
18,
588,
26359,
5621,
565,
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,
1071,
918,
12574,
12,
17558,
30940,
16,
29058,
5455,
13,
282,
288,
565,
509,
21330,
273,
1014,
18,
588,
1494,
1380,
5621,
565,
509,
18871,
273,
1014,
18,
588,
26359,
5621,
565,
309,
261,
... |
newFolder(popupNode); | newMetric(popupNode); | public void actionPerformed(ActionEvent e) { while (! popupNode.getAllowsChildren()) popupNode = (DefaultMutableTreeNode)popupNode.getParent(); newFolder(popupNode); } | 9368 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9368/1ec96a75b0cd71536314f20c8689e8251c203a41/Organizer.java/clean/csmart/src/org/cougaar/tools/csmart/ui/viewer/Organizer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
26100,
12,
1803,
1133,
425,
13,
288,
202,
225,
1323,
16051,
10431,
907,
18,
588,
19132,
4212,
10756,
202,
565,
10431,
907,
273,
261,
1868,
19536,
12513,
13,
16086,
907,
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,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
26100,
12,
1803,
1133,
425,
13,
288,
202,
225,
1323,
16051,
10431,
907,
18,
588,
19132,
4212,
10756,
202,
565,
10431,
907,
273,
261,
1868,
19536,
12513,
13,
16086,
907,
18,... |
AST tmp1526_AST_in = (AST)_t; | AST tmp1525_AST_in = (AST)_t; | public final void systemdialoggetfilestate(AST _t) throws RecognitionException { AST systemdialoggetfilestate_AST_in = (_t == ASTNULL) ? null : (AST)_t; AST __t1151 = _t; AST tmp1525_AST_in = (AST)_t; match(_t,SYSTEMDIALOG); _t = _t.getFirstChild(); AST tmp1526_AST_in = (AST)_t; match(_t,GETFILE); _t = _t.getNextSibling(); fld(_t,CQ.REFUP); _t = _retTree; { _loop1163: do { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case FILTERS: { AST __t1153 = _t; AST tmp1527_AST_in = (AST)_t; match(_t,FILTERS); _t = _t.getFirstChild(); expression(_t); _t = _retTree; expression(_t); _t = _retTree; { _loop1155: do { if (_t==null) _t=ASTNULL; if ((_t.getType()==COMMA)) { AST tmp1528_AST_in = (AST)_t; match(_t,COMMA); _t = _t.getNextSibling(); expression(_t); _t = _retTree; expression(_t); _t = _retTree; } else { break _loop1155; } } while (true); } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case INITIALFILTER: { AST __t1157 = _t; AST tmp1529_AST_in = (AST)_t; match(_t,INITIALFILTER); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t1157; _t = _t.getNextSibling(); break; } case 3: { break; } default: { throw new NoViableAltException(_t); } } } _t = __t1153; _t = _t.getNextSibling(); break; } case ASKOVERWRITE: { AST tmp1530_AST_in = (AST)_t; match(_t,ASKOVERWRITE); _t = _t.getNextSibling(); break; } case CREATETESTFILE: { AST tmp1531_AST_in = (AST)_t; match(_t,CREATETESTFILE); _t = _t.getNextSibling(); break; } case DEFAULTEXTENSION: { AST __t1158 = _t; AST tmp1532_AST_in = (AST)_t; match(_t,DEFAULTEXTENSION); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t1158; _t = _t.getNextSibling(); break; } case INITIALDIR: { AST __t1159 = _t; AST tmp1533_AST_in = (AST)_t; match(_t,INITIALDIR); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t1159; _t = _t.getNextSibling(); break; } case MUSTEXIST: { AST tmp1534_AST_in = (AST)_t; match(_t,MUSTEXIST); _t = _t.getNextSibling(); break; } case RETURNTOSTARTDIR: { AST tmp1535_AST_in = (AST)_t; match(_t,RETURNTOSTARTDIR); _t = _t.getNextSibling(); break; } case SAVEAS: { AST tmp1536_AST_in = (AST)_t; match(_t,SAVEAS); _t = _t.getNextSibling(); break; } case TITLE: { AST __t1160 = _t; AST tmp1537_AST_in = (AST)_t; match(_t,TITLE); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t1160; _t = _t.getNextSibling(); break; } case USEFILENAME: { AST tmp1538_AST_in = (AST)_t; match(_t,USEFILENAME); _t = _t.getNextSibling(); break; } case UPDATE: { AST __t1161 = _t; AST tmp1539_AST_in = (AST)_t; match(_t,UPDATE); _t = _t.getFirstChild(); fld(_t,CQ.UPDATING); _t = _retTree; _t = __t1161; _t = _t.getNextSibling(); break; } case IN_KW: { AST __t1162 = _t; AST tmp1540_AST_in = (AST)_t; match(_t,IN_KW); _t = _t.getFirstChild(); AST tmp1541_AST_in = (AST)_t; match(_t,WINDOW); _t = _t.getNextSibling(); expression(_t); _t = _retTree; _t = __t1162; _t = _t.getNextSibling(); break; } default: { break _loop1163; } } } while (true); } state_end(_t); _t = _retTree; _t = __t1151; _t = _t.getNextSibling(); _retTree = _t; } | 13952 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13952/041a16c78289f1c3ae5e575d3edc5e893a658e50/TreeParser01.java/buggy/trunk/org.prorefactor.core/src/org/prorefactor/treeparser01/TreeParser01.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
2619,
12730,
588,
7540,
395,
340,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
2619,
12730,
588,
7540,
395,
340,
67,
9053,
67,
267,
273,
261,
67,
88,
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,
727,
918,
2619,
12730,
588,
7540,
395,
340,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
2619,
12730,
588,
7540,
395,
340,
67,
9053,
67,
267,
273,
261,
67,
88,
4... |
protected void startExecuteIncrement(Attributes attributes) { LDAPQuery query; switch (current_state) { case LDAPTransformer.STATE_OUTSIDE : current_state = LDAPTransformer.STATE_INSIDE_EXECUTE_INCREMENT; current_query_index = queries.size(); query = new LDAPQuery(this); queries.addElement(query); getCurrentQuery().toDo = LDAPTransformer.STATE_INSIDE_EXECUTE_INCREMENT; getCurrentQuery().query_index = current_query_index; break; case LDAPTransformer.STATE_INSIDE_EXECUTE_QUERY : current_state = LDAPTransformer.STATE_INSIDE_EXECUTE_INCREMENT; current_query_index = queries.size(); query = new LDAPQuery(this); queries.addElement(query); getCurrentQuery().toDo = LDAPTransformer.STATE_INSIDE_EXECUTE_INCREMENT; getCurrentQuery().query_index = current_query_index; break; default : throwIllegalStateException("Not expecting a start execute-increment element"); } } | 46428 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46428/1581e769a869eecca67fa6eec33b342cac1cf145/LDAPTransformer.java/buggy/src/blocks/naming/java/org/apache/cocoon/transformation/LDAPTransformer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4750,
6459,
1937,
5289,
10798,
12,
2498,
4350,
15329,
15496,
1138,
2271,
31,
9610,
12,
2972,
67,
2019,
15329,
3593,
15496,
8319,
18,
7998,
67,
5069,
26498,
30,
2972,
67,
2019,
33,
15496,
8319,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4750,
6459,
1937,
5289,
10798,
12,
2498,
4350,
15329,
15496,
1138,
2271,
31,
9610,
12,
2972,
67,
2019,
15329,
3593,
15496,
8319,
18,
7998,
67,
5069,
26498,
30,
2972,
67,
2019,
33,
15496,
8319,
... | ||
public org.quickfix.field.EncodedSecurityDescLen getEncodedSecurityDescLen() throws FieldNotFound { org.quickfix.field.EncodedSecurityDescLen value = new org.quickfix.field.EncodedSecurityDescLen(); | public quickfix.field.EncodedSecurityDescLen getEncodedSecurityDescLen() throws FieldNotFound { quickfix.field.EncodedSecurityDescLen value = new quickfix.field.EncodedSecurityDescLen(); | public org.quickfix.field.EncodedSecurityDescLen getEncodedSecurityDescLen() throws FieldNotFound { org.quickfix.field.EncodedSecurityDescLen value = new org.quickfix.field.EncodedSecurityDescLen(); getField(value); return value; } | 8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/IndicationofInterest.java/clean/src/java/src/quickfix/fix42/IndicationofInterest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
10397,
4368,
4217,
2891,
28799,
4368,
4217,
2891,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
10397,
4368,
4217,
2891,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4368,
4217,
2891,
28799,
4368,
4217,
2891,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
10397,
4368,
4217,
2891,
... |
return getSkinUri() + "editors/" + EDITOR_TYPE + "/"; | return getSkinUri() + "editors/" + EDITOR_TYPE + "/"; | public String getEditorResourceUri() { return getSkinUri() + "editors/" + EDITOR_TYPE + "/"; } | 8585 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8585/2fa0efcae8f9aa5971c7763269a3b033e9256d4b/CmsSimplePageEditor.java/clean/src/org/opencms/workplace/editors/CmsSimplePageEditor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
336,
6946,
1420,
3006,
1435,
288,
540,
327,
1322,
15984,
3006,
1435,
397,
315,
4619,
1383,
4898,
397,
21307,
916,
67,
2399,
397,
4016,
31,
4202,
289,
2,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
336,
6946,
1420,
3006,
1435,
288,
540,
327,
1322,
15984,
3006,
1435,
397,
315,
4619,
1383,
4898,
397,
21307,
916,
67,
2399,
397,
4016,
31,
4202,
289,
2,
-100,
-100,
-100,
-100,... |
if(foldHandler instanceof DummyFoldHandler) return 0; | for(int i = firstInvalidFoldLevel; i <= line; i++) { newFoldLevel = foldHandler.getFoldLevel(this,i,seg); if(newFoldLevel != offsetMgr.getFoldLevel(i)) changed = true; offsetMgr.setFoldLevel(i,newFoldLevel); } | public int getFoldLevel(int line) { try { writeLock(); if(line < 0 || line >= offsetMgr.getLineCount()) throw new ArrayIndexOutOfBoundsException(line); if(foldHandler instanceof DummyFoldHandler) return 0; int firstInvalidFoldLevel = offsetMgr.getFirstInvalidFoldLevel(); if(firstInvalidFoldLevel == -1 || line < firstInvalidFoldLevel) { return offsetMgr.getFoldLevel(line); } else { if(Debug.FOLD_DEBUG) Log.log(Log.DEBUG,this,"Invalid fold levels from " + firstInvalidFoldLevel + " to " + line); int newFoldLevel = 0; boolean changed = false; for(int i = firstInvalidFoldLevel; i <= line; i++) { newFoldLevel = foldHandler.getFoldLevel(this,i,seg); if(newFoldLevel != offsetMgr.getFoldLevel(i)) changed = true; offsetMgr.setFoldLevel(i,newFoldLevel); } if(line == offsetMgr.getLineCount() - 1) offsetMgr.setFirstInvalidFoldLevel(-1); else offsetMgr.setFirstInvalidFoldLevel(line + 1); if(changed && !getFlag(INSIDE_INSERT)) { //System.err.println("fold level changed: " + start + ":" + line); fireFoldLevelChanged(firstInvalidFoldLevel,line); } return newFoldLevel; } } finally { writeUnlock(); } } //}}} | 8690 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8690/3bc1f67dd057b99582568bdd58cb868f91f12b76/Buffer.java/buggy/org/gjt/sp/jedit/Buffer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
509,
2812,
1673,
2355,
12,
474,
980,
13,
202,
95,
202,
202,
698,
202,
202,
95,
1082,
202,
2626,
2531,
5621,
1082,
202,
430,
12,
1369,
411,
374,
747,
980,
1545,
1384,
9455,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
509,
2812,
1673,
2355,
12,
474,
980,
13,
202,
95,
202,
202,
698,
202,
202,
95,
1082,
202,
2626,
2531,
5621,
1082,
202,
430,
12,
1369,
411,
374,
747,
980,
1545,
1384,
9455,
1... |
model1.insertQuote(); | model1.insertChar('\"'); | public void testInsideQuotePrevious() { model1.insertQuote(); model1.insertBackSlash(); model1.insertQuote(); model1.move(-2); assertEquals("#0.0", "\\\"", model1.currentToken().getType()); assertEquals("#0.1", INSIDE_QUOTE, stateOfCurrentToken(model1)); model1.move(2); model1.insertQuote(); model1.move(-1); assertEquals("#1.0", "\"", model1.currentToken().getType()); assertEquals("#1.1", FREE, stateOfCurrentToken(model1)); assertTrue("#1.2", model1.currentToken().isClosed()); model1.move(1); model1.insertQuote(); model1.insertBackSlash(); model1.insertBackSlash(); model1.move(-2); assertEquals("#2.0", "\\\\", model1.currentToken().getType()); assertEquals("#2.1", INSIDE_QUOTE, stateOfCurrentToken(model1)); model1.move(2); model1.insertBackSlash(); model1.move(-1); assertEquals("#3.0", "\\", model1.currentToken().getType()); assertEquals("#3.1", INSIDE_QUOTE, stateOfCurrentToken(model1)); model1.move(1); model1.insertQuote(); model1.move(-1); assertEquals("#4.0", "\\\"", model1.currentToken().getType()); assertEquals("#4.1", INSIDE_QUOTE, stateOfCurrentToken(model1)); } | 11192 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11192/6f064a351cf6f32ca81eb7bd4e1d9f192f6a46c6/BackSlashTest.java/clean/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/BackSlashTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1842,
18619,
10257,
8351,
1435,
288,
565,
938,
21,
18,
6387,
2156,
2668,
2412,
8284,
565,
938,
21,
18,
6387,
2711,
11033,
5621,
565,
938,
21,
18,
6387,
2156,
2668,
2412,
8284,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1842,
18619,
10257,
8351,
1435,
288,
565,
938,
21,
18,
6387,
2156,
2668,
2412,
8284,
565,
938,
21,
18,
6387,
2711,
11033,
5621,
565,
938,
21,
18,
6387,
2156,
2668,
2412,
8284,
... |
long first = firstChildID(); for (int i = 0; i < children; i++) { Node n = ownerDocument.getNode(first + i); if (n.getNodeType() == Node.ATTRIBUTE_NODE && (n.getNamespaceURI() == null || n.getNamespaceURI().equals(namespaceURI)) && n.getLocalName().equals(localName)) { return true; } } return false; } | long first = firstChildID(); for (int i = 0; i < children; i++) { Node n = ownerDocument.getNode(first + i); if (n.getNodeType() == Node.ATTRIBUTE_NODE && (n.getNamespaceURI() == null || n.getNamespaceURI().equals(namespaceURI)) && n.getLocalName().equals(localName)) { return true; } } return false; } | public boolean hasAttributeNS(String namespaceURI, String localName) { // altheim: 2003-12-02 long first = firstChildID(); for (int i = 0; i < children; i++) { Node n = ownerDocument.getNode(first + i); if (n.getNodeType() == Node.ATTRIBUTE_NODE && (n.getNamespaceURI() == null || n.getNamespaceURI().equals(namespaceURI)) && n.getLocalName().equals(localName)) { return true; } } return false; } | 2909 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2909/5286772980036f677f683fab6a1f3277b38b892f/ElementImpl.java/buggy/src/org/exist/dom/ElementImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
16427,
3156,
12,
780,
19421,
16,
514,
11927,
13,
288,
202,
202,
759,
524,
5787,
381,
30,
4044,
23,
17,
2138,
17,
3103,
202,
202,
5748,
1122,
273,
15070,
734,
5621,
202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
16427,
3156,
12,
780,
19421,
16,
514,
11927,
13,
288,
202,
202,
759,
524,
5787,
381,
30,
4044,
23,
17,
2138,
17,
3103,
202,
202,
5748,
1122,
273,
15070,
734,
5621,
202,
... |
public org.quickfix.field.ContractSettlMonth getContractSettlMonth() throws FieldNotFound { org.quickfix.field.ContractSettlMonth value = new org.quickfix.field.ContractSettlMonth(); | public quickfix.field.ContractSettlMonth getContractSettlMonth() throws FieldNotFound { quickfix.field.ContractSettlMonth value = new quickfix.field.ContractSettlMonth(); | public org.quickfix.field.ContractSettlMonth getContractSettlMonth() throws FieldNotFound { org.quickfix.field.ContractSettlMonth value = new org.quickfix.field.ContractSettlMonth(); getField(value); return value; } | 5926 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5926/fecc27f98261270772ff182a1d4dfd94b5daa73d/SecurityStatusRequest.java/buggy/src/java/src/quickfix/fix44/SecurityStatusRequest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
8924,
694,
6172,
5445,
336,
8924,
694,
6172,
5445,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
8924,
694,
6172,
5445,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8924,
694,
6172,
5445,
336,
8924,
694,
6172,
5445,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
8924,
694,
6172,
5445,
... |
cw.write("explicitscrollonly " + explicitScrollOnly + "\r\n"); cw.write("alwaysscrollonrightclick " + alwaysScrollOnRightClick + "\r\n"); | cw.write("rightdragscroll " + rightDragScroll + "\r\n"); cw.write("tabscroll " + tabScroll + "\r\n"); cw.write("clickedgescroll " + clickEdgeScroll + "\r\n"); cw.write("autoedgescroll " + autoEdgeScroll + "\r\n"); cw.write("scrollsensitivity " + scrollSensitivity + "\r\n"); | public static void save() { // yay! file stuff! try { File cfgfile = new File(cfgFileName); Writer cw = new FileWriter(cfgfile); cw.write(commentChar+" MegaMek config file" + "\r\n"); cw.write(commentChar+" Edit at your own risk" + "\r\n"); cw.write("\r\n"); cw.write("windowpos " + windowPosX + " " + windowPosY + "\r\n"); cw.write("windowsize " + windowSizeWidth + " " + windowSizeHeight + "\r\n"); cw.write("minimapenabled " + minimapEnabled + "\r\n"); cw.write("minimappos " + minimapPosX + " " + minimapPosY + "\r\n"); cw.write("minimapzoom " + minimapZoom + "\r\n"); cw.write("displaypos " + displayPosX + " " + displayPosY + "\r\n"); cw.write("displaysize " + displaySizeWidth + " " + displaySizeHeight + "\r\n"); cw.write("rulerpos " + rulerPosX + " " + rulerPosY + "\r\n"); cw.write("rulersize " + rulerSizeWidth + " " + rulerSizeHeight + "\r\n"); cw.write("rulercolors " + writeColor(rulerColor1) + " " + writeColor(rulerColor2) + "\r\n"); cw.write("autoendfiring " + autoEndFiring + "\r\n"); cw.write("nagformasc " + nagForMASC + "\r\n"); cw.write("nagforpsr " + nagForPSR + "\r\n"); cw.write("nagfornoaction " + nagForNoAction + "\r\n"); cw.write("nagforreadme " + nagForReadme + "\r\n"); cw.write("nagforbotreadme " + nagForBotReadme + "\r\n"); cw.write("nagformapedreadme " + nagForMapEdReadme + "\r\n"); cw.write("playername " + "\"" + escapeTokeniserChars(lastPlayerName) + "\"" + "\r\n"); cw.write("server " + "\"" + lastServerPass + "\" " + lastServerPort + "\r\n"); cw.write("connect " + "\"" + lastConnectAddr + "\" " + lastConnectPort + "\r\n"); cw.write("maptext " + writeColor(mapTextColor) + "\r\n"); cw.write("movedefault " + writeColor(moveDefaultColor) + "\r\n"); cw.write("moverun " + writeColor(moveRunColor) + "\r\n"); cw.write("movejump " + writeColor(moveJumpColor) + "\r\n"); cw.write("moveillegal " + writeColor(moveIllegalColor) + "\r\n"); cw.write("movemasc " + writeColor(moveMASCColor) + "\r\n"); cw.write("maptileset \"" + mapTileset + "\"\r\n"); cw.write("minimapcolours \"" + minimapColours + "\"\r\n"); cw.write("showmovestep " + showMoveStep + "\r\n"); cw.write("movestepdelay " + moveStepDelay + "\r\n"); cw.write("showwrecks " + showWrecks + "\r\n"); cw.write("soundmute " + soundMute + "\r\n"); cw.write("soundbingfilename \"" + soundBingFilename + "\"\r\n"); cw.write("memorydumpon " + memoryDumpOn + "\r\n"); cw.write("minimumdialogsize " + minimumSizeWidth + " " + minimumSizeHeight + "\r\n"); cw.write("mapzoomindex " + mapZoomIndex + "\r\n"); if ( mekHitLocLog != null ) { mekHitLocLog.flush(); mekHitLocLog.close(); cw.write("mekhitloclog \"" + mekHitLocLogName + "\"\r\n"); } cw.write("showmaphexpopup " + showMapHexPopup + "\r\n"); cw.write("tooltipdelay " + tooltipDelay + "\r\n"); cw.write("unitstartchar " + (int) unitStartChar + "\r\n"); cw.write("shiftscrollsensitivity " + shiftScrollSensitivity + "\r\n"); cw.write("maxpathfindertime " + maxPathfinderTime + "\r\n" ); cw.write("explicitscrollonly " + explicitScrollOnly + "\r\n"); cw.write("alwaysscrollonrightclick " + alwaysScrollOnRightClick + "\r\n"); cw.write("getfocus " + getFocus + "\r\n"); cw.write("mechdisplaysmallfontsize " + mechDisplaySmallFontSize + "\r\n"); cw.write("mechdisplaymediumfontsize " + mechDisplayMediumFontSize + "\r\n"); cw.write("mechdisplaylargefontsize " + mechDisplayLargeFontSize + "\r\n"); cw.write("mechdisplayarmorsmallfontsize " + mechDisplayArmorSmallFontSize + "\r\n"); cw.write("mechdisplayarmormediumfontsize " + mechDisplayArmorMediumFontSize + "\r\n"); cw.write("mechdisplayarmorlargefontsize " + mechDisplayArmorLargeFontSize + "\r\n"); // Store all of our "saved" settings. // Need to enclose "/" and "." in quotes Enumeration keys = Settings.saved.propertyNames(); while ( keys.hasMoreElements() ) { final String key = keys.nextElement().toString(); final String value = Settings.saved.getProperty( key ); boolean escapeValue = ( value.indexOf('/') > -1 || value.indexOf('.') > -1 ); cw.write( key ); cw.write( " " ); if ( escapeValue ) cw.write( "\"" ); cw.write( Settings.saved.getProperty(key) ); if ( escapeValue ) cw.write( "\"" ); cw.write( "\r\n" ); } cw.close(); } catch(Exception e) { System.err.println(e.getMessage()); } } | 4135 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4135/e233141f8c7ab296e9731a490092662de288ec7b/Settings.java/buggy/megamek/src/megamek/common/Settings.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
1923,
1435,
288,
3639,
368,
677,
528,
5,
585,
10769,
5,
3639,
775,
288,
5411,
1387,
2776,
768,
273,
394,
1387,
12,
7066,
4771,
1769,
5411,
5497,
14098,
273,
394,
24639,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1923,
1435,
288,
3639,
368,
677,
528,
5,
585,
10769,
5,
3639,
775,
288,
5411,
1387,
2776,
768,
273,
394,
1387,
12,
7066,
4771,
1769,
5411,
5497,
14098,
273,
394,
24639,
... |
else { throw new Error("The remote method threw a java.lang.Throwable that is neither java.lang.Exception nor java.lang.Error.", e); | else { throw new Error( "The remote method threw a java.lang.Throwable that"+ " is neither java.lang.Exception nor java.lang.Error.", e); | public Object incomingMessageCall(UnicastConnection conn, int method, long hash) throws Exception {//System.out.println("method = " + method + ", hash = " + hash); // If method is -1 then this is JDK 1.2 RMI - so use the hash // to locate the method if (method == -1) { Method meth = (Method)methods.get(new Long (hash));//System.out.println("class = " + myself.getClass() + ", meth = " + meth); if (meth == null) { throw new NoSuchMethodException(); } ObjectInputStream in = conn.getObjectInputStream(); int nrargs = meth.getParameterTypes().length; Object[] args = new Object[nrargs]; for (int i = 0; i < nrargs; i++) { /** * For debugging purposes - we don't handle CodeBases * quite right so we don't always find the stubs. This * lets us know that. */ try { // need to handle primitive types args[i] = ((RMIObjectInputStream)in).readValue(meth.getParameterTypes()[i]); } catch (Exception t) { t.printStackTrace(); throw t; } } //We must reinterpret the exception thrown by meth.invoke() //return (meth.invoke(myself, args)); Object ret = null; try{ ret = meth.invoke(myself, args); }catch(InvocationTargetException e){ Throwable cause = e.getTargetException(); if (cause instanceof Exception) { throw (Exception)cause; } else if (cause instanceof Error) { throw (Error)cause; } else { throw new Error("The remote method threw a java.lang.Throwable that is neither java.lang.Exception nor java.lang.Error.", e); } } return ret; } // Otherwise this is JDK 1.1 style RMI - we find the skeleton // and invoke it using the method number. We wrap up our // connection system in a UnicastRemoteCall so it appears in a // way the Skeleton can handle. else { if (skel == null) { throw new NoSuchMethodException(); } UnicastRemoteCall call = new UnicastRemoteCall(conn); skel.dispatch(myself, call, method, hash); if (!call.isReturnValue()) return RMIVoidValue.INSTANCE; else return (call.returnValue()); }} | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/b9aa2b76c5fb6ec27c94f7eecf71cb3bc137fe2f/UnicastServerRef.java/clean/core/src/classpath/gnu/gnu/java/rmi/server/UnicastServerRef.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
1033,
6935,
1079,
1477,
12,
984,
12544,
1952,
1487,
16,
509,
707,
16,
1525,
1651,
13,
1216,
1185,
288,
759,
3163,
18,
659,
18,
8222,
2932,
2039,
273,
315,
397,
707,
397,
3104,
1651,
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,
1071,
1033,
6935,
1079,
1477,
12,
984,
12544,
1952,
1487,
16,
509,
707,
16,
1525,
1651,
13,
1216,
1185,
288,
759,
3163,
18,
659,
18,
8222,
2932,
2039,
273,
315,
397,
707,
397,
3104,
1651,
27... |
super( owner, tagName); | super( owner, tagName); | public WMLInputElementImpl (WMLDocumentImpl owner, String tagName) { super( owner, tagName); } | 1831 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1831/bf94d6634ab3635fdb8210105d9c1c839d13e555/WMLInputElementImpl.java/clean/src/org/apache/wml/dom/WMLInputElementImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
678,
1495,
1210,
1046,
2828,
261,
59,
1495,
2519,
2828,
3410,
16,
514,
7196,
13,
288,
202,
9565,
12,
3410,
16,
7196,
1769,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
678,
1495,
1210,
1046,
2828,
261,
59,
1495,
2519,
2828,
3410,
16,
514,
7196,
13,
288,
202,
9565,
12,
3410,
16,
7196,
1769,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
case Id_toExponential: return realThis(thisObj, f).jsFunction_toExponential(cx, args); case Id_toPrecision: return realThis(thisObj, f).jsFunction_toPrecision(cx, args); | case Id_toPrecision:return realThis(thisObj, f). jsFunction_toPrecision(cx, args); } | public Object execMethod (int methodId, IdFunction f, Context cx, Scriptable scope, Scriptable thisObj, Object[] args) throws JavaScriptException { switch (methodId) { case Id_constructor: return jsConstructor(args, thisObj == null); case Id_toString: return realThis(thisObj, f). jsFunction_toString(toBase(args, 0)); case Id_valueOf: return wrap_double(realThis(thisObj, f). jsFunction_valueOf()); case Id_toLocaleString: return realThis(thisObj, f). jsFunction_toLocaleString(toBase(args, 0)); case Id_toFixed: return realThis(thisObj, f).jsFunction_toFixed(cx, args); case Id_toExponential: return realThis(thisObj, f).jsFunction_toExponential(cx, args); case Id_toPrecision: return realThis(thisObj, f).jsFunction_toPrecision(cx, args); } return super.execMethod(methodId, f, cx, scope, thisObj, args); } | 47345 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47345/3db7f50283cb2dd0859494c7e36c278004f2f6a8/NativeNumber.java/buggy/src/org/mozilla/javascript/NativeNumber.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
1196,
1305,
3639,
261,
474,
707,
548,
16,
3124,
2083,
284,
16,
540,
1772,
9494,
16,
22780,
2146,
16,
22780,
15261,
16,
1033,
8526,
833,
13,
3639,
1216,
11905,
503,
565,
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,
1033,
1196,
1305,
3639,
261,
474,
707,
548,
16,
3124,
2083,
284,
16,
540,
1772,
9494,
16,
22780,
2146,
16,
22780,
15261,
16,
1033,
8526,
833,
13,
3639,
1216,
11905,
503,
565,
288,
... |
protected abstract List<AbstractQueryHit> performQuery(AbstractRepositoryQuery query, IProgressMonitor monitor, MultiStatus queryStatus); | protected abstract List<AbstractQueryHit> performQuery(AbstractRepositoryQuery query, IProgressMonitor monitor, MultiStatus queryStatus); | protected abstract List<AbstractQueryHit> performQuery(AbstractRepositoryQuery query, IProgressMonitor monitor, MultiStatus queryStatus); | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/3bf6adb12db8a09df2fa26add6a4af4dda9ac003/AbstractRepositoryConnector.java/buggy/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/provisional/tasklist/AbstractRepositoryConnector.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
8770,
987,
32,
7469,
1138,
13616,
34,
3073,
1138,
12,
7469,
3305,
1138,
843,
16,
467,
5491,
7187,
6438,
16,
5991,
1482,
843,
1482,
1769,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
8770,
987,
32,
7469,
1138,
13616,
34,
3073,
1138,
12,
7469,
3305,
1138,
843,
16,
467,
5491,
7187,
6438,
16,
5991,
1482,
843,
1482,
1769,
2,
-100,
-100,
-100,
-100,
-100,
-100,
... |
MavenSettingsBuilder builder = (MavenSettingsBuilder) container.lookup( MavenSettingsBuilder.ROLE ); | public final void setUp() throws Exception { super.setUp(); FileUtils.deleteDirectory( getGeneratedSources() ); assertTrue( getGeneratedSources().mkdirs() ); MavenSettingsBuilder builder = (MavenSettingsBuilder) container.lookup( MavenSettingsBuilder.ROLE ); ArtifactRepositoryLayout repositoryLayout = (ArtifactRepositoryLayout) container.lookup( ArtifactRepositoryLayout.ROLE, "default" ); String url = "file://" + builder.buildSettings().getLocalRepository(); repository = new ArtifactRepository( "local", url, repositoryLayout ); } | 47828 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47828/fa3e85c7b74de314a2d09ad3198420f5d54489aa/ModelloGeneratorTest.java/clean/modello-test/src/main/java/org/codehaus/modello/ModelloGeneratorTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
727,
918,
24292,
1435,
3639,
1216,
1185,
565,
288,
3639,
2240,
18,
542,
1211,
5621,
3639,
13779,
18,
3733,
2853,
12,
336,
7823,
8628,
1435,
11272,
3639,
1815,
5510,
12,
336,
7823,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
727,
918,
24292,
1435,
3639,
1216,
1185,
565,
288,
3639,
2240,
18,
542,
1211,
5621,
3639,
13779,
18,
3733,
2853,
12,
336,
7823,
8628,
1435,
11272,
3639,
1815,
5510,
12,
336,
7823,
8... | |
private void internalRefreshAll(boolean updateLabels) { // the parent // in the code below, it is important to do all disassociates // before any associates, since a later disassociate can undo an // earlier associate // e.g. if (a, b) is replaced by (b, a), the disassociate of b to // item 1 could undo // the associate of b to item 0. Object[] children = getSortedChildren(getRoot()); TableItem[] items = getTable().getItems(); int min = Math.min(children.length, items.length); for (int i = 0; i < min; ++i) { TableItem item = items[i]; // if the element is unchanged, update its label if appropriate if (equals(children[i], item.getData())) { if (updateLabels) { updateItem(item, children[i]); } else { // associate the new element, even if equal to the old // one, // to remove stale references (see bug 31314) associate(children[i], item); } } else { // updateItem does an associate(...), which can mess up // the associations if the order of elements has changed. // E.g. (a, b) -> (b, a) first replaces a->0 with b->0, then // replaces b->1 with a->1, but this actually removes b->0. // So, if the object associated with this item has changed, // just disassociate it for now, and update it below. item.setText(""); //$NON-NLS-1$ item.setImage(new Image[Math.max(1,table.getColumnCount())]);//Clear all images disassociate(item); } } // dispose of all items beyond the end of the current elements if (min < items.length) { for (int i = items.length; --i >= min;) { disassociate(items[i]); } table.remove(min, items.length - 1); } // Workaround for 1GDGN4Q: ITPUI:WIN2000 - TableViewer icons get // scrunched if (table.getItemCount() == 0) { table.removeAll(); } // Update items which were removed above for (int i = 0; i < min; ++i) { TableItem item = items[i]; if (item.getData() == null) { updateItem(item, children[i]); } } // add any remaining elements for (int i = min; i < children.length; ++i) { createItem(children[i],i); } } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/72b02dfa9a75652d45af68d329d447e0e8bbe40d/TableViewer.java/buggy/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/TableViewer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
2713,
8323,
1595,
12,
6494,
1089,
5888,
13,
288,
202,
202,
759,
326,
982,
202,
202,
759,
316,
326,
981,
5712,
16,
518,
353,
10802,
358,
741,
777,
1015,
7836,
815,
202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
2713,
8323,
1595,
12,
6494,
1089,
5888,
13,
288,
202,
202,
759,
326,
982,
202,
202,
759,
316,
326,
981,
5712,
16,
518,
353,
10802,
358,
741,
777,
1015,
7836,
815,
202,
... | ||
else if (preAuthenticatedSessions.containsValue(session)) { preAuthenticatedSessions.remove(session.getAddress().getResource()); } | public void removeSession(ClientSession session) { // TODO: Requires better error checking to ensure the session count is maintained // TODO: properly (removal actually does remove). // Do nothing if session is null or if the server is shutting down. Note: When the server // is shutting down the serverName will be null. if (session == null || serverName == null) { return; } SessionMap sessionMap; if (anonymousSessions.containsValue(session)) { anonymousSessions.remove(session.getAddress().getResource()); // Fire session event. SessionEventDispatcher.dispatchEvent(session, SessionEventDispatcher.EventType.anonymous_session_destroyed); } else { // If this is a non-anonymous session then remove the session from the SessionMap if (session.getAddress() != null && userManager.isRegisteredUser(session.getAddress().getNode())) { String username = session.getAddress().getNode(); synchronized (username.intern()) { sessionMap = sessions.get(username); if (sessionMap != null) { sessionMap.removeSession(session); if (sessionMap.isEmpty()) { sessions.remove(username); } } } if (sessionMap != null) { // Fire session event. SessionEventDispatcher.dispatchEvent(session, SessionEventDispatcher.EventType.session_destroyed); } } } // If the user is still available then send an unavailable presence Presence presence = session.getPresence(); if (presence == null || presence.isAvailable()) { Presence offline = new Presence(); offline.setFrom(session.getAddress()); offline.setTo(new JID(null, serverName, null)); offline.setType(Presence.Type.unavailable); router.route(offline); } else if (preAuthenticatedSessions.containsValue(session)) { // Remove the session from the pre-Authenticated sessions list preAuthenticatedSessions.remove(session.getAddress().getResource()); } } | 6161 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6161/73c80095baeb36786b8cdb170ab34484c2513c68/SessionManager.java/clean/src/java/org/jivesoftware/wildfire/SessionManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1206,
2157,
12,
1227,
2157,
1339,
13,
288,
3639,
368,
2660,
30,
16412,
7844,
555,
6728,
358,
3387,
326,
1339,
1056,
353,
11566,
8707,
3639,
368,
2660,
30,
8214,
261,
2764,
1086... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1206,
2157,
12,
1227,
2157,
1339,
13,
288,
3639,
368,
2660,
30,
16412,
7844,
555,
6728,
358,
3387,
326,
1339,
1056,
353,
11566,
8707,
3639,
368,
2660,
30,
8214,
261,
2764,
1086... | |
this.htmlStyleClass = htmlStyleClass; } | this.htmlStyleClass = htmlStyleClass; } | public void setHtmlStyleClass(String htmlStyleClass) { this.htmlStyleClass = htmlStyleClass; } | 6653 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6653/6374fb541ec4c884f13ffe782fa31c3ec1facb37/Document.java/clean/src/com/lowagie/text/Document.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
444,
4353,
2885,
797,
12,
780,
1729,
2885,
797,
13,
288,
3639,
333,
18,
2620,
2885,
797,
273,
1729,
2885,
797,
31,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
444,
4353,
2885,
797,
12,
780,
1729,
2885,
797,
13,
288,
3639,
333,
18,
2620,
2885,
797,
273,
1729,
2885,
797,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Map partitioners= null; | public void format() { super.format(); final IDocument document= (IDocument)fDocuments.removeFirst(); final TypedPosition partition= (TypedPosition)fPartitions.removeFirst(); if (document != null && partition != null) { try { final TextEdit edit= CodeFormatterUtil.format2(CodeFormatter.K_COMPILATION_UNIT, document.get(), partition.getOffset(), partition.getLength(), 0, TextUtilities.getDefaultLineDelimiter(document), getPreferences()); if (edit != null) { Map partitioners= null; if (edit.getChildrenSize() > 20) partitioners= TextUtilities.removeDocumentPartitioners(document); edit.apply(document); if (partitioners != null) TextUtilities.addDocumentPartitioners(document, partitioners); } } catch (MalformedTreeException exception) { JavaPlugin.log(exception); } catch (BadLocationException exception) { // Can only happen on concurrent document modification - log and bail out JavaPlugin.log(exception); } } } | 9698 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9698/d62cddbc979affbc785b264105bf048c8509d9a8/JavaFormattingStrategy.java/buggy/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaFormattingStrategy.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
740,
1435,
288,
202,
202,
9565,
18,
2139,
5621,
202,
202,
6385,
1599,
504,
650,
1668,
33,
261,
734,
504,
650,
13,
74,
12922,
18,
4479,
3759,
5621,
202,
202,
6385,
13833,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
740,
1435,
288,
202,
202,
9565,
18,
2139,
5621,
202,
202,
6385,
1599,
504,
650,
1668,
33,
261,
734,
504,
650,
13,
74,
12922,
18,
4479,
3759,
5621,
202,
202,
6385,
13833,
... | |
new JarFile( jars[i].getAbsolutePath( ), "", false ) ); | new JarFile( jars[i].getName( ), jars[i].getAbsolutePath( ), "", false ) ); | private void updateJarMap( ) { File jarPath = JarFile.getDriverLocation( ); if ( jarPath != null && jarPath.exists( ) && jarPath.isDirectory( ) ) { File[] jars = jarPath.listFiles( new FileFilter( ) { Map deletedJars = Utility.getPreferenceStoredMap( JdbcPlugin.DELETED_JAR_MAP_PREFERENCE_KEY ); public boolean accept( File pathname ) { if ( pathname.exists( ) && pathname.isFile( ) && ( !deletedJars.containsKey( pathname.getName( ) ) ) && ( pathname.getName( ).endsWith( ".jar" ) || pathname.getName( ).endsWith( ".zip" ) ) ) //$NON-NLS-1$ { return true; } return false; } } ); for ( int i = 0; i < jars.length; i++ ) jarMap.put( jars[i].getName( ), new JarFile( jars[i].getAbsolutePath( ), "", false ) ); } // Set entrySet = deletedJars.entrySet( );// Iterator iterator = entrySet.iterator( );// while ( iterator.hasNext( ) )// {// Map.Entry entry = (Map.Entry) iterator.next( );// if ( !( (JarFile) entry.getValue( ) ).isToBeDeleted() )// jarMap.put( entry.getKey( ), entry.getValue( ) );// } jarMap.putAll( Utility.getPreferenceStoredMap( JdbcPlugin.JAR_MAP_PREFERENCE_KEY )); checkJarState( ); } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/13cfb242c5196f005c6528c6af196f445609aa48/JdbcDriverManagerDialog.java/buggy/data/org.eclipse.birt.report.data.oda.jdbc.ui/src/org/eclipse/birt/report/data/oda/jdbc/ui/dialogs/JdbcDriverManagerDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1089,
10813,
863,
12,
262,
202,
95,
202,
202,
812,
7334,
743,
273,
15644,
812,
18,
588,
4668,
2735,
12,
11272,
9506,
202,
430,
261,
7334,
743,
480,
446,
597,
7334,
743,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1089,
10813,
863,
12,
262,
202,
95,
202,
202,
812,
7334,
743,
273,
15644,
812,
18,
588,
4668,
2735,
12,
11272,
9506,
202,
430,
261,
7334,
743,
480,
446,
597,
7334,
743,
... |
flags [index] = value; | specified [index] = value; | public void setSpecified (int index, boolean value) { if (index < 0 || index >= getLength ()) throw new ArrayIndexOutOfBoundsException ( "No attribute at index: " + index); flags [index] = value; } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/2c0635b05f68dbb361b3532fd5813a38b74cf57a/Attributes2Impl.java/clean/core/src/classpath/org/org/xml/sax/ext/Attributes2Impl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
444,
17068,
261,
474,
770,
16,
1250,
460,
13,
565,
288,
202,
430,
261,
1615,
411,
374,
747,
770,
1545,
9888,
1832,
13,
202,
565,
604,
394,
1510,
30548,
261,
202,
202,
6,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
444,
17068,
261,
474,
770,
16,
1250,
460,
13,
565,
288,
202,
430,
261,
1615,
411,
374,
747,
770,
1545,
9888,
1832,
13,
202,
565,
604,
394,
1510,
30548,
261,
202,
202,
6,
22... |
private void calcCell(Cell [][] cells) throws IllegalSymbolException, IllegalAlphabetException, IllegalTransitionException { Cell curCell = cells[0][0]; double[] curCol = curCell.scores; BackPointer[] curBPs = curCell.backPointers; double[] emissions = curCell.emissions; /*(System.out.println( "Got symbols " + cells[0][0] + "->" + cells[0][0].symbols[0].getName() + ", " + cells[0][0].symbols[1].getName() );*/ //System.out.println("Scores " + curCol); STATELOOP: for (int l = 0; l < states.length; ++l) { State curState = states[l]; //System.out.println("State = " + l + "=" + states[l].getName()); try { //System.out.println("trying initialization"); if(initializationHack && (curState instanceof EmissionState)) { if(curState == magicalState) { curCol[l] = 0.0; curBPs[l] = TERMINAL_BP; } else { curCol[l] = Double.NEGATIVE_INFINITY; curBPs[l] = null; } //System.out.println("Initialized state to " + curCol[l]); continue STATELOOP; } double weight; double[] sourceScores; BackPointer[] oldBPs; if(! (curState instanceof EmissionState)) { weight = 0.0; sourceScores = curCol; oldBPs = curBPs; } else { weight = emissions[l]; if(weight == Double.NEGATIVE_INFINITY) { curCol[l] = Double.NEGATIVE_INFINITY; curBPs[l] = null; continue STATELOOP; } int [] advance = ((EmissionState)curState).getAdvance(); Cell oldCell = cells[advance[0]][advance[1]]; sourceScores = oldCell.scores; oldBPs = oldCell.backPointers; } //System.out.println("weight = " + weight); double score = Double.NEGATIVE_INFINITY; int [] tr = transitions[l]; double[] trs = transitionScores[l]; int bestK = -1; // index into states[l] for (int kc = 0; kc < tr.length; ++kc) { int k = tr[kc]; // actual state index double sk = sourceScores[k]; //System.out.println("kc is " + kc); //System.out.println("with from " + k + "=" + states[k].getName()); //System.out.println("prevScore = " + sourceScores[k]); if (sk != Double.NEGATIVE_INFINITY) { double t = trs[kc]; double newScore = t + sk; if (newScore > score) { score = newScore; bestK = k; //System.out.println("New best source at " + kc); } } } if (bestK != -1) { curCol[l] = weight + score; /*System.out.println( "Creating " + states[bestK].getName() + " -> " + states[l].getName() + " (" + curCol[l] + ")" );*/ try { State s = states[l]; curBPs[l] = new BackPointer( s, oldBPs[bestK], curCol[l] ); } catch (Throwable t) { throw new BioError( t, "Couldn't generate backpointer for " + states[l].getName() + " back to " + states[bestK].getName() ); } } else { curBPs[l] = null; curCol[l] = Double.NEGATIVE_INFINITY; } // System.out.println(curCol[l]); } catch (Exception e) { throw new BioError( e, "Problem with state " + l + " -> " + states[l].getName() ); } catch (BioError e) { throw new BioError( e, "Error with state " + l + " -> " + states[l].getName() ); } } /*System.out.println("backpointers:"); for(int l = 0; l < states.length; l++) { BackPointer b = curBPs[l]; if(b != null) { for(BackPointer bb = b; bb.back != bb; bb = bb.back) { System.out.print(bb.state.getName() + " -> "); } System.out.println("!"); } }*/ } | 50115 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50115/f34f99e864e9e8905fb53dcbad1bf1ae9678cc15/PairwiseDP.java/buggy/src/org/biojava/bio/dp/PairwiseDP.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
7029,
4020,
12,
4020,
5378,
8526,
5983,
13,
565,
1216,
1377,
2141,
5335,
503,
16,
1377,
2141,
27316,
503,
16,
1377,
2141,
8850,
503,
565,
288,
1377,
8614,
662,
4020,
273,
5983,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7029,
4020,
12,
4020,
5378,
8526,
5983,
13,
565,
1216,
1377,
2141,
5335,
503,
16,
1377,
2141,
27316,
503,
16,
1377,
2141,
8850,
503,
565,
288,
1377,
8614,
662,
4020,
273,
5983,... | ||
public ClientSSKBlock(SSKBlock block, ClientSSK key) throws SSKVerifyException { this(block.data, block.headers, key, false); | public ClientSSKBlock(byte[] data, byte[] headers, ClientSSK key, boolean dontVerify) throws SSKVerifyException { super(data, headers, (NodeSSK) key.getNodeKey(), dontVerify); this.key = key; | public ClientSSKBlock(SSKBlock block, ClientSSK key) throws SSKVerifyException { this(block.data, block.headers, key, false); } | 56348 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56348/453d4b996fb63d69f900accadc2e27f5ed795af0/ClientSSKBlock.java/buggy/src/freenet/keys/ClientSSKBlock.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2445,
1260,
47,
1768,
12,
1260,
47,
1768,
1203,
16,
2445,
1260,
47,
498,
13,
1216,
348,
11129,
8097,
503,
288,
202,
202,
2211,
12,
2629,
18,
892,
16,
1203,
18,
2485,
16,
498... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2445,
1260,
47,
1768,
12,
1260,
47,
1768,
1203,
16,
2445,
1260,
47,
498,
13,
1216,
348,
11129,
8097,
503,
288,
202,
202,
2211,
12,
2629,
18,
892,
16,
1203,
18,
2485,
16,
498... |
System.err.println(theModel.getChemModel().getSetOfMolecules().getMolecules()[0].getAtomAt(3)+" after load"); | public void initPanelAndModel(JChemPaintPanel jcpp) {System.err.println(theModel.getChemModel().getSetOfMolecules().getMolecules()[0].getAtomAt(3)+" after load"); getContentPane().removeAll(); getContentPane().setLayout(new BorderLayout()); theModel.setTitle("JCP Applet" /* getNewFrameName() */); theModel.setAuthor(JCPPropertyHandler.getInstance().getJCPProperties().getProperty("General.UserName")); // Package self = Package.getPackage("org.openscience.cdk.applications.jchempaint"); // String version = self.getImplementationVersion(); // model.setSoftware("JChemPaint " + version); theModel.setSoftware("JChemPaint " /*+ version */); theModel.setGendate((Calendar.getInstance()).getTime().toString()); jcpp.setJChemPaintModel(theModel); jcpp.registerModel(theModel); if(theJcpp.getJChemPaintModel()!=null) jcpp.scaleAndCenterMolecule(theModel.getChemModel(),new Dimension((int)this.getSize().getWidth()-100,(int)this.getSize().getHeight()-100)); //embedded means that additional instances can't be created, which is // needed for applet as well jcpp.setEmbedded(); getContentPane().add(jcpp, BorderLayout.CENTER);System.err.println(theModel.getChemModel().getSetOfMolecules().getMolecules()[0].getAtomAt(3)+" after load"); } | 45167 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45167/245879852744fed50eacc5125ec41e8092a60325/JChemPaintAbstractApplet.java/clean/src/org/openscience/cdk/applications/jchempaint/applet/JChemPaintAbstractApplet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1208,
5537,
1876,
1488,
12,
46,
20200,
12699,
5537,
525,
4057,
84,
13,
288,
3163,
18,
370,
18,
8222,
12,
5787,
1488,
18,
588,
20200,
1488,
7675,
588,
694,
951,
49,
29466,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1208,
5537,
1876,
1488,
12,
46,
20200,
12699,
5537,
525,
4057,
84,
13,
288,
3163,
18,
370,
18,
8222,
12,
5787,
1488,
18,
588,
20200,
1488,
7675,
588,
694,
951,
49,
29466,... | |
fs.put("URI", uri.toString(false)); | fs.put("URI", uri.toString(false, false)); | public synchronized SimpleFieldSet getFieldSet() { SimpleFieldSet fs = new SimpleFieldSet(); // we will need multi-level later... fs.put("Type", "GET"); fs.put("URI", uri.toString(false)); fs.put("Identifier", identifier); fs.put("Verbosity", Integer.toString(verbosity)); fs.put("PriorityClass", Short.toString(priorityClass)); fs.put("ReturnType", ClientGetMessage.returnTypeString(returnType)); fs.put("Persistence", persistenceTypeString(persistenceType)); fs.put("ClientName", client.name); if(targetFile != null) fs.put("Filename", targetFile.getPath()); if(tempFile != null) fs.put("TempFilename", tempFile.getPath()); if(clientToken != null) fs.put("ClientToken", clientToken); fs.put("IgnoreDS", Boolean.toString(fctx.ignoreStore)); fs.put("DSOnly", Boolean.toString(fctx.localRequestOnly)); fs.put("MaxRetries", Integer.toString(fctx.maxNonSplitfileRetries)); fs.put("Finished", Boolean.toString(finished)); fs.put("Succeeded", Boolean.toString(succeeded)); if(finished) { if(succeeded) { fs.put("FoundDataLength", Long.toString(foundDataLength)); fs.put("FoundDataMimeType", foundDataMimeType); if(postFetchProtocolErrorMessage != null) { fs.put("PostFetchProtocolError", postFetchProtocolErrorMessage.getFieldSet()); } } else { if(getFailedMessage != null) { fs.put("GetFailed", getFailedMessage.getFieldSet(false)); } } } // Return bucket if(returnType == ClientGetMessage.RETURN_TYPE_DIRECT) { PaddedEphemerallyEncryptedBucket b = (PaddedEphemerallyEncryptedBucket) returnBucket; FileBucket underlying = (FileBucket) (b.getUnderlying()); fs.put("ReturnBucket.DecryptKey", HexUtil.bytesToHex(b.getKey())); fs.put("ReturnBucket.Filename", underlying.getName()); } fs.put("Global", Boolean.toString(client.isGlobalQueue)); return fs; } | 51834 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51834/1c876261ab73159d57a26624667ec7bf7acd15b8/ClientGet.java/buggy/src/freenet/node/fcp/ClientGet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3852,
4477,
974,
694,
5031,
694,
1435,
288,
202,
202,
5784,
974,
694,
2662,
273,
394,
4477,
974,
694,
5621,
368,
732,
903,
1608,
3309,
17,
2815,
5137,
2777,
202,
202,
2556,
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,
225,
202,
482,
3852,
4477,
974,
694,
5031,
694,
1435,
288,
202,
202,
5784,
974,
694,
2662,
273,
394,
4477,
974,
694,
5621,
368,
732,
903,
1608,
3309,
17,
2815,
5137,
2777,
202,
202,
2556,
18... |
return log(arg); | if (arg instanceof LispFloat) return Complex.getInstance(arg, LispFloat.ZERO); if (arg.realp()) return arg; throw new ConditionThrowable(new TypeError(arg, "real number")); | public LispObject execute(LispObject arg) throws ConditionThrowable { return log(arg); } | 8279 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8279/7a80a234ed70e008775e13a37b7ac5f337cc7fb2/Primitives.java/buggy/j/src/org/armedbear/lisp/Primitives.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
511,
23831,
921,
1836,
12,
48,
23831,
921,
1501,
13,
1216,
7949,
15155,
3639,
288,
5411,
309,
261,
3175,
1276,
511,
23831,
4723,
13,
327,
16060,
18,
588,
1442,
12,
3175,
16,
511,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
511,
23831,
921,
1836,
12,
48,
23831,
921,
1501,
13,
1216,
7949,
15155,
3639,
288,
5411,
309,
261,
3175,
1276,
511,
23831,
4723,
13,
327,
16060,
18,
588,
1442,
12,
3175,
16,
511,
... |
public ToolErrorReporter(boolean reportWarnings, PrintStream err) { this.reportWarnings = reportWarnings; this.err = err; | public ToolErrorReporter(boolean reportWarnings) { this(reportWarnings, System.err); | public ToolErrorReporter(boolean reportWarnings, PrintStream err) { this.reportWarnings = reportWarnings; this.err = err; } | 54155 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54155/b538849b5b431bc21e58fb6e0fc818f0a017ed10/ToolErrorReporter.java/buggy/js/rhino/toolsrc/org/mozilla/javascript/tools/ToolErrorReporter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
13288,
668,
13289,
12,
6494,
2605,
4312,
16,
21677,
393,
13,
288,
3639,
333,
18,
6006,
4312,
273,
2605,
4312,
31,
3639,
333,
18,
370,
273,
393,
31,
565,
289,
2,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
13288,
668,
13289,
12,
6494,
2605,
4312,
16,
21677,
393,
13,
288,
3639,
333,
18,
6006,
4312,
273,
2605,
4312,
31,
3639,
333,
18,
370,
273,
393,
31,
565,
289,
2,
-100,
-100,
-100,
... |
TreePath selPath = tree.getSelectionPath(); | TreePath selPath = tree.getSelectionPath(); | private static Object getTreeSelectionOf(JTree tree, Class c) { TreePath selPath = tree.getSelectionPath(); // There may not be anything selected at the moment if (selPath == null) return null; // Work backwards from end until we get to the kind of // object we're looking for. Object[] nodeList = selPath.getPath(); for (int i = nodeList.length - 1; i >= 0; --i) { DefaultMutableTreeNode node = (DefaultMutableTreeNode) nodeList[i]; Object nodeInfo = node.getUserObject(); if (nodeInfo != null && nodeInfo.getClass() == c) return nodeInfo; } return null; } | 7352 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7352/20d4fcba199a7f0794ac868634a88239a9a6a294/FindBugsFrame.java/clean/findbugs/src/java/edu/umd/cs/findbugs/gui/FindBugsFrame.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
1033,
15867,
6233,
951,
12,
46,
2471,
2151,
16,
1659,
276,
13,
288,
202,
2471,
743,
357,
743,
273,
2151,
18,
588,
6233,
743,
5621,
7734,
368,
6149,
2026,
486,
506,
6967,
3170... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1033,
15867,
6233,
951,
12,
46,
2471,
2151,
16,
1659,
276,
13,
288,
202,
2471,
743,
357,
743,
273,
2151,
18,
588,
6233,
743,
5621,
7734,
368,
6149,
2026,
486,
506,
6967,
3170... |
topLeftCorner = new PlanePoint(r.x, r.y); topRightCorner = new PlanePoint(r.x+r.width-2, r.y); bottomLeftCorner = new PlanePoint(r.x, r.y+r.height-2); bottomRightCorner = new PlanePoint(r.x+r.width-2, r.y+r.height-2); vLeft = new Segment(topLeftCorner, bottomLeftCorner); vRight = new Segment(topRightCorner, bottomRightCorner); hTop = new Segment(topLeftCorner, topRightCorner); hBottom = new Segment(bottomLeftCorner, bottomRightCorner); cPoint = new PlanePoint(p.x, p.y); | vLeft = ROIFactory.getVerticalArea(r.x, r.y, r.height); vRight = ROIFactory.getVerticalArea(r.x+r.width, r.y, r.height); hTop = ROIFactory.getHorizontalArea(r.x, r.y, r.width); hBottom = ROIFactory.getHorizontalArea(r.x, r.y+r.height, r.width); | private void handleMousePressed(Point p, int clickCount) { pressed = true; dragging = true; currentROI = null; currentShape = null; anchor = p; Iterator i = listROI.iterator(); ROIShape roi; Shape s; Rectangle r; Segment vLeft, vRight, hTop, hBottom; PlanePoint topLeftCorner, topRightCorner, bottomLeftCorner, bottomRightCorner; PlanePoint cPoint; while (i.hasNext()) { roi = (ROIShape) (i.next()); s = roi.getShape(); r = s.getBounds(); topLeftCorner = new PlanePoint(r.x, r.y); topRightCorner = new PlanePoint(r.x+r.width-2, r.y); bottomLeftCorner = new PlanePoint(r.x, r.y+r.height-2); bottomRightCorner = new PlanePoint(r.x+r.width-2, r.y+r.height-2); vLeft = new Segment(topLeftCorner, bottomLeftCorner); vRight = new Segment(topRightCorner, bottomRightCorner); hTop = new Segment(topLeftCorner, topRightCorner); hBottom = new Segment(bottomLeftCorner, bottomRightCorner); cPoint = new PlanePoint(p.x, p.y); if (s.contains(p)) { setHandlePressedValues(roi, s, r.x, r.y); cPoint = new PlanePoint(p.x, p.y); if (vLeft.lies(cPoint)) resizeZone = LEFT; else if (vRight.lies(cPoint)) resizeZone = RIGHT; else if (hTop.lies(cPoint)) resizeZone = TOP; else if (hBottom.lies(cPoint)) resizeZone = BOTTOM; else handlePressedIn(roi, clickCount); } } if (state == ROIAgt.MOVING) setCursor(HAND_CURSOR); else setCursor(DEFAULT_CURSOR); } | 55464 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55464/3c56605cb78b48c5f1cbccd234be70fb8a66a45b/DrawingCanvasMng.java/buggy/SRC/org/openmicroscopy/shoola/agents/roi/canvas/DrawingCanvasMng.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1640,
9186,
24624,
12,
2148,
293,
16,
509,
4682,
1380,
13,
565,
288,
3639,
19504,
273,
638,
31,
3639,
25434,
273,
638,
31,
3639,
783,
1457,
45,
273,
446,
31,
3639,
783,
8500,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1640,
9186,
24624,
12,
2148,
293,
16,
509,
4682,
1380,
13,
565,
288,
3639,
19504,
273,
638,
31,
3639,
25434,
273,
638,
31,
3639,
783,
1457,
45,
273,
446,
31,
3639,
783,
8500,... |
envelope = ombuilderFactory.createSOAPEnvelope(null, this); | envelope = (SOAPEnvelopeImpl)ombuilderFactory.createSOAPEnvelope(null, this); | private OMElement constructNode(OMElement parent, String elementName, boolean isEnvelope) { OMElement element = null; if (isEnvelope) { if (!elementName.equalsIgnoreCase(OMConstants.SOAPENVELOPE_LOCAL_NAME)) { throw new OMException("First Element must contain the local name, " + OMConstants.SOAPENVELOPE_LOCAL_NAME); } envelope = ombuilderFactory.createSOAPEnvelope(null, this); element = (OMElementImpl) envelope; processNamespaceData(element, true); } else if (elementLevel == 2) { // this is either a header or a body if (elementName.equals(OMConstants.HEADER_LOCAL_NAME)) { if (headerPresent) { throw new OMBuilderException("Multiple headers encountered!"); } if (bodyPresent) { throw new OMBuilderException("Header Body wrong order!"); } headerPresent = true; element = ombuilderFactory.createSOAPHeader(elementName, null, parent, this); processNamespaceData(element, true); } else if (elementName.equals(OMConstants.BODY_LOCAL_NAME)) { if (bodyPresent) { throw new OMBuilderException("Multiple body elements encountered"); } bodyPresent = true; element = ombuilderFactory.createSOAPBody(elementName, null, parent, this); processNamespaceData(element, true); } else { throw new OMBuilderException(elementName + " is not supported here. Envelope can not have elements other than Header and Body."); } } else if (elementLevel == 3 && parent.getLocalName().equalsIgnoreCase(OMConstants.HEADER_LOCAL_NAME)) { // this is a headerblock element = ombuilderFactory.createSOAPHeaderBlock(elementName, null, parent, this); processNamespaceData(element, false); }else if (elementLevel == 3 && parent.getLocalName().equalsIgnoreCase(OMConstants.BODY_LOCAL_NAME) && elementName.equalsIgnoreCase(OMConstants.BODY_FAULT_LOCAL_NAME)) { // this is a headerblock element = ombuilderFactory.createSOAPFault(null, (SOAPBody)parent, this); processNamespaceData(element, false); } else { // this is neither of above. Just create an element element = ombuilderFactory.createOMElement(elementName, null, parent, this); processNamespaceData(element, false); } return element; } | 49300 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49300/5f5635805e287b94a86f15912286618406f472b4/StAXSOAPModelBuilder.java/buggy/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/builder/StAXSOAPModelBuilder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
531,
12310,
4872,
907,
12,
51,
12310,
982,
16,
514,
14453,
16,
1250,
353,
10862,
13,
288,
3639,
531,
12310,
930,
273,
446,
31,
3639,
309,
261,
291,
10862,
13,
288,
5411,
309,
1605... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
531,
12310,
4872,
907,
12,
51,
12310,
982,
16,
514,
14453,
16,
1250,
353,
10862,
13,
288,
3639,
531,
12310,
930,
273,
446,
31,
3639,
309,
261,
291,
10862,
13,
288,
5411,
309,
1605... |
throws DOMException { throw new DOMException( DOMException.NOT_SUPPORTED_ERR, "Not a Rect value." ); | throws DOMException { throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Not a Rect value."); | public Rect getRectValue() throws DOMException { throw new DOMException( DOMException.NOT_SUPPORTED_ERR, "Not a Rect value." ); } | 52947 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52947/a02f21737e5cac245dc17710370c9c1eda2116b3/DefaultCSSPrimitiveValue.java/buggy/src/java/org/xhtmlrenderer/css/impl/DefaultCSSPrimitiveValue.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
9315,
4170,
386,
620,
1435,
3639,
1216,
4703,
503,
288,
3639,
604,
394,
4703,
503,
12,
4703,
503,
18,
4400,
67,
21134,
67,
9712,
16,
315,
1248,
279,
9315,
460,
1199,
11272,
565,
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,
377,
1071,
9315,
4170,
386,
620,
1435,
3639,
1216,
4703,
503,
288,
3639,
604,
394,
4703,
503,
12,
4703,
503,
18,
4400,
67,
21134,
67,
9712,
16,
315,
1248,
279,
9315,
460,
1199,
11272,
565,
2... |
public void setDefaultT(int t); | public void setDefaultT(int t); | public void setDefaultT(int t); //Is it the best way to do it? | 55636 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55636/1a80ae364d5a13aebca07b0ae7349d79247ded75/RenderingEngine.java/buggy/components/rendering/src/omeis/providers/re/RenderingEngine.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
9277,
56,
12,
474,
268,
1769,
368,
2520,
518,
326,
3796,
4031,
358,
741,
518,
35,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
9277,
56,
12,
474,
268,
1769,
368,
2520,
518,
326,
3796,
4031,
358,
741,
518,
35,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
public void minimize( ) throws Exception{ ConnectivityChecker cc = new ConnectivityChecker(); if (!cc.isConnected(molecule)) { throw new Exception("CDKError: Molecule is NOT connected,could not layout."); } GVector moleculeCoords = new GVector(3); MMFF94EnergyFunction mmff94PF=null; if (potentialFunction=="mmff94"){ //System.out.println("SET POTENTIAL FUNCTION TO MMFF94"); setMMFF94Tables(molecule); mmff94PF=new MMFF94EnergyFunction((AtomContainer)molecule,getPotentialParameterSet()); } moleculeCoords.setSize(molecule.getAtomCount() * 3); moleculeCoords.set(ffTools.getCoordinates3xNVector((AtomContainer)molecule)); //System.out.println("PotentialFunction set:"+potentialFunction+"MoleculeCoords set:"+moleculeCoords.getSize()+" Hashtable:"+getPotentialParameterSet().size()); //System.out.println(moleculeCoords.toString()); if (sdm_flag)steepestDescentsMinimization(moleculeCoords,mmff94PF); if (cgm_flag)conjugateGradientMinimization(moleculeCoords, mmff94PF); //conjugateGradientMinimization(moleculeCoords, tpf); //System.out.println("Minimization READY"); //ffTools.assignCoordinatesToMolecule(moleculeCoords, (AtomContainer) molecule); } | 46046 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46046/9adcbd5769512fe518277f87ee5cc7c84de1ccb0/ForceField.java/buggy/src/org/openscience/cdk/modeling/forcefield/ForceField.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
18935,
12,
262,
1216,
1185,
95,
202,
202,
5215,
2818,
8847,
4946,
273,
394,
8289,
2818,
8847,
5621,
202,
202,
430,
16051,
952,
18,
291,
8932,
12,
81,
10545,
3719,
288,
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,
225,
202,
482,
918,
18935,
12,
262,
1216,
1185,
95,
202,
202,
5215,
2818,
8847,
4946,
273,
394,
8289,
2818,
8847,
5621,
202,
202,
430,
16051,
952,
18,
291,
8932,
12,
81,
10545,
3719,
288,
10... | ||
throw new Exception ("Error in month parsing"); | throw new SchemaDateTimeException ("Error in month parsing"); | protected int[] parse(String str, int[] date) throws Exception{ resetBuffer(str); //create structure to hold an object if ( date== null ) { date=new int[TOTAL_SIZE]; } resetDateObj(date); //initialize date[CY]=YEAR; date[M]=parseInt(fStart+2,fStart+4); fStart+=5; date[D]=parseInt(fStart, fStart+2); if ( MONTHDAY_SIZE<fEnd ) { int sign = findUTCSign(MONTHDAY_SIZE, fEnd); if ( sign<0 ) { throw new Exception ("Error in month parsing"); } else { getTimeZone(date, sign); } } //validate and normalize if ( !validateDateTime(date) ) { //REVISIT: error message? throw new Exception (); } else if ( date[utc]!=0 && date[utc]!='Z' ) { normalize(date); } return date; } | 6373 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6373/4e15daa59b432b97b7f93a5e7ff868021bef81ca/MonthDayDatatypeValidator.java/buggy/src/org/apache/xerces/validators/datatype/MonthDayDatatypeValidator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
509,
8526,
1109,
12,
780,
609,
16,
509,
8526,
1509,
13,
1216,
1185,
95,
3639,
2715,
1892,
12,
701,
1769,
3639,
368,
2640,
3695,
358,
6887,
392,
733,
3639,
309,
261,
1509,
631,
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,
4750,
509,
8526,
1109,
12,
780,
609,
16,
509,
8526,
1509,
13,
1216,
1185,
95,
3639,
2715,
1892,
12,
701,
1769,
3639,
368,
2640,
3695,
358,
6887,
392,
733,
3639,
309,
261,
1509,
631,
446... |
final String message = REZ.getString( "pkg-sealed-other-url", pkgName ); throw new SecurityException( message ); | throw new FileSystemException( "vfs.impl/pkg-sealed-other-url", pkgName ); | private Class defineClass( String name, Resource res ) throws IOException, FileSystemException { URL url = res.getCodeSourceURL(); int i = name.lastIndexOf( "." ); if ( i != -1 ) { String pkgName = name.substring( 0, i ); Package pkg = getPackage( pkgName ); if ( pkg != null ) { if ( pkg.isSealed() ) { if ( !pkg.isSealed( url ) ) { final String message = REZ.getString( "pkg-sealed-other-url", pkgName ); throw new SecurityException( message ); } } else { if ( isSealed( res ) ) { final String message = REZ.getString( "pkg-sealing-unsealed", pkgName ); throw new SecurityException( message ); } } } else { definePackage( pkgName, res, url ); } } byte[] bytes = res.getBytes(); Certificate[] certs = res.getFileObject().getContent().getCertificates(); CodeSource cs = new CodeSource( url, certs ); return defineClass( name, bytes, 0, bytes.length, cs ); } | 50122 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50122/4ee826b62afd102046c4f84d8f2a82bb7210454d/VFSClassLoader.java/buggy/src/java/org/apache/commons/vfs/impl/VFSClassLoader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1659,
4426,
797,
12,
514,
508,
16,
2591,
400,
262,
3639,
1216,
1860,
16,
10931,
503,
565,
288,
3639,
1976,
880,
273,
400,
18,
588,
1085,
1830,
1785,
5621,
3639,
509,
277,
273,
508... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1659,
4426,
797,
12,
514,
508,
16,
2591,
400,
262,
3639,
1216,
1860,
16,
10931,
503,
565,
288,
3639,
1976,
880,
273,
400,
18,
588,
1085,
1830,
1785,
5621,
3639,
509,
277,
273,
508... |
retval.append("\tparams: " + params[i]); | retval.append("\tparams: ").append(params[i]); | public int executeCommand(String[] params, String[] output) { StringBuffer retval = new StringBuffer(); retval.append("executeCommand\n"); if (params != null) { for (int i = 0; i < params.length; i++) { retval.append("\tparams: " + params[i]); retval.append("\n"); } } Process process = null; MonitorInputStream outMonitor = null; MonitorInputStream errMonitor = null; Thread t1 = null; Thread t2 = null; int exitStatus = -1; Debug.trace(retval); try { // execute command process = Runtime.getRuntime().exec(params); boolean console = false;// TODO: impl from xml <execute // in_console=true ...>, but works already // if this flag is true if (console) { Console c = new Console(process); // save command output output[0] = c.getOutputData(); output[1] = c.getErrorData(); exitStatus = process.exitValue(); } else { StringWriter outWriter = new StringWriter(); StringWriter errWriter = new StringWriter(); InputStreamReader or = new InputStreamReader(process.getInputStream()); InputStreamReader er = new InputStreamReader(process.getErrorStream()); outMonitor = new MonitorInputStream(or, outWriter); errMonitor = new MonitorInputStream(er, errWriter); t1 = new Thread(outMonitor); t2 = new Thread(errMonitor); t1.setDaemon(true); t2.setDaemon(true); t1.start(); t2.start(); // wait for command to complete exitStatus = process.waitFor(); t1.join(); t2.join(); // save command output output[0] = outWriter.toString(); Debug.trace("stdout:"); Debug.trace(output[0]); output[1] = errWriter.toString(); Debug.trace("stderr:"); Debug.trace(output[1]); } Debug.trace("exit status: " + Integer.toString(exitStatus)); } catch (InterruptedException e) { if (Debug.tracing()) e.printStackTrace(System.err); stopThread(t1, outMonitor); stopThread(t2, errMonitor); output[0] = ""; output[1] = e.getMessage() + "\n"; process.destroy(); } catch (IOException e) { if (Debug.tracing()) e.printStackTrace(System.err); output[0] = ""; output[1] = e.getMessage() + "\n"; } return exitStatus; } | 28044 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/28044/9619b3a25f43787dc92011111668210e06c00c71/FileExecutor.java/buggy/src/lib/com/izforge/izpack/util/FileExecutor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
21120,
12,
780,
8526,
859,
16,
514,
8526,
876,
13,
565,
288,
3639,
6674,
5221,
273,
394,
6674,
5621,
3639,
5221,
18,
6923,
2932,
8837,
2189,
64,
82,
8863,
3639,
309,
261,
201... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
21120,
12,
780,
8526,
859,
16,
514,
8526,
876,
13,
565,
288,
3639,
6674,
5221,
273,
394,
6674,
5621,
3639,
5221,
18,
6923,
2932,
8837,
2189,
64,
82,
8863,
3639,
309,
261,
201... |
if (mDestDir == null) throw new IllegalStateException("destdir not set"); | if (mOutputDir == null) throw new IllegalStateException("destdir not set"); | public void doCodegen() throws IOException { if (mDestDir == null) throw new IllegalStateException("destdir not set"); while(mClassesLeftTodo.size() > 0) { JClass clazz = (JClass)mClassesLeftTodo.get(0); mClassesLeftTodo.remove(0); mClassesDone.add(clazz); doCodegen(clazz); } } | 4519 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4519/e4f4077cad13bbe775f740ca972bb1f4460b623e/Annogen.java/clean/annogen/trunk/annogen/core/src/org/codehaus/annogen/generate/Annogen.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
741,
1085,
4507,
1435,
1216,
1860,
288,
565,
309,
261,
81,
1447,
1621,
422,
446,
13,
604,
394,
5477,
2932,
10488,
1214,
486,
444,
8863,
565,
1323,
12,
81,
4818,
3910,
56,
737... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
741,
1085,
4507,
1435,
1216,
1860,
288,
565,
309,
261,
81,
1447,
1621,
422,
446,
13,
604,
394,
5477,
2932,
10488,
1214,
486,
444,
8863,
565,
1323,
12,
81,
4818,
3910,
56,
737... |
fNavigable.setSelection(newCaret, newCaret); | if (newCaret != BreakIterator.DONE) fNavigable.setSelection(newCaret, newCaret); | private KeyAdapter getKeyListener() { if (fKeyListener == null) { fKeyListener= new KeyAdapter() { private static final String TEXT_EDITOR_CONTEXT_ID= "org.eclipse.ui.textEditorScope"; //$NON-NLS-1$ private final boolean IS_WORKAROUND= (fNavigable instanceof ComboNavigable) || (fNavigable instanceof TextNavigable && TextNavigable.BUG_106024_TEXT_SELECTION); private List/*<Submission>*/ fSubmissions; public void keyPressed(KeyEvent e) { if (IS_WORKAROUND) { if (e.keyCode == SWT.ARROW_LEFT && e.stateMask == SWT.MOD2) { int caretPosition= fNavigable.getCaretPosition(); if (caretPosition != 0) { Point selection= fNavigable.getSelection(); if (caretPosition == selection.x) fNavigable.setSelection(selection.y, caretPosition - 1); else fNavigable.setSelection(selection.x, caretPosition - 1); } e.doit= false; return; } else if (e.keyCode == SWT.ARROW_RIGHT && e.stateMask == SWT.MOD2) { String text= fNavigable.getText(); int caretPosition= fNavigable.getCaretPosition(); if (caretPosition != text.length()) { Point selection= fNavigable.getSelection(); if (caretPosition == selection.y) fNavigable.setSelection(selection.x, caretPosition + 1); else fNavigable.setSelection(selection.y, caretPosition + 1); } e.doit= false; return; } } int accelerator = SWTKeySupport.convertEventToUnmodifiedAccelerator(e); KeySequence keySequence = KeySequence.getInstance(SWTKeySupport.convertAcceleratorToKeyStroke(accelerator)); getSubmissions(); for (Iterator iter= getSubmissions().iterator(); iter.hasNext();) { Submission submission= (Submission) iter.next(); TriggerSequence[] triggerSequences= submission.getTriggerSequences(); for (int i= 0; i < triggerSequences.length; i++) { if (triggerSequences[i].equals(keySequence)) { // XXX does not work for multi-stroke bindings e.doit= false; submission.execute(); return; } } } } private List/*<Submission>*/ getSubmissions() { if (fSubmissions != null) return fSubmissions; fSubmissions= new ArrayList(); IContextService contextService= (IContextService) PlatformUI.getWorkbench().getAdapter(IContextService.class); ICommandService commandService= (ICommandService) PlatformUI.getWorkbench().getAdapter(ICommandService.class); IHandlerService handlerService= (IHandlerService) PlatformUI.getWorkbench().getAdapter(IHandlerService.class); IBindingService bindingService= (IBindingService) PlatformUI.getWorkbench().getAdapter(IBindingService.class); if (contextService == null || commandService == null || handlerService == null || bindingService == null) return fSubmissions; IContextActivation[] contextActivations; contextActivations= new IContextActivation[] { contextService.activateContext(IContextService.CONTEXT_ID_WINDOW), // XXX relying on workbench feature https://bugs.eclipse.org/bugs/show_bug.cgi?id=115460#c11 contextService.activateContext(TEXT_EDITOR_CONTEXT_ID) }; fSubmissions.add(new Submission(bindingService.getActiveBindingsFor(ITextEditorActionDefinitionIds.SELECT_WORD_NEXT)) { public void execute() { fIterator.setText(fNavigable.getText()); int caretPosition= fNavigable.getCaretPosition(); int newCaret= fIterator.following(caretPosition); if (newCaret != BreakIterator.DONE) { Point selection= fNavigable.getSelection(); if (caretPosition == selection.y) fNavigable.setSelection(selection.x, newCaret); else fNavigable.setSelection(selection.y, newCaret); } fIterator.setText(EMPTY_TEXT); } }); fSubmissions.add(new Submission(bindingService.getActiveBindingsFor(ITextEditorActionDefinitionIds.SELECT_WORD_PREVIOUS)) { public void execute() { fIterator.setText(fNavigable.getText()); int caretPosition= fNavigable.getCaretPosition(); int newCaret= fIterator.preceding(caretPosition); if (newCaret != BreakIterator.DONE) { Point selection= fNavigable.getSelection(); if (caretPosition == selection.x) fNavigable.setSelection(selection.y, newCaret); else fNavigable.setSelection(selection.x, newCaret); } fIterator.setText(EMPTY_TEXT); } }); fSubmissions.add(new Submission(bindingService.getActiveBindingsFor(ITextEditorActionDefinitionIds.WORD_NEXT)) { public void execute() { fIterator.setText(fNavigable.getText()); int caretPosition= fNavigable.getCaretPosition(); int newCaret= fIterator.following(caretPosition); fNavigable.setSelection(newCaret, newCaret); fIterator.setText(EMPTY_TEXT); } }); fSubmissions.add(new Submission(bindingService.getActiveBindingsFor(ITextEditorActionDefinitionIds.WORD_PREVIOUS)) { public void execute() { fIterator.setText(fNavigable.getText()); int caretPosition= fNavigable.getCaretPosition(); int newCaret= fIterator.preceding(caretPosition); fNavigable.setSelection(newCaret, newCaret); fIterator.setText(EMPTY_TEXT); } }); fSubmissions.add(new Submission(bindingService.getActiveBindingsFor(ITextEditorActionDefinitionIds.DELETE_NEXT_WORD)) { public void execute() { Point selection= fNavigable.getSelection(); String text= fNavigable.getText(); int start; int end; if (selection.x != selection.y) { start= selection.x; end= selection.y; } else { fIterator.setText(text); start= fNavigable.getCaretPosition(); end= fIterator.following(start); fIterator.setText(EMPTY_TEXT); if (end == BreakIterator.DONE) return; } fNavigable.setText(text.substring(0, start) + text.substring(end)); fNavigable.setSelection(start, start); } }); fSubmissions.add(new Submission(bindingService.getActiveBindingsFor(ITextEditorActionDefinitionIds.DELETE_PREVIOUS_WORD)) { public void execute() { Point selection= fNavigable.getSelection(); String text= fNavigable.getText(); int start; int end; if (selection.x != selection.y) { start= selection.x; end= selection.y; } else { fIterator.setText(text); end= fNavigable.getCaretPosition(); start= fIterator.preceding(end); fIterator.setText(EMPTY_TEXT); if (start == BreakIterator.DONE) return; } fNavigable.setText(text.substring(0, start) + text.substring(end)); fNavigable.setSelection(start, start); } }); for (int i= 0; i < contextActivations.length; i++) { contextService.deactivateContext(contextActivations[i]); } return fSubmissions; } }; } return fKeyListener; } | 9698 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9698/ecb88ba124f1844a11b844106f0d0c3f412f687a/TextFieldNavigationHandler.java/buggy/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/TextFieldNavigationHandler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
1152,
1929,
4216,
3579,
2223,
1435,
288,
1082,
202,
430,
261,
74,
653,
2223,
422,
446,
13,
288,
9506,
202,
74,
653,
2223,
33,
394,
1929,
4216,
1435,
288,
6862,
202,
1152,
760,
727... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
1152,
1929,
4216,
3579,
2223,
1435,
288,
1082,
202,
430,
261,
74,
653,
2223,
422,
446,
13,
288,
9506,
202,
74,
653,
2223,
33,
394,
1929,
4216,
1435,
288,
6862,
202,
1152,
760,
727... |
vSubTypes.add( new DefaultChartSubTypeImpl( STACKED_SUBTYPE_LITERAL , imgStackedWithDepth, sStackedDescription ) ); | vSubTypes.add( new DefaultChartSubTypeImpl( STACKED_SUBTYPE_LITERAL, imgStackedWithDepth, sStackedDescription ) ); | public Collection getChartSubtypes( String sDimension, Orientation orientation ) { Vector vSubTypes = new Vector( ); if ( sDimension.equals( TWO_DIMENSION_TYPE ) || sDimension.equals( ChartDimension.TWO_DIMENSIONAL_LITERAL.getName( ) ) ) { if ( orientation.equals( Orientation.VERTICAL_LITERAL ) ) { imgStacked = UIHelper.getImage( "icons/wizban/stackedareachartimage.gif" ); //$NON-NLS-1$ imgPercentStacked = UIHelper.getImage( "icons/wizban/percentstackedareachartimage.gif" ); //$NON-NLS-1$ imgSideBySide = UIHelper.getImage( "icons/wizban/sidebysideareachartimage.gif" ); //$NON-NLS-1$ } else { imgStacked = UIHelper.getImage( "icons/wizban/horizontalstackedareachartimage.gif" ); //$NON-NLS-1$ imgPercentStacked = UIHelper.getImage( "icons/wizban/horizontalpercentstackedareachartimage.gif" ); //$NON-NLS-1$ imgSideBySide = UIHelper.getImage( "icons/wizban/horizontalsidebysideareachartimage.gif" ); //$NON-NLS-1$ } vSubTypes.add( new DefaultChartSubTypeImpl( STACKED_SUBTYPE_LITERAL , imgStacked, sStackedDescription ) ); vSubTypes.add( new DefaultChartSubTypeImpl( PERCENTSTACKED_SUBTYPE_LITERAL, imgPercentStacked, sPercentStackedDescription ) ); vSubTypes.add( new DefaultChartSubTypeImpl( OVERLAY_SUBTYPE_LITERAL, imgSideBySide, sOverlayDescription ) ); } else if ( sDimension.equals( TWO_DIMENSION_WITH_DEPTH_TYPE ) || sDimension.equals( ChartDimension.TWO_DIMENSIONAL_WITH_DEPTH_LITERAL.getName( ) ) ) { if ( orientation.equals( Orientation.VERTICAL_LITERAL ) ) { imgStackedWithDepth = UIHelper.getImage( "icons/wizban/stackedareachartwithdepthimage.gif" ); //$NON-NLS-1$ } else { imgStackedWithDepth = UIHelper.getImage( "icons/wizban/horizontalstackedareachartwithdepthimage.gif" ); //$NON-NLS-1$ } vSubTypes.add( new DefaultChartSubTypeImpl( STACKED_SUBTYPE_LITERAL , imgStackedWithDepth, sStackedDescription ) ); } else if ( sDimension.equals( THREE_DIMENSION_TYPE ) || sDimension.equals( ChartDimension.THREE_DIMENSIONAL_LITERAL.getName( ) ) ) { imgSideBySide3D = UIHelper.getImage( "icons/wizban/sidebysideareachart3dimage.gif" ); //$NON-NLS-1$ vSubTypes.add( new DefaultChartSubTypeImpl( OVERLAY_SUBTYPE_LITERAL, imgSideBySide3D, sOverlayDescription ) ); } return vSubTypes; } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/182827fe6ad4e223adc4bf4bcf44d469847b773d/AreaChart.java/clean/chart/org.eclipse.birt.chart.ui.extension/src/org/eclipse/birt/chart/ui/swt/type/AreaChart.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2200,
336,
7984,
1676,
2352,
12,
514,
272,
8611,
16,
1082,
202,
14097,
9820,
262,
202,
95,
202,
202,
5018,
331,
1676,
2016,
273,
394,
5589,
12,
11272,
202,
202,
430,
261,
272,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2200,
336,
7984,
1676,
2352,
12,
514,
272,
8611,
16,
1082,
202,
14097,
9820,
262,
202,
95,
202,
202,
5018,
331,
1676,
2016,
273,
394,
5589,
12,
11272,
202,
202,
430,
261,
272,... |
private final static void declareImages() { declareImage(IWorkbenchGraphicConstants.IMG_ETOOL_PIN_EDITOR, PATH_ETOOL+"pin_editor.gif", false); //$NON-NLS-1$declareImage(IWorkbenchGraphicConstants.IMG_ETOOL_PIN_EDITOR_DISABLED, PATH_DTOOL+"pin_editor.gif", false); //$NON-NLS-1$ // other toolbar buttons declareImage(IWorkbenchGraphicConstants.IMG_ETOOL_SAVE_EDIT, PATH_ETOOL+"save_edit.gif", false); //$NON-NLS-1$ declareImage(IWorkbenchGraphicConstants.IMG_ETOOL_SAVE_EDIT_HOVER, PATH_ETOOL+"save_edit.gif", false); //$NON-NLS-1$ declareImage(IWorkbenchGraphicConstants.IMG_ETOOL_SAVE_EDIT_DISABLED, PATH_DTOOL+"save_edit.gif", false); //$NON-NLS-1$ declareImage(IWorkbenchGraphicConstants.IMG_ETOOL_SAVEAS_EDIT, PATH_ETOOL+"saveas_edit.gif", false); //$NON-NLS-1$ declareImage(IWorkbenchGraphicConstants.IMG_ETOOL_SAVEAS_EDIT_HOVER, PATH_ETOOL+"saveas_edit.gif", false); //$NON-NLS-1$ declareImage(IWorkbenchGraphicConstants.IMG_ETOOL_SAVEAS_EDIT_DISABLED, PATH_DTOOL+"saveas_edit.gif", false); //$NON-NLS-1$ declareImage(IWorkbenchGraphicConstants.IMG_ETOOL_SAVEALL_EDIT, PATH_ETOOL+"saveall_edit.gif", false); //$NON-NLS-1$ declareImage(IWorkbenchGraphicConstants.IMG_ETOOL_SAVEALL_EDIT_HOVER, PATH_ETOOL+"saveall_edit.gif", false); //$NON-NLS-1$ declareImage(IWorkbenchGraphicConstants.IMG_ETOOL_SAVEALL_EDIT_DISABLED, PATH_DTOOL+"saveall_edit.gif", false); //$NON-NLS-1$ declareImage(ISharedImages.IMG_TOOL_UNDO, PATH_ETOOL+"undo_edit.gif", true); //$NON-NLS-1$ declareImage(ISharedImages.IMG_TOOL_UNDO_HOVER, PATH_ETOOL+"undo_edit.gif", true); //$NON-NLS-1$ declareImage(ISharedImages.IMG_TOOL_UNDO_DISABLED, PATH_DTOOL+"undo_edit.gif", true); //$NON-NLS-1$ declareImage(ISharedImages.IMG_TOOL_REDO, PATH_ETOOL+"redo_edit.gif", true); //$NON-NLS-1$ declareImage(ISharedImages.IMG_TOOL_REDO_HOVER, PATH_ETOOL+"redo_edit.gif", true); //$NON-NLS-1$ declareImage(ISharedImages.IMG_TOOL_REDO_DISABLED, PATH_DTOOL+"redo_edit.gif", true); //$NON-NLS-1$ declareImage(ISharedImages.IMG_TOOL_CUT, PATH_ETOOL+"cut_edit.gif", true); //$NON-NLS-1$ declareImage(ISharedImages.IMG_TOOL_CUT_HOVER, PATH_ETOOL+"cut_edit.gif", true); //$NON-NLS-1$ declareImage(ISharedImages.IMG_TOOL_CUT_DISABLED, PATH_DTOOL+"cut_edit.gif", true); //$NON-NLS-1$ declareImage(ISharedImages.IMG_TOOL_COPY, PATH_ETOOL+"copy_edit.gif", true); //$NON-NLS-1$ declareImage(ISharedImages.IMG_TOOL_COPY_HOVER, PATH_ETOOL+"copy_edit.gif", true); //$NON-NLS-1$ declareImage(ISharedImages.IMG_TOOL_COPY_DISABLED, PATH_DTOOL+"copy_edit.gif", true); //$NON-NLS-1$ declareImage(ISharedImages.IMG_TOOL_PASTE, PATH_ETOOL+"paste_edit.gif", true); //$NON-NLS-1$ declareImage(ISharedImages.IMG_TOOL_PASTE_HOVER, PATH_ETOOL+"paste_edit.gif", true); //$NON-NLS-1$ declareImage(ISharedImages.IMG_TOOL_PASTE_DISABLED, PATH_DTOOL+"paste_edit.gif", true); //$NON-NLS-1$ declareImage(ISharedImages.IMG_TOOL_DELETE, PATH_ETOOL+"delete_edit.gif", true); //$NON-NLS-1$ declareImage(ISharedImages.IMG_TOOL_DELETE_HOVER, PATH_ETOOL+"delete_edit.gif", true); //$NON-NLS-1$ declareImage(ISharedImages.IMG_TOOL_DELETE_DISABLED, PATH_DTOOL+"delete_edit.gif", true); //$NON-NLS-1$ declareImage(IWorkbenchGraphicConstants.IMG_ETOOL_PRINT_EDIT, PATH_ETOOL+"print_edit.gif", false); //$NON-NLS-1$ declareImage(IWorkbenchGraphicConstants.IMG_ETOOL_PRINT_EDIT_HOVER, PATH_ETOOL+"print_edit.gif", false); //$NON-NLS-1$ declareImage(IWorkbenchGraphicConstants.IMG_ETOOL_PRINT_EDIT_DISABLED, PATH_DTOOL+"print_edit.gif", false); //$NON-NLS-1$ declareImage(ISharedImages.IMG_TOOL_FORWARD, PATH_ELOCALTOOL+"forward_nav.gif", true); //$NON-NLS-1$ declareImage(ISharedImages.IMG_TOOL_FORWARD_HOVER, PATH_ELOCALTOOL+"forward_nav.gif", true); //$NON-NLS-1$ declareImage(ISharedImages.IMG_TOOL_FORWARD_DISABLED, PATH_DLOCALTOOL+"forward_nav.gif", true); //$NON-NLS-1$ declareImage(ISharedImages.IMG_TOOL_BACK, PATH_ELOCALTOOL+"backward_nav.gif", true); //$NON-NLS-1$ declareImage(ISharedImages.IMG_TOOL_BACK_HOVER, PATH_ELOCALTOOL+"backward_nav.gif", true); //$NON-NLS-1$ declareImage(ISharedImages.IMG_TOOL_BACK_DISABLED, PATH_DLOCALTOOL+"backward_nav.gif", true); //$NON-NLS-1$ declareImage(ISharedImages.IMG_TOOL_UP, PATH_ELOCALTOOL+"up_nav.gif", true); //$NON-NLS-1$ declareImage(ISharedImages.IMG_TOOL_UP_HOVER, PATH_ELOCALTOOL+"up_nav.gif", true); //$NON-NLS-1$ declareImage(ISharedImages.IMG_TOOL_UP_DISABLED, PATH_DLOCALTOOL+"up_nav.gif", true); //$NON-NLS-1$ declareImage(IWorkbenchGraphicConstants.IMG_ETOOL_NEW_PAGE, PATH_EVIEW+"new_persp.gif", false); //$NON-NLS-1$ declareImage(IWorkbenchGraphicConstants.IMG_ETOOL_NEW_PAGE_HOVER, PATH_EVIEW+"new_persp.gif", false); //$NON-NLS-1$ declareImage(IWorkbenchGraphicConstants.IMG_ETOOL_HOME_NAV, PATH_ELOCALTOOL+"home_nav.gif", false); //$NON-NLS-1$ declareImage(IWorkbenchGraphicConstants.IMG_ETOOL_DEF_PERSPECTIVE, PATH_EVIEW+"default_persp.gif", false); //$NON-NLS-1$ declareImage(IWorkbenchGraphicConstants.IMG_ETOOL_DEF_PERSPECTIVE_HOVER, PATH_EVIEW+"default_persp.gif", false); //$NON-NLS-1$ declareImage(IWorkbenchGraphicConstants.IMG_WIZBAN_WORKINGSET_WIZ, PATH_WIZBAN+"workset_wiz.gif", false); //$NON-NLS-1$ declareImage(IWorkbenchGraphicConstants.IMG_VIEW_DEFAULTVIEW_MISC, PATH_EVIEW+"defaultview_misc.gif", false); //$NON-NLS-1$ declareImage(IWorkbenchGraphicConstants.IMG_DLGBAN_SAVEAS_DLG, PATH_WIZBAN+"saveas_wiz.gif", false); //$NON-NLS-1$ declareImage(IWorkbenchGraphicConstants.IMG_OBJ_FONT, PATH_OBJECT+"font.gif", true); //$NON-NLS-1$ declareImage(IWorkbenchGraphicConstants.IMG_OBJ_THEME_CATEGORY, PATH_OBJECT+"theme_category.gif", true); //$NON-NLS-1$ declareImage(IWorkbenchGraphicConstants.IMG_OBJ_ACTIVITY, PATH_OBJECT+"activity.gif", true); //$NON-NLS-1$ declareImage(IWorkbenchGraphicConstants.IMG_OBJ_ACTIVITY_CATEGORY, PATH_OBJECT+"activity_category.gif", true); //$NON-NLS-1$ declareImage(ISharedImages.IMG_OBJ_FILE, PATH_OBJECT+"file_obj.gif", true); //$NON-NLS-1$ declareImage(ISharedImages.IMG_OBJ_FOLDER, PATH_OBJECT+"fldr_obj.gif", true); //$NON-NLS-1$ declareImage(ISharedImages.IMG_OBJ_ELEMENT, PATH_OBJECT+"elements_obj.gif", true); //$NON-NLS-1$ declareImage(ISharedImages.IMG_DEF_VIEW, PATH_EVIEW+"defaultview_misc.gif", true); //$NON-NLS-1$ declareImage(IWorkbenchGraphicConstants.IMG_LCL_CLOSE_VIEW, PATH_ELOCALTOOL+"close_view.gif", true); //$NON-NLS-1$ declareImage(IWorkbenchGraphicConstants.IMG_LCL_CLOSE_VIEW_HOVER, PATH_ELOCALTOOL+"close_view.gif", true); //$NON-NLS-1$ declareImage(IWorkbenchGraphicConstants.IMG_LCL_PIN_VIEW, PATH_ELOCALTOOL+"pin_view.gif", true); //$NON-NLS-1$ declareImage(IWorkbenchGraphicConstants.IMG_LCL_PIN_VIEW_HOVER, PATH_ELOCALTOOL+"pin_view.gif", true); //$NON-NLS-1$ declareImage(IWorkbenchGraphicConstants.IMG_LCL_MIN_VIEW, PATH_ELOCALTOOL+"min_view.gif", true); //$NON-NLS-1$ declareImage(IWorkbenchGraphicConstants.IMG_LCL_MIN_VIEW_HOVER, PATH_ELOCALTOOL+"min_view.gif", true); //$NON-NLS-1$ declareImage(IWorkbenchGraphicConstants.IMG_LCL_VIEW_MENU, PATH_ELOCALTOOL+"view_menu.gif", true); //$NON-NLS-1$ declareImage(IWorkbenchGraphicConstants.IMG_LCL_VIEW_MENU_HOVER, PATH_ELOCALTOOL+"view_menu.gif", true); //$NON-NLS-1$ declareImage(IWorkbenchGraphicConstants.IMG_LCL_LINKTO_HELP, PATH_ELOCALTOOL+"linkto_help.gif", true); //$NON-NLS-1$ declareImage(ISharedImages.IMG_OBJS_ERROR_TSK, PATH_OBJECT+"error_tsk.gif", true); //$NON-NLS-1$ declareImage(ISharedImages.IMG_OBJS_WARN_TSK, PATH_OBJECT+"warn_tsk.gif", true); //$NON-NLS-1$ declareImage(ISharedImages.IMG_OBJS_INFO_TSK, PATH_OBJECT+"info_tsk.gif", true); //$NON-NLS-1$ declareImage(IWorkbenchGraphicConstants.IMG_OBJS_DND_LEFT_SOURCE, PATH_POINTER+"left_source.bmp", true); //$NON-NLS-1$ declareImage(IWorkbenchGraphicConstants.IMG_OBJS_DND_LEFT_MASK, PATH_POINTER+"left_mask.bmp", true); //$NON-NLS-1$ declareImage(IWorkbenchGraphicConstants.IMG_OBJS_DND_RIGHT_SOURCE, PATH_POINTER+"right_source.bmp", true); //$NON-NLS-1$ declareImage(IWorkbenchGraphicConstants.IMG_OBJS_DND_RIGHT_MASK, PATH_POINTER+"right_mask.bmp", true); //$NON-NLS-1$ declareImage(IWorkbenchGraphicConstants.IMG_OBJS_DND_TOP_SOURCE, PATH_POINTER+"top_source.bmp", true); //$NON-NLS-1$ declareImage(IWorkbenchGraphicConstants.IMG_OBJS_DND_TOP_MASK, PATH_POINTER+"top_mask.bmp", true); //$NON-NLS-1$ declareImage(IWorkbenchGraphicConstants.IMG_OBJS_DND_BOTTOM_SOURCE, PATH_POINTER+"bottom_source.bmp", true); //$NON-NLS-1$ declareImage(IWorkbenchGraphicConstants.IMG_OBJS_DND_BOTTOM_MASK, PATH_POINTER+"bottom_mask.bmp", true); //$NON-NLS-1$ declareImage(IWorkbenchGraphicConstants.IMG_OBJS_DND_INVALID_SOURCE, PATH_POINTER+"invalid_source.bmp", true); //$NON-NLS-1$ declareImage(IWorkbenchGraphicConstants.IMG_OBJS_DND_INVALID_MASK, PATH_POINTER+"invalid_mask.bmp", true); //$NON-NLS-1$ declareImage(IWorkbenchGraphicConstants.IMG_OBJS_DND_STACK_SOURCE, PATH_POINTER+"stack_source.bmp", true); //$NON-NLS-1$ declareImage(IWorkbenchGraphicConstants.IMG_OBJS_DND_STACK_MASK, PATH_POINTER+"stack_mask.bmp", true); //$NON-NLS-1$ declareImage(IWorkbenchGraphicConstants.IMG_OBJS_DND_OFFSCREEN_SOURCE, PATH_POINTER+"offscreen_source.bmp", true); //$NON-NLS-1$ declareImage(IWorkbenchGraphicConstants.IMG_OBJS_DND_OFFSCREEN_MASK, PATH_POINTER+"offscreen_mask.bmp", true); //$NON-NLS-1$ declareImage(IWorkbenchGraphicConstants.IMG_OBJS_DND_TOFASTVIEW_SOURCE, PATH_POINTER+"tofastview_source.bmp", true); //$NON-NLS-1$ declareImage(IWorkbenchGraphicConstants.IMG_OBJS_DND_TOFASTVIEW_MASK, PATH_POINTER+"tofastview_mask.bmp", true); //$NON-NLS-1$ } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/f2c92fbaeb469aaf7ca806c62ba3176980823c71/WorkbenchImages.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchImages.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3238,
727,
760,
918,
14196,
8946,
1435,
288,
6862,
9506,
202,
29554,
2040,
12,
45,
2421,
22144,
29459,
2918,
18,
3445,
43,
67,
1584,
51,
1741,
67,
52,
706,
67,
13208,
16,
7767,
67,
1584,
51,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3238,
727,
760,
918,
14196,
8946,
1435,
288,
6862,
9506,
202,
29554,
2040,
12,
45,
2421,
22144,
29459,
2918,
18,
3445,
43,
67,
1584,
51,
1741,
67,
52,
706,
67,
13208,
16,
7767,
67,
1584,
51,... | ||
PrintWriter diLog = Utility.openPrintWriter("DisjointIgnorables2.js", Utility.LATIN1_WINDOWS); | PrintWriter diLog = Utility.openPrintWriter("DisjointIgnorables2.js", Utility.UTF8_WINDOWS); | static void checkCE_overlap() throws IOException { /*PrintWriter diLog = new PrintWriter( new BufferedWriter( new OutputStreamWriter( new FileOutputStream(GEN_DIR + "DisjointIgnorables.txt"), "UTF8"), 32*1024)); */ PrintWriter diLog = Utility.openPrintWriter("DisjointIgnorables2.js", Utility.LATIN1_WINDOWS); diLog.write('\uFEFF'); //diLog = new PrintWriter(new FileOutputStream(GEN_DIR + "DisjointIgnorables.txt")); Normalizer nfd = new Normalizer(Normalizer.NFD, UNICODE_VERSION); int[] ces = new int[50]; int[] secondariesZP = new int[400]; Vector[] secondariesZPsample = new Vector[400]; int[] remapZP = new int[400]; int[] secondariesNZP = new int[400]; Vector[] secondariesNZPsample = new Vector[400]; int[] remapNZP = new int[400]; for (int i = 0; i < secondariesZP.length; ++i) { secondariesZPsample[i] = new Vector(); secondariesNZPsample[i] = new Vector(); } int zpCount = 0; int nzpCount = 0; /* for (char ch = 0; ch < 0xFFFF; ++ch) { byte type = collator.getCEType(ch); if (type >= UCA.FIXED_CE) continue; if (SKIP_CANONICAL_DECOMPOSIBLES && nfd.hasDecomposition(ch)) continue; String s = String.valueOf(ch); int len = collator.getCEs(s, true, ces); */ UCA.UCAContents cc = collator.getContents(UCA.FIXED_CE, nfd); int[] lenArray = new int[1]; Set sortedCodes = new TreeSet(); Set mixedCEs = new TreeSet(); while (true) { String s = cc.next(ces, lenArray); if (s == null) break; // process all CEs. Look for controls, and for mixed ignorable/non-ignorables int ccc; for (int kk = 0; kk < s.length(); kk += UTF32.count16(ccc)) { ccc = UTF32.char32At(s,kk); byte cat = ucd.getCategory(ccc); if (cat == Cf || cat == Cc || cat == Zs || cat == Zl || cat == Zp) { sortedCodes.add(CEList.toString(ces, lenArray[0]) + "\t" + ucd.getCodeAndName(s)); break; } } int len = lenArray[0]; int haveMixture = 0; for (int j = 0; j < len; ++j) { int ce = ces[j]; int pri = collator.getPrimary(ce); int sec = collator.getSecondary(ce); if (pri == 0) { secondariesZPsample[sec].add(secondariesZP[sec], s); secondariesZP[sec]++; } else { secondariesNZPsample[sec].add(secondariesNZP[sec], s); secondariesNZP[sec]++; } if (haveMixture == 3) continue; if (collator.isVariable(ce)) haveMixture |= 1; else haveMixture |= 2; if (haveMixture == 3) { mixedCEs.add(CEList.toString(ces, len) + "\t" + ucd.getCodeAndName(s)); } } } for (int i = 0; i < secondariesZP.length; ++i) { if (secondariesZP[i] != 0) { remapZP[i] = zpCount; zpCount++; } if (secondariesNZP[i] != 0) { remapNZP[i] = nzpCount; nzpCount++; } } diLog.println(); diLog.println("# Proposed Remapping (see doc about Japanese characters)"); diLog.println(); int bothCount = 0; for (int i = 0; i < secondariesZP.length; ++i) { if ((secondariesZP[i] != 0) || (secondariesNZP[i] != 0)) { char sign = ' '; if (secondariesZP[i] != 0 && secondariesNZP[i] != 0) { sign = '*'; bothCount++; } if (secondariesZP[i] != 0) { showSampleOverlap(diLog, false, sign + "ZP ", secondariesZPsample[i]); // i, 0x20 + nzpCount + remapZP[i], } if (secondariesNZP[i] != 0) { if (i == 0x20) { diLog.println("(omitting " + secondariesNZP[i] + " NZP with values 0020 -- values don't change)"); } else { showSampleOverlap(diLog, true, sign + "NZP", secondariesNZPsample[i]); // i, 0x20 + remapNZP[i], } } diLog.println(); } } diLog.println("ZP Count = " + zpCount + ", NZP Count = " + nzpCount + ", Collisions = " + bothCount); diLog.close(); } | 5620 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5620/2ddcba4a16cdcb148b1a71468833993695597070/WriteCollationData.java/buggy/tools/unicodetools/com/ibm/text/UCA/WriteCollationData.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
760,
918,
866,
1441,
67,
17946,
1435,
1216,
1860,
288,
3639,
1748,
5108,
2289,
4314,
1343,
273,
394,
14071,
12,
5411,
394,
22490,
12,
7734,
394,
24248,
12,
10792,
394,
12942,
12,
16652,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
760,
918,
866,
1441,
67,
17946,
1435,
1216,
1860,
288,
3639,
1748,
5108,
2289,
4314,
1343,
273,
394,
14071,
12,
5411,
394,
22490,
12,
7734,
394,
24248,
12,
10792,
394,
12942,
12,
16652,
6... |
public void nextRequest() { // Recycle Request object request.recycle(); //System.out.println("LV-pos: " + (lastValid - pos)); // Copy leftover bytes to the beginning of the buffer if (lastValid - pos > 0) { int npos = 0; int opos = pos; while (lastValid - opos > opos - npos) { System.arraycopy(buf, opos, buf, npos, opos - npos); npos += pos; opos += pos; } System.arraycopy(buf, opos, buf, npos, lastValid - opos); } // Recycle filters for (int i = 0; i <= lastActiveFilter; i++) { activeFilters[i].recycle(); } // Reset pointers lastValid = lastValid - pos; pos = 0; lastActiveFilter = -1; parsingHeader = true; swallowInput = true; } | 15905 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15905/98cb71e7f244821ccf0ecc5448d777bce91d44ab/InternalAprInputBuffer.java/clean/java/org/apache/coyote/http11/InternalAprInputBuffer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
6459,
4285,
691,
1435,
95,
759,
426,
13946,
691,
1612,
2293,
18,
266,
13946,
5621,
759,
3163,
18,
659,
18,
8222,
2932,
48,
58,
17,
917,
2773,
15,
12,
2722,
1556,
17,
917,
10019,
759,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
6459,
4285,
691,
1435,
95,
759,
426,
13946,
691,
1612,
2293,
18,
266,
13946,
5621,
759,
3163,
18,
659,
18,
8222,
2932,
48,
58,
17,
917,
2773,
15,
12,
2722,
1556,
17,
917,
10019,
759,
... | ||
public abstract void actionPerformed(ActionEvent e); | public void actionPerformed(ActionEvent e) { Object source = e.getSource(); if (source == rightButton) { c3dUser.rotateScene(new Vec(0, Math.PI / 4, 0)); } else if (source == leftButton) { c3dUser.rotateScene(new Vec(0, -Math.PI / 4, 0)); } else if (source == upButton) { c3dUser.rotateScene(new Vec(Math.PI / 4, 0, 0)); } else if (source == downButton) { c3dUser.rotateScene(new Vec(-Math.PI / 4, 0, 0)); } else if (source == spinRight) { c3dUser.rotateScene(new Vec(0, 0, Math.PI / 4)); } else if (source == spinLeft) { c3dUser.rotateScene(new Vec(0, 0, -Math.PI / 4)); } else if ((source == exitMenuItem)) { this.c3dUser.terminate(); trash(); } else if ((source == this.localMessageField) || (source == this.sendMessageButton)) { String message = this.localMessageField.getText(); if (message.length() > 0) { String recipient = (String) sendToComboBox.getSelectedItem(); c3dUser.sendMessage(message, recipient); localMessageField.setText(""); } else { localMessageField.setText("Enter text to send"); localMessageField.selectAll(); } } else if (source == this.addSphereButton) { c3dUser.addSphere(); } else if (source == this.resetSceneButton) { c3dUser.resetScene(); } else if (source == userInfoItem) { showUserInfo(); } else if (source == listUsersMenuItem) { c3dUser.getUserList(); } else if (source == clearMenuItem) { logArea.setText(""); } else if (source == aboutMenuItem) { new DialogBox(this.mainFrame, "About ProActive", "The ProActive Grid Middleware", "http: } else { log("EVENT not handled : " + source); } } | public abstract void actionPerformed(ActionEvent e); | 23362 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/23362/feb205e44ad808bcfe2f33002933567d2fddf0c3/UserGUI.java/clean/src/org/objectweb/proactive/examples/c3d/gui/UserGUI.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
8770,
918,
26100,
12,
1803,
1133,
425,
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,
... | [
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,
377,
1071,
8770,
918,
26100,
12,
1803,
1133,
425,
1769,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
if( !newSymbolName.equals("") ){ | if( !newSymbolName.equals("") && !isTemplateId ){ | public IASTClassSpecifier createClassSpecifier( IASTScope scope, ITokenDuple name, ASTClassKind kind, ClassNameType type, ASTAccessVisibility access, int startingOffset, int startingLine, int nameOffset, int nameEndOffset, int nameLine) throws ASTSemanticException { IContainerSymbol currentScopeSymbol = scopeToSymbol(scope); TypeInfo.eType pstType = classKindToTypeInfo(kind); List references = new ArrayList(); String newSymbolName = ""; //$NON-NLS-1$ if( name != null ){ IToken lastToken = name.getLastToken(); if( name.length() != 1 ) // qualified name { ITokenDuple containerSymbolName = name.getSubrange( 0, name.length() - 3 ); // -1 for index, -2 for last hop of qualified name currentScopeSymbol = (IContainerSymbol)lookupQualifiedName( currentScopeSymbol, containerSymbolName, references, true); if( currentScopeSymbol == null ) handleProblem( IProblem.SEMANTIC_NAME_NOT_FOUND, containerSymbolName.toString(), containerSymbolName.getFirstToken().getOffset(), containerSymbolName.getLastToken().getEndOffset(), containerSymbolName.getLastToken().getLineNumber() ); } newSymbolName = lastToken.getImage(); } ISymbol classSymbol = null; if( !newSymbolName.equals("") ){ //$NON-NLS-1$ try { classSymbol = currentScopeSymbol.lookupMemberForDefinition(newSymbolName); } catch (ParserSymbolTableException e) { handleProblem(IProblem.SEMANTIC_UNIQUE_NAME_PREDEFINED, name.toString(), nameOffset, nameEndOffset, nameLine); } if( classSymbol != null && ! classSymbol.isForwardDeclaration() ) handleProblem( IProblem.SEMANTIC_UNIQUE_NAME_PREDEFINED, newSymbolName ); if( classSymbol != null && classSymbol.getType() != pstType ) handleProblem( IProblem.SEMANTIC_INVALID_OVERLOAD, newSymbolName ); } IDerivableContainerSymbol newSymbol = pst.newDerivableContainerSymbol( newSymbolName, pstType ); if( classSymbol != null ) classSymbol.setTypeSymbol( newSymbol ); try { currentScopeSymbol.addSymbol( newSymbol ); } catch (ParserSymbolTableException e2) { handleProblem( e2.createProblemID(), newSymbolName ); } ASTClassSpecifier classSpecifier = new ASTClassSpecifier( newSymbol, kind, type, access, startingOffset, startingLine, nameOffset, nameEndOffset, nameLine, references ); attachSymbolExtension(newSymbol, classSpecifier, true ); return classSpecifier; } | 54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/51131345dbaa12f210adc03b3ad05a951d937464/CompleteParseASTFactory.java/clean/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/ast/complete/CompleteParseASTFactory.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
467,
9053,
797,
21416,
752,
797,
21416,
12,
3639,
467,
9053,
3876,
2146,
16,
3639,
467,
1345,
40,
2268,
508,
16,
3639,
9183,
797,
5677,
3846,
16,
3639,
19811,
559,
618,
16,
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,
467,
9053,
797,
21416,
752,
797,
21416,
12,
3639,
467,
9053,
3876,
2146,
16,
3639,
467,
1345,
40,
2268,
508,
16,
3639,
9183,
797,
5677,
3846,
16,
3639,
19811,
559,
618,
16,
3639,
... |
public org.quickfix.field.TradSesReqID get(org.quickfix.field.TradSesReqID value) | public quickfix.field.TradSesReqID get(quickfix.field.TradSesReqID value) | public org.quickfix.field.TradSesReqID get(org.quickfix.field.TradSesReqID value) throws FieldNotFound { getField(value); return value; } | 8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/TradingSessionStatusRequest.java/clean/src/java/src/quickfix/fix42/TradingSessionStatusRequest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
9549,
904,
18,
1518,
18,
1609,
72,
55,
281,
6113,
734,
336,
12,
19525,
904,
18,
1518,
18,
1609,
72,
55,
281,
6113,
734,
225,
460,
13,
565,
1216,
2286,
2768,
225,
288,
5031,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
9549,
904,
18,
1518,
18,
1609,
72,
55,
281,
6113,
734,
336,
12,
19525,
904,
18,
1518,
18,
1609,
72,
55,
281,
6113,
734,
225,
460,
13,
565,
1216,
2286,
2768,
225,
288,
5031,
12,
... |
public void propertyChange( PropertyChangeEvent event ) { String property = event.getPropertyName(); if( property.equals( "name" ) ) { // TODO not right resetTitle( _proxy ); }// new RuntimeException("OUTPUT ONLY editor title names may need a new context in YAWL").printStackTrace(); } | 51637 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51637/5f0ef637d3cc642523b2dc18f9c9e01d0a15c03a/ComponentEditor.java/buggy/yawl/editor/com/nexusbpm/editor/editors/ComponentEditor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
6459,
4468,
3043,
12,
1396,
20930,
2575,
15329,
202,
202,
780,
4468,
33,
2575,
18,
588,
13073,
5621,
202,
202,
430,
12,
4468,
18,
14963,
2932,
529,
6,
3719,
95,
759,
56,
1212,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6459,
4468,
3043,
12,
1396,
20930,
2575,
15329,
202,
202,
780,
4468,
33,
2575,
18,
588,
13073,
5621,
202,
202,
430,
12,
4468,
18,
14963,
2932,
529,
6,
3719,
95,
759,
56,
1212,... | ||
public static int pickAllocator(VM_Type type, VM_Method method) throws InterruptiblePragma { if (method != null) { VM_Class cls = method.getDeclaringClass(); byte[] clsBA = cls.getDescriptor().toByteArray(); if (SelectedPlanConstraints.get().withGCspy()) { if (isPrefix("Lorg/mmtk/vm/gcspy/", clsBA) || isPrefix("[Lorg/mmtk/vm/gcspy/", clsBA)) { return Plan.ALLOC_GCSPY; } } if (isPrefix("Lorg/mmtk/", clsBA) || isPrefix("Lcom/ibm/jikesrvm/mm/", clsBA) || isPrefix("Lcom/ibm/jikesrvm/memorymanagers/mminterface/VM_GCMapIteratorGroup", clsBA)) { return Plan.ALLOC_IMMORTAL; } } MMType t = (MMType) type.getMMType(); return t.getAllocator(); | public static int pickAllocator(VM_Type type) throws InterruptiblePragma { return pickAllocator(type, null); | public static int pickAllocator(VM_Type type, VM_Method method) throws InterruptiblePragma { if (method != null) { // We should strive to be allocation-free here. VM_Class cls = method.getDeclaringClass(); byte[] clsBA = cls.getDescriptor().toByteArray(); if (SelectedPlanConstraints.get().withGCspy()) { if (isPrefix("Lorg/mmtk/vm/gcspy/", clsBA) || isPrefix("[Lorg/mmtk/vm/gcspy/", clsBA)) { return Plan.ALLOC_GCSPY; } } if (isPrefix("Lorg/mmtk/", clsBA) || isPrefix("Lcom/ibm/jikesrvm/mm/", clsBA) || isPrefix("Lcom/ibm/jikesrvm/memorymanagers/mminterface/VM_GCMapIteratorGroup", clsBA)) { return Plan.ALLOC_IMMORTAL; } } MMType t = (MMType) type.getMMType(); return t.getAllocator(); } | 4011 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4011/067721ae9adff61ef0077e1bf9eee8a2b50e78de/MM_Interface.java/buggy/rvm/src/com/ibm/jikesrvm/memorymanagers/mminterface/MM_Interface.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
509,
6002,
21156,
12,
7397,
67,
559,
618,
16,
8251,
67,
1305,
707,
13,
565,
1216,
3094,
4483,
1523,
2050,
9454,
288,
565,
309,
261,
2039,
480,
446,
13,
288,
377,
368,
1660,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
509,
6002,
21156,
12,
7397,
67,
559,
618,
16,
8251,
67,
1305,
707,
13,
565,
1216,
3094,
4483,
1523,
2050,
9454,
288,
565,
309,
261,
2039,
480,
446,
13,
288,
377,
368,
1660,
... |
_t = __t2480; | _t = __t2481; | public final void sqlexpression(AST _t) throws RecognitionException { AST sqlexpression_AST_in = (_t == ASTNULL) ? null : (AST)_t; if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case OR: { AST __t2469 = _t; AST tmp1680_AST_in = (AST)_t; match(_t,OR); _t = _t.getFirstChild(); sqlexpression(_t); _t = _retTree; sqlexpression(_t); _t = _retTree; _t = __t2469; _t = _t.getNextSibling(); break; } case AND: { AST __t2470 = _t; AST tmp1681_AST_in = (AST)_t; match(_t,AND); _t = _t.getFirstChild(); sqlexpression(_t); _t = _retTree; sqlexpression(_t); _t = _retTree; _t = __t2470; _t = _t.getNextSibling(); break; } case NOT: { AST __t2471 = _t; AST tmp1682_AST_in = (AST)_t; match(_t,NOT); _t = _t.getFirstChild(); sqlexpression(_t); _t = _retTree; _t = __t2471; _t = _t.getNextSibling(); break; } case MATCHES: { AST __t2472 = _t; AST tmp1683_AST_in = (AST)_t; match(_t,MATCHES); _t = _t.getFirstChild(); sqlscalar(_t); _t = _retTree; { if (_t==null) _t=ASTNULL; if ((_tokenSet_31.member(_t.getType()))) { sqlscalar(_t); _t = _retTree; } else if ((_t.getType()==Sql_comp_query)) { sql_comp_query(_t); _t = _retTree; } else { throw new NoViableAltException(_t); } } _t = __t2472; _t = _t.getNextSibling(); break; } case BEGINS: { AST __t2474 = _t; AST tmp1684_AST_in = (AST)_t; match(_t,BEGINS); _t = _t.getFirstChild(); sqlscalar(_t); _t = _retTree; { if (_t==null) _t=ASTNULL; if ((_tokenSet_31.member(_t.getType()))) { sqlscalar(_t); _t = _retTree; } else if ((_t.getType()==Sql_comp_query)) { sql_comp_query(_t); _t = _retTree; } else { throw new NoViableAltException(_t); } } _t = __t2474; _t = _t.getNextSibling(); break; } case CONTAINS: { AST __t2476 = _t; AST tmp1685_AST_in = (AST)_t; match(_t,CONTAINS); _t = _t.getFirstChild(); sqlscalar(_t); _t = _retTree; { if (_t==null) _t=ASTNULL; if ((_tokenSet_31.member(_t.getType()))) { sqlscalar(_t); _t = _retTree; } else if ((_t.getType()==Sql_comp_query)) { sql_comp_query(_t); _t = _retTree; } else { throw new NoViableAltException(_t); } } _t = __t2476; _t = _t.getNextSibling(); break; } case EQ: { AST __t2478 = _t; AST tmp1686_AST_in = (AST)_t; match(_t,EQ); _t = _t.getFirstChild(); sqlscalar(_t); _t = _retTree; { if (_t==null) _t=ASTNULL; if ((_tokenSet_31.member(_t.getType()))) { sqlscalar(_t); _t = _retTree; } else if ((_t.getType()==Sql_comp_query)) { sql_comp_query(_t); _t = _retTree; } else { throw new NoViableAltException(_t); } } _t = __t2478; _t = _t.getNextSibling(); break; } case NE: { AST __t2480 = _t; AST tmp1687_AST_in = (AST)_t; match(_t,NE); _t = _t.getFirstChild(); sqlscalar(_t); _t = _retTree; { if (_t==null) _t=ASTNULL; if ((_tokenSet_31.member(_t.getType()))) { sqlscalar(_t); _t = _retTree; } else if ((_t.getType()==Sql_comp_query)) { sql_comp_query(_t); _t = _retTree; } else { throw new NoViableAltException(_t); } } _t = __t2480; _t = _t.getNextSibling(); break; } case GTHAN: { AST __t2482 = _t; AST tmp1688_AST_in = (AST)_t; match(_t,GTHAN); _t = _t.getFirstChild(); sqlscalar(_t); _t = _retTree; { if (_t==null) _t=ASTNULL; if ((_tokenSet_31.member(_t.getType()))) { sqlscalar(_t); _t = _retTree; } else if ((_t.getType()==Sql_comp_query)) { sql_comp_query(_t); _t = _retTree; } else { throw new NoViableAltException(_t); } } _t = __t2482; _t = _t.getNextSibling(); break; } case GE: { AST __t2484 = _t; AST tmp1689_AST_in = (AST)_t; match(_t,GE); _t = _t.getFirstChild(); sqlscalar(_t); _t = _retTree; { if (_t==null) _t=ASTNULL; if ((_tokenSet_31.member(_t.getType()))) { sqlscalar(_t); _t = _retTree; } else if ((_t.getType()==Sql_comp_query)) { sql_comp_query(_t); _t = _retTree; } else { throw new NoViableAltException(_t); } } _t = __t2484; _t = _t.getNextSibling(); break; } case LTHAN: { AST __t2486 = _t; AST tmp1690_AST_in = (AST)_t; match(_t,LTHAN); _t = _t.getFirstChild(); sqlscalar(_t); _t = _retTree; { if (_t==null) _t=ASTNULL; if ((_tokenSet_31.member(_t.getType()))) { sqlscalar(_t); _t = _retTree; } else if ((_t.getType()==Sql_comp_query)) { sql_comp_query(_t); _t = _retTree; } else { throw new NoViableAltException(_t); } } _t = __t2486; _t = _t.getNextSibling(); break; } case LE: { AST __t2488 = _t; AST tmp1691_AST_in = (AST)_t; match(_t,LE); _t = _t.getFirstChild(); sqlscalar(_t); _t = _retTree; { if (_t==null) _t=ASTNULL; if ((_tokenSet_31.member(_t.getType()))) { sqlscalar(_t); _t = _retTree; } else if ((_t.getType()==Sql_comp_query)) { sql_comp_query(_t); _t = _retTree; } else { throw new NoViableAltException(_t); } } _t = __t2488; _t = _t.getNextSibling(); break; } case EXISTS: { AST __t2490 = _t; AST tmp1692_AST_in = (AST)_t; match(_t,EXISTS); _t = _t.getFirstChild(); AST tmp1693_AST_in = (AST)_t; match(_t,LEFTPAREN); _t = _t.getNextSibling(); selectstatea(_t); _t = _retTree; AST tmp1694_AST_in = (AST)_t; match(_t,RIGHTPAREN); _t = _t.getNextSibling(); _t = __t2490; _t = _t.getNextSibling(); break; } case Sql_begins: { AST __t2491 = _t; AST tmp1695_AST_in = (AST)_t; match(_t,Sql_begins); _t = _t.getFirstChild(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case NOT: { AST tmp1696_AST_in = (AST)_t; match(_t,NOT); _t = _t.getNextSibling(); break; } case BEGINS: { break; } default: { throw new NoViableAltException(_t); } } } AST tmp1697_AST_in = (AST)_t; match(_t,BEGINS); _t = _t.getNextSibling(); sqlscalar(_t); _t = _retTree; _t = __t2491; _t = _t.getNextSibling(); break; } case Sql_between: { AST __t2493 = _t; AST tmp1698_AST_in = (AST)_t; match(_t,Sql_between); _t = _t.getFirstChild(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case NOT: { AST tmp1699_AST_in = (AST)_t; match(_t,NOT); _t = _t.getNextSibling(); break; } case BETWEEN: { break; } default: { throw new NoViableAltException(_t); } } } AST tmp1700_AST_in = (AST)_t; match(_t,BETWEEN); _t = _t.getNextSibling(); sqlscalar(_t); _t = _retTree; AST tmp1701_AST_in = (AST)_t; match(_t,AND); _t = _t.getNextSibling(); sqlscalar(_t); _t = _retTree; _t = __t2493; _t = _t.getNextSibling(); break; } case Sql_in: { AST __t2495 = _t; AST tmp1702_AST_in = (AST)_t; match(_t,Sql_in); _t = _t.getFirstChild(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case NOT: { AST tmp1703_AST_in = (AST)_t; match(_t,NOT); _t = _t.getNextSibling(); break; } case IN_KW: { break; } default: { throw new NoViableAltException(_t); } } } AST tmp1704_AST_in = (AST)_t; match(_t,IN_KW); _t = _t.getNextSibling(); AST tmp1705_AST_in = (AST)_t; match(_t,LEFTPAREN); _t = _t.getNextSibling(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case SELECT: { selectstatea(_t); _t = _retTree; break; } case LEXDATE: case NUMBER: case QSTRING: case BIGENDIAN: case EXCLUSIVELOCK: case FALSE_KW: case FINDCASESENSITIVE: case FINDGLOBAL: case FINDNEXTOCCURRENCE: case FINDPREVOCCURRENCE: case FINDSELECT: case FINDWRAPAROUND: case HOSTBYTEORDER: case LITTLEENDIAN: case NO: case NOLOCK: case NOWAIT: case NULL_KW: case READAVAILABLE: case READEXACTNUM: case SEARCHSELF: case SEARCHTARGET: case SHARELOCK: case TRUE_KW: case USERID: case WINDOWDELAYEDMINIMIZE: case WINDOWMAXIMIZED: case WINDOWMINIMIZED: case WINDOWNORMAL: case YES: case UNKNOWNVALUE: case Field_ref: case FUNCTIONCALLTYPE: case GETATTRCALLTYPE: case PROCEDURECALLTYPE: case SAXCOMPLETE: case SAXPARSERERROR: case SAXRUNNING: case SAXUNINITIALIZED: case SETATTRCALLTYPE: case ROWUNMODIFIED: case ROWDELETED: case ROWMODIFIED: case ROWCREATED: { sql_in_val(_t); _t = _retTree; { _loop2499: do { if (_t==null) _t=ASTNULL; if ((_t.getType()==COMMA)) { AST tmp1706_AST_in = (AST)_t; match(_t,COMMA); _t = _t.getNextSibling(); sql_in_val(_t); _t = _retTree; } else { break _loop2499; } } while (true); } break; } default: { throw new NoViableAltException(_t); } } } AST tmp1707_AST_in = (AST)_t; match(_t,RIGHTPAREN); _t = _t.getNextSibling(); _t = __t2495; _t = _t.getNextSibling(); break; } case Sql_like: { AST __t2500 = _t; AST tmp1708_AST_in = (AST)_t; match(_t,Sql_like); _t = _t.getFirstChild(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case NOT: { AST tmp1709_AST_in = (AST)_t; match(_t,NOT); _t = _t.getNextSibling(); break; } case LIKE: { break; } default: { throw new NoViableAltException(_t); } } } AST tmp1710_AST_in = (AST)_t; match(_t,LIKE); _t = _t.getNextSibling(); sqlscalar(_t); _t = _retTree; { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case ESCAPE: { AST tmp1711_AST_in = (AST)_t; match(_t,ESCAPE); _t = _t.getNextSibling(); sqlscalar(_t); _t = _retTree; break; } case 3: { break; } default: { throw new NoViableAltException(_t); } } } _t = __t2500; _t = _t.getNextSibling(); break; } case Sql_null_test: { AST __t2503 = _t; AST tmp1712_AST_in = (AST)_t; match(_t,Sql_null_test); _t = _t.getFirstChild(); AST tmp1713_AST_in = (AST)_t; match(_t,IS); _t = _t.getNextSibling(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case NOT: { AST tmp1714_AST_in = (AST)_t; match(_t,NOT); _t = _t.getNextSibling(); break; } case NULL_KW: { break; } default: { throw new NoViableAltException(_t); } } } AST tmp1715_AST_in = (AST)_t; match(_t,NULL_KW); _t = _t.getNextSibling(); _t = __t2503; _t = _t.getNextSibling(); break; } default: if (_t==null) _t=ASTNULL; if ((_tokenSet_31.member(_t.getType()))) { sqlscalar(_t); _t = _retTree; } else { throw new NoViableAltException(_t); } } _retTree = _t; } | 13952 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13952/865876f0e6319c071fef156818ff116c276cfdff/TreeParser01.java/buggy/trunk/org.prorefactor.core/src/org/prorefactor/treeparser01/TreeParser01.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
4744,
4149,
1337,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
4744,
4149,
1337,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
13,
692,
446,
29... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
4744,
4149,
1337,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
4744,
4149,
1337,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
13,
692,
446,
29... |
throw new EJBException("Transaction rollback failed: " + e); | throw new RemoteException("Transaction rollback failed: " + e); | public String getItems(Integer categoryId, Integer regionId, int page, int nbOfItems) { Enumeration list; ItemPK itemPK; ItemHome iHome; Item item; Query query; QueryHome qHome; String html = ""; try { qHome = (QueryHome)PortableRemoteObject.narrow(initialContext.lookup("java:comp/env/ejb/Query"), QueryHome.class); query = qHome.create(); } catch (Exception e) { throw new EJBException("Cannot lookup Query: " +e); } try { iHome = (ItemHome)PortableRemoteObject.narrow(initialContext.lookup("java:comp/env/ejb/Item"), ItemHome.class); } catch (Exception e) { throw new EJBException("Cannot lookup Item: " +e); } utx = sessionContext.getUserTransaction(); try { utx.begin(); list = query.getCurrentItemsInCategoryAndRegion(categoryId, regionId, page*nbOfItems, nbOfItems).elements(); while (list.hasMoreElements()) { itemPK = (ItemPK)list.nextElement(); item = iHome.findByPrimaryKey(itemPK); html = html.concat(printItem(item)); } utx.commit(); } catch (Exception e) { try { utx.rollback(); throw new EJBException("Cannot get items list: " +e); } catch (Exception se) { throw new EJBException("Transaction rollback failed: " + e); } } return html; } | 5750 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5750/69c37257a1581e015b5a8a01582a0f0d4a10936c/SB_SearchItemsByRegionBean.java/buggy/EJB_Session_facade/edu/rice/rubis/beans/SB_SearchItemsByRegionBean.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
514,
15515,
12,
4522,
28311,
16,
2144,
3020,
548,
16,
509,
1363,
16,
509,
4264,
951,
3126,
13,
282,
288,
1377,
13864,
666,
31,
1377,
4342,
8784,
1377,
761,
8784,
31,
1377,
4342,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
514,
15515,
12,
4522,
28311,
16,
2144,
3020,
548,
16,
509,
1363,
16,
509,
4264,
951,
3126,
13,
282,
288,
1377,
13864,
666,
31,
1377,
4342,
8784,
1377,
761,
8784,
31,
1377,
4342,
8... |
public String word() throws RecognitionException { String word; Token id=null; Token str=null; word = null; try { // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:962:17: (id= ID | 'import' | 'use' | 'rule' | 'query' | 'salience' | 'no-loop' | 'when' | 'then' | 'end' | str= STRING ) int alt62=11; switch ( input.LA(1) ) { case ID: alt62=1; break; case 17: alt62=2; break; case 57: alt62=3; break; case 28: alt62=4; break; case 26: alt62=5; break; case 33: alt62=6; break; case 34: alt62=7; break; case 29: alt62=8; break; case 31: alt62=9; break; case 27: alt62=10; break; case STRING: alt62=11; break; default: NoViableAltException nvae = new NoViableAltException("958:1: word returns [String word] : (id= ID | \'import\' | \'use\' | \'rule\' | \'query\' | \'salience\' | \'no-loop\' | \'when\' | \'then\' | \'end\' | str= STRING );", 62, 0, input); throw nvae; } switch (alt62) { case 1 : // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:962:17: id= ID { id=(Token)input.LT(1); match(input,ID,FOLLOW_ID_in_word2726); word=id.getText(); } break; case 2 : // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:963:17: 'import' { match(input,17,FOLLOW_17_in_word2738); word="import"; } break; case 3 : // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:964:17: 'use' { match(input,57,FOLLOW_57_in_word2747); word="use"; } break; case 4 : // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:965:17: 'rule' { match(input,28,FOLLOW_28_in_word2759); word="rule"; } break; case 5 : // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:966:17: 'query' { match(input,26,FOLLOW_26_in_word2770); word="query"; } break; case 6 : // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:967:17: 'salience' { match(input,33,FOLLOW_33_in_word2780); word="salience"; } break; case 7 : // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:968:17: 'no-loop' { match(input,34,FOLLOW_34_in_word2788); word="no-loop"; } break; case 8 : // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:969:17: 'when' { match(input,29,FOLLOW_29_in_word2796); word="when"; } break; case 9 : // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:970:17: 'then' { match(input,31,FOLLOW_31_in_word2807); word="then"; } break; case 10 : // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:971:17: 'end' { match(input,27,FOLLOW_27_in_word2818); word="end"; } break; case 11 : // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:972:17: str= STRING { str=(Token)input.LT(1); match(input,STRING,FOLLOW_STRING_in_word2832); word=getString(str); } break; } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { } return word; } | 5490 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5490/7f81b86a0f548bd02b09afc74b46454cdf158154/RuleParser.java/buggy/drools-compiler/src/main/java/org/drools/lang/RuleParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
2076,
1435,
1216,
9539,
288,
6647,
514,
2076,
31,
3639,
3155,
612,
33,
2011,
31,
3639,
3155,
609,
33,
2011,
31,
1171,
202,
202,
1095,
273,
446,
31,
540,
202,
3639,
775,
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,
514,
2076,
1435,
1216,
9539,
288,
6647,
514,
2076,
31,
3639,
3155,
612,
33,
2011,
31,
3639,
3155,
609,
33,
2011,
31,
1171,
202,
202,
1095,
273,
446,
31,
540,
202,
3639,
775,
288,
... | ||
ManagedBuildManager.removeBuildInfo(project); | public void testConfigurations() throws CoreException, BuildException { final String rootName = "Root Config"; final String overrideName = "Root Override Config"; final String completeOverrideName = "Complete Override Config"; final String toolCmd = "doIt"; final String newCmd = "never"; // Open the test project IProject project = createProject(projectName); IProjectDescription description = project.getDescription(); // Make sure it has a managed nature if (description != null) { assertTrue(description.hasNature(ManagedCProjectNature.MNG_NATURE_ID)); } // Make sure there is one and only one target with 3 configs ITarget[] definedTargets = ManagedBuildManager.getTargets(project); assertEquals(1, definedTargets.length); ITarget rootTarget = definedTargets[0]; IConfiguration[] definedConfigs = rootTarget.getConfigurations(); assertEquals(3, definedConfigs.length); IConfiguration baseConfig = definedConfigs[0]; assertEquals(definedConfigs[0].getName(), rootName); assertEquals(definedConfigs[1].getName(), overrideName); assertEquals(definedConfigs[2].getName(), completeOverrideName); // Create a new configuration and test the rename function IConfiguration newConfig = rootTarget.createConfiguration(baseConfig, testConfigId); assertEquals(4, rootTarget.getConfigurations().length); newConfig.setName(testConfigName); assertEquals(newConfig.getId(), testConfigId); assertEquals(newConfig.getName(), testConfigName); // There is only one tool ITool[] definedTools = newConfig.getTools(); assertEquals(1, definedTools.length); ITool rootTool = definedTools[0]; // Test changing its command assertEquals(rootTool.getToolCommand(), toolCmd); newConfig.setToolCommand(rootTool, newCmd); assertEquals(rootTool.getToolCommand(), newCmd); // Override options in the new configuration IOptionCategory topCategory = rootTool.getTopOptionCategory(); assertEquals("Root Tool", topCategory.getName()); IOption[] options = topCategory.getOptions(null); assertEquals(2, options.length); ManagedBuildManager.setOption(newConfig, options[0], listVal); ManagedBuildManager.setOption(newConfig, options[1], boolVal); IOptionCategory[] categories = topCategory.getChildCategories(); assertEquals(1, categories.length); options = categories[0].getOptions(null); assertEquals(4, options.length); ManagedBuildManager.setOption(newConfig, options[0], stringVal); ManagedBuildManager.setOption(newConfig, options[1], anotherStringVal); ManagedBuildManager.setOption(newConfig, options[2], enumVal); ManagedBuildManager.setOption(newConfig, options[3], "False"); // Save, close, reopen and test again ManagedBuildManager.saveBuildInfo(project, false); project.close(null); ManagedBuildManager.removeBuildInfo(project); project.open(null); // Test the values in the new configuration checkOptionReferences(project); // Now delete the new configuration and test the target definedTargets = ManagedBuildManager.getTargets(project); assertEquals(1, definedTargets.length); rootTarget = definedTargets[0]; definedConfigs = rootTarget.getConfigurations(); assertEquals(4, definedConfigs.length); rootTarget.removeConfiguration(testConfigId); definedConfigs = rootTarget.getConfigurations(); assertEquals(3, definedConfigs.length); assertEquals(definedConfigs[0].getName(), rootName); assertEquals(definedConfigs[1].getName(), overrideName); ManagedBuildManager.saveBuildInfo(project, false); } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/18b49394c46cbbecf041078a70e83e4975d004a7/ManagedBuildCoreTests.java/clean/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuild/core/tests/ManagedBuildCoreTests.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
9698,
1435,
1216,
30015,
16,
18463,
288,
202,
202,
6385,
514,
1365,
461,
273,
315,
2375,
1903,
14432,
202,
202,
6385,
514,
3849,
461,
273,
315,
2375,
1439,
1903,
1443... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
9698,
1435,
1216,
30015,
16,
18463,
288,
202,
202,
6385,
514,
1365,
461,
273,
315,
2375,
1903,
14432,
202,
202,
6385,
514,
3849,
461,
273,
315,
2375,
1439,
1903,
1443... | |
expPriorityButtonActionPerformed(evt); | highPriorityButtonActionPerformed(evt); | public void actionPerformed(java.awt.event.ActionEvent evt) { expPriorityButtonActionPerformed(evt); } | 7352 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7352/f514b2665846a89e5fc8c1e2ca05d03360b16f3d/FindBugsFrame.java/buggy/findbugs/src/java/edu/umd/cs/findbugs/gui/FindBugsFrame.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1171,
1071,
918,
26100,
12,
6290,
18,
2219,
88,
18,
2575,
18,
1803,
1133,
6324,
13,
288,
10792,
3551,
8183,
3616,
19449,
12,
73,
11734,
1769,
7734,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1171,
1071,
918,
26100,
12,
6290,
18,
2219,
88,
18,
2575,
18,
1803,
1133,
6324,
13,
288,
10792,
3551,
8183,
3616,
19449,
12,
73,
11734,
1769,
7734,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
... |
classFile.addLineNumberEntry((short)itsLineNumber); | cfw.addLineNumberEntry((short)itsLineNumber); | private void visitStatement(Node node) { itsLineNumber = node.getLineno(); if (itsLineNumber == -1) return; classFile.addLineNumberEntry((short)itsLineNumber); } | 51275 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51275/bd2594e6ebd6d8099b587934641c8f7650d87761/Codegen.java/clean/js/rhino/src/org/mozilla/javascript/optimizer/Codegen.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
3757,
3406,
12,
907,
756,
13,
565,
288,
3639,
2097,
31063,
273,
756,
18,
588,
48,
267,
5764,
5621,
3639,
309,
261,
1282,
31063,
422,
300,
21,
13,
5411,
327,
31,
3639,
6080,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
377,
3238,
918,
3757,
3406,
12,
907,
756,
13,
565,
288,
3639,
2097,
31063,
273,
756,
18,
588,
48,
267,
5764,
5621,
3639,
309,
261,
1282,
31063,
422,
300,
21,
13,
5411,
327,
31,
3639,
6080,
... |
private void writeManifest(Context context, Item item, PackageParameters params, OutputStream out) throws PackageValidationException, CrosswalkException, AuthorizeException, SQLException, IOException { try { // Create the METS file Mets mets = new Mets(); // Top-level stuff mets.setID(gensym("mets")); mets.setOBJID("hdl:" + item.getHandle()); mets.setLABEL("DSpace Item"); mets.setPROFILE(getProfile()); // MetsHdr MetsHdr metsHdr = new MetsHdr(); metsHdr.setCREATEDATE(new Date()); // FIXME: CREATEDATE is now: // maybe should be item create // date? // Agent Agent agent = new Agent(); agent.setROLE(Role.CUSTODIAN); agent.setTYPE(Type.ORGANIZATION); Name name = new Name(); name.getContent() .add(new PCData(ConfigurationManager .getProperty("dspace.name"))); agent.getContent().add(name); metsHdr.getContent().add(agent); mets.getContent().add(metsHdr); // add DMD sections // Each type element MAY be either just a MODS-and-crosswalk name, OR // a combination "MODS-name:crosswalk-name" (e.g. "DC:qDC"). String dmdTypes[] = getDmdTypes(params); // record of ID of each dmdsec to make DMDID in structmap. String dmdGroup = gensym("dmd_group"); String dmdId[] = new String[dmdTypes.length]; for (int i = 0; i < dmdTypes.length; ++i) { dmdId[i] = gensym("dmd"); XmlData xmlData = new XmlData(); String xwalkName, metsName; String parts[] = dmdTypes[i].split(":", 2); if (parts.length > 1) { metsName = parts[0]; xwalkName = parts[1]; } else xwalkName = metsName = dmdTypes[i]; DisseminationCrosswalk xwalk = (DisseminationCrosswalk) PluginManager.getNamedPlugin(DisseminationCrosswalk.class, xwalkName); if (xwalk == null) throw new PackageValidationException("Cannot find "+dmdTypes[i]+" crosswalk plugin!"); else crosswalkToMets(xwalk, item, xmlData); DmdSec dmdSec = new DmdSec(); dmdSec.setID(dmdId[i]); dmdSec.setGROUPID(dmdGroup); MdWrap mdWrap = new MdWrap(); setMdType(mdWrap, metsName); mdWrap.getContent().add(xmlData); dmdSec.getContent().add(mdWrap); mets.getContent().add(dmdSec); } // only add license AMD section if there are any licenses. String licenseID = null; AmdSec amdSec = new AmdSec(); addRightsMd(context, item, amdSec); if (amdSec.getContent().size() > 0) { licenseID = gensym("license"); amdSec.setID(licenseID); mets.getContent().add(amdSec); } // FIXME: History data???? Nooooo!!!! // fileSec - all non-metadata bundles go into fileGrp, // and each bitstream therein into a file. // Create the bitstream-level techMd and div's for structmap // at the same time so we can connec the IDREFs to IDs. FileSec fileSec = new FileSec(); String techMdType = getTechMdType(params); String parts[] = techMdType.split(":", 2); String xwalkName, metsName; if (parts.length > 1) { metsName = parts[0]; xwalkName = parts[1]; } else xwalkName = metsName = techMdType; DisseminationCrosswalk xwalk = (DisseminationCrosswalk) PluginManager.getNamedPlugin(DisseminationCrosswalk.class, xwalkName); if (xwalk == null) throw new PackageValidationException("Cannot find "+xwalkName+" crosswalk plugin!"); // log the primary bitstream for structmap String primaryBitstreamFileID = null; // accumulate content DIV items to put in structMap later. List contentDivs = new ArrayList(); Bundle[] bundles = item.getBundles(); for (int i = 0; i < bundles.length; i++) { if (PackageUtils.isMetaInfoBundle(bundles[i])) continue; Bitstream[] bitstreams = bundles[i].getBitstreams(); // Create a fileGrp FileGrp fileGrp = new FileGrp(); // Bundle name for USE attribute String bName = bundles[i].getName(); if ((bName != null) && !bName.equals("")) fileGrp.setUSE(bundleToFileGrp(bName)); // watch for primary bitstream int primaryBitstreamID = -1; boolean isContentBundle = false; if ((bName != null) && bName.equals("ORIGINAL")) { isContentBundle = true; primaryBitstreamID = bundles[i].getPrimaryBitstreamID(); } for (int bits = 0; bits < bitstreams.length; bits++) { String sid = String.valueOf(bitstreams[bits].getSequenceID()); edu.harvard.hul.ois.mets.File file = new edu.harvard.hul.ois.mets.File(); String xmlIDstart = "bitstream_"; String fileID = xmlIDstart + sid; file.setID(fileID); // log primary bitstream for later (structMap) if (bitstreams[bits].getID() == primaryBitstreamID) primaryBitstreamFileID = fileID; // if this is content, add to structmap too: if (isContentBundle) { Div div = new Div(); div.setID(gensym("div")); div.setTYPE("DSpace Content Bitstream"); Fptr fptr = new Fptr(); fptr.setFILEID(fileID); div.getContent().add(fptr); contentDivs.add(div); } file.setSEQ(bitstreams[bits].getSequenceID()); String groupID = "GROUP_" + xmlIDstart + sid; /* * If we're in THUMBNAIL or TEXT bundles, the bitstream is * extracted text or a thumbnail, so we use the name to work * out which bitstream to be in the same group as */ if ((bundles[i].getName() != null) && (bundles[i].getName().equals("THUMBNAIL") || bundles[i].getName().startsWith("TEXT"))) { // Try and find the original bitstream, and chuck the // derived bitstream in the same group Bitstream original = findOriginalBitstream(item, bitstreams[bits]); if (original != null) { groupID = "GROUP_" + xmlIDstart + original.getSequenceID(); } } file.setGROUPID(groupID); file.setMIMETYPE(bitstreams[bits].getFormat().getMIMEType()); // FIXME: CREATED: no date file.setSIZE(bitstreams[bits].getSize()); // translate checksum and type to METS, if available. String csType = bitstreams[bits].getChecksumAlgorithm(); String cs = bitstreams[bits].getChecksum(); if (cs != null && csType != null) { try { file.setCHECKSUMTYPE(Checksumtype.parse(csType)); file.setCHECKSUM(cs); } catch (MetsException e) { log.warn("Cannot set bitstream checksum type="+csType+" in METS."); } } // FLocat: filename is MD5 checksum FLocat flocat = new FLocat(); flocat.setLOCTYPE(Loctype.URL); flocat.setXlinkHref(makeBitstreamName(bitstreams[bits])); // Make bitstream techMD metadata, add to file. String techID = "techMd_for_bitstream_"+bitstreams[bits].getSequenceID(); AmdSec fAmdSec = new AmdSec(); fAmdSec.setID(techID); TechMD techMd = new TechMD(); techMd.setID(gensym("tech")); MdWrap mdWrap = new MdWrap(); setMdType(mdWrap, metsName); XmlData xmlData = new XmlData(); mdWrap.getContent().add(xmlData); techMd.getContent().add(mdWrap); fAmdSec.getContent().add(techMd); mets.getContent().add(fAmdSec); crosswalkToMets(xwalk, bitstreams[bits], xmlData); file.setADMID(techID); // Add FLocat to File, and File to FileGrp file.getContent().add(flocat); fileGrp.getContent().add(file); } // Add fileGrp to fileSec fileSec.getContent().add(fileGrp); } // Add fileSec to document mets.getContent().add(fileSec); // Create simple structMap: initial div represents the Item, // and user-visible content bitstreams are in its child divs. StringBuffer dmdIds = new StringBuffer(); for (int i = 0; i < dmdId.length; ++i) dmdIds.append(" "+dmdId[i]); StructMap structMap = new StructMap(); structMap.setID(gensym("struct")); structMap.setTYPE("LOGICAL"); structMap.setLABEL("DSpace"); Div div0 = new Div(); div0.setID(gensym("div")); div0.setTYPE("DSpace Item"); div0.setDMDID(dmdIds.substring(1)); if (licenseID != null) div0.setADMID(licenseID); // if there is a primary bitstream, add FPTR to it. if (primaryBitstreamFileID != null) { Fptr fptr = new Fptr(); fptr.setFILEID(primaryBitstreamFileID); div0.getContent().add(fptr); } // add DIV for each content bitstream div0.getContent().addAll(contentDivs); structMap.getContent().add(div0); // Does subclass have something to add to structMap? addStructMap(context, item, params, mets); mets.getContent().add(structMap); mets.validate(new MetsValidator()); mets.write(new MetsWriter(out)); } catch (MetsException e) { // We don't pass up a MetsException, so callers don't need to // know the details of the METS toolkit // e.printStackTrace(); throw new PackageValidationException(e); } } | 49711 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49711/748804adc26317566de95cc497aca1def22e5f87/AbstractMetsDissemination.java/buggy/dspace/src/org/dspace/content/packager/AbstractMetsDissemination.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
3238,
282,
918,
282,
1045,
9121,
12,
1042,
282,
819,
16,
282,
4342,
282,
761,
16,
28524,
11794,
7508,
2402,
282,
859,
16,
282,
8962,
282,
596,
13,
13491,
1216,
282,
7508,
18146,
16,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
3238,
282,
918,
282,
1045,
9121,
12,
1042,
282,
819,
16,
282,
4342,
282,
761,
16,
28524,
11794,
7508,
2402,
282,
859,
16,
282,
8962,
282,
596,
13,
13491,
1216,
282,
7508,
18146,
16,
28... | ||
jar.addFile(doc.getFile(), packageNameToPath(doc.getPackageName()), doc.getFilename()); | jar.addFile(doc.getFile(), packageNameToPath(doc.getPackageName()), doc.getFileName()); | private void _ok() { // Always apply and save settings _saveSettings(); File jarOut = _jarFileSelector.getFileFromField(); if (jarOut == null) { JOptionPane.showMessageDialog(JarOptionsDialog.this, "You must specify an output file", "Error: No File Specified", JOptionPane.ERROR_MESSAGE); return; } else if (jarOut.exists()) { if (JOptionPane.showConfirmDialog(JarOptionsDialog.this, "Are you sure you want to overwrite the file '" + jarOut.getPath() + "'?", "Overwrite file?", JOptionPane.YES_NO_OPTION) != JOptionPane.YES_OPTION) { // I want to focus back to the dialog return; } } setEnabled(false); _processingFrame.setVisible(true); SwingWorker worker = new SwingWorker() { boolean _success = false; /** * Takes input of a file which is a directory and compresses all the class files in it * into a jar file * * @param dir the File object representing the directory * @param jarFile the JarBuilder that the data should be written to * @return true on success, false on failure */ private boolean jarBuildDirectory(File dir, JarBuilder jarFile) throws IOException { java.io.FileFilter classFilter = new java.io.FileFilter() { public boolean accept(File f) { return f.isDirectory() || f.getName().endsWith(".class"); } }; File[] files = dir.listFiles(classFilter); for (int i = 0; i < files.length; i++) { if (files[i].isDirectory()) { jarFile.addDirectoryRecursive(files[i], files[i].getName(), classFilter); } else { jarFile.addFile(files[i], "", files[i].getName()); } } return true; } /** * Takes the model and the jar and writes all the sources to the jar * * @param model the GlobalModel that the files are to come out of * @param jar the JarBuilder that the data should be written to * @return true on success, false on failure */ private boolean jarSources(GlobalModel model, JarBuilder jar) { List<OpenDefinitionsDocument> srcs = model.getProjectDocuments(); Iterator<OpenDefinitionsDocument> iter = srcs.iterator(); while (iter.hasNext()) { OpenDefinitionsDocument doc = iter.next(); if (doc.inProject() && !doc.isAuxiliaryFile()) { try { // Since the file compiled without any errors, this shouldn't have any problems jar.addFile(doc.getFile(), packageNameToPath(doc.getPackageName()), doc.getFilename()); } catch (IOException e) { e.printStackTrace(); throw new UnexpectedException(e); } catch (InvalidPackageException e) { e.printStackTrace(); throw new UnexpectedException(e); } } } return true; } /** * Helper function to convert a package name to its path form * * @param packageName the name of the package * @return the String which is should be the directory that it should be contained within */ private String packageNameToPath(String packageName) { return packageName.replaceAll("\\.", System.getProperty("file.separator").replaceAll("\\\\", "\\\\\\\\")); } /** * The method to perform the work * * @return null */ public Object construct() { try { File jarOut = _jarFileSelector.getFileFromField(); if (!jarOut.exists()) { jarOut.createNewFile(); } if (_jarClasses.isSelected() && _jarSources.isSelected()) { JarBuilder mainJar = null; if (_makeExecutable.isSelected()) { ManifestWriter mw = new ManifestWriter(); mw.setMainClass(_mainClassField.getText()); mainJar = new JarBuilder(jarOut, mw.getManifest()); } else { mainJar = new JarBuilder(jarOut); } jarBuildDirectory(_model.getBuildDirectory(), mainJar); File sourceJarFile = File.createTempFile(_model.getBuildDirectory().getName(), ".jar"); JarBuilder sourceJar = new JarBuilder(sourceJarFile); jarSources(_model, sourceJar); sourceJar.close(); mainJar.addFile(sourceJarFile, "", "source.jar"); mainJar.close(); sourceJarFile.delete(); } else if (_jarClasses.isSelected()) { JarBuilder jb; if (_makeExecutable.isSelected()) { ManifestWriter mw = new ManifestWriter(); mw.setMainClass(_mainClassField.getText()); jb = new JarBuilder(jarOut, mw.getManifest()); } else { jb = new JarBuilder(jarOut); } jarBuildDirectory(_model.getBuildDirectory(), jb); jb.close(); } else { JarBuilder jb = new JarBuilder(jarOut); jarSources(_model, jb); jb.close(); } _success = true; } catch (Exception e) { e.printStackTrace(); } return null; } public void finished() { _processingFrame.setVisible(false); JarOptionsDialog.this.setEnabled(true); if (_success) { if (_makeExecutable.isSelected()) { Object[] options = { "OK", "Run" }; int res = JOptionPane.showOptionDialog(JarOptionsDialog.this, "Jar file successfully written to '"+_jarFileSelector.getFileFromField().getName()+"'", "Jar Creation Successful", JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE, null, options, options[0]); JarOptionsDialog.this.setVisible(false); if (1==res) { SwingWorker jarRunner = new SwingWorker() { public Object construct() { try { Process jarFileProcess = ExecJVM.runJVM(_mainClassField.getText(), // mainClass new String[] {}, // classParams, new String[] { _jarFileSelector.getFileFromField().getAbsolutePath() }, // classPath, new String[] {}, // jvmParams, _jarFileSelector.getFileFromField().getParentFile()); StreamRedirectThread errThread = new StreamRedirectThread("error reader", jarFileProcess.getErrorStream(), System.err); StreamRedirectThread outThread = new StreamRedirectThread("output reader", jarFileProcess.getInputStream(), System.out); errThread.start(); outThread.start(); boolean notDead = true; while(notDead) { try { errThread.join(); outThread.join(); notDead = false; } catch (InterruptedException exc) { // ignore, we don't interrupt } } jarFileProcess.waitFor(); JOptionPane.showMessageDialog(JarOptionsDialog.this,"Execution of jar file terminated (exit value = "+ jarFileProcess.exitValue()+")", "Execution terminated.", JOptionPane.INFORMATION_MESSAGE); } catch(Exception e) { JOptionPane.showMessageDialog(JarOptionsDialog.this, "An error occured while running the jar file: \n"+e, "Error", JOptionPane.ERROR_MESSAGE); } return null; } }; jarRunner.start(); } } else { JOptionPane.showMessageDialog(JarOptionsDialog.this,"Jar file successfully written to '"+_jarFileSelector.getFileFromField().getName()+"'", "Jar Creation Successful", JOptionPane.INFORMATION_MESSAGE); JarOptionsDialog.this.setVisible(false); } } else { JOptionPane.showMessageDialog(JarOptionsDialog.this, "An error occured while creating the jar file. This could be because the file that you are writing to or the file you are reading from could not be opened.", "Error: File Access", JOptionPane.ERROR_MESSAGE); JarOptionsDialog.this.setVisible(false); } } }; worker.start(); } | 11192 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11192/838397e908a24e107f724695c1466c1c498ec946/JarOptionsDialog.java/clean/drjava/src/edu/rice/cs/drjava/ui/JarOptionsDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
389,
601,
1435,
288,
565,
368,
14178,
2230,
471,
1923,
1947,
565,
389,
5688,
2628,
5621,
565,
1387,
7334,
1182,
273,
389,
11930,
812,
4320,
18,
29925,
1265,
974,
5621,
565,
309... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
389,
601,
1435,
288,
565,
368,
14178,
2230,
471,
1923,
1947,
565,
389,
5688,
2628,
5621,
565,
1387,
7334,
1182,
273,
389,
11930,
812,
4320,
18,
29925,
1265,
974,
5621,
565,
309... |
final static boolean arrayRegionMatches(char[] source, int sourceStart, char[] target, int targetStart, int len) { int sourceEnd = sourceStart + len; int delta = targetStart - sourceStart; for (int i = sourceStart; i < sourceEnd; i++) { if (source[i] != target[i + delta]) return false; } return true; } | 5620 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5620/e87b31606f688d97d1580bcab4c7589a7d24935d/CompactCharArray.java/buggy/icu4j/src/com/ibm/icu/util/CompactCharArray.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
727,
3845,
6494,
1126,
5165,
6869,
12,
3001,
8526,
3168,
16,
474,
3168,
1685,
16,
3001,
8526,
3299,
16,
474,
3299,
1685,
16,
474,
1897,
15329,
474,
3168,
1638,
33,
3168,
1685,
15,
1897,
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,
727,
3845,
6494,
1126,
5165,
6869,
12,
3001,
8526,
3168,
16,
474,
3168,
1685,
16,
3001,
8526,
3299,
16,
474,
3299,
1685,
16,
474,
1897,
15329,
474,
3168,
1638,
33,
3168,
1685,
15,
1897,
31,
... | ||
out.println("<a href=\"" + _servletURL + "?" + fileNameWithoutExt | out.println("<a href=\"" + _servletURL + "?" + fileNameWithoutExt | private void printLogsAsLinks(PrintWriter out) throws ParseException{ final int START_TSTAMP = 3; final int END_TSTAMP = 15; File logDirFile = new File(_logDir); String[] prevBuildLogs = logDirFile.list(); Arrays.sort(prevBuildLogs); //(PENDING) print first N logs as links, place remaining in a drop down for (int i = prevBuildLogs.length - 1; i >= 0; i--) { String currFileName = prevBuildLogs[i]; if (currFileName.startsWith("log") && currFileName.endsWith(".xml")) { String label = ""; if (currFileName.indexOf("L") != -1) { label = " (" + currFileName.substring(currFileName.indexOf("L") + 1, currFileName.length() - 4) + ")"; } else { label = ""; } String timestamp = currFileName.substring(START_TSTAMP, END_TSTAMP); SimpleDateFormat currFormat = new SimpleDateFormat("yyyyMMddHHmm"); SimpleDateFormat targetFormat = new SimpleDateFormat ("MM/dd/yyyy HH:mm"); String dateString = targetFormat.format( new Date(currFormat.parse(timestamp).getTime())); String fileNameWithoutExt = currFileName.substring(0, currFileName.lastIndexOf(".")); out.println("<a href=\"" + _servletURL + "?" + fileNameWithoutExt + "\">" + dateString + label + "</a><br>"); } } } | 55334 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55334/d5ce2cd6cec60d2b0cd8bad8eb863c6660e7348f/BuildServlet.java/buggy/main/src/net/sourceforge/cruisecontrol/BuildServlet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1172,
7777,
1463,
7100,
12,
5108,
2289,
596,
13,
1216,
10616,
95,
3639,
727,
509,
10485,
67,
56,
12192,
273,
890,
31,
3639,
727,
509,
7273,
67,
56,
12192,
273,
4711,
31,
7734... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1172,
7777,
1463,
7100,
12,
5108,
2289,
596,
13,
1216,
10616,
95,
3639,
727,
509,
10485,
67,
56,
12192,
273,
890,
31,
3639,
727,
509,
7273,
67,
56,
12192,
273,
4711,
31,
7734... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.