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 static void commitChanges(final Project project, final Collection<Change> changes) { commitChanges(project, changes, null); | public static void commitChanges(final Project project, final Collection<Change> changes, final CommitExecutor executor) { final ChangeListManager manager = ChangeListManager.getInstance(project); if (changes.isEmpty()) { Messages.showWarningDialog(project, VcsBundle.message("commit.dialog.no.changes.detected.text") , VcsBundle.message("commit.dialog.no.changes.detected.title")); return; } Set<LocalChangeList> lists = new THashSet<LocalChangeList>(); for (Change change : changes) { lists.add(manager.getChangeList(change)); } commit(project, new ArrayList<LocalChangeList>(lists), new ArrayList<Change>(changes), executor); | public static void commitChanges(final Project project, final Collection<Change> changes) { commitChanges(project, changes, null); } | 17306 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17306/262baea8f6c4d7c153f7904014536479c22bb43b/CommitChangeListDialog.java/buggy/source/com/intellij/openapi/vcs/changes/ui/CommitChangeListDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
918,
3294,
7173,
12,
6385,
5420,
1984,
16,
727,
2200,
32,
3043,
34,
3478,
13,
288,
565,
3294,
7173,
12,
4406,
16,
3478,
16,
446,
1769,
225,
289,
2,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
918,
3294,
7173,
12,
6385,
5420,
1984,
16,
727,
2200,
32,
3043,
34,
3478,
13,
288,
565,
3294,
7173,
12,
4406,
16,
3478,
16,
446,
1769,
225,
289,
2,
-100,
-100,
-100,
-100,
... |
return c.counts[countIndex+insIndex] + c.counts[countIndex+delIndex] + | return c.counts[countIndex+indelIndex] + | public double alignmentLength() { Counts c = get_counts(); return c.counts[countIndex+insIndex] + c.counts[countIndex+delIndex] + c.counts[countIndex+diagIndex]; } | 10011 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10011/52afec7c07a8a9b55caaa9bf3a621ed0a3712739/Mutation_1State.java/clean/common/Mutation_1State.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1645,
8710,
1782,
1435,
288,
202,
9211,
276,
273,
336,
67,
8008,
5621,
202,
2463,
276,
18,
8008,
63,
1883,
1016,
15,
2679,
1016,
65,
397,
3196,
4202,
276,
18,
8008,
63,
1883,
1016... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1645,
8710,
1782,
1435,
288,
202,
9211,
276,
273,
336,
67,
8008,
5621,
202,
2463,
276,
18,
8008,
63,
1883,
1016,
15,
2679,
1016,
65,
397,
3196,
4202,
276,
18,
8008,
63,
1883,
1016... |
result[0] = (Task) SerializationUtils.fromByteArray(SerializationUtils.toByteArray(task)); | result1[0] = SerializationUtils.toByteArray(task); | private Task cloneAliasedTask(final Task task) { final Task[] result = new Task[1]; ClusterContextTable.withClusterContext(task.getDestination(), new Runnable() { public void run() { try { result[0] = (Task) SerializationUtils.fromByteArray(SerializationUtils.toByteArray(task)); } catch (Exception e) { logger.error("Failed to clone aliased task"); result[0] = task; } } }); return result[0]; } | 10687 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10687/4d8db8bf51081f7d809998ebe231b7d1155ff7a6/ReceiveTaskLP.java/clean/planning/src/org/cougaar/planning/ldm/lps/ReceiveTaskLP.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
3837,
3236,
37,
29809,
2174,
12,
6385,
3837,
1562,
13,
288,
565,
727,
3837,
8526,
563,
273,
394,
3837,
63,
21,
15533,
565,
5584,
1042,
1388,
18,
1918,
3629,
1042,
12,
4146,
18,
58... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
3837,
3236,
37,
29809,
2174,
12,
6385,
3837,
1562,
13,
288,
565,
727,
3837,
8526,
563,
273,
394,
3837,
63,
21,
15533,
565,
5584,
1042,
1388,
18,
1918,
3629,
1042,
12,
4146,
18,
58... |
private void registerServices() { // Get root service broker nodeControlService = (NodeControlService) serviceBroker.getService(this, NodeControlService.class, null); if (nodeControlService != null) { rootServiceBroker = nodeControlService.getRootServiceBroker(); if (rootServiceBroker == null) { throw new RuntimeException("Unable to get root service broker"); } } else { // We are running outside a Cougaar node. // No Cougaar services are available. isExecutedWithinNode = false; rootServiceBroker = serviceBroker; /* ******************************** * Logging service */ // NodeAgent has not started the logging service at this point, // but we need it. // Removed because the Logging service is started early in 9.4 LoggingServiceProvider loggingServiceProvider = new LoggingServiceProvider(); rootServiceBroker.addService(LoggingService.class, loggingServiceProvider); rootServiceBroker.addService(LoggingControlService.class, loggingServiceProvider); } System.setProperty("org.cougaar.core.security.isExecutedWithinNode", String.valueOf(isExecutedWithinNode)); this.log = (LoggingService) rootServiceBroker.getService(this, LoggingService.class, null); services = SecurityServiceTable.getInstance(log); if (log.isDebugEnabled()) { log.debug("Registering security services"); } if (log.isDebugEnabled()) { if(mySecurityCommunity!=null) { log.debug("Registering security services for security community "+mySecurityCommunity ); } else { log.error("Un able to get Security community as mySecurityCommunity is Null:"); } } if (log.isInfoEnabled() && isExecutedWithinNode == false) { log.info("Running outside a Cougaar node"); } /* ******************************** * Property service */ ServiceProvider newSP = null; newSP = new SecurityPropertiesServiceProvider(rootServiceBroker, mySecurityCommunity); services.put(SecurityPropertiesService.class, newSP); rootServiceBroker.addService(SecurityPropertiesService.class, newSP); SecurityPropertiesService secprop = (SecurityPropertiesService) AccessController.doPrivileged(new PrivilegedAction() { public Object run() { return rootServiceBroker.getService(this, SecurityPropertiesService.class, null); } }); /* boolean standalone = false; try { standalone = new Boolean(secprop.getProperty( "org.cougaar.core.security.standalone", "false")).booleanValue(); if (!standalone) new NodeInfo().setNodeName(serviceBroker); } catch (Exception ex) { log.warn("Unable to get value of standalone mode"); } */ /* ******************************** * Configuration services */ newSP = new ConfigParserServiceProvider(serviceBroker, mySecurityCommunity); services.put(ConfigParserService.class, newSP); rootServiceBroker.addService(ConfigParserService.class, newSP); /* ******************************** * Encryption services */ /* Certificate Directory lookup services */ newSP = new CertDirectoryServiceProvider(serviceBroker, mySecurityCommunity); services.put(CertDirectoryServiceClient.class, newSP); rootServiceBroker.addService(CertDirectoryServiceClient.class, newSP); newSP = new CertDirectoryServiceProvider(serviceBroker, mySecurityCommunity); services.put(CertDirectoryServiceCA.class, newSP); rootServiceBroker.addService(CertDirectoryServiceCA.class, newSP); newSP = new CertDirectoryServiceProvider(serviceBroker, mySecurityCommunity); services.put(CACertDirectoryService.class, newSP); rootServiceBroker.addService(CACertDirectoryService.class, newSP); newSP = new CertificateSearchServiceProvider(serviceBroker, mySecurityCommunity); services.put(CertificateSearchService.class, newSP); rootServiceBroker.addService(CertificateSearchService.class, newSP); newSP = new CertificateSearchServiceProvider(serviceBroker, mySecurityCommunity); services.put(CACertDirectoryService.class, newSP); rootServiceBroker.addService(CACertDirectoryService.class, newSP); /* Certificate Management service */ // move to certauth to be started in its own component /* newSP = new CertificateManagementServiceProvider(serviceBroker, mySecurityCommunity); services.put(CertificateManagementService.class, newSP); rootServiceBroker.addService(CertificateManagementService.class, newSP); */ /* Starting Certificate Cache service */ newSP = new CertificateCacheServiceProvider(serviceBroker, mySecurityCommunity); services.put(CertificateCacheService.class, newSP); rootServiceBroker.addService(CertificateCacheService.class, newSP); /* Key lookup service */ newSP = new KeyRingServiceProvider(serviceBroker, mySecurityCommunity); services.put(KeyRingService.class, newSP); rootServiceBroker.addService(KeyRingService.class, newSP);/* Starting CRL Cache service */ if (log.isDebugEnabled()) { log.debug("Service broker passed to CRLCacheServiceProvider is :"+serviceBroker.toString()); } newSP = new CRLCacheServiceProvider(serviceBroker, mySecurityCommunity); services.put(CRLCacheService.class, newSP); rootServiceBroker.addService(CRLCacheService.class, newSP); /*CRLCacheService crlCacheService=(CRLCacheService)serviceBroker.getService(this, CRLCacheService.class, null); */ /* Certificate validity service */ newSP = new CertValidityServiceProvider(serviceBroker, mySecurityCommunity); services.put(CertValidityService.class, newSP); rootServiceBroker.addService(CertValidityService.class, newSP); /* Community Protection Service */ newSP = new CommunityProtectionServiceProvider(serviceBroker, mySecurityCommunity); services.put(CommunityProtectionService.class, newSP); rootServiceBroker.addService(CommunityProtectionService.class, newSP); if (isExecutedWithinNode) { /* Persistence Manager Service *//*// newSP = new PersistenceMgrPolicyServiceProvider(serviceBroker, mySecurityCommunity); newSP = null; Class cls = null; try { cls = Class.forName(PMP_PROVIDER_CLASS); newSP = (ServiceProvider)cls.newInstance(); } catch (Exception ex) { log.error("Exception while instantiating " + PMP_PROVIDER_CLASS + ": " + ex); }// newSP = (BaseSecurityServiceProvider)SecurityServiceProviderCache.get(PMP_PROVIDER_CLASS); if (newSP != null) { ((BaseSecurityServiceProvider)newSP).init(serviceBroker, mySecurityCommunity); services.put(PersistenceMgrPolicyService.class, newSP); rootServiceBroker.addService(PersistenceMgrPolicyService.class, newSP); } else { log.error("No persistence policy service provider, the module is not installed."); }*/ /* Encryption Service */ newSP = new EncryptionServiceProvider(serviceBroker, mySecurityCommunity); services.put(EncryptionService.class, newSP); rootServiceBroker.addService(EncryptionService.class, newSP); /* Data protection service *//* boolean dataOn = Boolean.valueOf(System.getProperty("org.cougaar.core.security.dataprotection", "true")).booleanValue(); if (dataOn) {// newSP = new DataProtectionServiceProvider(serviceBroker, mySecurityCommunity); newSP = null; cls = null; try { cls = Class.forName(DP_PROVIDER_CLASS); newSP = (ServiceProvider)cls.newInstance(); } catch (Exception ex) { log.error("Exception while instantiating " + DP_PROVIDER_CLASS + ": " + ex); }// newSP = (BaseSecurityServiceProvider)SecurityServiceProviderCache.get(DP_PROVIDER_CLASS); if (newSP != null) { ((BaseSecurityServiceProvider)newSP).init(serviceBroker, mySecurityCommunity); services.put(DataProtectionService.class, newSP); rootServiceBroker.addService(DataProtectionService.class, newSP); } else { log.error("No data protection service provider, the module is not installed."); } } else { log.warn("Data protection service disabled"); }*/ /* Message protection service */ newSP = new MessageProtectionServiceProvider(serviceBroker, mySecurityCommunity); services.put(MessageProtectionService.class, newSP); rootServiceBroker.addService(MessageProtectionService.class, newSP); /* ******************************** * Identity services */ /* Agent identity service */ newSP = new AgentIdentityServiceProvider(serviceBroker, mySecurityCommunity); services.put(AgentIdentityService.class, newSP); rootServiceBroker.addService(AgentIdentityService.class, newSP); /* ******************************** * Access Control services */ /* ******************************** * Policy services */ newSP = new PolicyBootstrapperServiceProvider(serviceBroker, mySecurityCommunity); services.put(PolicyBootstrapperService.class, newSP); rootServiceBroker.addService(PolicyBootstrapperService.class, newSP);/* if (!org.cougaar.core.security.access.AccessAgentProxy.USE_DAML) { newSP = new AccessControlPolicyServiceProvider(serviceBroker, mySecurityCommunity); services.put(AccessControlPolicyService.class, newSP); rootServiceBroker.addService(AccessControlPolicyService.class, newSP); } */ newSP = new CryptoPolicyServiceProvider(serviceBroker, mySecurityCommunity); services.put(CryptoPolicyService.class, newSP); rootServiceBroker.addService(CryptoPolicyService.class, newSP); // Request the CryptoPolicyService now. This will create the // singleton instance of the CryptoPolicyService, which means // other requests will not have to instantiate a new // CryptoPolicyService. // The CryptoPolicyService registers itself with the guard, // which in turns sends a Relay message to the Policy Domain // manager. // If we didn't do this, we could have deadlock issues. For example, // a component could try to persist the blackboard, which would // lock the blackboard. The distributor would then invoke // the data protection service to protect the blackboard, // and the data protection service would request the // CryptoPolicyService, which would cause the guard to publish a Relay, // but the blackboard is locked. rootServiceBroker.getService(this, CryptoPolicyService.class, null); newSP = new ServletPolicyServiceProvider(serviceBroker, mySecurityCommunity); services.put(ServletPolicyService.class, newSP); rootServiceBroker.addService(ServletPolicyService.class, newSP); /* ******************************** * SSL services *//* newSP = new SSLServiceProvider(serviceBroker, mySecurityCommunity); services.put(SSLService.class, newSP); rootServiceBroker.addService(SSLService.class, newSP); // SSLService and WebserverIdentityService are self started // they offer static functions to get socket factory // in the functions the permission will be checked. rootServiceBroker.getService(this, SSLService.class, null); KeyRingService krs = (KeyRingService) rootServiceBroker.getService(this, KeyRingService.class, null); javax.net.ssl.HttpsURLConnection. setDefaultSSLSocketFactory(new JaasSSLFactory(krs, rootServiceBroker)); krs.finishInitialization(); // configured to use SSL? if (secprop.getProperty(SecurityPropertiesService.WEBSERVER_HTTPS_PORT, null) != null) { if (serviceBroker.hasService(CertificateRequestorService.class)) { registerSSLServices(); } else { if (log.isDebugEnabled()) { log.debug("Registering CQServiceAvailableListener "); } serviceBroker.addServiceListener(new CRServiceAvailableListener ()); } }*/ /* ******************************** * LDAP user administration */ newSP = new UserServiceProvider(serviceBroker); rootServiceBroker.addService(UserService.class, newSP); //serviceBroker.addService(UserService.class, newSP); if(!UserServiceProvider.AGENT_SERVICE) { UserServiceProvider.setRootServiceBroker(rootServiceBroker); } try { org.cougaar.core.security.crypto.ldap.KeyRingJNDIRealm.setNodeServiceBroker(serviceBroker); } catch (Exception e) { if (log.isWarnEnabled()) { log.warn("Unable to initialize KeyRingJNDIRealm", e); } } //serviceBroker.getService(this, UserService.class, null); /********************************** * Security context service * NOTE: This service should only be accessible by the security services codebase */ newSP = new SecurityContextServiceProvider(serviceBroker, mySecurityCommunity); services.put(SecurityContextService.class, newSP); rootServiceBroker.addService(SecurityContextService.class, newSP); /** * Authorization service */ newSP = new AuthorizationServiceProvider(serviceBroker, mySecurityCommunity); services.put(AuthorizationService.class, newSP); rootServiceBroker.addService(AuthorizationService.class, newSP); /* ******************************** * Change the policy to support * DAML */ AuthorizationService authServ = (AuthorizationService) rootServiceBroker. getService(this, AuthorizationService.class, null); DynamicPolicy.install(authServ); } else { KeyRingService krs = (KeyRingService) rootServiceBroker.getService(this, KeyRingService.class, null); log.info("Running in standalone mode"); if (krs != null) { newSP = new UserSSLServiceProvider(serviceBroker, mySecurityCommunity); services.put(UserSSLService.class, newSP); rootServiceBroker.addService(UserSSLService.class, newSP); krs.finishInitialization(); } } LDMService ldms =null; if(serviceBroker.hasService (org.cougaar.planning.service.LDMService.class)){ ldms = (LDMService) rootServiceBroker.getService(this, LDMService.class, null); log.info("LDM Service is available initially in Security Service Provider "); if(ldms!=null){ LDMServesPlugin ldm=ldms.getLDM(); newSP = new CrlManagementServiceProvider(ldm,serviceBroker, mySecurityCommunity); services.put(CrlManagementService.class, newSP); rootServiceBroker.addService(CrlManagementService.class, newSP); } } else { if (log.isDebugEnabled()) { log.debug("Registering LDMServiceAvailableListener "); } serviceBroker.addServiceListener(new LDMServiceAvailableListener ()); } /* if(serviceBroker.hasService(org.cougaar.core.service.BlackboardService.class)){ log.debug("Black Board Service is available initially in Security Service Provider "); } else { log.debug("Registering Black Board Service Listener "); serviceBroker.addServiceListener(new BBServiceAvailableListener()); } */ if (log.isDebugEnabled()) { log.debug("Root service broker is :"+rootServiceBroker.toString()); log.debug("Service broker is :"+ serviceBroker.toString()); } } | 12869 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12869/62bd363f955b68d03456231b246aae08d58186aa/SecurityServiceProvider.java/clean/securityservices/src/org/cougaar/core/security/provider/SecurityServiceProvider.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
1744,
5676,
1435,
288,
565,
368,
968,
1365,
1156,
8625,
565,
756,
3367,
1179,
273,
261,
907,
3367,
1179,
13,
1377,
1156,
11194,
18,
588,
1179,
12,
2211,
16,
2029,
3367,
1179,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
1744,
5676,
1435,
288,
565,
368,
968,
1365,
1156,
8625,
565,
756,
3367,
1179,
273,
261,
907,
3367,
1179,
13,
1377,
1156,
11194,
18,
588,
1179,
12,
2211,
16,
2029,
3367,
1179,
... | ||
public Image getImage( String uri ) | public Image getImage( String uri, boolean refresh ) | public Image getImage( String uri ) { return getImage( uri, false ); } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/0bf618fe559b62ad991e6e2ec8175f3947bdc207/ImageManager.java/buggy/UI/org.eclipse.birt.report.designer.core/src/org/eclipse/birt/report/designer/util/ImageManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3421,
10567,
12,
514,
2003,
262,
202,
95,
202,
202,
2463,
10567,
12,
2003,
16,
629,
11272,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3421,
10567,
12,
514,
2003,
262,
202,
95,
202,
202,
2463,
10567,
12,
2003,
16,
629,
11272,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
else if ( LA25_0==EOL||LA25_0==22||(LA25_0>=29 && LA25_0<=31)||(LA25_0>=33 && LA25_0<=38) ) { | else if ( LA25_0==EOL||LA25_0==15||LA25_0==22||LA25_0==27||(LA25_0>=29 && LA25_0<=31)||(LA25_0>=33 && LA25_0<=38) ) { | public void rule_attributes(RuleDescr rule) throws RecognitionException { AttributeDescr a = null; try { // C:\Projects\jboss-rules\drools-compiler\src\main\resources\org\drools\lang\drl.g:257:25: ( ( 'attributes' )? ( ':' )? opt_eol ( ( ',' )? a= rule_attribute opt_eol )* ) // C:\Projects\jboss-rules\drools-compiler\src\main\resources\org\drools\lang\drl.g:257:25: ( 'attributes' )? ( ':' )? opt_eol ( ( ',' )? a= rule_attribute opt_eol )* { // C:\Projects\jboss-rules\drools-compiler\src\main\resources\org\drools\lang\drl.g:257:25: ( 'attributes' )? int alt25=2; int LA25_0 = input.LA(1); if ( LA25_0==32 ) { alt25=1; } else if ( LA25_0==EOL||LA25_0==22||(LA25_0>=29 && LA25_0<=31)||(LA25_0>=33 && LA25_0<=38) ) { alt25=2; } else { NoViableAltException nvae = new NoViableAltException("257:25: ( \'attributes\' )?", 25, 0, input); throw nvae; } switch (alt25) { case 1 : // C:\Projects\jboss-rules\drools-compiler\src\main\resources\org\drools\lang\drl.g:257:25: 'attributes' { match(input,32,FOLLOW_32_in_rule_attributes694); } break; } // C:\Projects\jboss-rules\drools-compiler\src\main\resources\org\drools\lang\drl.g:257:39: ( ':' )? int alt26=2; int LA26_0 = input.LA(1); if ( LA26_0==30 ) { alt26=1; } else if ( LA26_0==EOL||LA26_0==22||LA26_0==29||LA26_0==31||(LA26_0>=33 && LA26_0<=38) ) { alt26=2; } else { NoViableAltException nvae = new NoViableAltException("257:39: ( \':\' )?", 26, 0, input); throw nvae; } switch (alt26) { case 1 : // C:\Projects\jboss-rules\drools-compiler\src\main\resources\org\drools\lang\drl.g:257:39: ':' { match(input,30,FOLLOW_30_in_rule_attributes697); } break; } following.push(FOLLOW_opt_eol_in_rule_attributes700); opt_eol(); following.pop(); // C:\Projects\jboss-rules\drools-compiler\src\main\resources\org\drools\lang\drl.g:258:25: ( ( ',' )? a= rule_attribute opt_eol )* loop28: do { int alt28=2; int LA28_0 = input.LA(1); if ( LA28_0==22||(LA28_0>=33 && LA28_0<=38) ) { alt28=1; } switch (alt28) { case 1 : // C:\Projects\jboss-rules\drools-compiler\src\main\resources\org\drools\lang\drl.g:258:33: ( ',' )? a= rule_attribute opt_eol { // C:\Projects\jboss-rules\drools-compiler\src\main\resources\org\drools\lang\drl.g:258:33: ( ',' )? int alt27=2; int LA27_0 = input.LA(1); if ( LA27_0==22 ) { alt27=1; } else if ( (LA27_0>=33 && LA27_0<=38) ) { alt27=2; } else { NoViableAltException nvae = new NoViableAltException("258:33: ( \',\' )?", 27, 0, input); throw nvae; } switch (alt27) { case 1 : // C:\Projects\jboss-rules\drools-compiler\src\main\resources\org\drools\lang\drl.g:258:33: ',' { match(input,22,FOLLOW_22_in_rule_attributes707); } break; } following.push(FOLLOW_rule_attribute_in_rule_attributes712); a=rule_attribute(); following.pop(); following.push(FOLLOW_opt_eol_in_rule_attributes714); opt_eol(); following.pop(); rule.addAttribute( a ); } break; default : break loop28; } } while (true); } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { } return ; } | 5490 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5490/9c6423b7a31fdc4a1317e71a6d2850c94e2140e0/RuleParser.java/buggy/drools-compiler/src/main/java/org/drools/lang/RuleParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1720,
67,
4350,
12,
2175,
16198,
1720,
13,
1216,
9539,
288,
6647,
3601,
16198,
279,
273,
446,
31,
3639,
775,
288,
5411,
368,
385,
5581,
15298,
64,
10649,
8464,
17,
7482,
64,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
67,
4350,
12,
2175,
16198,
1720,
13,
1216,
9539,
288,
6647,
3601,
16198,
279,
273,
446,
31,
3639,
775,
288,
5411,
368,
385,
5581,
15298,
64,
10649,
8464,
17,
7482,
64,
... |
strTreeSet = ""; | private void refreshEntities() { lisEntities.removeAll(); int listIndex = 0; String strTreeSet = ""; String strTreeView = ""; boolean localUnits = false; entityCorrespondance = new int[client.game.getNoOfEntities()]; for (Enumeration i = client.getEntities(); i.hasMoreElements();) { Entity entity = (Entity)i.nextElement(); // Remember if the local player has units. if ( !localUnits && entity.getOwner().equals(client.getLocalPlayer()) ) { localUnits = true; } if(entity.hasC3i()) { strTreeSet = ""; if(entity.calculateFreeC3Nodes() == 5) strTreeSet = "**"; strTreeView = " (" + entity.getC3NetId() + ")"; } else if(entity.hasC3()) { if(entity.getC3Master() == null) { if(entity.hasC3S()) strTreeSet = "***"; else strTreeSet = "*"; strTreeView = ""; } else { strTreeSet = ""; if(!entity.C3MasterIs(entity)) { strTreeSet = ">"; if(entity.getC3Master().getC3Master() != null && !entity.getC3Master().C3MasterIs(entity.getC3Master())) strTreeSet = ">>"; strTreeView = " -> " + entity.getC3Master().getDisplayName(); } } } else { strTreeSet = ""; strTreeView = ""; } if ( !client.game.getOptions().booleanOption("pilot_advantages") ) { entity.getCrew().clearAdvantages(); } int crewAdvCount = entity.getCrew().countAdvantages(); // Handle the "Blind Drop" option. if ( !entity.getOwner().equals(client.getLocalPlayer()) && client.game.getOptions().booleanOption("blind_drop") ) { int weigth = entity.getWeightClass(); String weight = ""; switch (weigth) { case Entity.WEIGHT_LIGHT : weight = "Light"; break; case Entity.WEIGHT_MEDIUM : weight = "Medium"; break; case Entity.WEIGHT_HEAVY : weight = "Heavy"; break; case Entity.WEIGHT_ASSAULT : weight = "Assault"; break; } lisEntities.add(entity.getOwner().getName() + " (" + entity.getCrew().getGunnery() + "/" + entity.getCrew().getPiloting() + " pilot" + (crewAdvCount > 0 ? " <" + crewAdvCount + " advs>" : "") + ")" + " Class: " + weight + ((entity.getDeployRound() > 0) ? " - Deploy after round " + entity.getDeployRound() : "")); } else { lisEntities.add(strTreeSet + entity.getDisplayName() + " (" + entity.getCrew().getGunnery() + "/" + entity.getCrew().getPiloting() + " pilot" + (crewAdvCount > 0 ? " <" + crewAdvCount + " advs>" : "") + ")" + " BV=" + entity.calculateBattleValue() + strTreeView + ((entity.getDeployRound() > 0) ? " - Deploy after round " + entity.getDeployRound() : "")); } entityCorrespondance[listIndex++] = entity.getId(); } // Enable the "Save Unit List..." and "Delete All" // buttons if the local player has units. butSaveList.setEnabled( localUnits ); butDeleteAll.setEnabled( localUnits ); // Disable the "must select" buttons. butCustom.setEnabled(false); butMechReadout.setEnabled(false); butDelete.setEnabled(false); } | 3464 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3464/c12bd6e4c1e55b992ee14a51b1bb03990f54e499/ChatLounge.java/clean/megamek/src/megamek/client/ui/AWT/ChatLounge.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
4460,
8108,
1435,
288,
3639,
328,
291,
8108,
18,
4479,
1595,
5621,
3639,
509,
666,
1016,
273,
374,
31,
3639,
514,
3639,
514,
609,
2471,
1767,
273,
1408,
31,
3639,
1250,
1191,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4460,
8108,
1435,
288,
3639,
328,
291,
8108,
18,
4479,
1595,
5621,
3639,
509,
666,
1016,
273,
374,
31,
3639,
514,
3639,
514,
609,
2471,
1767,
273,
1408,
31,
3639,
1250,
1191,
... | |
runQueryCheckResult( | assertQueryReturns( | public void _testYtdGrowth() { runQueryCheckResult( // todo: implement "ParallelPeriod" "WITH MEMBER [Measures].[YTD Unit Sales] AS" + nl + " 'COALESCEEMPTY(SUM(YTD(), [Measures].[Unit Sales]), 0)'" + nl + "MEMBER [Measures].[Previous YTD Unit Sales] AS" + nl + " '(Measures.[YTD Unit Sales], PARALLELPERIOD([Time].[Year]))'" + nl + "MEMBER [Measures].[YTD Growth] AS" + nl + " '[Measures].[YTD Unit Sales] - ([Measures].[Previous YTD Unit Sales])'" + nl + "SELECT {[Time].[1998]} ON COLUMNS," + nl + " {[Measures].[YTD Unit Sales], [Measures].[Previous YTD Unit Sales], [Measures].[YTD Growth]} ON ROWS" + nl + "FROM Sales ", ""); } | 4891 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4891/3041f930b5fc4bf6aa3339845b828801c1d8b366/BasicQueryTest.java/buggy/testsrc/main/mondrian/test/BasicQueryTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
389,
3813,
61,
4465,
30948,
451,
1435,
288,
3639,
1815,
1138,
1356,
12,
368,
10621,
30,
2348,
315,
13056,
5027,
6,
7734,
315,
9147,
18990,
6271,
306,
23177,
1823,
8009,
63,
61,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
389,
3813,
61,
4465,
30948,
451,
1435,
288,
3639,
1815,
1138,
1356,
12,
368,
10621,
30,
2348,
315,
13056,
5027,
6,
7734,
315,
9147,
18990,
6271,
306,
23177,
1823,
8009,
63,
61,... |
StringUtils.printException(t); | StringUtil.printException(t); | public static void main(String[] args) { try { String options[] = { "config:", "help", "timeout:", "version" }; Options opt = Options.parse(args, options); if (opt.isSet("help")) { printUsage(System.out); System.exit(0); } if (opt.isSet("version")) { System.out.println("NetGtp " + Version.get()); System.exit(0); } int timeout = opt.getInteger("timeout", 10, 0); ArrayList arguments = opt.getArguments(); if (arguments.size() != 2) { printUsage(System.err); System.exit(-1); } String hostname = (String)arguments.get(0); int port = Integer.parseInt((String)arguments.get(1)); new NetGtp(hostname, port, timeout); } catch (Throwable t) { StringUtils.printException(t); System.exit(-1); } } | 51310 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51310/1f50ffb219183ddaf94720a4aba453e11f412425/NetGtp.java/buggy/src/net/sf/gogui/netgtp/NetGtp.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
2774,
12,
780,
8526,
833,
13,
565,
288,
3639,
775,
3639,
288,
5411,
514,
702,
8526,
273,
288,
7734,
315,
1425,
2773,
16,
7734,
315,
5201,
3113,
7734,
315,
4538,
2773,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
2774,
12,
780,
8526,
833,
13,
565,
288,
3639,
775,
3639,
288,
5411,
514,
702,
8526,
273,
288,
7734,
315,
1425,
2773,
16,
7734,
315,
5201,
3113,
7734,
315,
4538,
2773,
16... |
public static ShapePainter convertMarkers(Element paintedElement, | public static ShapePainter convertMarkers(Element e, | public static ShapePainter convertMarkers(Element paintedElement, ShapeNode node, BridgeContext ctx) { CSSOMReadOnlyStyleDeclaration decl = CSSUtilities.getComputedStyle(paintedElement); CSSValue v; v = decl.getPropertyCSSValueInternal(CSS_MARKER_START_PROPERTY); Marker startMarker = convertMarker(paintedElement, (CSSPrimitiveValue)v, ctx); v = decl.getPropertyCSSValueInternal(CSS_MARKER_MID_PROPERTY); Marker midMarker = convertMarker(paintedElement, (CSSPrimitiveValue)v, ctx); v = decl.getPropertyCSSValueInternal(CSS_MARKER_END_PROPERTY); Marker endMarker = convertMarker(paintedElement, (CSSPrimitiveValue)v, ctx); if (startMarker != null || midMarker != null || endMarker != null) { MarkerShapePainter p = new MarkerShapePainter(node.getShape()); p.setStartMarker(startMarker); p.setMiddleMarker(midMarker); p.setEndMarker(endMarker); return p; } else { return null; } } | 46680 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46680/73c18fe9666e3e12716d10fc9afa64073db4c647/PaintServer.java/clean/sources/org/apache/batik/bridge/PaintServer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
12383,
15775,
1765,
21644,
12,
1046,
425,
16,
4766,
2868,
12383,
907,
756,
16,
4766,
2868,
24219,
1042,
1103,
13,
288,
3639,
6765,
1872,
12066,
2885,
6094,
3496,
5411,
273,
6765,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12383,
15775,
1765,
21644,
12,
1046,
425,
16,
4766,
2868,
12383,
907,
756,
16,
4766,
2868,
24219,
1042,
1103,
13,
288,
3639,
6765,
1872,
12066,
2885,
6094,
3496,
5411,
273,
6765,... |
} else { Logger.minor(this, "delay="+delay+"("+throttle+") sleep for "+(sleepUntil-now)+" for "+this); if(sleepUntil - now > 0) try { synchronized(this) { wait(Math.min(sleepUntil - now, 500)); } } catch (InterruptedException e) { } | public void run() { long sentRequestTime = System.currentTimeMillis(); while(true) { RequestStarterClient client; client = getNextClient(); Logger.minor(this, "getNextClient() = "+client); if(client != null) { boolean success; try { success = client.send(cycleNumber); } catch (Throwable t) { Logger.error(this, "Caught "+t); continue; } if(success) { sentRequestTime = System.currentTimeMillis(); Logger.minor(this, "Sent"); if(client.isReady()) { synchronized(this) { try { clientsReadyNextCycle.addOrUpdate(client); } catch (UpdatableSortedLinkedListKilledException e) { // Impossible throw new Error(e); } } } } } while(true) { long delay = throttle.getDelay(); long sleepUntil = sentRequestTime + delay; long now = System.currentTimeMillis(); if(sleepUntil < now) { if(waitingClients()) break; // Otherwise wait for notification try { synchronized(this) { wait(1000); } } catch (InterruptedException e) { // Ignore } } else { Logger.minor(this, "delay="+delay+"("+throttle+") sleep for "+(sleepUntil-now)+" for "+this); if(sleepUntil - now > 0) try { synchronized(this) { // At most sleep 500ms, then recompute. wait(Math.min(sleepUntil - now, 500)); } } catch (InterruptedException e) { // Ignore } } } } } | 56348 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56348/d32229c02576d531c915059f111c468591f30e84/RequestStarter.java/clean/src/freenet/node/RequestStarter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1086,
1435,
288,
202,
202,
5748,
3271,
691,
950,
273,
2332,
18,
2972,
28512,
5621,
202,
202,
17523,
12,
3767,
13,
288,
1082,
202,
691,
510,
14153,
1227,
1004,
31,
1082,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1086,
1435,
288,
202,
202,
5748,
3271,
691,
950,
273,
2332,
18,
2972,
28512,
5621,
202,
202,
17523,
12,
3767,
13,
288,
1082,
202,
691,
510,
14153,
1227,
1004,
31,
1082,
2... | |
protected void initFile(String id) throws FormatException, IOException { super.initFile(id); in = new RandomAccessStream(id); in.skipBytes(4); little = in.read() == 0x49; bpp = 2; // this is a major assumption // check if there are multiple "series" - note that each series has the // same dimensions, so we can display each plane as part of the same series in.seek(160); boolean multiSeries = DataTools.read4UnsignedBytes(in, true) > 1; // pixel data always begins at 0x6b0 in.seek(1792); // determine the number of images byte[] buf = new byte[8192]; boolean found = false; int count = 0; int n = in.read(buf); while (!found && in.getFilePointer() < in.length()) { count += n; for (int i=0; i<n-3; i++) { found = buf[i] == 0x68 && buf[i+1] == 0x00 && buf[i+2] == 0x00 && buf[i+3] == 0x01; if (found) { count -= (n - i); i = n; } } byte[] tmp = buf; buf = new byte[8192]; System.arraycopy(tmp, tmp.length - 20, buf, 0, 20); n = in.read(buf, 20, buf.length - 20); } int numC = 0; in.seek(1792 + count - 20); int check = in.read(); int lastH = 0; while (check == 'h') { lastH = in.getFilePointer(); in.skipBytes(255); numC++; check = in.read(); } // scan the remaining bytes for the "CTimelapseAnnotation" tag in.seek(1792 + count); buf = new byte[8192]; n = in.read(buf); int numT = 0; while (n > 0) { String t = new String(buf); t.trim(); while (t.indexOf("CTimelapseAnnotation") != -1) { t = t.substring(t.indexOf("CTimelapseAnnotation") + 20); numT++; } byte[] tmp = buf; buf = new byte[8192]; System.arraycopy(tmp, tmp.length - 20, buf, 0, 20); n = in.read(buf, 20, buf.length - 20); } // look for the first "i...II" block - this will have the width and height in.seek(lastH); in.skipBytes(335); width = DataTools.read2UnsignedBytes(in, true); height = DataTools.read2UnsignedBytes(in, true); if (multiSeries) { width /= numC; height /= numC; } numImages = count / (width * height * bpp); float planes = (float) count / (float) (width * height * bpp); numImages = (int) planes; sizeX[0] = width; sizeY[0] = height; sizeZ[0] = numImages / (numT * numC); sizeC[0] = numC; sizeT[0] = numT; pixelType[0] = FormatReader.UINT16; currentOrder[0] = "XY"; if (numImages != (sizeZ[0] * sizeC[0] * sizeT[0])) { sizeZ[0] = 1; sizeT[0] = numImages / sizeC[0]; } int[] dims = {sizeZ[0], sizeC[0], sizeT[0]}; String[] names = {"Z", "C", "T"}; int max = 0, min = Integer.MAX_VALUE; int maxNdx = 0, minNdx = 0, medNdx = 0; for (int i=0; i<dims.length; i++) { if (dims[i] > max) { max = dims[i]; maxNdx = i; } else if (dims[i] < min) { min = dims[i]; minNdx = i; } } for (int i=0; i<dims.length; i++) { if (maxNdx != i && minNdx != i) medNdx = i; } currentOrder[0] += names[maxNdx]; currentOrder[0] += names[medNdx]; currentOrder[0] += names[minNdx]; if (sizeZ[0] == 0) sizeZ[0] = 1; if (sizeC[0] == 0) sizeC[0] = 1; if (sizeT[0] == 0) sizeT[0] = 1; } | 46826 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46826/3dfd59718bd357815b599f69b2fb792dc8c85b62/SlidebookReader.java/buggy/loci/formats/in/SlidebookReader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
918,
1208,
812,
12,
780,
612,
13,
1216,
4077,
503,
16,
1860,
288,
565,
2240,
18,
2738,
812,
12,
350,
1769,
565,
316,
273,
394,
8072,
1862,
1228,
12,
350,
1769,
565,
316,
18,
745... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
918,
1208,
812,
12,
780,
612,
13,
1216,
4077,
503,
16,
1860,
288,
565,
2240,
18,
2738,
812,
12,
350,
1769,
565,
316,
273,
394,
8072,
1862,
1228,
12,
350,
1769,
565,
316,
18,
745... | ||
match(LITERAL_collection); if ( inputState.guessing==0 ) { name= "collection"; } reservedKeywords_AST = (AST)currentAST.root; break; } case LITERAL_ancestor: | match(LITERAL_parent); if ( inputState.guessing==0 ) { name= "parent"; } reservedKeywords_AST = (AST)currentAST.root; break; } case LITERAL_self: | public final String reservedKeywords() throws RecognitionException, TokenStreamException { String name; returnAST = null; ASTPair currentAST = new ASTPair(); AST reservedKeywords_AST = null; name= null; switch ( LA(1)) { case LITERAL_div: { AST tmp288_AST = null; tmp288_AST = astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp288_AST); match(LITERAL_div); if ( inputState.guessing==0 ) { name= "div"; } reservedKeywords_AST = (AST)currentAST.root; break; } case LITERAL_mod: { AST tmp289_AST = null; tmp289_AST = astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp289_AST); match(LITERAL_mod); if ( inputState.guessing==0 ) { name= "mod"; } reservedKeywords_AST = (AST)currentAST.root; break; } case LITERAL_text: { AST tmp290_AST = null; tmp290_AST = astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp290_AST); match(LITERAL_text); if ( inputState.guessing==0 ) { name= "text"; } reservedKeywords_AST = (AST)currentAST.root; break; } case LITERAL_node: { AST tmp291_AST = null; tmp291_AST = astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp291_AST); match(LITERAL_node); if ( inputState.guessing==0 ) { name= "node"; } reservedKeywords_AST = (AST)currentAST.root; break; } case LITERAL_or: { AST tmp292_AST = null; tmp292_AST = astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp292_AST); match(LITERAL_or); if ( inputState.guessing==0 ) { name= "or"; } reservedKeywords_AST = (AST)currentAST.root; break; } case LITERAL_and: { AST tmp293_AST = null; tmp293_AST = astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp293_AST); match(LITERAL_and); if ( inputState.guessing==0 ) { name= "and"; } reservedKeywords_AST = (AST)currentAST.root; break; } case LITERAL_child: { AST tmp294_AST = null; tmp294_AST = astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp294_AST); match(LITERAL_child); if ( inputState.guessing==0 ) { name= "child"; } reservedKeywords_AST = (AST)currentAST.root; break; } case LITERAL_parent: { AST tmp295_AST = null; tmp295_AST = astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp295_AST); match(LITERAL_parent); if ( inputState.guessing==0 ) { name= "parent"; } reservedKeywords_AST = (AST)currentAST.root; break; } case LITERAL_self: { AST tmp296_AST = null; tmp296_AST = astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp296_AST); match(LITERAL_self); if ( inputState.guessing==0 ) { name= "self"; } reservedKeywords_AST = (AST)currentAST.root; break; } case LITERAL_attribute: { AST tmp297_AST = null; tmp297_AST = astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp297_AST); match(LITERAL_attribute); if ( inputState.guessing==0 ) { name= "attribute"; } reservedKeywords_AST = (AST)currentAST.root; break; } case LITERAL_comment: { AST tmp298_AST = null; tmp298_AST = astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp298_AST); match(LITERAL_comment); if ( inputState.guessing==0 ) { name= "comment"; } reservedKeywords_AST = (AST)currentAST.root; break; } case LITERAL_document: { AST tmp299_AST = null; tmp299_AST = astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp299_AST); match(LITERAL_document); if ( inputState.guessing==0 ) { name= "document"; } reservedKeywords_AST = (AST)currentAST.root; break; } case LITERAL_collection: { AST tmp300_AST = null; tmp300_AST = astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp300_AST); match(LITERAL_collection); if ( inputState.guessing==0 ) { name= "collection"; } reservedKeywords_AST = (AST)currentAST.root; break; } case LITERAL_ancestor: { AST tmp301_AST = null; tmp301_AST = astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp301_AST); match(LITERAL_ancestor); if ( inputState.guessing==0 ) { name= "ancestor"; } reservedKeywords_AST = (AST)currentAST.root; break; } case LITERAL_descendant: { AST tmp302_AST = null; tmp302_AST = astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp302_AST); match(LITERAL_descendant); if ( inputState.guessing==0 ) { name= "descendant"; } reservedKeywords_AST = (AST)currentAST.root; break; } case 104: { AST tmp303_AST = null; tmp303_AST = astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp303_AST); match(104); if ( inputState.guessing==0 ) { name= "descendant-or-self"; } reservedKeywords_AST = (AST)currentAST.root; break; } case 108: { AST tmp304_AST = null; tmp304_AST = astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp304_AST); match(108); if ( inputState.guessing==0 ) { name= "ancestor-or-self"; } reservedKeywords_AST = (AST)currentAST.root; break; } case 109: { AST tmp305_AST = null; tmp305_AST = astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp305_AST); match(109); if ( inputState.guessing==0 ) { name= "preceding-sibling"; } reservedKeywords_AST = (AST)currentAST.root; break; } case 105: { AST tmp306_AST = null; tmp306_AST = astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp306_AST); match(105); if ( inputState.guessing==0 ) { name= "following-sibling"; } reservedKeywords_AST = (AST)currentAST.root; break; } case LITERAL_item: { AST tmp307_AST = null; tmp307_AST = astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp307_AST); match(LITERAL_item); if ( inputState.guessing==0 ) { name= "item"; } reservedKeywords_AST = (AST)currentAST.root; break; } case LITERAL_empty: { AST tmp308_AST = null; tmp308_AST = astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp308_AST); match(LITERAL_empty); if ( inputState.guessing==0 ) { name= "empty"; } reservedKeywords_AST = (AST)currentAST.root; break; } case VERSION: { AST tmp309_AST = null; tmp309_AST = astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp309_AST); match(VERSION); if ( inputState.guessing==0 ) { name= "version"; } reservedKeywords_AST = (AST)currentAST.root; break; } case XQUERY: { AST tmp310_AST = null; tmp310_AST = astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp310_AST); match(XQUERY); if ( inputState.guessing==0 ) { name= "xquery"; } reservedKeywords_AST = (AST)currentAST.root; break; } case LITERAL_variable: { AST tmp311_AST = null; tmp311_AST = astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp311_AST); match(LITERAL_variable); if ( inputState.guessing==0 ) { name= "variable"; } reservedKeywords_AST = (AST)currentAST.root; break; } case LITERAL_namespace: { AST tmp312_AST = null; tmp312_AST = astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp312_AST); match(LITERAL_namespace); if ( inputState.guessing==0 ) { name= "namespace"; } reservedKeywords_AST = (AST)currentAST.root; break; } case LITERAL_if: { AST tmp313_AST = null; tmp313_AST = astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp313_AST); match(LITERAL_if); if ( inputState.guessing==0 ) { name= "if"; } reservedKeywords_AST = (AST)currentAST.root; break; } case LITERAL_then: { AST tmp314_AST = null; tmp314_AST = astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp314_AST); match(LITERAL_then); if ( inputState.guessing==0 ) { name= "then"; } reservedKeywords_AST = (AST)currentAST.root; break; } case LITERAL_else: { AST tmp315_AST = null; tmp315_AST = astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp315_AST); match(LITERAL_else); if ( inputState.guessing==0 ) { name= "else"; } reservedKeywords_AST = (AST)currentAST.root; break; } case LITERAL_for: { AST tmp316_AST = null; tmp316_AST = astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp316_AST); match(LITERAL_for); if ( inputState.guessing==0 ) { name= "for"; } reservedKeywords_AST = (AST)currentAST.root; break; } case LITERAL_let: { AST tmp317_AST = null; tmp317_AST = astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp317_AST); match(LITERAL_let); if ( inputState.guessing==0 ) { name= "let"; } reservedKeywords_AST = (AST)currentAST.root; break; } case LITERAL_default: { AST tmp318_AST = null; tmp318_AST = astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp318_AST); match(LITERAL_default); if ( inputState.guessing==0 ) { name= "default"; } reservedKeywords_AST = (AST)currentAST.root; break; } case LITERAL_function: { AST tmp319_AST = null; tmp319_AST = astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp319_AST); match(LITERAL_function); if ( inputState.guessing==0 ) { name= "function"; } reservedKeywords_AST = (AST)currentAST.root; break; } default: { throw new NoViableAltException(LT(1), getFilename()); } } returnAST = reservedKeywords_AST; return name; } | 2909 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2909/ca3671ce7c752480b17278b434be7f75e3ec7d57/XPathParser2.java/buggy/src/org/exist/parser/XPathParser2.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
514,
225,
8735,
14149,
1435,
1216,
9539,
16,
3155,
1228,
503,
288,
202,
202,
780,
508,
31,
9506,
202,
2463,
9053,
273,
446,
31,
202,
202,
9053,
4154,
783,
9053,
273,
394,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
514,
225,
8735,
14149,
1435,
1216,
9539,
16,
3155,
1228,
503,
288,
202,
202,
780,
508,
31,
9506,
202,
2463,
9053,
273,
446,
31,
202,
202,
9053,
4154,
783,
9053,
273,
394,... |
if (RefactoringMessageUtil.checkReadOnlyStatusRecursively(myProject, elements[i])) return; | if (!RefactoringMessageUtil.checkReadOnlyStatusRecursively(myProject, elements[i])) return; | public void performCut(DataContext dataContext) { PsiElement[] elements = getValidSelectedElements(); if (elements == null) { return; } for (int i = 0; i < elements.length; i++) { if (RefactoringMessageUtil.checkReadOnlyStatusRecursively(myProject, elements[i])) return; } ((CopyPasteManagerEx)CopyPasteManager.getInstance()).setElements(elements, false); updateView(); } | 56627 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56627/41d43413463e0d47889b1ef52743fbc607d28ecd/CopyPasteManagerEx.java/buggy/source/com/intellij/ide/CopyPasteManagerEx.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4202,
1071,
918,
3073,
15812,
12,
751,
1042,
501,
1042,
13,
288,
3639,
453,
7722,
1046,
8526,
2186,
273,
22574,
7416,
3471,
5621,
3639,
309,
261,
6274,
422,
446,
13,
288,
1850,
327,
31,
3639,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4202,
1071,
918,
3073,
15812,
12,
751,
1042,
501,
1042,
13,
288,
3639,
453,
7722,
1046,
8526,
2186,
273,
22574,
7416,
3471,
5621,
3639,
309,
261,
6274,
422,
446,
13,
288,
1850,
327,
31,
3639,
... |
public void calculateChecksum(Patch ip, int start, int end, int ofs) { | protected void calculateChecksum(Patch ip, int start, int end, int ofs) { | public void calculateChecksum(Patch ip, int start, int end, int ofs) { Patch p = (Patch)ip; int sum = 0; for (int i = start; i <= end; i++) { sum += p.sysex[i]; } sum += 0xA5; p.sysex[ofs] = (byte) (sum % 128); // p.sysex[ofs]=(byte)(p.sysex[ofs]^127); // p.sysex[ofs]=(byte)(p.sysex[ofs]+1); } | 7591 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7591/af6640fd9aa925c4d7044770be761a3432d7c66e/KawaiK4SingleDriver.java/clean/JSynthLib/synthdrivers/KawaiK4/KawaiK4SingleDriver.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
4604,
10723,
12,
7332,
2359,
16,
509,
787,
16,
509,
679,
16,
509,
26927,
13,
288,
377,
202,
7332,
293,
273,
261,
7332,
13,
625,
31,
377,
202,
474,
2142,
273,
374,
31,
202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
4604,
10723,
12,
7332,
2359,
16,
509,
787,
16,
509,
679,
16,
509,
26927,
13,
288,
377,
202,
7332,
293,
273,
261,
7332,
13,
625,
31,
377,
202,
474,
2142,
273,
374,
31,
202,
... |
} else if (this == runtime.getFalse()) { | } else if (this == getRuntime().getFalse()) { | public IRubyObject method_missing(IRubyObject[] args) { if (args.length == 0) { throw new ArgumentError(getRuntime(), "no id given"); } String name = args[0].asSymbol(); String description = callMethod("inspect").toString(); boolean noClass = description.charAt(0) == '#'; if (isNil()) { noClass = true; description = "nil"; } else if (this == runtime.getTrue()) { noClass = true; description = "true"; } else if (this == runtime.getFalse()) { noClass = true; description = "false"; } LastCallStatus lastCallStatus = runtime.getLastCallStatus(); String format = lastCallStatus.errorMessageFormat(name); String msg = new PrintfFormat(format).sprintf( new Object[] { name, description, noClass ? "" : ":", noClass ? "" : getType().getName()}); throw new NoMethodError(getRuntime(), msg); } | 48072 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48072/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubyObject.java/buggy/src/org/jruby/RubyObject.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
15908,
10340,
921,
707,
67,
7337,
12,
7937,
10340,
921,
8526,
833,
13,
288,
3639,
309,
261,
1968,
18,
2469,
422,
374,
13,
288,
5411,
604,
394,
9236,
12,
588,
5576,
9334,
315,
2135... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
707,
67,
7337,
12,
7937,
10340,
921,
8526,
833,
13,
288,
3639,
309,
261,
1968,
18,
2469,
422,
374,
13,
288,
5411,
604,
394,
9236,
12,
588,
5576,
9334,
315,
2135... |
updateHighlighters(null, new LinkedHashSet<HighlightingPass>(Arrays.asList(new WolfPass(myProject))), null); | updateHighlighters(null, Collections.singleton(new WolfPass(myProject)), null); | public void run() { updateHighlighters(null, new LinkedHashSet<HighlightingPass>(Arrays.asList(new WolfPass(myProject))), null); } | 56598 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56598/8e8b4eda7ff16f591891952013bc6902d411040a/DaemonCodeAnalyzerImpl.java/clean/codeInsight/impl/com/intellij/codeInsight/daemon/impl/DaemonCodeAnalyzerImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
6647,
1071,
918,
1086,
1435,
288,
5411,
1089,
8573,
80,
2031,
5432,
12,
2011,
16,
5737,
18,
24487,
12,
2704,
678,
355,
74,
6433,
12,
4811,
4109,
13,
3631,
446,
1769,
1850,
289,
2,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6647,
1071,
918,
1086,
1435,
288,
5411,
1089,
8573,
80,
2031,
5432,
12,
2011,
16,
5737,
18,
24487,
12,
2704,
678,
355,
74,
6433,
12,
4811,
4109,
13,
3631,
446,
1769,
1850,
289,
2,
-100,
-100... |
if (clade.attributeLists == null) { clade.attributeLists = new List[attributeNames.length]; | if (attributeNames != null) { if (clade.attributeLists == null) { clade.attributeLists = new List[attributeNames.length]; for (int i = 0; i < attributeNames.length; i++) { clade.attributeLists[i] = new ArrayList(); } } clade.attributeLists[0].add(new Double(tree.getNodeHeight(node))); | private void addClade(BitSet bits, Tree tree, NodeRef node) { Clade clade = (Clade)cladeMap.get(bits); if (clade == null) { return; } clade.setFrequency(clade.getFrequency() + 1); if (clade.attributeLists == null) { clade.attributeLists = new List[attributeNames.length]; for (int i = 0; i < attributeNames.length; i++) { clade.attributeLists[i] = new ArrayList(); } } clade.attributeLists[0].add(new Double(tree.getNodeHeight(node))); for (int i = 0; i < attributeNames.length; i++) { Object value; if (attributeNames[i].equals("height")) { value = new Double(tree.getNodeHeight(node)); } else if (attributeNames[i].equals("length")) { value = new Double(tree.getBranchLength(node)); } else { value = tree.getAttribute(attributeNames[i]); } if (value != null) { clade.attributeLists[i].add(value); } } } | 49053 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49053/8d1ce22038f82eb637f83e7b14f5d3fc51eafb53/TreeAnnotator.java/buggy/trunk/src/dr/app/tools/TreeAnnotator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
3238,
918,
527,
2009,
2486,
12,
5775,
694,
4125,
16,
4902,
2151,
16,
2029,
1957,
756,
13,
288,
5411,
3905,
2486,
927,
2486,
273,
261,
2009,
2486,
13,
830,
2486,
863,
18,
588,
12,
6789,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
3238,
918,
527,
2009,
2486,
12,
5775,
694,
4125,
16,
4902,
2151,
16,
2029,
1957,
756,
13,
288,
5411,
3905,
2486,
927,
2486,
273,
261,
2009,
2486,
13,
830,
2486,
863,
18,
588,
12,
6789,
... |
btParser.setSym1(nf.Binary(pos(), a, Binary.LE, b)); break; } case 384: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(4); btParser.setSym1(nf.Binary(pos(), a, Binary.GE, b)); break; } case 385: break; case 386: { | btParser.setSym1(nf.Binary(pos(), a, Binary.NE, b)); break; } case 384: break; case 385: { | 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) { System.out.println("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: ClassOrInterfaceType ::= ClassType // case 15: break; // // Rule 16: ClassType ::= 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: InterfaceType ::= TypeName // case 17: {//vj assert(btParser.getSym(2) == null); // generic not yet supported Name a = (Name) btParser.getSym(1); btParser.setSym1(a.toType()); break; } // // Rule 18: TypeName ::= identifier // case 18: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 19: TypeName ::= TypeName DOT identifier // case 19: { 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 20: ClassName ::= TypeName // case 20: break; // // Rule 21: TypeVariable ::= identifier // case 21: break; // // Rule 22: ArrayType ::= Type LBRACKET RBRACKET // case 22: { TypeNode a = (TypeNode) btParser.getSym(1); btParser.setSym1(array(a, pos(), 1)); break; } // // Rule 23: TypeParameter ::= TypeVariable TypeBoundopt // case 23: bad_rule = 23; break; // // Rule 24: TypeBound ::= extends ClassOrInterfaceType AdditionalBoundListopt // case 24: bad_rule = 24; break; // // Rule 25: AdditionalBoundList ::= AdditionalBound // case 25: bad_rule = 25; break; // // Rule 26: AdditionalBoundList ::= AdditionalBoundList AdditionalBound // case 26: bad_rule = 26; break; // // Rule 27: AdditionalBound ::= AND InterfaceType // case 27: bad_rule = 27; break; // // Rule 28: TypeArguments ::= LESS ActualTypeArgumentList GREATER // case 28: bad_rule = 28; break; // // Rule 29: ActualTypeArgumentList ::= ActualTypeArgument // case 29: bad_rule = 29; break; // // Rule 30: ActualTypeArgumentList ::= ActualTypeArgumentList COMMA ActualTypeArgument // case 30: bad_rule = 30; break; // // Rule 31: Wildcard ::= QUESTION WildcardBoundsOpt // case 31: bad_rule = 31; break; // // Rule 32: WildcardBounds ::= extends ReferenceType // case 32: bad_rule = 32; break; // // Rule 33: WildcardBounds ::= super ReferenceType // case 33: bad_rule = 33; break; // // Rule 34: PackageName ::= identifier // case 34: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 35: PackageName ::= PackageName DOT identifier // case 35: { 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 36: ExpressionName ::= identifier // case 36: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 37: ExpressionName ::= AmbiguousName DOT identifier // case 37: { 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 38: MethodName ::= identifier // case 38: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 39: MethodName ::= AmbiguousName DOT identifier // case 39: { 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 40: PackageOrTypeName ::= identifier // case 40: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 41: PackageOrTypeName ::= PackageOrTypeName DOT identifier // case 41: { 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 42: AmbiguousName ::= identifier // case 42: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 43: AmbiguousName ::= AmbiguousName DOT identifier // case 43: { 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 44: CompilationUnit ::= PackageDeclarationopt ImportDeclarationsopt TypeDeclarationsopt // case 44: { PackageNode a = (PackageNode) btParser.getSym(1); List b = (List) btParser.getSym(2), c = (List) btParser.getSym(3); btParser.setSym1(nf.SourceFile(pos(btParser.getFirstToken(), btParser.getLastToken()), a, b, c)); break; } // // Rule 45: ImportDeclarations ::= ImportDeclaration // case 45: { List l = new TypedList(new LinkedList(), Import.class, false); Import a = (Import) btParser.getSym(1); l.add(a); btParser.setSym1(l); break; } // // Rule 46: ImportDeclarations ::= ImportDeclarations ImportDeclaration // case 46: { List l = (TypedList) btParser.getSym(1); Import b = (Import) btParser.getSym(2); if (b != null) l.add(b); //btParser.setSym1(l); break; } // // Rule 47: TypeDeclarations ::= TypeDeclaration // case 47: { 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 48: TypeDeclarations ::= TypeDeclarations TypeDeclaration // case 48: { List l = (TypedList) btParser.getSym(1); TopLevelDecl b = (TopLevelDecl) btParser.getSym(2); if (b != null) l.add(b); //btParser.setSym1(l); break; } // // Rule 49: PackageDeclaration ::= package PackageName SEMICOLON // case 49: {//vj assert(btParser.getSym(1) == null); // generic not yet supported Name a = (Name) btParser.getSym(2); btParser.setSym1(a.toPackage()); break; } // // Rule 50: ImportDeclaration ::= SingleTypeImportDeclaration // case 50: break; // // Rule 51: ImportDeclaration ::= TypeImportOnDemandDeclaration // case 51: break; // // Rule 52: ImportDeclaration ::= SingleStaticImportDeclaration // case 52: break; // // Rule 53: ImportDeclaration ::= StaticImportOnDemandDeclaration // case 53: break; // // Rule 54: SingleTypeImportDeclaration ::= import TypeName SEMICOLON // case 54: { Name a = (Name) btParser.getSym(2); btParser.setSym1(nf.Import(pos(btParser.getFirstToken(), btParser.getLastToken()), Import.CLASS, a.toString())); break; } // // Rule 55: TypeImportOnDemandDeclaration ::= import PackageOrTypeName DOT MULTIPLY SEMICOLON // case 55: { Name a = (Name) btParser.getSym(2); btParser.setSym1(nf.Import(pos(btParser.getFirstToken(), btParser.getLastToken()), Import.PACKAGE, a.toString())); break; } // // Rule 56: SingleStaticImportDeclaration ::= import static TypeName DOT identifier SEMICOLON // case 56: bad_rule = 56; break; // // Rule 57: StaticImportOnDemandDeclaration ::= import static TypeName DOT MULTIPLY SEMICOLON // case 57: bad_rule = 57; break; // // Rule 58: TypeDeclaration ::= ClassDeclaration // case 58: break; // // Rule 59: TypeDeclaration ::= InterfaceDeclaration // case 59: break; // // Rule 60: TypeDeclaration ::= SEMICOLON // case 60: { btParser.setSym1(null); break; } // // Rule 61: ClassDeclaration ::= NormalClassDeclaration // case 61: break; // // Rule 62: NormalClassDeclaration ::= ClassModifiersopt class identifier Superopt Interfacesopt ClassBody // case 62: { 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); List d = (List) btParser.getSym(5); ClassBody e = (ClassBody) btParser.getSym(6); if (a.isValue()) btParser.setSym1(nf.ValueClassDecl(pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier(), c, d, e)); else btParser.setSym1(nf.ClassDecl(pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier(), c, d, e)); break; } // // Rule 63: ClassModifiers ::= ClassModifier // case 63: break; // // Rule 64: ClassModifiers ::= ClassModifiers ClassModifier // case 64: { Flags a = (Flags) btParser.getSym(1), b = (Flags) btParser.getSym(2); btParser.setSym1(a.set(b)); break; } // // Rule 65: ClassModifier ::= public // case 65: { btParser.setSym1(Flags.PUBLIC); break; } // // Rule 66: ClassModifier ::= protected // case 66: { btParser.setSym1(Flags.PROTECTED); break; } // // Rule 67: ClassModifier ::= private // case 67: { btParser.setSym1(Flags.PRIVATE); break; } // // Rule 68: ClassModifier ::= abstract // case 68: { btParser.setSym1(Flags.ABSTRACT); break; } // // Rule 69: ClassModifier ::= static // case 69: { btParser.setSym1(Flags.STATIC); break; } // // Rule 70: ClassModifier ::= final // case 70: { btParser.setSym1(Flags.FINAL); break; } // // Rule 71: ClassModifier ::= strictfp // case 71: { btParser.setSym1(Flags.STRICTFP); break; } // // Rule 72: TypeParameters ::= LESS TypeParameterList GREATER // case 72: bad_rule = 72; break; // // Rule 73: TypeParameterList ::= TypeParameter // case 73: bad_rule = 73; break; // // Rule 74: TypeParameterList ::= TypeParameterList COMMA TypeParameter // case 74: bad_rule = 74; break; // // Rule 75: Super ::= extends ClassType // case 75: { btParser.setSym1(btParser.getSym(2)); break; } // // Rule 76: Interfaces ::= implements InterfaceTypeList // case 76: { btParser.setSym1(btParser.getSym(2)); break; } // // Rule 77: InterfaceTypeList ::= InterfaceType // case 77: { List l = new TypedList(new LinkedList(), TypeNode.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 78: InterfaceTypeList ::= InterfaceTypeList COMMA InterfaceType // case 78: { List l = (TypedList) btParser.getSym(1); l.add(btParser.getSym(2)); btParser.setSym1(l); break; } // // Rule 79: ClassBody ::= LBRACE ClassBodyDeclarationsopt RBRACE // case 79: { btParser.setSym1(nf.ClassBody(pos(btParser.getFirstToken(), btParser.getLastToken()), (List) btParser.getSym(2))); break; } // // Rule 80: ClassBodyDeclarations ::= ClassBodyDeclaration // case 80: break; // // Rule 81: ClassBodyDeclarations ::= ClassBodyDeclarations ClassBodyDeclaration // case 81: { List a = (List) btParser.getSym(1), b = (List) btParser.getSym(2); a.addAll(b); // btParser.setSym1(a); break; } // // Rule 82: ClassBodyDeclaration ::= ClassMemberDeclaration // case 82: break; // // Rule 83: ClassBodyDeclaration ::= InstanceInitializer // case 83: { 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 84: ClassBodyDeclaration ::= StaticInitializer // case 84: { 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 85: ClassBodyDeclaration ::= ConstructorDeclaration // case 85: { List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 86: ClassMemberDeclaration ::= FieldDeclaration // case 86: break; // // Rule 87: ClassMemberDeclaration ::= MethodDeclaration // case 87: { List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 88: ClassMemberDeclaration ::= ClassDeclaration // case 88: { List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 89: ClassMemberDeclaration ::= InterfaceDeclaration // case 89: { List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 90: ClassMemberDeclaration ::= SEMICOLON // case 90: { List l = new TypedList(new LinkedList(), ClassMember.class, false); btParser.setSym1(l); break; } // // Rule 91: FieldDeclaration ::= FieldModifiersopt Type VariableDeclarators SEMICOLON // case 91: { 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();) { VarDeclarator d = (VarDeclarator) i.next(); l.add(nf.FieldDecl(pos(btParser.getFirstToken(2), btParser.getLastToken()), a, array(b, pos(btParser.getFirstToken(2), btParser.getLastToken(2)), d.dims), d.name, d.init)); } btParser.setSym1(l); break; } // // Rule 92: VariableDeclarators ::= VariableDeclarator // case 92: { List l = new TypedList(new LinkedList(), VarDeclarator.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 93: VariableDeclarators ::= VariableDeclarators COMMA VariableDeclarator // case 93: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(3)); // btParser.setSym1(l); break; } // // Rule 94: VariableDeclarator ::= VariableDeclaratorId // case 94: break; // // Rule 95: VariableDeclarator ::= VariableDeclaratorId EQUAL VariableInitializer // case 95: { VarDeclarator a = (VarDeclarator) btParser.getSym(1); Expr b = (Expr) btParser.getSym(3); a.init = b; // btParser.setSym1(a); break; } // // Rule 96: VariableDeclaratorId ::= identifier // case 96: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new VarDeclarator(pos(), a.getIdentifier())); break; } // // Rule 97: VariableDeclaratorId ::= VariableDeclaratorId LBRACKET RBRACKET // case 97: { VarDeclarator a = (VarDeclarator) btParser.getSym(1); a.dims++; // btParser.setSym1(a); break; } // // Rule 98: VariableInitializer ::= Expression // case 98: break; // // Rule 99: VariableInitializer ::= ArrayInitializer // case 99: break; // // Rule 100: FieldModifiers ::= FieldModifier // case 100: break; // // Rule 101: FieldModifiers ::= FieldModifiers FieldModifier // case 101: { Flags a = (Flags) btParser.getSym(1), b = (Flags) btParser.getSym(2); btParser.setSym1(a.set(b)); break; } // // Rule 102: FieldModifier ::= public // case 102: { btParser.setSym1(Flags.PUBLIC); break; } // // Rule 103: FieldModifier ::= protected // case 103: { btParser.setSym1(Flags.PROTECTED); break; } // // Rule 104: FieldModifier ::= private // case 104: { btParser.setSym1(Flags.PRIVATE); break; } // // Rule 105: FieldModifier ::= static // case 105: { btParser.setSym1(Flags.STATIC); break; } // // Rule 106: FieldModifier ::= final // case 106: { btParser.setSym1(Flags.FINAL); break; } // // Rule 107: FieldModifier ::= transient // case 107: { btParser.setSym1(Flags.TRANSIENT); break; } // // Rule 108: FieldModifier ::= volatile // case 108: { btParser.setSym1(Flags.VOLATILE); break; } // // Rule 109: MethodDeclaration ::= MethodHeader MethodBody // case 109: { MethodDecl a = (MethodDecl) btParser.getSym(1); Block b = (Block) btParser.getSym(2); btParser.setSym1(a.body(b)); break; } // // Rule 110: MethodHeader ::= MethodModifiersopt ResultType MethodDeclarator Throwsopt // case 110: { 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!!! } btParser.setSym1(nf.MethodDecl(pos(btParser.getFirstToken(2), btParser.getLastToken(3)), a, array((TypeNode) b, pos(btParser.getFirstToken(2), btParser.getLastToken(2)), e.intValue()), c.toString(), d, f, null)); break; } // // Rule 111: ResultType ::= Type // case 111: break; // // Rule 112: ResultType ::= void // case 112: { btParser.setSym1(nf.CanonicalTypeNode(pos(), ts.Void())); break; } // // Rule 113: MethodDeclarator ::= identifier LPAREN FormalParameterListopt RPAREN // case 113: { 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 114: MethodDeclarator ::= MethodDeclarator LBRACKET RBRACKET // case 114: { Object[] a = (Object []) btParser.getSym(1); a[2] = new Integer(((Integer) a[2]).intValue() + 1); // btParser.setSym1(a); break; } // // Rule 115: FormalParameterList ::= LastFormalParameter // case 115: { List l = new TypedList(new LinkedList(), Formal.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 116: FormalParameterList ::= FormalParameters COMMA LastFormalParameter // case 116: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(3)); // btParser.setSym1(l); break; } // // Rule 117: FormalParameters ::= FormalParameter // case 117: { List l = new TypedList(new LinkedList(), Formal.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 118: FormalParameters ::= FormalParameters COMMA FormalParameter // case 118: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(3)); // btParser.setSym1(l); break; } // // Rule 119: FormalParameter ::= VariableModifiersopt Type VariableDeclaratorId // case 119: { Flags f = (Flags) btParser.getSym(1); TypeNode a = (TypeNode) btParser.getSym(2); VarDeclarator b = (VarDeclarator) btParser.getSym(3); btParser.setSym1(nf.Formal(pos(), f, array(a, pos(btParser.getFirstToken(2), btParser.getLastToken(2)), b.dims), b.name)); break; } // // Rule 121: VariableModifiers ::= VariableModifiers VariableModifier // case 121: { Flags a = (Flags) btParser.getSym(1), b = (Flags) btParser.getSym(2); btParser.setSym1(a.set(b)); break; } // // Rule 122: VariableModifier ::= final // case 122: { btParser.setSym1(Flags.FINAL); break; } // // Rule 123: LastFormalParameter ::= VariableModifiersopt Type ...opt VariableDeclaratorId // case 123: { Flags f = (Flags) btParser.getSym(1); TypeNode a = (TypeNode) btParser.getSym(2); assert(btParser.getSym(3) == null); VarDeclarator b = (VarDeclarator) btParser.getSym(4); btParser.setSym1(nf.Formal(pos(), f, array(a, pos(btParser.getFirstToken(2), btParser.getLastToken(2)), b.dims), b.name)); break; } // // Rule 124: MethodModifiers ::= MethodModifier // case 124: break; // // Rule 125: MethodModifiers ::= MethodModifiers MethodModifier // case 125: { Flags a = (Flags) btParser.getSym(1), b = (Flags) btParser.getSym(2); btParser.setSym1(a.set(b)); break; } // // Rule 126: MethodModifier ::= public // case 126: { btParser.setSym1(Flags.PUBLIC); break; } // // Rule 127: MethodModifier ::= protected // case 127: { btParser.setSym1(Flags.PROTECTED); break; } // // Rule 128: MethodModifier ::= private // case 128: { btParser.setSym1(Flags.PRIVATE); break; } // // Rule 129: MethodModifier ::= abstract // case 129: { btParser.setSym1(Flags.ABSTRACT); break; } // // Rule 130: MethodModifier ::= static // case 130: { btParser.setSym1(Flags.STATIC); break; } // // Rule 131: MethodModifier ::= final // case 131: { btParser.setSym1(Flags.FINAL); break; } // // Rule 132: MethodModifier ::= synchronized // case 132: { btParser.setSym1(Flags.SYNCHRONIZED); break; } // // Rule 133: MethodModifier ::= native // case 133: { btParser.setSym1(Flags.NATIVE); break; } // // Rule 134: MethodModifier ::= strictfp // case 134: { btParser.setSym1(Flags.STRICTFP); break; } // // Rule 135: Throws ::= throws ExceptionTypeList // case 135: { btParser.setSym1(btParser.getSym(2)); break; } // // Rule 136: ExceptionTypeList ::= ExceptionType // case 136: { List l = new TypedList(new LinkedList(), TypeNode.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 137: ExceptionTypeList ::= ExceptionTypeList COMMA ExceptionType // case 137: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(3)); // btParser.setSym1(l); break; } // // Rule 138: ExceptionType ::= ClassType // case 138: break; // // Rule 139: ExceptionType ::= TypeVariable // case 139: break; // // Rule 140: MethodBody ::= Block // case 140: break; // // Rule 141: MethodBody ::= SEMICOLON // 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 LPAREN FormalParameterListopt RPAREN // 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 ::= LBRACE ExplicitConstructorInvocationopt BlockStatementsopt RBRACE // 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 LPAREN ArgumentListopt RPAREN SEMICOLON // 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 LPAREN ArgumentListopt RPAREN SEMICOLON // 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 DOT this LPAREN ArgumentListopt RPAREN SEMICOLON // 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 DOT super LPAREN ArgumentListopt RPAREN SEMICOLON // 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 ::= LBRACE EnumConstantsopt ,opt EnumBodyDeclarationsopt RBRACE // case 158: bad_rule = 158; break; // // Rule 159: EnumConstants ::= EnumConstant // case 159: bad_rule = 159; break; // // Rule 160: EnumConstants ::= EnumConstants COMMA EnumConstant // case 160: bad_rule = 160; break; // // Rule 161: EnumConstant ::= identifier Argumentsopt ClassBodyopt // case 161: bad_rule = 161; break; // // Rule 162: Arguments ::= LPAREN ArgumentListopt RPAREN // case 162: { btParser.setSym1(btParser.getSym(2)); break; } // // Rule 163: EnumBodyDeclarations ::= SEMICOLON 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 COMMA InterfaceType // case 175: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(3)); // btParser.setSym1(l); break; } // // Rule 176: InterfaceBody ::= LBRACE InterfaceMemberDeclarationsopt RBRACE // 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 ::= SEMICOLON // 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();) { VarDeclarator d = (VarDeclarator) i.next(); l.add(nf.FieldDecl(pos(btParser.getFirstToken(2), btParser.getLastToken()), a, 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 SEMICOLON // 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!!! } btParser.setSym1(nf.MethodDecl(pos(btParser.getFirstToken(2), btParser.getLastToken(3)), a, 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 AT interface identifier AnnotationTypeBody // case 195: bad_rule = 195; break; // // Rule 196: AnnotationTypeBody ::= LBRACE AnnotationTypeElementDeclarationsopt RBRACE // 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 LPAREN RPAREN DefaultValueopt SEMICOLON // 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 ::= SEMICOLON // 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 ::= AT TypeName LPAREN ElementValuePairsopt RPAREN // case 212: bad_rule = 212; break; // // Rule 213: ElementValuePairs ::= ElementValuePair // case 213: bad_rule = 213; break; // // Rule 214: ElementValuePairs ::= ElementValuePairs COMMA ElementValuePair // case 214: bad_rule = 214; break; // // Rule 215: ElementValuePair ::= SimpleName EQUAL 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 ::= LBRACE ElementValuesopt ,opt RBRACE // case 220: bad_rule = 220; break; // // Rule 221: ElementValues ::= ElementValue // case 221: bad_rule = 221; break; // // Rule 222: ElementValues ::= ElementValues COMMA ElementValue // case 222: bad_rule = 222; break; // // Rule 223: MarkerAnnotation ::= AT TypeName // case 223: bad_rule = 223; break; // // Rule 224: SingleElementAnnotation ::= AT TypeName LPAREN ElementValue RPAREN // case 224: bad_rule = 224; break; // // Rule 225: ArrayInitializer ::= LBRACE VariableInitializersopt ,opt RBRACE // 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 COMMA VariableInitializer // case 227: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(3)); //btParser.setSym1(l); break; } // // Rule 228: Block ::= LBRACE BlockStatementsopt RBRACE // 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 SEMICOLON // 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); for (Iterator i = b.iterator(); i.hasNext(); ) { VarDeclarator d = (VarDeclarator) i.next(); l.add(nf.LocalDecl(pos(d), flags, array(a, pos(d), d.dims), d.name, d.init)); } 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 LPAREN Expression RPAREN 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 LPAREN Expression RPAREN 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 LPAREN Expression RPAREN 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 ::= SEMICOLON // case 262: { btParser.setSym1(nf.Empty(pos())); break; } // // Rule 263: LabeledStatement ::= identifier COLON 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 COLON 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 SEMICOLON // 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 SEMICOLON // case 273: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Assert(pos(), a)); break; } // // Rule 274: AssertStatement ::= assert Expression COLON Expression SEMICOLON // 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 LPAREN Expression RPAREN 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 ::= LBRACE SwitchBlockStatementGroupsopt SwitchLabelsopt RBRACE // 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 COLON // case 282: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Case(pos(), a)); break; } // // Rule 283: SwitchLabel ::= case EnumConstant COLON // case 283: bad_rule = 283; break; // // Rule 284: SwitchLabel ::= default COLON // case 284: { btParser.setSym1(nf.Default(pos())); break; } // // Rule 285: EnumConstant ::= identifier // case 285: bad_rule = 285; break; // // Rule 286: WhileStatement ::= while LPAREN Expression RPAREN 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 LPAREN Expression RPAREN 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 LPAREN Expression RPAREN SEMICOLON // 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 LPAREN ForInitopt SEMICOLON Expressionopt SEMICOLON ForUpdateopt RPAREN 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 LPAREN ForInitopt SEMICOLON Expressionopt SEMICOLON ForUpdateopt RPAREN 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 COMMA 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 SEMICOLON // 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 SEMICOLON // 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 SEMICOLON // case 300: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Return(pos(), a)); break; } // // Rule 301: ThrowStatement ::= throw Expression SEMICOLON // case 301: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Throw(pos(), a)); break; } // // Rule 302: SynchronizedStatement ::= synchronized LPAREN Expression RPAREN 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 LPAREN FormalParameter RPAREN 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 DOT 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 DOT 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 DOT this // case 315: { Name a = (Name) btParser.getSym(1); btParser.setSym1(nf.This(pos(), a.toType())); break; } // // Rule 316: PrimaryNoNewArray ::= LPAREN Expression RPAREN // 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: { // TODO: remove any prefix (such as 0x) polyglot.lex.IntegerLiteral a = int_lit(btParser.getToken(1), 10); btParser.setSym1(nf.IntLit(pos(), IntLit.INT, a.getValue().intValue())); break; } // // Rule 322: Literal ::= LongLiteral // case 322: { // TODO: remove any suffix (such as L) or prefix (such as 0x) polyglot.lex.LongLiteral a = long_lit(btParser.getToken(1), 10); btParser.setSym1(nf.IntLit(pos(), IntLit.LONG, a.getValue().longValue())); break; } // // Rule 323: Literal ::= FloatingPointLiteral // case 323: { // TODO: remove any suffix (such as F) 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: { // TODO: remove any suffix (such as D) 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 LPAREN ArgumentListopt RPAREN 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 DOT new identifier LPAREN ArgumentListopt RPAREN 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 DOT new identifier LPAREN ArgumentListopt RPAREN 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 COMMA Expression // case 335: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(3)); //btParser.setSym1(l); break; } // // Rule 336: ArrayCreationExpression ::= new PrimitiveType DimExprs Dimsopt // case 336: { CanonicalTypeNode a = (CanonicalTypeNode) btParser.getSym(2); List b = (List) btParser.getSym(3); Integer c = (Integer) btParser.getSym(4); btParser.setSym1(nf.NewArray(pos(), a, b, c.intValue())); break; } // // Rule 337: ArrayCreationExpression ::= new ClassOrInterfaceType DimExprs Dimsopt // case 337: { TypeNode a = (TypeNode) btParser.getSym(2); List b = (List) btParser.getSym(3); Integer c = (Integer) btParser.getSym(4); btParser.setSym1(nf.NewArray(pos(), a, b, c.intValue())); break; } // // Rule 338: ArrayCreationExpression ::= new PrimitiveType Dims ArrayInitializer // case 338: { CanonicalTypeNode a = (CanonicalTypeNode) btParser.getSym(2); Integer b = (Integer) btParser.getSym(3); ArrayInit c = (ArrayInit) btParser.getSym(4); btParser.setSym1(nf.NewArray(pos(), a, b.intValue(), c)); break; } // // Rule 339: ArrayCreationExpression ::= new ClassOrInterfaceType Dims ArrayInitializer // case 339: { TypeNode a = (TypeNode) btParser.getSym(2); Integer b = (Integer) btParser.getSym(3); ArrayInit c = (ArrayInit) btParser.getSym(4); btParser.setSym1(nf.NewArray(pos(), a, b.intValue(), c)); break; } // // Rule 340: DimExprs ::= DimExpr // case 340: { List l = new TypedList(new LinkedList(), Expr.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 341: DimExprs ::= DimExprs DimExpr // case 341: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(2)); //btParser.setSym1(l); break; } // // Rule 342: DimExpr ::= LBRACKET Expression RBRACKET // case 342: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(a.position(pos())); break; } // // Rule 343: Dims ::= LBRACKET RBRACKET // case 343: { btParser.setSym1(new Integer(1)); break; } // // Rule 344: Dims ::= Dims LBRACKET RBRACKET // case 344: { Integer a = (Integer) btParser.getSym(1); btParser.setSym1(new Integer(a.intValue() + 1)); break; } // // Rule 345: FieldAccess ::= Primary DOT identifier // case 345: { Expr a = (Expr) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); btParser.setSym1(nf.Field(pos(), a, b.getIdentifier())); break; } // // Rule 346: FieldAccess ::= super DOT identifier // case 346: { polyglot.lex.Identifier a = id(btParser.getToken(3)); btParser.setSym1(nf.Field(pos(btParser.getLastToken()), nf.Super(pos(btParser.getFirstToken())), a.getIdentifier())); break; } // // Rule 347: FieldAccess ::= ClassName DOT super DOT identifier // case 347: { 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 348: MethodInvocation ::= MethodName LPAREN ArgumentListopt RPAREN // case 348: { 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 349: MethodInvocation ::= Primary DOT identifier LPAREN ArgumentListopt RPAREN // case 349: { 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 350: MethodInvocation ::= super DOT identifier LPAREN ArgumentListopt RPAREN // case 350: {//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 351: MethodInvocation ::= ClassName DOT super DOT identifier LPAREN ArgumentListopt RPAREN // case 351: { 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 352: PostfixExpression ::= Primary // case 352: break; // // Rule 353: PostfixExpression ::= ExpressionName // case 353: { Name a = (Name) btParser.getSym(1); btParser.setSym1(a.toExpr()); break; } // // Rule 354: PostfixExpression ::= PostIncrementExpression // case 354: break; // // Rule 355: PostfixExpression ::= PostDecrementExpression // case 355: break; // // Rule 356: PostIncrementExpression ::= PostfixExpression PLUS_PLUS // case 356: { Expr a = (Expr) btParser.getSym(1); btParser.setSym1(nf.Unary(pos(), a, Unary.POST_INC)); break; } // // Rule 357: PostDecrementExpression ::= PostfixExpression MINUS_MINUS // case 357: { Expr a = (Expr) btParser.getSym(1); btParser.setSym1(nf.Unary(pos(), a, Unary.POST_DEC)); break; } // // Rule 358: UnaryExpression ::= PreIncrementExpression // case 358: break; // // Rule 359: UnaryExpression ::= PreDecrementExpression // case 359: break; // // Rule 360: UnaryExpression ::= PLUS UnaryExpression // case 360: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Unary(pos(), Unary.POS, a)); break; } // // Rule 361: UnaryExpression ::= MINUS UnaryExpression // case 361: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Unary(pos(), Unary.NEG, a)); break; } // // Rule 363: PreIncrementExpression ::= PLUS_PLUS UnaryExpression // case 363: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Unary(pos(), Unary.PRE_INC, a)); break; } // // Rule 364: PreDecrementExpression ::= MINUS_MINUS UnaryExpression // case 364: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Unary(pos(), Unary.PRE_DEC, a)); break; } // // Rule 365: UnaryExpressionNotPlusMinus ::= PostfixExpression // case 365: break; // // Rule 366: UnaryExpressionNotPlusMinus ::= TWIDDLE UnaryExpression // case 366: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Unary(pos(), Unary.BIT_NOT, a)); break; } // // Rule 367: UnaryExpressionNotPlusMinus ::= NOT UnaryExpression // case 367: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Unary(pos(), Unary.NOT, a)); break; } // // Rule 369: MultiplicativeExpression ::= UnaryExpression // case 369: break; // // Rule 370: MultiplicativeExpression ::= MultiplicativeExpression MULTIPLY UnaryExpression // case 370: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.MUL, b)); break; } // // Rule 371: MultiplicativeExpression ::= MultiplicativeExpression DIVIDE UnaryExpression // case 371: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.DIV, b)); break; } // // Rule 372: MultiplicativeExpression ::= MultiplicativeExpression REMAINDER UnaryExpression // case 372: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.MOD, b)); break; } // // Rule 373: AdditiveExpression ::= MultiplicativeExpression // case 373: break; // // Rule 374: AdditiveExpression ::= AdditiveExpression PLUS MultiplicativeExpression // case 374: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.ADD, b)); break; } // // Rule 375: AdditiveExpression ::= AdditiveExpression MINUS MultiplicativeExpression // case 375: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.SUB, b)); break; } // // Rule 376: ShiftExpression ::= AdditiveExpression // case 376: break; // // Rule 377: ShiftExpression ::= ShiftExpression LEFT_SHIFT AdditiveExpression // case 377: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.SHL, b)); break; } // // Rule 378: ShiftExpression ::= ShiftExpression GREATER GREATER AdditiveExpression // case 378: { // 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 379: ShiftExpression ::= ShiftExpression GREATER GREATER GREATER AdditiveExpression // case 379: { // 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 380: RelationalExpression ::= ShiftExpression // case 380: break; // // Rule 381: RelationalExpression ::= RelationalExpression LESS ShiftExpression // case 381: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.LT, b)); break; } // // Rule 382: RelationalExpression ::= RelationalExpression GREATER ShiftExpression // case 382: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.GT, b)); break; } // // Rule 383: RelationalExpression ::= RelationalExpression LESS_EQUAL ShiftExpression // case 383: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.LE, b)); break; } // // Rule 384: RelationalExpression ::= RelationalExpression GREATER EQUAL ShiftExpression // case 384: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(4); btParser.setSym1(nf.Binary(pos(), a, Binary.GE, b)); break; } // // Rule 385: EqualityExpression ::= RelationalExpression // case 385: break; // // Rule 386: EqualityExpression ::= EqualityExpression EQUAL_EQUAL RelationalExpression // case 386: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.EQ, b)); break; } // // Rule 387: EqualityExpression ::= EqualityExpression NOT_EQUAL RelationalExpression // case 387: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.NE, b)); break; } // // Rule 388: AndExpression ::= EqualityExpression // case 388: break; // // Rule 389: AndExpression ::= AndExpression AND EqualityExpression // case 389: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.BIT_AND, b)); break; } // // Rule 390: ExclusiveOrExpression ::= AndExpression // case 390: break; // // Rule 391: ExclusiveOrExpression ::= ExclusiveOrExpression XOR AndExpression // case 391: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.BIT_XOR, b)); break; } // // Rule 392: InclusiveOrExpression ::= ExclusiveOrExpression // case 392: break; // // Rule 393: InclusiveOrExpression ::= InclusiveOrExpression OR ExclusiveOrExpression // case 393: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.BIT_OR, b)); break; } // // Rule 394: ConditionalAndExpression ::= InclusiveOrExpression // case 394: break; // // Rule 395: ConditionalAndExpression ::= ConditionalAndExpression AND_AND InclusiveOrExpression // case 395: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.COND_AND, b)); break; } // // Rule 396: ConditionalOrExpression ::= ConditionalAndExpression // case 396: break; // // Rule 397: ConditionalOrExpression ::= ConditionalOrExpression OR_OR ConditionalAndExpression // case 397: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.COND_OR, b)); break; } // // Rule 398: ConditionalExpression ::= ConditionalOrExpression // case 398: break; // // Rule 399: ConditionalExpression ::= ConditionalOrExpression QUESTION Expression COLON ConditionalExpression // case 399: { 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 400: AssignmentExpression ::= ConditionalExpression // case 400: break; // // Rule 401: AssignmentExpression ::= Assignment // case 401: break; // // Rule 402: Assignment ::= LeftHandSide AssignmentOperator AssignmentExpression // case 402: { 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 403: LeftHandSide ::= ExpressionName // case 403: { Name a = (Name) btParser.getSym(1); btParser.setSym1(a.toExpr()); break; } // // Rule 404: LeftHandSide ::= FieldAccess // case 404: break; // // Rule 405: LeftHandSide ::= ArrayAccess // case 405: break; // // Rule 406: AssignmentOperator ::= EQUAL // case 406: { btParser.setSym1(Assign.ASSIGN); break; } // // Rule 407: AssignmentOperator ::= MULTIPLY_EQUAL // case 407: { btParser.setSym1(Assign.MUL_ASSIGN); break; } // // Rule 408: AssignmentOperator ::= DIVIDE_EQUAL // case 408: { btParser.setSym1(Assign.DIV_ASSIGN); break; } // // Rule 409: AssignmentOperator ::= REMAINDER_EQUAL // case 409: { btParser.setSym1(Assign.MOD_ASSIGN); break; } // // Rule 410: AssignmentOperator ::= PLUS_EQUAL // case 410: { btParser.setSym1(Assign.ADD_ASSIGN); break; } // // Rule 411: AssignmentOperator ::= MINUS_EQUAL // case 411: { btParser.setSym1(Assign.SUB_ASSIGN); break; } // // Rule 412: AssignmentOperator ::= LEFT_SHIFT_EQUAL // case 412: { btParser.setSym1(Assign.SHL_ASSIGN); break; } // // Rule 413: AssignmentOperator ::= GREATER GREATER EQUAL // case 413: { // TODO: make sure that there is no space between the ">" signs btParser.setSym1(Assign.SHR_ASSIGN); break; } // // Rule 414: AssignmentOperator ::= GREATER GREATER GREATER EQUAL // case 414: { // TODO: make sure that there is no space between the ">" signs btParser.setSym1(Assign.USHR_ASSIGN); break; } // // Rule 415: AssignmentOperator ::= AND_EQUAL // case 415: { btParser.setSym1(Assign.BIT_AND_ASSIGN); break; } // // Rule 416: AssignmentOperator ::= XOR_EQUAL // case 416: { btParser.setSym1(Assign.BIT_XOR_ASSIGN); break; } // // Rule 417: AssignmentOperator ::= OR_EQUAL // case 417: { btParser.setSym1(Assign.BIT_OR_ASSIGN); break; } // // Rule 418: Expression ::= AssignmentExpression // case 418: break; // // Rule 419: ConstantExpression ::= Expression // case 419: break; // // Rule 420: Dimsopt ::= // case 420: { btParser.setSym1(new Integer(0)); break; } // // Rule 421: Dimsopt ::= Dims // case 421: break; // // Rule 422: Catchesopt ::= // case 422: { btParser.setSym1(new TypedList(new LinkedList(), Catch.class, false)); break; } // // Rule 423: Catchesopt ::= Catches // case 423: break; // // Rule 424: identifieropt ::= // case 424: btParser.setSym1(null); break; // // Rule 425: identifieropt ::= identifier // case 425: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 426: ForUpdateopt ::= // case 426: { btParser.setSym1(new TypedList(new LinkedList(), ForUpdate.class, false)); break; } // // Rule 427: ForUpdateopt ::= ForUpdate // case 427: break; // // Rule 428: Expressionopt ::= // case 428: btParser.setSym1(null); break; // // Rule 429: Expressionopt ::= Expression // case 429: break; // // Rule 430: ForInitopt ::= // case 430: { btParser.setSym1(new TypedList(new LinkedList(), ForInit.class, false)); break; } // // Rule 431: ForInitopt ::= ForInit // case 431: break; // // Rule 432: SwitchLabelsopt ::= // case 432: { btParser.setSym1(new TypedList(new LinkedList(), Case.class, false)); break; } // // Rule 433: SwitchLabelsopt ::= SwitchLabels // case 433: break; // // Rule 434: SwitchBlockStatementGroupsopt ::= // case 434: { btParser.setSym1(new TypedList(new LinkedList(), SwitchElement.class, false)); break; } // // Rule 435: SwitchBlockStatementGroupsopt ::= SwitchBlockStatementGroups // case 435: break; // // Rule 436: VariableModifiersopt ::= // case 436: { btParser.setSym1(Flags.NONE); break; } // // Rule 437: VariableModifiersopt ::= VariableModifiers // case 437: break; // // Rule 438: VariableInitializersopt ::= // case 438: btParser.setSym1(null); break; // // Rule 439: VariableInitializersopt ::= VariableInitializers // case 439: break; // // Rule 440: ElementValuesopt ::= // case 440: btParser.setSym1(null); break; // // Rule 441: ElementValuesopt ::= ElementValues // case 441: bad_rule = 441; break; // // Rule 442: ElementValuePairsopt ::= // case 442: btParser.setSym1(null); break; // // Rule 443: ElementValuePairsopt ::= ElementValuePairs // case 443: bad_rule = 443; break; // // Rule 444: DefaultValueopt ::= // case 444: btParser.setSym1(null); break; // // Rule 445: DefaultValueopt ::= DefaultValue // case 445: break; // // Rule 446: AnnotationTypeElementDeclarationsopt ::= // case 446: btParser.setSym1(null); break; // // Rule 447: AnnotationTypeElementDeclarationsopt ::= AnnotationTypeElementDeclarations // case 447: bad_rule = 447; break; // // Rule 448: AbstractMethodModifiersopt ::= // case 448: { btParser.setSym1(Flags.NONE); break; } // // Rule 449: AbstractMethodModifiersopt ::= AbstractMethodModifiers // case 449: break; // // Rule 450: ConstantModifiersopt ::= // case 450: { btParser.setSym1(Flags.NONE); break; } // // Rule 451: ConstantModifiersopt ::= ConstantModifiers // case 451: break; // // Rule 452: InterfaceMemberDeclarationsopt ::= // case 452: { btParser.setSym1(new TypedList(new LinkedList(), ClassMember.class, false)); break; } // // Rule 453: InterfaceMemberDeclarationsopt ::= InterfaceMemberDeclarations // case 453: break; // // Rule 454: ExtendsInterfacesopt ::= // case 454: { btParser.setSym1(new TypedList(new LinkedList(), TypeNode.class, false)); break; } // // Rule 455: ExtendsInterfacesopt ::= ExtendsInterfaces // case 455: break; // // Rule 456: InterfaceModifiersopt ::= // case 456: { btParser.setSym1(Flags.NONE); break; } // // Rule 457: InterfaceModifiersopt ::= InterfaceModifiers // case 457: break; // // Rule 458: ClassBodyopt ::= // case 458: btParser.setSym1(null); break; // // Rule 459: ClassBodyopt ::= ClassBody // case 459: break; // // Rule 460: Argumentsopt ::= // case 460: btParser.setSym1(null); break; // // Rule 461: Argumentsopt ::= Arguments // case 461: bad_rule = 461; break; // // Rule 462: EnumBodyDeclarationsopt ::= // case 462: btParser.setSym1(null); break; // // Rule 463: EnumBodyDeclarationsopt ::= EnumBodyDeclarations // case 463: bad_rule = 463; break; // // Rule 464: ,opt ::= // case 464: btParser.setSym1(null); break; // // Rule 465: ,opt ::= COMMA // case 465: break; // // Rule 466: EnumConstantsopt ::= // case 466: btParser.setSym1(null); break; // // Rule 467: EnumConstantsopt ::= EnumConstants // case 467: bad_rule = 467; break; // // Rule 468: ArgumentListopt ::= // case 468: { btParser.setSym1(new TypedList(new LinkedList(), Catch.class, false)); break; } // // Rule 469: ArgumentListopt ::= ArgumentList // case 469: break; // // Rule 470: BlockStatementsopt ::= // case 470: { btParser.setSym1(new TypedList(new LinkedList(), Stmt.class, false)); break; } // // Rule 471: BlockStatementsopt ::= BlockStatements // case 471: break; // // Rule 472: ExplicitConstructorInvocationopt ::= // case 472: btParser.setSym1(null); break; // // Rule 473: ExplicitConstructorInvocationopt ::= ExplicitConstructorInvocation // case 473: break; // // Rule 474: ConstructorModifiersopt ::= // case 474: { btParser.setSym1(Flags.NONE); break; } // // Rule 475: ConstructorModifiersopt ::= ConstructorModifiers // case 475: break; // // Rule 476: ...opt ::= // case 476: btParser.setSym1(null); break; // // Rule 477: ...opt ::= ELLIPSIS // case 477: break; // // Rule 478: FormalParameterListopt ::= // case 478: { btParser.setSym1(new TypedList(new LinkedList(), Formal.class, false)); break; } // // Rule 479: FormalParameterListopt ::= FormalParameterList // case 479: break; // // Rule 480: Throwsopt ::= // case 480: { btParser.setSym1(new TypedList(new LinkedList(), TypeNode.class, false)); break; } // // Rule 481: Throwsopt ::= Throws // case 481: break; // // Rule 482: MethodModifiersopt ::= // case 482: { btParser.setSym1(Flags.NONE); break; } // // Rule 483: MethodModifiersopt ::= MethodModifiers // case 483: break; // // Rule 484: FieldModifiersopt ::= // case 484: { btParser.setSym1(Flags.NONE); break; } // // Rule 485: FieldModifiersopt ::= FieldModifiers // case 485: break; // // Rule 486: ClassBodyDeclarationsopt ::= // case 486: { btParser.setSym1(new TypedList(new LinkedList(), ClassMember.class, false)); break; } // // Rule 487: ClassBodyDeclarationsopt ::= ClassBodyDeclarations // case 487: break; // // Rule 488: Interfacesopt ::= // case 488: { btParser.setSym1(new TypedList(new LinkedList(), TypeNode.class, false)); break; } // // Rule 489: Interfacesopt ::= Interfaces // case 489: break; // // Rule 490: Superopt ::= // case 490: btParser.setSym1(null); break; // // Rule 491: Superopt ::= Super // case 491: break; // // Rule 492: TypeParametersopt ::= // case 492: btParser.setSym1(null); break; // // Rule 493: TypeParametersopt ::= TypeParameters // case 493: break; // // Rule 494: ClassModifiersopt ::= // case 494: { btParser.setSym1(Flags.NONE); break; } // // Rule 495: ClassModifiersopt ::= ClassModifiers // case 495: break; // // Rule 496: Annotationsopt ::= // case 496: btParser.setSym1(null); break; // // Rule 497: Annotationsopt ::= Annotations // case 497: bad_rule = 497; break; // // Rule 498: TypeDeclarationsopt ::= // case 498: { btParser.setSym1(new TypedList(new LinkedList(), TopLevelDecl.class, false)); break; } // // Rule 499: TypeDeclarationsopt ::= TypeDeclarations // case 499: break; // // Rule 500: ImportDeclarationsopt ::= // case 500: { btParser.setSym1(new TypedList(new LinkedList(), Import.class, false)); break; } // // Rule 501: ImportDeclarationsopt ::= ImportDeclarations // case 501: break; // // Rule 502: PackageDeclarationopt ::= // case 502: btParser.setSym1(null); break; // // Rule 503: PackageDeclarationopt ::= PackageDeclaration // case 503: break; // // Rule 504: WildcardBoundsOpt ::= // case 504: btParser.setSym1(null); break; // // Rule 505: WildcardBoundsOpt ::= WildcardBounds // case 505: bad_rule = 505; break; // // Rule 506: AdditionalBoundListopt ::= // case 506: btParser.setSym1(null); break; // // Rule 507: AdditionalBoundListopt ::= AdditionalBoundList // case 507: bad_rule = 507; break; // // Rule 508: TypeBoundopt ::= // case 508: btParser.setSym1(null); break; // // Rule 509: TypeBoundopt ::= TypeBound // case 509: bad_rule = 509; break; // // Rule 510: TypeArgumentsopt ::= // case 510: btParser.setSym1(null); break; // // Rule 511: TypeArgumentsopt ::= TypeArguments // case 511: bad_rule = 511; break; // // Rule 512: Type ::= DataType PlaceTypeSpecifieropt // case 512: { assert(btParser.getSym(2) == null); //btParser.setSym1(); break; } // // Rule 513: Type ::= nullable LESS Type GREATER // case 513: { TypeNode a = (TypeNode) btParser.getSym(3); btParser.setSym1(nf.Nullable(pos(), a)); break; } // // Rule 514: Type ::= future LESS Type GREATER // case 514: { TypeNode a = (TypeNode) btParser.getSym(3); btParser.setSym1(nf.Future(pos(), a)); break; } // // Rule 515: Type ::= boxed LESS Type GREATER // case 515: bad_rule = 515; break; // // Rule 516: Type ::= fun LESS Type COMMA Type GREATER // case 516: bad_rule = 516; break; // // Rule 517: DataType ::= PrimitiveType // case 517: break; // // Rule 518: DataType ::= ClassOrInterfaceType // case 518: break; // // Rule 519: DataType ::= ArrayType // case 519: break; // // Rule 520: PlaceTypeSpecifier ::= AT PlaceType // case 520: bad_rule = 520; break; // // Rule 521: PlaceType ::= place // case 521: bad_rule = 521; break; // // Rule 522: PlaceType ::= activity // case 522: bad_rule = 522; break; // // Rule 523: PlaceType ::= method // case 523: bad_rule = 523; break; // // Rule 524: PlaceType ::= current // case 524: bad_rule = 524; break; // // Rule 525: PlaceType ::= PlaceExpression // case 525: bad_rule = 525; break; // // Rule 526: ClassOrInterfaceType ::= TypeName DepParametersopt // case 526: { Name a = (Name) btParser.getSym(1); TypeNode t = a.toType(); DepParameterExpr b = (DepParameterExpr) btParser.getSym(2); btParser.setSym1(nf.ParametricTypeNode(pos(), t, b)); break; } // // Rule 527: DepParameters ::= LPAREN DepParameterExpr RPAREN // case 527: break; // // Rule 528: DepParameterExpr ::= ArgumentList WhereClauseopt // case 528: { List a = (List) btParser.getSym(1); Expr b = (Expr) btParser.getSym(2); btParser.setSym1(nf.DepParameterExpr(pos(),a,b)); break; } // // Rule 529: DepParameterExpr ::= WhereClause // case 529: { Expr b = (Expr) btParser.getSym(1); btParser.setSym1(nf.DepParameterExpr(pos(), null, b)); break; } // // Rule 530: WhereClause ::= COLON Expression // case 530: break; // // Rule 532: X10ArrayType ::= Type LBRACKET DOT RBRACKET // case 532: { TypeNode a = (TypeNode) btParser.getSym(1); TypeNode t = nf.X10ArrayTypeNode(pos(), a, false, null); System.out.println("Parser parses X10ArrayType Type [.] as |" + t +"|"); btParser.setSym1(t); break; } // // Rule 533: X10ArrayType ::= Type reference LBRACKET DOT RBRACKET // case 533: { TypeNode a = (TypeNode) btParser.getSym(1); btParser.setSym1(nf.X10ArrayTypeNode(pos(), a, false, null)); break; } // // Rule 534: X10ArrayType ::= Type value LBRACKET DOT RBRACKET // case 534: { TypeNode a = (TypeNode) btParser.getSym(1); btParser.setSym1(nf.X10ArrayTypeNode(pos(), a, true, null)); break; } // // Rule 535: X10ArrayType ::= Type LBRACKET DepParameterExpr RBRACKET // case 535: { TypeNode a = (TypeNode) btParser.getSym(1); DepParameterExpr b = (DepParameterExpr) btParser.getSym(2); btParser.setSym1(nf.X10ArrayTypeNode(pos(), a, false, b)); break; } // // Rule 536: X10ArrayType ::= Type reference LBRACKET DepParameterExpr RBRACKET // case 536: { TypeNode a = (TypeNode) btParser.getSym(1); DepParameterExpr b = (DepParameterExpr) btParser.getSym(2); btParser.setSym1(nf.X10ArrayTypeNode(pos(), a, false, b)); break; } // // Rule 537: X10ArrayType ::= Type value LBRACKET DepParameterExpr RBRACKET // case 537: { TypeNode a = (TypeNode) btParser.getSym(1); DepParameterExpr b = (DepParameterExpr) btParser.getSym(2); btParser.setSym1(nf.X10ArrayTypeNode(pos(), a, true, b)); break; } // // Rule 538: ObjectKind ::= value // case 538: bad_rule = 538; break; // // Rule 539: ObjectKind ::= reference // case 539: bad_rule = 539; break; // // Rule 540: MethodModifier ::= atomic // case 540: { btParser.setSym1(Flags.ATOMIC); break; } // // Rule 541: MethodModifier ::= extern // case 541: { btParser.setSym1(Flags.NATIVE); break; } // // Rule 542: ClassDeclaration ::= ValueClassDeclaration // case 542: break; // // Rule 543: ValueClassDeclaration ::= ClassModifiersopt value identifier Superopt Interfacesopt ClassBody // case 543: { 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 544: ValueClassDeclaration ::= ClassModifiersopt value class identifier Superopt Interfacesopt ClassBody // case 544: { 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 545: ArrayCreationExpression ::= new ArrayBaseType LBRACKET Expression RBRACKET // case 545: { TypeNode a = (TypeNode) btParser.getSym(2); Expr c = (Expr) btParser.getSym(4); List l = new TypedList(new LinkedList(), Expr.class, false); l.add(c); btParser.setSym1(nf.NewArray(pos(), a, l)); break; } // // Rule 546: ArrayCreationExpression ::= new ArrayBaseType LBRACKET RBRACKET ArrayInitializer // case 546: { TypeNode a = (TypeNode) btParser.getSym(2); ArrayInit d = (ArrayInit) btParser.getSym(5); // btParser.setSym1(nf.ArrayConstructor(pos(), a, false, null, d)); btParser.setSym1(nf.NewArray(pos(), a, 0, d)); break; } // // Rule 547: ArrayCreationExpression ::= new ArrayBaseType LBRACKET DOT Expression RBRACKET // case 547: { TypeNode a = (TypeNode) btParser.getSym(2); Expr c = (Expr) btParser.getSym(5); System.out.println("parser: Parsed new " + a + " [. " + c + " ]"); btParser.setSym1(nf.ArrayConstructor(pos(), a, false, c, null)); break; } // // Rule 548: ArrayCreationExpression ::= new ArrayBaseType LBRACKET DOT Expression RBRACKET Expression // case 548: { TypeNode a = (TypeNode) btParser.getSym(2); Expr c = (Expr) btParser.getSym(5); Expr d = (Expr) btParser.getSym(7); System.out.println("parser: Parsed new " + a + " [. " + c + " ]" + d); btParser.setSym1(nf.ArrayConstructor(pos(), a, false, c, d)); break; } // // Rule 549: ArrayCreationExpression ::= new ArrayBaseType value LBRACKET DOT Expression RBRACKET // case 549: { TypeNode a = (TypeNode) btParser.getSym(2); Expr c = (Expr) btParser.getSym(6); btParser.setSym1(nf.ArrayConstructor(pos(), a, true, c, null)); break; } // // Rule 550: ArrayCreationExpression ::= new ArrayBaseType value LBRACKET DOT Expression RBRACKET Expression // case 550: { TypeNode a = (TypeNode) btParser.getSym(2); Expr c = (Expr) btParser.getSym(6); Expr d = (Expr) btParser.getSym(8); btParser.setSym1(nf.ArrayConstructor(pos(), a, true, c, d)); break; } // // Rule 551: ArrayBaseType ::= PrimitiveType // case 551: break; // // Rule 552: ArrayBaseType ::= ClassOrInterfaceType // case 552: break; // // Rule 553: ArrayAccess ::= ExpressionName LBRACKET ArgumentList RBRACKET // case 553: { Name e = (Name) btParser.getSym(1); List b = (List) btParser.getSym(3); System.out.println("ArrayAccess parsing:" + b + " size =" + b.size()); 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 554: ArrayAccess ::= PrimaryNoNewArray LBRACKET ArgumentList RBRACKET // case 554: { Expr a = (Expr) btParser.getSym(1); List b = (List) btParser.getSym(3); System.out.println("ArrayAccess parsing:" + b + " size =" + b.size()); if (b.size() == 1) btParser.setSym1(nf.X10ArrayAccess1(pos(), a, (Expr) b.get(0))); else btParser.setSym1(nf.X10ArrayAccess(pos(), a, b)); break; } // // Rule 555: Statement ::= NowStatement // case 555: break; // // Rule 556: Statement ::= ClockedStatement // case 556: break; // // Rule 557: Statement ::= AsyncStatement // case 557: break; // // Rule 558: Statement ::= AtomicStatement // case 558: break; // // Rule 559: Statement ::= WhenStatement // case 559: break; // // Rule 560: Statement ::= ForEachStatement // case 560: break; // // Rule 561: Statement ::= AtEachStatement // case 561: break; // // Rule 562: Statement ::= FinishStatement // case 562: break; // // Rule 563: StatementWithoutTrailingSubstatement ::= NextStatement // case 563: break; // // Rule 564: StatementWithoutTrailingSubstatement ::= AwaitStatement // case 564: break; // // Rule 565: StatementNoShortIf ::= NowStatementNoShortIf // case 565: break; // // Rule 566: StatementNoShortIf ::= ClockedStatementNoShortIf // case 566: break; // // Rule 567: StatementNoShortIf ::= AsyncStatementNoShortIf // case 567: break; // // Rule 568: StatementNoShortIf ::= AtomicStatementNoShortIf // case 568: break; // // Rule 569: StatementNoShortIf ::= WhenStatementNoShortIf // case 569: break; // // Rule 570: StatementNoShortIf ::= ForEachStatementNoShortIf // case 570: break; // // Rule 571: StatementNoShortIf ::= AtEachStatementNoShortIf // case 571: break; // // Rule 572: StatementNoShortIf ::= FinishStatementNoShortIf // case 572: break; // // Rule 573: NowStatement ::= now LPAREN Clock RPAREN Statement // case 573: { Name a = (Name) btParser.getSym(3); Stmt b = (Stmt) btParser.getSym(5); btParser.setSym1(nf.Now(pos(), a.toExpr(), b)); break; } // // Rule 574: ClockedStatement ::= clocked LPAREN ClockList RPAREN Statement // case 574: { List a = (List) btParser.getSym(3); Block b = (Block) btParser.getSym(5); btParser.setSym1(nf.Clocked(pos(), a, b)); break; } // // Rule 575: AsyncStatement ::= async PlaceExpressionSingleListopt Statement // case 575: { 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 576: AsyncStatement ::= async LPAREN here RPAREN Statement // case 576: { Stmt b = (Stmt) btParser.getSym(5); btParser.setSym1(nf.Async(pos(), nf.Here(pos(btParser.getFirstToken())), b)); break; } // // Rule 577: AtomicStatement ::= atomic PlaceExpressionSingleListopt Statement // case 577: { 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 578: AtomicStatement ::= atomic LPAREN here RPAREN Statement // case 578: { Stmt b = (Stmt) btParser.getSym(5); btParser.setSym1(nf.Atomic(pos(), nf.Here(pos(btParser.getFirstToken())), b)); break; } // // Rule 579: WhenStatement ::= when LPAREN Expression RPAREN Statement // case 579: { Expr e = (Expr) btParser.getSym(3); Stmt s = (Stmt) btParser.getSym(5); btParser.setSym1(nf.When(pos(), e,s)); break; } // // Rule 580: WhenStatement ::= WhenStatement or LPAREN Expression RPAREN Statement // case 580: { When w = (When) btParser.getSym(1); Expr e = (Expr) btParser.getSym(4); Stmt s = (Stmt) btParser.getSym(6); w.add(new When_c.Branch_c(e,s)); btParser.setSym1(w); break; } // // Rule 581: ForEachStatement ::= foreach LPAREN FormalParameter COLON Expression RPAREN Statement // case 581: { Formal f = (Formal) btParser.getSym(3); Expr e = (Expr) btParser.getSym(5); Stmt s = (Stmt) btParser.getSym(7); X10Loop x = nf.ForEach(pos(), f, e, s); btParser.setSym1(x); break; } // // Rule 582: AtEachStatement ::= ateach LPAREN FormalParameter COLON Expression RPAREN Statement // case 582: { Formal f = (Formal) btParser.getSym(3); Expr e = (Expr) btParser.getSym(5); Stmt s = (Stmt) btParser.getSym(7); X10Loop x = nf.AtEach(pos(), f, e, s); btParser.setSym1(x); break; } // // Rule 583: EnhancedForStatement ::= for LPAREN FormalParameter COLON Expression RPAREN Statement // case 583: { Formal f = (Formal) btParser.getSym(3); Expr e = (Expr) btParser.getSym(5); Stmt s = (Stmt) btParser.getSym(7); X10Loop x = nf.ForLoop(pos(), f, e, s); btParser.setSym1(x); break; } // // Rule 584: FinishStatement ::= finish Statement // case 584: { Stmt b = (Stmt) btParser.getSym(2); btParser.setSym1(nf.Finish(pos(), b)); break; } // // Rule 585: NowStatementNoShortIf ::= now LPAREN Clock RPAREN StatementNoShortIf // case 585: { Name a = (Name) btParser.getSym(3); Stmt b = (Stmt) btParser.getSym(5); btParser.setSym1(nf.Now(pos(), a.toExpr(), b)); break; } // // Rule 586: ClockedStatementNoShortIf ::= clocked LPAREN ClockList RPAREN StatementNoShortIf // case 586: { List a = (List) btParser.getSym(3); Stmt b = (Stmt) btParser.getSym(5); btParser.setSym1(nf.Clocked(pos(), a, b)); break; } // // Rule 587: AsyncStatementNoShortIf ::= async PlaceExpressionSingleListopt StatementNoShortIf // case 587: { 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 588: AsyncStatementNoShortIf ::= async LPAREN here RPAREN StatementNoShortIf // case 588: { Stmt b = (Stmt) btParser.getSym(5); btParser.setSym1(nf.Async(pos(), nf.Here(pos(btParser.getFirstToken())), b)); break; } // // Rule 589: AtomicStatementNoShortIf ::= atomic StatementNoShortIf // case 589: { 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 590: AtomicStatementNoShortIf ::= atomic LPAREN here RPAREN StatementNoShortIf // case 590: { Stmt b = (Stmt) btParser.getSym(5); btParser.setSym1(nf.Atomic(pos(), nf.Here(pos(btParser.getFirstToken())), b)); break; } // // Rule 591: WhenStatementNoShortIf ::= when LPAREN Expression RPAREN StatementNoShortIf // case 591: { Expr e = (Expr) btParser.getSym(3); Stmt s = (Stmt) btParser.getSym(5); btParser.setSym1(nf.When(pos(), e,s)); break; } // // Rule 592: WhenStatementNoShortIf ::= WhenStatement or LPAREN Expression RPAREN StatementNoShortIf // case 592: { When w = (When) btParser.getSym(1); Expr e = (Expr) btParser.getSym(4); Stmt s = (Stmt) btParser.getSym(6); w.add(new When_c.Branch_c(e,s)); btParser.setSym1(w); break; } // // Rule 593: ForEachStatementNoShortIf ::= foreach LPAREN FormalParameter COLON Expression RPAREN StatementNoShortIf // case 593: { Formal f = (Formal) btParser.getSym(3); Expr e = (Expr) btParser.getSym(5); Stmt s = (Stmt) btParser.getSym(7); X10Loop x = nf.ForEach(pos(), f, e, s); btParser.setSym1(x); break; } // // Rule 594: AtEachStatementNoShortIf ::= ateach LPAREN FormalParameter COLON Expression RPAREN StatementNoShortIf // case 594: { Formal f = (Formal) btParser.getSym(3); Expr e = (Expr) btParser.getSym(5); Stmt s = (Stmt) btParser.getSym(7); X10Loop x = nf.AtEach(pos(), f, e, s); btParser.setSym1(x); break; } // // Rule 595: FinishStatementNoShortIf ::= finish StatementNoShortIf // case 595: { Stmt b = (Stmt) btParser.getSym(2); btParser.setSym1(nf.Finish(pos(), b)); break; } // // Rule 596: PlaceExpressionSingleList ::= LPAREN PlaceExpression RPAREN // case 596: { btParser.setSym1(btParser.getSym(2)); break; } // // Rule 597: PlaceExpression ::= here // case 597: { btParser.setSym1(nf.Here(pos(btParser.getFirstToken()))); break; } // // Rule 598: PlaceExpression ::= this // case 598: { btParser.setSym1(nf.Field(pos(btParser.getFirstToken()), nf.This(pos(btParser.getFirstToken())), "place")); break; } // // Rule 599: PlaceExpression ::= ExpressionName // case 599: { Expr e = (Expr) btParser.getSym(1); btParser.setSym1(nf.Field(pos(btParser.getFirstToken()), e, "place")); break; } // // Rule 600: PlaceExpression ::= ArrayAccess // case 600: bad_rule = 600; break; // // Rule 601: NextStatement ::= next SEMICOLON // case 601: { btParser.setSym1(nf.Next(pos())); break; } // // Rule 602: AwaitStatement ::= await Expression SEMICOLON // case 602: { Expr e = (Expr) btParser.getSym(2); btParser.setSym1(nf.Await(pos(), e)); break; } // // Rule 603: ClockList ::= Clock // case 603: { Name c = (Name) btParser.getSym(1); List l = new TypedList(new LinkedList(), Expr.class, false); l.add(c.toExpr()); btParser.setSym1(l); break; } // // Rule 604: ClockList ::= ClockList COMMA Clock // case 604: { List l = (List) btParser.getSym(1); Name c = (Name) btParser.getSym(3); l.add(c.toExpr()); // btParser.setSym1(l); break; } // // Rule 605: Clock ::= identifier // case 605: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 606: CastExpression ::= LPAREN Type RPAREN UnaryExpressionNotPlusMinus // case 606: { TypeNode a = (TypeNode) btParser.getSym(2); Expr b = (Expr) btParser.getSym(4); btParser.setSym1(nf.Cast(pos(), a, b)); break; } // // Rule 607: MethodInvocation ::= Primary ARROW identifier LPAREN ArgumentListopt RPAREN // case 607: { 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 608: RelationalExpression ::= RelationalExpression instanceof Type // case 608: { Expr a = (Expr) btParser.getSym(1); TypeNode b = (TypeNode) btParser.getSym(3); btParser.setSym1(nf.Instanceof(pos(), a, b)); break; } // // Rule 609: ExpressionName ::= here // case 609: { btParser.setSym1(new Name(nf, ts, pos(), "here"){ public Expr toExpr() { return nf.Here(pos); } }); break; } // // Rule 610: Primary ::= FutureExpression // case 610: break; // // Rule 611: FutureExpression ::= future PlaceExpressionSingleListopt LBRACE Expression RBRACE // case 611: { 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 612: FutureExpression ::= future LPAREN here RPAREN LBRACE Expression RBRACE // case 612: { Expr e2 = (Expr) btParser.getSym(6); btParser.setSym1(nf.Future(pos(), nf.Here(pos(btParser.getFirstToken(3))), e2)); break; } // // Rule 613: FunExpression ::= fun Type LPAREN FormalParameterListopt RPAREN LBRACE Expression RBRACE // case 613: bad_rule = 613; break; // // Rule 614: MethodInvocation ::= MethodName LPAREN ArgumentListopt RPAREN LPAREN ArgumentListopt RPAREN // case 614: bad_rule = 614; break; // // Rule 615: MethodInvocation ::= Primary DOT identifier LPAREN ArgumentListopt RPAREN LPAREN ArgumentListopt RPAREN // case 615: bad_rule = 615; break; // // Rule 616: MethodInvocation ::= super DOT identifier LPAREN ArgumentListopt RPAREN LPAREN ArgumentListopt RPAREN // case 616: bad_rule = 616; break; // // Rule 617: MethodInvocation ::= ClassName DOT super DOT identifier LPAREN ArgumentListopt RPAREN LPAREN ArgumentListopt RPAREN // case 617: bad_rule = 617; break; // // Rule 618: MethodInvocation ::= TypeName DOT identifier LPAREN ArgumentListopt RPAREN LPAREN ArgumentListopt RPAREN // case 618: bad_rule = 618; break; // // Rule 619: ClassInstanceCreationExpression ::= new ClassOrInterfaceType LPAREN ArgumentListopt RPAREN LPAREN ArgumentListopt RPAREN ClassBodyopt // case 619: bad_rule = 619; break; // // Rule 620: ClassInstanceCreationExpression ::= Primary DOT new identifier LPAREN ArgumentListopt RPAREN LPAREN ArgumentListopt RPAREN ClassBodyopt // case 620: bad_rule = 620; break; // // Rule 621: ClassInstanceCreationExpression ::= AmbiguousName DOT new identifier LPAREN ArgumentListopt RPAREN LPAREN ArgumentListopt RPAREN ClassBodyopt // case 621: bad_rule = 621; break; // // Rule 622: PlaceTypeSpecifieropt ::= // case 622: btParser.setSym1(null); break; // // Rule 623: PlaceTypeSpecifieropt ::= PlaceTypeSpecifier // case 623: break; // // Rule 624: DepParametersopt ::= // case 624: btParser.setSym1(null); break; // // Rule 625: DepParametersopt ::= DepParameters // case 625: break; // // Rule 626: WhereClauseopt ::= // case 626: btParser.setSym1(null); break; // // Rule 627: WhereClauseopt ::= WhereClause // case 627: break; // // Rule 628: ObjectKindopt ::= // case 628: btParser.setSym1(null); break; // // Rule 629: ObjectKindopt ::= ObjectKind // case 629: break; // // Rule 630: ArrayInitializeropt ::= // case 630: btParser.setSym1(null); break; // // Rule 631: ArrayInitializeropt ::= ArrayInitializer // case 631: break; // // Rule 632: ConcreteDistributionopt ::= // case 632: btParser.setSym1(null); break; // // Rule 633: ConcreteDistributionopt ::= ConcreteDistribution // case 633: break; // // Rule 634: PlaceExpressionSingleListopt ::= // case 634: btParser.setSym1(null); break; // // Rule 635: PlaceExpressionSingleListopt ::= PlaceExpressionSingleList // case 635: break; // // Rule 636: ArgumentListopt ::= // case 636: btParser.setSym1(null); break; // // Rule 637: ArgumentListopt ::= ArgumentList // case 637: break; // // Rule 638: DepParametersopt ::= // case 638: btParser.setSym1(null); break; // // Rule 639: DepParametersopt ::= DepParameters // case 639: break; default: break; } return; } | 1769 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1769/bb2a94143f433b1bc3a3f14e9063a6f9ed4a0262/X10Parser.java/clean/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,
... |
public final String externalizedMessage( String sChartKey ) { // The key can be either alone, or with its default value: "key=defaultvalue" /* Possible cases: chartkey lookup badkey nolookup ------------------------------------- a=b get(a) b b b get(b) b b =b b - b */ String sKey = sChartKey; String sDefaultValue = sChartKey; final int iKeySeparator = sChartKey.indexOf( IMessageLookup.KEY_SEPARATOR ); if ( iKeySeparator != -1 ) { // VALUE ON RHS OF IMessageLookup.KEY_SEPARATOR sDefaultValue = sChartKey.substring( iKeySeparator + 1 ); } if ( iml == null ) { // no lookup cases return sDefaultValue; } else { // lookup cases if ( iKeySeparator > 0 ) { // a=b case sKey = sChartKey.substring( 0, iKeySeparator ); } else if ( iKeySeparator == 0) { // =b case return sDefaultValue; } else { // b case sKey = sDefaultValue; } String localizedValue = iml.getMessageValue( sKey, getLocale() ); if ( localizedValue == null || localizedValue.equals( "" ) ) //$NON-NLS-1$ return sDefaultValue; else return localizedValue; } } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/536b54a46b25aa99e427a2fbd8217e09108c905a/RunTimeContext.java/clean/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/factory/RunTimeContext.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
514,
3903,
1235,
1079,
12,
514,
272,
7984,
653,
262,
202,
95,
202,
202,
759,
1021,
498,
848,
506,
3344,
24068,
16,
578,
598,
2097,
805,
460,
30,
315,
856,
33,
1886,
113... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
514,
3903,
1235,
1079,
12,
514,
272,
7984,
653,
262,
202,
95,
202,
202,
759,
1021,
498,
848,
506,
3344,
24068,
16,
578,
598,
2097,
805,
460,
30,
315,
856,
33,
1886,
113... | ||
.add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(headerOneLabel) .add(headerOneField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(headerTwoLabel) .add(headerTwoField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addContainerGap(240, Short.MAX_VALUE)) ); jTabbedPane1.addTab("tab3", jPanel5); | .add(jPanel6, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addContainerGap(160, Short.MAX_VALUE)) ); jTabbedPane1.addTab(L10n.getString("Settings.SchedaTab"), jPanel5); | private void initComponents() { languagesButtonGroup = new javax.swing.ButtonGroup(); jTabbedPane1 = new javax.swing.JTabbedPane(); jPanel1 = new javax.swing.JPanel(); jPanel2 = new javax.swing.JPanel(); englishRadioButton = new javax.swing.JRadioButton(); czechRadioButton = new javax.swing.JRadioButton(); defaultRadioButton = new javax.swing.JRadioButton(); jPanel3 = new javax.swing.JPanel(); jPanel4 = new javax.swing.JPanel(); jScrollPane1 = new javax.swing.JScrollPane(); availableList = new JList(new DefaultListModel()); jScrollPane2 = new javax.swing.JScrollPane(); selectedList = new JList(new DefaultListModel()); availableLabel = new javax.swing.JLabel(); selectedLabel = new javax.swing.JLabel(); addButton = new javax.swing.JButton(); removeButton = new javax.swing.JButton(); upButton = new javax.swing.JButton(); downButton = new javax.swing.JButton(); jPanel5 = new javax.swing.JPanel(); headerOneLabel = new javax.swing.JLabel(); headerTwoLabel = new javax.swing.JLabel(); headerOneField = new javax.swing.JTextField(); headerTwoField = new javax.swing.JTextField(); cancelButton = new javax.swing.JButton(); okButton = new javax.swing.JButton(); helpButton = new javax.swing.JButton(); jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(L10n.getString("Settings.LanguagePanel"))); languagesButtonGroup.add(englishRadioButton); englishRadioButton.setText("English"); englishRadioButton.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); englishRadioButton.setMargin(new java.awt.Insets(0, 0, 0, 0)); englishRadioButton.setActionCommand("ENGLISH"); languagesButtonGroup.add(czechRadioButton); czechRadioButton.setText("Czech"); czechRadioButton.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); czechRadioButton.setMargin(new java.awt.Insets(0, 0, 0, 0)); czechRadioButton.setActionCommand("CZECH"); languagesButtonGroup.add(defaultRadioButton); defaultRadioButton.setText("Default"); defaultRadioButton.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); defaultRadioButton.setMargin(new java.awt.Insets(0, 0, 0, 0)); defaultRadioButton.setActionCommand("DEFAULT"); org.jdesktop.layout.GroupLayout jPanel2Layout = new org.jdesktop.layout.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup( jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel2Layout.createSequentialGroup() .addContainerGap() .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(englishRadioButton) .add(czechRadioButton) .add(defaultRadioButton)) .addContainerGap(473, Short.MAX_VALUE)) ); jPanel2Layout.setVerticalGroup( jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel2Layout.createSequentialGroup() .addContainerGap() .add(englishRadioButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(czechRadioButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(defaultRadioButton) .addContainerGap(47, Short.MAX_VALUE)) ); org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel1Layout.createSequentialGroup() .addContainerGap() .add(jPanel2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap()) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel1Layout.createSequentialGroup() .addContainerGap() .add(jPanel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addContainerGap(146, Short.MAX_VALUE)) ); jTabbedPane1.addTab("tab1", jPanel1); jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder(L10n.getString("Settings.Columns"))); jScrollPane1.setViewportView(availableList); selectedList.setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION); jScrollPane2.setViewportView(selectedList); availableLabel.setText("Available:"); selectedLabel.setText("Displayed:"); addButton.setText("Add"); addButton.setActionCommand("ADD"); removeButton.setText("Remove"); removeButton.setActionCommand("REMOVE"); upButton.setText("Up"); upButton.setActionCommand("UP"); upButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { upButtonActionPerformed(evt); } }); downButton.setText("Down"); downButton.setActionCommand("DOWN"); org.jdesktop.layout.GroupLayout jPanel4Layout = new org.jdesktop.layout.GroupLayout(jPanel4); jPanel4.setLayout(jPanel4Layout); jPanel4Layout.setHorizontalGroup( jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel4Layout.createSequentialGroup() .addContainerGap() .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel4Layout.createSequentialGroup() .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 156, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(21, 21, 21) .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(addButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 80, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(removeButton))) .add(availableLabel)) .add(21, 21, 21) .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(jPanel4Layout.createSequentialGroup() .add(selectedLabel) .add(243, 243, 243)) .add(org.jdesktop.layout.GroupLayout.LEADING, jPanel4Layout.createSequentialGroup() .add(jScrollPane2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 136, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(19, 19, 19) .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(upButton) .add(downButton)) .add(45, 45, 45)))) ); jPanel4Layout.linkSize(new java.awt.Component[] {addButton, removeButton}, org.jdesktop.layout.GroupLayout.HORIZONTAL); jPanel4Layout.linkSize(new java.awt.Component[] {downButton, upButton}, org.jdesktop.layout.GroupLayout.HORIZONTAL); jPanel4Layout.linkSize(new java.awt.Component[] {jScrollPane1, jScrollPane2}, org.jdesktop.layout.GroupLayout.HORIZONTAL); jPanel4Layout.setVerticalGroup( jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel4Layout.createSequentialGroup() .addContainerGap() .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(jPanel4Layout.createSequentialGroup() .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(availableLabel) .add(selectedLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false) .add(org.jdesktop.layout.GroupLayout.LEADING, jScrollPane2) .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 194, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))) .add(jPanel4Layout.createSequentialGroup() .add(upButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(downButton) .add(17, 17, 17) .add(addButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(removeButton))) .addContainerGap()) ); org.jdesktop.layout.GroupLayout jPanel3Layout = new org.jdesktop.layout.GroupLayout(jPanel3); jPanel3.setLayout(jPanel3Layout); jPanel3Layout.setHorizontalGroup( jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel3Layout.createSequentialGroup() .addContainerGap() .add(jPanel4, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 558, Short.MAX_VALUE) .addContainerGap()) ); jPanel3Layout.setVerticalGroup( jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel3Layout.createSequentialGroup() .addContainerGap() .add(jPanel4, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 272, Short.MAX_VALUE) .addContainerGap()) ); jTabbedPane1.addTab("tab2", jPanel3); headerOneLabel.setText("Header one:"); headerTwoLabel.setText("Header two:"); headerOneField.setName("HEADER_ONE"); headerTwoField.setName("HEADER_TWO"); org.jdesktop.layout.GroupLayout jPanel5Layout = new org.jdesktop.layout.GroupLayout(jPanel5); jPanel5.setLayout(jPanel5Layout); jPanel5Layout.setHorizontalGroup( jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel5Layout.createSequentialGroup() .addContainerGap() .add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel5Layout.createSequentialGroup() .add(headerOneLabel) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(headerOneField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 473, Short.MAX_VALUE)) .add(jPanel5Layout.createSequentialGroup() .add(headerTwoLabel) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(headerTwoField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 472, Short.MAX_VALUE))) .addContainerGap()) ); jPanel5Layout.setVerticalGroup( jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel5Layout.createSequentialGroup() .addContainerGap() .add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(headerOneLabel) .add(headerOneField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(headerTwoLabel) .add(headerTwoField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addContainerGap(240, Short.MAX_VALUE)) ); jTabbedPane1.addTab("tab3", jPanel5); cancelButton.setText("Cancel"); cancelButton.setActionCommand("CANCEL"); okButton.setText("Ok"); okButton.setActionCommand("OK"); helpButton.setText("Help"); helpButton.setActionCommand("HELP"); org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup() .addContainerGap() .add(helpButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 332, Short.MAX_VALUE) .add(cancelButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(okButton) .addContainerGap()) .add(jTabbedPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 587, Short.MAX_VALUE) ); layout.linkSize(new java.awt.Component[] {cancelButton, helpButton, okButton}, org.jdesktop.layout.GroupLayout.HORIZONTAL); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup() .add(jTabbedPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 323, Short.MAX_VALUE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(helpButton) .add(okButton) .add(cancelButton)) .addContainerGap()) ); pack(); }// </editor-fold>//GEN-END:initComponents | 57211 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57211/eaafb6874ea900a9290f803ef2c0f42fe83af3ce/SettingsView.java/buggy/trunk/src/net/sf/plantlore/client/SettingsView.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1208,
7171,
1435,
288,
3639,
8191,
3616,
1114,
273,
394,
6863,
18,
5328,
310,
18,
3616,
1114,
5621,
3639,
525,
5661,
2992,
8485,
21,
273,
394,
6863,
18,
5328,
310,
18,
46,
56... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1208,
7171,
1435,
288,
3639,
8191,
3616,
1114,
273,
394,
6863,
18,
5328,
310,
18,
3616,
1114,
5621,
3639,
525,
5661,
2992,
8485,
21,
273,
394,
6863,
18,
5328,
310,
18,
46,
56... |
if (title != null) { | if (title != null && title.length() > 0) { | public byte[] toPDF() { ByteArrayOutputStream bout = new ByteArrayOutputStream(128); try { bout.write(encode(getObjectID())); bout.write(encode("<<\n")); if (title != null) { bout.write(encode("/Title ")); bout.write(encodeText(this.title)); bout.write(encode("\n")); } if (author != null) { bout.write(encode("/Author ")); bout.write(encodeText(this.author)); bout.write(encode("\n")); } if (subject != null) { bout.write(encode("/Subject ")); bout.write(encodeText(this.subject)); bout.write(encode("\n")); } if (keywords != null) { bout.write(encode("/Keywords ")); bout.write(encodeText(this.keywords)); bout.write(encode("\n")); } if (creator != null) { bout.write(encode("/Creator ")); bout.write(encodeText(this.creator)); bout.write(encode("\n")); } bout.write(encode("/Producer ")); bout.write(encodeText(this.producer)); bout.write(encode("\n")); // creation date in form (D:YYYYMMDDHHmmSSOHH'mm') if (creationDate == null) { creationDate = new Date(); } bout.write(encode("/CreationDate ")); bout.write(encodeString(formatDateTime(creationDate))); bout.write(encode("\n>>\nendobj\n")); } catch (IOException ioe) { log.error("Ignored I/O exception", ioe); } return bout.toByteArray(); } | 5268 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5268/cbc3059c396fb572727bcb6afbdd70b8967107f1/PDFInfo.java/clean/src/java/org/apache/fop/pdf/PDFInfo.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1160,
8526,
358,
17508,
1435,
288,
3639,
11559,
31095,
273,
394,
11559,
12,
10392,
1769,
3639,
775,
288,
5411,
31095,
18,
2626,
12,
3015,
12,
588,
22359,
1435,
10019,
5411,
31095,
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,
1160,
8526,
358,
17508,
1435,
288,
3639,
11559,
31095,
273,
394,
11559,
12,
10392,
1769,
3639,
775,
288,
5411,
31095,
18,
2626,
12,
3015,
12,
588,
22359,
1435,
10019,
5411,
31095,
18,... |
tradable_specification.set_main_data(main_dataset); | tradable_specification.set_data(main_dataset); | public void send_data_request(String tradable) { DrawableDataSet dataset, main_dataset; MA_Configuration conf = MA_Configuration.application_instance(); turn_off_refresh(); // Prevent auto-refresh conflicts. int count; String current_indicator; try { if (period_type_change || ! tradable.equals(current_tradable())) { // Redraw the data. if (individual_period_type_sets && ! tradable.equals(current_tradable())) { facilities.reset_period_types(tradable, false); } GUI_Utilities.busy_cursor(true, this); try { data_builder.send_market_data_request(tradable, current_period_type()); if (request_result_id() == Ok) { // Ensure that the indicator list is up-to-date with // respect to `tradable'. data_builder.send_indicator_list_request(tradable, current_period_type()); // Force re-creation indicator lists with the result // of the above request. new_indicators = true; rebuild_indicators_if_needed(); } else {//!!!!Refactor if possible: // Handle request error. if (request_result_id() == Invalid_symbol) { handle_nonexistent_sybmol(tradable); } else if (request_result_id() == Invalid_period_type) { facilities.handle_invalid_period_type(tradable); individual_period_type_sets = true; } else if (request_result_id() == Warning || request_result_id() == Error) { display_warning("Error occurred retrieving " + "data for " + tradable); }//end Refactor GUI_Utilities.busy_cursor(false, this); return; } } catch (Exception e) { facilities.fatal("Request to server failed: ", e); } //Ensure that all graph's data sets are removed.//!!!!Refactor: main_pane.clear_main_graph(); main_pane.clear_indicator_graph(); main_dataset = (DrawableDataSet) data_builder.last_market_data(); latest_date_time = data_builder.last_latest_date_time(); link_with_axis(main_dataset, null); main_pane.add_main_data_set(main_dataset); tradable_specification.set_main_data(main_dataset);//end Refactor if (! current_upper_indicators.isEmpty()) { // Retrieve the data for the newly requested tradable for // the upper indicators, add it to the upper graph and // draw the new indicator data and the tradable data. count = current_upper_indicators.size(); for (int i = 0; i < count; ++i) { current_indicator = (String) current_upper_indicators.elementAt(i); try { data_builder.send_indicator_data_request( indicator_id_for(current_indicator), tradable, current_period_type()); } catch (Exception e) { facilities.fatal("Exception occurred", e); }//!!!!Refactor: dataset = (DrawableDataSet) data_builder.last_indicator_data(); dataset.set_dates_needed(false); dataset.setColor( conf.indicator_color(current_indicator, true)); link_with_axis(dataset, current_indicator); main_pane.add_main_data_set(dataset); tradable_specification.set_indicator_data(dataset, current_indicator);//end Refactor } } set_current_tradable(tradable); set_window_title(); if (! current_lower_indicators.isEmpty()) { // Retrieve the indicator data for the newly requested // tradable for the lower indicators and draw it. count = current_lower_indicators.size(); for (int i = 0; i < count; ++i) { current_indicator = (String) current_lower_indicators.elementAt(i); if (current_lower_indicators.elementAt(i).equals( Volume)) { // (Nothing to retrieve from server) dataset = (DrawableDataSet) data_builder.last_volume(); } else if (current_lower_indicators.elementAt(i).equals( Open_interest)) { // (Nothing to retrieve from server) dataset = (DrawableDataSet) data_builder.last_open_interest(); } else { try { data_builder.send_indicator_data_request( indicator_id_for(current_indicator), tradable, current_period_type()); } catch (Exception e) { facilities.fatal("Exception occurred", e); } dataset = (DrawableDataSet) data_builder.last_indicator_data(); } if (dataset != null) {//!!!!Refactor: dataset.setColor(conf.indicator_color( current_indicator, false)); link_with_axis(dataset, current_indicator); add_indicator_lines(dataset, current_indicator); main_pane.add_indicator_data_set(dataset); tradable_specification.set_indicator_data(dataset, current_indicator);//end Refactor } } } main_pane.repaint_graphs(); GUI_Utilities.busy_cursor(false, this); period_type_change = false; } } finally { turn_on_refresh(); } } | 13245 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13245/48515131c4aa58427e291bfe1c546162f299a1d4/Chart.java/clean/src/clients/mas_gui/Chart.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1366,
67,
892,
67,
2293,
12,
780,
1284,
17394,
13,
288,
202,
202,
16149,
13676,
3709,
16,
2774,
67,
8682,
31,
202,
202,
5535,
67,
1750,
2195,
273,
19316,
67,
1750,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1366,
67,
892,
67,
2293,
12,
780,
1284,
17394,
13,
288,
202,
202,
16149,
13676,
3709,
16,
2774,
67,
8682,
31,
202,
202,
5535,
67,
1750,
2195,
273,
19316,
67,
1750,
18,
... |
public INode newline_node(INode node, ISourcePosition iPosition) { if (node != null) { return new NewlineNode(iPosition, node); } else { return null; } | public INode newline_node(INode node, ISourcePosition position) { return node == null ? null : new NewlineNode(position, node); | public INode newline_node(INode node, ISourcePosition iPosition) { if (node != null) { return new NewlineNode(iPosition, node); } else { return null; } } | 46454 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46454/f5c9a1ebd775712f2dc086acfce1a14a123ec632/ParserSupport.java/clean/src/org/jruby/parser/ParserSupport.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
21176,
9472,
67,
2159,
12,
23184,
756,
16,
467,
1830,
2555,
277,
2555,
13,
288,
3639,
309,
261,
2159,
480,
446,
13,
288,
1082,
202,
2463,
394,
1166,
1369,
907,
12,
77,
2555,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
21176,
9472,
67,
2159,
12,
23184,
756,
16,
467,
1830,
2555,
277,
2555,
13,
288,
3639,
309,
261,
2159,
480,
446,
13,
288,
1082,
202,
2463,
394,
1166,
1369,
907,
12,
77,
2555,
16,
... |
else if ((_tokenSet_0.member(LA(1)))) { | else if ((_tokenSet_1.member(LA(1)))) { | public final void stepExpr() throws RecognitionException, TokenStreamException { returnAST = null; ASTPair currentAST = new ASTPair(); AST stepExpr_AST = null; boolean synPredMatched39 = false; if (((_tokenSet_0.member(LA(1))))) { int _m39 = mark(); synPredMatched39 = true; inputState.guessing++; try { { { switch ( LA(1)) { case LITERAL_text: { match(LITERAL_text); break; } case LITERAL_node: { match(LITERAL_node); break; } default: { throw new NoViableAltException(LT(1), getFilename()); } } } match(LPAREN); } } catch (RecognitionException pe) { synPredMatched39 = false; } rewind(_m39); inputState.guessing--; } if ( synPredMatched39 ) { axisStep(); astFactory.addASTChild(currentAST, returnAST); stepExpr_AST = (AST)currentAST.root; } else { boolean synPredMatched42 = false; if (((_tokenSet_1.member(LA(1))))) { int _m42 = mark(); synPredMatched42 = true; inputState.guessing++; try { { switch ( LA(1)) { case NCNAME: case LITERAL_or: case LITERAL_and: case LITERAL_div: case LITERAL_mod: case LITERAL_text: case LITERAL_node: case LITERAL_child: case LITERAL_self: case LITERAL_attribute: case LITERAL_descendant: case 51: case 52: case LITERAL_parent: case LITERAL_ancestor: case 55: case 56: { { qName(); match(LPAREN); } break; } case SELF: { match(SELF); break; } case LPAREN: { match(LPAREN); break; } case STRING_LITERAL: case DOUBLE_LITERAL: case DECIMAL_LITERAL: case INTEGER_LITERAL: { literal(); break; } default: { throw new NoViableAltException(LT(1), getFilename()); } } } } catch (RecognitionException pe) { synPredMatched42 = false; } rewind(_m42); inputState.guessing--; } if ( synPredMatched42 ) { filterStep(); astFactory.addASTChild(currentAST, returnAST); stepExpr_AST = (AST)currentAST.root; } else if ((_tokenSet_0.member(LA(1)))) { axisStep(); astFactory.addASTChild(currentAST, returnAST); stepExpr_AST = (AST)currentAST.root; } else { throw new NoViableAltException(LT(1), getFilename()); } } returnAST = stepExpr_AST; } | 2909 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2909/ad9d55f515de2cb1fa50cf09c9e42150efc8374f/XPathParser2.java/buggy/src/org/exist/parser/XPathParser2.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
2235,
4742,
1435,
1216,
9539,
16,
3155,
1228,
503,
288,
9506,
202,
2463,
9053,
273,
446,
31,
202,
202,
9053,
4154,
783,
9053,
273,
394,
9183,
4154,
5621,
202,
202,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2235,
4742,
1435,
1216,
9539,
16,
3155,
1228,
503,
288,
9506,
202,
2463,
9053,
273,
446,
31,
202,
202,
9053,
4154,
783,
9053,
273,
394,
9183,
4154,
5621,
202,
202,
9... |
if ((seen == INVOKENONVIRTUAL) && getMethodSig().equals(getSigConstantOperand())) { | if ((seen == INVOKENONVIRTUAL) && getMethodName().equals(getNameConstantOperand()) && getMethodSig().equals(getSigConstantOperand())) { | public void sawOpcode(int seen) { switch (state) { case SEEN_NOTHING: if (seen == ALOAD_0) { argTypes = Type.getArgumentTypes(this.getMethodSig()); curParm = 0; curParmOffset = 1; if (argTypes.length > 0) state = SEEN_PARM; else state = SEEN_LAST_PARM; } else state = SEEN_INVALID; break; case SEEN_PARM: if (curParm >= argTypes.length) state = SEEN_INVALID; else { String signature = argTypes[curParm++].getSignature(); char typeChar0 = signature.charAt(0); if ((typeChar0 == 'L') || (typeChar0 == '[')) { checkParm(seen, ALOAD_0, ALOAD, 1); } else if (typeChar0 == 'D') { checkParm(seen, DLOAD_0, DLOAD, 2); } else if (typeChar0 == 'F') { checkParm(seen, FLOAD_0, FLOAD, 1); } else if (typeChar0 == 'I') { checkParm(seen, ILOAD_0, ILOAD, 1); } else if (typeChar0 == 'J') { checkParm(seen, LLOAD_0, LLOAD, 2); } if ((state != SEEN_INVALID) && (curParm >= argTypes.length)) state = SEEN_LAST_PARM; } break; case SEEN_LAST_PARM: if ((seen == INVOKENONVIRTUAL) && getMethodSig().equals(getSigConstantOperand())) { invokePC = getPC(); state = SEEN_INVOKE; } else state = SEEN_INVALID; break; case SEEN_INVOKE: Type returnType = getMethod().getReturnType(); char retSigChar0 = returnType.getSignature().charAt(0); if ((retSigChar0 == 'V') && (seen == RETURN)) state = SEEN_RETURN; else if (((retSigChar0 == 'L') || (retSigChar0 == '[')) && (seen == ARETURN)) state = SEEN_RETURN; else if ((retSigChar0 == 'D') && (seen == DRETURN)) state = SEEN_RETURN; else if ((retSigChar0 == 'F') && (seen == FRETURN)) state = SEEN_RETURN; else if ((retSigChar0 == 'I') && (seen == IRETURN)) state = SEEN_RETURN; else if ((retSigChar0 == 'J') && (seen == LRETURN)) state = SEEN_RETURN; else state = SEEN_INVALID; break; case SEEN_RETURN: state = SEEN_INVALID; break; } } | 10715 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10715/62ca49d117584e1039672e38e41ad58967e7d27d/UselessSubclassMethod.java/clean/findbugs/src/java/edu/umd/cs/findbugs/detect/UselessSubclassMethod.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
19821,
22808,
12,
474,
5881,
13,
288,
202,
202,
9610,
261,
2019,
13,
288,
1082,
202,
3593,
3174,
1157,
67,
4400,
44,
1360,
30,
9506,
202,
430,
261,
15156,
422,
432,
7783,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
19821,
22808,
12,
474,
5881,
13,
288,
202,
202,
9610,
261,
2019,
13,
288,
1082,
202,
3593,
3174,
1157,
67,
4400,
44,
1360,
30,
9506,
202,
430,
261,
15156,
422,
432,
7783,... |
if( j <= ( lo + h - 1 ) ) | if( j <= ( lo + h - 1 ) ) { | private void simpleSort( int lo, int hi, int d ) { int i; int j; int h; int bigN; int hp; int v; bigN = hi - lo + 1; if( bigN < 2 ) return; hp = 0; while( incs[ hp ] < bigN ) hp++; hp--; for( ; hp >= 0; hp-- ) { h = incs[ hp ]; i = lo + h; while( true ) { /* * copy 1 */ if( i > hi ) break; v = zptr[ i ]; j = i; while( fullGtU( zptr[ j - h ] + d, v + d ) ) { zptr[ j ] = zptr[ j - h ]; j = j - h; if( j <= ( lo + h - 1 ) ) break; } zptr[ j ] = v; i++; /* * copy 2 */ if( i > hi ) break; v = zptr[ i ]; j = i; while( fullGtU( zptr[ j - h ] + d, v + d ) ) { zptr[ j ] = zptr[ j - h ]; j = j - h; if( j <= ( lo + h - 1 ) ) break; } zptr[ j ] = v; i++; /* * copy 3 */ if( i > hi ) break; v = zptr[ i ]; j = i; while( fullGtU( zptr[ j - h ] + d, v + d ) ) { zptr[ j ] = zptr[ j - h ]; j = j - h; if( j <= ( lo + h - 1 ) ) break; } zptr[ j ] = v; i++; if( workDone > workLimit && firstAttempt ) return; } } } | 639 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/639/8ce1de2178a0422105fa437c327b49fb5637ff28/CBZip2OutputStream.java/buggy/proposal/myrmidon/src/java/org/apache/aut/bzip2/CBZip2OutputStream.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
4143,
4416,
12,
509,
437,
16,
509,
10118,
16,
509,
302,
262,
565,
288,
3639,
509,
277,
31,
3639,
509,
525,
31,
3639,
509,
366,
31,
3639,
509,
5446,
50,
31,
3639,
509,
16460... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4143,
4416,
12,
509,
437,
16,
509,
10118,
16,
509,
302,
262,
565,
288,
3639,
509,
277,
31,
3639,
509,
525,
31,
3639,
509,
366,
31,
3639,
509,
5446,
50,
31,
3639,
509,
16460... |
case 54: break; case 17: | case 58: break; case 18: | public Yytoken yylex() throws java.io.IOException { int zzInput; int zzAction; // cached fields: int zzCurrentPosL; int zzMarkedPosL; int zzEndReadL = zzEndRead; char [] zzBufferL = zzBuffer; char [] zzCMapL = ZZ_CMAP; int [] zzTransL = ZZ_TRANS; int [] zzRowMapL = ZZ_ROWMAP; int [] zzAttrL = ZZ_ATTRIBUTE; while (true) { zzMarkedPosL = zzMarkedPos; zzAction = -1; zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL; zzState = zzLexicalState; zzForAction: { while (true) { if (zzCurrentPosL < zzEndReadL) zzInput = zzBufferL[zzCurrentPosL++]; else if (zzAtEOF) { zzInput = YYEOF; break zzForAction; } else { // store back cached positions zzCurrentPos = zzCurrentPosL; zzMarkedPos = zzMarkedPosL; boolean eof = zzRefill(); // get translated positions and possibly new buffer zzCurrentPosL = zzCurrentPos; zzMarkedPosL = zzMarkedPos; zzBufferL = zzBuffer; zzEndReadL = zzEndRead; if (eof) { zzInput = YYEOF; break zzForAction; } else { zzInput = zzBufferL[zzCurrentPosL++]; } } int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput] ]; if (zzNext == -1) break zzForAction; zzState = zzNext; int zzAttributes = zzAttrL[zzState]; if ( (zzAttributes & 1) == 1 ) { zzAction = zzState; zzMarkedPosL = zzCurrentPosL; if ( (zzAttributes & 8) == 8 ) break zzForAction; } } } // store back cached position zzMarkedPos = zzMarkedPosL; switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) { case 23: { // This is horrible. However it seems that there is no other way to do it with either jflex or CUP, as {URL} cannot be an unambiguous token :( String s = yytext(); if(debug) log("Recognized URL: "+s); DecodedStringThingy dst = new DecodedStringThingy(s); if(!dst.url) { throw new IllegalStateException("parsing url().. isn't a url()"); } if(dst.suffix.length() > 0) { yypushback(dst.suffix.length()); dst.suffix = ""; } s = dst.data; if(debug) log("URL now: "+s); try { s = processURL(s); dst.data = s; if(s == null || s.equals("")) { if(debug) log("URL invalid"); w.write("url()"); } else { s = dst.toString(); if(debug) log("Writing: "+s); w.write(s); } } catch (CommentException e) { w.write("/* "+commentEncode(e.getMessage())+" */"); } } case 31: break; case 18: { String s = yytext(); w.write(s); if(debug) log("Matched unicode: "+s); } case 32: break; case 8: { String s = yytext(); w.write(s); if(debug) log("Matched close braces: "+s); } case 33: break; case 22: { String s = yytext(); w.write(s); if(debug) log("Matched HTML comment: "+s); } case 34: break; case 16: { String s = yytext(); w.write(s); if(debug) log("Matched ~=: "+s); } case 35: break; case 12: { String s = yytext(); if(debug) log("Matched string: "+s); if(paranoidStringCheck && s.indexOf(':') != -1) { w.write("/* Deleted disallowed string */"); log("Deleted disallowed string: "+s); } else { w.write(s); } } case 36: break; case 25: { String s = yytext(); w.write(s); if(debug) log("Matched @page: "+s); } case 37: break; case 13: { String s = yytext(); w.write(s); if(debug) log("Matched number: "+s); } case 38: break; case 1: { String s = yytext(); char c = s.charAt(0); log("Matched anything: "+yytext()+" - ignoring"); w.write("/* ignored unmatched char: "+c+" */"); // single char cannot break out of comment } case 39: break; case 6: { String s = yytext(); w.write(s); if(debug) log("Matched semicolon: "+s); } case 40: break; case 20: { String s = yytext(); if(debug) log("Got hexcolor: "+s); w.write(s); } case 41: break; case 7: { String s = yytext(); w.write(s); if(debug) log("Matched open braces: "+s); } case 42: break; case 26: { String s = yytext(); s = s.substring("@media".length()).trim(); w.write("@media "+s+ ' '); if(debug) log("Matched @media: "+s); } case 43: break; case 2: { String s = yytext(); w.write(s); if(debug) log("Matched ident: "+s); } case 44: break; case 24: { String s = yytext(); w.write(s); if(debug) log("Matched unicode range: "+s); } case 45: break; case 28: { String s = yytext(); w.write(s); if(debug) log("Matched @font-face: "+s); } case 46: break; case 19: { String s = yytext(); w.write(s); if(debug) log("Matched HTML comment: "+s); } case 47: break; case 9: { String s = yytext(); if(s.startsWith("url")) throwError("Invalid contents of url()"); w.write(s); if(debug) log("Matched function start: "+s); } case 48: break; case 27: { String s = yytext(); if(debug) log("Found @import: "+s); s = s.substring("@import".length()); s = s.trim(); DecodedStringThingy dst = new DecodedStringThingy(s); s = dst.data; if(debug) log("URL: "+s); try { s = processImportURL(s); dst.data = s; if(debug) log("Processed URL: "+s); if(dst.quote == ' ') dst.quote = '\"'; if (!(s == null || s.equals(""))) { if(debug) log("URL now: "+s); s = "@import "+dst.toString(); if(debug) log("Writing: "+s); w.write(s); } else if(debug) log("Dropped @import"); } catch (CommentException e) { w.write("/* " + commentEncode(e.getMessage()) + " */"); } } case 49: break; case 3: { String s = yytext(); w.write(s); if(debug) log("Matched whitespace: "+s); } case 50: break; case 29: { String s = yytext(); w.write(s); if(debug) log("Matched important: "+s); } case 51: break; case 21: { String s = yytext(); StringBuffer sb = new StringBuffer(s.length()); sb.append("/* "); boolean inPrefix = true; for(int i=2;i<s.length()-2;i++) { char c = s.charAt(i); if(inPrefix && Character.isWhitespace(c)) { continue; } inPrefix = false; if(Character.isDigit(c) || Character.isWhitespace(c) || Character.isLetter(c) || c == '.' || c == '_' || c == '-') { // No @, no !, etc; IE has been known to do things with comments // in CSS, and other browsers may too sb.append(c); } } while(Character.isWhitespace(sb.charAt(sb.length()-1))) sb.deleteCharAt(sb.length()-1); sb.append(" */"); w.write(sb.toString()); if(debug) log("Matched comment: "+s+" -> "+sb.toString()); } case 52: break; case 15: { if(!deleteErrors) { throwError("Unknown @identifier "+yytext()); } else { String s = yytext(); if(debug) log("Discarded identifier: "+s); // Ignore } } case 53: break; case 11: { String s = yytext(); w.write(s); if(debug) log("Matched measurement: "+s); } case 54: break; case 17: { String s = yytext(); w.write(s); if(debug) log("Matched |=: "+s); } case 55: break; case 30: { String s = yytext(); detectedCharset = s; if(debug) log("Matched and ignoring charset: "+s); // Ignore } case 56: break; case 10: { if(postBadImportFlag) { // Ignore postBadImportFlag = false; if(debug) log("Ignoring mediums list because after bad import: "+ yytext()); } else { String s = yytext(); w.write(s); if(debug) log("Matched and passing on mediums list: "+s); } } case 57: break; case 4: { String s = yytext(); w.write(s); if(debug) log("Matched single char: "+s); } case 58: break; case 14: { String s = yytext(); w.write(s); if(debug) log("Matched #name: "+s); } case 59: break; case 5: { String s = yytext(); w.write(s); if(debug) log("Matched function end: "+s); } case 60: break; default: if (zzInput == YYEOF && zzStartRead == zzCurrentPos) { zzAtEOF = true; return null; } else { zzScanError(ZZ_NO_MATCH); } } } } | 45341 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45341/58e844dc77aa5d1ee9f4952f22f0f7b6b8469457/CSSTokenizerFilter.java/buggy/src/freenet/clients/http/filter/CSSTokenizerFilter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1624,
93,
2316,
677,
1362,
92,
1435,
1216,
2252,
18,
1594,
18,
14106,
288,
565,
509,
11273,
1210,
31,
565,
509,
11273,
1803,
31,
565,
368,
3472,
1466,
30,
565,
509,
11273,
3935,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1624,
93,
2316,
677,
1362,
92,
1435,
1216,
2252,
18,
1594,
18,
14106,
288,
565,
509,
11273,
1210,
31,
565,
509,
11273,
1803,
31,
565,
368,
3472,
1466,
30,
565,
509,
11273,
3935,
1... |
Iterator i = wordTokens.iterator(); | Iterator<Token> i = wordTokens.iterator(); | public ConfidenceResult score(Result result) { Lattice lattice = new Lattice(result); LatticeOptimizer lop = new LatticeOptimizer(lattice); lop.optimize(); lattice.computeNodePosteriors(languageWeight); SausageMaker sm = new SausageMaker(lattice); Sausage s = sm.makeSausage(); if (dumpLattice) { lattice.dumpAISee("mapLattice.gdl", "MAP Lattice"); } if (dumpSausage) { s.dumpAISee("mapSausage.gdl", "MAP Sausage"); } ConfidenceResult sausage = (ConfidenceResult) s; WordResultPath mapPath = new WordResultPath(); List wordTokens = getWordTokens(result.getBestToken()); /* start with the first slot */ int slot = 0; Iterator i = wordTokens.iterator(); while (i.hasNext()) { Token token = (Token) i.next(); String word = token.getWord().getSpelling(); WordResult wr = null; ConfusionSet cs = null; /* track through all the slots to find the word */ while (slot < sausage.size() && wr == null) { cs = sausage.getConfusionSet(slot); wr = cs.getWordResult(word); if (wr == null) { slot++; } } if (wr != null) { mapPath.add(wr); } else { cs.dump("Slot " + slot); throw new Error ("Can't find WordResult in ConfidenceResult slot " + slot + " for word " + word); } slot++; } return (new MAPConfidenceResult(sausage, mapPath)); } | 7874 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7874/063275f2440d27815582cc264f0c7b2969fbca80/MAPConfidenceScorer.java/buggy/src/sphinx4/edu/cmu/sphinx/result/MAPConfidenceScorer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
9675,
10328,
1253,
4462,
12,
1253,
563,
13,
288,
3639,
511,
24966,
16690,
273,
394,
511,
24966,
12,
2088,
1769,
3639,
511,
24966,
29789,
437,
84,
273,
394,
511,
24966,
29789,
12,
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,
9675,
10328,
1253,
4462,
12,
1253,
563,
13,
288,
3639,
511,
24966,
16690,
273,
394,
511,
24966,
12,
2088,
1769,
3639,
511,
24966,
29789,
437,
84,
273,
394,
511,
24966,
29789,
12,
80... |
return new CPPASTFunctionTryBlockDeclarator(); } | return new CPPASTFunctionTryBlockDeclarator(); } | protected ICPPASTFunctionTryBlockDeclarator createTryBlockDeclarator() { return new CPPASTFunctionTryBlockDeclarator(); } | 54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/c4c31b724fe73e8f69d2d4f9fcd98d3ff359a2d3/GNUCPPSourceParser.java/clean/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GNUCPPSourceParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
467,
4258,
4066,
882,
2083,
7833,
1768,
31419,
752,
7833,
1768,
31419,
1435,
288,
202,
202,
2463,
394,
5181,
4066,
882,
2083,
7833,
1768,
31419,
5621,
202,
97,
2,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
467,
4258,
4066,
882,
2083,
7833,
1768,
31419,
752,
7833,
1768,
31419,
1435,
288,
202,
202,
2463,
394,
5181,
4066,
882,
2083,
7833,
1768,
31419,
5621,
202,
97,
2,
-100,
-100,
-... |
} | private void startInserter() { Logger.minor(this, "starting inserter"); SimpleFieldSet fs = exportPublicFieldSet(); // Remove some unnecessary fields that only cause collisions. // Delete entire ark.* field for now. Changing this and automatically moving to the new may be supported in future. fs.remove("ark"); fs.remove("location"); //fs.remove("version"); - keep version because of its significance in reconnection String s = fs.toString(); byte[] buf; try { buf = s.getBytes("UTF-8"); } catch (UnsupportedEncodingException e) { throw new Error("UTF-8 not supported"); } Bucket b = new SimpleReadOnlyArrayBucket(buf); FreenetURI uri = myARK.getInsertURI().setKeyType("USK").setSuggestedEdition(Node.this.myARKNumber); Logger.minor(this, "Inserting ARK: "+uri); synchronized (inserter) { inserter = new ClientPutter(this, b, uri, new ClientMetadata("text/plain") /* it won't quite fit in an SSK anyway */, Node.this.makeClient((short)0).getInserterContext(), chkPutScheduler, sskPutScheduler, RequestStarter.INTERACTIVE_PRIORITY_CLASS, false, false, this); } try { synchronized (inserter) { inserter.start(); } synchronized (this) { if(fs.get("physical.udp") == null) lastInsertedPeers = null; else { try { String[] all = fs.getAll("physical.udp"); Peer[] peers = new Peer[all.length]; for(int i=0;i<all.length;i++) peers[i] = new Peer(all[i], false); lastInsertedPeers = peers; } catch (PeerParseException e1) { Logger.error(this, "Error parsing own ref: "+e1+" : "+fs.get("physical.udp"), e1); } catch (UnknownHostException e1) { Logger.error(this, "Error parsing own ref: "+e1+" : "+fs.get("physical.udp"), e1); } } } } catch (InserterException e) { synchronized (inserter) { onFailure(e, inserter); } } } | 50619 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50619/cbc8d02e7f68958d17b1b62385b39f3b1675daf1/Node.java/buggy/src/freenet/node/Node.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
1152,
918,
787,
382,
550,
387,
1435,
288,
1082,
202,
3328,
18,
17364,
12,
2211,
16,
315,
18526,
316,
550,
387,
8863,
25083,
202,
5784,
974,
694,
2662,
273,
3359,
4782,
974,
694,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
1152,
918,
787,
382,
550,
387,
1435,
288,
1082,
202,
3328,
18,
17364,
12,
2211,
16,
315,
18526,
316,
550,
387,
8863,
25083,
202,
5784,
974,
694,
2662,
273,
3359,
4782,
974,
694,
5... | |
throw new SAXException(tr("Unknown data type: '{0}'.{1}",token,(Main.pref.get("csv.importstring").equals("") ? (" "+tr("Maybe add an format string in preferences.")) : ""))); | throw new SAXException(tr("Unknown data type: \"{0}\".{1}",token,(Main.pref.get("csv.importstring").equals("") ? (" "+tr("Maybe add an format string in preferences.")) : ""))); | public Collection<GpsPoint> parse() throws SAXException, IOException { Collection<GpsPoint> data = new LinkedList<GpsPoint>(); String formatStr = Main.pref.get("csv.importstring"); if (formatStr == null) formatStr = in.readLine(); if (formatStr == null) throw new SAXException(tr("Could not detect data format string.")); // get delimiter String delim = ","; for (int i = 0; i < formatStr.length(); ++i) { if (!Character.isLetterOrDigit(formatStr.charAt(i))) { delim = ""+formatStr.charAt(i); break; } } // convert format string ArrayList<String> format = new ArrayList<String>(); for (StringTokenizer st = new StringTokenizer(formatStr, delim); st.hasMoreTokens();) { String token = st.nextToken(); if (!token.equals("lat") && !token.equals("lon") && !token.equals("time")) token = "ignore"; format.add(token); } // test for completness if (!format.contains("lat") || !format.contains("lon")) { if (Main.pref.get("csv.importstring").equals("")) throw new SAXException(tr("Format string in data is incomplete or not found. Try setting an manual format string in Preferences.")); throw new SAXException(tr("Format string is incomplete. Need at least 'lat' and 'lon' specification")); } int lineNo = 0; try { for (String line = in.readLine(); line != null; line = in.readLine()) { lineNo++; StringTokenizer st = new StringTokenizer(line, delim); double lat = 0, lon = 0; String time = null; for (String token : format) { if (token.equals("lat")) lat = Double.parseDouble(st.nextToken()); else if (token.equals("lon")) lon = Double.parseDouble(st.nextToken()); else if (token.equals("time")) time = (time == null?"":(time+" ")) + st.nextToken(); else if (token.equals("ignore")) st.nextToken(); else throw new SAXException(tr("Unknown data type: '{0}'.{1}",token,(Main.pref.get("csv.importstring").equals("") ? (" "+tr("Maybe add an format string in preferences.")) : ""))); } data.add(new GpsPoint(new LatLon(lat, lon), time)); } } catch (RuntimeException e) { throw new SAXException(tr("Parsing error in line {0}",lineNo), e); } return data; } | 2204 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2204/fea4f87ceb55f51fc31c2d0bbac19a83dc06fd89/RawCsvReader.java/buggy/src/org/openstreetmap/josm/io/RawCsvReader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2200,
32,
43,
1121,
2148,
34,
1109,
1435,
1216,
14366,
16,
1860,
288,
202,
202,
2532,
32,
43,
1121,
2148,
34,
501,
273,
394,
10688,
32,
43,
1121,
2148,
34,
5621,
202,
202,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2200,
32,
43,
1121,
2148,
34,
1109,
1435,
1216,
14366,
16,
1860,
288,
202,
202,
2532,
32,
43,
1121,
2148,
34,
501,
273,
394,
10688,
32,
43,
1121,
2148,
34,
5621,
202,
202,
7... |
acceptor.start(); | LOG.trace("START Acceptor"); acceptor.start(); LOG.trace("STOP Acceptor"); | public void start() { if ( isStarted() ) return; _started = true; acceptor.start(); // Now, link all the pieces together, starting the various threads. RESULT_HANDLER.start(); router.initialize(); manager.initialize(); downloader.initialize(); SupernodeAssigner sa = new SupernodeAssigner(uploadManager, downloader, manager); sa.start(); // THIS MUST BE BEFORE THE CONNECT (below) // OTHERWISE WE WILL ALWAYS CONNECT TO GWEBCACHES catcher.initialize(); if(ConnectionSettings.CONNECT_ON_STARTUP.getValue()) { // Make sure connections come up ultra-fast (beyond default keepAlive) int outgoing = ConnectionSettings.NUM_CONNECTIONS.getValue(); if ( outgoing > 0 ) connect(); } // Asynchronously load files now that the GUI is up, notifying // callback. fileManager.start(); // Restore any downloads in progress. downloader.postGuiInit(); UpdateManager.instance();//initialize QueryUnicaster.instance().start(); httpAcceptor = new HTTPAcceptor(); httpAcceptor.start(); Pinger.instance().start(); ConnectionWatchdog.instance().start(); } | 5134 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5134/4bd526b8baf99aecf39a7adb13395cdbdf8dc955/RouterService.java/buggy/components/gnutella-core/src/main/java/com/limegroup/gnutella/RouterService.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
787,
1435,
288,
202,
565,
309,
261,
28481,
1435,
262,
327,
31,
3639,
389,
14561,
273,
638,
31,
202,
202,
1077,
6757,
18,
1937,
5621,
9506,
565,
202,
202,
759,
4494,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
787,
1435,
288,
202,
565,
309,
261,
28481,
1435,
262,
327,
31,
3639,
389,
14561,
273,
638,
31,
202,
202,
1077,
6757,
18,
1937,
5621,
9506,
565,
202,
202,
759,
4494,
16,
... |
AST __t1175 = _t; | AST __t1160 = _t; | public final void triggerphrase(AST _t) throws RecognitionException { AST triggerphrase_AST_in = (_t == ASTNULL) ? null : (AST)_t; AST on = null; AST __t1172 = _t; AST tmp883_AST_in = (AST)_t; match(_t,TRIGGERS); _t = _t.getFirstChild(); block_colon(_t); _t = _retTree; AST __t1173 = _t; AST tmp884_AST_in = (AST)_t; match(_t,Code_block); _t = _t.getFirstChild(); { _loop1178: do { if (_t==null) _t=ASTNULL; if ((_t.getType()==ON)) { AST __t1175 = _t; on = _t==ASTNULL ? null :(AST)_t; match(_t,ON); _t = _t.getFirstChild(); if ( inputState.guessing==0 ) { action.scopeAdd(on); } eventlist(_t); _t = _retTree; { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case ANYWHERE: { AST tmp885_AST_in = (AST)_t; match(_t,ANYWHERE); _t = _t.getNextSibling(); break; } case PERIOD: case PROPARSEDIRECTIVE: case AATRACE: case ACCUMULATE: case ALTER: case ANALYZE: case APPLY: case ASSIGN: case BELL: case BTOS: case BUFFERCOMPARE: case BUFFERCOPY: case CALL: case CASE: case CHOOSE: case CLEAR: case CLOSE: case COLOR: case COMPILE: case CONNECT: case CREATE: case DDE: case DECLARE: case DEFINE: case DELETE_KW: case DICTIONARY: case DISABLE: case DISCONNECT: case DISPLAY: case DO: case DOS: case DOWN: case DROP: case EMPTY: case ENABLE: case EXPORT: case FETCH: case FIND: case FOR: case FORMAT: case FUNCTION: case GET: case GETKEYVALUE: case GRANT: case HIDE: case IF: case IMPORT: case INPUT: case INPUTOUTPUT: case INSERT: case LEAVE: case LOAD: case MESSAGE: case MPE: case NEXT: case NEXTPROMPT: case ON: case OPEN: case OS2: case OS400: case OSAPPEND: case OSCOMMAND: case OSCOPY: case OSCREATEDIR: case OSDELETE: case OSRENAME: case OUTPUT: case PAGE: case PAUSE: case PERSISTENT: case PROCEDURE: case PROCESS: case PROMPTFOR: case PUBLISH: case PUT: case PUTKEYVALUE: case QUIT: case RAWTRANSFER: case READKEY: case RELEASE: case REPEAT: case REPOSITION: case RETURN: case REVOKE: case RUN: case SAVE: case SCROLL: case SEEK: case SELECT: case SET: case SHOWSTATS: case STATUS: case STOP: case SUBSCRIBE: case SYSTEMDIALOG: case SYSTEMHELP: case TRANSACTIONMODE: case TRIGGER: case UNDERLINE: case UNDO: case UNIX: case UNLOAD: case UNSUBSCRIBE: case UP: case UPDATE: case USE: case VALIDATE: case VIEW: case VMS: case WAITFOR: case Expr_statement: case BLOCK_LABEL: case COPYLOB: case DOT_COMMENT: case CLASS: case CONSTRUCTOR: case INTERFACE: case METHOD: case DESTRUCTOR: case ANNOTATION: { break; } default: { throw new NoViableAltException(_t); } } } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case PERSISTENT: { AST tmp886_AST_in = (AST)_t; match(_t,PERSISTENT); _t = _t.getNextSibling(); runstate(_t); _t = _retTree; break; } case PERIOD: case PROPARSEDIRECTIVE: case AATRACE: case ACCUMULATE: case ALTER: case ANALYZE: case APPLY: case ASSIGN: case BELL: case BTOS: case BUFFERCOMPARE: case BUFFERCOPY: case CALL: case CASE: case CHOOSE: case CLEAR: case CLOSE: case COLOR: case COMPILE: case CONNECT: case CREATE: case DDE: case DECLARE: case DEFINE: case DELETE_KW: case DICTIONARY: case DISABLE: case DISCONNECT: case DISPLAY: case DO: case DOS: case DOWN: case DROP: case EMPTY: case ENABLE: case EXPORT: case FETCH: case FIND: case FOR: case FORMAT: case FUNCTION: case GET: case GETKEYVALUE: case GRANT: case HIDE: case IF: case IMPORT: case INPUT: case INPUTOUTPUT: case INSERT: case LEAVE: case LOAD: case MESSAGE: case MPE: case NEXT: case NEXTPROMPT: case ON: case OPEN: case OS2: case OS400: case OSAPPEND: case OSCOMMAND: case OSCOPY: case OSCREATEDIR: case OSDELETE: case OSRENAME: case OUTPUT: case PAGE: case PAUSE: case PROCEDURE: case PROCESS: case PROMPTFOR: case PUBLISH: case PUT: case PUTKEYVALUE: case QUIT: case RAWTRANSFER: case READKEY: case RELEASE: case REPEAT: case REPOSITION: case RETURN: case REVOKE: case RUN: case SAVE: case SCROLL: case SEEK: case SELECT: case SET: case SHOWSTATS: case STATUS: case STOP: case SUBSCRIBE: case SYSTEMDIALOG: case SYSTEMHELP: case TRANSACTIONMODE: case TRIGGER: case UNDERLINE: case UNDO: case UNIX: case UNLOAD: case UNSUBSCRIBE: case UP: case UPDATE: case USE: case VALIDATE: case VIEW: case VMS: case WAITFOR: case Expr_statement: case BLOCK_LABEL: case COPYLOB: case DOT_COMMENT: case CLASS: case CONSTRUCTOR: case INTERFACE: case METHOD: case DESTRUCTOR: case ANNOTATION: { blockorstate(_t); _t = _retTree; break; } default: { throw new NoViableAltException(_t); } } } if ( inputState.guessing==0 ) { action.scopeClose(on); } _t = __t1175; _t = _t.getNextSibling(); } else { break _loop1178; } } while (true); } _t = __t1173; _t = _t.getNextSibling(); AST __t1179 = _t; AST tmp887_AST_in = (AST)_t; match(_t,END); _t = _t.getFirstChild(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case TRIGGERS: { AST tmp888_AST_in = (AST)_t; match(_t,TRIGGERS); _t = _t.getNextSibling(); break; } case 3: { break; } default: { throw new NoViableAltException(_t); } } } _t = __t1179; _t = _t.getNextSibling(); _t = __t1172; _t = _t.getNextSibling(); _retTree = _t; } | 13952 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13952/daa15e07422d3491bbbb4d0060450c81983332a4/TreeParser01.java/buggy/trunk/org.prorefactor.core/src/org/prorefactor/treeparser01/TreeParser01.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
3080,
9429,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
3080,
9429,
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,
3080,
9429,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
3080,
9429,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
13,
692,
446,
294,
261,
9053... |
s += generate(me); s += "\n\n"; | sb.append(generate(me)); sb.append(LINE_SEPARATOR).append(LINE_SEPARATOR); | public String generatePackage(Object p) { String s = ""; String packName = generateName(Model.getFacade().getLanguage(p)); s += "// package " + packName + " {\n"; Collection ownedElements = Model.getFacade().getOwnedElements(p); if (ownedElements != null) { Iterator ownedEnum = ownedElements.iterator(); while (ownedEnum.hasNext()) { Object me = ownedEnum.next(); s += generate(me); s += "\n\n"; } } else { s += "(no elements)"; } s += "\n}\n"; return s; } | 7166 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7166/c394f84b1db32fc3dd57c0a1956729d3451131bf/GeneratorCpp.java/clean/modules/cpp/src/org/argouml/language/cpp/generator/GeneratorCpp.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
2103,
2261,
12,
921,
293,
13,
288,
3639,
514,
272,
273,
1408,
31,
3639,
514,
2298,
461,
273,
2103,
461,
12,
1488,
18,
588,
12467,
7675,
588,
3779,
12,
84,
10019,
3639,
272,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
2103,
2261,
12,
921,
293,
13,
288,
3639,
514,
272,
273,
1408,
31,
3639,
514,
2298,
461,
273,
2103,
461,
12,
1488,
18,
588,
12467,
7675,
588,
3779,
12,
84,
10019,
3639,
272,
... |
} catch(Exception e) { _callback.error(e); | } catch(Throwable t) { _callback.error(t); | public void loadSettings(boolean notifyOnClear) { synchronized (_loadThreadLock) { //If settings are already being loaded, interrupt and wait for them //to complete. Note that we cannot hold this' monitor when calling //join(); doing so may result in deadlock! On the other hand, we //have to hold _loadThreadLock's monitor to prevent a load thread //from starting up immediately after checking for null. // //TODO: the call to join would block if the call to File.list called //by listFiles called by addDirectory blocks. If this is the case, //we need to spawn a thread before join'ing. if (_loadThread!=null) { _loadThreadInterrupted = true; _loadThread.interrupt(); try { _loadThread.join(); } catch (InterruptedException e) { return; } } final boolean notifyOnClearFinal = notifyOnClear; _loadThreadInterrupted = false; _loadThread = new Thread("FileManager.loadSettingsBlocking") { public void run() { try { loadSettingsBlocking(notifyOnClearFinal); } catch(Exception e) { _callback.error(e); } } }; _loadThread.start(); } } | 5134 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5134/e4b24ef58cc77022f26819a07ebcb80a084e285e/FileManager.java/buggy/components/gnutella-core/src/main/java/com/limegroup/gnutella/FileManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1262,
2628,
12,
6494,
5066,
1398,
9094,
13,
288,
1082,
3639,
3852,
261,
67,
945,
3830,
2531,
13,
288,
5411,
368,
2047,
1947,
854,
1818,
3832,
4203,
16,
13123,
471,
2529,
364,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1262,
2628,
12,
6494,
5066,
1398,
9094,
13,
288,
1082,
3639,
3852,
261,
67,
945,
3830,
2531,
13,
288,
5411,
368,
2047,
1947,
854,
1818,
3832,
4203,
16,
13123,
471,
2529,
364,
... |
Dimension screen = Toolkit.getDefaultToolkit().getScreenSize(); window.setLocation((screen.width - window.getWidth()) / 2, (screen.height - window.getHeight()) / 2); window.setVisible(true); ReadDataDialog readDialog = new ReadDataDialog("Welcome to HaploView", window); readDialog.pack(); readDialog.setVisible(true); | window.setVisible(true); ReadDataDialog readDialog = new ReadDataDialog("Welcome to HaploView", window); readDialog.pack(); readDialog.setVisible(true); } | public static void main(String[] args) {//throws IOException{ try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (Exception e) { } //setup view object HaploView window = new HaploView(); window.setTitle("HaploView beta"); window.setSize(800,600); //center the window on the screen Dimension screen = Toolkit.getDefaultToolkit().getScreenSize(); window.setLocation((screen.width - window.getWidth()) / 2, (screen.height - window.getHeight()) / 2); window.setVisible(true); ReadDataDialog readDialog = new ReadDataDialog("Welcome to HaploView", window); readDialog.pack(); readDialog.setVisible(true); } | 51222 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51222/fa8cd72699dd38dbfdbf2d80885613a61937797f/HaploView.java/clean/edu/mit/wi/haploview/HaploView.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
2774,
12,
780,
8526,
833,
13,
288,
759,
15069,
1860,
95,
3639,
775,
288,
5411,
6484,
1318,
18,
542,
9794,
1876,
2954,
292,
12,
5370,
1318,
18,
588,
3163,
9794,
1876,
295... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
288,
759,
15069,
1860,
95,
3639,
775,
288,
5411,
6484,
1318,
18,
542,
9794,
1876,
2954,
292,
12,
5370,
1318,
18,
588,
3163,
9794,
1876,
295... |
if (isFixedPitch != 0) | } if (isFixedPitch != 0) { | public int getFlags() { int flags = 32; // Use Adobe Standard charset if (italicAngle != 0) flags = flags | 64; if (isFixedPitch != 0) flags = flags | 2; if (hasSerifs) flags = flags | 1; return flags; } | 5268 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5268/2e2226dd0dd6733fdab0c36331723114a46eddd8/TTFFile.java/buggy/src/org/apache/fop/fonts/TTFFile.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
336,
5094,
1435,
288,
3639,
509,
2943,
273,
3847,
31,
565,
368,
2672,
4052,
947,
73,
8263,
4856,
3639,
309,
261,
7053,
335,
8467,
480,
374,
13,
5411,
2943,
273,
2943,
571,
51... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
336,
5094,
1435,
288,
3639,
509,
2943,
273,
3847,
31,
565,
368,
2672,
4052,
947,
73,
8263,
4856,
3639,
309,
261,
7053,
335,
8467,
480,
374,
13,
5411,
2943,
273,
2943,
571,
51... |
fs.put("URI", uri.toString(false)); | fs.put("URI", uri.toString(false, false)); | public synchronized SimpleFieldSet getFieldSet() { SimpleFieldSet fs = new SimpleFieldSet(); // we will need multi-level later... fs.put("Type", "GET"); fs.put("URI", uri.toString(false)); fs.put("Identifier", identifier); fs.put("Verbosity", Integer.toString(verbosity)); fs.put("PriorityClass", Short.toString(priorityClass)); fs.put("ReturnType", ClientGetMessage.returnTypeString(returnType)); fs.put("Persistence", persistenceTypeString(persistenceType)); fs.put("ClientName", client.name); if(targetFile != null) fs.put("Filename", targetFile.getPath()); if(tempFile != null) fs.put("TempFilename", tempFile.getPath()); if(clientToken != null) fs.put("ClientToken", clientToken); fs.put("IgnoreDS", Boolean.toString(fctx.ignoreStore)); fs.put("DSOnly", Boolean.toString(fctx.localRequestOnly)); fs.put("MaxRetries", Integer.toString(fctx.maxNonSplitfileRetries)); fs.put("Finished", Boolean.toString(finished)); fs.put("Succeeded", Boolean.toString(succeeded)); if(finished) { if(succeeded) { fs.put("FoundDataLength", Long.toString(foundDataLength)); fs.put("FoundDataMimeType", foundDataMimeType); if(postFetchProtocolErrorMessage != null) { fs.put("PostFetchProtocolError", postFetchProtocolErrorMessage.getFieldSet()); } } else { if(getFailedMessage != null) { fs.put("GetFailed", getFailedMessage.getFieldSet(false)); } } } // Return bucket if(returnType == ClientGetMessage.RETURN_TYPE_DIRECT) { PaddedEphemerallyEncryptedBucket b = (PaddedEphemerallyEncryptedBucket) returnBucket; FileBucket underlying = (FileBucket) (b.getUnderlying()); fs.put("ReturnBucket.DecryptKey", HexUtil.bytesToHex(b.getKey())); fs.put("ReturnBucket.Filename", underlying.getName()); } fs.put("Global", Boolean.toString(client.isGlobalQueue)); return fs; } | 45341 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45341/1c876261ab73159d57a26624667ec7bf7acd15b8/ClientGet.java/clean/src/freenet/node/fcp/ClientGet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3852,
4477,
974,
694,
5031,
694,
1435,
288,
202,
202,
5784,
974,
694,
2662,
273,
394,
4477,
974,
694,
5621,
368,
732,
903,
1608,
3309,
17,
2815,
5137,
2777,
202,
202,
2556,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3852,
4477,
974,
694,
5031,
694,
1435,
288,
202,
202,
5784,
974,
694,
2662,
273,
394,
4477,
974,
694,
5621,
368,
732,
903,
1608,
3309,
17,
2815,
5137,
2777,
202,
202,
2556,
18... |
throw new MessageInvalidException(ProtocolErrorMessage.MISSING_FIELD, "Error: NoteText field missing", null); | throw new MessageInvalidException(ProtocolErrorMessage.MISSING_FIELD, "Error: NoteText field missing", null, false); | public void run(FCPConnectionHandler handler, Node node) throws MessageInvalidException { String nodeIdentifier = fs.get("NodeIdentifier"); if( nodeIdentifier == null ) { throw new MessageInvalidException(ProtocolErrorMessage.MISSING_FIELD, "Error: NodeIdentifier field missing", null); } PeerNode pn = node.getPeerNode(nodeIdentifier); if(pn == null) { FCPMessage msg = new UnknownNodeIdentifierMessage(nodeIdentifier); handler.outputHandler.queue(msg); return; } int peerNoteType; try { peerNoteType = fs.getInt("PeerNoteType"); } catch (FSParseException e) { throw new MessageInvalidException(ProtocolErrorMessage.INVALID_FIELD, "Error parsing PeerNoteType field: "+e.getMessage(), null); } String encodedNoteText = fs.get("NoteText"); if( encodedNoteText == null ) { throw new MessageInvalidException(ProtocolErrorMessage.MISSING_FIELD, "Error: NoteText field missing", null); } String noteText; // **FIXME** this should be generalized for multiple peer notes per peer, after PeerNode is similarly generalized try { noteText = new String(Base64.decode(encodedNoteText)); } catch (IllegalBase64Exception e) { Logger.error(this, "Bad Base64 encoding when decoding a FCP-received private darknet comment SimpleFieldSet", e); return; } if(peerNoteType == Node.PEER_NOTE_TYPE_PRIVATE_DARKNET_COMMENT) { pn.setPrivateDarknetCommentNote(noteText); } else { FCPMessage msg = new UnknownPeerNoteTypeMessage(peerNoteType); handler.outputHandler.queue(msg); return; } handler.outputHandler.queue(new PeerNote(nodeIdentifier, noteText, peerNoteType)); } | 51834 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51834/bbb3c23ec38ea1c7abb48040a17f5fc7932248bc/ModifyPeerNote.java/buggy/src/freenet/node/fcp/ModifyPeerNote.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1086,
12,
42,
4258,
1952,
1503,
1838,
16,
2029,
756,
13,
1216,
2350,
1941,
503,
288,
202,
202,
780,
756,
3004,
273,
2662,
18,
588,
2932,
907,
3004,
8863,
202,
202,
430,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1086,
12,
42,
4258,
1952,
1503,
1838,
16,
2029,
756,
13,
1216,
2350,
1941,
503,
288,
202,
202,
780,
756,
3004,
273,
2662,
18,
588,
2932,
907,
3004,
8863,
202,
202,
430,
... |
PatternDescr d = null; | public void expander_lhs_block(AndDescr descrs) throws RecognitionException { PatternDescr d = null; String text = null; try { // C:\Projects\jboss-rules\drools-compiler\src\main\resources\org\drools\lang\drl.g:348:17: ( ( options {greedy=false; } : '>' d= lhs | ( options {greedy=false; } : text= paren_chunk EOL ) )* ) // C:\Projects\jboss-rules\drools-compiler\src\main\resources\org\drools\lang\drl.g:348:17: ( options {greedy=false; } : '>' d= lhs | ( options {greedy=false; } : text= paren_chunk EOL ) )* { // C:\Projects\jboss-rules\drools-compiler\src\main\resources\org\drools\lang\drl.g:348:17: ( options {greedy=false; } : '>' d= lhs | ( options {greedy=false; } : text= paren_chunk EOL ) )* loop36: do { int alt36=3; switch ( input.LA(1) ) { case 26: alt36=3; break; case 30: alt36=3; break; case 37: alt36=1; break; case EOL: case ID: case INT: case STRING: case FLOAT: case MISC: case WS: case SH_STYLE_SINGLE_LINE_COMMENT: case C_STYLE_SINGLE_LINE_COMMENT: case MULTI_LINE_COMMENT: case 14: case 15: case 16: case 17: case 18: case 19: case 20: case 21: case 22: case 23: case 24: case 25: case 27: case 28: case 29: case 31: case 32: case 33: case 34: case 35: case 36: case 38: case 39: case 40: case 41: case 42: case 43: case 44: case 45: case 46: case 47: case 48: case 49: case 50: case 51: case 52: case 53: case 54: alt36=2; break; } switch (alt36) { case 1 : // C:\Projects\jboss-rules\drools-compiler\src\main\resources\org\drools\lang\drl.g:349:25: '>' d= lhs { match(input,37,FOLLOW_37_in_expander_lhs_block1076); following.push(FOLLOW_lhs_in_expander_lhs_block1080); d=lhs(); following.pop(); descrs.addDescr( d ); } break; case 2 : // C:\Projects\jboss-rules\drools-compiler\src\main\resources\org\drools\lang\drl.g:351:25: ( options {greedy=false; } : text= paren_chunk EOL ) { // C:\Projects\jboss-rules\drools-compiler\src\main\resources\org\drools\lang\drl.g:351:25: ( options {greedy=false; } : text= paren_chunk EOL ) // C:\Projects\jboss-rules\drools-compiler\src\main\resources\org\drools\lang\drl.g:352:33: text= paren_chunk EOL { following.push(FOLLOW_paren_chunk_in_expander_lhs_block1111); text=paren_chunk(); following.pop(); match(input,EOL,FOLLOW_EOL_in_expander_lhs_block1113); //only expand non null if (text != null) { d = runWhenExpander( text ); descrs.addDescr( d ); text = null; d = null; } } } break; default : break loop36; } } while (true); } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { } return ; } | 6736 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6736/afa2dad261bf082d1acd2655e8290f80c6bffb15/RuleParser.java/clean/drools-compiler/src/main/java/org/drools/lang/RuleParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
4542,
264,
67,
80,
4487,
67,
2629,
12,
1876,
16198,
3044,
5453,
13,
1216,
9539,
288,
1171,
514,
977,
273,
446,
31,
3639,
775,
288,
5411,
368,
385,
5581,
15298,
64,
10649,
846... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4542,
264,
67,
80,
4487,
67,
2629,
12,
1876,
16198,
3044,
5453,
13,
1216,
9539,
288,
1171,
514,
977,
273,
446,
31,
3639,
775,
288,
5411,
368,
385,
5581,
15298,
64,
10649,
846... | |
public void init() { if (gatherRequestsHandler == null) { gatherRequestsHandler = new GatherRequestsQueues((ProActiveComponent)owner); List<Object> interfaces = Arrays.asList(owner.getFcInterfaces()); Iterator<Object> it = interfaces.iterator(); while (it.hasNext()) { addManagedInterface((ProActiveInterface) it.next()); } } } | 58694 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58694/134b58dbe6bf0d770561403db7684f11f01581d9/GathercastControllerImpl.java/clean/src/org/objectweb/proactive/core/component/controller/GathercastControllerImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
6459,
2738,
1435,
95,
202,
202,
430,
12,
75,
4806,
6421,
1503,
631,
2011,
15329,
75,
4806,
6421,
1503,
33,
2704,
26092,
6421,
17428,
12443,
626,
3896,
1841,
13,
8443,
1769,
682,
32,
921,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2738,
1435,
95,
202,
202,
430,
12,
75,
4806,
6421,
1503,
631,
2011,
15329,
75,
4806,
6421,
1503,
33,
2704,
26092,
6421,
17428,
12443,
626,
3896,
1841,
13,
8443,
1769,
682,
32,
921,... | ||
GROUP_SEPARATOR = GroupServiceConfiguration.getConfiguration().getNodeSeparator(); EVERYONE_GROUP_KEY = "local" + GROUP_SEPARATOR + "0"; EVERYONE_GROUP_PRINCIPAL_KEY = "3." + EVERYONE_GROUP_KEY; NOONE_GROUP_PRINCIPAL_KEY = "3.local" + GROUP_SEPARATOR + "999"; STUDENT_GROUP_PRINCIPAL_KEY = "3.local" + GROUP_SEPARATOR + "1"; | protected void setUp(){ String msg = null; IPermission[] retrievedPermissions = null; IPermission newPermission, retrievedPermission = null; java.util.Date effectiveDate = new java.util.Date(); java.util.Date expirationDate = new java.util.Date(System.currentTimeMillis() + (60 * 60 * 24 * 1000)); int idx = 0; try { if ( GROUP_CLASS == null ) { GROUP_CLASS = Class.forName("org.jasig.portal.groups.IEntityGroup"); } if ( IPERSON_CLASS == null ) { IPERSON_CLASS = Class.forName("org.jasig.portal.security.IPerson"); } msg = "Creating test permissions."; print(msg); retrievedPermissions = getPermissionStore().select (OWNER, EVERYONE_GROUP_PRINCIPAL_KEY, TEST_ACTIVITY, null, IPermission.PERMISSION_TYPE_GRANT); assertEquals(msg, 0, retrievedPermissions.length); for(idx=0; idx<NUMBER_TEST_PERMISSIONS; idx++) { newPermission = getPermissionStore().newInstance(OWNER); newPermission.setPrincipal(EVERYONE_GROUP_PRINCIPAL_KEY); newPermission.setActivity(TEST_ACTIVITY); newPermission.setTarget(TEST_TARGET + idx); newPermission.setType(IPermission.PERMISSION_TYPE_GRANT); newPermission.setEffective(effectiveDate); newPermission.setExpires(expirationDate); getPermissionStore().add(newPermission); testPermissions.add(newPermission); } retrievedPermissions = getPermissionStore().select (OWNER, EVERYONE_GROUP_PRINCIPAL_KEY, TEST_ACTIVITY, null, IPermission.PERMISSION_TYPE_GRANT); assertEquals(msg, NUMBER_TEST_PERMISSIONS, retrievedPermissions.length); msg = "Creating test DENY permission for student group."; print(msg); retrievedPermission = (IPermission)testPermissions.get(0); newPermission = getPermissionStore().newInstance(OWNER); newPermission.setActivity(TEST_ACTIVITY); newPermission.setPrincipal(STUDENT_GROUP_PRINCIPAL_KEY); newPermission.setTarget(retrievedPermission.getTarget()); newPermission.setType(IPermission.PERMISSION_TYPE_DENY); retrievedPermissions = getPermissionStore().select (OWNER, STUDENT_GROUP_PRINCIPAL_KEY, TEST_ACTIVITY, retrievedPermission.getTarget(), IPermission.PERMISSION_TYPE_DENY); assertEquals(msg, 0, retrievedPermissions.length); getPermissionStore().add(newPermission); retrievedPermissions = getPermissionStore().select (OWNER, STUDENT_GROUP_PRINCIPAL_KEY, TEST_ACTIVITY, retrievedPermission.getTarget(), IPermission.PERMISSION_TYPE_DENY); assertEquals(msg, 1, retrievedPermissions.length); testPermissions.add(newPermission); msg = "Creating test DENY permission for student entity."; print(msg); newPermission = getPermissionStore().newInstance(OWNER); retrievedPermission = (IPermission)testPermissions.get(1); newPermission.setPrincipal(STUDENT_PRINCIPAL_KEY); newPermission.setActivity(TEST_ACTIVITY); newPermission.setTarget(retrievedPermission.getTarget()); newPermission.setType(IPermission.PERMISSION_TYPE_DENY); retrievedPermissions = getPermissionStore().select (OWNER, STUDENT_PRINCIPAL_KEY, TEST_ACTIVITY, retrievedPermission.getTarget(), IPermission.PERMISSION_TYPE_DENY); assertEquals(msg, 0, retrievedPermissions.length); getPermissionStore().add(newPermission); retrievedPermissions = getPermissionStore().select (OWNER, STUDENT_PRINCIPAL_KEY, TEST_ACTIVITY, retrievedPermission.getTarget(), IPermission.PERMISSION_TYPE_DENY); assertEquals(msg, 1, retrievedPermissions.length); testPermissions.add(newPermission); } catch (Exception ex) { print("AuthorizationTester.setUp(): " + ex.getMessage());} } | 24959 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/24959/70425da9c88c1f1e75e7b3658c9c72c73b1a7f6e/AuthorizationTester.java/clean/tests/org/jasig/portal/security/provider/AuthorizationTester.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4750,
13839,
67,
4550,
273,
3756,
1179,
1750,
18,
588,
1750,
7675,
588,
907,
6581,
5621,
512,
17529,
5998,
67,
8468,
67,
3297,
273,
315,
3729,
6,
397,
13839,
67,
4550,
397,
315,
20,
14432,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4750,
13839,
67,
4550,
273,
3756,
1179,
1750,
18,
588,
1750,
7675,
588,
907,
6581,
5621,
512,
17529,
5998,
67,
8468,
67,
3297,
273,
315,
3729,
6,
397,
13839,
67,
4550,
397,
315,
20,
14432,
5... | |
Atom atom = new Atom("N"); LonePair lp = new LonePair(); | Atom atom = builder.newAtom("N"); LonePair lp = builder.newLonePair(); | public void testGetAtom() { Atom atom = new Atom("N"); LonePair lp = new LonePair(); assertNull(lp.getAtom()); lp.setAtom(atom); assertEquals(atom, lp.getAtom()); } | 1306 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1306/3d4f8a67608c1a4004a21e4da478a610bb53ee73/LonePairTest.java/clean/src/org/openscience/cdk/test/LonePairTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
967,
3641,
1435,
288,
3639,
7149,
3179,
273,
394,
7149,
2932,
50,
8863,
3639,
511,
476,
4154,
12423,
273,
394,
511,
476,
4154,
5621,
3639,
1815,
2041,
12,
9953,
18,
588,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
967,
3641,
1435,
288,
3639,
7149,
3179,
273,
394,
7149,
2932,
50,
8863,
3639,
511,
476,
4154,
12423,
273,
394,
511,
476,
4154,
5621,
3639,
1815,
2041,
12,
9953,
18,
588,
... |
AST __t1356 = _t; | AST __t1357 = _t; | public final void framephrase(AST _t) throws RecognitionException { AST framephrase_AST_in = (_t == ASTNULL) ? null : (AST)_t; AST __t1351 = _t; AST tmp154_AST_in = (AST)_t; match(_t,WITH); _t = _t.getFirstChild(); { _loop1381: do { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case ACCUMULATE: { AST __t1353 = _t; AST tmp155_AST_in = (AST)_t; match(_t,ACCUMULATE); _t = _t.getFirstChild(); { if (_t==null) _t=ASTNULL; if ((_tokenSet_4.member(_t.getType()))) { expression(_t); _t = _retTree; } else if ((_t.getType()==3)) { } else { throw new NoViableAltException(_t); } } _t = __t1353; _t = _t.getNextSibling(); break; } case ATTRSPACE: { AST tmp156_AST_in = (AST)_t; match(_t,ATTRSPACE); _t = _t.getNextSibling(); break; } case NOATTRSPACE: { AST tmp157_AST_in = (AST)_t; match(_t,NOATTRSPACE); _t = _t.getNextSibling(); break; } case CANCELBUTTON: { AST __t1355 = _t; AST tmp158_AST_in = (AST)_t; match(_t,CANCELBUTTON); _t = _t.getFirstChild(); field(_t); _t = _retTree; _t = __t1355; _t = _t.getNextSibling(); break; } case CENTERED: { AST tmp159_AST_in = (AST)_t; match(_t,CENTERED); _t = _t.getNextSibling(); break; } case COLUMN: { AST __t1356 = _t; AST tmp160_AST_in = (AST)_t; match(_t,COLUMN); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t1356; _t = _t.getNextSibling(); break; } case CONTEXTHELP: { AST tmp161_AST_in = (AST)_t; match(_t,CONTEXTHELP); _t = _t.getNextSibling(); break; } case CONTEXTHELPFILE: { AST tmp162_AST_in = (AST)_t; match(_t,CONTEXTHELPFILE); _t = _t.getNextSibling(); expression(_t); _t = _retTree; break; } case DEFAULTBUTTON: { AST __t1357 = _t; AST tmp163_AST_in = (AST)_t; match(_t,DEFAULTBUTTON); _t = _t.getFirstChild(); field(_t); _t = _retTree; _t = __t1357; _t = _t.getNextSibling(); break; } case EXPORT: { AST tmp164_AST_in = (AST)_t; match(_t,EXPORT); _t = _t.getNextSibling(); break; } case FITLASTCOLUMN: { AST tmp165_AST_in = (AST)_t; match(_t,FITLASTCOLUMN); _t = _t.getNextSibling(); break; } case FONT: { AST __t1358 = _t; AST tmp166_AST_in = (AST)_t; match(_t,FONT); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t1358; _t = _t.getNextSibling(); break; } case FONTBASEDLAYOUT: { AST tmp167_AST_in = (AST)_t; match(_t,FONTBASEDLAYOUT); _t = _t.getNextSibling(); break; } case FRAME: { AST __t1359 = _t; AST tmp168_AST_in = (AST)_t; match(_t,FRAME); _t = _t.getFirstChild(); AST tmp169_AST_in = (AST)_t; match(_t,ID); _t = _t.getNextSibling(); _t = __t1359; _t = _t.getNextSibling(); break; } case LABELFONT: { AST __t1360 = _t; AST tmp170_AST_in = (AST)_t; match(_t,LABELFONT); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t1360; _t = _t.getNextSibling(); break; } case LABELDCOLOR: { AST __t1361 = _t; AST tmp171_AST_in = (AST)_t; match(_t,LABELDCOLOR); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t1361; _t = _t.getNextSibling(); break; } case LABELFGCOLOR: { AST __t1362 = _t; AST tmp172_AST_in = (AST)_t; match(_t,LABELFGCOLOR); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t1362; _t = _t.getNextSibling(); break; } case LABELBGCOLOR: { AST __t1363 = _t; AST tmp173_AST_in = (AST)_t; match(_t,LABELBGCOLOR); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t1363; _t = _t.getNextSibling(); break; } case MULTIPLE: { AST tmp174_AST_in = (AST)_t; match(_t,MULTIPLE); _t = _t.getNextSibling(); break; } case SINGLE: { AST tmp175_AST_in = (AST)_t; match(_t,SINGLE); _t = _t.getNextSibling(); break; } case SEPARATORS: { AST tmp176_AST_in = (AST)_t; match(_t,SEPARATORS); _t = _t.getNextSibling(); break; } case NOSEPARATORS: { AST tmp177_AST_in = (AST)_t; match(_t,NOSEPARATORS); _t = _t.getNextSibling(); break; } case NOASSIGN: { AST tmp178_AST_in = (AST)_t; match(_t,NOASSIGN); _t = _t.getNextSibling(); break; } case NOROWMARKERS: { AST tmp179_AST_in = (AST)_t; match(_t,NOROWMARKERS); _t = _t.getNextSibling(); break; } case NOSCROLLBARVERTICAL: { AST tmp180_AST_in = (AST)_t; match(_t,NOSCROLLBARVERTICAL); _t = _t.getNextSibling(); break; } case SCROLLBARVERTICAL: { AST tmp181_AST_in = (AST)_t; match(_t,SCROLLBARVERTICAL); _t = _t.getNextSibling(); break; } case ROWHEIGHTCHARS: { AST __t1364 = _t; AST tmp182_AST_in = (AST)_t; match(_t,ROWHEIGHTCHARS); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t1364; _t = _t.getNextSibling(); break; } case ROWHEIGHTPIXELS: { AST __t1365 = _t; AST tmp183_AST_in = (AST)_t; match(_t,ROWHEIGHTPIXELS); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t1365; _t = _t.getNextSibling(); break; } case EXPANDABLE: { AST tmp184_AST_in = (AST)_t; match(_t,EXPANDABLE); _t = _t.getNextSibling(); break; } case DROPTARGET: { AST tmp185_AST_in = (AST)_t; match(_t,DROPTARGET); _t = _t.getNextSibling(); break; } case NOAUTOVALIDATE: { AST tmp186_AST_in = (AST)_t; match(_t,NOAUTOVALIDATE); _t = _t.getNextSibling(); break; } case NOCOLUMNSCROLLING: { AST tmp187_AST_in = (AST)_t; match(_t,NOCOLUMNSCROLLING); _t = _t.getNextSibling(); break; } case KEEPTABORDER: { AST tmp188_AST_in = (AST)_t; match(_t,KEEPTABORDER); _t = _t.getNextSibling(); break; } case NOBOX: { AST tmp189_AST_in = (AST)_t; match(_t,NOBOX); _t = _t.getNextSibling(); break; } case NOEMPTYSPACE: { AST tmp190_AST_in = (AST)_t; match(_t,NOEMPTYSPACE); _t = _t.getNextSibling(); break; } case NOHIDE: { AST tmp191_AST_in = (AST)_t; match(_t,NOHIDE); _t = _t.getNextSibling(); break; } case NOLABELS: { AST tmp192_AST_in = (AST)_t; match(_t,NOLABELS); _t = _t.getNextSibling(); break; } case USEDICTEXPS: { AST tmp193_AST_in = (AST)_t; match(_t,USEDICTEXPS); _t = _t.getNextSibling(); break; } case NOVALIDATE: { AST tmp194_AST_in = (AST)_t; match(_t,NOVALIDATE); _t = _t.getNextSibling(); break; } case NOHELP: { AST tmp195_AST_in = (AST)_t; match(_t,NOHELP); _t = _t.getNextSibling(); break; } case NOUNDERLINE: { AST tmp196_AST_in = (AST)_t; match(_t,NOUNDERLINE); _t = _t.getNextSibling(); break; } case OVERLAY: { AST tmp197_AST_in = (AST)_t; match(_t,OVERLAY); _t = _t.getNextSibling(); break; } case PAGEBOTTOM: { AST tmp198_AST_in = (AST)_t; match(_t,PAGEBOTTOM); _t = _t.getNextSibling(); break; } case PAGETOP: { AST tmp199_AST_in = (AST)_t; match(_t,PAGETOP); _t = _t.getNextSibling(); break; } case NOTABSTOP: { AST tmp200_AST_in = (AST)_t; match(_t,NOTABSTOP); _t = _t.getNextSibling(); break; } case RETAIN: { AST __t1366 = _t; AST tmp201_AST_in = (AST)_t; match(_t,RETAIN); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t1366; _t = _t.getNextSibling(); break; } case ROW: { AST __t1367 = _t; AST tmp202_AST_in = (AST)_t; match(_t,ROW); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t1367; _t = _t.getNextSibling(); break; } case SCREENIO: { AST tmp203_AST_in = (AST)_t; match(_t,SCREENIO); _t = _t.getNextSibling(); break; } case STREAMIO: { AST tmp204_AST_in = (AST)_t; match(_t,STREAMIO); _t = _t.getNextSibling(); break; } case SCROLL: { AST __t1368 = _t; AST tmp205_AST_in = (AST)_t; match(_t,SCROLL); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t1368; _t = _t.getNextSibling(); break; } case SCROLLABLE: { AST tmp206_AST_in = (AST)_t; match(_t,SCROLLABLE); _t = _t.getNextSibling(); break; } case SIDELABELS: { AST tmp207_AST_in = (AST)_t; match(_t,SIDELABELS); _t = _t.getNextSibling(); break; } case STREAM: { stream_name(_t); _t = _retTree; break; } case THREED: { AST tmp208_AST_in = (AST)_t; match(_t,THREED); _t = _t.getNextSibling(); break; } case TOOLTIP: { tooltip_expr(_t); _t = _retTree; break; } case TOPONLY: { AST tmp209_AST_in = (AST)_t; match(_t,TOPONLY); _t = _t.getNextSibling(); break; } case USETEXT: { AST tmp210_AST_in = (AST)_t; match(_t,USETEXT); _t = _t.getNextSibling(); break; } case V6FRAME: { AST tmp211_AST_in = (AST)_t; match(_t,V6FRAME); _t = _t.getNextSibling(); break; } case USEREVVIDEO: { AST tmp212_AST_in = (AST)_t; match(_t,USEREVVIDEO); _t = _t.getNextSibling(); break; } case USEUNDERLINE: { AST tmp213_AST_in = (AST)_t; match(_t,USEUNDERLINE); _t = _t.getNextSibling(); break; } case VIEWAS: { AST __t1369 = _t; AST tmp214_AST_in = (AST)_t; match(_t,VIEWAS); _t = _t.getFirstChild(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case DIALOGBOX: { AST __t1371 = _t; AST tmp215_AST_in = (AST)_t; match(_t,DIALOGBOX); _t = _t.getFirstChild(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case DIALOGHELP: { AST tmp216_AST_in = (AST)_t; match(_t,DIALOGHELP); _t = _t.getNextSibling(); { if (_t==null) _t=ASTNULL; if ((_tokenSet_4.member(_t.getType()))) { expression(_t); _t = _retTree; } else if ((_t.getType()==3)) { } else { throw new NoViableAltException(_t); } } break; } case 3: { break; } default: { throw new NoViableAltException(_t); } } } _t = __t1371; _t = _t.getNextSibling(); break; } case MESSAGELINE: { AST tmp217_AST_in = (AST)_t; match(_t,MESSAGELINE); _t = _t.getNextSibling(); break; } case STATUSBAR: { AST tmp218_AST_in = (AST)_t; match(_t,STATUSBAR); _t = _t.getNextSibling(); break; } case TOOLBAR: { AST __t1374 = _t; AST tmp219_AST_in = (AST)_t; match(_t,TOOLBAR); _t = _t.getFirstChild(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case ATTACHMENT: { AST tmp220_AST_in = (AST)_t; match(_t,ATTACHMENT); _t = _t.getNextSibling(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case TOP: { AST tmp221_AST_in = (AST)_t; match(_t,TOP); _t = _t.getNextSibling(); break; } case BOTTOM: { AST tmp222_AST_in = (AST)_t; match(_t,BOTTOM); _t = _t.getNextSibling(); break; } case LEFT: { AST tmp223_AST_in = (AST)_t; match(_t,LEFT); _t = _t.getNextSibling(); break; } case RIGHT: { AST tmp224_AST_in = (AST)_t; match(_t,RIGHT); _t = _t.getNextSibling(); break; } default: { throw new NoViableAltException(_t); } } } break; } case 3: { break; } default: { throw new NoViableAltException(_t); } } } _t = __t1374; _t = _t.getNextSibling(); break; } default: { throw new NoViableAltException(_t); } } } _t = __t1369; _t = _t.getNextSibling(); break; } case WIDTH: { AST __t1377 = _t; AST tmp225_AST_in = (AST)_t; match(_t,WIDTH); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t1377; _t = _t.getNextSibling(); break; } case IN_KW: { AST __t1378 = _t; AST tmp226_AST_in = (AST)_t; match(_t,IN_KW); _t = _t.getFirstChild(); AST tmp227_AST_in = (AST)_t; match(_t,WINDOW); _t = _t.getNextSibling(); expression(_t); _t = _retTree; _t = __t1378; _t = _t.getNextSibling(); break; } case BGCOLOR: case COLOR: case DCOLOR: case FGCOLOR: case PFCOLOR: { colorspecification(_t); _t = _retTree; break; } case AT: { atphrase(_t); _t = _retTree; break; } case SIZE: case SIZECHARS: case SIZEPIXELS: { sizephrase(_t); _t = _retTree; break; } case TITLE: { titlephrase(_t); _t = _retTree; break; } case With_columns: { AST __t1379 = _t; AST tmp228_AST_in = (AST)_t; match(_t,With_columns); _t = _t.getFirstChild(); expression(_t); _t = _retTree; AST tmp229_AST_in = (AST)_t; match(_t,COLUMNS); _t = _t.getNextSibling(); _t = __t1379; _t = _t.getNextSibling(); break; } case With_down: { AST __t1380 = _t; AST tmp230_AST_in = (AST)_t; match(_t,With_down); _t = _t.getFirstChild(); expression(_t); _t = _retTree; AST tmp231_AST_in = (AST)_t; match(_t,DOWN); _t = _t.getNextSibling(); _t = __t1380; _t = _t.getNextSibling(); break; } case DOWN: { AST tmp232_AST_in = (AST)_t; match(_t,DOWN); _t = _t.getNextSibling(); break; } case WIDGETID: { widget_id(_t); _t = _retTree; break; } case WITH: { AST tmp233_AST_in = (AST)_t; match(_t,WITH); _t = _t.getNextSibling(); break; } default: { break _loop1381; } } } while (true); } _t = __t1351; _t = _t.getNextSibling(); _retTree = _t; } | 13952 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13952/865876f0e6319c071fef156818ff116c276cfdff/JPTreeParser.java/clean/trunk/org.prorefactor.core/src/org/prorefactor/treeparserbase/JPTreeParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
2623,
9429,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
2623,
9429,
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,
2623,
9429,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
2623,
9429,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
13,
692,
446,
294,
261,
9053... |
return super.performOk(); } | if (clearUserSettings) IDEEncoding.clearUserEncodings(); encodingEditor.store(); return super.performOk(); } | public boolean performOk() { String setting = null; if (!defaultEncodingButton.getSelection()) setting = encodingCombo.getText(); if(clearUserSettings) IDEEncoding.clearUserEncodings(); if(hasNewEncoding(setting)) IDEEncoding.setResourceEncoding(setting); return super.performOk(); } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/22b03e49369c0d636219d7fbdbd8bd91ecb4078b/IDEEditorsPreferencePage.java/clean/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/IDEEditorsPreferencePage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
3073,
8809,
1435,
288,
2398,
202,
780,
3637,
273,
446,
31,
3639,
309,
16051,
1886,
4705,
3616,
18,
588,
6233,
10756,
1850,
202,
8920,
273,
2688,
16156,
18,
588,
1528,
5621,
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,
1071,
1250,
3073,
8809,
1435,
288,
2398,
202,
780,
3637,
273,
446,
31,
3639,
309,
16051,
1886,
4705,
3616,
18,
588,
6233,
10756,
1850,
202,
8920,
273,
2688,
16156,
18,
588,
1528,
5621,
77... |
List list = new ArrayList(mementos.length); | List list = new ArrayList(mementos.length); | static List readCategoryDefinitions( IMemento memento, String name, String pluginIdOverride) { if (memento == null || name == null) throw new NullPointerException(); IMemento[] mementos = memento.getChildren(name); if (mementos == null) throw new NullPointerException(); List list = new ArrayList(mementos.length); for (int i = 0; i < mementos.length; i++) list.add(readCategoryDefinition(mementos[i], pluginIdOverride)); return list; } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/664efbbd6fd6dba5c4d118b10afe31ab34b6890a/Persistence.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/commands/Persistence.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
3845,
987,
855,
4457,
7130,
12,
202,
202,
3445,
820,
83,
312,
820,
83,
16,
202,
202,
780,
508,
16,
202,
202,
780,
1909,
548,
6618,
13,
288,
202,
202,
430,
261,
81,
820,
83,
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,
225,
202,
3845,
987,
855,
4457,
7130,
12,
202,
202,
3445,
820,
83,
312,
820,
83,
16,
202,
202,
780,
508,
16,
202,
202,
780,
1909,
548,
6618,
13,
288,
202,
202,
430,
261,
81,
820,
83,
422... |
String source = "http: | String source = "http: | protected void createMetaAnnotations() { String source = "http://www.eclipse.org/gmf/2005/constraints/meta"; addAnnotation (getTypeModelFacet_ModelElementSelector(), source, new String[] { "def", "context", "ocl", "metaClass.ecoreClass" }); addAnnotation (valueExpressionEClass, source, new String[] { "def", "ValueSpec" }); addAnnotation (getValueExpression_Body(), source, new String[] { "def", "body" }); addAnnotation (getValueExpression_Language(), source, new String[] { "def", "lang" }); addAnnotation (modelElementSelectorEClass, source, new String[] { "def", "Constraint" }); addAnnotation (getGenFeatureSeqInitializer_Initializers(), source, new String[] { "def", "context", "ocl", "typeModelFacet.metaClass.ecoreClass" }); addAnnotation (genFeatureValueSpecEClass, source, new String[] { "def", "ValueSpec" }); addAnnotation (genFeatureValueSpecEClass, source, new String[] { "def", "type", "ocl", "feature.ecoreFeature" }); addAnnotation (getGenLinkConstraints_SourceEnd(), source, new String[] { "def", "context", "ocl", "getSourceEndContextClass().ecoreClass" }); addAnnotation (getGenLinkConstraints_SourceEnd(), source, new String[] { "def", "variable", "name", "oppositeEnd", "type.ocl", "getTargetEndContextClass().ecoreClass" }); addAnnotation (getGenLinkConstraints_TargetEnd(), source, new String[] { "def", "context", "ocl", "getTargetEndContextClass().ecoreClass" }); addAnnotation (getGenLinkConstraints_TargetEnd(), source, new String[] { "def", "variable", "name", "oppositeEnd", "type.ocl", "getSourceEndContextClass().ecoreClass" }); addAnnotation (getGenAuditRule_Rule(), source, new String[] { "def", "context", "ocl", "target.ecoreClass" }); } | 7409 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7409/a316ff755aeeb03851345a627f274adf9c4051ca/GMFGenPackageImpl.java/clean/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/GMFGenPackageImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
752,
2781,
5655,
1435,
288,
202,
202,
780,
1084,
273,
315,
2505,
2207,
5591,
18,
20416,
18,
3341,
19,
75,
16126,
19,
6976,
25,
19,
11967,
19,
3901,
14432,
6862,
6862,
68... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
752,
2781,
5655,
1435,
288,
202,
202,
780,
1084,
273,
315,
2505,
2207,
5591,
18,
20416,
18,
3341,
19,
75,
16126,
19,
6976,
25,
19,
11967,
19,
3901,
14432,
6862,
6862,
68... |
if (createLink == false) return createStatus(IStatus.OK, ""); | if (createLink == false) { return createStatus(IStatus.OK, ""); } | public IStatus validateLinkLocation(IResource linkHandle) { if (linkTargetField == null || linkTargetField.isDisposed()) return createStatus(IStatus.OK, ""); //$NON-NLS-1$ IWorkspace workspace = IDEWorkbenchPlugin.getPluginWorkspace(); IPath path = new Path(linkTarget); if (createLink == false) return createStatus(IStatus.OK, ""); //$NON-NLS-1$ if (path.isUNC()) { // print that path is not valid, but don't do core validation. See bug 90825. return createStatus(IStatus.WARNING, IDEWorkbenchMessages.CreateLinkedResourceGroup_unableToValidateLinkTarget); } IStatus locationStatus = workspace.validateLinkLocation(linkHandle, path); if (locationStatus.getSeverity() == IStatus.ERROR) return locationStatus; // use the resolved link target name String resolvedLinkTarget = resolvedPathLabelData.getText(); path = new Path(resolvedLinkTarget); IFileInfo linkTargetFile = IDEResourceInfoUtils.getFileInfo(resolvedLinkTarget); if (linkTargetFile != null && linkTargetFile.exists()) { IStatus fileTypeStatus = validateFileType(linkTargetFile); if (fileTypeStatus.isOK() == false) return fileTypeStatus; } else if (locationStatus.getSeverity() == IStatus.OK) { // locationStatus takes precedence over missing location warning. return createStatus( IStatus.WARNING, IDEWorkbenchMessages.CreateLinkedResourceGroup_linkTargetNonExistent); } return locationStatus; } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/e38d295ea613cf9f08aadb93a84a33d2e91abc5f/CreateLinkedResourceGroup.java/clean/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/CreateLinkedResourceGroup.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
467,
1482,
1954,
2098,
2735,
12,
45,
1420,
1692,
3259,
13,
288,
3639,
309,
261,
1232,
2326,
974,
422,
446,
747,
1692,
2326,
974,
18,
291,
1669,
7423,
10756,
5411,
327,
752,
1482,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
467,
1482,
1954,
2098,
2735,
12,
45,
1420,
1692,
3259,
13,
288,
3639,
309,
261,
1232,
2326,
974,
422,
446,
747,
1692,
2326,
974,
18,
291,
1669,
7423,
10756,
5411,
327,
752,
1482,
... |
String s1 = d[count].toString().trim(); String s2 = ("" + rs.getFloat("pk")).trim(); | String s1 = d[count].toString().trim(); String s2 = ("" + rs.getFloat("pk")).trim(); | public void testPrimaryKeyReal0024() throws Exception { Float d[] = { new Float(-1.0), new Float(1234.543), new Float(0.0), new Float(1), new Float(-2.0), new Float(0.14), new Float(0.79), new Float(1000000.12345), new Float(-1000000.12345), new Float(1000000), new Float(-1000000), new Float(3.4E+38), new Float(3.4E-38) }; Connection cx = getConnection(); dropTable("#t0024"); Statement stmt = cx.createStatement(); stmt.executeUpdate("" + "create table #t0024 " + " (pk real not null, " + " type char(30) not null, " + " b bit, " + " str char(30) not null, " + " t int identity(1,1), " +" primary key (pk, type)) "); PreparedStatement pStmt = cx.prepareStatement( "insert into #t0024 (pk, type, b, str) values(?, 'prepared', 0, ?)"); for (int i=0; i < d.length; i++) { pStmt.setFloat(1, d[i].floatValue()); pStmt.setString(2, (d[i]).toString()); int preparedCount = pStmt.executeUpdate(); assertTrue(preparedCount == 1); int adhocCount = stmt.executeUpdate("" + "insert into #t0024 " + " (pk, type, b, str) " + " values(" + " " + d[i] + ", " + " 'adhoc', " + " 1, " + " '" + d[i] + "') "); assertTrue(adhocCount == 1); } int count = 0; ResultSet rs = stmt.executeQuery("select * from #t0024 where type='prepared' order by t"); assertNotNull(rs); while (rs.next()) { String s1 = d[count].toString().trim(); String s2 = ("" + rs.getFloat("pk")).trim(); assertTrue(s1.equalsIgnoreCase(s2)); count++; } assertTrue(count == d.length); count = 0; rs = stmt.executeQuery("select * from #t0024 where type='adhoc' order by t"); while (rs.next()) { String s1 = d[count].toString().trim(); String s2 = ("" + rs.getFloat("pk")).trim(); assertTrue(s1.equalsIgnoreCase(s2)); count++; } assertTrue(count == d.length); } | 5753 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5753/3536f07067bcf3c572aa820c500e64c50499f6c5/TimestampTest.java/buggy/src/test/net/sourceforge/jtds/test/TimestampTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
11575,
6955,
713,
3247,
1435,
1216,
1185,
288,
3639,
5450,
302,
8526,
273,
3639,
288,
5411,
394,
5450,
19236,
21,
18,
20,
3631,
5411,
394,
5450,
12,
28462,
18,
6564,
23,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
11575,
6955,
713,
3247,
1435,
1216,
1185,
288,
3639,
5450,
302,
8526,
273,
3639,
288,
5411,
394,
5450,
19236,
21,
18,
20,
3631,
5411,
394,
5450,
12,
28462,
18,
6564,
23,
... |
public org.quickfix.field.UnderlyingCPRegType getUnderlyingCPRegType() throws FieldNotFound { org.quickfix.field.UnderlyingCPRegType value = new org.quickfix.field.UnderlyingCPRegType(); | public quickfix.field.UnderlyingCPRegType getUnderlyingCPRegType() throws FieldNotFound { quickfix.field.UnderlyingCPRegType value = new quickfix.field.UnderlyingCPRegType(); | public org.quickfix.field.UnderlyingCPRegType getUnderlyingCPRegType() throws FieldNotFound { org.quickfix.field.UnderlyingCPRegType value = new org.quickfix.field.UnderlyingCPRegType(); getField(value); return value; } | 8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/MarketDataIncrementalRefresh.java/clean/src/java/src/quickfix/fix44/MarketDataIncrementalRefresh.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
14655,
6291,
4258,
1617,
559,
10833,
765,
6291,
4258,
1617,
559,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
14655,
629... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
14655,
6291,
4258,
1617,
559,
10833,
765,
6291,
4258,
1617,
559,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
14655,
629... |
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:975: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("974: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:975:17: '!' { match('!'); if (failed) return ; } break; case 2 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:975:23: '@' { match('@'); if (failed) return ; } break; case 3 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:975:29: '$' { match('$'); if (failed) return ; } break; case 4 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:975:35: '%' { match('%'); if (failed) return ; } break; case 5 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:975:41: '^' { match('^'); if (failed) return ; } break; case 6 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:975:47: '&' { match('&'); if (failed) return ; } break; case 7 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:975:53: '*' { match('*'); if (failed) return ; } break; case 8 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:975:59: '_' { match('_'); if (failed) return ; } break; case 9 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:975:65: '-' { match('-'); if (failed) return ; } break; case 10 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:975:71: '+' { match('+'); if (failed) return ; } break; case 11 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:976:19: '|' { match('|'); if (failed) return ; } break; case 12 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:976:25: ',' { match(','); if (failed) return ; } break; case 13 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:976:31: '{' { match('{'); if (failed) return ; } break; case 14 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:976:37: '}' { match('}'); if (failed) return ; } break; case 15 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:976:43: '[' { match('['); if (failed) return ; } break; case 16 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:976:49: ']' { match(']'); if (failed) return ; } break; case 17 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:976:55: '=' { match('='); if (failed) return ; } break; case 18 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:976:61: '/' { match('/'); if (failed) return ; } break; case 19 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:976:67: '(' { match('('); if (failed) return ; } break; case 20 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:976:73: ')' { match(')'); if (failed) return ; } break; case 21 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:976:79: '\'' { match('\''); if (failed) return ; } break; case 22 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:976:86: '\\' { match('\\'); if (failed) return ; } break; case 23 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:977:19: '||' { match("||"); if (failed) return ; } break; case 24 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:977:26: '&&' { match("&&"); if (failed) return ; } break; case 25 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:977:33: '<<<' { match("<<<"); if (failed) return ; } break; case 26 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:977:41: '++' { match("++"); if (failed) return ; } break; case 27 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:977:48: '--' { match("--"); if (failed) return ; } break; case 28 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:977:55: '>>>' { match(">>>"); if (failed) return ; } break; case 29 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:977:63: '==' { match("=="); if (failed) return ; } break; case 30 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:977:70: '+=' { match("+="); if (failed) return ; } break; case 31 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:977:77: '=+' { match("=+"); if (failed) return ; } break; case 32 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:977:84: '-=' { match("-="); if (failed) return ; } break; case 33 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:977:91: '=-' { match("=-"); if (failed) return ; } break; case 34 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:977:97: '*=' { match("*="); if (failed) return ; } break; case 35 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:977:104: '=*' { match("=*"); if (failed) return ; } break; case 36 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:978:19: '/=' { match("/="); if (failed) return ; } break; case 37 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:978: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/cdf6cb875caeaced53629d36cdc1a31cdc22d9ca/RuleParserLexer.java/clean/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,
... | ||
xstream = new XStream(new XppDriver()); | objectToXml = new ObjectToXml(); | public void initialise() throws InitialisationException { xstream = new XStream(new XppDriver()); remoteTransformer = new XmlToObject(); remoteTransformer.setReturnClass(AdminNotification.class); } | 28323 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/28323/e4a596928caf8df6fd4e25eaf0066305766f0ed9/MuleManagerComponent.java/buggy/src/java/org/mule/impl/internal/admin/MuleManagerComponent.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
21301,
1435,
1216,
10188,
10742,
503,
565,
288,
3639,
733,
774,
4432,
273,
394,
1033,
774,
4432,
5621,
3639,
2632,
8319,
273,
394,
5714,
19121,
5621,
3639,
2632,
8319,
18,
542,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
21301,
1435,
1216,
10188,
10742,
503,
565,
288,
3639,
733,
774,
4432,
273,
394,
1033,
774,
4432,
5621,
3639,
2632,
8319,
273,
394,
5714,
19121,
5621,
3639,
2632,
8319,
18,
542,
... |
if (isPreciseType && target != null) { methOp.refine(target, true); } | private void generateFrom(int fromIndex) { if (DBG_BB || DBG_SELECTED) { db("generating code into " + currentBBLE + " with runoff " + runoff); } currentBBLE.setGenerated(); endOfBasicBlock = fallThrough = false; lastInstr = null; bcodes.reset(fromIndex); while (true) { // Must keep currentBBLE.high up-to-date in case we try to jump into // the middle of the block we're currently generating. Simply updating // high once endsBasicBlock is true doesn't enable us to catch this case. currentBBLE.high = instrIndex = bcodes.index(); int code = bcodes.nextInstruction(); if (DBG_BCPARSE) { db("parsing " + instrIndex + " " + code + " : 0x" + Integer.toHexString(code)); } OPT_Instruction s = null; //-#if RVM_WITH_OSR lastOsrBarrier = null; //-#endif switch (code) { case JBC_nop: break; case JBC_aconst_null: push(new OPT_NullConstantOperand()); break; case JBC_iconst_m1:case JBC_iconst_0:case JBC_iconst_1: case JBC_iconst_2:case JBC_iconst_3:case JBC_iconst_4: case JBC_iconst_5: push(new OPT_IntConstantOperand(code - JBC_iconst_0)); break; case JBC_lconst_0:case JBC_lconst_1: pushDual(new OPT_LongConstantOperand(code - JBC_lconst_0)); break; case JBC_fconst_0: push(new OPT_FloatConstantOperand(0.f)); break; case JBC_fconst_1: push(new OPT_FloatConstantOperand(1.f)); break; case JBC_fconst_2: push(new OPT_FloatConstantOperand(2.f)); break; case JBC_dconst_0: pushDual(new OPT_DoubleConstantOperand(0.)); break; case JBC_dconst_1: pushDual(new OPT_DoubleConstantOperand(1.)); break; case JBC_bipush: push(new OPT_IntConstantOperand(bcodes.getByteValue())); break; case JBC_sipush: push(new OPT_IntConstantOperand(bcodes.getShortValue())); break; case JBC_ldc: push(getConstantOperand(bcodes.getConstantIndex())); break; case JBC_ldc_w: push(getConstantOperand(bcodes.getWideConstantIndex())); break; case JBC_ldc2_w: pushDual(getConstantOperand(bcodes.getWideConstantIndex())); break; case JBC_iload: s = do_iload(bcodes.getLocalNumber()); break; case JBC_lload: s = do_lload(bcodes.getLocalNumber()); break; case JBC_fload: s = do_fload(bcodes.getLocalNumber()); break; case JBC_dload: s = do_dload(bcodes.getLocalNumber()); break; case JBC_aload: s = do_aload(bcodes.getLocalNumber()); break; case JBC_iload_0:case JBC_iload_1:case JBC_iload_2:case JBC_iload_3: s = do_iload(code - JBC_iload_0); break; case JBC_lload_0:case JBC_lload_1:case JBC_lload_2:case JBC_lload_3: s = do_lload(code - JBC_lload_0); break; case JBC_fload_0:case JBC_fload_1:case JBC_fload_2:case JBC_fload_3: s = do_fload(code - JBC_fload_0); break; case JBC_dload_0:case JBC_dload_1:case JBC_dload_2:case JBC_dload_3: s = do_dload(code - JBC_dload_0); break; case JBC_aload_0:case JBC_aload_1:case JBC_aload_2:case JBC_aload_3: s = do_aload(code - JBC_aload_0); break; case JBC_iaload: { OPT_Operand index = popInt(); OPT_Operand ref = pop(); clearCurrentGuard(); if (do_NullCheck(ref) || do_BoundsCheck(ref, index)) break; if (VM.VerifyAssertions) assertIsType(ref, VM_TypeReference.IntArray); s = _aloadHelper(INT_ALOAD, ref, index, VM_TypeReference.Int); } break; case JBC_laload: { OPT_Operand index = popInt(); OPT_Operand ref = pop(); clearCurrentGuard(); if (do_NullCheck(ref) || do_BoundsCheck(ref, index)) break; if (VM.VerifyAssertions) assertIsType(ref, VM_TypeReference.LongArray); s = _aloadHelper(LONG_ALOAD, ref, index, VM_TypeReference.Long); } break; case JBC_faload: { OPT_Operand index = popInt(); OPT_Operand ref = pop(); clearCurrentGuard(); if (do_NullCheck(ref) || do_BoundsCheck(ref, index)) break; if (VM.VerifyAssertions) assertIsType(ref, VM_TypeReference.FloatArray); s = _aloadHelper(FLOAT_ALOAD, ref, index, VM_TypeReference.Float); } break; case JBC_daload: { OPT_Operand index = popInt(); OPT_Operand ref = pop(); clearCurrentGuard(); if (do_NullCheck(ref) || do_BoundsCheck(ref, index)) break; if (VM.VerifyAssertions) assertIsType(ref, VM_TypeReference.DoubleArray); s = _aloadHelper(DOUBLE_ALOAD, ref, index, VM_TypeReference.Double); } break; case JBC_aaload: { OPT_Operand index = popInt(); OPT_Operand ref = pop(); clearCurrentGuard(); if (do_NullCheck(ref) || do_BoundsCheck(ref, index)) break; VM_TypeReference type = getRefTypeOf(ref).getArrayElementType(); if (VM.VerifyAssertions) VM._assert(type.isReferenceType()); s = _aloadHelper(REF_ALOAD, ref, index, type); } break; case JBC_baload: { OPT_Operand index = popInt(); OPT_Operand ref = pop(); clearCurrentGuard(); if (do_NullCheck(ref) || do_BoundsCheck(ref, index)) break; VM_TypeReference type = getArrayTypeOf(ref); if (VM.VerifyAssertions) { VM._assert(type == VM_TypeReference.ByteArray || type == VM_TypeReference.BooleanArray); } if (type == VM_TypeReference.ByteArray) s = _aloadHelper(BYTE_ALOAD, ref, index, VM_TypeReference.Byte); else s = _aloadHelper(UBYTE_ALOAD, ref, index, VM_TypeReference.Boolean); } break; case JBC_caload: { OPT_Operand index = popInt(); OPT_Operand ref = pop(); clearCurrentGuard(); if (do_NullCheck(ref) || do_BoundsCheck(ref, index)) break; if (VM.VerifyAssertions) assertIsType(ref, VM_TypeReference.CharArray); s = _aloadHelper(USHORT_ALOAD, ref, index, VM_TypeReference.Char); } break; case JBC_saload: { OPT_Operand index = popInt(); OPT_Operand ref = pop(); clearCurrentGuard(); if (do_NullCheck(ref) || do_BoundsCheck(ref, index)) break; if (VM.VerifyAssertions) assertIsType(ref, VM_TypeReference.ShortArray); s = _aloadHelper(SHORT_ALOAD, ref, index, VM_TypeReference.Short); } break; case JBC_istore: s = do_store(bcodes.getLocalNumber(), popInt()); break; case JBC_lstore: s = do_store(bcodes.getLocalNumber(), popLong()); break; case JBC_fstore: s = do_store(bcodes.getLocalNumber(), popFloat()); break; case JBC_dstore: s = do_store(bcodes.getLocalNumber(), popDouble()); break; case JBC_astore: s = do_astore(bcodes.getLocalNumber()); break; case JBC_istore_0:case JBC_istore_1:case JBC_istore_2:case JBC_istore_3: s = do_store(code - JBC_istore_0, popInt()); break; case JBC_lstore_0:case JBC_lstore_1:case JBC_lstore_2:case JBC_lstore_3: s = do_store(code - JBC_lstore_0, popLong()); break; case JBC_fstore_0:case JBC_fstore_1:case JBC_fstore_2:case JBC_fstore_3: s = do_store(code - JBC_fstore_0, popFloat()); break; case JBC_dstore_0:case JBC_dstore_1:case JBC_dstore_2:case JBC_dstore_3: s = do_store(code - JBC_dstore_0, popDouble()); break; case JBC_astore_0:case JBC_astore_1:case JBC_astore_2:case JBC_astore_3: s = do_astore(code - JBC_astore_0); break; case JBC_iastore: { OPT_Operand val = popInt(); OPT_Operand index = popInt(); OPT_Operand ref = pop(); clearCurrentGuard(); if (do_NullCheck(ref) || do_BoundsCheck(ref, index)) break; if (VM.VerifyAssertions) assertIsType(ref, VM_TypeReference.IntArray); s = AStore.create(INT_ASTORE, val, ref, index, new OPT_LocationOperand(VM_TypeReference.Int), getCurrentGuard()); } break; case JBC_lastore: { OPT_Operand val = popLong(); OPT_Operand index = popInt(); OPT_Operand ref = pop(); clearCurrentGuard(); if (do_NullCheck(ref) || do_BoundsCheck(ref, index)) break; if (VM.VerifyAssertions) assertIsType(ref, VM_TypeReference.LongArray); s = AStore.create(LONG_ASTORE, val, ref, index, new OPT_LocationOperand(VM_TypeReference.Long), getCurrentGuard()); } break; case JBC_fastore: { OPT_Operand val = popFloat(); OPT_Operand index = popInt(); OPT_Operand ref = pop(); clearCurrentGuard(); if (do_NullCheck(ref) || do_BoundsCheck(ref, index)) break; if (VM.VerifyAssertions) assertIsType(ref, VM_TypeReference.FloatArray); s = AStore.create(FLOAT_ASTORE, val, ref, index, new OPT_LocationOperand(VM_TypeReference.Float), getCurrentGuard()); } break; case JBC_dastore: { OPT_Operand val = popDouble(); OPT_Operand index = popInt(); OPT_Operand ref = pop(); clearCurrentGuard(); if (do_NullCheck(ref) || do_BoundsCheck(ref, index)) break; if (VM.VerifyAssertions) assertIsType(ref, VM_TypeReference.DoubleArray); s = AStore.create(DOUBLE_ASTORE, val, ref, index, new OPT_LocationOperand(VM_TypeReference.Double), getCurrentGuard()); } break; case JBC_aastore: { OPT_Operand val = pop(); OPT_Operand index = popInt(); OPT_Operand ref = pop(); clearCurrentGuard(); if (do_NullCheck(ref) || do_BoundsCheck(ref, index)) break; VM_TypeReference type = getRefTypeOf(ref).getArrayElementType(); if (VM.VerifyAssertions) VM._assert(type.isReferenceType()); if (do_CheckStore(ref, val, type)) break; s = AStore.create(REF_ASTORE, val, ref, index, new OPT_LocationOperand(type), getCurrentGuard()); } break; case JBC_bastore: { OPT_Operand val = popInt(); OPT_Operand index = popInt(); OPT_Operand ref = pop(); clearCurrentGuard(); if (do_NullCheck(ref) || do_BoundsCheck(ref, index)) break; VM_TypeReference type = getArrayTypeOf(ref); if (VM.VerifyAssertions) { VM._assert(type == VM_TypeReference.ByteArray || type == VM_TypeReference.BooleanArray); } if (type == VM_TypeReference.ByteArray) type = VM_TypeReference.Byte; else type = VM_TypeReference.Boolean; s = AStore.create(BYTE_ASTORE, val, ref, index, new OPT_LocationOperand(type), getCurrentGuard()); } break; case JBC_castore: { OPT_Operand val = popInt(); OPT_Operand index = popInt(); OPT_Operand ref = pop(); clearCurrentGuard(); if (do_NullCheck(ref) || do_BoundsCheck(ref, index)) break; if (VM.VerifyAssertions) assertIsType(ref, VM_TypeReference.CharArray); s = AStore.create(SHORT_ASTORE, val, ref, index, new OPT_LocationOperand(VM_TypeReference.Char), getCurrentGuard()); } break; case JBC_sastore: { OPT_Operand val = popInt(); OPT_Operand index = popInt(); OPT_Operand ref = pop(); clearCurrentGuard(); if (do_NullCheck(ref) || do_BoundsCheck(ref, index)) break; if (VM.VerifyAssertions) assertIsType(ref, VM_TypeReference.ShortArray); s = AStore.create(SHORT_ASTORE, val, ref, index, new OPT_LocationOperand(VM_TypeReference.Short), getCurrentGuard()); } break; case JBC_pop: stack.pop(); break; case JBC_pop2: stack.pop2(); break; case JBC_dup: { OPT_Operand op1 = stack.pop(); stack.push(op1); s = pushCopy(op1); } break; case JBC_dup_x1: { OPT_Operand op1 = stack.pop(); OPT_Operand op2 = stack.pop(); stack.push(op1); stack.push(op2); s = pushCopy(op1); } break; case JBC_dup_x2: { OPT_Operand op1 = stack.pop(); OPT_Operand op2 = stack.pop(); OPT_Operand op3 = stack.pop(); stack.push(op1); stack.push(op3); stack.push(op2); s = pushCopy(op1); } break; case JBC_dup2: { OPT_Operand op1 = stack.pop(); OPT_Operand op2 = stack.pop(); stack.push(op2); stack.push(op1); s = pushCopy(op2); if (s != null) { appendInstruction(s); s = null; } s = pushCopy(op1); } break; case JBC_dup2_x1: { OPT_Operand op1 = stack.pop(); OPT_Operand op2 = stack.pop(); OPT_Operand op3 = stack.pop(); stack.push(op2); stack.push(op1); stack.push(op3); s = pushCopy(op2); if (s != null) { appendInstruction(s); s = null; } s = pushCopy(op1); } break; case JBC_dup2_x2: { OPT_Operand op1 = stack.pop(); OPT_Operand op2 = stack.pop(); OPT_Operand op3 = stack.pop(); OPT_Operand op4 = stack.pop(); stack.push(op2); stack.push(op1); stack.push(op4); stack.push(op3); s = pushCopy(op2); if (s != null) { appendInstruction(s); s = null; } s = pushCopy(op1); } break; case JBC_swap: { OPT_Operand op1 = stack.pop(); OPT_Operand op2 = stack.pop(); stack.push(op1); stack.push(op2); } break; case JBC_iadd: { OPT_Operand op2 = popInt(); OPT_Operand op1 = popInt(); s = _binaryHelper(INT_ADD, op1, op2, VM_TypeReference.Int); } break; case JBC_ladd: { OPT_Operand op2 = popLong(); OPT_Operand op1 = popLong(); s = _binaryDualHelper(LONG_ADD, op1, op2, VM_TypeReference.Long); } break; case JBC_fadd: { OPT_Operand op2 = popFloat(); OPT_Operand op1 = popFloat(); s = _binaryHelper(FLOAT_ADD, op1, op2, VM_TypeReference.Float); } break; case JBC_dadd: { OPT_Operand op2 = popDouble(); OPT_Operand op1 = popDouble(); s = _binaryDualHelper(DOUBLE_ADD, op1, op2, VM_TypeReference.Double); } break; case JBC_isub: { OPT_Operand op2 = popInt(); OPT_Operand op1 = popInt(); s = _binaryHelper(INT_SUB, op1, op2, VM_TypeReference.Int); } break; case JBC_lsub: { OPT_Operand op2 = popLong(); OPT_Operand op1 = popLong(); s = _binaryDualHelper(LONG_SUB, op1, op2, VM_TypeReference.Long); } break; case JBC_fsub: { OPT_Operand op2 = popFloat(); OPT_Operand op1 = popFloat(); s = _binaryHelper(FLOAT_SUB, op1, op2, VM_TypeReference.Float); } break; case JBC_dsub: { OPT_Operand op2 = popDouble(); OPT_Operand op1 = popDouble(); s = _binaryDualHelper(DOUBLE_SUB, op1, op2, VM_TypeReference.Double); } break; case JBC_imul: { OPT_Operand op2 = popInt(); OPT_Operand op1 = popInt(); s = _binaryHelper(INT_MUL, op1, op2, VM_TypeReference.Int); } break; case JBC_lmul: { OPT_Operand op2 = popLong(); OPT_Operand op1 = popLong(); s = _binaryDualHelper(LONG_MUL, op1, op2, VM_TypeReference.Long); } break; case JBC_fmul: { OPT_Operand op2 = popFloat(); OPT_Operand op1 = popFloat(); s = _binaryHelper(FLOAT_MUL, op1, op2, VM_TypeReference.Float); } break; case JBC_dmul: { OPT_Operand op2 = popDouble(); OPT_Operand op1 = popDouble(); s = _binaryDualHelper(DOUBLE_MUL, op1, op2, VM_TypeReference.Double); } break; case JBC_idiv: { clearCurrentGuard(); OPT_Operand op2 = popInt(); OPT_Operand op1 = popInt(); if (do_IntZeroCheck(op2)) break; s = _guardedBinaryHelper(INT_DIV, op1, op2, getCurrentGuard(), VM_TypeReference.Int); } break; case JBC_ldiv: { clearCurrentGuard(); OPT_Operand op2 = popLong(); OPT_Operand op1 = popLong(); if (do_LongZeroCheck(op2)) break; s = _guardedBinaryDualHelper(LONG_DIV, op1, op2, getCurrentGuard(), VM_TypeReference.Long); } break; case JBC_fdiv: { OPT_Operand op2 = popFloat(); OPT_Operand op1 = popFloat(); s = _binaryHelper(FLOAT_DIV, op1, op2, VM_TypeReference.Float); } break; case JBC_ddiv: { OPT_Operand op2 = popDouble(); OPT_Operand op1 = popDouble(); s = _binaryDualHelper(DOUBLE_DIV, op1, op2, VM_TypeReference.Double); } break; case JBC_irem: { clearCurrentGuard(); OPT_Operand op2 = popInt(); OPT_Operand op1 = popInt(); if (do_IntZeroCheck(op2)) break; s = _guardedBinaryHelper(INT_REM, op1, op2, getCurrentGuard(), VM_TypeReference.Int); } break; case JBC_lrem: { clearCurrentGuard(); OPT_Operand op2 = popLong(); OPT_Operand op1 = popLong(); if (do_LongZeroCheck(op2)) break; s = _guardedBinaryDualHelper(LONG_REM, op1, op2, getCurrentGuard(), VM_TypeReference.Long); } break; case JBC_frem: { OPT_Operand op2 = popFloat(); OPT_Operand op1 = popFloat(); s = _binaryHelper(FLOAT_REM, op1, op2, VM_TypeReference.Float); } break; case JBC_drem: { OPT_Operand op2 = popDouble(); OPT_Operand op1 = popDouble(); s = _binaryDualHelper(DOUBLE_REM, op1, op2, VM_TypeReference.Double); } break; case JBC_ineg: s = _unaryHelper(INT_NEG, popInt(), VM_TypeReference.Int); break; case JBC_lneg: s = _unaryDualHelper(LONG_NEG, popLong(), VM_TypeReference.Long); break; case JBC_fneg: s = _unaryHelper(FLOAT_NEG, popFloat(), VM_TypeReference.Float); break; case JBC_dneg: s = _unaryDualHelper(DOUBLE_NEG, popDouble(), VM_TypeReference.Double); break; case JBC_ishl: { OPT_Operand op2 = popInt(); OPT_Operand op1 = popInt(); s = _binaryHelper(INT_SHL, op1, op2, VM_TypeReference.Int); } break; case JBC_lshl: { OPT_Operand op2 = popInt(); OPT_Operand op1 = popLong(); s = _binaryDualHelper(LONG_SHL, op1, op2, VM_TypeReference.Long); } break; case JBC_ishr: { OPT_Operand op2 = popInt(); OPT_Operand op1 = popInt(); s = _binaryHelper(INT_SHR, op1, op2, VM_TypeReference.Int); } break; case JBC_lshr: { OPT_Operand op2 = popInt(); OPT_Operand op1 = popLong(); s = _binaryDualHelper(LONG_SHR, op1, op2, VM_TypeReference.Long); } break; case JBC_iushr: { OPT_Operand op2 = popInt(); OPT_Operand op1 = popInt(); s = _binaryHelper(INT_USHR, op1, op2, VM_TypeReference.Int); } break; case JBC_lushr: { OPT_Operand op2 = popInt(); OPT_Operand op1 = popLong(); s = _binaryDualHelper(LONG_USHR, op1, op2, VM_TypeReference.Long); } break; case JBC_iand: { OPT_Operand op2 = popInt(); OPT_Operand op1 = popInt(); s = _binaryHelper(INT_AND, op1, op2, VM_TypeReference.Int); } break; case JBC_land: { OPT_Operand op2 = popLong(); OPT_Operand op1 = popLong(); s = _binaryDualHelper(LONG_AND, op1, op2, VM_TypeReference.Long); } break; case JBC_ior: { OPT_Operand op2 = popInt(); OPT_Operand op1 = popInt(); s = _binaryHelper(INT_OR, op1, op2, VM_TypeReference.Int); } break; case JBC_lor: { OPT_Operand op2 = popLong(); OPT_Operand op1 = popLong(); s = _binaryDualHelper(LONG_OR, op1, op2, VM_TypeReference.Long); } break; case JBC_ixor: { OPT_Operand op2 = popInt(); OPT_Operand op1 = popInt(); s = _binaryHelper(INT_XOR, op1, op2, VM_TypeReference.Int); } break; case JBC_lxor: { OPT_Operand op2 = popLong(); OPT_Operand op1 = popLong(); s = _binaryDualHelper(LONG_XOR, op1, op2, VM_TypeReference.Long); } break; case JBC_iinc: { int index = bcodes.getLocalNumber(); s = do_iinc(index, bcodes.getIncrement()); } break; case JBC_i2l: s = _unaryDualHelper(INT_2LONG, popInt(), VM_TypeReference.Long); break; case JBC_i2f: s = _unaryHelper(INT_2FLOAT, popInt(), VM_TypeReference.Float); break; case JBC_i2d: s = _unaryDualHelper(INT_2DOUBLE, popInt(), VM_TypeReference.Double); break; case JBC_l2i: s = _unaryHelper(LONG_2INT, popLong(), VM_TypeReference.Int); break; case JBC_l2f: s = _unaryHelper(LONG_2FLOAT, popLong(), VM_TypeReference.Float); break; case JBC_l2d: s = _unaryDualHelper(LONG_2DOUBLE, popLong(), VM_TypeReference.Double); break; case JBC_f2i: s = _unaryHelper(FLOAT_2INT, popFloat(), VM_TypeReference.Int); break; case JBC_f2l: s = _unaryDualHelper(FLOAT_2LONG, popFloat(), VM_TypeReference.Long); break; case JBC_f2d: s = _unaryDualHelper(FLOAT_2DOUBLE, popFloat(), VM_TypeReference.Double); break; case JBC_d2i: s = _unaryHelper(DOUBLE_2INT, popDouble(), VM_TypeReference.Int); break; case JBC_d2l: s = _unaryDualHelper(DOUBLE_2LONG, popDouble(), VM_TypeReference.Long); break; case JBC_d2f: s = _unaryHelper(DOUBLE_2FLOAT, popDouble(), VM_TypeReference.Float); break; case JBC_int2byte: s = _unaryHelper(INT_2BYTE, popInt(), VM_TypeReference.Byte); break; case JBC_int2char: s = _unaryHelper(INT_2USHORT, popInt(), VM_TypeReference.Char); break; case JBC_int2short: s = _unaryHelper(INT_2SHORT, popInt(), VM_TypeReference.Short); break; case JBC_lcmp: { OPT_Operand op2 = popLong(); OPT_Operand op1 = popLong(); s = _binaryHelper(LONG_CMP, op1, op2, VM_TypeReference.Int); } break; case JBC_fcmpl: { OPT_Operand op2 = popFloat(); OPT_Operand op1 = popFloat(); s = _binaryHelper(FLOAT_CMPL, op1, op2, VM_TypeReference.Int); } break; case JBC_fcmpg: { OPT_Operand op2 = popFloat(); OPT_Operand op1 = popFloat(); s = _binaryHelper(FLOAT_CMPG, op1, op2, VM_TypeReference.Int); } break; case JBC_dcmpl: { OPT_Operand op2 = popDouble(); OPT_Operand op1 = popDouble(); s = _binaryHelper(DOUBLE_CMPL, op1, op2, VM_TypeReference.Int); } break; case JBC_dcmpg: { OPT_Operand op2 = popDouble(); OPT_Operand op1 = popDouble(); s = _binaryHelper(DOUBLE_CMPG, op1, op2, VM_TypeReference.Int); } break; case JBC_ifeq: s = _intIfHelper(OPT_ConditionOperand.EQUAL()); break; case JBC_ifne: s = _intIfHelper(OPT_ConditionOperand.NOT_EQUAL()); break; case JBC_iflt: s = _intIfHelper(OPT_ConditionOperand.LESS()); break; case JBC_ifge: s = _intIfHelper(OPT_ConditionOperand.GREATER_EQUAL()); break; case JBC_ifgt: s = _intIfHelper(OPT_ConditionOperand.GREATER()); break; case JBC_ifle: s = _intIfHelper(OPT_ConditionOperand.LESS_EQUAL()); break; case JBC_if_icmpeq: s = _intIfCmpHelper(OPT_ConditionOperand.EQUAL()); break; case JBC_if_icmpne: s = _intIfCmpHelper(OPT_ConditionOperand.NOT_EQUAL()); break; case JBC_if_icmplt: s = _intIfCmpHelper(OPT_ConditionOperand.LESS()); break; case JBC_if_icmpge: s = _intIfCmpHelper(OPT_ConditionOperand.GREATER_EQUAL()); break; case JBC_if_icmpgt: s = _intIfCmpHelper(OPT_ConditionOperand.GREATER()); break; case JBC_if_icmple: s = _intIfCmpHelper(OPT_ConditionOperand.LESS_EQUAL()); break; case JBC_if_acmpeq: s = _refIfCmpHelper(OPT_ConditionOperand.EQUAL()); break; case JBC_if_acmpne: s = _refIfCmpHelper(OPT_ConditionOperand.NOT_EQUAL()); break; case JBC_goto: { int offset = bcodes.getBranchOffset(); if (offset != 3) // skip generating frivolous goto's s = _gotoHelper(offset); } break; case JBC_jsr: s = _jsrHelper(bcodes.getBranchOffset()); break; case JBC_ret: s = _retHelper(bcodes.getLocalNumber()); break; case JBC_tableswitch: { bcodes.alignSwitch(); OPT_Operand op0 = popInt(); int defaultoff = bcodes.getDefaultSwitchOffset(); int low = bcodes.getLowSwitchValue(); int high = bcodes.getHighSwitchValue(); int number = high - low + 1; if (CF_TABLESWITCH && op0 instanceof OPT_IntConstantOperand) { int v1 = ((OPT_IntConstantOperand)op0).value; int match = bcodes.computeTableSwitchOffset(v1, low, high); int offset = match == 0 ? defaultoff : match; bcodes.skipTableSwitchOffsets(number); if (DBG_CF) { db("changed tableswitch to goto because index (" + v1 + ") is constant"); } s = _gotoHelper(offset); break; } s = TableSwitch.create(TABLESWITCH, op0, null, null, new OPT_IntConstantOperand(low), new OPT_IntConstantOperand(high), generateTarget(defaultoff), null, number*2); for (int i = 0; i < number; ++i) { TableSwitch.setTarget(s, i, generateTarget(bcodes.getTableSwitchOffset(i))); } bcodes.skipTableSwitchOffsets(number); // Set branch probabilities//-#if RVM_WITH_OSR VM_SwitchBranchProfile sp = gc.getSwitchProfile(instrIndex-bciAdjustment);//-#else VM_SwitchBranchProfile sp = gc.getSwitchProfile(instrIndex);//-#endif if (sp == null) { float approxProb = 1.0f/(float)(number+1); // number targets + default TableSwitch.setDefaultBranchProfile(s, new OPT_BranchProfileOperand(approxProb)); for (int i = 0; i < number; ++i) { TableSwitch.setBranchProfile(s, i, new OPT_BranchProfileOperand(approxProb)); } } else { TableSwitch.setDefaultBranchProfile(s, new OPT_BranchProfileOperand(sp.getDefaultProbability())); for (int i = 0; i < number; ++i) { TableSwitch.setBranchProfile(s, i, new OPT_BranchProfileOperand(sp.getCaseProbability(i))); } } } break; case JBC_lookupswitch: { bcodes.alignSwitch(); OPT_Operand op0 = popInt(); int defaultoff = bcodes.getDefaultSwitchOffset(); int numpairs = bcodes.getSwitchLength(); if (numpairs == 0) { s = _gotoHelper(defaultoff); break; } if (CF_LOOKUPSWITCH && op0 instanceof OPT_IntConstantOperand) { int v1 = ((OPT_IntConstantOperand)op0).value; int match = bcodes.computeLookupSwitchOffset(v1, numpairs); int offset = match == 0 ? defaultoff : match; bcodes.skipLookupSwitchPairs(numpairs); if (DBG_CF) { db("changed lookupswitch to goto because index (" + v1 + ") is constant"); } s = _gotoHelper(offset); break; } // Construct switch s = LookupSwitch.create(LOOKUPSWITCH, op0, null, null, generateTarget(defaultoff), null, numpairs*3); for (int i = 0; i < numpairs; ++i) { LookupSwitch.setMatch(s, i, new OPT_IntConstantOperand(bcodes.getLookupSwitchValue(i))); LookupSwitch.setTarget(s, i, generateTarget(bcodes.getLookupSwitchOffset(i))); } bcodes.skipLookupSwitchPairs(numpairs); // Set branch probabilities//-#if RVM_WITH_OSR VM_SwitchBranchProfile sp = gc.getSwitchProfile(instrIndex-bciAdjustment);//-#else VM_SwitchBranchProfile sp = gc.getSwitchProfile(instrIndex);//-#endif if (sp == null) { float approxProb = 1.0f/(float)(numpairs+1); // num targets + default LookupSwitch.setDefaultBranchProfile(s, new OPT_BranchProfileOperand(approxProb)); for (int i = 0; i < numpairs; ++i) { LookupSwitch.setBranchProfile(s, i, new OPT_BranchProfileOperand(approxProb)); } } else { LookupSwitch.setDefaultBranchProfile(s, new OPT_BranchProfileOperand(sp.getDefaultProbability())); for (int i = 0; i < numpairs; ++i) { LookupSwitch.setBranchProfile(s, i, new OPT_BranchProfileOperand(sp.getCaseProbability(i))); } } } break; case JBC_ireturn: _returnHelper(INT_MOVE, popInt()); break; case JBC_lreturn: _returnHelper(LONG_MOVE, popLong()); break; case JBC_freturn: _returnHelper(FLOAT_MOVE, popFloat()); break; case JBC_dreturn: _returnHelper(DOUBLE_MOVE, popDouble()); break; case JBC_areturn: { OPT_Operand op0 = popRef(); if (VM.VerifyAssertions && !op0.isDefinitelyNull()) { VM_TypeReference retType = op0.getType(); if (retType.isWordType()) { VM._assert(gc.method.getReturnType().isWordType()); } else { // fudge to deal with conservative approximation // in OPT_ClassLoaderProxy.findCommonSuperclass if (retType != VM_TypeReference.JavaLangObject) { assertIsAssignable(gc.method.getReturnType(), retType); } } } _returnHelper(REF_MOVE, op0); } break; case JBC_return: _returnHelper(null, null); break; case JBC_getstatic: { // field resolution VM_FieldReference ref = bcodes.getFieldReference(); boolean unresolved = ref.needsDynamicLink(bcodes.method()); OPT_LocationOperand fieldOp = makeStaticFieldRef(ref); OPT_Operand offsetOp; VM_TypeReference fieldType = ref.getFieldContentsType(); OPT_RegisterOperand t = gc.temps.makeTemp(fieldType); if (unresolved) { OPT_RegisterOperand offsetrop = gc.temps.makeTempInt(); appendInstruction(Unary.create(RESOLVE_MEMBER, offsetrop.copyRO(), fieldOp.copy())); offsetOp = offsetrop; rectifyStateWithErrorHandler(); } else { VM_Field field = ref.peekResolvedField(); offsetOp = new OPT_IntConstantOperand(field.getOffset()); // use results of field analysis to refine type of result VM_Type ft = fieldType.peekResolvedType(); if (ft != null && ft.isClassType()) { VM_TypeReference concreteType = OPT_FieldAnalysis.getConcreteType(field); if (concreteType != null) { t.setPreciseType(); if (concreteType == fieldType) { t.setDeclaredType(); } else { fieldType = concreteType; t.type = concreteType; } } } // optimization: // if the field is final and either initialized or // in the bootimage, then get the value at compile time. // TODO: applying this optimization to Floats or Doubles // causes problems. Figure out why and fix it! if (!fieldType.isDoubleType() && !fieldType.isFloatType()) { if (field.isFinal()) { VM_Class declaringClass = field.getDeclaringClass(); if (declaringClass.isInitialized() || (VM.writingBootImage && declaringClass.isInBootImage())) { try { if (fieldType.isPrimitiveType()) { OPT_ConstantOperand rhs = OPT_StaticFieldReader.getStaticFieldValue(field); // VM.sysWrite("Replaced getstatic of "+field+" with "+rhs+"\n"); push (rhs, fieldType); break; } else { if (OPT_StaticFieldReader.isStaticFieldNull(field)) { // VM.sysWrite("Replaced getstatic of "+field+" with <null>\n"); push(new OPT_NullConstantOperand(), fieldType); break; } else { VM_TypeReference rtType = OPT_StaticFieldReader.getTypeFromStaticField(field); if (rtType == VM_TypeReference.JavaLangString) { OPT_ConstantOperand rhs = OPT_StaticFieldReader.getStaticFieldValue(field); // VM.sysWrite("Replaced getstatic of "+field+" with "+rhs+"\n"); push (rhs, fieldType); break; } else { t.type = rtType; if (rtType != fieldType) t.clearDeclaredType(); t.setPreciseType(); markGuardlessNonNull(t); // VM.sysWrite("Tightened type info for getstatic of "+field+" to "+t+"\n"); } } } } catch (NoSuchFieldException e) { // Sigh, host JDK java.* class didn't have this RVM field. // VM.sysWrite("Field "+field+" does not exist on host JDK\n"); } } } } } s = GetStatic.create(GETSTATIC, t, offsetOp, fieldOp); push(t.copyD2U(), fieldType); } break; case JBC_putstatic: { // field resolution VM_FieldReference ref = bcodes.getFieldReference(); boolean unresolved = ref.needsDynamicLink(bcodes.method()); OPT_LocationOperand fieldOp = makeStaticFieldRef(ref); OPT_Operand offsetOp; if (unresolved) { OPT_RegisterOperand offsetrop = gc.temps.makeTempInt(); appendInstruction(Unary.create(RESOLVE_MEMBER, offsetrop.copyRO(), fieldOp.copy())); offsetOp = offsetrop; rectifyStateWithErrorHandler(); } else { VM_Field field = ref.peekResolvedField(); offsetOp = new OPT_IntConstantOperand(field.getOffset()); } VM_TypeReference fieldType = ref.getFieldContentsType(); OPT_Operand r = pop(fieldType); s = PutStatic.create(PUTSTATIC, r, offsetOp, fieldOp); } break; case JBC_getfield: { // field resolution VM_FieldReference ref = bcodes.getFieldReference(); boolean unresolved = ref.needsDynamicLink(bcodes.method()); OPT_LocationOperand fieldOp = makeInstanceFieldRef(ref); OPT_Operand offsetOp; VM_TypeReference fieldType = ref.getFieldContentsType(); OPT_RegisterOperand t = gc.temps.makeTemp(fieldType); if (unresolved) { OPT_RegisterOperand offsetrop = gc.temps.makeTempInt(); appendInstruction(Unary.create(RESOLVE_MEMBER, offsetrop.copyRO(), fieldOp.copy())); offsetOp = offsetrop; rectifyStateWithErrorHandler(); } else { VM_Field field = ref.peekResolvedField(); offsetOp = new OPT_IntConstantOperand(field.getOffset()); // use results of field analysis to refine type. VM_Type ft = fieldType.peekResolvedType(); if (ft != null && ft.isClassType()) { VM_TypeReference concreteType = OPT_FieldAnalysis.getConcreteType(field); if (concreteType != null) { t.setPreciseType(); if (concreteType == fieldType) { t.setDeclaredType(); } else { fieldType = concreteType; t.type = concreteType; } } } } OPT_Operand op1 = pop(); clearCurrentGuard(); if (do_NullCheck(op1)) break; s = GetField.create(GETFIELD, t, op1, offsetOp, fieldOp, getCurrentGuard()); push(t.copyD2U(), fieldType); } break; case JBC_putfield: { // field resolution VM_FieldReference ref = bcodes.getFieldReference(); boolean unresolved = ref.needsDynamicLink(bcodes.method()); OPT_LocationOperand fieldOp = makeInstanceFieldRef(ref); VM_TypeReference fieldType = ref.getFieldContentsType(); OPT_Operand offsetOp; if (unresolved) { OPT_RegisterOperand offsetrop = gc.temps.makeTempInt(); appendInstruction(Unary.create(RESOLVE_MEMBER, offsetrop.copyRO(), fieldOp.copy())); offsetOp = offsetrop; rectifyStateWithErrorHandler(); } else { VM_Field field = ref.peekResolvedField(); offsetOp = new OPT_IntConstantOperand(field.getOffset()); } OPT_Operand val = pop(fieldType); OPT_Operand obj = popRef(); clearCurrentGuard(); if (do_NullCheck(obj)) break; s = PutField.create(PUTFIELD, val, obj, offsetOp, fieldOp, getCurrentGuard()); } break; case JBC_invokevirtual: { VM_MethodReference ref = bcodes.getMethodReference(); // See if this is a magic method (Address, Word, etc.) // If it is, generate the inline code and we are done. if (ref.getType().isMagicType()) { boolean generated = OPT_GenerateMagic.generateMagic(this, gc, ref); if (generated) break; // all done. } // A non-magical invokevirtual. Create call instruction. boolean unresolved = ref.needsDynamicLink(bcodes.method()); VM_Method target = ref.peekResolvedMethod(); OPT_MethodOperand methOp = OPT_MethodOperand.VIRTUAL(ref, target); //-#if RVM_WITH_OSR /* just create an osr barrier right before _callHelper * changes the states of locals and stacks. */ if (this.osrGuardedInline) { lastOsrBarrier = _createOsrBarrier(); } //-#endif s = _callHelper(ref, methOp); // Handle possibility of dynamic linking. Must be done before null_check! if (unresolved) { OPT_RegisterOperand offsetrop = gc.temps.makeTempInt(); appendInstruction(Unary.create(RESOLVE_MEMBER, offsetrop.copyRO(), Call.getMethod(s).copy())); Call.setAddress(s, offsetrop); rectifyStateWithErrorHandler(); } else { if (VM.VerifyAssertions) VM._assert(target != null); Call.setAddress(s, new OPT_IntConstantOperand(target.getOffset())); } // null check receiver OPT_Operand receiver = Call.getParam(s, 0); clearCurrentGuard(); if (do_NullCheck(receiver)) { // call will always raise null pointer exception s = null; break; } Call.setGuard(s, getCurrentGuard()); // Use compile time type of receiver to try reduce the number of targets. // If we succeed, we'll update meth and s's method operand. boolean isExtant = false; boolean isPreciseType = false; VM_TypeReference tr = null; if (receiver.isRegister()) { OPT_RegisterOperand rop = receiver.asRegister(); isExtant = rop.isExtant(); isPreciseType = rop.isPreciseType(); tr = rop.type; } else if (receiver.isStringConstant()) { isExtant = true; isPreciseType = true; tr = VM_TypeReference.JavaLangString; } else if (VM.VerifyAssertions) { VM._assert(false, "unexpected receiver"); } if (isPreciseType && target != null) { methOp.refine(target, true); } VM_Type type = tr.peekResolvedType(); if (type != null && type.isResolved() && type.isClassType() && target != null && type != target.getDeclaringClass()) { VM_Method vmeth = OPT_ClassLoaderProxy.lookupMethod(type.asClass(), ref); if (vmeth != null && vmeth != target) { methOp.refine(vmeth, isPreciseType); } } // Consider inlining it. if (maybeInlineMethod(shouldInline(s, isExtant), s)) { return; } // noninlined CALL must be treated as potential throw of anything rectifyStateWithExceptionHandlers(); } break; case JBC_invokespecial: { VM_MethodReference ref = bcodes.getMethodReference(); VM_Method target = ref.resolveInvokeSpecial(); //-#if RVM_WITH_OSR /* just create an osr barrier right before _callHelper * changes the states of locals and stacks. */ if (this.osrGuardedInline) lastOsrBarrier = _createOsrBarrier(); //-#endif s = _callHelper(ref, OPT_MethodOperand.SPECIAL(ref, target)); // Handle possibility of dynamic linking. Must be done before null_check! // NOTE: different definition of unresolved due to semantics of invokespecial. if (target == null) { OPT_RegisterOperand offsetrop = gc.temps.makeTempInt(); appendInstruction(Unary.create(RESOLVE_MEMBER, offsetrop.copyRO(), Call.getMethod(s).copy())); Call.setAddress(s, offsetrop); rectifyStateWithErrorHandler(); } else { Call.setAddress(s, new OPT_IntConstantOperand(target.getOffset())); } // null check receiver OPT_Operand receiver = Call.getParam(s, 0); clearCurrentGuard(); if (do_NullCheck(receiver)) { // call will always raise null pointer exception s = null; break; } Call.setGuard(s, getCurrentGuard()); // Consider inlining it. if (maybeInlineMethod(shouldInline(s, false), s)) { return; } // noninlined CALL must be treated as potential throw of anything rectifyStateWithExceptionHandlers(); } break; case JBC_invokestatic: { VM_MethodReference ref = bcodes.getMethodReference(); // See if this is a magic method (VM_Magic, Address, Word, etc.) // If it is, generate the inline code and we are done. if (ref.getType().isMagicType()) { boolean generated = OPT_GenerateMagic.generateMagic(this, gc, ref); if (generated) break; } // A non-magical invokestatic. Create call instruction. boolean unresolved = ref.needsDynamicLink(bcodes.method()); VM_Method target = ref.peekResolvedMethod(); //-#if RVM_WITH_OSR /* just create an osr barrier right before _callHelper * changes the states of locals and stacks. */ if (this.osrGuardedInline) lastOsrBarrier = _createOsrBarrier(); //-#endif s = _callHelper(ref, OPT_MethodOperand.STATIC(ref, target)); // Handle possibility of dynamic linking. if (unresolved) { OPT_RegisterOperand offsetrop = gc.temps.makeTempInt(); appendInstruction(Unary.create(RESOLVE_MEMBER, offsetrop.copyRO(), Call.getMethod(s).copy())); Call.setAddress(s, offsetrop); rectifyStateWithErrorHandler(); } else { Call.setAddress(s, new OPT_IntConstantOperand(target.getOffset())); } // Consider inlining it. if (maybeInlineMethod(shouldInline(s, false), s)) { return; } // noninlined CALL must be treated as potential throw of anything rectifyStateWithExceptionHandlers(); } break; case JBC_invokeinterface: { VM_MethodReference ref = bcodes.getMethodReference(); bcodes.alignInvokeInterface(); VM_Method resolvedMethod = null; resolvedMethod = ref.peekInterfaceMethod(); //-#if RVM_WITH_OSR /* just create an osr barrier right before _callHelper * changes the states of locals and stacks. */ if (this.osrGuardedInline) lastOsrBarrier = _createOsrBarrier(); //-#endif s = _callHelper(ref, OPT_MethodOperand.INTERFACE(ref, resolvedMethod)); OPT_RegisterOperand receiver = Call.getParam(s, 0).asRegister(); VM_Class receiverType = (VM_Class)receiver.type.peekResolvedType(); // null check on this parameter of call // TODO: Strictly speaking we need to do dynamic linking of the interface // type BEFORE we do the null check. FIXME. clearCurrentGuard(); if (do_NullCheck(receiver)) { // call will always raise null pointer exception s = null; break; } Call.setGuard(s, getCurrentGuard()); boolean requiresImplementsTest = VM.BuildForIMTInterfaceInvocation || (VM.BuildForITableInterfaceInvocation && VM.DirectlyIndexedITables); // Invokeinterface requires a dynamic type check // to ensure that the receiver object actually // implements the interface. This is necessary // because the verifier does not detect incompatible class changes. // Depending on the implementation of interface dispatching // we are using, we may have to make this test explicit // in the calling sequence if we can't prove at compile time // that it is not needed. if (requiresImplementsTest) { if (resolvedMethod == null) { // Sigh. Can't even resolve the reference to figure out what interface // method we are trying to call. Therefore we must make generate a call // to an out-of-line typechecking routine to handle it at runtime. OPT_RegisterOperand tibPtr = gc.temps.makeTemp(VM_TypeReference.JavaLangObjectArray); OPT_Instruction getTib = GuardedUnary.create(GET_OBJ_TIB, tibPtr, receiver.copyU2U(), getCurrentGuard()); appendInstruction(getTib); getTib.bcIndex = RUNTIME_SERVICES_BCI; VM_Method target = VM_Entrypoints.unresolvedInvokeinterfaceImplementsTestMethod; OPT_Instruction callCheck = Call.create2(CALL, null, new OPT_IntConstantOperand(target.getOffset()), OPT_MethodOperand.STATIC(target), new OPT_IntConstantOperand(ref.getId()), tibPtr.copyD2U()); if (gc.options.NO_CALLEE_EXCEPTIONS) { callCheck.markAsNonPEI(); } appendInstruction(callCheck); callCheck.bcIndex = RUNTIME_SERVICES_BCI; requiresImplementsTest = false; // the above call subsumes the test rectifyStateWithErrorHandler(); // Can raise incompatible class change error. } else { // We know what interface method the program wants to invoke. // Attempt to avoid inserting the type check by seeing if the // known static type of the receiver implements the desired interface. VM_Type interfaceType = resolvedMethod.getDeclaringClass(); if (receiverType != null && receiverType.isResolved() && !receiverType.isInterface()) { byte doesImplement = OPT_ClassLoaderProxy.includesType(interfaceType.getTypeRef(), receiverType.getTypeRef()); requiresImplementsTest = doesImplement != YES; } } } // Attempt to resolve the interface call to a particular virtual method. // This is independent of whether or not the static type of the receiver is // known to implement the interface and it is not that case that being able // to prove one implies the other. VM_Method vmeth = null; if (receiverType != null && receiverType.isInitialized() && !receiverType.isInterface()) { vmeth = OPT_ClassLoaderProxy.lookupMethod(receiverType, ref); } if (vmeth != null) { VM_MethodReference vmethRef = vmeth.getMemberRef().asMethodReference(); // We're going to virtualize the call. Must inject the // DTC to ensure the receiver implements the interface if // requiresImplementsTest is still true. // Note that at this point requiresImplementsTest => resolvedMethod != null if (requiresImplementsTest) { appendInstruction(TypeCheck.create(MUST_IMPLEMENT_INTERFACE, receiver.copyU2U(), makeTypeOperand(resolvedMethod.getDeclaringClass()), getCurrentGuard())); rectifyStateWithErrorHandler(); // Can raise incompatible class change error. } OPT_MethodOperand mop = OPT_MethodOperand.VIRTUAL(vmethRef, vmeth); if (receiver.isPreciseType()) { mop.refine(vmeth, true); } Call.setMethod(s, mop); boolean unresolved = vmethRef.needsDynamicLink(bcodes.method()); if (unresolved) { OPT_RegisterOperand offsetrop = gc.temps.makeTempInt(); appendInstruction(Unary.create(RESOLVE_MEMBER, offsetrop.copyRO(), Call.getMethod(s).copy())); Call.setAddress(s, offsetrop); rectifyStateWithErrorHandler(); } else { Call.setAddress(s, new OPT_IntConstantOperand(vmeth.getOffset())); } // Attempt to inline virtualized call. if (maybeInlineMethod(shouldInline(s, receiver.isExtant()), s)) { return; } } else { // We can't virtualize the call; // try to inline a predicted target for the interface invocation // inline code will include DTC to ensure receiver implements the interface. if (resolvedMethod != null && maybeInlineMethod(shouldInline(s, false), s)) { return; } else { if (requiresImplementsTest) { appendInstruction(TypeCheck.create(MUST_IMPLEMENT_INTERFACE, receiver.copyU2U(), makeTypeOperand(resolvedMethod.getDeclaringClass()), getCurrentGuard())); // don't have to rectify with error handlers; rectify call below subsusmes. } } } // CALL must be treated as potential throw of anything rectifyStateWithExceptionHandlers(); } break; case JBC_xxxunusedxxx: OPT_OptimizingCompilerException.UNREACHABLE(); break; case JBC_new: { VM_TypeReference klass = bcodes.getTypeReference(); OPT_RegisterOperand t = gc.temps.makeTemp(klass); t.setPreciseType(); markGuardlessNonNull(t); OPT_Operator operator; OPT_TypeOperand klassOp; VM_Class klassType = (VM_Class)klass.peekResolvedType(); if (klassType != null && (klassType.isInitialized() || klassType.isInBootImage())) { klassOp = makeTypeOperand(klassType); operator = NEW; } else { operator = NEW_UNRESOLVED; klassOp = makeTypeOperand(klass); } s = New.create(operator, t, klassOp); push(t.copyD2U()); rectifyStateWithErrorHandler(); } break; case JBC_newarray: { VM_Type array = bcodes.getPrimitiveArrayType(); OPT_TypeOperand arrayOp = makeTypeOperand(array); OPT_RegisterOperand t = gc.temps.makeTemp(array.getTypeRef()); t.setPreciseType(); markGuardlessNonNull(t); s = NewArray.create(NEWARRAY, t, arrayOp, popInt()); push(t.copyD2U()); rectifyStateWithExceptionHandler(VM_TypeReference.JavaLangNegativeArraySizeException); } break; case JBC_anewarray: { VM_TypeReference elementTypeRef = bcodes.getTypeReference(); s = generateAnewarray(elementTypeRef); } break; case JBC_arraylength: { OPT_Operand op1 = pop(); clearCurrentGuard(); if (do_NullCheck(op1)) break; if (VM.VerifyAssertions) VM._assert(getArrayTypeOf(op1).isArrayType()); OPT_RegisterOperand t = gc.temps.makeTempInt(); s = GuardedUnary.create(ARRAYLENGTH, t, op1, getCurrentGuard()); push(t.copyD2U()); } break; case JBC_athrow: { OPT_Operand op0 = pop(); clearCurrentGuard(); if (do_NullCheck(op0)) break; VM_TypeReference type = getRefTypeOf(op0); if (VM.VerifyAssertions) { // fudge to handle conservative approximation of // OPT_ClassLoaderProxy.findCommonSuperclass if (type != VM_TypeReference.JavaLangObject) assertIsAssignable(VM_TypeReference.JavaLangThrowable, type); } if (!gc.method.isInterruptible()) { // prevent code motion in or out of uninterruptible code sequence appendInstruction(Empty.create(UNINT_END)); } endOfBasicBlock = true; OPT_BasicBlock definiteTarget = rectifyStateWithExceptionHandler(type, true); if (definiteTarget != null) { appendInstruction(CacheOp.create(SET_CAUGHT_EXCEPTION, op0)); s = Goto.create(GOTO, definiteTarget.makeJumpTarget()); } else { s = Athrow.create(ATHROW, (OPT_RegisterOperand)op0); } } break; case JBC_checkcast: { VM_TypeReference typeRef = bcodes.getTypeReference(); boolean classLoading = couldCauseClassLoading(typeRef); OPT_Operand op2 = pop(); if (typeRef.isWordType()) { op2 = op2.copy(); if (op2 instanceof OPT_RegisterOperand) { ((OPT_RegisterOperand)op2).type = typeRef; } push(op2); if (DBG_CF) db("skipped gen of checkcast to word type "+typeRef); break; } if (VM.VerifyAssertions) VM._assert(op2.isRef()); if (CF_CHECKCAST && !classLoading) { if (op2.isDefinitelyNull()) { push(op2); if (DBG_CF) db("skipped gen of null checkcast"); break; } VM_TypeReference type = getRefTypeOf(op2); // non-null, null case above if (OPT_ClassLoaderProxy.includesType(typeRef,type)==YES){ push(op2); if (DBG_CF) db("skipped gen of checkcast of " + op2 + " from " + typeRef + " to " + type); break; } } if (!gc.options.NO_CHECKCAST) { if (classLoading) { s = TypeCheck.create(CHECKCAST_UNRESOLVED, op2, makeTypeOperand(typeRef)); } else { OPT_TypeOperand typeOp = makeTypeOperand(typeRef.peekResolvedType()); if (isNonNull(op2)) { s = TypeCheck.create(CHECKCAST_NOTNULL, op2, typeOp, getGuard(op2)); } else { s = TypeCheck.create(CHECKCAST, op2, typeOp); } } } op2 = op2.copy(); if (op2 instanceof OPT_RegisterOperand) { ((OPT_RegisterOperand)op2).type = typeRef; } push(op2); rectifyStateWithExceptionHandler(VM_TypeReference.JavaLangClassCastException); if (classLoading) rectifyStateWithErrorHandler(); } break; case JBC_instanceof: { VM_TypeReference typeRef = bcodes.getTypeReference(); boolean classLoading = couldCauseClassLoading(typeRef); OPT_Operand op2 = pop(); if (VM.VerifyAssertions) VM._assert(op2.isRef()); if (CF_INSTANCEOF && !classLoading) { if (op2.isDefinitelyNull()) { push(new OPT_IntConstantOperand(0)); if (DBG_CF) db("skipped gen of null instanceof"); break; } VM_TypeReference type = getRefTypeOf(op2); // non-null int answer = OPT_ClassLoaderProxy.includesType(typeRef, type); if (answer == YES && isNonNull(op2)) { push(new OPT_IntConstantOperand(1)); if (DBG_CF) db(op2 + " instanceof " + typeRef + " is always true "); break; } else if (answer == NO) { if (DBG_CF) db(op2 + " instanceof " + typeRef + " is always false "); push(new OPT_IntConstantOperand(0)); break; } } OPT_RegisterOperand t = gc.temps.makeTempInt(); if (classLoading) { s = InstanceOf.create(INSTANCEOF_UNRESOLVED, t, makeTypeOperand(typeRef), op2); } else { OPT_TypeOperand typeOp = makeTypeOperand(typeRef.peekResolvedType()); if (isNonNull(op2)) { s = InstanceOf.create(INSTANCEOF_NOTNULL, t, typeOp, op2, getGuard(op2)); } else { s = InstanceOf.create(INSTANCEOF, t, typeOp, op2); } } push(t.copyD2U()); if (classLoading) rectifyStateWithErrorHandler(); } break; case JBC_monitorenter: { OPT_Operand op0 = pop(); clearCurrentGuard(); if (do_NullCheck(op0)) break; if (VM.VerifyAssertions) VM._assert(op0.isRef()); if (gc.options.MONITOR_NOP) { s = null; } else { s = MonitorOp.create(MONITORENTER, op0, getCurrentGuard()); } } break; case JBC_monitorexit: { OPT_Operand op0 = pop(); clearCurrentGuard(); if (do_NullCheck(op0)) break; if (gc.options.MONITOR_NOP) { s = null; } else { s = MonitorOp.create(MONITOREXIT, op0, getCurrentGuard()); } rectifyStateWithExceptionHandler(VM_TypeReference.JavaLangIllegalMonitorStateException); } break; case JBC_wide: { int widecode = bcodes.getWideOpcode(); int index = bcodes.getWideLocalNumber(); switch (widecode) { case JBC_iload: s = do_iload(index); break; case JBC_lload: s = do_lload(index); break; case JBC_fload: s = do_fload(index); break; case JBC_dload: s = do_dload(index); break; case JBC_aload: s = do_aload(index); break; case JBC_istore: s = do_store(index, popInt()); break; case JBC_lstore: s = do_store(index, popLong()); break; case JBC_fstore: s = do_store(index, popFloat()); break; case JBC_dstore: s = do_store(index, popDouble()); break; case JBC_astore: s = do_astore(index); break; case JBC_iinc: s = do_iinc(index, bcodes.getWideIncrement()); break; case JBC_ret: s = _retHelper(index); break; default: OPT_OptimizingCompilerException.UNREACHABLE(); break; } } break; case JBC_multianewarray: { VM_TypeReference arrayType = bcodes.getTypeReference(); OPT_TypeOperand typeOp = makeTypeOperand(arrayType); int dimensions = bcodes.getArrayDimension(); // Step 1: Create an int array to hold the dimensions. OPT_TypeOperand dimArrayType = makeTypeOperand(VM_Array.IntArray); OPT_RegisterOperand dimArray = gc.temps.makeTemp(VM_TypeReference.IntArray); markGuardlessNonNull(dimArray); dimArray.setPreciseType(); appendInstruction(NewArray.create(NEWARRAY, dimArray, dimArrayType, new OPT_IntConstantOperand(dimensions))); // Step 2: Assign the dimension values to dimArray for (int i = dimensions; i > 0; i--) { OPT_LocationOperand loc = new OPT_LocationOperand(VM_TypeReference.Int); appendInstruction(AStore.create(INT_ASTORE, popInt(), dimArray.copyD2U(), new OPT_IntConstantOperand(i - 1), loc, new OPT_TrueGuardOperand())); } // Step 3: Actually create the multiD array OPT_RegisterOperand result = gc.temps.makeTemp(arrayType); markGuardlessNonNull(result); result.setPreciseType(); appendInstruction(NewArray.create(NEWOBJMULTIARRAY, result, typeOp, dimArray.copyD2U())); push(result.copyD2U()); rectifyStateWithErrorHandler(); rectifyStateWithExceptionHandler(VM_TypeReference.JavaLangNegativeArraySizeException); } break; case JBC_ifnull: s = _refIfNullHelper(OPT_ConditionOperand.EQUAL()); break; case JBC_ifnonnull: s = _refIfNullHelper(OPT_ConditionOperand.NOT_EQUAL()); break; case JBC_goto_w: { int offset = bcodes.getWideBranchOffset(); if (offset != 5) // skip generating frivolous goto's s = _gotoHelper(offset); } break; case JBC_jsr_w: s = _jsrHelper(bcodes.getWideBranchOffset()); break; //-#if RVM_WITH_OSR case JBC_impdep1: { int pseudo_opcode = bcodes.nextPseudoInstruction(); switch (pseudo_opcode) { case PSEUDO_LoadIntConst: { int value = bcodes.readIntConst(); if (VM.TraceOnStackReplacement) VM.sysWriteln("PSEUDO_LoadIntConst "+value); push(new OPT_IntConstantOperand(value)); // used for PSEUDO_InvokeStatic to recover the type info param1 = param2; param2 = value; break; } case PSEUDO_LoadLongConst: { long value = bcodes.readLongConst(); if (VM.TraceOnStackReplacement) VM.sysWriteln("PSEUDO_LoadLongConst "+value); // put on jtoc int offset = VM_Statics.findOrCreateLongLiteral(value); pushDual(new OPT_LongConstantOperand(value, offset)); break; } case PSEUDO_LoadWordConst: { Address a; //-#if RVM_FOR_32_ADDR a = Address.fromIntSignExtend(bcodes.readIntConst()); //-#endif //-#if RVM_FOR_64_ADDR a = Address.fromLong(bcodes.readLongConst()); //-#endif push(new OPT_AddressConstantOperand(a)); if (VM.TraceOnStackReplacement) VM.sysWrite("PSEUDO_LoadWordConst 0x"); VM.sysWrite(a); VM.sysWriteln(); break; } case PSEUDO_LoadFloatConst: { int ibits = bcodes.readIntConst(); float value = Float.intBitsToFloat(ibits); if (VM.TraceOnStackReplacement) VM.sysWriteln("PSEUDO_LoadFloatConst "+value); int offset = VM_Statics.findOrCreateFloatLiteral(ibits); push(new OPT_FloatConstantOperand(value, offset)); break; } case PSEUDO_LoadDoubleConst: { long lbits = bcodes.readLongConst(); double value = VM_Magic.longBitsAsDouble(lbits); if (VM.TraceOnStackReplacement) VM.sysWriteln("PSEUDO_LoadDoubleConst "+ lbits); // put on jtoc int offset = VM_Statics.findOrCreateDoubleLiteral(lbits); pushDual(new OPT_DoubleConstantOperand(value, offset)); break; } case PSEUDO_LoadRetAddrConst: { int value = bcodes.readIntConst(); if (VM.TraceOnStackReplacement) VM.sysWriteln("PSEUDO_LoadRetAddrConst "+value); push(new ReturnAddressOperand(value)); break; } case PSEUDO_InvokeStatic: { /* pseudo invoke static for getRefAt and cleanRefAt, both must be resolved already */ VM_Method meth = null; int targetidx = bcodes.readIntConst(); switch (targetidx) { case GETREFAT: meth = VM_Entrypoints.osrGetRefAtMethod; break; case CLEANREFS: meth = VM_Entrypoints.osrCleanRefsMethod; break; default: if (VM.TraceOnStackReplacement) VM.sysWriteln("pseudo_invokestatic, unknown target index "+targetidx); OPT_OptimizingCompilerException.UNREACHABLE(); break; } if (VM.TraceOnStackReplacement) VM.sysWriteln("PSEUDO_Invoke "+meth+"\n"); s = _callHelper(meth.getMemberRef().asMethodReference(), OPT_MethodOperand.STATIC(meth)); Call.setAddress(s, new OPT_IntConstantOperand(meth.getOffset())); /* try to set the type of return register */ if (targetidx == GETREFAT) { Object realObj = OSR_ObjectHolder.getRefAt(param1, param2); if (VM.VerifyAssertions) VM._assert(realObj != null); VM_TypeReference klass = VM_Magic.getObjectType(realObj).getTypeRef(); OPT_RegisterOperand op0 = gc.temps.makeTemp(klass); Call.setResult(s, op0); pop(); // pop the old one and push the new return type. push(op0.copyD2U(), klass); } // CALL must be treated as potential throw of anything rectifyStateWithExceptionHandlers(); break; } case PSEUDO_InvokeCompiledMethod: { int cmid = bcodes.readIntConst(); int origBCIdx = bcodes.readIntConst(); // skip it VM_CompiledMethod cm = VM_CompiledMethods.getCompiledMethod(cmid); VM_Method meth = cm.getMethod(); if (VM.TraceOnStackReplacement) VM.sysWriteln("PSEUDO_InvokeCompiledMethod "+meth+"\n"); /* the bcIndex should be adjusted to the original */ s = _callHelper(meth.getMemberRef().asMethodReference(), OPT_MethodOperand.COMPILED(meth, cm.getOsrJTOCoffset())); // adjust the bcindex of s to the original bytecode's index // it should be able to give the correct exception handling s.bcIndex = origBCIdx + bciAdjustment; rectifyStateWithExceptionHandlers(); break; } case PSEUDO_ParamInitEnd: { // indicates the place to insert method prologue and stack // overflow checks. // opt compiler should consider this too break; } default: if (VM.TraceOnStackReplacement) VM.sysWriteln("OSR Error, no such pseudo opcode : "+pseudo_opcode); OPT_OptimizingCompilerException.UNREACHABLE(); break; } break; } //-#endif default: OPT_OptimizingCompilerException.UNREACHABLE(); break; } if (s != null && !currentBBLE.isSelfRegen()) { appendInstruction(s); } // check runoff if (VM.VerifyAssertions) VM._assert(bcodes.index() <= runoff); if (!endOfBasicBlock && bcodes.index() == runoff) { if (DBG_BB || DBG_SELECTED) db("runoff occurred! current basic block: " + currentBBLE + ", runoff = " + runoff); endOfBasicBlock = fallThrough = true; } if (endOfBasicBlock) { if (currentBBLE.isSelfRegen()) { // This block ended in a goto that jumped into the middle of it. // Through away all out edges from this block, they're out of date // because we're going to have to regenerate this block. currentBBLE.block.deleteOut(); if (DBG_CFG || DBG_SELECTED) db("Deleted all out edges of " + currentBBLE.block); return; } if (fallThrough) { if (VM.VerifyAssertions) VM._assert(bcodes.index() < bcodes.length()); // Get/Create fallthrough BBLE and record it as // currentBBLE's fallThrough. currentBBLE.fallThrough = getOrCreateBlock(bcodes.index()); currentBBLE.block.insertOut(currentBBLE.fallThrough.block); } return; } } } | 49871 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49871/5f5affa5826a7b2af5ec8e1b72880a825023dc9f/OPT_BC2IR.java/clean/rvm/src/vm/compilers/optimizing/ir/conversions/bc2hir/OPT_BC2IR.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
2103,
1265,
12,
474,
15065,
13,
288,
565,
309,
261,
2290,
43,
67,
9676,
747,
2383,
43,
67,
4803,
2056,
13,
288,
1377,
1319,
2932,
3441,
1776,
981,
1368,
315,
397,
783,
9676,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
2103,
1265,
12,
474,
15065,
13,
288,
565,
309,
261,
2290,
43,
67,
9676,
747,
2383,
43,
67,
4803,
2056,
13,
288,
1377,
1319,
2932,
3441,
1776,
981,
1368,
315,
397,
783,
9676,
... | |
ready = _readyJobs.size(); if (ready > 0) rv = (Job)_readyJobs.remove(0); | if (_readyJobs.size() > 0) { return (Job)_readyJobs.remove(0); } else { try { _readyJobs.wait(); } catch (InterruptedException ie) {} } | Job getNext() { while (_alive) { Job rv = null; int ready = 0; synchronized (_readyJobs) { ready = _readyJobs.size(); if (ready > 0) rv = (Job)_readyJobs.remove(0); } if (rv != null) { // we found one, but there may be more, so wake up enough // other runners //if (_log.shouldLog(Log.DEBUG)) // _log.debug("Waking up " + (ready-1) + " job runners (and running one)"); //awaken(ready-1); return rv; } else { if (_log.shouldLog(Log.DEBUG)) _log.debug("No jobs pending, waiting"); } try { synchronized (_runnerLock) { _runnerLock.wait(); } } catch (InterruptedException ie) {} } if (_log.shouldLog(Log.WARN)) _log.warn("No longer alive, returning null"); return null; } | 45677 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45677/6ef22166f97d655b56ae3ef97650d494ac89f3d8/JobQueue.java/clean/router/java/src/net/i2p/router/JobQueue.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3956,
6927,
1435,
288,
3639,
1323,
261,
67,
11462,
13,
288,
5411,
3956,
5633,
273,
446,
31,
5411,
509,
5695,
273,
374,
31,
5411,
3852,
261,
67,
1672,
7276,
13,
288,
7734,
5695,
273,
389... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3956,
6927,
1435,
288,
3639,
1323,
261,
67,
11462,
13,
288,
5411,
3956,
5633,
273,
446,
31,
5411,
509,
5695,
273,
374,
31,
5411,
3852,
261,
67,
1672,
7276,
13,
288,
7734,
5695,
273,
389... |
if (!m_inInnerClass) { | if (!inInnerClass) { | public void visitReferenceExpression(PsiReferenceExpression ref) { super.visitReferenceExpression(ref); if (!m_inInnerClass) { return; } final PsiElement element = ref.resolve(); if (m_variable.equals(element)) { m_usedInInnerClass = true; } } | 17306 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17306/dba8b183fc1b08e7ad664812bfc0c64d1e4abd3c/VariableUsedInInnerClassVisitor.java/clean/plugins/InspectionGadgets/src/com/siyeh/ig/psiutils/VariableUsedInInnerClassVisitor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
3757,
2404,
2300,
12,
52,
7722,
2404,
2300,
1278,
13,
288,
3639,
2240,
18,
11658,
2404,
2300,
12,
1734,
1769,
3639,
309,
16051,
267,
2857,
797,
13,
288,
5411,
327,
31,
3639,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
3757,
2404,
2300,
12,
52,
7722,
2404,
2300,
1278,
13,
288,
3639,
2240,
18,
11658,
2404,
2300,
12,
1734,
1769,
3639,
309,
16051,
267,
2857,
797,
13,
288,
5411,
327,
31,
3639,
... |
result.append(line.substring(4)); result.append(" "); | if (line.length() > 4) { result.append(line.substring(4)); result.append(" "); } | private void append(String line) { result.append(line.substring(4)); result.append(" "); } | 506 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/506/057c5dad4562ff77d66c95cf3633b53b94995a96/SmtpResponseReader.java/buggy/src/main/org/apache/tools/mail/SmtpResponseReader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
714,
12,
780,
980,
13,
288,
3639,
563,
18,
6923,
12,
1369,
18,
28023,
12,
24,
10019,
3639,
563,
18,
6923,
2932,
315,
1769,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3238,
918,
714,
12,
780,
980,
13,
288,
3639,
563,
18,
6923,
12,
1369,
18,
28023,
12,
24,
10019,
3639,
563,
18,
6923,
2932,
315,
1769,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
... |
public void setRecipients(Message.RecipientType type, String address) throws MessagingException { setHeader(getHeaderForRecipientType(type), address); | public void setRecipients(Message.RecipientType type, Address[] addresses) throws MessagingException { setHeader(getHeaderForRecipientType(type), addresses); | public void setRecipients(Message.RecipientType type, String address) throws MessagingException { setHeader(getHeaderForRecipientType(type), address); } | 6764 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6764/11bb40b2e6682d32c4734156e23cf1971b319690/MimeMessage.java/buggy/geronimo-spec-javamail/src/main/java/javax/mail/internet/MimeMessage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
444,
22740,
12,
1079,
18,
18241,
559,
618,
16,
514,
1758,
13,
1216,
23794,
503,
288,
3639,
10859,
12,
588,
1864,
1290,
18241,
559,
12,
723,
3631,
1758,
1769,
565,
289,
2,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
444,
22740,
12,
1079,
18,
18241,
559,
618,
16,
514,
1758,
13,
1216,
23794,
503,
288,
3639,
10859,
12,
588,
1864,
1290,
18241,
559,
12,
723,
3631,
1758,
1769,
565,
289,
2,
-10... |
public org.quickfix.field.DueToRelated getDueToRelated() throws FieldNotFound { org.quickfix.field.DueToRelated value = new org.quickfix.field.DueToRelated(); | public quickfix.field.DueToRelated getDueToRelated() throws FieldNotFound { quickfix.field.DueToRelated value = new quickfix.field.DueToRelated(); | public org.quickfix.field.DueToRelated getDueToRelated() throws FieldNotFound { org.quickfix.field.DueToRelated value = new org.quickfix.field.DueToRelated(); getField(value); return value; } | 5926 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5926/fecc27f98261270772ff182a1d4dfd94b5daa73d/SecurityStatus.java/buggy/src/java/src/quickfix/fix42/SecurityStatus.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
30023,
774,
8017,
2343,
344,
774,
8017,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
30023,
774,
8017,
460,
273,
394,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
30023,
774,
8017,
2343,
344,
774,
8017,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
30023,
774,
8017,
460,
273,
394,
... |
writer.write( " class A { public: void a(); }; " ); writer.write( " class B : public virtual A { public: void b(); };" ); writer.write( " class C : public virtual A { public: void c(); };" ); writer.write( " class D : public B, C { public: void d(); };" ); | writer.write( " class A { public: void a(); }; " ); writer.write( " class B : public virtual A { public: void b(); };" ); writer.write( " class C : public virtual A { public: void c(); };" ); writer.write( " class D : public B, C { public: void d(); };" ); | public void testBug51260() throws Exception{ StringWriter writer = new StringWriter(); writer.write( " class A { public: void a(); }; " ); writer.write( " class B : public virtual A { public: void b(); };" ); writer.write( " class C : public virtual A { public: void c(); };" ); writer.write( " class D : public B, C { public: void d(); };" ); writer.write( " void A::a(){} "); writer.write( " void B::b(){} "); writer.write( " void C::c(){} "); writer.write( " void D::d(){ SP }" ); String code = writer.toString(); int index = code.indexOf( "SP" ); IASTCompletionNode node = parse( code, index ); ILookupResult result = node.getCompletionScope().lookup( node.getCompletionPrefix(), new IASTNode.LookupKind[]{ IASTNode.LookupKind.THIS }, node.getCompletionContext() ); assertEquals( result.getResultsSize(), 4 ); Iterator iter = result.getNodes(); IASTMethod d = (IASTMethod) iter.next(); IASTMethod b = (IASTMethod) iter.next(); IASTMethod a = (IASTMethod) iter.next(); IASTMethod c = (IASTMethod) iter.next(); assertFalse( iter.hasNext() ); assertEquals( a.getName(), "a" ); assertEquals( b.getName(), "b" ); assertEquals( c.getName(), "c" ); assertEquals( d.getName(), "d" ); } | 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,
19865,
13757,
4848,
1435,
1216,
1185,
95,
202,
202,
780,
2289,
2633,
273,
394,
17436,
5621,
202,
202,
6299,
18,
2626,
12,
315,
667,
432,
288,
1071,
30,
918,
279,
56... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
19865,
13757,
4848,
1435,
1216,
1185,
95,
202,
202,
780,
2289,
2633,
273,
394,
17436,
5621,
202,
202,
6299,
18,
2626,
12,
315,
667,
432,
288,
1071,
30,
918,
279,
56... |
for (ExceptionSet.ThrownExceptionIterator i = thrownExceptionSet.iterator(); i.hasNext(); ) { | for (ExceptionSet.ThrownExceptionIterator i = thrownExceptionSet.iterator(); i.hasNext();) { | private ExceptionSet computeEdgeExceptionSet(Edge edge, ExceptionSet thrownExceptionSet) { ExceptionSet result = exceptionSetFactory.createExceptionSet(); if (edge.getType() == UNHANDLED_EXCEPTION_EDGE) { // The unhandled exception edge always comes // after all of the handled exception edges. result.addAll(thrownExceptionSet); thrownExceptionSet.clear(); return result; } BasicBlock handlerBlock = edge.getTarget(); CodeExceptionGen handler = handlerBlock.getExceptionGen(); ObjectType catchType = handler.getCatchType(); if (Hierarchy.isUniversalExceptionHandler(catchType)) { result.addAll(thrownExceptionSet); thrownExceptionSet.clear(); } else { // Go through the set of thrown exceptions. // Any that will DEFINITELY be caught be this handler, remove. // Any that MIGHT be caught, but won't definitely be caught, // remain. for (ExceptionSet.ThrownExceptionIterator i = thrownExceptionSet.iterator(); i.hasNext(); ) { //ThrownException thrownException = i.next(); ObjectType thrownType = i.next(); boolean explicit = i.isExplicit(); if (DEBUG) System.out.println("\texception type " + thrownType + ", catch type " + catchType); try { if (Hierarchy.isSubtype(thrownType, catchType)) { // Exception can be thrown along this edge result.add(thrownType, explicit); // And it will definitely be caught i.remove(); if (DEBUG) System.out.println("\tException is subtype of catch type: " + "will definitely catch"); } else if (Hierarchy.isSubtype(catchType, thrownType)) { // Exception possibly thrown along this edge result.add(thrownType, explicit); if (DEBUG) System.out.println("\tException is supertype of catch type: " + "might catch"); } } catch (ClassNotFoundException e) { // As a special case, if a class hierarchy lookup // fails, then we will conservatively assume that the // exception in question CAN, but WON'T NECESSARILY // be caught by the handler. result.add(thrownType, explicit); } } } return result; } | 7352 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7352/4748a5a9b76f3dd763ee6bc7755c932a711bd6a6/TypeAnalysis.java/clean/findbugs/src/java/edu/umd/cs/findbugs/ba/TypeAnalysis.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
1185,
694,
3671,
6098,
503,
694,
12,
6098,
3591,
16,
1185,
694,
6718,
503,
694,
13,
288,
202,
202,
503,
694,
563,
273,
1520,
694,
1733,
18,
2640,
503,
694,
5621,
202,
202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
1185,
694,
3671,
6098,
503,
694,
12,
6098,
3591,
16,
1185,
694,
6718,
503,
694,
13,
288,
202,
202,
503,
694,
563,
273,
1520,
694,
1733,
18,
2640,
503,
694,
5621,
202,
202,
... |
public static Object evalSpecial(Context cx, Scriptable scope, Object thisArg, Object[] args, String filename, int lineNumber) throws JavaScriptException { if (args.length < 1) return Undefined.instance; Object x = args[0]; if (!(x instanceof String)) { String message = Context.getMessage0("msg.eval.nonstring"); Context.reportWarning(message); return x; } int[] linep = { lineNumber }; if (filename == null) { filename = Context.getSourcePositionFromStack(linep); if (filename == null) { filename = "<eval'ed string>"; linep[0] = 1; } } try { StringReader in = new StringReader((String) x); Object securityDomain = cx.getSecurityDomainForStackDepth(3); // Compile the reader with opt level of -1 to force interpreter // mode. int oldOptLevel = cx.getOptimizationLevel(); cx.setOptimizationLevel(-1); Script script = cx.compileReader(scope, in, filename, linep[0], securityDomain); cx.setOptimizationLevel(oldOptLevel); // if the compile fails, an error has been reported by the // compiler, but we need to stop execution to avoid // infinite looping on while(true) { eval('foo bar') } - // so we throw an EvaluatorException. if (script == null) { String message = Context.getMessage0("msg.syntax"); throw new EvaluatorException(message); } InterpretedScript is = (InterpretedScript) script; is.itsData.itsFromEvalCode = true; Object result = is.call(cx, scope, (Scriptable) thisArg, null); return result; } catch (IOException ioe) { // should never happen since we just made the Reader from a String throw new RuntimeException("unexpected io exception"); } } | 7555 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7555/d589083a1e05831fd048d3c3f77379559ec628d7/NativeGlobal.java/buggy/js/rhino/src/org/mozilla/javascript/NativeGlobal.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1033,
5302,
12193,
12,
1042,
9494,
16,
22780,
2146,
16,
4766,
1377,
1033,
20134,
16,
1033,
8526,
833,
16,
4766,
1377,
514,
1544,
16,
509,
13629,
13,
3639,
1216,
11905,
503,
565... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1033,
5302,
12193,
12,
1042,
9494,
16,
22780,
2146,
16,
4766,
1377,
1033,
20134,
16,
1033,
8526,
833,
16,
4766,
1377,
514,
1544,
16,
509,
13629,
13,
3639,
1216,
11905,
503,
565... | ||
if(baseClass != null){ baseClassFileName = baseClass.getLocation().toString(); } else { | protected String constructHeaderFileContent(String lineDelimiter){ StringBuffer text = new StringBuffer(); boolean extendingBase = false; String baseClassName = getBaseClassName(); String baseClassFileName = ""; if((baseClassName != null) && (baseClassName.length() > 0)) { extendingBase = true; List classElements = findClassElementsInProject(); BasicSearchMatch baseClass = (BasicSearchMatch)findInList(baseClassName, classElements); if(baseClass != null){ baseClassFileName = baseClass.getLocation().toString(); } else { baseClassFileName = baseClassName + HEADER_EXT; } } if(isIncludeGuard()){ text.append("#ifndef "); text.append(getNewClassName().toUpperCase()); text.append("_H"); text.append(lineDelimiter); text.append("#define "); text.append(getNewClassName().toUpperCase()); text.append("_H"); text.append(lineDelimiter); text.append(lineDelimiter); } if(extendingBase){ text.append("#include \""); text.append(baseClassFileName); text.append('\"'); text.append(lineDelimiter); text.append(lineDelimiter); } text.append("class "); text.append(getNewClassName()); if(extendingBase){ text.append(" : "); text.append(getAccess()); text.append(" "); text.append(baseClassName); } text.append("{"); text.append(lineDelimiter); text.append("public:"); text.append(lineDelimiter); text.append(lineDelimiter); // constructor text.append('\t'); text.append(getNewClassName()); text.append("()"); if(isInline()){ text.append(" {};"); text.append(lineDelimiter); }else { text.append(";"); text.append(lineDelimiter); } // destructor text.append('\t'); if(isVirtualDestructor()){ text.append("virtual "); } text.append("~"); text.append(getNewClassName()); text.append("()"); if(isInline()){ text.append(" {};"); text.append(lineDelimiter); }else { text.append(";"); text.append(lineDelimiter); } text.append("};"); text.append(lineDelimiter); if(isIncludeGuard()){ text.append(lineDelimiter); text.append("#endif // "); text.append(getNewClassName().toUpperCase()); text.append("_H"); text.append(lineDelimiter); } return text.toString(); } | 54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/8dba12bff30d80a18f15f415db1e8b5e85a3aee1/NewClassWizardPage.java/buggy/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/NewClassWizardPage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
514,
4872,
1864,
25391,
12,
780,
980,
12007,
15329,
202,
202,
780,
1892,
977,
273,
394,
6674,
5621,
202,
202,
6494,
27147,
2171,
273,
629,
31,
202,
202,
780,
1026,
3834,
273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
514,
4872,
1864,
25391,
12,
780,
980,
12007,
15329,
202,
202,
780,
1892,
977,
273,
394,
6674,
5621,
202,
202,
6494,
27147,
2171,
273,
629,
31,
202,
202,
780,
1026,
3834,
273,
... | |
if (hosts==1) { mapToPartitionZero(str, partitionMap); } else { | public static void run(SIRStream str, JInterfaceDeclaration[] interfaces, SIRInterfaceTable[] interfaceTables, SIRStructure[] structs, SIRHelper[] helpers, SIRGlobal global) { HashMap[] exec_counts1; HashMap[] exec_counts2; boolean doCacheOptimization = KjcOptions.cacheopt; int code_cache = 16000; int data_cache = 16000; // if (debugPrint) // System.out.println("Cluster Backend SIRGlobal: "+global); System.out.println("Entry to Cluster Backend" + ((KjcOptions.standalone && KjcOptions.cluster == 1) ? " (uniprocessor)": "")); // System.out.println(" --cluster parameter is: "+KjcOptions.cluster); // if (debugPrint) // System.out.println(" peekratio is: "+KjcOptions.peekratio); // System.out.println(" rename1 is: "+KjcOptions.rename1); // System.out.println(" rename2 is: "+KjcOptions.rename2); if (debugPrint) { SIRGlobal[] globals; if (global != null) { globals = new SIRGlobal[1]; globals[0] = global; } else globals = new SIRGlobal[0]; System.err.println("// str on entry to Cluster backend"); SIRToStreamIt.run(str,interfaces,interfaceTables,structs,globals); System.err.println("// END str on entry to Cluster backend"); } structures = structs; // Introduce Multiple Pops where programmer // didn't take advantage of them IntroduceMultiPops.doit(str); // Perform propagation on fields from 'static' sections. Set<SIRGlobal> statics = new HashSet<SIRGlobal>(); if (global != null) statics.add(global); StaticsProp.propagate(str, statics); if (debugPrint) { System.err.println("// str after RenameAll and StaticsProp"); SIRGlobal[] globals; if (global != null) { globals = new SIRGlobal[1]; globals[0] = global; } else { globals = new SIRGlobal[0]; } SIRToStreamIt.run(str, interfaces, interfaceTables, structs, globals); System.err.println("// END str after RenameAll and StaticsProp"); } // propagate constants and unroll loop System.err.print("Running Constant Prop and Unroll..."); // Constant propagate and unroll. // Set unrolling factor to <= 4 for loops that don't involve // any tape operations. Unroller.setLimitNoTapeLoops(true, 4); ConstantProp.propagateAndUnroll(str); System.err.println(" done."); // do constant propagation on fields System.err.print("Running Constant Field Propagation..."); ConstantProp.propagateAndUnroll(str, true); if (debugPrint) { System.err.println("// str after ConstantProp"); SIRToStreamIt.run(str,interfaces,interfaceTables,structs); System.err.println("// END str after ConstantProp"); } // convert round(x) to floor(0.5+x) to avoid obscure errors RoundToFloor.doit(str); // add initPath functions EnqueueToInitPath.doInitPath(str); // construct stream hierarchy from SIRInitStatements ConstructSIRTree.doit(str); //this must be run now, FlatIRToC relies on it!!! RenameAll.renameAllFilters(str); //SIRPrinter printer1 = new SIRPrinter(); //str.accept(printer1); //printer1.close(); //VarDecl Raise to move array assignments up new VarDeclRaiser().raiseVars(str); // expand array initializers loaded from a file ArrayInitExpander.doit(str); System.err.println(" done."); // announce end of ConstantProp and Unroll //System.err.println("Analyzing Branches.."); //new BlockFlattener().flattenBlocks(str); //new BranchAnalyzer().analyzeBranches(str); SIRPortal.findMessageStatements(str); // Unroll and propagate maximally within each (not phased) filter. // Initially justified as necessary for IncreaseFilterMult which is // now obsolete. Optimizer.optimize(str); if (debugPrint) { System.err.println("// str after Optimizer"); SIRToStreamIt.run(str,interfaces,interfaceTables,structs); System.err.println("// END str after Optimizer"); } // estimate code and local variable size for each filter (and store where???) Estimator.estimate(str); // canonicalize stream graph, reorganizing some splits and joins Lifter.liftAggressiveSync(str); //StreamItDot.printGraph(str, "before-partition.dot"); // gather application-characterization statistics if (KjcOptions.stats) { StatisticsGathering.doit(str); } // Flattener is a misnomer here. // rewrite str for linearreplacement, frequencyreplacement // redundantreplacement str = Flattener.doLinearAnalysis(str); // statespace. str = Flattener.doStateSpaceAnalysis(str); // for scheduler, interpret dynamic rates as a constant. // TODO: // eventually make a policy that changes dynamic rates <r> to // to <r.max> or 1000 if <r.max> is dynamic. // for now: // to push MPEG through cluster need size of // apps/benchmarks/mpeg2/input/momessage.m2v in bits rounded // up to a multiple of 32. SIRDynamicRateManager.pushConstantPolicy(1000000); //SIRDynamicRateManager.pushIdentityPolicy(); // Calculate SIRSchedule before increasing multiplicity StreamItDot.printGraph(str, "before-peekmult.dot"); exec_counts1 = SIRScheduler.getExecutionCounts(str); // sets filter steady counts, which are needed by cache partitioner filter_steady_counts = exec_counts1[1]; // Code relating to IncreaseFilterMult removed here. Optimizer.optimize(str); Estimator.estimate(str); // should really be hosts -- how many systems // will be running this code. int hosts = KjcOptions.cluster; HashMap<SIROperator,Integer> partitionMap = new HashMap<SIROperator,Integer>(); if ( doCacheOptimization ) { str = new CachePartitioner(str, WorkEstimate.getWorkEstimate(str), 0, code_cache, data_cache).calcPartitions(partitionMap); } // Calculate SIRSchedule after increasing multiplicity StreamItDot.printGraph(str, "after-peekmult.dot"); exec_counts2 = SIRScheduler.getExecutionCounts(str); // sets filter steady counts, which are needed by cache partitioner filter_steady_counts = exec_counts2[1]; // code relating to IncreaseFilterMult removed here. // something to do with profiling? MarkFilterBoundaries.doit(str); if (KjcOptions.optfile != null) { System.err.println("Running User-Defined Transformations..."); str = ManualPartition.doit(str); System.err.println("User-Defined Transformations End."); // cluster backend should handle multipops //RemoveMultiPops.doit(str); } StreamItDot.printGraph(str, "before-partition.dot"); if ( doCacheOptimization ) { // this performs the Cache Aware Fusion (CAF) pass from // LCTES'05. This fuses filters for targetting a uniprocessor. str = CachePartitioner.doit(str, code_cache, data_cache); } else if (KjcOptions.partition_dp || KjcOptions.partition_greedy || KjcOptions.partition_greedier) { System.err.println("Running Partitioning... target number of threads: "+hosts); // if these are turned on, then fuse filters as if // targetting a multiprocessor str = Partitioner.doit(str, 0, hosts, false, false, false); // from now on, target however many threads were produced // by the partitioner (some may have been unfusable.) KjcOptions.cluster = Partitioner.countFilters(str); } //HashMap partitionMap = new HashMap(); partitionMap.clear(); if ( doCacheOptimization ) { str = new CachePartitioner(str, WorkEstimate.getWorkEstimate(str), 0, code_cache, data_cache).calcPartitions(partitionMap); str.setParent(null); str = new DynamicProgPartitioner(str, WorkEstimate.getWorkEstimate(str), hosts, false, false).calcPartitions(partitionMap); } else { // if mapping to 1 machine, then just map everyone to // partition 0 as an optimization (the partitioner would // do the same thing, but would take longer) if (hosts==1) { mapToPartitionZero(str, partitionMap); } else { // Fix up a bug that might be caused by previous // pass of partitioner str.setParent(null); str = new DynamicProgPartitioner(str, WorkEstimate.getWorkEstimate(str), hosts, false, false).calcPartitions(partitionMap); } } System.err.println("Done Partitioning..."); Unroller.setLimitNoTapeLoops(false, 0); if (KjcOptions.sjtopipe) { SJToPipe.doit(str); } StreamItDot.printGraph(str, "after-partition.dot"); //VarDecl Raise to move array assignments up new VarDeclRaiser().raiseVars(str); //VarDecl Raise to move peek index up so //constant prop propagates the peek buffer index new VarDeclRaiser().raiseVars(str); // optionally print a version of the source code that we're // sending to the scheduler if (KjcOptions.print_partitioned_source) { new streamit.scheduler2.print.PrintProgram().printProgram(IterFactory.createFactory().createIter(str)); } //run constrained scheduler System.err.print("Constrained Scheduler Begin..."); topStreamIter = IterFactory.createFactory().createIter(str); //topStreamIter = IterFactory.createFineGrainedFactory().createIter(str); //new streamit.scheduler2.print.PrintGraph().printProgram(topStreamIter); //new streamit.scheduler2.print.PrintProgram().printProgram(topStreamIter);// if (KjcOptions.debug) {// debugOutput(str);// } System.err.println(" done."); // end constrained scheduler System.err.println("Flattener Begin..."); executionCounts = SIRScheduler.getExecutionCounts(str); PartitionDot.printScheduleGraph(str, "schedule.dot", executionCounts); GraphFlattener graphFlattener = new GraphFlattener(str); //graphFlattener.dumpGraph("flatgraph.dot"); System.err.println("Flattener End."); //create the execution counts for other passes createExecutionCounts(str, graphFlattener); if (debugPrint) { SIRGlobal[] globals; if (global != null) { globals = new SIRGlobal[1]; globals[0] = global; } else globals = new SIRGlobal[0]; System.err.println("// str before Cluster-specific code"); SIRToStreamIt.run(str,interfaces,interfaceTables,structs,globals); System.err.println("// END str before Cluster-specific code"); } // if going to standalone without fusion, expand the main // method names to include the filter name, so we can identify them if (KjcOptions.standalone && !KjcOptions.fusion) { RenameAll.expandFunctionNames(str); } //////////////////////////////////////////////// // the cluster specific code begins here NodeEnumerator.reset(); NodeEnumerator.init(graphFlattener); // xlate between node numbers and SIROperators / FlatNodes RegisterStreams.reset(); RegisterStreams.init(graphFlattener); // set up NetStreams and associate vectors of NetStreams with node numbers /* // Remove globals pass is broken in cluster !!! if (KjcOptions.removeglobals) { RemoveGlobals.doit(graphFlattener.top); } */ StructureIncludeFile.doit(structures, graphFlattener.top); /// start output portals SIRPortal portals[] = SIRPortal.getPortals(); LatencyConstraints.detectConstraints(topStreamIter, portals); /// end output portals //VarDecl Raise to move array assignments down? new VarDeclRaiser().raiseVars(str);// // creating filter2Node// filter2Node = new HashMap<SIROperator,FlatNode>();// graphFlattener.top.accept(// new FlatVisitor() {// public void visitNode(FlatNode node) {// filter2Node.put(node.contents,node);// }// },// null,// true); DiscoverSchedule d_sched = new DiscoverSchedule(); d_sched.findPhases(graphFlattener.top.contents); //generating code for partitioned nodes //ClusterExecutionCode.doit(graphFlattener.top); System.err.println("Generating cluster code..."); ClusterFusion.setPartitionMap(partitionMap); if (KjcOptions.fusion) { graphFlattener.top.accept(new ClusterFusion(), new HashSet(), true); } //ClusterCode.setPartitionMap(partitionMap); // legacy code now no-op ClusterCode.generateCode(graphFlattener.top); // thread*.cpp FusionCode.generateFusionHeader(str, doCacheOptimization); // fusion.h GenerateGlobalDotH.generateGlobalDotH(global, helpers); // global.h if (KjcOptions.standalone) { FusionCode.generateFusionFile(d_sched /*, implicit_mult*/); // fusion.cpp } else { GenerateMasterDotCpp.generateMasterDotCpp(); // master.cpp GenerateGlobalDotCpp.generateGlobalDotCpp(global, helpers); // global.cpp } GenerateClusterDotH.generateClusterDotH(); // master.h GenerateMakefile.generateMakefile(helpers); // Makefile.cluster GenerateConfigFile.generateConfigFile(); // cluster-config.txt GenerateSetupFile.generateSetupFile(); // cluster-setup.txt if (at.dms.kjc.sir.linear.frequency.LEETFrequencyReplacer.didTransform) { // if we are referencing FFTW functions, don't bother // generating a work estimate because we haven't profiled // those functions for an accurate count. Delete the file // to avoid confusion on part of user. GenerateWorkEst.clearWorkEst(); } else { // otherwise generate file GenerateWorkEst.generateWorkEst(); // work-estimate.txt } System.err.println(" done."); /* // attempt to find constrained schedule! Greedy g = new Greedy(d_sched); for (int w = 0; w < 20; w++) { int res = g.nextPhase(); // find a constrained phase if (res > 0) break; } for (int w = 0; w < 20; w++) { g.combineInit(); } */ System.out.println("Exiting"); System.exit(0); } | 47772 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47772/3550df718d0025a81cf034a4bc7e5bbe4167f83f/ClusterBackend.java/buggy/streams/src/at/dms/kjc/cluster/ClusterBackend.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
1086,
12,
2320,
54,
1228,
609,
16,
21821,
804,
1358,
6094,
8526,
7349,
16,
21821,
5705,
54,
1358,
1388,
8526,
1560,
6905,
16,
21821,
5705,
54,
6999,
8526,
8179,
16,
21821,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1086,
12,
2320,
54,
1228,
609,
16,
21821,
804,
1358,
6094,
8526,
7349,
16,
21821,
5705,
54,
1358,
1388,
8526,
1560,
6905,
16,
21821,
5705,
54,
6999,
8526,
8179,
16,
21821,... | |
float nitrogenGathered = myNitrogenConsumerDefinitionImpl .getMostResourceFromStore(); float nitrogenPushed = myNitrogenProducerDefinitionImpl .pushResourceToStore(nitrogenGathered); | float nitrogenGathered = myNitrogenConsumerDefinitionImpl .getMostResourceFromStore(); myNitrogenProducerDefinitionImpl.pushResourceToStore(nitrogenGathered); | private void getAndPushResources() { float powerGathered = myPowerConsumerDefinitionImpl .getMostResourceFromStore(); float powerPushed = myPowerProducerDefinitionImpl .pushResourceToStore(powerGathered); float potableWaterGathered = myPotableWaterConsumerDefinitionImpl .getMostResourceFromStore(); float potableWaterPushed = myPotableWaterProducerDefinitionImpl .pushResourceToStore(potableWaterGathered); float greyWaterGathered = myGreyWaterConsumerDefinitionImpl .getMostResourceFromStore(); float greyWaterPushed = myGreyWaterProducerDefinitionImpl .pushResourceToStore(greyWaterGathered); float dirtyWaterGathered = myDirtyWaterConsumerDefinitionImpl .getMostResourceFromStore(); float dirtyWaterPushed = myDirtyWaterProducerDefinitionImpl .pushResourceToStore(dirtyWaterGathered); float biomassGathered = myBiomassConsumerDefinitionImpl .getMostResourceFromStore(); float biomassPushed = myBiomassProducerDefinitionImpl .pushResourceToStore(biomassGathered); float foodGathered = myFoodConsumerDefinitionImpl .getMostResourceFromStore(); float foodPushed = myFoodProducerDefinitionImpl .pushResourceToStore(foodGathered); float dryWasteGathered = myDryWasteConsumerDefinitionImpl .getMostResourceFromStore(); float dryWastePushed = myDryWasteProducerDefinitionImpl .pushResourceToStore(dryWasteGathered); float O2Gathered = myO2ConsumerDefinitionImpl .getMostResourceFromStore(); float O2Pushed = myO2ProducerDefinitionImpl .pushResourceToStore(O2Gathered); float CO2Gathered = myCO2ConsumerDefinitionImpl .getMostResourceFromStore(); float CO2Pushed = myCO2ProducerDefinitionImpl .pushResourceToStore(CO2Gathered); float nitrogenGathered = myNitrogenConsumerDefinitionImpl .getMostResourceFromStore(); float nitrogenPushed = myNitrogenProducerDefinitionImpl .pushResourceToStore(nitrogenGathered); float H2Gathered = myH2ConsumerDefinitionImpl .getMostResourceFromStore(); float H2Pushed = myH2ProducerDefinitionImpl .pushResourceToStore(nitrogenGathered); Breath gatheredAir = myAirConsumerDefinitionImpl .getMostAirFromEnvironment(); Breath distributedAir = myAirProducerDefinitionImpl .pushAirToEnvironments(gatheredAir); //Get CO2 from stores/environment float gatheredCO2Air = myCO2AirConsumerDefinitionImpl .getMostResourceFromStore(); gatheredCO2Air += myCO2AirConsumerDefinitionImpl .getMostCO2FromEnvironment(); //Push CO2 to stores/environment float CO2AirPushed = myCO2AirProducerDefinitionImpl .pushResourceToStore(gatheredCO2Air); float CO2AirLeft = gatheredCO2Air - CO2AirPushed; CO2AirLeft -= myCO2AirProducerDefinitionImpl .pushCO2ToEnvironment(CO2AirLeft); CO2AirPushed = gatheredCO2Air - CO2AirLeft; //Get O2 from stores/environment float gatheredO2Air = myO2AirConsumerDefinitionImpl .getMostResourceFromStore(); gatheredO2Air += myO2AirConsumerDefinitionImpl .getMostO2FromEnvironment(); //Push O2 to stores/environment float O2AirPushed = myO2AirProducerDefinitionImpl .pushResourceToStore(gatheredO2Air); float O2AirLeft = gatheredO2Air - O2AirPushed; O2AirLeft -= myO2AirProducerDefinitionImpl .pushO2ToEnvironment(O2AirLeft); O2AirPushed = gatheredO2Air - O2AirLeft; //Get Nitrogen from stores/environment float gatheredNitrogenAir = myNitrogenAirConsumerDefinitionImpl .getMostResourceFromStore(); gatheredNitrogenAir += myNitrogenAirConsumerDefinitionImpl .getMostNitrogenFromEnvironment(); //Push Nitrogen to stores/environment float nitrogenAirPushed = myNitrogenAirProducerDefinitionImpl .pushResourceToStore(gatheredNitrogenAir); float nitrogenAirLeft = gatheredNitrogenAir - nitrogenAirPushed; nitrogenAirLeft -= myNitrogenAirProducerDefinitionImpl .pushNitrogenToEnvironment(nitrogenAirLeft); nitrogenAirPushed = gatheredNitrogenAir - nitrogenAirLeft; //Get Water from stores/environment float gatheredWaterAirLiters = myWaterAirConsumerDefinitionImpl .getMostResourceFromStore(); gatheredWaterAirLiters += waterMolesToLiters(myWaterAirConsumerDefinitionImpl .getMostWaterFromEnvironment()); //Push water to stores/environment float waterAirPushedLiters = myWaterAirProducerDefinitionImpl .pushResourceToStore(gatheredWaterAirLiters); float waterAirMolesLeft = waterLitersToMoles(gatheredWaterAirLiters - waterAirPushedLiters); waterAirMolesLeft -= myWaterAirProducerDefinitionImpl .pushWaterToEnvironment(waterAirMolesLeft); float waterAirPushedMoles = waterLitersToMoles(gatheredWaterAirLiters) - waterAirMolesLeft; } | 5015 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5015/397a74b47f2f52b66dbe5e307fb37ee5e164487d/InjectorImpl.java/buggy/BIOSIM/src/com/traclabs/biosim/server/simulation/framework/InjectorImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
22909,
7621,
3805,
1435,
288,
3639,
1431,
7212,
26092,
329,
273,
3399,
13788,
5869,
1852,
2828,
7734,
263,
588,
18714,
1420,
1265,
2257,
5621,
3639,
1431,
7212,
7621,
329,
273,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
22909,
7621,
3805,
1435,
288,
3639,
1431,
7212,
26092,
329,
273,
3399,
13788,
5869,
1852,
2828,
7734,
263,
588,
18714,
1420,
1265,
2257,
5621,
3639,
1431,
7212,
7621,
329,
273,
3... |
public static boolean isNullHashtable(Hashtable h ) { if (h==null) return true; else if (h.isEmpty()) return true; return false; } | 6392 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6392/8837cda25486b5a2d14679775489ef6ba7257597/Utils.java/clean/src/eionet/gdem/utils/Utils.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
1250,
7612,
5582,
14544,
12,
5582,
14544,
366,
262,
288,
565,
309,
261,
76,
631,
2011,
13,
1377,
327,
638,
31,
565,
469,
1377,
309,
261,
76,
18,
291,
1921,
10756,
327,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
1250,
7612,
5582,
14544,
12,
5582,
14544,
366,
262,
288,
565,
309,
261,
76,
631,
2011,
13,
1377,
327,
638,
31,
565,
469,
1377,
309,
261,
76,
18,
291,
1921,
10756,
327,
638,
... | ||
match("&&"); if (failed) return ; | match("exists"); if (failed) return ; | public void mT70() throws RecognitionException { try { ruleNestingLevel++; int _type = T70; int _start = getCharIndex(); int _line = getLine(); int _charPosition = getCharPositionInLine(); int _channel = Token.DEFAULT_CHANNEL; // D:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:49:7: ( '&&' ) // D:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:49:7: '&&' { match("&&"); if (failed) return ; } if ( backtracking==0 ) { if ( token==null && ruleNestingLevel==1 ) { emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1); } } } finally { ruleNestingLevel--; } } | 6736 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6736/c3437c2488c314384990c4282a547e0f92ca02c2/DRLLexer.java/clean/drools-compiler/src/main/java/org/drools/lang/DRLLexer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
21115,
7301,
1435,
1216,
9539,
288,
3639,
775,
288,
5411,
1720,
50,
10100,
2355,
9904,
31,
5411,
509,
389,
723,
273,
399,
7301,
31,
5411,
509,
389,
1937,
273,
23577,
1016,
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,
21115,
7301,
1435,
1216,
9539,
288,
3639,
775,
288,
5411,
1720,
50,
10100,
2355,
9904,
31,
5411,
509,
389,
723,
273,
399,
7301,
31,
5411,
509,
389,
1937,
273,
23577,
1016,
5621... |
public void testJarAndClassName() { | public void testJarAndClassName() { | public void testJarAndClassName() { expectBuildException("testJarAndClassName", "Should not be able to set both classname AND jar"); } | 506 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/506/00e6624c1927ca0775d4d2cf2b3c8a227814c971/JavaTest.java/buggy/src/testcases/org/apache/tools/ant/taskdefs/JavaTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
10813,
1876,
3834,
1435,
288,
540,
4489,
3116,
503,
2932,
3813,
10813,
1876,
3834,
3113,
5411,
315,
14309,
486,
506,
7752,
358,
444,
3937,
7479,
4116,
7334,
8863,
565,
289,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
10813,
1876,
3834,
1435,
288,
540,
4489,
3116,
503,
2932,
3813,
10813,
1876,
3834,
3113,
5411,
315,
14309,
486,
506,
7752,
358,
444,
3937,
7479,
4116,
7334,
8863,
565,
289,... |
double length = ap3d.getBondLengthValue(atomA.getID(), unplacedAtom.getID()); double angle = (ap3d.getAngleValue(atomB.getID(), atomA.getID(), unplacedAtom.getID())) * Math.PI / 180; | double length = ap3d.getBondLengthValue(atomA.getAtomTypeName(), unplacedAtom.getAtomTypeName()); double angle = (ap3d.getAngleValue(atomB.getAtomTypeName(), atomA.getAtomTypeName(), unplacedAtom.getAtomTypeName())) * Math.PI / 180; | public void setBranchAtom(Atom unplacedAtom, Atom atomA, AtomContainer atomNeighbours) throws Exception { //System.out.println("****** SET Branch Atom ****** >"+molecule.getAtomNumber(unplacedAtom)); AtomContainer noCoords = new org.openscience.cdk.AtomContainer(); noCoords.addAtom(unplacedAtom); Point3d centerPlacedMolecule = ap3d.geometricCenterAllPlacedAtoms(molecule); Atom atomB = atomNeighbours.getAtomAt(0); double length = ap3d.getBondLengthValue(atomA.getID(), unplacedAtom.getID()); double angle = (ap3d.getAngleValue(atomB.getID(), atomA.getID(), unplacedAtom.getID())) * Math.PI / 180; /* * System.out.println("A:"+atomA.getSymbol()+" "+atomA.getID()+" B:"+atomB.getSymbol()+" "+atomB.getID() * +" unplaced Atom:"+unplacedAtom.getID()+" BL:"+length+" Angle:"+angle * +" FormalNeighbour:"+atomA.getFormalNeighbourCount()+" HYB:"+atomA.getFlag(CDKConstants.HYBRIDIZATION_SP2) * +" #Neigbhours:"+atomNeighbours.getAtomCount()); */ Atom atomC = ap3d.getPlacedHeavyAtom(molecule, atomB, atomA); Point3d[] branchPoints = atlp3d.get3DCoordinatesForLigands(atomA, noCoords, atomNeighbours, atomC , (atomA.getFormalNeighbourCount() - atomNeighbours.getAtomCount()) , length, angle); double distance = 0; int farthestPoint = 0; try { for (int i = 0; i < branchPoints.length; i++) { if (Math.abs(branchPoints[i].distance(centerPlacedMolecule)) > Math.abs(distance)) { distance = branchPoints[i].distance(centerPlacedMolecule); farthestPoint = i; } } } catch (Exception ex2) { System.out.println("SetBranchAtomERROR: Not enough branch Points due to:" + ex2.toString() + " #branchpoints:" + branchPoints.length); throw new IOException("SetBranchAtomERROR: Not enough branch Points"); } int stereo = -1; if (atomA.getStereoParity() != 0 || (Math.abs((molecule.getBond(atomA, unplacedAtom)).getStereo()) < 2 && Math.abs((molecule.getBond(atomA, unplacedAtom)).getStereo()) != 0) && molecule.getMaximumBondOrder(atomA) < 1.5) { if (atomNeighbours.getAtomCount() > 1) { stereo = atlp3d.makeStereocenter(atomA.getPoint3d(), molecule.getBond(atomA, unplacedAtom), (atomNeighbours.getAtomAt(0)).getPoint3d(), (atomNeighbours.getAtomAt(1)).getPoint3d(), branchPoints); } } if (stereo != -1) { farthestPoint = stereo; } unplacedAtom.setPoint3d(branchPoints[farthestPoint]); unplacedAtom.setFlag(CDKConstants.ISPLACED, true); } | 45254 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45254/660e7fff9f6498248ec7df3d4da91b5f9020328f/ModelBuilder3D.java/clean/src/org/openscience/cdk/modeling/builder3d/ModelBuilder3D.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
444,
7108,
3641,
12,
3641,
640,
28238,
3641,
16,
7149,
3179,
37,
16,
7149,
2170,
3179,
13577,
4390,
13,
1216,
1185,
288,
202,
202,
759,
3163,
18,
659,
18,
8222,
2932,
113... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
444,
7108,
3641,
12,
3641,
640,
28238,
3641,
16,
7149,
3179,
37,
16,
7149,
2170,
3179,
13577,
4390,
13,
1216,
1185,
288,
202,
202,
759,
3163,
18,
659,
18,
8222,
2932,
113... |
if (listMods.size() > 0 && strProperty != null) { hashProperties.put(strProperty, "true"); | if (!listMods.isEmpty()) { properties.modificationFound(); | public List getModifications(Date lastBuild, Date now) { java.util.List paramList = new java.util.ArrayList(); if (!strparamFile.isSet()) { strparamFile.setData("/"); } paramList.add(strparamFile); paramList.add(strparamBranch); paramList.add(strparamRepository); paramList.add(fparamRecursive); paramList.add(fparamSearchRegExp); paramList.add(strparamServerLogin); paramList.add(strparamServerConnect); List listMods = executeCLICommand(paramList, buildDateTimeRangeCLIParam(lastBuild, now)); if (listMods == null) { listMods = Collections.EMPTY_LIST; } if (listMods.size() > 0 && strProperty != null) { hashProperties.put(strProperty, "true"); } return listMods; } | 55334 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55334/c879b70b24afa19e65b4d2d550b27f6e981821f1/SSCM.java/buggy/main/src/net/sourceforge/cruisecontrol/sourcecontrols/SSCM.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
987,
336,
28340,
12,
1626,
1142,
3116,
16,
2167,
2037,
13,
288,
3639,
2252,
18,
1367,
18,
682,
579,
682,
273,
394,
2252,
18,
1367,
18,
19558,
5621,
3639,
309,
16051,
701,
891,
812... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
987,
336,
28340,
12,
1626,
1142,
3116,
16,
2167,
2037,
13,
288,
3639,
2252,
18,
1367,
18,
682,
579,
682,
273,
394,
2252,
18,
1367,
18,
19558,
5621,
3639,
309,
16051,
701,
891,
812... |
Object result = super.invoke(targetObject); | try { | public Object invoke(Object targetObject) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { SecurityContextHolder.setContext(securityContext); if ((SecurityContextHolder.getContext() != null) && (SecurityContextHolder.getContext().getAuthentication() != null)) { SecurityContextHolder.getContext().getAuthentication() .setAuthenticated(false); } if (logger.isDebugEnabled()) { logger.debug("Set SecurityContextHolder to contain: " + securityContext); } Object result = super.invoke(targetObject); SecurityContextHolder.setContext(new SecurityContextImpl()); if (logger.isDebugEnabled()) { logger.debug( "Set SecurityContext to new instance of SecurityContextImpl"); } return result; } | 57740 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57740/7847af266436f53b4c69354df42bcd1261222f95/ContextPropagatingRemoteInvocation.java/clean/core/src/main/java/org/acegisecurity/context/rmi/ContextPropagatingRemoteInvocation.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
4356,
12,
921,
1018,
921,
13,
3639,
1216,
15959,
16,
11900,
16,
2398,
15342,
288,
3639,
22672,
6064,
18,
542,
1042,
12,
7462,
1042,
1769,
3639,
309,
14015,
28646,
6064,
18,
29... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
4356,
12,
921,
1018,
921,
13,
3639,
1216,
15959,
16,
11900,
16,
2398,
15342,
288,
3639,
22672,
6064,
18,
542,
1042,
12,
7462,
1042,
1769,
3639,
309,
14015,
28646,
6064,
18,
29... |
fGrammarPool.cacheGrammars(grammars[0].getGrammarDescription().getGrammarType(), grammars); | fGrammarPool.cacheGrammars(grammars[0].getGrammarDescription().getGrammarType(), grammars); | private void initGrammarPool(ASModelImpl currModel) { // put all the grammars in fAbstractSchema into the grammar pool. if (fGrammarPool != null) { Grammar[] grammars = new Grammar[1]; if ((grammars[0] = (Grammar)currModel.getGrammar()) != null) { fGrammarPool.cacheGrammars(grammars[0].getGrammarDescription().getGrammarType(), grammars); } Vector modelStore = currModel.getInternalASModels(); for (int i = 0; i < modelStore.size(); i++) { initGrammarPool((ASModelImpl)modelStore.elementAt(i)); } } } | 1831 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1831/0cd56637de031b03ea02b1e8067520f945150f36/DOMASBuilderImpl.java/clean/src/org/apache/xerces/parsers/DOMASBuilderImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1208,
18576,
2864,
12,
3033,
29974,
4306,
1488,
13,
288,
3639,
368,
1378,
777,
326,
6473,
87,
316,
284,
7469,
3078,
1368,
326,
6473,
2845,
18,
3639,
309,
261,
74,
18576,
2864,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
18576,
2864,
12,
3033,
29974,
4306,
1488,
13,
288,
3639,
368,
1378,
777,
326,
6473,
87,
316,
284,
7469,
3078,
1368,
326,
6473,
2845,
18,
3639,
309,
261,
74,
18576,
2864,
... |
this.invalidateSession(); | this.invalidateDelegatedSession(); | public void lock(Object object, LockMode lockMode) throws HibernateException { try { this.getSession().lock(object, lockMode); } catch (HibernateException ex) { this.invalidateSession(); throw this.handleException(ex); } } | 9344 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9344/8a6aedd245de4f4ab4eb9c668d2f41d33c4c057a/SessionDelegator.java/buggy/trunk/java/hibernate3/src/java/org/nanocontainer/hibernate3/SessionDelegator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
2176,
12,
921,
733,
16,
3488,
2309,
2176,
2309,
13,
1216,
670,
24360,
503,
288,
3639,
775,
288,
5411,
333,
18,
588,
2157,
7675,
739,
12,
1612,
16,
2176,
2309,
1769,
3639,
289... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2176,
12,
921,
733,
16,
3488,
2309,
2176,
2309,
13,
1216,
670,
24360,
503,
288,
3639,
775,
288,
5411,
333,
18,
588,
2157,
7675,
739,
12,
1612,
16,
2176,
2309,
1769,
3639,
289... |
getValue().setCharAt(idx, (char) RubyNumeric.fix2int(args[1])); | getMutableValue().setCharAt(idx, (char) RubyNumeric.fix2int(args[1])); | public IRubyObject aset(IRubyObject[] args) { testFrozen("class"); int strLen = getValue().length(); if (checkArgumentCount(args, 2, 3) == 3) { RubyString repl = stringValue(args[2]); int beg = RubyNumeric.fix2int(args[0]); int len = RubyNumeric.fix2int(args[1]); if (len < 0) { throw getRuntime().newIndexError("negative length"); } if (beg < 0) { beg += strLen; } if (beg < 0 || (beg > 0 && beg >= strLen)) { throw getRuntime().newIndexError("string index out of bounds"); } if (beg + len > strLen) { len = strLen - beg; } replace(beg, len, repl); return repl; } if (args[0] instanceof RubyFixnum) { // RubyNumeric? int idx = RubyNumeric.fix2int(args[0]); // num2int? if (idx < 0) { idx += getValue().length(); } if (idx < 0 || idx >= getValue().length()) { throw getRuntime().newIndexError("string index out of bounds"); } if (args[1] instanceof RubyFixnum) { getValue().setCharAt(idx, (char) RubyNumeric.fix2int(args[1])); } else { replace(idx, 1, stringValue(args[1])); } return args[1]; } if (args[0] instanceof RubyRegexp) { sub_bang(args); return args[1]; } if (args[0] instanceof RubyString) { RubyString orig = stringValue(args[0]); int beg = toString().indexOf(orig.toString()); if (beg != -1) { replace(beg, orig.getValue().length(), stringValue(args[1])); } return args[1]; } if (args[0] instanceof RubyRange) { long[] idxs = ((RubyRange) args[0]).getBeginLength(getValue().length(), true, true); replace((int) idxs[0], (int) idxs[1], stringValue(args[1])); return args[1]; } throw getRuntime().newTypeError("wrong argument type"); } | 48300 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48300/185c54edbc79bd7b73f1c9400146d9a0aa45b0bb/RubyString.java/clean/src/org/jruby/RubyString.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
15908,
10340,
921,
487,
278,
12,
7937,
10340,
921,
8526,
833,
13,
288,
202,
202,
3813,
42,
9808,
2932,
1106,
8863,
202,
202,
474,
609,
2891,
273,
2366,
7675,
2469,
5621,
202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
15908,
10340,
921,
487,
278,
12,
7937,
10340,
921,
8526,
833,
13,
288,
202,
202,
3813,
42,
9808,
2932,
1106,
8863,
202,
202,
474,
609,
2891,
273,
2366,
7675,
2469,
5621,
202,
... |
configuration.setAttribute(IRConsoleConstants.ATTR_CMD_ARGUMENTS, isWin? "--ess" : "--no-readline"); | configuration.setAttribute(IRConsoleConstants.ATTR_CMD_ARGUMENTS, isWin? "--ess" : ""); | public void setDefaults(ILaunchConfigurationWorkingCopy configuration) { boolean isWin = Platform.getOS().startsWith("win"); String rLocation; if (isWin) { StringBuilder path = new StringBuilder(); path.append("${env_var:PROGRAMFILES}"); path.append("\\R\\R-2.x.x\\bin\\"); path.append("Rterm.exe"); rLocation = path.toString(); } else { rLocation = "/usr/local/bin/R"; } String workingDirectory = "${project_loc}"; IResource selectedResource = DebugUITools.getSelectedResource(); if (selectedResource != null) { IProject project = selectedResource.getProject(); if (project != null) { workingDirectory = "${project_loc:"+project.getName()+"}"; } } configuration.setAttribute(IRConsoleConstants.ATTR_R_LOCATION, rLocation); configuration.setAttribute(IRConsoleConstants.ATTR_WORKING_DIRECTORY, workingDirectory); configuration.setAttribute(IRConsoleConstants.ATTR_R_CMD, "TERM"); configuration.setAttribute(IRConsoleConstants.ATTR_CMD_ARGUMENTS, isWin? "--ess" : "--no-readline"); configuration.setAttribute(FIRST_EDIT, true); } | 47575 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47575/596f9d9e489a4ad53573c5a13d58bdf4a6a83dbd/RConsoleMainTab.java/buggy/de.walware.statet.r.ui/srcDebug/de/walware/statet/r/internal/debug/launchconfigs/RConsoleMainTab.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
22399,
12,
2627,
4760,
1750,
14836,
2951,
1664,
13,
288,
9506,
202,
6494,
353,
18049,
273,
11810,
18,
588,
4618,
7675,
17514,
1190,
2932,
8082,
8863,
9506,
202,
780,
436,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
22399,
12,
2627,
4760,
1750,
14836,
2951,
1664,
13,
288,
9506,
202,
6494,
353,
18049,
273,
11810,
18,
588,
4618,
7675,
17514,
1190,
2932,
8082,
8863,
9506,
202,
780,
436,
2... |
updateBracketHighlight(); if(caretEvent) fireCaretEvent(); | moveCaretPosition(caret); | public void contentRemoved(Buffer buffer, int startLine, int start, int numLines, int length) { if(!buffer.isLoaded()) return; chunkCache.invalidateChunksFromPhys(startLine); // -lineCount because they are removed. repaintAndScroll(startLine,-numLines); if(/* numLines != 0 && */ foldVisibilityManager.getLastVisibleLine() + numLines <= physLastLine) { int oldScreenLastLine = screenLastLine; recalculateLastPhysicalLine(); invalidateScreenLineRange(oldScreenLastLine, screenLastLine); } int end = start + length; boolean caretEvent = false; // loop through all selections, resizing them if // necessary for(int i = 0; i < selection.size(); i++) { Selection s = (Selection)selection.elementAt(i); boolean changed = false; if(s.start > start && s.start <= end) { s.start = start; changed = caretEvent = true; } else if(s.start > end) { s.start -= length; changed = caretEvent = true; } if(s.end > start && s.end <= end) { s.end = start; changed = caretEvent = true; } else if(s.end > end) { s.end -= length; changed = caretEvent = true; } if(s.start == s.end) { selection.removeElement(s); invalidateLineRange(s.startLine,s.endLine); i--; } else if(changed) { s.startLine = getLineOfOffset(s.start); s.endLine = getLineOfOffset(s.end); invalidateLineRange(s.startLine,s.endLine); } } if(caret > start && caret <= end) moveCaretPosition(start,false); else if(caret > end) moveCaretPosition(caret - length,false); else { updateBracketHighlight(); if(caretEvent) fireCaretEvent(); } } | 8690 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8690/1e5c06d33babc111443f974871ef7e451f1c9ba4/JEditTextArea.java/clean/org/gjt/sp/jedit/textarea/JEditTextArea.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
918,
913,
10026,
12,
1892,
1613,
16,
509,
24636,
16,
509,
787,
16,
1082,
202,
474,
818,
5763,
16,
509,
769,
13,
202,
202,
95,
1082,
202,
430,
12,
5,
4106,
18,
291,
8835,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
918,
913,
10026,
12,
1892,
1613,
16,
509,
24636,
16,
509,
787,
16,
1082,
202,
474,
818,
5763,
16,
509,
769,
13,
202,
202,
95,
1082,
202,
430,
12,
5,
4106,
18,
291,
8835,
... |
Collection<LocalFile> result = doTask( future, seekFile, outputFileName, identifier, newDir, ".tar" ); | Collection<LocalFile> result = doTask( future, seekFile, expectedSize, outputFileName, identifier, newDir, ".tar" ); | public Collection<LocalFile> fetch( String identifier ) { try { if ( f == null || !f.isConnected() ) f = GeoUtil.connect( FTP.BINARY_FILE_TYPE ); assert f != null; File newDir = mkdir( identifier ); newDir = new File( newDir, "rawDataFiles" ); if ( !newDir.canRead() && !newDir.mkdir() ) throw new IOException( "Could not create the raw data subdirectory" ); final String outputFileName = formLocalFilePath( identifier, newDir ); final String seekFile = formRemoteFilePath( identifier ); try { NetUtils.checkForFile( f, seekFile ); } catch ( FileNotFoundException e ) { // that's okay, just return. log.info( "There is apparently no raw data archive for " + identifier ); newDir.delete(); // nothing there. f.disconnect(); // important to do this! return null; } FutureTask<Boolean> future = defineTask( outputFileName, seekFile ); Collection<LocalFile> result = doTask( future, seekFile, outputFileName, identifier, newDir, ".tar" ); f.disconnect(); return result; } catch ( SocketException e ) { throw new RuntimeException( e ); } catch ( IOException e ) { throw new RuntimeException( e ); } } | 4335 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4335/504a08d1f6d71cfa76e81073bcc6053053779ccb/RawDataFetcher.java/clean/gemma-core/src/main/java/ubic/gemma/loader/expression/geo/fetcher/RawDataFetcher.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
2200,
32,
2042,
812,
34,
2158,
12,
514,
2756,
262,
288,
3639,
775,
288,
5411,
309,
261,
284,
422,
446,
747,
401,
74,
18,
291,
8932,
1435,
262,
284,
273,
9385,
1304,
18,
3612,
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,
2200,
32,
2042,
812,
34,
2158,
12,
514,
2756,
262,
288,
3639,
775,
288,
5411,
309,
261,
284,
422,
446,
747,
401,
74,
18,
291,
8932,
1435,
262,
284,
273,
9385,
1304,
18,
3612,
12... |
private void receivePacket(UDPPacket packet, PeerState state) { | private void receivePacket(UDPPacketReader reader, UDPPacket packet, PeerState state) { | private void receivePacket(UDPPacket packet, PeerState state) { boolean isValid = packet.validate(state.getCurrentMACKey()); if (!isValid) { if (state.getNextMACKey() != null) isValid = packet.validate(state.getNextMACKey()); if (!isValid) { if (_log.shouldLog(Log.WARN)) _log.warn("Failed validation with existing con, trying as new con: " + packet); isValid = packet.validate(_transport.getIntroKey()); if (isValid) { // this is a stray packet from an inbound establishment // process, so try our intro key // (after an outbound establishment process, there wouldn't // be any stray packets) if (_log.shouldLog(Log.INFO)) _log.info("Validation with existing con failed, but validation as reestablish/stray passed"); packet.decrypt(_transport.getIntroKey()); } else { if (_log.shouldLog(Log.WARN)) _log.warn("Validation with existing con failed, and validation as reestablish failed too. DROP"); return; } } else { packet.decrypt(state.getNextCipherKey()); } } else { packet.decrypt(state.getCurrentCipherKey()); } handlePacket(packet, state, null, null); } | 3808 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3808/9e5fe7d2b6b1021feed75ebf5156f3ae8688026f/PacketHandler.java/clean/router/java/src/net/i2p/router/transport/udp/PacketHandler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
6798,
6667,
12,
20352,
6667,
2514,
2949,
16,
16230,
6667,
4414,
16,
10669,
1119,
919,
13,
288,
3639,
1250,
4908,
273,
4414,
18,
5662,
12,
2019,
18,
588,
3935,
10875,
653,
10663... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6798,
6667,
12,
20352,
6667,
2514,
2949,
16,
16230,
6667,
4414,
16,
10669,
1119,
919,
13,
288,
3639,
1250,
4908,
273,
4414,
18,
5662,
12,
2019,
18,
588,
3935,
10875,
653,
10663... |
result.add(loadEJBLocalRef(e)); | result[i] = loadEJBLocalRef(e, new EJBLocalRef()); | public EJBLocalRef[] loadEJBLocalRefs(Element parent, EJBLocalRef[] resultType) { NodeList nodes = parent.getElementsByTagName("ejb-local-ref"); int length = nodes.getLength(); List result = new ArrayList(length); for (int i = 0; i < length; i++) { Element e = (Element) nodes.item(i); result.add(loadEJBLocalRef(e)); } return (EJBLocalRef[]) result.toArray(resultType); } | 12474 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12474/c5087214ca8f0e64c671620ee9fdf9258219e3e7/J2EELoader.java/clean/modules/core/src/java/org/apache/geronimo/xml/deployment/J2EELoader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
12157,
2042,
1957,
8526,
1262,
22719,
2042,
9837,
12,
1046,
982,
16,
12157,
2042,
1957,
8526,
25820,
13,
288,
3639,
16781,
2199,
273,
982,
18,
588,
3471,
10401,
2932,
73,
10649,
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,
1071,
12157,
2042,
1957,
8526,
1262,
22719,
2042,
9837,
12,
1046,
982,
16,
12157,
2042,
1957,
8526,
25820,
13,
288,
3639,
16781,
2199,
273,
982,
18,
588,
3471,
10401,
2932,
73,
10649,
17,
... |
assertEquals(4, children.length); | assertEquals(bottomTrimCount, children.length); | public void testRestoreStateWithChange() throws Throwable { WorkbenchWindow window = openWorkbenchWindow(); ITrimManager trimManager = window.getTrimManager(); XMLMemento state = XMLMemento .createWriteRoot(IWorkbenchConstants.TAG_WINDOW); IStatus rc = window.saveState(state); assertEquals(IStatus.OK, rc.getSeverity()); IMemento trim = state.getChild(IWorkbenchConstants.TAG_TRIM); assertNotNull(trim); IMemento[] children = trim .getChildren(IWorkbenchConstants.TAG_TRIM_AREA); int childIdx = 0; IMemento bottomTrim = null; String bottomId = new Integer(SWT.BOTTOM).toString(); for (; childIdx < children.length; childIdx++) { if (children[childIdx].getID().equals(bottomId)) { bottomTrim = children[childIdx]; break; } } assertNotNull(bottomTrim); children = bottomTrim.getChildren(IWorkbenchConstants.TAG_TRIM_ITEM); assertEquals(4, children.length); String id = children[0].getID(); children[0].putString(IMemento.TAG_ID, children[3].getID()); children[3].putString(IMemento.TAG_ID, id); window.restoreState(state, window.getActivePage().getPerspective()); window.getShell().layout(true, true); List windowTrim = trimManager.getAreaTrim(ITrimManager.BOTTOM); validatePositions(SWAPPED_FASTVIEW, windowTrim); } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/09abd6c072ee160437e2839c0c4f49fbac5797c1/TrimLayoutTest.java/clean/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/TrimLayoutTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
10874,
1119,
1190,
3043,
1435,
1216,
4206,
288,
202,
202,
2421,
22144,
3829,
2742,
273,
1696,
2421,
22144,
3829,
5621,
202,
202,
45,
14795,
1318,
2209,
1318,
273,
2742,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
10874,
1119,
1190,
3043,
1435,
1216,
4206,
288,
202,
202,
2421,
22144,
3829,
2742,
273,
1696,
2421,
22144,
3829,
5621,
202,
202,
45,
14795,
1318,
2209,
1318,
273,
2742,... |
return jjMoveStringLiteralDfa3_0(active0, 0x8000000L, active1, 0L); | return jjMoveStringLiteralDfa3_0(active0, 0x10000000L, active1, 0L); | private final int jjMoveStringLiteralDfa2_0(long old0, long active0, long old1, long active1){ if (((active0 &= old0) | (active1 &= old1)) == 0L) return jjStartNfa_0(0, old0, old1); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(1, active0, active1); return 2; } switch(curChar) { case 93: if ((active1 & 0x1L) != 0L) return jjStopAtPos(2, 64); break; case 65: case 97: return jjMoveStringLiteralDfa3_0(active0, 0x8000000L, active1, 0L); case 66: case 98: return jjMoveStringLiteralDfa3_0(active0, 0x40000400L, active1, 0L); case 67: case 99: return jjMoveStringLiteralDfa3_0(active0, 0x24800L, active1, 0L); case 68: case 100: if ((active0 & 0x400000L) != 0L) return jjStartNfaWithStates_0(2, 22, 20); break; case 69: case 101: if ((active0 & 0x1000L) != 0L) return jjStartNfaWithStates_0(2, 12, 20); break; case 71: case 103: return jjMoveStringLiteralDfa3_0(active0, 0x4200000L, active1, 0L); case 73: case 105: return jjMoveStringLiteralDfa3_0(active0, 0x100000000L, active1, 0L); case 76: case 108: return jjMoveStringLiteralDfa3_0(active0, 0x80000000L, active1, 0L); case 77: case 109: return jjMoveStringLiteralDfa3_0(active0, 0x400000000L, active1, 0L); case 78: case 110: return jjMoveStringLiteralDfa3_0(active0, 0x140002840000L, active1, 0L); case 79: case 111: return jjMoveStringLiteralDfa3_0(active0, 0x18001100000L, active1, 0L); case 80: case 112: return jjMoveStringLiteralDfa3_0(active0, 0x20000000L, active1, 0L); case 82: case 114: if ((active0 & 0x800000000L) != 0L) return jjStartNfaWithStates_0(2, 35, 20); return jjMoveStringLiteralDfa3_0(active0, 0x10080000L, active1, 0L); case 83: case 115: return jjMoveStringLiteralDfa3_0(active0, 0x26000000000L, active1, 0L); case 84: case 116: return jjMoveStringLiteralDfa3_0(active0, 0x200200002000L, active1, 0L); default : break; } return jjStartNfa_0(1, active0, active1);} | 4167 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4167/c836f8ba4db292fc47b3c10e890ac860f91b3e6b/VhdlParserCoreTokenManager.java/buggy/src/_generated/net/sourceforge/veditor/parser/VhdlParserCoreTokenManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3238,
727,
509,
10684,
7607,
28565,
40,
507,
22,
67,
20,
12,
5748,
1592,
20,
16,
1525,
2695,
20,
16,
1525,
1592,
21,
16,
1525,
2695,
21,
15329,
282,
309,
261,
12443,
3535,
20,
12058,
1592,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3238,
727,
509,
10684,
7607,
28565,
40,
507,
22,
67,
20,
12,
5748,
1592,
20,
16,
1525,
2695,
20,
16,
1525,
1592,
21,
16,
1525,
2695,
21,
15329,
282,
309,
261,
12443,
3535,
20,
12058,
1592,
... |
public abstract InputStream _createInputStream(View view, String path, boolean ignoreErrors) throws IOException; | public abstract InputStream _createInputStream(View view, Buffer buffer, String path, boolean ignoreErrors) throws IOException; | public abstract InputStream _createInputStream(View view, String path, boolean ignoreErrors) throws IOException; | 6564 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6564/5307a8af5275123bc553b4741bb65bd970d34c21/VFS.java/clean/org/gjt/sp/jedit/io/VFS.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
8770,
225,
5037,
389,
2640,
4348,
12,
1767,
1476,
16,
514,
589,
16,
202,
202,
6494,
2305,
4229,
13,
1216,
1860,
31,
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,
225,
202,
482,
8770,
225,
5037,
389,
2640,
4348,
12,
1767,
1476,
16,
514,
589,
16,
202,
202,
6494,
2305,
4229,
13,
1216,
1860,
31,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
pushRubyClass(implementationClass.parentModule); | pushRubyClass((RubyModule)implementationClass.getCRef().getValue()); | public void preReflectedMethodInternalCall(RubyModule implementationClass, IRubyObject recv, String name, IRubyObject[] args, boolean noSuper) { pushRubyClass(implementationClass.parentModule); pushIter(getCurrentIter().isPre() ? Iter.ITER_CUR : Iter.ITER_NOT); pushFrame(recv, args, name, noSuper ? null : implementationClass); getCurrentFrame().setScope(getPreviousFrame().getScope()); } | 47134 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47134/a1b8fc1d456e3d5c6e01579b88773383068aa85c/ThreadContext.java/buggy/src/org/jruby/runtime/ThreadContext.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
675,
24452,
329,
1305,
3061,
1477,
12,
54,
10340,
3120,
4471,
797,
16,
15908,
10340,
921,
10665,
16,
514,
508,
16,
15908,
10340,
921,
8526,
833,
16,
1250,
1158,
8051,
13,
288,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
675,
24452,
329,
1305,
3061,
1477,
12,
54,
10340,
3120,
4471,
797,
16,
15908,
10340,
921,
10665,
16,
514,
508,
16,
15908,
10340,
921,
8526,
833,
16,
1250,
1158,
8051,
13,
288,
... |
yaccValue = new Token(""+c, getPosition(null, false)); | yaccValue = new Token(""+c, getPositionMinusOne()); | private int parseQuote(char c) { char term; char paren; if (!Character.isLetterOrDigit(c)) { term = c; c = 'Q'; } else { term = src.read(); if (Character.isLetterOrDigit(term) /* no mb || ismbchar(term)*/) { throw new SyntaxException(src.getPosition(), "unknown type of %string"); } } if (c == EOF || term == EOF) { throw new SyntaxException(src.getPosition(), "unterminated quoted string meets end of file"); } paren = term; if (term == '(') term = ')'; else if (term == '[') term = ']'; else if (term == '{') term = '}'; else if (term == '<') term = '>'; else paren = '\0'; switch (c) { case 'Q': lex_strterm = new StringTerm(str_dquote, term, paren); yaccValue = new Token(""+c, getPosition(null, false)); return Tokens.tSTRING_BEG; case 'q': lex_strterm = new StringTerm(str_squote, term, paren); yaccValue = new Token(""+c, getPosition(null, false)); return Tokens.tSTRING_BEG; case 'W': lex_strterm = new StringTerm(str_dquote | STR_FUNC_QWORDS, term, paren); do {c = src.read();} while (Character.isWhitespace(c)); src.unread(c); yaccValue = new Token(""+c, getPosition(null, false)); return Tokens.tWORDS_BEG; case 'w': lex_strterm = new StringTerm(str_squote | STR_FUNC_QWORDS, term, paren); do {c = src.read();} while (Character.isWhitespace(c)); src.unread(c); yaccValue = new Token(""+c, getPosition(null, false)); return Tokens.tQWORDS_BEG; case 'x': lex_strterm = new StringTerm(str_xquote, term, paren); yaccValue = new Token(""+c, getPosition(null, false)); return Tokens.tXSTRING_BEG; case 'r': lex_strterm = new StringTerm(str_regexp, term, paren); yaccValue = new Token(""+c, getPosition(null, false)); return Tokens.tREGEXP_BEG; case 's': lex_strterm = new StringTerm(str_ssym, term, paren); lex_state = LexState.EXPR_FNAME; yaccValue = new Token(""+c, getPosition(null, false)); return Tokens.tSYMBEG; default: throw new SyntaxException(src.getPosition(), "Unknown type of %string. Expected 'Q', 'q', 'w', 'x', 'r' or any non letter character, but found '" + c + "'."); } } | 46770 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46770/67a441c8ea70c9532cdedb2001a6741b63e793ae/RubyYaccLexer.java/clean/src/org/jruby/lexer/yacc/RubyYaccLexer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
509,
1109,
10257,
12,
3001,
276,
13,
288,
3639,
1149,
2481,
31,
3639,
1149,
22146,
31,
7734,
309,
16051,
7069,
18,
291,
13938,
1162,
10907,
12,
71,
3719,
288,
5411,
2481,
273,
276,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
509,
1109,
10257,
12,
3001,
276,
13,
288,
3639,
1149,
2481,
31,
3639,
1149,
22146,
31,
7734,
309,
16051,
7069,
18,
291,
13938,
1162,
10907,
12,
71,
3719,
288,
5411,
2481,
273,
276,
... |
return eDynamicIsSet( eFeature ); | return super.eIsSet( featureID ); | public boolean eIsSet( EStructuralFeature eFeature ) { switch ( eDerivedStructuralFeatureID( eFeature ) ) { case AttributePackage.DATA_POINT__COMPONENTS : return components != null && !components.isEmpty( ); case AttributePackage.DATA_POINT__PREFIX : return PREFIX_EDEFAULT == null ? prefix != null : !PREFIX_EDEFAULT.equals( prefix ); case AttributePackage.DATA_POINT__SUFFIX : return SUFFIX_EDEFAULT == null ? suffix != null : !SUFFIX_EDEFAULT.equals( suffix ); case AttributePackage.DATA_POINT__SEPARATOR : return SEPARATOR_EDEFAULT == null ? separator != null : !SEPARATOR_EDEFAULT.equals( separator ); } return eDynamicIsSet( eFeature ); } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/036e8c78765730b146e5854b9d6c397a296fed86/DataPointImpl.java/buggy/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/model/attribute/impl/DataPointImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
20372,
12,
512,
14372,
4595,
425,
4595,
262,
202,
95,
202,
202,
9610,
261,
425,
21007,
14372,
4595,
734,
12,
425,
4595,
262,
262,
202,
202,
95,
1082,
202,
3593,
3601,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
20372,
12,
512,
14372,
4595,
425,
4595,
262,
202,
95,
202,
202,
9610,
261,
425,
21007,
14372,
4595,
734,
12,
425,
4595,
262,
262,
202,
202,
95,
1082,
202,
3593,
3601,
22... |
} | } | public double getDefaultDouble(String key) { Assert.notNull(key, "Key cannot be null"); if (!defaults.containsKey(key)) { return 0.0; } return Double.parseDouble((String) defaults.get(key)); } | 55916 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55916/4b6b4231f830cf3aa5046025ca47e7366f7ddeb1/AbstractSettings.java/buggy/sandbox/src/org/springframework/richclient/settings/AbstractSettings.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1645,
4829,
5265,
12,
780,
498,
13,
288,
202,
202,
8213,
18,
902,
2041,
12,
856,
16,
315,
653,
2780,
506,
446,
8863,
202,
202,
430,
16051,
7606,
18,
12298,
653,
12,
856,
371... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1645,
4829,
5265,
12,
780,
498,
13,
288,
202,
202,
8213,
18,
902,
2041,
12,
856,
16,
315,
653,
2780,
506,
446,
8863,
202,
202,
430,
16051,
7606,
18,
12298,
653,
12,
856,
371... |
if (jjCanMove_4(hiByte, i1, i2, l1, l2)) | if (jjCanMove_3(hiByte, i1, i2, l1, l2)) | private final int jjMoveNfa_0(int startState, int curPos){ int[] nextStates; int startsAt = 0; jjnewStateCnt = 76; int i = 1; jjstateSet[0] = startState; int j, kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << curChar; MatchLoop: do { switch(jjstateSet[--i]) { case 0: if ((0x3ff000000000000L & l) != 0L) { if (kind > 1) kind = 1; jjCheckNAddStates(0, 18); } else if ((0x7000081000000000L & l) != 0L) { if (kind > 8) kind = 8; } if ((0x3ff000000000000L & l) != 0L) jjCheckNAddStates(19, 24); break; case 1: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 1) kind = 1; jjCheckNAddTwoStates(1, 2); break; case 3: if ((0x7000081000000000L & l) != 0L) kind = 8; break; case 5: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddStates(19, 24); break; case 6: case 42: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(6, 7); break; case 7: if ((0xd00000000000L & l) != 0L) jjCheckNAdd(8); break; case 8: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 7) kind = 7; jjCheckNAdd(8); break; case 9: case 51: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(9, 10); break; case 10: if ((0xd00000000000L & l) != 0L) jjCheckNAdd(11); break; case 11: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(11, 12); break; case 12: if ((0xd00000000000L & l) != 0L) jjCheckNAddTwoStates(13, 14); break; case 13: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(13, 14); break; case 14: case 15: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 7) kind = 7; jjCheckNAddTwoStates(10, 15); break; case 16: case 64: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(16, 17); break; case 17: if ((0xd00000000000L & l) != 0L) jjCheckNAdd(18); break; case 18: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(18, 19); break; case 19: if ((0xd00000000000L & l) != 0L) jjCheckNAddTwoStates(20, 21); break; case 20: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(20, 21); break; case 21: case 22: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(22, 23); break; case 23: if ((0xd00000000000L & l) != 0L) jjCheckNAdd(24); break; case 24: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 7) kind = 7; jjCheckNAddTwoStates(19, 24); break; case 25: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 1) kind = 1; jjCheckNAddStates(0, 18); break; case 26: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddStates(25, 27); break; case 27: if ((0x600000000000L & l) != 0L) jjCheckNAdd(28); break; case 28: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddStates(28, 30); break; case 30: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(30, 31); break; case 31: if ((0x600000000000L & l) != 0L) jjCheckNAdd(32); break; case 32: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 5) kind = 5; jjCheckNAddTwoStates(31, 32); break; case 33: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(33, 34); break; case 34: if (curChar == 46) jjCheckNAdd(35); break; case 35: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 6) kind = 6; jjCheckNAddTwoStates(34, 35); break; case 36: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(36, 37); break; case 37: if ((0xd00000000000L & l) != 0L) jjCheckNAddTwoStates(38, 39); break; case 38: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(38, 39); break; case 39: case 40: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 7) kind = 7; jjCheckNAdd(40); break; case 41: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(41, 42); break; case 43: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(43, 44); break; case 44: if ((0xd00000000000L & l) != 0L) jjCheckNAddTwoStates(45, 46); break; case 45: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(45, 46); break; case 46: case 47: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(47, 48); break; case 48: if ((0xd00000000000L & l) != 0L) jjCheckNAdd(49); break; case 49: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 7) kind = 7; jjCheckNAddTwoStates(44, 49); break; case 50: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(50, 51); break; case 52: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(52, 53); break; case 53: if ((0xd00000000000L & l) != 0L) jjCheckNAddTwoStates(54, 55); break; case 54: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(54, 55); break; case 55: case 56: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(56, 57); break; case 57: if ((0xd00000000000L & l) != 0L) jjCheckNAdd(58); break; case 58: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(58, 59); break; case 59: if ((0xd00000000000L & l) != 0L) jjCheckNAddTwoStates(60, 61); break; case 60: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(60, 61); break; case 61: case 62: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 7) kind = 7; jjCheckNAddTwoStates(57, 62); break; case 63: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(63, 64); break; case 67: if (curChar == 39) jjstateSet[jjnewStateCnt++] = 68; break; case 70: if (curChar == 46) jjCheckNAdd(71); break; case 72: if (curChar != 46) break; if (kind > 3) kind = 3; jjCheckNAdd(71); break; case 74: if (curChar == 38) jjstateSet[jjnewStateCnt++] = 75; break; default : break; } } while(i != startsAt); } else if (curChar < 128) { long l = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 0: if ((0x7fffffe07fffffeL & l) != 0L) jjCheckNAddStates(31, 36); else if ((0x4000000040000000L & l) != 0L) { if (kind > 8) kind = 8; } if ((0x7fffffe07fffffeL & l) != 0L) { if (kind > 1) kind = 1; jjCheckNAddStates(0, 18); } break; case 1: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 1) kind = 1; jjCheckNAddTwoStates(1, 2); break; case 3: if ((0x4000000040000000L & l) != 0L) kind = 8; break; case 6: if ((0x7fffffe07fffffeL & l) != 0L) jjAddStates(37, 38); break; case 7: if (curChar == 95) jjCheckNAdd(8); break; case 8: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 7) kind = 7; jjCheckNAdd(8); break; case 9: if ((0x7fffffe07fffffeL & l) != 0L) jjCheckNAddTwoStates(9, 10); break; case 10: if (curChar == 95) jjCheckNAdd(11); break; case 11: if ((0x7fffffe07fffffeL & l) != 0L) jjCheckNAddTwoStates(11, 12); break; case 12: if (curChar == 95) jjCheckNAddTwoStates(13, 14); break; case 13: if ((0x7fffffe07fffffeL & l) != 0L) jjCheckNAddTwoStates(13, 14); break; case 15: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 7) kind = 7; jjCheckNAddTwoStates(10, 15); break; case 16: if ((0x7fffffe07fffffeL & l) != 0L) jjAddStates(39, 40); break; case 17: if (curChar == 95) jjCheckNAdd(18); break; case 18: if ((0x7fffffe07fffffeL & l) != 0L) jjCheckNAddTwoStates(18, 19); break; case 19: if (curChar == 95) jjCheckNAddTwoStates(20, 21); break; case 20: if ((0x7fffffe07fffffeL & l) != 0L) jjCheckNAddTwoStates(20, 21); break; case 22: if ((0x7fffffe07fffffeL & l) != 0L) jjAddStates(41, 42); break; case 23: if (curChar == 95) jjCheckNAdd(24); break; case 24: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 7) kind = 7; jjCheckNAddTwoStates(19, 24); break; case 25: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 1) kind = 1; jjCheckNAddStates(0, 18); break; case 26: if ((0x7fffffe07fffffeL & l) != 0L) jjCheckNAddStates(25, 27); break; case 27: if (curChar == 95) jjCheckNAdd(28); break; case 28: if ((0x7fffffe07fffffeL & l) != 0L) jjCheckNAddStates(28, 30); break; case 29: if (curChar == 64) jjCheckNAdd(30); break; case 30: if ((0x7fffffe07fffffeL & l) != 0L) jjCheckNAddTwoStates(30, 31); break; case 32: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 5) kind = 5; jjCheckNAddTwoStates(31, 32); break; case 33: if ((0x7fffffe07fffffeL & l) != 0L) jjCheckNAddTwoStates(33, 34); break; case 35: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 6) kind = 6; jjCheckNAddTwoStates(34, 35); break; case 36: if ((0x7fffffe07fffffeL & l) != 0L) jjCheckNAddTwoStates(36, 37); break; case 37: if (curChar == 95) jjCheckNAddTwoStates(38, 39); break; case 38: if ((0x7fffffe07fffffeL & l) != 0L) jjCheckNAddTwoStates(38, 39); break; case 40: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 7) kind = 7; jjstateSet[jjnewStateCnt++] = 40; break; case 41: if ((0x7fffffe07fffffeL & l) != 0L) jjCheckNAddTwoStates(41, 42); break; case 43: if ((0x7fffffe07fffffeL & l) != 0L) jjCheckNAddTwoStates(43, 44); break; case 44: if (curChar == 95) jjCheckNAddTwoStates(45, 46); break; case 45: if ((0x7fffffe07fffffeL & l) != 0L) jjCheckNAddTwoStates(45, 46); break; case 47: if ((0x7fffffe07fffffeL & l) != 0L) jjAddStates(43, 44); break; case 48: if (curChar == 95) jjCheckNAdd(49); break; case 49: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 7) kind = 7; jjCheckNAddTwoStates(44, 49); break; case 50: if ((0x7fffffe07fffffeL & l) != 0L) jjCheckNAddTwoStates(50, 51); break; case 52: if ((0x7fffffe07fffffeL & l) != 0L) jjCheckNAddTwoStates(52, 53); break; case 53: if (curChar == 95) jjCheckNAddTwoStates(54, 55); break; case 54: if ((0x7fffffe07fffffeL & l) != 0L) jjCheckNAddTwoStates(54, 55); break; case 56: if ((0x7fffffe07fffffeL & l) != 0L) jjCheckNAddTwoStates(56, 57); break; case 57: if (curChar == 95) jjCheckNAdd(58); break; case 58: if ((0x7fffffe07fffffeL & l) != 0L) jjCheckNAddTwoStates(58, 59); break; case 59: if (curChar == 95) jjCheckNAddTwoStates(60, 61); break; case 60: if ((0x7fffffe07fffffeL & l) != 0L) jjCheckNAddTwoStates(60, 61); break; case 62: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 7) kind = 7; jjCheckNAddTwoStates(57, 62); break; case 63: if ((0x7fffffe07fffffeL & l) != 0L) jjCheckNAddTwoStates(63, 64); break; case 65: if ((0x7fffffe07fffffeL & l) != 0L) jjCheckNAddStates(31, 36); break; case 66: if ((0x7fffffe07fffffeL & l) != 0L) jjCheckNAddTwoStates(66, 67); break; case 68: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 2) kind = 2; jjCheckNAddTwoStates(67, 68); break; case 69: if ((0x7fffffe07fffffeL & l) != 0L) jjCheckNAddTwoStates(69, 70); break; case 71: if ((0x7fffffe07fffffeL & l) != 0L) jjAddStates(45, 46); break; case 73: if ((0x7fffffe07fffffeL & l) != 0L) jjCheckNAddTwoStates(73, 74); break; case 74: if (curChar == 64) jjCheckNAdd(75); break; case 75: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 4) kind = 4; jjCheckNAdd(75); break; default : break; } } while(i != startsAt); } else { int hiByte = (int)(curChar >> 8); int i1 = hiByte >> 6; long l1 = 1L << (hiByte & 077); int i2 = (curChar & 0xff) >> 6; long l2 = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 0: if (jjCanMove_0(hiByte, i1, i2, l1, l2)) jjCheckNAdd(1); if (jjCanMove_2(hiByte, i1, i2, l1, l2)) { if (kind > 8) kind = 8; } if (jjCanMove_3(hiByte, i1, i2, l1, l2)) { if (kind > 14) kind = 14; } if (jjCanMove_4(hiByte, i1, i2, l1, l2)) jjCheckNAddStates(19, 24); if (jjCanMove_1(hiByte, i1, i2, l1, l2)) { if (kind > 1) kind = 1; jjCheckNAddStates(0, 18); } if (jjCanMove_1(hiByte, i1, i2, l1, l2)) jjCheckNAddStates(31, 36); break; case 1: if (!jjCanMove_1(hiByte, i1, i2, l1, l2)) break; if (kind > 1) kind = 1; jjCheckNAddTwoStates(1, 2); break; case 2: if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 1) kind = 1; break; case 3: if (jjCanMove_2(hiByte, i1, i2, l1, l2) && kind > 8) kind = 8; break; case 4: if (jjCanMove_3(hiByte, i1, i2, l1, l2) && kind > 14) kind = 14; break; case 5: if (jjCanMove_4(hiByte, i1, i2, l1, l2)) jjCheckNAddStates(19, 24); break; case 6: if (jjCanMove_1(hiByte, i1, i2, l1, l2)) jjCheckNAddTwoStates(6, 7); break; case 8: if (!jjCanMove_1(hiByte, i1, i2, l1, l2)) break; if (kind > 7) kind = 7; jjstateSet[jjnewStateCnt++] = 8; break; case 9: if (jjCanMove_1(hiByte, i1, i2, l1, l2)) jjCheckNAddTwoStates(9, 10); break; case 11: if (jjCanMove_1(hiByte, i1, i2, l1, l2)) jjAddStates(47, 48); break; case 13: if (jjCanMove_1(hiByte, i1, i2, l1, l2)) jjAddStates(49, 50); break; case 14: if (!jjCanMove_4(hiByte, i1, i2, l1, l2)) break; if (kind > 7) kind = 7; jjCheckNAddTwoStates(10, 15); break; case 15: if (!jjCanMove_1(hiByte, i1, i2, l1, l2)) break; if (kind > 7) kind = 7; jjCheckNAddTwoStates(10, 15); break; case 16: if (jjCanMove_1(hiByte, i1, i2, l1, l2)) jjCheckNAddTwoStates(16, 17); break; case 18: if (jjCanMove_1(hiByte, i1, i2, l1, l2)) jjCheckNAddTwoStates(18, 19); break; case 20: if (jjCanMove_1(hiByte, i1, i2, l1, l2)) jjAddStates(51, 52); break; case 21: if (jjCanMove_4(hiByte, i1, i2, l1, l2)) jjCheckNAddTwoStates(22, 23); break; case 22: if (jjCanMove_1(hiByte, i1, i2, l1, l2)) jjCheckNAddTwoStates(22, 23); break; case 24: if (!jjCanMove_1(hiByte, i1, i2, l1, l2)) break; if (kind > 7) kind = 7; jjCheckNAddTwoStates(19, 24); break; case 25: if (!jjCanMove_1(hiByte, i1, i2, l1, l2)) break; if (kind > 1) kind = 1; jjCheckNAddStates(0, 18); break; case 26: if (jjCanMove_1(hiByte, i1, i2, l1, l2)) jjCheckNAddStates(25, 27); break; case 28: if (jjCanMove_1(hiByte, i1, i2, l1, l2)) jjCheckNAddStates(28, 30); break; case 30: if (jjCanMove_1(hiByte, i1, i2, l1, l2)) jjCheckNAddTwoStates(30, 31); break; case 32: if (!jjCanMove_1(hiByte, i1, i2, l1, l2)) break; if (kind > 5) kind = 5; jjCheckNAddTwoStates(31, 32); break; case 33: if (jjCanMove_1(hiByte, i1, i2, l1, l2)) jjCheckNAddTwoStates(33, 34); break; case 35: if (!jjCanMove_1(hiByte, i1, i2, l1, l2)) break; if (kind > 6) kind = 6; jjCheckNAddTwoStates(34, 35); break; case 36: if (jjCanMove_1(hiByte, i1, i2, l1, l2)) jjCheckNAddTwoStates(36, 37); break; case 38: if (jjCanMove_1(hiByte, i1, i2, l1, l2)) jjAddStates(53, 54); break; case 39: if (!jjCanMove_4(hiByte, i1, i2, l1, l2)) break; if (kind > 7) kind = 7; jjCheckNAdd(40); break; case 40: if (!jjCanMove_1(hiByte, i1, i2, l1, l2)) break; if (kind > 7) kind = 7; jjCheckNAdd(40); break; case 41: if (jjCanMove_1(hiByte, i1, i2, l1, l2)) jjCheckNAddTwoStates(41, 42); break; case 42: if (jjCanMove_4(hiByte, i1, i2, l1, l2)) jjCheckNAddTwoStates(6, 7); break; case 43: if (jjCanMove_1(hiByte, i1, i2, l1, l2)) jjCheckNAddTwoStates(43, 44); break; case 45: if (jjCanMove_1(hiByte, i1, i2, l1, l2)) jjAddStates(55, 56); break; case 46: if (jjCanMove_4(hiByte, i1, i2, l1, l2)) jjCheckNAddTwoStates(47, 48); break; case 47: if (jjCanMove_1(hiByte, i1, i2, l1, l2)) jjCheckNAddTwoStates(47, 48); break; case 49: if (!jjCanMove_1(hiByte, i1, i2, l1, l2)) break; if (kind > 7) kind = 7; jjCheckNAddTwoStates(44, 49); break; case 50: if (jjCanMove_1(hiByte, i1, i2, l1, l2)) jjCheckNAddTwoStates(50, 51); break; case 51: if (jjCanMove_4(hiByte, i1, i2, l1, l2)) jjCheckNAddTwoStates(9, 10); break; case 52: if (jjCanMove_1(hiByte, i1, i2, l1, l2)) jjCheckNAddTwoStates(52, 53); break; case 54: if (jjCanMove_1(hiByte, i1, i2, l1, l2)) jjAddStates(57, 58); break; case 55: if (jjCanMove_4(hiByte, i1, i2, l1, l2)) jjCheckNAddTwoStates(56, 57); break; case 56: if (jjCanMove_1(hiByte, i1, i2, l1, l2)) jjCheckNAddTwoStates(56, 57); break; case 58: if (jjCanMove_1(hiByte, i1, i2, l1, l2)) jjAddStates(59, 60); break; case 60: if (jjCanMove_1(hiByte, i1, i2, l1, l2)) jjAddStates(61, 62); break; case 61: if (!jjCanMove_4(hiByte, i1, i2, l1, l2)) break; if (kind > 7) kind = 7; jjCheckNAddTwoStates(57, 62); break; case 62: if (!jjCanMove_1(hiByte, i1, i2, l1, l2)) break; if (kind > 7) kind = 7; jjCheckNAddTwoStates(57, 62); break; case 63: if (jjCanMove_1(hiByte, i1, i2, l1, l2)) jjCheckNAddTwoStates(63, 64); break; case 64: if (jjCanMove_4(hiByte, i1, i2, l1, l2)) jjCheckNAddTwoStates(16, 17); break; case 65: if (jjCanMove_1(hiByte, i1, i2, l1, l2)) jjCheckNAddStates(31, 36); break; case 66: if (jjCanMove_1(hiByte, i1, i2, l1, l2)) jjCheckNAddTwoStates(66, 67); break; case 68: if (!jjCanMove_1(hiByte, i1, i2, l1, l2)) break; if (kind > 2) kind = 2; jjCheckNAddTwoStates(67, 68); break; case 69: if (jjCanMove_1(hiByte, i1, i2, l1, l2)) jjCheckNAddTwoStates(69, 70); break; case 71: if (jjCanMove_1(hiByte, i1, i2, l1, l2)) jjAddStates(45, 46); break; case 73: if (jjCanMove_1(hiByte, i1, i2, l1, l2)) jjCheckNAddTwoStates(73, 74); break; case 75: if (!jjCanMove_1(hiByte, i1, i2, l1, l2)) break; if (kind > 4) kind = 4; jjstateSet[jjnewStateCnt++] = 75; break; default : break; } } while(i != startsAt); } if (kind != 0x7fffffff) { jjmatchedKind = kind; jjmatchedPos = curPos; kind = 0x7fffffff; } ++curPos; if ((i = jjnewStateCnt) == (startsAt = 76 - (jjnewStateCnt = startsAt))) return curPos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return curPos; } }} | 45239 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45239/f38eb6c624a4eb8efd45a15aed431041359b17c0/XTFTokenizerTokenManager.java/buggy/WEB-INF/src/org/cdlib/xtf/textIndexer/tokenizer/XTFTokenizerTokenManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3238,
727,
509,
10684,
7607,
50,
507,
67,
20,
12,
474,
787,
1119,
16,
509,
662,
1616,
15329,
282,
509,
8526,
1024,
7629,
31,
282,
509,
2542,
861,
273,
374,
31,
282,
10684,
2704,
1119,
11750,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3238,
727,
509,
10684,
7607,
50,
507,
67,
20,
12,
474,
787,
1119,
16,
509,
662,
1616,
15329,
282,
509,
8526,
1024,
7629,
31,
282,
509,
2542,
861,
273,
374,
31,
282,
10684,
2704,
1119,
11750,... |
writeAttribute(atributes[0]); | writeAttribute(attributes[0]); | private void writeUniqueFinder(final CopeUniqueConstraint constraint) throws IOException, InjectorParseException { // TODO fix spelling final CopeAttribute[] atributes = constraint.getAttributes(); final String className = atributes[0].getParent().name; writeCommentHeader(); o.write("\t * "); o.write(format(FINDER_UNIQUE, lowerCamelCase(className))); o.write(lineSeparator); for(int i=0; i<atributes.length; i++) { o.write("\t * @param "); o.write(atributes[i].getName()); o.write(' '); o.write(format(FINDER_UNIQUE_PARAMETER, link(atributes[i].getName()))); o.write(lineSeparator); } o.write("\t * @return "); o.write(FINDER_UNIQUE_RETURN); o.write(lineSeparator); writeCommentFooter(); o.write(Modifier.toString((constraint.modifier & (Modifier.PRIVATE|Modifier.PROTECTED|Modifier.PUBLIC)) | (Modifier.STATIC|Modifier.FINAL) )); o.write(' '); o.write(className); o.write(" findBy"); o.write(toCamelCase(constraint.nameForOutput)); o.write('('); for(int i=0; i<atributes.length; i++) { if(i>0) o.write(','); final CopeAttribute attribute = atributes[i]; o.write("final "); o.write(attribute.getBoxedType()); o.write(' '); o.write(attribute.getName()); } o.write(')'); o.write(lineSeparator); o.write("\t{"); o.write(lineSeparator); o.write("\t\treturn ("); o.write(className); o.write(')'); if(atributes.length==1) { o.write(atributes[0].copeClass.getName()); o.write('.'); o.write(atributes[0].getName()); o.write(".searchUnique("); writeAttribute(atributes[0]); } else { o.write(atributes[0].copeClass.getName()); o.write('.'); o.write(constraint.name); o.write(".searchUnique(new Object[]{"); writeAttribute(atributes[0]); for(int i = 1; i<atributes.length; i++) { o.write(','); writeAttribute(atributes[i]); } o.write('}'); } o.write(");"); o.write(lineSeparator); o.write("\t}"); } | 50290 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50290/9751dd8ef4c8e89304b402ba482386199975b0e8/Generator.java/clean/instrument/src/com/exedio/cope/instrument/Generator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1045,
6303,
8441,
12,
6385,
385,
1306,
6303,
5806,
4954,
13,
202,
15069,
1860,
16,
21286,
13047,
202,
95,
202,
202,
759,
2660,
2917,
22377,
310,
202,
202,
6385,
385,
1306,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1045,
6303,
8441,
12,
6385,
385,
1306,
6303,
5806,
4954,
13,
202,
15069,
1860,
16,
21286,
13047,
202,
95,
202,
202,
759,
2660,
2917,
22377,
310,
202,
202,
6385,
385,
1306,... |
public void testCumulativeProbabilityNegative() { | public void testCumulativeProbabilityNegative() throws Exception { | public void testCumulativeProbabilityNegative() { testProbability(-1.0, 0.0); } | 9305 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9305/6c07bd13a84d27f6df35a9bf00c46e63b5b17639/ExponentialDistributionTest.java/clean/src/test/org/apache/commons/math/distribution/ExponentialDistributionTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
39,
11276,
25598,
14959,
1435,
1216,
1185,
288,
3639,
1842,
25598,
19236,
21,
18,
20,
16,
374,
18,
20,
1769,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
39,
11276,
25598,
14959,
1435,
1216,
1185,
288,
3639,
1842,
25598,
19236,
21,
18,
20,
16,
374,
18,
20,
1769,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
code.setPosition(Position.line(sym.pos)); | if (global.args.debuginfo.value) code.setPosition(Position.line(sym.pos)); | private void genDef(Symbol sym, ValDef[] parameters, Tree rhs, MSILType toType) { MethodBase method = tc.getMethod(sym); params.clear(); locals.clear(); int argOffset = method.IsStatic() ? 0 : 1; for (int i = 0; i < parameters.length; i++) { params.put(parameters[i].symbol(), new Integer(i + argOffset)); } if (method.IsConstructor()) { ConstructorInfo ctor = (ConstructorInfo) method; code = ((ConstructorBuilder)ctor).GetILGenerator(); code.setPosition(Position.line(rhs.pos)); if (sym.owner().isModuleClass() && sym.owner().owner().isPackageClass()) { Tree[] cstats = null; switch (rhs) { case Block(Tree[] stats, Tree value): TreeList stms = new TreeList(); for (int i = 0; i < stats.length; i++) { switch (stats[i]) { case Block(Tree[] stats2, Tree value2): stms.append(stats2); stms.append(value2); break; default: stms.append(stats[i]); } } switch (value) { case Block(Tree[] stats2, Tree value2): stms.append(stats2); stms.append(value2); break; } cstats = stms.toArray(); break; default: cstats = new Tree[]{rhs}; } // emit the call to the superconstructor drop(gen(cstats[0], MSILType.VOID)); code.Emit(OpCodes.Ret); // conclude the instance constructor ConstructorBuilder cctor = ((TypeBuilder)(method.DeclaringType)). DefineConstructor((short)(MethodAttributes.Static | MethodAttributes.Public), CallingConventions.Standard, Type.EmptyTypes); currentMethod = cctor; code = cctor.GetILGenerator(); code.setPosition(Position.line(sym.owner().pos)); // initialize the static module reference code.Emit(OpCodes.Newobj, ctor); code.Emit(OpCodes.Stsfld, tc.getModuleField(currentClass)); for (int i = 1; i < cstats.length; i++) { drop(gen(cstats[i], MSILType.VOID)); } code.Emit(OpCodes.Ret); // conclude the static constructor } else { drop(gen(rhs, MSILType.VOID)); code.Emit(OpCodes.Ret); } } else if (!method.IsAbstract()) { lastExpr = true; code = ((MethodBuilder)method).GetILGenerator(); code.setPosition(Position.line(rhs.pos)); Item item = gen(rhs, toType); if (returnsVoid(method)) drop(item); else coerce(load(item), toType); // FIXME: coerce??? code.Emit(OpCodes.Ret); if (currentClass.isModuleClass()) { MethodBuilder staticMethod = tc.getStaticObjectMethod(sym); if (staticMethod != null) { code = staticMethod.GetILGenerator(); code.setPosition(Position.line(sym.pos)); code.Emit(OpCodes.Ldsfld, tc.getModuleField(currentClass)); for (int i = 0; i < parameters.length; i++) emitLdarg(i); code.Emit(OpCodes.Call, (MethodInfo)method); code.Emit(OpCodes.Ret); } } } lastExpr = false; code = null; } // genDef(); | 9617 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9617/d2314c91fed2c0bb70732a2d7bc3dfd50cf88d03/GenMSIL.java/buggy/sources/scalac/backend/msil/GenMSIL.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
3157,
3262,
12,
5335,
5382,
16,
12747,
3262,
8526,
1472,
16,
4902,
7711,
16,
490,
2320,
48,
559,
28234,
13,
288,
202,
1305,
2171,
707,
273,
1715,
18,
588,
1305,
12,
8117,
176... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
3157,
3262,
12,
5335,
5382,
16,
12747,
3262,
8526,
1472,
16,
4902,
7711,
16,
490,
2320,
48,
559,
28234,
13,
288,
202,
1305,
2171,
707,
273,
1715,
18,
588,
1305,
12,
8117,
176... |
Utilities.drawTabbedText(txt, bounds.x, bounds.y + height / 2, g, tabEx, txt.offset); | Utilities.drawTabbedText(txt, bounds.x, bounds.y + ascent + height / 2, g, tabEx, txt.offset); | public void paint(GlyphView view, Graphics g, Shape a, int p0, int p1) { int height = (int) getHeight(view); Segment txt = view.getText(p0, p1); Rectangle bounds = a.getBounds(); TabExpander tabEx = null; View parent = view.getParent(); if (parent instanceof TabExpander) tabEx = (TabExpander) parent; // Fill the background of the text run. Color background = view.getBackground(); g.setColor(background); int width = Utilities.getTabbedTextWidth(txt, g.getFontMetrics(), bounds.x, tabEx, txt.offset); g.fillRect(bounds.x, bounds.y, width, height); // Draw the actual text. g.setColor(view.getForeground()); g.setFont(view.getFont()); if (view.isSuperscript()) // TODO: Adjust font for superscripting. Utilities.drawTabbedText(txt, bounds.x, bounds.y - height / 2, g, tabEx, txt.offset); else if (view.isSubscript()) // TODO: Adjust font for subscripting. Utilities.drawTabbedText(txt, bounds.x, bounds.y + height / 2, g, tabEx, txt.offset); else Utilities.drawTabbedText(txt, bounds.x, bounds.y, g, tabEx, txt.offset); if (view.isStikeThrough()) { int strikeHeight = (int) (getAscent(view) / 2); g.drawLine(bounds.x, bounds.y + strikeHeight, bounds.height + width, bounds.y + strikeHeight); } if (view.isUnderline()) { int lineHeight = (int) getAscent(view); g.drawLine(bounds.x, bounds.y + lineHeight, bounds.height + width, bounds.y + lineHeight); } } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/8f1176391e1d000d946793693906d6dc8af29e19/GlyphView.java/buggy/core/src/classpath/javax/javax/swing/text/GlyphView.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
12574,
12,
15141,
1767,
1476,
16,
16830,
314,
16,
12383,
279,
16,
509,
293,
20,
16,
8227,
509,
293,
21,
13,
565,
288,
1377,
509,
2072,
273,
261,
474,
13,
9263,
12,
1945,
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,
1071,
918,
12574,
12,
15141,
1767,
1476,
16,
16830,
314,
16,
12383,
279,
16,
509,
293,
20,
16,
8227,
509,
293,
21,
13,
565,
288,
1377,
509,
2072,
273,
261,
474,
13,
9263,
12,
1945,
17... |
if( label_t instanceof ScopedName ) label_t = ((ScopedName)label_t).resolvedTypeSpec(); | while( label_t instanceof ScopedName || label_t instanceof AliasTypeSpec ) { if( label_t instanceof ScopedName ) label_t = ((ScopedName)label_t).resolvedTypeSpec(); if( label_t instanceof AliasTypeSpec ) label_t = ((AliasTypeSpec)label_t).originalType(); } | private void printHelperClass (String className, PrintWriter ps) { if( !pack_name.equals("")) ps.println("package " + pack_name + ";" ); printImport(ps); printClassComment( className, ps ); ps.println("public class " + className + "Helper"); ps.println("{"); ps.println("\tprivate static org.omg.CORBA.TypeCode _type;"); String _type = typeName(); ps.println("\tpublic " + className + "Helper ()"); ps.println("\t{"); ps.println("\t}"); ps.println("\tpublic static void insert (org.omg.CORBA.Any any, " + _type + " s)"); ps.println("\t{"); ps.println("\t\tany.type (type ());"); ps.println("\t\twrite (any.create_output_stream (),s);"); ps.println("\t}"); ps.println("\tpublic static " + _type + " extract (org.omg.CORBA.Any any)"); ps.println("\t{"); ps.println("\t\treturn read (any.create_input_stream ());"); ps.println("\t}"); printIdMethod (ps); /** read method */ ps.println("\tpublic static " + className + " read (org.omg.CORBA.portable.InputStream in)"); ps.println("\t{"); ps.println("\t\t" + className + " result = new " + className + " ();"); TypeSpec switch_ts_resolved = switch_type_spec; if( switch_type_spec.type_spec instanceof ScopedName ) { switch_ts_resolved=((ScopedName)switch_type_spec.type_spec).resolvedTypeSpec(); } String indent1 = "\t\t\t"; String indent2 = "\t\t\t\t"; if (switch_is_longlong) { indent1 = "\t\t"; indent2 = "\t\t\t"; } String case_str = "case "; String colon_str = ":"; String default_str = "default:"; if( switch_is_enum ) { ps.println("\t\t" + switch_ts_resolved.toString() + " disc = " + switch_ts_resolved.toString() +".from_int(in.read_long());"); ps.println("\t\tswitch (disc.value ())"); ps.println("\t\t{"); } else { ps.println("\t\t" + switch_ts_resolved.toString() + " " + switch_ts_resolved.printReadStatement("disc","in")); if (switch_is_bool) { /* special case: boolean is not a switch type in java */ case_str = "if (disc == "; colon_str = ")"; default_str = "else"; } else if (switch_is_longlong) { /* special case: long is not a switch type in java */ case_str = "if (disc == "; colon_str = ")"; default_str = "else"; } else { ps.println("\t\tswitch(disc)"); ps.println("\t\t{"); } } ByteArrayOutputStream bos = new ByteArrayOutputStream(); PrintWriter defaultWriter = new PrintWriter( bos ); PrintWriter alt = null; for( Enumeration e = switch_body.caseListVector.elements(); e.hasMoreElements();) { Case c = (Case)e.nextElement(); TypeSpec t = c.element_spec.t; Declarator d = c.element_spec.d; int caseLabelNum = c.case_label_list.v.size(); boolean was_default = false; for( int i=0; i < caseLabelNum;i++) { Object o = c.case_label_list.v.elementAt(i); if (o == null) { // null means "default" defaultWriter.println(indent1 + default_str); was_default = true; } else if (o instanceof ConstExpr) { ps.println (indent1 + case_str + ((ConstExpr)o).value() + colon_str); } else if (o instanceof ScopedName) { String _t = ((ScopedName)o).typeName(); if(switch_is_enum) ps.println (indent1 + case_str + _t.substring(0, _t.lastIndexOf('.')+1) + "_" + _t.substring( _t.lastIndexOf('.')+1) + colon_str); else ps.println (indent1 + case_str + _t + colon_str); } if( i == caseLabelNum-1) { if( o == null ) { alt = ps; ps = defaultWriter; } ps.println (indent1 + "{"); if( t instanceof ScopedName ) t = ((ScopedName)t).resolvedTypeSpec(); t = t.typeSpec(); String varname = "_var"; ps.println (indent2 + t.typeSpec().toString() + " " + varname + ";"); ps.println (indent2 + t.printReadStatement( varname, "in")); ps.print(indent2 + "result." + d.name() + "(" ); if( caseLabelNum > 1 ) ps.print("disc,"); ps.println( varname +");"); // no "break" written for default case or for "if" construct if (o != null && !switch_is_bool && !switch_is_longlong) { ps.println (indent2 + "break;"); } if (switch_is_longlong) { ps.println (indent2 + "return result;"); } ps.println (indent1 + "}"); if( o == null ) { ps = alt; } } } if (switch_is_bool && !was_default) { case_str = "else " + case_str; } } if (!explicit_default_case && ! switch_is_bool && ! switch_is_longlong && !allCasesCovered) { defaultWriter.println("\t\t\tdefault: result.__default (disc);"); } if (!explicit_default_case && switch_is_longlong) { defaultWriter.println ("\t\tresult.__default (disc);"); defaultWriter.println ("\t\treturn result;"); } defaultWriter.close(); if( bos.size() > 0 ) { ps.print( bos.toString() ); } if (!switch_is_bool && !switch_is_longlong) { ps.println("\t\t}"); // close switch statement } if (! switch_is_longlong) { ps.println ("\t\treturn result;"); } ps.println("\t}"); /** write method */ ps.println("\tpublic static void write (org.omg.CORBA.portable.OutputStream out, " + className + " s)"); ps.println("\t{"); if( switch_is_enum ) { ps.println("\t\tout.write_long(s.discriminator().value());"); ps.println("\t\tswitch(s.discriminator().value())"); ps.println("\t\t{"); } else { ps.println("\t\t" + switch_type_spec.typeSpec().printWriteStatement("s.discriminator ()","out")+ ";"); if (switch_is_bool) { /* special case: booleans are no switch type in java */ case_str = "if(s.discriminator()=="; // colon_str and default_str are already set correctly } else if (switch_is_longlong) { ps.println("\t\tlong disc = s.discriminator ();"); } else { ps.println("\t\tswitch (s.discriminator ())"); ps.println("\t\t{"); } } bos = new ByteArrayOutputStream(); defaultWriter = new PrintWriter( bos ); alt = null; for( Enumeration e = switch_body.caseListVector.elements(); e.hasMoreElements();) { Case c = (Case)e.nextElement(); TypeSpec t = c.element_spec.t; Declarator d = c.element_spec.d; int caseLabelNum = c.case_label_list.v.size(); boolean was_default = false; for( int i=0; i < caseLabelNum;i++) { Object o = c.case_label_list.v.elementAt(i); if( o == null ) { // null means "default" defaultWriter.println (indent1 + default_str); was_default = true; } else if( o != null && o instanceof ConstExpr ) { ps.println (indent1 + case_str + ((ConstExpr)o).value() + colon_str ); } else if( o instanceof ScopedName ) { String _t = ((ScopedName)o).typeName(); if(switch_is_enum) ps.println (indent1 + case_str + _t.substring(0, _t.lastIndexOf('.')+1) + "_" + _t.substring( _t.lastIndexOf('.')+1) + colon_str); else ps.println(indent1 + case_str + _t + colon_str); } if( i == caseLabelNum-1) { if( o == null ) { alt = ps; ps = defaultWriter; } ps.println(indent1 + "{"); if( t instanceof ScopedName ) t = ((ScopedName)t).resolvedTypeSpec(); t = t.typeSpec(); ps.println (indent2 + t.printWriteStatement ("s." + d.name ()+" ()", "out")); // no "break" written for default case if (o != null && !switch_is_bool && !switch_is_longlong) { ps.println (indent2 + "break;"); } if (switch_is_longlong) { ps.println (indent2 + "return;"); } ps.println (indent1 + "}"); if( o == null ) { ps = alt; } } } if( switch_is_bool && !was_default ) { case_str = "else " + case_str; } } defaultWriter.close(); if( bos.size() > 0 ) { ps.print( bos.toString() ); } /* close switch statement */ if (!switch_is_bool && !switch_is_longlong) { ps.println("\t\t}"); } ps.println("\t}"); /** type() */ ps.println("\tpublic static org.omg.CORBA.TypeCode type()"); ps.println("\t{"); ps.println("\t\tif( _type == null )"); ps.println("\t\t{"); ps.println("\t\t\torg.omg.CORBA.UnionMember[] members = new org.omg.CORBA.UnionMember[" + labels +"];"); ps.println("\t\t\torg.omg.CORBA.Any label_any;"); int mi = 0; TypeSpec label_t = switch_type_spec.typeSpec(); if( label_t instanceof ScopedName ) label_t = ((ScopedName)label_t).resolvedTypeSpec(); label_t = label_t.typeSpec(); for( Enumeration e = switch_body.caseListVector.elements(); e.hasMoreElements();) { Case c = (Case)e.nextElement(); TypeSpec t = c.element_spec.t; if( t instanceof ScopedName ) t = ((ScopedName)t).resolvedTypeSpec(); t = t.typeSpec(); Declarator d = c.element_spec.d; int caseLabelNum = c.case_label_list.v.size(); for( int i=0; i < caseLabelNum;i++) { Object o = c.case_label_list.v.elementAt(i); ps.println("\t\t\tlabel_any = org.omg.CORBA.ORB.init().create_any();"); if( o == null ) { ps.println("\t\t\tlabel_any.insert_octet((byte)0);"); } else if( label_t instanceof BaseType ) { if( label_t instanceof CharType ) ps.print("\t\t\tlabel_any.insert_char("); else if( label_t instanceof BooleanType ) ps.print("\t\t\tlabel_any.insert_boolean("); else if( label_t instanceof ShortType ) ps.print("\t\t\tlabel_any.insert_short((short)"); else if( label_t instanceof LongType ) ps.print("\t\t\tlabel_any.insert_long("); else if( label_t instanceof LongLongType ) ps.print("\t\t\tlabel_any.insert_longlong("); else throw new RuntimeException("Compiler error: unrecognized BaseType: " + label_t.typeName() + ":" + label_t + ": " + label_t.typeSpec() + ": " + label_t.getClass().getName()); ps.println( ((ConstExpr)o).value() + ");"); } else if(switch_is_enum) { String _t = ((ScopedName)o).typeName(); ps.println("\t\t\t" + _t.substring(0, _t.lastIndexOf('.')) + "Helper.insert( label_any, " + _t + " );"); // ps.println("\t\t\tlabel_any.insert_long(" + _t.substring(0, _t.lastIndexOf('.')+1) // + "_" + _t.substring( _t.lastIndexOf('.')+1) + ");"); } ps.print("\t\t\tmembers[" + (mi++) + "] = new org.omg.CORBA.UnionMember(\""+d.name()+"\",label_any,"); if( t instanceof ConstrTypeSpec ) ps.print( t.typeSpec().toString() + "Helper.type(),");// else if( t instanceof SequenceType )// ps.print( ((SequenceType)t).helperName() + ".type(),"); else ps.print( t.typeSpec().getTypeCodeExpression() + ","); ps.println("null);"); } } ps.print("\t\t\t _type = org.omg.CORBA.ORB.init().create_union_tc(id(),\"" + className()+ "\","); ps.println(switch_type_spec.typeSpec().getTypeCodeExpression() + ", members);"); ps.println("\t\t}"); ps.println("\t\treturn _type;"); ps.println("\t}"); ps.println("}"); // end of helper class } | 46355 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46355/48b9aa808b8389f6e222cfb9c7d15bfd24daf947/UnionType.java/buggy/src/org/jacorb/idl/UnionType.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1172,
2276,
797,
261,
780,
2658,
16,
14071,
4250,
13,
565,
288,
202,
430,
12,
401,
2920,
67,
529,
18,
14963,
2932,
6,
3719,
202,
565,
4250,
18,
8222,
2932,
5610,
315,
397,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1172,
2276,
797,
261,
780,
2658,
16,
14071,
4250,
13,
565,
288,
202,
430,
12,
401,
2920,
67,
529,
18,
14963,
2932,
6,
3719,
202,
565,
4250,
18,
8222,
2932,
5610,
315,
397,
... |
throw new CmsException("["+this.getClass().getName()+"]"+name,CmsException.C_NO_USER); | throw new CmsException("["+this.getClass().getName()+"]"+id,CmsException.C_NO_USER); | public CmsUser readUser(String name, int type) throws CmsException { PreparedStatement statement = null; ResultSet res = null; CmsUser user = null; try { statement = m_pool.getPreparedStatement(C_USERS_READ_KEY); statement.setString(1,name); statement.setInt(2,type); res = statement.executeQuery(); // create new Cms user object if(res.next()) { // read the additional infos. byte[] value = res.getBytes(C_USERS_USER_INFO); // now deserialize the object ByteArrayInputStream bin= new ByteArrayInputStream(value); ObjectInputStream oin = new ObjectInputStream(bin); Hashtable info=(Hashtable)oin.readObject(); user = new CmsUser(res.getInt(C_USERS_USER_ID), res.getString(C_USERS_USER_NAME), res.getString(C_USERS_USER_PASSWORD), res.getString(C_USERS_USER_RECOVERY_PASSWORD), res.getString(C_USERS_USER_DESCRIPTION), res.getString(C_USERS_USER_FIRSTNAME), res.getString(C_USERS_USER_LASTNAME), res.getString(C_USERS_USER_EMAIL), SqlHelper.getTimestamp(res,C_USERS_USER_LASTLOGIN).getTime(), SqlHelper.getTimestamp(res,C_USERS_USER_LASTUSED).getTime(), res.getInt(C_USERS_USER_FLAGS), info, new CmsGroup(res.getInt(C_GROUPS_GROUP_ID), res.getInt(C_GROUPS_PARENT_GROUP_ID), res.getString(C_GROUPS_GROUP_NAME), res.getString(C_GROUPS_GROUP_DESCRIPTION), res.getInt(C_GROUPS_GROUP_FLAGS)), res.getString(C_USERS_USER_ADDRESS), res.getString(C_USERS_USER_SECTION), res.getInt(C_USERS_USER_TYPE)); } else { res.close(); throw new CmsException("["+this.getClass().getName()+"]"+name,CmsException.C_NO_USER); } res.close(); return user; } catch (SQLException e){ throw new CmsException("["+this.getClass().getName()+"]"+e.getMessage(),CmsException.C_SQL_ERROR, e); } // a.lucas: catch CmsException here and throw it again. // Don't wrap another CmsException around it, since this may cause problems during login. catch (CmsException e) { throw e; } catch (Exception e) { throw new CmsException("["+this.getClass().getName()+"]", e); } finally { if( statement != null) { m_pool.putPreparedStatement(C_USERS_READ_KEY, statement); } } } | 51784 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51784/2d9e397a561c34b8799cc4472b3c75f8ad54f0e2/CmsDbAccess.java/buggy/src/com/opencms/file/genericSql/CmsDbAccess.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
25492,
855,
1299,
12,
780,
508,
16,
509,
618,
13,
3196,
202,
15069,
11228,
288,
202,
202,
29325,
3021,
273,
446,
31,
202,
202,
13198,
400,
273,
446,
31,
202,
202,
4747,
1299,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
25492,
855,
1299,
12,
780,
508,
16,
509,
618,
13,
3196,
202,
15069,
11228,
288,
202,
202,
29325,
3021,
273,
446,
31,
202,
202,
13198,
400,
273,
446,
31,
202,
202,
4747,
1299,
... |
if (buf.equals("PRIVMSG")) { recipient = tok.nextToken(); String chat = tok.nextToken(""); chat = chat.substring(2); listener.messagePrivMsg(nick, host, recipient, chat); return; } else if (buf.equals("NICK")) { String newname = tok.nextToken(""); newname = newname.substring(2); listener.messageNickChange(nick, host, newname); return; } else if (buf.equals("MODE")) { recipient = tok.nextToken(); String mode = tok.nextToken().trim(); String victim; if (tok.hasMoreElements()) { victim = tok.nextToken("").trim(); } else { victim = null; } if (mode.startsWith(":")) { mode = mode.substring(1); } listener.messageModeChange(nick, host, recipient, mode, victim); return; } else if (buf.equals("JOIN")) { String channel = tok.nextToken(""); channel = channel.substring(1); listener.messageChannelJoin(nick, host, channel); return; } else if (buf.equals("PART")) { String channel = tok.nextToken(); String message; if (tok.hasMoreTokens()) { message = tok.nextToken(""); message = message.substring(2); } else { message = null; } listener.messageChannelPart(nick, host, channel, message); return; } else if (buf.equals("QUIT")) { String message = tok.nextToken(""); message = message.substring(2); listener.messageQuit(nick, host, message); return; } | if (buf.equals("PRIVMSG")) { recipient = tok.nextToken(); String chat = tok.nextToken(""); chat = chat.substring(2); listener.messagePrivMsg(nick, host, recipient, chat); return; } else if (buf.equals("NICK")) { String newname = tok.nextToken(""); newname = newname.substring(2); listener.messageNickChange(nick, host, newname); return; } else if (buf.equals("MODE")) { recipient = tok.nextToken(); String mode = tok.nextToken().trim(); String victim; if (tok.hasMoreElements()) { victim = tok.nextToken("").trim(); } else { victim = null; } if (mode.startsWith(":")) { mode = mode.substring(1); } listener.messageModeChange(nick, host, recipient, mode, victim); return; } else if (buf.equals("JOIN")) { String channel = tok.nextToken(""); channel = channel.substring(1); listener.messageChannelJoin(nick, host, channel); return; } else if (buf.equals("PART")) { String channel = tok.nextToken(); String message; if (tok.hasMoreTokens()) { message = tok.nextToken(""); message = message.substring(2); } else { message = null; } listener.messageChannelPart(nick, host, channel, message); return; } else if (buf.equals("QUIT")) { String message = tok.nextToken(""); message = message.substring(2); listener.messageQuit(nick, host, message); return; } | void decipherMessage(String msg) { listener.log(msg); String nick; String host; String recipient; StringTokenizer tok = new StringTokenizer(msg, " "); String buf = tok.nextToken(); if (buf.indexOf("!") != -1) { nick = buf.substring(1, buf.indexOf("!")); host = buf.substring(buf.indexOf("!")+1); } else { host = buf; nick = ""; } buf = tok.nextToken(); try { int command = Integer.parseInt(buf); switch (command) { case 353://:Extremity.CA.US.GamesNET.net 353 Robyn = #1973 :Robyn Max\DAd @Tempyst LittleMe @MechanicalGhost Mez` @Vino sada^game GOaT @Weine|Away @ChanServ shinobiwan @Yukie WillSchnevel +Feixeno String channel = msg.substring(msg.indexOf("=") + 2, msg.indexOf(" ", msg.indexOf("=") + 2)); String list = msg.substring(msg.indexOf(":", 1)+1); listener.messageChanList(channel, list); return; default: } } catch (NumberFormatException nfe) { } if (buf.equals("PRIVMSG")) { recipient = tok.nextToken(); String chat = tok.nextToken(""); chat = chat.substring(2); listener.messagePrivMsg(nick, host, recipient, chat); return; } else if (buf.equals("NICK")) { String newname = tok.nextToken(""); newname = newname.substring(2); listener.messageNickChange(nick, host, newname); return; } else if (buf.equals("MODE")) { recipient = tok.nextToken(); String mode = tok.nextToken().trim(); String victim; if (tok.hasMoreElements()) { victim = tok.nextToken("").trim(); } else { victim = null; } if (mode.startsWith(":")) { mode = mode.substring(1); } listener.messageModeChange(nick, host, recipient, mode, victim); return; } else if (buf.equals("JOIN")) { String channel = tok.nextToken(""); channel = channel.substring(1); listener.messageChannelJoin(nick, host, channel); return; } else if (buf.equals("PART")) { String channel = tok.nextToken(); String message; if (tok.hasMoreTokens()) { message = tok.nextToken(""); message = message.substring(2); } else { message = null; } listener.messageChannelPart(nick, host, channel, message); return; } else if (buf.equals("QUIT")) { String message = tok.nextToken(""); message = message.substring(2); listener.messageQuit(nick, host, message); return; } //Still can't figure out what it is. listener.messageReceived(msg); } | 4867 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4867/13a5492f5df8208250f437a98b833f050ed86976/SephiaBot.java/clean/SephiaBot.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
918,
2109,
4337,
1079,
12,
780,
1234,
13,
288,
565,
2991,
18,
1330,
12,
3576,
1769,
565,
514,
10909,
31,
565,
514,
1479,
31,
565,
514,
8027,
31,
565,
16370,
946,
273,
394,
16370,
12,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
918,
2109,
4337,
1079,
12,
780,
1234,
13,
288,
565,
2991,
18,
1330,
12,
3576,
1769,
565,
514,
10909,
31,
565,
514,
1479,
31,
565,
514,
8027,
31,
565,
16370,
946,
273,
394,
16370,
12,
... |
case '\'': case '\"': { exprBuffer.append(lookahead); String quote = lookahead; lookahead = tokenizer.nextToken(); while(!lookahead.equals(quote)) { exprBuffer.append(lookahead); lookahead = tokenizer.nextToken(); } exprBuffer.append(lookahead); lookahead = tokenizer.nextToken(); break; } case '{': { error = XSLMessages.createMessage(XSLTErrorResources.ER_NO_CURLYBRACE, null); break; } case '}': { buffer.setLength(0); XPath xpath = handler.createXPath(exprBuffer.toString()); m_parts.addElement(new AVTPartXPath(xpath)); lookahead = null; break; } default: { exprBuffer.append(lookahead); lookahead = tokenizer.nextToken(); } } } else { | exprBuffer.append(lookahead); lookahead = tokenizer.nextToken(); } exprBuffer.append(lookahead); lookahead = tokenizer.nextToken(); break; } case '{' : { error = XSLMessages.createMessage( XSLTErrorResources.ER_NO_CURLYBRACE, null); break; } case '}' : { buffer.setLength(0); XPath xpath = handler.createXPath(exprBuffer.toString()); m_parts.addElement(new AVTPartXPath(xpath)); lookahead = null; break; } default : { | public AVT(StylesheetHandler handler, String uri, String name, String rawName, String stringedValue) throws org.xml.sax.SAXException { m_uri = uri; m_name = name; m_rawName = rawName; StringTokenizer tokenizer = new StringTokenizer(stringedValue, "{}\"\'", true); int nTokens = tokenizer.countTokens(); if(nTokens < 2) { m_simpleString = stringedValue; // then do the simple thing } else { FastStringBuffer buffer = StringBufferPool.get(); FastStringBuffer exprBuffer = StringBufferPool.get(); try { m_parts = new Vector(nTokens+1); String t = null; // base token String lookahead= null; // next token String error = null; // if non-null, break from loop while(tokenizer.hasMoreTokens()) { if( lookahead != null ) { t = lookahead; lookahead = null; } else t = tokenizer.nextToken(); if(t.length() == 1) { switch(t.charAt(0)) { case('\"'): case('\''): { // just keep on going, since we're not in an attribute template buffer.append(t); break; } case('{'): { // Attribute Value Template start lookahead = tokenizer.nextToken(); if(lookahead.equals("{")) { // Double curlys mean escape to show curly buffer.append(lookahead); lookahead = null; break; // from switch } /* else if(lookahead.equals("\"") || lookahead.equals("\'")) { // Error. Expressions can not begin with quotes. error = "Expressions can not begin with quotes."; break; // from switch } */ else { if(buffer.length() > 0) { m_parts.addElement(new AVTPartSimple(buffer.toString())); buffer.setLength(0); } exprBuffer.setLength(0); while(null != lookahead) { if(lookahead.length() == 1) { switch(lookahead.charAt(0)) { case '\'': case '\"': { // String start exprBuffer.append(lookahead); String quote = lookahead; // Consume stuff 'till next quote lookahead = tokenizer.nextToken(); while(!lookahead.equals(quote)) { exprBuffer.append(lookahead); lookahead = tokenizer.nextToken(); } exprBuffer.append(lookahead); lookahead = tokenizer.nextToken(); break; } case '{': { // What's another curly doing here? error = XSLMessages.createMessage(XSLTErrorResources.ER_NO_CURLYBRACE, null); //"Error: Can not have \"{\" within expression."; break; } case '}': { // Proper close of attribute template. // Evaluate the expression. buffer.setLength(0); XPath xpath = handler.createXPath(exprBuffer.toString()); m_parts.addElement(new AVTPartXPath(xpath)); lookahead = null; // breaks out of inner while loop break; } default: { // part of the template stuff, just add it. exprBuffer.append(lookahead); lookahead = tokenizer.nextToken(); } } // end inner switch } // end if lookahead length == 1 else { // part of the template stuff, just add it. exprBuffer.append(lookahead); lookahead = tokenizer.nextToken(); } } // end while(!lookahead.equals("}")) if(error != null) { break; // from inner while loop } } break; } case('}'): { lookahead = tokenizer.nextToken(); if(lookahead.equals("}")) { // Double curlys mean escape to show curly buffer.append(lookahead); lookahead = null; // swallow } else { // Illegal, I think... handler.warn(XSLTErrorResources.WG_FOUND_CURLYBRACE, null); //"Found \"}\" but no attribute template open!"); buffer.append("}"); // leave the lookahead to be processed by the next round. } break; } default: { // Anything else just add to string. buffer.append(t); } } // end switch t } // end if length == 1 else { // Anything else just add to string. buffer.append(t); } if(null != error) { handler.warn(XSLTErrorResources.WG_ATTR_TEMPLATE, new Object[] {error}); //"Attr Template, "+error); break; } } // end while(tokenizer.hasMoreTokens()) if(buffer.length() > 0) { m_parts.addElement(new AVTPartSimple(buffer.toString())); buffer.setLength(0); } } finally { StringBufferPool.free(buffer); StringBufferPool.free(exprBuffer); } } // end else nTokens > 1 if(null == m_parts && (null == m_simpleString)) { // Error? m_simpleString = ""; } } | 2723 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2723/77ad973f1d6ad8f28fd358f2ba4d4c63da65d953/AVT.java/clean/src/org/apache/xalan/templates/AVT.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
15068,
56,
12,
24656,
1503,
1838,
16,
2868,
514,
2003,
16,
2868,
514,
508,
16,
2398,
514,
1831,
461,
16,
2398,
514,
533,
329,
620,
13,
565,
1216,
2358,
18,
2902,
18,
87,
651,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
15068,
56,
12,
24656,
1503,
1838,
16,
2868,
514,
2003,
16,
2868,
514,
508,
16,
2398,
514,
1831,
461,
16,
2398,
514,
533,
329,
620,
13,
565,
1216,
2358,
18,
2902,
18,
87,
651,
18... |
public Serializable lock(long objectID, boolean block) throws DeadlockException, NonExistantObjectIDException { Serializable obj = lockedObjectsMap.get(objectID); if (obj != null) { // already locked return obj; } keyTrans.lock(objectID); TSODataHeader hdr = (TSODataHeader) keyTrans.read(objectID); while (!hdr.free) { if (System.currentTimeMillis() > hdr.timeoutTime) { // timed out ostore.requestTimeoutInterrupt(hdr.uuid); hdr.free = true; } if (timestampInterrupted) { keyTrans.abort(); abort(); throw new DeadlockException(); } else if (!block) { keyTrans.abort(); return null; } if ((time < hdr.time) || ((time == hdr.time) && (tiebreaker < hdr.tiebreaker))) { ostore.requestTimestampInterrupt(hdr.uuid); } // System.out.println("Waiting for wakeup "+transactionID); synchronized (this) { if (!hdr.availabilityListeners.contains(transactionID)) { hdr.availabilityListeners.add(transactionID); keyTrans.write(objectID, hdr); keyTrans.commit(); } else { keyTrans.abort(); } if (log.isLoggable(Level.FINER)) { log.finer("txn " + transactionID + " about to wait for header id " + objectID + " until " + String.format("%1$tF %<tT.%<tL", hdr.timeoutTime)); } waitForWakeup(hdr.timeoutTime); } // System.out.println("wokeup "+transactionID); keyTrans.abort(); keyTrans.lock(objectID); log.finer("txn " + transactionID + " about to re-read header id " + objectID); hdr = (TSODataHeader) keyTrans.read(objectID); //System.out.println("hdr="+hdr); if (hdr.free) { log.finer("txn " + transactionID + " got header id " + objectID); } } if (hdr.createNotCommitted) { mainTrans.destroy(hdr.objectID); mainTrans.destroy(objectID); return null; } hdr.free = false; hdr.time = time; //hdr.timeoutTime = time + TIMEOUT; hdr.tiebreaker = tiebreaker; hdr.availabilityListeners.remove(transactionID); hdr.uuid = transactionID; keyTrans.write(objectID, hdr); keyTrans.commit(); obj = mainTrans.read(hdr.objectID); lockedObjectsMap.put(objectID, obj); return obj; } | 55380 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55380/1bc9c87d2beb6a11f9220f2059bbd7d0d2760326/TSOTransaction.java/clean/src/com/sun/gi/objectstore/tso/TSOTransaction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
13687,
2176,
12,
5748,
23021,
16,
1250,
1203,
13,
5411,
1216,
23967,
739,
503,
16,
3858,
4786,
970,
22359,
503,
288,
3639,
13687,
1081,
273,
8586,
4710,
863,
18,
588,
12,
1612,
734,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
13687,
2176,
12,
5748,
23021,
16,
1250,
1203,
13,
5411,
1216,
23967,
739,
503,
16,
3858,
4786,
970,
22359,
503,
288,
3639,
13687,
1081,
273,
8586,
4710,
863,
18,
588,
12,
1612,
734,... | ||
} else { MylarStatusHandler.log("Could not get icon overlay, connector UI not yet started.", this); } | } | public void decorate(Object element, IDecoration decoration) { if (element instanceof AbstractRepositoryQuery) { AbstractRepositoryQuery query = (AbstractRepositoryQuery) element; String repositoryUrl = query.getRepositoryUrl(); if (repositoryUrl != null) { try { URL url = new URL(repositoryUrl); decoration.addSuffix(" [" + url.getHost() + "]"); } catch (MalformedURLException e) { decoration.addSuffix(" [ <unknown host> ]"); } } if (query.isSynchronizing()) { decoration.addOverlay(TaskListImages.OVERLAY_SYNCHRONIZING, IDecoration.TOP_LEFT); } } else if (element instanceof AbstractRepositoryTask) { AbstractRepositoryTask task = (AbstractRepositoryTask) element; AbstractRepositoryConnector connector = TasksUiPlugin.getRepositoryManager().getRepositoryConnector( task.getRepositoryKind()); AbstractRepositoryConnectorUi connectorUi = TasksUiPlugin.getRepositoryUi(task.getRepositoryKind()); TaskRepository repository = TasksUiPlugin.getRepositoryManager().getRepository(task.getRepositoryKind(), task.getRepositoryUrl()); if (connectorUi != null) { if (!connectorUi.hasRichEditor()) { decoration.addOverlay(TaskListImages.OVERLAY_WEB, IDecoration.BOTTOM_LEFT); } else if (connector != null && connector.hasRepositoryContext(repository, task)) { decoration.addOverlay(TaskListImages.OVERLAY_REPOSITORY_CONTEXT, IDecoration.BOTTOM_LEFT); } else { decoration.addOverlay(TaskListImages.OVERLAY_REPOSITORY, IDecoration.BOTTOM_LEFT); } } else { MylarStatusHandler.log("Could not get icon overlay, connector UI not yet started.", this); } if (task.isSynchronizing()) { decoration.addOverlay(TaskListImages.OVERLAY_SYNCHRONIZING, IDecoration.TOP_LEFT); } } else if (element instanceof AbstractQueryHit) { ITask correspondingTask = ((AbstractQueryHit) element).getCorrespondingTask(); decorate(correspondingTask, decoration); } else if (element instanceof ITask) { String url = ((ITask) element).getUrl(); if (url != null && !url.trim().equals("") && !url.equals("http://")) { decoration.addOverlay(TaskListImages.OVERLAY_WEB, IDecoration.BOTTOM_LEFT); } } else if (element instanceof TaskRepository) { ImageDescriptor overlay = TasksUiPlugin.getDefault().getOverlayIcon(((TaskRepository) element).getKind()); if (overlay != null) { decoration.addOverlay(overlay, IDecoration.BOTTOM_RIGHT); } } } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/408be6e7a45df25a60b7feeb52720f603b9f519d/RepositoryTaskDecorator.java/clean/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/RepositoryTaskDecorator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
15752,
12,
921,
930,
16,
1599,
557,
22226,
29217,
13,
288,
202,
202,
430,
261,
2956,
1276,
4115,
3305,
1138,
13,
288,
1082,
202,
7469,
3305,
1138,
843,
273,
261,
7469,
33... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
15752,
12,
921,
930,
16,
1599,
557,
22226,
29217,
13,
288,
202,
202,
430,
261,
2956,
1276,
4115,
3305,
1138,
13,
288,
1082,
202,
7469,
3305,
1138,
843,
273,
261,
7469,
33... |
kernelModule.defineMethod("taint", taint); kernelModule.defineMethod("tainted?", tainted); kernelModule.defineMethod("to_a", to_a); kernelModule.defineMethod("to_s", to_s); kernelModule.defineMethod("type", type); kernelModule.defineMethod("untaint", untaint); | kernelModule.defineMethod("taint", CallbackFactory.getMethod(RubyObject.class, "taint")); kernelModule.defineMethod("tainted?", CallbackFactory.getMethod(RubyObject.class, "tainted")); kernelModule.defineMethod("to_a", CallbackFactory.getMethod(RubyObject.class, "to_a")); kernelModule.defineMethod("to_s", CallbackFactory.getMethod(RubyObject.class, "to_s")); kernelModule.defineMethod("type", CallbackFactory.getMethod(RubyObject.class, "type")); kernelModule.defineMethod("untaint", CallbackFactory.getMethod(RubyObject.class, "untaint")); | public static void createObjectClass(RubyModule kernelModule) { // TODO: convert to CallbackFactory invokes. Callback clone = new ReflectionCallbackMethod(RubyObject.class, "rbClone"); Callback dup = new ReflectionCallbackMethod(RubyObject.class, "dup"); Callback equal = new ReflectionCallbackMethod(RubyObject.class, "equal", RubyObject.class); Callback respond_to = new ReflectionCallbackMethod(RubyObject.class, "respond_to", RubySymbol.class); Callback extend = new ReflectionCallbackMethod(RubyObject.class, "extend", RubyObject[].class, true); Callback freeze = new ReflectionCallbackMethod(RubyObject.class, "freeze"); Callback frozen = new ReflectionCallbackMethod(RubyObject.class, "frozen"); Callback id = new ReflectionCallbackMethod(RubyObject.class, "id"); Callback inspect = new ReflectionCallbackMethod(RubyObject.class, "inspect"); Callback instance_eval = new ReflectionCallbackMethod(RubyObject.class, "instance_eval", RubyObject[].class, true); Callback instance_of = new ReflectionCallbackMethod(RubyObject.class, "instance_of", RubyModule.class); Callback instance_variables = new ReflectionCallbackMethod(RubyObject.class, "instance_variables"); Callback kind_of = new ReflectionCallbackMethod(RubyObject.class, "kind_of", RubyModule.class); Callback method = new ReflectionCallbackMethod(RubyObject.class, "method", RubyObject.class); Callback methods = new ReflectionCallbackMethod(RubyObject.class, "methods"); Callback private_methods = new ReflectionCallbackMethod(RubyObject.class, "private_methods"); Callback protected_methods = new ReflectionCallbackMethod(RubyObject.class, "protected_methods"); Callback taint = new ReflectionCallbackMethod(RubyObject.class, "taint"); Callback tainted = new ReflectionCallbackMethod(RubyObject.class, "tainted"); Callback to_a = new ReflectionCallbackMethod(RubyObject.class, "to_a"); Callback to_s = new ReflectionCallbackMethod(RubyObject.class, "to_s"); Callback type = new ReflectionCallbackMethod(RubyObject.class, "type"); Callback untaint = new ReflectionCallbackMethod(RubyObject.class, "untaint"); kernelModule.defineMethod("=~", CallbackFactory.getFalseMethod()); kernelModule.defineMethod("==", equal); kernelModule.defineMethod("respond_to?", respond_to); kernelModule.defineMethod("class", type); kernelModule.defineMethod("clone", clone); kernelModule.defineMethod("dup", dup); kernelModule.defineMethod("eql?", equal); kernelModule.defineMethod("extend", extend); kernelModule.defineMethod("freeze", freeze); kernelModule.defineMethod("frozen?", frozen); kernelModule.defineMethod("hash", id); kernelModule.defineMethod("id", id); kernelModule.defineMethod("__id__", id); kernelModule.defineMethod("inspect", inspect); kernelModule.defineMethod("instance_eval", instance_eval); kernelModule.defineMethod("instance_of?", instance_of); kernelModule.defineMethod("instance_variables", instance_variables); kernelModule.defineMethod("is_a?", kind_of); kernelModule.defineMethod("kind_of?", kind_of); kernelModule.defineMethod("method", method); kernelModule.defineMethod("methods", methods); kernelModule.defineMethod("private_methods", private_methods); kernelModule.defineMethod("protected_methods", protected_methods); kernelModule.defineMethod("public_methods", methods); kernelModule.defineMethod("nil?", CallbackFactory.getFalseMethod()); kernelModule.defineMethod("send", CallbackFactory.getOptMethod(RubyObject.class, "send", RubyObject.class)); kernelModule.defineMethod("__send__", CallbackFactory.getOptMethod(RubyObject.class, "send", RubyObject.class)); kernelModule.defineMethod("taint", taint); kernelModule.defineMethod("tainted?", tainted); kernelModule.defineMethod("to_a", to_a); kernelModule.defineMethod("to_s", to_s); kernelModule.defineMethod("type", type); kernelModule.defineMethod("untaint", untaint); kernelModule.defineAlias("===", "=="); kernelModule.defineAlias("equal?", "=="); Ruby ruby = kernelModule.getRuby(); ruby.defineGlobalFunction("method_missing", CallbackFactory.getOptMethod(RubyObject.class, "method_missing", RubyObject.class)); } | 45221 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45221/4e4c0a90262b62b83d3fc5717371745bcc928c2b/RubyObject.java/clean/org/jruby/RubyObject.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
17109,
797,
12,
54,
10340,
3120,
5536,
3120,
13,
288,
3639,
368,
2660,
30,
1765,
358,
8444,
1733,
18058,
18,
3639,
8444,
3236,
273,
394,
5685,
2428,
1305,
12,
54,
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,
1071,
760,
918,
17109,
797,
12,
54,
10340,
3120,
5536,
3120,
13,
288,
3639,
368,
2660,
30,
1765,
358,
8444,
1733,
18058,
18,
3639,
8444,
3236,
273,
394,
5685,
2428,
1305,
12,
54,
10340,
... |
if (keyCode=='3') new Bookmarks(display, null); | if (keyCode=='3') searchGroup(-1); | public void userKeyPressed(int keyCode){ if (keyCode==KEY_NUM0 /* || keyCode==MOTOE680_REALPLAYER CONFLICT WITH ALCATEL. (platform=J2ME)*/) { if (messageCount==0) return; Object atcursor=getFocusedObject(); Contact c=null; if (atcursor instanceof Contact) c=(Contact)atcursor; // а если курсор на группе, то искать с самого начала. else c=(Contact)hContacts.firstElement(); Enumeration i=hContacts.elements(); int pass=0; // 0=ищем курсор, 1=ищем while (pass<2) { if (!i.hasMoreElements()) i=hContacts.elements(); Contact p=(Contact)i.nextElement(); if (pass==1) if (p.getNewMsgsCount()>0) { focusToContact(p, true); setRotator(); break; } if (p==c) pass++; // полный круг пройден } } if (keyCode==-4 || keyCode==-1) { if (Version.getPlatformName().indexOf("SIE") > -1) { new RosterMenu(display, getFocusedObject()); return; } } if (keyCode==-21 || keyCode==-22 || keyCode==21 || keyCode==22) { if (cf.ghostMotor) { new RosterMenu(display, getFocusedObject()); } } if (keyCode==-7 || keyCode==-6) { if ((Version.getPlatformName().indexOf("Nokia") > -1) || (Version.getPlatformName().indexOf("SonyE") > -1)) { new RosterMenu(display, getFocusedObject()); } } //if (keyCode=='3') searchGroup(-1); if (keyCode=='3') new Bookmarks(display, null); if (keyCode=='9') searchGroup(1); if (keyCode==KEY_POUND) { if (cf.poundKey) { if (Version.getPlatformName().indexOf("SIE") == -1) { fullMode=cf.isbottom; switch (fullMode) { case 0: cf.isbottom=1; break; case 1: cf.isbottom=2; break; case 2: cf.isbottom=3; break; case 3: cf.isbottom=0; break; } cf.saveToStorage(); } } System.gc(); } if (keyCode==KEY_STAR) { if (cf.starKey) { if (Version.getPlatformName().indexOf("SIE") > -1) { fullMode=cf.isbottom; switch (fullMode) { case 0: cf.isbottom=1; break; case 1: cf.isbottom=2; break; case 2: cf.isbottom=3; break; case 3: cf.isbottom=0; break; } cf.saveToStorage(); } } System.gc(); } } | 57190 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57190/c0f8304f7e8de07ffea24e06252a1460dfacbda5/Roster.java/clean/full/src/Client/Roster.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
729,
653,
24624,
12,
474,
16369,
15329,
3639,
309,
261,
856,
1085,
631,
3297,
67,
6069,
20,
1748,
747,
16369,
631,
49,
27019,
41,
26,
3672,
67,
31052,
52,
22166,
225,
18733,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
729,
653,
24624,
12,
474,
16369,
15329,
3639,
309,
261,
856,
1085,
631,
3297,
67,
6069,
20,
1748,
747,
16369,
631,
49,
27019,
41,
26,
3672,
67,
31052,
52,
22166,
225,
18733,
... |
temp_obj = evt.getArg(); if ( temp_obj instanceof Message ) { msg = (Message) temp_obj; temp_obj = msg.removeHeader(getName()); if ( temp_obj instanceof TotalHeader ) { TotalHeader hdr = (TotalHeader) temp_obj; | temp_obj=evt.getArg(); if(temp_obj instanceof Message) { msg=(Message)temp_obj; temp_obj=msg.removeHeader(getName()); if(temp_obj instanceof TotalHeader) { TotalHeader hdr=(TotalHeader)temp_obj; | public void up(Event evt) { Message msg; //System.out.println("UP: " + evt); Object temp_obj; // used for type checking before performing casts switch( evt.getType() ) { case Event.SET_LOCAL_ADDRESS: temp_obj = evt.getArg(); if ( temp_obj instanceof Address ) { local_addr = (Address) temp_obj; } else { log.error( "Error: Total.up() - could not cast local address to an Address object" ); } break; case Event.MSG: // get the message and the header for the TOTAL_OLD layer temp_obj = evt.getArg(); if ( temp_obj instanceof Message ) { msg = (Message) temp_obj; temp_obj = msg.removeHeader(getName()); if ( temp_obj instanceof TotalHeader ) { TotalHeader hdr = (TotalHeader) temp_obj; // switch on the "command" defined by the header switch( hdr.total_header_type ) { case TotalHeader.TOTAL_UNICAST: // don't process this message, just pass it up (TotalHeader header already removed) passUp(evt); return; case TotalHeader.TOTAL_BCAST: handleBCastMessage( msg, hdr.seq_id ); break; case TotalHeader.TOTAL_REQUEST: // if we are the sequencer, respond to this request if ( isSequencer() ) { handleRequestMessage( msg ); } break; case TotalHeader.TOTAL_NEW_VIEW: // store the sequence id that we should expect next next_seq_id = hdr.seq_id; // TODO: need to send some sort of ACK or something to the sequencer (maybe) break; case TotalHeader.TOTAL_CUM_SEQ_ACK: // if we are the sequencer, update state if ( isSequencer() ) { temp_obj = msg.getSrc(); if ( temp_obj instanceof Address ) { ack_history.setSeq( (Address) temp_obj, hdr.seq_id ); } else { log.error( "Error: TOTAL_OLD.Up() - could not cast source of message to an Address object (case TotalHeader.TOTAL_CUM_SEQ_ACK)" ); } } break; case TotalHeader.TOTAL_RESEND: // if we are the sequencer, respond to this request if ( isSequencer() ) { handleResendRequest( msg, hdr.seq_id ); } break; default: // unrecognized header type - discard message log.error( "Error: TOTAL_OLD.up() - unrecognized TotalHeader in message - " + hdr.toString() ); return; // don't let it call passUp() } // switch( hdr.total_header_type ) } else { log.error( "Error: TOTAL_OLD.up() - could not cast message header to TotalHeader (case Event.MSG)" ); } // if ( temp_obj instanceof TotalHeader ) } else { log.error( "Error: TOTAL_OLD.up() - could not cast argument of Event to a Message (case Event.MSG)" ); } // if ( temp_obj instanceof Address ) //System.out.println("The message is " + msg); return; // don't blindly pass up messages immediately (if at all) // begin mms21 /* case Event.BECOME_SERVER: System.out.println( "Become Server event passed up to TOTAL_OLD (debug - mms21)" ); break; */ case Event.TMP_VIEW: // TODO: this may be temporary case Event.VIEW_CHANGE: System.out.println( "View Change event passed up to TOTAL_OLD (debug - mms21)" ); View new_view = (View) evt.getArg(); members = new_view.getMembers(); { // print the members of this new view System.out.println( "New view members (printed in TOTAL_OLD):" ); int view_size = members.size(); for( int i=0; i<view_size; i++ ) { System.out.println( " " + members.elementAt(i).toString() ); } } // reset the state for total ordering for this new view reset(); // if we are the sequencer in this new view, send a new // TOTAL_NEW_VIEW message to the group if ( isSequencer() ) { // we are the sequencer in this new view log.error( "TOTAL_OLD.up() - I am the sequencer of this new view" ); // we need to keep track of acknowledgements messages ack_history = new MessageAcks( members ); // start assigning messages with this sequence id next_seq_id_to_assign = INIT_SEQ_ID; // send a message to the group with the initial sequence id to expect Message new_view_msg = new Message( null, local_addr, null ); new_view_msg.putHeader(getName(), new TotalHeader( TotalHeader.TOTAL_NEW_VIEW, next_seq_id_to_assign ) ); passDown( new Event( Event.MSG, new_view_msg ) ); } break; // end mms21 default: break; } // switch( evt.getType() ) passUp(evt); // Pass up to the layer above us } | 50160 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50160/5ad015d9a78e1da3350d9b398b46b2f5d4508564/TOTAL_OLD.java/buggy/src/org/jgroups/protocols/TOTAL_OLD.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
731,
12,
1133,
6324,
13,
288,
3639,
2350,
1234,
31,
3639,
368,
3163,
18,
659,
18,
8222,
2932,
3079,
30,
315,
397,
6324,
1769,
202,
921,
1906,
67,
2603,
31,
225,
368,
1399,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
731,
12,
1133,
6324,
13,
288,
3639,
2350,
1234,
31,
3639,
368,
3163,
18,
659,
18,
8222,
2932,
3079,
30,
315,
397,
6324,
1769,
202,
921,
1906,
67,
2603,
31,
225,
368,
1399,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.