rem stringlengths 1 226k | add stringlengths 0 227k | context stringlengths 6 326k | meta stringlengths 143 403 | input_ids listlengths 256 256 | attention_mask listlengths 256 256 | labels listlengths 128 128 |
|---|---|---|---|---|---|---|
public void buildWebapp( MavenProject project ) throws IOException { getLog().info( "Assembling webapp " + project.getArtifactId() + " in " + webappDirectory ); File libDirectory = new File( webappDirectory, WEB_INF + "/lib" ); File tldDirectory = new File( webappDirectory, WEB_INF + "/tld" ); File webappClassesDirectory = new File( webappDirectory, WEB_INF + "/classes" ); File classesDirectory = new File( this.classesDirectory ); if ( classesDirectory.exists() ) { FileUtils.copyDirectoryStructure( classesDirectory, webappClassesDirectory ); } Set artifacts = project.getArtifacts(); for ( Iterator iter = artifacts.iterator(); iter.hasNext(); ) { Artifact artifact = (Artifact) iter.next(); // TODO: scope handler // TODO: use classpath instead // Include runtime and compile time libraries // [jc, 21-June]: handle TLDs as a special-case. if ( "tld".equals( artifact.getType() ) ) { FileUtils.copyFileToDirectory( artifact.getFile(), tldDirectory ); } // [jc, 21-June]: filter POMs out of the /lib copy process. else if ( "pom".equals( artifact.getType() ) ) { // don't mess with these...they'd only be here for inclusion of dependencies. } // [jc, 21-June]: I'm removing ( "jar".equals( artifact.getType() ) ) from consideration here // we'll handle anything that's NOT a POM or a TLD as a binary library to go in /lib else if ( !Artifact.SCOPE_TEST.equals( artifact.getScope() ) && !Artifact.SCOPE_PROVIDED.equals( artifact.getScope() ) ) { FileUtils.copyFileToDirectory( artifact.getFile(), libDirectory ); } } } | 47160 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47160/fd3e9fe9e29b5a6d361320f8a629a28803c4436b/WarMojo.java/clean/maven-plugins/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/WarMojo.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
6459,
3510,
4079,
2910,
12,
49,
7638,
4109,
4406,
13,
15069,
14106,
95,
588,
1343,
7675,
1376,
2932,
1463,
5747,
2456,
4875,
2910,
6,
15,
4406,
18,
588,
7581,
548,
1435,
9078,
267,
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,
1071,
6459,
3510,
4079,
2910,
12,
49,
7638,
4109,
4406,
13,
15069,
14106,
95,
588,
1343,
7675,
1376,
2932,
1463,
5747,
2456,
4875,
2910,
6,
15,
4406,
18,
588,
7581,
548,
1435,
9078,
267,
6,
... | ||
JFrame.setDefaultLookAndFeelDecorated(true); | public static void main(String[] args) { JFrame.setDefaultLookAndFeelDecorated(true); Toolbox toolbox = new Toolbox(); } | 3506 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3506/34643d610d34d949739e35a680eb8b5752a43585/Toolbox.java/buggy/itext/src/com/lowagie/tools/Toolbox.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
918,
2774,
12,
780,
8526,
833,
13,
288,
202,
202,
46,
3219,
18,
542,
1868,
9794,
1876,
2954,
292,
7859,
690,
12,
3767,
1769,
202,
202,
6364,
2147,
5226,
2147,
273,
394,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
918,
2774,
12,
780,
8526,
833,
13,
288,
202,
202,
46,
3219,
18,
542,
1868,
9794,
1876,
2954,
292,
7859,
690,
12,
3767,
1769,
202,
202,
6364,
2147,
5226,
2147,
273,
394,
... | |
return getIfInfo().getAliasDir(m_ifAliasComment); | return getIfInfo().getAliasDir(m_ifAlias, m_ifAliasComment); | String getAliasDir() { return getIfInfo().getAliasDir(m_ifAliasComment); } | 11849 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11849/43f33e8554adbe7d2143df50096daecfb7451542/AliasedResource.java/clean/opennms-services/src/main/java/org/opennms/netmgt/collectd/AliasedResource.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
514,
13131,
1621,
1435,
288,
3639,
327,
336,
2047,
966,
7675,
588,
2936,
1621,
12,
81,
67,
430,
2936,
16,
312,
67,
430,
2936,
4469,
1769,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
514,
13131,
1621,
1435,
288,
3639,
327,
336,
2047,
966,
7675,
588,
2936,
1621,
12,
81,
67,
430,
2936,
16,
312,
67,
430,
2936,
4469,
1769,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100... |
nodeEngine = new DefaultMutableTreeNode(sciEngineInfo.getIdEngine()); nodeEngine.add(new DefaultMutableTreeNode(sciEngineInfo.getSciEngineUrl())); | nodeEngine = new TreeEngineNode(sciEngineInfo.getIdEngine()); nodeEngine.add(new TreeEngineNode(sciEngineInfo.getSciEngineUrl())); | private void refreshTreeEngine(){ HashMap mapEngine = this.service.getMapEngine(); SciEngineInfo sciEngineInfo; DefaultMutableTreeNode nodeEngine; int i = 0; int count = this.rootEngine.getChildCount(); while(i<count){ nodeEngine = (DefaultMutableTreeNode) this.rootEngine.getChildAt(i); sciEngineInfo = (SciEngineInfo) mapEngine.remove(nodeEngine.toString()); if(sciEngineInfo == null){ nodeEngine.removeFromParent(); count--; }else{ nodeEngine.removeAllChildren(); nodeEngine.add(new DefaultMutableTreeNode(sciEngineInfo.getSciEngineUrl())); i++; } } TreeSet listSort = new TreeSet(mapEngine.keySet()); Iterator it = listSort.iterator(); while(it.hasNext()){ sciEngineInfo = (SciEngineInfo) mapEngine.get(it.next()); nodeEngine = new DefaultMutableTreeNode(sciEngineInfo.getIdEngine()); nodeEngine.add(new DefaultMutableTreeNode(sciEngineInfo.getSciEngineUrl())); this.rootEngine.add(nodeEngine); } treeNodesInserted(); } | 23362 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/23362/21261276b03c1a4e5e11ffe02bf227ac59b3e3d1/SciFrame.java/clean/src/org/objectweb/proactive/ext/scilab/gui/SciFrame.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
4460,
2471,
4410,
1435,
95,
202,
202,
8658,
852,
4410,
273,
333,
18,
3278,
18,
588,
863,
4410,
5621,
202,
202,
1541,
77,
4410,
966,
31363,
4410,
966,
31,
202,
202,
1868,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4460,
2471,
4410,
1435,
95,
202,
202,
8658,
852,
4410,
273,
333,
18,
3278,
18,
588,
863,
4410,
5621,
202,
202,
1541,
77,
4410,
966,
31363,
4410,
966,
31,
202,
202,
1868,... |
Iterator<VPartDependency> depIter = part.dependencyIterator(); while( depIter.hasNext() ) { VPartDependency dep = depIter.next(); String descr = "" + dep.GetLocation().toString().charAt(0); if( dep.GetCondition() == VPartDependency.Condition.Optional ) descr += "? "; else descr += " "; descr += dep.GetTypeInfo().GetName(); if( dep.GetId().length() > 0 ) descr += "(id:" + dep.GetId() + ")"; childs.add(descr); } | addPartChilds(childs, part); } else if( parent instanceof TagListNode ) { TagListNode tagNode = (TagListNode)parent; | public Object[] getChildren(Object parent) { LinkedList<Object> childs = new LinkedList<Object>(); if( parent instanceof Entity ) { Entity entity = (Entity)parent; // add entity parts Iterator<Part> partIter = entity.PartIterator(); while( partIter.hasNext() ) { childs.add(partIter.next()); } } // if the object is a part, add it's settings and values else if( parent instanceof Part ) { Part part = (Part)parent; Iterator<VPartDependency> depIter = part.dependencyIterator(); while( depIter.hasNext() ) { VPartDependency dep = depIter.next(); String descr = "" + dep.GetLocation().toString().charAt(0); if( dep.GetCondition() == VPartDependency.Condition.Optional ) descr += "? "; else descr += " "; descr += dep.GetTypeInfo().GetName(); if( dep.GetId().length() > 0 ) descr += "(id:" + dep.GetId() + ")"; childs.add(descr); } // add all settings Iterator<Setting> settingIter = part.settingsIterator(); while( settingIter.hasNext() ) { childs.add(settingIter.next()); } } return childs.toArray(); } | 3290 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3290/b2cac279c077e229049f17623665e83449e50ba8/SceneView.java/clean/velox/Editor/EclipsePlugin/src/de/velox/editor/views/SceneView.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
1033,
8526,
10268,
12,
921,
982,
13,
288,
1082,
202,
13174,
682,
32,
921,
34,
21619,
273,
394,
10688,
32,
921,
34,
5621,
1082,
202,
430,
12,
982,
1276,
3887,
262,
288,
9506,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
482,
1033,
8526,
10268,
12,
921,
982,
13,
288,
1082,
202,
13174,
682,
32,
921,
34,
21619,
273,
394,
10688,
32,
921,
34,
5621,
1082,
202,
430,
12,
982,
1276,
3887,
262,
288,
9506,
... |
ReferenceType parameterizedType = | ReferenceType parameterizedType = | private final ResolvedType resolveToReferenceType(UnresolvedType ty) { if (ty.isParameterizedType()) { // ======= parameterized types ================ ReferenceType genericType = (ReferenceType)resolveGenericTypeFor(ty,false); currentlyResolvingBaseType = genericType; ReferenceType parameterizedType = TypeFactory.createParameterizedType(genericType, ty.typeParameters, this); currentlyResolvingBaseType = null; return parameterizedType; } else if (ty.isGenericType()) { // ======= generic types ====================== ReferenceType genericType = (ReferenceType)resolveGenericTypeFor(ty,false); return genericType; } else if (ty.isGenericWildcard()) { // ======= generic wildcard types ============= return resolveGenericWildcardFor(ty); } else { // ======= simple and raw types =============== String erasedSignature = ty.getErasureSignature(); ReferenceType simpleOrRawType = new ReferenceType(erasedSignature, this); if (ty.needsModifiableDelegate()) simpleOrRawType.setNeedsModifiableDelegate(true); ReferenceTypeDelegate delegate = resolveDelegate(simpleOrRawType); // 117854// if (delegate == null) return ResolvedType.MISSING; if (delegate == null) return new MissingResolvedTypeWithKnownSignature(ty.getSignature(),erasedSignature,this);//ResolvedType.MISSING; if (delegate.isGeneric() && behaveInJava5Way) { // ======== raw type =========== simpleOrRawType.typeKind = TypeKind.RAW; ReferenceType genericType = makeGenericTypeFrom(delegate,simpleOrRawType); // name = ReferenceType.fromTypeX(UnresolvedType.forRawTypeNames(ty.getName()),this); simpleOrRawType.setDelegate(delegate); genericType.setDelegate(delegate); simpleOrRawType.setGenericType(genericType); return simpleOrRawType; } else { // ======== simple type ========= simpleOrRawType.setDelegate(delegate); return simpleOrRawType; } } } | 53148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/53148/2883a55829716132efcf288acec08bf3ab6826a7/World.java/clean/weaver/src/org/aspectj/weaver/World.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
727,
22776,
559,
2245,
774,
2404,
559,
12,
984,
11792,
559,
13806,
13,
288,
202,
202,
430,
261,
4098,
18,
291,
1662,
13091,
10756,
288,
1082,
202,
759,
422,
894,
33,
17629,
1953,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
727,
22776,
559,
2245,
774,
2404,
559,
12,
984,
11792,
559,
13806,
13,
288,
202,
202,
430,
261,
4098,
18,
291,
1662,
13091,
10756,
288,
1082,
202,
759,
422,
894,
33,
17629,
1953,
... |
if (stepWizard.canFinishOnReviewPage()) instructionLabel.setText(IDEWorkbenchMessages.MultiStepReviewWizardPage_instructionFinishLabel); else instructionLabel.setText(IDEWorkbenchMessages.MultiStepReviewWizardPage_instructionNextLabel); | if (stepWizard.canFinishOnReviewPage()) { instructionLabel.setText(IDEWorkbenchMessages.MultiStepReviewWizardPage_instructionFinishLabel); } else { instructionLabel.setText(IDEWorkbenchMessages.MultiStepReviewWizardPage_instructionNextLabel); } | public void setVisible(boolean visible) { super.setVisible(visible); if (visible) { if (stepWizard.canFinishOnReviewPage()) instructionLabel.setText(IDEWorkbenchMessages.MultiStepReviewWizardPage_instructionFinishLabel); else instructionLabel.setText(IDEWorkbenchMessages.MultiStepReviewWizardPage_instructionNextLabel); ((Composite) getControl()).layout(true); } } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/e38d295ea613cf9f08aadb93a84a33d2e91abc5f/MultiStepReviewWizardPage.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/MultiStepReviewWizardPage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
16697,
12,
6494,
6021,
13,
288,
3639,
2240,
18,
542,
6207,
12,
8613,
1769,
3639,
309,
261,
8613,
13,
288,
5411,
309,
261,
4119,
27130,
18,
4169,
11641,
1398,
9159,
1964,
10756,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
16697,
12,
6494,
6021,
13,
288,
3639,
2240,
18,
542,
6207,
12,
8613,
1769,
3639,
309,
261,
8613,
13,
288,
5411,
309,
261,
4119,
27130,
18,
4169,
11641,
1398,
9159,
1964,
10756,... |
UMOEvent event = new MuleEvent(new MuleMessage("hello", null), ep, new MuleSession(), false); | UMOEvent event = new MuleEvent(new MuleMessage("hello", null), ep, MuleTestUtils.getTestSession(), false); | public void testEndpointFromURI() throws Exception { MuleEndpoint ep = new MuleEndpoint("test://hello?remoteSync=true&remoteSyncTimeout=2002", true); ep.initialise(); assertTrue(ep.isRemoteSync()); assertEquals(2002, ep.getRemoteSyncTimeout()); assertEquals(UMOEndpoint.ENDPOINT_TYPE_RECEIVER, ep.getType()); //Test Event timeout proporgation UMOEvent event = new MuleEvent(new MuleMessage("hello", null), ep, new MuleSession(), false); assertEquals(2002, event.getTimeout()); event = new MuleEvent(new MuleMessage("hello", null), new MuleEndpoint("test://hello", true), new MuleSession(), true); //default event timeout set in the test config file assertEquals(1001, event.getTimeout()); } | 2370 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2370/c6f6cd58073cb481556e83916c280bc896e75771/MuleEndpointConfigurationTestCase.java/clean/tests/integration/src/test/java/org/mule/test/integration/MuleEndpointConfigurationTestCase.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
3293,
1265,
3098,
1435,
1216,
1185,
565,
288,
3639,
490,
725,
3293,
5529,
273,
394,
490,
725,
3293,
2932,
3813,
2207,
23711,
35,
7222,
4047,
33,
3767,
10,
7222,
4047,
269... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3293,
1265,
3098,
1435,
1216,
1185,
565,
288,
3639,
490,
725,
3293,
5529,
273,
394,
490,
725,
3293,
2932,
3813,
2207,
23711,
35,
7222,
4047,
33,
3767,
10,
7222,
4047,
269... |
sb.append("Interaction request for the accept / reject interaction pattern."); | log.debug("Base URL is "+baseURL); | public String getMessageBody(URL baseURL, String id) { StringBuffer sb = new StringBuffer(); sb.append("Interaction request for the accept / reject interaction pattern."); try { URL targetURL = new URL(baseURL,"interactionApplet?id="+id); sb.append("\n\n"+targetURL.toString()+"\n"); } catch (MalformedURLException mue) { // } return sb.toString(); } | 7616 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7616/c7d8146b4b6a1d5df8de2eb977e9cc5aeecfaaeb/AcceptReject.java/clean/trunk/interaction/src/net/sf/taverna/interaction/server/patterns/AcceptReject.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
2381,
2250,
12,
1785,
17480,
16,
514,
612,
13,
288,
202,
780,
1892,
2393,
273,
394,
6674,
5621,
202,
18366,
18,
6923,
2932,
17419,
590,
364,
326,
2791,
342,
4925,
13581,
1936,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2381,
2250,
12,
1785,
17480,
16,
514,
612,
13,
288,
202,
780,
1892,
2393,
273,
394,
6674,
5621,
202,
18366,
18,
6923,
2932,
17419,
590,
364,
326,
2791,
342,
4925,
13581,
1936,
... |
public boolean collect(IWContext iwc) { if (iwc != null) { String homePhone = iwc.getParameter(homePhoneFieldName); String workPhone = iwc.getParameter(workPhoneFieldName); String mobilePhone = iwc.getParameter(mobilePhoneFieldName); String faxPhone = iwc.getParameter(faxPhoneFieldName); String homePhoneType = iwc.getParameter(homePhoneMenuName); String workPhoneType = iwc.getParameter(workPhoneMenuName); String mobilePhoneType = iwc.getParameter(mobilePhoneMenuName); String faxPhoneType = iwc.getParameter(faxPhoneMenuName); String email = iwc.getParameter(emailFieldName); String homepage = iwc.getParameter(homepageFieldName); if (homePhone != null) { fieldValues.put(homePhoneFieldName, homePhone); } if (workPhone != null) { fieldValues.put(workPhoneFieldName, workPhone); } if (mobilePhone != null) { fieldValues.put(mobilePhoneFieldName, mobilePhone); } if (faxPhone != null) { fieldValues.put(faxPhoneFieldName, faxPhone); } if (homePhoneType != null) { fieldValues.put(homePhoneMenuName, homePhoneType); } if (workPhoneType != null) { fieldValues.put(workPhoneMenuName, workPhoneType); } if (mobilePhoneType != null) { fieldValues.put(mobilePhoneMenuName, mobilePhoneType); } if (faxPhoneType != null) { fieldValues.put(faxPhoneMenuName, faxPhoneType); } if (email != null) { fieldValues.put(emailFieldName, email); } if (homepage != null) fieldValues.put(homepageFieldName, homepage); updateFieldsDisplayStatus(); return true; } return false; } | 57353 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57353/3d3a9f8444e1b2e2c1c4c7d5e71a685e7f0aa419/GroupOfficeContactTab.java/buggy/src/java/is/idega/idegaweb/member/presentation/GroupOfficeContactTab.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
6494,
14676,
12,
45,
59,
1042,
22315,
71,
15329,
202,
202,
430,
12,
22315,
71,
5,
33,
2011,
15329,
1082,
202,
780,
8712,
9451,
33,
22315,
71,
18,
588,
1662,
12,
8712,
9451,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6494,
14676,
12,
45,
59,
1042,
22315,
71,
15329,
202,
202,
430,
12,
22315,
71,
5,
33,
2011,
15329,
1082,
202,
780,
8712,
9451,
33,
22315,
71,
18,
588,
1662,
12,
8712,
9451,
... | ||
"Total", new Integer(0), new Integer(0) | "Total", new Integer(0), new Integer(0) | private void addInformationPanel() { // Create UI elements for connection information. JPanel informationPanel = new JPanel(); informationPanel.setLayout(new BorderLayout()); // Add the Host information JPanel connPanel = new JPanel(); connPanel.setLayout(new GridBagLayout()); connPanel.setBorder(BorderFactory.createTitledBorder("Connection information")); JLabel label = new JLabel("Host: "); label.setMinimumSize(new java.awt.Dimension(150, 14)); label.setMaximumSize(new java.awt.Dimension(150, 14)); connPanel.add( label, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, 21, 0, new Insets(0, 0, 0, 0), 0, 0)); JFormattedTextField field = new JFormattedTextField(connection.getServiceName()); field.setMinimumSize(new java.awt.Dimension(150, 20)); field.setMaximumSize(new java.awt.Dimension(150, 20)); field.setEditable(false); field.setBorder(null); connPanel.add( field, new GridBagConstraints(1, 0, 1, 1, 1.0, 0.0, 10, 2, new Insets(0, 0, 0, 0), 0, 0)); // Add the Port information label = new JLabel("Port: "); label.setMinimumSize(new java.awt.Dimension(150, 14)); label.setMaximumSize(new java.awt.Dimension(150, 14)); connPanel.add( label, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, 21, 0, new Insets(0, 0, 0, 0), 0, 0)); field = new JFormattedTextField(new Integer(connection.getPort())); field.setMinimumSize(new java.awt.Dimension(150, 20)); field.setMaximumSize(new java.awt.Dimension(150, 20)); field.setEditable(false); field.setBorder(null); connPanel.add( field, new GridBagConstraints(1, 1, 1, 1, 0.0, 0.0, 10, 2, new Insets(0, 0, 0, 0), 0, 0)); // Add the connection's User information label = new JLabel("User: "); label.setMinimumSize(new java.awt.Dimension(150, 14)); label.setMaximumSize(new java.awt.Dimension(150, 14)); connPanel.add( label, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0, 21, 0, new Insets(0, 0, 0, 0), 0, 0)); userField = new JFormattedTextField(); userField.setMinimumSize(new java.awt.Dimension(150, 20)); userField.setMaximumSize(new java.awt.Dimension(150, 20)); userField.setEditable(false); userField.setBorder(null); connPanel.add( userField, new GridBagConstraints(1, 2, 1, 1, 0.0, 0.0, 10, 2, new Insets(0, 0, 0, 0), 0, 0)); // Add the connection's creationTime information label = new JLabel("Creation time: "); label.setMinimumSize(new java.awt.Dimension(150, 14)); label.setMaximumSize(new java.awt.Dimension(150, 14)); connPanel.add( label, new GridBagConstraints(0, 3, 1, 1, 0.0, 0.0, 21, 0, new Insets(0, 0, 0, 0), 0, 0)); field = new JFormattedTextField(new SimpleDateFormat("yyyy.MM.dd hh:mm:ss aaa")); field.setMinimumSize(new java.awt.Dimension(150, 20)); field.setMaximumSize(new java.awt.Dimension(150, 20)); field.setValue(creationTime); field.setEditable(false); field.setBorder(null); connPanel.add( field, new GridBagConstraints(1, 3, 1, 1, 0.0, 0.0, 10, 2, new Insets(0, 0, 0, 0), 0, 0)); // Add the connection's creationTime information label = new JLabel("Status: "); label.setMinimumSize(new java.awt.Dimension(150, 14)); label.setMaximumSize(new java.awt.Dimension(150, 14)); connPanel.add( label, new GridBagConstraints(0, 4, 1, 1, 0.0, 0.0, 21, 0, new Insets(0, 0, 0, 0), 0, 0)); statusField = new JFormattedTextField(); statusField.setMinimumSize(new java.awt.Dimension(150, 20)); statusField.setMaximumSize(new java.awt.Dimension(150, 20)); statusField.setValue("Active"); statusField.setEditable(false); statusField.setBorder(null); connPanel.add( statusField, new GridBagConstraints(1, 4, 1, 1, 0.0, 0.0, 10, 2, new Insets(0, 0, 0, 0), 0, 0)); // Add the connection panel to the information panel informationPanel.add(connPanel, BorderLayout.NORTH); // Add the Number of sent packets information JPanel packetsPanel = new JPanel(); packetsPanel.setLayout(new GridLayout(1, 1)); packetsPanel.setBorder(BorderFactory.createTitledBorder("Transmitted Packets")); statisticsTable = new DefaultTableModel(new Object[][] { { "IQ", new Integer(0), new Integer(0)}, { "Message", new Integer(0), new Integer(0) }, { "Presence", new Integer(0), new Integer(0) }, { "Other", new Integer(0), new Integer(0) }, { "Total", new Integer(0), new Integer(0) } }, new Object[] { "Type", "Received", "Sent" }) { public boolean isCellEditable(int rowIndex, int mColIndex) { return false; } }; JTable table = new JTable(statisticsTable); // Allow only single a selection table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); packetsPanel.add(new JScrollPane(table)); // Add the packets panel to the information panel informationPanel.add(packetsPanel, BorderLayout.CENTER); tabbedPane.add("Information", new JScrollPane(informationPanel)); tabbedPane.setToolTipTextAt(4, "Information and statistics about the debugged connection"); } | 52005 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52005/a43b8a1cdb5f3b07a0a1df0570681125d1cc1725/EnhancedDebugger.java/clean/source/org/jivesoftware/smackx/debugger/EnhancedDebugger.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
527,
5369,
5537,
1435,
288,
3639,
368,
1788,
6484,
2186,
364,
1459,
1779,
18,
3639,
24048,
1779,
5537,
273,
394,
24048,
5621,
3639,
1779,
5537,
18,
542,
3744,
12,
2704,
30814,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
527,
5369,
5537,
1435,
288,
3639,
368,
1788,
6484,
2186,
364,
1459,
1779,
18,
3639,
24048,
1779,
5537,
273,
394,
24048,
5621,
3639,
1779,
5537,
18,
542,
3744,
12,
2704,
30814,
... |
URLEndIndex = line.indexOf(" ", URLStartIndex); String srcValue = line.substring(URLStartIndex,URLEndIndex); return srcValue; | URLEndIndex = line.indexOf(" ", URLStartIndex); String srcValue = line.substring(URLStartIndex, URLEndIndex); return srcValue; | private static String extractURL(String line) { int URLStartIndex = 0; int URLEndIndex = 0; //need this to make sure only image paths are pointed to and not href. int srcIndex = line.indexOf(" src"); if(line.indexOf("https://",srcIndex)!= -1) return ""; if(line.indexOf("http://",srcIndex)!= -1) URLStartIndex = line.indexOf("http",srcIndex); else return ""; URLEndIndex = line.indexOf(" ", URLStartIndex); String srcValue = line.substring(URLStartIndex,URLEndIndex); return srcValue; } | 24959 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/24959/1d1cfc11313b342904e169e103c62f47ba0aa767/ProxyWriter.java/buggy/source/org/jasig/portal/serialize/ProxyWriter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
514,
2608,
1785,
12,
780,
980,
13,
565,
288,
5411,
509,
1976,
16792,
273,
374,
31,
5411,
509,
1976,
24152,
273,
374,
31,
5411,
368,
14891,
333,
358,
1221,
3071,
1338,
1316,
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,
3238,
760,
514,
2608,
1785,
12,
780,
980,
13,
565,
288,
5411,
509,
1976,
16792,
273,
374,
31,
5411,
509,
1976,
24152,
273,
374,
31,
5411,
368,
14891,
333,
358,
1221,
3071,
1338,
1316,
2... |
returnAST = quantifiedInVarBinding_AST; } finally { traceOut("quantifiedInVarBinding"); | quantifiedInVarBinding_AST = (org.exist.xquery.parser.XQueryAST)astFactory.make( (new ASTArray(2)).add((org.exist.xquery.parser.XQueryAST)astFactory.create(VARIABLE_BINDING,varName)).add(quantifiedInVarBinding_AST)); currentAST.root = quantifiedInVarBinding_AST; currentAST.child = quantifiedInVarBinding_AST!=null &&quantifiedInVarBinding_AST.getFirstChild()!=null ? quantifiedInVarBinding_AST.getFirstChild() : quantifiedInVarBinding_AST; currentAST.advanceChildToEnd(); | public final void quantifiedInVarBinding() throws RecognitionException, TokenStreamException { traceIn("quantifiedInVarBinding"); try { // debugging returnAST = null; ASTPair currentAST = new ASTPair(); org.exist.xquery.parser.XQueryAST quantifiedInVarBinding_AST = null; String varName; match(DOLLAR); varName=qName(); { switch ( LA(1)) { case LITERAL_as: { typeDeclaration(); astFactory.addASTChild(currentAST, returnAST); break; } case LITERAL_in: { break; } default: { throw new NoViableAltException(LT(1), getFilename()); } } } match(LITERAL_in); exprSingle(); astFactory.addASTChild(currentAST, returnAST); if ( inputState.guessing==0 ) { quantifiedInVarBinding_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; quantifiedInVarBinding_AST = (org.exist.xquery.parser.XQueryAST)astFactory.make( (new ASTArray(2)).add((org.exist.xquery.parser.XQueryAST)astFactory.create(VARIABLE_BINDING,varName)).add(quantifiedInVarBinding_AST)); currentAST.root = quantifiedInVarBinding_AST; currentAST.child = quantifiedInVarBinding_AST!=null &&quantifiedInVarBinding_AST.getFirstChild()!=null ? quantifiedInVarBinding_AST.getFirstChild() : quantifiedInVarBinding_AST; currentAST.advanceChildToEnd(); } quantifiedInVarBinding_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; returnAST = quantifiedInVarBinding_AST; } finally { // debugging traceOut("quantifiedInVarBinding"); } } | 2909 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2909/848376fedfdb64086be7a20004c255cefe7b1015/XQueryParser.java/buggy/src/org/exist/xquery/parser/XQueryParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
10251,
939,
382,
1537,
5250,
1435,
1216,
9539,
16,
3155,
1228,
503,
288,
9506,
202,
5129,
382,
2932,
17753,
939,
382,
1537,
5250,
8863,
202,
202,
698,
288,
368,
10450,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
10251,
939,
382,
1537,
5250,
1435,
1216,
9539,
16,
3155,
1228,
503,
288,
9506,
202,
5129,
382,
2932,
17753,
939,
382,
1537,
5250,
8863,
202,
202,
698,
288,
368,
10450,... |
public void updateContext(Reader reader, String filename, int type, IASTInclusion inclusion, ISourceElementRequestor requestor, int macroOffset, int macroLength) throws ContextException { int startLine = 1; if (type == IScannerContext.ContextKind.MACROEXPANSION) { if (getCurrentContext().getKind() == IScannerContext.ContextKind.MACROEXPANSION) { macroOffset = getCurrentContext().getMacroOffset(); macroLength = getCurrentContext().getMacroLength(); } startLine = getCurrentContext().getLine(); } IScannerContext context = new ScannerContext( reader, filename, type, null, macroOffset, macroLength, startLine ); context.setExtension(inclusion); push( context, requestor ); } | public void updateContext(Reader reader, String filename, int type, IASTInclusion inclusion, ISourceElementRequestor requestor) throws ContextException { updateContext(reader, filename, type, inclusion, requestor, -1, -1); } | public void updateContext(Reader reader, String filename, int type, IASTInclusion inclusion, ISourceElementRequestor requestor, int macroOffset, int macroLength) throws ContextException { int startLine = 1; // If we expand a macro within a macro, then keep offsets of the top-level one, // as only the top level macro identifier is properly positioned if (type == IScannerContext.ContextKind.MACROEXPANSION) { if (getCurrentContext().getKind() == IScannerContext.ContextKind.MACROEXPANSION) { macroOffset = getCurrentContext().getMacroOffset(); macroLength = getCurrentContext().getMacroLength(); } startLine = getCurrentContext().getLine(); } IScannerContext context = new ScannerContext( reader, filename, type, null, macroOffset, macroLength, startLine ); context.setExtension(inclusion); push( context, requestor ); } | 54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/7a2c6de5fb3f720d4ccf6d80c100a157056f2b77/ContextStack.java/buggy/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/ContextStack.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1089,
1042,
12,
2514,
2949,
16,
514,
1544,
16,
509,
618,
16,
467,
9053,
382,
15335,
26485,
16,
467,
1830,
1046,
691,
280,
590,
280,
16,
509,
11522,
2335,
16,
509,
11522,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1089,
1042,
12,
2514,
2949,
16,
514,
1544,
16,
509,
618,
16,
467,
9053,
382,
15335,
26485,
16,
467,
1830,
1046,
691,
280,
590,
280,
16,
509,
11522,
2335,
16,
509,
11522,
... |
mod.type = "checkin"; | String fileName = substringFromLastSlash(folderLine); String folderName = substringToLastSlash(folderLine); Modification.ModifiedFile modfile = mod.createModifiedFile(fileName, folderName); modfile.action = "checkin"; | protected Modification handleEntry(List historyEntry) { Modification mod = new Modification(); String nameAndDateLine = (String) historyEntry.get(2); mod.userName = parseUser(nameAndDateLine); mod.modifiedTime = parseDate(nameAndDateLine); String folderLine = (String) historyEntry.get(0); String fileLine = (String) historyEntry.get(3); if (!isInSsDir(folderLine)) { // We are only interested in modifications to files in the specified ssdir return null; } else if (isBeforeLastBuild(mod.modifiedTime)) { // We are only interested in modifications since the last build return null; } else if (fileLine.startsWith("Labeled")) { // We don't add labels. return null; } else if (fileLine.startsWith("Checked in")) { mod.type = "checkin"; mod.comment = parseComment(historyEntry); mod.fileName = substringFromLastSlash(folderLine); mod.folderName = substringToLastSlash(folderLine); } else if (fileLine.indexOf(" renamed to ") > -1) { // TODO: This is a special case that is really two modifications: deleted and recovered. // For now I'll consider it a deleted to force a clean build. // I should really make this two modifications. mod.type = "delete"; mod.comment = parseComment(historyEntry); mod.fileName = fileLine.substring(0, fileLine.indexOf(" ")); mod.folderName = folderLine; } else if (fileLine.indexOf(" moved to ") > -1) { // TODO: This is a special case that is really two modifications: deleted and recovered. // For now I'll consider it a deleted to force a clean build. // I should really make this two modifications. mod.type = "delete"; mod.comment = parseComment(historyEntry); mod.fileName = fileLine.substring(0, fileLine.indexOf(" ")); mod.folderName = folderLine; } else { mod.folderName = folderLine; mod.fileName = fileLine.substring(0, fileLine.lastIndexOf(" ")); mod.comment = parseComment(historyEntry); if (fileLine.endsWith("added")) { mod.type = "add"; } else if (fileLine.endsWith("deleted")) { mod.type = "delete"; } else if (fileLine.endsWith("recovered")) { mod.type = "recover"; } else if (fileLine.endsWith("shared")) { mod.type = "branch"; } } if (propertyOnDelete != null && "delete".equals(mod.type)) { properties.put(propertyOnDelete, "true"); } if (property != null) { properties.put(property, "true"); } return mod; } | 55334 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55334/6c388b514a0547682989734ceba9679338747a3a/VssJournal.java/clean/main/src/net/sourceforge/cruisecontrol/sourcecontrols/VssJournal.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
3431,
1480,
1640,
1622,
12,
682,
4927,
1622,
13,
288,
3639,
3431,
1480,
681,
273,
394,
3431,
1480,
5621,
3639,
514,
508,
1876,
1626,
1670,
273,
261,
780,
13,
4927,
1622,
18,
588,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
3431,
1480,
1640,
1622,
12,
682,
4927,
1622,
13,
288,
3639,
3431,
1480,
681,
273,
394,
3431,
1480,
5621,
3639,
514,
508,
1876,
1626,
1670,
273,
261,
780,
13,
4927,
1622,
18,
588,
... |
if (generatorPass == HEADER_PASS) { | if (generatorPass != SOURCE_PASS) { | private String generateOperationPrefix(Object op) { StringBuffer sb = new StringBuffer(80); sb.append(generateConcurrency(op)); if (generatorPass == HEADER_PASS) { // make all operations to virtual - as long as they are not "leaf" Object scope = Model.getFacade().getOwnerScope(op); // generate a function as virtual, if it can be overriden // or override another function AND if this function is // not marked as static, which disallows "virtual" // alternatively every abstract function is defined as // virtual if ((!Model.getFacade().isLeaf(op) && !Model.getFacade().isRoot(op) && (!(Model.getScopeKind().getClassifier().equals(scope)))) || (Model.getFacade().isAbstract(op))) { sb.append("virtual "); } sb.append(generateOwnerScope(op)); } return sb.toString(); } | 7166 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7166/1d3b53fab6b14f5a8286bfe6338d2740ffe3724e/GeneratorCpp.java/clean/modules/cpp/src/org/argouml/language/cpp/generator/GeneratorCpp.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
514,
2103,
2988,
2244,
12,
921,
1061,
13,
288,
3639,
6674,
2393,
273,
394,
6674,
12,
3672,
1769,
3639,
2393,
18,
6923,
12,
7163,
18273,
12,
556,
10019,
3639,
309,
261,
8812,
6433,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
514,
2103,
2988,
2244,
12,
921,
1061,
13,
288,
3639,
6674,
2393,
273,
394,
6674,
12,
3672,
1769,
3639,
2393,
18,
6923,
12,
7163,
18273,
12,
556,
10019,
3639,
309,
261,
8812,
6433,
... |
return ch; | int c = read (); if (c >= 0) unread(); return c; | public int peek () throws java.io.IOException { int oldLineStartPos = lineStartPos; int ch = read (); if (ch >= 0) { pos--; lineStartPos = oldLineStartPos; } return ch; } | 36870 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/36870/b771dc468e99200d66f25e9e1505c760debb93cf/LineBufferedReader.java/clean/kawa/lang/LineBufferedReader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
509,
8032,
1832,
4202,
1216,
2252,
18,
1594,
18,
14106,
225,
288,
565,
509,
1592,
1670,
1685,
1616,
273,
29208,
1616,
31,
565,
509,
462,
273,
855,
261,
1769,
565,
309,
261,
343,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8032,
1832,
4202,
1216,
2252,
18,
1594,
18,
14106,
225,
288,
565,
509,
1592,
1670,
1685,
1616,
273,
29208,
1616,
31,
565,
509,
462,
273,
855,
261,
1769,
565,
309,
261,
343,
1... |
n.getChildAt(i).accept(this); | n.getChildAt(i).accept(tcv); | public void genericFun(/*@ non_null @*/ String s, TFunction n){ out.appendI("("+ s+" "); int i =0; for(; i < n.sons.size(); i++) { n.getChildAt(i).accept(this); if(i != n.sons.size() - 1) out.appendN(" "); } out.appendN(")"); if((n.getChildAt(--i)) instanceof TName || (n.getChildAt(--i)) instanceof TLiteral) out.reduceIwNl(); else out.reduceI(); } | 46634 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46634/ae436ffae1eab5a91900bfb4851300054c4cb26e/ABasicCoqVisitor.java/buggy/src/escjava/trunk/ESCTools/Escjava/java/escjava/vcGeneration/coq/visitor/ABasicCoqVisitor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
5210,
22783,
12,
20308,
36,
1661,
67,
2011,
632,
5549,
514,
272,
16,
399,
2083,
290,
15329,
377,
202,
659,
18,
6923,
45,
2932,
2932,
15,
272,
9078,
315,
1769,
377,
202,
474,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5210,
22783,
12,
20308,
36,
1661,
67,
2011,
632,
5549,
514,
272,
16,
399,
2083,
290,
15329,
377,
202,
659,
18,
6923,
45,
2932,
2932,
15,
272,
9078,
315,
1769,
377,
202,
474,
... |
support.getExternalBrowser().openURL(url); } catch (PartInitException e1) { MessageDialog.openError(null, "Link error", "Could not open browser"); } catch (MalformedURLException e) { MessageDialog.openError(null, "Link error", "Hyperlink address is malformed"); } } | support.getExternalBrowser().openURL(url); } catch (PartInitException e1) { MessageDialog.openError(null, "Link error", "Could not open browser"); } catch (MalformedURLException e) { MessageDialog.openError(null, "Link error", "Hyperlink address is malformed"); } } | public void linkActivated(HyperlinkEvent event) { try { // Perhaps should use TaskListUiUtil.openUrl instead? URL url = new URL((String)event.getHref()); IWorkbenchBrowserSupport support = PlatformUI.getWorkbench().getBrowserSupport(); support.getExternalBrowser().openURL(url); } catch (PartInitException e1) { MessageDialog.openError(null, "Link error", "Could not open browser"); } catch (MalformedURLException e) { MessageDialog.openError(null, "Link error", "Hyperlink address is malformed"); } } | 51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/dbc174ae73ca89a83ba02de2ee39dee30bf1b142/AbstractBugEditor.java/buggy/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/AbstractBugEditor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4405,
225,
1071,
918,
1692,
28724,
12,
15996,
1232,
1133,
871,
13,
288,
25083,
225,
775,
288,
6862,
1082,
225,
368,
5722,
19312,
1410,
999,
3837,
682,
13943,
1304,
18,
3190,
1489,
3560,
35,
25... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4405,
225,
1071,
918,
1692,
28724,
12,
15996,
1232,
1133,
871,
13,
288,
25083,
225,
775,
288,
6862,
1082,
225,
368,
5722,
19312,
1410,
999,
3837,
682,
13943,
1304,
18,
3190,
1489,
3560,
35,
25... |
s.setAttribute("reset-stored-state", ss); | s.setAttribute("direct-stored-state", ss); | private void setStoredState(StoredState ss) { Session s = SessionManager.getCurrentSession(); if (s.getAttribute("direct-stored-state") == null || ss == null) { s.setAttribute("reset-stored-state", ss); } } | 51479 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51479/2abbb1f70ab973935c0a01152597573b3e4e31dd/SkinnableCharonPortal.java/buggy/portal-impl/impl/src/java/org/sakaiproject/portal/charon/SkinnableCharonPortal.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
444,
18005,
1119,
12,
18005,
1119,
5202,
13,
202,
95,
202,
202,
2157,
272,
273,
3877,
1318,
18,
588,
3935,
2157,
5621,
202,
202,
430,
261,
87,
18,
588,
1499,
2932,
7205,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
444,
18005,
1119,
12,
18005,
1119,
5202,
13,
202,
95,
202,
202,
2157,
272,
273,
3877,
1318,
18,
588,
3935,
2157,
5621,
202,
202,
430,
261,
87,
18,
588,
1499,
2932,
7205,... |
SchemaGrammar grammar = fGrammarBucket.getGrammar(typeName.uri); if (grammar != null) type = grammar.getGlobalTypeDecl(typeName.localpart); | if (typeName.uri == URI_SCHEMAFORSCHEMA) { type = SchemaGrammar.SG_SchemaNS.getGlobalTypeDecl(typeName.localpart); } if (type == null) { SchemaGrammar grammar = fGrammarBucket.getGrammar(typeName.uri); if (grammar != null) type = grammar.getGlobalTypeDecl(typeName.localpart); } | void getAndCheckXsiType(QName element, String xsiType) { // This method also deals with clause 1.2.1.2 of the constraint // Validation Rule: Schema-Validity Assessment (Element) // Element Locally Valid (Element) // 4 If there is an attribute information item among the element information item's [attributes] whose [namespace name] is identical to http://www.w3.org/2001/XMLSchema-instance and whose [local name] is type, then all of the following must be true: // 4.1 The normalized value of that attribute information item must be valid with respect to the built-in QName simple type, as defined by String Valid (3.14.4); QName typeName = null; try { typeName = (QName)fQNameDV.validate(xsiType, fValidationState, null); } catch (InvalidDatatypeValueException e) { reportSchemaError("cvc-elt.4.1", new Object[]{element.rawname, URI_XSI+","+XSI_TYPE, xsiType}); return; } // 4.2 The local name and namespace name (as defined in QName Interpretation (3.15.3)), of the actual value of that attribute information item must resolve to a type definition, as defined in QName resolution (Instance) (3.15.4) XSTypeDecl type = null; SchemaGrammar grammar = fGrammarBucket.getGrammar(typeName.uri); if (grammar != null) type = grammar.getGlobalTypeDecl(typeName.localpart); if (type == null) { reportSchemaError("cvc-elt.4.2", new Object[]{element.rawname, xsiType}); return; } // if there is no current type, set this one as current. // and we don't need to do extra checking if (fCurrentType != null) { // 4.3 The local type definition must be validly derived from the {type definition} given the union of the {disallowed substitutions} and the {type definition}'s {prohibited substitutions}, as defined in Type Derivation OK (Complex) (3.4.6) (if it is a complex type definition), or given {disallowed substitutions} as defined in Type Derivation OK (Simple) (3.14.6) (if it is a simple type definition). short block = fCurrentElemDecl.fBlock; if (fCurrentType.getXSType() == XSTypeDecl.COMPLEX_TYPE) block |= ((XSComplexTypeDecl)fCurrentType).fBlock; if (!XSConstraints.checkTypeDerivationOk(type, fCurrentType, block)) reportSchemaError("cvc-elt.4.3", new Object[]{element.rawname, xsiType}); } fCurrentType = type; } | 1831 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1831/970ce40ae1182183dee7e0be723e7037875919c2/XMLSchemaValidator.java/buggy/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
22909,
1564,
60,
7722,
559,
12,
13688,
930,
16,
514,
619,
7722,
559,
13,
288,
3639,
368,
1220,
707,
2546,
443,
1031,
598,
6591,
404,
18,
22,
18,
21,
18,
22,
434,
326,
4954,
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,
918,
22909,
1564,
60,
7722,
559,
12,
13688,
930,
16,
514,
619,
7722,
559,
13,
288,
3639,
368,
1220,
707,
2546,
443,
1031,
598,
6591,
404,
18,
22,
18,
21,
18,
22,
434,
326,
4954,
3639,... |
Paint fillPaint = (Paint)aci.getAttribute(TextAttribute.FOREGROUND); Stroke stroke = (Stroke) aci.getAttribute (GVTAttributedCharacterIterator.TextAttribute.STROKE); Paint strokePaint = (Paint) aci.getAttribute (GVTAttributedCharacterIterator.TextAttribute.STROKE_PAINT); | TextPaintInfo tpi = (TextPaintInfo)aci.getAttribute (GVTAttributedCharacterIterator.TextAttribute.PAINT_INFO); if (tpi == null) return; Paint fillPaint = tpi.fillPaint; Stroke stroke = tpi.strokeStroke; Paint strokePaint = tpi.strokePaint; | public void draw(Graphics2D graphics2D, AttributedCharacterIterator aci) { int numGlyphs = getNumGlyphs(); aci.first(); Paint fillPaint = (Paint)aci.getAttribute(TextAttribute.FOREGROUND); Stroke stroke = (Stroke) aci.getAttribute (GVTAttributedCharacterIterator.TextAttribute.STROKE); Paint strokePaint = (Paint) aci.getAttribute (GVTAttributedCharacterIterator.TextAttribute.STROKE_PAINT); if ((fillPaint == null) && ((strokePaint == null) || (stroke == null))) return; boolean useHinting = drawGlyphVectorWorks; if ((stroke != null) && (strokePaint != null)) useHinting = false; if (useHinting && (fillPaint != null) && !(fillPaint instanceof Color)) // The coordinate system is different for drawGlyphVector. // So complex paints aren't positioned properly. useHinting = false; final int typeGRot = AffineTransform.TYPE_GENERAL_ROTATION; final int typeGTrans = AffineTransform.TYPE_GENERAL_TRANSFORM; if (useHinting) { // Check if usr->dev transform has general rotation, // or shear.. AffineTransform at = graphics2D.getTransform(); int type = at.getType(); if (((type & typeGTrans) != 0) || ((type & typeGRot) != 0)) useHinting = false; } if (useHinting) { for (int i=0; i<numGlyphs; i++) { if (!glyphVisible[i]) { useHinting = false; break; } AffineTransform at = glyphTransforms[i]; if (at != null) { int type = at.getType(); if ((type & ~AffineTransform.TYPE_TRANSLATION) == 0) { // Just translation } else if (glyphVectorTransformWorks && ((type & typeGTrans) == 0) && ((type & typeGRot) == 0)) { // It's a simple 90Deg rotate, and we can put // it into the GlyphVector. } else { // we can't (or it doesn't make sense // to use the GlyphVector. useHinting = false; break; } } } } if (useHinting) { double sf = scaleFactor; double [] mat = new double[6]; for (int i=0; i< numGlyphs; i++) { Point2D pos = glyphPositions[i]; double x = pos.getX(); double y = pos.getY(); AffineTransform at = glyphTransforms[i]; if (at != null) { // Scale the translate portion of matrix, // and add it into the position. at.getMatrix(mat); x += mat[4]; y += mat[5]; if ((mat[0] != 1) || (mat[1] != 0) || (mat[2] != 0) || (mat[3] != 1)) { // More than just translation. mat[4] = 0; mat[5] = 0; at = new AffineTransform(mat); } else { at = null; } } pos = new Point2D.Double(x/sf, y/sf); awtGlyphVector.setGlyphPosition(i, pos); awtGlyphVector.setGlyphTransform(i, at); } graphics2D.scale(sf, sf); graphics2D.setPaint(fillPaint); graphics2D.drawGlyphVector(awtGlyphVector, 0, 0); graphics2D.scale(1/sf, 1/sf); for (int i=0; i< numGlyphs; i++) { Point2D pos = defaultGlyphPositions[i]; awtGlyphVector.setGlyphPosition(i, pos); awtGlyphVector.setGlyphTransform(i, null); } } else { Shape outline = getOutline(); // check if we need to fill this glyph if (fillPaint != null) { graphics2D.setPaint(fillPaint); graphics2D.fill(outline); } // check if we need to draw the outline of this glyph if (stroke != null && strokePaint != null) { graphics2D.setStroke(stroke); graphics2D.setPaint(strokePaint); graphics2D.draw(outline); } } } | 45946 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45946/32ff210f47c7773fb0e4cf575e28f5c475c824a9/AWTGVTGlyphVector.java/clean/sources/org/apache/batik/gvt/font/AWTGVTGlyphVector.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
3724,
12,
17558,
22,
40,
17313,
22,
40,
16,
5397,
2380,
11050,
7069,
3198,
1721,
77,
13,
288,
3639,
509,
818,
25399,
273,
11187,
25399,
5621,
3639,
1721,
77,
18,
3645,
5621,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
3724,
12,
17558,
22,
40,
17313,
22,
40,
16,
5397,
2380,
11050,
7069,
3198,
1721,
77,
13,
288,
3639,
509,
818,
25399,
273,
11187,
25399,
5621,
3639,
1721,
77,
18,
3645,
5621,
... |
public final void enableReschedule(boolean releaseSchedulerLock, ProcessorLock otherLock) { | public final void enableReschedule(boolean releaseSchedulerLock) { | public final void enableReschedule(boolean releaseSchedulerLock, ProcessorLock otherLock) { if (releaseSchedulerLock) { scheduler.unlock(otherLock); } lockCount--; if (lockCount == 0) { getTSIAddress() .atomicAnd(Word.fromIntSignExtend(~TSI_BLOCK_SWITCH)); } } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/62994783631e20e868b65c6250b1b0c82dff528a/VmProcessor.java/clean/core/src/core/org/jnode/vm/scheduler/VmProcessor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
727,
918,
4237,
607,
2847,
12,
6494,
3992,
11870,
2531,
13,
288,
3639,
309,
261,
9340,
11870,
2531,
13,
288,
5411,
8129,
18,
26226,
12,
3011,
2531,
1769,
3639,
289,
3639,
2176,
1380... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
727,
918,
4237,
607,
2847,
12,
6494,
3992,
11870,
2531,
13,
288,
3639,
309,
261,
9340,
11870,
2531,
13,
288,
5411,
8129,
18,
26226,
12,
3011,
2531,
1769,
3639,
289,
3639,
2176,
1380... |
/** * Tests the two forms of prepareStatement() */ public void testPrepareStatement() { try { java.sql.Connection conn = JDBC2Tests.openDB(); String sql = "select source,cost,imageid from test_c"; java.sql.PreparedStatement stat = conn.prepareStatement(sql); assert(stat!=null); stat.close(); stat = conn.prepareStatement(sql,java.sql.ResultSet.TYPE_SCROLL_INSENSITIVE,java.sql.ResultSet.CONCUR_UPDATABLE); assert(stat!=null); stat.close(); } catch(SQLException ex) { | public void testCreateStatement() { try { java.sql.Connection conn = JDBC2Tests.openDB(); // A standard Statement java.sql.Statement stat = conn.createStatement(); assert(stat!=null); stat.close(); // Ask for Updateable ResultSets stat = conn.createStatement(java.sql.ResultSet.TYPE_SCROLL_INSENSITIVE,java.sql.ResultSet.CONCUR_UPDATABLE); assert(stat!=null); stat.close(); } catch(SQLException ex) { assert(ex.getMessage(),false); } } /** * Tests the two forms of prepareStatement() */ public void testPrepareStatement() { try { java.sql.Connection conn = JDBC2Tests.openDB(); String sql = "select source,cost,imageid from test_c"; // A standard Statement java.sql.PreparedStatement stat = conn.prepareStatement(sql); assert(stat!=null); stat.close(); // Ask for Updateable ResultSets stat = conn.prepareStatement(sql,java.sql.ResultSet.TYPE_SCROLL_INSENSITIVE,java.sql.ResultSet.CONCUR_UPDATABLE); assert(stat!=null); stat.close(); } catch(SQLException ex) { | 45672 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45672/b75814aee320ef2b67ad01ba72c266dbbf94db45/ConnectionTest.java/clean/src/interfaces/jdbc/org/postgresql/test/jdbc2/ConnectionTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1842,
1684,
3406,
1435,
288,
565,
775,
288,
1377,
2252,
18,
4669,
18,
1952,
1487,
273,
16364,
22,
14650,
18,
3190,
2290,
5621,
1377,
368,
432,
4529,
8056,
1377,
2252,
18,
4669,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1684,
3406,
1435,
288,
565,
775,
288,
1377,
2252,
18,
4669,
18,
1952,
1487,
273,
16364,
22,
14650,
18,
3190,
2290,
5621,
1377,
368,
432,
4529,
8056,
1377,
2252,
18,
4669,... | |
return breakValue == null ? runtime.getNil() : breakValue; | return breakValue == null ? getRuntime().getNil() : breakValue; | private IRubyObject yieldUnder(RubyModule under) { return under.executeUnder(new Callback() { public IRubyObject execute(IRubyObject self, IRubyObject[] args) { ThreadContext context = runtime.getCurrentContext(); Block block = context.getBlockStack().getCurrent(); Visibility savedVisibility = block.getVisibility(); block.setVisibility(Visibility.PUBLIC); try { IRubyObject valueInYield = args[0]; IRubyObject selfInYield = args[0]; return context.yield(valueInYield, selfInYield, context.getRubyClass(), false, false); } catch (BreakJump e) { IRubyObject breakValue = e.getBreakValue(); return breakValue == null ? runtime.getNil() : breakValue; } finally { block.setVisibility(savedVisibility); } } public Arity getArity() { return Arity.optional(); } }, new IRubyObject[] { this }); } | 49687 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49687/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubyObject.java/buggy/src/org/jruby/RubyObject.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
15908,
10340,
921,
2824,
14655,
12,
54,
10340,
3120,
3613,
13,
288,
3639,
327,
3613,
18,
8837,
14655,
12,
2704,
8444,
1435,
288,
5411,
1071,
15908,
10340,
921,
1836,
12,
7937,
10340,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
15908,
10340,
921,
2824,
14655,
12,
54,
10340,
3120,
3613,
13,
288,
3639,
327,
3613,
18,
8837,
14655,
12,
2704,
8444,
1435,
288,
5411,
1071,
15908,
10340,
921,
1836,
12,
7937,
10340,
... |
public DOMFile(File file, int buffers, int dataBuffers) { this(buffers, dataBuffers); setFile(file); | public DOMFile(int buffers, int dataBuffers) { super(buffers); fileHeader = (DOMFileHeader) getFileHeader(); fileHeader.setPageCount(0); fileHeader.setTotalCount(0); buffer = new ClockPageBuffer(dataBuffers); | public DOMFile(File file, int buffers, int dataBuffers) { this(buffers, dataBuffers); setFile(file); } | 2909 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2909/1c0cc42431436631d1b2e9ea8af63bb6dd883496/DOMFile.java/buggy/src/org/exist/storage/DOMFile.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
4703,
812,
12,
812,
585,
16,
509,
9664,
16,
509,
501,
13699,
13,
288,
202,
202,
2211,
12,
28101,
16,
501,
13699,
1769,
202,
202,
542,
812,
12,
768,
1769,
202,
97,
2,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
4703,
812,
12,
812,
585,
16,
509,
9664,
16,
509,
501,
13699,
13,
288,
202,
202,
2211,
12,
28101,
16,
501,
13699,
1769,
202,
202,
542,
812,
12,
768,
1769,
202,
97,
2,
-100,
... |
public org.quickfix.field.TradeRequestID get(org.quickfix.field.TradeRequestID value) | public quickfix.field.TradeRequestID get(quickfix.field.TradeRequestID value) | public org.quickfix.field.TradeRequestID get(org.quickfix.field.TradeRequestID value) throws FieldNotFound { getField(value); return value; } | 8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/TradeCaptureReportRequest.java/buggy/src/java/src/quickfix/fix43/TradeCaptureReportRequest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
9549,
904,
18,
1518,
18,
22583,
691,
734,
336,
12,
19525,
904,
18,
1518,
18,
22583,
691,
734,
225,
460,
13,
565,
1216,
2286,
2768,
225,
288,
5031,
12,
1132,
1769,
327,
460,
31,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
9549,
904,
18,
1518,
18,
22583,
691,
734,
336,
12,
19525,
904,
18,
1518,
18,
22583,
691,
734,
225,
460,
13,
565,
1216,
2286,
2768,
225,
288,
5031,
12,
1132,
1769,
327,
460,
31,
... |
+ " owl:onProperty src:type ;" + ENDL | + " owl:onProperty src:OrganisationType__type ;" + ENDL | public void testGetRestrictionSubclassNested() throws Exception { String ENDL = System.getProperty("line.separator"); // add max cardinality one restrictions String owl = "@prefix : <" + tgtNs + "> ." + ENDL + "@prefix src: <" + srcNs + "> ." + ENDL + "@prefix rdf: <" + OntologyUtil.RDF_NAMESPACE + "> ." + ENDL + "@prefix rdfs: <" + OntologyUtil.RDFS_NAMESPACE + "> ." + ENDL + "@prefix owl: <" + OntologyUtil.OWL_NAMESPACE + "> ." + ENDL + "@prefix xsd: <" + OntologyUtil.XSD_NAMESPACE + "> ." + ENDL + ENDL + "src:Organisation a owl:Class ." + ENDL + "src:organisationType a owl:ObjectProperty ;" + ENDL + " rdfs:domain src:Organisation ;" + ENDL + " rdfs:range src:OrganisationType ." + ENDL + "src:type a owl:DatatypeProperty ;" + ENDL + " rdfs:domain src:OrganisationType ;" + ENDL + " rdfs:range xsd:String ." + ENDL + "src:OrganisationType a owl:Class ." + ENDL + "src:companyModel a owl:ObjectProperty ;" + ENDL + " rdfs:domain src:OrganisationType ;" + ENDL + " rdfs:range src:CompanyModel ." + ENDL + "src:CompanyModel a owl:Class ." + ENDL + "src:model a owl:DatatypeProperty ;" + ENDL + " rdfs:domain src:CompanyModel ;" + ENDL + " rdfs:range xsd:String ." + ENDL + ":Organisation a owl:Class ;" + ENDL + " owl:equivalentClass src:Organisation ." + ENDL + ":Organisation__organisationType a owl:ObjectProperty ;" + ENDL + " rdfs:domain :Organisation ;" + ENDL + " rdfs:range :OrganisationType ;" + ENDL + " owl:equivalentProperty src:organisationType ." + ENDL + ":Business__organisationType a owl:ObjectProperty ;" + ENDL + " rdfs:domain :Business ;" + ENDL + " rdfs:range :OrganisationType ;" + ENDL + " rdfs:subPropertyOf :Organisation__organisationType ;" + ENDL + " owl:equivalentProperty src:organisationType ." + ENDL + ":PrivateBusiness__organisationType a owl:ObjectProperty ;" + ENDL + " rdfs:domain :PrivateBusiness ;" + ENDL + " rdfs:range :OrganisationType ;" + ENDL + " rdfs:subPropertyOf :Organisation__organisationType ;" + ENDL + " owl:equivalentProperty src:organisationType ." + ENDL + ":OrganisationType a owl:Class ;" + ENDL + " owl:equivalentClass src:OrganisationType ." + ENDL + ":OrganisationType__type a owl:DatatypeProperty ;" + ENDL + " rdfs:domain :OrganisationType ;" + ENDL + " rdfs:range xsd:String ;" + ENDL + " owl:equivalentProperty src:type ." + ENDL + ":OrganisationType__companyModel a owl:ObjectProperty ;" + ENDL + " rdfs:domain :OrganisationType ;" + ENDL + " rdfs:range :CompanyModel ;" + ENDL + " owl:equivalentProperty src:companyModel ." + ENDL + ":CompanyModel a owl:Class ;" + ENDL + " owl:equivalentClass src:CompanyModel ." + ENDL + ":CompanyModel__model a owl:DatatypeProperty ;" + ENDL + " rdfs:domain :CompanyModel ;" + ENDL + " rdfs:range xsd:String ;" + ENDL + " owl:equivalentProperty src:model ." + ENDL + ":Business a owl:Class ; " + ENDL + " rdfs:subClassOf src:Organisation ;" + ENDL + " rdfs:subClassOf" + ENDL + " [ a owl:Restriction ;" + ENDL + " owl:onProperty src:organisationType ;" + ENDL + " owl:hasValue" + ENDL + " [ rdfs:subClassOf src:OrganisationType ;" + ENDL + " rdfs:subClassOf" + ENDL + " [ a owl:Restriction ;" + ENDL + " owl:onProperty src:type ;" + ENDL + " owl:hasValue \"business\"" + ENDL + " ] " + ENDL + " ] " + ENDL + " ] ." + ENDL //+ " owl:equivalentClass src:Organisation ." + ENDL + ":PrivateBusiness a owl:Class ; " + ENDL + " rdfs:subClassOf src:Organisation ;" + ENDL + " rdfs:subClassOf" + ENDL + " [ a owl:Restriction ;" + ENDL + " owl:onProperty src:organisationType ;" + ENDL + " owl:hasValue" + ENDL + " [ rdfs:subClassOf src:OrganisationType ;" + ENDL + " rdfs:subClassOf" + ENDL + " [ a owl:Restriction ;" + ENDL + " owl:onProperty src:companyModel ;" + ENDL + " owl:hasValue" + " [ rdfs:subClassOf src:CompanyModel ;" + ENDL + " rdfs:subClassOf" + ENDL + " [ a owl:Restriction ;" + ENDL + " owl:onProperty src:model ;" + ENDL + " owl:hasValue \"limited\"" + ENDL + " ] " + ENDL + " ] " + ENDL + " ] ;" + ENDL + " rdfs:subClassOf" + ENDL + " [ a owl:Restriction ;" + ENDL + " owl:onProperty src:type ;" + ENDL + " owl:hasValue \"business\"" + ENDL + " ] " + ENDL + " ] " + ENDL + " ] ." + ENDL; //+ " owl:equivalentClass src:Organisation ." + ENDL; OntModel model = ModelFactory.createOntologyModel(); model.read(new StringReader(owl), null, "N3"); // maps to business Item src11 = new Item(); src11.setIdentifier("11"); src11.setClassName(srcNs + "Organisation"); src11.setImplementations(""); Item src12 = new Item(); src12.setIdentifier("12"); src12.setClassName(srcNs + "OrganisationType"); src12.setImplementations(""); Reference r11 = new Reference(); r11.setName("organisationType"); r11.setRefId("12"); src11.addReference(r11); Attribute a11 = new Attribute(); a11.setName("type"); a11.setValue("business"); src12.addAttribute(a11); // maps to private business Item src21 = new Item(); src21.setIdentifier("21"); src21.setClassName(srcNs + "Organisation"); src21.setImplementations(""); Reference r21 = new Reference(); r21.setName("organisationType"); r21.setRefId("22"); src21.addReference(r21); Item src22 = new Item(); src22.setIdentifier("22"); src22.setClassName(srcNs + "OrganisationType"); src22.setImplementations(""); Attribute a22 = new Attribute(); a22.setName("type"); a22.setValue("business"); src22.addAttribute(a22); Reference r22 = new Reference(); r22.setName("companyModel"); r22.setRefId("23"); src22.addReference(r22); Item src23 = new Item(); src23.setIdentifier("23"); src23.setClassName(srcNs + "CompanyModel"); src23.setImplementations(""); Attribute a23 = new Attribute(); a23.setName("model"); a23.setValue("limited"); src23.addAttribute(a23); Collection srcItems = new ArrayList(); srcItems.add(ItemHelper.convert(src11)); srcItems.add(ItemHelper.convert(src12)); srcItems.add(ItemHelper.convert(src21)); srcItems.add(ItemHelper.convert(src22)); srcItems.add(ItemHelper.convert(src23)); new MockItemWriter(itemMap).storeAll(srcItems); // expected items Item exp11 = new Item(); exp11.setIdentifier("11"); exp11.setClassName(tgtNs + "Business"); exp11.setImplementations(""); Item exp12 = new Item(); exp12.setIdentifier("12"); exp12.setClassName(tgtNs + "OrganisationType"); exp12.setImplementations(""); Reference er11 = new Reference(); er11.setName("Business__organisationType"); er11.setRefId("12"); exp11.addReference(er11); Attribute ea11 = new Attribute(); ea11.setName("OrganisationType__type"); ea11.setValue("business"); exp12.addAttribute(ea11); Item exp21 = new Item(); exp21.setIdentifier("21"); exp21.setClassName(tgtNs + "PrivateBusiness"); exp21.setImplementations(""); Item exp22 = new Item(); exp22.setIdentifier("22"); exp22.setClassName(tgtNs + "OrganisationType"); exp22.setImplementations(""); Item exp23 = new Item(); exp23.setIdentifier("23"); exp23.setClassName(tgtNs + "CompanyModel"); exp23.setImplementations(""); Reference er21 = new Reference(); er21.setName("PrivateBusiness__organisationType"); er21.setRefId("22"); exp21.addReference(er21); Reference er22 = new Reference(); er22.setName("OrganisationType__companyModel"); er22.setRefId("23"); exp22.addReference(er22); Attribute ea21 = new Attribute(); ea21.setName("CompanyModel__model"); ea21.setValue("limited"); exp23.addAttribute(ea21); Attribute ea22 = new Attribute(); ea22.setName("OrganisationType__type"); ea22.setValue("business"); exp22.addAttribute(ea22); Set expected = new HashSet(Arrays.asList(new Object[] {exp11, exp12, exp21, exp22, exp23})); translator = new DataTranslator(new MockItemReader(itemMap), model, tgtNs);// System.out.println("templateMap: " + translator.templateMap.toString());// System.out.println("restrictionMap: " + translator.restrictionMap.toString());// System.out.println("equivMap: " + translator.equivMap.toString());// System.out.println("clsPropMap: " + translator.clsPropMap.toString()); MockItemWriter tgtIs = new MockItemWriter(new HashMap()); translator.translate(tgtIs); assertEquals(expected, tgtIs.getItems()); } | 29158 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/29158/21bfbea214aa8427ba527d71b44588cb4aa59716/DataTranslatorTest.java/clean/intermine/src/test/org/intermine/dataconversion/DataTranslatorTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
967,
11670,
1676,
1106,
8649,
1435,
1216,
1185,
288,
3639,
514,
7273,
48,
273,
2332,
18,
588,
1396,
2932,
1369,
18,
11287,
8863,
3639,
368,
527,
943,
14379,
1245,
17499,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
967,
11670,
1676,
1106,
8649,
1435,
1216,
1185,
288,
3639,
514,
7273,
48,
273,
2332,
18,
588,
1396,
2932,
1369,
18,
11287,
8863,
3639,
368,
527,
943,
14379,
1245,
17499,
... |
int alt59=2; int LA59_0 = input.LA(1); if ( (LA59_0>=46 && LA59_0<=47) ) { alt59=1; } switch (alt59) { | int alt60=2; int LA60_0 = input.LA(1); if ( (LA60_0>=46 && LA60_0<=47) ) { alt60=1; } switch (alt60) { | public void constraint(List constraints) throws RecognitionException { Token fb=null; Token f=null; Token bvc=null; Token con=null; String op = null; String lc = null; String rvc = null; PatternDescr d = null; try { // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:872:17: ( opt_eol (fb= ID opt_eol ':' opt_eol )? f= ID opt_eol (op= operator opt_eol (bvc= ID | lc= enum_constraint | lc= literal_constraint | rvc= retval_constraint ) (con= ('&'|'|')op= operator (bvc= ID | lc= enum_constraint | lc= literal_constraint | rvc= retval_constraint ) )* )? opt_eol ) // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:872:17: opt_eol (fb= ID opt_eol ':' opt_eol )? f= ID opt_eol (op= operator opt_eol (bvc= ID | lc= enum_constraint | lc= literal_constraint | rvc= retval_constraint ) (con= ('&'|'|')op= operator (bvc= ID | lc= enum_constraint | lc= literal_constraint | rvc= retval_constraint ) )* )? opt_eol { following.push(FOLLOW_opt_eol_in_constraint2220); opt_eol(); following.pop(); // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:873:17: (fb= ID opt_eol ':' opt_eol )? int alt56=2; alt56 = dfa56.predict(input); switch (alt56) { case 1 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:873:19: fb= ID opt_eol ':' opt_eol { fb=(Token)input.LT(1); match(input,ID,FOLLOW_ID_in_constraint2228); following.push(FOLLOW_opt_eol_in_constraint2230); opt_eol(); following.pop(); match(input,33,FOLLOW_33_in_constraint2232); following.push(FOLLOW_opt_eol_in_constraint2234); opt_eol(); following.pop(); } break; } f=(Token)input.LT(1); match(input,ID,FOLLOW_ID_in_constraint2244); if ( fb != null ) { //System.err.println( "fb: " + fb.getText() ); //System.err.println( " f: " + f.getText() ); d = new FieldBindingDescr( f.getText(), fb.getText() ); //System.err.println( "fbd: " + d ); d.setLocation( offset(f.getLine()), f.getCharPositionInLine() ); constraints.add( d ); } FieldConstraintDescr fc = new FieldConstraintDescr(f.getText()); fc.setLocation( offset(f.getLine()), f.getCharPositionInLine() ); following.push(FOLLOW_opt_eol_in_constraint2258); opt_eol(); following.pop(); // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:891:33: (op= operator opt_eol (bvc= ID | lc= enum_constraint | lc= literal_constraint | rvc= retval_constraint ) (con= ('&'|'|')op= operator (bvc= ID | lc= enum_constraint | lc= literal_constraint | rvc= retval_constraint ) )* )? int alt60=2; int LA60_0 = input.LA(1); if ( (LA60_0>=57 && LA60_0<=66) ) { alt60=1; } else if ( LA60_0==EOL||LA60_0==15||(LA60_0>=24 && LA60_0<=25) ) { alt60=2; } else { NoViableAltException nvae = new NoViableAltException("891:33: (op= operator opt_eol (bvc= ID | lc= enum_constraint | lc= literal_constraint | rvc= retval_constraint ) (con= (\'&\'|\'|\')op= operator (bvc= ID | lc= enum_constraint | lc= literal_constraint | rvc= retval_constraint ) )* )?", 60, 0, input); throw nvae; } switch (alt60) { case 1 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:891:41: op= operator opt_eol (bvc= ID | lc= enum_constraint | lc= literal_constraint | rvc= retval_constraint ) (con= ('&'|'|')op= operator (bvc= ID | lc= enum_constraint | lc= literal_constraint | rvc= retval_constraint ) )* { following.push(FOLLOW_operator_in_constraint2264); op=operator(); following.pop(); following.push(FOLLOW_opt_eol_in_constraint2266); opt_eol(); following.pop(); // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:893:41: (bvc= ID | lc= enum_constraint | lc= literal_constraint | rvc= retval_constraint ) int alt57=4; switch ( input.LA(1) ) { case ID: int LA57_1 = input.LA(2); if ( LA57_1==18 ) { alt57=2; } else if ( LA57_1==EOL||LA57_1==15||(LA57_1>=24 && LA57_1<=25)||(LA57_1>=46 && LA57_1<=47) ) { alt57=1; } else { NoViableAltException nvae = new NoViableAltException("893:41: (bvc= ID | lc= enum_constraint | lc= literal_constraint | rvc= retval_constraint )", 57, 1, input); throw nvae; } break; case INT: case BOOL: case STRING: case FLOAT: case 43: alt57=3; break; case 23: alt57=4; break; default: NoViableAltException nvae = new NoViableAltException("893:41: (bvc= ID | lc= enum_constraint | lc= literal_constraint | rvc= retval_constraint )", 57, 0, input); throw nvae; } switch (alt57) { case 1 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:893:49: bvc= ID { bvc=(Token)input.LT(1); match(input,ID,FOLLOW_ID_in_constraint2284); VariableRestrictionDescr vd = new VariableRestrictionDescr(op, bvc.getText()); fc.addRestriction(vd); constraints.add(fc); } break; case 2 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:904:49: lc= enum_constraint { following.push(FOLLOW_enum_constraint_in_constraint2309); lc=enum_constraint(); following.pop(); LiteralRestrictionDescr lrd = new LiteralRestrictionDescr(op, lc, true); fc.addRestriction(lrd); constraints.add(fc); } break; case 3 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:913:49: lc= literal_constraint { following.push(FOLLOW_literal_constraint_in_constraint2341); lc=literal_constraint(); following.pop(); LiteralRestrictionDescr lrd = new LiteralRestrictionDescr(op, lc); fc.addRestriction(lrd); constraints.add(fc); } break; case 4 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:921:49: rvc= retval_constraint { following.push(FOLLOW_retval_constraint_in_constraint2361); rvc=retval_constraint(); following.pop(); ReturnValueRestrictionDescr rvd = new ReturnValueRestrictionDescr(op, rvc); fc.addRestriction(rvd); constraints.add(fc); } break; } // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:932:41: (con= ('&'|'|')op= operator (bvc= ID | lc= enum_constraint | lc= literal_constraint | rvc= retval_constraint ) )* loop59: do { int alt59=2; int LA59_0 = input.LA(1); if ( (LA59_0>=46 && LA59_0<=47) ) { alt59=1; } switch (alt59) { case 1 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:933:49: con= ('&'|'|')op= operator (bvc= ID | lc= enum_constraint | lc= literal_constraint | rvc= retval_constraint ) { con=(Token)input.LT(1); if ( (input.LA(1)>=46 && input.LA(1)<=47) ) { input.consume(); errorRecovery=false; } else { MismatchedSetException mse = new MismatchedSetException(null,input); recoverFromMismatchedSet(input,mse,FOLLOW_set_in_constraint2396); throw mse; } if (con.getText().equals("&") ) { fc.addRestriction(new RestrictionConnectiveDescr(RestrictionConnectiveDescr.AND)); } else { fc.addRestriction(new RestrictionConnectiveDescr(RestrictionConnectiveDescr.OR)); } following.push(FOLLOW_operator_in_constraint2418); op=operator(); following.pop(); // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:943:49: (bvc= ID | lc= enum_constraint | lc= literal_constraint | rvc= retval_constraint ) int alt58=4; switch ( input.LA(1) ) { case ID: int LA58_1 = input.LA(2); if ( LA58_1==18 ) { alt58=2; } else if ( LA58_1==EOL||LA58_1==15||(LA58_1>=24 && LA58_1<=25)||(LA58_1>=46 && LA58_1<=47) ) { alt58=1; } else { NoViableAltException nvae = new NoViableAltException("943:49: (bvc= ID | lc= enum_constraint | lc= literal_constraint | rvc= retval_constraint )", 58, 1, input); throw nvae; } break; case INT: case BOOL: case STRING: case FLOAT: case 43: alt58=3; break; case 23: alt58=4; break; default: NoViableAltException nvae = new NoViableAltException("943:49: (bvc= ID | lc= enum_constraint | lc= literal_constraint | rvc= retval_constraint )", 58, 0, input); throw nvae; } switch (alt58) { case 1 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:943:57: bvc= ID { bvc=(Token)input.LT(1); match(input,ID,FOLLOW_ID_in_constraint2430); VariableRestrictionDescr vd = new VariableRestrictionDescr(op, bvc.getText()); fc.addRestriction(vd); } break; case 2 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:949:57: lc= enum_constraint { following.push(FOLLOW_enum_constraint_in_constraint2458); lc=enum_constraint(); following.pop(); LiteralRestrictionDescr lrd = new LiteralRestrictionDescr(op, lc, true); fc.addRestriction(lrd); } break; case 3 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:956:57: lc= literal_constraint { following.push(FOLLOW_literal_constraint_in_constraint2493); lc=literal_constraint(); following.pop(); LiteralRestrictionDescr lrd = new LiteralRestrictionDescr(op, lc); fc.addRestriction(lrd); } break; case 4 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:962:57: rvc= retval_constraint { following.push(FOLLOW_retval_constraint_in_constraint2515); rvc=retval_constraint(); following.pop(); ReturnValueRestrictionDescr rvd = new ReturnValueRestrictionDescr(op, rvc); fc.addRestriction(rvd); } break; } } break; default : break loop59; } } while (true); } break; } following.push(FOLLOW_opt_eol_in_constraint2571); opt_eol(); following.pop(); } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { } return ; } | 31577 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/31577/12c8feffd968f958100f654d836fa3c2ee21ded8/RuleParser.java/buggy/drools-compiler/src/main/java/org/drools/lang/RuleParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
4954,
12,
682,
6237,
13,
1216,
9539,
288,
6647,
3155,
12754,
33,
2011,
31,
3639,
3155,
284,
33,
2011,
31,
3639,
3155,
324,
4227,
33,
2011,
31,
3639,
3155,
356,
33,
2011,
31,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
4954,
12,
682,
6237,
13,
1216,
9539,
288,
6647,
3155,
12754,
33,
2011,
31,
3639,
3155,
284,
33,
2011,
31,
3639,
3155,
324,
4227,
33,
2011,
31,
3639,
3155,
356,
33,
2011,
31,
... |
return new ArrayList(this.viewLinks); | List newList = FastList.newInstance(); newList.addAll(this.viewLinks); return newList; | public List getViewLinksCopy() { return new ArrayList(this.viewLinks); } | 22229 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/22229/f701d5dcc3b233813787c77eb6d860b522558fa0/ModelViewEntity.java/buggy/framework/entity/src/org/ofbiz/entity/model/ModelViewEntity.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
987,
8893,
7100,
2951,
1435,
288,
3639,
987,
23605,
273,
9545,
682,
18,
2704,
1442,
5621,
23605,
18,
1289,
1595,
12,
2211,
18,
1945,
7100,
1769,
327,
23605,
31,
565,
289,
2,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
987,
8893,
7100,
2951,
1435,
288,
3639,
987,
23605,
273,
9545,
682,
18,
2704,
1442,
5621,
23605,
18,
1289,
1595,
12,
2211,
18,
1945,
7100,
1769,
327,
23605,
31,
565,
289,
2,
-100,
... |
factory.connectRepository1(); assertNull(factory.repository.getMilestones()); factory.repository.updateAttributes(new NullProgressMonitor()); TracVersion[] versions = factory.repository.getVersions(); | connect010(); assertNull(repository.getMilestones()); repository.updateAttributes(new NullProgressMonitor()); TracVersion[] versions = repository.getVersions(); | public void testUpdateAttributes() throws Exception { factory.connectRepository1(); assertNull(factory.repository.getMilestones()); factory.repository.updateAttributes(new NullProgressMonitor()); TracVersion[] versions = factory.repository.getVersions(); assertEquals(2, versions.length); Arrays.sort(versions, new Comparator<TracVersion>() { public int compare(TracVersion o1, TracVersion o2) { return o1.getName().compareTo(o2.getName()); } }); assertEquals("v1", versions[0].getName()); assertEquals("v2", versions[1].getName()); } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/312c78d721814073d17f104ab334cbe54b3954cc/Trac09ClientTest.java/clean/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/Trac09ClientTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
1891,
2498,
1435,
1216,
1185,
288,
202,
202,
6848,
18,
3612,
3305,
21,
5621,
202,
202,
11231,
2041,
12,
6848,
18,
9071,
18,
588,
49,
14849,
5322,
10663,
202,
202,
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,
225,
202,
482,
918,
1842,
1891,
2498,
1435,
1216,
1185,
288,
202,
202,
6848,
18,
3612,
3305,
21,
5621,
202,
202,
11231,
2041,
12,
6848,
18,
9071,
18,
588,
49,
14849,
5322,
10663,
202,
202,
6... |
assertEquals(1,Filter.FilterCommandLine.getVersionNum(versionNames, timeStamps, "1", true, 2)); | assertEquals(1,Filter.FilterCommandLine.getVersionNum(versionNames, timeStamps, "1", true, 3)); | public void test1() { assertEquals(1,Filter.FilterCommandLine.getVersionNum(versionNames, timeStamps, "1", true, 2)); } | 10715 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10715/b8dca37518ccc3850350471a0d5f894fa0bc9b20/FindSeqNumTest.java/buggy/findbugs/src/junit/edu/umd/cs/findbugs/workflow/FindSeqNumTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
21,
1435,
288,
202,
202,
11231,
8867,
12,
21,
16,
1586,
18,
1586,
21391,
18,
588,
1444,
2578,
12,
1589,
1557,
16,
18198,
87,
16,
315,
21,
3113,
638,
16,
576,
1001... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
21,
1435,
288,
202,
202,
11231,
8867,
12,
21,
16,
1586,
18,
1586,
21391,
18,
588,
1444,
2578,
12,
1589,
1557,
16,
18198,
87,
16,
315,
21,
3113,
638,
16,
576,
1001... |
public boolean canChangeConnectedNode(Object newNode, Object oldNode, Object edge) { | public boolean canChangeConnectedNode(Object newNode, Object oldNode, Object edge) { | public boolean canChangeConnectedNode(Object newNode, Object oldNode, Object edge) { // prevent no changes... if ( newNode == oldNode) return false; // check parameter types: if ( !(newNode instanceof MClass || oldNode instanceof MClass || edge instanceof MAssociation ) ) { return false; } return true; } | 7166 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7166/23464f9cbc3169e9d2f1919998cae2c59b514985/ClassDiagramGraphModel.java/clean/src_new/org/argouml/uml/diagram/static_structure/ClassDiagramGraphModel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
848,
3043,
8932,
907,
12,
921,
10942,
16,
1033,
1592,
907,
16,
1033,
3591,
13,
288,
202,
759,
5309,
1158,
3478,
2777,
202,
430,
261,
10942,
422,
1592,
907,
13,
202,
565,
327... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
848,
3043,
8932,
907,
12,
921,
10942,
16,
1033,
1592,
907,
16,
1033,
3591,
13,
288,
202,
759,
5309,
1158,
3478,
2777,
202,
430,
261,
10942,
422,
1592,
907,
13,
202,
565,
327... |
if (SWT.getPlatform().equals("win32") == false) { drawDirect = (event.text.length() == 1) || (replacedLength == 1); } | void modifyContent(Event event, boolean updateCaret) { event.doit = true; notifyListeners(SWT.Verify, event); if (event.doit) { StyledTextEvent styledTextEvent = null; int replacedLength = event.end - event.start; boolean isBackspace = event.start < caretOffset; boolean isDirectionBoundary = false; if (updateCaret && isBidi()) { int line = content.getLineAtOffset(caretOffset); int lineStartOffset = content.getOffsetAtLine(line); int offsetInLine = caretOffset - lineStartOffset; String lineText = content.getLine(line); GC gc = new GC(this); StyledTextBidi bidi = new StyledTextBidi(gc, lineText, getBidiSegments(lineStartOffset, lineText)); isDirectionBoundary = (offsetInLine > 0 && bidi.isRightToLeft(offsetInLine) != bidi.isRightToLeft(offsetInLine - 1)); gc.dispose(); } if (isListening(ExtendedModify)) { styledTextEvent = new StyledTextEvent(logicalContent); styledTextEvent.start = event.start; styledTextEvent.end = event.start + event.text.length(); styledTextEvent.text = content.getTextRange(event.start, replacedLength); } // Optimization for non-Windows platforms. Do direct drawing during typing. if (SWT.getPlatform().equals("win32") == false) { drawDirect = (event.text.length() == 1) || (replacedLength == 1); } content.replaceTextRange(event.start, replacedLength, event.text); // set the caret position prior to sending the modify event. // fixes 1GBB8NJ if (updateCaret) { // always update the caret location. fixes 1G8FODP internalSetSelection(event.start + event.text.length(), 0, true); if (isBidi()) { // Update the caret direction so that the caret moves to the // typed/deleted character. Fixes 1GJLQ16. if (replacedLength == 1 && event.text.length() == 0) { updateBidiDirection(isBackspace, isDirectionBoundary); } else { lastCaretDirection = ST.COLUMN_NEXT; } showBidiCaret(); } else { showCaret(); } } // Optimization for non-Windows platforms. Do direct drawing during typing. if (drawDirect) { int startLine = content.getLineAtOffset(event.start); int startY = startLine * lineHeight - verticalScrollOffset; GC gc = new GC(this); performPaint(gc, startLine, startY, lineHeight); drawDirect = false; gc.dispose(); } notifyListeners(SWT.Modify, event); if (isListening(ExtendedModify)) { notifyListeners(ExtendedModify, styledTextEvent); } }} | 12413 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12413/69ee1a54e3186341c257348cbeae19ccad394fe4/StyledText.java/clean/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
918,
5612,
1350,
12,
1133,
871,
16,
1250,
1089,
39,
20731,
13,
288,
202,
2575,
18,
2896,
305,
273,
638,
31,
202,
12336,
5583,
12,
55,
8588,
18,
8097,
16,
871,
1769,
202,
430,
261,
2575,
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,
918,
5612,
1350,
12,
1133,
871,
16,
1250,
1089,
39,
20731,
13,
288,
202,
2575,
18,
2896,
305,
273,
638,
31,
202,
12336,
5583,
12,
55,
8588,
18,
8097,
16,
871,
1769,
202,
430,
261,
2575,
18... | |
if (atoms[i].getFlag(CDKConstants.ISAROMATIC)) { if (getAromaticCarbonsCount(ac, atoms[i]) == 2) { | if (atoms[i].getFlag(CDKConstants.ISAROMATIC) && aromaticRing) { if (getAromaticCarbonsCount(ac, atoms[i]) >= 2) { | public DescriptorValue calculate(AtomContainer ac) throws CDKException { RingSet rs = (new AllRingsFinder()).findAllRings(ac); HueckelAromaticityDetector.detectAromaticity(ac, rs, true); double xlogP = 0; org.openscience.cdk.interfaces.Atom[] atoms = ac.getAtoms(); String symbol = ""; int bondCount = 0; int hsCount = 0; double xlogPOld=0; double maxBondOrder = 0; Vector hBondAcceptors=new Vector(); Vector hBondDonors=new Vector(); for (int i = 0; i < atoms.length; i++) { if (xlogPOld==xlogP & i>0 & !symbol.equals("H")){ //System.out.println("XlogPAssignmentError: Could not assign atom number:"+(i-1)+" Symbol:"+symbol+" "+" bondCount:"+bondCount+" hsCount:"+hsCount+" maxBondOrder:"+maxBondOrder+"\t"); } xlogPOld=xlogP; symbol = atoms[i].getSymbol(); bondCount = ac.getBondCount(atoms[i]); hsCount = getHydrogenCount(ac, atoms[i]); maxBondOrder = ac.getMaximumBondOrder(atoms[i]); if (!symbol.equals("H")){ //System.out.print("i:"+i+" Symbol:"+symbol+" "+" bondCount:"+bondCount+" hsCount:"+hsCount+" maxBondOrder:"+maxBondOrder+"\t"); } if (symbol.equals("C")) { if (bondCount == 2) { // C sp if (hsCount >= 1) { xlogP += 0.209; //System.out.println("XLOGP: 38 0.209"); } else { if (maxBondOrder == 2.0) { xlogP += 2.073; //System.out.println("XLOGP: 40 2.037"); } else if (maxBondOrder == 3.0) { xlogP += 0.33; //System.out.println("XLOGP: 39 0.33"); } } } if (bondCount == 3) { // C sp2 if (atoms[i].getFlag(CDKConstants.ISAROMATIC)) { if (getAromaticCarbonsCount(ac, atoms[i]) == 2) { if (hsCount == 0) { if (getAtomTypeXCount(ac, atoms[i]) == 0) { xlogP += 0.296; //System.out.println("XLOGP: 34 0.296"); } else { xlogP -= 0.151; //System.out.println("XLOGP: 35 -0.151"); } } else { xlogP += 0.337; //System.out.println("XLOGP: 32 0.337"); } //} else if (getAromaticCarbonsCount(ac, atoms[i]) < 2 && getAromaticNitrogensCount(ac, atoms[i]) > 1) { } else if (getAromaticNitrogensCount(ac, atoms[i]) >= 1) { if (hsCount == 0) { if (getAtomTypeXCount(ac, atoms[i]) == 0) { xlogP += 0.174; //System.out.println("XLOGP: 36 0.174"); } else { xlogP += 0.366; //System.out.println("XLOGP: 37 0.366"); } } else if (getHydrogenCount(ac, atoms[i]) == 1) { xlogP += 0.126; //System.out.println("XLOGP: 33 0.126"); } } //NOT aromatic, but sp2 } else { if (hsCount == 0) { if (getAtomTypeXCount(ac, atoms[i]) == 0) { if (getPiSystemsCount(ac, atoms[i]) <= 1) { xlogP += 0.05; //System.out.println("XLOGP: 26 0.05"); } else { xlogP += 0.013; //System.out.println("XLOGP: 27 0.013"); } } if (getAtomTypeXCount(ac, atoms[i]) == 1) { if (getPiSystemsCount(ac, atoms[i]) <= 1) { xlogP -= 0.03; //System.out.println("XLOGP: 28 -0.03"); } else { xlogP -= 0.027; //System.out.println("XLOGP: 29 -0.027"); } } if (getAtomTypeXCount(ac, atoms[i]) == 2) { if (getPiSystemsCount(ac, atoms[i]) <=1) { xlogP += 0.005; //System.out.println("XLOGP: 30 0.005"); } else { xlogP -= 0.315; //System.out.println("XLOGP: 31 -0.315"); } } } if (hsCount == 1) { if (getAtomTypeXCount(ac, atoms[i]) == 0) { if (getPiSystemsCount(ac, atoms[i]) == 1) { xlogP += 0.466; //System.out.println("XLOGP: 22 0.466"); } if (getPiSystemsCount(ac, atoms[i]) == 2) { xlogP += 0.136; //System.out.println("XLOGP: 23 0.136"); } } else { if (getPiSystemsCount(ac, atoms[i]) == 1) { xlogP += 0.001; //System.out.println("XLOGP: 24 0.001"); } if (getPiSystemsCount(ac, atoms[i]) == 2) { xlogP -= 0.31; //System.out.println("XLOGP: 25 -0.31"); } } } if (hsCount == 2) { xlogP += 0.42; //System.out.println("XLOGP: 21 0.42"); } }//sp2 NOT aromatic } if (bondCount == 4) { // C sp3 if (hsCount == 0) { if (getAtomTypeXCount(ac, atoms[i]) == 0) { if (getPiSystemsCount(ac, atoms[i]) == 0) { xlogP -= 0.006; //System.out.println("XLOGP: 16 -0.006"); } if (getPiSystemsCount(ac, atoms[i]) == 1) { xlogP -= 0.57; //System.out.println("XLOGP: 17 -0.57"); } if (getPiSystemsCount(ac, atoms[i]) >= 2) { xlogP -= 0.317; //System.out.println("XLOGP: 18 -0.317"); } } else { if (getPiSystemsCount(ac, atoms[i]) == 0) { xlogP -= 0.316; //System.out.println("XLOGP: 19 -0.316"); } else { xlogP -= 0.723; //System.out.println("XLOGP: 20 -0.723"); } } } if (hsCount == 1) { if (getAtomTypeXCount(ac, atoms[i]) == 0) { if (getPiSystemsCount(ac, atoms[i]) == 0) { xlogP += 0.127; //System.out.println("XLOGP: 10 0.127"); } if (getPiSystemsCount(ac, atoms[i]) == 1) { xlogP -= 0.243; //System.out.println("XLOGP: 11 -0.243"); } if (getPiSystemsCount(ac, atoms[i]) >= 2) { xlogP -= 0.499; //System.out.println("XLOGP: 12 -0.499"); } } else { if (getPiSystemsCount(ac, atoms[i]) == 0) { xlogP -= 0.205; //System.out.println("XLOGP: 13 -0.205"); } if (getPiSystemsCount(ac, atoms[i]) == 1) { xlogP -= 0.305; //System.out.println("XLOGP: 14 -0.305"); } if (getPiSystemsCount(ac, atoms[i]) >= 2) { xlogP -= 0.709; //System.out.println("XLOGP: 15 -0.709"); } } } if (hsCount == 2) { if (getAtomTypeXCount(ac, atoms[i]) == 0) { if (getPiSystemsCount(ac, atoms[i]) == 0) { xlogP += 0.358; //System.out.println("XLOGP: 4 0.358"); } if (getPiSystemsCount(ac, atoms[i]) == 1) { xlogP -= 0.008; //System.out.println("XLOGP: 5 -0.008"); } if (getPiSystemsCount(ac, atoms[i]) == 2) { xlogP -= 0.185; //System.out.println("XLOGP: 6 -0.185"); } } else { if (getPiSystemsCount(ac, atoms[i]) == 0) { xlogP += 0.137; //System.out.println("XLOGP: 7 0.137"); } if (getPiSystemsCount(ac, atoms[i]) == 1) { xlogP -= 0.303; //System.out.println("XLOGP: 8 -0.303"); } if (getPiSystemsCount(ac, atoms[i]) == 2) { xlogP -= 0.815; //System.out.println("XLOGP: 9 -0.815"); } } } if (hsCount > 2) { if (getAtomTypeXCount(ac, atoms[i]) == 0) { if (getPiSystemsCount(ac, atoms[i]) == 0) { xlogP += 0.528; //System.out.println("XLOGP: 1 0.528"); } if (getPiSystemsCount(ac, atoms[i]) == 1) { xlogP += 0.267; //System.out.println("XLOGP: 2 0.267"); } }else{ //if (getNitrogenOrOxygenCount(ac, atoms[i]) == 1) { xlogP -= 0.032; //System.out.println("XLOGP: 3 -0.032"); } } }//csp3 if (getIfCarbonIsHydrophobic(ac, atoms[i])) { xlogP += 0.211; //System.out.println("XLOGP: Hydrophobic Carbon 0.211"); } }//C if (symbol.equals("N")) { //NO2 if (ac.getBondOrderSum(atoms[i]) >= 3.0 && getOxygenCount(ac, atoms[i]) >= 2 && maxBondOrder==2) { xlogP += 1.178; //System.out.println("XLOGP: 66 1.178"); } else { if (getPresenceOfCarbonil(ac, atoms[i])==1) { // amidic nitrogen if (hsCount == 0) { if (getAtomTypeXCount(ac, atoms[i]) == 0) { xlogP += 0.078; //System.out.println("XLOGP: 57 0.078"); } if (getAtomTypeXCount(ac, atoms[i]) == 1) { xlogP -= 0.118; //System.out.println("XLOGP: 58 -0.118"); } } if (hsCount == 1) { if (getAtomTypeXCount(ac, atoms[i]) == 0) { xlogP -= 0.096; hBondDonors.add(new Integer(i)); //System.out.println("XLOGP: 55 -0.096"); } else { xlogP -= 0.044; hBondDonors.add(new Integer(i)); //System.out.println("XLOGP: 56 -0.044"); } } if (hsCount == 2) { xlogP -= 0.646; hBondDonors.add(new Integer(i)); //System.out.println("XLOGP: 54 -0.646"); } } else {//NO amidic nitrogen if (bondCount == 1) { // -C#N if (getCarbonsCount(ac, atoms[i]) == 1) { xlogP -= 0.566; //System.out.println("XLOGP: 68 -0.566"); } }else if (bondCount == 2) { // N sp2 if (atoms[i].getFlag(CDKConstants.ISAROMATIC)) { xlogP -= 0.493; //System.out.println("XLOGP: 67 -0.493"); } else { if (getDoubleBondedCarbonsCount(ac, atoms[i]) == 0) { if (getDoubleBondedNitrogenCount(ac, atoms[i]) == 0) { if (getDoubleBondedOxygenCount(ac, atoms[i]) == 1) { xlogP += 0.427; //System.out.println("XLOGP: 65 0.427"); } } if (getDoubleBondedNitrogenCount(ac, atoms[i]) == 1) { if (getAtomTypeXCount(ac, atoms[i]) == 0) { xlogP += 0.536; //System.out.println("XLOGP: 63 0.536"); } if (getAtomTypeXCount(ac, atoms[i]) == 1) { xlogP -= 0.597; //System.out.println("XLOGP: 64 -0.597"); } } }else if (getDoubleBondedCarbonsCount(ac, atoms[i]) == 1) { if (getAtomTypeXCount(ac, atoms[i]) == 0) { if (getPiSystemsCount(ac, atoms[i]) == 0) { xlogP += 0.007; //System.out.println("XLOGP: 59 0.007"); } if (getPiSystemsCount(ac, atoms[i]) == 1) { xlogP -= 0.275; //System.out.println("XLOGP: 60 -0.275"); } }else if (getAtomTypeXCount(ac, atoms[i]) == 1) { if (getPiSystemsCount(ac, atoms[i]) == 0) { xlogP += 0.366; //System.out.println("XLOGP: 61 0.366"); } if (getPiSystemsCount(ac, atoms[i]) == 1) { xlogP += 0.251; //System.out.println("XLOGP: 62 0.251"); } } } } }else if (bondCount == 3) { // N sp3 if (hsCount == 0) { if (rs.contains(atoms[i])) { if (getAtomTypeXCount(ac, atoms[i]) == 0) { xlogP += 0.881; //System.out.println("XLOGP: 51 0.881"); } else { xlogP -= 0.01; //System.out.println("XLOGP: 53 -0.01"); } } else { if (getAtomTypeXCount(ac, atoms[i]) == 0) { if (getPiSystemsCount(ac, atoms[i]) == 0) { xlogP += 0.159; //System.out.println("XLOGP: 49 0.159"); } if (getPiSystemsCount(ac, atoms[i]) > 0) { xlogP += 0.761; //System.out.println("XLOGP: 50 0.761"); } } else { xlogP -= 0.239; //System.out.println("XLOGP: 52 -0.239"); } } }else if (hsCount == 1) { if (getAtomTypeXCount(ac, atoms[i]) == 0) {// like pyrrole if (atoms[i].getFlag(CDKConstants.ISAROMATIC)) { xlogP += 0.545; hBondDonors.add(new Integer(i)); //System.out.println("XLOGP: 46 0.545"); } else { if (getPiSystemsCount(ac, atoms[i]) == 0) { xlogP -= 0.112; hBondDonors.add(new Integer(i)); //System.out.println("XLOGP: 44 -0.112"); } if (getPiSystemsCount(ac, atoms[i]) > 0) { xlogP += 0.166; hBondDonors.add(new Integer(i)); //System.out.println("XLOGP: 45 0.166"); } } } else { if (rs.contains(atoms[i])) { xlogP += 0.153; hBondDonors.add(new Integer(i)); //System.out.println("XLOGP: 48 0.153"); } else { xlogP += 0.324; hBondDonors.add(new Integer(i)); //System.out.println("XLOGP: 47 0.324"); } } }else if (hsCount == 2) { if (getAtomTypeXCount(ac, atoms[i]) == 0) { if (getPiSystemsCount(ac, atoms[i]) == 0) { xlogP -= 0.534; hBondDonors.add(new Integer(i)); //System.out.println("XLOGP: 41 -0.534"); } if (getPiSystemsCount(ac, atoms[i]) == 1) { xlogP -= 0.329; hBondDonors.add(new Integer(i)); //System.out.println("XLOGP: 42 -0.329"); } } else { xlogP -= 1.082; hBondDonors.add(new Integer(i)); //System.out.println("XLOGP: 43 -1.082"); } } } } } } if (symbol.equals("O")) { if (bondCount == 1 && maxBondOrder==2.0) { xlogP -= 0.399; hBondAcceptors.add(new Integer(i)); //System.out.println("XLOGP: 75 A=O -0.399"); }else if(bondCount == 1 && hsCount==0 && (getPresenceOfNitro(ac,atoms[i]) || getPresenceOfCarbonil(ac,atoms[i])==1)){ xlogP -= 0.399; hBondAcceptors.add(new Integer(i)); //System.out.println("XLOGP: 75 A=O -0.399"); }else if (bondCount >= 1) { if (hsCount == 0 && bondCount==2) { if (getAtomTypeXCount(ac, atoms[i]) == 0) { if (getPiSystemsCount(ac, atoms[i]) == 0) { xlogP += 0.084; //System.out.println("XLOGP: 72 R-O-R 0.084"); } if (getPiSystemsCount(ac, atoms[i]) > 0) { xlogP += 0.435; //System.out.println("XLOGP: 73 R-O-R.1 0.435"); } }else if (getAtomTypeXCount(ac, atoms[i]) == 1) { xlogP += 0.105; //System.out.println("XLOGP: 74 R-O-X 0.105"); } }else{ if (getAtomTypeXCount(ac, atoms[i]) == 0) { if (getPiSystemsCount(ac, atoms[i]) == 0) { xlogP -= 0.467; hBondDonors.add(new Integer(i)); //System.out.println("XLOGP: 69 R-OH -0.467"); } if (getPiSystemsCount(ac, atoms[i]) == 1) { xlogP += 0.082; hBondDonors.add(new Integer(i)); //System.out.println("XLOGP: 70 R-OH.1 0.082"); } }else if (getAtomTypeXCount(ac, atoms[i]) == 1) { xlogP -= 0.522; hBondDonors.add(new Integer(i)); //System.out.println("XLOGP: 71 X-OH -0.522"); } } } } if (symbol.equals("S")) { if (bondCount == 1 && maxBondOrder==2) { xlogP -= 0.148; //System.out.println("XLOGP: 78 A=S -0.148"); }else if (bondCount == 2) { if (hsCount == 0) { xlogP += 0.255; //System.out.println("XLOGP: 77 A-S-A 0.255"); } else { xlogP += 0.419; //System.out.println("XLOGP: 76 A-SH 0.419"); } }else if (bondCount == 3) { if (getAtomTypeXCount(ac, atoms[i]) == 1) { xlogP -= 1.375; //System.out.println("XLOGP: 79 A-SO-A -1.375"); } }else if (bondCount == 4) { if (getAtomTypeXCount(ac, atoms[i]) == 2) { xlogP -= 0.168; //System.out.println("XLOGP: 80 A-SO2-A -0.168"); } } } if (symbol.equals("P")) { if (getDoubleBondedSulfurCount(ac, atoms[i]) == 1 && bondCount==5) { xlogP += 1.253; //System.out.println("XLOGP: 82 S=PA3 1.253"); } if (getDoubleBondedOxygenCount(ac, atoms[i]) == 1 && bondCount==5) { xlogP -= 0.477; //System.out.println("XLOGP: 81 O=PA3 -0.477"); } } if (symbol.equals("F")) { if (getPiSystemsCount(ac, atoms[i]) == 0) { xlogP += 0.375; //System.out.println("XLOGP: 83 -F.0 0.375"); }else if (getPiSystemsCount(ac, atoms[i]) == 1) { xlogP += 0.202; //System.out.println("XLOGP: 84 -F.1 0.202"); } } if (symbol.equals("Cl")) { if (getPiSystemsCount(ac, atoms[i]) == 0) { xlogP += 0.512; //System.out.println("XLOGP: 85 -Cl.0 0.512"); }else if (getPiSystemsCount(ac, atoms[i]) == 1) { xlogP += 0.663; //System.out.println("XLOGP: 86 -Cl.1 0.663"); } } if (symbol.equals("Br")) { if (getPiSystemsCount(ac, atoms[i]) == 0) { xlogP += 0.85; //System.out.println("XLOGP: 87 -Br.0 0.85"); }else if (getPiSystemsCount(ac, atoms[i]) == 1) { xlogP += 0.839; //System.out.println("XLOGP: 88 -Br.1 0.839"); } } if (symbol.equals("I")) { if (getPiSystemsCount(ac, atoms[i]) == 0) { xlogP += 1.05; //System.out.println("XLOGP: 89 -I.0 1.05"); }else if (getPiSystemsCount(ac, atoms[i]) == 1) { xlogP += 1.109; //System.out.println("XLOGP: 90 I.1 1.109"); } } // Halogen pair 1-3 int halcount=getHalogenCount(ac, atoms[i]); if ( halcount== 2) { xlogP += 0.137; //System.out.println("XLOGP: Halogen 1-3 pair 0.137"); }else if (halcount==3){ xlogP += (3*0.137); //System.out.println("XLOGP: Halogen 1-3 pair 0.411"); }else if (halcount==4){ xlogP += (6*0.137); //System.out.println("XLOGP: Halogen 1-3 pair 1.902"); } // sp2 Oxygen 1-5 pair if (getPresenceOfCarbonil(ac, atoms[i]) == 2) {// sp2 oxygen 1-5 pair if(!rs.contains(atoms[i])) { xlogP += 0.580; //System.out.println("XLOGP: sp2 Oxygen 1-5 pair 0.580"); } } } ////System.out.println("\nxlogP before correction factors:"+xlogP); /*Descriptor acc = new HBondAcceptorCountDescriptor(); Object[] paramsAcc = {new Boolean(false)}; acc.setParameters(paramsAcc); Descriptor don = new HBondDonorCountDescriptor(); Object[] paramsDon = {new Boolean(false)}; don.setParameters(paramsDon); int acceptors = ((IntegerResult) acc.calculate(ac).getValue()).intValue(); int donors = ((IntegerResult) don.calculate(ac).getValue()).intValue(); if (donors > 0 && acceptors > 0) { //System.out.println("XLOGP: Internal HBonds 0.429"); xlogP += 0.429; // internal H-bonds }*/ AtomContainer path=null; for (int i=0; i<hBondAcceptors.size();i++){ for (int j=0; j<hBondDonors.size();j++){ if (rs.contains(atoms[((Integer)hBondAcceptors.get(i)).intValue()]) && rs.contains(atoms[((Integer)hBondDonors.get(j)).intValue()])){ resetVisitedFlags(atoms); path=new org.openscience.cdk.AtomContainer(); PathTools.depthFirstTargetSearch(ac, atoms[((Integer)hBondAcceptors.get(i)).intValue()], atoms[((Integer)hBondDonors.get(j)).intValue()],path); if (path.getAtomCount()==4){ xlogP += 0.429; //System.out.println("XLOGP: Internal HBonds 0.429"); } }else if (rs.contains(atoms[((Integer)hBondAcceptors.get(i)).intValue()]) || rs.contains(atoms[((Integer)hBondDonors.get(j)).intValue()])){ resetVisitedFlags(atoms); path=new org.openscience.cdk.AtomContainer(); PathTools.depthFirstTargetSearch(ac, atoms[((Integer)hBondAcceptors.get(i)).intValue()], atoms[((Integer)hBondDonors.get(j)).intValue()],path); if (path.getAtomCount()==5){ xlogP += 0.429; //System.out.println("XLOGP: Internal HBonds 0.429"); } } } } resetVisitedFlags(atoms); SmilesParser sp = new SmilesParser(); AtomContainer paba = sp.parseSmiles("CS(=O)(=O)c1ccc(N)cc1"); // p-amino sulphonic acid if (UniversalIsomorphismTester.isSubgraph((org.openscience.cdk.AtomContainer)ac, paba)) { xlogP -= 0.501; //System.out.println("XLOGP: p-amino sulphonic acid -0.501"); } AtomContainer aminoacid = sp.parseSmiles("NCC(=O)O"); // alpha amino acid if (UniversalIsomorphismTester.isSubgraph((org.openscience.cdk.AtomContainer)ac, aminoacid)) { xlogP -= 2.166; //System.out.println("XLOGP: alpha amino acid -2.166"); } AtomContainer salicilic = sp.parseSmiles("O=C(O)c1ccccc1O"); // salicylic acid if (ac.getAtomCount()==salicilic.getAtomCount()){ if (UniversalIsomorphismTester.isSubgraph((org.openscience.cdk.AtomContainer)ac, salicilic)) { xlogP += 0.554; //System.out.println("XLOGP: salicylic acid 0.554"); } } AtomContainer orthopair = sp.parseSmiles("OCCO"); // ortho oxygen pair if (UniversalIsomorphismTester.isSubgraph((org.openscience.cdk.AtomContainer)ac, orthopair)) { xlogP -= 0.268; //System.out.println("XLOGP: Ortho oxygen pair -0.268"); } return new DescriptorValue(getSpecification(), getParameterNames(), getParameters(), new DoubleResult(xlogP)); } | 1306 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1306/4a5972030c58ddaddae01131565720e9592189d1/XLogPDescriptor.java/clean/src/org/openscience/cdk/qsar/XLogPDescriptor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
12823,
620,
4604,
12,
3641,
2170,
1721,
13,
1216,
24570,
288,
202,
202,
10369,
694,
3597,
273,
261,
2704,
4826,
54,
899,
8441,
1435,
2934,
4720,
1595,
54,
899,
12,
1077,
1769,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
12823,
620,
4604,
12,
3641,
2170,
1721,
13,
1216,
24570,
288,
202,
202,
10369,
694,
3597,
273,
261,
2704,
4826,
54,
899,
8441,
1435,
2934,
4720,
1595,
54,
899,
12,
1077,
1769,
... |
} else if (methodName == VM_MagicNames.wordToInt || | } else if (methodName == VM_MagicNames.wordToInt || | private boolean generateInlineCode(VM_MethodReference methodToBeCalled) { VM_Atom methodName = methodToBeCalled.getName(); if (methodToBeCalled.getType() == VM_TypeReference.SysCall) { VM_TypeReference[] args = methodToBeCalled.getParameterTypes(); // (1) Set up arguments according to OS calling convention int paramWords = methodToBeCalled.getParameterWords(); int gp = FIRST_OS_PARAMETER_GPR; int fp = FIRST_OS_PARAMETER_FPR; int stackIndex = paramWords; for (int i=0; i<args.length; i++) { VM_TypeReference t = args[i]; if (t.isLongType()) { stackIndex -= 2; if (VM.BuildFor64Addr) { peekLong(gp, gp, stackIndex); gp++; } else { peekInt(gp++, stackIndex); // lo register := lo mem (== hi order word) peekInt(gp++, stackIndex+1); // hi register := hi mem (== lo order word) } } else if (t.isFloatType()) { stackIndex -= 1; peekFloat(fp++, stackIndex); } else if (t.isDoubleType()) { stackIndex -= 2; peekDouble(fp++, stackIndex); } else if (t.isIntLikeType()) { stackIndex -= 1; peekInt(gp++, stackIndex); } else { // t is object stackIndex -= 1; peekAddr(gp++, stackIndex); } } if (VM.VerifyAssertions) { VM._assert(stackIndex == 0); // Laziness. We don't support sysCalls with so // many arguments that we would have to spill some to the stack. VM._assert(gp - 1 <= LAST_OS_PARAMETER_GPR); VM._assert(fp - 1 <= LAST_OS_PARAMETER_FPR); } // (2) Call it int paramBytes = paramWords * BYTES_IN_STACKSLOT; VM_Field ip = VM_Entrypoints.getSysCallField(methodName.toString()); generateSysCall(paramBytes, ip); // (3) Pop Java expression stack discardSlots(paramWords); // (4) Push return value (if any) VM_TypeReference rtype = methodToBeCalled.getReturnType(); if (rtype.isIntLikeType()) { pushInt(T0); } else if (rtype.isWordType() || rtype.isReferenceType()) { pushAddr(T0); } else if (rtype.isDoubleType()) { pushDouble(FIRST_OS_PARAMETER_FPR); } else if (rtype.isFloatType()) { pushFloat(FIRST_OS_PARAMETER_FPR); } else if (rtype.isLongType()) { pushLong(T0, VM.BuildFor64Addr?T0:T1); } } else if (methodName == VM_MagicNames.sysCallSigWait) { int ipOffset = VM_Entrypoints.registersIPField.getOffset(); int gprsOffset = VM_Entrypoints.registersGPRsField.getOffset(); popAddr(T0); // t0 := address of VM_Registers object VM_ForwardReference fr1 = asm.emitForwardBL(); fr1.resolve(asm); asm.emitMFLR(0); asm.emitSTAddr(0, ipOffset, T0 ); // store ip into VM_Registers Object asm.emitLAddr(T0, gprsOffset, T0); // TO <- registers.gprs[] asm.emitSTAddr(FP, FP<<LOG_BYTES_IN_ADDRESS, T0); peekInt(T0, 1); peekInt(T1, 0); generateSysCall1(2 * BYTES_IN_STACKSLOT); discardSlots(3); // 2 args + ip pushInt(T0); } else if (methodName == VM_MagicNames.getFramePointer) { pushAddr(FP); } else if (methodName == VM_MagicNames.getCallerFramePointer) { popAddr(T0); // pop frame pointer of callee frame asm.emitLAddr(T1, STACKFRAME_FRAME_POINTER_OFFSET, T0); // load frame pointer of caller frame pushAddr(T1); // push frame pointer of caller frame } else if (methodName == VM_MagicNames.setCallerFramePointer) { popAddr(T1); // value popAddr(T0); // fp asm.emitSTAddr(T1, STACKFRAME_FRAME_POINTER_OFFSET, T0); // *(address+SFPO) := value } else if (methodName == VM_MagicNames.getCompiledMethodID) { popAddr(T0); // pop frame pointer of callee frame asm.emitLWZ (T1, STACKFRAME_METHOD_ID_OFFSET, T0); // load compiled method id pushInt(T1); // push method ID } else if (methodName == VM_MagicNames.setCompiledMethodID) { popInt(T1); // value popAddr(T0); // fp asm.emitSTW(T1, STACKFRAME_METHOD_ID_OFFSET, T0); // *(address+SNIO) := value } else if (methodName == VM_MagicNames.getNextInstructionAddress) { popAddr(T0); // pop frame pointer of callee frame asm.emitLAddr(T1, STACKFRAME_NEXT_INSTRUCTION_OFFSET, T0); // load frame pointer of caller frame pushAddr(T1); // push frame pointer of caller frame } else if (methodName == VM_MagicNames.setNextInstructionAddress) { popAddr(T1); // value popAddr(T0); // fp asm.emitSTAddr(T1, STACKFRAME_NEXT_INSTRUCTION_OFFSET, T0); // *(address+SNIO) := value } else if (methodName == VM_MagicNames.getReturnAddressLocation) { popAddr(T0); // pop frame pointer of callee frame asm.emitLAddr(T1, STACKFRAME_FRAME_POINTER_OFFSET, T0); // load frame pointer of caller frame asm.emitADDI (T2, STACKFRAME_NEXT_INSTRUCTION_OFFSET, T1); // get location containing ret addr pushAddr(T2); // push frame pointer of caller frame } else if (methodName == VM_MagicNames.getTocPointer || methodName == VM_MagicNames.getJTOC) { pushAddr(JTOC); } else if (methodName == VM_MagicNames.getThreadId) { pushInt(TI); // push TI } else if (methodName == VM_MagicNames.setThreadId) { popInt(TI); // TI := (shifted) thread index } else if (methodName == VM_MagicNames.getProcessorRegister) { pushAddr(PROCESSOR_REGISTER); } else if (methodName == VM_MagicNames.setProcessorRegister) { popAddr(PROCESSOR_REGISTER); } else if (methodName == VM_MagicNames.getTimeBase) { if (VM.BuildFor64Addr) { asm.emitMFTB (T1); // T1 := time base } else { int label = asm.getMachineCodeIndex(); asm.emitMFTBU(T0); // T0 := time base, upper asm.emitMFTB (T1); // T1 := time base, lower asm.emitMFTBU(T2); // T2 := time base, upper asm.emitCMP (T0, T2); // T0 == T2? asm.emitBC (NE, label); // lower rolled over, try again } pushLong(T0,T1); } else if (methodName == VM_MagicNames.invokeMain) { popAddr(T0); // t0 := ip asm.emitMTCTR(T0); peekAddr(T0,0); // t0 := parameter asm.emitBCCTRL(); // call discardSlot(); // pop parameter } else if (methodName == VM_MagicNames.invokeClassInitializer) { popAddr(T0); // t0 := address to be called asm.emitMTCTR(T0); asm.emitBCCTRL(); // call } else if (methodName == VM_MagicNames.invokeMethodReturningVoid) { generateMethodInvocation(); // call method } else if (methodName == VM_MagicNames.invokeMethodReturningInt) { generateMethodInvocation(); // call method pushInt(T0); // push result } else if (methodName == VM_MagicNames.invokeMethodReturningLong) { generateMethodInvocation(); // call method pushLong(T0, VM.BuildFor64Addr?T0:T1); // push result } else if (methodName == VM_MagicNames.invokeMethodReturningFloat) { generateMethodInvocation(); // call method pushFloat(F0); // push result } else if (methodName == VM_MagicNames.invokeMethodReturningDouble) { generateMethodInvocation(); // call method pushDouble(F0); // push result } else if (methodName == VM_MagicNames.invokeMethodReturningObject) { generateMethodInvocation(); // call method pushAddr(T0); // push result } else if (methodName == VM_MagicNames.addressArrayCreate) { VM_Array type = methodToBeCalled.getType().resolve().asArray(); emit_resolved_newarray(type); } else if (methodName == VM_MagicNames.addressArrayLength) { emit_arraylength(); } else if (methodName == VM_MagicNames.addressArrayGet) { if (VM.BuildFor32Addr || methodToBeCalled.getType() == VM_TypeReference.CodeArray) { emit_iaload(); } else { emit_laload(); } } else if (methodName == VM_MagicNames.addressArraySet) { if (VM.BuildFor32Addr || methodToBeCalled.getType() == VM_TypeReference.CodeArray) { emit_iastore(); } else { emit_lastore(); } } else if (methodName == VM_MagicNames.getIntAtOffset) { popInt(T1); // pop offset popAddr(T0); // pop object asm.emitLIntX (T0, T1, T0); // *(object+offset) pushInt(T0); // push *(object+offset) } else if (methodName == VM_MagicNames.getObjectAtOffset || methodName == VM_MagicNames.getObjectArrayAtOffset) { popInt(T1); // pop offset popAddr(T0); // pop object asm.emitLAddrX(T0, T1, T0); // *(object+offset) pushAddr(T0); // push *(object+offset) } else if (methodName == VM_MagicNames.getByteAtOffset) { popInt(T1); // pop offset popAddr(T0); // pop object asm.emitLBZX(T0, T1, T0); // load byte with zero extension. pushInt(T0); // push *(object+offset) } else if (methodName == VM_MagicNames.getCharAtOffset) { popInt(T1); // pop offset popAddr(T0); // pop object asm.emitLHZX(T0, T1, T0); // load char with zero extension. pushInt(T0); // push *(object+offset) } else if (methodName == VM_MagicNames.setIntAtOffset){ popInt(T2); // pop newvalue popInt(T1); // pop offset popAddr(T0); // pop object asm.emitSTWX(T2, T1, T0); // *(object+offset) = newvalue } else if (methodName == VM_MagicNames.setObjectAtOffset) { popAddr(T2); // pop newvalue popInt(T1); // pop offset popAddr(T0); // pop object asm.emitSTAddrX(T2, T1, T0); // *(object+offset) = newvalue } else if (methodName == VM_MagicNames.setByteAtOffset) { popInt(T2); // pop newvalue popInt(T1); // pop offset popAddr(T0); // pop object asm.emitSTBX(T2, T1, T0); // *(object+offset) = newvalue } else if (methodName == VM_MagicNames.setCharAtOffset) { popInt(T2); // pop newvalue popInt(T1); // pop offset popAddr(T0); // pop object asm.emitSTHX(T2, T1, T0); // *(object+offset) = newvalue } else if (methodName == VM_MagicNames.getLongAtOffset) { popInt(T2); // pop offset popAddr(T1); // pop object if (VM.BuildFor32Addr) { asm.emitLWZX (T0, T1, T2); // *(object+offset) asm.emitADDI(T2, BYTES_IN_INT, T2); // offset += 4 asm.emitLWZX (T1, T1, T2); // *(object+offset+4) } else { asm.emitLDX(T1, T1, T2); } pushLong(T0,T1); } else if ((methodName == VM_MagicNames.setLongAtOffset) || (methodName == VM_MagicNames.setDoubleAtOffset)) { popLong(T3, T2); popInt(T1); // pop offset popAddr(T0); // pop object if (VM.BuildFor32Addr) { asm.emitSTWX(T3, T1, T0); // *(object+offset) = newvalue low asm.emitADDI(T1, BYTES_IN_INT, T1); // offset += 4 asm.emitSTWX(T2, T1, T0); // *(object+offset) = newvalue high } else { asm.emitSTDX(T2, T1, T0); // *(object+offset) = newvalue } } else if (methodName == VM_MagicNames.getMemoryInt){ popAddr(T0); // address asm.emitLInt (T0, 0, T0); // *address pushInt(T0); // *sp := *address } else if (methodName == VM_MagicNames.getMemoryWord || methodName == VM_MagicNames.getMemoryAddress) { popAddr(T0); // address asm.emitLAddr(T0, 0, T0); // *address pushAddr(T0); // *sp := *address } else if (methodName == VM_MagicNames.setMemoryInt ){ popInt(T1); // value popAddr(T0); // address asm.emitSTW(T1, 0, T0); // *address := value } else if (methodName == VM_MagicNames.setMemoryWord || methodName == VM_MagicNames.setMemoryAddress) { popAddr(T1); // value popAddr(T0); // address asm.emitSTAddr(T1, 0, T0); // *address := value } else if (methodName == VM_MagicNames.prepareInt){ popInt(T1); // pop offset popAddr(T0); // pop object if (VM.BuildForSingleVirtualProcessor) { asm.emitLWZX (T0, T1, T0); // *(object+offset) } else { asm.emitLWARX(T0, T1, T0); // *(object+offset), setting processor's reservation address } //this Integer is not sign extended !! pushInt(T0); // push *(object+offset) } else if (methodName == VM_MagicNames.prepareObject || methodName == VM_MagicNames.prepareAddress) { popInt(T1); // pop offset popAddr(T0); // pop object if (VM.BuildForSingleVirtualProcessor) { asm.emitLAddrX(T0, T1, T0); // *(object+offset) } else { if (VM.BuildFor32Addr) { asm.emitLWARX(T0, T1, T0); // *(object+offset), setting processor's reservation address } else { asm.emitLDARX(T0, T1, T0); } } pushAddr(T0); // push *(object+offset) } else if (methodName == VM_MagicNames.attemptInt){ popInt(T2); // pop newValue discardSlot(); // ignore oldValue popInt(T1); // pop offset popAddr(T0); // pop object if (VM.BuildForSingleVirtualProcessor) { asm.emitSTWX(T2, T1, T0); // store new value (on one VP this succeeds by definition) asm.emitLVAL(T0, 1); // T0 := true pushInt(T0); // push success of conditional store } else { asm.emitSTWCXr(T2, T1, T0); // store new value and set CR0 asm.emitLVAL(T0, 0); // T0 := false VM_ForwardReference fr = asm.emitForwardBC(NE); // skip, if store failed asm.emitLVAL(T0, 1); // T0 := true fr.resolve(asm); pushInt(T0); // push success of conditional store } } else if (methodName == VM_MagicNames.attemptObject || methodName == VM_MagicNames.attemptAddress) { popAddr(T2); // pop newValue discardSlot(); // ignore oldValue popInt(T1); // pop offset popAddr(T0); // pop object if (VM.BuildForSingleVirtualProcessor) { asm.emitSTAddrX(T2, T1, T0); // store new value (on one VP this succeeds by definition) asm.emitLVAL(T0, 1); // T0 := true pushAddr(T0); // push success of conditional store } else { if (VM.BuildFor32Addr) { asm.emitSTWCXr(T2, T1, T0); // store new value and set CR0 } else { asm.emitSTDCXr(T2, T1, T0); // store new value and set CR0 } asm.emitLVAL(T0, 0); // T0 := false VM_ForwardReference fr = asm.emitForwardBC(NE); // skip, if store failed asm.emitLVAL(T0, 1); // T0 := true fr.resolve(asm); pushInt(T0); // push success of conditional store } } else if (methodName == VM_MagicNames.saveThreadState) { peekAddr(T0, 0); // T0 := address of VM_Registers object asm.emitLAddrToc(S0, VM_Entrypoints.saveThreadStateInstructionsField.getOffset()); asm.emitMTCTR(S0); asm.emitBCCTRL(); // call out of line machine code discardSlot(); // pop arg } else if (methodName == VM_MagicNames.threadSwitch) { peekAddr(T1, 0); // T1 := address of VM_Registers of new thread peekAddr(T0, 1); // T0 := address of previous VM_Thread object asm.emitLAddrToc(S0, VM_Entrypoints.threadSwitchInstructionsField.getOffset()); asm.emitMTCTR(S0); asm.emitBCCTRL(); discardSlots(2); // pop two args } else if (methodName == VM_MagicNames.restoreHardwareExceptionState) { peekAddr(T0, 0); // T0 := address of VM_Registers object asm.emitLAddrToc(S0, VM_Entrypoints.restoreHardwareExceptionStateInstructionsField.getOffset()); asm.emitMTLR(S0); asm.emitBCLR(); // branch to out of line machine code (does not return) } else if (methodName == VM_MagicNames.returnToNewStack) { peekAddr(FP, 0); // FP := new stackframe asm.emitLAddr(S0, STACKFRAME_NEXT_INSTRUCTION_OFFSET, FP); // fetch... asm.emitMTLR(S0); // ...return address asm.emitBCLR (); // return to caller } else if (methodName == VM_MagicNames.dynamicBridgeTo) { if (VM.VerifyAssertions) VM._assert(klass.isDynamicBridge()); // fetch parameter (address to branch to) into CT register // peekAddr(T0, 0); asm.emitMTCTR(T0); // restore volatile and non-volatile registers // (note that these are only saved for "dynamic bridge" methods) // int offset = frameSize; // restore non-volatile and volatile fprs for (int i = LAST_NONVOLATILE_FPR; i >= FIRST_VOLATILE_FPR; --i) asm.emitLFD(i, offset -= BYTES_IN_DOUBLE, FP); // restore non-volatile gprs for (int i = LAST_NONVOLATILE_GPR; i >= FIRST_NONVOLATILE_GPR; --i) asm.emitLAddr(i, offset -= BYTES_IN_ADDRESS, FP); // skip saved thread-id, processor, and scratch registers offset -= (FIRST_NONVOLATILE_GPR - LAST_VOLATILE_GPR - 1) * BYTES_IN_ADDRESS; // restore volatile gprs for (int i = LAST_VOLATILE_GPR; i >= FIRST_VOLATILE_GPR; --i) asm.emitLAddr(i, offset -= BYTES_IN_ADDRESS, FP); // pop stackframe asm.emitLAddr(FP, 0, FP); // restore link register asm.emitLAddr(S0, STACKFRAME_NEXT_INSTRUCTION_OFFSET, FP); asm.emitMTLR(S0); asm.emitBCCTR(); // branch always, through count register } else if (methodName == VM_MagicNames.objectAsAddress || methodName == VM_MagicNames.addressAsByteArray || methodName == VM_MagicNames.addressAsIntArray || methodName == VM_MagicNames.addressAsObject || methodName == VM_MagicNames.addressAsObjectArray || methodName == VM_MagicNames.addressAsType || methodName == VM_MagicNames.objectAsType || methodName == VM_MagicNames.objectAsByteArray || methodName == VM_MagicNames.objectAsShortArray || methodName == VM_MagicNames.objectAsIntArray || methodName == VM_MagicNames.addressAsThread || methodName == VM_MagicNames.objectAsThread || methodName == VM_MagicNames.objectAsProcessor || methodName == VM_MagicNames.threadAsCollectorThread || methodName == VM_MagicNames.addressAsRegisters || methodName == VM_MagicNames.addressAsStack || methodName == VM_MagicNames.floatAsIntBits || methodName == VM_MagicNames.intBitsAsFloat || methodName == VM_MagicNames.doubleAsLongBits || methodName == VM_MagicNames.longBitsAsDouble) { // no-op (a type change, not a representation change) } else if (methodName == VM_MagicNames.getObjectType) { popAddr(T0); // get object pointer VM_ObjectModel.baselineEmitLoadTIB(asm,T0,T0); asm.emitLAddr(T0, TIB_TYPE_INDEX << LOG_BYTES_IN_ADDRESS, T0); // get "type" field from type information block pushAddr(T0); // *sp := type } else if (methodName == VM_MagicNames.getArrayLength) { popAddr(T0); // get object pointer asm.emitLInt(T0, VM_ObjectModel.getArrayLengthOffset(), T0); // get array length field pushInt(T0); // *sp := length } else if (methodName == VM_MagicNames.sync) { asm.emitSYNC(); } else if (methodName == VM_MagicNames.isync) { asm.emitISYNC(); } else if (methodName == VM_MagicNames.dcbst) { popAddr(T0); // address asm.emitDCBST(0, T0); } else if (methodName == VM_MagicNames.icbi) { popAddr(T0); // address asm.emitICBI(0, T0); } else if (methodName == VM_MagicNames.wordToInt || methodName == VM_MagicNames.wordToAddress || methodName == VM_MagicNames.wordToOffset || methodName == VM_MagicNames.wordToExtent || methodName == VM_MagicNames.wordToWord) { // no-op } else if (methodName == VM_MagicNames.wordToLong) { asm.emitLVAL(T0,0); pushAddr(T0); } else if (methodName == VM_MagicNames.wordFromInt || methodName == VM_MagicNames.wordFromIntSignExtend) { if (VM.BuildFor64Addr) { popInt(T0); pushAddr(T0); } // else no-op } else if (methodName == VM_MagicNames.wordFromIntZeroExtend) { if (VM.BuildFor64Addr) { asm.emitLWZ(T0, spTopOffset + BYTES_IN_STACKSLOT - BYTES_IN_INT, FP); pokeAddr(T0,0); } // else no-op } else if (methodName == VM_MagicNames.wordFromLong) { discardSlot(); } else if (methodName == VM_MagicNames.wordAdd) { if (VM.BuildFor64Addr && (methodToBeCalled.getParameterTypes()[0] == VM_TypeReference.Int)){ popInt(T0); } else { popAddr(T0); } popAddr(T1); asm.emitADD (T2, T1, T0); pushAddr(T2); } else if (methodName == VM_MagicNames.wordSub || methodName == VM_MagicNames.wordDiff) { if (VM.BuildFor64Addr && (methodToBeCalled.getParameterTypes()[0] == VM_TypeReference.Int)){ popInt(T0); } else { popAddr(T0); } popAddr(T1); asm.emitSUBFC (T2, T0, T1); pushAddr(T2); } else if (methodName == VM_MagicNames.wordEQ) { generateAddrComparison(false, EQ); } else if (methodName == VM_MagicNames.wordNE) { generateAddrComparison(false, NE); } else if (methodName == VM_MagicNames.wordLT) { generateAddrComparison(false, LT); } else if (methodName == VM_MagicNames.wordLE) { generateAddrComparison(false, LE); } else if (methodName == VM_MagicNames.wordGT) { generateAddrComparison(false, GT); } else if (methodName == VM_MagicNames.wordGE) { generateAddrComparison(false, GE); } else if (methodName == VM_MagicNames.wordsLT) { generateAddrComparison(true, LT); } else if (methodName == VM_MagicNames.wordsLE) { generateAddrComparison(true, LE); } else if (methodName == VM_MagicNames.wordsGT) { generateAddrComparison(true, GT); } else if (methodName == VM_MagicNames.wordsGE) { generateAddrComparison(true, GE); } else if (methodName == VM_MagicNames.wordIsZero) { // unsigned comparison generating a boolean asm.emitLVAL(T0, 0); pushAddr(T0); generateAddrComparison(false, EQ); } else if (methodName == VM_MagicNames.wordIsMax) { // unsigned comparison generating a boolean asm.emitLVAL(T0, -1); pushAddr(T0); generateAddrComparison(false, EQ); } else if (methodName == VM_MagicNames.wordZero) { asm.emitLVAL (T0, 0); pushAddr(T0); } else if (methodName == VM_MagicNames.wordOne) { asm.emitLVAL (T0, 1); pushAddr(T0); } else if (methodName == VM_MagicNames.wordMax) { asm.emitLVAL (T0, -1); pushAddr(T0); } else if (methodName == VM_MagicNames.wordAnd) { popAddr(T0); popAddr(T1); asm.emitAND(T2, T1, T0); pushAddr(T2); } else if (methodName == VM_MagicNames.wordOr) { popAddr(T0); popAddr(T1); asm.emitOR (T2, T1, T0); pushAddr(T2); } else if (methodName == VM_MagicNames.wordNot) { popAddr(T0); asm.emitLVAL(T1, -1); asm.emitXOR(T2, T1, T0); pushAddr(T2); } else if (methodName == VM_MagicNames.wordXor) { popAddr(T0); popAddr(T1); asm.emitXOR(T2, T1, T0); pushAddr(T2); } else if (methodName == VM_MagicNames.wordLsh) { popAddr(T0); popInt(T1); if (VM.BuildFor32Addr) asm.emitSLW (T2, T1, T0); else asm.emitSLD (T2, T0, T1); pushAddr(T2); } else if (methodName == VM_MagicNames.wordRshl) { popAddr(T0); popInt(T1); if (VM.BuildFor32Addr) asm.emitSRW (T2, T1, T0); else asm.emitSRD (T2, T1, T0); pushAddr(T2); } else if (methodName == VM_MagicNames.wordRsha) { popAddr(T0); popInt(T1); if (VM.BuildFor32Addr) asm.emitSRAW (T2, T1, T0); else asm.emitSRAD (T2, T1, T0); pushAddr(T2); } else { return false; } return true; } | 49871 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49871/46484f676cdcd68e02973e737d0439677b2bbe16/VM_Compiler.java/buggy/rvm/src/vm/arch/powerPC/compilers/baseline/VM_Compiler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
1250,
225,
2103,
10870,
1085,
12,
7397,
67,
1305,
2404,
707,
15360,
8185,
13,
288,
565,
8251,
67,
3641,
4918,
273,
707,
15360,
8185,
18,
17994,
5621,
1850,
309,
261,
2039,
15360,
81... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
1250,
225,
2103,
10870,
1085,
12,
7397,
67,
1305,
2404,
707,
15360,
8185,
13,
288,
565,
8251,
67,
3641,
4918,
273,
707,
15360,
8185,
18,
17994,
5621,
1850,
309,
261,
2039,
15360,
81... |
protected boolean damagePiece ( | protected void damagePiece ( | protected boolean damagePiece ( BangObject bangobj, ArrayList<ChainDamage> damaged, Piece p, int step, IntIntMap dammap) { boolean chain = false; int damage = getBaseDamage(p); chain = (damage == STEAM_DAMAGE); damage += p.damage; damage = Math.min(damage, 100 - p.damage); dammap.increment(p.owner, damage); ChainDamage cd = new ChainDamage(p.pieceId, damage, (byte)0); if (damage == 100) { cd.deathEffect = p.willDie(bangobj, -1); if (cd.deathEffect != null) { cd.deathEffect.prepare(bangobj, dammap); } } damaged.add(cd); return chain; } | 8059 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8059/3ed8240c6ff667a85e41a6197395259d52f3ad60/LightningEffect.java/buggy/src/java/com/threerings/bang/game/data/effect/LightningEffect.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
302,
301,
410,
22607,
261,
5411,
605,
539,
921,
324,
539,
2603,
16,
2407,
32,
3893,
40,
301,
410,
34,
302,
301,
11349,
16,
2398,
453,
8414,
293,
16,
509,
2235,
16,
3094,
17... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
302,
301,
410,
22607,
261,
5411,
605,
539,
921,
324,
539,
2603,
16,
2407,
32,
3893,
40,
301,
410,
34,
302,
301,
11349,
16,
2398,
453,
8414,
293,
16,
509,
2235,
16,
3094,
17... |
source.append((char)ts.IF); int lineno = ts.getLineno(); Object cond = condition(ts, source); source.append((char)ts.LC); source.append((char)ts.EOL); Object ifTrue = statement(ts, source); | sourceAdd((char)ts.IF); int lineno = ts.getLineno(); Object cond = condition(ts); sourceAdd((char)ts.LC); sourceAdd((char)ts.EOL); Object ifTrue = statement(ts); | private Object statementHelper(TokenStream ts, Source source) throws IOException, JavaScriptException { Object pn = null; // If skipsemi == true, don't add SEMI + EOL to source at the // end of this statment. For compound statements, IF/FOR etc. boolean skipsemi = false; int tt; int lastExprType = 0; // For wellTerminated. 0 to avoid warning. tt = ts.getToken(); switch(tt) { case TokenStream.IF: { skipsemi = true; source.append((char)ts.IF); int lineno = ts.getLineno(); Object cond = condition(ts, source); source.append((char)ts.LC); source.append((char)ts.EOL); Object ifTrue = statement(ts, source); Object ifFalse = null; if (ts.matchToken(ts.ELSE)) { source.append((char)ts.RC); source.append((char)ts.ELSE); source.append((char)ts.LC); source.append((char)ts.EOL); ifFalse = statement(ts, source); } source.append((char)ts.RC); source.append((char)ts.EOL); pn = nf.createIf(cond, ifTrue, ifFalse, lineno); break; } case TokenStream.SWITCH: { skipsemi = true; source.append((char)ts.SWITCH); pn = nf.createSwitch(ts.getLineno()); Object cur_case = null; // to kill warning Object case_statements; mustMatchToken(ts, ts.LP, "msg.no.paren.switch"); source.append((char)ts.LP); nf.addChildToBack(pn, expr(ts, source, false)); mustMatchToken(ts, ts.RP, "msg.no.paren.after.switch"); source.append((char)ts.RP); mustMatchToken(ts, ts.LC, "msg.no.brace.switch"); source.append((char)ts.LC); source.append((char)ts.EOL); while ((tt = ts.getToken()) != ts.RC && tt != ts.EOF) { switch(tt) { case TokenStream.CASE: source.append((char)ts.CASE); cur_case = nf.createUnary(ts.CASE, expr(ts, source, false)); source.append((char)ts.COLON); source.append((char)ts.EOL); break; case TokenStream.DEFAULT: cur_case = nf.createLeaf(ts.DEFAULT); source.append((char)ts.DEFAULT); source.append((char)ts.COLON); source.append((char)ts.EOL); // XXX check that there isn't more than one default break; default: reportError(ts, "msg.bad.switch"); break; } mustMatchToken(ts, ts.COLON, "msg.no.colon.case"); case_statements = nf.createLeaf(TokenStream.BLOCK); while ((tt = ts.peekToken()) != ts.RC && tt != ts.CASE && tt != ts.DEFAULT && tt != ts.EOF) { nf.addChildToBack(case_statements, statement(ts, source)); } // assert cur_case nf.addChildToBack(cur_case, case_statements); nf.addChildToBack(pn, cur_case); } source.append((char)ts.RC); source.append((char)ts.EOL); break; } case TokenStream.WHILE: { skipsemi = true; source.append((char)ts.WHILE); int lineno = ts.getLineno(); Object cond = condition(ts, source); source.append((char)ts.LC); source.append((char)ts.EOL); Object body = statement(ts, source); source.append((char)ts.RC); source.append((char)ts.EOL); pn = nf.createWhile(cond, body, lineno); break; } case TokenStream.DO: { source.append((char)ts.DO); source.append((char)ts.LC); source.append((char)ts.EOL); int lineno = ts.getLineno(); Object body = statement(ts, source); source.append((char)ts.RC); mustMatchToken(ts, ts.WHILE, "msg.no.while.do"); source.append((char)ts.WHILE); Object cond = condition(ts, source); pn = nf.createDoWhile(body, cond, lineno); break; } case TokenStream.FOR: { skipsemi = true; source.append((char)ts.FOR); int lineno = ts.getLineno(); Object init; // Node init is also foo in 'foo in Object' Object cond; // Node cond is also object in 'foo in Object' Object incr = null; // to kill warning Object body; mustMatchToken(ts, ts.LP, "msg.no.paren.for"); source.append((char)ts.LP); tt = ts.peekToken(); if (tt == ts.SEMI) { init = nf.createLeaf(ts.VOID); } else { if (tt == ts.VAR) { // set init to a var list or initial ts.getToken(); // throw away the 'var' token init = variables(ts, source, true); } else { init = expr(ts, source, true); } } tt = ts.peekToken(); if (tt == ts.RELOP && ts.getOp() == ts.IN) { ts.matchToken(ts.RELOP); source.append((char)ts.IN); // 'cond' is the object over which we're iterating cond = expr(ts, source, false); } else { // ordinary for loop mustMatchToken(ts, ts.SEMI, "msg.no.semi.for"); source.append((char)ts.SEMI); if (ts.peekToken() == ts.SEMI) { // no loop condition cond = nf.createLeaf(ts.VOID); } else { cond = expr(ts, source, false); } mustMatchToken(ts, ts.SEMI, "msg.no.semi.for.cond"); source.append((char)ts.SEMI); if (ts.peekToken() == ts.RP) { incr = nf.createLeaf(ts.VOID); } else { incr = expr(ts, source, false); } } mustMatchToken(ts, ts.RP, "msg.no.paren.for.ctrl"); source.append((char)ts.RP); source.append((char)ts.LC); source.append((char)ts.EOL); body = statement(ts, source); source.append((char)ts.RC); source.append((char)ts.EOL); if (incr == null) { // cond could be null if 'in obj' got eaten by the init node. pn = nf.createForIn(init, cond, body, lineno); } else { pn = nf.createFor(init, cond, incr, body, lineno); } break; } case TokenStream.TRY: { int lineno = ts.getLineno(); Object tryblock; Object catchblocks = null; Object finallyblock = null; skipsemi = true; source.append((char)ts.TRY); source.append((char)ts.LC); source.append((char)ts.EOL); tryblock = statement(ts, source); source.append((char)ts.RC); source.append((char)ts.EOL); catchblocks = nf.createLeaf(TokenStream.BLOCK); boolean sawDefaultCatch = false; int peek = ts.peekToken(); if (peek == ts.CATCH) { while (ts.matchToken(ts.CATCH)) { if (sawDefaultCatch) { reportError(ts, "msg.catch.unreachable"); } source.append((char)ts.CATCH); mustMatchToken(ts, ts.LP, "msg.no.paren.catch"); source.append((char)ts.LP); mustMatchToken(ts, ts.NAME, "msg.bad.catchcond"); String varName = ts.getString(); source.addString(ts.NAME, varName); Object catchCond = null; if (ts.matchToken(ts.IF)) { source.append((char)ts.IF); catchCond = expr(ts, source, false); } else { sawDefaultCatch = true; } mustMatchToken(ts, ts.RP, "msg.bad.catchcond"); source.append((char)ts.RP); mustMatchToken(ts, ts.LC, "msg.no.brace.catchblock"); source.append((char)ts.LC); source.append((char)ts.EOL); nf.addChildToBack(catchblocks, nf.createCatch(varName, catchCond, statements(ts, source), ts.getLineno())); mustMatchToken(ts, ts.RC, "msg.no.brace.after.body"); source.append((char)ts.RC); source.append((char)ts.EOL); } } else if (peek != ts.FINALLY) { mustMatchToken(ts, ts.FINALLY, "msg.try.no.catchfinally"); } if (ts.matchToken(ts.FINALLY)) { source.append((char)ts.FINALLY); source.append((char)ts.LC); source.append((char)ts.EOL); finallyblock = statement(ts, source); source.append((char)ts.RC); source.append((char)ts.EOL); } pn = nf.createTryCatchFinally(tryblock, catchblocks, finallyblock, lineno); break; } case TokenStream.THROW: { int lineno = ts.getLineno(); source.append((char)ts.THROW); pn = nf.createThrow(expr(ts, source, false), lineno); if (lineno == ts.getLineno()) wellTerminated(ts, ts.ERROR); break; } case TokenStream.BREAK: { int lineno = ts.getLineno(); source.append((char)ts.BREAK); // matchLabel only matches if there is one String label = matchLabel(ts); if (label != null) { source.addString(ts.NAME, label); } pn = nf.createBreak(label, lineno); break; } case TokenStream.CONTINUE: { int lineno = ts.getLineno(); source.append((char)ts.CONTINUE); // matchLabel only matches if there is one String label = matchLabel(ts); if (label != null) { source.addString(ts.NAME, label); } pn = nf.createContinue(label, lineno); break; } case TokenStream.WITH: { skipsemi = true; source.append((char)ts.WITH); int lineno = ts.getLineno(); mustMatchToken(ts, ts.LP, "msg.no.paren.with"); source.append((char)ts.LP); Object obj = expr(ts, source, false); mustMatchToken(ts, ts.RP, "msg.no.paren.after.with"); source.append((char)ts.RP); source.append((char)ts.LC); source.append((char)ts.EOL); Object body = statement(ts, source); source.append((char)ts.RC); source.append((char)ts.EOL); pn = nf.createWith(obj, body, lineno); break; } case TokenStream.VAR: { int lineno = ts.getLineno(); pn = variables(ts, source, false); if (ts.getLineno() == lineno) wellTerminated(ts, ts.ERROR); break; } case TokenStream.RETURN: { Object retExpr = null; int lineno = 0; source.append((char)ts.RETURN); // bail if we're not in a (toplevel) function if ((ts.flags & ts.TSF_FUNCTION) == 0) reportError(ts, "msg.bad.return"); /* This is ugly, but we don't want to require a semicolon. */ ts.flags |= ts.TSF_REGEXP; tt = ts.peekTokenSameLine(); ts.flags &= ~ts.TSF_REGEXP; if (tt != ts.EOF && tt != ts.EOL && tt != ts.SEMI && tt != ts.RC) { lineno = ts.getLineno(); retExpr = expr(ts, source, false); if (ts.getLineno() == lineno) wellTerminated(ts, ts.ERROR); ts.flags |= ts.TSF_RETURN_EXPR; } else { ts.flags |= ts.TSF_RETURN_VOID; } // XXX ASSERT pn pn = nf.createReturn(retExpr, lineno); break; } case TokenStream.LC: skipsemi = true; pn = statements(ts, source); mustMatchToken(ts, ts.RC, "msg.no.brace.block"); break; case TokenStream.ERROR: // Fall thru, to have a node for error recovery to work on case TokenStream.EOL: case TokenStream.SEMI: pn = nf.createLeaf(ts.VOID); skipsemi = true; break; default: { lastExprType = tt; int tokenno = ts.getTokenno(); ts.ungetToken(tt); int lineno = ts.getLineno(); pn = expr(ts, source, false); if (ts.peekToken() == ts.COLON) { /* check that the last thing the tokenizer returned was a * NAME and that only one token was consumed. */ if (lastExprType != ts.NAME || (ts.getTokenno() != tokenno)) reportError(ts, "msg.bad.label"); ts.getToken(); // eat the COLON /* in the C source, the label is associated with the * statement that follows: * nf.addChildToBack(pn, statement(ts)); */ String name = ts.getString(); pn = nf.createLabel(name, lineno); // depend on decompiling lookahead to guess that that // last name was a label. source.append((char)ts.COLON); source.append((char)ts.EOL); return pn; } if (lastExprType == ts.FUNCTION) nf.setFunctionExpressionStatement(pn); pn = nf.createExprStatement(pn, lineno); /* * Check explicitly against (multi-line) function * statement. * lastExprEndLine is a hack to fix an * automatic semicolon insertion problem with function * expressions; the ts.getLineno() == lineno check was * firing after a function definition even though the * next statement was on a new line, because * speculative getToken calls advanced the line number * even when they didn't succeed. */ if (ts.getLineno() == lineno || (lastExprType == ts.FUNCTION && ts.getLineno() == lastExprEndLine)) { wellTerminated(ts, lastExprType); } break; } } ts.matchToken(ts.SEMI); if (!skipsemi) { source.append((char)ts.SEMI); source.append((char)ts.EOL); } return pn; } | 19000 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/19000/92ccdd736e7a1516e4fb6d1eaf915e7021c8dc95/Parser.java/clean/src/org/mozilla/javascript/Parser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1033,
3021,
2276,
12,
1345,
1228,
3742,
16,
4998,
1084,
13,
3639,
1216,
1860,
16,
11905,
503,
565,
288,
3639,
1033,
11059,
273,
446,
31,
3639,
368,
971,
2488,
307,
9197,
422,
638,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1033,
3021,
2276,
12,
1345,
1228,
3742,
16,
4998,
1084,
13,
3639,
1216,
1860,
16,
11905,
503,
565,
288,
3639,
1033,
11059,
273,
446,
31,
3639,
368,
971,
2488,
307,
9197,
422,
638,
... |
System.err.println("inline makeProc count:"+countMethods+" name:"+name); | public Expression inline (ApplyExp exp) { Expression[] args = exp.getArgs(); int alen = args.length; Expression method = null; int countMethods = 0; String name = null; for (int i = 0; i < alen; i++) { Expression arg = args[i]; Object key; if (arg instanceof QuoteExp && (key = ((QuoteExp) arg).getValue()) instanceof Keyword) { String keyword = ((Keyword) key).getName(); Expression next = args[++i]; if (keyword == "name") { if (next instanceof QuoteExp) name = ((QuoteExp) next).getValue().toString(); } else if (keyword == "method") { countMethods++; method = next; } else ; // result.setProperty(keyword, value); } else { countMethods++; method = arg; } } if (countMethods == 1 && method instanceof LambdaExp) { LambdaExp proc = (LambdaExp) method; System.err.println("inline makeProc count:"+countMethods+" name:"+name); for (int i = 0; i < alen; i++) { Expression arg = args[i]; Object key; if (arg instanceof QuoteExp && (key = ((QuoteExp) arg).getValue()) instanceof Keyword) { String keyword = ((Keyword) key).getName(); Expression next = args[++i]; if (keyword == "name") proc.setName(name); else if (keyword == "method") ; else proc.setProperty(keyword, next); } } return method; } return exp; } | 41089 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/41089/5507875b45227819138b4ec1c87f7782327df940/MakeProcedure.java/buggy/gnu/kawa/functions/MakeProcedure.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
5371,
6370,
261,
7001,
2966,
1329,
13,
225,
288,
565,
5371,
8526,
833,
273,
1329,
18,
588,
2615,
5621,
565,
509,
524,
275,
273,
833,
18,
2469,
31,
565,
5371,
707,
273,
446,
31,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
5371,
6370,
261,
7001,
2966,
1329,
13,
225,
288,
565,
5371,
8526,
833,
273,
1329,
18,
588,
2615,
5621,
565,
509,
524,
275,
273,
833,
18,
2469,
31,
565,
5371,
707,
273,
446,
31,
... | |
mod.type = "delete"; | protected Modification handleEntry(List historyEntry) { Modification mod = new Modification(); String nameAndDateLine = (String) historyEntry.get(2); mod.userName = parseUser(nameAndDateLine); mod.modifiedTime = parseDate(nameAndDateLine); String folderLine = (String) historyEntry.get(0); String fileLine = (String) historyEntry.get(3); if (!isInSsDir(folderLine)) { // We are only interested in modifications to files in the specified ssdir return null; } else if (isBeforeLastBuild(mod.modifiedTime)) { // We are only interested in modifications since the last build return null; } else if (fileLine.startsWith("Labeled")) { // We don't add labels. return null; } else if (fileLine.startsWith("Checked in")) { mod.type = "checkin"; mod.comment = parseComment(historyEntry); mod.fileName = substringFromLastSlash(folderLine); mod.folderName = substringToLastSlash(folderLine); } else if (fileLine.indexOf(" renamed to ") > -1) { // TODO: This is a special case that is really two modifications: deleted and recovered. // For now I'll consider it a deleted to force a clean build. // I should really make this two modifications. mod.type = "delete"; mod.comment = parseComment(historyEntry); mod.fileName = fileLine.substring(0, fileLine.indexOf(" ")); mod.folderName = folderLine; } else if (fileLine.indexOf(" moved to ") > -1) { // TODO: This is a special case that is really two modifications: deleted and recovered. // For now I'll consider it a deleted to force a clean build. // I should really make this two modifications. mod.type = "delete"; mod.comment = parseComment(historyEntry); mod.fileName = fileLine.substring(0, fileLine.indexOf(" ")); mod.folderName = folderLine; } else { mod.folderName = folderLine; mod.fileName = fileLine.substring(0, fileLine.lastIndexOf(" ")); mod.comment = parseComment(historyEntry); if (fileLine.endsWith("added")) { mod.type = "add"; } else if (fileLine.endsWith("deleted")) { mod.type = "delete"; } else if (fileLine.endsWith("recovered")) { mod.type = "recover"; } else if (fileLine.endsWith("shared")) { mod.type = "branch"; } } if (propertyOnDelete != null && "delete".equals(mod.type)) { properties.put(propertyOnDelete, "true"); } if (property != null) { properties.put(property, "true"); } return mod; } | 52149 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52149/6c388b514a0547682989734ceba9679338747a3a/VssJournal.java/buggy/main/src/net/sourceforge/cruisecontrol/sourcecontrols/VssJournal.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
3431,
1480,
1640,
1622,
12,
682,
4927,
1622,
13,
288,
3639,
3431,
1480,
681,
273,
394,
3431,
1480,
5621,
3639,
514,
508,
1876,
1626,
1670,
273,
261,
780,
13,
4927,
1622,
18,
588,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
3431,
1480,
1640,
1622,
12,
682,
4927,
1622,
13,
288,
3639,
3431,
1480,
681,
273,
394,
3431,
1480,
5621,
3639,
514,
508,
1876,
1626,
1670,
273,
261,
780,
13,
4927,
1622,
18,
588,
... | |
AST tmp1821_AST_in = (AST)_t; | AST tmp1824_AST_in = (AST)_t; | 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 __t310 = _t; AST tmp1735_AST_in = (AST)_t; match(_t,AACBIT); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t310; _t = _t.getNextSibling(); break; } case AAMSG: { AST __t311 = _t; AST tmp1736_AST_in = (AST)_t; match(_t,AAMSG); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t311; _t = _t.getNextSibling(); break; } case ABSOLUTE: { AST __t312 = _t; AST tmp1737_AST_in = (AST)_t; match(_t,ABSOLUTE); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t312; _t = _t.getNextSibling(); break; } case ALIAS: { AST __t313 = _t; AST tmp1738_AST_in = (AST)_t; match(_t,ALIAS); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t313; _t = _t.getNextSibling(); break; } case ASC: { AST __t314 = _t; AST tmp1739_AST_in = (AST)_t; match(_t,ASC); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t314; _t = _t.getNextSibling(); break; } case BASE64DECODE: { AST __t315 = _t; AST tmp1740_AST_in = (AST)_t; match(_t,BASE64DECODE); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t315; _t = _t.getNextSibling(); break; } case BASE64ENCODE: { AST __t316 = _t; AST tmp1741_AST_in = (AST)_t; match(_t,BASE64ENCODE); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t316; _t = _t.getNextSibling(); break; } case CANDO: { AST __t317 = _t; AST tmp1742_AST_in = (AST)_t; match(_t,CANDO); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t317; _t = _t.getNextSibling(); break; } case CANQUERY: { AST __t318 = _t; AST tmp1743_AST_in = (AST)_t; match(_t,CANQUERY); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t318; _t = _t.getNextSibling(); break; } case CANSET: { AST __t319 = _t; AST tmp1744_AST_in = (AST)_t; match(_t,CANSET); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t319; _t = _t.getNextSibling(); break; } case CAPS: { AST __t320 = _t; AST tmp1745_AST_in = (AST)_t; match(_t,CAPS); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t320; _t = _t.getNextSibling(); break; } case CHR: { AST __t321 = _t; AST tmp1746_AST_in = (AST)_t; match(_t,CHR); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t321; _t = _t.getNextSibling(); break; } case CODEPAGECONVERT: { AST __t322 = _t; AST tmp1747_AST_in = (AST)_t; match(_t,CODEPAGECONVERT); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t322; _t = _t.getNextSibling(); break; } case COLLATE: { AST __t323 = _t; AST tmp1748_AST_in = (AST)_t; match(_t,COLLATE); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t323; _t = _t.getNextSibling(); break; } case COMPARE: { AST __t324 = _t; AST tmp1749_AST_in = (AST)_t; match(_t,COMPARE); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t324; _t = _t.getNextSibling(); break; } case CONNECTED: { AST __t325 = _t; AST tmp1750_AST_in = (AST)_t; match(_t,CONNECTED); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t325; _t = _t.getNextSibling(); break; } case COUNTOF: { AST __t326 = _t; AST tmp1751_AST_in = (AST)_t; match(_t,COUNTOF); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t326; _t = _t.getNextSibling(); break; } case CURRENTRESULTROW: { AST __t327 = _t; AST tmp1752_AST_in = (AST)_t; match(_t,CURRENTRESULTROW); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t327; _t = _t.getNextSibling(); break; } case DATE: { AST __t328 = _t; AST tmp1753_AST_in = (AST)_t; match(_t,DATE); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t328; _t = _t.getNextSibling(); break; } case DATETIME: { AST __t329 = _t; AST tmp1754_AST_in = (AST)_t; match(_t,DATETIME); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t329; _t = _t.getNextSibling(); break; } case DATETIMETZ: { AST __t330 = _t; AST tmp1755_AST_in = (AST)_t; match(_t,DATETIMETZ); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t330; _t = _t.getNextSibling(); break; } case DAY: { AST __t331 = _t; AST tmp1756_AST_in = (AST)_t; match(_t,DAY); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t331; _t = _t.getNextSibling(); break; } case DBCODEPAGE: { AST __t332 = _t; AST tmp1757_AST_in = (AST)_t; match(_t,DBCODEPAGE); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t332; _t = _t.getNextSibling(); break; } case DBCOLLATION: { AST __t333 = _t; AST tmp1758_AST_in = (AST)_t; match(_t,DBCOLLATION); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t333; _t = _t.getNextSibling(); break; } case DBPARAM: { AST __t334 = _t; AST tmp1759_AST_in = (AST)_t; match(_t,DBPARAM); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t334; _t = _t.getNextSibling(); break; } case DBRESTRICTIONS: { AST __t335 = _t; AST tmp1760_AST_in = (AST)_t; match(_t,DBRESTRICTIONS); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t335; _t = _t.getNextSibling(); break; } case DBTASKID: { AST __t336 = _t; AST tmp1761_AST_in = (AST)_t; match(_t,DBTASKID); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t336; _t = _t.getNextSibling(); break; } case DBTYPE: { AST __t337 = _t; AST tmp1762_AST_in = (AST)_t; match(_t,DBTYPE); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t337; _t = _t.getNextSibling(); break; } case DBVERSION: { AST __t338 = _t; AST tmp1763_AST_in = (AST)_t; match(_t,DBVERSION); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t338; _t = _t.getNextSibling(); break; } case DECIMAL: { AST __t339 = _t; AST tmp1764_AST_in = (AST)_t; match(_t,DECIMAL); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t339; _t = _t.getNextSibling(); break; } case DECRYPT: { AST __t340 = _t; AST tmp1765_AST_in = (AST)_t; match(_t,DECRYPT); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t340; _t = _t.getNextSibling(); break; } case DYNAMICNEXTVALUE: { AST __t341 = _t; AST tmp1766_AST_in = (AST)_t; match(_t,DYNAMICNEXTVALUE); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t341; _t = _t.getNextSibling(); break; } case ENCODE: { AST __t342 = _t; AST tmp1767_AST_in = (AST)_t; match(_t,ENCODE); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t342; _t = _t.getNextSibling(); break; } case ENCRYPT: { AST __t343 = _t; AST tmp1768_AST_in = (AST)_t; match(_t,ENCRYPT); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t343; _t = _t.getNextSibling(); break; } case EXP: { AST __t344 = _t; AST tmp1769_AST_in = (AST)_t; match(_t,EXP); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t344; _t = _t.getNextSibling(); break; } case FILL: { AST __t345 = _t; AST tmp1770_AST_in = (AST)_t; match(_t,FILL); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t345; _t = _t.getNextSibling(); break; } case FIRST: { AST __t346 = _t; AST tmp1771_AST_in = (AST)_t; match(_t,FIRST); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t346; _t = _t.getNextSibling(); break; } case FIRSTOF: { AST __t347 = _t; AST tmp1772_AST_in = (AST)_t; match(_t,FIRSTOF); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t347; _t = _t.getNextSibling(); break; } case GENERATEPBEKEY: { AST __t348 = _t; AST tmp1773_AST_in = (AST)_t; match(_t,GENERATEPBEKEY); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t348; _t = _t.getNextSibling(); break; } case GETBITS: { AST __t349 = _t; AST tmp1774_AST_in = (AST)_t; match(_t,GETBITS); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t349; _t = _t.getNextSibling(); break; } case GETBYTE: { AST __t350 = _t; AST tmp1775_AST_in = (AST)_t; match(_t,GETBYTE); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t350; _t = _t.getNextSibling(); break; } case GETBYTEORDER: { AST __t351 = _t; AST tmp1776_AST_in = (AST)_t; match(_t,GETBYTEORDER); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t351; _t = _t.getNextSibling(); break; } case GETBYTES: { AST __t352 = _t; AST tmp1777_AST_in = (AST)_t; match(_t,GETBYTES); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t352; _t = _t.getNextSibling(); break; } case GETCOLLATIONS: { AST __t353 = _t; AST tmp1778_AST_in = (AST)_t; match(_t,GETCOLLATIONS); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t353; _t = _t.getNextSibling(); break; } case GETDOUBLE: { AST __t354 = _t; AST tmp1779_AST_in = (AST)_t; match(_t,GETDOUBLE); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t354; _t = _t.getNextSibling(); break; } case GETFLOAT: { AST __t355 = _t; AST tmp1780_AST_in = (AST)_t; match(_t,GETFLOAT); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t355; _t = _t.getNextSibling(); break; } case GETLICENSE: { AST __t356 = _t; AST tmp1781_AST_in = (AST)_t; match(_t,GETLICENSE); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t356; _t = _t.getNextSibling(); break; } case GETLONG: { AST __t357 = _t; AST tmp1782_AST_in = (AST)_t; match(_t,GETLONG); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t357; _t = _t.getNextSibling(); break; } case GETPOINTERVALUE: { AST __t358 = _t; AST tmp1783_AST_in = (AST)_t; match(_t,GETPOINTERVALUE); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t358; _t = _t.getNextSibling(); break; } case GETSHORT: { AST __t359 = _t; AST tmp1784_AST_in = (AST)_t; match(_t,GETSHORT); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t359; _t = _t.getNextSibling(); break; } case GETSIZE: { AST __t360 = _t; AST tmp1785_AST_in = (AST)_t; match(_t,GETSIZE); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t360; _t = _t.getNextSibling(); break; } case GETSTRING: { AST __t361 = _t; AST tmp1786_AST_in = (AST)_t; match(_t,GETSTRING); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t361; _t = _t.getNextSibling(); break; } case GETUNSIGNEDSHORT: { AST __t362 = _t; AST tmp1787_AST_in = (AST)_t; match(_t,GETUNSIGNEDSHORT); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t362; _t = _t.getNextSibling(); break; } case HEXDECODE: { AST __t363 = _t; AST tmp1788_AST_in = (AST)_t; match(_t,HEXDECODE); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t363; _t = _t.getNextSibling(); break; } case HEXENCODE: { AST __t364 = _t; AST tmp1789_AST_in = (AST)_t; match(_t,HEXENCODE); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t364; _t = _t.getNextSibling(); break; } case INDEX: { AST __t365 = _t; AST tmp1790_AST_in = (AST)_t; match(_t,INDEX); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t365; _t = _t.getNextSibling(); break; } case INTEGER: { AST __t366 = _t; AST tmp1791_AST_in = (AST)_t; match(_t,INTEGER); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t366; _t = _t.getNextSibling(); break; } case INTERVAL: { AST __t367 = _t; AST tmp1792_AST_in = (AST)_t; match(_t,INTERVAL); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t367; _t = _t.getNextSibling(); break; } case ISCODEPAGEFIXED: { AST __t368 = _t; AST tmp1793_AST_in = (AST)_t; match(_t,ISCODEPAGEFIXED); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t368; _t = _t.getNextSibling(); break; } case ISCOLUMNCODEPAGE: { AST __t369 = _t; AST tmp1794_AST_in = (AST)_t; match(_t,ISCOLUMNCODEPAGE); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t369; _t = _t.getNextSibling(); break; } case ISLEADBYTE: { AST __t370 = _t; AST tmp1795_AST_in = (AST)_t; match(_t,ISLEADBYTE); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t370; _t = _t.getNextSibling(); break; } case ISODATE: { AST __t371 = _t; AST tmp1796_AST_in = (AST)_t; match(_t,ISODATE); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t371; _t = _t.getNextSibling(); break; } case KBLABEL: { AST __t372 = _t; AST tmp1797_AST_in = (AST)_t; match(_t,KBLABEL); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t372; _t = _t.getNextSibling(); break; } case KEYCODE: { AST __t373 = _t; AST tmp1798_AST_in = (AST)_t; match(_t,KEYCODE); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t373; _t = _t.getNextSibling(); break; } case KEYFUNCTION: { AST __t374 = _t; AST tmp1799_AST_in = (AST)_t; match(_t,KEYFUNCTION); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t374; _t = _t.getNextSibling(); break; } case KEYLABEL: { AST __t375 = _t; AST tmp1800_AST_in = (AST)_t; match(_t,KEYLABEL); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t375; _t = _t.getNextSibling(); break; } case KEYWORD: { AST __t376 = _t; AST tmp1801_AST_in = (AST)_t; match(_t,KEYWORD); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t376; _t = _t.getNextSibling(); break; } case KEYWORDALL: { AST __t377 = _t; AST tmp1802_AST_in = (AST)_t; match(_t,KEYWORDALL); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t377; _t = _t.getNextSibling(); break; } case LAST: { AST __t378 = _t; AST tmp1803_AST_in = (AST)_t; match(_t,LAST); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t378; _t = _t.getNextSibling(); break; } case LASTOF: { AST __t379 = _t; AST tmp1804_AST_in = (AST)_t; match(_t,LASTOF); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t379; _t = _t.getNextSibling(); break; } case LC: { AST __t380 = _t; AST tmp1805_AST_in = (AST)_t; match(_t,LC); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t380; _t = _t.getNextSibling(); break; } case LEFTTRIM: { AST __t381 = _t; AST tmp1806_AST_in = (AST)_t; match(_t,LEFTTRIM); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t381; _t = _t.getNextSibling(); break; } case LIBRARY: { AST __t382 = _t; AST tmp1807_AST_in = (AST)_t; match(_t,LIBRARY); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t382; _t = _t.getNextSibling(); break; } case LISTEVENTS: { AST __t383 = _t; AST tmp1808_AST_in = (AST)_t; match(_t,LISTEVENTS); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t383; _t = _t.getNextSibling(); break; } case LISTQUERYATTRS: { AST __t384 = _t; AST tmp1809_AST_in = (AST)_t; match(_t,LISTQUERYATTRS); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t384; _t = _t.getNextSibling(); break; } case LISTSETATTRS: { AST __t385 = _t; AST tmp1810_AST_in = (AST)_t; match(_t,LISTSETATTRS); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t385; _t = _t.getNextSibling(); break; } case LISTWIDGETS: { AST __t386 = _t; AST tmp1811_AST_in = (AST)_t; match(_t,LISTWIDGETS); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t386; _t = _t.getNextSibling(); break; } case LOADPICTURE: { AST __t387 = _t; AST tmp1812_AST_in = (AST)_t; match(_t,LOADPICTURE); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t387; _t = _t.getNextSibling(); break; } case LOG: { AST __t388 = _t; AST tmp1813_AST_in = (AST)_t; match(_t,LOG); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t388; _t = _t.getNextSibling(); break; } case LOGICAL: { AST __t389 = _t; AST tmp1814_AST_in = (AST)_t; match(_t,LOGICAL); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t389; _t = _t.getNextSibling(); break; } case LOOKUP: { AST __t390 = _t; AST tmp1815_AST_in = (AST)_t; match(_t,LOOKUP); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t390; _t = _t.getNextSibling(); break; } case MAXIMUM: { AST __t391 = _t; AST tmp1816_AST_in = (AST)_t; match(_t,MAXIMUM); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t391; _t = _t.getNextSibling(); break; } case MD5DIGEST: { AST __t392 = _t; AST tmp1817_AST_in = (AST)_t; match(_t,MD5DIGEST); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t392; _t = _t.getNextSibling(); break; } case MEMBER: { AST __t393 = _t; AST tmp1818_AST_in = (AST)_t; match(_t,MEMBER); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t393; _t = _t.getNextSibling(); break; } case MINIMUM: { AST __t394 = _t; AST tmp1819_AST_in = (AST)_t; match(_t,MINIMUM); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t394; _t = _t.getNextSibling(); break; } case MONTH: { AST __t395 = _t; AST tmp1820_AST_in = (AST)_t; match(_t,MONTH); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t395; _t = _t.getNextSibling(); break; } case NORMALIZE: { AST __t396 = _t; AST tmp1821_AST_in = (AST)_t; match(_t,NORMALIZE); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t396; _t = _t.getNextSibling(); break; } case NUMENTRIES: { AST __t397 = _t; AST tmp1822_AST_in = (AST)_t; match(_t,NUMENTRIES); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t397; _t = _t.getNextSibling(); break; } case NUMRESULTS: { AST __t398 = _t; AST tmp1823_AST_in = (AST)_t; match(_t,NUMRESULTS); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t398; _t = _t.getNextSibling(); break; } case OSGETENV: { AST __t399 = _t; AST tmp1824_AST_in = (AST)_t; match(_t,OSGETENV); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t399; _t = _t.getNextSibling(); break; } case PDBNAME: { AST __t400 = _t; AST tmp1825_AST_in = (AST)_t; match(_t,PDBNAME); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t400; _t = _t.getNextSibling(); break; } case PROGRAMNAME: { AST __t401 = _t; AST tmp1826_AST_in = (AST)_t; match(_t,PROGRAMNAME); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t401; _t = _t.getNextSibling(); break; } case QUERYOFFEND: { AST __t402 = _t; AST tmp1827_AST_in = (AST)_t; match(_t,QUERYOFFEND); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t402; _t = _t.getNextSibling(); break; } case QUOTER: { AST __t403 = _t; AST tmp1828_AST_in = (AST)_t; match(_t,QUOTER); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t403; _t = _t.getNextSibling(); break; } case RINDEX: { AST __t404 = _t; AST tmp1829_AST_in = (AST)_t; match(_t,RINDEX); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t404; _t = _t.getNextSibling(); break; } case RANDOM: { AST __t405 = _t; AST tmp1830_AST_in = (AST)_t; match(_t,RANDOM); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t405; _t = _t.getNextSibling(); break; } case REPLACE: { AST __t406 = _t; AST tmp1831_AST_in = (AST)_t; match(_t,REPLACE); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t406; _t = _t.getNextSibling(); break; } case RGBVALUE: { AST __t407 = _t; AST tmp1832_AST_in = (AST)_t; match(_t,RGBVALUE); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t407; _t = _t.getNextSibling(); break; } case RIGHTTRIM: { AST __t408 = _t; AST tmp1833_AST_in = (AST)_t; match(_t,RIGHTTRIM); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t408; _t = _t.getNextSibling(); break; } case ROUND: { AST __t409 = _t; AST tmp1834_AST_in = (AST)_t; match(_t,ROUND); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t409; _t = _t.getNextSibling(); break; } case SDBNAME: { AST __t410 = _t; AST tmp1835_AST_in = (AST)_t; match(_t,SDBNAME); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t410; _t = _t.getNextSibling(); break; } case SEARCH: { AST __t411 = _t; AST tmp1836_AST_in = (AST)_t; match(_t,SEARCH); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t411; _t = _t.getNextSibling(); break; } case SETDBCLIENT: { AST __t412 = _t; AST tmp1837_AST_in = (AST)_t; match(_t,SETDBCLIENT); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t412; _t = _t.getNextSibling(); break; } case SETUSERID: { AST __t413 = _t; AST tmp1838_AST_in = (AST)_t; match(_t,SETUSERID); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t413; _t = _t.getNextSibling(); break; } case SHA1DIGEST: { AST __t414 = _t; AST tmp1839_AST_in = (AST)_t; match(_t,SHA1DIGEST); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t414; _t = _t.getNextSibling(); break; } case SQRT: { AST __t415 = _t; AST tmp1840_AST_in = (AST)_t; match(_t,SQRT); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t415; _t = _t.getNextSibling(); break; } case SSLSERVERNAME: { AST __t416 = _t; AST tmp1841_AST_in = (AST)_t; match(_t,SSLSERVERNAME); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t416; _t = _t.getNextSibling(); break; } case STRING: { AST __t417 = _t; AST tmp1842_AST_in = (AST)_t; match(_t,STRING); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t417; _t = _t.getNextSibling(); break; } case SUBSTITUTE: { AST __t418 = _t; AST tmp1843_AST_in = (AST)_t; match(_t,SUBSTITUTE); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t418; _t = _t.getNextSibling(); break; } case TOROWID: { AST __t419 = _t; AST tmp1844_AST_in = (AST)_t; match(_t,TOROWID); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t419; _t = _t.getNextSibling(); break; } case TRIM: { AST __t420 = _t; AST tmp1845_AST_in = (AST)_t; match(_t,TRIM); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t420; _t = _t.getNextSibling(); break; } case TRUNCATE: { AST __t421 = _t; AST tmp1846_AST_in = (AST)_t; match(_t,TRUNCATE); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t421; _t = _t.getNextSibling(); break; } case TYPEOF: { AST __t422 = _t; AST tmp1847_AST_in = (AST)_t; match(_t,TYPEOF); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t422; _t = _t.getNextSibling(); break; } case VALIDEVENT: { AST __t423 = _t; AST tmp1848_AST_in = (AST)_t; match(_t,VALIDEVENT); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t423; _t = _t.getNextSibling(); break; } case VALIDHANDLE: { AST __t424 = _t; AST tmp1849_AST_in = (AST)_t; match(_t,VALIDHANDLE); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t424; _t = _t.getNextSibling(); break; } case VALIDOBJECT: { AST __t425 = _t; AST tmp1850_AST_in = (AST)_t; match(_t,VALIDOBJECT); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t425; _t = _t.getNextSibling(); break; } case WEEKDAY: { AST __t426 = _t; AST tmp1851_AST_in = (AST)_t; match(_t,WEEKDAY); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t426; _t = _t.getNextSibling(); break; } case WIDGETHANDLE: { AST __t427 = _t; AST tmp1852_AST_in = (AST)_t; match(_t,WIDGETHANDLE); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t427; _t = _t.getNextSibling(); break; } case YEAR: { AST __t428 = _t; AST tmp1853_AST_in = (AST)_t; match(_t,YEAR); _t = _t.getFirstChild(); funargs(_t); _t = _retTree; _t = __t428; _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/TreeParser03.java/clean/trunk/org.prorefactor.core/src/org/prorefactor/treeparser03/TreeParser03.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,
... |
removeCms(); | public void delete() { if (!canBeDeleted()) { throw new DomainException("error.person.cannot.be.deleted"); } if (hasPersonalPhoto()) { getPersonalPhoto().delete(); } getPersonRoles().clear(); getManageableDepartmentCredits().clear(); getAdvisories().clear(); removeCms(); removeNationality(); removeCountryOfBirth(); removeCountryOfResidence(); if (hasUser()) { getUser().delete(); } super.delete(); } | 2645 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2645/182988833f95e7c1ae4339678cd9495a7641cb03/Person.java/clean/src/net/sourceforge/fenixedu/domain/Person.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1430,
1435,
288,
202,
430,
16051,
4169,
1919,
7977,
10756,
288,
202,
565,
604,
394,
24569,
2932,
1636,
18,
12479,
18,
12892,
18,
2196,
18,
8600,
8863,
202,
97,
202,
430,
261,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1430,
1435,
288,
202,
430,
16051,
4169,
1919,
7977,
10756,
288,
202,
565,
604,
394,
24569,
2932,
1636,
18,
12479,
18,
12892,
18,
2196,
18,
8600,
8863,
202,
97,
202,
430,
261,
... | |
if (newTile != currentMap.getNullTile() && newTile != currentTile) { | if (newTile != currentMap.getNullTile()) { | private void doMouse(MouseEvent event) { if (currentMap == null || currentLayer < 0) { return; } //MapLayerEdit mle; //Component c = e.getComponent(); //System.out.println(e.toString()); //System.out.println(c.getClass().toString()); Point tile = mapView.screenToTileCoords(event.getX(), event.getY()); MapLayer layer = currentMap.getLayer(currentLayer); if (mouseButton == MouseEvent.BUTTON3) { Tile newTile = layer.getTileAt(tile.x, tile.y); if (newTile != currentMap.getNullTile() && newTile != currentTile) { setCurrentTile(newTile); } } else { switch (currentPointerState) { case PS_PAINT: paintEdit.setPresentationName("Paint Tool"); currentBrush.commitPaint(currentMap, tile.x, tile.y, currentLayer); mapView.repaintRegion(currentBrush.getCenteredBounds(tile.x,tile.y)); break; case PS_ERASE: paintEdit.setPresentationName("Erase Tool"); layer.setTileAt(tile.x, tile.y, currentMap.getNullTile()); mapView.repaintRegion(new Rectangle(tile.x, tile.y, 1, 1)); break; case PS_POUR: paintEdit = null; Tile oldTile = layer.getTileAt(tile.x, tile.y); pour(layer, tile.x, tile.y, currentTile, oldTile); mapView.repaint(); break; case PS_EYED: Tile newTile = layer.getTileAt(tile.x, tile.y); if (newTile != currentMap.getNullTile() && newTile != currentTile) { setCurrentTile(newTile); } break; case PS_MOVE: layer.translate( tile.x - this.mousePressLocation.x, tile.y - mousePressLocation.y); mapView.repaint(); break; } updateHistory(); } } | 6621 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6621/0ccdf044d1c2050a196cba4fd6b891f33510af62/MapEditor.java/clean/tiled/mapeditor/MapEditor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
741,
9186,
12,
9186,
1133,
871,
13,
288,
3639,
309,
261,
2972,
863,
422,
446,
747,
783,
4576,
411,
374,
13,
288,
5411,
327,
31,
3639,
289,
3639,
368,
863,
4576,
4666,
312,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
741,
9186,
12,
9186,
1133,
871,
13,
288,
3639,
309,
261,
2972,
863,
422,
446,
747,
783,
4576,
411,
374,
13,
288,
5411,
327,
31,
3639,
289,
3639,
368,
863,
4576,
4666,
312,
... |
return lm.swaps; | return LocationManager.swaps; | public int getSwaps() { return lm.swaps; } | 50493 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50493/f79658a86e4a0f06462206ea41312edb9ae1f465/Node.java/buggy/src/freenet/node/Node.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
509,
1322,
91,
6679,
1435,
288,
202,
202,
2463,
14966,
18,
5328,
6679,
31,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
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,
509,
1322,
91,
6679,
1435,
288,
202,
202,
2463,
14966,
18,
5328,
6679,
31,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
gd.widthHint = 88; | protected void doFillIntoGrid( Composite parent, int numColumns ) { Control control = getLabelControl( parent ); GridData gd = new GridData( GridData.HORIZONTAL_ALIGN_CENTER ); control.setLayoutData( gd ); bUnderLine = getUnderLinePropControl( parent ); gd = new GridData( ); gd.widthHint = 88; bUnderLine.setLayoutData( gd ); bOverLine = getOverLinePropControl( parent ); gd = new GridData( ); gd.widthHint = 88; bOverLine.setLayoutData( gd ); bLineThrough = getLineThroughPropControl( parent ); gd = new GridData( ); gd.widthHint = 88; bLineThrough.setLayoutData( gd ); } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/2b1a682e7918a41e8fec50be6f1cf2096407d338/DecorationFieldEditor.java/clean/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/dialogs/DecorationFieldEditor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
741,
8026,
5952,
6313,
12,
14728,
982,
16,
509,
30109,
262,
202,
95,
202,
202,
3367,
3325,
273,
11237,
3367,
12,
982,
11272,
202,
202,
6313,
751,
15551,
273,
394,
7145,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
741,
8026,
5952,
6313,
12,
14728,
982,
16,
509,
30109,
262,
202,
95,
202,
202,
3367,
3325,
273,
11237,
3367,
12,
982,
11272,
202,
202,
6313,
751,
15551,
273,
394,
7145,
... | |
}catch(NumberFormatException ignored) { } } if (!found) { String[] temp = new String[5]; temp[0] = ""+tempId; selectedId = temp[0]; temp[1] = req.getParameter("country_code"); temp[2] = req.getParameter("area_code"); temp[3] = req.getParameter("local_code"); temp[4] = userId; phonesV.addElement(temp); } } res.sendRedirect("AdminUser?ok_phones=true&user_Id="+userId+"&selected_id="+selectedId+"&adminTask="+adminTask) ; return; } | } | public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { String host = req.getHeader("Host") ; IMCServiceInterface imcref = IMCServiceRMI.getIMCServiceInterfaceByHost(host) ; // Lets validate the session if (super.checkSession(req,res) == false) return ; // Lets get an user object imcode.server.User user = super.getUserObj(req,res) ; if(user == null) { String header = "Error in AdminCounter." ; String msg = "Couldnt create an user object."+ "<BR>" ; AdminError err = new AdminError(req,res,header,msg) ; return ; } // Lets check if the user is an admin, otherwise throw him out. if (imcref.checkAdminRights(user) == false) { String header = "Error in AdminCounter." ; String msg = "The user is not an administrator."+ "<BR>" ; AdminError err = new AdminError(req,res,header,msg) ; return ; } // Lets check which button was pushed String adminTask = req.getParameter("adminTask") ; if(adminTask == null) adminTask = "" ; if (null != req.getParameter("READRUNNER_SETTINGS")) { res.sendRedirect("AdminUserReadrunner?user_id="+getCurrentUserId(req,res)) ; return ; } //******* RESET_FORM BUTTON WAS PUNSCHED *********** //sets up the needed parameters and redirect back to AdminUser if ( req.getParameter("RESET_FORM") != null ) { HttpSession session = req.getSession(false); if(session == null) return; String userId = (String)session.getAttribute("RESET_userId"); if(userId == null) { this.sendErrorMsg(req,res, "Add/edit user", "An eror occured!"); return; } res.sendRedirect("AdminUser?CHANGE_USER=true&user_Id="+userId+"&adminTask="+adminTask) ; return; } //******** ok_phones button ********** //sets up the needed parameters and redirect back to AdminUser if ( req.getParameter("ok_phones") != null ) { //adds or changes a phoneNr to the select list HttpSession session = req.getSession(false); if(session == null) return; String userId = session.getAttribute("RESET_userId") == null ? "":(String) session.getAttribute("RESET_userId"); //mste fixa s att all anv. data sparas undan i servleten session.setAttribute("ok_phones_params", this.getParameters(req)); session.setAttribute("ok_phones_roles", getRolesParameters(req,res)==null ? new Vector() : getRolesParameters(req,res)); //lets get the phonenumber from the form session.setAttribute("country_code",req.getParameter("country_code")); session.setAttribute("area_code",req.getParameter("area_code")); session.setAttribute("local_code",req.getParameter("local_code")); //add it into Vectorn //gets all phonenumbers from the session String selectedId=""; if (! req.getParameter("area_code").equals("") && !req.getParameter("local_code").equals("")) { Vector phonesV = (Vector)session.getAttribute("Ok_phoneNumbers"); if (phonesV == null) { this.sendErrorMsg(req,res, "Add/edit user", "An eror occured!"); return; } Enumeration enum = phonesV.elements(); int tempId = 1; boolean found = false; while (enum.hasMoreElements()) { String[] temp = (String[]) enum.nextElement(); if (temp[0].equals(req.getParameter("phone_id"))) { selectedId = temp[0]; phonesV.remove(temp); temp[1] = req.getParameter("country_code"); temp[2] = req.getParameter("area_code"); temp[3] = req.getParameter("local_code"); phonesV.addElement(temp); found = true; } try { if (Integer.parseInt(temp[0]) >= tempId) { tempId = Integer.parseInt(temp[0]) + 1; } }catch(NumberFormatException ignored) { // ignored } } if (!found) { String[] temp = new String[5]; temp[0] = ""+tempId; selectedId = temp[0]; temp[1] = req.getParameter("country_code"); temp[2] = req.getParameter("area_code"); temp[3] = req.getParameter("local_code"); temp[4] = userId; phonesV.addElement(temp); } } res.sendRedirect("AdminUser?ok_phones=true&user_Id="+userId+"&selected_id="+selectedId+"&adminTask="+adminTask) ; return; } | 8781 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8781/a89912bad5f3737c86b424775d95f3bb99aabb10/AdminUserProps.java/clean/servlets/AdminUserProps.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
741,
3349,
12,
2940,
18572,
1111,
16,
12446,
400,
13,
202,
15069,
16517,
16,
1860,
288,
202,
780,
1479,
9506,
202,
33,
1111,
18,
588,
1864,
2932,
2594,
7923,
274,
202,
3445,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
741,
3349,
12,
2940,
18572,
1111,
16,
12446,
400,
13,
202,
15069,
16517,
16,
1860,
288,
202,
780,
1479,
9506,
202,
33,
1111,
18,
588,
1864,
2932,
2594,
7923,
274,
202,
3445,
... |
public void testSelfRegistryThrowsIllegalArgument(){ | public void testSelfRegistryThrowsIllegalArgument() { | public void testSelfRegistryThrowsIllegalArgument(){ DefaultPicoContainer pico = new DefaultPicoContainer(); try { pico.registerComponentInstance(pico); fail("Should not be able to register a container to itself"); } catch (PicoRegistrationException e) { } } | 9344 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9344/ea2e0399811881c95a8fdfc9a563878606dc17ba/AbstractPicoContainerTestCase.java/clean/trunk/java/picocontainer/src/test/org/picocontainer/tck/AbstractPicoContainerTestCase.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
10084,
4243,
21845,
12195,
1379,
1435,
288,
3639,
2989,
52,
10764,
2170,
293,
10764,
273,
394,
2989,
52,
10764,
2170,
5621,
3639,
775,
288,
5411,
293,
10764,
18,
4861,
1841... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
10084,
4243,
21845,
12195,
1379,
1435,
288,
3639,
2989,
52,
10764,
2170,
293,
10764,
273,
394,
2989,
52,
10764,
2170,
5621,
3639,
775,
288,
5411,
293,
10764,
18,
4861,
1841... |
try { pushIterator( navigator.getSelfAxisIterator( contextNode ) ); } catch (UnsupportedAxisException e) { } init( contextNode, navigator ); | this.contextNode = contextNode; this.navigator = navigator; | public AncestorOrSelfAxisIterator(Object contextNode, Navigator navigator) { try { pushIterator( navigator.getSelfAxisIterator( contextNode ) ); } catch (UnsupportedAxisException e) { } init( contextNode, navigator ); } | 47110 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47110/6408581f63f5f8c1357acf7b22b2bb397155ac4d/AncestorOrSelfAxisIterator.java/buggy/jaxen/src/java/main/org/jaxen/util/AncestorOrSelfAxisIterator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1922,
7248,
1162,
10084,
6558,
3198,
12,
921,
819,
907,
16,
4766,
1377,
423,
13061,
19796,
13,
565,
288,
3639,
775,
3639,
288,
5411,
1817,
3198,
12,
19796,
18,
588,
10084,
6558,
319... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1922,
7248,
1162,
10084,
6558,
3198,
12,
921,
819,
907,
16,
4766,
1377,
423,
13061,
19796,
13,
565,
288,
3639,
775,
3639,
288,
5411,
1817,
3198,
12,
19796,
18,
588,
10084,
6558,
319... |
private void mergePageFile(String resourcename) throws CmsXmlException, CmsImportExportException { try { if (LOG.isDebugEnabled()) { LOG.debug(Messages.get().key(Messages.LOG_IMPORTEXPORT_START_MERGING_1, resourcename)); } // in OpenCms versions <5 node names have not been case sensitive. thus, nodes are read both in upper // and lower case letters, or have to be tested for equality ignoring upper/lower case... // get the header file CmsFile pagefile = m_cms.readFile(resourcename, CmsResourceFilter.ALL); Document contentXml = CmsXmlUtils.unmarshalHelper(pagefile.getContents(), null); // get the <masterTemplate> node to check the content. this node contains the name of the template file. String masterTemplateNodeName = "//masterTemplate"; Node masterTemplateNode = contentXml.selectSingleNode(masterTemplateNodeName); if (masterTemplateNode == null) { masterTemplateNode = contentXml.selectSingleNode(masterTemplateNodeName.toLowerCase()); } if (masterTemplateNode == null) { masterTemplateNode = contentXml.selectSingleNode(masterTemplateNodeName.toUpperCase()); } // there is only one <masterTemplate> allowed String mastertemplate = null; if (masterTemplateNode != null) { // get the name of the mastertemplate mastertemplate = masterTemplateNode.getText().trim(); } // get the <ELEMENTDEF> nodes to check the content. // this node contains the information for the body element. String elementDefNodeName = "//ELEMENTDEF"; Node bodyNode = contentXml.selectSingleNode(elementDefNodeName); if (bodyNode == null) { bodyNode = contentXml.selectSingleNode(elementDefNodeName.toLowerCase()); } // there is only one <ELEMENTDEF> allowed if (bodyNode != null) { String bodyclass = null; String bodyname = null; Map bodyparams = null; List nodes = ((Element)bodyNode).elements(); for (int i = 0, n = nodes.size(); i < n; i++) { Node node = (Node)nodes.get(i); if ("CLASS".equalsIgnoreCase(node.getName())) { bodyclass = node.getText().trim(); } else if ("TEMPLATE".equalsIgnoreCase(node.getName())) { bodyname = node.getText().trim(); if (!bodyname.startsWith("/")) { bodyname = CmsResource.getFolderPath(resourcename) + bodyname; } } else if ("PARAMETER".equalsIgnoreCase(node.getName())) { Element paramElement = (Element)node; if (bodyparams == null) { bodyparams = new HashMap(); } bodyparams.put((paramElement.attribute("name")).getText(), paramElement.getTextTrim()); } } if (mastertemplate == null || bodyname == null) { CmsMessageContainer message = Messages.get().container(Messages.ERR_IMPORTEXPORT_ERROR_CANNOT_MERGE_PAGE_FILE_3, resourcename, mastertemplate, bodyname); if (LOG.isDebugEnabled()) { LOG.debug(message.key()); } throw new CmsImportExportException(message); } // lock the resource, so that it can be manipulated m_cms.lockResource(resourcename); // get all properties List properties = m_cms.readPropertyObjects(resourcename, false); // now get the content of the bodyfile and insert it into the control file CmsFile bodyfile = m_cms.readFile(bodyname, CmsResourceFilter.IGNORE_EXPIRATION); //get the encoding String encoding = CmsProperty.get(CmsPropertyDefinition.PROPERTY_CONTENT_ENCODING, properties).getValue(); if (encoding == null) { encoding = OpenCms.getSystemInfo().getDefaultEncoding(); } if (m_convertToXmlPage) { if (LOG.isDebugEnabled()) { LOG.debug(Messages.get().key(Messages.LOG_IMPORTEXPORT_START_CONVERTING_TO_XML_0)); } CmsXmlPage xmlPage = CmsXmlPageConverter.convertToXmlPage(m_cms, bodyfile.getContents(), getLocale( resourcename, properties), encoding); if (LOG.isDebugEnabled()) { LOG.debug(Messages.get().key(Messages.LOG_IMPORTEXPORT_END_CONVERTING_TO_XML_0)); } if (xmlPage != null) { pagefile.setContents(xmlPage.marshal()); // set the type to xml page pagefile.setType(CmsResourceTypeXmlPage.getStaticTypeId()); } } // add the template and other required properties CmsProperty newProperty = new CmsProperty(CmsPropertyDefinition.PROPERTY_TEMPLATE, mastertemplate, null); // property lists must not contain equal properties properties.remove(newProperty); properties.add(newProperty); // if set, add the bodyclass as property if (bodyclass != null && !"".equals(bodyclass)) { newProperty = new CmsProperty(CmsPropertyDefinition.PROPERTY_TEMPLATE, mastertemplate, null); newProperty.setAutoCreatePropertyDefinition(true); properties.remove(newProperty); properties.add(newProperty); } // if set, add bodyparams as properties if (bodyparams != null) { for (Iterator p = bodyparams.keySet().iterator(); p.hasNext();) { String key = (String)p.next(); newProperty = new CmsProperty(key, (String)bodyparams.get(key), null); newProperty.setAutoCreatePropertyDefinition(true); properties.remove(newProperty); properties.add(newProperty); } } if (LOG.isDebugEnabled()) { LOG.debug(Messages.get().key(Messages.LOG_IMPORTEXPORT_START_IMPORTING_XML_PAGE_0)); } // now import the resource m_cms.importResource(resourcename, pagefile, pagefile.getContents(), properties); // finally delete the old body file, it is not needed anymore m_cms.lockResource(bodyname); m_cms.deleteResource(bodyname, I_CmsConstants.C_DELETE_OPTION_PRESERVE_SIBLINGS); if (LOG.isDebugEnabled()) { LOG.debug(Messages.get().key(Messages.LOG_IMPORTEXPORT_END_IMPORTING_XML_PAGE_0)); } m_report.println(org.opencms.report.Messages.get().container( org.opencms.report.Messages.RPT_OK_0), I_CmsReport.C_FORMAT_OK); } else { // there are more than one template nodes in this control file // convert the resource into a plain text file // lock the resource, so that it can be manipulated m_cms.lockResource(resourcename); // set the type to plain pagefile.setType(CmsResourceTypePlain.getStaticTypeId()); // write all changes m_cms.writeFile(pagefile); // done, unlock the resource m_cms.unlockResource(resourcename); if (LOG.isDebugEnabled()) { LOG.debug(Messages.get().key(Messages.LOG_IMPORTEXPORT_CANNOT_CONVERT_XML_STRUCTURE_1, resourcename)); } m_report.println( Messages.get().container(Messages.RPT_NOT_CONVERTED_0), I_CmsReport.C_FORMAT_OK); } if (LOG.isDebugEnabled()) { LOG.debug(Messages.get().key(Messages.LOG_IMPORTEXPORT_END_MERGING_1, resourcename)); } } catch (CmsXmlException e) { throw e; } catch (CmsException e) { m_report.println(e); CmsMessageContainer message = Messages.get().container(Messages.ERR_IMPORTEXPORT_ERROR_MERGING_PAGE_FILE_1, resourcename); if (LOG.isDebugEnabled()) { LOG.debug(message.key(), e); } throw new CmsImportExportException(message, e); } } | 8585 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8585/c7083871cfaaede3aa187a175b34be606d8431f2/CmsImportVersion2.java/buggy/src/org/opencms/importexport/CmsImportVersion2.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
2691,
1964,
812,
12,
780,
31174,
1069,
13,
1216,
16084,
503,
16,
2149,
5010,
6144,
503,
288,
3639,
775,
288,
13491,
309,
261,
4842,
18,
291,
2829,
1526,
10756,
288,
7734,
2018,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
2691,
1964,
812,
12,
780,
31174,
1069,
13,
1216,
16084,
503,
16,
2149,
5010,
6144,
503,
288,
3639,
775,
288,
13491,
309,
261,
4842,
18,
291,
2829,
1526,
10756,
288,
7734,
2018,... | ||
broker = pool.get(); | broker = pool.get(session.getUser()); | public int xupdateResource( String sessionId, String documentName, String xupdate) throws RemoteException { DBBroker broker = null; Session session = getSession(sessionId); try { broker = pool.get(); Document doc = broker.getDocument(documentName); if (doc == null) throw new RemoteException( "document " + documentName + " not found"); DocumentSet docs = new DocumentSet(); docs.add(doc); XUpdateProcessor processor = new XUpdateProcessor(broker, docs); Modification modifications[] = processor.parse(new InputSource(new StringReader(xupdate))); long mods = 0; for (int i = 0; i < modifications.length; i++) { mods += modifications[i].process(); broker.flush(); } return (int) mods; } catch (ParserConfigurationException e) { throw new RemoteException(e.getMessage(), e); } catch (IOException e) { throw new RemoteException(e.getMessage(), e); } catch (EXistException e) { throw new RemoteException(e.getMessage(), e); } catch (SAXException e) { throw new RemoteException(e.getMessage(), e); } catch (PermissionDeniedException e) { throw new RemoteException(e.getMessage(), e); } catch (XPathException e) { throw new RemoteException(e.getMessage(), e); } finally { pool.release(broker); } } | 2909 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2909/91fb6727d090c3c155ee6b50216353ebcb6eadcd/AdminSoapBindingImpl.java/buggy/src/org/exist/soap/AdminSoapBindingImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
509,
619,
2725,
1420,
12,
202,
202,
780,
10338,
16,
202,
202,
780,
1668,
461,
16,
202,
202,
780,
619,
2725,
13,
202,
202,
15069,
18361,
288,
202,
202,
2290,
11194,
8625,
273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
509,
619,
2725,
1420,
12,
202,
202,
780,
10338,
16,
202,
202,
780,
1668,
461,
16,
202,
202,
780,
619,
2725,
13,
202,
202,
15069,
18361,
288,
202,
202,
2290,
11194,
8625,
273,
... |
public void mMISC() throws RecognitionException { int MISC_StartIndex = input.index(); try { int type = MISC; int start = getCharIndex(); int line = getLine(); int charPosition = getCharPositionInLine(); int channel = Token.DEFAULT_CHANNEL; if ( backtracking>0 && alreadyParsedRule(input, 44) ) { return ; } // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:939:17: ( '!' | '@' | '$' | '%' | '^' | '&' | '*' | '_' | '-' | '+' | '|' | ',' | '{' | '}' | '[' | ']' | '=' | '/' | '(' | ')' | '\'' | '\\' | '||' | '&&' | '<<<' | '++' | '--' | '>>>' | '==' | '+=' | '=+' | '-=' | '=-' | '*=' | '=*' | '/=' | '=/' ) int alt1=37; switch ( input.LA(1) ) { case '!': alt1=1; break; case '@': alt1=2; break; case '$': alt1=3; break; case '%': alt1=4; break; case '^': alt1=5; break; case '&': int LA1_6 = input.LA(2); if ( LA1_6=='&' ) { alt1=24; } else { alt1=6;} break; case '*': int LA1_7 = input.LA(2); if ( LA1_7=='=' ) { alt1=34; } else { alt1=7;} break; case '_': alt1=8; break; case '-': switch ( input.LA(2) ) { case '=': alt1=32; break; case '-': alt1=27; break; default: alt1=9;} break; case '+': switch ( input.LA(2) ) { case '=': alt1=30; break; case '+': alt1=26; break; default: alt1=10;} break; case '|': int LA1_11 = input.LA(2); if ( LA1_11=='|' ) { alt1=23; } else { alt1=11;} break; case ',': alt1=12; break; case '{': alt1=13; break; case '}': alt1=14; break; case '[': alt1=15; break; case ']': alt1=16; break; case '=': switch ( input.LA(2) ) { case '/': alt1=37; break; case '=': alt1=29; break; case '+': alt1=31; break; case '-': alt1=33; break; case '*': alt1=35; break; default: alt1=17;} break; case '/': int LA1_18 = input.LA(2); if ( LA1_18=='=' ) { alt1=36; } else { alt1=18;} break; case '(': alt1=19; break; case ')': alt1=20; break; case '\'': alt1=21; break; case '\\': alt1=22; break; case '<': alt1=25; break; case '>': alt1=28; break; default: if (backtracking>0) {failed=true; return ;} NoViableAltException nvae = new NoViableAltException("938:1: MISC : ( \'!\' | \'@\' | \'$\' | \'%\' | \'^\' | \'&\' | \'*\' | \'_\' | \'-\' | \'+\' | \'|\' | \',\' | \'{\' | \'}\' | \'[\' | \']\' | \'=\' | \'/\' | \'(\' | \')\' | \'\\\'\' | \'\\\\\' | \'||\' | \'&&\' | \'<<<\' | \'++\' | \'--\' | \'>>>\' | \'==\' | \'+=\' | \'=+\' | \'-=\' | \'=-\' | \'*=\' | \'=*\' | \'/=\' | \'=/\' );", 1, 0, input); throw nvae; } switch (alt1) { case 1 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:939:17: '!' { match('!'); if (failed) return ; } break; case 2 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:939:23: '@' { match('@'); if (failed) return ; } break; case 3 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:939:29: '$' { match('$'); if (failed) return ; } break; case 4 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:939:35: '%' { match('%'); if (failed) return ; } break; case 5 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:939:41: '^' { match('^'); if (failed) return ; } break; case 6 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:939:47: '&' { match('&'); if (failed) return ; } break; case 7 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:939:53: '*' { match('*'); if (failed) return ; } break; case 8 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:939:59: '_' { match('_'); if (failed) return ; } break; case 9 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:939:65: '-' { match('-'); if (failed) return ; } break; case 10 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:939:71: '+' { match('+'); if (failed) return ; } break; case 11 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:940:19: '|' { match('|'); if (failed) return ; } break; case 12 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:940:25: ',' { match(','); if (failed) return ; } break; case 13 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:940:31: '{' { match('{'); if (failed) return ; } break; case 14 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:940:37: '}' { match('}'); if (failed) return ; } break; case 15 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:940:43: '[' { match('['); if (failed) return ; } break; case 16 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:940:49: ']' { match(']'); if (failed) return ; } break; case 17 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:940:55: '=' { match('='); if (failed) return ; } break; case 18 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:940:61: '/' { match('/'); if (failed) return ; } break; case 19 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:940:67: '(' { match('('); if (failed) return ; } break; case 20 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:940:73: ')' { match(')'); if (failed) return ; } break; case 21 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:940:79: '\'' { match('\''); if (failed) return ; } break; case 22 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:940:86: '\\' { match('\\'); if (failed) return ; } break; case 23 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:941:19: '||' { match("||"); if (failed) return ; } break; case 24 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:941:26: '&&' { match("&&"); if (failed) return ; } break; case 25 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:941:33: '<<<' { match("<<<"); if (failed) return ; } break; case 26 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:941:41: '++' { match("++"); if (failed) return ; } break; case 27 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:941:48: '--' { match("--"); if (failed) return ; } break; case 28 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:941:55: '>>>' { match(">>>"); if (failed) return ; } break; case 29 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:941:63: '==' { match("=="); if (failed) return ; } break; case 30 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:941:70: '+=' { match("+="); if (failed) return ; } break; case 31 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:941:77: '=+' { match("=+"); if (failed) return ; } break; case 32 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:941:84: '-=' { match("-="); if (failed) return ; } break; case 33 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:941:91: '=-' { match("=-"); if (failed) return ; } break; case 34 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:941:97: '*=' { match("*="); if (failed) return ; } break; case 35 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:941:104: '=*' { match("=*"); if (failed) return ; } break; case 36 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:942:19: '/=' { match("/="); if (failed) return ; } break; case 37 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:942:26: '=/' { match("=/"); if (failed) return ; } break; } if ( token==null ) {emit(type,line,charPosition,channel,start,getCharIndex()-1);} } finally { if ( backtracking>0 ) { memoize(input, 44, MISC_StartIndex); } } } | 5490 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5490/31d63bcc9d3d8766c62d2c237554a38462a57456/RuleParserLexer.java/buggy/drools-compiler/src/main/java/org/drools/lang/RuleParserLexer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
312,
7492,
2312,
1435,
1216,
9539,
288,
3639,
509,
20806,
2312,
67,
16792,
273,
810,
18,
1615,
5621,
3639,
775,
288,
5411,
509,
618,
273,
20806,
2312,
31,
5411,
509,
787,
273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
312,
7492,
2312,
1435,
1216,
9539,
288,
3639,
509,
20806,
2312,
67,
16792,
273,
810,
18,
1615,
5621,
3639,
775,
288,
5411,
509,
618,
273,
20806,
2312,
31,
5411,
509,
787,
273,
... | ||
Attr attrib = doc.createAttributeNS(namespace, name); | Attr attrib = namespace != null && namespace.length() > 0 ? doc.createAttributeNS(namespace, name) : doc.createAttribute(name); | public void startElement( String namespaceURI, String localName, String qName, Attributes atts) throws SAXException { // save accumulated character content if (inModification && charBuf.length() > 0) { final String normalized = preserveWhitespace ? charBuf.toString() : 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()); contents.add(text); } else { Element last = (Element) stack.peek(); last.appendChild(text); } } charBuf.setLength(0); } if (namespaceURI.equals(XUPDATE_NS)) { String select = null; if (localName.equals(MODIFICATIONS)) { startModifications(atts); return; } else if (localName.equals(VARIABLE)) { // variable declaration startVariableDecl(atts); return; } else if (IF.equals(localName)) { if (inModification) throw new SAXException("xupdate:if is not allowed inside a modification"); select = atts.getValue("test"); Conditional cond = new Conditional(broker, documentSet, select, namespaces, variables); conditionals.push(cond); return; } else if (VALUE_OF.equals(localName)) { if(!inModification) throw new SAXException("xupdate:value-of is not allowed outside a modification"); } else if (APPEND.equals(localName) || INSERT_BEFORE.equals(localName) || INSERT_AFTER.equals(localName) || REMOVE.equals(localName) || RENAME.equals(localName) || UPDATE.equals(localName) || REPLACE.equals(localName)) { if (inModification) throw new SAXException("nested modifications are not allowed"); select = atts.getValue("select"); if (select == null) throw new SAXException( localName + " requires a select attribute"); doc = builder.newDocument(); contents = new NodeListImpl(); inModification = true; } else if ( (ELEMENT.equals(localName) || ATTRIBUTE.equals(localName) || TEXT.equals(localName) || PROCESSING_INSTRUCTION.equals(localName) || COMMENT.equals(localName))) { if(!inModification) throw new SAXException( "creation elements are only allowed inside " + "a modification"); charBuf.setLength(0); } else throw new SAXException("Unknown XUpdate element: " + qName); // start a new modification section if (APPEND.equals(localName)) { String child = atts.getValue("child"); modification = new Append(broker, documentSet, select, child, namespaces, variables); } else if (UPDATE.equals(localName)) modification = new Update(broker, documentSet, select, namespaces, variables); else if (INSERT_BEFORE.equals(localName)) modification = new Insert(broker, documentSet, select, Insert.INSERT_BEFORE, namespaces, variables); else if (INSERT_AFTER.equals(localName)) modification = new Insert(broker, documentSet, select, Insert.INSERT_AFTER, namespaces, variables); else if (REMOVE.equals(localName)) modification = new Remove(broker, documentSet, select, namespaces, variables); else if (RENAME.equals(localName)) modification = new Rename(broker, documentSet, select, namespaces, variables); else if (REPLACE.equals(localName)) modification = new Replace(broker, documentSet, select, namespaces, variables); // process commands for node creation else if (ELEMENT.equals(localName)) { String name = atts.getValue("name"); if (name == null) throw new SAXException("element requires a name attribute"); int p = name.indexOf(':'); String namespace = ""; String prefix = ""; if (p > -1) { prefix = name.substring(0, p); if (name.length() == p + 1) throw new SAXException( "illegal prefix in qname: " + name); name = name.substring(p + 1); namespace = atts.getValue("namespace"); if(namespace == null) namespace = (String) namespaces.get(prefix); if (namespace == null) { throw new SAXException( "no namespace defined for prefix " + prefix); } } Element elem = doc.createElementNS(namespace, name); elem.setPrefix(prefix); if (stack.isEmpty()) { contents.add(elem); } else { Element last = (Element) stack.peek(); last.appendChild(elem); } this.setWhitespaceHandling((Element) stack.push(elem)); } else if (ATTRIBUTE.equals(localName)) { String name = atts.getValue("name"); if (name == null) throw new SAXException("attribute requires a name attribute"); int p = name.indexOf(':'); String namespace = ""; if (p > -1) { String prefix = name.substring(0, p); if (name.length() == p + 1) throw new SAXException( "illegal prefix in qname: " + name); namespace = atts.getValue("namespace"); if(namespace == null) namespace = (String) namespaces.get(prefix); if (namespace == null) throw new SAXException( "no namespace defined for prefix " + prefix); } Attr attrib = doc.createAttributeNS(namespace, name); if (stack.isEmpty()) { for(int i = 0; i < contents.getLength(); i++) { Node n = contents.item(i); String ns = n.getNamespaceURI(); if(ns == null) ns = ""; if(n.getNodeType() == Node.ATTRIBUTE_NODE && n.getLocalName().equals(name) && ns.equals(namespace)) throw new SAXException("The attribute " + attrib.getNodeName() + " cannot be specified twice"); } contents.add(attrib); } else { Element last = (Element) stack.peek(); if(last.hasAttributeNS(namespace, name)) throw new SAXException("The attribute " + attrib.getNodeName() + " cannot be specified " + "twice on the same element"); last.setAttributeNodeNS(attrib); } inAttribute = true; currentNode = attrib; // process value-of } else if (VALUE_OF.equals(localName)) { select = atts.getValue("select"); if (select == null) throw new SAXException("value-of requires a select attribute"); Sequence seq = processQuery(select); LOG.debug("Found " + seq.getLength() + " items for value-of"); Item item; for (SequenceIterator i = seq.iterate(); i.hasNext();) { item = i.nextItem(); if(Type.subTypeOf(item.getType(), Type.NODE)) { Node node = XMLUtil.copyNode(doc, ((NodeValue)item).getNode()); if (stack.isEmpty()) contents.add(node); else { Element last = (Element) stack.peek(); last.appendChild(node); } } else { try { String value = item.getStringValue(); characters(value.toCharArray(), 0, value.length()); } catch(XPathException e) { throw new SAXException(e.getMessage(), e); } } } } } else if (inModification) { Element elem = doc.createElementNS(namespaceURI, qName); Attr a; for (int i = 0; i < atts.getLength(); i++) { String name = atts.getQName(i); String nsURI = atts.getURI(i); if (name.startsWith("xmlns")) { // Why are these showing up? They are supposed to be stripped out? } else { a = doc.createAttributeNS(nsURI, name); a.setValue(atts.getValue(i)); elem.setAttributeNodeNS(a); } } if (stack.isEmpty()) { contents.add(elem); } else { Element last = (Element) stack.peek(); last.appendChild(elem); } this.setWhitespaceHandling((Element) stack.push(elem)); } } | 2909 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2909/46afda7b5e8f0e1842b30630c1ba56c809b4b4dd/XUpdateProcessor.java/buggy/src/org/exist/xupdate/XUpdateProcessor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
13591,
12,
202,
202,
780,
19421,
16,
202,
202,
780,
11927,
16,
202,
202,
780,
22914,
16,
202,
202,
2498,
15687,
13,
202,
202,
15069,
14366,
288,
202,
202,
759,
1923,
2489... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
13591,
12,
202,
202,
780,
19421,
16,
202,
202,
780,
11927,
16,
202,
202,
780,
22914,
16,
202,
202,
2498,
15687,
13,
202,
202,
15069,
14366,
288,
202,
202,
759,
1923,
2489... |
try { Connection con = JDBC2Tests.openDB(); | try { Statement stmt = con.createStatement(); assertEquals(1, stmt.executeUpdate(JDBC2Tests.insertSQL("testdate", "'1950-02-07'"))); assertEquals(1, stmt.executeUpdate(JDBC2Tests.insertSQL("testdate", "'1970-06-02'"))); assertEquals(1, stmt.executeUpdate(JDBC2Tests.insertSQL("testdate", "'1999-08-11'"))); assertEquals(1, stmt.executeUpdate(JDBC2Tests.insertSQL("testdate", "'2001-02-13'"))); | public void testGetDate() { try { Connection con = JDBC2Tests.openDB(); Statement st=con.createStatement(); JDBC2Tests.createTable(con,"dt date"); st.executeUpdate(JDBC2Tests.insert("'1950-02-07'")); st.executeUpdate(JDBC2Tests.insert("'1970-06-02'")); st.executeUpdate(JDBC2Tests.insert("'1999-08-11'")); st.executeUpdate(JDBC2Tests.insert("'2001-02-13'")); // Fall through helper checkTimeTest(con,st); st.close(); JDBC2Tests.closeDB(con); } catch(Exception ex) { assert(ex.getMessage(),false); } } /** * Tests the time methods in PreparedStatement */ public void testSetDate() { try { Connection con = JDBC2Tests.openDB(); Statement st=con.createStatement(); JDBC2Tests.createTable(con,"dt date"); PreparedStatement ps = con.prepareStatement(JDBC2Tests.insert("?")); ps.setDate(1,getDate(1950,2,7)); assert(!ps.execute()); // false as its an update! ps.setDate(1,getDate(1970,6,2)); assert(!ps.execute()); // false as its an update! ps.setDate(1,getDate(1999,8,11)); assert(!ps.execute()); // false as its an update! ps.setDate(1,getDate(2001,2,13)); assert(!ps.execute()); // false as its an update! // Fall through helper checkTimeTest(con,st); ps.close(); st.close(); JDBC2Tests.closeDB(con); } catch(Exception ex) { | 45672 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45672/b75814aee320ef2b67ad01ba72c266dbbf94db45/DateTest.java/buggy/src/interfaces/jdbc/org/postgresql/test/jdbc2/DateTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1842,
967,
1626,
1435,
288,
565,
775,
288,
1377,
4050,
356,
273,
16364,
22,
14650,
18,
3190,
2290,
5621,
1377,
8056,
384,
33,
591,
18,
2640,
3406,
5621,
1377,
16364,
22,
14650,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
967,
1626,
1435,
288,
565,
775,
288,
1377,
4050,
356,
273,
16364,
22,
14650,
18,
3190,
2290,
5621,
1377,
8056,
384,
33,
591,
18,
2640,
3406,
5621,
1377,
16364,
22,
14650,... |
return CONTINUE; } | return CONTINUE; } | public int execute(Object key, Object value, Object arg) { return CONTINUE; } | 49476 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49476/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyObject.java/buggy/org/jruby/RubyObject.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4697,
202,
482,
509,
1836,
12,
921,
498,
16,
1033,
460,
16,
1033,
1501,
13,
288,
6862,
202,
2463,
8020,
26725,
31,
9506,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4697,
202,
482,
509,
1836,
12,
921,
498,
16,
1033,
460,
16,
1033,
1501,
13,
288,
6862,
202,
2463,
8020,
26725,
31,
9506,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
long now = System.currentTimeMillis(); if(verifiedIncompatibleOlderVersion || verifiedIncompatibleNewerVersion) { sendHandshakeTime = now + Node.MIN_TIME_BETWEEN_VERSION_SENDS + node.random.nextInt(Node.RANDOMIZED_TIME_BETWEEN_VERSION_SENDS) + node.random.nextInt(Node.RANDOMIZED_TIME_BETWEEN_VERSION_SENDS); } else if(invalidVersion() && !firstHandshake) { sendHandshakeTime = now + Node.MIN_TIME_BETWEEN_VERSION_PROBES + node.random.nextInt(Node.RANDOMIZED_TIME_BETWEEN_VERSION_PROBES); } else { sendHandshakeTime = now + Node.MIN_TIME_BETWEEN_HANDSHAKE_SENDS + node.random.nextInt(Node.RANDOMIZED_TIME_BETWEEN_HANDSHAKE_SENDS); | long now = -1; synchronized(this) { now = System.currentTimeMillis(); if(verifiedIncompatibleOlderVersion || verifiedIncompatibleNewerVersion) { sendHandshakeTime = now + Node.MIN_TIME_BETWEEN_VERSION_SENDS + node.random.nextInt(Node.RANDOMIZED_TIME_BETWEEN_VERSION_SENDS) + node.random.nextInt(Node.RANDOMIZED_TIME_BETWEEN_VERSION_SENDS); } else if(invalidVersion() && !firstHandshake) { sendHandshakeTime = now + Node.MIN_TIME_BETWEEN_VERSION_PROBES + node.random.nextInt(Node.RANDOMIZED_TIME_BETWEEN_VERSION_PROBES); } else { sendHandshakeTime = now + Node.MIN_TIME_BETWEEN_HANDSHAKE_SENDS + node.random.nextInt(Node.RANDOMIZED_TIME_BETWEEN_HANDSHAKE_SENDS); } firstHandshake = false; this.handshakeCount++; | public synchronized void sentHandshake() { Logger.debug(this, "sentHandshake(): "+this); long now = System.currentTimeMillis(); if(verifiedIncompatibleOlderVersion || verifiedIncompatibleNewerVersion) { // Let them know we're here, but have no hope of connecting sendHandshakeTime = now + Node.MIN_TIME_BETWEEN_VERSION_SENDS + node.random.nextInt(Node.RANDOMIZED_TIME_BETWEEN_VERSION_SENDS) + node.random.nextInt(Node.RANDOMIZED_TIME_BETWEEN_VERSION_SENDS); } else if(invalidVersion() && !firstHandshake) { sendHandshakeTime = now + Node.MIN_TIME_BETWEEN_VERSION_PROBES + node.random.nextInt(Node.RANDOMIZED_TIME_BETWEEN_VERSION_PROBES); } else { sendHandshakeTime = now + Node.MIN_TIME_BETWEEN_HANDSHAKE_SENDS + node.random.nextInt(Node.RANDOMIZED_TIME_BETWEEN_HANDSHAKE_SENDS); } firstHandshake = false; this.handshakeCount++; // Don't fetch ARKs for peers we have verified (through handshake) to be incompatible with us if(handshakeCount == MAX_HANDSHAKE_COUNT && !(verifiedIncompatibleOlderVersion || verifiedIncompatibleNewerVersion)) { Logger.normal( this, "Starting ARK Fetcher after "+handshakeCount+" failed handshakes for "+getPeer()+" with identity '"+getIdentityString()+"'"); arkFetcher.start(); } } | 46731 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46731/3e44bef45be2463a8891c67103daf30bf3bf82a4/PeerNode.java/clean/src/freenet/node/PeerNode.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3852,
918,
3271,
14545,
1435,
288,
3639,
4242,
18,
4148,
12,
2211,
16,
315,
7569,
14545,
13332,
13773,
2211,
1769,
3639,
1525,
2037,
273,
2332,
18,
2972,
28512,
5621,
3639,
309,
12,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3852,
918,
3271,
14545,
1435,
288,
3639,
4242,
18,
4148,
12,
2211,
16,
315,
7569,
14545,
13332,
13773,
2211,
1769,
3639,
1525,
2037,
273,
2332,
18,
2972,
28512,
5621,
3639,
309,
12,
... |
public Mask createMask(GraphicsNode maskedNode, BridgeContext bridgeContext, Element maskElement, Element maskedElement) { // Get the mask region CSSStyleDeclaration cssDecl = bridgeContext.getViewCSS().getComputedStyle(maskElement, null); UnitProcessor.Context uctx = new DefaultUnitProcessorContext(bridgeContext, cssDecl); FilterRegion maskRegion = SVGUtilities.convertMaskRegion(maskElement, maskedElement, maskedNode, uctx); if(maskRegion == null){ throw new Error(); } else{ System.out.println("Mask region : " + maskRegion); } // // <!> FIX ME. HOW SHOULD WE CREATE A GVT TREE THAT REPRESENTS // THE MASK. THIS IS NOT CLEAN. // org.apache.batik.bridge.GVTBuilder builder = new org.apache.batik.refimpl.bridge.ConcreteGVTBuilder(); CompositeGraphicsNode maskNodeContent = bridgeContext.getGVTFactory().createCompositeGraphicsNode(); for(Node child=maskElement.getFirstChild(); child != null; child = child.getNextSibling()){ if(child.getNodeType() == child.ELEMENT_NODE){ Element e = (Element)child; GraphicsNode node = builder.build(bridgeContext, e) ; if(node != null){ maskNodeContent.getChildren().add(node); } } } // OTHER PROBLEM: SHOULD TAKE MASK REGION INTO ACCOUNT GraphicsNode maskNode = maskNodeContent; // <!> END FIX ME if (maskNode == null) { System.out.println("Null mask GN"); System.out.println("maskEl: " + maskElement); return null; } Filter filter = maskedNode.getFilter(); if (filter == null) { // Make the initial source as a RenderableImage GraphicsNodeRableFactory gnrFactory = bridgeContext.getGraphicsNodeRableFactory(); filter = gnrFactory.createGraphicsNodeRable(maskedNode); } if(maskRegion == null){ throw new Error(); } else{ System.out.println("Mask region 2 : " + maskRegion); } return new ConcreteMaskRable(filter, maskNode, maskRegion); } | 45946 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45946/4db4e1ef3d44f26cae3e4fef04040cd441935f5c/SVGMaskElementBridge.java/clean/sources/org/apache/batik/refimpl/bridge/SVGMaskElementBridge.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
16698,
752,
5796,
12,
17558,
907,
225,
13196,
907,
16,
21821,
24219,
1042,
10105,
1042,
16,
21821,
3010,
3066,
1046,
16,
21821,
3010,
13196,
1046,
13,
288,
7734,
368,
968,
326,
3066,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
16698,
752,
5796,
12,
17558,
907,
225,
13196,
907,
16,
21821,
24219,
1042,
10105,
1042,
16,
21821,
3010,
3066,
1046,
16,
21821,
3010,
13196,
1046,
13,
288,
7734,
368,
968,
326,
3066,
... | ||
throw new IllegalStateException("Must be higher than prev: "+num+" "+prevNum); | throw new IllegalStateException("Must be higher than prev: "+num+ ' ' +prevNum); | private synchronized void checkSorted() { long prevNum = -1; for(int i=0;i<Math.min(count, items.length);i++) { NumberedItem item = items[i]; long num = item == null ? -1 : item.getNumber(); if((item != null) && (num < 0)) throw new IllegalStateException("getNumber() must return positive numbers"); if((num < prevNum) || ((num != -1) && (num == prevNum))) { throw new IllegalStateException("Must be higher than prev: "+num+" "+prevNum); } prevNum = num; } } | 56348 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56348/62fd59041864b4ed1f43adc676de6bfb5ea977f3/NumberedRecentItems.java/buggy/src/freenet/support/NumberedRecentItems.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
3852,
918,
866,
11739,
1435,
288,
3639,
1525,
2807,
2578,
273,
300,
21,
31,
3639,
364,
12,
474,
277,
33,
20,
31,
77,
32,
10477,
18,
1154,
12,
1883,
16,
1516,
18,
2469,
1769,
77,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
3852,
918,
866,
11739,
1435,
288,
3639,
1525,
2807,
2578,
273,
300,
21,
31,
3639,
364,
12,
474,
277,
33,
20,
31,
77,
32,
10477,
18,
1154,
12,
1883,
16,
1516,
18,
2469,
1769,
77,... |
if (_address != null && hostname == null) { return _address; } else { Logger.minor(this, "Looking up '"+hostname+"' in DNS"); /* * Peers are constructed from an address once a * handshake has been completed, so this lookup * will only be performed during a handshake * (this method should normally only be called * from PeerNode.getHandshakeIPs() and once * each connection from this.getAddress() * otherwise) - it doesn't mean we perform a * DNS lookup with every packet we send. */ try { InetAddress addr = InetAddress.getByName(hostname); if( addr != null ) { /* * cache the answer since getHandshakeAddress() * doesn't use the cached value, thus * getHandshakeIPs() should always get the * latest value from DNS (minus Java's caching) */ this._address = addr; } return addr; } catch (UnknownHostException e) { return null; } } | return addr.getHandshakeAddress(); | public InetAddress getHandshakeAddress() { // Since we're handshaking, hostname-to-IP may have changed if (_address != null && hostname == null) { return _address; } else { Logger.minor(this, "Looking up '"+hostname+"' in DNS"); /* * Peers are constructed from an address once a * handshake has been completed, so this lookup * will only be performed during a handshake * (this method should normally only be called * from PeerNode.getHandshakeIPs() and once * each connection from this.getAddress() * otherwise) - it doesn't mean we perform a * DNS lookup with every packet we send. */ try { InetAddress addr = InetAddress.getByName(hostname); //Logger.normal(this, "Look up got '"+addr+"'"); if( addr != null ) { /* * cache the answer since getHandshakeAddress() * doesn't use the cached value, thus * getHandshakeIPs() should always get the * latest value from DNS (minus Java's caching) */ this._address = addr; } return addr; } catch (UnknownHostException e) { return null; } } } | 50493 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50493/474d190c633c367c5c3ff7fbe0f75a1ea669294b/Peer.java/buggy/src/freenet/io/comm/Peer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
14218,
336,
14545,
1887,
1435,
288,
202,
565,
368,
7897,
732,
4565,
948,
674,
6159,
16,
5199,
17,
869,
17,
2579,
2026,
1240,
3550,
202,
565,
309,
261,
67,
2867,
480,
446,
597,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
14218,
336,
14545,
1887,
1435,
288,
202,
565,
368,
7897,
732,
4565,
948,
674,
6159,
16,
5199,
17,
869,
17,
2579,
2026,
1240,
3550,
202,
565,
309,
261,
67,
2867,
480,
446,
597,... |
} else if (context instanceof IVariable) { IVariable variable = (IVariable) context; ISelection stackSelection = DebugContextManager.getDefault().getActiveContext(getSite().getWorkbenchWindow()); if (stackSelection instanceof IStructuredSelection) { Object stack = ((IStructuredSelection) stackSelection).getFirstElement(); if (stack instanceof IJavaStackFrame) { try { IJavaObject stackObj = ((IJavaStackFrame) stack).getThis(); if ((stackObj != null) && (stackObj.getJavaType() != null) && ("org.drools.reteoo.ReteooWorkingMemory".equals( stackObj.getJavaType().getName()))) { input = stackObj; } | } if (input == null) { ISelection stackSelection = DebugContextManager.getDefault().getActiveContext(getSite().getWorkbenchWindow()); if (stackSelection instanceof IStructuredSelection) { Object selection = ((IStructuredSelection) stackSelection).getFirstElement(); if (selection instanceof IJavaStackFrame) { try { IJavaThread thread = (IJavaThread) ((IJavaStackFrame) selection).getThread(); IStackFrame[] frames = thread.getStackFrames(); for (int i = 0; i < frames.length; i++) { IJavaObject stackObj = ((IJavaStackFrame) frames[i]).getThis(); if ((stackObj != null) && (stackObj.getJavaType() != null) && ("org.drools.reteoo.ReteooWorkingMemory".equals( stackObj.getJavaType().getName()))) { input = stackObj; break; } } | protected void setViewerInput(Object context) { Object input = null; if (context instanceof IJavaStackFrame) { try { IJavaObject stackObj = ((IJavaStackFrame) context).getThis(); if ((stackObj != null) && (stackObj.getJavaType() != null) && ("org.drools.reteoo.ReteooWorkingMemory".equals( stackObj.getJavaType().getName()))) { input = stackObj; } } catch (Throwable t) { DroolsIDEPlugin.log(t); } } else if (context instanceof IVariable) { IVariable variable = (IVariable) context; // find out if stackFrame is inside a WorkingMemoryImpl // if so, use that, no matter what variable is selected ISelection stackSelection = DebugContextManager.getDefault().getActiveContext(getSite().getWorkbenchWindow()); if (stackSelection instanceof IStructuredSelection) { Object stack = ((IStructuredSelection) stackSelection).getFirstElement(); if (stack instanceof IJavaStackFrame) { try { IJavaObject stackObj = ((IJavaStackFrame) stack).getThis(); if ((stackObj != null) && (stackObj.getJavaType() != null) && ("org.drools.reteoo.ReteooWorkingMemory".equals( stackObj.getJavaType().getName()))) { input = stackObj; } } catch (Throwable t) { // do nothing } } } if (input == null) { try { IValue value = ((IVariable) context).getValue(); if (value != null && value instanceof IJavaObject && "org.drools.reteoo.ReteooWorkingMemory".equals( variable.getValue().getReferenceTypeName())) { input = value; } } catch (Throwable t) { DroolsIDEPlugin.log(t); } } } Object current = getViewer().getInput(); if (current == null && input == null) { return; } if (current != null && current.equals(input)) { return; } showViewer(); getViewer().setInput(input); } | 53688 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/53688/eee32a85b57718a7130e381062fb9d92a9e0334f/DroolsDebugEventHandlerView.java/clean/drools-ide/src/main/java/org/drools/ide/debug/DroolsDebugEventHandlerView.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
444,
18415,
1210,
12,
921,
819,
13,
288,
377,
202,
921,
810,
273,
446,
31,
377,
202,
430,
261,
2472,
1276,
467,
5852,
2624,
3219,
13,
288,
5411,
775,
288,
7734,
467,
5852,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
444,
18415,
1210,
12,
921,
819,
13,
288,
377,
202,
921,
810,
273,
446,
31,
377,
202,
430,
261,
2472,
1276,
467,
5852,
2624,
3219,
13,
288,
5411,
775,
288,
7734,
467,
5852,
... |
HClass in[] = ((HClass)uv.elementAt(i)).getInterfaces(); | HClass in[] = uv.get(i).getInterfaces(); | public final boolean isSuperinterfaceOf(HClass hc) { assert _linker == hc._linker || isPrimitive() || hc.isPrimitive(); assert this.isInterface(); UniqueVector uv = new UniqueVector();//unique in case of circularity for ( ; hc!=null; hc = hc.getSuperclass()) uv.addElement(hc); for (int i=0; i<uv.size(); i++) if (uv.elementAt(i) == this) return true; else { HClass in[] = ((HClass)uv.elementAt(i)).getInterfaces(); for (int j=0; j<in.length; j++) uv.addElement(in[j]); } // ran out of possibilities. return false; } | 2866 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2866/91db2ae372a24034dde1a708854ac2e5144a541f/HClass.java/buggy/ClassFile/HClass.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
727,
1250,
353,
8051,
5831,
951,
12,
44,
797,
11684,
13,
288,
565,
1815,
389,
1232,
264,
422,
11684,
6315,
1232,
264,
747,
19598,
1435,
747,
11684,
18,
291,
9840,
5621,
565,
1815,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
727,
1250,
353,
8051,
5831,
951,
12,
44,
797,
11684,
13,
288,
565,
1815,
389,
1232,
264,
422,
11684,
6315,
1232,
264,
747,
19598,
1435,
747,
11684,
18,
291,
9840,
5621,
565,
1815,
... |
public URL(String spec) throws MalformedURLException { this((URL) null, spec, (URLStreamHandler) null); | public URL(String protocol, String host, int port, String file) throws MalformedURLException { this(protocol, host, port, file, null); | public URL(String spec) throws MalformedURLException { this((URL) null, spec, (URLStreamHandler) null); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/9ce66a563f0f5fab6f343b0309996bee3627787a/URL.java/buggy/core/src/classpath/java/java/net/URL.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1976,
12,
780,
857,
13,
1216,
20710,
288,
3639,
333,
12443,
1785,
13,
446,
16,
857,
16,
261,
1785,
1228,
1503,
13,
446,
1769,
565,
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,
1976,
12,
780,
857,
13,
1216,
20710,
288,
3639,
333,
12443,
1785,
13,
446,
16,
857,
16,
261,
1785,
1228,
1503,
13,
446,
1769,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
null, | runtime.getNil(), | public IRubyObject to_proc() { return runtime.iterate( CallbackFactory.getSingletonMethod(RubyMethod.class, "mproc"), null, CallbackFactory.getBlockMethod(RubyMethod.class, "bmcall"), this); } | 46217 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46217/76d37f709db398798e5b6a889937559a9e75e062/RubyMethod.java/clean/org/jruby/RubyMethod.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
15908,
10340,
921,
358,
67,
9381,
1435,
288,
3639,
327,
3099,
18,
18793,
12,
5411,
8444,
1733,
18,
588,
19571,
1305,
12,
54,
10340,
1305,
18,
1106,
16,
315,
81,
9381,
6,
3631,
541... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
15908,
10340,
921,
358,
67,
9381,
1435,
288,
3639,
327,
3099,
18,
18793,
12,
5411,
8444,
1733,
18,
588,
19571,
1305,
12,
54,
10340,
1305,
18,
1106,
16,
315,
81,
9381,
6,
3631,
541... |
public SimpleDocRef(Set authors, String location) { | public SimpleDocRef(List authors, String location) { | public SimpleDocRef(Set authors, String location) { if (authors==null || authors.isEmpty()) throw new IllegalArgumentException("Authors cannot be null or empty"); if (location==null) throw new IllegalArgumentException("Location cannot be null"); this.crossref = null; this.authors = new HashSet(); this.authors.addAll(authors); this.title = null; this.location = location; this.remark = null; } | 50397 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50397/88640d228841047db8c0dd29d58ebf88063e8cc0/SimpleDocRef.java/clean/src/org/biojavax/SimpleDocRef.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
4477,
1759,
1957,
12,
682,
14494,
16,
514,
2117,
13,
288,
3639,
309,
261,
19368,
631,
2011,
747,
14494,
18,
291,
1921,
10756,
604,
394,
2754,
2932,
1730,
1383,
2780,
506,
446,
578,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4477,
1759,
1957,
12,
682,
14494,
16,
514,
2117,
13,
288,
3639,
309,
261,
19368,
631,
2011,
747,
14494,
18,
291,
1921,
10756,
604,
394,
2754,
2932,
1730,
1383,
2780,
506,
446,
578,
... |
wrap(new String[] { | fold(new String[] { | public void testParallelPeriod() throws Exception { assertAxisReturns("parallelperiod([Time].[Quarter], 1, [Time].[1998].[Q1])", "[Time].[1997].[Q4]"); assertAxisReturns("parallelperiod([Time].[Quarter], -1, [Time].[1997].[Q1])", "[Time].[1997].[Q2]"); assertAxisReturns("parallelperiod([Time].[Year], 1, [Time].[1998].[Q1])", "[Time].[1997].[Q1]"); assertAxisReturns("parallelperiod([Time].[Year], 1, [Time].[1998].[Q1].[1])", "[Time].[1997].[Q1].[1]"); // No args, therefore finds parallel period to [Time].[1997], which // would be [Time].[1996], except that that doesn't exist, so null. assertAxisReturns("ParallelPeriod()", ""); // Parallel period to [Time].[1997], which would be [Time].[1996], // except that that doesn't exist, so null. assertAxisReturns("ParallelPeriod([Time].[Year], 1, [Time].[1997])", ""); // one parameter, level 2 above member assertQueryReturns( wrap(new String[] { "WITH MEMBER [Measures].[Foo] AS ", " ' ParallelPeriod([Time].[Year]).UniqueName '", "SELECT {[Measures].[Foo]} ON COLUMNS", "FROM [Sales]", "WHERE [Time].[1997].[Q3].[8]"}), wrap(new String[] { "Axis #0:", "{[Time].[1997].[Q3].[8]}", "Axis #1:", "{[Measures].[Foo]}", "Row #0: [Time].[#Null]" + nl})); // one parameter, level 1 above member assertQueryReturns( wrap(new String[] { "WITH MEMBER [Measures].[Foo] AS ", " ' ParallelPeriod([Time].[Quarter]).UniqueName '", "SELECT {[Measures].[Foo]} ON COLUMNS", "FROM [Sales]", "WHERE [Time].[1997].[Q3].[8]"}), wrap(new String[] { "Axis #0:", "{[Time].[1997].[Q3].[8]}", "Axis #1:", "{[Measures].[Foo]}", "Row #0: [Time].[1997].[Q2].[5]" + nl})); // one parameter, level same as member assertQueryReturns( wrap(new String[] { "WITH MEMBER [Measures].[Foo] AS ", " ' ParallelPeriod([Time].[Month]).UniqueName '", "SELECT {[Measures].[Foo]} ON COLUMNS", "FROM [Sales]", "WHERE [Time].[1997].[Q3].[8]"}), wrap(new String[] { "Axis #0:", "{[Time].[1997].[Q3].[8]}", "Axis #1:", "{[Measures].[Foo]}", "Row #0: [Time].[1997].[Q3].[7]" + nl})); // one parameter, level below member assertQueryReturns( wrap(new String[] { "WITH MEMBER [Measures].[Foo] AS ", " ' ParallelPeriod([Time].[Month]).UniqueName '", "SELECT {[Measures].[Foo]} ON COLUMNS", "FROM [Sales]", "WHERE [Time].[1997].[Q3]"}), wrap(new String[] { "Axis #0:", "{[Time].[1997].[Q3]}", "Axis #1:", "{[Measures].[Foo]}", "Row #0: [Time].[#Null]" + nl})); } | 51263 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51263/bb703add381acf854e2d5aed1045911b7ab143b4/FunctionTest.java/clean/testsrc/main/mondrian/olap/fun/FunctionTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
13056,
5027,
1435,
1216,
1185,
288,
3639,
1815,
6558,
1356,
2932,
1065,
454,
1602,
2386,
3816,
950,
8009,
63,
928,
14153,
6487,
404,
16,
306,
950,
8009,
63,
19818,
28,
80... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
13056,
5027,
1435,
1216,
1185,
288,
3639,
1815,
6558,
1356,
2932,
1065,
454,
1602,
2386,
3816,
950,
8009,
63,
928,
14153,
6487,
404,
16,
306,
950,
8009,
63,
19818,
28,
80... |
pages++; | public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { response.setContentType("text/html; charset=utf-8"); if(isBogus != null) { PrintWriter out = response.getWriter(); out.println("<html>"); out.println("<head>"); out.println("<title>CLDR tool broken</title>"); out.println("</head>"); out.println("<body>"); out.println("<h1>CLDR Survey Tool is down, because:</h1>"); out.println("<tt>" + isBogus + "</tt><br />"); out.println("<hr />"); return; } WebContext ctx = new WebContext(request,response); pages++; if(ctx.field("vap").equals(vap)) { // if we have a Vetting Administration Password, special case doVap(ctx); } else if(ctx.field("dump").equals(vap)) { doDump(ctx); } else if(ctx.field("xpaths").length()>0) { doXpaths(ctx); } else { doSession(ctx); // Session-based Survey main } ctx.close(); } | 27800 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/27800/e43915ec846c0cc836e388e9a95f377ffa188dd8/SurveyMain.java/clean/tools/java/org/unicode/cldr/web/SurveyMain.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
23611,
12,
2940,
18572,
590,
16,
12446,
766,
13,
565,
1216,
1860,
16,
16517,
565,
288,
3639,
766,
18,
542,
8046,
2932,
955,
19,
2620,
31,
4856,
33,
3158,
17,
28,
8863,
7734,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
23611,
12,
2940,
18572,
590,
16,
12446,
766,
13,
565,
1216,
1860,
16,
16517,
565,
288,
3639,
766,
18,
542,
8046,
2932,
955,
19,
2620,
31,
4856,
33,
3158,
17,
28,
8863,
7734,
... | |
List sortedNodes = lattice.sortNodes(); Iterator i = sortedNodes.iterator(); | Collection nodes = lattice.nodes.values(); Iterator i = nodes.iterator(); | public Sausage makeSausage() { //TODO: this first loop should be taken out as soon as node have //proper starting times without it. Iterator n = lattice.getNodes().iterator(); while (n.hasNext()) { ((Node)n.next()).calculateBeginTime(); } Vector clusters = new Vector(lattice.getNodes().size()); List sortedNodes = lattice.sortNodes(); Iterator i = sortedNodes.iterator(); while(i.hasNext()) { Vector bucket = new Vector(1); bucket.add(i.next()); clusters.add(bucket); } intraWordCluster(clusters); interWordCluster(clusters); Sausage sausage = new Sausage(clusters.size()); ListIterator c1 = clusters.listIterator(); while (c1.hasNext()) { HashSet seenWords = new HashSet(); int index = c1.nextIndex(); List cluster = ((List)c1.next()); Iterator c2 = cluster.iterator(); while (c2.hasNext()) { Node node = (Node)c2.next(); Word word = node.getWord(); if (seenWords.contains(word.getSpelling())) { continue; } seenWords.add(word.getSpelling()); SimpleWordResult swr = new SimpleWordResult (node, wordSubClusterProbability(cluster,word.getSpelling()), lattice.getLogMath()); sausage.addWordHypothesis(index,swr); } } sausage.fillInBlanks(lattice.getLogMath()); return sausage; } | 48839 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48839/878af02c24c319eaf33da251329664cff2ccb2cb/SausageMaker.java/buggy/sphinx4/edu/cmu/sphinx/result/SausageMaker.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
348,
69,
9167,
1221,
55,
69,
9167,
1435,
288,
3639,
368,
6241,
30,
333,
1122,
2798,
1410,
506,
9830,
596,
487,
17136,
487,
756,
1240,
3639,
368,
22754,
5023,
4124,
2887,
518,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
348,
69,
9167,
1221,
55,
69,
9167,
1435,
288,
3639,
368,
6241,
30,
333,
1122,
2798,
1410,
506,
9830,
596,
487,
17136,
487,
756,
1240,
3639,
368,
22754,
5023,
4124,
2887,
518,
18,
... |
if(_debug) { | if(_log.isDebugEnabled()) { | private void processPersistenceMgrEntry(Entity manager) { String agent = manager.getName(); if(!_agents.contains(agent)) { AddressEntry entry = null; try { // look up the agent's info in the white pages entry = _wps.get(agent, WhitePagesUtil.WP_HTTP_TYPE); if(_debug) { _log.debug("address entry = " + entry); } } catch(Exception e) { // if an error occurs ignore this persistence manager _log.error("unable to get " + agent + " info from the white pages.", e); return; } if (entry == null) { if(_debug) { _log.debug("address entry is null for : " + agent); } return; } // construct the url for this persistence manager URI uri = entry.getURI(); String servletUrl = uri + PM_SERVLET_URI; // get all DNs associated with this agent Collection dns = null; try { dns = _keyRing.findDNFromNS(agent); } catch (Exception iox) { if (_log.isDebugEnabled()) { _log.debug("Failed to get PM name " + agent); } return; } Iterator i = dns.iterator(); while(i.hasNext()) { X500Name name = (X500Name)i.next(); addPolicy(createPolicy(servletUrl, name.getName())); } // only add the agent if haven't already if(dns.size() > 0) { _agents.add(agent); } } // if(!_agents.contains(pm)) } | 12869 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12869/119b9e4242e09518b33291f1eb55ffddda8d4a63/PersistenceMgrPolicyServiceImpl.java/clean/securityservices/src/org/cougaar/core/security/dataprotection/PersistenceMgrPolicyServiceImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1207,
13182,
9455,
1622,
12,
1943,
3301,
13,
288,
1377,
514,
4040,
273,
3301,
18,
17994,
5621,
1377,
309,
12,
5,
67,
23560,
18,
12298,
12,
5629,
3719,
288,
202,
1887,
1622,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1207,
13182,
9455,
1622,
12,
1943,
3301,
13,
288,
1377,
514,
4040,
273,
3301,
18,
17994,
5621,
1377,
309,
12,
5,
67,
23560,
18,
12298,
12,
5629,
3719,
288,
202,
1887,
1622,
1... |
problemView.selectCategoryField(groupingField, problemView .getMarkerAdapter().getCategorySorter()); getMarkerAdapter().getCategorySorter().saveState( getDialogSettings()); | if (isChecked()) { Job categoryJob = new Job(MarkerMessages.ProblemView_UpdateCategoryJob) { /* (non-Javadoc) * @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor) */ protected IStatus run(IProgressMonitor monitor) { try { markerProcessJob.join(); } catch (InterruptedException e) { return Status.CANCEL_STATUS; } problemView.selectCategoryField(groupingField, problemView .getMarkerAdapter().getCategorySorter()); getMarkerAdapter().getCategorySorter().saveState( getDialogSettings()); return Status.OK_STATUS; } }; categoryJob.setSystem(true); getProgressService().schedule(categoryJob); } | public void run() { problemView.selectCategoryField(groupingField, problemView .getMarkerAdapter().getCategorySorter()); getMarkerAdapter().getCategorySorter().saveState( getDialogSettings()); } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/8f673499d4aff638154657f99aaacae03fd203a6/ProblemView.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/ProblemView.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
918,
1086,
1435,
288,
1082,
202,
18968,
1767,
18,
4025,
4457,
974,
12,
25592,
974,
16,
6199,
1767,
6862,
202,
18,
588,
7078,
4216,
7675,
588,
4457,
24952,
10663,
1082,
202,
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,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
918,
1086,
1435,
288,
1082,
202,
18968,
1767,
18,
4025,
4457,
974,
12,
25592,
974,
16,
6199,
1767,
6862,
202,
18,
588,
7078,
4216,
7675,
588,
4457,
24952,
10663,
1082,
202,
588... |
if (element.getTextRange().getEndOffset() == element.getPsi().getContainingFile().getTextLength()) | if (element.getTextRange().getEndOffset() == element.getPsi().getContainingFile().getTextLength()) { | private static boolean hasNonEmptyNext(final ASTNode element) { ASTNode current = element.getTreeNext(); while (current != null) { if (current.getTextLength() > 0) { return true; } if (current.getElementType() == ElementType.WHITE_SPACE) { return false; } current = current.getTreeNext(); } if (element.getTextRange().getEndOffset() == element.getPsi().getContainingFile().getTextLength()) return element.getTreeNext() == null; return false; } | 12814 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12814/69cbdaa6919556b1e5e8c90f2564d9f88fb7549f/CodeEditUtil.java/buggy/source/com/intellij/psi/impl/source/codeStyle/CodeEditUtil.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
760,
1250,
711,
23176,
2134,
12,
6385,
9183,
907,
930,
13,
288,
565,
9183,
907,
783,
273,
930,
18,
588,
2471,
2134,
5621,
565,
1323,
261,
2972,
480,
446,
13,
288,
1377,
309,
261,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
760,
1250,
711,
23176,
2134,
12,
6385,
9183,
907,
930,
13,
288,
565,
9183,
907,
783,
273,
930,
18,
588,
2471,
2134,
5621,
565,
1323,
261,
2972,
480,
446,
13,
288,
1377,
309,
261,
... |
if (msgBox) { | if (osm instanceof Node) { String reason = deleteNodeAndJoinSegment((Node)osm); if (reason != null && msgBox) { JOptionPane.showMessageDialog(Main.parent, "Cannot delete node. "+reason); return; } } else if (msgBox) { | private void delete(Collection<OsmPrimitive> selection, boolean msgBox) { Collection<OsmPrimitive> del = new HashSet<OsmPrimitive>(); for (OsmPrimitive osm : selection) { CollectBackReferencesVisitor v = new CollectBackReferencesVisitor(Main.ds); osm.visit(v); if (!selection.containsAll(v.data)) { if (msgBox) { JOptionPane.showMessageDialog(Main.parent, "This object is in use."); return; } } else { del.addAll(v.data); del.add(osm); } } if (!del.isEmpty()) Main.main.editLayer().add(new DeleteCommand(del)); } | 2204 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2204/d1708eb3caf2beef8ea823068878cbfd80d8ca72/DeleteAction.java/buggy/src/org/openstreetmap/josm/actions/mapmode/DeleteAction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1430,
12,
2532,
32,
51,
4808,
9840,
34,
4421,
16,
1250,
1234,
3514,
13,
288,
202,
202,
2532,
32,
51,
4808,
9840,
34,
1464,
273,
394,
6847,
32,
51,
4808,
9840,
34,
5621... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1430,
12,
2532,
32,
51,
4808,
9840,
34,
4421,
16,
1250,
1234,
3514,
13,
288,
202,
202,
2532,
32,
51,
4808,
9840,
34,
1464,
273,
394,
6847,
32,
51,
4808,
9840,
34,
5621... |
if (!shouldDeferToOverridePath(foundExtension.getDescriptor(), | if (!isOverridingExtensionInSet(foundExtension.getDescriptor(), | private Object[] internalGetChildren(Object aParentElementOrPath) { Object aParentElement = internalAsElement(aParentElementOrPath); Set enabledExtensions = contentService .findContentExtensionsByTriggerPoint(aParentElement); if (enabledExtensions.size() == 0) { return NO_CHILDREN; } ContributorTrackingSet finalChildrenSet = new ContributorTrackingSet(contentService); ContributorTrackingSet localSet = new ContributorTrackingSet(contentService); Object[] contributedChildren = null; NavigatorContentExtension foundExtension; NavigatorContentExtension[] overridingExtensions; for (Iterator itr = enabledExtensions.iterator(); itr.hasNext();) { foundExtension = (NavigatorContentExtension) itr.next(); try { if (!shouldDeferToOverridePath(foundExtension.getDescriptor(), enabledExtensions)) { contributedChildren = foundExtension.internalGetContentProvider() .getChildren(aParentElementOrPath); overridingExtensions = foundExtension .getOverridingExtensionsForTriggerPoint(aParentElement); localSet.setContents(contributedChildren); if (overridingExtensions.length > 0) { // TODO: could pass tree path through pipeline localSet = pipelineChildren(aParentElement, overridingExtensions, localSet); } finalChildrenSet.addAll(localSet); } } catch (RuntimeException re) { NavigatorPlugin .logError( 0, NLS .bind( CommonNavigatorMessages.Could_not_provide_children_for_element, new Object[] { foundExtension .getDescriptor() .getId() }), re); } catch (Error e) { NavigatorPlugin .logError( 0, NLS .bind( CommonNavigatorMessages.Could_not_provide_children_for_element, new Object[] { foundExtension .getDescriptor() .getId() }), e); } } return finalChildrenSet.toArray(); } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/760f9bf6c2e4d21502cb533a888c5fe64e58bdf8/NavigatorContentServiceContentProvider.java/buggy/bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/NavigatorContentServiceContentProvider.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
1033,
8526,
2713,
967,
4212,
12,
921,
279,
3054,
1046,
16383,
13,
288,
202,
202,
921,
279,
3054,
1046,
273,
2713,
1463,
1046,
12,
69,
3054,
1046,
16383,
1769,
202,
202,
694,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1033,
8526,
2713,
967,
4212,
12,
921,
279,
3054,
1046,
16383,
13,
288,
202,
202,
921,
279,
3054,
1046,
273,
2713,
1463,
1046,
12,
69,
3054,
1046,
16383,
1769,
202,
202,
694,
... |
setAltKey(null); | private void evaluateExpressions() throws JspException { try { setAccesskey((String) evalAttr("accessKey", getAccesskey(), String.class)); } catch (NullAttributeException ex) { setAccesskey(null); } try { setAlt((String) evalAttr("alt", getAlt(), String.class)); } catch (NullAttributeException ex) { setAlt(null); } try { setAltKey((String) evalAttr("altKey", getAltKey(), String.class)); } catch (NullAttributeException ex) { setAltKey(null); } try { setDisabled(((Boolean) evalAttr("disabled", getDisabledExpr(), Boolean.class)). booleanValue()); } catch (NullAttributeException ex) { setDisabled(false); } try { setIndexed(((Boolean) evalAttr("indexed", getIndexedExpr(), Boolean.class)). booleanValue()); } catch (NullAttributeException ex) { setIndexed(false); } try { setMaxlength((String) evalAttr("maxlength", getMaxlength(), String.class)); } catch (NullAttributeException ex) { setMaxlength(null); } try { setName((String) evalAttr("name", getName(), String.class)); } catch (NullAttributeException ex) { setName(null); } try { setOnblur((String) evalAttr("onblur", getOnblur(), String.class)); } catch (NullAttributeException ex) { setOnblur(null); } try { setOnchange((String) evalAttr("onchange", getOnchange(), String.class)); } catch (NullAttributeException ex) { setOnchange(null); } try { setOnclick((String) evalAttr("onclick", getOnclick(), String.class)); } catch (NullAttributeException ex) { setOnclick(null); } try { setOndblclick((String) evalAttr("ondblclick", getOndblclick(), String.class)); } catch (NullAttributeException ex) { setOndblclick(null); } try { setOnfocus((String) evalAttr("onfocus", getOnfocus(), String.class)); } catch (NullAttributeException ex) { setOnfocus(null); } try { setOnkeydown((String) evalAttr("onkeydown", getOnkeydown(), String.class)); } catch (NullAttributeException ex) { setOnkeydown(null); } try { setOnkeypress((String) evalAttr("onkeypress", getOnkeypress(), String.class)); } catch (NullAttributeException ex) { setOnkeypress(null); } try { setOnkeyup((String) evalAttr("onkeyup", getOnkeyup(), String.class)); } catch (NullAttributeException ex) { setOnkeyup(null); } try { setOnmousedown((String) evalAttr("onmousedown", getOnmousedown(), String.class)); } catch (NullAttributeException ex) { setOnmousedown(null); } try { setOnmousemove((String) evalAttr("onmousemove", getOnmousemove(), String.class)); } catch (NullAttributeException ex) { setOnmousemove(null); } try { setOnmouseout((String) evalAttr("onmouseout", getOnmouseout(), String.class)); } catch (NullAttributeException ex) { setOnmouseout(null); } try { setOnmouseover((String) evalAttr("onmouseover", getOnmouseover(), String.class)); } catch (NullAttributeException ex) { setOnmouseover(null); } try { setOnmouseup((String) evalAttr("onmouseup", getOnmouseup(), String.class)); } catch (NullAttributeException ex) { setOnmouseup(null); } try { setProperty((String) evalAttr("property", getProperty(), String.class)); } catch (NullAttributeException ex) { setProperty(null); } try { setReadonly(((Boolean) evalAttr("readonly", getReadonlyExpr(), Boolean.class)). booleanValue()); } catch (NullAttributeException ex) { setReadonly(false); } try { setStyle((String) evalAttr("style", getStyle(), String.class)); } catch (NullAttributeException ex) { setStyle(null); } try { setSize((String) evalAttr("size", getSize(), String.class)); } catch (NullAttributeException ex) { setSize(null); } try { setStyleClass((String) evalAttr("styleClass", getStyleClass(), String.class)); } catch (NullAttributeException ex) { setStyleClass(null); } try { setStyleId((String) evalAttr("styleId", getStyleId(), String.class)); } catch (NullAttributeException ex) { setStyleId(null); } try { setTabindex((String) evalAttr("tabindex", getTabindex(), String.class)); } catch (NullAttributeException ex) { setTabindex(null); } try { setTitle((String) evalAttr("title", getTitle(), String.class)); } catch (NullAttributeException ex) { setTitle(null); } try { setTitleKey((String) evalAttr("titleKey", getTitleKey(), String.class)); } catch (NullAttributeException ex) { setTitleKey(null); } try { setValue((String) evalAttr("value", getValue(), String.class)); } catch (NullAttributeException ex) { setValue(null); } } | 48068 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48068/db064e19656421b94aaf753550935d95f44bd5f9/ELTextTag.java/buggy/contrib/struts-el/src/share/org/apache/strutsel/taglib/html/ELTextTag.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
5956,
8927,
1435,
1216,
27485,
288,
3639,
775,
288,
5411,
444,
1862,
856,
12443,
780,
13,
5302,
3843,
2932,
3860,
653,
3113,
21909,
856,
9334,
4766,
6647,
514,
18,
1106,
10019,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
5956,
8927,
1435,
1216,
27485,
288,
3639,
775,
288,
5411,
444,
1862,
856,
12443,
780,
13,
5302,
3843,
2932,
3860,
653,
3113,
21909,
856,
9334,
4766,
6647,
514,
18,
1106,
10019,
... | |
if (labelText.length() <= underlinedChar) | if (labelText != null && labelText.length() <= underlinedChar) | public void setText(String text) { if (text != labelText) { String oldText = labelText; labelText = text; firePropertyChange(TEXT_CHANGED_PROPERTY, oldText, labelText); if (labelText.length() <= underlinedChar) setDisplayedMnemonicIndex(labelText.length() - 1); } } | 25337 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/25337/14511e3ad21013e92c6399b2bd2ec09a8263e33a/JLabel.java/buggy/libjava/javax/swing/JLabel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
7883,
12,
780,
977,
13,
225,
288,
565,
309,
261,
955,
480,
1433,
1528,
13,
1377,
288,
202,
780,
1592,
1528,
273,
1433,
1528,
31,
202,
1925,
1528,
273,
977,
31,
202,
12179,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7883,
12,
780,
977,
13,
225,
288,
565,
309,
261,
955,
480,
1433,
1528,
13,
1377,
288,
202,
780,
1592,
1528,
273,
1433,
1528,
31,
202,
1925,
1528,
273,
977,
31,
202,
12179,
... |
if ((tpcalleventcriteria.CallEventName | byte0) == byte0){ return;} | if ((tpcalleventcriteria.CallEventName | byte0) == byte0) { return; } | private void callEventCriteria(TpCallEventCriteria tpcalleventcriteria) throws P_INVALID_CRITERIA, P_INVALID_EVENT_TYPE { if (tpcalleventcriteria.MonitorMode == TpCallMonitorMode.P_CALL_MONITOR_MODE_DO_NOT_MONITOR) throw new P_INVALID_CRITERIA("DO_NOT_MONITOR is invalid here"); byte byte0 = 6; if ((tpcalleventcriteria.CallEventName | byte0) == byte0){ return;} if ((tpcalleventcriteria.CallEventName & 1) != 0) throw new P_INVALID_EVENT_TYPE( "P_EVENT_GCCS_OFFHOOK_EVENT not supported"); else return; } | 9163 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9163/84d21abd4bd3ae80642f1ce9e4de17a57ea87a27/IpCallControlManagerImpl.java/buggy/gccs/src/group5/server/IpCallControlManagerImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
745,
1133,
7231,
12,
56,
84,
1477,
1133,
7231,
8071,
771,
298,
616,
9714,
13,
1082,
202,
15069,
453,
67,
9347,
67,
5093,
11844,
15188,
16,
453,
67,
9347,
67,
10454,
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,
225,
202,
1152,
918,
745,
1133,
7231,
12,
56,
84,
1477,
1133,
7231,
8071,
771,
298,
616,
9714,
13,
1082,
202,
15069,
453,
67,
9347,
67,
5093,
11844,
15188,
16,
453,
67,
9347,
67,
10454,
67,
... |
if(_children == null) update(); | if (_children == null) update(); | public Enumeration children() { if(_children == null) update(); return new EnumerationAdapter(_children.iterator()); } | 7166 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7166/ca3bcb5d6dd283c4553bcbfe50b108dc5d499768/UMLMetaclassInstanceTreeNode.java/buggy/src_new/org/argouml/uml/ui/UMLMetaclassInstanceTreeNode.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
13864,
2325,
1435,
288,
3639,
309,
261,
67,
5906,
422,
446,
13,
1089,
5621,
3639,
327,
394,
13864,
4216,
24899,
5906,
18,
9838,
10663,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
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,
13864,
2325,
1435,
288,
3639,
309,
261,
67,
5906,
422,
446,
13,
1089,
5621,
3639,
327,
394,
13864,
4216,
24899,
5906,
18,
9838,
10663,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-10... |
public void initIO() | public void init () | public void init() { add(new FeedbackLoop() { public void init() { setDelay(2); setJoiner(WEIGHTED_ROUND_ROBIN(0, 1)); setBody(new Filter() { Channel input = new Channel(Integer.TYPE, 2); Channel output = new Channel(Integer.TYPE, 3); public void work() { int a = input.popInt(); int b = input.popInt(); int result = a + b; output.pushInt(result); output.pushInt(b); output.pushInt(result); } public void initIO() { this.streamInput = input; this.streamOutput = output; } public void init () { } }); setLoop(new Filter() { Channel input = new Channel(Integer.TYPE, 1); Channel output = new Channel(Integer.TYPE, 1); public void work() { output.pushInt(input.popInt()); } public void initIO() { this.streamInput = input; this.streamOutput = output; } public void init () { } }); setSplitter(WEIGHTED_ROUND_ROBIN(1, 2)); } public int initPathInt(int index) { return index; } }); add (new Filter () { Channel input = new Channel (Integer.TYPE, 1); public void initIO () { this.streamInput = input; } public void work () { System.out.println (input.popInt ()); } public void init () { } }); } | 47772 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47772/e4e63e1768c1661823f004fc6e0b62737906e716/Fib2.java/buggy/streams/apps/examples/fib/Fib2.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1208,
1435,
565,
288,
3639,
527,
12,
2704,
14013,
823,
6452,
1435,
5411,
288,
7734,
1071,
918,
1208,
1435,
7734,
288,
10792,
444,
6763,
12,
22,
1769,
10792,
444,
4572,
264,
12,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1208,
1435,
565,
288,
3639,
527,
12,
2704,
14013,
823,
6452,
1435,
5411,
288,
7734,
1071,
918,
1208,
1435,
7734,
288,
10792,
444,
6763,
12,
22,
1769,
10792,
444,
4572,
264,
12,... |
if (step.getMpUsed() > entity.getRunMP(false)) { | if (step.getMpUsed() > entity.getRunMP(false) && !step.isOnlyPavement()) { | private String doPSRCheck(MovePath md) { StringBuffer nagReport = new StringBuffer(); final Entity entity = ce(); // okay, proceed with movement calculations Coords lastPos = entity.getPosition(); Coords curPos = entity.getPosition(); int curFacing = entity.getFacing(); int distance = 0; int moveType = Entity.MOVE_NONE; int overallMoveType = Entity.MOVE_NONE; boolean firstStep; int prevFacing = curFacing; Hex prevHex = null; final boolean isInfantry = (entity instanceof Infantry); PilotingRollData rollTarget; // Compile the move md.compileLastStep(); overallMoveType = md.getLastStepMovementType(); // iterate through steps firstStep = true; /* Bug 754610: Revert fix for bug 702735. */ MoveStep prevStep = null; for (final Enumeration i = md.getSteps(); i.hasMoreElements();) { final MoveStep step = (MoveStep)i.nextElement(); boolean isPavementStep = step.isPavementStep(); // stop for illegal movement if (step.getMovementType() == Entity.MOVE_ILLEGAL) { break; } // check piloting skill for getting up rollTarget = entity.checkGetUp(step); if (rollTarget.getValue() != TargetRoll.CHECK_FALSE) { nagReport.append(addNag(rollTarget)); } else if (firstStep) { // running with destroyed hip or gyro needs a check rollTarget = entity.checkRunningWithDamage(overallMoveType); if (rollTarget.getValue() != TargetRoll.CHECK_FALSE) { nagReport.append(addNag(rollTarget)); } } // set most step parameters moveType = step.getMovementType(); distance = step.getDistance(); // set last step parameters curPos = step.getPosition(); curFacing = step.getFacing(); final Hex curHex = client.game.board.getHex(curPos); // Check for skid. rollTarget = entity.checkSkid(moveType, prevHex, overallMoveType, prevStep, prevFacing, curFacing, lastPos, curPos, isInfantry, distance); if (rollTarget.getValue() != TargetRoll.CHECK_FALSE) { // Have an entity-meaningful PSR message. nagReport.append(addNag(rollTarget)); } // check if we've moved into rubble rollTarget = entity.checkRubbleMove(step, curHex, lastPos, curPos); if (rollTarget.getValue() != TargetRoll.CHECK_FALSE) { nagReport.append(addNag(rollTarget)); } // check if we've moved into water rollTarget = entity.checkWaterMove(step, curHex, lastPos, curPos, isPavementStep); if (rollTarget.getValue() != TargetRoll.CHECK_FALSE) { nagReport.append(addNag(rollTarget)); } // check if we used more MPs than the Mech/Vehicle would have in normal gravity if (!i.hasMoreElements() && !firstStep) { if (entity instanceof Mech) { if ((step.getMovementType() == Entity.MOVE_WALK) || (step.getMovementType() == Entity.MOVE_RUN)) { if (step.getMpUsed() > entity.getRunMP(false)) { rollTarget = entity.checkMovedTooFast(step); if (rollTarget.getValue() != TargetRoll.CHECK_FALSE) { nagReport.append(addNag(rollTarget)); } } } else if (step.getMovementType() == Entity.MOVE_JUMP) { if (step.getMpUsed() > entity.getOriginalJumpMP()) { rollTarget = entity.checkMovedTooFast(step); if (rollTarget.getValue() != TargetRoll.CHECK_FALSE) { nagReport.append(addNag(rollTarget)); } } } } else if (entity instanceof Tank) { if ((step.getMovementType() == Entity.MOVE_WALK) || (step.getMovementType() == Entity.MOVE_RUN)) { if (step.getMpUsed() > entity.getRunMP(false)) { rollTarget = entity.checkMovedTooFast(step); if (rollTarget.getValue() != TargetRoll.CHECK_FALSE) { nagReport.append(addNag(rollTarget)); } } } } } // Handle non-infantry moving into a building. if (entity.checkMovementInBuilding(lastPos, curPos, step, curHex, prevHex)) { // Get the building being exited. // TODO: allow units to climb on top of buildings. Building bldgExited = client.game.board.getBuildingAt( lastPos ); // Get the building being entered. // TODO: allow units to climb on top of buildings. Building bldgEntered = client.game.board.getBuildingAt( curPos ); if ( bldgExited != null && bldgEntered != null && !bldgExited.equals(bldgEntered) ) { // Exiting one building and entering another. // Brave, aren't we? rollTarget = entity.rollMovementInBuilding(bldgExited, distance, "exiting"); nagReport.append(addNag(rollTarget)); rollTarget = entity.rollMovementInBuilding(bldgEntered, distance, "entering"); nagReport.append(addNag(rollTarget)); } else { Building bldg; if (bldgEntered == null) { // Exiting a building. bldg = bldgExited; } else { // Entering or moving within a building. bldg = bldgEntered; } rollTarget = entity.rollMovementInBuilding(bldg, distance, ""); nagReport.append(addNag(rollTarget)); } } if (step.getType() == MovePath.STEP_GO_PRONE) { rollTarget = entity.checkDislodgeSwarmers(); if (rollTarget.getValue() != TargetRoll.CHECK_FALSE) { nagReport.append(addNag(rollTarget)); } } // update lastPos, prevStep, prevFacing & prevHex lastPos = new Coords(curPos); prevStep = step; /* Bug 754610: Revert fix for bug 702735. if (prevHex != null && !curHex.equals(prevHex)) { */ if (!curHex.equals(prevHex)) { prevFacing = curFacing; } prevHex = curHex; firstStep = false; } // but the danger isn't over yet! landing from a jump can be risky! if (overallMoveType == Entity.MOVE_JUMP && !entity.isMakingDfa()) { // check for damaged criticals rollTarget = entity.checkLandingWithDamage(); if (rollTarget.getValue() != TargetRoll.CHECK_FALSE) { nagReport.append(addNag(rollTarget)); } // jumped into water? int waterLevel = client.game.board.getHex(curPos).levelOf(Terrain.WATER); rollTarget = entity.checkWaterMove(waterLevel); if (rollTarget.getValue() != TargetRoll.CHECK_FALSE) { nagReport.append(addNag(rollTarget)); } } return nagReport.toString(); } | 4135 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4135/32f1d4022f1eca3c83e1c5b35ea1c1ef18372b0a/MovementDisplay.java/buggy/megamek/src/megamek/client/ui/AWT/MovementDisplay.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
514,
741,
5857,
54,
1564,
12,
7607,
743,
3481,
13,
288,
3639,
6674,
290,
346,
4820,
273,
394,
6674,
5621,
3639,
727,
3887,
1522,
273,
5898,
5621,
3639,
368,
21194,
16,
11247,
598,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
514,
741,
5857,
54,
1564,
12,
7607,
743,
3481,
13,
288,
3639,
6674,
290,
346,
4820,
273,
394,
6674,
5621,
3639,
727,
3887,
1522,
273,
5898,
5621,
3639,
368,
21194,
16,
11247,
598,
... |
"B", 1, "-B <classifier specification>")); | "W", 1, "-W <classifier specification>")); | public Enumeration listOptions() { Vector newVector = new Vector(4); newVector.addElement(new Option( "\tFull class name of classifier to use, followed\n" + "\tby scheme options. (required)\n" + "\teg: \"weka.classifiers.bayes.NaiveBayes -D\"", "B", 1, "-B <classifier specification>")); newVector.addElement(new Option( "\tSpecify shrinkage rate. " +"(default=1.0, ie. no shrinkage)\n", "S", 1, "-S")); newVector.addElement(new Option( "\tTurn on debugging output.", "D", 0, "-D")); newVector.addElement(new Option( "\tSpecify max models to generate. " +"(default = -1, ie. no max; keep going until error reduction threshold " +"is reached)\n", "M", 1, "-M")); return newVector.elements(); } | 4773 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4773/cfd8086e0d1d71e78afaf5aa4cbaacfc6756880e/AdditiveRegression.java/buggy/weka/classifiers/meta/AdditiveRegression.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
13864,
666,
1320,
1435,
288,
565,
5589,
394,
5018,
273,
394,
5589,
12,
24,
1769,
565,
394,
5018,
18,
1289,
1046,
12,
2704,
2698,
12,
202,
1377,
1548,
88,
5080,
667,
508,
434,
1462... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
13864,
666,
1320,
1435,
288,
565,
5589,
394,
5018,
273,
394,
5589,
12,
24,
1769,
565,
394,
5018,
18,
1289,
1046,
12,
2704,
2698,
12,
202,
1377,
1548,
88,
5080,
667,
508,
434,
1462... |
public boolean isEnabled() { return false; } | public boolean isEnabled() { return Component.this.isEnabled(); } | public boolean isEnabled() { return false; } | 47947 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47947/fb0219dcce2e53020800c655562b5f7351b0579b/Component.java/clean/java/awt/Component.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
12047,
1435,
288,
327,
629,
31,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1250,
12047,
1435,
288,
327,
629,
31,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
return filter.testAttribute(object, name, value); } | return filter.testAttribute(object, name, value); } | private boolean preciselyMatches(Object object) { // Get the action filter. IActionFilter filter = getActionFilter(object); if (filter == null) return false; // Run the action filter. return filter.testAttribute(object, name, value); } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/5cfb5f88a049bbc9efcf0fade7d5687d0ec50ed3/ActionExpression.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ActionExpression.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
3238,
1250,
13382,
291,
2357,
6869,
12,
921,
733,
13,
288,
5411,
368,
968,
326,
1301,
1034,
18,
5411,
467,
1803,
1586,
1034,
273,
12473,
1586,
12,
1612,
1769,
5411,
309,
261,
2188,
422,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
3238,
1250,
13382,
291,
2357,
6869,
12,
921,
733,
13,
288,
5411,
368,
968,
326,
1301,
1034,
18,
5411,
467,
1803,
1586,
1034,
273,
12473,
1586,
12,
1612,
1769,
5411,
309,
261,
2188,
422,
... |
log.info( "#######################################" ); log.info( "starting test server " + getName() ); | log.debug( "#######################################" ); log.debug( "starting test server " + getName() ); | public void start() throws Exception { log.info( "#######################################" ); log.info( "starting test server " + getName() ); Dispatcher dispatcher = getMasterDispatcher(); this.runner.setTestServerName( getName() ); if (dispatcher == null) { throw new MissingPropertyException(this, "masterDispatcher"); } // start the test running getRunner().run(xml, jvmName); log.info( "tellilng master that " + getName() + " has " + getRunner().getManager().getNumSynchronizableTBeans() ); getMasterDispatcher().dispatch(new TestNodeLaunchedCommand(getName(), getRunner().getManager().getNumSynchronizableTBeans())); //getRunner().getManager().run(); } | 4523 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4523/c2bb4286b0028cde19d8c4c590aef29b984fc132/TestServer.java/clean/sysunit-old/src/java/org/sysunit/command/test/TestServer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
787,
1435,
1216,
1185,
288,
3639,
613,
18,
1376,
12,
315,
10140,
1970,
13151,
6,
11272,
3639,
613,
18,
1376,
12,
315,
18526,
1842,
1438,
315,
397,
1723,
1435,
11272,
377,
202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
787,
1435,
1216,
1185,
288,
3639,
613,
18,
1376,
12,
315,
10140,
1970,
13151,
6,
11272,
3639,
613,
18,
1376,
12,
315,
18526,
1842,
1438,
315,
397,
1723,
1435,
11272,
377,
202,
... |
public org.quickfix.field.AgreementDesc getAgreementDesc() throws FieldNotFound { org.quickfix.field.AgreementDesc value = new org.quickfix.field.AgreementDesc(); | public quickfix.field.AgreementDesc getAgreementDesc() throws FieldNotFound { quickfix.field.AgreementDesc value = new quickfix.field.AgreementDesc(); | public org.quickfix.field.AgreementDesc getAgreementDesc() throws FieldNotFound { org.quickfix.field.AgreementDesc value = new org.quickfix.field.AgreementDesc(); getField(value); return value; } | 8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/QuoteStatusRequest.java/clean/src/java/src/quickfix/fix44/QuoteStatusRequest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
17420,
4217,
336,
17420,
4217,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
17420,
4217,
460,
273,
394,
2358,
18,
19525,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
17420,
4217,
336,
17420,
4217,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
17420,
4217,
460,
273,
394,
2358,
18,
19525,... |
test.add(new Integer(0)); int nonExp = 0; | test.add(new Integer(-1)); int nonExp = -1; | public void testNulls(){ // Each method should return a null or an empty set as appropriate //TODO getHb().findCGCIHierarchies( ); //TODO generate OMENullData(); and use it here. //TODO OMEData toString(); Set test = new HashSet(); test.add(new Integer(0)); // Non-existence set of ids int nonExp = 0; // Non-existence experimenter ID // assertTrue(emptyColl,getHb().findDatasetAnnotations(test).size()==0); assertTrue(emptyColl,getHb().findDatasetAnnotations(new HashSet()).size()==0); // assertTrue(emptyColl,getHb().findDatasetAnnotationsForExperimenter(test,nonExp).size()==0); assertTrue(emptyColl,getHb().findDatasetAnnotationsForExperimenter(new HashSet(),nonExp).size()==0); // assertTrue(emptyColl,getHb().findImageAnnotations(test).size()==0); assertTrue(emptyColl,getHb().findImageAnnotations(new HashSet()).size()==0); // assertTrue(emptyColl,getHb().findImageAnnotationsForExperimenter(test,nonExp).size()==0); assertTrue(emptyColl,getHb().findImageAnnotationsForExperimenter(new HashSet(),nonExp).size()==0); // assertTrue(emptyColl,getHb().findPDIHierarchies(test).size()==0); assertTrue(emptyColl,getHb().findPDIHierarchies(new HashSet()).size()==0); // assertNull(nullObj,getHb().loadCGCIHierarchy(CategoryGroup.class, 0)); assertNull(nullObj,getHb().loadCGCIHierarchy(Category.class, 0)); // assertNull(nullObj,getHb().loadPDIHierarchy(Project.class, 0)); assertNull(nullObj,getHb().loadPDIHierarchy(Dataset.class, 0)); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/2bc67970abd041b6cb8e0252d02a6e27f304bec4/AbstractOmeroHierarchyBrowserIntegrationTest.java/buggy/components/common/src/org/openmicroscopy/omero/tests/AbstractOmeroHierarchyBrowserIntegrationTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
31326,
1435,
95,
3639,
368,
8315,
707,
1410,
327,
279,
446,
578,
392,
1008,
444,
487,
5505,
3639,
368,
6241,
7628,
70,
7675,
4720,
20585,
7266,
44,
5148,
606,
12,
202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
31326,
1435,
95,
3639,
368,
8315,
707,
1410,
327,
279,
446,
578,
392,
1008,
444,
487,
5505,
3639,
368,
6241,
7628,
70,
7675,
4720,
20585,
7266,
44,
5148,
606,
12,
202,
... |
if (majorCode < 0 || majorCode >= fgMessageKeys.length) { | if ( majorCode < 0 || majorCode >= fgMessageKeys.length ) { | public String createMessage(Locale locale, int majorCode, int minorCode, Object args[]) { boolean throwex = false; if (fResourceBundle == null || locale != fLocale) { if (locale != null) fResourceBundle = ListResourceBundle.getBundle("org.apache.xerces.msg.DatatypeMessages", locale); if (fResourceBundle == null) fResourceBundle = ListResourceBundle.getBundle("org.apache.xerces.msg.DatatypeMessages"); } if (majorCode < 0 || majorCode >= fgMessageKeys.length) { majorCode = MSG_BAD_MAJORCODE; throwex = true; } String msgKey = fgMessageKeys[majorCode]; String msg = fResourceBundle.getString(msgKey); if (args != null) { try { msg = java.text.MessageFormat.format(msg, args); } catch (Exception e) { msg = fResourceBundle.getString(fgMessageKeys[MSG_FORMAT_FAILURE]); msg += " " + fResourceBundle.getString(msgKey); } } if (throwex) { throw new RuntimeException(msg); } return msg; } | 4434 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4434/38d73cf7c0d35586a71e68d0fe233c425d82b6bd/DatatypeMessageProvider.java/buggy/src/org/apache/xerces/validators/datatype/DatatypeMessageProvider.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
23836,
12,
3916,
2573,
16,
509,
7888,
1085,
16,
509,
8439,
1085,
16,
1033,
833,
63,
5717,
288,
3639,
1250,
604,
338,
273,
629,
31,
3639,
309,
261,
74,
18731,
422,
446,
747,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
23836,
12,
3916,
2573,
16,
509,
7888,
1085,
16,
509,
8439,
1085,
16,
1033,
833,
63,
5717,
288,
3639,
1250,
604,
338,
273,
629,
31,
3639,
309,
261,
74,
18731,
422,
446,
747,
... |
public void visitArgsCatNode(Node iVisited) { visit(iVisited); leave(iVisited); } | public void visitArgsCatNode(Node iVisited) { visit(iVisited); leave(iVisited); } | public void visitArgsCatNode(Node iVisited) { visit(iVisited); leave(iVisited); } | 46770 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46770/d31a76ee29d5978a9bec41e3ac9134cee024bcab/NodeVisitorAdapter.java/clean/org/jruby/nodes/NodeVisitorAdapter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
3757,
2615,
11554,
907,
12,
907,
277,
30019,
13,
202,
95,
202,
202,
11658,
12,
77,
30019,
1769,
202,
202,
19574,
12,
77,
30019,
1769,
202,
97,
2,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
3757,
2615,
11554,
907,
12,
907,
277,
30019,
13,
202,
95,
202,
202,
11658,
12,
77,
30019,
1769,
202,
202,
19574,
12,
77,
30019,
1769,
202,
97,
2,
-100,
-100,
-100,
-100,
... |
"examples.DataOperationWithBindVariables"); | "examples.DataOperationWithBindVariables"); | public void testDataOperationWithBindVariables() { DataOperation operation = getSession(). retrieveDataOperation("examples.DataOperationWithBindVariables"); // neither variable being bound should throw a PersistenceException try { operation.execute(); fail("calling operation.execute should have failed because no " + "variables were bound"); } catch (PersistenceException e) { // this is the correct behavior } // bind only "priority" operation.setParameter("priority", new BigDecimal(3)); try { operation.execute(); fail("calling operation.execute should have failed because only " + "'priority' was bound"); } catch (PersistenceException e) { // this is the correct behavior } // bind only "description" // we want a new operation operation = getSession().retrieveDataOperation( "examples.DataOperationWithBindVariables"); operation.setParameter("description", "wrote"); try { operation.execute(); fail("calling operation.execute should have failed because only " + "'description' was bound"); } catch (PersistenceException e) { // this is the correct behavior } // bind both description and priority // we want a new operation operation.setParameter("priority", new BigDecimal(3)); try { operation.execute(); fail("calling operation.execute should have failed because only " + "'priority' was bound"); } catch (PersistenceException e) { // this is the correct behavior } // binding all three variables operation = getSession().retrieveDataOperation( "examples.DataOperationWithBindVariables"); operation.setParameter("priority", new BigDecimal(30000)); operation.setParameter("description", "wrote"); operation.setParameter("currentPriority", new BigDecimal(8)); // let's make sure that there are not currently any items with the // high priority to so that we are sure that our query works DataQuery query = getSession().retrieveQuery( "examples.DataQueryWithBindVariables"); query.setParameter("priority", new BigDecimal(29999)); query.setParameter("description", "wrote"); try { assert(query.size() == 0); } catch (PersistenceException e) { // this is the correct behavior } // this should succeed operation.execute(); // let's make sure it succeeded query = getSession().retrieveQuery("examples.DataQueryWithBindVariables"); query.setParameter("priority", new BigDecimal(29999)); try { assert(query.size() > 0); } catch (PersistenceException e) { // this is the correct behavior } query.setParameter("description", "wrote"); // let's undo the update operation = getSession().retrieveDataOperation( "examples.DataOperationWithBindVariables"); operation.setParameter("priority", new BigDecimal(9)); operation.setParameter("description", "wrote"); operation.setParameter("currentPriority", "29999"); // Test the ability to get out the parameter values assert("The retrieved value for 'description' was not correct", "wrote".equals(operation.getParameter("description").toString())); assert("The retrieved value for 'priority' was not correct", "9".equals(operation.getParameter("priority").toString())); assert("The retrieved value for 'priority' was not correct", "29999".equals(operation.getParameter("currentPriority").toString())); // try to get a parameter that does not exist assert("Trying to get a non-existent parameter actually returned " + "something besides null", null == operation.getParameter("this does not exist")); } | 12196 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12196/558097820abc0198518796cedde797658cda9a5e/DataOperationTest.java/clean/archive/core-platform/test/src/com/arsdigita/persistence/DataOperationTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
751,
2988,
1190,
3357,
6158,
1435,
288,
3639,
1910,
2988,
1674,
273,
7183,
7675,
5411,
4614,
751,
2988,
2932,
16858,
18,
751,
2988,
1190,
3357,
6158,
8863,
6647,
368,
15826... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
751,
2988,
1190,
3357,
6158,
1435,
288,
3639,
1910,
2988,
1674,
273,
7183,
7675,
5411,
4614,
751,
2988,
2932,
16858,
18,
751,
2988,
1190,
3357,
6158,
8863,
6647,
368,
15826... |
try { st.executeUpdate("drop table "+getTableName()); } catch(SQLException se) { } st.executeUpdate("create table "+getTableName()+" ("+columns+")"); st.close(); } catch(SQLException ex) { | st.executeUpdate( "create table " + table + " (" + columns + ")" ); } finally { st.close(); } } catch(SQLException ex) { | public static void closeDB(Connection conn) { try { if(conn!=null) conn.close(); } catch(SQLException ex) { TestCase.assert(ex.getMessage(),false); } } /** * Helper - creates a test table for use by a test */ public static void createTable(Connection conn,String columns) { try { Statement st = conn.createStatement(); // Ignore the drop try { st.executeUpdate("drop table "+getTableName()); } catch(SQLException se) { } // Now create the table st.executeUpdate("create table "+getTableName()+" ("+columns+")"); st.close(); } catch(SQLException ex) { | 11803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11803/b6385efb7907e1aefe65a699bb1fcc115d98ee23/JDBC2Tests.java/buggy/src/interfaces/jdbc/org/postgresql/test/JDBC2Tests.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
918,
1746,
2290,
12,
1952,
1487,
13,
288,
565,
775,
288,
1377,
309,
12,
4646,
5,
33,
2011,
13,
3639,
1487,
18,
4412,
5621,
565,
289,
1044,
12,
23116,
431,
13,
288,
1377,
77... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
918,
1746,
2290,
12,
1952,
1487,
13,
288,
565,
775,
288,
1377,
309,
12,
4646,
5,
33,
2011,
13,
3639,
1487,
18,
4412,
5621,
565,
289,
1044,
12,
23116,
431,
13,
288,
1377,
77... |
svb.insert(0, "VERSION " + (String) value); | if (svb != null) { svb.insert(11, (String) value); } else { svb = new StringBuffer("VERSION " + (String) value); } | public void addSequenceProperty(Object key, Object value) throws ParseException { if (key.equals("LOCUS")) { idb.setLength(0); idb.append("LOCUS " + (String) value); } else if (key.equals("TYPE")) { typeb.append(value); } else if (key.equals("DIVISION")) { divb.append(value); } else if (key.equals("CIRCULAR")) { circb.append(value); } else if (key.equals("DT") || key.equals("MDAT")) { if (value instanceof ArrayList) { mdatb.append(((ArrayList) value).get(0)); } else { mdatb.append(value); } } else if (key.equals("DE") || key.equals("DEFINITION")) { deb = new StringBuffer(sequenceBufferCreator("DEFINITION ", value)); } else if (key.equals("SV") || key.equals("VERSION")) { svb.insert(0, "VERSION " + (String) value); } else if (key.equals("GI")) { svb.append(" GI:" + (String) value); } else if (key.equals("KW") || key.equals("KEYWORDS")) { kwb = new StringBuffer(sequenceBufferCreator("KEYWORDS ", value)); } else if (key.equals("OS") || key.equals("SOURCE")) { osb = new StringBuffer(sequenceBufferCreator("SOURCE ", value)); } else if (key.equals("OC") || key.equals("ORGANISM")) { ocb = new StringBuffer(sequenceBufferCreator(" ORGANISM ", value)); } else if (key.equals("CC") || key.equals("COMMENT")) { ccb = new StringBuffer(sequenceBufferCreator("COMMENT ", value)); } else if (key.equals(GenbankProcessor.PROPERTY_GENBANK_ACCESSIONS)) { ub.setLength(0); ub.append("ACCESSION "); for (Iterator ai = ((List) value).iterator(); ai.hasNext();) { ub.append((String) ai.next()); } acb = new StringBuffer(ub.toString()); } } | 50397 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50397/bf69c9573e2503a92677f8ae9a3b42c128555ff2/GenpeptFileFormer.java/clean/src/org/biojava/bio/seq/io/GenpeptFileFormer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
527,
4021,
1396,
12,
921,
498,
16,
1033,
460,
13,
202,
15069,
10616,
565,
288,
3639,
309,
261,
856,
18,
14963,
2932,
29450,
3378,
6,
3719,
288,
5411,
612,
70,
18,
542,
1782,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
527,
4021,
1396,
12,
921,
498,
16,
1033,
460,
13,
202,
15069,
10616,
565,
288,
3639,
309,
261,
856,
18,
14963,
2932,
29450,
3378,
6,
3719,
288,
5411,
612,
70,
18,
542,
1782,
... |
assertEquals( ((IASTVariable)node.getCompletionContext()).getName(), "b" ); | assertEquals( ((IASTVariable)node.getCompletionContext()).getName(), "b" ); | public void testMemberCompletion_Arrow() throws Exception { StringWriter writer = new StringWriter(); writer.write( "class A {" ); writer.write( " public: void aPublicBaseMethod();" ); writer.write( " private: void aPrivateBaseMethod();" ); writer.write( "};" ); writer.write( "class B : public A {" ); writer.write( " public: void aMethod();" ); writer.write( "};" ); writer.write( "void foo(){" ); writer.write( " B * b = new B();" ); writer.write( " b-> \n" ); String code = writer.toString(); int index = code.indexOf( "b->" ); IASTCompletionNode node = parse( code, index + 3 ); assertNotNull(node); assertEquals( node.getCompletionPrefix(), "" ); assertEquals(node.getCompletionKind(), IASTCompletionNode.CompletionKind.MEMBER_REFERENCE); assertTrue(node.getCompletionScope() instanceof IASTFunction ); assertEquals( ((IASTFunction)node.getCompletionScope()).getName(), "foo" ); assertTrue(node.getCompletionContext() instanceof IASTVariable ); assertEquals( ((IASTVariable)node.getCompletionContext()).getName(), "b" ); } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/d730ff0f947954910a1a59eb5fe977d0983fd23e/CompletionParseTest.java/buggy/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/CompletionParseTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
4419,
11238,
67,
18691,
1435,
1216,
1185,
202,
95,
202,
202,
780,
2289,
2633,
273,
394,
17436,
5621,
202,
202,
6299,
18,
2626,
12,
315,
1106,
432,
12528,
11272,
202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
4419,
11238,
67,
18691,
1435,
1216,
1185,
202,
95,
202,
202,
780,
2289,
2633,
273,
394,
17436,
5621,
202,
202,
6299,
18,
2626,
12,
315,
1106,
432,
12528,
11272,
202,
... |
if (end == 0) { current = null; } else { final int b = base; for (int i = 0; i < end; i++) docs[i] += b; return end; | if (end == 0) { current = null; } else { final int b = base; for (int i = 0; i < end; i++) docs[i] += b; return end; | public int read(final int[] docs, final int[] freqs) throws IOException { while (true) { while (current == null) { if (pointer < readers.length) { // try next segment base = starts[pointer]; current = termDocs(pointer++); } else { return 0; } } int end = current.read(docs, freqs); if (end == 0) { // none left in segment current = null; } else { // got some final int b = base; // adjust doc numbers for (int i = 0; i < end; i++) docs[i] += b; return end; } } } | 1514 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1514/b48c75c33cbc8f4834834d931f10db5c0db0af6b/MultiReader.java/clean/src/java/org/apache/lucene/index/MultiReader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
509,
855,
12,
6385,
509,
8526,
3270,
16,
727,
509,
8526,
24423,
13,
1377,
1216,
1860,
288,
565,
1323,
261,
3767,
13,
288,
1377,
1323,
261,
2972,
422,
446,
13,
288,
202,
430,
261,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
509,
855,
12,
6385,
509,
8526,
3270,
16,
727,
509,
8526,
24423,
13,
1377,
1216,
1860,
288,
565,
1323,
261,
3767,
13,
288,
1377,
1323,
261,
2972,
422,
446,
13,
288,
202,
430,
261,
... |
case -25: break; case 25: | case -26: break; case 26: | public void _locateToken () { char yy_lookahead; int yy_anchor = YY_NO_ANCHOR; int yy_state = yy_state_dtrans[yy_lexical_state]; int yy_next_state = YY_NO_STATE; int yy_last_accept_state = YY_NO_STATE; boolean yy_initial = true; int yy_this_accept; yy_buffer_start = yy_buffer_index; yy_this_accept = yy_acpt[yy_state]; if (YY_NOT_ACCEPT != yy_this_accept) { yy_last_accept_state = yy_state; yy_buffer_end = yy_buffer_index; } while (true) { if (yy_buffer_index < yy_buffer_length){ yy_lookahead = yy_buffer[yy_buffer_index++]; if (yy_lookahead < 0 || yy_lookahead > 127){ if (Character.isJavaIdentifierStart(yy_lookahead)){ yy_lookahead = 'A'; } else if (Character.isJavaIdentifierPart(yy_lookahead)){ yy_lookahead = '9'; } else{ yy_lookahead = '#'; } } } else{ yy_lookahead = YYEOF; } yy_next_state = YY_F; if (YYEOF != yy_lookahead) { yy_next_state = yy_nxt[yy_rmap[yy_state]][yy_cmap[yy_lookahead]]; } if (YY_F != yy_next_state) { yy_state = yy_next_state; yy_initial = false; yy_this_accept = yy_acpt[yy_state]; if (YY_NOT_ACCEPT != yy_this_accept) { yy_last_accept_state = yy_state; yy_buffer_end = yy_buffer_index; } } else { if (YYEOF == yy_lookahead && true == yy_initial) { myTokenType = null; return; } else if (YY_NO_STATE == yy_last_accept_state) { throw (new Error("Lexical Error: Unmatched Input.")); } else { yy_buffer_index = yy_buffer_end; yy_anchor = yy_acpt[yy_last_accept_state]; if (0 != (YY_END & yy_anchor)) { --yy_buffer_end; } if (0 != (YY_START & yy_anchor)) { ++yy_buffer_start; } switch (yy_last_accept_state) { case 0: { myTokenType = XmlTokenType.XML_DATA_CHARACTERS; return; } case -2: break; case 1: { myTokenType = XmlTokenType.XML_WHITE_SPACE; return; } case -3: break; case 2: { myTokenType = XmlTokenType.XML_START_TAG_START; yy_lexical_state = START_TAG_NAME; return; } case -4: break; case 4: { myTokenType = XmlTokenType.XML_END_TAG_START; yy_lexical_state = END_TAG_NAME; return; } case -5: break; case 5: { myTokenType = XmlTokenType.XML_COMMENT_START; yy_lexical_state = COMMENT; return; } case -6: break; case 6: { myTokenType = XmlTokenType.XML_DOCTYPE_START; yy_lexical_state = DOC_TYPE; return; } case -7: break; case 7: { myTokenType = XmlTokenType.XML_BAD_CHARACTER; return; } case -8: break; case 8: { myTokenType = XmlTokenType.XML_DOCTYPE_END; yy_lexical_state = YYINITIAL; return; } case -9: break; case 9: { myTokenType = XmlTokenType.XML_ATTRIBUTE_VALUE_TOKEN; return;} case -10: break; case 10: { myTokenType = XmlTokenType.XML_NAME; return; } case -11: break; case 11: { myTokenType = XmlTokenType.XML_DOCTYPE_PUBLIC; return; } case -12: break; case 12: { myTokenType = XmlTokenType.XML_COMMENT_CHARACTERS; return; } case -13: break; case 13: { myTokenType = XmlTokenType.XML_COMMENT_END; yy_lexical_state = YYINITIAL; return; } case -14: break; case 14: { myTokenType = XmlTokenType.XML_NAME; yy_lexical_state = TAG_ATTRIBUTES; return; } case -15: break; case 15: { yy_lexical_state = YYINITIAL; --yy_buffer_index; break; } case -16: break; case 16: { myTokenType = XmlTokenType.XML_DATA_CHARACTERS; return; } case -17: break; case 17: { myTokenType = XmlTokenType.XML_NAME; return; } case -18: break; case 18: { yy_lexical_state = YYINITIAL; --yy_buffer_index; } case -19: break; case 19: { myTokenType = XmlTokenType.XML_EQ; yy_lexical_state = ATTRIBUTE_VALUE_START; return; } case -20: break; case 20: { myTokenType = XmlTokenType.XML_TAG_END; yy_lexical_state = YYINITIAL; return; } case -21: break; case 21: { myTokenType = XmlTokenType.XML_EMPTY_ELEMENT_END; yy_lexical_state = YYINITIAL; return; } case -22: break; case 22: { myTokenType = XmlTokenType.XML_ATTRIBUTE_VALUE_TOKEN; yy_lexical_state = TAG_ATTRIBUTES; return; } case -23: break; case 23: { myTokenType = XmlTokenType.XML_ATTRIBUTE_VALUE_START_DELIMITER; yy_lexical_state = ATTRIBUTE_VALUE_DQ; return; } case -24: break; case 24: { myTokenType = XmlTokenType.XML_ATTRIBUTE_VALUE_START_DELIMITER; yy_lexical_state = ATTRIBUTE_VALUE_SQ; return; } case -25: break; case 25: { myTokenType = XmlTokenType.XML_TAG_END; yy_lexical_state = YYINITIAL; return; } case -26: break; case 26: { myTokenType = XmlTokenType.XML_EMPTY_ELEMENT_END; yy_lexical_state = YYINITIAL; return; } case -27: break; case 27: { myTokenType = XmlTokenType.XML_ATTRIBUTE_VALUE_TOKEN; return; } case -28: break; case 28: { myTokenType = XmlTokenType.XML_ATTRIBUTE_VALUE_END_DELIMITER; yy_lexical_state = TAG_ATTRIBUTES; return; } case -29: break; case 29: { myTokenType = XmlTokenType.XML_ATTRIBUTE_VALUE_TOKEN; return; } case -30: break; case 30: { myTokenType = XmlTokenType.XML_ATTRIBUTE_VALUE_TOKEN; return; } case -31: break; case 31: { myTokenType = XmlTokenType.XML_ATTRIBUTE_VALUE_TOKEN; return; } case -32: break; case 32: { myTokenType = XmlTokenType.XML_ATTRIBUTE_VALUE_END_DELIMITER; yy_lexical_state = TAG_ATTRIBUTES; return; } case -33: break; case 33: { myTokenType = XmlTokenType.XML_DATA_CHARACTERS; return; } case -34: break; case 35: { myTokenType = XmlTokenType.XML_BAD_CHARACTER; return; } case -35: break; case 36: { myTokenType = XmlTokenType.XML_COMMENT_CHARACTERS; return; } case -36: break; case 37: { myTokenType = XmlTokenType.XML_DATA_CHARACTERS; return; } case -37: break; case 38: { myTokenType = XmlTokenType.XML_ATTRIBUTE_VALUE_TOKEN; yy_lexical_state = TAG_ATTRIBUTES; return; } case -38: break; case 39: { myTokenType = XmlTokenType.XML_ATTRIBUTE_VALUE_TOKEN; return; } case -39: break; case 40: { myTokenType = XmlTokenType.XML_ATTRIBUTE_VALUE_TOKEN; return; } case -40: break; case 41: { myTokenType = XmlTokenType.XML_ATTRIBUTE_VALUE_TOKEN; return; } case -41: break; case 42: { myTokenType = XmlTokenType.XML_ATTRIBUTE_VALUE_TOKEN; return; } case -42: break; case 44: { myTokenType = XmlTokenType.XML_BAD_CHARACTER; return; } case -43: break; case 45: { myTokenType = XmlTokenType.XML_ATTRIBUTE_VALUE_TOKEN; return; } case -44: break; case 46: { myTokenType = XmlTokenType.XML_ATTRIBUTE_VALUE_TOKEN; return; } case -45: break; case 48: { myTokenType = XmlTokenType.XML_BAD_CHARACTER; return; } case -46: break; case 50: { myTokenType = XmlTokenType.XML_BAD_CHARACTER; return; } case -47: break; case 52: { myTokenType = XmlTokenType.XML_BAD_CHARACTER; return; } case -48: break; case 54: { myTokenType = XmlTokenType.XML_BAD_CHARACTER; return; } case -49: break; default: yy_error(YY_E_INTERNAL,false); case -1: } yy_initial = true; yy_state = yy_state_dtrans[yy_lexical_state]; yy_next_state = YY_NO_STATE; yy_last_accept_state = YY_NO_STATE; yy_buffer_start = yy_buffer_index; yy_this_accept = yy_acpt[yy_state]; if (YY_NOT_ACCEPT != yy_this_accept) { yy_last_accept_state = yy_state; } } } } } | 56598 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56598/c7233dd393dd7afda01bf11ff3d6591ed94a1b01/_HtmlLexer.java/buggy/source/com/intellij/lexer/_HtmlLexer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
389,
25450,
1345,
1832,
288,
202,
202,
3001,
9016,
67,
7330,
11617,
31,
202,
202,
474,
9016,
67,
16215,
273,
1624,
61,
67,
3417,
67,
20360,
916,
31,
202,
202,
474,
9016,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
389,
25450,
1345,
1832,
288,
202,
202,
3001,
9016,
67,
7330,
11617,
31,
202,
202,
474,
9016,
67,
16215,
273,
1624,
61,
67,
3417,
67,
20360,
916,
31,
202,
202,
474,
9016,
... |
if (QueryFilters.isRawField(field)) { | if (this.queryFilters.isRawField(field)) { | final public ArrayList phrase(String field) throws ParseException { int start; int end; ArrayList result = new ArrayList(); String term; jj_consume_token(QUOTE); start = token.endColumn; label_2: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case PLUS: case MINUS: case COLON: case SLASH: case DOT: case ATSIGN: case APOSTROPHE: case WHITE: ; break; default: jj_la1[4] = jj_gen; break label_2; } nonTerm(); } label_3: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WORD: case ACRONYM: case SIGRAM: ; break; default: jj_la1[5] = jj_gen; break label_3; } term = term(); result.add(term); label_4: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case PLUS: case MINUS: case COLON: case SLASH: case DOT: case ATSIGN: case APOSTROPHE: case WHITE: ; break; default: jj_la1[6] = jj_gen; break label_4; } nonTerm(); } } end = token.endColumn; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case QUOTE: jj_consume_token(QUOTE); break; case 0: jj_consume_token(0); break; default: jj_la1[7] = jj_gen; jj_consume_token(-1); throw new ParseException(); } if (QueryFilters.isRawField(field)) { result.clear(); result.add(queryString.substring(start, end)); } {if (true) return result;} throw new Error("Missing return statement in function"); } | 1316 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1316/329ff64e9d7295aff108f85e9a8103f5e5f8f398/NutchAnalysis.java/clean/src/java/org/apache/nutch/analysis/NutchAnalysis.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
1071,
2407,
13045,
12,
780,
652,
13,
1216,
10616,
288,
225,
509,
787,
31,
225,
509,
679,
31,
225,
2407,
563,
273,
394,
2407,
5621,
225,
514,
2481,
31,
565,
10684,
67,
21224,
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,
282,
727,
1071,
2407,
13045,
12,
780,
652,
13,
1216,
10616,
288,
225,
509,
787,
31,
225,
509,
679,
31,
225,
2407,
563,
273,
394,
2407,
5621,
225,
514,
2481,
31,
565,
10684,
67,
21224,
67,
... |
if (s == null || m == null || m.getCacheTree() == null) { return; } | if (s == null || m == null || m.getCacheTree() == null) { return; } | private void add(final Map tomerge, final IResource toAdd) throws CoreException { final GitProjectData pd = GitProjectData.get(toAdd.getProject()); IResource r = toAdd; String s = null; RepositoryMapping m = null; while (r != null) { m = pd.getRepositoryMapping(r); if (m != null) { break; } if (s != null) { s = r.getName() + "/" + s; } else { s = r.getName(); } r = r.getParent(); } if (s == null || m == null || m.getCacheTree() == null) { return; } try { tomerge.put(m, m); add(m.getCacheTree(), s, toAdd); } catch (IOException ioe) { throw Activator.error(CoreText.AddOperation_failed, ioe); } } | 45532 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45532/a4e486719ce78b8050373e6534dfaf4a1572b269/TrackOperation.java/clean/org.spearce.egit.core/src/org/spearce/egit/core/op/TrackOperation.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
527,
12,
6385,
1635,
358,
2702,
16,
727,
467,
1420,
25607,
13,
3639,
1216,
30015,
565,
288,
3639,
727,
6646,
4109,
751,
4863,
273,
6646,
4109,
751,
18,
588,
12,
869,
986,
18,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
527,
12,
6385,
1635,
358,
2702,
16,
727,
467,
1420,
25607,
13,
3639,
1216,
30015,
565,
288,
3639,
727,
6646,
4109,
751,
4863,
273,
6646,
4109,
751,
18,
588,
12,
869,
986,
18,... |
} | } | public BufferedImage openImage(String id, int no) throws FormatException, IOException { if (!id.equals(currentId)) initFile(id); if (no < 0 || no >= getImageCount(id)) { throw new FormatException("Invalid image number: " + no); } if (DEBUG) System.out.println("Reading image #" + no + "..."); ZVIBlock zviBlock = (ZVIBlock) blockList.elementAt(no); if (!isRGB(id) || !separated) { return zviBlock.readImage(in); } else { return ImageTools.splitChannels(zviBlock.readImage(in))[no % 3]; } } | 46826 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46826/f8fea5aec2de454fd84e68759019ac47d99be52a/LegacyZVIReader.java/buggy/loci/formats/LegacyZVIReader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
12362,
1696,
2040,
12,
780,
612,
16,
509,
1158,
13,
565,
1216,
4077,
503,
16,
1860,
225,
288,
565,
309,
16051,
350,
18,
14963,
12,
2972,
548,
3719,
1208,
812,
12,
350,
1769,
565,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12362,
1696,
2040,
12,
780,
612,
16,
509,
1158,
13,
565,
1216,
4077,
503,
16,
1860,
225,
288,
565,
309,
16051,
350,
18,
14963,
12,
2972,
548,
3719,
1208,
812,
12,
350,
1769,
565,
... |
long usedMemory = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory(); System.out.println("Used memory: " + usedMemory + " bytes"); System.out.print("Enter words: "); } Timer timer = Timer.getTimer("test", "lookup trigram"); List list1 = new ArrayList(); WordSequence ws1 = new WordSequence("t", "h", "e"); WordSequence ws2 = new WordSequence("a", "l", "q"); for (int i = 0; i < 1000000; i++) { timer.start(); sm.getProbability(ws1); timer.stop(); timer.start(); sm.getProbability(ws2); timer.stop(); | if (false) { long usedMemory = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory(); System.out.println("Used memory: " + usedMemory + " bytes"); System.out.print("Enter words: "); } | public static void main(String[] args) throws Exception { String propsPath; if (args.length == 0) { propsPath = "file:./binary.props"; } else { propsPath = args[0]; } Timer.start("LM Load"); SphinxProperties.initContext("test", new URL(propsPath)); LargeTrigramModel sm = new LargeTrigramModel("test"); Timer.stop("LM Load"); Timer.dumpAll(); LogMath logMath = LogMath.getLogMath("test"); BufferedReader reader = new BufferedReader (new InputStreamReader(System.in)); String input; System.out.println("Max depth is " + sm.getMaxDepth()); System.out.print("Enter words: "); while ((input = reader.readLine()) != null) { StringTokenizer st = new StringTokenizer(input); List list = new ArrayList(); while (st.hasMoreTokens()) { String tok = (String) st.nextToken(); list.add(tok); } WordSequence wordSequence = new WordSequence(list); float logProbability = sm.getProbability(wordSequence); System.out.println ("Probability of " + wordSequence + " is: " + logProbability + "(log), " + LogMath.logToLog(logProbability, logMath.getLogBase(), 10.0f) + "(log10)"); long usedMemory = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory(); System.out.println("Used memory: " + usedMemory + " bytes"); System.out.print("Enter words: "); } Timer timer = Timer.getTimer("test", "lookup trigram"); List list1 = new ArrayList(); WordSequence ws1 = new WordSequence("t", "h", "e"); WordSequence ws2 = new WordSequence("a", "l", "q"); for (int i = 0; i < 1000000; i++) { timer.start(); sm.getProbability(ws1); timer.stop(); timer.start(); sm.getProbability(ws2); timer.stop(); } Timer.dumpAll("test"); } | 52185 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52185/ef368666f7102af27d133f38694b695495bc2f80/LargeTrigramModelTest.java/clean/edu/cmu/sphinx/knowledge/language/large/LargeTrigramModelTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
2774,
12,
780,
8526,
833,
13,
1216,
1185,
288,
3639,
514,
3458,
743,
31,
540,
309,
261,
1968,
18,
2469,
422,
374,
13,
288,
5411,
3458,
743,
273,
315,
768,
13147,
19,
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,
760,
918,
2774,
12,
780,
8526,
833,
13,
1216,
1185,
288,
3639,
514,
3458,
743,
31,
540,
309,
261,
1968,
18,
2469,
422,
374,
13,
288,
5411,
3458,
743,
273,
315,
768,
13147,
19,
8... |
final org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane()); | final GroupLayout layout = new GroupLayout(getContentPane()); | private void initComponents() { label = new javax.swing.JLabel(); close = new javax.swing.JButton(); openDetails = new javax.swing.JButton(); scrollPane = new javax.swing.JScrollPane(); exceptionArea = new javax.swing.JTextArea(); label.setText(exception.getLocalizedMessage()); close.setText("Schlie\u00dfen"); openDetails.setText(">> Details"); exceptionArea.setColumns(20); exceptionArea.setRows(5); scrollPane.setViewportView(exceptionArea); StringBuilder builder = new StringBuilder(); for (StackTraceElement element : exception.getStackTrace()) { builder.append(element.toString()).append(System.getProperty("line.separator")); } exceptionArea.setText(builder.toString()); exceptionArea.setCaretPosition(1); final JLabel label2 = new JLabel(); final org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane()); this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(label) .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup() .add(openDetails) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(close)) .add(org.jdesktop.layout.GroupLayout.TRAILING, label2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 380, Short.MAX_VALUE)) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(label) .add(44, 44, 44) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(close) .add(openDetails)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(label2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 191, Short.MAX_VALUE) .addContainerGap()) ); openDetails.addActionListener(new ActionListener() { /** * Invoked when an action occurs. */ public void actionPerformed(ActionEvent e) { if (opened) { layout.replace(scrollPane, label2); opened = false; openDetails.setText("<< Details"); pack(); setSize(400, (int) getSize().getHeight()); } else { layout.replace(label2, scrollPane); opened = true; openDetails.setText(">> Details"); setSize(400, 300); } validate(); repaint(); } }); close.addActionListener(new ActionListener() { /** * Invoked when an action occurs. */ public void actionPerformed(ActionEvent e) { dispose(); } }); } | 56011 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56011/31ac93248cfda78f3322a313ae68a9b11c4c62ac/VExceptionDialog.java/buggy/trunk/src/java/unikn/dbis/univis/exception/VExceptionDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1208,
7171,
1435,
288,
3639,
1433,
273,
394,
6863,
18,
5328,
310,
18,
46,
2224,
5621,
3639,
1746,
273,
394,
6863,
18,
5328,
310,
18,
46,
3616,
5621,
3639,
1696,
3790,
273,
39... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1208,
7171,
1435,
288,
3639,
1433,
273,
394,
6863,
18,
5328,
310,
18,
46,
2224,
5621,
3639,
1746,
273,
394,
6863,
18,
5328,
310,
18,
46,
3616,
5621,
3639,
1696,
3790,
273,
39... |
public RegexExpression(String regex) { this.regex = regex; | public RegexExpression(Expression gstring) { this.gstring = gstring; | public RegexExpression(String regex) { this.regex = regex; } | 6462 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6462/5ec6b5e86b7cbc71dc2341217c153ed60698df56/RegexExpression.java/clean/src/main/org/codehaus/groovy/ast/expr/RegexExpression.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
15078,
2300,
12,
780,
3936,
13,
288,
3639,
333,
18,
7584,
273,
3936,
31,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
15078,
2300,
12,
780,
3936,
13,
288,
3639,
333,
18,
7584,
273,
3936,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
buf.append(((RubyString)tmp).getValue()); | buf.append(((RubyString)tmp).toString()); | public RubyString join(RubyString sep) { StringBuffer buf = new StringBuffer(); int length = getLength(); if (length == 0) { getRuntime().newString(""); } boolean taint = isTaint() || sep.isTaint(); RubyString str; IRubyObject tmp = null; for (long i = 0; i < length; i++) { tmp = entry(i); taint |= tmp.isTaint(); if (tmp instanceof RubyString) { // do nothing } else if (tmp instanceof RubyArray) { tmp = ((RubyArray) tmp).join(sep); } else { tmp = RubyString.objAsString(tmp); } if (i > 0 && !sep.isNil()) { buf.append(sep.getValue()); } buf.append(((RubyString)tmp).getValue()); } str = RubyString.newString(getRuntime(), buf.toString()); str.setTaint(taint); return str; } | 46258 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46258/9f2efc63a858fa0507245b207025eab027840a04/RubyArray.java/clean/src/org/jruby/RubyArray.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19817,
780,
1233,
12,
54,
10340,
780,
5478,
13,
288,
3639,
6674,
1681,
273,
394,
6674,
5621,
3639,
509,
769,
273,
9888,
5621,
3639,
309,
261,
2469,
422,
374,
13,
288,
5411,
18814,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19817,
780,
1233,
12,
54,
10340,
780,
5478,
13,
288,
3639,
6674,
1681,
273,
394,
6674,
5621,
3639,
509,
769,
273,
9888,
5621,
3639,
309,
261,
2469,
422,
374,
13,
288,
5411,
18814,
... |
case 579: { | case 580: { | public void ruleAction(int ruleNumber) { if (bad_rule != 0) return; switch (ruleNumber) { // // Rule 1: identifier ::= IDENTIFIER // case 1: { if (prsStream.getKind(btParser.getToken(1)) != X10Parsersym.TK_IDENTIFIER && (Report.should_report("parser", 2))) { Report.report(2,"Parser turning keyword " + prsStream.getName(btParser.getToken(1)) + " at " + prsStream.getLine(btParser.getToken(1)) + ":" + prsStream.getColumn(btParser.getToken(1)) + " into an identifier"); } break; } // // Rule 2: PrimitiveType ::= NumericType // case 2: break; // // Rule 3: PrimitiveType ::= boolean // case 3: { btParser.setSym1(nf.CanonicalTypeNode(pos(), ts.Boolean())); break; } // // Rule 4: NumericType ::= IntegralType // case 4: break; // // Rule 5: NumericType ::= FloatingPointType // case 5: break; // // Rule 6: IntegralType ::= byte // case 6: { btParser.setSym1(nf.CanonicalTypeNode(pos(), ts.Byte())); break; } // // Rule 7: IntegralType ::= char // case 7: { btParser.setSym1(nf.CanonicalTypeNode(pos(), ts.Char())); break; } // // Rule 8: IntegralType ::= short // case 8: { btParser.setSym1(nf.CanonicalTypeNode(pos(), ts.Short())); break; } // // Rule 9: IntegralType ::= int // case 9: { btParser.setSym1(nf.CanonicalTypeNode(pos(), ts.Int())); break; } // // Rule 10: IntegralType ::= long // case 10: { btParser.setSym1(nf.CanonicalTypeNode(pos(), ts.Long())); break; } // // Rule 11: FloatingPointType ::= float // case 11: { btParser.setSym1(nf.CanonicalTypeNode(pos(), ts.Float())); break; } // // Rule 12: FloatingPointType ::= double // case 12: { btParser.setSym1(nf.CanonicalTypeNode(pos(), ts.Double())); break; } // // Rule 13: ReferenceType ::= ClassOrInterfaceType // case 13: break; // // Rule 14: ReferenceType ::= ArrayType // case 14: break; // // Rule 15: ClassType ::= TypeName // case 15: {//vj assert(btParser.getSym(2) == null); // generic not yet supported Name a = (Name) btParser.getSym(1); btParser.setSym1(a.toType()); break; } // // Rule 16: InterfaceType ::= TypeName // case 16: {//vj assert(btParser.getSym(2) == null); // generic not yet supported Name a = (Name) btParser.getSym(1); btParser.setSym1(a.toType()); break; } // // Rule 17: TypeName ::= identifier // case 17: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 18: TypeName ::= TypeName . identifier // case 18: { Name a = (Name) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); btParser.setSym1(new Name(nf, ts, pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier())); break; } // // Rule 19: ClassName ::= TypeName // case 19: break; // // Rule 20: TypeVariable ::= identifier // case 20: break; // // Rule 21: ArrayType ::= Type [ ] // case 21: { TypeNode a = (TypeNode) btParser.getSym(1); btParser.setSym1(nf.array(a, pos(), 1)); break; } // // Rule 22: TypeParameter ::= TypeVariable TypeBoundopt // case 22: bad_rule = 22; break; // // Rule 23: TypeBound ::= extends ClassOrInterfaceType AdditionalBoundListopt // case 23: bad_rule = 23; break; // // Rule 24: AdditionalBoundList ::= AdditionalBound // case 24: bad_rule = 24; break; // // Rule 25: AdditionalBoundList ::= AdditionalBoundList AdditionalBound // case 25: bad_rule = 25; break; // // Rule 26: AdditionalBound ::= & InterfaceType // case 26: bad_rule = 26; break; // // Rule 27: TypeArguments ::= < ActualTypeArgumentList > // case 27: bad_rule = 27; break; // // Rule 28: ActualTypeArgumentList ::= ActualTypeArgument // case 28: bad_rule = 28; break; // // Rule 29: ActualTypeArgumentList ::= ActualTypeArgumentList , ActualTypeArgument // case 29: bad_rule = 29; break; // // Rule 30: Wildcard ::= ? WildcardBoundsOpt // case 30: bad_rule = 30; break; // // Rule 31: WildcardBounds ::= extends ReferenceType // case 31: bad_rule = 31; break; // // Rule 32: WildcardBounds ::= super ReferenceType // case 32: bad_rule = 32; break; // // Rule 33: PackageName ::= identifier // case 33: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 34: PackageName ::= PackageName . identifier // case 34: { Name a = (Name) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); btParser.setSym1(new Name(nf, ts, pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier())); break; } // // Rule 35: ExpressionName ::= identifier // case 35: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 36: ExpressionName ::= AmbiguousName . identifier // case 36: { Name a = (Name) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); btParser.setSym1(new Name(nf, ts, pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier())); break; } // // Rule 37: MethodName ::= identifier // case 37: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 38: MethodName ::= AmbiguousName . identifier // case 38: { Name a = (Name) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); btParser.setSym1(new Name(nf, ts, pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier())); break; } // // Rule 39: PackageOrTypeName ::= identifier // case 39: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 40: PackageOrTypeName ::= PackageOrTypeName . identifier // case 40: { Name a = (Name) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); btParser.setSym1(new Name(nf, ts, pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier())); break; } // // Rule 41: AmbiguousName ::= identifier // case 41: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 42: AmbiguousName ::= AmbiguousName . identifier // case 42: { Name a = (Name) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); btParser.setSym1(new Name(nf, ts, pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier())); break; } // // Rule 43: CompilationUnit ::= PackageDeclarationopt ImportDeclarationsopt TypeDeclarationsopt // case 43: { PackageNode a = (PackageNode) btParser.getSym(1); List b = (List) btParser.getSym(2), c = (List) btParser.getSym(3); // Add import x10.lang.* by default. Name x10 = new Name(nf, ts, pos(), "x10"); Name x10Lang = new Name(nf, ts, pos(), x10, "lang"); Import x10LangImport = nf.Import(pos(btParser.getFirstToken(), btParser.getLastToken()), Import.PACKAGE, x10Lang.toString()); b.add(x10LangImport); btParser.setSym1(nf.SourceFile(pos(btParser.getFirstToken(), btParser.getLastToken()), a, b, c)); break; } // // Rule 44: ImportDeclarations ::= ImportDeclaration // case 44: { List l = new TypedList(new LinkedList(), Import.class, false); Import a = (Import) btParser.getSym(1); l.add(a); btParser.setSym1(l); break; } // // Rule 45: ImportDeclarations ::= ImportDeclarations ImportDeclaration // case 45: { List l = (TypedList) btParser.getSym(1); Import b = (Import) btParser.getSym(2); if (b != null) l.add(b); //btParser.setSym1(l); break; } // // Rule 46: TypeDeclarations ::= TypeDeclaration // case 46: { List l = new TypedList(new LinkedList(), TopLevelDecl.class, false); TopLevelDecl a = (TopLevelDecl) btParser.getSym(1); if (a != null) l.add(a); btParser.setSym1(l); break; } // // Rule 47: TypeDeclarations ::= TypeDeclarations TypeDeclaration // case 47: { List l = (TypedList) btParser.getSym(1); TopLevelDecl b = (TopLevelDecl) btParser.getSym(2); if (b != null) l.add(b); //btParser.setSym1(l); break; } // // Rule 48: PackageDeclaration ::= package PackageName ; // case 48: {//vj assert(btParser.getSym(1) == null); // generic not yet supported Name a = (Name) btParser.getSym(2); btParser.setSym1(a.toPackage()); break; } // // Rule 49: ImportDeclaration ::= SingleTypeImportDeclaration // case 49: break; // // Rule 50: ImportDeclaration ::= TypeImportOnDemandDeclaration // case 50: break; // // Rule 51: ImportDeclaration ::= SingleStaticImportDeclaration // case 51: break; // // Rule 52: ImportDeclaration ::= StaticImportOnDemandDeclaration // case 52: break; // // Rule 53: SingleTypeImportDeclaration ::= import TypeName ; // case 53: { Name a = (Name) btParser.getSym(2); btParser.setSym1(nf.Import(pos(btParser.getFirstToken(), btParser.getLastToken()), Import.CLASS, a.toString())); break; } // // Rule 54: TypeImportOnDemandDeclaration ::= import PackageOrTypeName . * ; // case 54: { Name a = (Name) btParser.getSym(2); btParser.setSym1(nf.Import(pos(btParser.getFirstToken(), btParser.getLastToken()), Import.PACKAGE, a.toString())); break; } // // Rule 55: SingleStaticImportDeclaration ::= import static TypeName . identifier ; // case 55: bad_rule = 55; break; // // Rule 56: StaticImportOnDemandDeclaration ::= import static TypeName . * ; // case 56: bad_rule = 56; break; // // Rule 57: TypeDeclaration ::= ClassDeclaration // case 57: break; // // Rule 58: TypeDeclaration ::= InterfaceDeclaration // case 58: break; // // Rule 59: TypeDeclaration ::= ; // case 59: { btParser.setSym1(null); break; } // // Rule 60: ClassDeclaration ::= NormalClassDeclaration // case 60: break; // // Rule 61: NormalClassDeclaration ::= ClassModifiersopt class identifier Superopt Interfacesopt ClassBody // case 61: { Flags a = (Flags) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3));//vj assert(btParser.getSym(4) == null); TypeNode c = (TypeNode) btParser.getSym(4); // by default extend x10.lang.Object if (c == null) { c= new Name(nf, ts, pos(), "x10.lang.Object").toType(); } List d = (List) btParser.getSym(5); ClassBody e = (ClassBody) btParser.getSym(6); btParser.setSym1(a.isValue() ? nf.ValueClassDecl(pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier(), c, d, e) : nf.ClassDecl(pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier(), c, d, e)); break; } // // Rule 62: ClassModifiers ::= ClassModifier // case 62: break; // // Rule 63: ClassModifiers ::= ClassModifiers ClassModifier // case 63: { Flags a = (Flags) btParser.getSym(1), b = (Flags) btParser.getSym(2); btParser.setSym1(a.set(b)); break; } // // Rule 64: ClassModifier ::= public // case 64: { btParser.setSym1(Flags.PUBLIC); break; } // // Rule 65: ClassModifier ::= protected // case 65: { btParser.setSym1(Flags.PROTECTED); break; } // // Rule 66: ClassModifier ::= private // case 66: { btParser.setSym1(Flags.PRIVATE); break; } // // Rule 67: ClassModifier ::= abstract // case 67: { btParser.setSym1(Flags.ABSTRACT); break; } // // Rule 68: ClassModifier ::= static // case 68: { btParser.setSym1(Flags.STATIC); break; } // // Rule 69: ClassModifier ::= final // case 69: { btParser.setSym1(Flags.FINAL); break; } // // Rule 70: ClassModifier ::= strictfp // case 70: { btParser.setSym1(Flags.STRICTFP); break; } // // Rule 71: TypeParameters ::= < TypeParameterList > // case 71: bad_rule = 71; break; // // Rule 72: TypeParameterList ::= TypeParameter // case 72: bad_rule = 72; break; // // Rule 73: TypeParameterList ::= TypeParameterList , TypeParameter // case 73: bad_rule = 73; break; // // Rule 74: Super ::= extends ClassType // case 74: { btParser.setSym1(btParser.getSym(2)); break; } // // Rule 75: Interfaces ::= implements InterfaceTypeList // case 75: { btParser.setSym1(btParser.getSym(2)); break; } // // Rule 76: InterfaceTypeList ::= InterfaceType // case 76: { List l = new TypedList(new LinkedList(), TypeNode.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 77: InterfaceTypeList ::= InterfaceTypeList , InterfaceType // case 77: { List l = (TypedList) btParser.getSym(1); l.add(btParser.getSym(2)); btParser.setSym1(l); break; } // // Rule 78: ClassBody ::= { ClassBodyDeclarationsopt } // case 78: { btParser.setSym1(nf.ClassBody(pos(btParser.getFirstToken(), btParser.getLastToken()), (List) btParser.getSym(2))); break; } // // Rule 79: ClassBodyDeclarations ::= ClassBodyDeclaration // case 79: break; // // Rule 80: ClassBodyDeclarations ::= ClassBodyDeclarations ClassBodyDeclaration // case 80: { List a = (List) btParser.getSym(1), b = (List) btParser.getSym(2); a.addAll(b); // btParser.setSym1(a); break; } // // Rule 81: ClassBodyDeclaration ::= ClassMemberDeclaration // case 81: break; // // Rule 82: ClassBodyDeclaration ::= InstanceInitializer // case 82: { List l = new TypedList(new LinkedList(), ClassMember.class, false); Block a = (Block) btParser.getSym(1); l.add(nf.Initializer(pos(), Flags.NONE, a)); btParser.setSym1(l); break; } // // Rule 83: ClassBodyDeclaration ::= StaticInitializer // case 83: { List l = new TypedList(new LinkedList(), ClassMember.class, false); Block a = (Block) btParser.getSym(1); l.add(nf.Initializer(pos(), Flags.STATIC, a)); btParser.setSym1(l); break; } // // Rule 84: ClassBodyDeclaration ::= ConstructorDeclaration // case 84: { List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 85: ClassMemberDeclaration ::= FieldDeclaration // case 85: break; // // Rule 86: ClassMemberDeclaration ::= MethodDeclaration // case 86: { List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 87: ClassMemberDeclaration ::= ClassDeclaration // case 87: { List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 88: ClassMemberDeclaration ::= InterfaceDeclaration // case 88: { List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 89: ClassMemberDeclaration ::= ; // case 89: { List l = new TypedList(new LinkedList(), ClassMember.class, false); btParser.setSym1(l); break; } // // Rule 90: FieldDeclaration ::= FieldModifiersopt Type VariableDeclarators ; // case 90: { List l = new TypedList(new LinkedList(), ClassMember.class, false); Flags a = (Flags) btParser.getSym(1); TypeNode b = (TypeNode) btParser.getSym(2); List c = (List) btParser.getSym(3); for (Iterator i = c.iterator(); i.hasNext();) { X10VarDeclarator d = (X10VarDeclarator) i.next(); if (d.hasExplodedVars()) // TODO: Report this exception correctly. throw new Error("Field Declarations may not have exploded variables." + pos()); d.setFlag(a); l.add(nf.FieldDecl(pos(btParser.getFirstToken(2), btParser.getLastToken()), d.flags, nf.array(b, pos(btParser.getFirstToken(2), btParser.getLastToken(2)), d.dims), d.name, d.init)); } btParser.setSym1(l); break; } // // Rule 91: VariableDeclarators ::= VariableDeclarator // case 91: { List l = new TypedList(new LinkedList(), X10VarDeclarator.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 92: VariableDeclarators ::= VariableDeclarators , VariableDeclarator // case 92: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(3)); // btParser.setSym1(l); break; } // // Rule 93: VariableDeclarator ::= VariableDeclaratorId // case 93: break; // // Rule 94: VariableDeclarator ::= VariableDeclaratorId = VariableInitializer // case 94: { X10VarDeclarator a = (X10VarDeclarator) btParser.getSym(1); Expr b = (Expr) btParser.getSym(3); a.init = b; // btParser.setSym1(a); break; } // // Rule 95: VariableDeclaratorId ::= identifier // case 95: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new X10VarDeclarator(pos(), a.getIdentifier())); break; } // // Rule 96: VariableDeclaratorId ::= VariableDeclaratorId [ ] // case 96: { X10VarDeclarator a = (X10VarDeclarator) btParser.getSym(1); a.dims++; // btParser.setSym1(a); break; } // // Rule 97: VariableDeclaratorId ::= identifier [ IdentifierList ] // case 97: { polyglot.lex.Identifier a = id(btParser.getToken(1)); List paramList = (List) btParser.getSym(3); btParser.setSym1(new X10VarDeclarator(pos(), a.getIdentifier(), paramList)); break; } // // Rule 98: VariableDeclaratorId ::= [ IdentifierList ] // case 98: { String name = polyglot.ext.x10.visit.X10PrettyPrinterVisitor.getId(); List paramList = (List) btParser.getSym(2); btParser.setSym1(new X10VarDeclarator(pos(), name, paramList)); break; } // // Rule 99: VariableInitializer ::= Expression // case 99: break; // // Rule 100: VariableInitializer ::= ArrayInitializer // case 100: break; // // Rule 101: FieldModifiers ::= FieldModifier // case 101: break; // // Rule 102: FieldModifiers ::= FieldModifiers FieldModifier // case 102: { Flags a = (Flags) btParser.getSym(1), b = (Flags) btParser.getSym(2); btParser.setSym1(a.set(b)); break; } // // Rule 103: FieldModifier ::= public // case 103: { btParser.setSym1(Flags.PUBLIC); break; } // // Rule 104: FieldModifier ::= protected // case 104: { btParser.setSym1(Flags.PROTECTED); break; } // // Rule 105: FieldModifier ::= private // case 105: { btParser.setSym1(Flags.PRIVATE); break; } // // Rule 106: FieldModifier ::= static // case 106: { btParser.setSym1(Flags.STATIC); break; } // // Rule 107: FieldModifier ::= final // case 107: { btParser.setSym1(Flags.FINAL); break; } // // Rule 108: FieldModifier ::= transient // case 108: { btParser.setSym1(Flags.TRANSIENT); break; } // // Rule 109: FieldModifier ::= volatile // case 109: { btParser.setSym1(Flags.VOLATILE); break; } // // Rule 110: MethodDeclaration ::= MethodHeader MethodBody // case 110: { MethodDecl a = (MethodDecl) btParser.getSym(1); List l = a.formals(); List s = new TypedList(new LinkedList(), Stmt.class, false); Block b = (Block) btParser.getSym(2); for (Iterator i = l.iterator(); i.hasNext(); ) { X10Formal d = (X10Formal) i.next(); if (d.hasExplodedVars()) s.addAll( d.explode()); } if (! s.isEmpty()) { s.addAll(b.statements()); b = b.statements(s); } Flags f = a.flags(); if (f.contains(Flags.ATOMIC)) { List ss = new TypedList(new LinkedList(), Stmt.class, false); ss.add(nf.Atomic(pos(), nf.Here(pos()), b)); b = b.statements(ss); a = a.flags(f.clear(Flags.ATOMIC)); } btParser.setSym1(a.body(b)); break; } // // Rule 111: MethodHeader ::= MethodModifiersopt ResultType MethodDeclarator Throwsopt // case 111: { Flags a = (Flags) btParser.getSym(1);//vj assert(btParser.getSym(2) == null); TypeNode b = (TypeNode) btParser.getSym(2); Object[] o = (Object []) btParser.getSym(3); Name c = (Name) o[0]; List d = (List) o[1]; Integer e = (Integer) o[2]; List f = (List) btParser.getSym(4); if (b.type() == ts.Void() && e.intValue() > 0) { // TODO: error!!! assert(false); } btParser.setSym1(nf.MethodDecl(pos(btParser.getFirstToken(2), btParser.getLastToken(3)), a, nf.array((TypeNode) b, pos(btParser.getFirstToken(2), btParser.getLastToken(2)), e.intValue()), c.toString(), d, f, null)); break; } // // Rule 112: ResultType ::= Type // case 112: break; // // Rule 113: ResultType ::= void // case 113: { btParser.setSym1(nf.CanonicalTypeNode(pos(), ts.Void())); break; } // // Rule 114: MethodDeclarator ::= identifier ( FormalParameterListopt ) // case 114: { Object[] a = new Object[3]; a[0] = new Name(nf, ts, pos(), id(btParser.getToken(1)).getIdentifier()); a[1] = btParser.getSym(3); a[2] = new Integer(0); btParser.setSym1(a); break; } // // Rule 115: MethodDeclarator ::= MethodDeclarator [ ] // case 115: { Object[] a = (Object []) btParser.getSym(1); a[2] = new Integer(((Integer) a[2]).intValue() + 1); // btParser.setSym1(a); break; } // // Rule 116: FormalParameterList ::= LastFormalParameter // case 116: { List l = new TypedList(new LinkedList(), Formal.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 117: FormalParameterList ::= FormalParameters , LastFormalParameter // case 117: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(3)); // btParser.setSym1(l); break; } // // Rule 118: FormalParameters ::= FormalParameter // case 118: { List l = new TypedList(new LinkedList(), Formal.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 119: FormalParameters ::= FormalParameters , FormalParameter // case 119: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(3)); // btParser.setSym1(l); break; } // // Rule 120: FormalParameter ::= VariableModifiersopt Type VariableDeclaratorId // case 120: { Flags f = (Flags) btParser.getSym(1); TypeNode a = (TypeNode) btParser.getSym(2); X10VarDeclarator b = (X10VarDeclarator) btParser.getSym(3); b.setFlag(f); btParser.setSym1(nf.Formal(pos(), nf.array(a, pos(btParser.getFirstToken(2), btParser.getLastToken(2)), b.dims), b)); break; } // // Rule 122: VariableModifiers ::= VariableModifiers VariableModifier // case 122: { Flags a = (Flags) btParser.getSym(1), b = (Flags) btParser.getSym(2); btParser.setSym1(a.set(b)); break; } // // Rule 123: VariableModifier ::= final // case 123: { btParser.setSym1(Flags.FINAL); break; } // // Rule 124: LastFormalParameter ::= VariableModifiersopt Type ...opt VariableDeclaratorId // case 124: { Flags f = (Flags) btParser.getSym(1); TypeNode a = (TypeNode) btParser.getSym(2); assert(btParser.getSym(3) == null); X10VarDeclarator b = (X10VarDeclarator) btParser.getSym(4); b.setFlag(f); btParser.setSym1(nf.Formal(pos(), nf.array(a, pos(btParser.getFirstToken(2), btParser.getLastToken(2)), b.dims), b)); break; } // // Rule 125: MethodModifiers ::= MethodModifier // case 125: break; // // Rule 126: MethodModifiers ::= MethodModifiers MethodModifier // case 126: { Flags a = (Flags) btParser.getSym(1), b = (Flags) btParser.getSym(2); btParser.setSym1(a.set(b)); break; } // // Rule 127: MethodModifier ::= public // case 127: { btParser.setSym1(Flags.PUBLIC); break; } // // Rule 128: MethodModifier ::= protected // case 128: { btParser.setSym1(Flags.PROTECTED); break; } // // Rule 129: MethodModifier ::= private // case 129: { btParser.setSym1(Flags.PRIVATE); break; } // // Rule 130: MethodModifier ::= abstract // case 130: { btParser.setSym1(Flags.ABSTRACT); break; } // // Rule 131: MethodModifier ::= static // case 131: { btParser.setSym1(Flags.STATIC); break; } // // Rule 132: MethodModifier ::= final // case 132: { btParser.setSym1(Flags.FINAL); break; } // // Rule 133: MethodModifier ::= synchronized // case 133: { btParser.setSym1(Flags.SYNCHRONIZED); break; } // // Rule 134: MethodModifier ::= native // case 134: { btParser.setSym1(Flags.NATIVE); break; } // // Rule 135: MethodModifier ::= strictfp // case 135: { btParser.setSym1(Flags.STRICTFP); break; } // // Rule 136: Throws ::= throws ExceptionTypeList // case 136: { btParser.setSym1(btParser.getSym(2)); break; } // // Rule 137: ExceptionTypeList ::= ExceptionType // case 137: { List l = new TypedList(new LinkedList(), TypeNode.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 138: ExceptionTypeList ::= ExceptionTypeList , ExceptionType // case 138: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(3)); // btParser.setSym1(l); break; } // // Rule 139: ExceptionType ::= ClassType // case 139: break; // // Rule 140: MethodBody ::= Block // case 140: break; // // Rule 141: MethodBody ::= ; // case 141: btParser.setSym1(null); break; // // Rule 142: InstanceInitializer ::= Block // case 142: break; // // Rule 143: StaticInitializer ::= static Block // case 143: { btParser.setSym1(btParser.getSym(2)); break; } // // Rule 144: ConstructorDeclaration ::= ConstructorModifiersopt ConstructorDeclarator Throwsopt ConstructorBody // case 144: { Flags m = (Flags) btParser.getSym(1); Object[] o = (Object []) btParser.getSym(2); Name a = (Name) o[1]; List b = (List) o[2]; List c = (List) btParser.getSym(3); Block d = (Block) btParser.getSym(4); btParser.setSym1(nf.ConstructorDecl(pos(), m, a.toString(), b, c, d)); break; } // // Rule 145: ConstructorDeclarator ::= SimpleTypeName ( FormalParameterListopt ) // case 145: {//vj assert(btParser.getSym(1) == null); Object[] a = new Object[3];//vj a[0] = btParser.getSym(1); a[1] = btParser.getSym(1); a[2] = btParser.getSym(3); btParser.setSym1(a); break; } // // Rule 146: SimpleTypeName ::= identifier // case 146: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 147: ConstructorModifiers ::= ConstructorModifier // case 147: break; // // Rule 148: ConstructorModifiers ::= ConstructorModifiers ConstructorModifier // case 148: { Flags a = (Flags) btParser.getSym(1), b = (Flags) btParser.getSym(2); btParser.setSym1(a.set(b)); break; } // // Rule 149: ConstructorModifier ::= public // case 149: { btParser.setSym1(Flags.PUBLIC); break; } // // Rule 150: ConstructorModifier ::= protected // case 150: { btParser.setSym1(Flags.PROTECTED); break; } // // Rule 151: ConstructorModifier ::= private // case 151: { btParser.setSym1(Flags.PRIVATE); break; } // // Rule 152: ConstructorBody ::= { ExplicitConstructorInvocationopt BlockStatementsopt } // case 152: { Stmt a = (Stmt) btParser.getSym(2); List l; if (a == null) l = (List) btParser.getSym(3); else { l = new TypedList(new LinkedList(), Stmt.class, false); List l2 = (List) btParser.getSym(3); l.add(a); l.addAll(l2); } btParser.setSym1(nf.Block(pos(), l)); break; } // // Rule 153: ExplicitConstructorInvocation ::= this ( ArgumentListopt ) ; // case 153: {//vj assert(btParser.getSym(1) == null); List b = (List) btParser.getSym(3); btParser.setSym1(nf.ThisCall(pos(), b)); break; } // // Rule 154: ExplicitConstructorInvocation ::= super ( ArgumentListopt ) ; // case 154: {//vj assert(btParser.getSym(1) == null); List b = (List) btParser.getSym(3); btParser.setSym1(nf.SuperCall(pos(), b)); break; } // // Rule 155: ExplicitConstructorInvocation ::= Primary . this ( ArgumentListopt ) ; // case 155: { Expr a = (Expr) btParser.getSym(1);//vj assert(btParser.getSym(2) == null); List b = (List) btParser.getSym(5); btParser.setSym1(nf.ThisCall(pos(), a, b)); break; } // // Rule 156: ExplicitConstructorInvocation ::= Primary . super ( ArgumentListopt ) ; // case 156: { Expr a = (Expr) btParser.getSym(1);//vj assert(btParser.getSym(2) == null); List b = (List) btParser.getSym(5); btParser.setSym1(nf.SuperCall(pos(), a, b)); break; } // // Rule 157: EnumDeclaration ::= ClassModifiersopt enum identifier Interfacesopt EnumBody // case 157: bad_rule = 157; break; // // Rule 158: EnumBody ::= { EnumConstantsopt ,opt EnumBodyDeclarationsopt } // case 158: bad_rule = 158; break; // // Rule 159: EnumConstants ::= EnumConstant // case 159: bad_rule = 159; break; // // Rule 160: EnumConstants ::= EnumConstants , EnumConstant // case 160: bad_rule = 160; break; // // Rule 161: EnumConstant ::= identifier Argumentsopt ClassBodyopt // case 161: bad_rule = 161; break; // // Rule 162: Arguments ::= ( ArgumentListopt ) // case 162: { btParser.setSym1(btParser.getSym(2)); break; } // // Rule 163: EnumBodyDeclarations ::= ; ClassBodyDeclarationsopt // case 163: bad_rule = 163; break; // // Rule 164: InterfaceDeclaration ::= NormalInterfaceDeclaration // case 164: break; // // Rule 165: NormalInterfaceDeclaration ::= InterfaceModifiersopt interface identifier ExtendsInterfacesopt InterfaceBody // case 165: { Flags a = (Flags) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3));//vj assert(btParser.getSym(4) == null); List c = (List) btParser.getSym(4); ClassBody d = (ClassBody) btParser.getSym(5); btParser.setSym1(nf.ClassDecl(pos(), a.Interface(), b.getIdentifier(), null, c, d)); break; } // // Rule 166: InterfaceModifiers ::= InterfaceModifier // case 166: break; // // Rule 167: InterfaceModifiers ::= InterfaceModifiers InterfaceModifier // case 167: { Flags a = (Flags) btParser.getSym(1), b = (Flags) btParser.getSym(2); btParser.setSym1(a.set(b)); break; } // // Rule 168: InterfaceModifier ::= public // case 168: { btParser.setSym1(Flags.PUBLIC); break; } // // Rule 169: InterfaceModifier ::= protected // case 169: { btParser.setSym1(Flags.PROTECTED); break; } // // Rule 170: InterfaceModifier ::= private // case 170: { btParser.setSym1(Flags.PRIVATE); break; } // // Rule 171: InterfaceModifier ::= abstract // case 171: { btParser.setSym1(Flags.ABSTRACT); break; } // // Rule 172: InterfaceModifier ::= static // case 172: { btParser.setSym1(Flags.STATIC); break; } // // Rule 173: InterfaceModifier ::= strictfp // case 173: { btParser.setSym1(Flags.STRICTFP); break; } // // Rule 174: ExtendsInterfaces ::= extends InterfaceType // case 174: { List l = new TypedList(new LinkedList(), TypeNode.class, false); l.add(btParser.getSym(2)); btParser.setSym1(l); break; } // // Rule 175: ExtendsInterfaces ::= ExtendsInterfaces , InterfaceType // case 175: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(3)); // btParser.setSym1(l); break; } // // Rule 176: InterfaceBody ::= { InterfaceMemberDeclarationsopt } // case 176: { List a = (List)btParser.getSym(2); btParser.setSym1(nf.ClassBody(pos(), a)); break; } // // Rule 177: InterfaceMemberDeclarations ::= InterfaceMemberDeclaration // case 177: break; // // Rule 178: InterfaceMemberDeclarations ::= InterfaceMemberDeclarations InterfaceMemberDeclaration // case 178: { List l = (List) btParser.getSym(1), l2 = (List) btParser.getSym(2); l.addAll(l2); // btParser.setSym1(l); break; } // // Rule 179: InterfaceMemberDeclaration ::= ConstantDeclaration // case 179: break; // // Rule 180: InterfaceMemberDeclaration ::= AbstractMethodDeclaration // case 180: { List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 181: InterfaceMemberDeclaration ::= ClassDeclaration // case 181: { List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 182: InterfaceMemberDeclaration ::= InterfaceDeclaration // case 182: { List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 183: InterfaceMemberDeclaration ::= ; // case 183: { btParser.setSym1(Collections.EMPTY_LIST); break; } // // Rule 184: ConstantDeclaration ::= ConstantModifiersopt Type VariableDeclarators // case 184: { List l = new TypedList(new LinkedList(), ClassMember.class, false); Flags a = (Flags) btParser.getSym(1); TypeNode b = (TypeNode) btParser.getSym(2); List c = (List) btParser.getSym(3); for (Iterator i = c.iterator(); i.hasNext();) { X10VarDeclarator d = (X10VarDeclarator) i.next(); if (d.hasExplodedVars()) // TODO: Report this exception correctly. throw new Error("Field Declarations may not have exploded variables." + pos()); l.add(nf.FieldDecl(pos(btParser.getFirstToken(2), btParser.getLastToken()), a, nf.array(b, pos(btParser.getFirstToken(2), btParser.getLastToken(2)), d.dims), d.name, d.init)); } btParser.setSym1(l); break; } // // Rule 185: ConstantModifiers ::= ConstantModifier // case 185: break; // // Rule 186: ConstantModifiers ::= ConstantModifiers ConstantModifier // case 186: { Flags a = (Flags) btParser.getSym(1), b = (Flags) btParser.getSym(2); btParser.setSym1(a.set(b)); break; } // // Rule 187: ConstantModifier ::= public // case 187: { btParser.setSym1(Flags.PUBLIC); break; } // // Rule 188: ConstantModifier ::= static // case 188: { btParser.setSym1(Flags.STATIC); break; } // // Rule 189: ConstantModifier ::= final // case 189: { btParser.setSym1(Flags.FINAL); break; } // // Rule 190: AbstractMethodDeclaration ::= AbstractMethodModifiersopt ResultType MethodDeclarator Throwsopt ; // case 190: { Flags a = (Flags) btParser.getSym(1);//vj assert(btParser.getSym(2) == null); TypeNode b = (TypeNode) btParser.getSym(2); Object[] o = (Object []) btParser.getSym(3); Name c = (Name) o[0]; List d = (List) o[1]; Integer e = (Integer) o[2]; List f = (List) btParser.getSym(4); if (b.type() == ts.Void() && e.intValue() > 0) { // TODO: error!!! assert(false); } btParser.setSym1(nf.MethodDecl(pos(btParser.getFirstToken(2), btParser.getLastToken(3)), a, nf.array((TypeNode) b, pos(btParser.getFirstToken(2), btParser.getLastToken(2)), e.intValue()), c.toString(), d, f, null)); break; } // // Rule 191: AbstractMethodModifiers ::= AbstractMethodModifier // case 191: break; // // Rule 192: AbstractMethodModifiers ::= AbstractMethodModifiers AbstractMethodModifier // case 192: { Flags a = (Flags) btParser.getSym(1), b = (Flags) btParser.getSym(2); btParser.setSym1(a.set(b)); break; } // // Rule 193: AbstractMethodModifier ::= public // case 193: { btParser.setSym1(Flags.PUBLIC); break; } // // Rule 194: AbstractMethodModifier ::= abstract // case 194: { btParser.setSym1(Flags.ABSTRACT); break; } // // Rule 195: AnnotationTypeDeclaration ::= InterfaceModifiersopt @ interface identifier AnnotationTypeBody // case 195: bad_rule = 195; break; // // Rule 196: AnnotationTypeBody ::= { AnnotationTypeElementDeclarationsopt } // case 196: bad_rule = 196; break; // // Rule 197: AnnotationTypeElementDeclarations ::= AnnotationTypeElementDeclaration // case 197: bad_rule = 197; break; // // Rule 198: AnnotationTypeElementDeclarations ::= AnnotationTypeElementDeclarations AnnotationTypeElementDeclaration // case 198: bad_rule = 198; break; // // Rule 199: AnnotationTypeElementDeclaration ::= AbstractMethodModifiersopt Type identifier ( ) DefaultValueopt ; // case 199: bad_rule = 199; break; // // Rule 200: AnnotationTypeElementDeclaration ::= ConstantDeclaration // case 200: bad_rule = 200; break; // // Rule 201: AnnotationTypeElementDeclaration ::= ClassDeclaration // case 201: bad_rule = 201; break; // // Rule 202: AnnotationTypeElementDeclaration ::= InterfaceDeclaration // case 202: bad_rule = 202; break; // // Rule 203: AnnotationTypeElementDeclaration ::= EnumDeclaration // case 203: bad_rule = 203; break; // // Rule 204: AnnotationTypeElementDeclaration ::= AnnotationTypeDeclaration // case 204: bad_rule = 204; break; // // Rule 205: AnnotationTypeElementDeclaration ::= ; // case 205: bad_rule = 205; break; // // Rule 206: DefaultValue ::= default ElementValue // case 206: bad_rule = 206; break; // // Rule 207: Annotations ::= Annotation // case 207: bad_rule = 207; break; // // Rule 208: Annotations ::= Annotations Annotation // case 208: bad_rule = 208; break; // // Rule 209: Annotation ::= NormalAnnotation // case 209: bad_rule = 209; break; // // Rule 210: Annotation ::= MarkerAnnotation // case 210: bad_rule = 210; break; // // Rule 211: Annotation ::= SingleElementAnnotation // case 211: bad_rule = 211; break; // // Rule 212: NormalAnnotation ::= @ TypeName ( ElementValuePairsopt ) // case 212: bad_rule = 212; break; // // Rule 213: ElementValuePairs ::= ElementValuePair // case 213: bad_rule = 213; break; // // Rule 214: ElementValuePairs ::= ElementValuePairs , ElementValuePair // case 214: bad_rule = 214; break; // // Rule 215: ElementValuePair ::= SimpleName = ElementValue // case 215: bad_rule = 215; break; // // Rule 216: SimpleName ::= identifier // case 216: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 217: ElementValue ::= ConditionalExpression // case 217: bad_rule = 217; break; // // Rule 218: ElementValue ::= Annotation // case 218: bad_rule = 218; break; // // Rule 219: ElementValue ::= ElementValueArrayInitializer // case 219: bad_rule = 219; break; // // Rule 220: ElementValueArrayInitializer ::= { ElementValuesopt ,opt } // case 220: bad_rule = 220; break; // // Rule 221: ElementValues ::= ElementValue // case 221: bad_rule = 221; break; // // Rule 222: ElementValues ::= ElementValues , ElementValue // case 222: bad_rule = 222; break; // // Rule 223: MarkerAnnotation ::= @ TypeName // case 223: bad_rule = 223; break; // // Rule 224: SingleElementAnnotation ::= @ TypeName ( ElementValue ) // case 224: bad_rule = 224; break; // // Rule 225: ArrayInitializer ::= { VariableInitializersopt ,opt } // case 225: { List a = (List) btParser.getSym(2); if (a == null) btParser.setSym1(nf.ArrayInit(pos())); else btParser.setSym1(nf.ArrayInit(pos(), a)); break; } // // Rule 226: VariableInitializers ::= VariableInitializer // case 226: { List l = new TypedList(new LinkedList(), Expr.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 227: VariableInitializers ::= VariableInitializers , VariableInitializer // case 227: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(3)); //btParser.setSym1(l); break; } // // Rule 228: Block ::= { BlockStatementsopt } // case 228: { List l = (List) btParser.getSym(2); btParser.setSym1(nf.Block(pos(), l)); break; } // // Rule 229: BlockStatements ::= BlockStatement // case 229: { List l = new TypedList(new LinkedList(), Stmt.class, false), l2 = (List) btParser.getSym(1); l.addAll(l2); btParser.setSym1(l); break; } // // Rule 230: BlockStatements ::= BlockStatements BlockStatement // case 230: { List l = (List) btParser.getSym(1), l2 = (List) btParser.getSym(2); l.addAll(l2); //btParser.setSym1(l); break; } // // Rule 231: BlockStatement ::= LocalVariableDeclarationStatement // case 231: break; // // Rule 232: BlockStatement ::= ClassDeclaration // case 232: { ClassDecl a = (ClassDecl) btParser.getSym(1); List l = new TypedList(new LinkedList(), Stmt.class, false); l.add(nf.LocalClassDecl(pos(), a)); btParser.setSym1(l); break; } // // Rule 233: BlockStatement ::= Statement // case 233: { List l = new TypedList(new LinkedList(), Stmt.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 234: LocalVariableDeclarationStatement ::= LocalVariableDeclaration ; // case 234: break; // // Rule 235: LocalVariableDeclaration ::= VariableModifiersopt Type VariableDeclarators // case 235: { Flags flags = (Flags) btParser.getSym(1); TypeNode a = (TypeNode) btParser.getSym(2); List b = (List) btParser.getSym(3); List l = new TypedList(new LinkedList(), LocalDecl.class, false); List s = new TypedList(new LinkedList(), Stmt.class, false); for (Iterator i = b.iterator(); i.hasNext(); ) { X10VarDeclarator d = (X10VarDeclarator) i.next(); d.setFlag( flags ); // use d.flags below and not flags, setFlag may change it. l.add(nf.LocalDecl(d.pos, d.flags, nf.array(a, pos(d), d.dims), d.name, d.init)); if (d.hasExplodedVars()) s.addAll( d.explode() ); } l.addAll(s); btParser.setSym1(l); break; } // // Rule 236: Statement ::= StatementWithoutTrailingSubstatement // case 236: break; // // Rule 237: Statement ::= LabeledStatement // case 237: break; // // Rule 238: Statement ::= IfThenStatement // case 238: break; // // Rule 239: Statement ::= IfThenElseStatement // case 239: break; // // Rule 240: Statement ::= WhileStatement // case 240: break; // // Rule 241: Statement ::= ForStatement // case 241: break; // // Rule 242: StatementWithoutTrailingSubstatement ::= Block // case 242: break; // // Rule 243: StatementWithoutTrailingSubstatement ::= EmptyStatement // case 243: break; // // Rule 244: StatementWithoutTrailingSubstatement ::= ExpressionStatement // case 244: break; // // Rule 245: StatementWithoutTrailingSubstatement ::= AssertStatement // case 245: break; // // Rule 246: StatementWithoutTrailingSubstatement ::= SwitchStatement // case 246: break; // // Rule 247: StatementWithoutTrailingSubstatement ::= DoStatement // case 247: break; // // Rule 248: StatementWithoutTrailingSubstatement ::= BreakStatement // case 248: break; // // Rule 249: StatementWithoutTrailingSubstatement ::= ContinueStatement // case 249: break; // // Rule 250: StatementWithoutTrailingSubstatement ::= ReturnStatement // case 250: break; // // Rule 251: StatementWithoutTrailingSubstatement ::= SynchronizedStatement // case 251: break; // // Rule 252: StatementWithoutTrailingSubstatement ::= ThrowStatement // case 252: break; // // Rule 253: StatementWithoutTrailingSubstatement ::= TryStatement // case 253: break; // // Rule 254: StatementNoShortIf ::= StatementWithoutTrailingSubstatement // case 254: break; // // Rule 255: StatementNoShortIf ::= LabeledStatementNoShortIf // case 255: break; // // Rule 256: StatementNoShortIf ::= IfThenElseStatementNoShortIf // case 256: break; // // Rule 257: StatementNoShortIf ::= WhileStatementNoShortIf // case 257: break; // // Rule 258: StatementNoShortIf ::= ForStatementNoShortIf // case 258: break; // // Rule 259: IfThenStatement ::= if ( Expression ) Statement // case 259: { Expr a = (Expr) btParser.getSym(3); Stmt b = (Stmt) btParser.getSym(5); btParser.setSym1(nf.If(pos(), a, b)); break; } // // Rule 260: IfThenElseStatement ::= if ( Expression ) StatementNoShortIf else Statement // case 260: { Expr a = (Expr) btParser.getSym(3); Stmt b = (Stmt) btParser.getSym(5); Stmt c = (Stmt) btParser.getSym(7); btParser.setSym1(nf.If(pos(), a, b, c)); break; } // // Rule 261: IfThenElseStatementNoShortIf ::= if ( Expression ) StatementNoShortIf else StatementNoShortIf // case 261: { Expr a = (Expr) btParser.getSym(3); Stmt b = (Stmt) btParser.getSym(5); Stmt c = (Stmt) btParser.getSym(7); btParser.setSym1(nf.If(pos(), a, b, c)); break; } // // Rule 262: EmptyStatement ::= ; // case 262: { btParser.setSym1(nf.Empty(pos())); break; } // // Rule 263: LabeledStatement ::= identifier : Statement // case 263: { polyglot.lex.Identifier a = id(btParser.getToken(1)); Stmt b = (Stmt) btParser.getSym(3); btParser.setSym1(nf.Labeled(pos(), a.getIdentifier(), b)); break; } // // Rule 264: LabeledStatementNoShortIf ::= identifier : StatementNoShortIf // case 264: { polyglot.lex.Identifier a = id(btParser.getToken(1)); Stmt b = (Stmt) btParser.getSym(3); btParser.setSym1(nf.Labeled(pos(), a.getIdentifier(), b)); break; } // // Rule 265: ExpressionStatement ::= StatementExpression ; // case 265: { Expr a = (Expr) btParser.getSym(1); btParser.setSym1(nf.Eval(pos(), a)); break; } // // Rule 266: StatementExpression ::= Assignment // case 266: break; // // Rule 267: StatementExpression ::= PreIncrementExpression // case 267: break; // // Rule 268: StatementExpression ::= PreDecrementExpression // case 268: break; // // Rule 269: StatementExpression ::= PostIncrementExpression // case 269: break; // // Rule 270: StatementExpression ::= PostDecrementExpression // case 270: break; // // Rule 271: StatementExpression ::= MethodInvocation // case 271: break; // // Rule 272: StatementExpression ::= ClassInstanceCreationExpression // case 272: break; // // Rule 273: AssertStatement ::= assert Expression ; // case 273: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Assert(pos(), a)); break; } // // Rule 274: AssertStatement ::= assert Expression : Expression ; // case 274: { Expr a = (Expr) btParser.getSym(2), b = (Expr) btParser.getSym(4); btParser.setSym1(nf.Assert(pos(), a, b)); break; } // // Rule 275: SwitchStatement ::= switch ( Expression ) SwitchBlock // case 275: { Expr a = (Expr) btParser.getSym(3); List b = (List) btParser.getSym(5); btParser.setSym1(nf.Switch(pos(), a, b)); break; } // // Rule 276: SwitchBlock ::= { SwitchBlockStatementGroupsopt SwitchLabelsopt } // case 276: { List l = (List) btParser.getSym(2), l2 = (List) btParser.getSym(3); l.addAll(l2); btParser.setSym1(l); break; } // // Rule 277: SwitchBlockStatementGroups ::= SwitchBlockStatementGroup // case 277: break; // // Rule 278: SwitchBlockStatementGroups ::= SwitchBlockStatementGroups SwitchBlockStatementGroup // case 278: { List l = (List) btParser.getSym(1), l2 = (List) btParser.getSym(2); l.addAll(l2); // btParser.setSym1(l); break; } // // Rule 279: SwitchBlockStatementGroup ::= SwitchLabels BlockStatements // case 279: { List l = new TypedList(new LinkedList(), SwitchElement.class, false); List l1 = (List) btParser.getSym(1), l2 = (List) btParser.getSym(2); l.addAll(l1); l.add(nf.SwitchBlock(pos(), l2)); btParser.setSym1(l); break; } // // Rule 280: SwitchLabels ::= SwitchLabel // case 280: { List l = new TypedList(new LinkedList(), Case.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 281: SwitchLabels ::= SwitchLabels SwitchLabel // case 281: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(2)); //btParser.setSym1(l); break; } // // Rule 282: SwitchLabel ::= case ConstantExpression : // case 282: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Case(pos(), a)); break; } // // Rule 283: SwitchLabel ::= case EnumConstant : // case 283: bad_rule = 283; break; // // Rule 284: SwitchLabel ::= default : // case 284: { btParser.setSym1(nf.Default(pos())); break; } // // Rule 285: EnumConstant ::= identifier // case 285: bad_rule = 285; break; // // Rule 286: WhileStatement ::= while ( Expression ) Statement // case 286: { Expr a = (Expr) btParser.getSym(3); Stmt b = (Stmt) btParser.getSym(5); btParser.setSym1(nf.While(pos(), a, b)); break; } // // Rule 287: WhileStatementNoShortIf ::= while ( Expression ) StatementNoShortIf // case 287: { Expr a = (Expr) btParser.getSym(3); Stmt b = (Stmt) btParser.getSym(5); btParser.setSym1(nf.While(pos(), a, b)); break; } // // Rule 288: DoStatement ::= do Statement while ( Expression ) ; // case 288: { Stmt a = (Stmt) btParser.getSym(2); Expr b = (Expr) btParser.getSym(5); btParser.setSym1(nf.Do(pos(), a, b)); break; } // // Rule 289: ForStatement ::= BasicForStatement // case 289: break; // // Rule 290: ForStatement ::= EnhancedForStatement // case 290: break; // // Rule 291: BasicForStatement ::= for ( ForInitopt ; Expressionopt ; ForUpdateopt ) Statement // case 291: { List a = (List) btParser.getSym(3); Expr b = (Expr) btParser.getSym(5); List c = (List) btParser.getSym(7); Stmt d = (Stmt) btParser.getSym(9); btParser.setSym1(nf.For(pos(), a, b, c, d)); break; } // // Rule 292: ForStatementNoShortIf ::= for ( ForInitopt ; Expressionopt ; ForUpdateopt ) StatementNoShortIf // case 292: { List a = (List) btParser.getSym(3); Expr b = (Expr) btParser.getSym(5); List c = (List) btParser.getSym(7); Stmt d = (Stmt) btParser.getSym(9); btParser.setSym1(nf.For(pos(), a, b, c, d)); break; } // // Rule 293: ForInit ::= StatementExpressionList // case 293: break; // // Rule 294: ForInit ::= LocalVariableDeclaration // case 294: { List l = new TypedList(new LinkedList(), ForInit.class, false), l2 = (List) btParser.getSym(1); l.addAll(l2); //btParser.setSym1(l); break; } // // Rule 295: ForUpdate ::= StatementExpressionList // case 295: break; // // Rule 296: StatementExpressionList ::= StatementExpression // case 296: { List l = new TypedList(new LinkedList(), Eval.class, false); Expr a = (Expr) btParser.getSym(1); l.add(nf.Eval(pos(), a)); btParser.setSym1(l); break; } // // Rule 297: StatementExpressionList ::= StatementExpressionList , StatementExpression // case 297: { List l = (List) btParser.getSym(1); Expr a = (Expr) btParser.getSym(3); l.add(nf.Eval(pos(), a)); //btParser.setSym1(l); break; } // // Rule 298: BreakStatement ::= break identifieropt ; // case 298: { Name a = (Name) btParser.getSym(2); if (a == null) btParser.setSym1(nf.Break(pos())); else btParser.setSym1(nf.Break(pos(), a.toString())); break; } // // Rule 299: ContinueStatement ::= continue identifieropt ; // case 299: { Name a = (Name) btParser.getSym(2); if (a == null) btParser.setSym1(nf.Continue(pos())); else btParser.setSym1(nf.Continue(pos(), a.toString())); break; } // // Rule 300: ReturnStatement ::= return Expressionopt ; // case 300: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Return(pos(), a)); break; } // // Rule 301: ThrowStatement ::= throw Expression ; // case 301: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Throw(pos(), a)); break; } // // Rule 302: SynchronizedStatement ::= synchronized ( Expression ) Block // case 302: { Expr a = (Expr) btParser.getSym(3); Block b = (Block) btParser.getSym(5); btParser.setSym1(nf.Synchronized(pos(), a, b)); break; } // // Rule 303: TryStatement ::= try Block Catches // case 303: { Block a = (Block) btParser.getSym(2); List b = (List) btParser.getSym(3); btParser.setSym1(nf.Try(pos(), a, b)); break; } // // Rule 304: TryStatement ::= try Block Catchesopt Finally // case 304: { Block a = (Block) btParser.getSym(2); List b = (List) btParser.getSym(3); Block c = (Block) btParser.getSym(4); btParser.setSym1(nf.Try(pos(), a, b, c)); break; } // // Rule 305: Catches ::= CatchClause // case 305: { List l = new TypedList(new LinkedList(), Catch.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 306: Catches ::= Catches CatchClause // case 306: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(2)); //btParser.setSym1(l); break; } // // Rule 307: CatchClause ::= catch ( FormalParameter ) Block // case 307: { Formal a = (Formal) btParser.getSym(3); Block b = (Block) btParser.getSym(5); btParser.setSym1(nf.Catch(pos(), a, b)); break; } // // Rule 308: Finally ::= finally Block // case 308: { btParser.setSym1(btParser.getSym(2)); break; } // // Rule 309: Primary ::= PrimaryNoNewArray // case 309: break; // // Rule 310: Primary ::= ArrayCreationExpression // case 310: break; // // Rule 311: PrimaryNoNewArray ::= Literal // case 311: break; // // Rule 312: PrimaryNoNewArray ::= Type . class // case 312: { Object o = btParser.getSym(1); if (o instanceof Name) { Name a = (Name) o; btParser.setSym1(nf.ClassLit(pos(), a.toType())); } else if (o instanceof TypeNode) { TypeNode a = (TypeNode) o; btParser.setSym1(nf.ClassLit(pos(), a)); } else if (o instanceof CanonicalTypeNode) { CanonicalTypeNode a = (CanonicalTypeNode) o; btParser.setSym1(nf.ClassLit(pos(), a)); } else assert(false); break; } // // Rule 313: PrimaryNoNewArray ::= void . class // case 313: { btParser.setSym1(nf.ClassLit(pos(), nf.CanonicalTypeNode(pos(btParser.getToken(1)), ts.Void()))); break; } // // Rule 314: PrimaryNoNewArray ::= this // case 314: { btParser.setSym1(nf.This(pos())); break; } // // Rule 315: PrimaryNoNewArray ::= ClassName . this // case 315: { Name a = (Name) btParser.getSym(1); btParser.setSym1(nf.This(pos(), a.toType())); break; } // // Rule 316: PrimaryNoNewArray ::= ( Expression ) // case 316: { btParser.setSym1(btParser.getSym(2)); break; } // // Rule 317: PrimaryNoNewArray ::= ClassInstanceCreationExpression // case 317: break; // // Rule 318: PrimaryNoNewArray ::= FieldAccess // case 318: break; // // Rule 319: PrimaryNoNewArray ::= MethodInvocation // case 319: break; // // Rule 320: PrimaryNoNewArray ::= ArrayAccess // case 320: break; // // Rule 321: Literal ::= IntegerLiteral // case 321: { polyglot.lex.IntegerLiteral a = int_lit(btParser.getToken(1)); btParser.setSym1(nf.IntLit(pos(), IntLit.INT, a.getValue().intValue())); break; } // // Rule 322: Literal ::= LongLiteral // case 322: { polyglot.lex.LongLiteral a = long_lit(btParser.getToken(1)); btParser.setSym1(nf.IntLit(pos(), IntLit.LONG, a.getValue().longValue())); break; } // // Rule 323: Literal ::= FloatingPointLiteral // case 323: { polyglot.lex.FloatLiteral a = float_lit(btParser.getToken(1)); btParser.setSym1(nf.FloatLit(pos(), FloatLit.FLOAT, a.getValue().floatValue())); break; } // // Rule 324: Literal ::= DoubleLiteral // case 324: { polyglot.lex.DoubleLiteral a = double_lit(btParser.getToken(1)); btParser.setSym1(nf.FloatLit(pos(), FloatLit.DOUBLE, a.getValue().doubleValue())); break; } // // Rule 325: Literal ::= BooleanLiteral // case 325: { polyglot.lex.BooleanLiteral a = boolean_lit(btParser.getToken(1)); btParser.setSym1(nf.BooleanLit(pos(), a.getValue().booleanValue())); break; } // // Rule 326: Literal ::= CharacterLiteral // case 326: { polyglot.lex.CharacterLiteral a = char_lit(btParser.getToken(1)); btParser.setSym1(nf.CharLit(pos(), a.getValue().charValue())); break; } // // Rule 327: Literal ::= StringLiteral // case 327: { polyglot.lex.StringLiteral a = string_lit(btParser.getToken(1)); btParser.setSym1(nf.StringLit(pos(), a.getValue())); break; } // // Rule 328: Literal ::= null // case 328: { btParser.setSym1(nf.NullLit(pos())); break; } // // Rule 329: BooleanLiteral ::= true // case 329: break; // // Rule 330: BooleanLiteral ::= false // case 330: break; // // Rule 331: ClassInstanceCreationExpression ::= new ClassOrInterfaceType ( ArgumentListopt ) ClassBodyopt // case 331: {//vj assert(btParser.getSym(2) == null); TypeNode a = (TypeNode) btParser.getSym(2);//vj assert(btParser.getSym(4) == null); List b = (List) btParser.getSym(4); ClassBody c = (ClassBody) btParser.getSym(6); if (c == null) btParser.setSym1(nf.New(pos(), a, b)); else btParser.setSym1(nf.New(pos(), a, b, c)); break; } // // Rule 332: ClassInstanceCreationExpression ::= Primary . new identifier ( ArgumentListopt ) ClassBodyopt // case 332: { Expr a = (Expr) btParser.getSym(1);//vj assert(btParser.getSym(2) == null); Name b = new Name(nf, ts, pos(), id(btParser.getToken(4)).getIdentifier());//vj assert(btParser.getSym(4) == null); List c = (List) btParser.getSym(6); ClassBody d = (ClassBody) btParser.getSym(8); if (d == null) btParser.setSym1(nf.New(pos(), a, b.toType(), c)); else btParser.setSym1(nf.New(pos(), a, b.toType(), c, d)); break; } // // Rule 333: ClassInstanceCreationExpression ::= AmbiguousName . new identifier ( ArgumentListopt ) ClassBodyopt // case 333: { Name a = (Name) btParser.getSym(1);//vj assert(btParser.getSym(4) == null); Name b = new Name(nf, ts, pos(), id(btParser.getToken(4)).getIdentifier());//vj assert(btParser.getSym(6) == null); List c = (List) btParser.getSym(6); ClassBody d = (ClassBody) btParser.getSym(8); if (d == null) btParser.setSym1(nf.New(pos(), a.toExpr(), b.toType(), c)); else btParser.setSym1(nf.New(pos(), a.toExpr(), b.toType(), c, d)); break; } // // Rule 334: ArgumentList ::= Expression // case 334: { List l = new TypedList(new LinkedList(), Expr.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 335: ArgumentList ::= ArgumentList , Expression // case 335: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(3)); //btParser.setSym1(l); break; } // // Rule 336: DimExprs ::= DimExpr // case 336: { List l = new TypedList(new LinkedList(), Expr.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 337: DimExprs ::= DimExprs DimExpr // case 337: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(2)); //btParser.setSym1(l); break; } // // Rule 338: DimExpr ::= [ Expression ] // case 338: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(a.position(pos())); break; } // // Rule 339: Dims ::= [ ] // case 339: { btParser.setSym1(new Integer(1)); break; } // // Rule 340: Dims ::= Dims [ ] // case 340: { Integer a = (Integer) btParser.getSym(1); btParser.setSym1(new Integer(a.intValue() + 1)); break; } // // Rule 341: FieldAccess ::= Primary . identifier // case 341: { Expr a = (Expr) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); btParser.setSym1(nf.Field(pos(), a, b.getIdentifier())); break; } // // Rule 342: FieldAccess ::= super . identifier // case 342: { polyglot.lex.Identifier a = id(btParser.getToken(3)); btParser.setSym1(nf.Field(pos(btParser.getLastToken()), nf.Super(pos(btParser.getFirstToken())), a.getIdentifier())); break; } // // Rule 343: FieldAccess ::= ClassName . super . identifier // case 343: { Name a = (Name) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); btParser.setSym1(nf.Field(pos(btParser.getLastToken()), nf.Super(pos(btParser.getFirstToken(3)), a.toType()), b.getIdentifier())); break; } // // Rule 344: MethodInvocation ::= MethodName ( ArgumentListopt ) // case 344: { Name a = (Name) btParser.getSym(1); List b = (List) btParser.getSym(3); btParser.setSym1(nf.Call(pos(), a.prefix == null ? null : a.prefix.toReceiver(), a.name, b)); break; } // // Rule 345: MethodInvocation ::= Primary . identifier ( ArgumentListopt ) // case 345: { Expr a = (Expr) btParser.getSym(1);//vj assert(btParser.getSym(3) == null); polyglot.lex.Identifier b = id(btParser.getToken(3)); List c = (List) btParser.getSym(5); btParser.setSym1(nf.Call(pos(), a, b.getIdentifier(), c)); break; } // // Rule 346: MethodInvocation ::= super . identifier ( ArgumentListopt ) // case 346: {//vj assert(btParser.getSym(3) == null); polyglot.lex.Identifier b = id(btParser.getToken(3)); List c = (List) btParser.getSym(5); btParser.setSym1(nf.Call(pos(), nf.Super(pos(btParser.getFirstToken())), b.getIdentifier(), c)); break; } // // Rule 347: MethodInvocation ::= ClassName . super . identifier ( ArgumentListopt ) // case 347: { Name a = (Name) btParser.getSym(1);//vj assert(btParser.getSym(5) == null); polyglot.lex.Identifier b = id(btParser.getToken(5)); List c = (List) btParser.getSym(7); btParser.setSym1(nf.Call(pos(), nf.Super(pos(btParser.getFirstToken(3)), a.toType()), b.getIdentifier(), c)); break; } // // Rule 348: PostfixExpression ::= Primary // case 348: break; // // Rule 349: PostfixExpression ::= ExpressionName // case 349: { Name a = (Name) btParser.getSym(1); btParser.setSym1(a.toExpr()); break; } // // Rule 350: PostfixExpression ::= PostIncrementExpression // case 350: break; // // Rule 351: PostfixExpression ::= PostDecrementExpression // case 351: break; // // Rule 352: PostIncrementExpression ::= PostfixExpression ++ // case 352: { Expr a = (Expr) btParser.getSym(1); btParser.setSym1(nf.Unary(pos(), a, Unary.POST_INC)); break; } // // Rule 353: PostDecrementExpression ::= PostfixExpression -- // case 353: { Expr a = (Expr) btParser.getSym(1); btParser.setSym1(nf.Unary(pos(), a, Unary.POST_DEC)); break; } // // Rule 354: UnaryExpression ::= PreIncrementExpression // case 354: break; // // Rule 355: UnaryExpression ::= PreDecrementExpression // case 355: break; // // Rule 356: UnaryExpression ::= + UnaryExpression // case 356: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Unary(pos(), Unary.POS, a)); break; } // // Rule 357: UnaryExpression ::= - UnaryExpression // case 357: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Unary(pos(), Unary.NEG, a)); break; } // // Rule 359: PreIncrementExpression ::= ++ UnaryExpression // case 359: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Unary(pos(), Unary.PRE_INC, a)); break; } // // Rule 360: PreDecrementExpression ::= -- UnaryExpression // case 360: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Unary(pos(), Unary.PRE_DEC, a)); break; } // // Rule 361: UnaryExpressionNotPlusMinus ::= PostfixExpression // case 361: break; // // Rule 362: UnaryExpressionNotPlusMinus ::= ~ UnaryExpression // case 362: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Unary(pos(), Unary.BIT_NOT, a)); break; } // // Rule 363: UnaryExpressionNotPlusMinus ::= ! UnaryExpression // case 363: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Unary(pos(), Unary.NOT, a)); break; } // // Rule 365: MultiplicativeExpression ::= UnaryExpression // case 365: break; // // Rule 366: MultiplicativeExpression ::= MultiplicativeExpression * UnaryExpression // case 366: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.MUL, b)); break; } // // Rule 367: MultiplicativeExpression ::= MultiplicativeExpression / UnaryExpression // case 367: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.DIV, b)); break; } // // Rule 368: MultiplicativeExpression ::= MultiplicativeExpression % UnaryExpression // case 368: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.MOD, b)); break; } // // Rule 369: AdditiveExpression ::= MultiplicativeExpression // case 369: break; // // Rule 370: AdditiveExpression ::= AdditiveExpression + MultiplicativeExpression // case 370: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.ADD, b)); break; } // // Rule 371: AdditiveExpression ::= AdditiveExpression - MultiplicativeExpression // case 371: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.SUB, b)); break; } // // Rule 372: ShiftExpression ::= AdditiveExpression // case 372: break; // // Rule 373: ShiftExpression ::= ShiftExpression << AdditiveExpression // case 373: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.SHL, b)); break; } // // Rule 374: ShiftExpression ::= ShiftExpression > > AdditiveExpression // case 374: { // TODO: make sure that there is no space between the ">" signs Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(4); btParser.setSym1(nf.Binary(pos(), a, Binary.SHR, b)); break; } // // Rule 375: ShiftExpression ::= ShiftExpression > > > AdditiveExpression // case 375: { // TODO: make sure that there is no space between the ">" signs Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(5); btParser.setSym1(nf.Binary(pos(), a, Binary.USHR, b)); break; } // // Rule 376: RelationalExpression ::= ShiftExpression // case 376: break; // // Rule 377: RelationalExpression ::= RelationalExpression < ShiftExpression // case 377: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.LT, b)); break; } // // Rule 378: RelationalExpression ::= RelationalExpression > ShiftExpression // case 378: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.GT, b)); break; } // // Rule 379: RelationalExpression ::= RelationalExpression <= ShiftExpression // case 379: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.LE, b)); break; } // // Rule 380: RelationalExpression ::= RelationalExpression > = ShiftExpression // case 380: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(4); btParser.setSym1(nf.Binary(pos(), a, Binary.GE, b)); break; } // // Rule 381: EqualityExpression ::= RelationalExpression // case 381: break; // // Rule 382: EqualityExpression ::= EqualityExpression == RelationalExpression // case 382: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.EQ, b)); break; } // // Rule 383: EqualityExpression ::= EqualityExpression != RelationalExpression // case 383: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.NE, b)); break; } // // Rule 384: AndExpression ::= EqualityExpression // case 384: break; // // Rule 385: AndExpression ::= AndExpression & EqualityExpression // case 385: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.BIT_AND, b)); break; } // // Rule 386: ExclusiveOrExpression ::= AndExpression // case 386: break; // // Rule 387: ExclusiveOrExpression ::= ExclusiveOrExpression ^ AndExpression // case 387: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.BIT_XOR, b)); break; } // // Rule 388: InclusiveOrExpression ::= ExclusiveOrExpression // case 388: break; // // Rule 389: InclusiveOrExpression ::= InclusiveOrExpression | ExclusiveOrExpression // case 389: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.BIT_OR, b)); break; } // // Rule 390: ConditionalAndExpression ::= InclusiveOrExpression // case 390: break; // // Rule 391: ConditionalAndExpression ::= ConditionalAndExpression && InclusiveOrExpression // case 391: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.COND_AND, b)); break; } // // Rule 392: ConditionalOrExpression ::= ConditionalAndExpression // case 392: break; // // Rule 393: ConditionalOrExpression ::= ConditionalOrExpression || ConditionalAndExpression // case 393: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.COND_OR, b)); break; } // // Rule 394: ConditionalExpression ::= ConditionalOrExpression // case 394: break; // // Rule 395: ConditionalExpression ::= ConditionalOrExpression ? Expression : ConditionalExpression // case 395: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3), c = (Expr) btParser.getSym(5); btParser.setSym1(nf.Conditional(pos(), a, b, c)); break; } // // Rule 396: AssignmentExpression ::= ConditionalExpression // case 396: break; // // Rule 397: AssignmentExpression ::= Assignment // case 397: break; // // Rule 398: Assignment ::= LeftHandSide AssignmentOperator AssignmentExpression // case 398: { Expr a = (Expr) btParser.getSym(1); Assign.Operator b = (Assign.Operator) btParser.getSym(2); Expr c = (Expr) btParser.getSym(3); btParser.setSym1(nf.Assign(pos(), a, b, c)); break; } // // Rule 399: LeftHandSide ::= ExpressionName // case 399: { Name a = (Name) btParser.getSym(1); btParser.setSym1(a.toExpr()); break; } // // Rule 400: LeftHandSide ::= FieldAccess // case 400: break; // // Rule 401: LeftHandSide ::= ArrayAccess // case 401: break; // // Rule 402: AssignmentOperator ::= = // case 402: { btParser.setSym1(Assign.ASSIGN); break; } // // Rule 403: AssignmentOperator ::= *= // case 403: { btParser.setSym1(Assign.MUL_ASSIGN); break; } // // Rule 404: AssignmentOperator ::= /= // case 404: { btParser.setSym1(Assign.DIV_ASSIGN); break; } // // Rule 405: AssignmentOperator ::= %= // case 405: { btParser.setSym1(Assign.MOD_ASSIGN); break; } // // Rule 406: AssignmentOperator ::= += // case 406: { btParser.setSym1(Assign.ADD_ASSIGN); break; } // // Rule 407: AssignmentOperator ::= -= // case 407: { btParser.setSym1(Assign.SUB_ASSIGN); break; } // // Rule 408: AssignmentOperator ::= <<= // case 408: { btParser.setSym1(Assign.SHL_ASSIGN); break; } // // Rule 409: AssignmentOperator ::= > > = // case 409: { // TODO: make sure that there is no space between the ">" signs btParser.setSym1(Assign.SHR_ASSIGN); break; } // // Rule 410: AssignmentOperator ::= > > > = // case 410: { // TODO: make sure that there is no space between the ">" signs btParser.setSym1(Assign.USHR_ASSIGN); break; } // // Rule 411: AssignmentOperator ::= &= // case 411: { btParser.setSym1(Assign.BIT_AND_ASSIGN); break; } // // Rule 412: AssignmentOperator ::= ^= // case 412: { btParser.setSym1(Assign.BIT_XOR_ASSIGN); break; } // // Rule 413: AssignmentOperator ::= |= // case 413: { btParser.setSym1(Assign.BIT_OR_ASSIGN); break; } // // Rule 414: Expression ::= AssignmentExpression // case 414: break; // // Rule 415: ConstantExpression ::= Expression // case 415: break; // // Rule 416: Dimsopt ::= $Empty // case 416: { btParser.setSym1(new Integer(0)); break; } // // Rule 417: Dimsopt ::= Dims // case 417: break; // // Rule 418: Catchesopt ::= $Empty // case 418: { btParser.setSym1(new TypedList(new LinkedList(), Catch.class, false)); break; } // // Rule 419: Catchesopt ::= Catches // case 419: break; // // Rule 420: identifieropt ::= $Empty // case 420: btParser.setSym1(null); break; // // Rule 421: identifieropt ::= identifier // case 421: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 422: ForUpdateopt ::= $Empty // case 422: { btParser.setSym1(new TypedList(new LinkedList(), ForUpdate.class, false)); break; } // // Rule 423: ForUpdateopt ::= ForUpdate // case 423: break; // // Rule 424: Expressionopt ::= $Empty // case 424: btParser.setSym1(null); break; // // Rule 425: Expressionopt ::= Expression // case 425: break; // // Rule 426: ForInitopt ::= $Empty // case 426: { btParser.setSym1(new TypedList(new LinkedList(), ForInit.class, false)); break; } // // Rule 427: ForInitopt ::= ForInit // case 427: break; // // Rule 428: SwitchLabelsopt ::= $Empty // case 428: { btParser.setSym1(new TypedList(new LinkedList(), Case.class, false)); break; } // // Rule 429: SwitchLabelsopt ::= SwitchLabels // case 429: break; // // Rule 430: SwitchBlockStatementGroupsopt ::= $Empty // case 430: { btParser.setSym1(new TypedList(new LinkedList(), SwitchElement.class, false)); break; } // // Rule 431: SwitchBlockStatementGroupsopt ::= SwitchBlockStatementGroups // case 431: break; // // Rule 432: VariableModifiersopt ::= $Empty // case 432: { btParser.setSym1(Flags.NONE); break; } // // Rule 433: VariableModifiersopt ::= VariableModifiers // case 433: break; // // Rule 434: VariableInitializersopt ::= $Empty // case 434: btParser.setSym1(null); break; // // Rule 435: VariableInitializersopt ::= VariableInitializers // case 435: break; // // Rule 436: ElementValuesopt ::= $Empty // case 436: btParser.setSym1(null); break; // // Rule 437: ElementValuesopt ::= ElementValues // case 437: bad_rule = 437; break; // // Rule 438: ElementValuePairsopt ::= $Empty // case 438: btParser.setSym1(null); break; // // Rule 439: ElementValuePairsopt ::= ElementValuePairs // case 439: bad_rule = 439; break; // // Rule 440: DefaultValueopt ::= $Empty // case 440: btParser.setSym1(null); break; // // Rule 441: DefaultValueopt ::= DefaultValue // case 441: break; // // Rule 442: AnnotationTypeElementDeclarationsopt ::= $Empty // case 442: btParser.setSym1(null); break; // // Rule 443: AnnotationTypeElementDeclarationsopt ::= AnnotationTypeElementDeclarations // case 443: bad_rule = 443; break; // // Rule 444: AbstractMethodModifiersopt ::= $Empty // case 444: { btParser.setSym1(Flags.NONE); break; } // // Rule 445: AbstractMethodModifiersopt ::= AbstractMethodModifiers // case 445: break; // // Rule 446: ConstantModifiersopt ::= $Empty // case 446: { btParser.setSym1(Flags.NONE); break; } // // Rule 447: ConstantModifiersopt ::= ConstantModifiers // case 447: break; // // Rule 448: InterfaceMemberDeclarationsopt ::= $Empty // case 448: { btParser.setSym1(new TypedList(new LinkedList(), ClassMember.class, false)); break; } // // Rule 449: InterfaceMemberDeclarationsopt ::= InterfaceMemberDeclarations // case 449: break; // // Rule 450: ExtendsInterfacesopt ::= $Empty // case 450: { btParser.setSym1(new TypedList(new LinkedList(), TypeNode.class, false)); break; } // // Rule 451: ExtendsInterfacesopt ::= ExtendsInterfaces // case 451: break; // // Rule 452: InterfaceModifiersopt ::= $Empty // case 452: { btParser.setSym1(Flags.NONE); break; } // // Rule 453: InterfaceModifiersopt ::= InterfaceModifiers // case 453: break; // // Rule 454: ClassBodyopt ::= $Empty // case 454: btParser.setSym1(null); break; // // Rule 455: ClassBodyopt ::= ClassBody // case 455: break; // // Rule 456: Argumentsopt ::= $Empty // case 456: btParser.setSym1(null); break; // // Rule 457: Argumentsopt ::= Arguments // case 457: bad_rule = 457; break; // // Rule 458: EnumBodyDeclarationsopt ::= $Empty // case 458: btParser.setSym1(null); break; // // Rule 459: EnumBodyDeclarationsopt ::= EnumBodyDeclarations // case 459: bad_rule = 459; break; // // Rule 460: ,opt ::= $Empty // case 460: btParser.setSym1(null); break; // // Rule 461: ,opt ::= , // case 461: break; // // Rule 462: EnumConstantsopt ::= $Empty // case 462: btParser.setSym1(null); break; // // Rule 463: EnumConstantsopt ::= EnumConstants // case 463: bad_rule = 463; break; // // Rule 464: ArgumentListopt ::= $Empty // case 464: { btParser.setSym1(new TypedList(new LinkedList(), Catch.class, false)); break; } // // Rule 465: ArgumentListopt ::= ArgumentList // case 465: break; // // Rule 466: BlockStatementsopt ::= $Empty // case 466: { btParser.setSym1(new TypedList(new LinkedList(), Stmt.class, false)); break; } // // Rule 467: BlockStatementsopt ::= BlockStatements // case 467: break; // // Rule 468: ExplicitConstructorInvocationopt ::= $Empty // case 468: btParser.setSym1(null); break; // // Rule 469: ExplicitConstructorInvocationopt ::= ExplicitConstructorInvocation // case 469: break; // // Rule 470: ConstructorModifiersopt ::= $Empty // case 470: { btParser.setSym1(Flags.NONE); break; } // // Rule 471: ConstructorModifiersopt ::= ConstructorModifiers // case 471: break; // // Rule 472: ...opt ::= $Empty // case 472: btParser.setSym1(null); break; // // Rule 473: ...opt ::= ... // case 473: break; // // Rule 474: FormalParameterListopt ::= $Empty // case 474: { btParser.setSym1(new TypedList(new LinkedList(), Formal.class, false)); break; } // // Rule 475: FormalParameterListopt ::= FormalParameterList // case 475: break; // // Rule 476: Throwsopt ::= $Empty // case 476: { btParser.setSym1(new TypedList(new LinkedList(), TypeNode.class, false)); break; } // // Rule 477: Throwsopt ::= Throws // case 477: break; // // Rule 478: MethodModifiersopt ::= $Empty // case 478: { btParser.setSym1(Flags.NONE); break; } // // Rule 479: MethodModifiersopt ::= MethodModifiers // case 479: break; // // Rule 480: FieldModifiersopt ::= $Empty // case 480: { btParser.setSym1(Flags.NONE); break; } // // Rule 481: FieldModifiersopt ::= FieldModifiers // case 481: break; // // Rule 482: ClassBodyDeclarationsopt ::= $Empty // case 482: { btParser.setSym1(new TypedList(new LinkedList(), ClassMember.class, false)); break; } // // Rule 483: ClassBodyDeclarationsopt ::= ClassBodyDeclarations // case 483: break; // // Rule 484: Interfacesopt ::= $Empty // case 484: { btParser.setSym1(new TypedList(new LinkedList(), TypeNode.class, false)); break; } // // Rule 485: Interfacesopt ::= Interfaces // case 485: break; // // Rule 486: Superopt ::= $Empty // case 486: btParser.setSym1(null); break; // // Rule 487: Superopt ::= Super // case 487: break; // // Rule 488: TypeParametersopt ::= $Empty // case 488: btParser.setSym1(null); break; // // Rule 489: TypeParametersopt ::= TypeParameters // case 489: break; // // Rule 490: ClassModifiersopt ::= $Empty // case 490: { btParser.setSym1(Flags.NONE); break; } // // Rule 491: ClassModifiersopt ::= ClassModifiers // case 491: break; // // Rule 492: Annotationsopt ::= $Empty // case 492: btParser.setSym1(null); break; // // Rule 493: Annotationsopt ::= Annotations // case 493: bad_rule = 493; break; // // Rule 494: TypeDeclarationsopt ::= $Empty // case 494: { btParser.setSym1(new TypedList(new LinkedList(), TopLevelDecl.class, false)); break; } // // Rule 495: TypeDeclarationsopt ::= TypeDeclarations // case 495: break; // // Rule 496: ImportDeclarationsopt ::= $Empty // case 496: { btParser.setSym1(new TypedList(new LinkedList(), Import.class, false)); break; } // // Rule 497: ImportDeclarationsopt ::= ImportDeclarations // case 497: break; // // Rule 498: PackageDeclarationopt ::= $Empty // case 498: btParser.setSym1(null); break; // // Rule 499: PackageDeclarationopt ::= PackageDeclaration // case 499: break; // // Rule 500: WildcardBoundsOpt ::= $Empty // case 500: btParser.setSym1(null); break; // // Rule 501: WildcardBoundsOpt ::= WildcardBounds // case 501: bad_rule = 501; break; // // Rule 502: AdditionalBoundListopt ::= $Empty // case 502: btParser.setSym1(null); break; // // Rule 503: AdditionalBoundListopt ::= AdditionalBoundList // case 503: bad_rule = 503; break; // // Rule 504: TypeBoundopt ::= $Empty // case 504: btParser.setSym1(null); break; // // Rule 505: TypeBoundopt ::= TypeBound // case 505: bad_rule = 505; break; // // Rule 506: TypeArgumentsopt ::= $Empty // case 506: btParser.setSym1(null); break; // // Rule 507: TypeArgumentsopt ::= TypeArguments // case 507: bad_rule = 507; break; // // Rule 508: Type ::= DataType PlaceTypeSpecifieropt // case 508: { // Just parse the placetype and drop it for now. break; } // // Rule 509: Type ::= nullable < Type > // case 509: { TypeNode a = (TypeNode) btParser.getSym(3); btParser.setSym1(nf.Nullable(pos(), a)); break; } // // Rule 510: Type ::= future < Type > // case 510: { TypeNode a = (TypeNode) btParser.getSym(3); btParser.setSym1(nf.Future(pos(), a)); break; } // // Rule 511: DataType ::= PrimitiveType // case 511: break; // // Rule 512: DataType ::= ClassOrInterfaceType // case 512: break; // // Rule 513: DataType ::= ArrayType // case 513: break; // // Rule 514: PlaceTypeSpecifier ::= @ PlaceType // case 514: break; // // Rule 515: PlaceType ::= place // case 515: break; // // Rule 516: PlaceType ::= activity // case 516: break; // // Rule 517: PlaceType ::= method // case 517: break; // // Rule 518: PlaceType ::= current // case 518: break; // // Rule 519: PlaceType ::= PlaceExpression // case 519: break; // // Rule 520: ClassOrInterfaceType ::= TypeName DepParametersopt // case 520: { Name a = (Name) btParser.getSym(1); TypeNode t = a.toType(); DepParameterExpr b = (DepParameterExpr) btParser.getSym(2); btParser.setSym1(b == null ? t : nf.ParametricTypeNode(pos(), t, b)); break; } // // Rule 521: DepParameters ::= ( DepParameterExpr ) // case 521: break; // // Rule 522: DepParameterExpr ::= ArgumentList WhereClauseopt // case 522: { List a = (List) btParser.getSym(1); Expr b = (Expr) btParser.getSym(2); btParser.setSym1(nf.DepParameterExpr(pos(),a,b)); break; } // // Rule 523: DepParameterExpr ::= WhereClause // case 523: { Expr b = (Expr) btParser.getSym(1); btParser.setSym1(nf.DepParameterExpr(pos(), null, b)); break; } // // Rule 524: WhereClause ::= : Expression // case 524: break; // // Rule 526: X10ArrayType ::= Type [ . ] // case 526: { TypeNode a = (TypeNode) btParser.getSym(1); TypeNode t = nf.X10ArrayTypeNode(pos(), a, false, null); btParser.setSym1(t); break; } // // Rule 527: X10ArrayType ::= Type reference [ . ] // case 527: { TypeNode a = (TypeNode) btParser.getSym(1); btParser.setSym1(nf.X10ArrayTypeNode(pos(), a, false, null)); break; } // // Rule 528: X10ArrayType ::= Type value [ . ] // case 528: { TypeNode a = (TypeNode) btParser.getSym(1); btParser.setSym1(nf.X10ArrayTypeNode(pos(), a, true, null)); break; } // // Rule 529: X10ArrayType ::= Type [ DepParameterExpr ] // case 529: { TypeNode a = (TypeNode) btParser.getSym(1); DepParameterExpr b = (DepParameterExpr) btParser.getSym(2); btParser.setSym1(nf.X10ArrayTypeNode(pos(), a, false, b)); break; } // // Rule 530: X10ArrayType ::= Type reference [ DepParameterExpr ] // case 530: { TypeNode a = (TypeNode) btParser.getSym(1); DepParameterExpr b = (DepParameterExpr) btParser.getSym(2); btParser.setSym1(nf.X10ArrayTypeNode(pos(), a, false, b)); break; } // // Rule 531: X10ArrayType ::= Type value [ DepParameterExpr ] // case 531: { TypeNode a = (TypeNode) btParser.getSym(1); DepParameterExpr b = (DepParameterExpr) btParser.getSym(2); btParser.setSym1(nf.X10ArrayTypeNode(pos(), a, true, b)); break; } // // Rule 532: ObjectKind ::= value // case 532: bad_rule = 532; break; // // Rule 533: ObjectKind ::= reference // case 533: bad_rule = 533; break; // // Rule 534: MethodModifier ::= atomic // case 534: { btParser.setSym1(Flags.ATOMIC); break; } // // Rule 535: MethodModifier ::= extern // case 535: { btParser.setSym1(Flags.NATIVE); break; } // // Rule 536: ClassDeclaration ::= ValueClassDeclaration // case 536: break; // // Rule 537: ValueClassDeclaration ::= ClassModifiersopt value identifier Superopt Interfacesopt ClassBody // case 537: { Flags a = (Flags) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); TypeNode c = (TypeNode) btParser.getSym(4); List d = (List) btParser.getSym(5); ClassBody e = (ClassBody) btParser.getSym(6); btParser.setSym1(nf.ValueClassDecl(pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier(), c, d, e)); break; } // // Rule 538: ValueClassDeclaration ::= ClassModifiersopt value class identifier Superopt Interfacesopt ClassBody // case 538: { Flags a = (Flags) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(4)); TypeNode c = (TypeNode) btParser.getSym(5); List d = (List) btParser.getSym(6); ClassBody e = (ClassBody) btParser.getSym(7); btParser.setSym1(nf.ValueClassDecl(pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier(), c, d, e)); break; } // // Rule 539: ArrayCreationExpression ::= new ArrayBaseType Unsafeopt [ ] ArrayInitializer // case 539: { TypeNode a = (TypeNode) btParser.getSym(2); ArrayInit d = (ArrayInit) btParser.getSym(6); // btParser.setSym1(nf.ArrayConstructor(pos(), a, false, null, d)); btParser.setSym1(nf.NewArray(pos(), a, 1, d)); break; } // // Rule 540: ArrayCreationExpression ::= new ArrayBaseType Unsafeopt [ Expression ] // case 540: { TypeNode a = (TypeNode) btParser.getSym(2); boolean unsafe = (btParser.getSym(3) != null); Expr c = (Expr) btParser.getSym(5); btParser.setSym1(nf.ArrayConstructor(pos(), a, unsafe, false, c, null)); break; } // // Rule 541: ArrayCreationExpression ::= new ArrayBaseType Unsafeopt [ Expression ] Expression // case 541: { TypeNode a = (TypeNode) btParser.getSym(2); boolean unsafe = (btParser.getSym(3) != null); Expr distr = (Expr) btParser.getSym(5); Expr initializer = (Expr) btParser.getSym(7); btParser.setSym1(nf.ArrayConstructor(pos(), a, unsafe, false, distr, initializer)); break; } // // Rule 542: ArrayCreationExpression ::= new ArrayBaseType Unsafeopt [ Expression ] ( FormalParameter ) MethodBody // case 542: { TypeNode a = (TypeNode) btParser.getSym(2); boolean unsafe = (btParser.getSym(3) != null); Expr distr = (Expr) btParser.getSym(5); X10Formal f = (X10Formal) btParser.getSym(8); Block body = (Block) btParser.getSym(10); New initializer = makeInitializer( pos(btParser.getFirstToken(7), btParser.getLastToken(10)), a, f, body ); btParser.setSym1(nf.ArrayConstructor(pos(), a, unsafe, false, distr, initializer)); break; } // // Rule 543: ArrayCreationExpression ::= new ArrayBaseType value Unsafeopt [ Expression ] // case 543: { TypeNode a = (TypeNode) btParser.getSym(2); boolean unsafe = (btParser.getSym(3) != null); Expr c = (Expr) btParser.getSym(6); btParser.setSym1(nf.ArrayConstructor(pos(), a, unsafe, true, c, null)); break; } // // Rule 544: ArrayCreationExpression ::= new ArrayBaseType value Unsafeopt [ Expression ] Expression // case 544: { TypeNode a = (TypeNode) btParser.getSym(2); boolean unsafe = (btParser.getSym(4) != null); Expr c = (Expr) btParser.getSym(6); Expr d = (Expr) btParser.getSym(8); btParser.setSym1(nf.ArrayConstructor(pos(), a, unsafe, true, c, d)); break; } // // Rule 545: X10ArrayInitializer ::= Expression // case 545: break; // Sigh this is not trivial to do just yet :-( // // Rule 546: X10ArrayInitializer ::= ( FormalParameter ) MethodBody // case 546: bad_rule = 546; break; // // Rule 547: ArrayBaseType ::= PrimitiveType // case 547: break; // // Rule 548: ArrayBaseType ::= ClassOrInterfaceType // case 548: break; // // Rule 549: ArrayAccess ::= ExpressionName [ ArgumentList ] // case 549: { Name e = (Name) btParser.getSym(1); List b = (List) btParser.getSym(3); if (b.size() == 1) btParser.setSym1(nf.X10ArrayAccess1(pos(), e.toExpr(), (Expr) b.get(0))); else btParser.setSym1(nf.X10ArrayAccess(pos(), e.toExpr(), b)); break; } // // Rule 550: ArrayAccess ::= PrimaryNoNewArray [ ArgumentList ] // case 550: { Expr a = (Expr) btParser.getSym(1); List b = (List) btParser.getSym(3); if (b.size() == 1) btParser.setSym1(nf.X10ArrayAccess1(pos(), a, (Expr) b.get(0))); else btParser.setSym1(nf.X10ArrayAccess(pos(), a, b)); break; } // // Rule 551: Statement ::= NowStatement // case 551: break; // // Rule 552: Statement ::= ClockedStatement // case 552: break; // // Rule 553: Statement ::= AsyncStatement // case 553: break; // // Rule 554: Statement ::= AtomicStatement // case 554: break; // // Rule 555: Statement ::= WhenStatement // case 555: break; // // Rule 556: Statement ::= ForEachStatement // case 556: break; // // Rule 557: Statement ::= AtEachStatement // case 557: break; // // Rule 558: Statement ::= FinishStatement // case 558: break; // // Rule 559: StatementWithoutTrailingSubstatement ::= NextStatement // case 559: break; // // Rule 560: StatementWithoutTrailingSubstatement ::= AwaitStatement // case 560: break; // // Rule 561: StatementNoShortIf ::= NowStatementNoShortIf // case 561: break; // // Rule 562: StatementNoShortIf ::= ClockedStatementNoShortIf // case 562: break; // // Rule 563: StatementNoShortIf ::= AsyncStatementNoShortIf // case 563: break; // // Rule 564: StatementNoShortIf ::= AtomicStatementNoShortIf // case 564: break; // // Rule 565: StatementNoShortIf ::= WhenStatementNoShortIf // case 565: break; // // Rule 566: StatementNoShortIf ::= ForEachStatementNoShortIf // case 566: break; // // Rule 567: StatementNoShortIf ::= AtEachStatementNoShortIf // case 567: break; // // Rule 568: StatementNoShortIf ::= FinishStatementNoShortIf // case 568: break; // // Rule 569: NowStatement ::= now ( Clock ) Statement // case 569: { Name a = (Name) btParser.getSym(3); Stmt b = (Stmt) btParser.getSym(5); btParser.setSym1(nf.Now(pos(), a.toExpr(), b)); break; } // // Rule 570: ClockedStatement ::= clocked ( ClockList ) Statement // case 570: { List a = (List) btParser.getSym(3); Block b = (Block) btParser.getSym(5); btParser.setSym1(nf.Clocked(pos(), a, b)); break; } // // Rule 571: AsyncStatement ::= async PlaceExpressionSingleListopt Statement // case 571: { Expr e = (Expr) btParser.getSym(2); Stmt b = (Stmt) btParser.getSym(3); btParser.setSym1(nf.Async(pos(), (e == null ? nf.Here(pos(btParser.getFirstToken())) : e), b)); break; } // // Rule 572: AtomicStatement ::= atomic PlaceExpressionSingleListopt Statement // case 572: { Expr e = (Expr) btParser.getSym(2); Stmt b = (Stmt) btParser.getSym(3); btParser.setSym1(nf.Atomic(pos(), (e == null ? nf.Here(pos(btParser.getFirstToken())) : e), b)); break; } // // Rule 573: WhenStatement ::= when ( Expression ) Statement // case 573: { Expr e = (Expr) btParser.getSym(3); Stmt s = (Stmt) btParser.getSym(5); btParser.setSym1(nf.When(pos(), e,s)); break; } // // Rule 574: WhenStatement ::= WhenStatement or ( Expression ) Statement // case 574: { When w = (When) btParser.getSym(1); Expr e = (Expr) btParser.getSym(4); Stmt s = (Stmt) btParser.getSym(6); When.Branch wb = nf.WhenBranch(pos(btParser.getFirstToken(2), btParser.getLastToken(6)), e, s); w.add(wb); btParser.setSym1(w); break; } // // Rule 575: ForEachStatement ::= foreach ( FormalParameter : Expression ) Statement // case 575: { X10Formal f = (X10Formal) btParser.getSym(3); Formal ff = f.flags(f.flags().Final()); // make it final Expr e = (Expr) btParser.getSym(5); Stmt s = (Stmt) btParser.getSym(7); X10Loop x = nf.ForEach(pos(), ff, e, f.hasExplodedVars() ? nf.Block(pos(), f.explode(s)) : s); btParser.setSym1(x); break; } // // Rule 576: AtEachStatement ::= ateach ( FormalParameter : Expression ) Statement // case 576: { X10Formal f = (X10Formal) btParser.getSym(3); Formal ff = f.flags(f.flags().Final()); // make it final Expr e = (Expr) btParser.getSym(5); Stmt s = (Stmt) btParser.getSym(7); X10Loop x = nf.AtEach(pos(), ff, e, f.hasExplodedVars() ? nf.Block(pos(), f.explode(s)) : s); btParser.setSym1(x); break; } // // Rule 577: EnhancedForStatement ::= for ( FormalParameter : Expression ) Statement // case 577: { X10Formal f = (X10Formal) btParser.getSym(3); Formal ff = f.flags(f.flags().Final()); // make it final Expr e = (Expr) btParser.getSym(5); Stmt s = (Stmt) btParser.getSym(7); X10Loop x = nf.ForLoop(pos(), ff, e, f.hasExplodedVars() ? nf.Block(pos(), f.explode(s)) : s); btParser.setSym1(x); break; } // // Rule 578: FinishStatement ::= finish Statement // case 578: { Stmt b = (Stmt) btParser.getSym(2); btParser.setSym1(nf.Finish(pos(), b)); break; } // // Rule 579: NowStatementNoShortIf ::= now ( Clock ) StatementNoShortIf // case 579: { Name a = (Name) btParser.getSym(3); Stmt b = (Stmt) btParser.getSym(5); btParser.setSym1(nf.Now(pos(), a.toExpr(), b)); break; } // // Rule 580: ClockedStatementNoShortIf ::= clocked ( ClockList ) StatementNoShortIf // case 580: { List a = (List) btParser.getSym(3); Stmt b = (Stmt) btParser.getSym(5); btParser.setSym1(nf.Clocked(pos(), a, b)); break; } // // Rule 581: AsyncStatementNoShortIf ::= async PlaceExpressionSingleListopt StatementNoShortIf // case 581: { Expr e = (Expr) btParser.getSym(2); Stmt b = (Stmt) btParser.getSym(3); btParser.setSym1(nf.Async(pos(), (e == null ? nf.Here(pos(btParser.getFirstToken())) : e), b)); break; } // // Rule 582: AtomicStatementNoShortIf ::= atomic StatementNoShortIf // case 582: { Expr e = (Expr) btParser.getSym(2); Stmt b = (Stmt) btParser.getSym(3); btParser.setSym1(nf.Atomic(pos(), (e == null ? nf.Here(pos(btParser.getFirstToken())) : e), b)); break; } // // Rule 583: WhenStatementNoShortIf ::= when ( Expression ) StatementNoShortIf // case 583: { Expr e = (Expr) btParser.getSym(3); Stmt s = (Stmt) btParser.getSym(5); btParser.setSym1(nf.When(pos(), e,s)); break; } // // Rule 584: WhenStatementNoShortIf ::= WhenStatement or ( Expression ) StatementNoShortIf // case 584: { When w = (When) btParser.getSym(1); Expr e = (Expr) btParser.getSym(4); Stmt s = (Stmt) btParser.getSym(6); When.Branch wb = nf.WhenBranch(pos(btParser.getFirstToken(2), btParser.getLastToken(6)), e, s); w.add(wb); btParser.setSym1(w); break; } // // Rule 585: ForEachStatementNoShortIf ::= foreach ( FormalParameter : Expression ) StatementNoShortIf // case 585: { X10Formal f = (X10Formal) btParser.getSym(3); Formal ff = f.flags(f.flags().Final()); // make it final Expr e = (Expr) btParser.getSym(5); Stmt s = (Stmt) btParser.getSym(7); X10Loop x = nf.ForEach(pos(), ff, e, f.hasExplodedVars() ? nf.Block(pos(), f.explode(s)) : s); btParser.setSym1(x); break; } // // Rule 586: AtEachStatementNoShortIf ::= ateach ( FormalParameter : Expression ) StatementNoShortIf // case 586: { X10Formal f = (X10Formal) btParser.getSym(3); Formal ff = f.flags(f.flags().Final()); // make it final Expr e = (Expr) btParser.getSym(5); Stmt s = (Stmt) btParser.getSym(7); X10Loop x = nf.AtEach(pos(), ff, e, f.hasExplodedVars() ? nf.Block(pos(), f.explode(s)) : s); btParser.setSym1(x); break; } // // Rule 587: EnhancedForStatementNoShortIf ::= for ( FormalParameter : Expression ) StatementNoShortIf // case 587: { X10Formal f = (X10Formal) btParser.getSym(3); Formal ff = f.flags(f.flags().Final()); // make it final Expr e = (Expr) btParser.getSym(5); Stmt s = (Stmt) btParser.getSym(7); X10Loop x = nf.ForLoop(pos(), ff, e, f.hasExplodedVars() ? nf.Block(pos(), f.explode(s)) : s); btParser.setSym1(x); break; } // // Rule 588: FinishStatementNoShortIf ::= finish StatementNoShortIf // case 588: { Stmt b = (Stmt) btParser.getSym(2); btParser.setSym1(nf.Finish(pos(), b)); break; } // // Rule 589: PlaceExpressionSingleList ::= ( PlaceExpression ) // case 589: { btParser.setSym1(btParser.getSym(2)); break; } // // Rule 590: PlaceExpression ::= here // case 590: { btParser.setSym1(nf.Here(pos(btParser.getFirstToken()))); break; } // // Rule 591: PlaceExpression ::= this // case 591: { btParser.setSym1(nf.Field(pos(btParser.getFirstToken()), nf.This(pos(btParser.getFirstToken())), "place")); break; } // // Rule 592: PlaceExpression ::= Expression // case 592: break; // // Rule 593: PlaceExpression ::= ArrayAccess // case 593: bad_rule = 593; break; // // Rule 594: NextStatement ::= next ; // case 594: { btParser.setSym1(nf.Next(pos())); break; } // // Rule 595: AwaitStatement ::= await Expression ; // case 595: { Expr e = (Expr) btParser.getSym(2); btParser.setSym1(nf.Await(pos(), e)); break; } // // Rule 596: ClockList ::= Clock // case 596: { Name c = (Name) btParser.getSym(1); List l = new TypedList(new LinkedList(), Expr.class, false); l.add(c.toExpr()); btParser.setSym1(l); break; } // // Rule 597: ClockList ::= ClockList , Clock // case 597: { List l = (List) btParser.getSym(1); Name c = (Name) btParser.getSym(3); l.add(c.toExpr()); // btParser.setSym1(l); break; } // // Rule 598: Clock ::= identifier // case 598: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 599: CastExpression ::= ( Type ) UnaryExpressionNotPlusMinus // case 599: { TypeNode a = (TypeNode) btParser.getSym(2); Expr b = (Expr) btParser.getSym(4); btParser.setSym1(nf.Cast(pos(), a, b)); break; } // // Rule 600: MethodInvocation ::= Primary -> identifier ( ArgumentListopt ) // case 600: { Expr a = (Expr) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); List c = (List) btParser.getSym(5); btParser.setSym1(nf.RemoteCall(pos(), a, b.getIdentifier(), c)); break; } // // Rule 601: RelationalExpression ::= RelationalExpression instanceof Type // case 601: { Expr a = (Expr) btParser.getSym(1); TypeNode b = (TypeNode) btParser.getSym(3); btParser.setSym1(nf.Instanceof(pos(), a, b)); break; } // // Rule 602: ExpressionName ::= here // case 602: { btParser.setSym1(new Name(nf, ts, pos(), "here"){ public Expr toExpr() { return ((X10NodeFactory) nf).Here(pos); } }); break; } // // Rule 603: IdentifierList ::= IdentifierList , identifier // case 603: { List l = (List) btParser.getSym(1); polyglot.lex.Identifier a = id(btParser.getToken(3)); l.add(new Name(nf, ts, pos(), a.getIdentifier())); btParser.setSym1(l); break; } // // Rule 604: IdentifierList ::= identifier // case 604: { polyglot.lex.Identifier a = id(btParser.getToken(1)); List l = new TypedList(new LinkedList(), Name.class, false); l.add(new Name(nf, ts, pos(), a.getIdentifier())); btParser.setSym1(l); break; } // // Rule 605: Primary ::= FutureExpression // case 605: break; // // Rule 606: Primary ::= [ ArgumentList ] // case 606: { Name x10 = new Name(nf, ts, pos(), "x10"); Name x10Lang = new Name(nf, ts, pos(), x10, "lang"); Name x10LangRegion = new Name(nf, ts, pos(), x10Lang, "region"); Name x10LangRegionFactory = new Name(nf, ts, pos(), x10LangRegion, "factory"); Name x10LangRegionFactoryRegion = new Name(nf, ts, pos(), x10LangRegionFactory, "region"); Name x10LangPoint = new Name(nf, ts, pos(), x10Lang, "point"); Name x10LangPointFactory = new Name(nf, ts, pos(), x10LangPoint, "factory"); Name x10LangPointFactoryPoint = new Name(nf, ts, pos(), x10LangPointFactory, "point"); List a = (List) btParser.getSym(2); Tuple tuple = nf.Tuple(pos(), x10LangPointFactoryPoint, x10LangRegionFactoryRegion, a); btParser.setSym1(tuple); break; } // // Rule 607: AssignmentExpression ::= Expression -> Expression // case 607: { Expr a = (Expr) btParser.getSym(1); Expr b = (Expr) btParser.getSym(3); //System.out.println("Distribution:" + a + "|" + b + "|"); // x10.lang.region.factory.region( ArgumentList ) // Construct the MethodName Name x10 = new Name(nf, ts, pos(), "x10"); Name x10Lang = new Name(nf, ts, pos(), x10, "lang"); Name x10LangDistribution = new Name(nf, ts, pos(), x10Lang, "distribution"); Name x10LangDistributionFactory = new Name(nf, ts, pos(), x10LangDistribution, "factory"); Name x10LangDistributionFactoryConstant = new Name(nf, ts, pos(), x10LangDistributionFactory, "constant"); List l = new TypedList(new LinkedList(), Expr.class, false); l.add(a); l.add(b); Call call = nf.Call(pos(), x10LangDistributionFactoryConstant.prefix.toReceiver(), "constant", l); btParser.setSym1(call); break; } // // Rule 608: Primary ::= Expression : Expression // case 608: { Expr a = (Expr) btParser.getSym(1); Expr b = (Expr) btParser.getSym(3); Name x10 = new Name(nf, ts, pos(), "x10"); Name x10Lang = new Name(nf, ts, pos(), x10, "lang"); Name x10LangRegion = new Name(nf, ts, pos(), x10Lang, "region"); Name x10LangRegionFactory = new Name(nf, ts, pos(), x10LangRegion, "factory"); Name x10LangRegionFactoryRegion = new Name(nf, ts, pos(), x10LangRegionFactory, "region"); List l = new TypedList(new LinkedList(), Expr.class, false); l.add(a); l.add(b); Call regionCall = nf.Call( pos(), x10LangRegionFactoryRegion.prefix.toReceiver(), "region", l ); btParser.setSym1(regionCall); break; } // // Rule 609: FutureExpression ::= future PlaceExpressionSingleListopt { Expression } // case 609: { Expr e1 = (Expr) btParser.getSym(2), e2 = (Expr) btParser.getSym(4); btParser.setSym1(nf.Future(pos(), (e1 == null ? nf.Here(pos(btParser.getFirstToken())) : e1), e2)); break; } // // Rule 610: FieldModifier ::= mutable // case 610: { btParser.setSym1(Flags.MUTABLE); break; } // // Rule 611: FieldModifier ::= const // case 611: { btParser.setSym1(Flags.PUBLIC.set(Flags.STATIC).set(Flags.FINAL)); break; } // // Rule 612: FunExpression ::= fun Type ( FormalParameterListopt ) { Expression } // case 612: bad_rule = 612; break; // // Rule 613: MethodInvocation ::= MethodName ( ArgumentListopt ) ( ArgumentListopt ) // case 613: bad_rule = 613; break; // // Rule 614: MethodInvocation ::= Primary . identifier ( ArgumentListopt ) ( ArgumentListopt ) // case 614: bad_rule = 614; break; // // Rule 615: MethodInvocation ::= super . identifier ( ArgumentListopt ) ( ArgumentListopt ) // case 615: bad_rule = 615; break; // // Rule 616: MethodInvocation ::= ClassName . super . identifier ( ArgumentListopt ) ( ArgumentListopt ) // case 616: bad_rule = 616; break; // // Rule 617: MethodInvocation ::= TypeName . identifier ( ArgumentListopt ) ( ArgumentListopt ) // case 617: bad_rule = 617; break; // // Rule 618: ClassInstanceCreationExpression ::= new ClassOrInterfaceType ( ArgumentListopt ) ( ArgumentListopt ) ClassBodyopt // case 618: bad_rule = 618; break; // // Rule 619: ClassInstanceCreationExpression ::= Primary . new identifier ( ArgumentListopt ) ( ArgumentListopt ) ClassBodyopt // case 619: bad_rule = 619; break; // // Rule 620: ClassInstanceCreationExpression ::= AmbiguousName . new identifier ( ArgumentListopt ) ( ArgumentListopt ) ClassBodyopt // case 620: bad_rule = 620; break; // // Rule 621: PlaceTypeSpecifieropt ::= $Empty // case 621: btParser.setSym1(null); break; // // Rule 622: PlaceTypeSpecifieropt ::= PlaceTypeSpecifier // case 622: break; // // Rule 623: DepParametersopt ::= $Empty // case 623: btParser.setSym1(null); break; // // Rule 624: DepParametersopt ::= DepParameters // case 624: break; // // Rule 625: WhereClauseopt ::= $Empty // case 625: btParser.setSym1(null); break; // // Rule 626: WhereClauseopt ::= WhereClause // case 626: break; // // Rule 627: ObjectKindopt ::= $Empty // case 627: btParser.setSym1(null); break; // // Rule 628: ObjectKindopt ::= ObjectKind // case 628: break; // // Rule 629: ArrayInitializeropt ::= $Empty // case 629: btParser.setSym1(null); break; // // Rule 630: ArrayInitializeropt ::= ArrayInitializer // case 630: break; // // Rule 631: PlaceExpressionSingleListopt ::= $Empty // case 631: btParser.setSym1(null); break; // // Rule 632: PlaceExpressionSingleListopt ::= PlaceExpressionSingleList // case 632: break; // // Rule 633: ArgumentListopt ::= $Empty // case 633: btParser.setSym1(null); break; // // Rule 634: ArgumentListopt ::= ArgumentList // case 634: break; // // Rule 635: DepParametersopt ::= $Empty // case 635: btParser.setSym1(null); break; // // Rule 636: DepParametersopt ::= DepParameters // case 636: break; // // Rule 637: Unsafeopt ::= $Empty // case 637: btParser.setSym1(null); break; // // Rule 638: Unsafeopt ::= unsafe // case 638: { btParser.setSym1(nf.Here(pos(btParser.getFirstToken(1)))); break; } // // Rule 639: ParamIdopt ::= $Empty // case 639: btParser.setSym1(null); break; // // Rule 640: ParamIdopt ::= identifier // case 640: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } default: break; } return; } | 1832 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1832/0c6c148f7be6e4cc0e87c12a307232047c894d1b/X10Parser.java/buggy/x10.compiler/src/x10/parser/X10Parser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1720,
1803,
12,
474,
1720,
1854,
13,
565,
288,
3639,
309,
261,
8759,
67,
5345,
480,
374,
13,
5411,
327,
31,
3639,
1620,
261,
5345,
1854,
13,
3639,
288,
2398,
368,
5411,
368,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1720,
1803,
12,
474,
1720,
1854,
13,
565,
288,
3639,
309,
261,
8759,
67,
5345,
480,
374,
13,
5411,
327,
31,
3639,
1620,
261,
5345,
1854,
13,
3639,
288,
2398,
368,
5411,
368,
... |
return false; } | boolean isDestinationSameAsSource(IContainer destination, List sourceResources) { for (Iterator e = sourceResources.iterator(); e.hasNext();) { IResource source = (IResource)e.next(); if (source.getParent().equals(destination)) { return true; } } return false;} | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/bf752ac27dbe2a869d9900197181599a8561dc6a/CopyResourceAction.java/buggy/bundles/org.eclipse.ui/Eclipse UI/org/eclipse/ui/actions/CopyResourceAction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1250,
353,
5683,
8650,
1463,
1830,
12,
45,
2170,
2929,
16,
987,
1084,
3805,
13,
288,
202,
1884,
261,
3198,
425,
273,
1084,
3805,
18,
9838,
5621,
425,
18,
5332,
2134,
5621,
13,
288,
202,
202,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1250,
353,
5683,
8650,
1463,
1830,
12,
45,
2170,
2929,
16,
987,
1084,
3805,
13,
288,
202,
1884,
261,
3198,
425,
273,
1084,
3805,
18,
9838,
5621,
425,
18,
5332,
2134,
5621,
13,
288,
202,
202,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.