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
props.remove("discard_incompatibe_packets");
props.remove("discard_incompatible_packets");
public boolean setProperties(Properties props) { String str; String tmp = null; super.setProperties(props); // PropertyPermission not granted if running in an untrusted environment with JNLP. try { tmp=System.getProperty("bind.address"); if(Boolean.getBoolean(IGNORE_BIND_ADDRESS_PROPERTY)) { tmp=null; } } catch (SecurityException ex){ } if(tmp != null) str=tmp; else str=props.getProperty("bind_addr"); if(str != null) { try { bind_addr=InetAddress.getByName(str); } catch(UnknownHostException unknown) { if(log.isFatalEnabled()) log.fatal("(bind_addr): host " + str + " not known"); return false; } props.remove("bind_addr"); } str=props.getProperty("bind_to_all_interfaces"); if(str != null) { bind_to_all_interfaces=new Boolean(str).booleanValue(); props.remove("bind_to_all_interfaces"); } str=props.getProperty("bind_port"); if(str != null) { bind_port=Integer.parseInt(str); props.remove("bind_port"); } str=props.getProperty("num_last_ports"); if(str != null) { num_last_ports=Integer.parseInt(str); props.remove("num_last_ports"); } str=props.getProperty("start_port"); if(str != null) { bind_port=Integer.parseInt(str); props.remove("start_port"); } str=props.getProperty("port_range"); if(str != null) { port_range=Integer.parseInt(str); props.remove("port_range"); } str=props.getProperty("mcast_addr"); if(str != null) { mcast_addr_name=str; props.remove("mcast_addr"); } str=props.getProperty("mcast_port"); if(str != null) { mcast_port=Integer.parseInt(str); props.remove("mcast_port"); } str=props.getProperty("ip_mcast"); if(str != null) { ip_mcast=Boolean.valueOf(str).booleanValue(); props.remove("ip_mcast"); } str=props.getProperty("ip_ttl"); if(str != null) { ip_ttl=Integer.parseInt(str); props.remove("ip_ttl"); } str=props.getProperty("mcast_send_buf_size"); if(str != null) { mcast_send_buf_size=Integer.parseInt(str); props.remove("mcast_send_buf_size"); } str=props.getProperty("mcast_recv_buf_size"); if(str != null) { mcast_recv_buf_size=Integer.parseInt(str); props.remove("mcast_recv_buf_size"); } str=props.getProperty("ucast_send_buf_size"); if(str != null) { ucast_send_buf_size=Integer.parseInt(str); props.remove("ucast_send_buf_size"); } str=props.getProperty("ucast_recv_buf_size"); if(str != null) { ucast_recv_buf_size=Integer.parseInt(str); props.remove("ucast_recv_buf_size"); } str=props.getProperty("loopback"); if(str != null) { loopback=Boolean.valueOf(str).booleanValue(); props.remove("loopback"); } str=props.getProperty("discard_incompatibe_packets"); if(str != null) { discard_incompatible_packets=Boolean.valueOf(str).booleanValue(); props.remove("discard_incompatibe_packets"); } // this is deprecated, just left for compatibility (use use_incoming_packet_handler) str=props.getProperty("use_packet_handler"); if(str != null) { use_incoming_packet_handler=Boolean.valueOf(str).booleanValue(); props.remove("use_packet_handler"); if(log.isWarnEnabled()) log.warn("'use_packet_handler' is deprecated; use 'use_incoming_packet_handler' instead"); } str=props.getProperty("use_incoming_packet_handler"); if(str != null) { use_incoming_packet_handler=Boolean.valueOf(str).booleanValue(); props.remove("use_incoming_packet_handler"); } str=props.getProperty("use_outgoing_packet_handler"); if(str != null) { use_outgoing_packet_handler=Boolean.valueOf(str).booleanValue(); props.remove("use_outgoing_packet_handler"); } str=props.getProperty("max_bundle_size"); if(str != null) { int bundle_size=Integer.parseInt(str); if(bundle_size > max_bundle_size) { if(log.isErrorEnabled()) log.error("max_bundle_size (" + bundle_size + ") is greater than largest UDP fragmentation size (" + max_bundle_size + ')'); return false; } if(bundle_size <= 0) { if(log.isErrorEnabled()) log.error("max_bundle_size (" + bundle_size + ") is <= 0"); return false; } max_bundle_size=bundle_size; props.remove("max_bundle_size"); } str=props.getProperty("max_bundle_timeout"); if(str != null) { max_bundle_timeout=Long.parseLong(str); if(max_bundle_timeout <= 0) { if(log.isErrorEnabled()) log.error("max_bundle_timeout of " + max_bundle_timeout + " is invalid"); return false; } props.remove("max_bundle_timeout"); } str=props.getProperty("enable_bundling"); if(str != null) { enable_bundling=Boolean.valueOf(str).booleanValue(); props.remove("enable_bundling"); } str=props.getProperty("use_addr_translation"); if(str != null) { use_addr_translation=Boolean.valueOf(str).booleanValue(); props.remove("use_addr_translation"); } str=props.getProperty("null_src_addresses"); if(str != null) { null_src_addresses=Boolean.valueOf(str).booleanValue(); props.remove("null_src_addresses"); } if(props.size() > 0) { log.error("UDP.setProperties(): the following properties are not recognized: " + props); return false; } if(enable_bundling) { if(use_outgoing_packet_handler == false) if(log.isWarnEnabled()) log.warn("enable_bundling is true; setting use_outgoing_packet_handler=true"); use_outgoing_packet_handler=true; } return true; }
47927 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47927/7bbf317fade46d438dd7aae0d732198e6e71a202/UDP.java/clean/src/org/jgroups/protocols/UDP.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 1250, 23126, 12, 2297, 3458, 13, 288, 3639, 514, 609, 31, 3639, 514, 1853, 273, 446, 31, 3639, 2240, 18, 542, 2297, 12, 9693, 1769, 7734, 368, 4276, 5041, 486, 17578, 309, 3549, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 1250, 23126, 12, 2297, 3458, 13, 288, 3639, 514, 609, 31, 3639, 514, 1853, 273, 446, 31, 3639, 2240, 18, 542, 2297, 12, 9693, 1769, 7734, 368, 4276, 5041, 486, 17578, 309, 3549, 3...
public void testSearchSubtreeByAdmin() throws NamingException { SearchControls controls = new SearchControls(); controls.setSearchScope( SearchControls.SUBTREE_SCOPE ); HashSet set = new HashSet(); NamingEnumeration list = sysRoot.search( "", "(objectClass=*)", controls ); while ( list.hasMore() ) { SearchResult result = ( SearchResult ) list.next(); set.add( result.getName() ); } assertTrue( set.contains( "ou=system" ) ); assertTrue( set.contains( "ou=groups,ou=system" ) ); assertTrue( set.contains( "ou=users,ou=system" ) ); assertTrue( set.contains( "uid=akarasulu,ou=users,ou=system" ) ); assertTrue( set.contains( "uid=admin,ou=system" ) ); }
10677 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10677/0a4e276dc33982ba994abc23dfea44d061c4f96a/AuthorizationServiceAsAdminTest.java/buggy/core/src/test/org/apache/ldap/server/authz/AuthorizationServiceAsAdminTest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1071, 6459, 3813, 2979, 18615, 858, 4446, 1435, 15069, 24102, 503, 95, 2979, 16795, 24350, 33, 2704, 2979, 16795, 5621, 24350, 18, 542, 2979, 3876, 12, 2979, 16795, 18, 8362, 26557, 67, 19444, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3813, 2979, 18615, 858, 4446, 1435, 15069, 24102, 503, 95, 2979, 16795, 24350, 33, 2704, 2979, 16795, 5621, 24350, 18, 542, 2979, 3876, 12, 2979, 16795, 18, 8362, 26557, 67, 19444, 1...
proposals.add(new NewMethodCompletionProposal(label, targetCU, selectedNode, arguments, targetBinding, 1, image));
proposals.add(new NewMethodCompletionProposal(label, targetCU, selectedNode, arguments, targetBinding, 5, image));
public static void getConstructorProposals(IAssistContext context, IProblemLocation problem, Collection proposals) throws CoreException { ICompilationUnit cu= context.getCompilationUnit(); CompilationUnit astRoot= context.getASTRoot(); ASTNode selectedNode= problem.getCoveringNode(context); if (selectedNode == null) { return; } ITypeBinding targetBinding= null; List arguments= null; int type= selectedNode.getNodeType(); if (type == ASTNode.CLASS_INSTANCE_CREATION) { ClassInstanceCreation creation= (ClassInstanceCreation) selectedNode; IBinding binding= creation.getName().resolveBinding(); if (binding instanceof ITypeBinding) { targetBinding= (ITypeBinding) binding; arguments= creation.arguments(); } } else if (type == ASTNode.SUPER_CONSTRUCTOR_INVOCATION) { ITypeBinding typeBinding= Bindings.getBindingOfParentType(selectedNode); if (typeBinding != null && !typeBinding.isAnonymous()) { targetBinding= typeBinding.getSuperclass(); arguments= ((SuperConstructorInvocation) selectedNode).arguments(); } } else if (type == ASTNode.CONSTRUCTOR_INVOCATION) { ITypeBinding typeBinding= Bindings.getBindingOfParentType(selectedNode); if (typeBinding != null && !typeBinding.isAnonymous()) { targetBinding= typeBinding; arguments= ((ConstructorInvocation) selectedNode).arguments(); } } if (targetBinding == null) { return; } IMethodBinding[] methods= targetBinding.getDeclaredMethods(); ArrayList similarElements= new ArrayList(); IMethodBinding defConstructor= null; for (int i= 0; i < methods.length; i++) { IMethodBinding curr= methods[i]; if (curr.isConstructor()) { if (curr.getParameterTypes().length == 0) { defConstructor= curr; } else { similarElements.add(curr); } } } if (defConstructor != null) { // default constructor could be implicit (bug 36819). Only add when we're sure its not. // Misses the case when in other type if (!similarElements.isEmpty() || (astRoot.findDeclaringNode(defConstructor) != null)) { similarElements.add(defConstructor); } } addParameterMissmatchProposals(context, problem, similarElements, arguments, proposals); if (targetBinding.isFromSource()) { ICompilationUnit targetCU= ASTResolving.findCompilationUnitForBinding(cu, astRoot, targetBinding); if (targetCU != null) { String[] args= new String[] { getMethodSignature( targetBinding.getName(), arguments) }; String label= CorrectionMessages.getFormattedString("UnresolvedElementsSubProcessor.createconstructor.description", args); //$NON-NLS-1$ Image image= JavaPluginImages.get(JavaPluginImages.IMG_MISC_PUBLIC); proposals.add(new NewMethodCompletionProposal(label, targetCU, selectedNode, arguments, targetBinding, 1, image)); } } }
9698 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9698/028724f56b5d662679496ef7e5232a0390ab1d7b/UnresolvedElementsSubProcessor.java/buggy/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/UnresolvedElementsSubProcessor.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 760, 918, 17287, 626, 22536, 12, 45, 2610, 376, 1042, 819, 16, 467, 13719, 2735, 6199, 16, 2200, 450, 22536, 13, 1216, 30015, 288, 202, 202, 45, 19184, 2802, 15985, 33, 819, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 760, 918, 17287, 626, 22536, 12, 45, 2610, 376, 1042, 819, 16, 467, 13719, 2735, 6199, 16, 2200, 450, 22536, 13, 1216, 30015, 288, 202, 202, 45, 19184, 2802, 15985, 33, 819, 1...
Metadata metadata, ArchiveHandler container, FreenetURI thisKey, boolean dontEnterImplicitArchives)
Metadata metadata, ArchiveHandler container, FreenetURI thisKey, boolean dontEnterImplicitArchives, boolean localOnly)
private FetchResult runMetadata(ClientMetadata dm, int recursionLevel, ClientKey key, LinkedList metaStrings, Metadata metadata, ArchiveHandler container, FreenetURI thisKey, boolean dontEnterImplicitArchives) throws MetadataParseException, FetchException, ArchiveFailureException, ArchiveRestartException { if(metadata.isSimpleManifest()) { String name = (String) metaStrings.removeFirst(); // Since metadata is a document, we just replace metadata here if(name == null) { metadata = metadata.getDefaultDocument(); } else { metadata = metadata.getDocument(name); thisKey = thisKey.pushMetaString(name); } return runMetadata(dm, recursionLevel, key, metaStrings, metadata, container, thisKey, dontEnterImplicitArchives); } else if(metadata.isArchiveManifest()) { container = ctx.archiveManager.makeHandler(thisKey, metadata.getArchiveType()); Bucket metadataBucket = container.getMetadata(archiveContext, ctx, dm, recursionLevel, true); try { metadata = Metadata.construct(metadataBucket); } catch (IOException e) { throw new FetchException(FetchException.BUCKET_ERROR); } return runMetadata(dm, recursionLevel+1, key, metaStrings, metadata, container, thisKey, dontEnterImplicitArchives); } else if(metadata.isArchiveInternalRedirect()) { if(container == null) throw new FetchException(FetchException.NOT_IN_ARCHIVE); else { /* Implicit archive handling: * Sooner or later we reach a SimpleFileRedirect to data, a Splitfile to data, * or an ArchiveInternalRedirect to data. * * In this case, if it is an archive type, if implicit archive handling is enabled, and if * we have more meta-strings, we can try to enter it. */ if((!dontEnterImplicitArchives) && ArchiveManager.isUsableArchiveType(dm.getMIMEType()) && (!metaStrings.isEmpty())) { // Possible implicit archive inside archive? container = ctx.archiveManager.makeHandler(thisKey, ArchiveManager.getArchiveType(dm.getMIMEType())); Bucket metadataBucket = container.getMetadata(archiveContext, ctx, dm, recursionLevel, true); try { metadata = Metadata.construct(metadataBucket); } catch (IOException e) { throw new FetchException(FetchException.BUCKET_ERROR); } return runMetadata(dm, recursionLevel+1, key, metaStrings, metadata, container, thisKey, dontEnterImplicitArchives); } Bucket result = container.get(metadata.getZIPInternalName(), archiveContext, ctx, dm, recursionLevel, true); dm.mergeNoOverwrite(metadata.getClientMetadata()); return new FetchResult(dm, result); } } else if(metadata.isMultiLevelMetadata()) { // Doesn't have to be a splitfile; could be from a ZIP or a plain file. metadata.setSimpleRedirect(); FetchResult res = runMetadata(dm, recursionLevel, key, metaStrings, metadata, container, thisKey, true); try { metadata = Metadata.construct(res.data); } catch (IOException e) { throw new FetchException(FetchException.BUCKET_ERROR); } return runMetadata(dm, recursionLevel, key, metaStrings, metadata, container, thisKey, dontEnterImplicitArchives); } else if(metadata.isSingleFileRedirect()) { FreenetURI uri = metadata.getSingleTarget(); dm.mergeNoOverwrite(metadata.getClientMetadata()); if((!dontEnterImplicitArchives) && ArchiveManager.isUsableArchiveType(dm.getMIMEType()) && (!metaStrings.isEmpty())) { ClientKey target; try { target = ClientKey.getBaseKey(uri); } catch (MalformedURLException e1) { throw new FetchException(FetchException.INVALID_URI, "Invalid URI: "+uri); } if(!(target.isMetadata())) { // Target *is not* metadata. // Therefore target is a usable archive. // We might not have to fetch it. container = ctx.archiveManager.makeHandler(uri, ArchiveManager.getArchiveType(dm.getMIMEType())); Bucket metadataBucket = container.getMetadata(archiveContext, ctx, dm, recursionLevel, true); try { metadata = Metadata.construct(metadataBucket); } catch (IOException e) { throw new FetchException(FetchException.BUCKET_ERROR); } return runMetadata(dm, recursionLevel+1, key, metaStrings, metadata, container, thisKey, dontEnterImplicitArchives); } } FetchResult fr = realRun(dm, recursionLevel, uri, dontEnterImplicitArchives); if(metadata.compressed) { Compressor codec = Compressor.getCompressionAlgorithmByMetadataID(metadata.compressionCodec); Bucket data = fr.data; Bucket output; try { long maxLen = ctx.maxTempLength; if(maxLen < 0) maxLen = Long.MAX_VALUE; output = codec.decompress(data, ctx.bucketFactory, maxLen); } catch (IOException e) { throw new FetchException(FetchException.BUCKET_ERROR, e); } catch (CompressionOutputSizeException e) { throw new FetchException(FetchException.TOO_BIG); } return new FetchResult(fr, output); } return fr; } else if(metadata.isSplitfile()) { // Straight data splitfile. // Might be used by parents for something else, in which case they will set dontEnterImplicitArchives. dm.mergeNoOverwrite(metadata.getClientMetadata()); // even splitfiles can have mime types! if((!dontEnterImplicitArchives) && ArchiveManager.isUsableArchiveType(dm.getMIMEType()) && (!metaStrings.isEmpty())) { // We know target is not metadata. container = ctx.archiveManager.makeHandler(thisKey, ArchiveManager.getArchiveType(dm.getMIMEType())); Bucket metadataBucket = container.getMetadata(archiveContext, ctx, dm, recursionLevel, true); try { metadata = Metadata.construct(metadataBucket); } catch (IOException e) { throw new FetchException(FetchException.BUCKET_ERROR, e); } return runMetadata(dm, recursionLevel+1, key, metaStrings, metadata, container, thisKey, dontEnterImplicitArchives); } FetcherContext newCtx; if(metadata.splitUseLengths) newCtx = new FetcherContext(ctx, FetcherContext.SPLITFILE_USE_LENGTHS_MASK); else newCtx = new FetcherContext(ctx, FetcherContext.SPLITFILE_DEFAULT_MASK); SplitFetcher sf = new SplitFetcher(metadata, archiveContext, newCtx, recursionLevel); Bucket sfResult = sf.fetch(); // will throw in event of error if(metadata.compressed) { Compressor codec = Compressor.getCompressionAlgorithmByMetadataID(metadata.compressionCodec); try { long maxLen = ctx.maxTempLength; if(maxLen < 0) maxLen = Long.MAX_VALUE; sfResult = codec.decompress(sfResult, ctx.bucketFactory, maxLen); } catch (IOException e) { throw new FetchException(FetchException.BUCKET_ERROR, e); } catch (CompressionOutputSizeException e) { throw new FetchException(FetchException.TOO_BIG); } } return new FetchResult(dm, sfResult); } else { Logger.error(this, "Don't know what to do with metadata: "+metadata); throw new FetchException(FetchException.UNKNOWN_METADATA); } }
56348 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56348/308b196ee77f38c4a2c6b11b7182c054b6b5e3e6/Fetcher.java/buggy/src/freenet/client/Fetcher.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 8065, 1253, 1086, 2277, 12, 1227, 2277, 9113, 16, 509, 13917, 2355, 16, 2445, 653, 498, 16, 10688, 2191, 7957, 16, 1875, 202, 2277, 1982, 16, 13124, 1503, 1478, 16, 478, 2842, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8065, 1253, 1086, 2277, 12, 1227, 2277, 9113, 16, 509, 13917, 2355, 16, 2445, 653, 498, 16, 10688, 2191, 7957, 16, 1875, 202, 2277, 1982, 16, 13124, 1503, 1478, 16, 478, 2842, ...
if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(62, 63); break; case 64: if ((0x280000000000L & l) != 0L) jjCheckNAdd(65);
if ((0x3ff000000000000L & l) == 0L) break; if (kind > 7) kind = 7; jjCheckNAddTwoStates(62, 10); break; case 63: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(63, 64);
private final int jjMoveNfa_0(int startState, int curPos){ int[] nextStates; int startsAt = 0; jjnewStateCnt = 70; 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 > 4) kind = 4; jjCheckNAddStates(0, 8); } else if ((0x100003600L & l) != 0L) { if (kind > 1) kind = 1; } else if (curChar == 45) jjCheckNAddStates(9, 14); else if (curChar == 37) jjCheckNAddStates(15, 18); else if (curChar == 47) jjstateSet[jjnewStateCnt++] = 25; else if (curChar == 36) { if (kind > 10) kind = 10; jjCheckNAdd(21); } else if (curChar == 40) jjCheckNAddStates(19, 21); else if (curChar == 46) jjCheckNAdd(6); if (curChar == 47) jjstateSet[jjnewStateCnt++] = 23; else if (curChar == 48) jjstateSet[jjnewStateCnt++] = 2; break; case 1: if (curChar == 48) jjstateSet[jjnewStateCnt++] = 2; break; case 3: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 4) kind = 4; jjCheckNAddTwoStates(3, 4); break; case 5: if (curChar == 46) jjCheckNAdd(6); break; case 6: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 7) kind = 7; jjCheckNAddStates(22, 24); break; case 8: if ((0x280000000000L & l) != 0L) jjCheckNAdd(9); break; case 9: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 7) kind = 7; jjCheckNAddTwoStates(9, 10); break; case 11: if (curChar == 40) jjCheckNAddStates(19, 21); break; case 12: if ((0xfffffdffffffdbffL & l) != 0L) jjCheckNAddStates(19, 21); break; case 14: if ((0x28000000400L & l) != 0L) jjCheckNAddStates(19, 21); break; case 15: if (curChar == 41 && kind > 9) kind = 9; break; case 16: if ((0xff000000000000L & l) != 0L) jjCheckNAddStates(25, 28); break; case 17: if ((0xff000000000000L & l) != 0L) jjCheckNAddStates(19, 21); break; case 18: if ((0xf000000000000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 19; break; case 19: if ((0xff000000000000L & l) != 0L) jjCheckNAdd(17); break; case 20: if (curChar != 36) break; if (kind > 10) kind = 10; jjCheckNAdd(21); break; case 21: if ((0x3ff601000000000L & l) == 0L) break; if (kind > 10) kind = 10; jjCheckNAdd(21); break; case 22: if (curChar == 47) jjstateSet[jjnewStateCnt++] = 23; break; case 23: if (curChar != 36) break; if (kind > 11) kind = 11; jjCheckNAdd(24); break; case 24: if ((0x3ff601000000000L & l) == 0L) break; if (kind > 11) kind = 11; jjCheckNAdd(24); break; case 25: if (curChar == 47) jjstateSet[jjnewStateCnt++] = 26; break; case 26: if (curChar != 36) break; if (kind > 12) kind = 12; jjCheckNAdd(27); break; case 27: if ((0x3ff601000000000L & l) == 0L) break; if (kind > 12) kind = 12; jjCheckNAdd(27); break; case 28: if (curChar == 47) jjstateSet[jjnewStateCnt++] = 25; break; case 29: if (curChar == 37) jjCheckNAddStates(15, 18); break; case 30: if ((0xfffffffffffffbffL & l) != 0L) jjCheckNAddTwoStates(30, 31); break; case 31: if (curChar == 10 && kind > 2) kind = 2; break; case 32: if ((0xffffffffffffdfffL & l) != 0L) jjCheckNAddTwoStates(32, 33); break; case 33: if (curChar == 13 && kind > 3) kind = 3; break; case 34: if (curChar == 45) jjCheckNAddStates(9, 14); break; case 35: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 4) kind = 4; jjCheckNAddTwoStates(35, 4); break; case 36: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(36, 37); break; case 37: if (curChar != 46) break; if (kind > 7) kind = 7; jjCheckNAddStates(29, 31); break; case 38: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 7) kind = 7; jjCheckNAddStates(29, 31); break; case 40: if ((0x280000000000L & l) != 0L) jjCheckNAdd(41); break; case 41: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 7) kind = 7; jjCheckNAddTwoStates(41, 10); break; case 42: if (curChar == 46) jjCheckNAdd(43); break; case 43: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 7) kind = 7; jjCheckNAddStates(32, 34); break; case 45: if ((0x280000000000L & l) != 0L) jjCheckNAdd(46); break; case 46: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 7) kind = 7; jjCheckNAddTwoStates(46, 10); break; case 47: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(47, 48); break; case 49: if ((0x280000000000L & l) != 0L) jjCheckNAdd(50); break; case 50: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 7) kind = 7; jjCheckNAddTwoStates(50, 10); break; case 51: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddStates(35, 37); break; case 53: if ((0x280000000000L & l) != 0L) jjCheckNAdd(54); break; case 54: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(54, 10); break; case 55: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 4) kind = 4; jjCheckNAddStates(0, 8); break; case 56: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(56, 57); break; case 57: if (curChar != 46) break; if (kind > 7) kind = 7; jjCheckNAddStates(38, 40); break; case 58: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 7) kind = 7; jjCheckNAddStates(38, 40); break; case 60: if ((0x280000000000L & l) != 0L) jjCheckNAdd(61); break; case 61: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 7) kind = 7; jjCheckNAddTwoStates(61, 10); break; case 62: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(62, 63); break; case 64: if ((0x280000000000L & l) != 0L) jjCheckNAdd(65); break; case 65: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 7) kind = 7; jjCheckNAddTwoStates(65, 10); break; case 66: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddStates(41, 43); break; case 68: if ((0x280000000000L & l) != 0L) jjCheckNAdd(69); break; case 69: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(69, 10); break; default : break; } } while(i != startsAt); } else if (curChar < 128) { long l = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 0: case 21: if ((0x7fffffe87fffffeL & l) == 0L) break; if (kind > 10) kind = 10; jjCheckNAdd(21); break; case 2: if ((0x100000001000000L & l) != 0L) jjCheckNAdd(3); break; case 3: if ((0x7e0000007eL & l) == 0L) break; if (kind > 4) kind = 4; jjCheckNAddTwoStates(3, 4); break; case 4: if ((0x100000001000L & l) != 0L && kind > 4) kind = 4; break; case 7: if ((0x2000000020L & l) != 0L) jjAddStates(44, 45); break; case 10: if ((0x5000000050L & l) != 0L && kind > 7) kind = 7; break; case 12: if ((0xffffffffefffffffL & l) != 0L) jjCheckNAddStates(19, 21); break; case 13: if (curChar == 92) jjAddStates(46, 48); break; case 14: if ((0x14404410000000L & l) != 0L) jjCheckNAddStates(19, 21); break; case 23: case 24: if ((0x7fffffe87fffffeL & l) == 0L) break; if (kind > 11) kind = 11; jjCheckNAdd(24); break; case 26: case 27: if ((0x7fffffe87fffffeL & l) == 0L) break; if (kind > 12) kind = 12; jjCheckNAdd(27); break; case 30: jjAddStates(49, 50); break; case 32: jjAddStates(51, 52); break; case 39: if ((0x2000000020L & l) != 0L) jjAddStates(53, 54); break; case 44: if ((0x2000000020L & l) != 0L) jjAddStates(55, 56); break; case 48: if ((0x2000000020L & l) != 0L) jjAddStates(57, 58); break; case 52: if ((0x2000000020L & l) != 0L) jjAddStates(59, 60); break; case 59: if ((0x2000000020L & l) != 0L) jjAddStates(61, 62); break; case 63: if ((0x2000000020L & l) != 0L) jjAddStates(63, 64); break; case 67: if ((0x2000000020L & l) != 0L) jjAddStates(65, 66); 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: case 21: if (!jjCanMove_1(hiByte, i1, i2, l1, l2)) break; if (kind > 10) kind = 10; jjCheckNAdd(21); break; case 12: if (jjCanMove_0(hiByte, i1, i2, l1, l2)) jjAddStates(19, 21); break; case 23: case 24: if (!jjCanMove_1(hiByte, i1, i2, l1, l2)) break; if (kind > 11) kind = 11; jjCheckNAdd(24); break; case 26: case 27: if (!jjCanMove_1(hiByte, i1, i2, l1, l2)) break; if (kind > 12) kind = 12; jjCheckNAdd(27); break; case 30: if (jjCanMove_0(hiByte, i1, i2, l1, l2)) jjAddStates(49, 50); break; case 32: if (jjCanMove_0(hiByte, i1, i2, l1, l2)) jjAddStates(51, 52); break; default : break; } } while(i != startsAt); } if (kind != 0x7fffffff) { jjmatchedKind = kind; jjmatchedPos = curPos; kind = 0x7fffffff; } ++curPos; if ((i = jjnewStateCnt) == (startsAt = 70 - (jjnewStateCnt = startsAt))) return curPos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return curPos; } }}
4174 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4174/3c314818d71d25f7c37e4f26642c8ef894a7fcd4/PAParserTokenManager.java/clean/src/com/lowagie/text/pdf/codec/postscript/PAParserTokenManager.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,...
declaration = createVariable( parentElement, currentDeclarator.getName().toString() );
declaration = createVariable( parentElement, declaratorName );
public void createElements() { // creates the appropriate C Elements List declaratorList = getDeclarators(); Declarator [] declarators = (Declarator []) declaratorList.toArray( new Declarator[ declaratorList.size() ] ); CElement parentElement = getParent(); for( int i = 0; i < declarators.length; ++i ) { Declarator currentDeclarator = declarators[i]; CElement declaration = null; // instantiate the right element List clause =currentDeclarator.getParameterDeclarationClause(); if( clause == null && !isTypedef()) { // TODO - this was to get rid of the NULL pointer we've been seeing if (currentDeclarator.getName() == null) return; // this is an attribute or a varaible if( parentElement instanceof IStructure ) { declaration = createField( parentElement, currentDeclarator.getName().toString() ); } else if( parentElement instanceof ITranslationUnit ) { if(isExtern()) { declaration = createVariableDeclaration( parentElement, currentDeclarator.getName().toString() ); } else { declaration = createVariable( parentElement, currentDeclarator.getName().toString() ); } } } else if( isTypedef() ) { // do nothing just yet //TODO : update this -- typedefs do not have a parameterdeclarationclause } else { Parameter [] parameters = (Parameter []) clause.toArray( new Parameter[ clause.size() ]); // this is a function or a method if( parentElement instanceof IStructure ) { declaration = createMethodDeclaration( parentElement, currentDeclarator.getName().toString(), parameters ); } else if( parentElement instanceof ITranslationUnit ) { if (isFunctionDefinition()) { // if it belongs to a class, then create a method // else create a function // this will not be known until we have cross reference information declaration = createFunction( parentElement, currentDeclarator.getName().toString(), parameters ); } else { declaration = createFunctionDeclaration( parentElement, currentDeclarator.getName().toString(), parameters ); } } } // hook up the offsets declaration.setIdPos( currentDeclarator.getName().getStartOffset(), currentDeclarator.getName().toString().length()); declaration.setPos( currentDeclarator.getName().getStartOffset(), currentDeclarator.getName().toString().length() ); // add to parent parentElement.addChild( declaration ); } }
54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/aacea7223cbaa112b8e930fd2f33739b1da73851/SimpleDeclarationWrapper.java/buggy/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/model/SimpleDeclarationWrapper.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 752, 3471, 1435, 202, 95, 202, 202, 759, 3414, 326, 5505, 385, 17219, 3196, 202, 682, 3496, 5880, 682, 273, 9072, 297, 3062, 5621, 202, 202, 31419, 5378, 3496, 297, 3062, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 752, 3471, 1435, 202, 95, 202, 202, 759, 3414, 326, 5505, 385, 17219, 3196, 202, 682, 3496, 5880, 682, 273, 9072, 297, 3062, 5621, 202, 202, 31419, 5378, 3496, 297, 3062, ...
if(!dir.exists()) { dir.mkdir();
if(!tmpDir.exists()) { tmpDir.mkdir();
public FilenameGenerator(RandomSource random, boolean wipeFiles, File dir, String prefix) throws IOException { this.random = random; this.prefix = prefix; if (dir == null) tmpDir = new File(System.getProperty("java.io.tmpdir")); else tmpDir = dir; if(!dir.exists()) { dir.mkdir(); } if(!(tmpDir.isDirectory() && tmpDir.canRead() && tmpDir.canWrite())) throw new IOException("Not a directory or cannot read/write: "+tmpDir); if(wipeFiles) { File[] filenames = tmpDir.listFiles(); if(filenames != null) { for(int i=0;i<filenames.length;i++) { File f = filenames[i]; String name = f.getName(); if((File.separatorChar == '\\' && name.toLowerCase().startsWith(prefix.toLowerCase()) || name.startsWith(prefix))) { f.delete(); } } } } }
51834 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51834/3175efee7104e8dc04680cf36febcfbe13f79918/FilenameGenerator.java/buggy/src/freenet/support/io/FilenameGenerator.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 16671, 3908, 12, 8529, 1830, 2744, 16, 1250, 341, 3151, 2697, 16, 1387, 1577, 16, 514, 1633, 13, 1216, 1860, 288, 202, 202, 2211, 18, 9188, 273, 2744, 31, 202, 202, 2211, 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, 16671, 3908, 12, 8529, 1830, 2744, 16, 1250, 341, 3151, 2697, 16, 1387, 1577, 16, 514, 1633, 13, 1216, 1860, 288, 202, 202, 2211, 18, 9188, 273, 2744, 31, 202, 202, 2211, 18, ...
static void paintInline(Context c, InlineBox ib, int lx, int ly, LineBox line) {
static void paintInline(Context c, InlineBox ib, int lx, int ly, LineBox line, int blockLineHeight, LineMetrics blockLineMetrics) {
static void paintInline(Context c, InlineBox ib, int lx, int ly, LineBox line) { if (ib.floated) { paintFloat(c, ib); debugInlines(c, ib, lx, ly); return; } // Uu.p("paintInline: " + inline); if (ib instanceof InlineBlockBox) { paintReplaced(c, ib, line); debugInlines(c, ib, lx, ly); return; } InlineTextBox inline = (InlineTextBox) ib; if (inline.pushstyles != null) { for (Iterator i = inline.pushstyles.iterator(); i.hasNext();) { StylePush sp = (StylePush) i.next(); c.pushStyle(c.getCss().getCascadedStyle(sp.getElement())); /*if (inline.hover) { CascadedStyle hs = c.getCss().getPseudoElementStyle(sp.getElement(), "hover"); if (hs != null) c.pushStyle(hs); }*/ //Now we know that an inline element started here, handle borders and such? Relative.translateRelative(c); //TODO: push to current border-list (and paint left edge) //HACK: this might do for now - tobe 2004-12-27 paintPadding(c, line, inline); } } c.updateSelection(inline); // calculate the Xx and y relative to the baseline of the line (ly) and the // left edge of the line (lx) int iy = ly + inline.y; int ix = lx + inline.x; // account for padding // Uu.p("adjusted inline by: " + inline.totalLeftPadding()); // Uu.p("inline = " + inline); // Uu.p("padding = " + inline.padding); //ix += inline.totalLeftPadding(c.getCurrentStyle()); paintSelection(c, inline, lx, ly); paintText(c, lx, ly, ix, iy, inline); debugInlines(c, inline, lx, ly); if (inline.popstyles != null) { for (Iterator i = inline.popstyles.iterator(); i.hasNext();) { StylePop sp = (StylePop) i.next(); //TODO: paint right edge and pop current border-list Relative.untranslateRelative(c); /*if (inline.hover) { CascadedStyle hs = c.getCss().getPseudoElementStyle(sp.getElement(), "hover"); if (hs != null) c.popStyle(); } */ c.popStyle(); } } }
53937 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/53937/71b2cfce5b6554582e24848d6c3702480ac8ba6c/InlineRendering.java/clean/src/java/org/xhtmlrenderer/render/InlineRendering.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 760, 918, 12574, 10870, 12, 1042, 276, 16, 16355, 3514, 9834, 16, 509, 15855, 16, 509, 18519, 16, 5377, 3514, 980, 16, 509, 1203, 1670, 2686, 16, 5377, 5653, 1203, 1670, 5653, 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, 760, 918, 12574, 10870, 12, 1042, 276, 16, 16355, 3514, 9834, 16, 509, 15855, 16, 509, 18519, 16, 5377, 3514, 980, 16, 509, 1203, 1670, 2686, 16, 5377, 5653, 1203, 1670, 5653, 13, 288, ...
public static Test suite( ) { TestSuite suite = new TestSuite( "Test for org.eclipse.birt.report.designer.ui" ); //$JUnit-BEGIN$ suite.addTest( new TestSuite( SimpleUITest.class ) ); suite.addTest( new TestSuite( ReportPlatformUIImagesTest.class ) ); suite.addTest( new TestSuite( DNDUtilTest.class ) ); //Remove unit test which server can't run successfully// suite.addTest( new TestSuite( InsertInLayoutUtilTest.class ) ); suite.addTest( org.eclipse.birt.report.designer.ui.extensions.AllTests.suite( ) ); suite.addTest( org.eclipse.birt.report.designer.internal.ui.palette.AllTests.suite( ) ); //suite.addTest( // org.eclipse.birt.report.designer.internal.ui.views.attributes.page.AllTests.suite( // ) ); suite.addTest( org.eclipse.birt.report.designer.ui.views.attributes.AllTests.suite( ) ); //$JUnit-END$ return suite; }
5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/27ce8f04fa85bce1d8681985d8f23a7239c74750/AllUITests.java/clean/UI/org.eclipse.birt.report.designer.tests/test/org/eclipse/birt/report/designer/ui/AllUITests.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 760, 7766, 11371, 12, 262, 202, 95, 202, 202, 4709, 13587, 11371, 273, 394, 7766, 13587, 12, 315, 4709, 364, 2358, 18, 20416, 18, 70, 2714, 18, 6006, 18, 16934, 264, 18, 4881,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 760, 7766, 11371, 12, 262, 202, 95, 202, 202, 4709, 13587, 11371, 273, 394, 7766, 13587, 12, 315, 4709, 364, 2358, 18, 20416, 18, 70, 2714, 18, 6006, 18, 16934, 264, 18, 4881,...
System.err.println("Malformed URI: "+key+" : "+e2);
System.out.println("Malformed URI: "+key+" : "+e2);
private void processLine(BufferedReader reader) { String line; try { line = reader.readLine(); } catch (IOException e) { System.err.println("Bye... ("+e+")"); return; } if(line == null) line = "QUIT"; if(line.startsWith("GET:")) { // Should have a key next String key = line.substring("GET:".length()); while(key.length() > 0 && key.charAt(0) == ' ') key = key.substring(1); while(key.length() > 0 && key.charAt(key.length()-1) == ' ') key = key.substring(0, key.length()-2); Logger.normal(this, "Key: "+key); FreenetURI uri; ClientCHK chk; try { uri = new FreenetURI(key); chk = new ClientCHK(uri); } catch (MalformedURLException e2) { System.err.println("Malformed URI: "+key+" : "+e2); return; } CHKBlock block; // Fetch, possibly from other node. block = n.getCHK(chk); if(block == null) { System.out.println("Not found in store: "+chk.getURI()); } else { // Decode it byte[] decoded; try { decoded = block.decode(chk); } catch (CHKDecodeException e) { Logger.error(this, "Cannot decode: "+e, e); System.out.println("Cannot decode: "+e.getMessage()); return; } System.out.println("Decoded data:\n"); System.out.println(new String(decoded)); } } else if(line.startsWith("GETFILE:")) { // Should have a key next String key = line.substring("GETFILE:".length()); while(key.length() > 0 && key.charAt(0) == ' ') key = key.substring(1); while(key.length() > 0 && key.charAt(key.length()-1) == ' ') key = key.substring(0, key.length()-2); Logger.normal(this, "Key: "+key); FreenetURI uri; ClientCHK chk; try { uri = new FreenetURI(key); chk = new ClientCHK(uri); } catch (MalformedURLException e2) { System.err.println("Malformed URI: "+key+" : "+e2); return; } CHKBlock block; // Fetch, possibly from other node. block = n.getCHK(chk); if(block == null) { System.out.println("Not found in store: "+chk.getURI()); } else { // Decode it byte[] decoded; try { decoded = block.decode(chk); } catch (CHKDecodeException e) { Logger.error(this, "Cannot decode: "+e, e); System.out.println("Cannot decode: "+e.getMessage()); return; } // Now calculate filename String fnam = uri.getDocName(); fnam = sanitize(fnam); if(fnam.length() == 0) { fnam = "freenet-download-"+System.currentTimeMillis(); } if(new File(fnam).exists()) { System.out.println("File exists already: "+fnam); fnam = "freenet-"+System.currentTimeMillis()+"-"+fnam; } FileOutputStream fos = null; try { fos = new FileOutputStream(fnam); fos.write(decoded); fos.close(); System.out.println("Written to "+fnam); } catch (IOException e) { System.out.println("Could not write file: caught "+e); e.printStackTrace(); } finally { if(fos != null) try { fos.close(); } catch (IOException e1) { // Ignore } } } } else if(line.startsWith("QUIT")) { System.out.println("Goodbye."); System.exit(0); } else if(line.startsWith("PUT:")) { // Just insert to local store line = line.substring("PUT:".length()); while(line.length() > 0 && line.charAt(0) == ' ') line = line.substring(1); while(line.length() > 0 && line.charAt(line.length()-1) == ' ') line = line.substring(0, line.length()-2); String content; if(line.length() > 0) { // Single line insert content = line; } else { // Multiple line insert StringBuffer sb = new StringBuffer(1000); while(true) { try { line = reader.readLine(); } catch (IOException e1) { System.err.println("Bye... ("+e1+")"); return; } if(line.equals(".")) break; sb.append(line).append('\n'); } content = sb.toString(); } // Insert byte[] data = content.getBytes(); ClientCHKBlock block; try { block = ClientCHKBlock.encode(data); } catch (CHKEncodeException e) { Logger.error(this, "Couldn't encode: "+e, e); return; } ClientCHK chk = block.getClientKey(); FreenetURI uri = chk.getURI(); n.putCHK(block); // Definitely interface System.out.println("URI: "+uri); } else if(line.startsWith("PUTFILE:")) { // Just insert to local store line = line.substring("PUTFILE:".length()); while(line.length() > 0 && line.charAt(0) == ' ') line = line.substring(1); while(line.length() > 0 && line.charAt(line.length()-1) == ' ') line = line.substring(0, line.length()-2); File f = new File(line); System.out.println("Attempting to read file "+line); try { FileInputStream fis = new FileInputStream(line); DataInputStream dis = new DataInputStream(fis); int length = (int)f.length(); byte[] data = new byte[length]; dis.readFully(data); dis.close(); System.out.println("Inserting..."); ClientCHKBlock block; try { block = ClientCHKBlock.encode(data); } catch (CHKEncodeException e) { System.out.println("Couldn't encode: "+e.getMessage()); Logger.error(this, "Couldn't encode: "+e, e); return; } ClientCHK chk = block.getClientKey(); FreenetURI uri = chk.getURI(); uri = uri.setDocName(f.getName()); n.putCHK(block); System.out.println("URI: "+uri); } catch (FileNotFoundException e1) { System.out.println("File not found"); } catch (IOException e) { System.out.println("Could not read: "+e); e.printStackTrace(); } catch (Throwable t) { System.out.println("Threw: "+t); t.printStackTrace(); } } else if(line.startsWith("STATUS")) { System.out.println(n.getStatus()); } else { } }
50653 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50653/d69dceaa72feee5ece14b8de951841aa9b614188/TextModeClientInterface.java/clean/src/freenet/node/TextModeClientInterface.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 1207, 1670, 12, 17947, 2514, 2949, 13, 288, 3639, 514, 980, 31, 3639, 775, 288, 5411, 980, 273, 2949, 18, 896, 1670, 5621, 3639, 289, 1044, 261, 14106, 425, 13, 288, 5411, 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, 3238, 918, 1207, 1670, 12, 17947, 2514, 2949, 13, 288, 3639, 514, 980, 31, 3639, 775, 288, 5411, 980, 273, 2949, 18, 896, 1670, 5621, 3639, 289, 1044, 261, 14106, 425, 13, 288, 5411, 23...
StructureModelManager.INSTANCE.fireModelUpdated();
StructureModelManager.getDefault().fireModelUpdated();
public void compileFinished(String buildConfig, int buildTime, boolean succeeded, boolean warnings) { String configFilePath = projectProperties.getDefaultBuildConfigFile(); if (!succeeded) { StructureModelManager.INSTANCE.fireModelUpdated(); } }
53148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/53148/bbd832b4800bc0d7c54d65b2d9d690316e97c6a6/Ajde.java/clean/ajde/src/org/aspectj/ajde/Ajde.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 540, 1071, 918, 4074, 10577, 12, 780, 1361, 809, 16, 509, 1361, 950, 16, 1250, 15784, 16, 1250, 5599, 13, 288, 1850, 202, 780, 642, 5598, 273, 1984, 2297, 18, 588, 1868, 3116, 13705, 5621, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 540, 1071, 918, 4074, 10577, 12, 780, 1361, 809, 16, 509, 1361, 950, 16, 1250, 15784, 16, 1250, 5599, 13, 288, 1850, 202, 780, 642, 5598, 273, 1984, 2297, 18, 588, 1868, 3116, 13705, 5621, 5...
public void setField(StringField field) { if (field.getValue() == null) { throw new NullPointerException("Null field values are not allowed."); } fields.put(new Integer(field.getField()), field); }
6791 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6791/ed98aa4c43f995af0db9d3ab676beb630d753e59/FieldMap.java/buggy/src/quickfix/FieldMap.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1071, 6459, 542, 974, 12, 780, 974, 1518, 15329, 430, 12, 1518, 18, 24805, 1435, 631, 2011, 15329, 12849, 2704, 2041, 9992, 2932, 2041, 1518, 2372, 834, 902, 8151, 1199, 1769, 97, 2821, 18, 45...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1071, 6459, 542, 974, 12, 780, 974, 1518, 15329, 430, 12, 1518, 18, 24805, 1435, 631, 2011, 15329, 12849, 2704, 2041, 9992, 2932, 2041, 1518, 2372, 834, 902, 8151, 1199, 1769, 97, 2821, 18, 45...
(new Integer(type)));
(new Integer(type)).toString());
private Attributes createAttributes( String agent, int type, long incarnation, long moveId, int status) { Attributes ats = new BasicAttributes(); ats.put( TopologyNamingConstants.AGENT_ATTR, agent); ats.put( TopologyNamingConstants.NODE_ATTR, localnode); ats.put( TopologyNamingConstants.HOST_ATTR, localhost); ats.put( TopologyNamingConstants.SITE_ATTR, localsite); ats.put( TopologyNamingConstants.ENCLAVE_ATTR, localenclave); ats.put( TopologyNamingConstants.INCARNATION_ATTR, (new Long(incarnation))); ats.put( TopologyNamingConstants.MOVE_ID_ATTR, (new Long(moveId))); ats.put( TopologyNamingConstants.TYPE_ATTR, (new Integer(type))); ats.put( TopologyNamingConstants.STATUS_ATTR, (new Integer(status))); return ats; }
7981 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7981/d84c2a84844d39009fd88d40cdba7d6f29b9209a/TopologyWriterServiceComponent.java/buggy/core/src/org/cougaar/core/topology/TopologyWriterServiceComponent.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 4202, 3238, 9055, 752, 2498, 12, 1850, 514, 4040, 16, 1850, 509, 618, 16, 1850, 1525, 7290, 1303, 367, 16, 1850, 1525, 3635, 548, 16, 1850, 509, 1267, 13, 288, 3639, 9055, 622, 87, 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, 4202, 3238, 9055, 752, 2498, 12, 1850, 514, 4040, 16, 1850, 509, 618, 16, 1850, 1525, 7290, 1303, 367, 16, 1850, 1525, 3635, 548, 16, 1850, 509, 1267, 13, 288, 3639, 9055, 622, 87, 273, 394,...
if(currentGrailsProp.isManyToMany()) { throw new MappingException("Many-to-many relationships are currently not supported by Grails, but one found: " + currentGrailsProp.getName()); }
protected static void createClassProperties(GrailsDomainClass domainClass, PersistentClass persistentClass, Mappings mappings) { GrailsDomainClassProperty[] persistantProperties = domainClass.getPersistantProperties(); Table table = persistentClass.getTable(); for(int i = 0; i < persistantProperties.length;i++) { GrailsDomainClassProperty currentGrailsProp = persistantProperties[i]; // if its inherited skip if(currentGrailsProp.isInherited()) continue; // TODO: Implement support for many to many relationships if(currentGrailsProp.isManyToMany()) { throw new MappingException("Many-to-many relationships are currently not supported by Grails, but one found: " + currentGrailsProp.getName()); } /* if(currentGrailsProp.isManyToOne() && currentGrailsProp.isBidirectional() ) { GrailsDomainClassProperty otherSide = currentGrailsProp.getOtherSide(); if(otherSide.isOneToMany()) table = null; }*/ if(LOG.isDebugEnabled()) LOG.debug("[GrailsDomainBinder] Binding persistent property [" + currentGrailsProp.getName() + "]"); Value value = null; // see if its a collection type CollectionType collectionType = CollectionType.collectionTypeForClass( currentGrailsProp.getType() ); if(collectionType != null) { // create collection Collection collection = collectionType.create( currentGrailsProp, persistentClass, mappings ); mappings.addCollection(collection); value = collection; } // work out what type of relationship it is and bind value else if ( currentGrailsProp.isManyToOne() ) { if(LOG.isDebugEnabled()) LOG.debug("[GrailsDomainBinder] Binding property [" + currentGrailsProp.getName() + "] as ManyToOne"); value = new ManyToOne( table ); bindManyToOne( currentGrailsProp, (ManyToOne) value, mappings ); } else if ( currentGrailsProp.isOneToOne()) { if(LOG.isDebugEnabled()) LOG.debug("[GrailsDomainBinder] Binding property [" + currentGrailsProp.getName() + "] as OneToOne"); //value = new OneToOne( table, persistentClass ); //bindOneToOne( currentGrailsProp, (OneToOne)value, mappings ); value = new ManyToOne( table ); bindManyToOne( currentGrailsProp, (ManyToOne) value, mappings ); } else { if(LOG.isDebugEnabled()) LOG.debug("[GrailsDomainBinder] Binding property [" + currentGrailsProp.getName() + "] as SimpleValue"); value = new SimpleValue( table ); bindSimpleValue( persistantProperties[i], (SimpleValue) value, mappings ); } if(value != null) { Property property = createProperty( value, persistentClass, persistantProperties[i], mappings ); persistentClass.addProperty( property ); } } }
6460 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6460/6c47cbe485713fe8d2b500632651590033abed59/GrailsDomainBinder.java/clean/src/persistence/org/codehaus/groovy/grails/orm/hibernate/cfg/GrailsDomainBinder.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1117, 760, 918, 752, 797, 2297, 12, 14571, 14573, 3748, 797, 2461, 797, 16, 11049, 797, 9195, 797, 16, 1635, 4675, 7990, 13, 288, 9506, 202, 14571, 14573, 3748, 797, 1396, 8526, 3898...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 760, 918, 752, 797, 2297, 12, 14571, 14573, 3748, 797, 2461, 797, 16, 11049, 797, 9195, 797, 16, 1635, 4675, 7990, 13, 288, 9506, 202, 14571, 14573, 3748, 797, 1396, 8526, 3898...
} else { ChangeBuildingMove cbm = new ChangeBuildingMove(p, bTile, new BuildingTile(ruleNumber), stationOwner); this.moveReceiver.processMove(cbm); }
System.err.println("move done"); } else { ChangeBuildingMove cbm = new ChangeBuildingMove(p, bTile, new BuildingTile(ruleNumber), stationOwner); this.moveReceiver.processMove(cbm);
public void buildStation(Point p) { FreerailsTile oldTile = w.getTile(p.x, p.y); //Only build a station if there is track at the specified point. if (canBuiltStationHere(p)) { String cityName; String stationName; BuildingTile bTile = oldTile.getBuildingTile(); BuildingType bType = null; if (bTile != null) { bType = (BuildingType) w.get(KEY.BUILDING_TYPES, bTile.getType(), Player.AUTHORITATIVE); if (bTile == null || bType.getCategory() != BuildingType.CATEGORY_STATION) { //There isn't already a station here, we need to pick a name //and add an entry to the station list. CalcNearestCity cNC = new CalcNearestCity(w, p.x, p.y); cityName = cNC.findNearestCity(); VerifyStationName vSN = new VerifyStationName(w, cityName); stationName = vSN.getName(); if (stationName == null) { //there are no cities, this should never happen stationName = "Central Station"; } //check the terrain to see if we can build a station on it... Move m = AddStationMove.generateMove(w, stationName, p, stationOwner, ruleNumber); this.moveReceiver.processMove (transactionsGenerator.addTransactions(m)); } else { //Upgrade an existing station. ChangeBuildingMove cbm = new ChangeBuildingMove(p, bTile, new BuildingTile(ruleNumber), stationOwner); this.moveReceiver.processMove(cbm); } } } else { System.err.println( "Can't build station here"); } }
9170 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9170/378f60a114288d842f35f27c6f704ef9889f7dd7/StationBuilder.java/clean/railz/src/jfreerails/controller/StationBuilder.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1361, 16672, 12, 2148, 293, 13, 288, 3639, 478, 266, 264, 15208, 9337, 1592, 9337, 273, 341, 18, 588, 9337, 12, 84, 18, 92, 16, 293, 18, 93, 1769, 3639, 368, 3386, 1361, 27...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1361, 16672, 12, 2148, 293, 13, 288, 3639, 478, 266, 264, 15208, 9337, 1592, 9337, 273, 341, 18, 588, 9337, 12, 84, 18, 92, 16, 293, 18, 93, 1769, 3639, 368, 3386, 1361, 27...
valueList = ruby.getScope().getLocalValues();
valueList = null;
public RubyObject call(Ruby ruby, RubyObject recv, String id, RubyPointer args, boolean noSuper) { if (args == null) { args = new RubyPointer(); } CRefNode savedCref = null; // +++ = null; List valueList = null; ruby.getScope().push(); CRefNode lRefValue = getRefValue(); if (lRefValue != null) { savedCref = ruby.getCRef(); // s.a. ruby.setCRef(lRefValue); ruby.getRubyFrame().setCbase(lRefValue); } if (getTable() != null) { valueList = new ArrayList(Collections.nCopies(getTable().size(), ruby.getNil())); ruby.getScope().setLocalValues(valueList); ruby.getScope().setLocalNames(getTable()); } else { valueList = ruby.getScope().getLocalValues(); ruby.getScope().setLocalValues(null); ruby.getScope().setLocalNames(null); } Node callBody = getNextNode(); Node callNode = null; if (callBody.getType() == Constants.NODE_ARGS) { callNode = callBody; callBody = null; } else if (callBody.getType() == Constants.NODE_BLOCK) { callNode = callBody.getHeadNode(); callBody = callBody.getNextNode(); } RubyVarmap.push(ruby); // PUSH_TAG(PROT_FUNC); try { if (callNode != null) { //if (call_node.getType() != Constants.NODE_ARGS) { // rb_bug("no argument-node"); //} int i = callNode.getCount(); if (i > (args != null ? args.size() : 0)) { int size = 0; if (args != null) size = args.size(); throw new RubyArgumentException(ruby, getFile() + ":" + getLine() +"wrong # of arguments(" + size + " for " + i + ")"); } if (callNode.getRest() == -1) { int opt = i; Node optNode = callNode.getOptNode(); while (optNode != null) { opt++; optNode = optNode.getNextNode(); } if (opt < (args != null ? args.size() : 0)) { throw new RubyArgumentException(ruby, "wrong # of arguments(" + args.size() + " for " + opt + ")"); } // +++ ruby.getRubyFrame().setArgs(valueList != null ? new DelegateList(valueList, 2, valueList.size()) : null); // --- } if (valueList != null) { if (i > 0) { for (int j = 0; j < i; j++) { valueList.set(j + 2, args.get(j)); } } args.inc(i); if (callNode.getOptNode() != null) { Node optNode = callNode.getOptNode(); while (optNode != null && args.size() != 0) { ((AssignableNode) optNode.getHeadNode()).assign(ruby, recv, args.getRuby(0), true); args.inc(1); optNode = optNode.getNextNode(); } recv.eval(optNode); } if (callNode.getRest() >= 0) { RubyArray array = null; if (args.size() > 0) { array = RubyArray.newArray(ruby, args); } else { array = RubyArray.newArray(ruby, 0); } valueList.set(callNode.getRest(), array); } } } return recv.eval(callBody); } catch (ReturnException rExcptn) { // +++ jpetersen return ((RubyArray) rExcptn.getReturnValue()).pop(); // --- } finally { RubyVarmap.pop(ruby); ruby.getScope().pop(); if (savedCref != null) { ruby.setCRef(savedCref); } } }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/2f13ba47385b7584839c7f6f6f1abfee251cbe53/ScopeNode.java/clean/org/jruby/nodes/ScopeNode.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 19817, 921, 745, 12, 54, 10340, 22155, 16, 19817, 921, 10665, 16, 514, 612, 16, 19817, 4926, 833, 16, 1250, 1158, 8051, 13, 288, 202, 202, 430, 261, 1968, 422, 446, 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, 225, 202, 482, 19817, 921, 745, 12, 54, 10340, 22155, 16, 19817, 921, 10665, 16, 514, 612, 16, 19817, 4926, 833, 16, 1250, 1158, 8051, 13, 288, 202, 202, 430, 261, 1968, 422, 446, 13, 288, ...
if (foundRule) { tuple[2] = rs.getBytes(2); tuple[6] = rs.getBytes(1);
if(foundRule) tuples.addElement(tuple);
private java.sql.ResultSet getImportedExportedKeys(String catalog, String schema, String primaryTable, String foreignTable) throws SQLException { Field f[] = new Field[14]; f[0] = new Field(connection, "PKTABLE_CAT", iVarcharOid, 32); f[1] = new Field(connection, "PKTABLE_SCHEM", iVarcharOid, 32); f[2] = new Field(connection, "PKTABLE_NAME", iVarcharOid, 32); f[3] = new Field(connection, "PKCOLUMN_NAME", iVarcharOid, 32); f[4] = new Field(connection, "FKTABLE_CAT", iVarcharOid, 32); f[5] = new Field(connection, "FKTABLE_SCHEM", iVarcharOid, 32); f[6] = new Field(connection, "FKTABLE_NAME", iVarcharOid, 32); f[7] = new Field(connection, "FKCOLUMN_NAME", iVarcharOid, 32); f[8] = new Field(connection, "KEY_SEQ", iInt2Oid, 2); f[9] = new Field(connection, "UPDATE_RULE", iInt2Oid, 2); f[10] = new Field(connection, "DELETE_RULE", iInt2Oid, 2); f[11] = new Field(connection, "FK_NAME", iVarcharOid, 32); f[12] = new Field(connection, "PK_NAME", iVarcharOid, 32); f[13] = new Field(connection, "DEFERRABILITY", iInt2Oid, 2); java.sql.ResultSet rs = connection.ExecSQL("SELECT c.relname,c2.relname," + "t.tgconstrname,ic.relname," + "t.tgdeferrable,t.tginitdeferred," + "t.tgnargs,t.tgargs,p.proname " + "FROM pg_trigger t,pg_class c,pg_class c2," + "pg_class ic,pg_proc p, pg_index i " + "WHERE t.tgrelid=c.oid AND t.tgconstrrelid=c2.oid " + "AND t.tgfoid=p.oid AND tgisconstraint " + ((primaryTable != null) ? "AND c2.relname='" + primaryTable + "' " : "") + ((foreignTable != null) ? "AND c.relname='" + foreignTable + "' " : "") + "AND i.indrelid=c.oid " + "AND i.indexrelid=ic.oid AND i.indisprimary " + "ORDER BY c.relname,c2.relname" ); Vector tuples = new Vector(); short seq = 0; if (rs.next()) { boolean hasMore; do { byte tuple[][] = new byte[14][0]; for (int k = 0;k < 14;k++) tuple[k] = null; String fKeyName = rs.getString(3); boolean foundRule = false; do { String proname = rs.getString(9); if (proname != null && proname.startsWith("RI_FKey_")) { int col = -1; if (proname.endsWith("_upd")) col = 9; // UPDATE_RULE else if (proname.endsWith("_del")) col = 10; // DELETE_RULE if (col > -1) { String rule = proname.substring(8, proname.length() - 4); int action = importedKeyNoAction; if ("cascade".equals(rule)) action = importedKeyCascade; else if ("setnull".equals(rule)) action = importedKeySetNull; else if ("setdefault".equals(rule)) action = importedKeySetDefault; tuple[col] = Integer.toString(action).getBytes(); foundRule = true; } } } while ((hasMore = rs.next()) && fKeyName.equals(rs.getString(3))); if (foundRule) { tuple[2] = rs.getBytes(2); //PKTABLE_NAME tuple[6] = rs.getBytes(1); //FKTABLE_NAME // Parse the tgargs data StringBuffer fkeyColumns = new StringBuffer(); StringBuffer pkeyColumns = new StringBuffer(); int numColumns = (rs.getInt(7) >> 1) - 2; String s = rs.getString(8); int pos = s.lastIndexOf("\\000"); for (int c = 0;c < numColumns;c++) { if (pos > -1) { int pos2 = s.lastIndexOf("\\000", pos - 1); if (pos2 > -1) { if (fkeyColumns.length() > 0) fkeyColumns.insert(0, ','); fkeyColumns.insert(0, s.substring(pos2 + 4, pos)); //FKCOLUMN_NAME pos = s.lastIndexOf("\\000", pos2 - 1); if (pos > -1) { if (pkeyColumns.length() > 0) pkeyColumns.insert(0, ','); pkeyColumns.insert(0, s.substring(pos + 4, pos2)); //PKCOLUMN_NAME } } } } tuple[7] = fkeyColumns.toString().getBytes(); //FKCOLUMN_NAME tuple[3] = pkeyColumns.toString().getBytes(); //PKCOLUMN_NAME tuple[8] = Integer.toString(seq++).getBytes(); //KEY_SEQ tuple[11] = fKeyName.getBytes(); //FK_NAME tuple[12] = rs.getBytes(4); //PK_NAME // DEFERRABILITY int deferrability = importedKeyNotDeferrable; boolean deferrable = rs.getBoolean(5); boolean initiallyDeferred = rs.getBoolean(6); if (deferrable) { if (initiallyDeferred) deferrability = importedKeyInitiallyDeferred; else deferrability = importedKeyInitiallyImmediate; } tuple[13] = Integer.toString(deferrability).getBytes(); tuples.addElement(tuple); } } while (hasMore); } return new ResultSet(connection, f, tuples, "OK", 1); }
11803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11803/83b5ae65a0b5a2dc34acac84116a456777698bf0/DatabaseMetaData.java/buggy/src/interfaces/jdbc/org/postgresql/jdbc2/DatabaseMetaData.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 2252, 18, 4669, 18, 13198, 336, 24934, 31140, 2396, 12, 780, 6222, 16, 514, 1963, 16, 514, 3354, 1388, 16, 514, 5523, 1388, 13, 1216, 6483, 202, 95, 202, 202, 974, 284, 8526,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2252, 18, 4669, 18, 13198, 336, 24934, 31140, 2396, 12, 780, 6222, 16, 514, 1963, 16, 514, 3354, 1388, 16, 514, 5523, 1388, 13, 1216, 6483, 202, 95, 202, 202, 974, 284, 8526,...
data.data[l * overallWidth + c] = tdata.data[l * width + c]; data.data[l * overallWidth + c + 1] = tdata.data[l * width + c + 1]; data.data[l * overallWidth + c + 2] = tdata.data[l * width + c + 2];
data.data[l * overallWidth * 3 + c] = tdata.data[l * width * 3 + c]; data.data[l * overallWidth * 3 + c + 1] = tdata.data[l * width * 3 + c + 1]; data.data[l * overallWidth * 3 + c + 2] = tdata.data[l * width * 3 + c + 2];
public static void createThumbnail(final ImageFigure container, String file, int overallWidth, int width, int height) { byte[] bytes = new byte[overallWidth * height * 3]; ImageData data = new ImageData(overallWidth, height, 24, pd, 3, bytes); byte[] tbytes = new byte[width * height * 3]; ImageData tdata = new ImageData (width, height, 24, pd, 3, tbytes); Process p = null; try { p = Runtime.getRuntime().exec(new String[] { "inigo", file.toString(), "-consumer", "thumb", "width=" + width, "height=" + height, // TODO this is a comman delimited list of frames. // For now let's just grab the first. "frames=0" }, new String[] { repository, "MLT_NORMALISATION=NTSC" }); Properties prop = new Properties(); DataInputStream dis = new DataInputStream (p.getInputStream ()); String line = dis.readLine (); // FIXME check that this was "P6" line = dis.readLine (); // FIXME check that this was WIDTH x HEIGHT line = dis.readLine (); // FIXME check that this was 255. // Now read the image data. dis.readFully (tdata.data); } catch (IOException _) { if (p != null) p.destroy (); return; } try { int res = p.waitFor(); } catch (InterruptedException _) { p.destroy(); } // FIXME Fill this with something silly for now. for (int l = 0; l < height; l++) { for (int c = 0; c < overallWidth * 3; c += 3) { if (c < width * 3) { data.data[l * overallWidth + c] = tdata.data[l * width + c]; data.data[l * overallWidth + c + 1] = tdata.data[l * width + c + 1]; data.data[l * overallWidth + c + 2] = tdata.data[l * width + c + 2]; } else { data.data[l * overallWidth + c] = 30; data.data[l * overallWidth + c + 1] = 78; data.data[l * overallWidth + c + 2] = 23; } } } Image img = new Image(null, data); container.setImage(img); }
9145 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9145/5cb7389c09ff1849b067f9c696a825bc560700bc/MLTClipFactory.java/clean/org.medi8.core/src/org/medi8/core/file/MLTClipFactory.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 760, 918, 752, 16270, 12, 6385, 3421, 42, 15906, 1478, 16, 514, 585, 16, 1875, 202, 474, 13914, 2384, 16, 509, 1835, 16, 509, 2072, 13, 202, 95, 202, 202, 7229, 8526, 1731, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 760, 918, 752, 16270, 12, 6385, 3421, 42, 15906, 1478, 16, 514, 585, 16, 1875, 202, 474, 13914, 2384, 16, 509, 1835, 16, 509, 2072, 13, 202, 95, 202, 202, 7229, 8526, 1731, ...
temp.replace(pos, pos + 2, netInfo.getAJUserGesamtAsStringWithPoints());
temp.replace(pos, pos + 2, netInfo.getAJUserGesamtAsStringWithPoints());
public void fireContentChanged(int type, Object content) { try{ if (type == DataUpdateListener.NETINFO_CHANGED) { netInfo = (NetworkInfo) content; StringBuffer temp = new StringBuffer(label6Text); int pos = temp.indexOf("%d"); temp.replace(pos, pos + 2, netInfo.getAJUserGesamtAsStringWithPoints()); pos = temp.indexOf("%d"); temp.replace(pos, pos + 2, netInfo.getAJAnzahlDateienAsStringWithPoints()); pos = temp.indexOf("%s"); temp.replace(pos, pos + 2, netInfo.getAJGesamtShareWithPoints(0)); label6.setText(temp.toString()); if (netInfo.isFirewalled()) { warnungen.setVisible(true); warnungIcon.setVisible(true); label7.setText(firewallWarning); } else { warnungen.setVisible(false); warnungIcon.setVisible(false); label7.setText(""); } } else if (type == DataUpdateListener.INFORMATION_CHANGED) { information = (Information) content; String temp = label9Text; if (information.getVerbindungsStatus()==Information.VERBUNDEN){ temp = temp.replaceFirst("%s", information.getServerName()); } else{ temp = temp.replaceFirst("%s", keinServer); } temp = temp.replaceFirst("%d", Integer.toString(ApplejuiceFassade.getInstance(). getAllServer(). size())); label9.setText(temp); temp = label10Text; temp = temp.replaceFirst("%d", Long.toString(information.getOpenConnections())); label10.setText(temp); } } catch (Exception e) { if (logger.isEnabledFor(Level.ERROR)) logger.error("Unbehandelte Exception", e); } }
13641 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13641/18e1ff99ead1cf2174657250d772c6f9159891e9/StartPanel.java/buggy/AJClientGUI/src/de/applejuicenet/client/gui/StartPanel.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 4452, 1350, 5033, 12, 474, 618, 16, 1033, 913, 13, 288, 3639, 775, 95, 5411, 309, 261, 723, 422, 1910, 1891, 2223, 18, 14843, 5923, 67, 24435, 13, 5411, 288, 7734, 2901, 966,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4452, 1350, 5033, 12, 474, 618, 16, 1033, 913, 13, 288, 3639, 775, 95, 5411, 309, 261, 723, 422, 1910, 1891, 2223, 18, 14843, 5923, 67, 24435, 13, 5411, 288, 7734, 2901, 966,...
return g; }
if (g == null) { throw new ApiUsageException("No such group: " + id); } return g; }
public ExperimenterGroup getGroup(Long id) { ExperimenterGroup g = iQuery.execute( new GroupQ( new Parameters( ).addId(id))); if (g == null) { throw new ApiUsageException("No such group: " + id); } return g; }
55464 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55464/7e7c45d25ea1bbef3485ae116b3eb108d9f6f5ef/AdminImpl.java/clean/components/server/src/ome/logic/AdminImpl.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 1312, 457, 381, 2328, 1114, 11751, 12, 3708, 612, 13, 565, 288, 377, 202, 424, 457, 381, 2328, 1114, 314, 273, 277, 1138, 18, 8837, 12, 377, 1082, 202, 2704, 3756, 53, 12, 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, 377, 1071, 1312, 457, 381, 2328, 1114, 11751, 12, 3708, 612, 13, 565, 288, 377, 202, 424, 457, 381, 2328, 1114, 314, 273, 277, 1138, 18, 8837, 12, 377, 1082, 202, 2704, 3756, 53, 12, 394, ...
pg_stream.SendInteger(len, 4); len -= 4; pg_stream.SendInteger(STARTUP_CODE, 4); len -= 4; pg_stream.Send(database.getBytes(), 64); len -= 64; pg_stream.Send(PG_USER.getBytes(), len);
public Connection(String host, int port, Properties info, String database, String url, Driver d) throws SQLException { int len = STARTUP_LEN; // Length of a startup packet this_driver = d; this_url = new String(url); PG_DATABASE = new String(database); PG_PASSWORD = new String(info.getProperty("password")); PG_USER = new String(info.getProperty("user")); PG_PORT = port; PG_HOST = new String(host); PG_STATUS = CONNECTION_BAD; // This handles the auth property. Any value begining with p enables // password authentication, while anything begining with i enables // ident (RFC 1413) authentication. Any other values default to trust. // // Also, the postgresql.auth system property can be used to change the // local default, if the auth property is not present. // String auth = info.getProperty("auth",System.getProperty("postgresql.auth","trust")).toLowerCase(); if(auth.startsWith("p")) { // Password authentication STARTUP_CODE=STARTUP_PASS; } else if(auth.startsWith("i")) { // Ident (RFC 1413) authentication STARTUP_CODE=STARTUP_HBA; } else { // Anything else defaults to trust authentication STARTUP_CODE=STARTUP_USER; } // Now make the initial connection try { pg_stream = new PG_Stream(host, port); } catch (IOException e) { throw new SQLException ("Connection failed: " + e.toString()); } // Now we need to construct and send a startup packet try { pg_stream.SendInteger(len, 4); len -= 4; pg_stream.SendInteger(STARTUP_CODE, 4); len -= 4; pg_stream.Send(database.getBytes(), 64); len -= 64; pg_stream.Send(PG_USER.getBytes(), len); // Send the password packet if required if(STARTUP_CODE == STARTUP_PASS) { len=STARTUP_LEN; pg_stream.SendInteger(len, 4); len -= 4; pg_stream.SendInteger(STARTUP_PASS, 4); len -= 4; pg_stream.Send(PG_USER.getBytes(), PG_USER.length()); len-=PG_USER.length(); pg_stream.SendInteger(0,1); len -= 1; pg_stream.Send(PG_PASSWORD.getBytes(), len); } } catch (IOException e) { throw new SQLException("Connection failed: " + e.toString()); } // Find out the date style by issuing the SQL: show datestyle // This actually issues a warning, and our own warning handling // code handles this itself. // // Also, this query replaced the NULL query issued to test the // connection. // clearWarnings(); ExecSQL("show datestyle"); // Initialise object handling initObjectTypes(); // Mark the connection as ok, and cleanup clearWarnings(); PG_STATUS = CONNECTION_OK; }
46563 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46563/4e9dd952966b600951f05ab2913b5b97936d42ba/Connection.java/buggy/src/interfaces/jdbc/postgresql/Connection.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 4050, 12, 780, 1479, 16, 509, 1756, 16, 6183, 1123, 16, 514, 2063, 16, 514, 880, 16, 9396, 302, 13, 1216, 6483, 225, 288, 565, 509, 562, 273, 10485, 3079, 67, 13017, 31, 202, 75...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4050, 12, 780, 1479, 16, 509, 1756, 16, 6183, 1123, 16, 514, 2063, 16, 514, 880, 16, 9396, 302, 13, 1216, 6483, 225, 288, 565, 509, 562, 273, 10485, 3079, 67, 13017, 31, 202, 75...
public void setSpecialGroup(int groupID) { specialGroups.add(new Integer(groupID)); // System.out.println("Added " + groupID); }
1868 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1868/edb9e4bb77e2c137353ec9cbd78be22ac41fdca8/Context.java/buggy/dspace/src/org/dspace/core/Context.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 444, 12193, 1114, 12, 474, 30365, 13, 565, 288, 3639, 4582, 3621, 18, 1289, 12, 2704, 2144, 12, 1655, 734, 10019, 3639, 368, 3639, 2332, 18, 659, 18, 8222, 2932, 8602, 315, 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, 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, 12193, 1114, 12, 474, 30365, 13, 565, 288, 3639, 4582, 3621, 18, 1289, 12, 2704, 2144, 12, 1655, 734, 10019, 3639, 368, 3639, 2332, 18, 659, 18, 8222, 2932, 8602, 315, 3...
break;
continue Loop;
static Object interpret(Context cx, Scriptable scope, Scriptable thisObj, Object[] args, double[] argsDbl, int argShift, int argCount, NativeFunction fnOrScript, InterpreterData idata) throws JavaScriptException { if (cx.interpreterSecurityDomain != idata.securityDomain) { if (argsDbl != null) { args = getArgsArray(args, argsDbl, argShift, argCount); } SecurityController sc = idata.securityController; Object savedDomain = cx.interpreterSecurityDomain; cx.interpreterSecurityDomain = idata.securityDomain; try { return sc.callWithDomain(idata.securityDomain, cx, fnOrScript, scope, thisObj, args); } finally { cx.interpreterSecurityDomain = savedDomain; } } final Object DBL_MRK = Interpreter.DBL_MRK; final Scriptable undefined = Undefined.instance; final int VAR_SHFT = 0; final int maxVars = idata.itsMaxVars; final int LOCAL_SHFT = VAR_SHFT + maxVars; final int STACK_SHFT = LOCAL_SHFT + idata.itsMaxLocals;// stack[VAR_SHFT <= i < LOCAL_SHFT]: variables// stack[LOCAL_SHFT <= i < TRY_STACK_SHFT]: used for newtemp/usetemp// stack[STACK_SHFT <= i < STACK_SHFT + idata.itsMaxStack]: stack data// sDbl[i]: if stack[i] is DBL_MRK, sDbl[i] holds the number value int maxFrameArray = idata.itsMaxFrameArray; if (maxFrameArray != STACK_SHFT + idata.itsMaxStack) Kit.codeBug(); Object[] stack = new Object[maxFrameArray]; double[] sDbl = new double[maxFrameArray]; int stackTop = STACK_SHFT - 1; int withDepth = 0; int definedArgs = fnOrScript.argCount; if (definedArgs > argCount) { definedArgs = argCount; } for (int i = 0; i != definedArgs; ++i) { Object arg = args[argShift + i]; stack[VAR_SHFT + i] = arg; if (arg == DBL_MRK) { sDbl[VAR_SHFT + i] = argsDbl[argShift + i]; } } for (int i = definedArgs; i != maxVars; ++i) { stack[VAR_SHFT + i] = undefined; } DebugFrame debuggerFrame = null; if (cx.debugger != null) { debuggerFrame = cx.debugger.getFrame(cx, idata); } if (idata.itsFunctionType != 0) { InterpretedFunction f = (InterpretedFunction)fnOrScript; if (!idata.useDynamicScope) { scope = fnOrScript.getParentScope(); } if (idata.itsCheckThis) { thisObj = ScriptRuntime.getThis(thisObj); } if (idata.itsNeedsActivation) { if (argsDbl != null) { args = getArgsArray(args, argsDbl, argShift, argCount); argShift = 0; argsDbl = null; } scope = ScriptRuntime.initVarObj(cx, scope, fnOrScript, thisObj, args); } } else { ScriptRuntime.initScript(cx, scope, fnOrScript, thisObj, idata.itsFromEvalCode); } if (idata.itsNestedFunctions != null) { if (idata.itsFunctionType != 0 && !idata.itsNeedsActivation) Kit.codeBug(); for (int i = 0; i < idata.itsNestedFunctions.length; i++) { InterpreterData fdata = idata.itsNestedFunctions[i]; if (fdata.itsFunctionType == FunctionNode.FUNCTION_STATEMENT) { createFunction(cx, scope, fdata, idata.itsFromEvalCode); } } } // Wrapped regexps for functions are stored in InterpretedFunction // but for script which should not contain references to scope // the regexps re-wrapped during each script execution Scriptable[] scriptRegExps = null; boolean useActivationVars = false; if (debuggerFrame != null) { if (argsDbl != null) { args = getArgsArray(args, argsDbl, argShift, argCount); argShift = 0; argsDbl = null; } if (idata.itsFunctionType != 0 && !idata.itsNeedsActivation) { useActivationVars = true; scope = ScriptRuntime.initVarObj(cx, scope, fnOrScript, thisObj, args); } debuggerFrame.onEnter(cx, scope, thisObj, args); } InterpreterData savedData = cx.interpreterData; cx.interpreterData = idata; Object result = undefined; // If javaException != null on exit, it will be throw instead of // normal return Throwable javaException = null; int exceptionPC = -1; byte[] iCode = idata.itsICode; String[] strings = idata.itsStringTable; int pc = 0; int pcPrevBranch = pc; final int instructionThreshold = cx.instructionThreshold; // During function call this will be set to -1 so catch can properly // adjust it int instructionCount = cx.instructionCount; // arbitrary number to add to instructionCount when calling // other functions final int INVOCATION_COST = 100; Loop: for (;;) { try { int op = 0xFF & iCode[pc++]; switch (op) { // Back indent to ease imlementation reading case Icode_CATCH: { // The following code should be executed inside try/catch inside main // loop, not in the loop catch block itself to deal with exceptions // from observeInstructionCount. A special bytecode is used only to // simplify logic. if (javaException == null) Kit.codeBug(); int pcNew = -1; boolean doCatch = false; int handlerOffset = getExceptionHandler(idata.itsExceptionTable, exceptionPC); if (handlerOffset >= 0) { final int SCRIPT_CAN_CATCH = 0, ONLY_FINALLY = 1, OTHER = 2; int exType; if (javaException instanceof JavaScriptException) { exType = SCRIPT_CAN_CATCH; } else if (javaException instanceof EcmaError) { // an offical ECMA error object, exType = SCRIPT_CAN_CATCH; } else if (javaException instanceof EvaluatorException) { exType = SCRIPT_CAN_CATCH; } else if (javaException instanceof RuntimeException) { exType = ONLY_FINALLY; } else { // Error instance exType = OTHER; } if (exType != OTHER) { // Do not allow for JS to interfere with Error instances // (exType == OTHER), as they can be used to terminate // long running script if (exType == SCRIPT_CAN_CATCH) { // Allow JS to catch only JavaScriptException and // EcmaError pcNew = idata.itsExceptionTable[handlerOffset + EXCEPTION_CATCH_SLOT]; if (pcNew >= 0) { // Has catch block doCatch = true; } } if (pcNew < 0) { pcNew = idata.itsExceptionTable[handlerOffset + EXCEPTION_FINALLY_SLOT]; } } } if (debuggerFrame != null && !(javaException instanceof Error)) { debuggerFrame.onExceptionThrown(cx, javaException); } if (pcNew < 0) { break Loop; } // We caught an exception // restore scope at try point int tryWithDepth = idata.itsExceptionTable[ handlerOffset + EXCEPTION_WITH_DEPTH_SLOT]; while (tryWithDepth != withDepth) { if (scope == null) Kit.codeBug(); scope = ScriptRuntime.leaveWith(scope); --withDepth; } if (doCatch) { stackTop = STACK_SHFT - 1; int exLocal = idata.itsExceptionTable[ handlerOffset + EXCEPTION_LOCAL_SLOT]; stack[LOCAL_SHFT + exLocal] = ScriptRuntime.getCatchObject( cx, scope, javaException); } else { stackTop = STACK_SHFT; // Call finally handler with javaException on stack top to // distinguish from normal invocation through GOSUB // which would contain DBL_MRK on the stack stack[stackTop] = javaException; } // clear exception javaException = null; // Notify instruction observer if necessary // and point pc and pcPrevBranch to start of catch/finally block if (instructionThreshold != 0) { if (instructionCount > instructionThreshold) { // Note: this can throw Error cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc = pcNew; continue Loop; } case Token.THROW: { Object value = stack[stackTop]; if (value == DBL_MRK) value = doubleWrap(sDbl[stackTop]); --stackTop; int sourceLine = getShort(iCode, pc); javaException = new JavaScriptException(value, idata.itsSourceFile, sourceLine); exceptionPC = pc - 1; if (instructionThreshold != 0) { instructionCount += pc - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc = getJavaCatchPC(iCode); continue Loop; } case Token.GE : { --stackTop; Object rhs = stack[stackTop + 1]; Object lhs = stack[stackTop]; boolean valBln; if (rhs == DBL_MRK || lhs == DBL_MRK) { double rDbl = stack_double(stack, sDbl, stackTop + 1); double lDbl = stack_double(stack, sDbl, stackTop); valBln = (rDbl <= lDbl); } else { valBln = ScriptRuntime.cmp_LE(rhs, lhs); } stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case Token.LE : { --stackTop; Object rhs = stack[stackTop + 1]; Object lhs = stack[stackTop]; boolean valBln; if (rhs == DBL_MRK || lhs == DBL_MRK) { double rDbl = stack_double(stack, sDbl, stackTop + 1); double lDbl = stack_double(stack, sDbl, stackTop); valBln = (lDbl <= rDbl); } else { valBln = ScriptRuntime.cmp_LE(lhs, rhs); } stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case Token.GT : { --stackTop; Object rhs = stack[stackTop + 1]; Object lhs = stack[stackTop]; boolean valBln; if (rhs == DBL_MRK || lhs == DBL_MRK) { double rDbl = stack_double(stack, sDbl, stackTop + 1); double lDbl = stack_double(stack, sDbl, stackTop); valBln = (rDbl < lDbl); } else { valBln = ScriptRuntime.cmp_LT(rhs, lhs); } stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case Token.LT : { --stackTop; Object rhs = stack[stackTop + 1]; Object lhs = stack[stackTop]; boolean valBln; if (rhs == DBL_MRK || lhs == DBL_MRK) { double rDbl = stack_double(stack, sDbl, stackTop + 1); double lDbl = stack_double(stack, sDbl, stackTop); valBln = (lDbl < rDbl); } else { valBln = ScriptRuntime.cmp_LT(lhs, rhs); } stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case Token.IN : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); boolean valBln = ScriptRuntime.in(lhs, rhs, scope); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case Token.INSTANCEOF : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); boolean valBln = ScriptRuntime.instanceOf(lhs, rhs, scope); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case Token.EQ : { --stackTop; boolean valBln = do_eq(stack, sDbl, stackTop); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case Token.NE : { --stackTop; boolean valBln = !do_eq(stack, sDbl, stackTop); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case Token.SHEQ : { --stackTop; boolean valBln = do_sheq(stack, sDbl, stackTop); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case Token.SHNE : { --stackTop; boolean valBln = !do_sheq(stack, sDbl, stackTop); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case Token.IFNE : { boolean valBln = stack_boolean(stack, sDbl, stackTop); --stackTop; if (!valBln) { if (instructionThreshold != 0) { instructionCount += pc + 2 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc = getTarget(iCode, pc); continue Loop; } pc += 2; break; } case Token.IFEQ : { boolean valBln = stack_boolean(stack, sDbl, stackTop); --stackTop; if (valBln) { if (instructionThreshold != 0) { instructionCount += pc + 2 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc = getTarget(iCode, pc); continue Loop; } pc += 2; break; } case Icode_IFEQ_POP : { boolean valBln = stack_boolean(stack, sDbl, stackTop); --stackTop; if (valBln) { if (instructionThreshold != 0) { instructionCount += pc + 2 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc = getTarget(iCode, pc); stack[stackTop--] = null; continue Loop; } pc += 2; break; } case Token.GOTO : if (instructionThreshold != 0) { instructionCount += pc + 2 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc = getTarget(iCode, pc); continue Loop; case Icode_GOSUB : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = pc + 2; if (instructionThreshold != 0) { instructionCount += pc + 2 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc = getTarget(iCode, pc); continue Loop; case Icode_RETSUB : { int slot = (iCode[pc] & 0xFF); if (instructionThreshold != 0) { instructionCount += pc + 1 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } } int newPC; Object value = stack[LOCAL_SHFT + slot]; if (value != DBL_MRK) { // Invocation from exception handler, restore object to rethrow javaException = (Throwable)value; exceptionPC = pc - 1; newPC = getJavaCatchPC(iCode); } else { // Normal return from GOSUB newPC = (int)sDbl[LOCAL_SHFT + slot]; } pcPrevBranch = pc = newPC; continue Loop; } case Token.POP : stack[stackTop] = null; stackTop--; break; case Icode_DUP : stack[stackTop + 1] = stack[stackTop]; sDbl[stackTop + 1] = sDbl[stackTop]; stackTop++; break; case Icode_DUPSECOND : { stack[stackTop + 1] = stack[stackTop - 1]; sDbl[stackTop + 1] = sDbl[stackTop - 1]; stackTop++; break; } case Icode_SWAP : { Object o = stack[stackTop]; stack[stackTop] = stack[stackTop - 1]; stack[stackTop - 1] = o; double d = sDbl[stackTop]; sDbl[stackTop] = sDbl[stackTop - 1]; sDbl[stackTop - 1] = d; break; } case Token.POPV : result = stack[stackTop]; if (result == DBL_MRK) result = doubleWrap(sDbl[stackTop]); stack[stackTop] = null; --stackTop; break; case Token.RETURN : result = stack[stackTop]; if (result == DBL_MRK) result = doubleWrap(sDbl[stackTop]); --stackTop; break Loop; case Token.RETURN_POPV : break Loop; case Icode_RETUNDEF : result = undefined; break Loop; case Token.BITNOT : { int rIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = ~rIntValue; break; } case Token.BITAND : { int rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; int lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue & rIntValue; break; } case Token.BITOR : { int rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; int lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue | rIntValue; break; } case Token.BITXOR : { int rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; int lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue ^ rIntValue; break; } case Token.LSH : { int rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; int lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue << rIntValue; break; } case Token.RSH : { int rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; int lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue >> rIntValue; break; } case Token.URSH : { int rIntValue = stack_int32(stack, sDbl, stackTop) & 0x1F; --stackTop; double lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = ScriptRuntime.toUint32(lDbl) >>> rIntValue; break; } case Token.ADD : --stackTop; do_add(stack, sDbl, stackTop); break; case Token.SUB : { double rDbl = stack_double(stack, sDbl, stackTop); --stackTop; double lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lDbl - rDbl; break; } case Token.NEG : { double rDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = -rDbl; break; } case Token.POS : { double rDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = rDbl; break; } case Token.MUL : { double rDbl = stack_double(stack, sDbl, stackTop); --stackTop; double lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lDbl * rDbl; break; } case Token.DIV : { double rDbl = stack_double(stack, sDbl, stackTop); --stackTop; double lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; // Detect the divide by zero or let Java do it ? sDbl[stackTop] = lDbl / rDbl; break; } case Token.MOD : { double rDbl = stack_double(stack, sDbl, stackTop); --stackTop; double lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lDbl % rDbl; break; } case Token.NOT : { stack[stackTop] = stack_boolean(stack, sDbl, stackTop) ? Boolean.FALSE : Boolean.TRUE; break; } case Token.BINDNAME : { String name = strings[getIndex(iCode, pc)]; stack[++stackTop] = ScriptRuntime.bind(scope, name); pc += 2; break; } case Token.SETNAME : { String name = strings[getIndex(iCode, pc)]; Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Scriptable lhs = (Scriptable)stack[stackTop]; stack[stackTop] = ScriptRuntime.setName(lhs, rhs, scope, name); pc += 2; break; } case Token.DELPROP : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.delete(cx, scope, lhs, rhs); break; } case Token.GETPROP : { String name = (String)stack[stackTop]; --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.getProp(lhs, name, scope); break; } case Token.SETPROP : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; String name = (String)stack[stackTop]; --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.setProp(lhs, name, rhs, scope); break; } case Token.GETELEM : do_getElem(cx, stack, sDbl, stackTop, scope); --stackTop; break; case Token.SETELEM : do_setElem(cx, stack, sDbl, stackTop, scope); stackTop -= 2; break; case Icode_PROPINC : case Icode_PROPDEC : { String name = (String)stack[stackTop]; --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.postIncrDecr(lhs, name, scope, op == Icode_PROPINC); break; } case Icode_ELEMINC : case Icode_ELEMDEC : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.postIncrDecrElem(lhs, rhs, scope, op == Icode_ELEMINC); break; } case Token.LOCAL_SAVE : { int slot = (iCode[pc] & 0xFF); stack[LOCAL_SHFT + slot] = stack[stackTop]; sDbl[LOCAL_SHFT + slot] = sDbl[stackTop]; --stackTop; ++pc; break; } case Token.LOCAL_LOAD : { int slot = (iCode[pc] & 0xFF); ++stackTop; stack[stackTop] = stack[LOCAL_SHFT + slot]; sDbl[stackTop] = sDbl[LOCAL_SHFT + slot]; ++pc; break; } case Icode_CALLSPECIAL : { if (instructionThreshold != 0) { instructionCount += INVOCATION_COST; cx.instructionCount = instructionCount; instructionCount = -1; } int callType = iCode[pc] & 0xFF; boolean isNew = (iCode[pc + 1] != 0); int sourceLine = getShort(iCode, pc + 2); int count = getIndex(iCode, pc + 4); stackTop -= count; Object[] outArgs = getArgsArray(stack, sDbl, stackTop + 1, count); Object functionThis; if (isNew) { functionThis = null; } else { functionThis = stack[stackTop]; if (functionThis == DBL_MRK) { functionThis = doubleWrap(sDbl[stackTop]); } --stackTop; } Object function = stack[stackTop]; if (function == DBL_MRK) function = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.callSpecial( cx, function, isNew, functionThis, outArgs, scope, thisObj, callType, idata.itsSourceFile, sourceLine); instructionCount = cx.instructionCount; pc += 6; break; } case Token.CALL : { if (instructionThreshold != 0) { instructionCount += INVOCATION_COST; cx.instructionCount = instructionCount; instructionCount = -1; } int count = getIndex(iCode, pc + 2); stackTop -= count; int calleeArgShft = stackTop + 1; Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; Scriptable calleeScope = scope; if (idata.itsNeedsActivation) { calleeScope = ScriptableObject.getTopLevelScope(scope); } Scriptable calleeThis; if (rhs instanceof Scriptable || rhs == null) { calleeThis = (Scriptable)rhs; } else { calleeThis = ScriptRuntime.toObject(cx, calleeScope, rhs); } if (lhs instanceof InterpretedFunction) { // Inlining of InterpretedFunction.call not to create // argument array InterpretedFunction f = (InterpretedFunction)lhs; stack[stackTop] = interpret(cx, calleeScope, calleeThis, stack, sDbl, calleeArgShft, count, f, f.itsData); } else if (lhs instanceof Function) { Function f = (Function)lhs; Object[] outArgs = getArgsArray(stack, sDbl, calleeArgShft, count); stack[stackTop] = f.call(cx, calleeScope, calleeThis, outArgs); } else { if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); else if (lhs == undefined) { // special code for better error message for call // to undefined lhs = strings[getIndex(iCode, pc)]; if (lhs == null) lhs = undefined; } throw ScriptRuntime.typeError1("msg.isnt.function", ScriptRuntime.toString(lhs)); } instructionCount = cx.instructionCount; pc += 4; break; } case Token.NEW : { if (instructionThreshold != 0) { instructionCount += INVOCATION_COST; cx.instructionCount = instructionCount; instructionCount = -1; } int count = getIndex(iCode, pc + 2); stackTop -= count; int calleeArgShft = stackTop + 1; Object lhs = stack[stackTop]; if (lhs instanceof InterpretedFunction) { // Inlining of InterpretedFunction.construct not to create // argument array InterpretedFunction f = (InterpretedFunction)lhs; Scriptable newInstance = f.createObject(cx, scope); Object callResult = interpret(cx, scope, newInstance, stack, sDbl, calleeArgShft, count, f, f.itsData); if (callResult instanceof Scriptable && callResult != undefined) { stack[stackTop] = callResult; } else { stack[stackTop] = newInstance; } } else if (lhs instanceof Function) { Function f = (Function)lhs; Object[] outArgs = getArgsArray(stack, sDbl, calleeArgShft, count); stack[stackTop] = f.construct(cx, scope, outArgs); } else { if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); else if (lhs == undefined) { // special code for better error message for call // to undefined lhs = strings[getIndex(iCode, pc)]; if (lhs == null) lhs = undefined; } throw ScriptRuntime.typeError1("msg.isnt.function", ScriptRuntime.toString(lhs)); } instructionCount = cx.instructionCount; pc += 4; break; } case Token.TYPEOF : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.typeof(lhs); break; } case Icode_TYPEOFNAME : { String name = strings[getIndex(iCode, pc)]; stack[++stackTop] = ScriptRuntime.typeofName(scope, name); pc += 2; break; } case Icode_NAME_AND_THIS : { String name = strings[getIndex(iCode, pc)]; boolean skipGetThis = (0 != iCode[pc + 2]); stackTop = do_nameAndThis(stack, stackTop, scope, name, skipGetThis); pc += 3; break; } case Token.STRING : stack[++stackTop] = strings[getIndex(iCode, pc)]; pc += 2; break; case Icode_SHORTNUMBER : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = getShort(iCode, pc); pc += 2; break; case Icode_INTNUMBER : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = getInt(iCode, pc); pc += 4; break; case Token.NUMBER : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = idata.itsDoubleTable[getIndex(iCode, pc)]; pc += 2; break; case Token.NAME : { String name = strings[getIndex(iCode, pc)]; stack[++stackTop] = ScriptRuntime.name(scope, name); pc += 2; break; } case Icode_NAMEINC : case Icode_NAMEDEC : { String name = strings[getIndex(iCode, pc)]; stack[++stackTop] = ScriptRuntime.postIncrDecr(scope, name, op == Icode_NAMEINC); pc += 2; break; } case Token.SETVAR : { int slot = (iCode[pc] & 0xFF); if (!useActivationVars) { stack[VAR_SHFT + slot] = stack[stackTop]; sDbl[VAR_SHFT + slot] = sDbl[stackTop]; } else { Object val = stack[stackTop]; if (val == DBL_MRK) val = doubleWrap(sDbl[stackTop]); activationPut(fnOrScript, scope, slot, val); } ++pc; break; } case Token.GETVAR : { int slot = (iCode[pc] & 0xFF); ++stackTop; if (!useActivationVars) { stack[stackTop] = stack[VAR_SHFT + slot]; sDbl[stackTop] = sDbl[VAR_SHFT + slot]; } else { stack[stackTop] = activationGet(fnOrScript, scope, slot); } ++pc; break; } case Icode_VARINC : case Icode_VARDEC : { int slot = (iCode[pc] & 0xFF); ++stackTop; if (!useActivationVars) { Object val = stack[VAR_SHFT + slot]; stack[stackTop] = val; double d; if (val == DBL_MRK) { d = sDbl[VAR_SHFT + slot]; sDbl[stackTop] = d; } else { d = ScriptRuntime.toNumber(val); } stack[VAR_SHFT + slot] = DBL_MRK; sDbl[VAR_SHFT + slot] = (op == Icode_VARINC) ? d + 1.0 : d - 1.0; } else { Object val = activationGet(fnOrScript, scope, slot); stack[stackTop] = val; double d = ScriptRuntime.toNumber(val); val = doubleWrap((op == Icode_VARINC) ? d + 1.0 : d - 1.0); activationPut(fnOrScript, scope, slot, val); } ++pc; break; } case Token.ZERO : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = 0; break; case Token.ONE : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = 1; break; case Token.NULL : stack[++stackTop] = null; break; case Token.THIS : stack[++stackTop] = thisObj; break; case Token.THISFN : stack[++stackTop] = fnOrScript; break; case Token.FALSE : stack[++stackTop] = Boolean.FALSE; break; case Token.TRUE : stack[++stackTop] = Boolean.TRUE; break; case Token.UNDEFINED : stack[++stackTop] = Undefined.instance; break; case Token.ENTERWITH : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); --stackTop; scope = ScriptRuntime.enterWith(lhs, scope); ++withDepth; break; } case Token.LEAVEWITH : scope = ScriptRuntime.leaveWith(scope); --withDepth; break; case Token.CATCH_SCOPE : { String name = strings[getIndex(iCode, pc)]; stack[stackTop] = ScriptRuntime.newCatchScope(name, stack[stackTop]); pc += 2; break; } case Token.ENUM_INIT : { int slot = (iCode[pc] & 0xFF); Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); --stackTop; stack[LOCAL_SHFT + slot] = ScriptRuntime.enumInit(lhs, scope); ++pc; break; } case Token.ENUM_NEXT : case Token.ENUM_ID : { int slot = (iCode[pc] & 0xFF); Object val = stack[LOCAL_SHFT + slot]; ++stackTop; stack[stackTop] = (op == Token.ENUM_NEXT) ? (Object)ScriptRuntime.enumNext(val) : (Object)ScriptRuntime.enumId(val); ++pc; break; } case Icode_PUSH_PARENT : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[++stackTop] = ScriptRuntime.getParent(lhs); break; } case Icode_GETPROTO : case Icode_GETSCOPEPARENT : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); Object val; if (op == Icode_GETPROTO) { val = ScriptRuntime.getProto(lhs, scope); } else { val = ScriptRuntime.getParent(lhs, scope); } stack[stackTop] = val; break; } case Icode_SETPROTO : case Icode_SETPARENT : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); Object val; if (op == Icode_SETPROTO) { val = ScriptRuntime.setProto(lhs, rhs, scope); } else { val = ScriptRuntime.setParent(lhs, rhs, scope); } stack[stackTop] = val; break; } case Icode_SCOPE : stack[++stackTop] = scope; break; case Icode_CLOSURE : { int i = getIndex(iCode, pc); InterpreterData closureData = idata.itsNestedFunctions[i]; stack[++stackTop] = createFunction(cx, scope, closureData, idata.itsFromEvalCode); pc += 2; break; } case Token.REGEXP : { int i = getIndex(iCode, pc); Scriptable regexp; if (idata.itsFunctionType != 0) { regexp = ((InterpretedFunction)fnOrScript).itsRegExps[i]; } else { if (scriptRegExps == null) { scriptRegExps = wrapRegExps(cx, scope, idata); } regexp = scriptRegExps[i]; } stack[++stackTop] = regexp; pc += 2; break; } case Icode_LITERAL_NEW : { int i = getInt(iCode, pc); ++stackTop; stack[stackTop] = new Object[i]; sDbl[stackTop] = 0; pc += 4; break; } case Icode_LITERAL_SET : { Object value = stack[stackTop]; if (value == DBL_MRK) value = doubleWrap(sDbl[stackTop]); --stackTop; int i = (int)sDbl[stackTop]; ((Object[])stack[stackTop])[i] = value; sDbl[stackTop] = i + 1; break; } case Token.ARRAYLIT : case Token.OBJECTLIT : { int offset = getInt(iCode, pc); Object[] data = (Object[])stack[stackTop]; Object val; if (op == Token.ARRAYLIT) { int[] skipIndexces = null; if (offset >= 0) { skipIndexces = (int[])idata.literalIds[offset]; } val = ScriptRuntime.newArrayLiteral(data, skipIndexces, cx, scope); } else { Object[] ids = (Object[])idata.literalIds[offset]; val = ScriptRuntime.newObjectLiteral(ids, data, cx, scope); } stack[stackTop] = val; pc += 4; break; } case Icode_LINE : { cx.interpreterLineIndex = pc; if (debuggerFrame != null) { int line = getShort(iCode, pc); debuggerFrame.onLineChange(cx, line); } pc += 2; break; } default : { dumpICode(idata); throw new RuntimeException("Unknown icode : "+op+" @ pc : "+(pc-1)); } // end of interpreter switch } } catch (Throwable ex) { if (instructionThreshold != 0) { if (instructionCount < 0) { // throw during function call instructionCount = cx.instructionCount; } else { // throw during any other operation instructionCount += pc - pcPrevBranch; cx.instructionCount = instructionCount; } } javaException = ex; exceptionPC = pc; pc = getJavaCatchPC(iCode); continue Loop; } } cx.interpreterData = savedData; if (debuggerFrame != null) { if (javaException != null) { debuggerFrame.onExit(cx, true, javaException); } else { debuggerFrame.onExit(cx, false, result); } } if (idata.itsNeedsActivation || debuggerFrame != null) { ScriptRuntime.popActivation(cx); } if (instructionThreshold != 0) { if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } cx.instructionCount = instructionCount; } if (javaException != null) { if (javaException instanceof JavaScriptException) { throw (JavaScriptException)javaException; } else if (javaException instanceof RuntimeException) { throw (RuntimeException)javaException; } else { // Must be instance of Error or code bug throw (Error)javaException; } } return result; }
7555 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7555/34e9dc56b7553f450b9015c8f4135584139686cf/Interpreter.java/buggy/js/rhino/src/org/mozilla/javascript/Interpreter.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 760, 1033, 10634, 12, 1042, 9494, 16, 22780, 2146, 16, 22780, 15261, 16, 18701, 1033, 8526, 833, 16, 1645, 8526, 833, 40, 3083, 16, 18701, 509, 1501, 10544, 16, 509, 1501, 1380, 16, 18701...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 760, 1033, 10634, 12, 1042, 9494, 16, 22780, 2146, 16, 22780, 15261, 16, 18701, 1033, 8526, 833, 16, 1645, 8526, 833, 40, 3083, 16, 18701, 509, 1501, 10544, 16, 509, 1501, 1380, 16, 18701...
public long skip(long n) throws IOException { throw new IOException("not required"); }
public long skip(long n) throws IOException { throw new IOException("not required"); }
public long skip(long n) throws IOException { throw new IOException("not required");}
1739 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1739/84d120cc49d42a79bfbc68fe36429395bdef90fd/UnicastRemoteCall.java/clean/libjava/gnu/java/rmi/server/UnicastRemoteCall.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1071, 1525, 2488, 12, 5748, 290, 13, 1216, 1860, 288, 202, 12849, 394, 1860, 2932, 902, 1931, 8863, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1071, 1525, 2488, 12, 5748, 290, 13, 1216, 1860, 288, 202, 12849, 394, 1860, 2932, 902, 1931, 8863, 97, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
p.setThreadFactory(new ThreadFactory() { public Thread newThread(Runnable arg0) { Thread thread = new Thread(arg0, poolName + " " + getNextWorkerID()); thread.setContextClassLoader(classLoader); return thread; } });
p.setThreadFactory(new ThreadPoolThreadFactory(poolName, classLoader));
public ThreadPool(final int poolSize, final String poolName, final long keepAliveTime, final ClassLoader classLoader) { PooledExecutor p = new PooledExecutor(poolSize); p.abortWhenBlocked(); p.setKeepAliveTime(keepAliveTime); p.setMinimumPoolSize(poolSize); p.setThreadFactory(new ThreadFactory() { public Thread newThread(Runnable arg0) { Thread thread = new Thread(arg0, poolName + " " + getNextWorkerID()); thread.setContextClassLoader(classLoader); return thread; } }); executor = p; }
12474 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12474/5ef2063272bd88447a6757e92fac9e77f2aab60d/ThreadPool.java/buggy/modules/core/src/java/org/apache/geronimo/pool/ThreadPool.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 27359, 12, 6385, 509, 2845, 1225, 16, 727, 514, 26445, 16, 727, 1525, 24115, 950, 16, 727, 9403, 11138, 13, 288, 3639, 453, 22167, 6325, 293, 273, 394, 453, 22167, 6325, 12, 6011, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 27359, 12, 6385, 509, 2845, 1225, 16, 727, 514, 26445, 16, 727, 1525, 24115, 950, 16, 727, 9403, 11138, 13, 288, 3639, 453, 22167, 6325, 293, 273, 394, 453, 22167, 6325, 12, 6011, ...
System.out.println("article " + namespace + ":" + title + content.length());
if (title.equals("Post-it")) { System.out.println("namespace="+namespace+" title="+title+ "content=["+content+"]"); }
public static void main(String[] args) { if (args.length < 1) { System.err.println("Must specify database name"); return; } int i = 0; while (i < args.length - 1) { if (args[i].equals("-rebuild")) what = DOING_FULL_UPDATE; else if (args[i].equals("-increment")) what = DOING_INCREMENT; else if (args[i].equals("-configfile")) configfile = args[++i]; else if (args[i].equals("-latin1")) latin1 = true; ++i; } dburl = args[i]; if (what == -1) { System.err.println("No action specified"); return; } System.out.println("MWSearch Lucene search updater."); System.out.println("Using configuration: " + configfile); System.out.println("Running " + (what == DOING_INCREMENT ? "incremental" : "full") + " update on " + dburl + "\n"); Properties p = new Properties(); try { p.load(new FileInputStream(new File(configfile))); } catch (FileNotFoundException e3) { System.err.println("Error: config file " + configfile + " not found"); return; } catch (IOException e3) { System.err.println("Error: IO error reading config: " + e3.getMessage()); return; } System.out.println("Connecting to DB server..."); try { dbconn = DriverManager.getConnection(dburl, p.getProperty("mwsearch.username"), p.getProperty("mwsearch.password")); } catch (SQLException e2) { System.err.println("Error: DB connection error: " + e2.getMessage()); return; } IndexWriter writer; try { writer= new IndexWriter(p.getProperty("mwsearch.indexpath"), new StandardAnalyzer(), true); } catch (IOException e4) { System.out.println("Error: could not open index path: " + e4.getMessage()); return; } System.out.println("Running update..."); long now = System.currentTimeMillis(); long numArticles = 0; String query = "SELECT old_namespace,old_title,old_text " + "FROM page, text WHERE old_id=page_latest AND page_is_redirect=0"; PreparedStatement pstmt; try { pstmt = dbconn.prepareStatement(query); ResultSet rs = pstmt.executeQuery(); while (rs.next()) { String namespace = rs.getString(1); String title = rs.getString(2); String content = rs.getString(3); if (!latin1) { try { title = new String(title.getBytes("ISO-8859-1"), "UTF-8"); content = new String(content.getBytes("ISO-8859-1"), "UTF-8"); } catch (UnsupportedEncodingException e) {} } System.out.println("article " + namespace + ":" + title + content.length()); Document d = new Document(); d.add(Field.Text("namespace", namespace)); d.add(Field.Text("title", title)); d.add(new Field("contents", stripWiki(content), false, true, true)); try { writer.addDocument(d); } catch (IOException e5) { System.out.println("Error adding document [" + namespace + ":" + title + "]: " + e5.getMessage()); return; } ++numArticles; } } catch (SQLException e) { System.out.println("Error: SQL error: " + e.getMessage()); return; } catch (OutOfMemoryError em) { em.printStackTrace(); return; } double totaltime = (System.currentTimeMillis() - now) / 1000; System.out.println("Done, indexed " + numArticles + " articles in " + totaltime + " seconds"); }
7109 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7109/7bd014b4b714e0de505f124d05fad8f27e6a7738/MWSearch.java/buggy/lucene-search/src/org/wikimedia/lsearch/MWSearch.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 760, 918, 2774, 12, 780, 8526, 833, 13, 288, 9506, 202, 430, 261, 1968, 18, 2469, 411, 404, 13, 288, 1082, 202, 3163, 18, 370, 18, 8222, 2932, 10136, 4800, 2063, 508, 8863, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 760, 918, 2774, 12, 780, 8526, 833, 13, 288, 9506, 202, 430, 261, 1968, 18, 2469, 411, 404, 13, 288, 1082, 202, 3163, 18, 370, 18, 8222, 2932, 10136, 4800, 2063, 508, 8863, ...
currentTokenStartPosition = this.scanner.currentPosition;
currentTokenStartPosition = this.scanner.currentPosition; hasLineComment = true;
public void printComment(boolean insertNewLineAfterComment) { try { // if we have a space between two tokens we ensure it will be dumped in the formatted string int currentTokenStartPosition = this.scanner.currentPosition; while ((this.currentToken = this.scanner.getNextToken()) != ITerminalSymbols.TokenNameEOF) { switch(this.currentToken) { case ITerminalSymbols.TokenNameWHITESPACE : int count = 0; char[] whiteSpaces = this.scanner.getCurrentTokenSource(); for (int i = 0, max = whiteSpaces.length; i < max; i++) { switch(whiteSpaces[i]) { case '\r' : if ((i + 1) < max) { if (whiteSpaces[i + 1] == '\n') { i++; count++; } } else { count++; } break; case '\n' : count++; } } preserveEmptyLines(count); currentTokenStartPosition = this.scanner.currentPosition; break; case ITerminalSymbols.TokenNameCOMMENT_LINE : this.printCommentLine(this.scanner.getRawTokenSource(), this.scanner.getCurrentTokenStartPosition()); currentTokenStartPosition = this.scanner.currentPosition; break; case ITerminalSymbols.TokenNameCOMMENT_BLOCK : case ITerminalSymbols.TokenNameCOMMENT_JAVADOC : this.printBlockComment(this.scanner.getRawTokenSource(), this.scanner.getCurrentTokenStartPosition()); currentTokenStartPosition = this.scanner.currentPosition; if (insertNewLineAfterComment) { this.printNewLine(); } break; default : // step back one token this.scanner.resetTo(currentTokenStartPosition, this.scannerEndPosition - 1); return; } } } catch (InvalidInputException e) { throw new AbortFormatting(e); } }
10698 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10698/b2ee2f0e0ad1c5d61d4417df1a17fc01d93cc41f/Scribe.java/buggy/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/Scribe.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1172, 4469, 12, 6494, 2243, 31453, 4436, 4469, 13, 288, 202, 202, 698, 288, 1082, 202, 759, 309, 732, 1240, 279, 3476, 3086, 2795, 2430, 732, 3387, 518, 903, 506, 29942, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1172, 4469, 12, 6494, 2243, 31453, 4436, 4469, 13, 288, 202, 202, 698, 288, 1082, 202, 759, 309, 732, 1240, 279, 3476, 3086, 2795, 2430, 732, 3387, 518, 903, 506, 29942, ...
perfReportWriter.writeCsvData(ReportPlugin.REPORT_PLUGIN_THROUGHPUT,
perfReportWriter.writeCsvData(AbstractPerfReportWriter.REPORT_PLUGIN_THROUGHPUT,
public void sampleData() { for (Iterator i = clients.iterator(); i.hasNext();) { MeasurableClient client = (MeasurableClient) i.next(); if (perfReportWriter != null) { perfReportWriter.writeCsvData(ReportPlugin.REPORT_PLUGIN_THROUGHPUT, "index=" + sampleIndex + ",clientName=" + client.getClientName() + ",throughput=" + client.getThroughput()); } client.reset(); } }
17032 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17032/fddc01d97cbad6d00a0ba32062d1ee9df2a89b7c/ThroughputSamplerTask.java/buggy/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/sampler/ThroughputSamplerTask.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 3296, 751, 1435, 288, 202, 202, 1884, 261, 3198, 277, 273, 7712, 18, 9838, 5621, 277, 18, 5332, 2134, 5621, 13, 288, 5411, 18174, 7463, 1227, 1004, 273, 261, 23177, 7463, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3296, 751, 1435, 288, 202, 202, 1884, 261, 3198, 277, 273, 7712, 18, 9838, 5621, 277, 18, 5332, 2134, 5621, 13, 288, 5411, 18174, 7463, 1227, 1004, 273, 261, 23177, 7463, ...
public abstract void add(IPresentablePart newPart, IPresentablePartList output);
public abstract void add(IPresentablePart newPart);
public abstract void add(IPresentablePart newPart, IPresentablePartList output);
58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/a44e3679b294ff539fce71b7e835499b2c444fa7/TabOrder.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/util/TabOrder.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 8770, 918, 527, 12, 2579, 1581, 429, 1988, 394, 1988, 16, 5411, 2971, 1581, 429, 1988, 682, 876, 1769, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 8770, 918, 527, 12, 2579, 1581, 429, 1988, 394, 1988, 16, 5411, 2971, 1581, 429, 1988, 682, 876, 1769, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
_context.statManager().addRateData("udp.receivedACKs", acks.length, 0); for (int i = 0; i < acks.length; i++) { if (_log.shouldLog(Log.INFO)) _log.info("Full ACK of message " + acks[i] + " received!"); fragments += _outbound.acked(acks[i], from.getRemotePeer());
if (acks != null) { _context.statManager().addRateData("udp.receivedACKs", acks.length, 0); for (int i = 0; i < acks.length; i++) { if (_log.shouldLog(Log.INFO)) _log.info("Full ACK of message " + acks[i] + " received!"); fragments += _outbound.acked(acks[i], from.getRemotePeer()); } from.messageACKed(fragments * from.getMTU());
private void receiveACKs(PeerState from, UDPPacketReader.DataReader data) { if (data.readACKsIncluded()) { int fragments = 0; long acks[] = data.readACKs(); _context.statManager().addRateData("udp.receivedACKs", acks.length, 0); for (int i = 0; i < acks.length; i++) { if (_log.shouldLog(Log.INFO)) _log.info("Full ACK of message " + acks[i] + " received!"); fragments += _outbound.acked(acks[i], from.getRemotePeer()); } from.messageACKed(fragments * from.getMTU()); // estimated size } if (data.readECN()) from.ECNReceived(); else from.dataReceived(); }
27437 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/27437/9e5fe7d2b6b1021feed75ebf5156f3ae8688026f/InboundMessageFragments.java/buggy/router/java/src/net/i2p/router/transport/udp/InboundMessageFragments.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 6798, 3649, 87, 12, 6813, 1119, 628, 16, 16230, 6667, 2514, 18, 751, 2514, 501, 13, 288, 3639, 309, 261, 892, 18, 896, 3649, 87, 19323, 10756, 288, 5411, 509, 14656, 273, 374...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3649, 87, 12, 6813, 1119, 628, 16, 16230, 6667, 2514, 18, 751, 2514, 501, 13, 288, 3639, 309, 261, 892, 18, 896, 3649, 87, 19323, 10756, 288, 5411, 509, 14656, 273, 374...
public CompoundTransliterator(String ID, Transliterator[] transliterators,
public CompoundTransliterator(Transliterator[] transliterators,
public CompoundTransliterator(String ID, Transliterator[] transliterators, UnicodeFilter filter) { super(ID, filter); trans = new Transliterator[transliterators.length]; System.arraycopy(transliterators, 0, trans, 0, trans.length); }
5620 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5620/16730bea7366c1b77ba75842d5254daa82667371/CompoundTransliterator.java/buggy/icu4j/src/com/ibm/icu/text/CompoundTransliterator.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 21327, 3873, 9838, 12, 3873, 9838, 8526, 2162, 2165, 3062, 16, 21394, 9633, 1586, 1034, 13, 288, 3639, 2240, 12, 734, 16, 1034, 1769, 3639, 906, 273, 394, 8193, 9838, 63, 5379, 2165...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 21327, 3873, 9838, 12, 3873, 9838, 8526, 2162, 2165, 3062, 16, 21394, 9633, 1586, 1034, 13, 288, 3639, 2240, 12, 734, 16, 1034, 1769, 3639, 906, 273, 394, 8193, 9838, 63, 5379, 2165...
this.datasetSchemaName, schema, table
this.datasetSchemaName, table.getDataSetTable() .getName(), schema, table
private void doIt(DataSet ds, int totalDataSetCount) throws Exception { // Find the main table of the dataset. DataSetTable mainTable = null; for (Iterator i = ds.getTables().iterator(); i.hasNext() && mainTable == null;) { DataSetTable table = (DataSetTable) i.next(); if (table.getType().equals(DataSetTableType.MAIN)) mainTable = table; } // Work out if we are dealing with a main table that is in a group // schema. If it is, we make a list of all the schemas in the group, // otherwise the list is a singleton list containing the schema of // the main table. This list will be used later to merge schema // results together, unless partitioning by schema. Schema mainTableSchema = mainTable.getUnderlyingTable().getSchema(); Collection schemas = null; if (mainTableSchema instanceof SchemaGroup) schemas = ((SchemaGroup) mainTableSchema).getSchemas(); else schemas = Collections.singletonList(mainTableSchema); // Check not cancelled. this.checkCancelled(); // We have to make space to store the graph of actions we // must carry out. this.statusMessage = Resources.get("mcCreatingGraph"); MartConstructorActionGraph actionGraph = new MartConstructorActionGraph(); // Establish a root action for the graph. MartConstructorAction rootAction = new PlaceHolder( this.datasetSchemaName); actionGraph.addAction(rootAction); // Make a list to hold the table representations. List tables = new ArrayList(); // For each schema, we process all the tables. for (Iterator i = schemas.iterator(); i.hasNext();) { Schema schema = (Schema) i.next(); // Make a list of tables for this schema. List schemaTables = new ArrayList(); // Process the main table. MCDSTable table = new MCDSTable(mainTable, null); this.processTable(rootAction, actionGraph, mainTableSchema, schema, table); schemaTables.add(table); // Check not cancelled. this.checkCancelled(); // Set up a map to hold the last actions for each source table // we encounter. Map tableLastActions = new HashMap(); tableLastActions.put(mainTable, table.getLastActionPerformed()); // Set up a queue to hold all the subclass and dimension // relations we encounter. List relations = new ArrayList(mainTable.getPrimaryKey() .getRelations()); // Process all main dimensions and subclasses. for (int j = 0; j < relations.size(); j++) { Relation sourceRelation = (Relation) relations.get(j); DataSetTable sourceTable = (DataSetTable) sourceRelation .getOneKey().getTable(); DataSetTable targetTable = (DataSetTable) sourceRelation .getManyKey().getTable(); // Create the subclass or dimension table. table = new MCDSTable(targetTable, sourceRelation); this.processTable((MartConstructorAction) tableLastActions .get(sourceTable), actionGraph, mainTableSchema, schema, table); schemaTables.add(table); // Add target table to definitions list. tableLastActions.put(targetTable, table .getLastActionPerformed()); // Add further subclasses and dimensions to queue. relations .addAll(targetTable.getPrimaryKey().getRelations()); // Check not cancelled. this.checkCancelled(); } // If partitioning by schema, add schema name to partition // values on each table representation in schemaTables. if (ds.getPartitionOnSchema()) for (Iterator j = schemaTables.iterator(); j.hasNext();) ((MCDSTable) j.next()).getPartitionValues().add( schema.getName()); // Add tables for this schema to list of all tables. tables.addAll(schemaTables); } // Set up a break-point last action that waits for all // tables to complete. MartConstructorAction prePartitionAction = new PlaceHolder( this.datasetSchemaName); for (Iterator i = tables.iterator(); i.hasNext();) prePartitionAction.addParent(((MCDSTable) i.next()) .getLastActionPerformed()); actionGraph.addAction(prePartitionAction); // If not partitioning by schema, and main table schema is // a schema group, do a union on all schemas for each table. if (!ds.getPartitionOnSchema() && mainTableSchema instanceof SchemaGroup) { // Merge each set of tables. List unionTables = new ArrayList(); for (int i = 0; i < tables.size() / schemas.size(); i++) { List tableSchemasToUnion = new ArrayList(); List tablesToUnion = new ArrayList(); for (int j = i; j < tables.size(); j += schemas.size()) { tableSchemasToUnion.add(null); tablesToUnion.add(tables.get(j)); } // Create the MCDSTable entry for the union table. MCDSTable unionTable = new MCDSTable( ((MCDSTable) tablesToUnion.get(0)) .getDataSetTable(), ((MCDSTable) tablesToUnion.get(0)) .getParentDataSetRelation()); // Create a new union table based on tablesToUnion. // Action depends on prePartitionAction. MartConstructorAction union = new Union( this.datasetSchemaName, null, unionTable .getTempTableName(), tableSchemasToUnion, tablesToUnion); actionGraph.addActionWithParent(union, prePartitionAction); unionTable.setLastActionPerformed(union); // Add the union table to the list of unionTables. unionTables.add(unionTable); // Drop all the original tables that have been unioned now. for (int k = 0; k < tablesToUnion.size(); k++) { Schema schema = (Schema) tableSchemasToUnion.get(k); MCDSTable table = (MCDSTable) tablesToUnion.get(k); // Drop table. MartConstructorAction drop = new Drop( this.datasetSchemaName, schema, table .getTempTableName()); actionGraph.addActionWithParent(drop, union); } } tables.clear(); tables.addAll(unionTables); // Set up a break-point last action that waits again for all // tables to complete. prePartitionAction = new PlaceHolder(this.datasetSchemaName); for (Iterator i = tables.iterator(); i.hasNext();) prePartitionAction.addParent(((MCDSTable) i.next()) .getLastActionPerformed()); actionGraph.addAction(prePartitionAction); } // Partition all partitioned columns. for (Iterator i = ds.getPartitionedWrappedColumns().iterator(); i .hasNext();) { List preDropChildActions = new ArrayList(); WrappedColumn partCol = (WrappedColumn) i.next(); // Work out what partition values we will use. PartitionedColumnType partColType = ds .getPartitionedWrappedColumnType(partCol); List partValues = new ArrayList(); if (partColType instanceof SingleValue) { partValues.add(((SingleValue) partColType).getValue()); } else if (partColType instanceof ValueCollection) { partValues.addAll(((ValueCollection) partColType) .getValues()); if (((ValueCollection) partColType).getIncludeNull()) partValues.add(null); } else if (partColType instanceof UniqueValues) { partValues.addAll(this.helper.listDistinctValues(partCol .getWrappedColumn())); } // Do the partitioning. First, partition the table the column // belongs to. Then, partition every child, and every child // of every child, and so on recursively. // Look up the MCDSTable(s) containing the parent table. DataSetTable parentDSTable = (DataSetTable) partCol.getTable(); List parentTables = new ArrayList(); for (Iterator j = tables.iterator(); j.hasNext();) { MCDSTable table = (MCDSTable) j.next(); if (table.getDataSetTable().equals(parentDSTable)) parentTables.add(table); } // Construct the recursive list of child tables that will also // require partitioning. List tablesToPartition = new ArrayList(); tablesToPartition.add(parentDSTable); for (int j = 0; j < tablesToPartition.size(); j++) for (Iterator l = ((DataSetTable) tablesToPartition.get(j)) .getPrimaryKey().getRelations().iterator(); l .hasNext();) tablesToPartition.add((DataSetTable) ((Relation) l .next()).getManyKey().getTable()); // Keep track of the last partition we do on this column. MartConstructorAction lastPartitionAction = prePartitionAction; // Find all child MCDSTables. Child MCDSTables are // those where the dataset table matches any of the // tablesToPartition. This will result in grouped schema // tables being partitioned for every value in the group, // regardless of the values in their individual schemas. List tablesToReduce = new ArrayList(); for (Iterator j = tablesToPartition.iterator(); j.hasNext();) { DataSetTable childDSTable = (DataSetTable) j.next(); for (Iterator l = tables.iterator(); l.hasNext();) { MCDSTable childTable = (MCDSTable) l.next(); if (!childTable.getDataSetTable().equals(childDSTable)) continue; tablesToReduce.add(childTable); // Create an index over the foreign key columns of // each child table. MartConstructorAction index = new Index( this.datasetSchemaName, null, childTable .getTempTableName(), childTable .getParentDataSetRelation() .getManyKey().getColumns()); actionGraph.addActionWithParent(index, lastPartitionAction); lastPartitionAction = index; } } // For each parent table to be partitioned... for (Iterator j = parentTables.iterator(); j.hasNext();) { MCDSTable parentTable = (MCDSTable) j.next(); // Index the column to be partitioned. MartConstructorAction index = new Index( this.datasetSchemaName, null, parentTable .getTempTableName(), parentTable .getDataSetTable().getPrimaryKey() .getColumns()); actionGraph.addActionWithParent(index, lastPartitionAction); lastPartitionAction = index; // Partition the parent table. // Do the partitioning, one table per value. List reduceActions = new ArrayList(); for (Iterator k = partValues.iterator(); k.hasNext();) { Object partValue = k.next(); // Create an MCDSTable for the partitioned // value table. Add it to the list of all tables. MCDSTable partitionedTable = new MCDSTable(parentTable .getDataSetTable(), parentTable .getParentDataSetRelation()); partitionedTable.getPartitionValues().addAll( parentTable.getPartitionValues()); partitionedTable.getPartitionValues().add(partValue); tables.add(partitionedTable); // Partition the parent table for this value. MartConstructorAction partition = new Partition( this.datasetSchemaName, null, partitionedTable .getTempTableName(), null, parentTable .getTempTableName(), partCol.getName(), partValue); actionGraph.addActionWithParent(partition, lastPartitionAction); // Make the last action of each partitioned // table the partition action. partitionedTable.setLastActionPerformed(partition); // Create an index over the primary key columns of // the newly partitioned table. index = new Index(this.datasetSchemaName, null, partitionedTable.getTempTableName(), parentTable.getDataSetTable().getPrimaryKey() .getColumns()); actionGraph.addActionWithParent(index, partition); // For each child table, create a new MCDSTable // and generate it by doing a Reduce action. Add // the new MCDSTable to the list of all tables. for (Iterator l = tablesToReduce.iterator(); l .hasNext();) { MCDSTable childTable = (MCDSTable) l.next(); // Create an MCDSTable for the partitioned // child table. Add it to the list of all tables. MCDSTable reducedTable = new MCDSTable(childTable .getDataSetTable(), childTable .getParentDataSetRelation()); reducedTable.getPartitionValues().addAll( childTable.getPartitionValues()); reducedTable.getPartitionValues().add(partValue); tables.add(reducedTable); // Generate the table. MartConstructorAction reduce = new Reduce( this.datasetSchemaName, null, reducedTable .getTempTableName(), null, parentTable.getTempTableName(), parentTable .getDataSetTable().getPrimaryKey() .getColumns(), null, childTable .getTempTableName(), childTable .getParentDataSetRelation() .getManyKey().getColumns()); actionGraph.addActionWithParent(reduce, index); reduceActions.add(reduce); } } // Drop previous table. MartConstructorAction drop = new Drop( this.datasetSchemaName, null, parentTable .getTempTableName()); actionGraph.addActionWithParents(drop, reduceActions); preDropChildActions.addAll(reduceActions); } tables.removeAll(parentTables); // Drop original child tables. Reduced ones will have // taken their place now. for (Iterator j = tablesToReduce.iterator(); j.hasNext();) { MCDSTable table = (MCDSTable) j.next(); MartConstructorAction drop = new Drop( this.datasetSchemaName, null, table .getTempTableName()); actionGraph.addActionWithParents(drop, preDropChildActions); } tables.removeAll(tablesToReduce); } // Set up a break-point last action that waits again for all // tables to complete. MartConstructorAction prePKAction = new PlaceHolder( this.datasetSchemaName); for (Iterator i = tables.iterator(); i.hasNext();) prePKAction.addParent(((MCDSTable) i.next()) .getLastActionPerformed()); actionGraph.addAction(prePKAction); // Establish PKs and FKs. List pkFkActions = new ArrayList(); for (Iterator i = tables.iterator(); i.hasNext();) { MCDSTable parentTable = (MCDSTable) i.next(); List pkKeyCols = parentTable.getDataSetTable().getPrimaryKey() .getColumns(); // Create a PK over pkKeyCols. MartConstructorAction pk = new PK(this.datasetSchemaName, null, parentTable.getTempTableName(), pkKeyCols); actionGraph.addActionWithParent(pk, prePKAction); pkFkActions.add(pk); // Iterate over foreign keys from this PK. Key parentTablePK = parentTable.getDataSetTable() .getPrimaryKey(); for (Iterator j = parentTablePK.getRelations().iterator(); j .hasNext();) { Relation pkRel = (Relation) j.next(); DataSetTable fkTable = (DataSetTable) pkRel.getOtherKey( parentTablePK).getTable(); // For each one, find all MCDSTables involved in // that relation, and index and establish FK. for (Iterator k = tables.iterator(); k.hasNext();) { MCDSTable childTable = (MCDSTable) k.next(); if (!childTable.getDataSetTable().equals(fkTable)) continue; List parentPartitionValues = parentTable .getPartitionValues(); if (childTable.getPartitionValues().size() < parentPartitionValues .size()) continue; else if (!childTable.getPartitionValues().subList(0, parentPartitionValues.size()).equals( parentPartitionValues)) continue; Key foreignKey = (Key) childTable.getDataSetTable() .getForeignKeys().iterator().next(); List fkKeyCols = foreignKey.getColumns(); // Index fkKeyCols. MartConstructorAction index = new Index( this.datasetSchemaName, null, childTable .getTempTableName(), fkKeyCols); actionGraph.addActionWithParent(index, pk); // Create a FK over fkKeyCols. MartConstructorAction fk = new FK( this.datasetSchemaName, null, childTable .getTempTableName(), fkKeyCols, null, parentTable.getTempTableName(), pkKeyCols); actionGraph.addActionWithParent(fk, index); // Add action to list of pkFkActions. pkFkActions.add(fk); } } } // Set up a break-point last action that waits for all // foreign keys to complete. MartConstructorAction prePCOAction = new PlaceHolder( this.datasetSchemaName); for (Iterator i = pkFkActions.iterator(); i.hasNext();) prePCOAction.addParent((MartConstructorAction) i.next()); actionGraph.addAction(prePCOAction); // Post-construction optimisation. List optActions = new ArrayList(); DataSetOptimiserType optType = ds.getDataSetOptimiserType(); if (!optType.equals(DataSetOptimiserType.NONE)) { List hasTables = new ArrayList(); // We only need optimise all main and subclass tables. for (Iterator i = tables.iterator(); i.hasNext();) { MCDSTable parentTable = (MCDSTable) i.next(); if (parentTable.getDataSetTable().getType().equals( DataSetTableType.DIMENSION)) continue; // Make the dimension optimisations dependent on the // prePCOAction. MartConstructorAction preDOAction = prePCOAction; // If we are using column join, add columns to the // main or subclass table directly. MCDSTable hasTable = parentTable; // But if we are using table join, create a 'has' table // and add columns to that instead. if (optType.equals(DataSetOptimiserType.TABLE)) { hasTable = new MCDSHasTable(parentTable .getDataSetTable()); hasTables.add(hasTable); hasTable.getPartitionValues().addAll( parentTable.getPartitionValues()); // Work out what columns to include from the // main/subclass table. List pkKeyCols = parentTable.getDataSetTable() .getPrimaryKey().getColumns(); // Create the new 'has' table with the columns // from the main/subclass table. MartConstructorAction create = new Create( this.datasetSchemaName, null, hasTable .getTempTableName(), null, parentTable .getTempTableName(), pkKeyCols, false, null, false); actionGraph.addActionWithParent(create, preDOAction); // Create the PK on the 'has' table using the same // columns. MartConstructorAction pk = new PK( this.datasetSchemaName, null, hasTable .getTempTableName(), pkKeyCols); actionGraph.addActionWithParent(pk, create); // Create the FK on the same columns relating back // to the main/subclass table. MartConstructorAction fk = new FK( this.datasetSchemaName, null, hasTable .getTempTableName(), pkKeyCols, null, parentTable.getTempTableName(), pkKeyCols); actionGraph.addActionWithParent(fk, pk); preDOAction = fk; } // For each main or subclass table, identify all dimensions. for (Iterator j = tables.iterator(); j.hasNext();) { MCDSTable childTable = (MCDSTable) j.next(); if (!childTable.getDataSetTable().getType().equals( DataSetTableType.DIMENSION)) continue; else if (!childTable.getParentDataSetRelation() .getOneKey().getTable().equals(parentTable)) continue; // Child tables are tables that have the same child // dataset table, and start with the same sequence // of partition values as the parent table, possibly // with extra ones on the end. List parentPartitionValues = parentTable .getPartitionValues(); if (childTable.getPartitionValues().size() < parentPartitionValues .size()) continue; else if (!childTable.getPartitionValues().subList(0, parentPartitionValues.size()).equals( parentPartitionValues)) continue; // Work out 'has' column name. StringBuffer sb = new StringBuffer(); sb.append(childTable.createFinalName()); sb.append(Resources.get("tablenameSep")); sb.append(Resources.get("hasSuffix")); String hasColumnName = sb.toString(); // Add columns to the main or subclass table or // 'has' table. MartConstructorAction optimiseAdd = new OptimiseAddColumn( this.datasetSchemaName, null, childTable .getTempTableName(), hasColumnName); actionGraph.addActionWithParent(optimiseAdd, preDOAction); // Update those columns using inner join // on has table PK to dimension table FK. MartConstructorAction optimiseUpd = new OptimiseUpdateColumn( this.datasetSchemaName, null, childTable .getTempTableName(), childTable .getParentDataSetRelation() .getManyKey().getColumns(), null, parentTable.getTempTableName(), parentTable .getDataSetTable().getPrimaryKey() .getColumns(), hasColumnName); actionGraph.addActionWithParent(optimiseUpd, optimiseAdd); // Add final update to list of actions to wait for // before doing renames later. optActions.add(optimiseUpd); } } tables.addAll(hasTables); } // Set up a break-point last action that waits for all // optimisations to complete. MartConstructorAction preRenameAction = new PlaceHolder( this.datasetSchemaName); if (!optActions.isEmpty()) for (Iterator i = optActions.iterator(); i.hasNext();) preRenameAction.addParent((MartConstructorAction) i.next()); else preRenameAction.addParent(prePCOAction); actionGraph.addAction(preRenameAction); // Rename all tables. for (Iterator i = tables.iterator(); i.hasNext();) { MCDSTable table = (MCDSTable) i.next(); String realName = table.createFinalName(); String tempTableName = table.getTempTableName(); // Rename the table. MartConstructorAction rename = new Rename( this.datasetSchemaName, null, tempTableName, realName); actionGraph.addActionWithParent(rename, preRenameAction); } // Now we have constructed our action graph, issue events to // get the work done! // Work out the progress step size. double stepPercent = 100.0 / (double) actionGraph.getActions() .size(); // Divide the progress step size by the number of datasets. stepPercent /= (double) totalDataSetCount; // Initialize the helper, telling it we are about to start // sending it actions to process. this.issueListenerEvent(MartConstructorListener.DATASET_STARTED); try { // The action graph is tiered into several levels, called // depths. These levels are assigned automatically according // to the dependency of actions on other actions. We want // to start at the first depth (0), process all actions // there, then move on the next depth, and so on. Each depth // is reliant on the previous depth completing before it can // begin processing. int depth = 0; Collection actions = actionGraph.getActionsAtDepth(depth); while (!actions.isEmpty()) { // Loop over all actions at current depth. for (Iterator i = actions.iterator(); i.hasNext();) { MartConstructorAction action = (MartConstructorAction) i .next(); // Execute the action. this.statusMessage = action.getStatusMessage(); this.issueListenerEvent( MartConstructorListener.ACTION_EVENT, action); // Update the progress percentage. this.percentComplete += stepPercent; // Check not cancelled. this.checkCancelled(); } // Get next depth. actions = actionGraph.getActionsAtDepth(++depth); } } catch (Exception e) { // Pass any exceptions on up. throw e; } finally { // Make sure the helper always gets a chance to tidy up, // even if an exception is thrown. this.issueListenerEvent(MartConstructorListener.DATASET_ENDED); } }
2000 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2000/1a85b633207a8b1c4ea4af394422818beab7bbf9/MartConstructor.java/buggy/src/java/org/biomart/builder/model/MartConstructor.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 3196, 202, 1152, 918, 741, 7193, 12, 13676, 3780, 16, 509, 2078, 13676, 1380, 13, 1216, 1185, 288, 1082, 202, 759, 4163, 326, 2774, 1014, 434, 326, 3709, 18, 1082, 202, 13676, 1388, 2774, 1388...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 741, 7193, 12, 13676, 3780, 16, 509, 2078, 13676, 1380, 13, 1216, 1185, 288, 1082, 202, 759, 4163, 326, 2774, 1014, 434, 326, 3709, 18, 1082, 202, 13676, 1388, 2774, 1388...
public LispObject execute(LispObject args, Environment env)
public LispObject execute(LispObject plist, LispObject indicator)
public LispObject execute(LispObject args, Environment env) throws ConditionThrowable { return progn(args.cdr(), env, LispThread.currentThread()); }
8279 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8279/7a80a234ed70e008775e13a37b7ac5f337cc7fb2/Primitives.java/buggy/j/src/org/armedbear/lisp/Primitives.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 540, 1071, 511, 23831, 921, 1836, 12, 48, 23831, 921, 21074, 16, 511, 23831, 921, 10664, 13, 5411, 1216, 7949, 15155, 3639, 288, 5411, 327, 450, 1600, 12, 1968, 18, 71, 3069, 9334, 1550, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 540, 1071, 511, 23831, 921, 1836, 12, 48, 23831, 921, 21074, 16, 511, 23831, 921, 10664, 13, 5411, 1216, 7949, 15155, 3639, 288, 5411, 327, 450, 1600, 12, 1968, 18, 71, 3069, 9334, 1550, 16, ...
AuxiliaryGraph gu = new AuxiliaryGraph(graph, edgeList, u);
AuxiliaryGraph gu = new AuxiliaryGraph(graph, u);
public Map relevantCycles() { Map result = new HashMap(); boolean[][] a = getCycleEdgeIncidenceMatrix(); boolean[][] ai = inverseBinaryMatrix(a, cycles.size()); for (int i=0; i<cycles.size(); i++) { // Construct kernel vector u from a column of the inverse of a boolean[] u = new boolean[edgeList.size()]; for (int j=0; j<cycles.size(); j++) { u[j] = ai[j][i]; } // Construct auxiliary graph gu AuxiliaryGraph gu = new AuxiliaryGraph(graph, edgeList, u); Iterator vertexIterator = graph.vertexSet().iterator(); while (vertexIterator.hasNext()) { Object vertex = vertexIterator.next(); Collection incidentEdges = graph.edgesOf(vertex); // check if the vertex is incident to an edge with u[edge] == 1 boolean shouldSearchCycle = false; for (Iterator it = incidentEdges.iterator(); it.hasNext();) { Edge edge = (Edge) it.next(); int index = getEdgeIndex(edge); if (u[index]) { shouldSearchCycle = true; break; } } if (shouldSearchCycle) { Object auxVertex0 = gu.auxVertex0(vertex); Object auxVertex1 = gu.auxVertex1(vertex); // Search for shortest paths for (Iterator minPaths = new MinimalPathIterator(gu, auxVertex0, auxVertex1); minPaths.hasNext();) { List auxPath = (List) minPaths.next(); List edgesOfNewCycle = new ArrayList(auxPath.size()); Iterator edgeIterator = auxPath.iterator(); while (edgeIterator.hasNext()) { Edge auxEdge = (Edge) edgeIterator.next(); // Get the edge corresponding to the aux. edge Edge e = (Edge) gu.edge(auxEdge); edgesOfNewCycle.add(e); } SimpleCycle cycle = new SimpleCycle(graph, edgesOfNewCycle); if (cycle.weight() > ((SimpleCycle)cycles.get(i)).weight()) { break; } result.put(cycle, (SimpleCycle)cycles.get(i)); } } } } return result; }
46046 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46046/62b2e8b18d045a8937eb46b5692b7da726645ee4/SimpleCycleBasis.java/clean/src/org/openscience/cdk/ringsearch/cyclebasis/SimpleCycleBasis.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 1635, 9368, 17992, 9558, 1435, 288, 202, 202, 863, 563, 273, 394, 4317, 5621, 9506, 202, 6494, 63, 6362, 65, 279, 273, 1927, 3409, 6098, 14559, 10328, 4635, 5621, 9506, 202, 649...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1635, 9368, 17992, 9558, 1435, 288, 202, 202, 863, 563, 273, 394, 4317, 5621, 9506, 202, 6494, 63, 6362, 65, 279, 273, 1927, 3409, 6098, 14559, 10328, 4635, 5621, 9506, 202, 649...
public void delete(){ nativeEventThread = null; super.delete();}
47609 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47609/c51f266635955ea9a40fa057209a78cf7b0fb900/EventRegistrationImpl.java/buggy/java/webclient/classes_spec/org/mozilla/webclient/wrapper_native/EventRegistrationImpl.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1071, 918, 1430, 1435, 95, 565, 6448, 1133, 3830, 273, 446, 31, 3639, 2240, 18, 3733, 5621, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1071, 918, 1430, 1435, 95, 565, 6448, 1133, 3830, 273, 446, 31, 3639, 2240, 18, 3733, 5621, 97, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
@Override protected IStatus run(IProgressMonitor monitor) { try { bugzillaRepositoryConnector.attachContext(repository, modifiedTask, "", TasksUiPlugin .getDefault().getProxySettings()); } catch (Exception e) { MylarStatusHandler.fail(e, "Failed to attach task context.\n\n"+e.getMessage(), true);
final AbstractRepositoryTask modifiedTask = (AbstractRepositoryTask) TasksUiPlugin .getTaskListManager() .getTaskList() .getTask( AbstractRepositoryTask.getHandle(repository.getUrl(), taskData.getId())); IWorkbench wb = PlatformUI.getWorkbench(); IProgressService ps = wb.getProgressService(); try { ps.busyCursorWhile(new IRunnableWithProgress() { public void run(IProgressMonitor pm) { try { bugzillaRepositoryConnector.attachContext(repository, modifiedTask, "", TasksUiPlugin.getDefault().getProxySettings()); } catch (Exception e) { MylarStatusHandler.fail(e, "Failed to attach task context.\n\n" + e.getMessage(), true); }
public void done(final IJobChangeEvent event) { PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { public void run() { if (event.getJob().getResult().getCode() == Status.OK && event.getJob().getResult().getMessage() != null) {// // Attach context if (getAttachContext()) { final AbstractRepositoryTask modifiedTask = (AbstractRepositoryTask) TasksUiPlugin.getTaskListManager() .getTaskList().getTask(AbstractRepositoryTask.getHandle(repository.getUrl(), taskData.getId())); Job uploadContext = new Job("Uploading Context") { @Override protected IStatus run(IProgressMonitor monitor) { try { bugzillaRepositoryConnector.attachContext(repository, modifiedTask, "", TasksUiPlugin .getDefault().getProxySettings()); } catch (Exception e) { MylarStatusHandler.fail(e, "Failed to attach task context.\n\n"+e.getMessage(), true); } return Status.OK_STATUS; } }; uploadContext.schedule(); } close(); return; } else if (event.getJob().getResult().getCode() == Status.INFO) { WebBrowserDialog.openAcceptAgreement(null, IBugzillaConstants.REPORT_SUBMIT_ERROR, event .getJob().getResult().getMessage(), event.getJob().getResult().getException() .getMessage()); submitButton.setEnabled(true); BugzillaTaskEditor.this.showBusy(false); } else if (event.getJob().getResult().getCode() == Status.ERROR) { MessageDialog.openError(null, IBugzillaConstants.REPORT_SUBMIT_ERROR, event.getResult() .getMessage()); submitButton.setEnabled(true); BugzillaTaskEditor.this.showBusy(false); } } }); }
51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/10919cac691ac37375e9b5f52fa25ae417fab656/BugzillaTaskEditor.java/buggy/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditor.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1875, 202, 482, 918, 2731, 12, 6385, 467, 2278, 20930, 871, 13, 288, 9506, 202, 8201, 5370, 18, 588, 2421, 22144, 7675, 588, 4236, 7675, 3810, 1905, 12, 2704, 10254, 1435, 288, 6862, 202, 482,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1875, 202, 482, 918, 2731, 12, 6385, 467, 2278, 20930, 871, 13, 288, 9506, 202, 8201, 5370, 18, 588, 2421, 22144, 7675, 588, 4236, 7675, 3810, 1905, 12, 2704, 10254, 1435, 288, 6862, 202, 482,...
public void parse(String systemId)
public void parse(InputSource source)
public void parse(String systemId) throws SAXException, IOException { InputSource source = new InputSource(systemId); parse(source); try { Reader reader = source.getCharacterStream(); if (reader != null) { reader.close(); } else { InputStream is = source.getByteStream(); if (is != null) { is.close(); } } } catch (IOException e) { // ignore } } // parse(String)
1831 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1831/499d8ac06818ae1412d09640e82aacb2dbc05c25/XMLParser.java/buggy/src/org/apache/xerces/framework/XMLParser.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1109, 12, 1210, 1830, 1084, 13, 3639, 1216, 14366, 16, 1860, 288, 3639, 23699, 1084, 273, 394, 23699, 12, 4299, 548, 1769, 3639, 1109, 12, 3168, 1769, 3639, 775, 288, 5411, 539...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1109, 12, 1210, 1830, 1084, 13, 3639, 1216, 14366, 16, 1860, 288, 3639, 23699, 1084, 273, 394, 23699, 12, 4299, 548, 1769, 3639, 1109, 12, 3168, 1769, 3639, 775, 288, 5411, 539...
public static Map getInterfaceInfoFromIfLabel(int nodeId, String ifLabel)
public static Map getInterfaceInfoFromIfLabel(Connection conn, int nodeId, String ifLabel)
public static Map getInterfaceInfoFromIfLabel(int nodeId, String ifLabel) throws SQLException { Connection conn = Vault.getDbConnection(); Map info = null; try { info = getInterfaceInfoFromIfLabel(conn, nodeId, ifLabel); } finally { Vault.releaseDbConnection(conn); } // The map will remain null if the information was not located in the DB. return info; }
25465 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/25465/538a112eb542e9421bb6c96cdc488707519541d8/IfLabel.java/buggy/src/services/org/opennms/netmgt/utils/IfLabel.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 760, 1635, 336, 1358, 966, 1265, 2047, 2224, 12, 474, 11507, 16, 514, 309, 2224, 13, 202, 202, 15069, 6483, 202, 95, 202, 202, 1952, 1487, 273, 17329, 18, 588, 4331, 1952, 562...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 760, 1635, 336, 1358, 966, 1265, 2047, 2224, 12, 474, 11507, 16, 514, 309, 2224, 13, 202, 202, 15069, 6483, 202, 95, 202, 202, 1952, 1487, 273, 17329, 18, 588, 4331, 1952, 562...
ch = text.charAt( index ); if ( ch ==']' && index + 2 < length && text.charAt (index + 1) == ']' && text.charAt (index + 2) == '>' ) { if (fFeatures != null && fDOMErrorHandler != null) { if (!getFeature(Constants.DOM_SPLIT_CDATA)) { String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.SERIALIZER_DOMAIN, "EndingCDATA", null); modifyDOMError(msg, DOMError.SEVERITY_FATAL_ERROR, fCurrentNode); boolean continueProcess = fDOMErrorHandler.handleError(fDOMError); if (!continueProcess) { throw new IOException(); } } else { String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.SERIALIZER_DOMAIN, "SplittingCDATA", null); modifyDOMError(msg, DOMError.SEVERITY_WARNING, fCurrentNode);
ch = text.charAt( index ); if (ch == ']' && index + 2 < length && text.charAt(index + 1) == ']' && text.charAt(index + 2) == '>') { if (fDOMErrorHandler != null){ if ((features & DOMSerializerImpl.SPLITCDATA) == 0 && (features & DOMSerializerImpl.WELLFORMED) == 0) { String msg = DOMMessageFormatter.formatMessage( DOMMessageFormatter.SERIALIZER_DOMAIN, "EndingCDATA", null); modifyDOMError( msg, DOMError.SEVERITY_FATAL_ERROR, fCurrentNode); boolean continueProcess =
protected void printCDATAText( String text ) throws IOException { int length = text.length(); char ch; for ( int index = 0 ; index < length; ++index ) { ch = text.charAt( index ); if ( ch ==']' && index + 2 < length && text.charAt (index + 1) == ']' && text.charAt (index + 2) == '>' ) { // check for ']]>' // DOM Level 3 Load and Save // if (fFeatures != null && fDOMErrorHandler != null) { if (!getFeature(Constants.DOM_SPLIT_CDATA)) { // issue fatal error String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.SERIALIZER_DOMAIN, "EndingCDATA", null); modifyDOMError(msg, DOMError.SEVERITY_FATAL_ERROR, fCurrentNode); boolean continueProcess = fDOMErrorHandler.handleError(fDOMError); if (!continueProcess) { throw new IOException(); } } else { // issue warning String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.SERIALIZER_DOMAIN, "SplittingCDATA", null); modifyDOMError(msg, DOMError.SEVERITY_WARNING, fCurrentNode); fDOMErrorHandler.handleError(fDOMError); } } // split CDATA section _printer.printText("]]]]><![CDATA[>"); index +=2; continue; } if (!XMLChar.isValid(ch)) { // check if it is surrogate if (++index <length) { surrogates(ch, text.charAt(index)); } else { fatalError("The character '"+(char)ch+"' is an invalid XML character"); } continue; } else { if ( ( ch >= ' ' && _encodingInfo.isPrintable((char)ch) && ch != 0xF7 ) || ch == '\n' || ch == '\r' || ch == '\t' ) { _printer.printText((char)ch); } else { // The character is not printable -- split CDATA section _printer.printText("]]>&#x"); _printer.printText(Integer.toHexString(ch)); _printer.printText(";<![CDATA["); } } } }
46079 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46079/546f416633ed944307d047af867715947693cfc1/BaseMarkupSerializer.java/clean/src/org/apache/xml/serialize/BaseMarkupSerializer.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 918, 1172, 10160, 789, 789, 408, 12, 514, 977, 262, 1216, 1860, 288, 3639, 509, 769, 273, 977, 18, 2469, 5621, 3639, 1149, 462, 31, 3639, 364, 261, 509, 770, 273, 374, 274, 770, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 918, 1172, 10160, 789, 789, 408, 12, 514, 977, 262, 1216, 1860, 288, 3639, 509, 769, 273, 977, 18, 2469, 5621, 3639, 1149, 462, 31, 3639, 364, 261, 509, 770, 273, 374, 274, 770, ...
clientgui.bv.drawMovementData(ce(), cmd);
clientgui.bv.drawMovementData(ce, cmd);
public void boardHexMoused(BoardEvent b) { // Are we ignoring events? if ( this.isIgnoringEvents() ) { return; } // ignore buttons other than 1 if (!client.isMyTurn() || (b.getModifiers() & MouseEvent.BUTTON1_MASK) == 0) { return; } // control pressed means a line of sight check. // added ALT_MASK by kenn if ((b.getModifiers() & InputEvent.CTRL_MASK) != 0 || (b.getModifiers() & InputEvent.ALT_MASK) != 0) { return; } // check for shifty goodness if (shiftheld != ((b.getModifiers() & MouseEvent.SHIFT_MASK) != 0)) { shiftheld = (b.getModifiers() & MouseEvent.SHIFT_MASK) != 0; } if (b.getType() == BoardEvent.BOARD_HEX_DRAGGED) { if (!b.getCoords().equals(client.game.board.lastCursor) || shiftheld || gear == MovementDisplay.GEAR_TURN) { client.game.board.cursor(b.getCoords()); // either turn or move if ( ce() != null) { currentMove(b.getCoords()); clientgui.bv.drawMovementData(ce(), cmd); } } } else if (b.getType() == BoardEvent.BOARD_HEX_CLICKED) { Coords moveto = b.getCoords(); clientgui.bv.drawMovementData(ce(), cmd); client.game.board.select(b.getCoords()); if (shiftheld || gear == MovementDisplay.GEAR_TURN) { butDone.setLabel("Move"); return; } if (gear == MovementDisplay.GEAR_CHARGE) { // check if target is valid final Targetable target = this.chooseTarget( b.getCoords() ); if (target == null || target.equals(ce())) { clientgui.doAlertDialog("Can't perform charge", "No target!"); clearAllMoves(); return; } // check if it's a valid charge ToHitData toHit = new ChargeAttackAction(cen, target.getTargetType(), target.getTargetId(), target.getPosition()).toHit(client.game, cmd); if (toHit.getValue() != ToHitData.IMPOSSIBLE) { // Determine how much damage the charger will take. int toAttacker = 0; if ( target.getTargetType() == Targetable.TYPE_ENTITY ) { Entity te = (Entity) target; toAttacker = ChargeAttackAction.getDamageTakenBy(ce(),te, client.game.getOptions().booleanOption("maxtech_charge_damage"), cmd.getHexesMoved()); } else if ( target.getTargetType() == Targetable.TYPE_BUILDING ) { Building bldg = client.game.board.getBuildingAt ( moveto ); toAttacker = ChargeAttackAction.getDamageTakenBy(ce(),bldg); } // Ask the player if they want to charge. if ( clientgui.doYesNoDialog ( "Charge " + target.getDisplayName() + "?", "To Hit: " + toHit.getValueAsString() + " (" + Compute.oddsAbove(toHit.getValue()) + "%) (" + toHit.getDesc() + ")" + "\nDamage to Target: "+ ChargeAttackAction.getDamageFor(ce(),cmd.getHexesMoved())+ " (in 5pt clusters)"+ toHit.getTableDesc() + "\nDamage to Self: " + toAttacker + " (in 5pt clusters)" ) ) { // if they answer yes, charge the target. cmd.getLastStep().setTarget(target); moveTo(cmd); } else { // else clear movement clearAllMoves(); }; return; } else { // if not valid, tell why clientgui.doAlertDialog( "Can't perform charge", toHit.getDesc() ); clearAllMoves(); return; } } else if (gear == MovementDisplay.GEAR_DFA) { // check if target is valid final Targetable target = this.chooseTarget( b.getCoords() ); if (target == null || target.equals(ce())) { clientgui.doAlertDialog("Can't perform D.F.A.", "No target!"); clearAllMoves(); return; } // check if it's a valid DFA ToHitData toHit = DfaAttackAction.toHit( client.game, cen, target, cmd); if (toHit.getValue() != ToHitData.IMPOSSIBLE) { // if yes, ask them if they want to DFA if ( clientgui.doYesNoDialog ( "D.F.A. " + target.getDisplayName() + "?", "To Hit: " + toHit.getValueAsString() + " (" + Compute.oddsAbove(toHit.getValue()) + "%) (" + toHit.getDesc() + ")" + "\nDamage to Target: " + DfaAttackAction.getDamageFor(ce()) + " (in 5pt clusters)" + toHit.getTableDesc() + "\nDamage to Self: " + DfaAttackAction.getDamageTakenBy(ce()) + " (in 5pt clusters) (using Kick table)" ) ) { // if they answer yes, DFA the target cmd.getLastStep().setTarget(target); moveTo(cmd); } else { // else clear movement clearAllMoves(); }; return; } else { // if not valid, tell why clientgui.doAlertDialog( "Can't perform D.F.A.", toHit.getDesc() ); clearAllMoves(); return; } } butDone.setLabel("Move"); updateProneButtons(); updateRACButton(); updateLoadButtons(); } }
3464 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3464/0bcdeb0f45ab5ce89927be8a8c7c1c35c012d562/MovementDisplay.java/buggy/megamek/src/megamek/client/ui/AWT/MovementDisplay.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 11094, 7037, 49, 21414, 12, 22233, 1133, 324, 13, 288, 3639, 368, 12520, 732, 14398, 2641, 35, 3639, 309, 261, 333, 18, 291, 21702, 3783, 1435, 262, 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, 11094, 7037, 49, 21414, 12, 22233, 1133, 324, 13, 288, 3639, 368, 12520, 732, 14398, 2641, 35, 3639, 309, 261, 333, 18, 291, 21702, 3783, 1435, 262, 288, 5411, 327, 31, 3639, ...
preReplaceChild(this.leftOperand, expression, LEFT_OPERAND_PROPERTY);
ASTNode oldChild = this.leftOperand; preReplaceChild(oldChild, expression, LEFT_OPERAND_PROPERTY);
public void setLeftOperand(Expression expression) { if (expression == null) { throw new IllegalArgumentException(); } preReplaceChild(this.leftOperand, expression, LEFT_OPERAND_PROPERTY); this.leftOperand = expression; postReplaceChild(this.leftOperand, expression, LEFT_OPERAND_PROPERTY); }
10698 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10698/38b81cceafabaca157320ce2793e74f4a9686fd7/InstanceofExpression.java/buggy/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/InstanceofExpression.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 444, 3910, 10265, 12, 2300, 2652, 13, 288, 202, 202, 430, 261, 8692, 422, 446, 13, 288, 1082, 202, 12849, 394, 2754, 5621, 202, 202, 97, 202, 202, 1484, 5729, 1763, 12, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 444, 3910, 10265, 12, 2300, 2652, 13, 288, 202, 202, 430, 261, 8692, 422, 446, 13, 288, 1082, 202, 12849, 394, 2754, 5621, 202, 202, 97, 202, 202, 1484, 5729, 1763, 12, ...
_context.jobQueue().addJob(new HandleGatewayMessageJob(msg, info, data.length));
getContext().jobQueue().addJob(new HandleGatewayMessageJob(msg, info, data.length));
public void runJob() { TunnelId id = _message.getTunnelId(); long excessLag = _context.clock().now() - _message.getMessageExpiration().getTime(); if (excessLag > Router.CLOCK_FUDGE_FACTOR) { // expired while on the queue if (_log.shouldLog(Log.WARN)) _log.warn("Accepted message (" + _message.getUniqueId() + ") expired on the queue for tunnel " + id.getTunnelId() + " expiring " + excessLag + "ms ago"); _context.statManager().addRateData("tunnel.expiredAfterAcceptTime", excessLag, excessLag); _context.messageHistory().messageProcessingError(_message.getUniqueId(), TunnelMessage.class.getName(), "tunnel message expired on the queue"); return; } else if (excessLag > 0) { // almost expired while on the queue if (_log.shouldLog(Log.WARN)) _log.warn("Accepted message (" + _message.getUniqueId() + ") *almost* expired on the queue for tunnel " + id.getTunnelId() + " expiring " + excessLag + "ms ago"); } TunnelInfo info = _context.tunnelManager().getTunnelInfo(id); if (info == null) { Hash from = _fromHash; if (_from != null) from = _from.getHash(); _context.messageHistory().droppedTunnelMessage(id, from); if (_log.shouldLog(Log.ERROR)) _log.error("Received a message for an unknown tunnel [" + id.getTunnelId() + "], dropping it: " + _message, getAddedBy()); long timeRemaining = _message.getMessageExpiration().getTime() - _context.clock().now(); _context.statManager().addRateData("tunnel.unknownTunnelTimeLeft", timeRemaining, 0); return; } info.messageProcessed(); info = getUs(info); if (info == null) { if (_log.shouldLog(Log.ERROR)) _log.error("We are not part of a known tunnel?? wtf! drop.", getAddedBy()); long timeRemaining = _message.getMessageExpiration().getTime() - _context.clock().now(); _context.statManager().addRateData("tunnel.unknownTunnelTimeLeft", timeRemaining, 0); return; } else { if (_log.shouldLog(Log.DEBUG)) _log.debug("Tunnel message received for tunnel: \n" + info); } //if ( (_message.getVerificationStructure() == null) && (info.getSigningKey() != null) ) { if (_message.getVerificationStructure() == null) { if (info.getSigningKey() != null) { if (info.getNextHop() != null) { if (_log.shouldLog(Log.DEBUG)) _log.debug("We are the gateway to tunnel " + id.getTunnelId()); byte data[] = _message.getData(); I2NPMessage msg = getBody(data); _context.jobQueue().addJob(new HandleGatewayMessageJob(msg, info, data.length)); return; } else { if (_log.shouldLog(Log.DEBUG)) _log.debug("We are the gateway and the endpoint for tunnel " + id.getTunnelId()); if (_log.shouldLog(Log.DEBUG)) _log.debug("Process locally"); if (info.getDestination() != null) { if (!_context.clientManager().isLocal(info.getDestination())) { if (_log.shouldLog(Log.WARN)) _log.warn("Received a message on a tunnel allocated to a client that has disconnected - dropping it!"); if (_log.shouldLog(Log.DEBUG)) _log.debug("Dropping message for disconnected client: " + _message); _context.messageHistory().droppedOtherMessage(_message); _context.messageHistory().messageProcessingError(_message.getUniqueId(), _message.getClass().getName(), "Disconnected client"); return; } } I2NPMessage body = getBody(_message.getData()); if (body != null) { _context.jobQueue().addJob(new HandleLocallyJob(body, info)); return; } else { if (_log.shouldLog(Log.ERROR)) _log.error("Body is null! content of message.getData() = [" + DataHelper.toString(_message.getData()) + "]", getAddedBy()); if (_log.shouldLog(Log.DEBUG)) _log.debug("Message that failed: " + _message, getAddedBy()); return; } } } else { if (_log.shouldLog(Log.ERROR)) _log.error("Received a message that we are not the gateway for on tunnel " + id.getTunnelId() + " without a verification structure: " + _message, getAddedBy()); return; } } else { // participant TunnelVerificationStructure struct = _message.getVerificationStructure(); boolean ok = struct.verifySignature(_context, info.getVerificationKey().getKey()); if (!ok) { if (_log.shouldLog(Log.WARN)) _log.warn("Failed tunnel verification! Spoofing / tagging attack? " + _message, getAddedBy()); return; } else { if (info.getNextHop() != null) { if (_log.shouldLog(Log.INFO)) _log.info("Message for tunnel " + id.getTunnelId() + " received where we're not the gateway and there are remaining hops, so forward it on to " + info.getNextHop().toBase64() + " via SendTunnelMessageJob"); _context.statManager().addRateData("tunnel.relayMessageSize", _message.getData().length, 0); _context.jobQueue().addJob(new SendMessageDirectJob(_context, _message, info.getNextHop(), _context.clock().now() + FORWARD_TIMEOUT, FORWARD_PRIORITY)); return; } else { if (_log.shouldLog(Log.DEBUG)) _log.debug("No more hops, unwrap and follow the instructions"); _context.jobQueue().addJob(new HandleEndpointJob(info)); return; } } } }
3808 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3808/e737e5c9507ed0d463dc9e45a8f63657f466b177/HandleTunnelMessageJob.java/clean/router/java/src/net/i2p/router/message/HandleTunnelMessageJob.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1086, 2278, 1435, 288, 3639, 399, 8564, 548, 612, 273, 389, 2150, 18, 588, 20329, 548, 5621, 3639, 1525, 23183, 26093, 273, 389, 2472, 18, 18517, 7675, 3338, 1435, 300, 389, 21...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1086, 2278, 1435, 288, 3639, 399, 8564, 548, 612, 273, 389, 2150, 18, 588, 20329, 548, 5621, 3639, 1525, 23183, 26093, 273, 389, 2472, 18, 18517, 7675, 3338, 1435, 300, 389, 21...
if ( result == null ) return;
if (result == null) return;
protected void post( String input, String name, int len, String contentType ) { String result = doPost( input, name ); if ( result == null ) return; try { DataOutputStream out = new DataOutputStream( new BufferedOutputStream( sock .getOutputStream( ) ) ); out.writeBytes( "HTTP/1.0 200 OK\n" + stdHeaders + "Content-Type: text/xml\n" + "Content-Length: " + result.length( ) + "\n\n" ); byte[] resultData = result.getBytes( "UTF8" ); out.write( resultData, 0, resultData.length ); out.flush( ); out.close( ); } catch ( IOException io ) { HttpServer.LOG.warn( io ); } }
2909 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2909/ad9d55f515de2cb1fa50cf09c9e42150efc8374f/HttpServerConnection.java/buggy/src/org/exist/http/HttpServerConnection.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 918, 1603, 12, 514, 810, 16, 514, 508, 16, 509, 562, 16, 514, 5064, 262, 288, 3639, 514, 563, 273, 741, 3349, 12, 810, 16, 508, 11272, 3639, 309, 261, 563, 422, 446, 262, 5411, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 918, 1603, 12, 514, 810, 16, 514, 508, 16, 509, 562, 16, 514, 5064, 262, 288, 3639, 514, 563, 273, 741, 3349, 12, 810, 16, 508, 11272, 3639, 309, 261, 563, 422, 446, 262, 5411, ...
List<AntTarget> targets = new ArrayList<AntTarget>();
final List<AntTarget> targets = new ArrayList<AntTarget>();
private AntTarget[] getDependsTargets() { if (myDependsTargets == null) { List<AntTarget> targets = new ArrayList<AntTarget>(); for (AntElement element : getChildren()) { if (element instanceof AntTarget) { targets.add((AntTarget)element); } } myDependsTargets = targets.toArray(new AntTarget[targets.size()]); } return myDependsTargets; }
56627 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56627/8db64e6f6295a85b1ed9bb2320343787f08b11ba/AntCallImpl.java/clean/plugins/ant/src/com/intellij/lang/ant/psi/impl/AntCallImpl.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 3238, 18830, 2326, 8526, 336, 4584, 87, 9432, 1435, 288, 565, 309, 261, 4811, 4584, 87, 9432, 422, 446, 13, 288, 1377, 727, 987, 32, 14925, 2326, 34, 5774, 273, 394, 2407, 32, 14925, 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, 282, 3238, 18830, 2326, 8526, 336, 4584, 87, 9432, 1435, 288, 565, 309, 261, 4811, 4584, 87, 9432, 422, 446, 13, 288, 1377, 727, 987, 32, 14925, 2326, 34, 5774, 273, 394, 2407, 32, 14925, 23...
try { if ((urlQueryString.length() + newurlQueryString.length() + IBugzillaConstants.CONTENT_TYPE_RDF .length()) > MAX_URL_LENGTH) { urlQueryString += IBugzillaConstants.CONTENT_TYPE_RDF; queryForChanged(repository, changedTasks, urlQueryString); queryCounter = 0; urlQueryString = new String(urlQueryBase); urlQueryString += "&field0-0-" + queryCounter + "=bug_id&type0-0-" + queryCounter + "=equals&value0-0-" + queryCounter + "=" + AbstractRepositoryTask.getTaskId(task.getHandleIdentifier()); } else if (!itr.hasNext()) { urlQueryString += newurlQueryString; urlQueryString += IBugzillaConstants.CONTENT_TYPE_RDF; queryForChanged(repository, changedTasks, urlQueryString); } else { urlQueryString += newurlQueryString; } } catch (SocketTimeoutException e) { MylarStatusHandler.log("Timeout occurred while retrieving reports from " + repository.getUrl() + ", will synchronize all reports.", this); } catch (Exception e) { MylarStatusHandler.log(e, "Mylar: Error retrieving reports from " + repository.getUrl() + ", will synchronize all reports."); return tasks;
if ((urlQueryString.length() + newurlQueryString.length() + IBugzillaConstants.CONTENT_TYPE_RDF.length()) > MAX_URL_LENGTH) { urlQueryString += IBugzillaConstants.CONTENT_TYPE_RDF; queryForChanged(repository, changedTasks, urlQueryString); queryCounter = 0; urlQueryString = new String(urlQueryBase); urlQueryString += "&field0-0-" + queryCounter + "=bug_id&type0-0-" + queryCounter + "=equals&value0-0-" + queryCounter + "=" + AbstractRepositoryTask.getTaskId(task.getHandleIdentifier()); } else if (!itr.hasNext()) { urlQueryString += newurlQueryString; urlQueryString += IBugzillaConstants.CONTENT_TYPE_RDF; queryForChanged(repository, changedTasks, urlQueryString); } else { urlQueryString += newurlQueryString;
public Set<AbstractRepositoryTask> getChangedSinceLastSync(TaskRepository repository, Set<AbstractRepositoryTask> tasks) { Set<AbstractRepositoryTask> changedTasks = new HashSet<AbstractRepositoryTask>(); if (repository.getSyncTime() == null) { return tasks; } TimeZone timeZone = TimeZone.getTimeZone(repository.getTimeZoneId()); if (!timeZone.getID().equals(repository.getTimeZoneId())) { MylarStatusHandler.log("Mylar: Specified time zone not available, using GMT. Check repository settings in " + TaskRepositoriesView.NAME + ".", BugzillaRepositoryConnector.class); } String dateString = DateUtil.getZoneFormattedDate(timeZone, repository.getSyncTime(), CHANGED_BUGS_START_DATE_LONG); String urlQueryBase; String urlQueryString; try { urlQueryBase = repository.getUrl() + CHANGED_BUGS_CGI_QUERY + URLEncoder.encode(dateString, repository.getCharacterEncoding()) + CHANGED_BUGS_CGI_ENDDATE; } catch (UnsupportedEncodingException e1) { MylarStatusHandler.log(e1, "Mylar: Check encoding settings in " + TaskRepositoriesView.NAME + "."); urlQueryBase = repository.getUrl() + CHANGED_BUGS_CGI_QUERY + DateUtil.getZoneFormattedDate(timeZone, repository.getSyncTime(), CHANGED_BUGS_START_DATE_SHORT) + CHANGED_BUGS_CGI_ENDDATE; } urlQueryString = new String(urlQueryBase); int queryCounter = -1; Iterator itr = tasks.iterator(); while (itr.hasNext()) { queryCounter++; ITask task = (ITask) itr.next(); String newurlQueryString = "&field0-0-" + queryCounter + "=bug_id&type0-0-" + queryCounter + "=equals&value0-0-" + queryCounter + "=" + AbstractRepositoryTask.getTaskId(task.getHandleIdentifier()); try { if ((urlQueryString.length() + newurlQueryString.length() + IBugzillaConstants.CONTENT_TYPE_RDF .length()) > MAX_URL_LENGTH) { urlQueryString += IBugzillaConstants.CONTENT_TYPE_RDF; queryForChanged(repository, changedTasks, urlQueryString); queryCounter = 0; urlQueryString = new String(urlQueryBase); urlQueryString += "&field0-0-" + queryCounter + "=bug_id&type0-0-" + queryCounter + "=equals&value0-0-" + queryCounter + "=" + AbstractRepositoryTask.getTaskId(task.getHandleIdentifier()); } else if (!itr.hasNext()) { urlQueryString += newurlQueryString; urlQueryString += IBugzillaConstants.CONTENT_TYPE_RDF; queryForChanged(repository, changedTasks, urlQueryString); } else { urlQueryString += newurlQueryString; } } catch (SocketTimeoutException e) { MylarStatusHandler.log("Timeout occurred while retrieving reports from " + repository.getUrl() + ", will synchronize all reports.", this); } catch (Exception e) { MylarStatusHandler.log(e, "Mylar: Error retrieving reports from " + repository.getUrl() + ", will synchronize all reports."); return tasks; } } return changedTasks; }
51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/860609d12c3ae8ec3d323180e3fec1a355fce67f/BugzillaRepositoryConnector.java/buggy/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaRepositoryConnector.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 1000, 32, 7469, 3305, 2174, 34, 336, 5033, 9673, 3024, 4047, 12, 2174, 3305, 3352, 16, 1082, 202, 694, 32, 7469, 3305, 2174, 34, 4592, 13, 288, 202, 202, 694, 32, 7469, 3305, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1000, 32, 7469, 3305, 2174, 34, 336, 5033, 9673, 3024, 4047, 12, 2174, 3305, 3352, 16, 1082, 202, 694, 32, 7469, 3305, 2174, 34, 4592, 13, 288, 202, 202, 694, 32, 7469, 3305, ...
final Language language) {
final Language language, final boolean ignoreAlignment) {
public static Whitespace getWhiteSpaceBeforeToken(final ASTNode tokenNode, final Language language) { LOG.assertTrue(tokenNode != null); final PsiElement secondAsPsiElement = SourceTreeToPsiMap.treeElementToPsi(tokenNode); LOG.assertTrue(secondAsPsiElement != null); final PsiFile file = secondAsPsiElement.getContainingFile(); final PseudoTextBuilder pseudoTextBuilder = language.getFormatter(); LOG.assertTrue(pseudoTextBuilder != null); final Project project = secondAsPsiElement.getProject(); final CodeStyleSettings settings = CodeStyleSettingsManager.getInstance(project).getCurrentSettings(); final int endOffset = tokenNode.getStartOffset(); final boolean oldValue = settings.XML_KEEP_LINE_BREAKS; settings.XML_KEEP_LINE_BREAKS = false; try { final PseudoText pseudoText = pseudoTextBuilder.build(project, settings, file); return GeneralCodeFormatter.getWhiteSpaceBetweenTokens(pseudoText, settings, file.getFileType(), endOffset); } finally { settings.XML_KEEP_LINE_BREAKS = oldValue; } }
17306 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17306/c54d4d46e0231ea73148df24749fe6318f0ba82c/CodeEditUtil.java/buggy/source/com/intellij/psi/impl/source/codeStyle/CodeEditUtil.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 760, 3497, 5211, 336, 23108, 4649, 1345, 12, 6385, 9183, 907, 1147, 907, 16, 4766, 5375, 727, 9889, 2653, 16, 727, 1250, 2305, 11535, 13, 288, 565, 2018, 18, 11231, 5510, 12, 2316, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 760, 3497, 5211, 336, 23108, 4649, 1345, 12, 6385, 9183, 907, 1147, 907, 16, 4766, 5375, 727, 9889, 2653, 16, 727, 1250, 2305, 11535, 13, 288, 565, 2018, 18, 11231, 5510, 12, 2316, ...
setIndexed(false);
private void evaluateExpressions() throws JspException { try { setAccesskey((String) evalAttr("accessKey", getAccesskey(), String.class)); } catch (NullAttributeException ex) { setAccesskey(null); } try { setAlt((String) evalAttr("alt", getAlt(), String.class)); } catch (NullAttributeException ex) { setAlt(null); } try { setAltKey((String) evalAttr("altKey", getAltKey(), String.class)); } catch (NullAttributeException ex) { setAltKey(null); } try { setDisabled(((Boolean) evalAttr("disabled", getDisabledExpr(), Boolean.class)). booleanValue()); } catch (NullAttributeException ex) { setDisabled(false); } try { setIndexed(((Boolean) evalAttr("indexed", getIndexedExpr(), Boolean.class)). booleanValue()); } catch (NullAttributeException ex) { setIndexed(false); } try { setOnblur((String) evalAttr("onblur", getOnblur(), String.class)); } catch (NullAttributeException ex) { setOnblur(null); } try { setOnchange((String) evalAttr("onchange", getOnchange(), String.class)); } catch (NullAttributeException ex) { setOnchange(null); } try { setOnclick((String) evalAttr("onclick", getOnclick(), String.class)); } catch (NullAttributeException ex) { setOnclick(null); } try { setOndblclick((String) evalAttr("ondblclick", getOndblclick(), String.class)); } catch (NullAttributeException ex) { setOndblclick(null); } try { setOnfocus((String) evalAttr("onfocus", getOnfocus(), String.class)); } catch (NullAttributeException ex) { setOnfocus(null); } try { setOnkeydown((String) evalAttr("onkeydown", getOnkeydown(), String.class)); } catch (NullAttributeException ex) { setOnkeydown(null); } try { setOnkeypress((String) evalAttr("onkeypress", getOnkeypress(), String.class)); } catch (NullAttributeException ex) { setOnkeypress(null); } try { setOnkeyup((String) evalAttr("onkeyup", getOnkeyup(), String.class)); } catch (NullAttributeException ex) { setOnkeyup(null); } try { setOnmousedown((String) evalAttr("onmousedown", getOnmousedown(), String.class)); } catch (NullAttributeException ex) { setOnmousedown(null); } try { setOnmousemove((String) evalAttr("onmousemove", getOnmousemove(), String.class)); } catch (NullAttributeException ex) { setOnmousemove(null); } try { setOnmouseout((String) evalAttr("onmouseout", getOnmouseout(), String.class)); } catch (NullAttributeException ex) { setOnmouseout(null); } try { setOnmouseover((String) evalAttr("onmouseover", getOnmouseover(), String.class)); } catch (NullAttributeException ex) { setOnmouseover(null); } try { setOnmouseup((String) evalAttr("onmouseup", getOnmouseup(), String.class)); } catch (NullAttributeException ex) { setOnmouseup(null); } try { setProperty((String) evalAttr("property", getProperty(), String.class)); } catch (NullAttributeException ex) { setProperty(null); } try { setStyle((String) evalAttr("style", getStyle(), String.class)); } catch (NullAttributeException ex) { setStyle(null); } try { setStyleClass((String) evalAttr("styleClass", getStyleClass(), String.class)); } catch (NullAttributeException ex) { setStyleClass(null); } try { setStyleId((String) evalAttr("styleId", getStyleId(), String.class)); } catch (NullAttributeException ex) { setStyleId(null); } try { setTabindex((String) evalAttr("tabindex", getTabindex(), String.class)); } catch (NullAttributeException ex) { setTabindex(null); } try { setTitle((String) evalAttr("title", getTitle(), String.class)); } catch (NullAttributeException ex) { setTitle(null); } try { setTitleKey((String) evalAttr("titleKey", getTitleKey(), String.class)); } catch (NullAttributeException ex) { setTitleKey(null); } try { setValue((String) evalAttr("value", getValue(), String.class)); } catch (NullAttributeException ex) { setValue(null); } }
2722 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2722/db064e19656421b94aaf753550935d95f44bd5f9/ELButtonTag.java/buggy/contrib/struts-el/src/share/org/apache/strutsel/taglib/html/ELButtonTag.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 5956, 8927, 1435, 1216, 27485, 288, 3639, 775, 288, 5411, 444, 1862, 856, 12443, 780, 13, 5302, 3843, 2932, 3860, 653, 3113, 21909, 856, 9334, 4766, 6647, 514, 18, 1106, 10019, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 5956, 8927, 1435, 1216, 27485, 288, 3639, 775, 288, 5411, 444, 1862, 856, 12443, 780, 13, 5302, 3843, 2932, 3860, 653, 3113, 21909, 856, 9334, 4766, 6647, 514, 18, 1106, 10019, ...
logger.debug("Is popup trigger: " + event.isPopupTrigger()); logger.debug("Button number: " + event.getButton()); logger.debug("Click count: " + event.getClickCount());
logger.debug("MousePressed Event Props: mode=" + c2dm.getDrawModeString() + ", trigger=" + event.isPopupTrigger() + ", Button number: " + event.getButton() + ", Click count: " + event.getClickCount());
public void mousePressed(MouseEvent event) { int mouseX = getWorldCoordinate(event.getX()); int mouseY = getWorldCoordinate(event.getY()); logger.debug("Is popup trigger: " + event.isPopupTrigger()); logger.debug("Button number: " + event.getButton()); logger.debug("Click count: " + event.getClickCount()); if (event.isPopupTrigger() || event.getButton() == MouseEvent.BUTTON3) { logger.info("Popup menu triggered..."); Atom atomInRange = getAtomInRange(mouseX, mouseY); Bond bondInRange = getBondInRange(mouseX, mouseY); if (atomInRange != null) { if (atomPopup != null ) { atomPopup.show(event.getComponent(), event.getX(), event.getY()); } } else if (bondInRange != null) { if (bondPopup != null ) { bondPopup.show(event.getComponent(), event.getX(), event.getY()); } } else { logger.warn("Popup for model has not been implemented yet!"); } } else { logger.debug("Mouse pressed in mode: " + c2dm.getDrawModeString()); Atom atomInRange; int startX = 0, startY = 0; r2dm.setPointerVectorStart(null); r2dm.setPointerVectorEnd(null); atomInRange = getAtomInRange(mouseX, mouseY); if (atomInRange != null) { startX = (int)atomInRange.getX2D(); startY = (int)atomInRange.getY2D(); r2dm.setPointerVectorStart(new Point(startX, startY)); } else { r2dm.setPointerVectorStart(new Point(mouseX, mouseY)); } if (c2dm.getDrawMode() == c2dm.MOVE) { AtomContainer container = r2dm.getSelectedPart(); if (container == null || (container.getAtomCount() == 0)) { // if no atoms are selected, then temporarily select nearest // to make sure to original state is reached again when the // mouse is released, the draggingSelected boolean is set logger.warn("No atoms selected: temporarily selecting nearest atom/bond"); draggingSelected = false; AtomContainer selected = new AtomContainer(); if (atomInRange != null) { selected.addAtom(atomInRange); r2dm.setSelectedPart(selected); } else { Bond bondInRange = getBondInRange(mouseX, mouseY); // because only atoms are dragged, select the atoms // in the bond, instead of the bond itself if (bondInRange != null) { Atom[] atoms = bondInRange.getAtoms(); for (int i=0; i<atoms.length; i++) { selected.addAtom(atoms[i]); } r2dm.setSelectedPart(selected); } } logger.debug("Selected: " + selected.toString()); /* PRESERVE THIS. This notifies the * the listener responsible for * undo and redo storage that it * should not store this change */ isUndoableChange = false; /* --- */ fireChange(); } } } }
45167 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45167/a93e8e07e5d68ce4ee8d96990bd2b958c9d22d9d/JCPController2D.java/clean/src/org/openscience/cdk/controller/JCPController2D.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 540, 1071, 918, 7644, 24624, 12, 9186, 1133, 871, 13, 288, 5411, 509, 7644, 60, 273, 13876, 6245, 13503, 12, 2575, 18, 588, 60, 10663, 5411, 509, 7644, 61, 273, 13876, 6245, 13503, 12, 2575, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 540, 1071, 918, 7644, 24624, 12, 9186, 1133, 871, 13, 288, 5411, 509, 7644, 60, 273, 13876, 6245, 13503, 12, 2575, 18, 588, 60, 10663, 5411, 509, 7644, 61, 273, 13876, 6245, 13503, 12, 2575, ...
Ruby ruby, RubyObject recv, RubyObject[] args) { if (args.length == 1) { Iterator iter = new LinkedList(ruby.objectSpace).iterator();
Ruby ruby, RubyObject recv, RubyObject[] args) { if (args.length == 1) { Iterator iter = new LinkedList(ruby.objectSpace).iterator();
public static RubyObject each_object( Ruby ruby, RubyObject recv, RubyObject[] args) { if (args.length == 1) { Iterator iter = new LinkedList(ruby.objectSpace).iterator(); while (iter.hasNext()) { SoftReference ref = (SoftReference) iter.next(); RubyObject obj = (RubyObject) ref.get(); if (obj != null) { if (obj instanceof RubyModule && (((RubyModule) obj).isIncluded() || ((RubyModule) obj).isSingleton())) { continue; } else { if (obj.m_kind_of((RubyModule)args[0]).isTrue()) { ruby.yield(obj); } } } else { ruby.objectSpace.remove(ref); } } return ruby.getNil(); } else { Iterator iter = new LinkedList(ruby.objectSpace).iterator(); while (iter.hasNext()) { SoftReference ref = (SoftReference) iter.next(); RubyObject obj = (RubyObject) ref.get(); if (obj != null) { if (obj instanceof RubyModule && (((RubyModule) obj).isIncluded() || ((RubyModule) obj).isSingleton())) { continue; } else { ruby.yield(obj); } } else { ruby.objectSpace.remove(ref); } } return ruby.getNil(); } }
46770 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46770/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyObjectSpace.java/clean/org/jruby/RubyObjectSpace.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 760, 19817, 921, 1517, 67, 1612, 12, 202, 202, 54, 10340, 22155, 16, 202, 202, 54, 10340, 921, 10665, 16, 202, 202, 54, 10340, 921, 8526, 833, 13, 288, 202, 202, 430, 261, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 760, 19817, 921, 1517, 67, 1612, 12, 202, 202, 54, 10340, 22155, 16, 202, 202, 54, 10340, 921, 10665, 16, 202, 202, 54, 10340, 921, 8526, 833, 13, 288, 202, 202, 430, 261, 1...
setAttribute("sendreferer", newValue); }
setAttribute("sendreferer", newValue); }
public void setSendreferer(String newValue) { setAttribute("sendreferer", newValue); }
46079 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46079/a0ba982304fe9f3700209293da4d2533e292e5d2/WMLGoElementImpl.java/buggy/src/org/apache/wml/dom/WMLGoElementImpl.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 444, 3826, 28596, 12, 780, 6129, 13, 288, 565, 4730, 2932, 4661, 28596, 3113, 6129, 1769, 225, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 918, 444, 3826, 28596, 12, 780, 6129, 13, 288, 565, 4730, 2932, 4661, 28596, 3113, 6129, 1769, 225, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
if (getParent() instanceof MenuManager) ((MenuManager) getParent()).addMenuListener(menuListener); if (!dirty) return;
if (getParent() instanceof MenuManager) { ((MenuManager) getParent()).addMenuListener(menuListener); } if (!dirty) { return; }
public void fill(Menu menu, int index) { if (getParent() instanceof MenuManager) ((MenuManager) getParent()).addMenuListener(menuListener); if (!dirty) return; fillMenu(menu); dirty = false; }
56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/e38d295ea613cf9f08aadb93a84a33d2e91abc5f/BuildSetMenu.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/actions/BuildSetMenu.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 3636, 12, 4599, 3824, 16, 509, 770, 13, 288, 3639, 309, 261, 588, 3054, 1435, 1276, 9809, 1318, 13, 5411, 14015, 4599, 1318, 13, 5089, 1435, 2934, 1289, 4599, 2223, 12, 5414, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3636, 12, 4599, 3824, 16, 509, 770, 13, 288, 3639, 309, 261, 588, 3054, 1435, 1276, 9809, 1318, 13, 5411, 14015, 4599, 1318, 13, 5089, 1435, 2934, 1289, 4599, 2223, 12, 5414, ...
f.println("node: " + id + " " + word);
f.println("node: " + id + " " + word + " p:" + getPosterior());
void dump(PrintWriter f) throws IOException { f.println("node: " + id + " " + word); }
8350 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8350/f069d3d3bb0bf9d775f4004e78ca32da3c4dca59/Node.java/clean/edu/cmu/sphinx/result/Node.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 918, 4657, 12, 5108, 2289, 284, 13, 1216, 1860, 288, 3639, 284, 18, 8222, 2932, 2159, 30, 315, 397, 612, 397, 315, 315, 397, 2076, 397, 225, 315, 293, 2773, 397, 14150, 17818, 10663, 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, 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, 918, 4657, 12, 5108, 2289, 284, 13, 1216, 1860, 288, 3639, 284, 18, 8222, 2932, 2159, 30, 315, 397, 612, 397, 315, 315, 397, 2076, 397, 225, 315, 293, 2773, 397, 14150, 17818, 10663, 56...
aliasJTextArea.setFocusable(false);
private void initComponents() {//GEN-BEGIN:initComponents java.awt.GridBagConstraints gridBagConstraints; natButtonGroup = new javax.swing.ButtonGroup(); forwardingButtonGroup = new javax.swing.ButtonGroup(); natJPanel = new javax.swing.JPanel(); jTextArea2 = new javax.swing.JTextArea(); jPanel1 = new javax.swing.JPanel(); natEnabledJRadioButton = new javax.swing.JRadioButton(); natDisabledJRadioButton = new javax.swing.JRadioButton(); jLabel1 = new javax.swing.JLabel(); jSeparator1 = new javax.swing.JSeparator(); nattedJLabel = new javax.swing.JLabel(); jPanel2 = new javax.swing.JPanel(); nattedJComboBox = new javax.swing.JComboBox(); aliasJPanel = new javax.swing.JPanel(); jTextArea3 = new javax.swing.JTextArea(); restrictIPJPanel = new javax.swing.JPanel(); jScrollPane1 = new javax.swing.JScrollPane(); aliasJTextArea = new javax.swing.JTextArea(); forwardingJPanel = new javax.swing.JPanel(); jLabel3 = new javax.swing.JLabel(); jPanel3 = new javax.swing.JPanel(); forwardingEnabledJRadioButton = new javax.swing.JRadioButton(); forwardingDisabledJRadioButton = new javax.swing.JRadioButton(); jLabel4 = new javax.swing.JLabel(); mtuJPanel = new javax.swing.JPanel(); jLabel5 = new javax.swing.JLabel(); jPanel4 = new javax.swing.JPanel(); jLabel6 = new javax.swing.JLabel(); mtuJSpinner = new javax.swing.JSpinner(); setLayout(new java.awt.GridBagLayout()); setMinimumSize(new java.awt.Dimension(515, 700)); setPreferredSize(new java.awt.Dimension(515, 700)); natJPanel.setLayout(new java.awt.GridBagLayout()); natJPanel.setBorder(new javax.swing.border.TitledBorder(null, "NAT (Network Address Translation)", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Dialog", 1, 16))); jTextArea2.setEditable(false); jTextArea2.setLineWrap(true); jTextArea2.setText("NAT allows multiple computers in the internal network to share internet access through a single shared public IP address."); jTextArea2.setWrapStyleWord(true); jTextArea2.setOpaque(false); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 0; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.weightx = 1.0; gridBagConstraints.insets = new java.awt.Insets(0, 15, 0, 15); natJPanel.add(jTextArea2, gridBagConstraints); jPanel1.setLayout(new java.awt.GridBagLayout()); natButtonGroup.add(natEnabledJRadioButton); natEnabledJRadioButton.setFont(new java.awt.Font("Dialog", 0, 12)); natEnabledJRadioButton.setText("Enabled"); natEnabledJRadioButton.setFocusPainted(false); natEnabledJRadioButton.setFocusable(false); natEnabledJRadioButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { natEnabledJRadioButtonActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 1; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.weightx = 1.0; jPanel1.add(natEnabledJRadioButton, gridBagConstraints); natButtonGroup.add(natDisabledJRadioButton); natDisabledJRadioButton.setFont(new java.awt.Font("Dialog", 0, 12)); natDisabledJRadioButton.setText("Disabled"); natDisabledJRadioButton.setFocusPainted(false); natDisabledJRadioButton.setFocusable(false); natDisabledJRadioButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { natDisabledJRadioButtonActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 2; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.weightx = 1.0; jPanel1.add(natDisabledJRadioButton, gridBagConstraints); jLabel1.setFont(new java.awt.Font("Dialog", 0, 12)); jLabel1.setText("NAT "); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 1; gridBagConstraints.gridheight = 2; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST; jPanel1.add(jLabel1, gridBagConstraints); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 1; gridBagConstraints.insets = new java.awt.Insets(15, 0, 0, 0); natJPanel.add(jPanel1, gridBagConstraints); jSeparator1.setForeground(new java.awt.Color(200, 200, 200)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 2; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; natJPanel.add(jSeparator1, gridBagConstraints); nattedJLabel.setFont(new java.awt.Font("Dialog", 0, 12)); nattedJLabel.setText("<html>You must choose a NAT address, which is the address that traffic from this Space will appear to be coming from.</html>"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 3; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.weightx = 1.0; gridBagConstraints.insets = new java.awt.Insets(10, 15, 0, 15); natJPanel.add(nattedJLabel, gridBagConstraints); jPanel2.setLayout(new java.awt.GridBagLayout()); nattedJComboBox.setFont(new java.awt.Font("Dialog", 0, 12)); nattedJComboBox.setFocusable(false); nattedJComboBox.setMaximumSize(new java.awt.Dimension(400, 24)); nattedJComboBox.setMinimumSize(new java.awt.Dimension(400, 24)); nattedJComboBox.setPreferredSize(new java.awt.Dimension(400, 24)); nattedJComboBox.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { nattedJComboBoxActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 0; jPanel2.add(nattedJComboBox, gridBagConstraints); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 4; gridBagConstraints.insets = new java.awt.Insets(10, 0, 5, 0); natJPanel.add(jPanel2, gridBagConstraints); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.weightx = 1.0; gridBagConstraints.insets = new java.awt.Insets(10, 10, 0, 10); add(natJPanel, gridBagConstraints); aliasJPanel.setLayout(new java.awt.GridBagLayout()); aliasJPanel.setBorder(new javax.swing.border.TitledBorder(null, "Network Aliases", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Dialog", 1, 16))); jTextArea3.setEditable(false); jTextArea3.setLineWrap(true); jTextArea3.setText("Network Aliases are the networks (masked IP addresses) that this Space will accept traffic from."); jTextArea3.setWrapStyleWord(true); jTextArea3.setOpaque(false); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 0; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.weightx = 1.0; gridBagConstraints.insets = new java.awt.Insets(0, 15, 0, 15); aliasJPanel.add(jTextArea3, gridBagConstraints); restrictIPJPanel.setLayout(new java.awt.GridBagLayout()); jScrollPane1.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); jScrollPane1.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); aliasJTextArea.setLineWrap(true); aliasJTextArea.setWrapStyleWord(true); aliasJTextArea.setFocusable(false); aliasJTextArea.addCaretListener(new javax.swing.event.CaretListener() { public void caretUpdate(javax.swing.event.CaretEvent evt) { aliasJTextAreaCaretUpdate(evt); } }); jScrollPane1.setViewportView(aliasJTextArea); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.weightx = 1.0; gridBagConstraints.weighty = 1.0; restrictIPJPanel.add(jScrollPane1, gridBagConstraints); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 1; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.ipady = 100; gridBagConstraints.weightx = 1.0; gridBagConstraints.insets = new java.awt.Insets(15, 15, 10, 15); aliasJPanel.add(restrictIPJPanel, gridBagConstraints); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.weightx = 1.0; gridBagConstraints.insets = new java.awt.Insets(10, 10, 0, 10); add(aliasJPanel, gridBagConstraints); forwardingJPanel.setLayout(new java.awt.GridBagLayout()); forwardingJPanel.setBorder(new javax.swing.border.TitledBorder(null, "Traffic Forwarding", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Dialog", 1, 16))); jLabel3.setFont(new java.awt.Font("Dialog", 0, 12)); jLabel3.setText("<html>Traffic Forwarding allows traffic to flow between two different Spaces. If this is disabled, this Space will be isolated from communicating with other Spaces.</html>"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 0; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.weightx = 1.0; gridBagConstraints.insets = new java.awt.Insets(10, 15, 0, 15); forwardingJPanel.add(jLabel3, gridBagConstraints); jPanel3.setLayout(new java.awt.GridBagLayout()); forwardingButtonGroup.add(forwardingEnabledJRadioButton); forwardingEnabledJRadioButton.setFont(new java.awt.Font("Dialog", 0, 12)); forwardingEnabledJRadioButton.setText("Enabled"); forwardingEnabledJRadioButton.setFocusPainted(false); forwardingEnabledJRadioButton.setFocusable(false); forwardingEnabledJRadioButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { forwardingEnabledJRadioButtonActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 1; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.weightx = 1.0; jPanel3.add(forwardingEnabledJRadioButton, gridBagConstraints); forwardingButtonGroup.add(forwardingDisabledJRadioButton); forwardingDisabledJRadioButton.setFont(new java.awt.Font("Dialog", 0, 12)); forwardingDisabledJRadioButton.setText("Disabled"); forwardingDisabledJRadioButton.setFocusPainted(false); forwardingDisabledJRadioButton.setFocusable(false); forwardingDisabledJRadioButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { forwardingDisabledJRadioButtonActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 2; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.weightx = 1.0; jPanel3.add(forwardingDisabledJRadioButton, gridBagConstraints); jLabel4.setFont(new java.awt.Font("Dialog", 0, 12)); jLabel4.setText("Traffic Forwarding"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 1; gridBagConstraints.gridheight = 2; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST; jPanel3.add(jLabel4, gridBagConstraints); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 1; gridBagConstraints.insets = new java.awt.Insets(15, 0, 0, 0); forwardingJPanel.add(jPanel3, gridBagConstraints); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.weightx = 1.0; gridBagConstraints.insets = new java.awt.Insets(10, 10, 0, 10); add(forwardingJPanel, gridBagConstraints); mtuJPanel.setLayout(new java.awt.GridBagLayout()); mtuJPanel.setBorder(new javax.swing.border.TitledBorder(null, "MTU (Maximum Transfer Unit)", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Dialog", 1, 16))); jLabel5.setFont(new java.awt.Font("Dialog", 0, 12)); jLabel5.setText("<html>The MTU specifies the maximum amount of data per packet that should be transferred out of this Space. This value should not be changed unless explicitly necessary.</html>"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 0; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.weightx = 1.0; gridBagConstraints.insets = new java.awt.Insets(10, 15, 0, 15); mtuJPanel.add(jLabel5, gridBagConstraints); jPanel4.setLayout(new java.awt.GridBagLayout()); jLabel6.setFont(new java.awt.Font("Dialog", 0, 12)); jLabel6.setText("MTU (bytes) "); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 0; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST; jPanel4.add(jLabel6, gridBagConstraints); mtuJSpinner.setFont(new java.awt.Font("Dialog", 0, 12)); mtuJSpinner.setFocusable(false); mtuJSpinner.setMaximumSize(new java.awt.Dimension(100, 20)); mtuJSpinner.setMinimumSize(new java.awt.Dimension(100, 20)); mtuJSpinner.setPreferredSize(new java.awt.Dimension(100, 20)); mtuJSpinner.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent evt) { mtuJSpinnerStateChanged(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 0; jPanel4.add(mtuJSpinner, gridBagConstraints); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 1; gridBagConstraints.insets = new java.awt.Insets(15, 0, 5, 0); mtuJPanel.add(jPanel4, gridBagConstraints); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH; gridBagConstraints.weightx = 1.0; gridBagConstraints.weighty = 1.0; gridBagConstraints.insets = new java.awt.Insets(10, 10, 10, 10); add(mtuJPanel, gridBagConstraints); }//GEN-END:initComponents
49954 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49954/0905e821365934aeea32ee07415ccac174db42a7/SpaceJPanel.java/clean/tran/nat/main/com/metavize/tran/nat/gui/SpaceJPanel.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 540, 3238, 918, 1208, 7171, 1435, 288, 759, 16652, 17, 16061, 30, 2738, 7171, 7734, 2252, 18, 2219, 88, 18, 6313, 6852, 8747, 31, 7734, 10535, 3616, 1114, 273, 394, 6863, 18, 5328, 310, 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, 540, 3238, 918, 1208, 7171, 1435, 288, 759, 16652, 17, 16061, 30, 2738, 7171, 7734, 2252, 18, 2219, 88, 18, 6313, 6852, 8747, 31, 7734, 10535, 3616, 1114, 273, 394, 6863, 18, 5328, 310, 18, ...
for (int i = 0; i < constructors.length; i++) { final MemberSignature constructor = constructors[i];
for(final MemberSignature constructor : constructors){
public static long computeDefaultSUID(PsiClass psiClass) { final PsiManager manager = psiClass.getManager(); final Project project = manager.getProject(); final GlobalSearchScope scope = GlobalSearchScope.allScope(project); final PsiClass serializable = manager.findClass(SERIALIZABLE_CLASS_NAME, scope); if (serializable == null) { // no jdk defined for project. return -1L; } final boolean isSerializable = psiClass.isInheritor(serializable, true); if (!isSerializable) { return 0L; } final SerialVersionUIDBuilder serialVersionUIDBuilder = new SerialVersionUIDBuilder(psiClass); try { final ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); final DataOutputStream dataOutputStream = new DataOutputStream(byteArrayOutputStream); final String className = psiClass.getQualifiedName(); dataOutputStream.writeUTF(className); final PsiModifierList classModifierList = psiClass.getModifierList(); int classModifiers = MemberSignature.calculateModifierBitmap(classModifierList); final MemberSignature[] methodSignatures = serialVersionUIDBuilder.getNonPrivateMethodSignatures(); if (psiClass.isInterface()) { classModifiers |= Modifier.INTERFACE; if (methodSignatures.length ==0) { // interfaces were not marked abstract when they did't have methods in java 1.0 // For serialization compatibility the abstract modifier is ignored. classModifiers &= ~Modifier.ABSTRACT; } } dataOutputStream.writeInt(classModifiers); final PsiClass[] interfaces = psiClass.getInterfaces(); Arrays.sort(interfaces, INTERFACE_COMPARATOR); for (int i = 0; i < interfaces.length; i++) { final String name = interfaces[i].getQualifiedName(); dataOutputStream.writeUTF(name); } final MemberSignature[] fields = serialVersionUIDBuilder.getNonPrivateFields(); Arrays.sort(fields); for (int i = 0; i < fields.length; i++) { final MemberSignature field = fields[i]; dataOutputStream.writeUTF(field.getName()); dataOutputStream.writeInt(field.getModifiers()); dataOutputStream.writeUTF(field.getSignature()); } final MemberSignature[] staticInitializers = serialVersionUIDBuilder.getStaticInitializers(); for (int i = 0; i < staticInitializers.length; i++) { final MemberSignature staticInitializer = staticInitializers[i]; dataOutputStream.writeUTF(staticInitializer.getName()); dataOutputStream.writeInt(staticInitializer.getModifiers()); dataOutputStream.writeUTF(staticInitializer.getSignature()); } final MemberSignature[] constructors = serialVersionUIDBuilder.getNonPrivateConstructors(); Arrays.sort(constructors); for (int i = 0; i < constructors.length; i++) { final MemberSignature constructor = constructors[i]; dataOutputStream.writeUTF(constructor.getName()); dataOutputStream.writeInt(constructor.getModifiers()); dataOutputStream.writeUTF(constructor.getSignature()); } Arrays.sort(methodSignatures); for (int i = 0; i < methodSignatures.length; i++) { final MemberSignature methodSignature = methodSignatures[i]; dataOutputStream.writeUTF(methodSignature.getName()); dataOutputStream.writeInt(methodSignature.getModifiers()); dataOutputStream.writeUTF(methodSignature.getSignature()); } dataOutputStream.flush(); final MessageDigest digest = MessageDigest.getInstance("SHA"); final byte[] digestBytes = digest.digest(byteArrayOutputStream.toByteArray()); long serialVersionUID = 0L; for (int i = Math.min(digestBytes.length, 8) - 1; i >=0; i--) { serialVersionUID = serialVersionUID << 8 | digestBytes[i] & 0xFF; } return serialVersionUID; } catch(IOException exception) { final InternalError internalError = new InternalError(exception.getMessage()); internalError.initCause(exception); throw internalError; } catch(NoSuchAlgorithmException exception) { final SecurityException securityException = new SecurityException(exception.getMessage()); securityException.initCause(exception); throw securityException; } }
56627 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56627/2d46d291193579a7564649b4881c7ea8e02eda5b/SerialVersionUIDBuilder.java/buggy/plugins/InspectionGadgets/src/com/siyeh/ig/fixes/SerialVersionUIDBuilder.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 760, 1525, 3671, 1868, 55, 3060, 12, 52, 7722, 797, 23921, 797, 13, 565, 288, 3639, 727, 453, 7722, 1318, 3301, 273, 23921, 797, 18, 588, 1318, 5621, 3639, 727, 5420, 1984, 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, 1071, 760, 1525, 3671, 1868, 55, 3060, 12, 52, 7722, 797, 23921, 797, 13, 565, 288, 3639, 727, 453, 7722, 1318, 3301, 273, 23921, 797, 18, 588, 1318, 5621, 3639, 727, 5420, 1984, 273, 3...
private Chart getConvertedChart(Chart currentChart, String sNewSubType, Orientation newOrientation, String sNewDimension) { Chart helperModel = (Chart) EcoreUtil.copy(currentChart); if((currentChart instanceof ChartWithAxes)) // Chart is ChartWithAxes { if(currentChart.getType().equals(sType)) // Original chart is of this type (BarChart) { if(!currentChart.getSubType().equals(sNewSubType)) // Original chart is of the required subtype { currentChart.setSubType(sNewSubType); EList axes = ((Axis) ((ChartWithAxes) currentChart).getAxes().get(0)).getAssociatedAxes(); for(int i = 0; i < axes.size(); i++) { if(sNewSubType.equalsIgnoreCase("Percent Stacked")) { ((Axis) axes.get(i)).setPercent(true); } else { ((Axis) axes.get(i)).setPercent(false); } EList seriesdefinitions = ((Axis) axes.get(i)).getSeriesDefinitions(); for(int j = 0; j < seriesdefinitions.size(); j++) { Series series = ((SeriesDefinition) seriesdefinitions.get(j)).getDesignTimeSeries(); if((sNewSubType.equalsIgnoreCase("Stacked") || sNewSubType.equalsIgnoreCase("Percent Stacked"))) { series.setStacked(true); } else { series.setStacked(false); } } } } } else if(currentChart.getType().equals("Line Chart") || currentChart.getType().equals("Stock Chart") || currentChart.getType().equals("Scatter Chart")) { if(!currentChart.getType().equals("Line Chart")) { currentChart.setSampleData(getConvertedSampleData(currentChart.getSampleData())); } currentChart.setType(sType); ((Axis) ((ChartWithAxes) currentChart).getAxes().get(0)).setType(AxisType.TEXT_LITERAL); currentChart.setSubType(sNewSubType); EList axes = ((Axis) ((ChartWithAxes) currentChart).getAxes().get(0)).getAssociatedAxes(); for(int i = 0; i < axes.size(); i++) { if(sNewSubType.equalsIgnoreCase("Percent Stacked")) { ((Axis) axes.get(i)).setPercent(true); } else { ((Axis) axes.get(i)).setPercent(false); } EList seriesdefinitions = ((Axis) axes.get(i)).getSeriesDefinitions(); for(int j = 0; j < seriesdefinitions.size(); j++) { Series series = ((SeriesDefinition) seriesdefinitions.get(j)).getDesignTimeSeries(); series = getConvertedSeries(series); if((sNewSubType.equalsIgnoreCase("Stacked") || sNewSubType.equalsIgnoreCase("Percent Stacked"))) { series.setStacked(true); } else { series.setStacked(false); } ((SeriesDefinition) seriesdefinitions.get(j)).getSeries().set(j, series); } } } else { return null; } } else { // Create a new instance of the correct type and set initial properties currentChart = ChartWithAxesImpl.create(); currentChart.setType(sType); currentChart.setSubType(sNewSubType); ((ChartWithAxes) currentChart).setOrientation(newOrientation); currentChart.setDimension(getDimensionFor(sNewDimension)); ((Axis) ((ChartWithAxes) currentChart).getAxes().get(0)).setOrientation(Orientation.HORIZONTAL_LITERAL); ((Axis) ((ChartWithAxes) currentChart).getAxes().get(0)).setType(AxisType.TEXT_LITERAL); ((Axis) ((Axis) ((ChartWithAxes) currentChart).getAxes().get(0)).getAssociatedAxes().get(0)) .setOrientation(Orientation.VERTICAL_LITERAL); ((Axis) ((Axis) ((ChartWithAxes) currentChart).getAxes().get(0)).getAssociatedAxes().get(0)).setType(AxisType.LINEAR_LITERAL); // Copy generic chart properties from the old chart currentChart.setBlock(helperModel.getBlock()); currentChart.setDescription(helperModel.getDescription()); currentChart.setGridColumnCount(helperModel.getGridColumnCount()); currentChart.setSampleData(helperModel.getSampleData()); currentChart.setScript(helperModel.getScript()); currentChart.setSeriesThickness(helperModel.getSeriesThickness()); currentChart.setUnits(helperModel.getUnits()); if(helperModel.getType().equals("Pie Chart")) { // Clear existing series definitions ((Axis) ((ChartWithAxes) currentChart).getAxes().get(0)).getSeriesDefinitions().clear(); // Copy base series definitions ((Axis) ((ChartWithAxes) currentChart).getAxes().get(0)).getSeriesDefinitions().add(((ChartWithoutAxes) helperModel).getSeriesDefinitions().get(0)); // Clear existing series definitions ((Axis) ((Axis) ((ChartWithAxes) currentChart).getAxes().get(0)).getAssociatedAxes().get(0)).getSeriesDefinitions().clear(); // Copy orthogonal series definitions ((Axis) ((Axis) ((ChartWithAxes) currentChart).getAxes().get(0)).getAssociatedAxes().get(0)).getSeriesDefinitions().addAll(((SeriesDefinition) ((Axis) ((ChartWithAxes) currentChart).getAxes().get(0)).getSeriesDefinitions().get(0)).getSeriesDefinitions()); // Update the base series Series series = ((SeriesDefinition) ((Axis) ((ChartWithAxes) currentChart).getAxes().get(0)).getSeriesDefinitions().get(0)).getDesignTimeSeries(); series = getConvertedSeries(series); // Clear existing series ((SeriesDefinition) ((Axis) ((ChartWithAxes) currentChart).getAxes().get(0)).getSeriesDefinitions().get(0)).getSeries().clear(); // Add converted series ((SeriesDefinition) ((Axis) ((ChartWithAxes) currentChart).getAxes().get(0)).getSeriesDefinitions().get(0)).getSeries().add(series); // Update the orthogonal series EList seriesdefinitions = ((Axis) ((Axis) ((ChartWithAxes) currentChart).getAxes().get(0)).getAssociatedAxes().get(0)).getSeriesDefinitions(); for(int j = 0; j < seriesdefinitions.size(); j++) { series = ((SeriesDefinition) seriesdefinitions.get(j)).getDesignTimeSeries(); series = getConvertedSeries(series); if((sNewSubType.equalsIgnoreCase("Stacked") || sNewSubType.equalsIgnoreCase("Percent Stacked"))) { series.setStacked(true); } else { series.setStacked(false); } // Clear any existing series ((SeriesDefinition) seriesdefinitions.get(j)).getSeries().clear(); // Add the new series ((SeriesDefinition) seriesdefinitions.get(j)).getSeries().add(series); } } else { return null; } } if(currentChart instanceof ChartWithAxes && !((ChartWithAxes) currentChart).getOrientation().equals(newOrientation)) { ((ChartWithAxes) currentChart).setOrientation(newOrientation); } if(!currentChart.getDimension().equals(getDimensionFor(sNewDimension))) { currentChart.setDimension(getDimensionFor(sNewDimension)); } return currentChart; }
12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/588e7d9d61e91804070df10605592e7dbd22ac16/BarChart.java/clean/chart/org.eclipse.birt.chart.ui.extension/src/org/eclipse/birt/chart/ui/swt/type/BarChart.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 14804, 336, 22063, 7984, 12, 7984, 783, 7984, 16, 514, 272, 1908, 30511, 16, 531, 12556, 394, 14097, 16, 514, 272, 1908, 8611, 13, 565, 288, 3639, 14804, 4222, 1488, 273, 261, 7984,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 14804, 336, 22063, 7984, 12, 7984, 783, 7984, 16, 514, 272, 1908, 30511, 16, 531, 12556, 394, 14097, 16, 514, 272, 1908, 8611, 13, 565, 288, 3639, 14804, 4222, 1488, 273, 261, 7984,...
final ErrorInfo errorInfo = new ErrorInfo(prop == null ? null : prop.getName(), errorMessage,
final ErrorInfo errorInfo = new ErrorInfo(myComponent, prop == null ? null : prop.getName(), errorMessage,
public void addError(final String inspectionId, @Nullable IProperty prop, @NotNull String errorMessage, @Nullable EditorQuickFixProvider editorQuickFixProvider) { if (myResults == null) { myResults = new ArrayList<ErrorInfo>(); } QuickFix[] quickFixes = QuickFix.EMPTY_ARRAY; if (editorQuickFixProvider != null) { quickFixes = new QuickFix[1]; quickFixes [0] = editorQuickFixProvider.createQuickFix(myEditor, myComponent); } final ErrorInfo errorInfo = new ErrorInfo(prop == null ? null : prop.getName(), errorMessage, myProfile.getErrorLevel(HighlightDisplayKey.find(inspectionId)), quickFixes); errorInfo.setInspectionId(inspectionId); myResults.add(errorInfo); }
56627 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56627/6a384c23ca74b732817b78c9169186710a7d1d75/FormEditorErrorCollector.java/clean/ui-designer/impl/com/intellij/uiDesigner/inspections/FormEditorErrorCollector.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 9501, 12, 6385, 514, 2763, 7017, 548, 16, 15604, 632, 13349, 467, 1396, 2270, 16, 15604, 632, 5962, 514, 9324, 16, 15604, 632, 13349, 18451, 13663, 8585, 2249, 4858, 13663, 8585,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 9501, 12, 6385, 514, 2763, 7017, 548, 16, 15604, 632, 13349, 467, 1396, 2270, 16, 15604, 632, 5962, 514, 9324, 16, 15604, 632, 13349, 18451, 13663, 8585, 2249, 4858, 13663, 8585,...
ungroupPrimitive(pre);
ungroupPrimitive(pre, false);
public void drawImage(ImageRenderEvent pre) throws ChartException { groupPrimitive(pre); super.drawImage(pre); ungroupPrimitive(pre); }
46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/aeb2ff9aeebc28aaf0d2e96bfd88e2332f7a7e96/SVGRendererImpl.java/clean/chart/org.eclipse.birt.chart.device.svg/src/org/eclipse/birt/chart/device/svg/SVGRendererImpl.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 25783, 12, 2040, 3420, 1133, 675, 13, 1216, 14804, 503, 288, 202, 202, 1655, 9840, 12, 1484, 1769, 202, 202, 9565, 18, 9446, 2040, 12, 1484, 1769, 202, 202, 318, 1655, 98...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 25783, 12, 2040, 3420, 1133, 675, 13, 1216, 14804, 503, 288, 202, 202, 1655, 9840, 12, 1484, 1769, 202, 202, 9565, 18, 9446, 2040, 12, 1484, 1769, 202, 202, 318, 1655, 98...
public ElementsByTagName getElementsByTagName(Node n, String ns, String ln) {
public ElementsByTagName getElementsByTagName(Node n, String ln) {
public ElementsByTagName getElementsByTagName(Node n, String ns, String ln) { if (elementsByTagNames == null) { return null; } SoftDoublyIndexedTable t; t = (SoftDoublyIndexedTable)elementsByTagNames.get(n); if (t == null) { return null; } return (ElementsByTagName)t.get(ns, ln); }
45946 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45946/447cc7aa9b5d60edbdb34d92472199d602a1945f/AbstractDocument.java/clean/sources/org/apache/batik/dom/AbstractDocument.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 17219, 10401, 11034, 12, 907, 290, 16, 4766, 5375, 514, 3153, 16, 4766, 5375, 514, 7211, 13, 288, 3639, 309, 261, 6274, 29309, 1557, 422, 446, 13, 288, 5411, 327, 446, 31, 3639, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 17219, 10401, 11034, 12, 907, 290, 16, 4766, 5375, 514, 3153, 16, 4766, 5375, 514, 7211, 13, 288, 3639, 309, 261, 6274, 29309, 1557, 422, 446, 13, 288, 5411, 327, 446, 31, 3639, 2...
case Id_splice: return jsFunction_splice(cx, thisObj, args, f);
case Id_splice: return jsFunction_splice(cx, thisObj, args, f);
public Object execMethod (int methodId, IdFunction f, Context cx, Scriptable scope, Scriptable thisObj, Object[] args) throws JavaScriptException { switch (methodId) { case Id_constructor: return jsConstructor(cx, scope, args, f, thisObj == null); case Id_toString: return jsFunction_toString(cx, thisObj, args); case Id_toLocaleString: return jsFunction_toLocaleString(cx, thisObj, args); case Id_join: return jsFunction_join(cx, thisObj, args); case Id_reverse: return jsFunction_reverse(cx, thisObj, args); case Id_sort: return jsFunction_sort(cx, thisObj, args, f); case Id_push: return jsFunction_push(cx, thisObj, args); case Id_pop: return jsFunction_pop(cx, thisObj, args); case Id_shift: return jsFunction_shift(cx, thisObj, args); case Id_unshift: return jsFunction_unshift(cx, thisObj, args); case Id_splice: return jsFunction_splice(cx, thisObj, args, f); case Id_concat: return jsFunction_concat(cx, thisObj, args, f); case Id_slice: return jsFunction_slice(cx, thisObj, args); } return super.execMethod(methodId, f, cx, scope, thisObj, args); }
12376 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12376/35caf7c2bb93872680ae16e34746d94fe1e533e3/NativeArray.java/buggy/js/rhino/src/org/mozilla/javascript/NativeArray.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 1033, 1196, 1305, 3639, 261, 474, 707, 548, 16, 3124, 2083, 284, 16, 540, 1772, 9494, 16, 22780, 2146, 16, 22780, 15261, 16, 1033, 8526, 833, 13, 3639, 1216, 11905, 503, 565, 288, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 1033, 1196, 1305, 3639, 261, 474, 707, 548, 16, 3124, 2083, 284, 16, 540, 1772, 9494, 16, 22780, 2146, 16, 22780, 15261, 16, 1033, 8526, 833, 13, 3639, 1216, 11905, 503, 565, 288, ...
hunk.addLine(new PatchLine(PatchLine.Type.ADD, afterLines.get(afterLineIndex).substring(2)));
addContextDiffLine(hunk, afterLines.get(afterLineIndex), PatchLine.Type.ADD);
private PatchHunk readNextHunkContext() throws PatchSyntaxException { while(myLineIndex < myLines.length) { String curLine = myLines [myLineIndex]; if (curLine.startsWith(CONTEXT_FILE_PREFIX)) { return null; } if (curLine.startsWith(CONTEXT_HUNK_PREFIX)) { break; } myLineIndex++; } if (myLineIndex == myLines.length) { return null; } myLineIndex++; Matcher beforeMatcher = ourContextBeforeHunkStartPattern.matcher(myLines [myLineIndex]); if (!beforeMatcher.matches()) { throw new PatchSyntaxException(myLineIndex, "Unknown before hunk start syntax"); } myLineIndex++; List<String> beforeLines = readContextDiffLines(); if (myLineIndex == myLines.length) { throw new PatchSyntaxException(myLineIndex, "Missing after hunk"); } Matcher afterMatcher = ourContextAfterHunkStartPattern.matcher(myLines [myLineIndex]); if (!afterMatcher.matches()) { throw new PatchSyntaxException(myLineIndex, "Unknown before hunk start syntax"); } myLineIndex++; List<String> afterLines = readContextDiffLines(); int startLineBefore = Integer.parseInt(beforeMatcher.group(1)); int endLineBefore = Integer.parseInt(beforeMatcher.group(2)); int startLineAfter = Integer.parseInt(afterMatcher.group(1)); int endLineAfter = Integer.parseInt(afterMatcher.group(2)); PatchHunk hunk = new PatchHunk(startLineBefore, endLineBefore, startLineAfter, endLineAfter); int beforeLineIndex = 0; int afterLineIndex = 0; if (beforeLines.size() == 0) { for(String line: afterLines) { hunk.addLine(parsePatchLine(line, 2)); } } else if (afterLines.size() == 0) { for(String line: beforeLines) { hunk.addLine(parsePatchLine(line, 2)); } } else { while(beforeLineIndex < beforeLines.size() && afterLineIndex < afterLines.size()) { String beforeLine = beforeLines.get(beforeLineIndex); String afterLine = afterLines.get(afterLineIndex); if (beforeLine.startsWith(" ") && afterLine.startsWith(" ")) { hunk.addLine(new PatchLine(PatchLine.Type.CONTEXT, beforeLine.substring(2))); beforeLineIndex++; afterLineIndex++; } else if (beforeLine.startsWith("-")) { hunk.addLine(new PatchLine(PatchLine.Type.REMOVE, beforeLine.substring(2))); beforeLineIndex++; } else if (afterLine.startsWith("+")) { hunk.addLine(new PatchLine(PatchLine.Type.ADD, afterLine.substring(2))); afterLineIndex++; } else if (beforeLine.startsWith("!") && afterLine.startsWith("!")) { while(beforeLineIndex < beforeLines.size() && beforeLines.get(beforeLineIndex).startsWith("! ")) { hunk.addLine(new PatchLine(PatchLine.Type.REMOVE, beforeLines.get(beforeLineIndex).substring(2))); beforeLineIndex++; } while(afterLineIndex < afterLines.size() && afterLines.get(afterLineIndex).startsWith("! ")) { hunk.addLine(new PatchLine(PatchLine.Type.ADD, afterLines.get(afterLineIndex).substring(2))); afterLineIndex++; } } else { throw new PatchSyntaxException(-1, "Unknown line prefix"); } } } return hunk; }
12814 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12814/0379bd78ca43eafc356a59d9b6cbf49c2f461c15/PatchReader.java/clean/source/com/intellij/openapi/diff/impl/patch/PatchReader.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 3238, 12042, 44, 1683, 855, 2134, 44, 1683, 1042, 1435, 1216, 12042, 14714, 288, 565, 1323, 12, 4811, 1670, 1016, 411, 3399, 5763, 18, 2469, 13, 288, 1377, 514, 662, 1670, 273, 3399, 5763...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12042, 44, 1683, 855, 2134, 44, 1683, 1042, 1435, 1216, 12042, 14714, 288, 565, 1323, 12, 4811, 1670, 1016, 411, 3399, 5763, 18, 2469, 13, 288, 1377, 514, 662, 1670, 273, 3399, 5763...
return new SimpleAtomicSymbol(Annotation.EMPTY_ANNOTATION, Collections.EMPTY_LIST);
return new SimpleAtomicSymbol(ann, new ListTools.Doublet(DNATools.c(), DNATools.t()));
protected Symbol createSymbol(Annotation ann) throws Exception { return new SimpleAtomicSymbol(Annotation.EMPTY_ANNOTATION, Collections.EMPTY_LIST); }
50115 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50115/8f5dddfa20dd05190596176c667c40fbf0f1dede/SimpleAtomicSymbolEventTest.java/clean/tests/org/biojava/bio/symbol/SimpleAtomicSymbolEventTest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 4750, 8565, 752, 5335, 12, 3257, 8226, 13, 1850, 1216, 1185, 225, 288, 565, 327, 394, 4477, 23102, 5335, 12, 1072, 16, 394, 987, 10348, 18, 3244, 440, 278, 12, 8609, 37, 10348, 18, 71, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 4750, 8565, 752, 5335, 12, 3257, 8226, 13, 1850, 1216, 1185, 225, 288, 565, 327, 394, 4477, 23102, 5335, 12, 1072, 16, 394, 987, 10348, 18, 3244, 440, 278, 12, 8609, 37, 10348, 18, 71, ...
final BigDecimal comp = (BigDecimal) context.declaration.getExtractor().getValue( left );
final BigDecimal comp = (BigDecimal) context.getVariableDeclaration().getExtractor().getValue( left );
public boolean evaluateCachedRight(final VariableContextEntry context, final Object left) { final BigDecimal comp = (BigDecimal) context.declaration.getExtractor().getValue( left ); return comp.compareTo( ((ObjectVariableContextEntry) context).right ) > 0; }
5490 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5490/b6d27b51773c616f04e39b7d6c5e3cd95aeab255/BigDecimalFactory.java/clean/drools-core/src/main/java/org/drools/base/evaluators/BigDecimalFactory.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 540, 1071, 1250, 5956, 9839, 4726, 12, 6385, 7110, 1042, 1622, 819, 16, 4766, 6647, 727, 1033, 2002, 13, 288, 5411, 727, 8150, 1161, 273, 261, 29436, 13, 819, 18, 588, 26547, 7675, 588, 10958,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 540, 1071, 1250, 5956, 9839, 4726, 12, 6385, 7110, 1042, 1622, 819, 16, 4766, 6647, 727, 1033, 2002, 13, 288, 5411, 727, 8150, 1161, 273, 261, 29436, 13, 819, 18, 588, 26547, 7675, 588, 10958,...
public org.quickfix.field.FundRenewWaiv getFundRenewWaiv() throws FieldNotFound { org.quickfix.field.FundRenewWaiv value = new org.quickfix.field.FundRenewWaiv();
public quickfix.field.FundRenewWaiv getFundRenewWaiv() throws FieldNotFound { quickfix.field.FundRenewWaiv value = new quickfix.field.FundRenewWaiv();
public org.quickfix.field.FundRenewWaiv getFundRenewWaiv() throws FieldNotFound { org.quickfix.field.FundRenewWaiv value = new org.quickfix.field.FundRenewWaiv(); getField(value); return value; }
8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/Confirmation.java/buggy/src/java/src/quickfix/fix44/Confirmation.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 2358, 18, 19525, 904, 18, 1518, 18, 42, 1074, 24058, 59, 69, 427, 2812, 1074, 24058, 59, 69, 427, 1435, 1216, 2286, 2768, 225, 288, 2358, 18, 19525, 904, 18, 1518, 18, 42, 1074, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 42, 1074, 24058, 59, 69, 427, 2812, 1074, 24058, 59, 69, 427, 1435, 1216, 2286, 2768, 225, 288, 2358, 18, 19525, 904, 18, 1518, 18, 42, 1074, ...
public OperationDef( Method m, Class def_in, Class irHelper, org.omg.CORBA.InterfaceDef i_def )
public OperationDef( Method m, Class def_in, Class irHelper, org.omg.CORBA.InterfaceDef i_def )
public OperationDef( Method m, Class def_in, Class irHelper, org.omg.CORBA.InterfaceDef i_def ) { def_kind = org.omg.CORBA.DefinitionKind.dk_Operation; name( m.getName()); Debug.assert( def_in != null, "Class argument null" ); Debug.assert( i_def != null, "Idef argument null" ); id( RepositoryID.toRepositoryID( RepositoryID.className(i_def.id()) + "/" + name() )); version(id().substring( id().lastIndexOf(':'))); defined_in = i_def; containing_repository = i_def.containing_repository(); String className = def_in.getName(); absolute_name = i_def.absolute_name() + "::" + name; method = m; org.jacorb.util.Debug.output(2, "New OperationDef, name: " + name + " " + absolute_name ); Hashtable irInfo = null; opInfo = null; try { irInfo = (Hashtable)irHelper.getDeclaredField("irInfo").get(null); opInfo = (String)irInfo.get( name() ); } catch( Exception e ) { e.printStackTrace(); } /* parse extra operation information that's in the opInfo string */ if( opInfo != null ) { if( opInfo.endsWith("-oneway")) { mode = org.omg.CORBA.OperationMode.OP_ONEWAY; } if( opInfo.indexOf("(") > 0 ) returnTypeName = opInfo.substring(0,opInfo.indexOf("(")); StringTokenizer strtok = new StringTokenizer( opInfo.substring( opInfo.indexOf("(") + 1, opInfo.lastIndexOf(")")), ","); paramTypeNames = new String[strtok.countTokens()]; for( int i = 0; i < paramTypeNames.length; i++ ) { String token = strtok.nextToken(); paramTypeNames[i] = ( !token.equals(",") ? token : null ); } } if( mode == null ) { mode = org.omg.CORBA.OperationMode.OP_NORMAL; } contexts = new String[0]; }
46355 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46355/d3123834148b8608aaba7622e66246fd06a400f9/OperationDef.java/buggy/src/org/jacorb/ir/OperationDef.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 4189, 3262, 12, 2985, 312, 16, 1659, 1652, 67, 267, 16, 1659, 9482, 2276, 16, 2358, 18, 362, 75, 18, 9428, 12536, 18, 1358, 3262, 277, 67, 536, 262, 565, 288, 3639, 1652, 67, 92...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4189, 3262, 12, 2985, 312, 16, 1659, 1652, 67, 267, 16, 1659, 9482, 2276, 16, 2358, 18, 362, 75, 18, 9428, 12536, 18, 1358, 3262, 277, 67, 536, 262, 565, 288, 3639, 1652, 67, 92...
try { Thread.sleep(18 * retryTime); } catch(InterruptedException ix) { loggingService.error("Was interrupted while delaying the polling of NS sleeping: " + ix); tryAgain = false; }
public void run() { boolean tryAgain = true; try { Thread.sleep(18 * retryTime); } catch(InterruptedException ix) { loggingService.error("Was interrupted while delaying the polling of NS sleeping: " + ix); tryAgain = false; } //boolean neverfalse=true; while(tryAgain) { loggingService.debug("Trying to register counter: " + counter++); tryAgain = setManagerAddress(); try { if(tryAgain) { if(counter<6) { retryTime=counter*RETRY_TIME; } Thread.sleep(retryTime); } } catch(InterruptedException ix) { loggingService.error("Was interrupted while sleeping: " + ix); tryAgain = false; } } // while(tryAgain) // no longer need the community service utility _csu.releaseServices(); } // public void run()
12869 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12869/158e8441e14316ccbc5906fef13d4a7dfb8faa1f/CapabilitiesConsolidationPlugin.java/clean/securityservices/src/org/cougaar/core/security/monitoring/plugin/CapabilitiesConsolidationPlugin.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1086, 1435, 288, 1377, 1250, 225, 775, 23530, 273, 638, 31, 1377, 775, 288, 3639, 4884, 18, 19607, 12, 2643, 380, 3300, 950, 1769, 1377, 289, 1377, 1044, 12, 24485, 503, 8288, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1086, 1435, 288, 1377, 1250, 225, 775, 23530, 273, 638, 31, 1377, 775, 288, 3639, 4884, 18, 19607, 12, 2643, 380, 3300, 950, 1769, 1377, 289, 1377, 1044, 12, 24485, 503, 8288, ...
void set(String name, Object value, boolean global)
void set(QName name, Object value, int type)
void set(String name, Object value, boolean global) { if (global) { Map context = (Map) variables.getFirst(); context.put(name, value); } else { Map context = (Map) parameters.getFirst(); context.put(name, value); } }
50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/11aafc23ec4e191f57d02c34f8e6bfeb90bed5a2/Bindings.java/buggy/core/src/classpath/gnu/gnu/xml/transform/Bindings.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 918, 444, 12, 13688, 508, 16, 1033, 460, 16, 509, 618, 13, 225, 288, 565, 309, 261, 6347, 13, 1377, 288, 3639, 1635, 819, 273, 261, 863, 13, 3152, 18, 588, 3759, 5621, 3639, 819, 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, 918, 444, 12, 13688, 508, 16, 1033, 460, 16, 509, 618, 13, 225, 288, 565, 309, 261, 6347, 13, 1377, 288, 3639, 1635, 819, 273, 261, 863, 13, 3152, 18, 588, 3759, 5621, 3639, 819, 18, ...
if(dotLine != physLastLine || chunkCache.getLineInfo( screenLastLine).lastSubregion)
if(chunkCache.getLineInfo(screenLastLine).lastSubregion)
private void doSingleDrag(MouseEvent evt, boolean rect) { dragged = true; int x = evt.getX(); int dot = xyToOffset(x, Math.max(0,Math.min(painter.getHeight(),evt.getY())), (!painter.isBlockCaretEnabled() && !isOverwriteEnabled()) || quickCopyDrag); int dotLine = buffer.getLineOfOffset(dot); int extraEndVirt = 0; if(dotLine != physLastLine || chunkCache.getLineInfo( screenLastLine).lastSubregion) { float dotLineWidth = offsetToXY(dotLine,getLineLength(dotLine), returnValue).x; if(x > dotLineWidth) { extraEndVirt = (int)((x - dotLineWidth) / charWidth); if(x % charWidth > charWidth / 2) extraEndVirt++; } } resizeSelection(dragStart,dot,extraEndVirt,rect); if(quickCopyDrag) { // just scroll to the dragged location scrollTo(dotLine,dot - buffer.getLineStartOffset(dotLine),false); } else { if(dot != caret) moveCaretPosition(dot,false); if(rect && extraEndVirt != 0) { scrollTo(dotLine,dot - buffer.getLineStartOffset(dotLine) + extraEndVirt,false); } } } //}}}
8690 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8690/4bec319c22dc9fb3f5ea51bc5ca4ad475470b90b/JEditTextArea.java/clean/org/gjt/sp/jedit/textarea/JEditTextArea.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 3196, 202, 1152, 918, 741, 5281, 11728, 12, 9186, 1133, 6324, 16, 1250, 4917, 13, 202, 202, 95, 1082, 202, 15997, 2423, 273, 638, 31, 1082, 202, 474, 619, 273, 6324, 18, 588, 60, 5621, 1082,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 3196, 202, 1152, 918, 741, 5281, 11728, 12, 9186, 1133, 6324, 16, 1250, 4917, 13, 202, 202, 95, 1082, 202, 15997, 2423, 273, 638, 31, 1082, 202, 474, 619, 273, 6324, 18, 588, 60, 5621, 1082,...
ruby_cref = (NODE)old_cref;
ruby.setRubyCRef(oldCRef);
public RubyObject yield0(RubyObject value, RubyObject self, RubyModule klass, boolean acheck) { RubyObject result = ruby.getNil(); if (!(isBlockGiven() || isFBlockGiven()) || (rubyBlock == null)) { throw new RuntimeException("yield called out of block"); } RubyVarmap.push(ruby); pushClass(); RubyBlock block = rubyBlock.getTmp(); Frame frame = block.frame; frame.setPrev(getRubyFrame()); rubyFrame = frame; VALUE old_cref = ruby_cref; ruby_cref = (NODE)getRubyFrame().getCbase(); RubyScope oldScope = ruby.getRubyScope(); ruby.setRubyScope(block.scope); rubyBlock.pop(); if ((block.flags & RubyBlock.BLOCK_D_SCOPE) != 0) { ruby.setDynamicVars(new RubyVarmap(null, null, block.dynamicVars)); } else { ruby.setDynamicVars(block.dynamicVars); } ruby.setRubyClass((klass != null) ? klass : block.klass); if (klass == null) { self = (RubyObject)block.self; } NODE node = block.body; if (block.var != null) { // try { if (block.var == NODE.ONE) { if (acheck && value != null && value instanceof RubyArray && ((RubyArray)value).length() != 0) { throw new RubyArgumentException("wrong # of arguments ("+ ((RubyArray)value).length() + " for 0)"); } } else { if (block.var.nd_type() == NODE_MASGN) { massign(self, block.var, value, acheck); } else { if (acheck && value != null && value instanceof RubyArray && ((RubyArray)value).length() == 1) { value = ((RubyArray)value).entry(0); } assign(self, block.var, value, acheck); } } // } catch () { // goto pop_state; // } } else { if (acheck && value != null && value instanceof RubyArray && ((RubyArray)value).length() == 1) { value = ((RubyArray)value).entry(0); } } rubyIter.push(block.iter); while (true) { try { if (node == null) { result = ruby.getNil(); } else if (node.nd_type() == NODE_CFUNC || node.nd_type() == NODE_IFUNC) { if (value == null) { value = RubyArray.m_newArray(ruby, 0); } result = ((RubyCallbackMethod)node.nd_cfnc()).execute(value, new RubyObject[] {(RubyObject)node.nd_tval(), self}, ruby); } else { result = eval(self, node); } break; } catch (RedoException rExcptn) { } catch (NextException nExcptn) { result = ruby.getNil(); break; } catch (BreakException bExcptn) { break; } catch (ReturnException rExcptn) { break; } } // pop_state: rubyIter.pop(); popClass(); RubyVarmap.pop(ruby); rubyBlock.setTmp(block); rubyFrame = getRubyFrame().getPrev(); ruby_cref = (NODE)old_cref; // if (ruby_scope->flag & SCOPE_DONT_RECYCLE) // scope_dup(old_scope); ruby.setRubyScope(oldScope); /* * if (state) { * if (!block->tag) { * switch (state & TAG_MASK) { * case TAG_BREAK: * case TAG_RETURN: * jump_tag_but_local_jump(state & TAG_MASK); * break; * } * } * JUMP_TAG(state); * } */ return result; }
47134 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47134/cf644c556d410c47305ebeba5728efa25f7756dc/RubyInterpreter.java/buggy/org/jruby/interpreter/RubyInterpreter.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 19817, 921, 2824, 20, 12, 54, 10340, 921, 460, 16, 19817, 921, 365, 16, 19817, 3120, 7352, 16, 1250, 279, 1893, 13, 288, 3639, 19817, 921, 563, 273, 22155, 18, 588, 12616, 5621, 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, 377, 1071, 19817, 921, 2824, 20, 12, 54, 10340, 921, 460, 16, 19817, 921, 365, 16, 19817, 3120, 7352, 16, 1250, 279, 1893, 13, 288, 3639, 19817, 921, 563, 273, 22155, 18, 588, 12616, 5621, 7...
throws BadLocationException {
throws BadLocationException {
private void postInitComponents() { logger = new ConsoleLogger(this); viewPanelLayout = (CardLayout) viewPanel.getLayout(); // Console starts out disabled consoleSplitter.setDividerLocation(1.0); // List of bug group tabs. // This must be in the same order as GROUP_BY_ORDER_LIST! bugTreeList = new JTree[]{byClassBugTree, byPackageBugTree, byBugTypeBugTree}; // Configure bug trees for (int i = 0; i < bugTreeList.length; ++i) { JTree bugTree = bugTreeList[i]; bugTree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION); bugTree.setCellRenderer(bugCellRenderer); bugTree.setRootVisible(false); bugTree.setShowsRootHandles(true); bugTree.addTreeSelectionListener(new TreeSelectionListener() { public void valueChanged(TreeSelectionEvent e) { bugTreeSelectionChanged(e); } }); } jarFileList.setModel(new DefaultListModel()); sourceDirList.setModel(new DefaultListModel()); classpathEntryList.setModel(new DefaultListModel()); // We use a special highlight painter to ensure that the highlights cover // complete source lines, even though the source text doesn't // fill the lines completely. final Highlighter.HighlightPainter painter = new DefaultHighlighter.DefaultHighlightPainter(sourceTextArea.getSelectionColor()) { public Shape paintLayer(Graphics g, int offs0, int offs1, Shape bounds, JTextComponent c, View view) { try { Shape extent = view.modelToView(offs0, Position.Bias.Forward, offs1, Position.Bias.Backward, bounds); Rectangle rect = extent.getBounds(); rect.x = 0; rect.width = bounds.getBounds().width; g.setColor(getColor()); g.fillRect(rect.x, rect.y, rect.width, rect.height); return rect; } catch (BadLocationException e) { return null; } } }; Highlighter sourceHighlighter = new DefaultHighlighter() { public Object addHighlight(int p0, int p1, Highlighter.HighlightPainter p) throws BadLocationException { return super.addHighlight(p0, p1, painter); } }; sourceTextArea.setHighlighter(sourceHighlighter); updateTitle(getCurrentProject()); // Load the icon for the UMD logo ClassLoader classLoader = this.getClass().getClassLoader(); ImageIcon logoIcon = new ImageIcon(classLoader.getResource("edu/umd/cs/findbugs/gui/logo_umd.png")); logoLabel.setIcon(logoIcon); // Set common Menu Accelerators newProjectItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N, MENU_MASK)); openProjectItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O, MENU_MASK)); saveProjectItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S, MENU_MASK)); closeProjectItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_W, MENU_MASK)); reloadProjectItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_R, MENU_MASK)); cutItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_X, MENU_MASK)); copyItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_C, MENU_MASK)); pasteItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_V, MENU_MASK)); selectAllItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_A, MENU_MASK)); if (MAC_OS_X) { // Some more accelerators that use modifiers. Other platforms // tend not to use modifiers for menu accelerators saveProjectAsItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S, MENU_MASK | Event.SHIFT_MASK)); loadBugsItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O, MENU_MASK | Event.ALT_MASK)); saveBugsItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S, MENU_MASK | Event.ALT_MASK)); // Leave room for the growBox on Mac growBoxSpacer.setMinimumSize(new java.awt.Dimension(16,16)); // Remove Unnecessary/Redundant menu items. fileMenu.remove(exitItem); fileMenu.remove(jSeparator6); theMenuBar.remove(helpMenu); // Set up listeners for Quit and About menu items using // Apple's EAWT API. // We use reflection here, so there is no posible chance that the // class loader will try to load OSXAdapter on a non Mac system try { Class osxAdapter = Class.forName("edu.umd.cs.findbugs.gui.OSXAdapter"); Class[] defArgs = {FindBugsFrame.class}; Method registerMethod = osxAdapter.getDeclaredMethod("registerMacOSXApplication", defArgs); if (registerMethod != null) { Object[] args = {this}; registerMethod.invoke(osxAdapter, args); } } catch (NoClassDefFoundError e) { // This will be thrown first if the OSXAdapter is loaded on a system without the EAWT // because OSXAdapter extends ApplicationAdapter in its def System.err.println("This version of Mac OS X does not support the Apple EAWT. Application Menu handling has been disabled (" + e + ")"); } catch (ClassNotFoundException e) { // This shouldn't be reached; if there's a problem with the OSXAdapter we should get the // above NoClassDefFoundError first. System.err.println("This version of Mac OS X does not support the Apple EAWT. Application Menu handling has been disabled (" + e + ")"); } catch (Exception e) { System.err.println("Exception while loading the OSXAdapter:"); e.printStackTrace(); } } }
7352 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7352/9915427a1d0b52795e6957d0268f45aaae0d6d82/FindBugsFrame.java/clean/findbugs/src/java/edu/umd/cs/findbugs/gui/FindBugsFrame.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 918, 1603, 2570, 7171, 1435, 288, 202, 202, 4901, 273, 394, 9657, 3328, 12, 2211, 1769, 202, 202, 1945, 5537, 3744, 273, 261, 6415, 3744, 13, 1476, 5537, 18, 588, 3744, 5621, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 918, 1603, 2570, 7171, 1435, 288, 202, 202, 4901, 273, 394, 9657, 3328, 12, 2211, 1769, 202, 202, 1945, 5537, 3744, 273, 261, 6415, 3744, 13, 1476, 5537, 18, 588, 3744, 5621, ...
boolean active = mSelectedViewport.getProperty("active", 0) == Boolean.TRUE;
boolean active = mSelectedViewport.getProperty("active", 0).equals(Boolean.TRUE);
public void valueChanged(PlacerSelectionEvent e) { mSelectedViewport = ((ConfigElement) e.getValue()); boolean enabled = mSelectedViewport != null; mViewportPropsItem.setEnabled(enabled); mViewportActiveItem.setEnabled(enabled); mViewportLeftEyeItem.setEnabled(enabled); mViewportRightEyeItem.setEnabled(enabled); mViewportStereoItem.setEnabled(enabled); if ( enabled ) { boolean active = mSelectedViewport.getProperty("active", 0) == Boolean.TRUE; mViewportActiveItem.setSelected(active); int view = ((Integer) mSelectedViewport.getProperty("view", 0)).intValue(); if ( view == LEFT_EYE ) { } } }
49828 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49828/2cf9d9efa4cee779f4ef5f4caec9cb6fdc84703f/DisplayWindowFrame.java/clean/modules/vrjuggler/vrjconfig/customeditors/display_window/org/vrjuggler/vrjconfig/customeditors/display_window/DisplayWindowFrame.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 565, 1071, 918, 460, 5033, 12, 1749, 10598, 6233, 1133, 425, 13, 282, 288, 1377, 312, 7416, 22743, 273, 14015, 809, 1046, 13, 425, 18, 24805, 10663, 1377, 1250, 3696, 273, 312, 7416, 22743, 48...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 565, 1071, 918, 460, 5033, 12, 1749, 10598, 6233, 1133, 425, 13, 282, 288, 1377, 312, 7416, 22743, 273, 14015, 809, 1046, 13, 425, 18, 24805, 10663, 1377, 1250, 3696, 273, 312, 7416, 22743, 48...
"INSERT INTO #SAfe0011(value) values (?)");
"INSERT INTO #SAfe0011(value) values (?)");
public void testUpdateRow0011() throws Exception { Statement stmt = con.createStatement(); stmt.execute("CREATE TABLE #SAfe0011(value VARCHAR(255) PRIMARY KEY)"); stmt.close(); PreparedStatement insStmt = con.prepareStatement( "INSERT INTO #SAfe0011(value) values (?)"); insStmt.setString(1, "Row 1"); assertEquals(1, insStmt.executeUpdate()); insStmt.setString(1, "Row 2"); assertEquals(1, insStmt.executeUpdate()); insStmt.close(); stmt = con.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE); ResultSet rs = stmt.executeQuery("SELECT * FROM #SAfe0011 ORDER BY 1"); assertEquals(null, stmt.getWarnings()); assertEquals(null, rs.getWarnings()); assertTrue(rs.next()); assertTrue(rs.next()); rs.updateString(1, "Row X"); rs.updateRow(); rs.next(); assertEquals("Row X", rs.getString(1)); rs.close(); }
2029 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2029/d48066e24a9a4b4edf35b9545de98ba05acafd4d/SAfeTest.java/clean/src/test/net/sourceforge/jtds/test/SAfeTest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1842, 1891, 1999, 713, 2499, 1435, 1216, 1185, 288, 3639, 8056, 3480, 273, 356, 18, 2640, 3406, 5621, 3639, 3480, 18, 8837, 2932, 9344, 7567, 468, 5233, 3030, 713, 2499, 12, 11...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1891, 1999, 713, 2499, 1435, 1216, 1185, 288, 3639, 8056, 3480, 273, 356, 18, 2640, 3406, 5621, 3639, 3480, 18, 8837, 2932, 9344, 7567, 468, 5233, 3030, 713, 2499, 12, 11...
public String paren_chunk() throws RecognitionException { String text; Token any=null; String c = null; text = null; try { // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:716:17: ( ( options {greedy=false; } : '(' c= paren_chunk ')' | any= . )* ) // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:716:17: ( options {greedy=false; } : '(' c= paren_chunk ')' | any= . )* { // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:716:17: ( options {greedy=false; } : '(' c= paren_chunk ')' | any= . )* loop52: do { int alt52=3; switch ( input.LA(1) ) { case EOL: alt52=3; break; case 23: alt52=3; break; case 21: alt52=1; break; case ID: case INT: case BOOL: 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 15: case 16: case 17: case 18: case 19: case 20: case 22: case 24: case 25: case 26: case 27: case 28: case 29: case 30: case 31: case 32: case 33: case 34: case 35: case 36: case 37: 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: case 55: case 56: alt52=2; break; } switch (alt52) { case 1 : // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:717:25: '(' c= paren_chunk ')' { match(input,21,FOLLOW_21_in_paren_chunk2069); following.push(FOLLOW_paren_chunk_in_paren_chunk2073); c=paren_chunk(); following.pop(); match(input,23,FOLLOW_23_in_paren_chunk2075); //System.err.println( "chunk [" + c + "]" ); if ( c == null ) { c = ""; } if ( text == null ) { text = "( " + c + " )"; } else { text = text + " ( " + c + " )"; } } break; case 2 : // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:729:19: any= . { any=(Token)input.LT(1); matchAny(input); //System.err.println( "any [" + any.getText() + "]" ); if ( text == null ) { text = any.getText(); } else { text = text + " " + any.getText(); } } break; default : break loop52; } } while (true); } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { } return text; }
5490 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5490/bf3305a89ef5e916acbab744c38aaaec83bf67ff/RuleParser.java/clean/drools-compiler/src/main/java/org/drools/lang/RuleParser.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 514, 22146, 67, 6551, 1435, 1216, 9539, 288, 6647, 514, 977, 31, 3639, 3155, 1281, 33, 2011, 31, 3639, 514, 276, 273, 446, 31, 1171, 202, 202, 955, 273, 446, 31, 540, 202, 3639, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 514, 22146, 67, 6551, 1435, 1216, 9539, 288, 6647, 514, 977, 31, 3639, 3155, 1281, 33, 2011, 31, 3639, 514, 276, 273, 446, 31, 1171, 202, 202, 955, 273, 446, 31, 540, 202, 3639, ...
Vector expectedItems = new Vector(); expectedItems.addElement("A"); expectedItems.addElement("B");
Vector expectedItems = new Vector(); expectedItems.addElement("A"); expectedItems.addElement("B");
public void testManyFromIterator() { Vector expectedItems = new Vector(); expectedItems.addElement("A"); expectedItems.addElement("B"); Vector actualItems = (Vector)expectedItems.clone(); myExpectation.addExpectedMany(expectedItems.iterator()); myExpectation.addActualMany(actualItems.iterator()); myExpectation.verify(); }
54028 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54028/c26c57f3ac4851e6bc9c5df8515ac73f4045eebf/AbstractTestExpectationCollection.java/buggy/jmock/core/src/test/jmock/expectation/AbstractTestExpectationCollection.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1842, 5594, 1265, 3198, 1435, 288, 202, 202, 5018, 2665, 3126, 273, 394, 5589, 5621, 202, 202, 3825, 3126, 18, 1289, 1046, 2932, 37, 8863, 202, 202, 3825, 3126, 18, 1289, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5594, 1265, 3198, 1435, 288, 202, 202, 5018, 2665, 3126, 273, 394, 5589, 5621, 202, 202, 3825, 3126, 18, 1289, 1046, 2932, 37, 8863, 202, 202, 3825, 3126, 18, 1289, ...
protected KeyStroke(final SortedSet modifierKeys, final NaturalKey naturalKey) { this.modifierKeys = new TreeSet(modifierKeys); this.naturalKey = naturalKey; this.modifierKeysAsArray = (ModifierKey[]) this.modifierKeys .toArray(new ModifierKey[this.modifierKeys.size()]); }
private KeyStroke(final int modifierKeys, final int naturalKey) { this.modifierKeys = modifierKeys; this.naturalKey = naturalKey; }
protected KeyStroke(final SortedSet modifierKeys, final NaturalKey naturalKey) { this.modifierKeys = new TreeSet(modifierKeys); this.naturalKey = naturalKey; this.modifierKeysAsArray = (ModifierKey[]) this.modifierKeys .toArray(new ModifierKey[this.modifierKeys.size()]); }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/092230ba080f34842abb8d636b3b6894254f8cc5/KeyStroke.java/clean/bundles/org.eclipse.jface/src/org/eclipse/jface/bindings/keys/KeyStroke.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 1929, 14602, 12, 6385, 22123, 9606, 2396, 16, 5411, 727, 423, 270, 3766, 653, 15145, 653, 13, 288, 3639, 333, 18, 20597, 2396, 273, 394, 19461, 12, 20597, 2396, 1769, 3639, 333, 18,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 1929, 14602, 12, 6385, 22123, 9606, 2396, 16, 5411, 727, 423, 270, 3766, 653, 15145, 653, 13, 288, 3639, 333, 18, 20597, 2396, 273, 394, 19461, 12, 20597, 2396, 1769, 3639, 333, 18,...
TreeItem[] selection = AvailableDbObjects.getSelection( );
TreeItem[] selection = availableDbObjectsTree.getSelection( );
public void addDragSupportToTree( ) { DragSource dragSource = new DragSource( AvailableDbObjects, DND.DROP_COPY ); dragSource.setTransfer( new Transfer[]{TextTransfer.getInstance( )} ); dragSource.addDragListener( new DragSourceAdapter( ) { public void dragStart( DragSourceEvent event ) { TreeItem[] selection = AvailableDbObjects.getSelection( ); if ( selection.length <= 0 || selection[0].getData( ) == null ) { event.doit = false; return; } } public void dragSetData( DragSourceEvent event ) { if ( TextTransfer.getInstance( ).isSupportedType( event.dataType ) ) { TreeItem[] selection = AvailableDbObjects.getSelection( ); if ( selection.length > 0 ) { event.data = selection[0].getData( ); } } } } ); }
15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/fdb840ed0d1bd5738d66f7ef3495e6f3b896fe6d/SQLDataSetEditorPage.java/clean/data/org.eclipse.birt.report.data.oda.jdbc.ui/src/org/eclipse/birt/report/data/oda/jdbc/ui/editors/SQLDataSetEditorPage.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 527, 11728, 6289, 774, 2471, 12, 262, 202, 95, 202, 202, 11728, 1830, 8823, 1830, 273, 394, 28425, 1830, 12, 15633, 4331, 4710, 16, 463, 2908, 18, 18768, 67, 24875, 11272, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 527, 11728, 6289, 774, 2471, 12, 262, 202, 95, 202, 202, 11728, 1830, 8823, 1830, 273, 394, 28425, 1830, 12, 15633, 4331, 4710, 16, 463, 2908, 18, 18768, 67, 24875, 11272, ...
len = comm.getByte();
len = comm.getByte();
private Object getDatetimeValue(final int type) throws java.io.IOException, TdsException { // Some useful constants final long SECONDS_PER_DAY = 24L * 60L * 60L; final long DAYS_BETWEEN_1900_AND_1970 = 25567L; int len; final long tdsDays, tdsTime, sqlDays, minutes, seconds, micros; long millis; if (type == SYBDATETIMN) { len = comm.getByte(); } else if (type == SYBDATETIME4) { len = 4; } else { len = 8; // XXX shouldn't this be an error? } switch (len) { case 0: return null; case 8: // It appears that a datetime is made of of 2 32bit ints // The first one is the number of days since 1900 // The second integer is the number of seconds*300 // The reason the calculations below are sliced up into // such small baby steps is to avoid a bug in JDK1.2.2's // runtime, which got confused by the original complexity. tdsDays = (long) comm.getTdsInt(); tdsTime = (long) comm.getTdsInt(); sqlDays = tdsDays - DAYS_BETWEEN_1900_AND_1970; seconds = sqlDays * SECONDS_PER_DAY + tdsTime / 300L; micros = ((tdsTime % 300L) * 1000000L) / 300L; millis = seconds * 1000L + micros / 1000L - zoneOffset; // Round up if appropriate. if (micros % 1000L >= 500L) { millis++; } return new Timestamp(millis - getDstOffset(millis)); case 4: // Accroding to Transact SQL Reference // a smalldatetime is two small integers. // The first is the number of days past January 1, 1900, // the second smallint is the number of minutes past // midnight. tdsDays = (long) comm.getTdsShort(); minutes = (long) comm.getTdsShort(); sqlDays = tdsDays - DAYS_BETWEEN_1900_AND_1970; seconds = sqlDays * SECONDS_PER_DAY + minutes * 60L; millis = seconds * 1000L - zoneOffset; return new Timestamp(millis - getDstOffset(millis)); default: throw new TdsNotImplemented("Don't now how to handle " + "date with size of " + len); } }
439 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/439/fb8d83e970f8d6bd9cc0f859d3736d3613730e2b/Tds.java/buggy/trunk/jtds/src/main/net/sourceforge/jtds/jdbc/Tds.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 1033, 24211, 2374, 620, 12, 6385, 509, 618, 13, 2398, 1216, 2252, 18, 1594, 18, 14106, 16, 399, 2377, 503, 288, 3639, 368, 10548, 5301, 6810, 3639, 727, 1525, 17209, 67, 3194, 67, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 1033, 24211, 2374, 620, 12, 6385, 509, 618, 13, 2398, 1216, 2252, 18, 1594, 18, 14106, 16, 399, 2377, 503, 288, 3639, 368, 10548, 5301, 6810, 3639, 727, 1525, 17209, 67, 3194, 67, ...
DocumentLocator target = getTargetLocator();
final String targetPath = getTargetPath(); final Area area = clippedDocument.area();
protected void doExecute() throws Exception { super.doExecute(); DocumentFactory identityMap = getDocumentFactory(); Clipboard clipboard = new ClipboardHelper().getClipboard(getContext()); Publication pub = getSourceDocument().getPublication(); Document clippedDocument = clipboard.getDocument(identityMap, pub); DocumentLocator target = getTargetLocator(); DocumentManager documentManager = null; try { documentManager = (DocumentManager) this.manager.lookup(DocumentManager.ROLE); if (clipboard.getMethod() == Clipboard.METHOD_COPY) { documentManager.copyAll(clippedDocument, target); } else if (clipboard.getMethod() == Clipboard.METHOD_CUT) { documentManager.moveAll(clippedDocument, target); } else { throw new RuntimeException("This clipboard method is not supported!"); } } finally { if (documentManager != null) { this.manager.release(documentManager); } } }
45951 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45951/bd72ae09e076821ce30170c5ff463bfbe8c4b654/Paste.java/clean/src/modules-core/sitemanagement/java/src/org/apache/lenya/cms/site/usecases/Paste.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 918, 741, 5289, 1435, 1216, 1185, 288, 3639, 2240, 18, 2896, 5289, 5621, 3639, 4319, 1733, 4215, 863, 273, 9956, 1733, 5621, 3639, 385, 3169, 3752, 20304, 273, 394, 385, 3169, 3752, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 741, 5289, 1435, 1216, 1185, 288, 3639, 2240, 18, 2896, 5289, 5621, 3639, 4319, 1733, 4215, 863, 273, 9956, 1733, 5621, 3639, 385, 3169, 3752, 20304, 273, 394, 385, 3169, 3752, ...
public void visitFBodyNode(Node iVisited) { visit(iVisited); leave(iVisited); }
public void visitFBodyNode(Node iVisited) { visit(iVisited); leave(iVisited); }
public void visitFBodyNode(Node iVisited) { visit(iVisited); leave(iVisited); }
52337 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52337/d31a76ee29d5978a9bec41e3ac9134cee024bcab/NodeVisitorAdapter.java/buggy/org/jruby/nodes/NodeVisitorAdapter.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 3757, 42, 2250, 907, 12, 907, 277, 30019, 13, 202, 95, 202, 202, 11658, 12, 77, 30019, 1769, 202, 202, 19574, 12, 77, 30019, 1769, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 3757, 42, 2250, 907, 12, 907, 277, 30019, 13, 202, 95, 202, 202, 11658, 12, 77, 30019, 1769, 202, 202, 19574, 12, 77, 30019, 1769, 202, 97, 2, -100, -100, -100, -100, -...
public String word() throws RecognitionException { String word; Token id=null; Token str=null; word = null; try { // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/lang/drl.g:475:17: (id= ID | 'import' | 'use' | 'rule' | 'salience' | 'no-loop' | 'when' | 'then' | 'end' | str= STRING ) int alt38=10; switch ( input.LA(1) ) { case ID: alt38=1; break; case 17: alt38=2; break; case 43: alt38=3; break; case 19: alt38=4; break; case 26: alt38=5; break; case 27: alt38=6; break; case 20: alt38=7; break; case 23: alt38=8; break; case 24: alt38=9; break; case STRING: alt38=10; break; default: NoViableAltException nvae = new NoViableAltException("471:1: word returns [String word] : (id= ID | \'import\' | \'use\' | \'rule\' | \'salience\' | \'no-loop\' | \'when\' | \'then\' | \'end\' | str= STRING );", 38, 0, input); throw nvae; } switch (alt38) { case 1 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/lang/drl.g:475:17: id= ID { id=(Token)input.LT(1); match(input,ID,FOLLOW_ID_in_word1713); word=id.getText(); } break; case 2 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/lang/drl.g:476:17: 'import' { match(input,17,FOLLOW_17_in_word1725); word="import"; } break; case 3 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/lang/drl.g:477:17: 'use' { match(input,43,FOLLOW_43_in_word1734); word="use"; } break; case 4 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/lang/drl.g:478:17: 'rule' { match(input,19,FOLLOW_19_in_word1746); word="rule"; } break; case 5 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/lang/drl.g:479:17: 'salience' { match(input,26,FOLLOW_26_in_word1757); word="salience"; } break; case 6 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/lang/drl.g:480:17: 'no-loop' { match(input,27,FOLLOW_27_in_word1765); word="no-loop"; } break; case 7 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/lang/drl.g:481:17: 'when' { match(input,20,FOLLOW_20_in_word1773); word="when"; } break; case 8 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/lang/drl.g:482:17: 'then' { match(input,23,FOLLOW_23_in_word1784); word="then"; } break; case 9 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/lang/drl.g:483:17: 'end' { match(input,24,FOLLOW_24_in_word1795); word="end"; } break; case 10 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/lang/drl.g:484:17: str= STRING { str=(Token)input.LT(1); match(input,STRING,FOLLOW_STRING_in_word1809); word=str.getText(); word=word.substring( 1, word.length()-1 ); } break; } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { } return word; }
31577 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/31577/23e6345ce1df19444a51fe623f6e8f8a637abc8b/RuleParser.java/buggy/drools-compiler/src/main/java/org/drools/lang/RuleParser.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 514, 2076, 1435, 1216, 9539, 288, 6647, 514, 2076, 31, 3639, 3155, 612, 33, 2011, 31, 3639, 3155, 609, 33, 2011, 31, 540, 202, 202, 1095, 273, 446, 31, 540, 202, 3639, 775, 288, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 514, 2076, 1435, 1216, 9539, 288, 6647, 514, 2076, 31, 3639, 3155, 612, 33, 2011, 31, 3639, 3155, 609, 33, 2011, 31, 540, 202, 202, 1095, 273, 446, 31, 540, 202, 3639, 775, 288, ...
Eval eval = new Eval();
public static void main(String[] args) { try { int i; Interp interp = new Interp(); /* Add the standard packages in. */ new HeclFile().loadModule(interp); new HeclLoad().loadModule(interp); Eval eval = new Eval(); Vector argv = new Vector(); for (i = 0; i < args.length; i++) { //System.out.println("(running " + args[i] + ")"); argv.addElement(new Thing(args[i])); } interp.setVar("argv", ListThing.create(argv)); if (args.length > 0) { HeclFile.sourceFile(interp, args[0]); } else { Hecl.commandLine(interp); } } catch (Exception e) { e.printStackTrace(); } }
47447 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47447/3adffd7537ce9ea150649787988e7c4c699d97cd/Hecl.java/clean/trunk/hecl/commandline/Hecl.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 760, 918, 2774, 12, 780, 8526, 833, 13, 288, 3639, 775, 288, 5411, 509, 277, 31, 5411, 5294, 84, 8174, 273, 394, 5294, 84, 5621, 202, 565, 1748, 1436, 326, 4529, 5907, 316, 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, 760, 918, 2774, 12, 780, 8526, 833, 13, 288, 3639, 775, 288, 5411, 509, 277, 31, 5411, 5294, 84, 8174, 273, 394, 5294, 84, 5621, 202, 565, 1748, 1436, 326, 4529, 5907, 316, 18, ...
globalCounter += getCurrentOffset(); locationMap.startInclusion(((InclusionData)data).reader, inc.o, globalCounter); contextDelta = 0;
locationMap.startInclusion(((InclusionData)data).reader, inc.o, resolveOffset( getCurrentOffset() )); bufferDelta[bufferStackPos + 1 ] = 0;
protected void pushContext(char[] buffer, Object data) { if (data instanceof InclusionData) { if (log.isTracing()) { StringBuffer b = new StringBuffer("Entering inclusion "); //$NON-NLS-1$ b.append(((InclusionData) data).reader.filename); log.traceLog(b.toString()); } DOMInclusion inc = ((DOMInclusion) ((InclusionData) data).inclusion); globalCounter += getCurrentOffset(); locationMap.startInclusion(((InclusionData)data).reader, inc.o, globalCounter); contextDelta = 0; } super.pushContext(buffer, data); }
6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/69d98316f4a76398de5c961029bb4f2f6fa351fe/DOMScanner.java/clean/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner2/DOMScanner.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 565, 4750, 918, 1817, 1042, 12, 3001, 8526, 1613, 16, 1033, 501, 13, 288, 1377, 309, 261, 892, 1276, 657, 15335, 751, 13, 288, 540, 309, 261, 1330, 18, 291, 3403, 10756, 288, 5411, 6674, 324...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 565, 4750, 918, 1817, 1042, 12, 3001, 8526, 1613, 16, 1033, 501, 13, 288, 1377, 309, 261, 892, 1276, 657, 15335, 751, 13, 288, 540, 309, 261, 1330, 18, 291, 3403, 10756, 288, 5411, 6674, 324...
return ""; }
return ""; }
protected String updateSummaryVisible() { return ""; //$NON-NLS-1$ }
55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/1ceb585b9b16047c6c580984b0c9962c41a22ba6/MarkerView.java/clean/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerView.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 514, 1089, 4733, 6207, 1435, 288, 3639, 327, 1408, 31, 4329, 3993, 17, 5106, 17, 21, 8, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 514, 1089, 4733, 6207, 1435, 288, 3639, 327, 1408, 31, 4329, 3993, 17, 5106, 17, 21, 8, 565, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if(noPassword) { redirectToRoot(ctx); return; }
public void handlePost(URI uri, Bucket data, ToadletContext ctx) throws ToadletContextClosedException, IOException { if(data.size() > 1024*1024) { this.writeReply(ctx, 400, "text/plain", "Too big", "Data exceeds 1MB limit"); return; } HTTPRequest request = new HTTPRequest(uri,data,ctx); String passwd = request.getPartAsString("formPassword", 32); boolean noPassword = (passwd == null) || !passwd.equals(core.formPassword); if(noPassword) { if(Logger.shouldLog(Logger.MINOR, this)) Logger.minor(this, "No password ("+passwd+" should be "+core.formPassword+")"); } if(request.getPartAsString("updateconfirm", 32).length() > 0){ if(noPassword) { redirectToRoot(ctx); return; } // false for no navigation bars, because that would be very silly HTMLNode pageNode = ctx.getPageMaker().getPageNode("Node updating"); HTMLNode contentNode = ctx.getPageMaker().getContentNode(pageNode); HTMLNode infobox = contentNode.addChild(ctx.getPageMaker().getInfobox("infobox-information", "Node updating")); HTMLNode content = ctx.getPageMaker().getContentNode(infobox); content.addChild("p").addChild("#", "The Freenet node is being updated and will self-restart. The restart process may take up to 10 minutes, because the node will try to fetch a revocation key before updating."); content.addChild("p").addChild("#", "Thank you for using Freenet."); writeReply(ctx, 200, "text/html", "OK", pageNode.generate()); Logger.normal(this, "Node is updating/restarting"); node.ps.queueTimedJob(new Runnable() { public void run() { node.getNodeUpdater().Update(); }}, 0); return; }else if (request.getPartAsString(GenericReadFilterCallback.magicHTTPEscapeString, MAX_URL_LENGTH).length()>0){ if(noPassword) { redirectToRoot(ctx); return; } MultiValueTable headers = new MultiValueTable(); String url = null; if((request.getPartAsString("Go", 32).length() > 0)) url = request.getPartAsString(GenericReadFilterCallback.magicHTTPEscapeString, MAX_URL_LENGTH); headers.put("Location", url==null ? "/" : url); ctx.sendReplyHeaders(302, "Found", headers, null, 0); return; }else if (request.getPartAsString("update", 32).length() > 0) { if(noPassword) { redirectToRoot(ctx); return; } HTMLNode pageNode = ctx.getPageMaker().getPageNode("Node Update"); HTMLNode contentNode = ctx.getPageMaker().getContentNode(pageNode); HTMLNode infobox = contentNode.addChild(ctx.getPageMaker().getInfobox("infobox-query", "Node Update")); HTMLNode content = ctx.getPageMaker().getContentNode(infobox); content.addChild("p").addChild("#", "Are you sure you wish to update your Freenet node?"); HTMLNode updateForm = content.addChild("p").addChild("form", new String[] { "action", "method" }, new String[] { "/", "post" }); updateForm.addChild("input", new String[] { "type", "name", "value" }, new String[] { "submit", "cancel", "Cancel" }); updateForm.addChild("input", new String[] { "type", "name", "value" }, new String[] { "submit", "updateconfirm", "Update" }); updateForm.addChild("input", new String[] { "type", "name", "value" }, new String[] { "hidden", "formPassword", core.formPassword }); writeReply(ctx, 200, "text/html", "OK", pageNode.generate()); return; }else if(request.isPartSet("getThreadDump")) { if(noPassword) { redirectToRoot(ctx); return; } HTMLNode pageNode = ctx.getPageMaker().getPageNode("Get a Thread Dump"); HTMLNode contentNode = ctx.getPageMaker().getContentNode(pageNode); if(node.isUsingWrapper()){ HTMLNode infobox = contentNode.addChild(ctx.getPageMaker().getInfobox("Thread Dump generation")); ctx.getPageMaker().getContentNode(infobox).addChild("#", "A thread dump has been generated, it's aviable in "+ WrapperManager.getProperties().getProperty("wrapper.logfile")); System.out.println("Thread Dump:"); WrapperManager.requestThreadDump(); }else{ HTMLNode infobox = contentNode.addChild(ctx.getPageMaker().getInfobox("infobox-error","Thread Dump generation")); ctx.getPageMaker().getContentNode(infobox).addChild("#", "It's not possible to make the node generate a thread dump if you aren't using the wrapper!"); } this.writeReply(ctx, 200, "text/html", "OK", pageNode.generate()); return; }else if (request.isPartSet("addbookmark")) { if(noPassword) { redirectToRoot(ctx); return; } String key = request.getPartAsString("key", MAX_KEY_LENGTH); String name = request.getPartAsString("name", MAX_NAME_LENGTH); try { bookmarks.addBookmark(new Bookmark(key, name), true); } catch (MalformedURLException mue) { this.sendBookmarkEditPage(ctx, MODE_ADD, null, key, name, "Given key does not appear to be a valid Freenet key."); return; } try { this.handleGet(new URI("/welcome/?managebookmarks"), ctx); } catch (URISyntaxException ex) { } } else if (request.isPartSet("managebookmarks")) { if(noPassword) { redirectToRoot(ctx); return; } Enumeration e = bookmarks.getBookmarks(); while (e.hasMoreElements()) { Bookmark b = (Bookmark)e.nextElement(); if (request.isPartSet("delete_"+b.hashCode())) { bookmarks.removeBookmark(b, true); } else if (request.isPartSet("edit_"+b.hashCode())) { this.sendBookmarkEditPage(ctx, b); return; } else if (request.isPartSet("update_"+b.hashCode())) { // removing it and adding means that any USK subscriptions are updated properly String key = request.getPartAsString("key", MAX_KEY_LENGTH); String name = request.getPartAsString("name", MAX_NAME_LENGTH); try { Bookmark newbkmk = new Bookmark(key, name); bookmarks.removeBookmark(b, false); bookmarks.addBookmark(newbkmk, true); } catch (MalformedURLException mue) { this.sendBookmarkEditPage(ctx, MODE_EDIT, b, key, name, "Given key does not appear to be a valid freenet key."); return; } try { this.handleGet(new URI("/welcome/?managebookmarks"), ctx); } catch (URISyntaxException ex) { return; } } } try { this.handleGet(new URI("/welcome/?managebookmarks"), ctx); } catch (URISyntaxException ex) { return; } }else if(request.isPartSet("disable")){ if(noPassword) { redirectToRoot(ctx); return; } UserAlert[] alerts=core.alerts.getAlerts(); for(int i=0;i<alerts.length;i++){ if(request.getIntPart("disable",-1)==alerts[i].hashCode()){ UserAlert alert = alerts[i]; // Won't be dismissed if it's not allowed anyway if(alert.userCanDismiss() && alert.shouldUnregisterOnDismiss()) { alert.onDismiss(); Logger.normal(this,"Unregistering the userAlert "+alert.hashCode()); core.alerts.unregister(alert); } else { Logger.normal(this,"Disabling the userAlert "+alert.hashCode()); alert.isValid(false); } writePermanentRedirect(ctx, "Configuration applied", "/"); } } } else if(request.isPartSet("boardname")&&(request.isPartSet("filename")||request.isPartSet("message"))) { // Inserting into a frost board FIN // boardname // filename // boardprivatekey (not needed) // boardpublickey (not needed) (and maybe dump it all the way) // innitialindex // sender // subject String boardName = request.getPartAsString("boardname",FrostBoard.MAX_NAME_LENGTH); String boardPrivateKey = request.getPartAsString("boardprivatekey",78); String boardPublicKey = request.getPartAsString("boardpublickey",78); String sender = request.getPartAsString("sender",64); String subject = request.getPartAsString("subject",128); String message = request.getPartAsString("message",1024); if(message.length() == 0) // back compatibility; should use message message = request.getPartAsString("filename", 1024); int initialIndex = 0; if(request.isPartSet("initialindex")) { try { initialIndex = Integer.parseInt(request.getPartAsString("initialindex",10)); } catch(NumberFormatException e) { initialIndex = 0; } } else if(request.isPartSet("innitialindex")) { try { initialIndex = Integer.parseInt(request.getPartAsString("innitialindex",10)); } catch(NumberFormatException e) { initialIndex = 0; } } if(noPassword) { HTMLNode pageNode = ctx.getPageMaker().getPageNode("Frost Instant Note insert"); HTMLNode contentNode = ctx.getPageMaker().getContentNode(pageNode); HTMLNode infobox = contentNode.addChild(ctx.getPageMaker().getInfobox("infobox-query", "Frost Instant Note insert")); HTMLNode content = ctx.getPageMaker().getContentNode(infobox); content.addChild("p").addChild("#", "Do you want to insert the following Frost message?"); HTMLNode postForm = content.addChild("p").addChild("form", new String[] { "action", "method", "enctype", "encoding" }, new String[] { "/", "post", "UTF-8", "multipart/form-data" }); postForm.addChild("input", new String[] { "type", "name", "value" }, new String[] { "hidden", "formPassword", core.formPassword }); HTMLNode table = postForm.addChild("table", "align", "center"); finInputRow(table, "boardname", "Target Board", boardName); finInputRow(table, "boardprivatekey", "Private Key", boardPrivateKey); finInputRow(table, "boardpublickey", "Public Key", boardPublicKey); finInputRow(table, "initialindex", "Index to start with", Integer.toString(initialIndex)); finInputRow(table, "sender", "From", sender); finInputRow(table, "subject", "Subject", subject); finInputBoxRow(table, "message", "Message", message); postForm.addChild("input", new String[] { "type", "name", "value" }, new String[] { "submit", "cancel", "Cancel" }); postForm.addChild("input", new String[] { "type", "name", "value" }, new String[] { "submit", "finconfirm", "Post" }); writeReply(ctx, 200, "text/html", "OK", pageNode.generate()); return; } String confirm = request.getPartAsString("finconfirm", 32); if(!confirm.equals("Post")) { redirectToRoot(ctx); return; } FrostBoard board = null; if(boardPrivateKey.length()>0 && boardPublicKey.length()>0) { // keyed board board = new FrostBoard(boardName, boardPrivateKey, boardPublicKey); } else { // unkeyed or public board board = new FrostBoard(boardName); } FrostMessage fin = new FrostMessage("news", board, sender, subject, message); HTMLNode pageNode = ctx.getPageMaker().getPageNode("Insertion"); HTMLNode contentNode = ctx.getPageMaker().getContentNode(pageNode); HTMLNode content; try { FreenetURI finalKey = fin.insertMessage(this.getClientImpl(), initialIndex); HTMLNode infobox = contentNode.addChild(ctx.getPageMaker().getInfobox("infobox-success", "Insert Succeeded")); content = ctx.getPageMaker().getContentNode(infobox); content.addChild("#", "The message "); content.addChild("#", " has been inserted successfully into "+finalKey.toString()); } catch (InserterException e) { HTMLNode infobox = ctx.getPageMaker().getInfobox("infobox-error", "Insert Failed"); content = ctx.getPageMaker().getContentNode(infobox); content.addChild("#", "The insert failed with the message: " + e.getMessage()); content.addChild("br"); if (e.uri != null) { content.addChild("#", "The URI would have been: " + e.uri); } int mode = e.getMode(); if((mode == InserterException.FATAL_ERRORS_IN_BLOCKS) || (mode == InserterException.TOO_MANY_RETRIES_IN_BLOCKS)) { content.addChild("br"); /* TODO */ content.addChild("#", "Splitfile-specific error: " + e.errorCodes.toVerboseString()); } } content.addChild("br"); content.addChild("a", new String[] { "href", "title" }, new String[] { "/", "Node Homepage" }, "Homepage"); writeReply(ctx, 200, "text/html", "OK", pageNode.generate()); request.freeParts(); }else if(request.isPartSet("key")&&request.isPartSet("filename")){ if(noPassword) { redirectToRoot(ctx); return; } FreenetURI key = new FreenetURI(request.getPartAsString("key",128)); String type = request.getPartAsString("content-type",128); if(type==null) type = "text/plain"; ClientMetadata contentType = new ClientMetadata(type); Bucket bucket = request.getPart("filename"); HTMLNode pageNode = ctx.getPageMaker().getPageNode("Insertion"); HTMLNode contentNode = ctx.getPageMaker().getContentNode(pageNode); HTMLNode content; String filenameHint = null; if(key.getKeyType().equals("CHK")) { String[] metas = key.getAllMetaStrings(); if(metas != null && metas.length > 1) { filenameHint = metas[0]; } } InsertBlock block = new InsertBlock(bucket, contentType, key); try { key = this.insert(block, filenameHint, false); HTMLNode infobox = contentNode.addChild(ctx.getPageMaker().getInfobox("infobox-success", "Insert Succeeded")); content = ctx.getPageMaker().getContentNode(infobox); content.addChild("#", "The key "); content.addChild("a", "href", "/" + key.getKeyType() + "@" + key.getGuessableKey(), key.getKeyType() + "@" + key.getGuessableKey()); content.addChild("#", " has been inserted successfully."); } catch (InserterException e) { HTMLNode infobox = contentNode.addChild(ctx.getPageMaker().getInfobox("infobox-error", "Insert Failed")); content = ctx.getPageMaker().getContentNode(infobox); content.addChild("#", "The insert failed with the message: " + e.getMessage()); content.addChild("br"); if (e.uri != null) { content.addChild("#", "The URI would have been: " + e.uri); } int mode = e.getMode(); if((mode == InserterException.FATAL_ERRORS_IN_BLOCKS) || (mode == InserterException.TOO_MANY_RETRIES_IN_BLOCKS)) { content.addChild("br"); /* TODO */ content.addChild("#", "Splitfile-specific error: " + e.errorCodes.toVerboseString()); } } content.addChild("br"); content.addChild("a", new String[] { "href", "title" }, new String[] { "/", "Node Homepage" }, "Homepage"); writeReply(ctx, 200, "text/html", "OK", pageNode.generate()); request.freeParts(); bucket.free(); }else if (request.isPartSet("shutdownconfirm")) { if(noPassword) { redirectToRoot(ctx); return; } // Tell the user that the node is shutting down HTMLNode pageNode = ctx.getPageMaker().getPageNode("Node Shutdown", false); HTMLNode contentNode = ctx.getPageMaker().getContentNode(pageNode); HTMLNode infobox = contentNode.addChild(ctx.getPageMaker().getInfobox("infobox-information", "The Freenet node has been successfully shut down.")); HTMLNode infoboxContent = ctx.getPageMaker().getContentNode(infobox); infoboxContent.addChild("#", "Thank you for using Freenet."); writeReply(ctx, 200, "text/html; charset=utf-8", "OK", pageNode.generate()); this.node.exit("Shutdown from fproxy"); return; }else if(request.isPartSet("restartconfirm")){ if(noPassword) { redirectToRoot(ctx); return; } // Tell the user that the node is restarting HTMLNode pageNode = ctx.getPageMaker().getPageNode("Node Restart", false); HTMLNode contentNode = ctx.getPageMaker().getContentNode(pageNode); HTMLNode infobox = contentNode.addChild(ctx.getPageMaker().getInfobox("infobox-information", "The Freenet is being restarted.")); HTMLNode infoboxContent = ctx.getPageMaker().getContentNode(infobox); infoboxContent.addChild("#", "Please wait while the node is being restarted. This might take up to 3 minutes. Thank you for using Freenet."); writeReply(ctx, 200, "text/html; charset=utf-8", "OK", pageNode.generate()); Logger.normal(this, "Node is restarting"); node.getNodeStarter().restart(); return; }else { redirectToRoot(ctx); } }
50915 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50915/749bf181700acebb8c0a1d8860738c15ca26d358/WelcomeToadlet.java/clean/src/freenet/clients/http/WelcomeToadlet.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1640, 3349, 12, 3098, 2003, 16, 7408, 501, 16, 2974, 361, 1810, 1042, 1103, 13, 1216, 2974, 361, 1810, 1042, 7395, 503, 16, 1860, 288, 9506, 202, 430, 12, 892, 18, 1467, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1640, 3349, 12, 3098, 2003, 16, 7408, 501, 16, 2974, 361, 1810, 1042, 1103, 13, 1216, 2974, 361, 1810, 1042, 7395, 503, 16, 1860, 288, 9506, 202, 430, 12, 892, 18, 1467, ...
private void assertLoggedMessage(ByteArrayOutputStream data, long systemTime, String type) { String expectedLogEntry = "<" + UtcTimestampConverter.convert(new Date(systemTime), false) + ", FIX.4.2:SENDER->TARGET, " + type + "> (TEST)"
private void assertLoggedMessage(ByteArrayOutputStream data, long systemTime, String type, String content) { String expectedLogEntry = "<" + UtcTimestampConverter.convert(new Date(systemTime), false) + ", FIX.4.2:SENDER->TARGET, " + type + "> (" + content + ")"
private void assertLoggedMessage(ByteArrayOutputStream data, long systemTime, String type) { String expectedLogEntry = "<" + UtcTimestampConverter.convert(new Date(systemTime), false) + ", FIX.4.2:SENDER->TARGET, " + type + "> (TEST)" + System.getProperty("line.separator"); String actualLogEntry = new String(data.toByteArray()); assertEquals("wrong log entry", expectedLogEntry, actualLogEntry); data.reset(); }
6791 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6791/5c48bba93c58027c3d8a5adb1e3dc6442b774284/ScreenLogTest.java/buggy/test/quickfix/ScreenLogTest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 1815, 19862, 1079, 12, 8826, 4632, 501, 16, 1525, 2619, 950, 16, 514, 618, 13, 288, 3639, 514, 2665, 25548, 273, 18165, 7734, 397, 587, 5111, 4921, 5072, 18, 6283, 12, 2704, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 1815, 19862, 1079, 12, 8826, 4632, 501, 16, 1525, 2619, 950, 16, 514, 618, 13, 288, 3639, 514, 2665, 25548, 273, 18165, 7734, 397, 587, 5111, 4921, 5072, 18, 6283, 12, 2704, ...
Object[] elementData = array(); int len = elementData.length; return lastIndexOf(elem, elementData, len); }
Object[] elementData = array(); int len = elementData.length; return lastIndexOf(elem, elementData, len); }
public int lastIndexOf(Object elem) { Object[] elementData = array(); int len = elementData.length; return lastIndexOf(elem, elementData, len); }
4082 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4082/a6a25004fd5e24a1bc5f053aa539d01dc2553fbf/CopyOnWriteArrayList.java/buggy/src/java/org/logicalcobwebs/concurrent/CopyOnWriteArrayList.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 509, 9550, 12, 921, 3659, 13, 288, 565, 1033, 8526, 930, 751, 273, 526, 5621, 565, 509, 562, 273, 930, 751, 18, 2469, 31, 565, 327, 9550, 12, 10037, 16, 930, 751, 16, 562, 1769,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 509, 9550, 12, 921, 3659, 13, 288, 565, 1033, 8526, 930, 751, 273, 526, 5621, 565, 509, 562, 273, 930, 751, 18, 2469, 31, 565, 327, 9550, 12, 10037, 16, 930, 751, 16, 562, 1769,...
bufferOut.append(" <span class=\"singleLineCommentStyle\">" +
bufferOut.append(" <span class=\"" + singleLineCommentStyle + "\">" +
public String makeHTML(StringBuffer bufferIn, String sourceFileName) { int codeLineNumber = 0; boolean isNewLine = true; boolean isNewBlock = true; int identifierLength = 0; int qualifiedIdentifierLength = 0; int presentIndex = -1; int spaceLength = 0; int saveIndex = 0; char presentChar = 0; State presentState = State.TEXT; StringBuffer bufferOut = new StringBuffer(8192); if (!isCodeSnippet) { bufferOut.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n"); if (isXHTML_1_1) { bufferOut.append("<!DOCTYPE html PUBLIC " + "\"-//W3C//DTD XHTML 1.1//EN\"\r\n"); bufferOut.append(" \"http://www.w3.org/TR/xhtml11/DTD/" + "xhtml11.dtd\">\r\n"); bufferOut.append("<html xmlns=\"http://www.w3.org/1999/xhtml\""+ " xml:lang=\"en\">\r\n"); } else { bufferOut.append("<!DOCTYPE html PUBLIC " + "\"-//W3C//DTD XHTML 1.0 Strict//EN\"\r\n"); bufferOut.append(" \"http://www.w3.org/TR/xhtml1/DTD/" + "xhtml1-strict.dtd\">\r\n"); bufferOut.append("<html xmlns=\"http://www.w3.org/1999/xhtml\""+ " xml:lang=\"en\" lang=\"en\">\r\n"); } bufferOut.append(" <head>\r\n"); bufferOut.append(" <title>\r\n"); bufferOut.append(" " + sourceFileName + "\r\n"); bufferOut.append(" </title>\r\n"); bufferOut.append(" <meta name=\"generator\"\r\n"); bufferOut.append(" content=\"Java2xhtml 0.9\" />\r\n"); if (hasInternalStyleSheet) { bufferOut.append(" <style type=\"text/css\">\r\n"); bufferOut.append(" <!-- /* <![CDATA[ */\r\n"); bufferOut.append(" .sourceCodeStyle\r\n"); bufferOut.append(" {\r\n"); bufferOut.append(" color: #000000;\r\n"); bufferOut.append(" background-color: #FFFFFF;\r\n"); if (hasAllBoldSourceCode) { bufferOut.append(" font-weight: bold;\r\n"); } bufferOut.append(" }\r\n"); bufferOut.append(" .lineNumberStyle\r\n"); bufferOut.append(" {\r\n"); bufferOut.append(" font-weight: normal;\r\n"); bufferOut.append(" color: #000000;\r\n"); bufferOut.append(" background-color: transparent;\r\n"); bufferOut.append(" }\r\n"); if (lineModulus > 0) { bufferOut.append(" .modulusLineNumberStyle\r\n"); bufferOut.append(" {\r\n"); bufferOut.append(" font-weight: bold;\r\n"); bufferOut.append(" color: #000000;\r\n"); bufferOut.append(" background-color: "); bufferOut.append("transparent;\r\n"); bufferOut.append(" }\r\n"); if (hasLineModulusDrawnLines) { bufferOut.append(" .modulusLineStyle\r\n"); bufferOut.append(" {\r\n"); bufferOut.append(" text-decoration: "); bufferOut.append("line-through;\r\n"); bufferOut.append(" color: #000000;\r\n"); bufferOut.append(" background-color: "); bufferOut.append("transparent;\r\n"); bufferOut.append(" }\r\n"); } if (hasLineModulusCodeBlocks) { bufferOut.append(" .modulusBlockPREStyle\r\n"); bufferOut.append(" {\r\n"); bufferOut.append(" margin: 0em\r\n"); bufferOut.append(" }\r\n"); bufferOut.append(" .modulusBlockStyle\r\n"); bufferOut.append(" {\r\n"); bufferOut.append(" color: #000000;\r\n"); bufferOut.append(" background-color: "); bufferOut.append("#CCCCCC;\r\n"); bufferOut.append(" }\r\n"); } } bufferOut.append(" .keywordStyle\r\n"); bufferOut.append(" {\r\n"); bufferOut.append(" color: #9900FF;\r\n"); bufferOut.append(" background-color: transparent;\r\n"); bufferOut.append(" }\r\n"); bufferOut.append(" .methodStyle\r\n"); bufferOut.append(" {\r\n"); bufferOut.append(" color: #0000FF;\r\n"); bufferOut.append(" background-color: transparent;\r\n"); bufferOut.append(" }\r\n"); bufferOut.append(" .variableStyle\r\n"); bufferOut.append(" {\r\n"); bufferOut.append(" color: #CC9933;\r\n"); bufferOut.append(" background-color: transparent;\r\n"); bufferOut.append(" }\r\n"); bufferOut.append(" .singleLineCommentStyle\r\n"); bufferOut.append(" {\r\n"); bufferOut.append(" color: #CC3333;\r\n"); bufferOut.append(" background-color: transparent;\r\n"); bufferOut.append(" }\r\n"); bufferOut.append(" .traditionalCommentStyle\r\n"); bufferOut.append(" {\r\n"); bufferOut.append(" color: #FF0000;\r\n"); bufferOut.append(" background-color: transparent;\r\n"); bufferOut.append(" }\r\n"); bufferOut.append(" .javadocCommentStyle\r\n"); bufferOut.append(" {\r\n"); bufferOut.append(" color: #CC0033;\r\n"); bufferOut.append(" background-color: transparent;\r\n"); bufferOut.append(" }\r\n"); bufferOut.append(" .javadocTagStyle\r\n"); bufferOut.append(" {\r\n"); bufferOut.append(" color: #0099CC;\r\n"); bufferOut.append(" background-color: transparent;\r\n"); bufferOut.append(" }\r\n"); bufferOut.append(" .importNameStyle\r\n"); bufferOut.append(" {\r\n"); bufferOut.append(" color: #33CCCC;\r\n"); bufferOut.append(" background-color: transparent;\r\n"); bufferOut.append(" }\r\n"); bufferOut.append(" .packageNameStyle\r\n"); bufferOut.append(" {\r\n"); bufferOut.append(" color: #339999;\r\n"); bufferOut.append(" background-color: transparent;\r\n"); bufferOut.append(" }\r\n"); bufferOut.append(" .primitiveTypeStyle\r\n"); bufferOut.append(" {\r\n"); bufferOut.append(" color: #009900;\r\n"); bufferOut.append(" background-color: transparent;\r\n"); bufferOut.append(" }\r\n"); bufferOut.append(" .nonPrimitiveTypeStyle\r\n"); bufferOut.append(" {\r\n"); bufferOut.append(" color: #009966;\r\n"); bufferOut.append(" background-color: transparent;\r\n"); bufferOut.append(" }\r\n"); bufferOut.append(" .constructorStyle\r\n"); bufferOut.append(" {\r\n"); bufferOut.append(" color: #3300CC;\r\n"); bufferOut.append(" background-color: transparent;\r\n"); bufferOut.append(" }\r\n"); bufferOut.append(" .constantStyle\r\n"); bufferOut.append(" {\r\n"); bufferOut.append(" color: #666666;\r\n"); bufferOut.append(" background-color: transparent;\r\n"); bufferOut.append(" }\r\n"); bufferOut.append(" .doubleQuoteStyle\r\n"); bufferOut.append(" {\r\n"); bufferOut.append(" color: #996633;\r\n"); bufferOut.append(" background-color: transparent;\r\n"); bufferOut.append(" font-style: italic;\r\n"); bufferOut.append(" }\r\n"); bufferOut.append(" .singleQuoteStyle\r\n"); bufferOut.append(" {\r\n"); bufferOut.append(" color: #663333;\r\n"); bufferOut.append(" background-color: transparent;\r\n"); bufferOut.append(" font-style: oblique;\r\n"); bufferOut.append(" }\r\n"); bufferOut.append(" .numericalLiteralStyle\r\n"); bufferOut.append(" {\r\n"); bufferOut.append(" color: #333300;\r\n"); bufferOut.append(" background-color: transparent;\r\n"); bufferOut.append(" }\r\n"); bufferOut.append(" .primitiveLiteralStyle\r\n"); bufferOut.append(" {\r\n"); bufferOut.append(" color: #006600;\r\n"); bufferOut.append(" background-color: transparent;\r\n"); bufferOut.append(" }\r\n"); if (hasFooterIcons) { bufferOut.append(" .iconStyle\r\n"); bufferOut.append(" {\r\n"); bufferOut.append(" border-style: none;\r\n"); bufferOut.append(" }\r\n"); } if (hasTitle) { bufferOut.append(" #title\r\n"); bufferOut.append(" {\r\n"); bufferOut.append(" text-align: center;\r\n"); bufferOut.append(" font-size: xx-large;\r\n"); bufferOut.append(" }\r\n"); } if (hasLegend) { bufferOut.append(" #legendTitle\r\n"); bufferOut.append(" {\r\n"); bufferOut.append(" text-align: center;\r\n"); bufferOut.append(" font-size: x-large;\r\n"); bufferOut.append(" }\r\n"); bufferOut.append(" #legend\r\n"); bufferOut.append(" {\r\n"); bufferOut.append(" font-family: monospace;\r\n"); bufferOut.append(" font-size: large;\r\n"); bufferOut.append(" }\r\n"); } if (hasFooter) { bufferOut.append(" #footer\r\n"); bufferOut.append(" {\r\n"); bufferOut.append(" font-size: xx-small;\r\n"); bufferOut.append(" }\r\n"); } bufferOut.append(" /* ]]> */ -->\r\n"); bufferOut.append(" </style>\r\n"); } if (hasExternalStyleSheet) { bufferOut.append(" <link rel=\"stylesheet\" " + "type=\"text/css\" href=\"" + externalStyleSheetName + "\" />\r\n"); } bufferOut.append(" </head>\r\n"); bufferOut.append(" <body>\r\n"); } if (hasTitle) { bufferOut.append(" <div id=\"title\">\r\n"); bufferOut.append(" " + sourceFileName + "\r\n"); bufferOut.append(" </div>\r\n"); bufferOut.append(" <hr />\r\n"); } if (hasLegend) { bufferOut.append(" <div id=\"legendTitle\">\r\n"); bufferOut.append(" Legend\r\n"); bufferOut.append(" </div>\r\n"); bufferOut.append(" <div class=\"sourceCodeStyle\">\r\n"); bufferOut.append(" <div id=\"legend\">\r\n"); bufferOut.append(" <span class=\"keywordStyle\">"); bufferOut.append("keyword</span>\r\n"); bufferOut.append(" <span class=\"methodStyle\">"); bufferOut.append("method</span>\r\n"); bufferOut.append(" <span class=\"variableStyle\">variable" + "</span>\r\n"); bufferOut.append(" <span class=\"singleLineCommentStyle\">" + "singleLineComment</span>\r\n"); bufferOut.append(" <span class=\"traditionalCommentStyle\">" + "traditionalComment</span>\r\n"); bufferOut.append(" <span class=\"javadocCommentStyle\">" + "javadocComment</span>\r\n"); bufferOut.append(" <span class=\"javadocTagStyle\">javadocTag" + "</span>\r\n"); bufferOut.append(" <span class=\"importNameStyle\">" + "importName</span>\r\n"); bufferOut.append(" <span class=\"packageNameStyle\">" + "packageName</span>\r\n"); bufferOut.append(" <span class=\"primitiveTypeStyle\">" + "primitiveType</span>\r\n"); bufferOut.append(" <span class=\"nonPrimitiveTypeStyle\">" + "nonPrimitiveType</span>\r\n"); bufferOut.append(" <span class=\"constructorStyle\">" + "constructor</span>\r\n"); bufferOut.append(" <span class=\"constantStyle\">" + "constant</span>\r\n"); bufferOut.append(" <span class=\"doubleQuoteStyle\">" + "doubleQuote</span>\r\n"); bufferOut.append(" <span class=\"singleQuoteStyle\">" + "singleQuote</span>\r\n"); bufferOut.append(" <span class=\"numericalLiteralStyle\">" + "numericalLiteral</span>\r\n"); bufferOut.append(" <span class=\"primitiveLiteralStyle\">" + "primitiveLiteral</span>\r\n"); bufferOut.append(" </div>\r\n"); bufferOut.append(" </div>\r\n"); bufferOut.append(" <hr />\r\n"); } bufferOut.append(" <div class=\"sourceCodeStyle\">\r\n"); if (hasLineModulusCodeBlocks) { bufferOut.append("<pre class=\"modulusBlockPREStyle\">\r\n"); } else { bufferOut.append("<pre>\r\n"); } // process the input Java code Stringbuffer // subtract 2 from the bufferIn.length() to get EOF marker while (presentIndex++ < (bufferIn.length() - 2)) { for (int i = 0; i < extraIndentation; i++) { bufferOut.append(" "); } if ((hasLineNumbers || hasLineModulusCodeBlocks) && isNewLine) { // add line numbers if desired // line numbers are 1 - 9999 then rotate line numbers codeLineNumber = (++codeLineNumber)%10000; if ((lineModulus > 0) && hasLineModulusCodeBlocks && (codeLineNumber%lineModulus == 1)) { if (isNewBlock) { if ((State.TRADITIONAL_COMMENT == presentState) || (State.JAVADOC == presentState)) { bufferOut.insert((bufferOut.length() - ("\r\n").length()), "</span>"); } bufferOut.append("</pre>\r\n"); bufferOut.append(" <div class="); bufferOut.append("\"modulusBlockStyle\">"); bufferOut.append("\r\n<pre class=\""); bufferOut.append("modulusBlockPREStyle\">\r\n"); if (State.TRADITIONAL_COMMENT == presentState) { bufferOut.append("<span class=" + "\"traditionalCommentStyle\">"); } if (State.JAVADOC == presentState) { bufferOut.append("<span class=" + "\"javadocCommentStyle\">"); } } isNewBlock = !isNewBlock; } // make straight columns of line numbers if (codeLineNumber < 1000) { bufferOut.append(" "); } if (codeLineNumber < 100) { bufferOut.append(" "); } if (codeLineNumber < 10) { bufferOut.append(" "); } bufferOut.append("<a name=\"line."); bufferOut.append(codeLineNumber); bufferOut.append("\"/>"); if (hasLineNumbers) { if ((lineModulus > 0) && (codeLineNumber%lineModulus == 0)) { bufferOut.append("<span class=" + "\"modulusLineNumberStyle\">"); bufferOut.append(codeLineNumber); bufferOut.append(": </span>"); if (hasLineModulusDrawnLines) { // compute spaceLength so a line can be drawn while ((presentIndex != (bufferIn.length() - 1)) && ((Character.isSpaceChar( bufferIn.charAt(presentIndex))) || (bufferIn.charAt(presentIndex) == '\t'))) { // for each tab, insert tabSize spaces if (bufferIn.charAt(presentIndex) == '\t') { for (int i = 0; i < tabSize; i++) { bufferIn.insert(presentIndex + 1, " "); } presentIndex++; continue; } if (' ' == bufferIn.charAt(presentIndex)) { // read a space so place a space bufferOut.append(" "); spaceLength += (" ").length(); } else { // a white space character was read bufferOut.append(bufferIn.charAt( presentIndex)); ++spaceLength; } presentIndex++; } // check if line is empty // (no printable characters on line) if ((presentIndex == (bufferIn.length() - 1)) || (Character.isWhitespace(bufferIn.charAt( presentIndex)))) { spaceLength = 0; } // draw the line if (spaceLength > 1) { bufferOut.insert((bufferOut.length() - spaceLength), "<span class=" + "\"modulusLineStyle\">"); bufferOut.insert((bufferOut.length() - (" ").length()), "</span>"); } spaceLength = 0; } } else { // line numbers are in lineNumberColor bufferOut.append("<span class=\"lineNumberStyle\">"); bufferOut.append(codeLineNumber); bufferOut.append(":</span> "); } } isNewLine = false; } // a state machine presentChar = bufferIn.charAt(presentIndex); if ((Character.isJavaIdentifierPart(presentChar)) || ((State.IMPORT_NAME == presentState) && (presentChar == '*'))) { // this is an identifier bufferOut.append(presentChar); identifierLength++; continue; // keep adding characters until identifier is done } if (identifierLength > 0) { // identifier qualifiedIdentifierLength = qualifiedIdentifierLength + identifierLength; if (bufferIn.charAt(presentIndex) == '.') { // qualified identifier bufferOut.append(presentChar); qualifiedIdentifierLength++; identifierLength = 0; continue; // keep adding characters to qualified identifier } String identifier = bufferOut.substring(bufferOut.length() - identifierLength); if ((State.PARAM_VARIABLE == presentState)) { // any identifier after a param in a javadoc is assumed to // be a variable bufferOut.insert(bufferOut.length() - qualifiedIdentifierLength, "<span class=\"variableStyle\">"); bufferOut.append("</span>"); presentState = State.JAVADOC; } else if (State.JAVADOC == presentState) { // in javadoc state if ((javadocTagCollection.contains(identifier)) && (bufferIn.charAt(presentIndex - (identifierLength + 1)) == '@')) { // identifier is a javadocTag bufferOut.insert(bufferOut.length() - identifierLength, "<span class=\"javadocTagStyle\">"); bufferOut.append("</span>"); if (("param").equals(identifier)) { // any identifier after a param is assumed to // be a variable, get into a state to do this presentState = State.PARAM_VARIABLE; } } } else if (State.IMPORT_NAME == presentState) { // import identifier bufferOut.insert(bufferOut.length() - qualifiedIdentifierLength, "<span class=\"importNameStyle\">"); bufferOut.append("</span>"); presentState = State.TEXT; } else if (State.PACKAGE_NAME == presentState) { // package identifier bufferOut.insert(bufferOut.length() - qualifiedIdentifierLength, "<span class=\"packageNameStyle\">"); bufferOut.append("</span>"); presentState = State.TEXT; } else if (State.TEXT == presentState) { if (keywordCollection.contains(identifier)) { // identifier is a keyword bufferOut.insert(bufferOut.length() - qualifiedIdentifierLength, "<span class=\"keywordStyle\">"); bufferOut.append("</span>"); if (("import").equals(identifier)) { // anything after an import in text mode must be // an import name, so enter state to process this presentState = State.IMPORT_NAME; } else if (("package").equals(identifier)) { // anything after an package in text mode must be // an package name, so enter state to process this presentState = State.PACKAGE_NAME; } } else if (primitiveTypeCollection.contains(identifier)) { // identifier is a primitive type bufferOut.insert(bufferOut.length() - qualifiedIdentifierLength, "<span class=\"primitiveTypeStyle\">"); bufferOut.append("</span>"); } else if ((identifier.equals(identifier.toUpperCase())) && (!(Character.isDigit(identifier.charAt(0))))) { // identifier is a constant bufferOut.insert(bufferOut.length() - qualifiedIdentifierLength, "<span class=\"constantStyle\">"); bufferOut.append("</span>"); } else if (Character.isUpperCase(identifier.charAt(0))) { // identifier is a constructor or non-primitive type // eat white space saveIndex = presentIndex; while (Character.isWhitespace( bufferIn.charAt(saveIndex++))) { //empty body } if (bufferIn.charAt(--saveIndex) == '(') { // identifier is a constructor bufferOut.insert(bufferOut.length() - qualifiedIdentifierLength, "<span class=" + "\"constructorStyle\">"); bufferOut.append("</span>"); } else { // identifier is a non-primitive type bufferOut.insert(bufferOut.length() - qualifiedIdentifierLength, "<span class=" + "\"nonPrimitiveTypeStyle\">"); bufferOut.append("</span>"); } } else if (!(Character.isDigit(identifier.charAt(0)) || primitiveLiteralCollection.contains(identifier))) { // identifier is a method or a variable // eat white space saveIndex = presentIndex; while (Character.isWhitespace( bufferIn.charAt(saveIndex++))) { // empty body } --saveIndex; // identifier is a method if (bufferIn.charAt(saveIndex) == '(') { bufferOut.insert(bufferOut.length() - qualifiedIdentifierLength, "<span class=\"methodStyle\">"); bufferOut.append("</span>"); } else if (bufferIn.charAt(saveIndex) == ',') { // comma seperated variables bufferOut.insert(bufferOut.length() - qualifiedIdentifierLength, "<span class=\"variableStyle\">"); bufferOut.append("</span>"); } else { // a variable // take care of cases such as array[index].variable if (bufferIn.charAt(presentIndex - (qualifiedIdentifierLength + 1)) == '.') { qualifiedIdentifierLength++; } bufferOut.insert(bufferOut.length() - qualifiedIdentifierLength, "<span class=\"variableStyle\">"); bufferOut.append("</span>"); } } else { if (primitiveLiteralCollection.contains(identifier)) { // primitiveLiteral (boolean or null) bufferOut.insert(bufferOut.length() - identifierLength, "<span class=" + "\"primitiveLiteralStyle\">"); bufferOut.append("</span>"); } // a numerical literal else { if (((presentIndex - (qualifiedIdentifierLength + 1)) > 0) && (bufferIn.charAt(presentIndex - (qualifiedIdentifierLength + 1)) == '.')) { qualifiedIdentifierLength++; } bufferOut.insert(bufferOut.length() - qualifiedIdentifierLength, "<span class=" + "\"numericalLiteralStyle\">"); bufferOut.append("</span>"); } } } qualifiedIdentifierLength = 0; identifierLength = 0; } // process characters NOT in identifiers switch (presentChar) { case '&': //ampersand bufferOut.append("&amp;"); // HTMLify character break; case '<': // less than sign bufferOut.append("&lt;"); // HTMLify character break; case '>': // greater than sign bufferOut.append("&gt;"); // HTMLify character break; case '\"': // double quote bufferOut.append("&quot;"); // HTMLify character if (State.TEXT == presentState) { presentState = State.DOUBLE_QUOTE; bufferOut.insert(bufferOut.length()-("&quot;").length(), "<span class=\"doubleQuoteStyle\">"); } else if (State.DOUBLE_QUOTE == presentState) { presentState = State.TEXT; bufferOut.append("</span>"); } break; case '\'': // single quote bufferOut.append("\'"); if (State.TEXT == presentState) { presentState = State.SINGLE_QUOTE; bufferOut.insert(bufferOut.length() - ("\'").length(), "<span class=\"singleQuoteStyle\">"); } else if (State.SINGLE_QUOTE == presentState) { presentState = State.TEXT; bufferOut.append("</span>"); } break; case '\\': // backslash bufferOut.append("\\"); if ((State.DOUBLE_QUOTE == presentState) || (State.SINGLE_QUOTE == presentState)) { // treat as a character escape sequence bufferOut.append(bufferIn.charAt(++presentIndex)); } break; case '\t': // tab // replace tabs with tabsize number of spaces for (int i = 0; i < tabSize; i++) { bufferOut.append(' '); } break; case '*': // star bufferOut.append("*"); if ((State.TEXT == presentState) && (bufferIn.charAt(presentIndex - 1) == '/')) { if (((bufferIn.length() - 1) > presentIndex) && (bufferIn.charAt(presentIndex + 1) == '*')) { presentState = State.JAVADOC; bufferOut.insert(bufferOut.length() - ("/*").length(), "<span class=" + "\"javadocCommentStyle\">"); } else { presentState = State.TRADITIONAL_COMMENT; bufferOut.insert(bufferOut.length() - ("/*").length(), "<span class=" + "\"traditionalCommentStyle\">"); } } break; case '/': // foward slash bufferOut.append("/"); if (((State.TRADITIONAL_COMMENT == presentState) || (State.JAVADOC == presentState)) && (bufferIn.charAt(presentIndex - 1) == '*')) { bufferOut.append("</span>"); presentState = State.TEXT; } if ((State.TEXT == presentState) && (presentIndex > 0) && (bufferIn.charAt(presentIndex - 1) == '/')) { bufferOut.insert(bufferOut.length() - ("//").length(), "<span class=" + "\"singleLineCommentStyle\">"); presentState = State.LINE_COMMENT; } break; case '\r': // carriage return // fall through case '\n': // line feed // all HTML lines end in \r\n if ((bufferIn.charAt(presentIndex) == '\r') && ((bufferIn.length() - 1) > presentIndex) && (bufferIn.charAt(presentIndex + 1) == '\n')) { ++presentIndex; } // end single line comments if (State.LINE_COMMENT == presentState) { bufferOut.append("</span>"); presentState = State.TEXT; } // end of block if ((lineModulus > 0) && hasLineModulusCodeBlocks && ((codeLineNumber%lineModulus == 0) && !isNewBlock)) { // end multi-line spanning states if ((State.TRADITIONAL_COMMENT == presentState) || (State.JAVADOC == presentState)) { bufferOut.append("</span>"); } bufferOut.append("\r\n"); bufferOut.append("</pre>\r\n"); bufferOut.append(" </div>\r\n"); bufferOut.append("<pre class=\""); bufferOut.append("modulusBlockPREStyle\">\r\n"); // restart multi-line spanning states if (State.TRADITIONAL_COMMENT == presentState) { bufferOut.append("<span class=" + "\"traditionalCommentStyle\">"); } if (State.JAVADOC == presentState) { bufferOut.append("<span class=" + "\"javadocCommentStyle\">"); } } else { // div automatically starts new line bufferOut.append("\r\n"); } isNewLine = true; break; case 0: // nul character if ((State.LINE_COMMENT == presentState) && (presentIndex == (bufferIn.length() - 1))) { bufferOut.append("</span>"); } break; default: // everything else bufferOut.append(presentChar); } qualifiedIdentifierLength = 0; } if (presentState == State.LINE_COMMENT) { bufferOut.append("</span>\r\n"); } bufferOut.append("</pre>\r\n"); // end block early if no more source code if ((lineModulus > 0) && hasLineModulusCodeBlocks && !isNewBlock && (codeLineNumber%lineModulus != 0)) { bufferOut.append(" </div>\r\n"); } bufferOut.append(" </div>\r\n"); // end div of sourceCodeStyle // if code snippet then don't add ending tags of xhtml page if (!isCodeSnippet) { // if footer mode then add a footer if (hasFooter) { bufferOut.append(" <hr />\r\n"); bufferOut.append(" <div id=\"footer\">\r\n"); if (hasFooterIcons) { if (hasFooterDate) { bufferOut.append(" <script type=\"text/javaScript\""); bufferOut.append(">\r\n"); bufferOut.append(" <!-- // <![CDATA[\r\n"); bufferOut.append(" document.write(\"Document last"); bufferOut.append(" modified on \""); bufferOut.append(" + document.lastModified + "); bufferOut.append("\"<br />\");\r\n"); bufferOut.append(" // ]]> -->\r\n"); bufferOut.append(" </script>\r\n"); } bufferOut.append(" <a href=\""); bufferOut.append("http://validator.w3.org/check/referer"); bufferOut.append("\">\r\n"); bufferOut.append(" <img class=\"iconStyle\" src=\""); bufferOut.append("http://www.w3.org/Icons/"); if (isXHTML_1_1) { bufferOut.append("valid-xhtml11\"\r\n"); bufferOut.append(" alt=\"Valid XHTML 1.1!\""); } else { bufferOut.append("valid-xhtml10\"\r\n"); bufferOut.append(" alt=\"Valid XHTML 1.0!\""); } bufferOut.append(" height=\"31\" "); bufferOut.append("width=\"88\" />\r\n"); bufferOut.append(" </a>\r\n"); bufferOut.append(" &#160;\r\n"); bufferOut.append(" <a href=\""); bufferOut.append("http://jigsaw.w3.org"); bufferOut.append("/css-validator/check/referer"); bufferOut.append("\">\r\n"); bufferOut.append(" <img class=\"iconStyle\" src=\""); bufferOut.append("http://jigsaw.w3.org/"); bufferOut.append("css-validator/images/vcss"); bufferOut.append("\"\r\n"); bufferOut.append(" alt=\"Valid CSS!\""); bufferOut.append(" height=\"31\" width=\"88\" />\r\n"); bufferOut.append(" </a>\r\n"); } else { bufferOut.append(" This is a valid\r\n"); bufferOut.append(" <a href=\"http://"); bufferOut.append("validator.w3.org/check/referer"); if (isXHTML_1_1) { bufferOut.append("\">XHTML 1.1</a>\r\n"); } else { bufferOut.append("\">XHTML 1.0</a>\r\n"); } bufferOut.append(" with\r\n"); bufferOut.append(" <a href=\"http://"); bufferOut.append("jigsaw.w3.org"); bufferOut.append("/css-validator/check/referer"); bufferOut.append("\">CSS</a>\r\n"); bufferOut.append(" document \r\n"); if (hasFooterDate) { bufferOut.append(" <script type=\"text/javaScript\""); bufferOut.append(">\r\n"); bufferOut.append(" <!-- // <![CDATA[\r\n"); bufferOut.append(" document.write(\"last modified"); bufferOut.append(" on \" + document.lastModified);"); bufferOut.append("\r\n"); bufferOut.append(" // ]]> -->\r\n"); bufferOut.append(" </script>\r\n"); } } bufferOut.append(" </div>\r\n"); } bufferOut.append(" </body>\r\n"); bufferOut.append("</html>\r\n"); } return bufferOut.toString(); }
45713 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45713/8ba362c9ba53284a2fd251ad596b8e586a877afc/Java2xhtml.java/clean/tools/gjdoc/javalib/gnu/classpath/tools/java2xhtml/Java2xhtml.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 514, 1221, 4870, 12, 780, 1892, 1613, 382, 16, 514, 1084, 4771, 13, 565, 288, 3639, 509, 981, 31063, 273, 374, 31, 3639, 1250, 10783, 1670, 273, 638, 31, 3639, 1250, 10783, 1768, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1221, 4870, 12, 780, 1892, 1613, 382, 16, 514, 1084, 4771, 13, 565, 288, 3639, 509, 981, 31063, 273, 374, 31, 3639, 1250, 10783, 1670, 273, 638, 31, 3639, 1250, 10783, 1768, ...
}
}
private void setDoubleField (Object obj, Class klass, String field_name, double val) throws IOException { try { Field f = getField (klass, field_name); f.setDouble (obj, val); } catch (IllegalArgumentException _) { throw new InvalidClassException("incompatible field type for " + klass.getName() + "." + field_name); } catch (Exception _) { } }
45713 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45713/02b8175ac4316ed7d6d5043de356955872dd3172/ObjectInputStream.java/clean/libraries/javalib/java/io/ObjectInputStream.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 3238, 918, 444, 5265, 974, 261, 921, 1081, 16, 1659, 7352, 16, 514, 652, 67, 529, 16, 9506, 4202, 1645, 1244, 13, 1216, 1860, 225, 288, 565, 775, 1377, 288, 202, 974, 284, 273, 5031, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 444, 5265, 974, 261, 921, 1081, 16, 1659, 7352, 16, 514, 652, 67, 529, 16, 9506, 4202, 1645, 1244, 13, 1216, 1860, 225, 288, 565, 775, 1377, 288, 202, 974, 284, 273, 5031, ...
public void visitBlockNode(Node iVisited) { visit(iVisited); if (!_expandBlocks) { for (Node node = iVisited; node != null; node = node.getNextNode()) node.getHeadNode().accept(this); } else { iVisited.getHeadNode().accept(this); Node lNext = iVisited.getNextNode(); if (lNext != null) lNext.accept(this); } leave(iVisited); }
public void visitBlockNode(Node iVisited) { visit(iVisited); if (!_expandBlocks) { for (Node node = iVisited; node != null; node = node.getNextNode()) { node.getHeadNode().accept(this); } } else { iVisited.getHeadNode().accept(this); Node lNext = iVisited.getNextNode(); if (lNext != null) { lNext.accept(this); } } leave(iVisited); }
public void visitBlockNode(Node iVisited) { visit(iVisited); if (!_expandBlocks) { for (Node node = iVisited; node != null; node = node.getNextNode()) node.getHeadNode().accept(this); } else { iVisited.getHeadNode().accept(this); Node lNext = iVisited.getNextNode(); if (lNext != null) lNext.accept(this); } leave(iVisited); }
46258 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46258/d31a76ee29d5978a9bec41e3ac9134cee024bcab/NodeVisitorAdapter.java/clean/org/jruby/nodes/NodeVisitorAdapter.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 3757, 1768, 907, 12, 907, 277, 30019, 13, 202, 95, 202, 202, 11658, 12, 77, 30019, 1769, 202, 202, 430, 16051, 67, 12320, 6450, 13, 202, 202, 95, 1082, 202, 1884, 261, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 3757, 1768, 907, 12, 907, 277, 30019, 13, 202, 95, 202, 202, 11658, 12, 77, 30019, 1769, 202, 202, 430, 16051, 67, 12320, 6450, 13, 202, 202, 95, 1082, 202, 1884, 261, ...
System.out.println("Calling removeDeadChits");
void advancePhase() {System.out.println("entering advancePhase() with phase " + phase); if (phase == SUMMON) { phase = MOVE; setupMoveDialog(); } else if (phase == RECRUIT) { phase = MOVE; setupMoveDialog(); } else if (phase == MOVE) { phase = FIGHT; setupFightDialog(); } else if (phase == FIGHT) { if (activeLegion == defender) { activeLegion = attacker; } else { activeLegion = defender; } phase = STRIKEBACK; setupFightDialog(); } else if (phase == STRIKEBACK) {System.out.println("Calling removeDeadChits"); map.removeDeadChits(); // Make sure the battle isn't over before continuing. if (attacker.getHeight() >= 1 && defender.getHeight() >= 1) { if (activeLegion == attacker) { phase = SUMMON; setupSummonDialog(); } else { turnNumber++;System.out.println("Now turn " + turnNumber); if (turnNumber > 7) { // Time loss. Attacker is eliminated but defender // gets no points. if (attacker.numCreature(Creature.titan) != 0) { // This is the attacker's titan stack, so the // defender gets his markers plus half points for // his unengaged legions. Player player = attacker.getPlayer(); attacker.removeLegion(); player.die(defender.getPlayer()); } else { attacker.removeLegion(); } map.cleanup(); } else { phase = RECRUIT; setupRecruitDialog(); } } } }System.out.println("leaving advancePhase() with phase " + phase); }
51862 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51862/71aa81734ab178a25dcaffd3005df34dcd8c4da5/BattleTurn.java/clean/Colossus/BattleTurn.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 918, 8312, 11406, 1435, 565, 288, 3163, 18, 659, 18, 8222, 2932, 2328, 310, 8312, 11406, 1435, 598, 6855, 315, 397, 6855, 1769, 3639, 309, 261, 13961, 422, 22595, 17667, 13, 3639, 288, 54...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 918, 8312, 11406, 1435, 565, 288, 3163, 18, 659, 18, 8222, 2932, 2328, 310, 8312, 11406, 1435, 598, 6855, 315, 397, 6855, 1769, 3639, 309, 261, 13961, 422, 22595, 17667, 13, 3639, 288, 54...
public int MA_Lookback( int optInTimePeriod, TA_MAType optInMAType ){ int retValue; if( optInTimePeriod <= 1 ) return 0; switch( optInMAType ) { case TA_MAType_SMA : retValue = SMA_Lookback ( optInTimePeriod ); break; case TA_MAType_EMA : retValue = EMA_Lookback ( optInTimePeriod ); break; case TA_MAType_WMA : retValue = WMA_Lookback ( optInTimePeriod ); break; case TA_MAType_DEMA : retValue = DEMA_Lookback ( optInTimePeriod ); break; case TA_MAType_TEMA : retValue = TEMA_Lookback ( optInTimePeriod ); break; case TA_MAType_TRIMA : retValue = TRIMA_Lookback ( optInTimePeriod ); break; case TA_MAType_KAMA : retValue = KAMA_Lookback ( optInTimePeriod ); break; case TA_MAType_MAMA : retValue = MAMA_Lookback ( 0.5, 0.05 ); break; case TA_MAType_T3 : retValue = T3_Lookback ( optInTimePeriod, 0.7 ); break; default: retValue = 0; } return retValue;}
51465 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51465/1a230e9b7099cbd2b7e9eb1294130ca009bfedf4/Core.java/buggy/trunk/ta-lib/java/src/TA/Lib/Core.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1071, 474, 5535, 67, 9794, 823, 12, 474, 3838, 382, 26540, 16, 9833, 67, 5535, 559, 3838, 382, 5535, 559, 15329, 474, 1349, 620, 31, 430, 12, 3838, 382, 26540, 32, 33, 21, 13, 2463, 20, 31...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1071, 474, 5535, 67, 9794, 823, 12, 474, 3838, 382, 26540, 16, 9833, 67, 5535, 559, 3838, 382, 5535, 559, 15329, 474, 1349, 620, 31, 430, 12, 3838, 382, 26540, 32, 33, 21, 13, 2463, 20, 31...
if (debug) { System.out.println("calling ImarisTiffReader.initFile(" + id + ")"); }
if (debug) debug("initFile(" + id + ")");
protected void initFile(String id) throws FormatException, IOException { if (debug) { System.out.println("calling ImarisTiffReader.initFile(" + id + ")"); } super.initFile(id); super.initMetadata(); close(); currentId = id; //metadata = new Hashtable(); sizeX = new int[1]; sizeY = new int[1]; sizeZ = new int[1]; sizeC = new int[1]; sizeT = new int[1]; pixelType = new int[1]; currentOrder = new String[1]; orderCertain = new boolean[] {true}; getMetadataStore(id).createRoot(); channelMinMax = null; in = new RandomAccessStream(getMappedId(id)); if (in.readShort() == 0x4949) in.order(true); ifds = TiffTools.getIFDs(in); if (ifds == null) throw new FormatException("No IFDs found"); // hack up the IFDs // // Imaris TIFFs store a thumbnail in the first IFD; each of the remaining // IFDs defines a stack of tiled planes. Vector tmp = new Vector(); for (int i=1; i<ifds.length; i++) { long[] byteCounts = TiffTools.getIFDLongArray(ifds[i], TiffTools.TILE_BYTE_COUNTS, false); long[] offsets = TiffTools.getIFDLongArray(ifds[i], TiffTools.TILE_OFFSETS, false); for (int j=0; j<byteCounts.length; j++) { Hashtable t = (Hashtable) ifds[i].clone(); TiffTools.putIFDValue(t, TiffTools.TILE_BYTE_COUNTS, byteCounts[j]); TiffTools.putIFDValue(t, TiffTools.TILE_OFFSETS, offsets[j]); tmp.add(t); } } sizeC[0] = ifds.length - 1; sizeZ[0] = tmp.size() / sizeC[0]; sizeT[0] = 1; sizeX[0] = TiffTools.getIFDIntValue(ifds[1], TiffTools.IMAGE_WIDTH, false, 0); sizeY[0] = TiffTools.getIFDIntValue(ifds[1], TiffTools.IMAGE_LENGTH, false, 0); ifds = (Hashtable[]) tmp.toArray(new Hashtable[0]); numImages = sizeC[0] * sizeZ[0]; currentOrder[0] = "XYZCT"; int bitsPerSample = TiffTools.getIFDIntValue(ifds[0], TiffTools.BITS_PER_SAMPLE); int bitFormat = TiffTools.getIFDIntValue(ifds[0], TiffTools.SAMPLE_FORMAT); while (bitsPerSample % 8 != 0) bitsPerSample++; if (bitsPerSample == 24 || bitsPerSample == 48) bitsPerSample /= 3; if (bitFormat == 3) pixelType[0] = FormatReader.FLOAT; else if (bitFormat == 2) { switch (bitsPerSample) { case 8: pixelType[0] = FormatReader.INT8; break; case 16: pixelType[0] = FormatReader.INT16; break; case 32: pixelType[0] = FormatReader.INT32; break; } } else { switch (bitsPerSample) { case 8: pixelType[0] = FormatReader.UINT8; break; case 16: pixelType[0] = FormatReader.UINT16; break; case 32: pixelType[0] = FormatReader.UINT32; break; } } String comment = (String) metadata.get("Comment"); // likely an INI-style comment, although we can't be sure if (comment != null && comment.startsWith("[")) { // parse key/value pairs StringTokenizer st = new StringTokenizer(comment, "\n"); while (st.hasMoreTokens()) { String line = st.nextToken(); int equals = line.indexOf("="); if (equals < 0) continue; String key = line.substring(0, equals); String value = line.substring(equals + 1); metadata.put(key.trim(), value.trim()); } metadata.remove("Comment"); } }
55303 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55303/2c680a5618955854e02d652bc68024b9a011950a/ImarisTiffReader.java/buggy/loci/formats/in/ImarisTiffReader.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, 309, 261, 4148, 13, 288, 1377, 2332, 18, 659, 18, 8222, 2932, 31623, 2221, 297, 291, 56, 3048, 2514, 18, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 4750, 918, 1208, 812, 12, 780, 612, 13, 1216, 4077, 503, 16, 1860, 288, 565, 309, 261, 4148, 13, 288, 1377, 2332, 18, 659, 18, 8222, 2932, 31623, 2221, 297, 291, 56, 3048, 2514, 18, 2...
String lang = findLanguage(doc);
LanguageParser parser = new LanguageParser(doc); String lang = parser.getLanguage();
public Parse filter(Content content, Parse parse, HTMLMetaTags metaTags, DocumentFragment doc) { String lang = findLanguage(doc); if (lang != null) { parse.getData().getMetadata().put(META_LANG_NAME, lang); } return parse; }
50818 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50818/d3a63dfeb666fc0db677ac52ee967aa4952373e9/HTMLLanguageParser.java/clean/src/plugin/languageidentifier/src/java/org/apache/nutch/analysis/lang/HTMLLanguageParser.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 2884, 1034, 12, 1350, 913, 16, 2884, 1109, 16, 3982, 2781, 3453, 2191, 3453, 16, 4319, 7456, 997, 13, 288, 1377, 9889, 2678, 2082, 273, 394, 9889, 2678, 12, 2434, 1769, 514, 3303, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2884, 1034, 12, 1350, 913, 16, 2884, 1109, 16, 3982, 2781, 3453, 2191, 3453, 16, 4319, 7456, 997, 13, 288, 1377, 9889, 2678, 2082, 273, 394, 9889, 2678, 12, 2434, 1769, 514, 3303, ...
if (getTestHarness() != null) { Runnable runnable = new Runnable() { public void run() { getTestHarness().runTests(); }
final ITestHarness harness = getTestHarness(); if (harness != null) { Job job = new Job("Workbench test runner") { protected IStatus run(IProgressMonitor monitor) { waitForEarlyStartup(); harness.runTests(); return Status.OK_STATUS; }
public void init(Display display, IWorkbench workbench) { Assert.isNotNull(display); Assert.isNotNull(workbench); this.display = display; this.workbench = workbench; if (getTestHarness() != null) { Runnable runnable = new Runnable() { public void run() { getTestHarness().runTests(); } }; new Thread(runnable, "WorkbenchTestable").start(); //$NON-NLS-1$ } }
56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/ea90a7ffb25cdbffbdc4a9b087e8d3fc1e020ddf/WorkbenchTestable.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/testing/WorkbenchTestable.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1208, 12, 4236, 2562, 16, 467, 2421, 22144, 1440, 22144, 13, 288, 3639, 5452, 18, 291, 5962, 12, 5417, 1769, 3639, 5452, 18, 291, 5962, 12, 1252, 22144, 1769, 3639, 333, 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, 918, 1208, 12, 4236, 2562, 16, 467, 2421, 22144, 1440, 22144, 13, 288, 3639, 5452, 18, 291, 5962, 12, 5417, 1769, 3639, 5452, 18, 291, 5962, 12, 1252, 22144, 1769, 3639, 333, 18, ...
public PronunciationState(String name, Pronunciation p, int which) { super(name, null, which); pronunciation = p;
public PronunciationState(WordState parent, int which) { super("P", parent, which); pronunciation = parent.getWord().getPronunciations(null)[which];
public PronunciationState(String name, Pronunciation p, int which) { super(name, null, which); pronunciation = p; }
8321 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8321/4afd3ee24eabd7479865dbc6877bb63e61537ace/PronunciationState.java/buggy/sphinx4/edu/cmu/sphinx/linguist/flat/PronunciationState.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 453, 1949, 551, 7072, 1119, 12, 780, 508, 16, 453, 1949, 551, 7072, 293, 16, 509, 1492, 13, 288, 202, 9565, 12, 529, 16, 446, 16, 225, 1492, 1769, 202, 683, 265, 551, 7072, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 453, 1949, 551, 7072, 1119, 12, 780, 508, 16, 453, 1949, 551, 7072, 293, 16, 509, 1492, 13, 288, 202, 9565, 12, 529, 16, 446, 16, 225, 1492, 1769, 202, 683, 265, 551, 7072, 273,...
public IASTTemplateInstantiation createTemplateInstantiation(IASTScope scope, int startingOffset)throws Exception;
public IASTTemplateInstantiation createTemplateInstantiation(IASTScope scope, int startingOffset);
public IASTTemplateInstantiation createTemplateInstantiation(IASTScope scope, int startingOffset)throws Exception;
54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/5be9f16c62f0d96b0b15c3ec0642ea39b98ee65b/IASTFactory.java/clean/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/parser/ast/IASTFactory.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 467, 9053, 2283, 10675, 7072, 752, 2283, 10675, 7072, 12, 45, 9053, 3876, 2146, 16, 509, 5023, 2335, 1769, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 467, 9053, 2283, 10675, 7072, 752, 2283, 10675, 7072, 12, 45, 9053, 3876, 2146, 16, 509, 5023, 2335, 1769, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
if(!retMap.values().contains(f)) retMap.put(urn, f);
private Map verifyHashes() { Map retMap = new HashMap(); for(Iterator i = hashes.entrySet().iterator(); i.hasNext(); ) { Map.Entry entry = (Map.Entry)i.next(); if(entry.getKey() instanceof URN && entry.getValue() instanceof File) { URN urn = (URN)entry.getKey(); File f = (File)entry.getValue(); try { f = FileUtils.getCanonicalFile(f); } catch(IOException ioe) {} // We must purge old entries that had mapped // multiple URNs to uncanonicalized files. // This is done by ensuring that we only add // this entry to the map if no other URN points to it. if(!retMap.values().contains(f)) retMap.put(urn, f); } } return retMap; }
5134 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5134/6d908ab19d1271790ff0c6ca5372c170d70b8c11/IncompleteFileManager.java/clean/components/gnutella-core/src/main/java/com/limegroup/gnutella/downloader/IncompleteFileManager.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 1635, 3929, 14455, 1435, 288, 3639, 1635, 325, 863, 273, 394, 4317, 5621, 3639, 364, 12, 3198, 277, 273, 9869, 18, 4099, 694, 7675, 9838, 5621, 277, 18, 5332, 2134, 5621, 262, 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, 3238, 1635, 3929, 14455, 1435, 288, 3639, 1635, 325, 863, 273, 394, 4317, 5621, 3639, 364, 12, 3198, 277, 273, 9869, 18, 4099, 694, 7675, 9838, 5621, 277, 18, 5332, 2134, 5621, 262, 288, ...
for (int i = 0; i < list.length; i++) {
for (Program p : list) {
public void exportICal(File intothis, Program[] list, Properties settings) { try { ParamParser parser = new ParamParser(); boolean nulltime = settings.getProperty(CalendarExportPlugin.PROP_NULLTIME, "false").equals("true"); mTime.setTimeZone(TimeZone.getTimeZone("GMT")); mDate.setTimeZone(TimeZone.getTimeZone("GMT")); PrintStream out = new PrintStream(new FileOutputStream(intothis),true,"UTF8"); out.println("BEGIN:VCALENDAR"); out.println("PRODID:-//TV Browser//Calendar Exporter"); out.println("VERSION:2.0"); for (int i = 0; i < list.length; i++) { Program p = list[i]; out.println(); out.println("BEGIN:VEVENT"); Calendar c = Calendar.getInstance(); out.println("CREATED:" + mDate.format(c.getTime()) + "T" + mTime.format(c.getTime())); int classification = 0; try { classification = Integer.parseInt(settings.getProperty(CalendarExportPlugin.PROP_CLASSIFICATION, "0")); } catch (Exception e) { } switch (classification) { case 0: out.println("CLASS:PUBLIC"); break; case 1: out.println("CLASS:PRIVATE"); break; case 2: out.println("CLASS:CONFIDENTIAL"); break; default: break; } out.println("PRIORITY:3"); if (settings.getProperty(CalendarExportPlugin.PROP_CATEGORIE, "").trim().length() > 0) { out.println("CATEGORIES:" + settings.getProperty(CalendarExportPlugin.PROP_CATEGORIE, "")); } c = CalendarToolbox.getStartAsCalendar(p); out.println("UID:" + mDate.format(c.getTime()) + "-" + p.getID()); out.println("SUMMARY:" + p.getChannel().getName() + " - " + CalendarToolbox.noBreaks(p.getTitle())); out.println("DTSTART:" + mDate.format(c.getTime()) + "T" + mTime.format(c.getTime()) + "Z"); String desc = parser.analyse(settings.getProperty(CalendarExportPlugin.PROP_PARAM, CalendarExportPlugin.DEFAULT_PARAMETER), list[i]); if (parser.hasErrors()) { JOptionPane.showMessageDialog(null, parser.getErrorString(), "Error", JOptionPane.ERROR_MESSAGE); return; } out.println("DESCRIPTION:" + CalendarToolbox.noBreaks(desc)); if (!nulltime) { c = CalendarToolbox.getEndAsCalendar(p); } int showtime = 0; try { showtime = Integer.parseInt(settings.getProperty(CalendarExportPlugin.PROP_SHOWTIME, "0")); } catch (Exception e) { } switch (showtime) { case 0: out.println("TRANSP:OPAQUE"); break; case 1: out.println("TRANSP:TRANSPARENT"); break; default: break; } out.println("DTEND:" + mDate.format(c.getTime()) + "T" + mTime.format(c.getTime()) + "Z"); if (settings.getProperty(CalendarExportPlugin.PROP_ALARM, "false").equals("true")) { out.println("BEGIN:VALARM"); out.println("DESCRIPTION:"); out.println("ACTION:DISPLAY"); out.println("TRIGGER;VALUE=DURATION:-PT" + settings.getProperty(CalendarExportPlugin.PROP_ALARMBEFORE, "0") + "M"); out.println("END:VALARM"); } out.println("END:VEVENT\n"); } out.println(); out.println("END:VCALENDAR"); out.close(); } catch (Exception e) { ErrorHandler.handle(mLocalizer.msg("saveError", "An error occured while saving the Calendar-File"), e); e.printStackTrace(); } }
9266 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9266/88ee26ed62504062e362ad9075effa77c2a04339/ICalFile.java/buggy/tvbrowser/src/calendarexportplugin/utils/ICalFile.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 3359, 2871, 287, 12, 812, 509, 10370, 291, 16, 13586, 8526, 666, 16, 6183, 1947, 13, 288, 565, 775, 288, 1377, 3014, 2678, 2082, 273, 394, 3014, 2678, 5621, 1377, 1250, 446, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 3359, 2871, 287, 12, 812, 509, 10370, 291, 16, 13586, 8526, 666, 16, 6183, 1947, 13, 288, 565, 775, 288, 1377, 3014, 2678, 2082, 273, 394, 3014, 2678, 5621, 1377, 1250, 446, ...
if ( project.getPrerequesites() != null && project.getPrerequesites().getMaven() != null ) { DefaultArtifactVersion requiredVersion = new DefaultArtifactVersion( project.getPrerequesites().getMaven() ); if ( runtimeInformation.getApplicationVersion().compareTo( requiredVersion ) < 0 )
if ( pluginValid )
private String resolveMetaVersion( String groupId, String artifactId, List remoteRepositories, ArtifactRepository localRepository, String metaVersionId ) throws PluginVersionResolutionException { Artifact artifact = artifactFactory.createProjectArtifact( groupId, artifactId, metaVersionId ); String version = null; try { artifactMetadataSource.retrieve( artifact, localRepository, remoteRepositories ); MavenProject project = mavenProjectBuilder.buildFromRepository( artifact, remoteRepositories, localRepository ); boolean pluginValid = true; // if we don't have the required Maven version, then ignore an update if ( project.getPrerequesites() != null && project.getPrerequesites().getMaven() != null ) { DefaultArtifactVersion requiredVersion = new DefaultArtifactVersion( project.getPrerequesites().getMaven() ); if ( runtimeInformation.getApplicationVersion().compareTo( requiredVersion ) < 0 ) { getLogger().info( "Ignoring available plugin update: " + artifact.getVersion() + " as it requires Maven version " + requiredVersion ); pluginValid = false; } } if ( pluginValid ) { version = artifact.getVersion(); } } catch ( ArtifactMetadataRetrievalException e ) { getLogger().debug( "Failed to resolve " + metaVersionId + " version", e ); } catch ( ProjectBuildingException e ) { throw new PluginVersionResolutionException( groupId, artifactId, "Unable to build resolve plugin project information", e ); } catch ( IOException e ) { throw new PluginVersionResolutionException( groupId, artifactId, "Unable to determine Maven version for comparison", e ); } return version; }
47160 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47160/73e549b231b86b280deaf4fa649280f5294c827f/DefaultPluginVersionManager.java/clean/maven-core/src/main/java/org/apache/maven/plugin/version/DefaultPluginVersionManager.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 514, 2245, 2781, 1444, 12, 514, 6612, 16, 514, 25496, 16, 987, 2632, 18429, 16, 4766, 4202, 14022, 3305, 1191, 3305, 16, 514, 2191, 28039, 262, 3639, 1216, 6258, 1444, 11098, 503, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 514, 2245, 2781, 1444, 12, 514, 6612, 16, 514, 25496, 16, 987, 2632, 18429, 16, 4766, 4202, 14022, 3305, 1191, 3305, 16, 514, 2191, 28039, 262, 3639, 1216, 6258, 1444, 11098, 503, 5...
Asserts.isTrue(isCurrent());
assert isCurrent();
public void exceptionRaised(RaiseException exception) { Asserts.isTrue(isCurrent()); if (abortOnException()) { // FIXME: printError explodes on some nullpointer //getRuntime().getRuntime().printError(exception.getException()); threadService.getMainThread().raise(RubyException.newException(getRuntime(), getRuntime().getExceptions().getSystemExit(), "")); } else { exitingException = exception; } }
47984 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47984/b72a2862ae5b2f01f9a767ef2ce248fd785857c4/RubyThread.java/clean/src/org/jruby/RubyThread.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1520, 12649, 5918, 12, 30570, 503, 1520, 13, 288, 3639, 1815, 25694, 5621, 3639, 309, 261, 18623, 1398, 503, 10756, 288, 5411, 368, 9852, 30, 1172, 668, 22991, 1145, 603, 2690, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1520, 12649, 5918, 12, 30570, 503, 1520, 13, 288, 3639, 1815, 25694, 5621, 3639, 309, 261, 18623, 1398, 503, 10756, 288, 5411, 368, 9852, 30, 1172, 668, 22991, 1145, 603, 2690, ...
fireConsumerAdvisory(context, topic, value);
fireConsumerAdvisory(context, topic, value, info.getConsumerId());
public void addConsumer(ConnectionContext context, ConsumerInfo info) throws Throwable { next.addConsumer(context, info); // Don't advise advisory topics. if( !AdvisorySupport.isAdvisoryTopic(info.getDestination()) ) { ActiveMQTopic topic = AdvisorySupport.getConsumerAdvisoryTopic(info.getDestination()); consumers.put(info.getConsumerId(), info); fireConsumerAdvisory(context, topic, info); } else { // We need to replay all the previously collected state objects // for this newly added consumer. if( AdvisorySupport.isConnectionAdvisoryTopic(info.getDestination()) ) { // Replay the connections. for (Iterator iter = connections.values().iterator(); iter.hasNext();) { ConnectionInfo value = (ConnectionInfo) iter.next(); ActiveMQTopic topic = AdvisorySupport.getConnectionAdvisoryTopic(); fireAdvisory(context, topic, value, info.getConsumerId()); } } // We need to replay all the previously collected destination objects // for this newly added consumer. if( AdvisorySupport.isDestinationAdvisoryTopic(info.getDestination()) ) { // Replay the destinations. for (Iterator iter = destinations.values().iterator(); iter.hasNext();) { DestinationInfo value = (DestinationInfo) iter.next(); ActiveMQTopic topic = AdvisorySupport.getDestinationAdvisoryTopic(value.getDestination()); fireAdvisory(context, topic, value, info.getConsumerId()); } } // Replay the producers. if( AdvisorySupport.isProducerAdvisoryTopic(info.getDestination()) ) { for (Iterator iter = producers.values().iterator(); iter.hasNext();) { ProducerInfo value = (ProducerInfo) iter.next(); ActiveMQTopic topic = AdvisorySupport.getProducerAdvisoryTopic(value.getDestination()); fireAdvisory(context, topic, value, info.getConsumerId()); } } // Replay the consumers. if( AdvisorySupport.isConsumerAdvisoryTopic(info.getDestination()) ) { for (Iterator iter = consumers.values().iterator(); iter.hasNext();) { ConsumerInfo value = (ConsumerInfo) iter.next(); ActiveMQTopic topic = AdvisorySupport.getConsumerAdvisoryTopic(value.getDestination()); fireConsumerAdvisory(context, topic, value); } } } }
17032 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17032/8032ef40bea6bb08d0f8151866beadd7cafb9eb1/AdvisoryBroker.java/clean/activemq-core/src/main/java/org/activemq/advisory/AdvisoryBroker.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 527, 5869, 12, 1952, 1042, 819, 16, 9326, 966, 1123, 13, 1216, 4206, 288, 3639, 1024, 18, 1289, 5869, 12, 2472, 16, 1123, 1769, 3639, 368, 7615, 1404, 17825, 784, 1261, 3516, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 527, 5869, 12, 1952, 1042, 819, 16, 9326, 966, 1123, 13, 1216, 4206, 288, 3639, 1024, 18, 1289, 5869, 12, 2472, 16, 1123, 1769, 3639, 368, 7615, 1404, 17825, 784, 1261, 3516, ...