rem stringlengths 1 53.3k | add stringlengths 0 80.5k | context stringlengths 6 326k | meta stringlengths 141 403 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
if (directBase.getXSType() != XSTypeDecl.ANYSIMPLE_TYPE && | if (directBase != SchemaGrammar.fAnySimpleType && | private static boolean checkSimpleDerivation(DatatypeValidator derived, DatatypeValidator base, int block) { // 1 They are the same type definition. if (derived == base) return true; // 2 All of the following must be true: // 2.1 restriction is not in the subset, or in the {final} of its own {base type definition}; if ((block & SchemaSymbols.RESTRICTION) != 0 || (derived.getBaseValidator().getFinalSet() & SchemaSymbols.RESTRICTION) != 0) { return false; } // 2.2 One of the following must be true: // 2.2.1 D's base type definition is B. DatatypeValidator directBase = derived.getBaseValidator(); if (directBase == base) return true; // 2.2.2 D's base type definition is not the simple ur-type definition and is validly derived from B given the subset, as defined by this constraint. if (directBase.getXSType() != XSTypeDecl.ANYSIMPLE_TYPE && checkSimpleDerivation(directBase, base, block)) { return true; } // 2.2.3 D's {variety} is list or union and B is the simple ur-type definition. if ((derived instanceof ListDatatypeValidator || derived instanceof UnionDatatypeValidator) && base.getXSType() == XSTypeDecl.ANYSIMPLE_TYPE) { return true; } // 2.2.4 B's {variety} is union and D is validly derived from a type definition in B's {member type definitions} given the subset, as defined by this constraint. if (base instanceof UnionDatatypeValidator) { Vector subUnionMemberDV = ((UnionDatatypeValidator)base).getBaseValidators(); int subUnionSize = subUnionMemberDV.size(); for (int i=0; i<subUnionSize; i++) { base = (DatatypeValidator)subUnionMemberDV.elementAt(i); if (checkSimpleDerivation(derived, base, block)) return true; } } return false; } | 1831 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1831/7d23b0f822620b832b611e0946e73bb880886a98/XSConstraints.java/buggy/src/org/apache/xerces/impl/v2/XSConstraints.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
1250,
866,
5784,
12041,
8482,
12,
20228,
5126,
10379,
16,
21168,
5126,
1026,
16,
509,
1203,
13,
288,
3639,
368,
404,
16448,
854,
326,
1967,
618,
2379,
18,
3639,
309,
261,
765,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
1250,
866,
5784,
12041,
8482,
12,
20228,
5126,
10379,
16,
21168,
5126,
1026,
16,
509,
1203,
13,
288,
3639,
368,
404,
16448,
854,
326,
1967,
618,
2379,
18,
3639,
309,
261,
765,
... |
session.save(item); | if (isUpdate) { session.update(item); } else { session.save(item); } | public void setImpl(PropertySetItem item) { Session session = null; try { session = this.sessionFactory.openSession(); session.save(item); session.flush(); } catch (HibernateException he) { throw new PropertyException("Could not save key '" + item.getKey() + "':" + he.getMessage()); } finally { try { if (session != null) { if (!session.connection().getAutoCommit()) { session.connection().commit(); } session.close(); } } catch (Exception e) { } } } | 15561 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15561/2615d4fbaac5c92070a1d4fa8a1033dbc073980e/HibernatePropertySetDAOImpl.java/clean/src/java/com/opensymphony/module/propertyset/hibernate/HibernatePropertySetDAOImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
444,
2828,
12,
1396,
694,
1180,
761,
13,
288,
3639,
3877,
1339,
273,
446,
31,
3639,
775,
288,
5411,
1339,
273,
333,
18,
3184,
1733,
18,
3190,
2157,
5621,
2398,
309,
261,
291,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
444,
2828,
12,
1396,
694,
1180,
761,
13,
288,
3639,
3877,
1339,
273,
446,
31,
3639,
775,
288,
5411,
1339,
273,
333,
18,
3184,
1733,
18,
3190,
2157,
5621,
2398,
309,
261,
291,... |
public void init() throws MailetException { | public void init() throws MessagingException { | public void init() throws MailetException { try { delayTime = Long.parseLong(getInitParameter("delayTime")); } catch (Exception e) { } try { maxRetries = Integer.parseInt(getInitParameter("maxRetries")); } catch (Exception e) { } ComponentManager comp = (ComponentManager)getMailetContext().getAttribute(Constants.AVALON_COMPONENT_MANAGER); //timeServer = (TimeServer) comp.getComponent(Interfaces.TIME_SERVER); // Instanziate the a MailRepository for outgoing mails Store store = (Store) comp.getComponent(Interfaces.STORE); String outgoingPath = getInitParameter("outgoing"); if (outgoingPath == null) { outgoingPath = "file:///../var/mail/outgoing"; } outgoing = (SpoolRepository) store.getPrivateRepository(outgoingPath, SpoolRepository.SPOOL, Store.ASYNCHRONOUS); /* int i = 0; //Viewing list of outgoing messages, and queueing them up to be sent... need to change this for (Enumeration e = outgoing.list(); e.hasMoreElements(); ) { String key = (String) e.nextElement(); timeServer.setAlarm(key, this, ++i * 10000); log("outgoing message " + key + " set for delivery in " + (i * 10) + " seconds"); } */ //Start up a number of threads try { deliveryThreadCount = Integer.parseInt(getInitParameter("deliveryThreads")); } catch (Exception e) { } for (int i = 0; i < deliveryThreadCount; i++) { Thread t = new Thread(this, "Remote delivery thread (" + i + ")"); t.start(); deliveryThreads.add(t); } } | 47102 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47102/82da68297ddcd1d27f1ab98c317ec4c900615440/RemoteDelivery.java/clean/trunk/src/org/apache/james/transport/mailets/RemoteDelivery.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1208,
1435,
1216,
23794,
503,
288,
3639,
775,
288,
5411,
4624,
950,
273,
3407,
18,
2670,
3708,
12,
588,
2570,
1662,
2932,
10790,
950,
7923,
1769,
3639,
289,
1044,
261,
503,
425... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1208,
1435,
1216,
23794,
503,
288,
3639,
775,
288,
5411,
4624,
950,
273,
3407,
18,
2670,
3708,
12,
588,
2570,
1662,
2932,
10790,
950,
7923,
1769,
3639,
289,
1044,
261,
503,
425... |
if (overwriteAnswer.equals(IOverwriteQuery.ALL)) this.overwriteState = OVERWRITE_ALL; | if (overwriteAnswer.equals(IOverwriteQuery.ALL)) { this.overwriteState = OVERWRITE_ALL; } | boolean queryOverwrite(IPath resourcePath) throws OperationCanceledException { String overwriteAnswer = overwriteCallback.queryOverwrite(resourcePath .makeRelative().toString()); if (overwriteAnswer.equals(IOverwriteQuery.CANCEL)) throw new OperationCanceledException(DataTransferMessages.DataTransfer_emptyString); if (overwriteAnswer.equals(IOverwriteQuery.NO)) { return false; } if (overwriteAnswer.equals(IOverwriteQuery.NO_ALL)) { this.overwriteState = OVERWRITE_NONE; return false; } if (overwriteAnswer.equals(IOverwriteQuery.ALL)) this.overwriteState = OVERWRITE_ALL; return true; } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/e38d295ea613cf9f08aadb93a84a33d2e91abc5f/ImportOperation.java/clean/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/wizards/datatransfer/ImportOperation.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1250,
843,
20832,
12,
45,
743,
15467,
13,
5411,
1216,
4189,
23163,
503,
288,
3639,
514,
6156,
13203,
273,
6156,
2428,
18,
2271,
20832,
12,
3146,
743,
7734,
263,
6540,
8574,
7675,
10492,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1250,
843,
20832,
12,
45,
743,
15467,
13,
5411,
1216,
4189,
23163,
503,
288,
3639,
514,
6156,
13203,
273,
6156,
2428,
18,
2271,
20832,
12,
3146,
743,
7734,
263,
6540,
8574,
7675,
10492,
1... |
return END_TAG_START + element.getTagName() + MARKER_END; | return END_TAG_START + element.getLocalName() + MARKER_END; | public static String renderEndTag(Element element) { return END_TAG_START + element.getTagName() + MARKER_END; } | 49735 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49735/22507d504c01875ad2c16eceef2a4dd76167231d/XMLKit.java/clean/src/org/aitools/programd/util/XMLKit.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
514,
1743,
25633,
12,
1046,
930,
13,
565,
288,
3639,
327,
7273,
67,
7927,
67,
7570,
397,
930,
18,
588,
29583,
1435,
397,
20503,
654,
67,
4415,
31,
565,
289,
2,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
514,
1743,
25633,
12,
1046,
930,
13,
565,
288,
3639,
327,
7273,
67,
7927,
67,
7570,
397,
930,
18,
588,
29583,
1435,
397,
20503,
654,
67,
4415,
31,
565,
289,
2,
-100,
-100,
... |
public org.quickfix.field.UnderlyingInstrRegistry getUnderlyingInstrRegistry() throws FieldNotFound { org.quickfix.field.UnderlyingInstrRegistry value = new org.quickfix.field.UnderlyingInstrRegistry(); | public quickfix.field.UnderlyingInstrRegistry getUnderlyingInstrRegistry() throws FieldNotFound { quickfix.field.UnderlyingInstrRegistry value = new quickfix.field.UnderlyingInstrRegistry(); | public org.quickfix.field.UnderlyingInstrRegistry getUnderlyingInstrRegistry() throws FieldNotFound { org.quickfix.field.UnderlyingInstrRegistry value = new org.quickfix.field.UnderlyingInstrRegistry(); getField(value); return value; } | 5926 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5926/fecc27f98261270772ff182a1d4dfd94b5daa73d/TradeCaptureReportRequest.java/clean/src/java/src/quickfix/fix44/TradeCaptureReportRequest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
14655,
6291,
382,
701,
4243,
10833,
765,
6291,
382,
701,
4243,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
14655,
6291,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
14655,
6291,
382,
701,
4243,
10833,
765,
6291,
382,
701,
4243,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
14655,
6291,... |
return s2; | case 15: return s63; | public DFA.State transition(IntStream input) throws RecognitionException { switch ( input.LA(1) ) { case 22: case 23: case 40: case 41: case 42: case 43: case 44: case 45: case 46: case 47: return s4; case EOL: return s2; case 30: return s3; default: NoViableAltException nvae = new NoViableAltException("", 48, 2, input); throw nvae; } } | 31577 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/31577/9c6423b7a31fdc4a1317e71a6d2850c94e2140e0/RuleParser.java/buggy/drools-compiler/src/main/java/org/drools/lang/RuleParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
463,
2046,
18,
1119,
6007,
12,
1702,
1228,
810,
13,
1216,
9539,
288,
7734,
1620,
261,
810,
18,
2534,
12,
21,
13,
262,
288,
7734,
648,
11201,
30,
7734,
648,
10213,
30,
7734,
648,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
463,
2046,
18,
1119,
6007,
12,
1702,
1228,
810,
13,
1216,
9539,
288,
7734,
1620,
261,
810,
18,
2534,
12,
21,
13,
262,
288,
7734,
648,
11201,
30,
7734,
648,
10213,
30,
7734,
648,
... |
private void finish(int code, PeerNode next) { Logger.minor(this, "Finished: "+code+" on "+this, new Exception("debug")); setStatusTime = System.currentTimeMillis(); synchronized(this) { if(status != NOT_FINISHED) throw new IllegalStateException("finish() called with "+code+" when was already "+status); if((code == ROUTE_NOT_FOUND) && !sentRequest) code = ROUTE_REALLY_NOT_FOUND; status = code; notifyAll(); Logger.minor(this, "Set status code: "+getStatusString()+" on "+uid); } // Now wait for transfers, or for downstream transfer notifications. if(cw != null) { while(!allTransfersCompleted) { try { synchronized (this) { wait(10*1000); } } catch (InterruptedException e) { // Try again } } } else { Logger.minor(this, "No completion waiter"); // There weren't any transfers allTransfersCompleted = true; } synchronized (this) { notifyAll(); } Logger.minor(this, "Returning from finish()"); } | 50619 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50619/f37b79d0c8eecfb6beed49bdd3fb7061942b34aa/CHKInsertSender.java/buggy/src/freenet/node/CHKInsertSender.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3238,
6459,
13749,
12,
474,
710,
16,
6813,
50,
369,
275,
408,
15329,
3328,
18,
17364,
12,
2211,
10837,
10577,
2773,
15,
710,
9078,
265,
6,
15,
2211,
16,
2704,
503,
2932,
4148,
7923,
1769,
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,
3238,
6459,
13749,
12,
474,
710,
16,
6813,
50,
369,
275,
408,
15329,
3328,
18,
17364,
12,
2211,
10837,
10577,
2773,
15,
710,
9078,
265,
6,
15,
2211,
16,
2704,
503,
2932,
4148,
7923,
1769,
54... | ||
size = DataTools.read4SignedBytes(in, little); | size = in.readInt(); | protected void initFile(String id) throws FormatException, IOException { super.initFile(id); in = new RandomAccessStream(id); offsets = new Vector(); byte[] list = new byte[4]; String listString; type = readStringBytes(); size = DataTools.read4SignedBytes(in, little); fcc = readStringBytes(); if (type.equals("RIFF")) { bigChunkSize = size; if (!fcc.equals("AVI ")) { whine("Sorry, AVI RIFF format not found."); } } else { whine("Not an AVI file"); } pos = in.getFilePointer(); long spos = pos; while (in.read(list) == 4) { in.seek(pos); listString = new String(list); if (listString.equals("JUNK")) { type = readStringBytes(); size = DataTools.read4SignedBytes(in, little); if (type.equals("JUNK")) { in.skipBytes(size); } } else if (listString.equals("LIST")) { spos = in.getFilePointer(); type = readStringBytes(); size = DataTools.read4SignedBytes(in, little); fcc = readStringBytes(); in.seek(spos); if (fcc.equals("hdrl")) { type = readStringBytes(); size = DataTools.read4SignedBytes(in, little); fcc = readStringBytes(); if (type.equals("LIST")) { if (fcc.equals("hdrl")) { type = readStringBytes(); size = DataTools.read4SignedBytes(in, little); if (type.equals("avih")) { spos = in.getFilePointer(); dwMicroSecPerFrame = DataTools.read4SignedBytes(in, little); dwMaxBytesPerSec = DataTools.read4SignedBytes(in, little); dwReserved1 = DataTools.read4SignedBytes(in, little); dwFlags = DataTools.read4SignedBytes(in, little); dwTotalFrames = DataTools.read4SignedBytes(in, little); dwInitialFrames = DataTools.read4SignedBytes(in, little); dwStreams = DataTools.read4SignedBytes(in, little); dwSuggestedBufferSize = DataTools.read4SignedBytes(in, little); dwWidth = DataTools.read4SignedBytes(in, little); dwHeight = DataTools.read4SignedBytes(in, little); dwScale = DataTools.read4SignedBytes(in, little); dwRate = DataTools.read4SignedBytes(in, little); dwStart = DataTools.read4SignedBytes(in, little); dwLength = DataTools.read4SignedBytes(in, little); metadata.put("Microseconds per frame", new Integer(dwMicroSecPerFrame)); metadata.put("Max. bytes per second", new Integer(dwMaxBytesPerSec)); metadata.put("Total frames", new Integer(dwTotalFrames)); metadata.put("Initial frames", new Integer(dwInitialFrames)); metadata.put("Frame width", new Integer(dwWidth)); metadata.put("Frame height", new Integer(dwHeight)); metadata.put("Scale factor", new Integer(dwScale)); metadata.put("Frame rate", new Integer(dwRate)); metadata.put("Start time", new Integer(dwStart)); metadata.put("Length", new Integer(dwLength)); in.seek(spos + size); } } } } else if (fcc.equals("strl")) { long startPos = in.getFilePointer(); long streamSize = size; type = readStringBytes(); size = DataTools.read4SignedBytes(in, little); fcc = readStringBytes(); if (type.equals("LIST")) { if (fcc.equals("strl")) { type = readStringBytes(); size = DataTools.read4SignedBytes(in, little); if (type.equals("strh")) { spos = in.getFilePointer(); String fccStreamTypeOld = fccStreamType; fccStreamType = readStringBytes(); if (!fccStreamType.equals("vids")) { fccStreamType = fccStreamTypeOld; } fccStreamHandler = readStringBytes(); dwStreamFlags = DataTools.read4SignedBytes(in, little); dwStreamReserved1 = DataTools.read4SignedBytes(in, little); dwStreamInitialFrames = DataTools.read4SignedBytes(in, little); dwStreamScale = DataTools.read4SignedBytes(in, little); dwStreamRate = DataTools.read4SignedBytes(in, little); dwStreamStart = DataTools.read4SignedBytes(in, little); dwStreamLength = DataTools.read4SignedBytes(in, little); dwStreamSuggestedBufferSize = DataTools.read4SignedBytes(in, little); dwStreamQuality = DataTools.read4SignedBytes(in, little); dwStreamSampleSize = DataTools.read4SignedBytes(in, little); metadata.put("Stream quality", new Integer(dwStreamQuality)); metadata.put("Stream sample size", new Integer(dwStreamSampleSize)); in.seek(spos + size); } type = readStringBytes(); size = DataTools.read4SignedBytes(in, little); if (type.equals("strf")) { spos = in.getFilePointer(); bmpSize = DataTools.read4SignedBytes(in, little); bmpWidth = DataTools.read4SignedBytes(in, little); bmpHeight = DataTools.read4SignedBytes(in, little); bmpPlanes = DataTools.read2SignedBytes(in, little); bmpBitsPerPixel = DataTools.read2SignedBytes(in, little); bmpCompression = DataTools.read4SignedBytes(in, little); bmpSizeOfBitmap = DataTools.read4SignedBytes(in, little); bmpHorzResolution = DataTools.read4SignedBytes(in, little); bmpVertResolution = DataTools.read4SignedBytes(in, little); bmpColorsUsed = DataTools.read4SignedBytes(in, little); bmpColorsImportant = DataTools.read4SignedBytes(in, little); bmpTopDown = (bmpHeight < 0); bmpNoOfPixels = bmpWidth * bmpHeight; metadata.put("Bitmap compression value", new Integer(bmpCompression)); metadata.put("Horizontal resolution", new Integer(bmpHorzResolution)); metadata.put("Vertical resolution", new Integer(bmpVertResolution)); metadata.put("Number of colors used", new Integer(bmpColorsUsed)); metadata.put("Bits per pixel", new Integer(bmpBitsPerPixel)); // scan line is padded with zeros to be a multiple of 4 bytes int npad = bmpWidth % 4; if (npad > 0) npad = 4 - npad; bmpScanLineSize = (bmpWidth + npad) * (bmpBitsPerPixel / 8); if (bmpSizeOfBitmap != 0) { bmpActualSize = bmpSizeOfBitmap; } else { // a value of 0 doesn't mean 0 -- it means we have // to calculate it bmpActualSize = bmpScanLineSize * bmpHeight; } if (bmpColorsUsed != 0) { bmpActualColorsUsed = bmpColorsUsed; } else { // a value of 0 means we determine this based on the // bits per pixel if (bmpBitsPerPixel < 16) { bmpActualColorsUsed = 1 << bmpBitsPerPixel; } else { // no palette bmpActualColorsUsed = 0; } } if (bmpCompression != 0) { whine("Sorry, compressed AVI files not supported."); } if (!(bmpBitsPerPixel == 8 || bmpBitsPerPixel == 24 || bmpBitsPerPixel == 32)) { whine("Sorry, " + bmpBitsPerPixel + " bits per pixel not " + "supported"); } if (bmpActualColorsUsed != 0) { // read the palette pr = new byte[bmpColorsUsed]; pg = new byte[bmpColorsUsed]; pb = new byte[bmpColorsUsed]; for (int i=0; i<bmpColorsUsed; i++) { pb[i] = (byte) in.read(); pg[i] = (byte) in.read(); pr[i] = (byte) in.read(); in.read(); } } in.seek(spos + size); } } spos = in.getFilePointer(); type = readStringBytes(); size = DataTools.read4SignedBytes(in, little); if (type.equals("strd")) { in.skipBytes(size); } else { in.seek(spos); } spos = in.getFilePointer(); type = readStringBytes(); size = DataTools.read4SignedBytes(in, little); if (type.equals("strn")) { in.skipBytes(size); } else { in.seek(spos); } } in.seek((int) (startPos + 8 + streamSize)); } else if (fcc.equals("movi")) { type = readStringBytes(); size = DataTools.read4SignedBytes(in, little); fcc = readStringBytes(); if (type.equals("LIST")) { if (fcc.equals("movi")) { spos = in.getFilePointer(); type = readStringBytes(); size = DataTools.read4SignedBytes(in, little); fcc = readStringBytes(); if (!(type.equals("LIST") && fcc.equals("rec "))) { in.seek(spos); } spos = in.getFilePointer(); type = readStringBytes(); size = DataTools.read4SignedBytes(in, little); while (type.substring(2).equals("db") || type.substring(2).equals("dc") || type.substring(2).equals("wb")) { if (type.substring(2).equals("db") || type.substring(2).equals("dc")) { offsets.add(new Long(in.getFilePointer())); in.skipBytes(bmpHeight * bmpScanLineSize); } spos = in.getFilePointer(); type = readStringBytes(); size = DataTools.read4SignedBytes(in, little); if (type.equals("JUNK")) { in.skipBytes(size); spos = in.getFilePointer(); type = readStringBytes(); size = DataTools.read4SignedBytes(in, little); } } in.seek(spos); } } } else { // skipping unknown block in.skipBytes(8 + size); } } else { // skipping unknown block type = readStringBytes(); size = DataTools.read4SignedBytes(in, little); in.skipBytes(size); } pos = in.getFilePointer(); } numImages = offsets.size(); initOMEMetadata(); } | 49800 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49800/2df09d33bfdc966378aae0cc09cb503afb983bc2/AVIReader.java/buggy/loci/formats/in/AVIReader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
918,
1208,
812,
12,
780,
612,
13,
1216,
4077,
503,
16,
1860,
288,
565,
2240,
18,
2738,
812,
12,
350,
1769,
565,
316,
273,
394,
8072,
1862,
1228,
12,
350,
1769,
565,
8738,
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,
282,
4750,
918,
1208,
812,
12,
780,
612,
13,
1216,
4077,
503,
16,
1860,
288,
565,
2240,
18,
2738,
812,
12,
350,
1769,
565,
316,
273,
394,
8072,
1862,
1228,
12,
350,
1769,
565,
8738,
273,
3... |
public void testLoad() throws Exception { ClassLoader cl = Thread.currentThread().getContextClassLoader(); ClassLoader myCl = new URLClassLoader(new URL[]{}, cl); //axis gbean GBeanMBean axisgbean = new GBeanMBean(AxisGbean.getGBeanInfo(), myCl); kernel.loadGBean(axisname, axisgbean); kernel.startGBean(axisname); File jarfile = new File(getTestFile("target/generated/samples/echo-ewsimpl.jar")); kernel.getMBeanServer().invoke(axisname, "deployEWSModule", new Object[]{ jarfile.getAbsolutePath(), null, "ws/apache/axis/echo"}, new String[]{ String.class.getName(), String.class.getName(), String.class.getName()});// //try invoke from this java// ContainerIndex index = ContainerIndex.getInstance();// int length = index.length();// System.out.println("number of continers "+length);// for(int i = 0;i<length;i++){// EJBContainer contianer = index.getContainer(i);// if(contianer!= null){// String name = contianer.getEJBName();// System.out.println("found the ejb "+name);// if("echo".equals(name)){// EJBHome statelessHome = contianer.getEJBHome();// Object stateless = statelessHome.getClass().getMethod("create", null).invoke(statelessHome, null);// Method[] methods = stateless.getClass().getMethods();// // for(int j = 0;j< methods.length;j++){// if(methods[j].getName().equals("echoStruct")){// Class[] classes = methods[j].getParameterTypes();// System.out.println(classes[0]);// methods[j].invoke(stateless, new Object[]{null});// methods[j].invoke(stateless, new Object[]{classes[0].newInstance()});// }// }// }// }// } //check the real web service invocations // ClassLoader ocl = Thread.currentThread().getContextClassLoader();// URLClassLoader jarclassloder = new URLClassLoader(new URL[]{jarfile.toURL()});// Thread.currentThread().setContextClassLoader(jarclassloder); // Class echoLoacaterClass = Class.forName("org.apache.ws.echosample.EchoServiceLocator",true,jarclassloder);// Class structClass = Class.forName("org.apache.ws.echosample.EchoStruct",true,jarclassloder); Class echoLoacaterClass = ClassUtils.forName("org.apache.ws.echosample.EchoServiceLocator"); Class structClass = ClassUtils.forName("org.apache.ws.echosample.EchoStruct"); Object echoLoacater = echoLoacaterClass.newInstance(); Method getportMethod = echoLoacaterClass.getMethod("getechoPort", new Class[]{URL.class}); URL serviceURL = new URL("http://localhost:" + AxisGeronimoConstants.AXIS_SERVICE_PORT // + 5679 + "/axis/services/echoPort"); Object echoPort = getportMethod.invoke(echoLoacater, new Object[]{serviceURL}); Class echoClass = echoPort.getClass(); Method echostuctMethod = echoClass.getMethod("echoStruct", new Class[]{structClass}); Object structval = structClass.newInstance(); Object structret = echostuctMethod.invoke(echoPort, new Object[]{null}); structret = echostuctMethod.invoke(echoPort, new Object[]{structval}); assertEquals(structval, structret); //Thread.currentThread().setContextClassLoader(ocl); kernel.stopGBean(axisname); kernel.unloadGBean(axisname); } | 12474 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12474/6da3db3dc7a79b2e979479ec52e14f102f056977/ComplexTypeWebServiceTest.java/buggy/modules/axis/src/test/org/apache/geronimo/axis/ComplexTypeWebServiceTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
6459,
3813,
2563,
1435,
15069,
503,
95,
7805,
830,
33,
3830,
18,
2972,
3830,
7675,
29120,
7805,
5621,
797,
2563,
1035,
93,
2009,
33,
2704,
1785,
7805,
12,
2704,
1785,
8526,
2916,
16,
830... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2563,
1435,
15069,
503,
95,
7805,
830,
33,
3830,
18,
2972,
3830,
7675,
29120,
7805,
5621,
797,
2563,
1035,
93,
2009,
33,
2704,
1785,
7805,
12,
2704,
1785,
8526,
2916,
16,
830... | ||
AST tmp1140_AST_in = (AST)_t; | AST tmp1139_AST_in = (AST)_t; | public final void defineparam_var(AST _t) throws RecognitionException { AST defineparam_var_AST_in = (_t == ASTNULL) ? null : (AST)_t; AST as = null; AST li = null; { if (_t==null) _t=ASTNULL; if ((_t.getType()==AS)) { AST __t559 = _t; as = _t==ASTNULL ? null :(AST)_t; match(_t,AS); _t = _t.getFirstChild(); { boolean synPredMatched563 = false; if (_t==null) _t=ASTNULL; if (((_t.getType()==HANDLE))) { AST __t563 = _t; synPredMatched563 = true; inputState.guessing++; try { { AST tmp1134_AST_in = (AST)_t; match(_t,HANDLE); _t = _t.getNextSibling(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case TO: { AST tmp1135_AST_in = (AST)_t; match(_t,TO); _t = _t.getNextSibling(); break; } case BYTE: case CHARACTER: case DOUBLE: case FLOAT: case LONG: case SHORT: case UNSIGNEDSHORT: { break; } default: { throw new NoViableAltException(_t); } } } datatype_dll(_t); _t = _retTree; } } catch (RecognitionException pe) { synPredMatched563 = false; } _t = __t563;inputState.guessing--; } if ( synPredMatched563 ) { AST tmp1136_AST_in = (AST)_t; match(_t,HANDLE); _t = _t.getNextSibling(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case TO: { AST tmp1137_AST_in = (AST)_t; match(_t,TO); _t = _t.getNextSibling(); break; } case BYTE: case CHARACTER: case DOUBLE: case FLOAT: case LONG: case SHORT: case UNSIGNEDSHORT: { break; } default: { throw new NoViableAltException(_t); } } } datatype_dll(_t); _t = _retTree; } else if ((_t.getType()==CLASS)) { AST tmp1138_AST_in = (AST)_t; match(_t,CLASS); _t = _t.getNextSibling(); AST tmp1139_AST_in = (AST)_t; match(_t,TYPE_NAME); _t = _t.getNextSibling(); } else if ((_tokenSet_15.member(_t.getType()))) { datatype_param(_t); _t = _retTree; } else { throw new NoViableAltException(_t); } } _t = __t559; _t = _t.getNextSibling(); if ( inputState.guessing==0 ) { action.defAs(as); } } else if ((_tokenSet_16.member(_t.getType()))) { } else { throw new NoViableAltException(_t); } } { _loop570: do { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case CASESENSITIVE: case Not_casesens: { casesens_or_not(_t); _t = _retTree; break; } case DECIMALS: { AST __t567 = _t; AST tmp1140_AST_in = (AST)_t; match(_t,DECIMALS); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t567; _t = _t.getNextSibling(); break; } case LIKE: { AST __t568 = _t; li = _t==ASTNULL ? null :(AST)_t; match(_t,LIKE); _t = _t.getFirstChild(); fld(_t,CQ.SYMBOL); _t = _retTree; { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case VALIDATE: { AST tmp1141_AST_in = (AST)_t; match(_t,VALIDATE); _t = _t.getNextSibling(); break; } case 3: { break; } default: { throw new NoViableAltException(_t); } } } _t = __t568; _t = _t.getNextSibling(); if ( inputState.guessing==0 ) { action.defLike(li); } break; } case INITIAL: { initial_constant(_t); _t = _retTree; break; } case COLUMNLABEL: case LABEL: { label_constant(_t); _t = _retTree; break; } case NOUNDO: { AST tmp1142_AST_in = (AST)_t; match(_t,NOUNDO); _t = _t.getNextSibling(); break; } case EXTENT: { extentphrase(_t); _t = _retTree; break; } default: if (_t==null) _t=ASTNULL; if ((_t.getType()==FORMAT)) { AST __t566 = _t; AST tmp1143_AST_in = (AST)_t; match(_t,FORMAT); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t566; _t = _t.getNextSibling(); } else { break _loop570; } } } while (true); } _retTree = _t; } | 13952 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13952/041a16c78289f1c3ae5e575d3edc5e893a658e50/TreeParser01.java/buggy/trunk/org.prorefactor.core/src/org/prorefactor/treeparser01/TreeParser01.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
4426,
891,
67,
1401,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
4426,
891,
67,
1401,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
13,
692,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
4426,
891,
67,
1401,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
4426,
891,
67,
1401,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
13,
692,
... |
digestVerifier.verifyDigest( sourcePom, targetPom, transaction, artifactReporter, reportOnly ); if ( wroteBridge ) { digestVerifier.verifyDigest( sourcePom, bridgedTargetPom, transaction, artifactReporter, reportOnly ); } } catch ( Exception e ) | if ( wroteBridge ) | private void rewriteMetadata( Artifact artifact, RewriteTransaction transaction, File sourceBase, ArtifactRepository sourceRepo, File targetBase, ArtifactRepository targetRepo, Reporter artifactReporter, boolean reportOnly ) throws Exception { // SNAPSHOT metadata ArtifactMetadata snapshot = new SnapshotArtifactMetadata( artifact ); File snapshotSource = new File( sourceBase, sourceRepo.pathOfMetadata( snapshot ) ); File snapshotTarget = new File( targetBase, targetRepo.pathOfMetadata( snapshot ) ); freshenSupplementalMetadata( snapshot, snapshotSource, snapshotTarget, transaction, artifactReporter, reportOnly ); // RELEASE metadata ArtifactMetadata release = new ReleaseArtifactMetadata( artifact ); File releaseSource = new File( sourceBase, sourceRepo.pathOfMetadata( release ) ); File releaseTarget = new File( targetBase, targetRepo.pathOfMetadata( release ) ); freshenSupplementalMetadata( release, releaseSource, releaseTarget, transaction, artifactReporter, reportOnly ); // The rest is for POM metadata - translation and bridging of locations in the target repo may be required. ArtifactMetadata pom = new ProjectMetadata( artifact ); File sourcePom = new File( sourceBase, sourceRepo.pathOfMetadata( pom ) ); File targetPom = new File( targetBase, targetRepo.pathOfMetadata( pom ).replace( '+', '-' ) ); String pomContents = null; boolean pomNeedsRewriting = true; if ( sourcePom.exists() ) { pomContents = readPomContents( sourcePom ); if ( pomContents.indexOf( "modelVersion" ) > -1 ) { pomNeedsRewriting = false; freshenSupplementalMetadata( pom, sourcePom, targetPom, transaction, artifactReporter, reportOnly ); } } if ( pomNeedsRewriting ) { ArtifactPomRewriter artifactPomRewriter = null; try { artifactPomRewriter = (ArtifactPomRewriter) container.lookup( ArtifactPomRewriter.ROLE, ArtifactPomRewriter.V3_POM ); transaction.addFile( targetPom ); File bridgedTargetPom = new File( targetBase, bridgingLayout.pathOfMetadata( pom ).replace( '+', '-' ) ); transaction.addFile( bridgedTargetPom ); try { File targetPomParent = targetPom.getParentFile(); if ( !targetPomParent.exists() ) { targetPomParent.mkdirs(); } FileWriter to = null; try { StringReader from = null; if ( pomContents != null ) { from = new StringReader( pomContents ); } to = new FileWriter( targetPom ); artifactPomRewriter.rewrite( artifact, from, to, artifactReporter, reportOnly ); } finally { IOUtil.close( to ); } boolean wroteBridge = bridgePomLocations( pom, targetPom, bridgedTargetPom, artifactReporter, transaction, reportOnly ); digestVerifier.verifyDigest( sourcePom, targetPom, transaction, artifactReporter, reportOnly ); if ( wroteBridge ) { digestVerifier.verifyDigest( sourcePom, bridgedTargetPom, transaction, artifactReporter, reportOnly ); } } catch ( Exception e ) { throw e; } } finally { if ( artifactPomRewriter != null ) { try { container.release( artifactPomRewriter ); } catch ( ComponentLifecycleException e ) { } } } } } | 48791 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48791/0db2b646d23049f80b0beb13c4c45740172fcab7/RewritePhase.java/clean/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/phase/RewritePhase.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
10738,
2277,
12,
14022,
6462,
16,
17851,
3342,
2492,
16,
1387,
1084,
2171,
16,
4766,
14022,
3305,
1084,
8791,
16,
1387,
1018,
2171,
16,
14022,
3305,
1018,
8791,
16,
4766,
25585,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
10738,
2277,
12,
14022,
6462,
16,
17851,
3342,
2492,
16,
1387,
1084,
2171,
16,
4766,
14022,
3305,
1084,
8791,
16,
1387,
1018,
2171,
16,
14022,
3305,
1018,
8791,
16,
4766,
25585,
... |
lines.insert( "\tStyleSheet.setCurrentStyle( \"" + style + "\" );" ); | lines.insert( "\tStyleSheet.currentStyle = StyleSheet." + style + "Style;" ); | private boolean processStyle(String styleNames, StringList lines, String className) throws PreprocessException { int styleDirectiveLine = lines.getCurrentIndex() + 1; // get the style-name: String[] styles = TextUtil.splitAndTrim(styleNames, ','); String style = null; for (int i = 0; i < styles.length; i++) { String name = styles[i]; if (this.styleSheet.isDefined(name)) { style = name; break; } } if (style == null) { throw new PreprocessException( className + " line " + styleDirectiveLine + ": unable to process #style directive: the style(s) [" + styleNames + "] is/are not defined." ); } // when the #style directive is followed by a new operator, then // the defined style will be included as last argument in the new operator, // otherwise the defined style will be set as the current style in the stylesheet: String nextLine = null; if (lines.next()) { nextLine = lines.getCurrent(); } if ( (nextLine != null) && (nextLine.indexOf("new ") != -1) && (!containsDirective( nextLine )) ) { uncommentLine( nextLine, lines ); while ( nextLine.indexOf(';') == -1) { if (!lines.next()) { throw new PreprocessException( className + " line " + styleDirectiveLine + ": unable to process #style directive: there is a new operator without closing semicolon in the following line(s)." ); } if ( containsDirective( nextLine) ) { throw new PreprocessException( className + " line " + styleDirectiveLine + ": unable to process #style directive: there is a new operator without closing semicolon in the following line(s)." ); } nextLine = lines.getCurrent(); uncommentLine( nextLine, lines ); } // get uncommented line: nextLine = lines.getCurrent(); int parenthesisPos = nextLine.indexOf(')'); if ( parenthesisPos == -1 ) { throw new PreprocessException( className + " line " + styleDirectiveLine + ": unable to process #style directive: there is a new operator without closing parenthesis in the following line(s). " + "The closing parenthesis needs to be on the same line as the semicolon!" ); } // append the style-parameter as the last argument: StringBuffer buffer = new StringBuffer(); buffer.append( nextLine.substring(0, parenthesisPos ) ) .append( ", StyleSheet.getStyle( \"") .append( style ) .append( "\") " ) .append( nextLine.substring( parenthesisPos ) ); lines.setCurrent( buffer.toString() ); } else { // either there is no next line or the next line has no new operator lines.prev(); lines.insert( "\tStyleSheet.setCurrentStyle( \"" + style + "\" );" ); } // mark the style as beeing used: //TODO allow usage of favourite styles #style myStyle, okStyle, baseStyle this.styleSheet.addUsedStyle( style ); return true; } | 9804 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9804/b98582133d39715f73c21e895c11c91b947002f0/Preprocessor.java/buggy/build/source/src/de/enough/polish/preprocess/Preprocessor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
1250,
1207,
2885,
12,
780,
2154,
1557,
16,
514,
682,
2362,
16,
514,
2658,
13,
225,
202,
15069,
2962,
2567,
503,
202,
95,
202,
202,
474,
2154,
13307,
1670,
273,
2362,
18,
588,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
1250,
1207,
2885,
12,
780,
2154,
1557,
16,
514,
682,
2362,
16,
514,
2658,
13,
225,
202,
15069,
2962,
2567,
503,
202,
95,
202,
202,
474,
2154,
13307,
1670,
273,
2362,
18,
588,... |
heapMonitor = new Monitor(); final VmArchitecture arch = Unsafe.getCurrentProcessor().getArchitecture(); final GCManager gcManager = new GCManager(this, arch, statics); this.gcThread = new GCThread(gcManager, heapMonitor); this.finalizerThread = new FinalizerThread(this); gcThread.start(); finalizerThread.start(); triggerSize = (int)Math.min(Integer.MAX_VALUE, getFreeMemory() * GC_TRIGGER_PERCENTAGE); } | heapMonitor = new Monitor(); final VmArchitecture arch = Unsafe.getCurrentProcessor() .getArchitecture(); final GCManager gcManager = new GCManager(this, arch, statics); this.gcThread = new GCThread(gcManager, heapMonitor); this.finalizerThread = new FinalizerThread(this); gcThread.start(); finalizerThread.start(); triggerSize = (int) Math.min(Integer.MAX_VALUE, getFreeMemory() * GC_TRIGGER_PERCENTAGE); } | public void start() { // Create a Heap monitor heapMonitor = new Monitor(); final VmArchitecture arch = Unsafe.getCurrentProcessor().getArchitecture(); final GCManager gcManager = new GCManager(this, arch, statics); this.gcThread = new GCThread(gcManager, heapMonitor); this.finalizerThread = new FinalizerThread(this); gcThread.start(); finalizerThread.start(); // Calculate the trigger size triggerSize = (int)Math.min(Integer.MAX_VALUE, getFreeMemory() * GC_TRIGGER_PERCENTAGE); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/17c5c434010c98f6a1acae0cf9ca6782f92f1dfc/DefaultHeapManager.java/clean/core/src/core/org/jnode/vm/memmgr/def/DefaultHeapManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
787,
1435,
288,
202,
202,
759,
1788,
279,
30241,
6438,
202,
202,
25506,
7187,
273,
394,
14086,
5621,
202,
202,
6385,
776,
81,
12269,
18123,
6637,
273,
27476,
18,
588,
3935,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
787,
1435,
288,
202,
202,
759,
1788,
279,
30241,
6438,
202,
202,
25506,
7187,
273,
394,
14086,
5621,
202,
202,
6385,
776,
81,
12269,
18123,
6637,
273,
27476,
18,
588,
3935,... |
return newFixnum(getRuntime(), mod); | return getRuntime().newFixnum(mod); | public RubyNumeric op_mod(RubyNumeric other) { if (other instanceof RubyFloat) { return RubyFloat.newFloat(getRuntime(), getDoubleValue()).op_mod(other); } else if (other instanceof RubyBignum) { return RubyBignum.newBignum(getRuntime(), getLongValue()).op_mod(other); } // Java / and % are not the same as ruby long x = getLongValue(); long y = other.getLongValue(); long mod = x % y; if (mod < 0 && y > 0 || mod > 0 && y < 0) { mod += y; } return newFixnum(getRuntime(), mod); } | 50993 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50993/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubyFixnum.java/clean/src/org/jruby/RubyFixnum.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19817,
9902,
1061,
67,
1711,
12,
54,
10340,
9902,
1308,
13,
288,
3639,
309,
261,
3011,
1276,
19817,
4723,
13,
288,
5411,
327,
19817,
4723,
18,
2704,
4723,
12,
588,
5576,
9334,
16097... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19817,
9902,
1061,
67,
1711,
12,
54,
10340,
9902,
1308,
13,
288,
3639,
309,
261,
3011,
1276,
19817,
4723,
13,
288,
5411,
327,
19817,
4723,
18,
2704,
4723,
12,
588,
5576,
9334,
16097... |
public void insertNotice(int notifyId, Map params) throws SQLException { | public void insertNotice(int notifyId, Map params, String queueID) throws SQLException { | public void insertNotice(int notifyId, Map params) throws SQLException { Connection connection = null; try { connection = getConnection(); PreparedStatement statement = connection.prepareStatement("INSERT INTO notifications (textmsg, numericmsg, notifyid, pagetime, nodeid, interfaceid, serviceid, eventid, eventuei, subject) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"); // notifications textMsg field statement.setString(1, (String) params.get(NotificationManager.PARAM_TEXT_MSG)); // notifications numericMsg field statement.setString(2, (String) params.get(NotificationManager.PARAM_NUM_MSG)); // notifications notifyID field statement.setInt(3, notifyId); // notifications pageTime field statement.setTimestamp(4, new Timestamp((new Date()).getTime())); // notifications nodeID field String node = (String) params.get(NotificationManager.PARAM_NODE); if (node != null && !node.trim().equals("") && !node.toLowerCase().equals("null") && !node.toLowerCase().equals("%nodeid%")) { statement.setInt(5, Integer.parseInt(node)); } else { statement.setNull(5, Types.INTEGER); } // notifications interfaceID field String ipaddr = (String) params.get(NotificationManager.PARAM_INTERFACE); if (ipaddr != null && !ipaddr.trim().equals("") && !ipaddr.toLowerCase().equals("null") && !ipaddr.toLowerCase().equals("%interface%")) { statement.setString(6, ipaddr); } else { statement.setString(6, null); } // notifications serviceID field String service = (String) params.get(NotificationManager.PARAM_SERVICE); if (service != null && !service.trim().equals("") && !service.toLowerCase().equals("null") && !service.toLowerCase().equals("%service%")) { statement.setInt(7, getServiceId(service)); } else { statement.setNull(7, Types.INTEGER); } // eventID field String eventID = (String) params.get("eventID"); statement.setInt(8, Integer.parseInt(eventID)); statement.setString(9, (String) params.get("eventUEI")); // notifications textMsg field statement.setString(1, (String) params.get(NotificationManager.PARAM_SUBJECT)); statement.executeUpdate(); statement.close(); } finally { if (connection != null) { try { connection.close(); } catch (SQLException e) { } } } } | 47678 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47678/5be4fb34447a088e813f238214d9ea253bdce022/NotificationManager.java/buggy/src/services/org/opennms/netmgt/config/NotificationManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
2243,
20127,
12,
474,
5066,
548,
16,
1635,
859,
16,
514,
2389,
734,
13,
1216,
6483,
288,
3639,
4050,
1459,
273,
446,
31,
3639,
775,
288,
5411,
1459,
273,
6742,
5621,
5411,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
2243,
20127,
12,
474,
5066,
548,
16,
1635,
859,
16,
514,
2389,
734,
13,
1216,
6483,
288,
3639,
4050,
1459,
273,
446,
31,
3639,
775,
288,
5411,
1459,
273,
6742,
5621,
5411,
16... |
data = new GridData( GridData.FILL_HORIZONTAL ); data.horizontalSpan = 3; | GridData data = new GridData( GridData.FILL_HORIZONTAL ); | private void createDynamicParamsPart( Composite parent ) { Composite comp = new Composite( parent, SWT.NULL ); GridLayout layout = new GridLayout( 3, false ); layout.marginHeight = 0; layout.marginWidth = 0; comp.setLayout( layout ); comp.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) ); createLabel( comp, LABEL_DATA_SETS ); dataSetsCombo = new Combo( comp, SWT.READ_ONLY ); GridData data = new GridData( ); data.widthHint = 120; dataSetsCombo.setLayoutData( data ); dataSetsCombo.setItems( getDataSets( ) ); dataSetsCombo.addSelectionListener( new SelectionAdapter( ) { public void widgetSelected( SelectionEvent e ) { dataSet = getDataSet( dataSetsCombo.getText( ) ); refreshValueTable( ); updateButtons( ); } } ); createDSButton = new Button( comp, SWT.PUSH ); createDSButton.setText( LABEL_BUTTON_CREATE_NEW_DATASET ); createDSButton.addSelectionListener( new SelectionAdapter( ) { public void widgetSelected( SelectionEvent e ) { new NewDataSetAction( ).run( ); refreshDataSets( ); } } ); Label label = new Label( comp, SWT.NULL ); label.setText( LABEL_PARAMETERS ); data = new GridData( ); data.horizontalSpan = 3; label.setLayoutData( data ); table = new Table( comp, SWT.FULL_SELECTION | SWT.HIDE_SELECTION | SWT.BORDER ); data = new GridData( GridData.FILL_HORIZONTAL ); data.horizontalSpan = 3; data.heightHint = 100; table.setLayoutData( data ); table.setLinesVisible( true ); table.setHeaderVisible( true ); table.addKeyListener( new KeyAdapter( ) { public void keyReleased( KeyEvent e ) { // If Delete pressed, delete the selected row if ( e.keyCode == SWT.DEL ) { deleteRow( ); } } } ); int[] columnWidths = new int[]{ 180, 145, 145, }; String[] columnProps = new String[]{ COLUMN_NAME, COLUMN_VALUE, COLUMN_DISPLAY_TEXT }; String[] columnLabels = new String[]{ COLUMN_NAME_LABEL, COLUMN_VALUE_LABEL, COLUMN_DISPLAY_TEXT_LABEL }; cellEditors = new CellEditor[]{ new TextCellEditor( table ), new ComboBoxCellEditor( table, new String[0], SWT.READ_ONLY ), new ComboBoxCellEditor( table, new String[0], SWT.READ_ONLY ), }; for ( int i = 0; i < columnProps.length; i++ ) { TableColumn column = new TableColumn( table, SWT.LEFT ); column.setResizable( true ); column.setText( columnLabels[i] ); column.setWidth( columnWidths[i] ); } valueTable = new TableViewer( table ); valueTable.setCellEditors( cellEditors ); valueTable.setColumnProperties( columnProps ); valueTable.setContentProvider( contentProvider ); valueTable.setLabelProvider( labelProvider ); valueTable.setCellModifier( cellModifier ); valueTable.addSelectionChangedListener( new ISelectionChangedListener( ) { public void selectionChanged( SelectionChangedEvent event ) { ISelection selection = event.getSelection( ); Object param = ( (StructuredSelection) selection ).getFirstElement( ); if ( param != selectedParameter ) { if ( param instanceof ScalarParameterHandle ) { try { saveParameterProperties( ); selectedParameter = (ScalarParameterHandle) param; } catch ( SemanticException e ) { ExceptionHandler.handle( e ); valueTable.setSelection( new StructuredSelection( selectedParameter ) ); } refreshParameterProperties( ); updateButtons( ); } } } } ); } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/ffe25c84db39ac36a136a2b6d3c13bc9dc6b6fd2/CascadingParametersDialog.java/clean/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/ui/dialogs/CascadingParametersDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
752,
9791,
1370,
1988,
12,
14728,
982,
262,
202,
95,
202,
202,
9400,
1161,
273,
394,
14728,
12,
982,
16,
348,
8588,
18,
8560,
11272,
202,
202,
6313,
3744,
3511,
273,
394... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
752,
9791,
1370,
1988,
12,
14728,
982,
262,
202,
95,
202,
202,
9400,
1161,
273,
394,
14728,
12,
982,
16,
348,
8588,
18,
8560,
11272,
202,
202,
6313,
3744,
3511,
273,
394... |
public void run(TestResult result, final TestContext context) throws InterruptedException { | public void run(TestResult result, final TestConnection connection) throws InterruptedException { | public void run(TestResult result, final TestContext context) throws InterruptedException { log.debug("expecting from client " + clientId + ": " + data + " " + expectedFields); CharSequence message = context.getNextMessage(clientId, TIMEOUT_IN_MS); if (message == null) { Assert.fail("message timeout: expected=" + expectedFields); } Map actualFields = simpleParse(message.toString()); if (actualFields.size() == 0) { System.out.println("FOO!!!!!"); } log.debug("actual: " + message); assertMessageEqual(actualFields); } | 52526 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52526/4d315546f4a81534f7ae92bc23dffe2024514e35/ExpectMessageStep.java/buggy/test/quickfix/test/acceptance/ExpectMessageStep.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1086,
12,
4709,
1253,
563,
16,
727,
7766,
1952,
1459,
13,
1216,
7558,
288,
3639,
613,
18,
4148,
2932,
12339,
310,
628,
1004,
315,
397,
11493,
397,
6398,
315,
397,
501,
397,
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,
918,
1086,
12,
4709,
1253,
563,
16,
727,
7766,
1952,
1459,
13,
1216,
7558,
288,
3639,
613,
18,
4148,
2932,
12339,
310,
628,
1004,
315,
397,
11493,
397,
6398,
315,
397,
501,
397,
3... |
if(lock==null || lock.getResourceType()!=LockToken.RESOURCE_TYPE_NULL_RESOURCE){ | if(lock==null || (!lock.isNullResource()) ){ | public String[] listResources() throws XMLDBException { Collection collection = null; DBBroker broker = null; try { broker = brokerPool.get(user); collection = broker.openCollection(path, Lock.READ_LOCK); if(collection == null) throw new XMLDBException(ErrorCodes.INVALID_COLLECTION, "Collection " + path + " not found"); if (!checkPermissions(collection, Permission.READ)) return new String[0]; List allresources = new ArrayList(); DocumentImpl doc; for (Iterator i = collection.iterator(broker); i.hasNext(); ) { doc = (DocumentImpl) i.next(); // Only if Locktoken has Null resource flag set LockToken lock = doc.getMetadata().getLockToken(); if(lock==null || lock.getResourceType()!=LockToken.RESOURCE_TYPE_NULL_RESOURCE){ allresources.add( doc.getFileURI() ); } } int j=0; String[] resources = new String[allresources.size()]; for(Iterator i = allresources.iterator(); i.hasNext(); j++){ resources[j]= ((XmldbURI) i.next()).toString(); } return resources; } catch (EXistException e) { throw new XMLDBException( ErrorCodes.UNKNOWN_ERROR, "error while retrieving resource: " + e.getMessage(), e); } finally { if(collection != null) collection.release(); brokerPool.release(broker); } } | 2909 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2909/380fea0ceb75c4b20a2e99db5e5ef337246ff988/LocalCollection.java/buggy/src/org/exist/xmldb/LocalCollection.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
514,
8526,
666,
3805,
1435,
1216,
26014,
503,
288,
5411,
2200,
1849,
273,
446,
31,
5411,
2383,
11194,
8625,
273,
446,
31,
5411,
775,
288,
7734,
8625,
273,
8625,
2864,
18,
588,
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,
540,
1071,
514,
8526,
666,
3805,
1435,
1216,
26014,
503,
288,
5411,
2200,
1849,
273,
446,
31,
5411,
2383,
11194,
8625,
273,
446,
31,
5411,
775,
288,
7734,
8625,
273,
8625,
2864,
18,
588,
12,
... |
.add(jPanel2Layout.createSequentialGroup() | .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel2Layout.createSequentialGroup() | private void initComponents() { jLabel1 = new javax.swing.JLabel(); jPanel1 = new javax.swing.JPanel(); jButtonSave = new javax.swing.JButton(); jButtonUndo = new javax.swing.JButton(); jButtonClose = new javax.swing.JButton(); jPanel2 = new javax.swing.JPanel(); jPanel3 = new javax.swing.JPanel(); jButtonToBegin = new javax.swing.JButton(); jButtonOneRowM = new javax.swing.JButton(); jButtonToEnd = new javax.swing.JButton(); jButtonOneRowP = new javax.swing.JButton(); jLabel2 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jLabel5 = new javax.swing.JLabel(); jScrollPane1 = new javax.swing.JScrollPane(); jTextArea1 = new javax.swing.JTextArea(); jLabel3 = new javax.swing.JLabel(); jComboG = new javax.swing.JComboBox(); jLabel6 = new javax.swing.JLabel(); jTextField1 = new javax.swing.JTextField(); jTextField2 = new javax.swing.JTextField(); jTextField3 = new javax.swing.JTextField(); jLabel7 = new javax.swing.JLabel(); jTextField4 = new javax.swing.JTextField(); jLabel1.setText("jLabel1"); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); jPanel1.setPreferredSize(new java.awt.Dimension(263, 33)); jButtonSave.setText("\u0421\u044a\u0445\u0440\u0430\u043d\u0438"); jButtonSave.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonSaveActionPerformed(evt); } }); jButtonSave.addKeyListener(new java.awt.event.KeyAdapter() { public void keyPressed(java.awt.event.KeyEvent evt) { jButtonSaveKeyPressed(evt); } }); jPanel1.add(jButtonSave); jButtonUndo.setText("\u041f\u0440\u0435\u0434\u0438\u0448\u043d\u0438"); jButtonUndo.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonUndoActionPerformed(evt); } }); jButtonUndo.addKeyListener(new java.awt.event.KeyAdapter() { public void keyPressed(java.awt.event.KeyEvent evt) { jButtonUndoKeyPressed(evt); } }); jPanel1.add(jButtonUndo); jButtonClose.setText("\u0417\u0430\u0442\u0432\u043e\u0440\u0438"); jButtonClose.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonCloseActionPerformed(evt); } }); jButtonClose.addKeyListener(new java.awt.event.KeyAdapter() { public void keyPressed(java.awt.event.KeyEvent evt) { jButtonCloseKeyPressed(evt); } }); jPanel1.add(jButtonClose); getContentPane().add(jPanel1, java.awt.BorderLayout.SOUTH); jPanel2.setBorder(javax.swing.BorderFactory.createEtchedBorder()); jPanel2.setPreferredSize(new java.awt.Dimension(400, 300)); jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.RAISED), "\u041d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u044f")); jPanel3.setPreferredSize(new java.awt.Dimension(230, 70)); jButtonToBegin.setText("<<"); jButtonToBegin.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonToBeginActionPerformed(evt); } }); jButtonToBegin.addKeyListener(new java.awt.event.KeyAdapter() { public void keyPressed(java.awt.event.KeyEvent evt) { jButtonToBeginKeyPressed(evt); } }); jPanel3.add(jButtonToBegin); jButtonOneRowM.setText("<"); jButtonOneRowM.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonOneRowMActionPerformed(evt); } }); jButtonOneRowM.addKeyListener(new java.awt.event.KeyAdapter() { public void keyPressed(java.awt.event.KeyEvent evt) { jButtonOneRowMKeyPressed(evt); } }); jPanel3.add(jButtonOneRowM); jButtonToEnd.setText(">>"); jButtonToEnd.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonToEndActionPerformed(evt); } }); jButtonToEnd.addKeyListener(new java.awt.event.KeyAdapter() { public void keyPressed(java.awt.event.KeyEvent evt) { jButtonToEndKeyPressed(evt); } }); jPanel3.add(jButtonToEnd); jButtonOneRowP.setText(">"); jButtonOneRowP.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonOneRowPActionPerformed(evt); } }); jButtonOneRowP.addKeyListener(new java.awt.event.KeyAdapter() { public void keyPressed(java.awt.event.KeyEvent evt) { jButtonOneRowPKeyPressed(evt); } }); jPanel3.add(jButtonOneRowP); jLabel2.setText("\u0415\u0413\u041d:"); jLabel4.setText("\u0418\u043c\u0435:"); jLabel5.setText("\u041a\u043e\u043c\u0435\u043d\u0442\u0430\u0440:"); jTextArea1.setColumns(20); jTextArea1.setRows(5); jScrollPane1.setViewportView(jTextArea1); jLabel3.setText("\u0413\u0440\u0443\u043f\u0430:"); jLabel6.setText("\u041d\u041b\u041a:"); jTextField1.setInputVerifier(new imakante.com.InputEGNVerifier()); jLabel7.setText("\u041a\u043e\u0434:"); jTextField4.setInputVerifier(new imakante.com.InputIntegerVerifier()); org.jdesktop.layout.GroupLayout jPanel2Layout = new org.jdesktop.layout.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup( jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel2Layout.createSequentialGroup() .addContainerGap() .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 336, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel2Layout.createSequentialGroup() .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel2Layout.createSequentialGroup() .add(jLabel4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 38, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 39, Short.MAX_VALUE)) .add(jLabel3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 46, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(jLabel7) .add(jLabel2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 77, Short.MAX_VALUE) .add(jPanel2Layout.createSequentialGroup() .add(jLabel6) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)) .add(jPanel2Layout.createSequentialGroup() .add(jLabel5, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 73, Short.MAX_VALUE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED))) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 261, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false) .add(org.jdesktop.layout.GroupLayout.LEADING, jTextField4) .add(org.jdesktop.layout.GroupLayout.LEADING, jTextField1) .add(org.jdesktop.layout.GroupLayout.LEADING, jTextField2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 124, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))) .add(org.jdesktop.layout.GroupLayout.TRAILING, jTextField3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 261, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(jComboG, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 213, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))) .addContainerGap()) ); jPanel2Layout.setVerticalGroup( jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel2Layout.createSequentialGroup() .addContainerGap() .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel3) .add(jComboG, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(14, 14, 14) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel7) .add(jTextField4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel2) .add(jTextField1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel6) .add(jTextField2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(jTextField3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(jLabel4)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(jLabel5)) .add(14, 14, 14) .add(jPanel3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addContainerGap(14, Short.MAX_VALUE)) ); getContentPane().add(jPanel2, java.awt.BorderLayout.CENTER); java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize(); setBounds((screenSize.width-370)/2, (screenSize.height-377)/2, 370, 377); }// </editor-fold>//GEN-END:initComponents | 12667 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12667/2bb8b18ad236e0de2e175f9d9e44e01962784019/aePerson.java/buggy/src/nom/aePerson.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1208,
7171,
1435,
288,
3639,
26538,
21,
273,
394,
6863,
18,
5328,
310,
18,
46,
2224,
5621,
3639,
17871,
21,
273,
394,
6863,
18,
5328,
310,
18,
46,
5537,
5621,
3639,
525,
3616... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1208,
7171,
1435,
288,
3639,
26538,
21,
273,
394,
6863,
18,
5328,
310,
18,
46,
2224,
5621,
3639,
17871,
21,
273,
394,
6863,
18,
5328,
310,
18,
46,
5537,
5621,
3639,
525,
3616... |
aclManagerService.addUserToGroup(franz, portals, SportletRole.getAdminRole()); aclManagerService.addUserToGroup(franz, triana, SportletRole.getAdminRole()); | try { aclManagerService.addUserToGroup(franz, portals, SportletRole.getAdminRole()); aclManagerService.addUserToGroup(franz, triana, SportletRole.getAdminRole()); } catch (PortletServiceException e) { log.error("Unable to add users: ", e); fail("Unable to add users"); } | protected void setUp() throws PortletServiceException { super.setUp(); int i; // Create both services using mock ServletConfig try { aclService = (AccessControlService)factory.createPortletService(AccessControlService.class, props, null, true); aclManagerService = (AccessControlManagerService)factory.createPortletService(AccessControlManagerService.class, props, null, true); userManager = (UserManagerService)factory.createPortletService(UserManagerService.class, props, null, true); } catch (Exception e) { log.error("Unable to initialize services: ", e); } // First we need to create some groups log.info("creating fake groups"); groups = new Vector(GROUPS.length); for (i = 0; i < GROUPS.length; i++) { groups.set(i, GROUPS[i]); aclManagerService.createNewGroup(GROUPS[i]); } List portletGroups = aclService.getAllGroups(); cactus = (PortletGroup)portletGroups.get(0); portals = (PortletGroup)portletGroups.get(1); triana = (PortletGroup)portletGroups.get(2); // Make sure we have proper ordering assertEquals(cactus.getName(), GROUPS[0]); assertEquals(portals.getName(), GROUPS[1]); assertEquals(triana.getName(), GROUPS[2]); // Lets make user 0 the super user and admin of group 0 hans = new SportletUserImpl(); hans.setGivenName(USERS[0]); hans.setUserID(USERS[0]); aclManagerService.addUserToSuperRole(hans); aclManagerService.addUserToGroup(hans, cactus, SportletRole.getAdminRole()); // Lets make user 1 admin of group 1 and 2 franz = new SportletUserImpl(); franz.setGivenName(USERS[1]); franz.setUserID(USERS[1]); aclManagerService.addUserToGroup(franz, portals, SportletRole.getAdminRole()); aclManagerService.addUserToGroup(franz, triana, SportletRole.getAdminRole()); // Lets make user 2 admin of group 2 josef = new SportletUserImpl(); josef.setGivenName(USERS[2]); josef.setUserID(USERS[2]); aclManagerService.addUserToGroup(josef, triana, SportletRole.getAdminRole()); } | 49343 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49343/a145fd7b39c34f98a9d15858bbae7b45284f201b/UserManagerServiceTest.java/buggy/src/org/gridlab/gridsphere/services/user/test/UserManagerServiceTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
24292,
1435,
1216,
21305,
15133,
288,
3639,
2240,
18,
542,
1211,
5621,
3639,
509,
277,
31,
3639,
368,
1788,
3937,
4028,
1450,
5416,
7971,
809,
3639,
775,
288,
5411,
7895,
1179,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
24292,
1435,
1216,
21305,
15133,
288,
3639,
2240,
18,
542,
1211,
5621,
3639,
509,
277,
31,
3639,
368,
1788,
3937,
4028,
1450,
5416,
7971,
809,
3639,
775,
288,
5411,
7895,
1179,
... |
throw new SQLException(pg_stream.ReceiveString(getEncoding())); | throw new SQLException(pg_stream.ReceiveString(encoding)); | protected void openConnection(String host, int port, Properties info, String database, String url, Driver d) throws SQLException { // Throw an exception if the user or password properties are missing // This occasionally occurs when the client uses the properties version // of getConnection(), and is a common question on the email lists if(info.getProperty("user")==null) throw new PSQLException("postgresql.con.user"); if(info.getProperty("password")==null) throw new PSQLException("postgresql.con.pass"); this_driver = d; this_url = url; PG_DATABASE = database; PG_PASSWORD = info.getProperty("password"); PG_USER = info.getProperty("user"); PG_PORT = port; PG_HOST = host; PG_STATUS = CONNECTION_BAD; // Now make the initial connection try { pg_stream = new PG_Stream(host, port); } catch (ConnectException cex) { // Added by Peter Mount <peter@retep.org.uk> // ConnectException is thrown when the connection cannot be made. // we trap this an return a more meaningful message for the end user throw new PSQLException ("postgresql.con.refused"); } catch (IOException e) { throw new PSQLException ("postgresql.con.failed",e); } // Now we need to construct and send a startup packet try { // Ver 6.3 code pg_stream.SendInteger(4+4+SM_DATABASE+SM_USER+SM_OPTIONS+SM_UNUSED+SM_TTY,4); pg_stream.SendInteger(PG_PROTOCOL_LATEST_MAJOR,2); pg_stream.SendInteger(PG_PROTOCOL_LATEST_MINOR,2); pg_stream.Send(database.getBytes(),SM_DATABASE); // This last send includes the unused fields pg_stream.Send(PG_USER.getBytes(),SM_USER+SM_OPTIONS+SM_UNUSED+SM_TTY); // now flush the startup packets to the backend pg_stream.flush(); // Now get the response from the backend, either an error message // or an authentication request int areq = -1; // must have a value here do { int beresp = pg_stream.ReceiveChar(); switch(beresp) { case 'E': // An error occured, so pass the error message to the // user. // // The most common one to be thrown here is: // "User authentication failed" // throw new SQLException(pg_stream.ReceiveString(getEncoding())); case 'R': // Get the type of request areq = pg_stream.ReceiveIntegerR(4); // Get the password salt if there is one if(areq == AUTH_REQ_CRYPT) { byte[] rst = new byte[2]; rst[0] = (byte)pg_stream.ReceiveChar(); rst[1] = (byte)pg_stream.ReceiveChar(); salt = new String(rst,0,2); DriverManager.println("Salt="+salt); } // now send the auth packet switch(areq) { case AUTH_REQ_OK: break; case AUTH_REQ_KRB4: DriverManager.println("postgresql: KRB4"); throw new PSQLException("postgresql.con.kerb4"); case AUTH_REQ_KRB5: DriverManager.println("postgresql: KRB5"); throw new PSQLException("postgresql.con.kerb5"); case AUTH_REQ_PASSWORD: DriverManager.println("postgresql: PASSWORD"); pg_stream.SendInteger(5+PG_PASSWORD.length(),4); pg_stream.Send(PG_PASSWORD.getBytes()); pg_stream.SendInteger(0,1); pg_stream.flush(); break; case AUTH_REQ_CRYPT: DriverManager.println("postgresql: CRYPT"); String crypted = UnixCrypt.crypt(salt,PG_PASSWORD); pg_stream.SendInteger(5+crypted.length(),4); pg_stream.Send(crypted.getBytes()); pg_stream.SendInteger(0,1); pg_stream.flush(); break; default: throw new PSQLException("postgresql.con.auth",new Integer(areq)); } break; default: throw new PSQLException("postgresql.con.authfail"); } } while(areq != AUTH_REQ_OK); } catch (IOException e) { throw new PSQLException("postgresql.con.failed",e); } // As of protocol version 2.0, we should now receive the cancellation key and the pid int beresp = pg_stream.ReceiveChar(); switch(beresp) { case 'K': pid = pg_stream.ReceiveInteger(4); ckey = pg_stream.ReceiveInteger(4); break; case 'E': case 'N': throw new SQLException(pg_stream.ReceiveString(getEncoding())); default: throw new PSQLException("postgresql.con.setup"); } // Expect ReadyForQuery packet beresp = pg_stream.ReceiveChar(); switch(beresp) { case 'Z': break; case 'E': case 'N': throw new SQLException(pg_stream.ReceiveString(getEncoding())); default: throw new PSQLException("postgresql.con.setup"); } // Originally we issued a SHOW DATESTYLE statement to find the databases default // datestyle. However, this caused some problems with timestamps, so in 6.5, we // went the way of ODBC, and set the connection to ISO. // // This may cause some clients to break when they assume anything other than ISO, // but then - they should be using the proper methods ;-) // // We also ask the DB for certain properties (i.e. DatabaseEncoding at this time) // firstWarning = null; java.sql.ResultSet initrset = ExecSQL("set datestyle to 'ISO'; " + "select case when pg_encoding_to_char(1) = 'SQL_ASCII' then 'UNKNOWN' else getdatabaseencoding() end"); String dbEncoding = null; //retrieve DB properties if(initrset.next()) { //handle DatabaseEncoding dbEncoding = initrset.getString(1); //convert from the PostgreSQL name to the Java name if (dbEncoding.equals("SQL_ASCII")) { dbEncoding = "ASCII"; } else if (dbEncoding.equals("UNICODE")) { dbEncoding = "UTF8"; } else if (dbEncoding.equals("LATIN1")) { dbEncoding = "ISO8859_1"; } else if (dbEncoding.equals("LATIN2")) { dbEncoding = "ISO8859_2"; } else if (dbEncoding.equals("LATIN3")) { dbEncoding = "ISO8859_3"; } else if (dbEncoding.equals("LATIN4")) { dbEncoding = "ISO8859_4"; } else if (dbEncoding.equals("LATIN5")) { dbEncoding = "ISO8859_5"; } else if (dbEncoding.equals("LATIN6")) { dbEncoding = "ISO8859_6"; } else if (dbEncoding.equals("LATIN7")) { dbEncoding = "ISO8859_7"; } else if (dbEncoding.equals("LATIN8")) { dbEncoding = "ISO8859_8"; } else if (dbEncoding.equals("LATIN9")) { dbEncoding = "ISO8859_9"; } else if (dbEncoding.equals("EUC_JP")) { dbEncoding = "EUC_JP"; } else if (dbEncoding.equals("EUC_CN")) { dbEncoding = "EUC_CN"; } else if (dbEncoding.equals("EUC_KR")) { dbEncoding = "EUC_KR"; } else if (dbEncoding.equals("EUC_TW")) { dbEncoding = "EUC_TW"; } else if (dbEncoding.equals("KOI8")) { // try first if KOI8_U is present, it's a superset of KOI8_R try { dbEncoding = "KOI8_U"; "test".getBytes(dbEncoding); } catch(UnsupportedEncodingException uee) { // well, KOI8_U is still not in standard JDK, falling back to KOI8_R :( dbEncoding = "KOI8_R"; } } else if (dbEncoding.equals("WIN")) { dbEncoding = "Cp1252"; } else if (dbEncoding.equals("UNKNOWN")) { //This isn't a multibyte database so we don't have an encoding to use //We leave dbEncoding null which will cause the default encoding for the //JVM to be used dbEncoding = null; } else { dbEncoding = null; } } //Set the encoding for this connection //Since the encoding could be specified or obtained from the DB we use the //following order: // 1. passed as a property // 2. value from DB if supported by current JVM // 3. default for JVM (leave encoding null) String passedEncoding = info.getProperty("charSet"); // could be null if (passedEncoding != null) { encoding = passedEncoding; } else { if (dbEncoding != null) { //test DB encoding try { "TEST".getBytes(dbEncoding); //no error the encoding is supported by the current JVM encoding = dbEncoding; } catch (UnsupportedEncodingException uee) { //dbEncoding is not supported by the current JVM encoding = null; } } else { encoding = null; } } // Initialise object handling initObjectTypes(); // Mark the connection as ok, and cleanup firstWarning = null; PG_STATUS = CONNECTION_OK; } | 11803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11803/ff21a8e5c86457e205ff7c598b930efd711cb2dc/Connection.java/clean/src/interfaces/jdbc/org/postgresql/Connection.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
24982,
12,
780,
1479,
16,
509,
1756,
16,
6183,
1123,
16,
514,
2063,
16,
514,
880,
16,
9396,
302,
13,
1216,
6483,
565,
288,
565,
368,
3743,
392,
1520,
309,
326,
729,
578,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
24982,
12,
780,
1479,
16,
509,
1756,
16,
6183,
1123,
16,
514,
2063,
16,
514,
880,
16,
9396,
302,
13,
1216,
6483,
565,
288,
565,
368,
3743,
392,
1520,
309,
326,
729,
578,
22... |
public void testxx0057() throws Exception { output.println("test putting a zero length string into a parameter"); | public void testxx0057() throws Exception { output.println("test putting a zero length string into a parameter"); | public void testxx0057() throws Exception { output.println("test putting a zero length string into a parameter"); // open the database int count = 0; Statement stmt = con.createStatement(); dropTable("#t0057"); count = stmt.executeUpdate("create table #t0057 " + " (a varchar(10) not null, " + " b char(10) not null) "); output.println("Creating table affected " + count + " rows"); PreparedStatement pStmt = con.prepareStatement( "insert into #t0057 values (?, ?)"); pStmt.setString(1, ""); pStmt.setString(2, ""); count = pStmt.executeUpdate(); output.println("Added " + count + " rows"); if (count != 1) { output.println("Failed to add rows"); fail(); } else { pStmt.close(); pStmt = con.prepareStatement("select a, b from #t0057"); ResultSet rs = pStmt.executeQuery(); if (!rs.next()) { output.println("Couldn't read rows from table."); fail(); } else { output.println("a is |" + rs.getString("a") + "|"); output.println("b is |" + rs.getString("b") + "|"); assertEquals("", rs.getString("a")); assertEquals(" ", rs.getString("b")); } } } | 5753 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5753/662fbbf0e5f04956f22a56e58dae82d6c816a2c6/CSUnitTest.java/buggy/src/test/net/sourceforge/jtds/test/CSUnitTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1842,
5279,
713,
10321,
1435,
1216,
1185,
225,
288,
565,
876,
18,
8222,
2932,
3813,
29379,
279,
3634,
769,
533,
1368,
279,
1569,
8863,
565,
368,
1696,
326,
2063,
565,
509,
540,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1842,
5279,
713,
10321,
1435,
1216,
1185,
225,
288,
565,
876,
18,
8222,
2932,
3813,
29379,
279,
3634,
769,
533,
1368,
279,
1569,
8863,
565,
368,
1696,
326,
2063,
565,
509,
540,... |
((ObjectStoreInterMineImpl) os).precompute(q, "temp"); | ((ObjectStoreInterMineImpl) os).precompute(q, PostProcessTask.PRECOMPUTE_CATEGORY); | public static Results findLocationsToTransform(ObjectStore os, Class firstClass, Class secondClass, Class thirdClass) throws ObjectStoreException { Query q = new Query(); q.setDistinct(false); QueryClass qcFirst = new QueryClass(firstClass); q.addFrom(qcFirst); q.addToSelect(qcFirst); QueryClass qcFirstLoc = new QueryClass(Location.class); q.addFrom(qcFirstLoc); q.addToSelect(qcFirstLoc); QueryClass qcSecond = new QueryClass(secondClass); q.addFrom(qcSecond); q.addToSelect(qcSecond); QueryClass qcSecondLoc = new QueryClass(Location.class); q.addFrom(qcSecondLoc); q.addToSelect(qcSecondLoc); QueryClass qcThird = new QueryClass(thirdClass); q.addFrom(qcThird); q.addToSelect(qcThird); ConstraintSet cs = new ConstraintSet(ConstraintOp.AND); QueryObjectReference ref1 = new QueryObjectReference(qcFirstLoc, "subject"); ContainsConstraint cc1 = new ContainsConstraint(ref1, ConstraintOp.CONTAINS, qcFirst); cs.addConstraint(cc1); QueryObjectReference ref2 = new QueryObjectReference(qcFirstLoc, "object"); ContainsConstraint cc2 = new ContainsConstraint(ref2, ConstraintOp.CONTAINS, qcSecond); cs.addConstraint(cc2); QueryObjectReference ref3 = new QueryObjectReference(qcSecondLoc, "subject"); ContainsConstraint cc3 = new ContainsConstraint(ref3, ConstraintOp.CONTAINS, qcSecond); cs.addConstraint(cc3); QueryObjectReference ref4 = new QueryObjectReference(qcSecondLoc, "object"); ContainsConstraint cc4 = new ContainsConstraint(ref4, ConstraintOp.CONTAINS, qcThird); cs.addConstraint(cc4); q.setConstraint(cs); ((ObjectStoreInterMineImpl) os).precompute(q, "temp"); Results res = new Results(q, os, os.getSequence()); return res; } | 7196 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7196/ea03b71d45d6db261c998a39f7eba7c0878879d6/PostProcessUtil.java/clean/flymine/model/genomic/src/java/org/flymine/postprocess/PostProcessUtil.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
10351,
1104,
10985,
774,
4059,
12,
921,
2257,
1140,
16,
1659,
1122,
797,
16,
4766,
10402,
1659,
2205,
797,
16,
1659,
12126,
797,
13,
3639,
1216,
1033,
21151,
288,
3639,
2770,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
10351,
1104,
10985,
774,
4059,
12,
921,
2257,
1140,
16,
1659,
1122,
797,
16,
4766,
10402,
1659,
2205,
797,
16,
1659,
12126,
797,
13,
3639,
1216,
1033,
21151,
288,
3639,
2770,
1... |
public void endPathExpr() throws JaxenException | public void endPathExpr() | public void endPathExpr() throws JaxenException { //System.err.println("endPathExpr()"); // PathExpr ::= LocationPath // | FilterExpr // | FilterExpr / RelativeLocationPath // | FilterExpr // RelativeLocationPath // // If the current stack-frame has two items, it's a // FilterExpr and a LocationPath (of some flavor). // // If the current stack-frame has one item, it's simply // a FilterExpr, and more than like boils down to a // primary expr of some flavor. But that's for another // method... LinkedList frame = popFrame(); System.out.println( "endPathExpr(): " + frame ); push( frame.removeFirst() );/* LocationPathPattern locationPath = new LocationPathPattern(); push( locationPath ); while (! frame.isEmpty() ) { Object filter = frame.removeLast(); if ( filter instanceof NodeTest ) { locationPath.setNodeTest( (NodeTest) filter ); } else if ( filter instanceof FilterExpr ) { locationPath.addFilter( (FilterExpr) filter ); } else if ( filter instanceof LocationPathPattern ) { LocationPathPattern parent = (LocationPathPattern) filter; locationPath.setParentPattern( parent ); locationPath = parent; } else if ( filter != null ) { throw new JaxenException( "Unknown filter: " + filter ); } }*/ } | 47110 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47110/7a1c48a62e266212433f603c5796e93f5b5b076c/PatternHandler.java/clean/jaxen/src/java/main/org/jaxen/pattern/PatternHandler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
679,
743,
4742,
1435,
565,
288,
3639,
368,
3163,
18,
370,
18,
8222,
2932,
409,
743,
4742,
1435,
8863,
3639,
368,
2666,
4742,
493,
33,
282,
7050,
743,
3639,
368,
2868,
571,
40... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
679,
743,
4742,
1435,
565,
288,
3639,
368,
3163,
18,
370,
18,
8222,
2932,
409,
743,
4742,
1435,
8863,
3639,
368,
2666,
4742,
493,
33,
282,
7050,
743,
3639,
368,
2868,
571,
40... |
} else { matchRule &= ~R_CAMELCASE_MATCH; if ((matchRule & R_PREFIX_MATCH) == 0) { matchRule |= R_PREFIX_MATCH; matchRule |= R_CASE_SENSITIVE; } | public static int validateMatchRule(String stringPattern, int matchRule) { // Verify Regexp match rule if ((matchRule & R_REGEXP_MATCH) != 0) { if ((matchRule & R_PATTERN_MATCH) != 0 || (matchRule & R_PREFIX_MATCH) != 0 || (matchRule & R_CAMELCASE_MATCH) != 0) { return -1; } } // Verify Pattern match rule int starIndex = stringPattern.indexOf('*'); int questionIndex = stringPattern.indexOf('?'); if (starIndex < 0 && questionIndex < 0) { // reset pattern match bit if any matchRule &= ~R_PATTERN_MATCH; } else { // force Pattern rule matchRule |= R_PATTERN_MATCH; } if ((matchRule & R_PATTERN_MATCH) != 0) { // remove Camel Case and Prefix match bits if any matchRule &= ~R_CAMELCASE_MATCH; matchRule &= ~R_PREFIX_MATCH; } // Verify Camel Case match rule if ((matchRule & R_CAMELCASE_MATCH) != 0) { // Verify sting pattern validity int length = stringPattern.length(); boolean validCamelCase = true; boolean uppercase = false; for (int i=0; i<length && validCamelCase; i++) { char ch = stringPattern.charAt(i); validCamelCase = isValidCamelCaseChar(ch); // at least one uppercase character is need in CamelCase pattern // (see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=136313) if (!uppercase) uppercase = Character.isUpperCase(ch); } validCamelCase = validCamelCase && uppercase; // Verify bits compatibility if (validCamelCase) { if ((matchRule & R_PREFIX_MATCH) != 0) { if ((matchRule & R_CASE_SENSITIVE) != 0) { // This is equivalent to Camel Case match rule matchRule &= ~R_PREFIX_MATCH; matchRule &= ~R_CASE_SENSITIVE; } } } else { matchRule &= ~R_CAMELCASE_MATCH; if ((matchRule & R_PREFIX_MATCH) == 0) { matchRule |= R_PREFIX_MATCH; matchRule |= R_CASE_SENSITIVE; } } } return matchRule;} | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/ea0718e0ea8d8a7b8c1c9d464be2b2219d8be426/SearchPattern.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/SearchPattern.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
760,
509,
1954,
2060,
2175,
12,
780,
533,
3234,
16,
509,
845,
2175,
13,
288,
202,
759,
8553,
17011,
845,
1720,
202,
430,
14015,
1916,
2175,
473,
534,
67,
28225,
67,
11793,
13,
480,
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,
1071,
760,
509,
1954,
2060,
2175,
12,
780,
533,
3234,
16,
509,
845,
2175,
13,
288,
202,
759,
8553,
17011,
845,
1720,
202,
430,
14015,
1916,
2175,
473,
534,
67,
28225,
67,
11793,
13,
480,
374... | |
iter.remove(); | contents.removeSymbol(); | public void undoIt(){ List constructors = _context.getConstructors(); Iterator iter = constructors.listIterator(); int size = constructors.size(); IParameterizedSymbol item = null; for( int i = 0; i < size; i++ ){ item = (IParameterizedSymbol)iter.next(); if( item == _constructor ){ iter.remove(); break; } } iter = _context.getContentsIterator(); while( iter.hasNext() ){ IExtensibleSymbol ext = (IExtensibleSymbol) iter.next(); if( ext == _constructor ){ iter.remove(); break; } } } | 54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/0f74ca46c3fce55bd2654c6d498571ede4a71262/DerivableContainerSymbol.java/clean/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/pst/DerivableContainerSymbol.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
918,
15436,
7193,
1435,
95,
1082,
202,
682,
19874,
273,
389,
2472,
18,
588,
29590,
5621,
1082,
202,
3198,
1400,
273,
19874,
18,
1098,
3198,
5621,
25083,
202,
474,
963,
273,
198... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
918,
15436,
7193,
1435,
95,
1082,
202,
682,
19874,
273,
389,
2472,
18,
588,
29590,
5621,
1082,
202,
3198,
1400,
273,
19874,
18,
1098,
3198,
5621,
25083,
202,
474,
963,
273,
198... |
return specCritMod+glancing; | return specCritMod; | public int getSpecCritMod() { return specCritMod+glancing; } | 4135 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4135/b010156841a7fcfed92b7ab1895b9e2cdf76f3f2/HitData.java/clean/megamek/src/megamek/common/HitData.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
20189,
39,
583,
1739,
1435,
288,
3639,
327,
857,
39,
583,
1739,
31,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
20189,
39,
583,
1739,
1435,
288,
3639,
327,
857,
39,
583,
1739,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
IWorkbenchPage page = getSite().getPage(); page.removePartListener(partListener); page.removePropertyChangeListener(propertyChangeListener); | getSite().getPage().removePartListener(partListener); | public void dispose() { IWorkbenchPage page = getSite().getPage(); page.removePartListener(partListener); page.removePropertyChangeListener(propertyChangeListener); IWorkingSetManager workingSetManager = getPlugin().getWorkbench().getWorkingSetManager(); workingSetManager.removePropertyChangeListener(propertyChangeListener); if (actionGroup != null) { actionGroup.dispose(); } super.dispose(); } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/7568c5be42cde6e5059b5558f04f51587e1941c7/ResourceNavigator.java/buggy/bundles/org.eclipse.ui/Eclipse UI Standard Components/org/eclipse/ui/views/navigator/ResourceNavigator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
15825,
1435,
288,
202,
202,
45,
2421,
22144,
1964,
1363,
273,
11021,
7675,
588,
1964,
5621,
9506,
202,
2433,
18,
4479,
1988,
2223,
12,
2680,
2223,
1769,
202,
202,
2433,
18,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
15825,
1435,
288,
202,
202,
45,
2421,
22144,
1964,
1363,
273,
11021,
7675,
588,
1964,
5621,
9506,
202,
2433,
18,
4479,
1988,
2223,
12,
2680,
2223,
1769,
202,
202,
2433,
18,... |
recoverFromMismatchedSet(input,mse,FOLLOW_set_in_fact_expression_in_paren1850); throw mse; | recoverFromMismatchedSet(input,mse,FOLLOW_set_in_fact_expression_in_paren1832); throw mse; | public BaseDescr fact_expression_in_paren(String id) throws RecognitionException { BaseDescr pd = null; BaseDescr fe = null; BaseDescr f = null; pd = null; boolean multi = false; try { // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:919:5: ( ( '(' fact_expression_in_paren[id] ')' )=> '(' fe= fact_expression_in_paren[id] ')' | f= fact ( ( ('or'|'||') fact )=> ('or'|'||')f= fact )* ) int alt30=2; int LA30_0 = input.LA(1); if ( (LA30_0==LEFT_PAREN) ) { alt30=1; } else if ( (LA30_0==ID) ) { alt30=2; } else { if (backtracking>0) {failed=true; return pd;} NoViableAltException nvae = new NoViableAltException("914:2: fact_expression_in_paren[String id] returns [BaseDescr pd] : ( ( '(' fact_expression_in_paren[id] ')' )=> '(' fe= fact_expression_in_paren[id] ')' | f= fact ( ( ('or'|'||') fact )=> ('or'|'||')f= fact )* );", 30, 0, input); throw nvae; } switch (alt30) { case 1 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:919:5: ( '(' fact_expression_in_paren[id] ')' )=> '(' fe= fact_expression_in_paren[id] ')' { match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_fact_expression_in_paren1820); if (failed) return pd; pushFollow(FOLLOW_fact_expression_in_paren_in_fact_expression_in_paren1824); fe=fact_expression_in_paren(id); _fsp--; if (failed) return pd; match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_fact_expression_in_paren1826); if (failed) return pd; if ( backtracking==0 ) { pd=fe; } } break; case 2 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:920:6: f= fact ( ( ('or'|'||') fact )=> ('or'|'||')f= fact )* { pushFollow(FOLLOW_fact_in_fact_expression_in_paren1837); f=fact(); _fsp--; if (failed) return pd; if ( backtracking==0 ) { ((ColumnDescr)f).setIdentifier( id ); pd = f; } // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:925:4: ( ( ('or'|'||') fact )=> ('or'|'||')f= fact )* loop29: do { int alt29=2; int LA29_0 = input.LA(1); if ( ((LA29_0>=53 && LA29_0<=54)) ) { alt29=1; } switch (alt29) { case 1 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:925:6: ( ('or'|'||') fact )=> ('or'|'||')f= fact { if ( (input.LA(1)>=53 && input.LA(1)<=54) ) { input.consume(); errorRecovery=false;failed=false; } else { if (backtracking>0) {failed=true; return pd;} MismatchedSetException mse = new MismatchedSetException(null,input); recoverFromMismatchedSet(input,mse,FOLLOW_set_in_fact_expression_in_paren1850); throw mse; } if ( backtracking==0 ) { if ( ! multi ) { BaseDescr first = pd; pd = new OrDescr(); ((OrDescr)pd).addDescr( first ); multi=true; } } pushFollow(FOLLOW_fact_in_fact_expression_in_paren1867); f=fact(); _fsp--; if (failed) return pd; if ( backtracking==0 ) { ((ColumnDescr)f).setIdentifier( id ); ((OrDescr)pd).addDescr( f ); } } break; default : break loop29; } } while (true); } break; } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { } return pd; } | 6736 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6736/0aa286f40333d2c596071d72d310904501c4f8b2/DRLParser.java/clean/drools-compiler/src/main/java/org/drools/lang/DRLParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3360,
16198,
5410,
67,
8692,
67,
267,
67,
13012,
12,
780,
612,
13,
1216,
9539,
288,
6647,
3360,
16198,
4863,
273,
446,
31,
3639,
3360,
16198,
1656,
273,
446,
31,
3639,
3360,
16198,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3360,
16198,
5410,
67,
8692,
67,
267,
67,
13012,
12,
780,
612,
13,
1216,
9539,
288,
6647,
3360,
16198,
4863,
273,
446,
31,
3639,
3360,
16198,
1656,
273,
446,
31,
3639,
3360,
16198,
... |
crack44((org.quickfix.fix44.Message)message, sessionID); | crack44((quickfix.fix44.Message)message, sessionID); | public void crack( org.quickfix.Message message, SessionID sessionID ) throws UnsupportedMessageType, FieldNotFound, IncorrectTagValue { BeginString beginString = new BeginString(); message.getHeader().getField(beginString); String value = beginString.getValue(); if(value.equals("FIX.4.0")) crack40((org.quickfix.fix40.Message)message, sessionID); else if(value.equals("FIX.4.1")) crack41((org.quickfix.fix41.Message)message, sessionID); else if(value.equals("FIX.4.2")) crack42((org.quickfix.fix42.Message)message, sessionID); else if(value.equals("FIX.4.3")) crack43((org.quickfix.fix43.Message)message, sessionID); else if(value.equals("FIX.4.4")) crack44((org.quickfix.fix44.Message)message, sessionID); else onMessage(message, sessionID); } | 5926 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5926/685f43bca015f003857cf8f3236f49f80c1abd1c/MessageCracker.java/clean/src/java/src/quickfix/MessageCracker.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
276,
21580,
12,
2358,
18,
19525,
904,
18,
1079,
883,
16,
3877,
734,
13737,
262,
565,
1216,
7221,
24563,
16,
2286,
2768,
16,
657,
6746,
1805,
620,
288,
3639,
14323,
780,
2376,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
276,
21580,
12,
2358,
18,
19525,
904,
18,
1079,
883,
16,
3877,
734,
13737,
262,
565,
1216,
7221,
24563,
16,
2286,
2768,
16,
657,
6746,
1805,
620,
288,
3639,
14323,
780,
2376,
... |
sb.append( "post" ); | sb.append("post"); | private final String directiveString() { StringBuffer sb = new StringBuffer(); boolean comma = false; boolean useControlFile = (controlFile != null) && controlFile.exists(); if( useControlFile || pre || post || invariant ) { sb.append( "-m" ); } if( useControlFile ) { sb.append( "@" ).append( controlFile ); comma = true; } if( pre ) { if( comma ) { sb.append( "," ); } sb.append( "pre" ); comma = true; } if( post ) { if( comma ) { sb.append( "," ); } sb.append( "post" ); comma = true; } if( invariant ) { if( comma ) { sb.append( "," ); } sb.append( "inv" ); } sb.append( " " ); return sb.toString(); } | 506 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/506/c6c232893c39257745a8f7a618bcdb5c59791cae/IContract.java/buggy/src/main/org/apache/tools/ant/taskdefs/optional/IContract.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
727,
514,
8655,
780,
1435,
288,
3639,
6674,
2393,
273,
394,
6674,
5621,
3639,
1250,
8716,
273,
629,
31,
3639,
1250,
999,
3367,
812,
273,
261,
7098,
812,
480,
446,
13,
597,
3325,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
727,
514,
8655,
780,
1435,
288,
3639,
6674,
2393,
273,
394,
6674,
5621,
3639,
1250,
8716,
273,
629,
31,
3639,
1250,
999,
3367,
812,
273,
261,
7098,
812,
480,
446,
13,
597,
3325,
8... |
backoffCell.addChild("#", " " + String.valueOf(backoff / 1000) + "/" + String.valueOf(peerNode.getRoutingBackoffLength() / 1000)); backoffCell.addChild("#", (peerNode.getLastBackoffReason() == null) ? "" : ("/" + (peerNode.getLastBackoffReason()))); | backoffCell.addChild("#", " " + String.valueOf(backoff / 1000) + "/" + String.valueOf(peerNodeStatus.getRoutingBackoffLength() / 1000)); backoffCell.addChild("#", (peerNodeStatus.getLastBackoffReason() == null) ? "" : ("/" + (peerNodeStatus.getLastBackoffReason()))); | public void handleGet(URI uri, ToadletContext ctx) throws ToadletContextClosedException, IOException, RedirectException { String path = uri.getPath(); if(path.endsWith("myref.txt")) { SimpleFieldSet fs = node.exportPublicFieldSet(); StringWriter sw = new StringWriter(); fs.writeTo(sw); this.writeReply(ctx, 200, "text/plain", "OK", sw.toString()); return; } final boolean advancedEnabled = node.getToadletContainer().isAdvancedDarknetEnabled(); /* gather connection statistics */ PeerNode[] peerNodes = node.getDarknetConnections(); Arrays.sort(peerNodes, new Comparator() { public int compare(Object first, Object second) { PeerNode firstNode = (PeerNode) first; PeerNode secondNode = (PeerNode) second; int statusDifference = firstNode.getPeerNodeStatus() - secondNode.getPeerNodeStatus(); if (statusDifference != 0) { return statusDifference; } return firstNode.getName().compareTo(secondNode.getName()); } }); /* copy peer node statuses for consistent display. */ int[] peerNodeStatuses = new int[peerNodes.length]; for (int peerIndex = 0, peerCount = peerNodes.length; peerIndex < peerCount; peerIndex++) { peerNodeStatuses[peerIndex] = peerNodes[peerIndex].getPeerNodeStatus(); } int numberOfConnected = getPeerStatusCount(peerNodeStatuses, Node.PEER_NODE_STATUS_CONNECTED); int numberOfRoutingBackedOff = getPeerStatusCount(peerNodeStatuses, Node.PEER_NODE_STATUS_ROUTING_BACKED_OFF); int numberOfTooNew = getPeerStatusCount(peerNodeStatuses, Node.PEER_NODE_STATUS_TOO_NEW); int numberOfTooOld = getPeerStatusCount(peerNodeStatuses, Node.PEER_NODE_STATUS_TOO_OLD); int numberOfDisconnected = getPeerStatusCount(peerNodeStatuses, Node.PEER_NODE_STATUS_DISCONNECTED); int numberOfNeverConnected = getPeerStatusCount(peerNodeStatuses, Node.PEER_NODE_STATUS_NEVER_CONNECTED); int numberOfDisabled = getPeerStatusCount(peerNodeStatuses, Node.PEER_NODE_STATUS_DISABLED); int numberOfBursting = getPeerStatusCount(peerNodeStatuses, Node.PEER_NODE_STATUS_BURSTING); int numberOfListening = getPeerStatusCount(peerNodeStatuses, Node.PEER_NODE_STATUS_LISTENING); int numberOfListenOnly = getPeerStatusCount(peerNodeStatuses, Node.PEER_NODE_STATUS_LISTEN_ONLY); int numberOfSimpleConnected = numberOfConnected + numberOfRoutingBackedOff; int numberOfNotConnected = numberOfTooNew + numberOfTooOld + numberOfDisconnected + numberOfNeverConnected + numberOfDisabled + numberOfBursting + numberOfListening + numberOfListenOnly; String titleCountString = null; if(advancedEnabled) { titleCountString = "(" + numberOfConnected + "/" + numberOfRoutingBackedOff + "/" + numberOfTooNew + "/" + numberOfTooOld + "/" + numberOfNotConnected + ")"; } else { titleCountString = String.valueOf(numberOfSimpleConnected); } HTMLNode pageNode = ctx.getPageMaker().getPageNode(titleCountString + " Darknet Peers of " + node.getMyName()); HTMLNode contentNode = ctx.getPageMaker().getContentNode(pageNode); // FIXME! We need some nice images long now = System.currentTimeMillis(); contentNode.addChild(node.alerts.createSummary()); /* node status values */ int bwlimitDelayTime = (int) node.getBwlimitDelayTime(); int nodeAveragePingTime = (int) node.getNodeAveragePingTime(); int networkSizeEstimate = node.getNetworkSizeEstimate(0); DecimalFormat fix4 = new DecimalFormat("0.0000"); double missRoutingDistance = node.missRoutingDistance.currentValue(); DecimalFormat fix1 = new DecimalFormat("##0.0%"); double backedoffPercent = node.backedoffPercent.currentValue(); String nodeUptimeString = timeIntervalToString(( now - node.startupTime ) / 1000); // BEGIN OVERVIEW TABLE HTMLNode overviewTable = contentNode.addChild("table", "class", "column"); HTMLNode overviewTableRow = overviewTable.addChild("tr"); HTMLNode nextTableCell = overviewTableRow.addChild("td", "class", "first"); /* node status overview box */ if(advancedEnabled) { HTMLNode overviewInfobox = nextTableCell.addChild("div", "class", "infobox"); overviewInfobox.addChild("div", "class", "infobox-header", "Node status overview"); HTMLNode overviewInfoboxContent = overviewInfobox.addChild("div", "class", "infobox-content"); HTMLNode overviewList = overviewInfoboxContent.addChild("ul"); overviewList.addChild("li", "bwlimitDelayTime:\u00a0" + bwlimitDelayTime + "ms"); overviewList.addChild("li", "nodeAveragePingTime:\u00a0" + nodeAveragePingTime + "ms"); overviewList.addChild("li", "networkSizeEstimate:\u00a0" + networkSizeEstimate + "\u00a0nodes"); overviewList.addChild("li", "nodeUptime:\u00a0" + nodeUptimeString); overviewList.addChild("li", "missRoutingDistance:\u00a0" + fix4.format(missRoutingDistance)); overviewList.addChild("li", "backedoffPercent:\u00a0" + fix1.format(backedoffPercent)); nextTableCell = overviewTableRow.addChild("td"); } // Activity box int numInserts = node.getNumInserts(); int numRequests = node.getNumRequests(); int numTransferringRequests = node.getNumTransferringRequests(); int numARKFetchers = node.getNumARKFetchers(); HTMLNode activityInfobox = nextTableCell.addChild("div", "class", "infobox"); activityInfobox.addChild("div", "class", "infobox-header", "Current activity"); HTMLNode activityInfoboxContent = activityInfobox.addChild("div", "class", "infobox-content"); if ((numInserts == 0) && (numRequests == 0) && (numTransferringRequests == 0) && (numARKFetchers == 0)) { activityInfoboxContent.addChild("#", "Your node is not processing any requests right now."); } else { HTMLNode activityList = activityInfoboxContent.addChild("ul", "id", "activity"); if (numInserts > 0) { activityList.addChild("li", "Inserts:\u00a0" + numInserts); } if (numRequests > 0) { activityList.addChild("li", "Requests:\u00a0" + numRequests); } if (numTransferringRequests > 0) { activityList.addChild("li", "Transferring\u00a0Requests:\u00a0" + numTransferringRequests); } if (advancedEnabled) { if (numARKFetchers > 0) { activityList.addChild("li", "ARK\u00a0Fetch\u00a0Requests:\u00a0" + numARKFetchers); } } } nextTableCell = advancedEnabled ? overviewTableRow.addChild("td") : overviewTableRow.addChild("td", "class", "last"); // Peer statistics box HTMLNode peerStatsInfobox = nextTableCell.addChild("div", "class", "infobox"); peerStatsInfobox.addChild("div", "class", "infobox-header", "Peer statistics"); HTMLNode peerStatsContent = peerStatsInfobox.addChild("div", "class", "infobox-content"); HTMLNode peerStatsList = peerStatsContent.addChild("ul"); if (numberOfConnected > 0) { peerStatsList.addChild("li").addChild("span", "class", "peer_connected", "Connected:\u00a0" + numberOfConnected); } if (numberOfRoutingBackedOff > 0) { peerStatsList.addChild("li").addChild("span", "class", "peer_backedoff", (advancedEnabled ? "Backed off" : "Busy") + ":\u00a0" + numberOfRoutingBackedOff); } if (numberOfTooNew > 0) { peerStatsList.addChild("li").addChild("span", "class", "peer_too_new", "Too new:\u00a0" + numberOfTooNew); } if (numberOfTooOld > 0) { peerStatsList.addChild("li").addChild("span", "class", "peer_too_old", "Too old:\u00a0" + numberOfTooOld); } if (numberOfDisconnected > 0) { peerStatsList.addChild("li").addChild("span", "class", "peer_disconnected", "Disconnected:\u00a0" + numberOfDisconnected); } if (numberOfNeverConnected > 0) { peerStatsList.addChild("li").addChild("span", "class", "peer_never_connected", "Never Connected:\u00a0" + numberOfNeverConnected); } if (numberOfDisabled > 0) { peerStatsList.addChild("li").addChild("span", "class", "peer_never_connected", "Disabled:\u00a0" + numberOfDisabled); /* TODO */ } if (numberOfBursting > 0) { peerStatsList.addChild("li").addChild("span", "class", "peer_never_connected", "Bursting:\u00a0" + numberOfBursting); /* TODO */ } if (numberOfListening > 0) { peerStatsList.addChild("li").addChild("span", "class", "peer_never_connected", "Listening:\u00a0" + numberOfListening); /* TODO */ } if (numberOfListenOnly > 0) { peerStatsList.addChild("li").addChild("span", "class", "peer_never_connected", "Listen Only:\u00a0" + numberOfListenOnly); /* TODO */ } // Peer routing backoff reason box if(advancedEnabled) { nextTableCell = overviewTableRow.addChild("td", "class", "last"); HTMLNode backoffReasonInfobox = nextTableCell.addChild("div", "class", "infobox"); backoffReasonInfobox.addChild("div", "class", "infobox-header", "Peer backoff reasons"); HTMLNode backoffReasonContent = backoffReasonInfobox.addChild("div", "class", "infobox-content"); String [] routingBackoffReasons = node.getPeerNodeRoutingBackoffReasons(); if(routingBackoffReasons.length == 0) { backoffReasonContent.addChild("#", "Good, your node is not backed off from any peers!"); } else { HTMLNode reasonList = backoffReasonContent.addChild("ul"); for(int i=0;i<routingBackoffReasons.length;i++) { int reasonCount = node.getPeerNodeRoutingBackoffReasonSize(routingBackoffReasons[i]); if(reasonCount > 0) { reasonList.addChild("li", routingBackoffReasons[i] + '\u00a0' + reasonCount); } } } } // END OVERVIEW TABLE // BEGIN PEER TABLE HTMLNode peerTableInfobox = contentNode.addChild("div", "class", "infobox infobox-normal"); HTMLNode peerTableInfoboxHeader = peerTableInfobox.addChild("div", "class", "infobox-header"); peerTableInfoboxHeader.addChild("#", "My peers"); if (advancedEnabled) { if (!path.endsWith("displaymessagetypes.html")) { peerTableInfoboxHeader.addChild("#", " "); peerTableInfoboxHeader.addChild("a", "href", "displaymessagetypes.html", "(more detailed)"); } } HTMLNode peerTableInfoboxContent = peerTableInfobox.addChild("div", "class", "infobox-content"); if (peerNodes.length == 0) { peerTableInfoboxContent.addChild("#", "Freenet can not work as you have not added any peers so far. Please go to the "); peerTableInfoboxContent.addChild("a", "href", "/", "node homepage"); peerTableInfoboxContent.addChild("#", " and read the top infobox to see how it is done."); } else { HTMLNode peerForm = peerTableInfoboxContent.addChild("form", new String[] { "action", "method", "enctype" }, new String[] { ".", "post", "multipart/form-data" }); peerForm.addChild("input", new String[] { "type", "name", "value" }, new String[] { "hidden", "formPassword", node.formPassword }); HTMLNode peerTable = peerForm.addChild("table", "class", "darknet_connections"); HTMLNode peerTableHeaderRow = peerTable.addChild("tr"); peerTableHeaderRow.addChild("th"); peerTableHeaderRow.addChild("th", "Status"); peerTableHeaderRow.addChild("th").addChild("span", new String[] { "title", "style" }, new String[] { "Click on the nodename link to send N2NTM", "border-bottom: 1px dotted; cursor: help;" }, "Name"); if (advancedEnabled) { peerTableHeaderRow.addChild("th").addChild("span", new String[] { "title", "style" }, new String[] { "Address:Port", "border-bottom: 1px dotted; cursor: help;" }, "Address"); } peerTableHeaderRow.addChild("th", "Version"); if (advancedEnabled) { peerTableHeaderRow.addChild("th", "Location"); peerTableHeaderRow.addChild("th").addChild("span", new String[] { "title", "style" }, new String[] { "Temporarily disconnected. Other node busy? Wait time(s) remaining/total", "border-bottom: 1px dotted; cursor: help;" }, "Backoff"); } peerTableHeaderRow.addChild("th").addChild("span", new String[] { "title", "style" }, new String[] { "How long since the node connected or was last seen", "border-bottom: 1px dotted; cursor: help;" }, "Connected\u00a0/\u00a0Idle"); for (int peerIndex = 0, peerCount = peerNodes.length; peerIndex < peerCount; peerIndex++) { PeerNode peerNode = peerNodes[peerIndex]; HTMLNode peerRow = peerTable.addChild("tr"); // check box column peerRow.addChild("td", "class", "peer-marker").addChild("input", new String[] { "type", "name" }, new String[] { "checkbox", "node_" + peerNode.hashCode() }); // status column String statusString = peerNode.getPeerNodeStatusString(); if (!advancedEnabled && (peerNode.getPeerNodeStatus() == Node.PEER_NODE_STATUS_ROUTING_BACKED_OFF)) { statusString = "BUSY"; } peerRow.addChild("td", "class", "peer-status").addChild("span", "class", peerNode.getPeerNodeStatusCSSClassName(), statusString + (peerNode.isFetchingARK() ? "*" : "")); // name column if (peerNode.isConnected() && (Integer.parseInt(peerNode.getSimpleVersion()) > 476)) { peerRow.addChild("td", "class", "peer-name").addChild("a", "href", "/send_n2ntm/?peernode_hashcode=" + peerNode.hashCode(), peerNode.getName()); } else { peerRow.addChild("td", "class", "peer-name").addChild("#", peerNode.getName()); } // address column if (advancedEnabled) { String pingTime = ""; if (peerNode.isConnected()) { pingTime = " (" + String.valueOf((int) peerNode.averagePingTime()) + "ms)"; } peerRow.addChild("td", "class", "peer-address").addChild("#", ((peerNode.getDetectedPeer() != null) ? (peerNode.getDetectedPeer().toString()) : ("(unknown address)")) + pingTime); } // version column if (peerNode.publicReverseInvalidVersion()) { peerRow.addChild("td", "class", "peer-version").addChild("span", "class", "peer_too_new", advancedEnabled ? peerNode.getVersion() : peerNode.getSimpleVersion()); } else { peerRow.addChild("td", "class", "peer-version").addChild("#", advancedEnabled ? peerNode.getVersion() : peerNode.getSimpleVersion()); } // location column if (advancedEnabled) { peerRow.addChild("td", "class", "peer-location", String.valueOf(peerNode.getLocation().getValue())); } // backoff column if (advancedEnabled) { HTMLNode backoffCell = peerRow.addChild("td", "class", "peer-backoff"); backoffCell.addChild("#", fix1.format(peerNode.backedOffPercent.currentValue())); int backoff = (int) (Math.max(peerNode.getRoutingBackedOffUntil() - now, 0)); // Don't list the backoff as zero before it's actually zero if ((backoff > 0) && (backoff < 1000)) { backoff = 1000; } backoffCell.addChild("#", " " + String.valueOf(backoff / 1000) + "/" + String.valueOf(peerNode.getRoutingBackoffLength() / 1000)); backoffCell.addChild("#", (peerNode.getLastBackoffReason() == null) ? "" : ("/" + (peerNode.getLastBackoffReason()))); } // idle column long idle = peerNode.timeLastRoutable(); if(peerNode.isRoutable()) { idle = peerNode.timeLastConnectionCompleted(); } else if(peerNodeStatuses[peerIndex] == Node.PEER_NODE_STATUS_NEVER_CONNECTED) { idle = peerNode.getPeerAddedTime(); } peerRow.addChild("td", "class", "peer-idle", idleToString(now, idle)); if (path.endsWith("displaymessagetypes.html")) { HTMLNode messageCountRow = peerTable.addChild("tr", "class", "message-status"); messageCountRow.addChild("td", "colspan", "2"); HTMLNode messageCountCell = messageCountRow.addChild("td", "colspan", String.valueOf(advancedEnabled ? 6 : 3)); HTMLNode messageCountTable = messageCountCell.addChild("table", "class", "message-count"); HTMLNode countHeaderRow = messageCountTable.addChild("tr"); countHeaderRow.addChild("th", "Message"); countHeaderRow.addChild("th", "Incoming"); countHeaderRow.addChild("th", "Outgoing"); List messageNames = new ArrayList(); Map messageCounts = new HashMap(); for (Iterator incomingMessages = peerNode.getLocalNodeReceivedMessagesFromStatistic().keySet().iterator(); incomingMessages.hasNext(); ) { String messageName = (String) incomingMessages.next(); messageNames.add(messageName); Long messageCount = (Long) peerNode.getLocalNodeReceivedMessagesFromStatistic().get(messageName); messageCounts.put(messageName, new Long[] { messageCount, new Long(0) }); } for (Iterator outgoingMessages = peerNode.getLocalNodeSentMessagesToStatistic().keySet().iterator(); outgoingMessages.hasNext(); ) { String messageName = (String) outgoingMessages.next(); if (!messageNames.contains(messageName)) { messageNames.add(messageName); } Long messageCount = (Long) peerNode.getLocalNodeSentMessagesToStatistic().get(messageName); Long[] existingCounts = (Long[]) messageCounts.get(messageName); if (existingCounts == null) { messageCounts.put(messageName, new Long[] { new Long(0), messageCount }); } else { existingCounts[1] = messageCount; } } Collections.sort(messageNames, new Comparator() { public int compare(Object first, Object second) { return ((String) first).compareToIgnoreCase((String) second); } }); for (Iterator messageNamesIterator = messageNames.iterator(); messageNamesIterator.hasNext(); ) { String messageName = (String) messageNamesIterator.next(); Long[] messageCount = (Long[]) messageCounts.get(messageName); HTMLNode messageRow = messageCountTable.addChild("tr"); messageRow.addChild("td", messageName); messageRow.addChild("td", "class", "right-align", String.valueOf(messageCount[0])); messageRow.addChild("td", "class", "right-align", String.valueOf(messageCount[1])); } } } if(!advancedEnabled) { peerForm.addChild("input", new String[] { "type", "name", "value" }, new String[] { "submit", "remove", "Remove selected peers" }); } else { HTMLNode actionSelect = peerForm.addChild("select", "name", "action"); actionSelect.addChild("option", "value", "", "-- Select action --"); actionSelect.addChild("option", "value", "enable", "Enable selected peers"); actionSelect.addChild("option", "value", "disable", "Disable selected peers"); actionSelect.addChild("option", "value", "set_burst_only", "On selected peers, set BurstOnly"); actionSelect.addChild("option", "value", "clear_burst_only", "On selected peers, clear BurstOnly"); actionSelect.addChild("option", "value", "set_listen_only", "On selected peers, set ListenOnly"); actionSelect.addChild("option", "value", "clear_listen_only", "On selected peers, clear ListenOnly"); actionSelect.addChild("option", "value", "", "-- -- --"); actionSelect.addChild("option", "value", "remove", "Remove selected peers"); peerForm.addChild("input", new String[] { "type", "name", "value" }, new String[] { "submit", "submit", "Go" }); } } // END PEER TABLE // BEGIN PEER ADDITION BOX HTMLNode peerAdditionInfobox = contentNode.addChild("div", "class", "infobox infobox-normal"); peerAdditionInfobox.addChild("div", "class", "infobox-header", "Add another peer"); HTMLNode peerAdditionContent = peerAdditionInfobox.addChild("div", "class", "infobox-content"); HTMLNode peerAdditionForm = peerAdditionContent.addChild("form", new String[] { "action", "method", "enctype" }, new String[] { ".", "post", "multipart/form-data" }); peerAdditionForm.addChild("input", new String[] { "type", "name", "value" }, new String[] { "hidden", "formPassword", node.formPassword }); peerAdditionForm.addChild("#", "Paste the reference here:"); peerAdditionForm.addChild("br"); peerAdditionForm.addChild("textarea", new String[] { "id", "name", "rows", "cols" }, new String[] { "reftext", "ref", "8", "74" }); peerAdditionForm.addChild("br"); peerAdditionForm.addChild("#", "Enter the URL of the reference here: "); peerAdditionForm.addChild("input", new String[] { "id", "type", "name" }, new String[] { "refurl", "text", "url" }); peerAdditionForm.addChild("br"); peerAdditionForm.addChild("#", "Choose the file containing the reference here: "); peerAdditionForm.addChild("input", new String[] { "id", "type", "name" }, new String[] { "reffile", "file", "reffile" }); peerAdditionForm.addChild("br"); peerAdditionForm.addChild("input", new String[] { "type", "name", "value" }, new String[] { "submit", "add", "Add" }); // our reference HTMLNode referenceInfobox = contentNode.addChild("div", "class", "infobox infobox-normal"); referenceInfobox.addChild("div", "class", "infobox-header").addChild("a", "href", "myref.txt", "My reference"); referenceInfobox.addChild("div", "class", "infobox-content").addChild("pre", "id", "reference", node.exportPublicFieldSet().toString()); StringBuffer pageBuffer = new StringBuffer(); pageNode.generate(pageBuffer); this.writeReply(ctx, 200, "text/html", "OK", pageBuffer.toString()); } | 48807 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48807/8894de616e17a43e740747a9eb17956bab9b3b3d/DarknetConnectionsToadlet.java/buggy/src/freenet/clients/http/DarknetConnectionsToadlet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1640,
967,
12,
3098,
2003,
16,
2974,
361,
1810,
1042,
1103,
13,
1216,
2974,
361,
1810,
1042,
7395,
503,
16,
1860,
16,
9942,
503,
288,
9506,
202,
780,
589,
273,
2003,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1640,
967,
12,
3098,
2003,
16,
2974,
361,
1810,
1042,
1103,
13,
1216,
2974,
361,
1810,
1042,
7395,
503,
16,
1860,
16,
9942,
503,
288,
9506,
202,
780,
589,
273,
2003,
18,
... |
public void removePropertyChangeListener(PropertyChangeListener listener) { listeners = ListenerArray.remove(listeners, listener); | public void removePropertyChangeListener(PropertyChangeListener listener) { instanceListeners = Kit.removeListener(instanceListeners, listener); | public void removePropertyChangeListener(PropertyChangeListener listener) { listeners = ListenerArray.remove(listeners, listener); } | 47345 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47345/a9460118c00164250fcfb45ff9c9358f8c28f86e/Context.java/clean/src/org/mozilla/javascript/Context.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1206,
1396,
15744,
12,
1396,
15744,
2991,
13,
288,
3639,
4679,
273,
10652,
1076,
18,
4479,
12,
16072,
16,
2991,
1769,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1206,
1396,
15744,
12,
1396,
15744,
2991,
13,
288,
3639,
4679,
273,
10652,
1076,
18,
4479,
12,
16072,
16,
2991,
1769,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
public List constraints() throws RecognitionException { List constraints; constraints = new ArrayList(); try { // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:642:17: ( opt_eol ( constraint[constraints] | predicate[constraints] ) ( opt_eol ',' opt_eol ( constraint[constraints] | predicate[constraints] ) )* opt_eol ) // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:642:17: opt_eol ( constraint[constraints] | predicate[constraints] ) ( opt_eol ',' opt_eol ( constraint[constraints] | predicate[constraints] ) )* opt_eol { following.push(FOLLOW_opt_eol_in_constraints1583); opt_eol(); following.pop(); // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:643:17: ( constraint[constraints] | predicate[constraints] ) int alt45=2; int LA45_0 = input.LA(1); if ( LA45_0==EOL||LA45_0==15 ) { alt45=1; } else if ( LA45_0==ID ) { int LA45_2 = input.LA(2); if ( LA45_2==30 ) { int LA45_3 = input.LA(3); if ( LA45_3==ID ) { int LA45_8 = input.LA(4); if ( LA45_8==50 ) { alt45=2; } else if ( LA45_8==EOL||LA45_8==15||(LA45_8>=22 && LA45_8<=23)||(LA45_8>=40 && LA45_8<=47) ) { alt45=1; } else { NoViableAltException nvae = new NoViableAltException("643:17: ( constraint[constraints] | predicate[constraints] )", 45, 8, input); throw nvae; } } else if ( LA45_3==EOL||LA45_3==15 ) { alt45=1; } else { NoViableAltException nvae = new NoViableAltException("643:17: ( constraint[constraints] | predicate[constraints] )", 45, 3, input); throw nvae; } } else if ( LA45_2==EOL||LA45_2==15||(LA45_2>=22 && LA45_2<=23)||(LA45_2>=40 && LA45_2<=47) ) { alt45=1; } else { NoViableAltException nvae = new NoViableAltException("643:17: ( constraint[constraints] | predicate[constraints] )", 45, 2, input); throw nvae; } } else { NoViableAltException nvae = new NoViableAltException("643:17: ( constraint[constraints] | predicate[constraints] )", 45, 0, input); throw nvae; } switch (alt45) { case 1 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:643:18: constraint[constraints] { following.push(FOLLOW_constraint_in_constraints1588); constraint(constraints); following.pop(); } break; case 2 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:643:42: predicate[constraints] { following.push(FOLLOW_predicate_in_constraints1591); predicate(constraints); following.pop(); } break; } // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:644:17: ( opt_eol ',' opt_eol ( constraint[constraints] | predicate[constraints] ) )* loop47: do { int alt47=2; alt47 = dfa47.predict(input); switch (alt47) { case 1 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:644:19: opt_eol ',' opt_eol ( constraint[constraints] | predicate[constraints] ) { following.push(FOLLOW_opt_eol_in_constraints1599); opt_eol(); following.pop(); match(input,22,FOLLOW_22_in_constraints1601); following.push(FOLLOW_opt_eol_in_constraints1603); opt_eol(); following.pop(); // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:644:39: ( constraint[constraints] | predicate[constraints] ) int alt46=2; int LA46_0 = input.LA(1); if ( LA46_0==EOL||LA46_0==15 ) { alt46=1; } else if ( LA46_0==ID ) { int LA46_2 = input.LA(2); if ( LA46_2==30 ) { int LA46_3 = input.LA(3); if ( LA46_3==ID ) { int LA46_8 = input.LA(4); if ( LA46_8==50 ) { alt46=2; } else if ( LA46_8==EOL||LA46_8==15||(LA46_8>=22 && LA46_8<=23)||(LA46_8>=40 && LA46_8<=47) ) { alt46=1; } else { NoViableAltException nvae = new NoViableAltException("644:39: ( constraint[constraints] | predicate[constraints] )", 46, 8, input); throw nvae; } } else if ( LA46_3==EOL||LA46_3==15 ) { alt46=1; } else { NoViableAltException nvae = new NoViableAltException("644:39: ( constraint[constraints] | predicate[constraints] )", 46, 3, input); throw nvae; } } else if ( LA46_2==EOL||LA46_2==15||(LA46_2>=22 && LA46_2<=23)||(LA46_2>=40 && LA46_2<=47) ) { alt46=1; } else { NoViableAltException nvae = new NoViableAltException("644:39: ( constraint[constraints] | predicate[constraints] )", 46, 2, input); throw nvae; } } else { NoViableAltException nvae = new NoViableAltException("644:39: ( constraint[constraints] | predicate[constraints] )", 46, 0, input); throw nvae; } switch (alt46) { case 1 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:644:40: constraint[constraints] { following.push(FOLLOW_constraint_in_constraints1606); constraint(constraints); following.pop(); } break; case 2 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:644:64: predicate[constraints] { following.push(FOLLOW_predicate_in_constraints1609); predicate(constraints); following.pop(); } break; } } break; default : break loop47; } } while (true); following.push(FOLLOW_opt_eol_in_constraints1617); opt_eol(); following.pop(); } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { } return constraints; } | 31577 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/31577/35c3932466a0269c296ae52afa8a1f8048a309d2/RuleParser.java/buggy/drools-compiler/src/main/java/org/drools/lang/RuleParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
987,
6237,
1435,
1216,
9539,
288,
6647,
987,
6237,
31,
540,
202,
202,
11967,
273,
394,
2407,
5621,
540,
202,
3639,
775,
288,
5411,
368,
342,
6588,
19,
70,
947,
19,
17300,
87,
19,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
987,
6237,
1435,
1216,
9539,
288,
6647,
987,
6237,
31,
540,
202,
202,
11967,
273,
394,
2407,
5621,
540,
202,
3639,
775,
288,
5411,
368,
342,
6588,
19,
70,
947,
19,
17300,
87,
19,
... | ||
/*SeismogramAttr[] seismogramAttributes = getSeismogramAttrs(); for(int counter = 0; counter < seismogramAttributes.length; counter++) { if(ChannelIdUtil.toStringNoDates(((SeismogramAttrImpl)seismogramAttributes[counter]).getChannelID()).equals(name)) { logger.debug("************* IN XML DATASET changing the SeismogramAttr to be from the xml "); seis.setAttributes(seismogramAttributes[counter]); break; } }*/ | NodeList seisAttrNode = XMLUtil.evalNodeList(e, "seismogramAttr"); if(seisAttrNode != null && seisAttrNode.getLength() != 0) { seis.setAttributes(XMLSeismogramAttr.getSeismogramAttr((Element)seisAttrNode.item(0))); } | public LocalSeismogramImpl getSeismogram(String name) { if (seismogramCache.containsKey(name)) { return (LocalSeismogramImpl)seismogramCache.get(name); } // end of if (seismogramCache.containsKey(name)) String urlString = "NONE"; NodeList nList = evalNodeList(config, "localSeismogram/seismogramAttr/property[name="+dquote+"Name"+dquote+ "]"+"[value="+dquote+name+dquote+"]"+"/../../data"); if(nList == null || (nList != null && nList.getLength() == 0)) { nList = getNoNameSeismogram(name); } if (nList != null && nList.getLength() != 0) { try { Node n = nList.item(0); if (n instanceof Element) { Element e = (Element)n; //System.out.println("**********************The name of the element is "+e.getTagName()); urlString = e.getAttribute("xlink:href"); if (urlString == null || urlString == "") { throw new MalformedURLException(name+" does not have an xlink:href attribute"); } // end of if (urlString == null || urlString == "") URL sacURL = new URL(base, urlString); DataInputStream dis = new DataInputStream(new BufferedInputStream(sacURL.openStream())); SacTimeSeries sac = new SacTimeSeries(); sac.read(dis); LocalSeismogramImpl seis = SacToFissures.getSeismogram(sac); //get the Seismogram Attributes from the xml .. only the data must // must be obtained fromt the SAC. /*SeismogramAttr[] seismogramAttributes = getSeismogramAttrs(); for(int counter = 0; counter < seismogramAttributes.length; counter++) { if(ChannelIdUtil.toStringNoDates(((SeismogramAttrImpl)seismogramAttributes[counter]).getChannelID()).equals(name)) { logger.debug("************* IN XML DATASET changing the SeismogramAttr to be from the xml "); seis.setAttributes(seismogramAttributes[counter]); break; } }*/ NodeList propList = evalNodeList(e, "property"); int numDSProps = 0; if (propList != null && propList.getLength() != 0) { numDSProps = nList.getLength(); } else { // no properties in dataset numDSProps = 0; } // end of else Property[] props = seis.getProperties(); Property[] newProps = new Property[1+props.length+numDSProps]; System.arraycopy(props, 0, newProps, 0, props.length); for (int i=0; i<propList.getLength(); i++) { Element propElement = (Element)propList.item(i); newProps[props.length+i] = new Property(xpath.eval(propElement, "name/text()").str(), xpath.eval(propElement, "value/text()").str()); } // end of for newProps[newProps.length-1] = new Property(seisNameKey, name); seis.setProperties(newProps); if (seis != null) { seismogramCache.put(name, seis); } // end of if (seis != null) return seis; } } catch (MalformedURLException e) { logger.error("Couldn't get seismogram "+name, e); logger.error(urlString); } catch (Exception e) { logger.error("Couldn't get seismogram "+name, e); logger.error(urlString); } // end of try-catch } return null; } | 52623 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52623/af232451423e5871e8fb858f04b8986daf7f5aa1/XMLDataSet.java/clean/src/edu/sc/seis/fissuresUtil/xml/XMLDataSet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3566,
1761,
6228,
5553,
2828,
11979,
6228,
5553,
12,
780,
508,
13,
288,
3639,
309,
261,
307,
6228,
5553,
1649,
18,
12298,
653,
12,
529,
3719,
288,
5411,
327,
261,
2042,
1761,
6228,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3566,
1761,
6228,
5553,
2828,
11979,
6228,
5553,
12,
780,
508,
13,
288,
3639,
309,
261,
307,
6228,
5553,
1649,
18,
12298,
653,
12,
529,
3719,
288,
5411,
327,
261,
2042,
1761,
6228,
... |
public org.quickfix.field.EncodedLegSecurityDescLen getEncodedLegSecurityDescLen() throws FieldNotFound { org.quickfix.field.EncodedLegSecurityDescLen value = new org.quickfix.field.EncodedLegSecurityDescLen(); | public quickfix.field.EncodedLegSecurityDescLen getEncodedLegSecurityDescLen() throws FieldNotFound { quickfix.field.EncodedLegSecurityDescLen value = new quickfix.field.EncodedLegSecurityDescLen(); | public org.quickfix.field.EncodedLegSecurityDescLen getEncodedLegSecurityDescLen() throws FieldNotFound { org.quickfix.field.EncodedLegSecurityDescLen value = new org.quickfix.field.EncodedLegSecurityDescLen(); getField(value); return value; } | 8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/MarketDataRequest.java/clean/src/java/src/quickfix/fix44/MarketDataRequest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
10397,
8329,
4368,
4217,
2891,
28799,
8329,
4368,
4217,
2891,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
10397,
8329,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
10397,
8329,
4368,
4217,
2891,
28799,
8329,
4368,
4217,
2891,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
10397,
8329,
... |
Logger.error(this, "onGeneratedURI("+uri+","+state+") but already set generatedURI to "+generatedURI); | Logger.error(this, "onGeneratedURI("+uri+ ',' +state+") but already set generatedURI to "+generatedURI); | public void onGeneratedURI(FreenetURI uri, BaseClientPutter state) { synchronized(this) { if((generatedURI != null) && !uri.equals(generatedURI)) Logger.error(this, "onGeneratedURI("+uri+","+state+") but already set generatedURI to "+generatedURI); generatedURI = uri; } trySendGeneratedURIMessage(null); } | 46731 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46731/62fd59041864b4ed1f43adc676de6bfb5ea977f3/ClientPutBase.java/buggy/src/freenet/node/fcp/ClientPutBase.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
603,
7823,
3098,
12,
42,
2842,
278,
3098,
2003,
16,
3360,
1227,
6426,
387,
919,
13,
288,
202,
202,
22043,
12,
2211,
13,
288,
1082,
202,
430,
12443,
11168,
3098,
480,
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,
225,
202,
482,
918,
603,
7823,
3098,
12,
42,
2842,
278,
3098,
2003,
16,
3360,
1227,
6426,
387,
919,
13,
288,
202,
202,
22043,
12,
2211,
13,
288,
1082,
202,
430,
12443,
11168,
3098,
480,
446,... |
Mounted m = (Mounted)entity.getWeaponList().elementAt(i); | Mounted m = (Mounted)entity.getWeaponList().get(i); | private void addOption(IOption option, GridBagLayout gridbag, GridBagConstraints c, boolean editable) { DialogOptionComponent optionComp = new DialogOptionComponent(this, option, editable); if (option.getName().equals("weapon_specialist")) { //$NON-NLS-1$ optionComp.addValue(Messages.getString("CustomMechDialog.None")); //$NON-NLS-1$ Hashtable uniqueWeapons = new Hashtable(); for (int i = 0; i < entity.getWeaponList().size(); i++) { Mounted m = (Mounted)entity.getWeaponList().elementAt(i); uniqueWeapons.put(m.getName(),new Boolean(true)); } for (Enumeration e = uniqueWeapons.keys(); e.hasMoreElements(); ) { optionComp.addValue((String)e.nextElement()); } optionComp.setSelected(option.stringValue()); } gridbag.setConstraints(optionComp, c); panOptions.add(optionComp); optionComps.addElement(optionComp); } | 4135 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4135/cbe74d020e74a85c0e3b8ebf32d1ebc85c1ba62f/CustomMechDialog.java/clean/megamek/src/megamek/client/ui/AWT/CustomMechDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
12966,
12,
45,
1895,
1456,
16,
7145,
5013,
3744,
3068,
22551,
16,
13075,
276,
16,
1250,
13754,
13,
288,
3639,
17242,
1895,
1841,
1456,
2945,
273,
394,
17242,
1895,
1841,
12,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
12966,
12,
45,
1895,
1456,
16,
7145,
5013,
3744,
3068,
22551,
16,
13075,
276,
16,
1250,
13754,
13,
288,
3639,
17242,
1895,
1841,
1456,
2945,
273,
394,
17242,
1895,
1841,
12,
22... |
} | } | private boolean checkNewBlastLikeDataSet(String poLine) { if ((poLine.startsWith("BLAST")) || (poLine.startsWith("TBLAST"))) { return true; } else { return false; } } | 50397 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50397/e2a4faf53768425a94effb41fd47f0e35b659d0a/BlastSAXParser.java/clean/src/org/biojava/bio/program/sax/BlastSAXParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1250,
866,
1908,
38,
2722,
8804,
13676,
12,
780,
8275,
1670,
13,
288,
3639,
309,
14015,
1631,
1670,
18,
17514,
1190,
2932,
38,
14378,
6,
3719,
747,
5411,
261,
1631,
1670,
18,
17514,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1250,
866,
1908,
38,
2722,
8804,
13676,
12,
780,
8275,
1670,
13,
288,
3639,
309,
14015,
1631,
1670,
18,
17514,
1190,
2932,
38,
14378,
6,
3719,
747,
5411,
261,
1631,
1670,
18,
17514,... |
super(msg, baseEx); | super(); | public SqlDynaException(String msg, Throwable baseEx) { super(msg, baseEx); } | 3517 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3517/ca18858bae769f9a818bf7907ee7c059d2d94efb/SqlDynaException.java/buggy/src/java/org/apache/ddlutils/dynabean/SqlDynaException.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
8855,
10419,
69,
503,
12,
780,
1234,
16,
4206,
1026,
424,
13,
565,
288,
3639,
2240,
5621,
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,
1071,
8855,
10419,
69,
503,
12,
780,
1234,
16,
4206,
1026,
424,
13,
565,
288,
3639,
2240,
5621,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Connection dbConn = Vault.getDbConnection(); | Connection dbConn = m_dbConnection; if(m_dbConnection==null) dbConn = Vault.getDbConnection(); | public static Element[] getElementsOfMap(int mapid) throws SQLException, MapsException { final String sqlQuery = "SELECT * FROM element WHERE mapid = ?"; Connection dbConn = Vault.getDbConnection(); PreparedStatement statement = dbConn.prepareStatement(sqlQuery); statement.setInt(1, mapid); ResultSet rs = statement.executeQuery(); Vector elements = rs2ElementVector(rs); Element[] el =null; if(elements!=null){ el = new Element[elements.size()]; el=(Element[])elements.toArray(el); } rs.close(); statement.close(); Vault.releaseDbConnection(dbConn); return el; } | 48885 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48885/d5b0121ba147eea97a444ae288f11e94118d5a54/Factory.java/buggy/opennms-webapp/src/main/java/org/opennms/web/map/db/Factory.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
3010,
8526,
8886,
951,
863,
12,
474,
852,
350,
13,
1216,
6483,
16,
19837,
503,
288,
1377,
727,
514,
24451,
273,
315,
4803,
380,
4571,
930,
4852,
852,
350,
273,
692,
14432,
13... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
3010,
8526,
8886,
951,
863,
12,
474,
852,
350,
13,
1216,
6483,
16,
19837,
503,
288,
1377,
727,
514,
24451,
273,
315,
4803,
380,
4571,
930,
4852,
852,
350,
273,
692,
14432,
13... |
if (this.serializer != this.lastConsumer) { | if (this.lastConsumer == null) { | protected boolean processXMLPipeline(Environment environment) throws ProcessingException { this.setMimeTypeForSerializer(environment); try { if (this.serializer != this.lastConsumer) { // internal processing this.generator.generate(); } else { if (this.serializer.shouldSetContentLength()) { // set the output stream ByteArrayOutputStream os = new ByteArrayOutputStream(); this.serializer.setOutputStream(os); // execute the pipeline: this.generator.generate(); environment.setContentLength(os.size()); os.writeTo(environment.getOutputStream(0)); } else { // set the output stream this.serializer.setOutputStream(environment.getOutputStream(this.outputBufferSize)); // execute the pipeline: this.generator.generate(); } } } catch ( ProcessingException e ) { throw e; } catch ( Exception e ) { // TODO: Unwrap SAXException ? throw new ProcessingException("Failed to execute pipeline.", e); } return true; } | 46428 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46428/95f39a584124da878be695ec780b20f0661f447b/AbstractProcessingPipeline.java/clean/src/java/org/apache/cocoon/components/pipeline/AbstractProcessingPipeline.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
1250,
1207,
4201,
8798,
12,
5494,
3330,
13,
565,
1216,
19652,
503,
288,
3639,
333,
18,
542,
16821,
1290,
6306,
12,
10274,
1769,
7734,
775,
288,
5411,
309,
261,
2211,
18,
2722,
5869,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1250,
1207,
4201,
8798,
12,
5494,
3330,
13,
565,
1216,
19652,
503,
288,
3639,
333,
18,
542,
16821,
1290,
6306,
12,
10274,
1769,
7734,
775,
288,
5411,
309,
261,
2211,
18,
2722,
5869,... |
DragUtil.performDrag(this, dragRect, position, !usingKeyboard); | startDrag(this, dragRect, position, !usingKeyboard); | protected void startDraggingFastViewBar(Point position, boolean usingKeyboard) { Rectangle dragRect = DragUtil.getDisplayBounds(control); DragUtil.performDrag(this, dragRect, position, !usingKeyboard); } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/456d7d75102fbbf5aeafa685a97984179111ef2e/FastViewBar.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/FastViewBar.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
787,
11728,
1998,
12305,
1767,
5190,
12,
2148,
1754,
16,
1250,
1450,
17872,
13,
288,
202,
202,
19463,
8823,
6120,
273,
28425,
1304,
18,
588,
4236,
5694,
12,
7098,
1769,
95... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
787,
11728,
1998,
12305,
1767,
5190,
12,
2148,
1754,
16,
1250,
1450,
17872,
13,
288,
202,
202,
19463,
8823,
6120,
273,
28425,
1304,
18,
588,
4236,
5694,
12,
7098,
1769,
95... |
} | } | public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { String host = req.getHeader("Host") ; String server = Utility.getDomainPref("adminserver",host) ; // Lets validate the session if (super.checkSession(req,res) == false) return ; // Lets get an user object imcode.server.User user = super.getUserObj(req,res) ; if(user == null) { String header = "Error in AdminCounter." ; String msg = "Couldnt create an user object."+ "<BR>" ; this.log(header + msg) ; AdminError err = new AdminError(req,res,header,msg) ; return ; } // Lets check if the user is an admin, otherwise throw him out. if (super.checkAdminRights(server, user) == false) { String header = "Error in AdminCounter." ; String msg = "The user is not an administrator."+ "<BR>" ; this.log(header + msg) ; AdminError err = new AdminError(req,res,header,msg) ; return ; } // Lets check which button was pushed String adminTask = req.getParameter("adminTask") ; this.log("Argument till server:" + adminTask) ; if(adminTask == null) adminTask = "" ; //******* RESET_FORM BUTTON WAS PUNSCHED *********** //sets up the needed parameters and redirect back to AdminUser if ( req.getParameter("RESET_FORM") != null ) { log("RESET_FORM"); HttpSession session = req.getSession(false); if(session == null) return; String userId = (String)session.getAttribute("RESET_userId"); if(userId == null) { this.sendErrorMsg(req,res, "Add/edit user", "An eror occured!"); return; } String servletPath = MetaInfo.getServletPath(req) ; res.sendRedirect(servletPath + "AdminUser?CHANGE_USER=true&user_Id="+userId+"&adminTask="+adminTask) ; return; } //******** ok_phones button ********** //sets up the needed parameters and redirect back to AdminUser if ( req.getParameter("ok_phones") != null ) { //adds or changes a phoneNr to the select list HttpSession session = req.getSession(false); if(session == null) return; String userId = session.getAttribute("RESET_userId") == null ? "":(String) session.getAttribute("RESET_userId"); String servletPath = MetaInfo.getServletPath(req) ; //mste fixa s att all anv. data sparas undan i servleten log("ok_phones"); session.setAttribute("ok_phones_params", this.getParameters(req)); session.setAttribute("ok_phones_roles", getRolesParameters(req,res)==null ? new Vector() : getRolesParameters(req,res)); //lets get the phonenumber from the form session.setAttribute("country_code",req.getParameter("country_code")); session.setAttribute("area_code",req.getParameter("area_code")); session.setAttribute("local_code",req.getParameter("local_code")); //add it into Vectorn //gets all phonenumbers from the session // log("phone_id = "+req.getParameter("phone_id")) ; String selectedId=""; if (! req.getParameter("area_code").equals("") && !req.getParameter("local_code").equals("")) { Vector phonesV = (Vector)session.getAttribute("Ok_phoneNumbers"); if (phonesV == null) { this.sendErrorMsg(req,res, "Add/edit user", "An eror occured!"); return; } Enumeration enum = phonesV.elements(); int tempId = 1; boolean found = false; while (enum.hasMoreElements()) { String[] temp = (String[]) enum.nextElement(); log(temp[0]+" == " +req.getParameter("phone_id")); if (temp[0].equals(req.getParameter("phone_id"))) { selectedId = temp[0]; phonesV.remove(temp); temp[1] = req.getParameter("country_code"); temp[2] = req.getParameter("area_code"); temp[3] = req.getParameter("local_code"); phonesV.addElement(temp); found = true; } try { if (Integer.parseInt(temp[0]) >= tempId) { tempId = Integer.parseInt(temp[0]) + 1; } }catch(NumberFormatException nfe) { log("NumberFormatException"); } } if (!found) { String[] temp = new String[5]; temp[0] = ""+tempId; selectedId = temp[0]; temp[1] = req.getParameter("country_code"); temp[2] = req.getParameter("area_code"); temp[3] = req.getParameter("local_code"); temp[4] = userId; phonesV.addElement(temp); } } res.sendRedirect(servletPath + "AdminUser?ok_phones=true&user_Id="+userId+"&selected_id="+selectedId+"&adminTask="+adminTask) ; return; } | 8781 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8781/a270627916b37a677a391dd9f45c54d3d6f12503/AdminUserProps.java/buggy/servlets/AdminUserProps.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
741,
3349,
12,
2940,
18572,
1111,
16,
12446,
400,
13,
202,
15069,
16517,
16,
1860,
202,
95,
202,
202,
780,
1479,
4697,
202,
33,
1111,
18,
588,
1864,
2932,
2594,
7923,
274... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
741,
3349,
12,
2940,
18572,
1111,
16,
12446,
400,
13,
202,
15069,
16517,
16,
1860,
202,
95,
202,
202,
780,
1479,
4697,
202,
33,
1111,
18,
588,
1864,
2932,
2594,
7923,
274... |
digestValid = false; | public SHA1(boolean b) { count = 0; digestValid = false; NSA = b; init(); } | 50493 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50493/eda25544c98825ea7f1e9ddd5c08127cd671f788/SHA1.java/buggy/src/freenet/crypt/SHA1.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
9777,
21,
12,
6494,
324,
13,
288,
3639,
1056,
273,
374,
31,
9079,
423,
5233,
273,
324,
31,
3639,
1208,
5621,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
9777,
21,
12,
6494,
324,
13,
288,
3639,
1056,
273,
374,
31,
9079,
423,
5233,
273,
324,
31,
3639,
1208,
5621,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... | |
finally{ try{ Thread.sleep(Util.UPGRADE_THREAD_SLEEP_MILLIS); } catch(Exception f){ Util.handleExceptionNoRestart("Error sleeping in upgrade check thread", f); } } | public void run() { MackageDesc[] mackageDescs; // FORCE THE SERVER TO UPDATE ONCE updateJButton(Util.UPGRADE_CHECKING); try{ Util.getToolboxManager().update(); } catch(Exception e){ Util.handleExceptionNoRestart("Error updating upgrades on server", e); } while(true){ try{ if(Util.getKillThreads()) return; // CHECK FOR UPGRADES updateJButton(Util.UPGRADE_CHECKING); mackageDescs = Util.getToolboxManager().upgradable(); if( Util.isArrayEmpty(mackageDescs) ){ updateJButton(0); Util.setUpgradeCount(0); } else{ updateJButton(mackageDescs.length); Util.setUpgradeCount(mackageDescs.length); } Util.checkedUpgrades(); } catch(Exception e){ Util.handleExceptionNoRestart("Error checking for upgrades on server", e); updateJButton(Util.UPGRADE_UNAVAILABLE); } finally{ try{ Thread.sleep(Util.UPGRADE_THREAD_SLEEP_MILLIS); } catch(Exception f){ Util.handleExceptionNoRestart("Error sleeping in upgrade check thread", f); } } } } | 49954 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49954/2297c53c7ed070dd4b41df8d2eba5cee72177818/MMainJFrame.java/buggy/gui/main/com/metavize/gui/main/MMainJFrame.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
1086,
1435,
288,
202,
565,
490,
1270,
4217,
8526,
312,
1270,
4217,
87,
31,
13491,
368,
12108,
1441,
12786,
15061,
8493,
11028,
6229,
1441,
5411,
1089,
46,
3616,
12,
1304,
18,
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,
540,
1071,
918,
1086,
1435,
288,
202,
565,
490,
1270,
4217,
8526,
312,
1270,
4217,
87,
31,
13491,
368,
12108,
1441,
12786,
15061,
8493,
11028,
6229,
1441,
5411,
1089,
46,
3616,
12,
1304,
18,
3... | |
return null; } | return null; } | public IASTNodeLocation getLocation(int offset) { // TODO Auto-generated method stub return null; } | 54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/33390e2e03dc3a1dd0c3bedcc27e52231c6a907e/LocationMap.java/clean/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner2/LocationMap.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
1071,
467,
9053,
907,
2735,
13312,
12,
474,
1384,
13,
288,
1377,
368,
2660,
8064,
17,
11168,
707,
7168,
1377,
327,
446,
31,
282,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
1071,
467,
9053,
907,
2735,
13312,
12,
474,
1384,
13,
288,
1377,
368,
2660,
8064,
17,
11168,
707,
7168,
1377,
327,
446,
31,
282,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
betAmount = df.parse( amountMatcher.group(1) ).intValue(); | betAmount = COMMA_FORMAT.parse( amountMatcher.group(1) ).intValue(); | public MoneyMakingGameResult( String resultText, boolean isPlacedBet ) { try { this.isPlacedBet = isPlacedBet; this.isPositive = resultText.indexOf( "color='green'>+" ) != -1; Matcher results = Pattern.compile( "<td.*?</td>" ).matcher( resultText ); // The first cell in the row is the timestamp // for the result. if ( results.find() ) timestamp = RESULT_FORMAT.parse( results.group().replaceAll( " ", " " ).replaceAll( "<.*?>", "" ) ); // Next is the amount which was bet. In this // case, parse out the value. if ( results.find() ) { Matcher amountMatcher = Pattern.compile( ">([\\d,]+) " ).matcher( results.group() ); if ( amountMatcher.find() ) { betAmount = df.parse( amountMatcher.group(1) ).intValue(); betAmount = (int) (((float) betAmount) * (isPositive ? 0.998f : -1.0f)); } } // The next is the name of the player who placed // or took your bet. if ( results.find() ) { Matcher playerMatcher = Pattern.compile( "who=(\\d+).*?<b>(.*?)</b>" ).matcher( results.group() ); if ( playerMatcher.find() ) { playerID = playerMatcher.group(1); client.registerPlayer( playerMatcher.group(2), playerID ); } } } catch ( Exception e ) { // This should not happen. Therefore, print // a stack trace for debug purposes. StaticEntity.printStackTrace( e ); } } | 50364 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50364/3446151a75a0bb8756fa27b42f6ae5047201cd09/MoneyMakingGameRequest.java/buggy/src/net/sourceforge/kolmafia/MoneyMakingGameRequest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
16892,
49,
6159,
12496,
1253,
12,
514,
563,
1528,
16,
1250,
353,
6029,
72,
38,
278,
262,
202,
202,
95,
1082,
202,
698,
1082,
202,
95,
9506,
202,
2211,
18,
291,
6029,
72,
38... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
16892,
49,
6159,
12496,
1253,
12,
514,
563,
1528,
16,
1250,
353,
6029,
72,
38,
278,
262,
202,
202,
95,
1082,
202,
698,
1082,
202,
95,
9506,
202,
2211,
18,
291,
6029,
72,
38... |
synchronized (inserter) { if(inserter != null) { synchronized(this) { shouldInsert = true; } return; | if(inserter != null) { synchronized(this) { shouldInsert = true; | public void update() { Logger.minor(this, "update()"); if(!checkIPUpdated()) return; Logger.minor(this, "Inserting ARK because peers list changed"); synchronized (inserter) { if(inserter != null) { // Already inserting. // Re-insert after finished. synchronized(this) { shouldInsert = true; } return; } // Otherwise need to start an insert if(!peers.anyConnectedPeers()) { // Can't start an insert yet synchronized (this) { shouldInsert = true; } return; } } startInserter(); } | 56348 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56348/cbc8d02e7f68958d17b1b62385b39f3b1675daf1/Node.java/buggy/src/freenet/node/Node.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
918,
1089,
1435,
288,
1082,
202,
3328,
18,
17364,
12,
2211,
16,
315,
2725,
1435,
8863,
1082,
202,
430,
12,
5,
1893,
2579,
7381,
10756,
327,
31,
1082,
202,
3328,
18,
17364,
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,
3196,
202,
482,
918,
1089,
1435,
288,
1082,
202,
3328,
18,
17364,
12,
2211,
16,
315,
2725,
1435,
8863,
1082,
202,
430,
12,
5,
1893,
2579,
7381,
10756,
327,
31,
1082,
202,
3328,
18,
17364,
12... |
else preferredSize = new Dimension(0, 0); | else preferredSize = new Dimension(0, 0); | protected void updateCachedPreferredSize() { int maxWidth = 0; boolean isLeaf = false; if (currentVisiblePath != null) { Object[] path = currentVisiblePath.getPath(); for (int i = 0; i < path.length; i++) { TreePath curr = new TreePath(getPathToRoot(path[i], 0)); Rectangle bounds = getPathBounds(tree, curr); if (treeModel != null) isLeaf = treeModel.isLeaf(path[i]); if (!isLeaf && hasControlIcons()) bounds.width += getCurrentControlIcon(curr).getIconWidth(); maxWidth = Math.max(maxWidth, bounds.x + bounds.width); } preferredSize = new Dimension(maxWidth, (getRowHeight() * path.length)); } else preferredSize = new Dimension(0, 0); validCachedPreferredSize = true; } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/27e9978154ebcb2e4d9c4e05e11bf17d1b8e1ef5/BasicTreeUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
918,
1089,
9839,
16028,
1225,
1435,
225,
288,
565,
509,
17681,
273,
374,
31,
565,
1250,
31356,
273,
629,
31,
565,
309,
261,
2972,
6207,
743,
480,
446,
13,
1377,
288,
3639,
1033,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
918,
1089,
9839,
16028,
1225,
1435,
225,
288,
565,
509,
17681,
273,
374,
31,
565,
1250,
31356,
273,
629,
31,
565,
309,
261,
2972,
6207,
743,
480,
446,
13,
1377,
288,
3639,
1033,
8... |
{ mLAND(); | { mLAND(); | public void mTokens() throws RecognitionException { // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:10: ( T68 | T69 | T70 | T71 | T72 | T73 | T74 | T75 | T76 | T77 | T78 | T79 | T80 | T81 | T82 | T83 | T84 | T85 | T86 | T87 | T88 | T89 | T90 | T91 | T92 | T93 | T94 | T95 | T96 | T97 | T98 | T99 | T100 | T101 | T102 | T103 | T104 | T105 | T106 | T107 | T108 | T109 | T110 | T111 | T112 | T113 | T114 | T115 | QUESTION | LPAREN | RPAREN | LBRACK | RBRACK | LCURLY | RCURLY | COLON | COMMA | DOT | ASSIGN | EQUAL | LNOT | BNOT | NOT_EQUAL | DIV | DIV_ASSIGN | PLUS | PLUS_ASSIGN | INC | MINUS | MINUS_ASSIGN | DEC | STAR | STAR_ASSIGN | MOD | MOD_ASSIGN | SR | SR_ASSIGN | BSR | BSR_ASSIGN | GE | GT | SL | SL_ASSIGN | LE | LT | BXOR | BXOR_ASSIGN | BOR | BOR_ASSIGN | LOR | BAND | BAND_ASSIGN | LAND | SEMI | WS | SL_COMMENT | ML_COMMENT | IDENT | NUM_INT | NUM_FLOAT | CHAR_LITERAL | STRING_LITERAL ) int alt25=102; alt25 = dfa25.predict(input); switch (alt25) { case 1 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:10: T68 { mT68(); } break; case 2 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:14: T69 { mT69(); } break; case 3 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:18: T70 { mT70(); } break; case 4 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:22: T71 { mT71(); } break; case 5 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:26: T72 { mT72(); } break; case 6 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:30: T73 { mT73(); } break; case 7 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:34: T74 { mT74(); } break; case 8 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:38: T75 { mT75(); } break; case 9 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:42: T76 { mT76(); } break; case 10 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:46: T77 { mT77(); } break; case 11 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:50: T78 { mT78(); } break; case 12 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:54: T79 { mT79(); } break; case 13 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:58: T80 { mT80(); } break; case 14 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:62: T81 { mT81(); } break; case 15 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:66: T82 { mT82(); } break; case 16 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:70: T83 { mT83(); } break; case 17 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:74: T84 { mT84(); } break; case 18 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:78: T85 { mT85(); } break; case 19 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:82: T86 { mT86(); } break; case 20 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:86: T87 { mT87(); } break; case 21 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:90: T88 { mT88(); } break; case 22 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:94: T89 { mT89(); } break; case 23 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:98: T90 { mT90(); } break; case 24 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:102: T91 { mT91(); } break; case 25 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:106: T92 { mT92(); } break; case 26 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:110: T93 { mT93(); } break; case 27 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:114: T94 { mT94(); } break; case 28 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:118: T95 { mT95(); } break; case 29 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:122: T96 { mT96(); } break; case 30 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:126: T97 { mT97(); } break; case 31 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:130: T98 { mT98(); } break; case 32 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:134: T99 { mT99(); } break; case 33 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:138: T100 { mT100(); } break; case 34 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:143: T101 { mT101(); } break; case 35 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:148: T102 { mT102(); } break; case 36 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:153: T103 { mT103(); } break; case 37 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:158: T104 { mT104(); } break; case 38 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:163: T105 { mT105(); } break; case 39 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:168: T106 { mT106(); } break; case 40 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:173: T107 { mT107(); } break; case 41 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:178: T108 { mT108(); } break; case 42 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:183: T109 { mT109(); } break; case 43 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:188: T110 { mT110(); } break; case 44 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:193: T111 { mT111(); } break; case 45 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:198: T112 { mT112(); } break; case 46 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:203: T113 { mT113(); } break; case 47 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:208: T114 { mT114(); } break; case 48 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:213: T115 { mT115(); } break; case 49 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:218: QUESTION { mQUESTION(); } break; case 50 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:227: LPAREN { mLPAREN(); } break; case 51 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:234: RPAREN { mRPAREN(); } break; case 52 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:241: LBRACK { mLBRACK(); } break; case 53 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:248: RBRACK { mRBRACK(); } break; case 54 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:255: LCURLY { mLCURLY(); } break; case 55 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:262: RCURLY { mRCURLY(); } break; case 56 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:269: COLON { mCOLON(); } break; case 57 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:275: COMMA { mCOMMA(); } break; case 58 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:281: DOT { mDOT(); } break; case 59 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:285: ASSIGN { mASSIGN(); } break; case 60 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:292: EQUAL { mEQUAL(); } break; case 61 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:298: LNOT { mLNOT(); } break; case 62 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:303: BNOT { mBNOT(); } break; case 63 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:308: NOT_EQUAL { mNOT_EQUAL(); } break; case 64 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:318: DIV { mDIV(); } break; case 65 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:322: DIV_ASSIGN { mDIV_ASSIGN(); } break; case 66 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:333: PLUS { mPLUS(); } break; case 67 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:338: PLUS_ASSIGN { mPLUS_ASSIGN(); } break; case 68 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:350: INC { mINC(); } break; case 69 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:354: MINUS { mMINUS(); } break; case 70 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:360: MINUS_ASSIGN { mMINUS_ASSIGN(); } break; case 71 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:373: DEC { mDEC(); } break; case 72 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:377: STAR { mSTAR(); } break; case 73 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:382: STAR_ASSIGN { mSTAR_ASSIGN(); } break; case 74 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:394: MOD { mMOD(); } break; case 75 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:398: MOD_ASSIGN { mMOD_ASSIGN(); } break; case 76 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:409: SR { mSR(); } break; case 77 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:412: SR_ASSIGN { mSR_ASSIGN(); } break; case 78 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:422: BSR { mBSR(); } break; case 79 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:426: BSR_ASSIGN { mBSR_ASSIGN(); } break; case 80 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:437: GE { mGE(); } break; case 81 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:440: GT { mGT(); } break; case 82 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:443: SL { mSL(); } break; case 83 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:446: SL_ASSIGN { mSL_ASSIGN(); } break; case 84 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:456: LE { mLE(); } break; case 85 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:459: LT { mLT(); } break; case 86 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:462: BXOR { mBXOR(); } break; case 87 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:467: BXOR_ASSIGN { mBXOR_ASSIGN(); } break; case 88 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:479: BOR { mBOR(); } break; case 89 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:483: BOR_ASSIGN { mBOR_ASSIGN(); } break; case 90 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:494: LOR { mLOR(); } break; case 91 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:498: BAND { mBAND(); } break; case 92 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:503: BAND_ASSIGN { mBAND_ASSIGN(); } break; case 93 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:515: LAND { mLAND(); } break; case 94 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:520: SEMI { mSEMI(); } break; case 95 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:525: WS { mWS(); } break; case 96 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:528: SL_COMMENT { mSL_COMMENT(); } break; case 97 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:539: ML_COMMENT { mML_COMMENT(); } break; case 98 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:550: IDENT { mIDENT(); } break; case 99 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:556: NUM_INT { mNUM_INT(); } break; case 100 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:564: NUM_FLOAT { mNUM_FLOAT(); } break; case 101 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:574: CHAR_LITERAL { mCHAR_LITERAL(); } break; case 102 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:1:587: STRING_LITERAL { mSTRING_LITERAL(); } break; } } | 6736 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6736/7e425814ce563fcc662b266adb2a4dc8e1a95d19/JavaParserLexer.java/buggy/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParserLexer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
312,
5157,
1435,
1216,
9539,
288,
3639,
368,
342,
6588,
19,
70,
947,
19,
12922,
19,
14915,
19,
10649,
8464,
7482,
19,
12215,
17,
9576,
19,
4816,
19,
5254,
19,
6290,
19,
3341,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
312,
5157,
1435,
1216,
9539,
288,
3639,
368,
342,
6588,
19,
70,
947,
19,
12922,
19,
14915,
19,
10649,
8464,
7482,
19,
12215,
17,
9576,
19,
4816,
19,
5254,
19,
6290,
19,
3341,... |
String tabId = runtimeData.getParameter("elementID"); try { | try { String tabId = runtimeData.getParameter("elementID"); | public void setRuntimeData (ChannelRuntimeData rd) throws PortalException { runtimeData = rd; // If the user hasn't clicked on a tab, get persisted active tab if (activeTab.equals("none")) activeTab = getActiveTab(); action = runtimeData.getParameter("action"); if (action != null) { // Select tab if (action.equals("selectTab")) activeTab = runtimeData.getParameter("activeTab"); // Set active tab else if (action.equals("setActiveTab")) { try { setActiveTab(activeTab); } catch (Exception e) { Logger.log(Logger.ERROR, e); action = "error"; errorMessage = errorMessageSetActiveTab; } } // Rename tab else if (action.equals("renameTab")) { String tabId = runtimeData.getParameter("elementID"); String tabName = runtimeData.getParameter("tabName"); try { renameTab(tabId, tabName); } catch (Exception e) { Logger.log(Logger.ERROR, e); action = "error"; errorMessage = errorMessageRenameTab; } } // Move tab else if (action.equals("moveTab")) { String methodAndID = runtimeData.getParameter("method_ID"); String sourceTabId = runtimeData.getParameter("elementID"); int indexOf_ = methodAndID.indexOf("_"); String method = methodAndID.substring(0, indexOf_); // insertBefore or appendAfter String destinationTabId = methodAndID.substring(indexOf_ + 1); try { moveTab(sourceTabId, method, destinationTabId); } catch (Exception e) { Logger.log(Logger.ERROR, e); action = "error"; errorMessage = errorMessageMoveTab; } } // Add tab else if (action.equals("addTab")) { String tabName = runtimeData.getParameter("tabName"); String methodAndID = runtimeData.getParameter("method_ID"); int indexOf_ = methodAndID.indexOf("_"); String method = methodAndID.substring(0, indexOf_); // insertBefore or appendAfter String destinationTabId = methodAndID.substring(indexOf_ + 1); try { addFolder(tabName, method, destinationTabId); } catch (Exception e) { Logger.log(Logger.ERROR, e); action = "error"; errorMessage = errorMessageAddTab; } } // Delete tab else if (action.equals("deleteTab")) { String tabId = runtimeData.getParameter("elementID"); try { deleteElement(tabId); } catch (Exception e) { Logger.log(Logger.ERROR, e); action = "error"; errorMessage = errorMessageDeleteTab; } } // Select column else if (action.equals("selectColumn")) elementID = runtimeData.getParameter("elementID"); // Change column width(s) else if (action.equals("columnWidth")) { HashMap columnWidths = new HashMap(); Enumeration eParams = runtimeData.getParameterNames(); while (eParams.hasMoreElements()) { String param = (String)eParams.nextElement(); String prefix = "columnWidth_"; if (param.startsWith(prefix)) { String folderId = param.substring(prefix.length()); String newWidth = runtimeData.getParameter(prefix + folderId); columnWidths.put(folderId, newWidth); } } try { changeColumnWidths(columnWidths); } catch (Exception e) { Logger.log(Logger.ERROR, e); action = "error"; errorMessage = errorMessageChangeColumnWidths; } } // Move column else if (action.equals("moveColumn")) { String activeTabParam = runtimeData.getParameter("activeTab"); if (activeTabParam != null) activeTab = activeTabParam; } // Move column here else if (action.equals("moveColumnHere")) { String method = runtimeData.getParameter("method"); String destinationId = runtimeData.getParameter("elementID"); try { moveColumn(elementID, method, destinationId); } catch (Exception e) { Logger.log(Logger.ERROR, e); action = "error"; errorMessage = errorMessageMoveColumn; } } // New column else if (action.equals("newColumn")) { String columnName = ""; String method = runtimeData.getParameter("method"); elementID = runtimeData.getParameter("elementID"); String destinationColumnId = elementID; try { addFolder(columnName, method, destinationColumnId); } catch (Exception e) { Logger.log(Logger.ERROR, e); action = "error"; errorMessage = errorMessageNewColumn; } } // Add column else if (action.equals("addColumn")) { // Currently not implemented... // We need to assign widths to columns. // The action addColumn isn't in the stylesheet yet. } // Delete column else if (action.equals("deleteColumn")) { String columnId = runtimeData.getParameter("elementID"); try { deleteElement(columnId); } catch (Exception e) { Logger.log(Logger.ERROR, e); action = "error"; errorMessage = errorMessageDeleteColumn; } } // Select channel else if (action.equals("selectChannel")) { elementID = runtimeData.getParameter("elementID"); } // Move channel else if (action.equals("moveChannel")) { String activeTabParam = runtimeData.getParameter("activeTab"); if (activeTabParam != null) activeTab = activeTabParam; } // Move channel here else if (action.equals("moveChannelHere")) { String method = runtimeData.getParameter("method"); String destinationId = runtimeData.getParameter("elementID"); try { moveChannel(elementID, method, destinationId); } catch (Exception e) { Logger.log(Logger.ERROR, e); action = "error"; errorMessage = errorMessageMoveChannel; } } // Delete channel else if (action.equals("deleteChannel")) { String channelId = runtimeData.getParameter("elementID"); try { deleteElement(channelId); } catch (Exception e) { Logger.log(Logger.ERROR, e); action = "error"; errorMessage = errorMessageDeleteChannel; } } } else action = "none"; } | 24959 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/24959/d8498f8a41b27b734536a3185386a790969aafc5/TabColumnPrefsState.java/clean/source/org/jasig/portal/channels/UserPreferences/TabColumnPrefsState.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
444,
5576,
751,
261,
2909,
5576,
751,
9437,
13,
1216,
25478,
503,
565,
288,
1377,
3099,
751,
273,
9437,
31,
1377,
368,
971,
326,
729,
13342,
1404,
17688,
603,
279,
3246,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
444,
5576,
751,
261,
2909,
5576,
751,
9437,
13,
1216,
25478,
503,
565,
288,
1377,
3099,
751,
273,
9437,
31,
1377,
368,
971,
326,
729,
13342,
1404,
17688,
603,
279,
3246,
16,
... |
final JCheckBox usePreviousOutput = new JCheckBox( "Use Output From Previous Task"); | final JCheckBox usePreviousOutput = taskDisplay.parameters[i].createUseOutputFromPreviousTaskCheckBox(); | private void addTaskParameters(final int taskIndex, GroupPanel togglePanel) { int startParameterRow = tasksLayout.getRowCount() + 1; for (int i = 0; i < model.getParameterCount(taskIndex); i++) { String paramName = model.getParameterName(taskIndex, i); CellConstraints cc = new CellConstraints(); JLabel label = new JLabel(AnalysisServiceDisplay .getDisplayString(paramName) + ":"); togglePanel.addToggleComponent(label); tasksLayout.appendRow(new RowSpec("pref")); tasksPanel.add(label, cc.xy(1, tasksLayout.getRowCount(), CellConstraints.RIGHT, CellConstraints.CENTER)); if (model.isChoiceList(taskIndex, i)) { JComboBox comboBox = new JComboBox(model.getChoices(taskIndex, i)); String value = model.getValue(taskIndex, i); for (int j = 0; j < comboBox.getItemCount(); j++) { if (((ParameterChoice) comboBox.getItemAt(j)) .equalsCmdLineOrUIValue(value)) { comboBox.setSelectedIndex(j); break; } } comboBox.setSelectedItem(model.getValue(taskIndex, i)); tasksPanel.add(comboBox, cc.xy(3, tasksLayout.getRowCount(), CellConstraints.LEFT, CellConstraints.BOTTOM)); togglePanel.addToggleComponent(comboBox); } else if (model.isInputFile(taskIndex, i)) { final JTextField inputComponent = new JTextField(20); JPanel inputPanel = new JPanel(); inputPanel.setOpaque(false); inputPanel.setBackground(getBackground()); FormLayout inputPanelLayout = new FormLayout( "left:pref:none, left:pref:none, left:pref:none, left:pref:none, left:default:none", "pref"); // input field, browse, task drop down, // output file drop down, checkbox inputPanel.setLayout(inputPanelLayout); final JButton browseBtn = new JButton("Browse..."); browseBtn.setOpaque(false); browseBtn.setBackground(getBackground()); browseBtn.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { File f = GUIUtil.showOpenDialog(); if (f != null) { inputComponent.setText(f.getPath()); } } }); final JCheckBox usePreviousOutput = new JCheckBox( "Use Output From Previous Task"); usePreviousOutput.setOpaque(false); usePreviousOutput.setBackground(getBackground()); inputPanel.add(inputComponent, cc.xy(1, 1)); inputPanel.add(browseBtn, cc.xy(2, 1)); inputPanel.add(usePreviousOutput, cc.xy(5, 1)); togglePanel.addToggleComponent(inputPanel); tasksPanel.add(inputPanel, cc.xy(3, tasksLayout.getRowCount(), CellConstraints.LEFT, CellConstraints.BOTTOM)); Vector previousTaskNames = new Vector(); previousTaskNames.add("Choose Task"); for (int k = 0; k < taskIndex; k++) { previousTaskNames .add((k + 1) + ". " + model.getTaskName(k)); } final JComboBox tasksComboBox = new JComboBox(previousTaskNames); tasksComboBox.setOpaque(false); final JComboBox outputFilesComboBox = new JComboBox(); outputFilesComboBox.setOpaque(false); inputPanel.add(tasksComboBox, cc.xy(3, 1)); inputPanel.add(outputFilesComboBox, cc.xy(4, 1)); usePreviousOutput.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { browseBtn.setVisible(!usePreviousOutput.isSelected()); inputComponent.setVisible(!usePreviousOutput .isSelected()); tasksComboBox .setVisible(usePreviousOutput.isSelected()); outputFilesComboBox.setVisible(usePreviousOutput .isSelected() && outputFilesComboBox.getItemCount() > 0); } }); int inheritedTaskIndex = model.getInheritedTaskIndex(taskIndex, i); browseBtn.setVisible(inheritedTaskIndex == -1); inputComponent.setVisible(inheritedTaskIndex == -1); tasksComboBox.setVisible(inheritedTaskIndex != -1); outputFilesComboBox.setVisible(inheritedTaskIndex != -1); usePreviousOutput.setSelected(inheritedTaskIndex != -1); tasksComboBox.addItemListener(new ItemListener() { public void itemStateChanged(ItemEvent e) { if (e.getStateChange() != ItemEvent.SELECTED) { return; } String item = (String) tasksComboBox.getSelectedItem(); if (item.equals("Choose Task")) { outputFilesComboBox.removeAllItems(); outputFilesComboBox.setVisible(false); } else { outputFilesComboBox.setVisible(true); outputFilesComboBox.removeAllItems(); int index = Integer.parseInt(item.substring(0, item .indexOf("."))) - 1; List outputFileTypes = model .getOutputFileTypes(taskIndex); for (int i = 0; i < outputFileTypes.size(); i++) { outputFilesComboBox.addItem(outputFileTypes .get(i)); } outputFilesComboBox.addItem("1st output"); outputFilesComboBox.addItem("2nd output"); outputFilesComboBox.addItem("3rd output"); outputFilesComboBox.addItem("4th output"); outputFilesComboBox.addItem("stdout"); outputFilesComboBox.addItem("stderr"); } } }); tasksComboBox.setBackground(getBackground()); outputFilesComboBox.setBackground(getBackground()); if (inheritedTaskIndex != -1) { tasksComboBox.setSelectedItem((inheritedTaskIndex + 1) + ". " + model.getTaskName(inheritedTaskIndex)); outputFilesComboBox.setSelectedItem(model.getInheritedFile( taskIndex, i)); } else { inputComponent.setText(model.getValue(taskIndex, i)); } } else { JTextField inputComponent = new JTextField(model.getValue( taskIndex, i), 20); tasksPanel.add(inputComponent, cc.xy(3, tasksLayout .getRowCount(), CellConstraints.LEFT, CellConstraints.BOTTOM)); togglePanel.addToggleComponent(inputComponent); } } int endParameterRow = tasksLayout.getRowCount(); int[] group = new int[endParameterRow - startParameterRow + 1]; for (int i = startParameterRow, index = 0; i <= endParameterRow; i++, index++) { group[index] = i; } int[][] rowGroups = tasksLayout.getRowGroups(); int[][] newRowGroups = new int[rowGroups.length + 1][]; for (int i = 0; i < rowGroups.length; i++) { newRowGroups[i] = rowGroups[i]; } newRowGroups[newRowGroups.length - 1] = group; tasksLayout.setRowGroups(newRowGroups); } | 57344 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57344/588e060508ad56b157ee043d1c4214945bb18454/PipelineComponent.java/clean/clients/JavaGE/src/org/genepattern/gpge/ui/tasks/pipeline/PipelineComponent.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
527,
2174,
2402,
12,
6385,
509,
1562,
1016,
16,
3756,
5537,
10486,
5537,
13,
288,
202,
202,
474,
787,
1662,
1999,
273,
4592,
3744,
18,
588,
26359,
1435,
397,
404,
31,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
527,
2174,
2402,
12,
6385,
509,
1562,
1016,
16,
3756,
5537,
10486,
5537,
13,
288,
202,
202,
474,
787,
1662,
1999,
273,
4592,
3744,
18,
588,
26359,
1435,
397,
404,
31,
20... |
PsiElement element = suppressedScope instanceof PsiComment ? PsiTreeUtil.skipSiblingsForward(suppressedScope, PsiWhiteSpace.class) : suppressedScope.getFirstChild(); PsiElement annotation = InspectionManagerEx.getElementToolSuppressedIn(element, toolId); if (annotation != null && annotation.isValid()) { | PsiMember psiMember; if (suppressedScope instanceof PsiMember) { psiMember = (PsiMember)suppressedScope; } else { psiMember = PsiTreeUtil.getParentOfType(suppressedScope, PsiDocCommentOwner.class); } if (psiMember != null && psiMember.isValid()) { | private CommonProblemDescriptor[] checkElement(RefClass refEntity, InspectionManager manager, final Project project) { final PsiElement psiElement = refEntity.getElement(); final Map<PsiElement, Collection<String>> suppressedScopes = new THashMap<PsiElement, Collection<String>>(); psiElement.accept(new PsiRecursiveElementVisitor() { public void visitModifierList(PsiModifierList list) { super.visitModifierList(list); final PsiElement parent = list.getParent(); if (parent instanceof PsiModifierListOwner && !(parent instanceof PsiClass)) { checkElement(parent); } } public void visitComment(PsiComment comment) { checkElement(comment); } public void visitClass(PsiClass aClass) { if (aClass == psiElement) { super.visitClass(aClass); checkElement(aClass); } } private void checkElement(final PsiElement owner) { String idsString = InspectionManagerEx.getSuppressedInspectionIdsIn(owner); if (idsString != null && idsString.length() != 0) { List<String> ids = StringUtil.split(idsString, ","); Collection<String> suppressed = suppressedScopes.get(owner); if (suppressed == null) { suppressed = ids; } else { for (String id : ids) { if (!suppressed.contains(id)) { suppressed.add(id); } } } suppressedScopes.put(owner, suppressed); } } }); if (suppressedScopes.values().isEmpty()) return null; // have to visit all file from scratch since inspections can be written in any perversive way including checkFile() overriding final ModifiableModel model = InspectionProjectProfileManager.getInstance(manager.getProject()).getInspectionProfile(psiElement).getModifiableModel(); InspectionProfileWrapper profile = new InspectionProfileWrapper((InspectionProfile)model); profile.init(manager.getProject()); Collection<InspectionTool> suppressedTools = new THashSet<InspectionTool>(); InspectionTool[] tools = profile.getInspectionTools(); for (Collection<String> ids : suppressedScopes.values()) { for (String id : ids) { String shortName = id.trim(); for (InspectionTool tool : tools) { if (tool.getShortName().equals(shortName)) { suppressedTools.add(tool); } } } } GlobalInspectionContextImpl globalContext = ((InspectionManagerEx)InspectionManager.getInstance(project)).createNewGlobalContext(false); final RefManagerImpl refManager = ((RefManagerImpl)globalContext.getRefManager()); refManager.inspectionReadActionStarted(); final List<ProblemDescriptor> result; try { result = new ArrayList<ProblemDescriptor>(); for (InspectionTool tool : suppressedTools) { String toolId = tool.getShortName(); tool.initialize(globalContext); Collection<CommonProblemDescriptor> descriptors; if (tool instanceof LocalInspectionToolWrapper) { LocalInspectionToolWrapper local = (LocalInspectionToolWrapper)tool; if (local.getTool() instanceof UnfairLocalInspectionTool) continue; //cant't work with passes other than LocalInspectionPass local.processFile(psiElement.getContainingFile(), false, manager); descriptors = local.getProblemDescriptors(); } else if (tool instanceof GlobalInspectionToolWrapper) { GlobalInspectionToolWrapper global = (GlobalInspectionToolWrapper)tool; global.processFile(new AnalysisScope(psiElement.getContainingFile()), manager, globalContext); descriptors = global.getProblemDescriptors(); } else { continue; } for (PsiElement suppressedScope : suppressedScopes.keySet()) { Collection<String> suppressedIds = suppressedScopes.get(suppressedScope); if (!suppressedIds.contains(toolId)) continue; boolean hasErrorInsideSuppressedScope = false; for (CommonProblemDescriptor descriptor : descriptors) { if (!(descriptor instanceof ProblemDescriptor)) continue; PsiElement element = ((ProblemDescriptor)descriptor).getPsiElement(); if (element == null) continue; PsiElement annotation = InspectionManagerEx.getElementToolSuppressedIn(element, toolId); if (annotation != null && PsiTreeUtil.isAncestor(suppressedScope, annotation, false)) { hasErrorInsideSuppressedScope = true; break; } } if (!hasErrorInsideSuppressedScope) { PsiElement element = suppressedScope instanceof PsiComment ? PsiTreeUtil.skipSiblingsForward(suppressedScope, PsiWhiteSpace.class) : suppressedScope.getFirstChild(); PsiElement annotation = InspectionManagerEx.getElementToolSuppressedIn(element, toolId); if (annotation != null && annotation.isValid()) { String description = InspectionsBundle.message("inspection.redundant.suppression.description"); if (myQuickFixes == null) myQuickFixes = new BidirectionalMap<String, QuickFix>(); QuickFix fix = myQuickFixes.get(toolId); if (fix == null) { fix = new RemoveSuppressWarningAction(toolId); myQuickFixes.put(toolId, fix); } ProblemDescriptor descriptor = manager.createProblemDescriptor(annotation, description, (LocalQuickFix)fix, ProblemHighlightType.GENERIC_ERROR_OR_WARNING); result.add(descriptor); } } } } } finally { refManager.inspectionReadActionFinished(); } return result.toArray(new ProblemDescriptor[result.size()]); } | 17306 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17306/692d438e4452937425c8daf6bd2e484ebf72487b/RedundantSuppressInspection.java/clean/inspections/impl/com/intellij/codeInspection/RedundantSuppressInspection.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
5658,
13719,
3187,
8526,
866,
1046,
12,
1957,
797,
1278,
1943,
16,
22085,
7017,
1318,
3301,
16,
727,
5420,
1984,
13,
288,
565,
727,
453,
7722,
1046,
23921,
1046,
273,
1278,
1943,
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,
3238,
5658,
13719,
3187,
8526,
866,
1046,
12,
1957,
797,
1278,
1943,
16,
22085,
7017,
1318,
3301,
16,
727,
5420,
1984,
13,
288,
565,
727,
453,
7722,
1046,
23921,
1046,
273,
1278,
1943,
18... |
double totalL6BaseRate = deriveTotalQty(countedStartTime, endTime, relevantL6Tasks); | double totalL6BaseQty = deriveTotalQty(countedStartTime, endTime, relevantL6Tasks); | private Task translateLevel2Task(Task level2Task, Collection relevantL6Tasks) { Task doneLevel2Task = null; long lastActualSeen = ((Long) endTimeMap.get(getTaskUtils().getCustomer(level2Task))).longValue(); long endTime = getTaskUtils().getEndTime(level2Task); long startTime = getTaskUtils().getStartTime(level2Task); boolean alreadyDisposed = false; double expL2BaseRate = 0; PlanElement pe = level2Task.getPlanElement(); if (pe != null) { if (pe instanceof Expansion) { Expansion exp = (Expansion) pe; Enumeration subtasks = exp.getWorkflow().getTasks(); while (subtasks.hasMoreElements()) { Task subtask = (Task) subtasks.nextElement(); expL2BaseRate += getBaseUnitPerSecond(getTaskUtils().getRate(subtask)); } } else if (pe instanceof Disposition) { alreadyDisposed = true; } } if (lastActualSeen >= endTime) { doneLevel2Task = level2Task; } else { long countedStartTime = Math.max(startTime, lastActualSeen); double totalL6BaseRate = deriveTotalQty(countedStartTime, endTime, relevantL6Tasks); Rate origL2Rate = getTaskUtils().getRate(level2Task); double origL2BaseRate = deriveTotalQty(countedStartTime, endTime, level2Task);// double origL2BaseRate = getBaseUnitPerSecond(origL2Rate); if (totalL6BaseRate >= origL2BaseRate) { doneLevel2Task = level2Task; } else { double newL2BaseRate = origL2BaseRate - totalL6BaseRate; if (newL2BaseRate != origL2BaseRate) { Rate newL2Rate = newRateFromUnitPerSecond(origL2Rate, newL2BaseRate); expandLevel2Task(level2Task, newL2Rate, lastActualSeen); } } } if (alreadyDisposed) { return null; } return doneLevel2Task; } | 11319 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11319/c90f2f883353d21c46d8cb7a6348fb9cec03aaca/Level2Expander.java/buggy/bbn/src/org/cougaar/logistics/plugin/trans/Level2Expander.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
3837,
4204,
2355,
22,
2174,
12,
2174,
1801,
22,
2174,
16,
19694,
2200,
9368,
48,
26,
6685,
13,
288,
565,
3837,
2731,
2355,
22,
2174,
273,
446,
31,
565,
1525,
1142,
11266,
15160,
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,
3238,
3837,
4204,
2355,
22,
2174,
12,
2174,
1801,
22,
2174,
16,
19694,
2200,
9368,
48,
26,
6685,
13,
288,
565,
3837,
2731,
2355,
22,
2174,
273,
446,
31,
565,
1525,
1142,
11266,
15160,
2... |
fs.put("routingBackoff", Long.toString((Math.max(routingBackedOffUntil - now, 0)))); | fs.put("routingBackoff", Long.toString((Math.max(getRoutingBackedOffUntil() - now, 0)))); | public SimpleFieldSet exportVolatileFieldSet() { SimpleFieldSet fs = new SimpleFieldSet(true); fs.put("averagePingTime", Double.toString(averagePingTime())); long now = System.currentTimeMillis(); long idle = now - lastReceivedPacketTime(); if(idle > (60 * 1000)) { // 1 minute fs.put("idle", Long.toString(idle)); } fs.put("lastRoutingBackoffReason", getLastBackoffReason()); long tempPeerAddedTime = getPeerAddedTime(); if(tempPeerAddedTime > 1) { fs.put("peerAddedTime", Long.toString(tempPeerAddedTime)); } fs.put("routingBackoffPercent", Double.toString(backedOffPercent.currentValue() * 100)); fs.put("routingBackoff", Long.toString((Math.max(routingBackedOffUntil - now, 0)))); fs.put("routingBackoffLength", Integer.toString(getRoutingBackoffLength())); fs.put("status", getPeerNodeStatusString()); return fs; } | 46035 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46035/7575bc3fb32360236cef62f655076b5de182f7d4/PeerNode.java/buggy/src/freenet/node/PeerNode.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
4477,
974,
694,
3359,
17431,
20295,
974,
694,
1435,
288,
377,
202,
5784,
974,
694,
2662,
273,
394,
4477,
974,
694,
12,
3767,
1769,
202,
202,
2556,
18,
458,
2932,
15621,
17223,
950,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
4477,
974,
694,
3359,
17431,
20295,
974,
694,
1435,
288,
377,
202,
5784,
974,
694,
2662,
273,
394,
4477,
974,
694,
12,
3767,
1769,
202,
202,
2556,
18,
458,
2932,
15621,
17223,
950,
... |
Text elapsedTimeText = toolkit.createText(sectionClient, elapsedTimeString, SWT.BORDER); | final Text elapsedTimeText = toolkit.createText(sectionClient, elapsedTimeString, SWT.NONE); | private void createPlanningSection(Composite parent, FormToolkit toolkit) { Section section = toolkit.createSection(parent, ExpandableComposite.TITLE_BAR | Section.TWISTIE); section.setText("Planning"); section.setLayout(new GridLayout()); section.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); section.setExpanded(true); section.addExpansionListener(new IExpansionListener() { public void expansionStateChanging(ExpansionEvent e) { form.reflow(true); } public void expansionStateChanged(ExpansionEvent e) { form.reflow(true); } }); Composite sectionClient = toolkit.createComposite(section); section.setClient(sectionClient); GridLayout layout = new GridLayout(); layout.numColumns = 6; layout.makeColumnsEqualWidth = false; sectionClient.setLayout(layout); GridData clientDataLayout = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING); sectionClient.setLayoutData(clientDataLayout); // Reminder Label label = toolkit.createLabel(sectionClient, "Reminder:"); label.setForeground(toolkit.getColors().getColor(FormColors.TITLE)); datePicker = new DatePicker(sectionClient, SWT.FILL); Calendar calendar = Calendar.getInstance(); if (task.getReminderDate() != null) { calendar.setTime(task.getReminderDate()); datePicker.setDate(calendar); } datePicker.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE)); datePicker.addPickerSelectionListener(new SelectionListener() { public void widgetSelected(SelectionEvent arg0) { TaskInfoEditor.this.markDirty(true); } public void widgetDefaultSelected(SelectionEvent arg0) { // ignore } }); removeReminder = toolkit.createButton(sectionClient, "Clear", SWT.PUSH | SWT.CENTER); if (task.isActive()) { removeReminder.setEnabled(false); } else { removeReminder.setEnabled(true); } removeReminder.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { datePicker.setDate(null); datePicker.setDateText(""); TaskInfoEditor.this.markDirty(true); } }); // 3 Blank columns after Reminder clear button Label dummy = toolkit.createLabel(sectionClient, ""); GridData dummyLabelDataLayout = new GridData(GridData.FILL_HORIZONTAL); dummyLabelDataLayout.horizontalSpan = 3; dummy.setLayoutData(dummyLabelDataLayout); // Estimated time label = toolkit.createLabel(sectionClient, "Estimated time:"); label.setForeground(toolkit.getColors().getColor(FormColors.TITLE)); estimated = new Spinner(sectionClient, SWT.BORDER); estimated.setSelection(task.getEstimateTimeHours()); estimated.setDigits(0); estimated.setMaximum(100); estimated.setMinimum(0); estimated.setIncrement(1); estimated.addModifyListener(new ModifyListener() { public void modifyText(ModifyEvent e) { TaskInfoEditor.this.markDirty(true); } }); GridData estimatedDataLayout = new GridData(); estimatedDataLayout.widthHint = 105; estimated.setLayoutData(estimatedDataLayout); label = toolkit.createLabel(sectionClient, "hours "); label.setForeground(toolkit.getColors().getColor(FormColors.TITLE)); // 1 Blank column Label blankLabel2 = toolkit.createLabel(sectionClient, ""); GridData blankLabl2Layout = new GridData(GridData.HORIZONTAL_ALIGN_CENTER); blankLabl2Layout.horizontalSpan = 1; blankLabl2Layout.widthHint = 25; blankLabel2.setLayoutData(blankLabl2Layout); // Creation date label = toolkit.createLabel(sectionClient, "Creation date:"); label.setForeground(toolkit.getColors().getColor(FormColors.TITLE)); String creationDateString = ""; try { creationDateString = DateFormat.getDateInstance(DateFormat.LONG).format(task.getCreationDate()); } catch (RuntimeException e) { MylarStatusHandler.fail(e, "Could not format creation date", true); } Text creationDate = toolkit.createText(sectionClient, creationDateString, SWT.BORDER); creationDate.setEditable(false); creationDate.setEnabled(false); // Elapsed Time label = toolkit.createLabel(sectionClient, "Elapsed time:"); label.setForeground(toolkit.getColors().getColor(FormColors.TITLE)); String elapsedTimeString = "0"; try { elapsedTimeString = DateUtil.getFormattedDuration(task.getElapsedTime(), true); if (elapsedTimeString.equals("")) elapsedTimeString = "0"; } catch (RuntimeException e) { MylarStatusHandler.fail(e, "Could not format elapsed time", true); } Text elapsedTimeText = toolkit.createText(sectionClient, elapsedTimeString, SWT.BORDER); GridData td = new GridData(); td.widthHint = 105; elapsedTimeText.setLayoutData(td); elapsedTimeText.setEditable(false); // Blank Column toolkit.createLabel(sectionClient, ""); // 1 Blank column Label blankLabel3 = toolkit.createLabel(sectionClient, ""); GridData blankLabl3Layout = new GridData(GridData.HORIZONTAL_ALIGN_CENTER); blankLabl3Layout.horizontalSpan = 1; blankLabl3Layout.widthHint = 25; blankLabel3.setLayoutData(blankLabl2Layout); // Completion date label = toolkit.createLabel(sectionClient, "Completion date:"); label.setForeground(toolkit.getColors().getColor(FormColors.TITLE)); String completionDateString = ""; if (task.isCompleted()) { completionDateString = getTaskDateString(task); } endDate = toolkit.createText(sectionClient, completionDateString, SWT.BORDER); endDate.setEditable(false); endDate.setEnabled(false); } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/570c367589001ff6e9b8d5660225b8f019d41231/TaskInfoEditor.java/clean/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/TaskInfoEditor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
752,
1749,
10903,
5285,
12,
9400,
982,
16,
2748,
6364,
8691,
5226,
8691,
13,
288,
202,
202,
5285,
2442,
273,
5226,
8691,
18,
2640,
5285,
12,
2938,
16,
16429,
429,
9400,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
752,
1749,
10903,
5285,
12,
9400,
982,
16,
2748,
6364,
8691,
5226,
8691,
13,
288,
202,
202,
5285,
2442,
273,
5226,
8691,
18,
2640,
5285,
12,
2938,
16,
16429,
429,
9400,
... |
ruby.getRuntime().callTraceFunction(event, file, line, self.toRubyObject(), name, type); | ruby.getRuntime().callTraceFunction(event, file, line, self, name, type); | private void callTraceFunction(String event, String file, int line, IRubyObject self, String name, IRubyObject type) { ruby.getRuntime().callTraceFunction(event, file, line, self.toRubyObject(), name, type); } | 45298 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45298/f235ab756f32ea9496f8f880066b46ad95ebb692/EvaluateVisitor.java/clean/org/jruby/evaluator/EvaluateVisitor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
745,
3448,
2083,
12,
780,
871,
16,
514,
585,
16,
509,
980,
16,
15908,
10340,
921,
365,
16,
514,
508,
16,
15908,
10340,
921,
618,
13,
288,
3639,
22155,
18,
588,
5576,
7675,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
745,
3448,
2083,
12,
780,
871,
16,
514,
585,
16,
509,
980,
16,
15908,
10340,
921,
365,
16,
514,
508,
16,
15908,
10340,
921,
618,
13,
288,
3639,
22155,
18,
588,
5576,
7675,
... |
String group = (String) groupIt.next(); | Group group = (Group) groupIt.next(); | public Element toXml(Document doc, Stack stack) { Element collection = doc.createElement("collection"); if (stack.isEmpty()) { doc.appendChild(collection); } else { ((Element) stack.peek()).appendChild(collection); } stack.push(collection); collection.setAttribute("id", m_id); collection.setAttribute(ACCESS_MODE, m_access.toString()); collection.setAttribute(RELEASE_DATE, m_releaseDate.toString()); collection.setAttribute(RETRACT_DATE, m_retractDate.toString()); // properties m_properties.toXml(doc, stack); stack.pop(); // add groups if ((m_groups != null) && (m_groups.size() > 0)) { Iterator groupIt = m_groups.iterator(); while( groupIt.hasNext()) { String group = (String) groupIt.next(); Element sect = doc.createElement(GROUP_LIST); sect.setAttribute(GROUP_NAME, group); collection.appendChild(sect); } } return collection; } // toXml | 2021 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2021/bdd2e30fffef6cd4311f176078f2c71efd37065a/BaseContentService.java/clean/content/content-impl/impl/src/java/org/sakaiproject/content/impl/BaseContentService.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
3010,
358,
4432,
12,
2519,
997,
16,
7283,
2110,
13,
202,
202,
95,
1082,
202,
1046,
1849,
273,
997,
18,
2640,
1046,
2932,
5548,
8863,
1082,
202,
430,
261,
3772,
18,
291,
1921,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
3010,
358,
4432,
12,
2519,
997,
16,
7283,
2110,
13,
202,
202,
95,
1082,
202,
1046,
1849,
273,
997,
18,
2640,
1046,
2932,
5548,
8863,
1082,
202,
430,
261,
3772,
18,
291,
1921,... |
protected void processMessage(Session nettySession, Message message) { logDebug(nettySession, null, "received message"); quickfix.Session quickfixSession = getQuickFixSession(nettySession); if (quickfixSession == null) { return; } | protected void processMessage(Message message) { FIXMessageData fixMessageData = (FIXMessageData) message; quickfix.Session quickfixSession = fixMessageData.getSession(); | protected void processMessage(Session nettySession, Message message) { logDebug(nettySession, null, "received message"); quickfix.Session quickfixSession = getQuickFixSession(nettySession); if (quickfixSession == null) { return; } try { FIXMessageData fixMessageData = (FIXMessageData) message; quickfixSession.getState().logIncoming(fixMessageData.toString()); DataDictionary dataDictionary = quickfixSession.getDataDictionary(); quickfix.Message fixMessage = fixMessageData.parse(dataDictionary); try { quickfixSession.next(fixMessage); } catch (Throwable e) { quickfix.Log sessionLog = quickfixSession.getLog(); LogUtil.logThrowable(sessionLog, "error while receiving message", e); if (fixMessageData.isLogon()) { try { quickfixSession.disconnect(); } catch (IOException ioException) { LogUtil.logThrowable(sessionLog, "error during disconnect", ioException); } } } } catch (InvalidMessage e) { // TODO Auto-generated catch block e.printStackTrace(); } } | 52526 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52526/14d97a7e87eccc9940bc0d1266aee2b8a3a691bc/AbstractSocketInitiator.java/clean/src/quickfix/netty/AbstractSocketInitiator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
1207,
1079,
12,
2157,
2901,
4098,
2157,
16,
2350,
883,
13,
288,
3639,
613,
2829,
12,
2758,
4098,
2157,
16,
446,
16,
315,
15213,
883,
8863,
3639,
9549,
904,
18,
2157,
9549,
90... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1207,
1079,
12,
2157,
2901,
4098,
2157,
16,
2350,
883,
13,
288,
3639,
613,
2829,
12,
2758,
4098,
2157,
16,
446,
16,
315,
15213,
883,
8863,
3639,
9549,
904,
18,
2157,
9549,
90... |
public org.quickfix.field.UnderlyingCurrency getUnderlyingCurrency() throws FieldNotFound { org.quickfix.field.UnderlyingCurrency value = new org.quickfix.field.UnderlyingCurrency(); | public quickfix.field.UnderlyingCurrency getUnderlyingCurrency() throws FieldNotFound { quickfix.field.UnderlyingCurrency value = new quickfix.field.UnderlyingCurrency(); | public org.quickfix.field.UnderlyingCurrency getUnderlyingCurrency() throws FieldNotFound { org.quickfix.field.UnderlyingCurrency value = new org.quickfix.field.UnderlyingCurrency(); getField(value); return value; } | 5926 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5926/fecc27f98261270772ff182a1d4dfd94b5daa73d/QuoteCancel.java/buggy/src/java/src/quickfix/fix44/QuoteCancel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
14655,
6291,
7623,
10833,
765,
6291,
7623,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
14655,
6291,
7623,
460,
273,
394... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
14655,
6291,
7623,
10833,
765,
6291,
7623,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
14655,
6291,
7623,
460,
273,
394... |
int headerLength = stream.readInt(); bytesRead += 4; | int headerLength = readInt(stream, bigEndian); | private void loadBinary(String location) throws IOException { boolean bigEndian = true; DataInputStream stream = new DataInputStream (new BufferedInputStream(new FileInputStream(location))); // read standard header string-size; set bigEndian flag int headerLength = stream.readInt(); bytesRead += 4; if (headerLength != (DARPA_LM_HEADER.length() + 1)) { // not big-endian headerLength = Utilities.swapInteger(headerLength); if (headerLength == (DARPA_LM_HEADER.length() + 1)) { bigEndian = false; } else { throw new Error ("Bad binary LM file magic number: " + headerLength + ", not an LM dumpfile?"); } } // read and verify standard header string String header = readString(stream, headerLength - 1); stream.readByte(); // read the '\0' if (!header.equals(DARPA_LM_HEADER)) { throw new Error("Bad binary LM file header: " + header); } // read LM filename string size and string int fileNameLength = readInt(stream, bigEndian); for (int i = 0; i < fileNameLength; i++) { stream.readByte(); } numberUnigrams = 0; int logBigramSegmentSize = LOG2_BIGRAM_SEGMENT_SIZE_DEFAULT; // read version number, if present. it must be <= 0. int version = readInt(stream, bigEndian); System.out.println("Version: " + version); if (version <= 0) { // yes, its the version number readInt(stream, bigEndian); // read and skip timestamp // read and skip format description int formatLength; for (;;) { if ((formatLength = readInt(stream, bigEndian)) == 0) { break; } for (int i = 0; i < formatLength; i++) { stream.readByte(); bytesRead++; } } // read log bigram segment size if present if (version <= -2) { logBigramSegmentSize = readInt(stream, bigEndian); if (logBigramSegmentSize < 1 || logBigramSegmentSize > 15) { throw new Error("log2(bg_seg_sz) outside range 1..15"); } } numberUnigrams = readInt(stream, bigEndian); } else { numberUnigrams = version; } int bigramSegmentSize = 1 << logBigramSegmentSize; if (numberUnigrams <= 0) { throw new Error("Bad number of unigrams: " + numberUnigrams + ", must be > 0."); } System.out.println("# of unigrams: " + numberUnigrams); numberBigrams = readInt(stream, bigEndian); if (numberBigrams < 0) { throw new Error("Bad number of bigrams: " + numberBigrams); } System.out.println("# of bigrams: " + numberBigrams); numberTrigrams = readInt(stream, bigEndian); if (numberTrigrams < 0) { throw new Error("Bad number of trigrams: " + numberTrigrams); } System.out.println("# of trigrams: " + numberTrigrams); unigrams = readUnigrams(stream, numberUnigrams+1, bigEndian); // skip all the bigram entries, the +1 is the sentinel at the end if (numberBigrams > 0) { bigramOffset = bytesRead; int bytesToSkip = (numberBigrams + 1) * 8; stream.skipBytes(bytesToSkip); bytesRead += bytesToSkip; } // skip all the trigram entries if (numberTrigrams > 0) { trigramOffset = bytesRead; int bytesToSkip = numberTrigrams * 4; stream.skipBytes(bytesToSkip); bytesRead += bytesToSkip; } // read the bigram probabilities table if (numberBigrams > 0) { this.bigramProbTable = readProbabilitiesTable(stream, bigEndian); } // read the trigram backoff weight table and trigram prob table if (numberTrigrams > 0) { trigramBackoffTable = readProbabilitiesTable(stream, bigEndian); trigramProbTable = readProbabilitiesTable(stream, bigEndian); int trigramSegTableSize = ((numberBigrams+1)/bigramSegmentSize)+1; trigramSegmentTable = readTrigramSegmentTable(stream, bigEndian, trigramSegTableSize); } // read word string names int wordsStringLength = readInt(stream, bigEndian); if (wordsStringLength <= 0) { throw new Error("Bad word string size: " + wordsStringLength); } // read the string of all words String wordsString = readString(stream, wordsStringLength); // first make sure string just read contains ucount words int numberWords = 0; for (int i = 0; i < wordsStringLength; i++) { if (wordsString.charAt(i) == '\0') { numberWords++; } } if (numberWords != numberUnigrams) { throw new Error("Bad # of words: " + numberWords); } // break up string just read into words this.words = wordsString.split("\0"); buildUnigramIDMap(); applyUnigramWeight(); stream.close(); // finally, create the FileChannel to the file that will allow // us to do memory mapping FileInputStream is = new FileInputStream(location); fileChannel = is.getChannel(); } | 8350 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8350/0f7ad3fe72ded13081523bac441f7f95d64b4968/LargeTrigramModel.java/buggy/edu/cmu/sphinx/knowledge/language/large/LargeTrigramModel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1262,
5905,
12,
780,
2117,
13,
1216,
1860,
288,
202,
6494,
5446,
7583,
273,
638,
31,
202,
751,
4348,
1407,
273,
394,
29382,
202,
565,
261,
2704,
24742,
12,
2704,
11907,
12,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1262,
5905,
12,
780,
2117,
13,
1216,
1860,
288,
202,
6494,
5446,
7583,
273,
638,
31,
202,
751,
4348,
1407,
273,
394,
29382,
202,
565,
261,
2704,
24742,
12,
2704,
11907,
12,
3... |
if (child.isChildrenExceedBounds()) { setChildrenExceedBounds(true); } if (child.isFixedDescendant()) { setFixedDescendant(true); } | propagateChildProperties(child); | public void addChild(Box child) { if (child == null) { throw new NullPointerException("trying to add null child"); } child.setParent(this); boxes.add(child); if (child.isChildrenExceedBounds()) { setChildrenExceedBounds(true); } if (child.isFixedDescendant()) { setFixedDescendant(true); } } | 53937 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/53937/2486e0a7d32e8bf7a5ba0aa3c3626b52ad12da3c/Box.java/clean/src/java/org/xhtmlrenderer/render/Box.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
7384,
12,
3514,
1151,
13,
288,
3639,
309,
261,
3624,
422,
446,
13,
288,
5411,
604,
394,
10108,
2932,
698,
310,
358,
527,
446,
1151,
8863,
3639,
289,
3639,
1151,
18,
542,
3054... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7384,
12,
3514,
1151,
13,
288,
3639,
309,
261,
3624,
422,
446,
13,
288,
5411,
604,
394,
10108,
2932,
698,
310,
358,
527,
446,
1151,
8863,
3639,
289,
3639,
1151,
18,
542,
3054... |
/* Return a primitive or object array column. */ if ( eclazz.isPrimitive() ) { return PrimitiveArrayColumn.makePrimitiveColumn( base, data ); | /* Return a primitive column if possible. */ else if ( clazz == Boolean.class || clazz == Character.class || clazz == Byte.class || clazz == Short.class || clazz == Integer.class || clazz == Long.class || clazz == Float.class || clazz == Double.class ) { return PrimitiveArrayColumn.makePrimitiveColumn( base, nrow ); | public static ArrayColumn makeColumn( ColumnInfo base, Object data ) { /* Find out what it's an array of. */ Class eclazz = data.getClass().getComponentType(); /* Bail out if it's not an array. */ if ( eclazz == null ) { throw new IllegalArgumentException( "Data object is not an array " + " (it's a " + data.getClass() ); } /* Return a primitive or object array column. */ if ( eclazz.isPrimitive() ) { return PrimitiveArrayColumn.makePrimitiveColumn( base, data ); } else { return new ObjectArrayColumn( base, (Object[]) data ); } } | 48494 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48494/07f43a2bd2849fbf984167b982dea43aa34318e0/ArrayColumn.java/buggy/table/src/main/uk/ac/starlink/table/ArrayColumn.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1510,
1494,
1221,
1494,
12,
4753,
966,
1026,
16,
1033,
501,
262,
288,
3639,
1748,
4163,
596,
4121,
518,
1807,
392,
526,
434,
18,
1195,
3639,
1659,
425,
830,
3638,
273,
501,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1510,
1494,
1221,
1494,
12,
4753,
966,
1026,
16,
1033,
501,
262,
288,
3639,
1748,
4163,
596,
4121,
518,
1807,
392,
526,
434,
18,
1195,
3639,
1659,
425,
830,
3638,
273,
501,
1... |
consumerprefix = ci.consumertype + CONSUMERTYPE_SEPARATOR; viewpath = consumerprefix + viewparams.viewID; | consumerprefix = ci.consumertype + CONSUMERTYPE_SEPARATOR; viewpath = consumerprefix + viewparams.viewID; | public ViewTemplate locateTemplate(ViewParameters viewparams) { String viewpath = viewparams.viewID; String consumerprefix = null; if (ci.consumertype != null) { consumerprefix = ci.consumertype + CONSUMERTYPE_SEPARATOR; viewpath = consumerprefix + viewparams.viewID; } ViewTemplate template = (ViewTemplate) templates.get(viewpath); if (template == null) { String fullpath = basedir + viewpath + suffix; InputStream is = tryLoadTemplate(fullpath, consumerprefix == null); if (is == null && consumerprefix != null) { fullpath = basedir + viewparams.viewID + suffix; is = tryLoadTemplate(fullpath, true); } try { template = new XMLViewTemplate(); template.parse(is); template.setRelativePath(basedir.substring(1)); templates.put(viewpath, template); } catch (Exception e) { throw UniversalRuntimeException.accumulate(e, "Error parsing view template file " + fullpath); } } return template; } | 29 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/29/12d8604799b477105d658adc24aa01e952a647fd/BasicTemplateResolver.java/clean/rsf-core/core/src/uk/org/ponder/rsf/templateresolver/BasicTemplateResolver.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
4441,
2283,
10627,
2283,
12,
1767,
2402,
1476,
2010,
13,
288,
565,
514,
1476,
803,
273,
1476,
2010,
18,
1945,
734,
31,
565,
514,
4765,
3239,
273,
446,
31,
565,
309,
261,
8450,
18,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
4441,
2283,
10627,
2283,
12,
1767,
2402,
1476,
2010,
13,
288,
565,
514,
1476,
803,
273,
1476,
2010,
18,
1945,
734,
31,
565,
514,
4765,
3239,
273,
446,
31,
565,
309,
261,
8450,
18,... |
namespaceDeclarationLoop: while (LT(1) != IToken.tRBRACE) { int checkToken = LA(1).hashCode(); switch (LT(1)) { case IToken.tRBRACE: break namespaceDeclarationLoop; default: try { IASTDeclaration d = declaration(); d.setParent(namespaceDefinition); d .setPropertyInParent(ICPPASTNamespaceDefinition.OWNED_DECLARATION); namespaceDefinition.addDeclaration(d); } catch (BacktrackException bt) { IASTProblem p = failParse(bt); IASTProblemDeclaration pd = createProblemDeclaration(); p.setParent(pd); pd.setProblem(p); ((CPPASTNode) pd).setOffsetAndLength((CPPASTNode) p); p.setPropertyInParent(IASTProblemHolder.PROBLEM); namespaceDefinition.addDeclaration(pd); pd.setParent(namespaceDefinition); pd .setPropertyInParent(ICPPASTNamespaceDefinition.OWNED_DECLARATION); errorHandling(); if (checkToken == LA(1).hashCode()) errorHandling(); } } if (checkToken == LA(1).hashCode()) failParseWithErrorHandling(); } | namespaceDeclarationLoop: while (LT(1) != IToken.tRBRACE) { int checkToken = LA(1).hashCode(); switch (LT(1)) { case IToken.tRBRACE: break namespaceDeclarationLoop; default: try { IASTDeclaration d = declaration(); d.setParent(namespaceDefinition); d .setPropertyInParent(ICPPASTNamespaceDefinition.OWNED_DECLARATION); namespaceDefinition.addDeclaration(d); } catch (BacktrackException bt) { IASTProblem p = failParse(bt); IASTProblemDeclaration pd = createProblemDeclaration(); p.setParent(pd); pd.setProblem(p); ((CPPASTNode) pd).setOffsetAndLength((CPPASTNode) p); p.setPropertyInParent(IASTProblemHolder.PROBLEM); namespaceDefinition.addDeclaration(pd); pd.setParent(namespaceDefinition); pd .setPropertyInParent(ICPPASTNamespaceDefinition.OWNED_DECLARATION); errorHandling(); if (checkToken == LA(1).hashCode()) errorHandling(); } } if (checkToken == LA(1).hashCode()) failParseWithErrorHandling(); } | protected IASTDeclaration namespaceDefinitionOrAlias() throws BacktrackException, EndOfFileException { IToken first = consume(IToken.t_namespace); int last = first.getEndOffset(); IASTName name = null; // optional name if (LT(1) == IToken.tIDENTIFIER) { name = createName(identifier()); last = calculateEndOffset(name); } else name = createName(); if (LT(1) == IToken.tLBRACE) { consume(); ICPPASTNamespaceDefinition namespaceDefinition = createNamespaceDefinition(); ((ASTNode) namespaceDefinition).setOffset(first.getOffset()); namespaceDefinition.setName(name); name.setParent(namespaceDefinition); name.setPropertyInParent(ICPPASTNamespaceDefinition.NAMESPACE_NAME); namespaceDeclarationLoop: while (LT(1) != IToken.tRBRACE) { int checkToken = LA(1).hashCode(); switch (LT(1)) { case IToken.tRBRACE: break namespaceDeclarationLoop; default: try { IASTDeclaration d = declaration(); d.setParent(namespaceDefinition); d .setPropertyInParent(ICPPASTNamespaceDefinition.OWNED_DECLARATION); namespaceDefinition.addDeclaration(d); } catch (BacktrackException bt) { IASTProblem p = failParse(bt); IASTProblemDeclaration pd = createProblemDeclaration(); p.setParent(pd); pd.setProblem(p); ((CPPASTNode) pd).setOffsetAndLength((CPPASTNode) p); p.setPropertyInParent(IASTProblemHolder.PROBLEM); namespaceDefinition.addDeclaration(pd); pd.setParent(namespaceDefinition); pd .setPropertyInParent(ICPPASTNamespaceDefinition.OWNED_DECLARATION); errorHandling(); if (checkToken == LA(1).hashCode()) errorHandling(); } } if (checkToken == LA(1).hashCode()) failParseWithErrorHandling(); } // consume the } int end = consume(IToken.tRBRACE).getEndOffset(); ((CPPASTNode) namespaceDefinition).setLength(end - first.getOffset()); return namespaceDefinition; } else if (LT(1) == IToken.tASSIGN) { IToken assign = consume(IToken.tASSIGN); if (name.toString() == null) { throwBacktrack(first.getOffset(), assign.getEndOffset() - first.getOffset()); return null; } ITokenDuple duple = name(); IASTName qualifiedName = createName(duple); int end = consume(IToken.tSEMI).getEndOffset(); ICPPASTNamespaceAlias alias = createNamespaceAlias(); ((ASTNode) alias).setOffsetAndLength(first.getOffset(), end - first.getOffset()); alias.setAlias(name); name.setParent(alias); name.setPropertyInParent(ICPPASTNamespaceAlias.ALIAS_NAME); alias.setMappingName(qualifiedName); qualifiedName.setParent(alias); qualifiedName .setPropertyInParent(ICPPASTNamespaceAlias.MAPPING_NAME); return alias; } else { throwBacktrack(first.getOffset(), last - first.getOffset()); return null; } } | 54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/c4c31b724fe73e8f69d2d4f9fcd98d3ff359a2d3/GNUCPPSourceParser.java/clean/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GNUCPPSourceParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
467,
9053,
6094,
1981,
1852,
1162,
2936,
1435,
1082,
202,
15069,
4297,
4101,
503,
16,
4403,
951,
812,
503,
288,
202,
202,
1285,
969,
1122,
273,
7865,
12,
1285,
969,
18,
88,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
467,
9053,
6094,
1981,
1852,
1162,
2936,
1435,
1082,
202,
15069,
4297,
4101,
503,
16,
4403,
951,
812,
503,
288,
202,
202,
1285,
969,
1122,
273,
7865,
12,
1285,
969,
18,
88,
6... |
btns[i].setImage( ReportPlatformUIImages.getImage( imageName ) ); | if(btns[i].getImage( )==null)btns[i].setImage( ReportPlatformUIImages.getImage( imageName ) ); | public void load( ) { String value = getDescriptorProvider( ).load( ).toString( ); Button[] btns = { left, right, center, justify }; boolean stateFlag = ( ( value == null ) == btns[0].getEnabled( ) ); for ( int i = 0; i < btns.length; i++ ) { if ( btns[i].getData( ).equals( value ) ) btns[i].setSelection( true ); else btns[i].setSelection( false ); if ( stateFlag ) btns[i].setEnabled( value != null ); } String[] values = { DesignChoiceConstants.TEXT_ALIGN_LEFT, DesignChoiceConstants.TEXT_ALIGN_RIGHT, DesignChoiceConstants.TEXT_ALIGN_CENTER, DesignChoiceConstants.TEXT_ALIGN_JUSTIFY, }; for ( int i = 0; i < values.length; i++ ) { String imageName = values[i]; if ( !btns[i].isEnabled( ) ) imageName += IReportGraphicConstants.DIS; btns[i].setImage( ReportPlatformUIImages.getImage( imageName ) ); } } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/bfb581c20e708373cbacbbf37899bfb10601587a/FontAlignPropertyDescriptor.java/clean/UI/org.eclipse.birt.report.designer.ui.views/src/org/eclipse/birt/report/designer/internal/ui/views/attributes/widget/FontAlignPropertyDescriptor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1262,
12,
262,
202,
95,
202,
202,
780,
460,
273,
22161,
2249,
12,
262,
18,
945,
12,
262,
18,
10492,
12,
11272,
202,
202,
3616,
8526,
10921,
2387,
273,
288,
9506,
202,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1262,
12,
262,
202,
95,
202,
202,
780,
460,
273,
22161,
2249,
12,
262,
18,
945,
12,
262,
18,
10492,
12,
11272,
202,
202,
3616,
8526,
10921,
2387,
273,
288,
9506,
202,
4... |
public boolean isOldfNoColumnBalance() { return oldfNoColumnBalance.isSet(field_8_docinfo3); } | 509 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/509/79d06dc2b5e839d92f501b1ff8ea15e53d646732/DOPAbstractType.java/clean/src/scratchpad/src/org/apache/poi/hdf/model/hdftypes/definitions/DOPAbstractType.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
353,
7617,
74,
2279,
1494,
13937,
1435,
565,
288,
3639,
327,
1592,
74,
2279,
1494,
13937,
18,
291,
694,
12,
1518,
67,
28,
67,
2434,
1376,
23,
1769,
5411,
289,
2,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
353,
7617,
74,
2279,
1494,
13937,
1435,
565,
288,
3639,
327,
1592,
74,
2279,
1494,
13937,
18,
291,
694,
12,
1518,
67,
28,
67,
2434,
1376,
23,
1769,
5411,
289,
2,
-100,
-100,... | ||
return AttributePackage.eINSTANCE.getFormatSpecifier( ); | return AttributePackage.Literals.FORMAT_SPECIFIER; | protected EClass eStaticClass( ) { return AttributePackage.eINSTANCE.getFormatSpecifier( ); } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/036e8c78765730b146e5854b9d6c397a296fed86/FormatSpecifierImpl.java/buggy/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/model/attribute/impl/FormatSpecifierImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
8233,
425,
5788,
797,
12,
262,
202,
95,
202,
202,
2463,
3601,
2261,
18,
73,
13341,
18,
588,
1630,
21416,
12,
11272,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
8233,
425,
5788,
797,
12,
262,
202,
95,
202,
202,
2463,
3601,
2261,
18,
73,
13341,
18,
588,
1630,
21416,
12,
11272,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
public OutputStream getOutputStream() throws IOException { return impl.getOutputStream(); } | public OutputStream getOutputStream () throws IOException { if (impl != null) return impl.getOutputStream(); throw new IOException("Not connected"); } | public OutputStream getOutputStream() throws IOException { return impl.getOutputStream();} | 45713 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45713/af503bb72418d994f4439910bc3989d556fcdbd5/Socket.java/clean/libraries/javalib/java/net/Socket.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
8962,
22553,
1435,
1216,
1860,
288,
202,
2463,
9380,
18,
588,
4632,
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,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
8962,
22553,
1435,
1216,
1860,
288,
202,
2463,
9380,
18,
588,
4632,
5621,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
public void run() { fProgressIndicator.start(test.countTestCases()); } | public void run() {} | public void run() { fProgressIndicator.start(test.countTestCases()); } | 46809 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46809/bfc94ee739d62127c7477300b26127bd560765a1/TestRunner.java/buggy/junit/swingui/TestRunner.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4697,
202,
482,
918,
1086,
1435,
288,
6862,
202,
74,
5491,
13140,
18,
1937,
12,
3813,
18,
1883,
4709,
30744,
10663,
9506,
202,
97,
2,
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,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4697,
202,
482,
918,
1086,
1435,
288,
6862,
202,
74,
5491,
13140,
18,
1937,
12,
3813,
18,
1883,
4709,
30744,
10663,
9506,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Session session = getSession(sessionId); | Session session = getSession(sessionId); | public void setPermissions(java.lang.String sessionId, java.lang.String resource, java.lang.String owner, java.lang.String ownerGroup, int permissions) throws java.rmi.RemoteException { DBBroker broker = null; Session session = getSession(sessionId); Collection collection = null; DocumentImpl doc = null; TransactionManager transact = pool.getTransactionManager(); Txn transaction = transact.beginTransaction(); try { broker = pool.get(session.getUser()); org.exist.security.SecurityManager manager = pool .getSecurityManager(); collection = broker.openCollection(resource, Lock.WRITE_LOCK); if (collection == null) { doc = (DocumentImpl) broker.openDocument(resource, Lock.WRITE_LOCK); if (doc == null) throw new RemoteException("document or collection " + resource + " not found"); LOG.debug("changing permissions on document " + resource); Permission perm = doc.getPermissions(); if (perm.getOwner().equals(session.getUser().getName()) || manager.hasAdminPrivileges(session.getUser())) { if (owner != null) { perm.setOwner(owner); perm.setGroup(ownerGroup); } perm.setPermissions(permissions); broker.storeDocument(transaction, doc); transact.commit(transaction); broker.flush(); return;// return true; } transact.abort(transaction); throw new PermissionDeniedException("not allowed to change permissions"); } LOG.debug("changing permissions on collection " + resource); Permission perm = collection.getPermissions(); if (perm.getOwner().equals(session.getUser().getName()) || manager.hasAdminPrivileges(session.getUser())) { perm.setPermissions(permissions); if (owner != null) { perm.setOwner(owner); perm.setGroup(ownerGroup); } transaction.registerLock(collection.getLock(), Lock.WRITE_LOCK); broker.saveCollection(transaction, collection); transact.commit(transaction); broker.flush(); return; } transact.abort(transaction); throw new PermissionDeniedException("not allowed to change permissions"); } catch (PermissionDeniedException e) { transact.abort(transaction); throw new RemoteException(e.getMessage()); } catch (TransactionException e) { throw new RemoteException(e.getMessage()); } catch (EXistException e) { throw new RemoteException(e.getMessage()); } finally { if(doc != null) doc.getUpdateLock().release(Lock.WRITE_LOCK); pool.release(broker); } } | 2909 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2909/0909f8eb97be3b101ad96c593d2586e12ad0fd81/AdminSoapBindingImpl.java/clean/src/org/exist/soap/AdminSoapBindingImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
444,
6521,
12,
6290,
18,
4936,
18,
780,
10338,
16,
2252,
18,
4936,
18,
780,
1058,
16,
2252,
18,
4936,
18,
780,
3410,
16,
2252,
18,
4936,
18,
780,
3410,
1114,
16,
509,
4371,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
444,
6521,
12,
6290,
18,
4936,
18,
780,
10338,
16,
2252,
18,
4936,
18,
780,
1058,
16,
2252,
18,
4936,
18,
780,
3410,
16,
2252,
18,
4936,
18,
780,
3410,
1114,
16,
509,
4371,... |
private BootstrapSecurityInstaller createBoostrapSecurityInstaller() throws InstallerException { SystemConfiguration sc = getSystemConfiguration(); BootstrapSecurityInstaller si = null; try { InetAddress thisHost = null; try { thisHost = InetAddress.getLocalHost(); } catch (java.net.UnknownHostException ex) { throw new InstallerException("Host is not resolveable!", ex); } si = new BootstrapSecurityInstaller(sc, (String)getData(GrmInstallConstants.GRM_ADMIN_USER), thisHost); } catch (GridCAException ex) { throw new InstallerException("grm ca reported error", ex); } catch (com.sun.grid.grm.config.ConfigurationException ex) { throw new InstallerException("grm ca reported error", ex); } String authMethod = (String)getController().getModel().getData(GrmInstallConstants.SECURITY_AUTH_METHOD); if(log.isLoggable(Level.FINER)) { log.log(Level.FINER,"{0}: {1}", new Object [] { this.getName(),"execute" }); } if(log.isLoggable(Level.FINER)) { log.log(Level.FINER,"{0}: {1} System Conf: {2}", new Object [] { this.getName(), "execute", sc.toString() }); } if ( authMethod.equals(GrmInstallConstants.AUTH_NIS)) { String server = (String)getController().getModel().getData(GrmInstallConstants.SECURITY_AUTH_NIS_SERVER); String domain = (String)getController().getModel().getData(GrmInstallConstants.SECURITY_AUTH_NIS_DOMAIN); si.addNisLoginModule(server, domain, BootstrapSecurityInstaller.LoginModuleFlag.optional); } else if ( authMethod.equals(GrmInstallConstants.AUTH_PAM)) { String service = (String)getController().getModel().getData(GrmInstallConstants.SECURITY_AUTH_PAM_SERVICE); si.addPamLoginModule(service, BootstrapSecurityInstaller.LoginModuleFlag.optional); } else if ( authMethod.equals(GrmInstallConstants.AUTH_SYSTEM)) { si.addSystemLoginModule(BootstrapSecurityInstaller.LoginModuleFlag.optional); } JvmConfiguration jvmConf = null; String selectJvm = (String)getModel().getData(GrmInstallConstants.SECURITY_AUTH_CA_JVM); for (JvmConfiguration tmpJvmConf: sc.getJvmConfigurations()) { if(log.isLoggable(Level.FINER)) { log.log(Level.FINER,"{0}: {1} JVM Name: {2}", new Object [] { this.getName(), "execute", tmpJvmConf.getName().getName() }); } if (tmpJvmConf.getName().getName().equals(selectJvm)) { jvmConf = tmpJvmConf; break; } } if(log.isLoggable(Level.FINER)) { log.log(Level.FINER,"{0}: {1} JVM Conf: {2}", new Object [] { this.getName(), "execute", jvmConf }); } if (jvmConf == null) { throw new InstallerException("No jvm for ca component selected (" + GrmInstallConstants.SECURITY_AUTH_CA_JVM + ")"); } si.addToJvm(jvmConf); if(log.isLoggable(Level.FINER)) { log.log(Level.FINER,"{0}: {1} JVM Conf: {2}", new Object [] { this.getName(), "execute", jvmConf }); } for (int i = 0; i < userListModel.size(); i++) { String adminUser = (String)userListModel.get(i); si.addAdminUser(adminUser); } try { InitCAParameters params = new InitCAParameters(); params.setCountry((String)getController().getModel().getData(GrmInstallConstants.CA_COUNTRY_CODE)); params.setState((String)getController().getModel().getData(GrmInstallConstants.CA_STATE)); params.setLocation((String)getController().getModel().getData(GrmInstallConstants.CA_LOCATION)); params.setOrganization((String)getController().getModel().getData(GrmInstallConstants.CA_ORGANISATION)); params.setOrganizationUnit((String)getController().getModel().getData(GrmInstallConstants.CA_ORGA_UNIT)); params.setAdminEmailAddress((String)getController().getModel().getData(GrmInstallConstants.CA_ADMIN_EMAIL)); si.setCAParams(params); } catch(GridCAException ex) { throw new InstallerException("Invalid ca parameters: " + ex.getMessage(), ex); } return si; /* try { sc.writeToBackStore(); percent += percentPerStep; fireProgress("System configuration stored", (int)percent); si.writeCAConfig(); percent += percentPerStep; fireProgress("Configuration of CA component stored", (int)percent); si.createSharedConfigFiles(); percent += percentPerStep; fireProgress("Shared security files created", (int)percent); } catch (IOException ex) { throw new InstallerException("IO error while writting system configuration", ex); } catch (BackingStoreException ex) { throw new InstallerException("IO error while writting system configuration", ex); } File tmpDir = sc.getPathConfiguration().getTmpDirForComponent(BootstrapSecurityInstaller.CA_COMP_NAME); File daemonDir = sc.getPathConfiguration().getDaemonKeystorePath(); File userDir = sc.getPathConfiguration().getUserKeyStorePath(); try { mkdir(tmpDir, false); mkdir(daemonDir, false); mkdir(userDir, false); Platform.getPlatform().chown(daemonDir, getAdminUser()); Platform.getPlatform().chown(userDir, getAdminUser()); percent += percentPerStep; fireProgress("Local CA directories created", (int)percent); si.initCA(params); percent += percentPerStep; fireProgress("CA initialized", (int)percent); } catch (GrmServiceException ex) { throw new InstallerException(ex.getLocalizedMessage(), ex); } catch (IOException ex) { throw new InstallerException(ex.getLocalizedMessage(), ex); } catch (GridCAException ex) { throw new InstallerException(ex.getLocalizedMessage(), ex); } catch (InterruptedException ex) { throw new InstallerException(ex.getLocalizedMessage(), ex); } catch (GrmException ex) { throw new InstallerException(ex.getLocalizedMessage(), ex); } setData(GrmInstallConstants.SECURITY_CONFIG, si); */ } | 25778 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/25778/e0174ba5e6bc124b37fdeb42b70a998b804400ea/GrmSecurityAdminUserTask.java/buggy/src/com/sun/grid/grm/install/security/GrmSecurityAdminUserTask.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
11830,
4368,
18678,
752,
13809,
538,
27170,
4368,
18678,
1435,
1216,
10284,
264,
503,
288,
7734,
2332,
1750,
888,
273,
12996,
1750,
5621,
3639,
11830,
4368,
18678,
7533,
273,
446,
31,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
11830,
4368,
18678,
752,
13809,
538,
27170,
4368,
18678,
1435,
1216,
10284,
264,
503,
288,
7734,
2332,
1750,
888,
273,
12996,
1750,
5621,
3639,
11830,
4368,
18678,
7533,
273,
446,
31,
... | ||
return FormatterEx.getInstanceEx().getWhiteSpaceBefore(model.getDocumentModel(), model.getRootBlock(), settings, settings.getIndentOptions(file.getFileType()), textRange, mayChangeLineFeeds); } else { | return FormatterEx.getInstanceEx().getWhiteSpaceBefore(model.getDocumentModel(), model.getRootBlock(), settings, settings.getIndentOptions(file.getFileType()), textRange, mayChangeLineFeeds); } else { | public static IndentInfo getWhiteSpaceBeforeToken(final ASTNode tokenNode, final Language language, final boolean mayChangeLineFeeds) { LOG.assertTrue(tokenNode != null); final PsiElement secondAsPsiElement = transformToPsiElement(tokenNode); LOG.assertTrue(secondAsPsiElement != null); final PsiFile file = secondAsPsiElement.getContainingFile(); final Project project = secondAsPsiElement.getProject(); final CodeStyleSettings settings = CodeStyleSettingsManager.getInstance(project).getCurrentSettings(); final int tokenStartOffset = tokenNode.getStartOffset(); final boolean oldValue = settings.XML_KEEP_LINE_BREAKS; final int oldKeepBlankLines = settings.XML_KEEP_BLANK_LINES; settings.XML_KEEP_BLANK_LINES = 0; try { final FormattingModelBuilder builder = language.getFormattingModelBuilder(); final PsiElement element = file.findElementAt(tokenStartOffset); if (builder != null && element.getLanguage().getFormattingModelBuilder() != null) { final TextRange textRange = element.getTextRange(); final FormattingModel model = builder.createModel(file, settings); return FormatterEx.getInstanceEx().getWhiteSpaceBefore(model.getDocumentModel(), model.getRootBlock(), settings, settings.getIndentOptions(file.getFileType()), textRange, mayChangeLineFeeds); } else { return new IndentInfo(0, 0, 0); } } finally { settings.XML_KEEP_LINE_BREAKS = oldValue; settings.XML_KEEP_BLANK_LINES = oldKeepBlankLines; } } | 56627 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56627/96735ca7ff93fd7888903ef0019b76e8c47ac172/CodeEditUtil.java/buggy/source/com/intellij/psi/impl/source/codeStyle/CodeEditUtil.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
28653,
966,
336,
23108,
4649,
1345,
12,
6385,
9183,
907,
1147,
907,
16,
4766,
10792,
727,
9889,
2653,
16,
4766,
10792,
727,
1250,
2026,
3043,
1670,
8141,
87,
13,
288,
565,
2018... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
28653,
966,
336,
23108,
4649,
1345,
12,
6385,
9183,
907,
1147,
907,
16,
4766,
10792,
727,
9889,
2653,
16,
4766,
10792,
727,
1250,
2026,
3043,
1670,
8141,
87,
13,
288,
565,
2018... |
{ UIUtilities.centerAndShow(dialog); } | { UIUtilities.centerAndShow(dialog); } | public void showDialog(JDialog dialog) { UIUtilities.centerAndShow(dialog); } | 55636 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55636/a81a5a58f8e54d006d057455465766c8d3d72998/ViewerCtrl.java/clean/SRC/org/openmicroscopy/shoola/agents/viewer/ViewerCtrl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
2405,
6353,
12,
46,
6353,
6176,
13,
202,
95,
202,
202,
5370,
11864,
18,
5693,
1876,
5706,
12,
12730,
1769,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
2405,
6353,
12,
46,
6353,
6176,
13,
202,
95,
202,
202,
5370,
11864,
18,
5693,
1876,
5706,
12,
12730,
1769,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
if (count != 9) fail("Exception expected."); | public void testgetByte() throws Exception { ResultSet rs = con.createStatement().executeQuery("select * from testnumeric"); boolean thrown = false; assertTrue(rs.next()); assertEquals(1,rs.getByte(1)); assertTrue(rs.next()); assertEquals(0,rs.getByte(1)); assertTrue(rs.next()); assertEquals(-1,rs.getByte(1)); int count = 3; while (rs.next()) { try { rs.getByte(1); } catch (Exception e) { thrown = true; } if (!thrown) fail("Exception expected."); count++; } if (count != 9) fail("Exception expected."); } | 49504 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49504/618d56d09a272f1d74dcfadbd245ef4452064e4e/ResultSetTest.java/clean/src/interfaces/jdbc/org/postgresql/test/jdbc2/ResultSetTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3639,
1071,
918,
1842,
588,
3216,
1435,
1216,
1185,
4202,
288,
3639,
202,
202,
13198,
3597,
273,
356,
18,
2640,
3406,
7675,
8837,
1138,
2932,
4025,
380,
628,
1842,
5246,
8863,
202,
202,
6494,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3639,
1071,
918,
1842,
588,
3216,
1435,
1216,
1185,
4202,
288,
3639,
202,
202,
13198,
3597,
273,
356,
18,
2640,
3406,
7675,
8837,
1138,
2932,
4025,
380,
628,
1842,
5246,
8863,
202,
202,
6494,
... | |
return new LowercaseTransliterator(); | return new LowercaseTransliterator(Locale.US); | static void register() { Transliterator.registerFactory(_ID, new Transliterator.Factory() { public Transliterator getInstance(String ID) { return new LowercaseTransliterator(); } }); Transliterator.registerSpecialInverse("Lower", "Upper", true); } | 5620 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5620/5e16a4a68813dd16c7c8b1447590fea4bd7b5a48/LowercaseTransliterator.java/clean/icu4j/src/com/ibm/text/LowercaseTransliterator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
760,
918,
1744,
1435,
288,
3639,
8193,
9838,
18,
4861,
1733,
24899,
734,
16,
394,
8193,
9838,
18,
1733,
1435,
288,
5411,
1071,
8193,
9838,
3694,
12,
780,
1599,
13,
288,
7734,
327,
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,
760,
918,
1744,
1435,
288,
3639,
8193,
9838,
18,
4861,
1733,
24899,
734,
16,
394,
8193,
9838,
18,
1733,
1435,
288,
5411,
1071,
8193,
9838,
3694,
12,
780,
1599,
13,
288,
7734,
327,
394,
... |
public boolean canCreateElementFor(AbstractRepositoryQuery category) { return category instanceof JiraRepositoryQuery || category instanceof JiraCustomQuery; | public boolean canCreateElementFor(AbstractQueryHit queryHit) { return queryHit instanceof JiraQueryHit; | public boolean canCreateElementFor(AbstractRepositoryQuery category) { return category instanceof JiraRepositoryQuery || category instanceof JiraCustomQuery; } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/d89d605989a1dd2f8b5b89c85dd304a586e22c58/JiraTaskExternalizer.java/clean/org.eclipse.mylyn.jira.ui/src/org/eclipse/mylyn/internal/jira/JiraTaskExternalizer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
848,
1684,
1046,
1290,
12,
7469,
3305,
1138,
3150,
13,
288,
202,
202,
2463,
3150,
1276,
804,
11547,
3305,
1138,
747,
3150,
1276,
804,
11547,
3802,
1138,
31,
202,
97,
2,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1250,
848,
1684,
1046,
1290,
12,
7469,
3305,
1138,
3150,
13,
288,
202,
202,
2463,
3150,
1276,
804,
11547,
3305,
1138,
747,
3150,
1276,
804,
11547,
3802,
1138,
31,
202,
97,
2,
... |
public String getLocalPassword(){ | public String getLocalPassword() { | public String getLocalPassword(){ return localPassword; } | 17032 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17032/fbad105e7d9ea7ac1635b30918b5e8fc4f986ab5/JmsConnector.java/buggy/activemq-core/src/main/java/org/apache/activemq/network/jms/JmsConnector.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
6993,
3913,
1435,
288,
3639,
327,
1191,
3913,
31,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
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,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
6993,
3913,
1435,
288,
3639,
327,
1191,
3913,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Util.getMMainJFrame().setVisible(true); Util.getMMainJFrame().toFront(); }}); | Util.getMMainJFrame().setVisible(true); Util.getMMainJFrame().toFront(); }}); | private void purchase(final MTransformJButton mTransformJButton) throws InterruptedException { try{ //// MAKE SURE NOT PREVIOUSLY INSTALLED AS PART OF A BUNDLE MackageDesc[] originalUninstalledMackages = Util.getToolboxManager().uninstalled(); boolean installed = true; for( MackageDesc mackageDesc : originalUninstalledMackages ){ if(mTransformJButton.getName().equals(mackageDesc.getName())){ installed = false; break; } } if( installed ) return; //// DO THE DOWNLOAD MackageDesc[] originalInstalledMackages = Util.getToolboxManager().installed(); // for use later long key = Util.getToolboxManager().install(mTransformJButton.getName()); com.untangle.gui.util.Visitor visitor = new com.untangle.gui.util.Visitor(mTransformJButton); while (true) { java.util.List<InstallProgress> lip = Util.getToolboxManager().getProgress(key); for (InstallProgress ip : lip) { ip.accept(visitor); if( visitor.isDone() ) break; } if( visitor.isDone() ) break; if (0 == lip.size()) { Thread.currentThread().sleep(DOWNLOAD_CHECK_SLEEP_MILLIS); } } if( !visitor.isSuccessful() ) throw new Exception(); Thread.currentThread().sleep(DOWNLOAD_FINAL_PAUSE_MILLIS); // DO THE INSTALL long installStartTime = System.currentTimeMillis(); SwingUtilities.invokeAndWait( new Runnable(){ public void run(){ mTransformJButton.setProgress("Installing...", 101); }}); boolean mackageInstalled = false; MackageDesc[] currentInstalledMackages = null; while( !mackageInstalled && ((System.currentTimeMillis() - installStartTime) < INSTALL_CHECK_TIMEOUT_MILLIS) ){ currentInstalledMackages = Util.getToolboxManager().installed(); for( MackageDesc mackageDesc : currentInstalledMackages ){ if(mackageDesc.getName().equals(mTransformJButton.getName())){ mackageInstalled = true; SwingUtilities.invokeAndWait( new Runnable(){ public void run(){ mTransformJButton.setProgress("Success", 100); }}); break; } } if( !mackageInstalled ) Thread.currentThread().sleep(INSTALL_CHECK_SLEEP_MILLIS); } if( !mackageInstalled ) throw new Exception(); Thread.currentThread().sleep(INSTALL_FINAL_PAUSE_MILLIS); // REMOVE FROM STORE MackageDesc[] currentUninstalledMackages = Util.getToolboxManager().uninstalled(); List<MackageDesc> purchasedMackageDescs = computeNewMackageDescs(currentUninstalledMackages, originalUninstalledMackages); for( MackageDesc purchasedMackageDesc : purchasedMackageDescs ){ if( isMackageTrial(purchasedMackageDesc) ){ SwingUtilities.invokeAndWait( new Runnable(){ public void run(){ mTransformJButton.setProgress("", -1); }}); } else if( isMackageStoreItem(purchasedMackageDesc) ){ removeFromStore(purchasedMackageDesc); } } // BRING MAIN WINDOW TO FRONT SwingUtilities.invokeAndWait( new Runnable(){ public void run(){ Util.getMMainJFrame().setVisible(true); Util.getMMainJFrame().toFront(); }}); // ADD TO TOOLBOX List<MackageDesc> newMackageDescs = computeNewMackageDescs(originalInstalledMackages, currentInstalledMackages); Policy currentPolicy = (Policy) viewSelector.getSelectedItem(); for( MackageDesc newMackageDesc : newMackageDescs ){ if( !isMackageStoreItem(newMackageDesc) && isMackageVisible(newMackageDesc) ){ MTransformJButton newMTransformJButton = null; //new MTransformJButton(newMackageDesc); if( newMackageDesc.isUtil() || newMackageDesc.isService()){ newMTransformJButton = addToToolbox(null,newMackageDesc,false,false); } else if(newMackageDesc.isSecurity()){ for( Policy policy : policyToolboxMap.keySet() ){ MTransformJButton tempMTransformJButton = addToToolbox(policy,newMackageDesc,false,false); if( policy.equals(currentPolicy) ){ newMTransformJButton = tempMTransformJButton; } } } else if( newMackageDesc.isCore() ){ newMTransformJButton = addToToolbox(null,newMackageDesc,false,false); } if( isMackageTrial(newMackageDesc) ){ newMTransformJButton.setIsTrial(true); System.out.println("added trial: " + newMTransformJButton.getName()); } else{ System.out.println("added regular: " + newMTransformJButton.getName()); } revalidateToolboxes(); focusInToolbox(newMTransformJButton, true); // focus and highlight in current toolbox } } // REFRESH STATE OF ALL EXISTING APPLIANCES for(Policy policy : policyRackMap.keySet()){ for(MTransformJPanel mTransformJPanel : policyRackMap.get(policy).values()){ mTransformJPanel.doRefreshState(); } } for(MTransformJPanel mTransformJPanel : utilRackMap.values()){ mTransformJPanel.doRefreshState(); } for(MTransformJPanel mTransformJPanel : coreRackMap.values()){ mTransformJPanel.doRefreshState(); } } catch(InterruptedException e){ throw e; } catch(Exception e){ if( !isInterrupted() ){ try{ Util.handleExceptionWithRestart("Error purchasing: " + mTransformJButton.getName(), e); } catch(Exception f){ Util.handleExceptionNoRestart("Error purchasing:", f); mTransformJButton.setFailedProcureView(); SwingUtilities.invokeLater( new Runnable(){ public void run(){ MOneButtonJDialog.factory(Util.getMMainJFrame(), "", "A problem occurred while purchasing:<br>" + mTransformJButton.getDisplayName() + "<br>Please try again or contact Untangle Networks for assistance.", mTransformJButton.getDisplayName() + " Warning", ""); }}); } } } finally{ //mTransformJButton.setIsTrial(false); dont need this shite } } | 49954 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49954/a63967a13e15b9fb68b7c6728ea91a7feb69ffcc/PolicyStateMachine.java/clean/gui/api/com/untangle/gui/main/PolicyStateMachine.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
3238,
918,
23701,
12,
6385,
490,
4059,
46,
3616,
312,
4059,
46,
3616,
13,
1216,
7558,
288,
5411,
775,
95,
7734,
368,
759,
19316,
6859,
348,
4830,
4269,
7071,
4136,
21667,
7076,
22880,
277... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
23701,
12,
6385,
490,
4059,
46,
3616,
312,
4059,
46,
3616,
13,
1216,
7558,
288,
5411,
775,
95,
7734,
368,
759,
19316,
6859,
348,
4830,
4269,
7071,
4136,
21667,
7076,
22880,
277... |
runtime.getModule("Kernel").callMethod(runtime.getCurrentContext(),"require",runtime.newString("digest.so")); | runtime.getLoadService().require("digest.so"); | public static void createDigestRMD160(IRuby runtime) { runtime.getModule("Kernel").callMethod(runtime.getCurrentContext(),"require",runtime.newString("digest.so")); RubyModule mDigest = runtime.getModule("Digest"); RubyClass cDigestBase = mDigest.getClass("Base"); RubyClass cDigest_RMD160 = mDigest.defineClassUnder("RMD160",cDigestBase); cDigest_RMD160.setClassVar("metadata",runtime.newString("RIPEMD160")); } | 46770 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46770/fe11f82bc6236dc6746a228a50d4bac6d467618e/RubyDigest.java/buggy/src/org/jruby/RubyDigest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
752,
9568,
54,
6188,
16874,
12,
7937,
10340,
3099,
13,
288,
3639,
3099,
18,
588,
2563,
1179,
7675,
6528,
2932,
10171,
18,
2048,
8863,
3639,
19817,
3120,
312,
9568,
273,
30... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
752,
9568,
54,
6188,
16874,
12,
7937,
10340,
3099,
13,
288,
3639,
3099,
18,
588,
2563,
1179,
7675,
6528,
2932,
10171,
18,
2048,
8863,
3639,
19817,
3120,
312,
9568,
273,
30... |
} else if (game.getPhase() == Game.PHASE_FIRING) { | } else if (game.getPhase() == IGame.PHASE_FIRING) { | protected void calculateMyTurn() { try { if (game.getPhase() == Game.PHASE_MOVEMENT) { MovePath mp = null; if (game.getTurn() instanceof GameTurn.SpecificEntityTurn) { GameTurn.SpecificEntityTurn turn = (GameTurn.SpecificEntityTurn) game.getTurn(); Entity mustMove = game.getEntity(turn.getEntityNum()); mp = continueMovementFor(mustMove); } else { mp = calculateMoveTurn(); } moveEntity(mp.getEntity().getId(), mp); } else if (game.getPhase() == Game.PHASE_FIRING) { if (game.getTurn() instanceof GameTurn.SpecificEntityTurn) { GameTurn.SpecificEntityTurn turn = (GameTurn.SpecificEntityTurn) game.getTurn(); MovePath mp = continueMovementFor(game.getEntity(turn.getEntityNum())); moveEntity(mp.getEntity().getId(), mp); } calculateFiringTurn(); } else if (game.getPhase() == Game.PHASE_PHYSICAL) { PhysicalOption po = calculatePhysicalTurn(); // Bug #1072137: don't crash if the bot can't find a physical. if (null != po) { sendAttackData(po.attacker.getId(), po.getVector()); } else { // Send a "no attack" to clear the game turn, if any. sendAttackData( getLocalPlayer().getId(), new Vector(0) ); } } else if (game.getPhase() == Game.PHASE_DEPLOYMENT) { calculateDeployment(); } else if (game.getPhase() == Game.PHASE_DEPLOY_MINEFIELDS) { Vector mines = calculateMinefieldDeployment(); for (int i = 0; i < mines.size(); i++) { game.addMinefield((Minefield)mines.elementAt(i)); } sendDeployMinefields(mines); sendPlayerInfo(); } } catch (Throwable t) { t.printStackTrace(); } } | 3464 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3464/db64c0778bbea1399999fd25b589d242f8842761/BotClient.java/buggy/megamek/src/megamek/client/bot/BotClient.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
4604,
12062,
15858,
1435,
288,
3639,
775,
288,
5411,
309,
261,
13957,
18,
588,
11406,
1435,
422,
14121,
18,
8939,
4429,
67,
16537,
3212,
13,
288,
7734,
9933,
743,
6749,
273,
44... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
4604,
12062,
15858,
1435,
288,
3639,
775,
288,
5411,
309,
261,
13957,
18,
588,
11406,
1435,
422,
14121,
18,
8939,
4429,
67,
16537,
3212,
13,
288,
7734,
9933,
743,
6749,
273,
44... |
Enumeration outNodes = bb.getOutNodes(); | Enumeration outNodes = bb.getNormalOut(); | static OPT_Diamond buildDiamond(OPT_BasicBlock bb) { if (bb.getNumberOfNormalOut() != 2) return null; // Identify the two out nodes from bb. Enumeration outNodes = bb.getOutNodes(); OPT_BasicBlock out1 = (OPT_BasicBlock)outNodes.nextElement(); OPT_BasicBlock out2 = (OPT_BasicBlock)outNodes.nextElement(); int out1In = out1.getNumberOfIn(); int out2In = out2.getNumberOfIn(); if (out1In == 1 && out2In ==1) { // look for the case where the diamond has four non-empty blocks. if (out1.getNumberOfNormalOut() == 1 && out2.getNumberOfNormalOut() == 1) { OPT_BasicBlock b1 = (OPT_BasicBlock)out1.getOutNodes().nextElement(); OPT_BasicBlock b2 = (OPT_BasicBlock)out2.getOutNodes().nextElement(); if (b1 == b2) { if (b1.getNumberOfIn() == 2) { return fourElementDiamond(bb,out1,out2,b1); } } } } else if (out1In == 1 && out2In == 2) { // check for a 3-element diamond if (out1.getNumberOfNormalOut() == 1) { OPT_BasicBlock b1 = (OPT_BasicBlock)out1.getOutNodes().nextElement(); if (b1 == out2) { if (b1.getNumberOfIn() == 2) { return threeElementDiamond(bb,out1,out2); } } } } else if (out1In == 1 && out2In == 2) { // check for a 3-element diamond if (out2.getNumberOfNormalOut() == 1) { OPT_BasicBlock b2 = (OPT_BasicBlock)out2.getOutNodes().nextElement(); if (b2 == out1) { if (b2.getNumberOfIn() == 2) { return threeElementDiamond(bb,out2,out1); } } } } // didn't find a diamond return null; } | 49871 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49871/48ebca8d3cb47be4023800c7d062d36618d0a5a6/OPT_Diamond.java/buggy/rvm/src/vm/compilers/optimizing/optimizations/control/OPT_Diamond.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
760,
16456,
67,
14521,
301,
1434,
1361,
14521,
301,
1434,
12,
15620,
67,
8252,
1768,
7129,
13,
288,
565,
309,
261,
9897,
18,
588,
9226,
5506,
1182,
1435,
480,
576,
13,
327,
446,
31,
565... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
760,
16456,
67,
14521,
301,
1434,
1361,
14521,
301,
1434,
12,
15620,
67,
8252,
1768,
7129,
13,
288,
565,
309,
261,
9897,
18,
588,
9226,
5506,
1182,
1435,
480,
576,
13,
327,
446,
31,
565... |
if (seen == MONITOREXIT && getPrevOpcode(2) == MONITORENTER) | if (seen == MONITOREXIT && (getPrevOpcode(2) == MONITORENTER || getPrevOpcode(1) == MONITORENTER) ) | public void sawOpcode(int seen) { if (seen == MONITOREXIT && getPrevOpcode(2) == MONITORENTER) bugReporter.reportBug(new BugInstance(this, "ESync_EMPTY_SYNC", NORMAL_PRIORITY) .addClassAndMethod(this) .addSourceLine(this)); } | 10715 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10715/3695590cf13d40765afc517c4e3ae95532ef83ca/FindEmptySynchronizedBlock.java/clean/findbugs/src/java/edu/umd/cs/findbugs/detect/FindEmptySynchronizedBlock.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1850,
1071,
918,
19821,
22808,
12,
474,
5881,
13,
288,
202,
202,
430,
261,
15156,
422,
30215,
1285,
8607,
60,
1285,
597,
336,
9958,
22808,
12,
22,
13,
422,
30215,
1285,
51,
7480,
654,
13,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1850,
1071,
918,
19821,
22808,
12,
474,
5881,
13,
288,
202,
202,
430,
261,
15156,
422,
30215,
1285,
8607,
60,
1285,
597,
336,
9958,
22808,
12,
22,
13,
422,
30215,
1285,
51,
7480,
654,
13,
10... |
if (groupingEntries.containsKey(groupName)) | if (groupingEntries.containsKey(groupName)) { | private void processExtension(IExtensionTracker tracker, IExtension extension) { IConfigurationElement[] elements = extension.getConfigurationElements(); Map groupingEntries = new HashMap(); Collection attributeMappings = new HashSet(); for (int j = 0; j < elements.length; j++) { IConfigurationElement element = elements[j]; if (element.getName().equals(PROBLEM_FILTER)) { ProblemFilter filter = newFilter(element); registeredFilters.add(filter); tracker.registerObject(extension, filter, IExtensionTracker.REF_STRONG); continue; } if (element.getName().equals(MARKER_GROUPING)) { FieldMarkerGroup group = new FieldMarkerGroup(element .getAttribute(LABEL), element.getAttribute(ID)); markerGroups.put(group.getId(), group); tracker.registerObject(extension, group, IExtensionTracker.REF_STRONG); } if (element.getName().equals(MARKER_GROUPING_ENTRY)) { MarkerGroupingEntry entry = new MarkerGroupingEntry(element .getAttribute(LABEL), element.getAttribute(ID), (Integer.valueOf(element.getAttribute(PRIORITY)) .intValue())); String groupName = element.getAttribute(MARKER_GROUPING); Collection entries; if (groupingEntries.containsKey(groupName)) entries = (Collection) groupingEntries.get(groupName); else entries = new HashSet(); entries.add(entry); groupingEntries.put(groupName, entries); tracker.registerObject(extension, entry, IExtensionTracker.REF_STRONG); } if (element.getName().equals(MARKER_ATTRIBUTE_GROUPING)) { AttributeMarkerGrouping grouping = new AttributeMarkerGrouping( element.getAttribute(ATTRIBUTE), element .getAttribute(MARKER_TYPE), element .getAttribute(DEFAULT_GROUPING_ENTRY), element); attributeMappings.add(grouping); tracker.registerObject(extension, grouping, IExtensionTracker.REF_STRONG); } if (element.getName().equals(MARKER_CATEGORY)) { String[] markerTypes = getMarkerTypes(element); String categoryName = element.getAttribute(NAME); for (int i = 0; i < markerTypes.length; i++) { categories.put(markerTypes[i], categoryName); } tracker.registerObject(extension, categoryName, IExtensionTracker.REF_STRONG); } processGroupingEntries(groupingEntries); processAttributeMappings(attributeMappings); } } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/e38d295ea613cf9f08aadb93a84a33d2e91abc5f/MarkerSupportRegistry.java/clean/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerSupportRegistry.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1207,
3625,
12,
45,
3625,
8135,
9745,
16,
1082,
202,
45,
3625,
2710,
13,
288,
202,
202,
45,
1750,
1046,
8526,
2186,
273,
2710,
18,
588,
1750,
3471,
5621,
202,
202,
863,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1207,
3625,
12,
45,
3625,
8135,
9745,
16,
1082,
202,
45,
3625,
2710,
13,
288,
202,
202,
45,
1750,
1046,
8526,
2186,
273,
2710,
18,
588,
1750,
3471,
5621,
202,
202,
863,
... |
RubyClass type = (RubyClass) runtime.getRubyClass(className.toId()); | RubyClass type = (RubyClass) runtime.getClasses().getClassFromPath(className.toId()); Asserts.assertNotNull(type, "type shouldn't be null."); | private IRubyObject defaultObjectUnmarshal() throws IOException { RubySymbol className = (RubySymbol) unmarshalObject(); // ... FIXME: handle if class doesn't exist ... RubyClass type = (RubyClass) runtime.getRubyClass(className.toId()); IRubyObject result = runtime.getFactory().newObject(type); for (int i = 0, count = unmarshalInt(); i < count; i++) { result.setInstanceVariable(unmarshalObject().toId(), unmarshalObject()); } return result; } | 46454 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46454/76d37f709db398798e5b6a889937559a9e75e062/UnmarshalStream.java/clean/org/jruby/runtime/marshal/UnmarshalStream.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
15908,
10340,
921,
805,
921,
9593,
1435,
1216,
1860,
288,
3639,
19817,
5335,
2658,
273,
261,
54,
10340,
5335,
13,
11401,
921,
5621,
3639,
368,
1372,
9852,
30,
1640,
309,
667,
3302,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
15908,
10340,
921,
805,
921,
9593,
1435,
1216,
1860,
288,
3639,
19817,
5335,
2658,
273,
261,
54,
10340,
5335,
13,
11401,
921,
5621,
3639,
368,
1372,
9852,
30,
1640,
309,
667,
3302,
... |
if (e.character == SWT.ESC) dispose(); else if (e.character == SWT.DEL) { | if (e.character == SWT.ESC) { dispose(); } else if (e.character == SWT.DEL) { | public void keyPressed(KeyEvent e) { if (e.character == SWT.ESC) dispose(); else if (e.character == SWT.DEL) { removeSelectedItems(); e.character = SWT.NONE; e.doit = false; } } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/fa4a8cff0e027f8d3c6b1fcb92b30f46767dd191/AbstractTableInformationControl.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/AbstractTableInformationControl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
918,
498,
24624,
12,
653,
1133,
425,
13,
288,
7734,
309,
261,
73,
18,
11560,
422,
348,
8588,
18,
41,
2312,
13,
10792,
15825,
5621,
7734,
469,
309,
261,
73,
18,
11560,
422,
348,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
918,
498,
24624,
12,
653,
1133,
425,
13,
288,
7734,
309,
261,
73,
18,
11560,
422,
348,
8588,
18,
41,
2312,
13,
10792,
15825,
5621,
7734,
469,
309,
261,
73,
18,
11560,
422,
348,
... |
labelStr = particleMotion.hseis.getSeismogram().getName(); | labelStr = particleMotion.hseis.getName(); | public synchronized void drawLabels(ParticleMotion particleMotion, Graphics2D graphics2D) { logger.debug("IN DRAW LABELS"); Color color = new Color(0, 0, 0, 128); graphics2D.setColor(color); java.awt.Dimension dimension = getSize(); float fontSize = dimension.width / 20; if(fontSize < 4) fontSize = 4; else if(fontSize > 32) fontSize = 32; Font font = new Font("serif", Font.BOLD, (int)fontSize); graphics2D.setFont(font); String labelStr = new String(); labelStr = particleMotion.hseis.getSeismogram().getName(); int x = (dimension.width - (int)(labelStr.length()*fontSize)) / 2 - getInsets().left - getInsets().right; int y = dimension.height - 4; graphics2D.drawString(labelStr, x, y); labelStr = particleMotion.vseis.getSeismogram().getName(); x = font.getSize(); y = (dimension.height - (int)(labelStr.length()*fontSize)) / 2 - getInsets().top - getInsets().bottom; //get the original AffineTransform AffineTransform oldTransform = graphics2D.getTransform(); AffineTransform ct = AffineTransform.getTranslateInstance(x, y); graphics2D.transform(ct); graphics2D.transform(AffineTransform.getRotateInstance(Math.PI/2)); graphics2D.drawString(labelStr, 0, 0); //restore the original AffineTransform graphics2D.setTransform(oldTransform); } | 52623 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52623/ef7c9ced192235cb00a872bfd5baf4477c7bdf54/ParticleMotionView.java/clean/src/edu/sc/seis/fissuresUtil/display/ParticleMotionView.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3852,
918,
3724,
5888,
12,
1988,
3711,
29360,
20036,
29360,
16,
16830,
22,
40,
17313,
22,
40,
13,
288,
202,
4901,
18,
4148,
2932,
706,
463,
10821,
18210,
55,
8863,
202,
225,
5563,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3852,
918,
3724,
5888,
12,
1988,
3711,
29360,
20036,
29360,
16,
16830,
22,
40,
17313,
22,
40,
13,
288,
202,
4901,
18,
4148,
2932,
706,
463,
10821,
18210,
55,
8863,
202,
225,
5563,
... |
_t = __t210; | _t = __t215; | public final void choosestate(AST _t) throws RecognitionException { AST choosestate_AST_in = (_t == ASTNULL) ? null : (AST)_t; AST head = null; AST fi = null; AST __t200 = _t; head = _t==ASTNULL ? null :(AST)_t; match(_t,CHOOSE); _t = _t.getFirstChild(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case ROW: { AST tmp777_AST_in = (AST)_t; match(_t,ROW); _t = _t.getNextSibling(); break; } case FIELD: { AST tmp778_AST_in = (AST)_t; match(_t,FIELD); _t = _t.getNextSibling(); break; } default: { throw new NoViableAltException(_t); } } } if ( inputState.guessing==0 ) { action.frameInitializingStatement(head); } { int _cnt206=0; _loop206: do { if (_t==null) _t=ASTNULL; if ((_t.getType()==Form_item)) { AST __t203 = _t; fi = _t==ASTNULL ? null :(AST)_t; match(_t,Form_item); _t = _t.getFirstChild(); fld(_t,CQ.UPDATING); _t = _retTree; if ( inputState.guessing==0 ) { action.formItem(fi); } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case HELP: { AST __t205 = _t; AST tmp779_AST_in = (AST)_t; match(_t,HELP); _t = _t.getFirstChild(); constant(_t); _t = _retTree; _t = __t205; _t = _t.getNextSibling(); break; } case 3: { break; } default: { throw new NoViableAltException(_t); } } } _t = __t203; _t = _t.getNextSibling(); } else { if ( _cnt206>=1 ) { break _loop206; } else {throw new NoViableAltException(_t);} } _cnt206++; } while (true); } { _loop211: do { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case AUTORETURN: { AST tmp780_AST_in = (AST)_t; match(_t,AUTORETURN); _t = _t.getNextSibling(); break; } case COLOR: { AST __t208 = _t; AST tmp781_AST_in = (AST)_t; match(_t,COLOR); _t = _t.getFirstChild(); anyorvalue(_t); _t = _retTree; _t = __t208; _t = _t.getNextSibling(); break; } case GOON: { goonphrase(_t); _t = _retTree; break; } case KEYS: { AST __t209 = _t; AST tmp782_AST_in = (AST)_t; match(_t,KEYS); _t = _t.getFirstChild(); fld(_t,CQ.UPDATING); _t = _retTree; _t = __t209; _t = _t.getNextSibling(); break; } case NOERROR_KW: { AST tmp783_AST_in = (AST)_t; match(_t,NOERROR_KW); _t = _t.getNextSibling(); break; } case PAUSE: { AST __t210 = _t; AST tmp784_AST_in = (AST)_t; match(_t,PAUSE); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t210; _t = _t.getNextSibling(); break; } default: { break _loop211; } } } while (true); } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case WITH: { framephrase(_t); _t = _retTree; break; } case EOF: case PERIOD: { break; } default: { throw new NoViableAltException(_t); } } } state_end(_t); _t = _retTree; if ( inputState.guessing==0 ) { action.frameStatementEnd(); } _t = __t200; _t = _t.getNextSibling(); _retTree = _t; } | 13952 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13952/f492fd11e745beb562b4e209643ba003aa8a6271/TreeParser01.java/clean/trunk/org.prorefactor.core/src/org/prorefactor/treeparser01/TreeParser01.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
24784,
395,
340,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
24784,
395,
340,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
13,
692,
446,
294,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
24784,
395,
340,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
24784,
395,
340,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
13,
692,
446,
294,... |
boolean synPredMatched363 = false; if (((_tokenSet_12.member(LA(1))) && (_tokenSet_13.member(LA(2))) && (_tokenSet_14.member(LA(3))))) { int _m363 = mark(); synPredMatched363 = true; inputState.guessing++; try { { mDECIMAL_LITERAL(false); { switch ( LA(1)) { case 'e': { match('e'); break; } case 'E': { match('E'); break; } default: { throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); } } } } } catch (RecognitionException pe) { synPredMatched363 = false; } rewind(_m363); inputState.guessing--; } if ( synPredMatched363 ) { mDOUBLE_LITERAL(false); | if ((LA(1)=='(') && (LA(2)==':') && (_tokenSet_7.member(LA(3)))) { mEXPR_COMMENT(false); | public final void mNEXT_TOKEN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { int _ttype; Token _token=null; int _begin=text.length(); _ttype = NEXT_TOKEN; int _saveIndex; switch ( LA(1)) { case '{': { mLCURLY(false); if ( inputState.guessing==0 ) { inElementContent= false; _ttype = LCURLY; } break; } case '}': { mRCURLY(false); if ( inputState.guessing==0 ) { _ttype = RCURLY; } break; } case '&': { mANDEQ(false); if ( inputState.guessing==0 ) { _ttype = ANDEQ; } break; } default: boolean synPredMatched363 = false; if (((_tokenSet_12.member(LA(1))) && (_tokenSet_13.member(LA(2))) && (_tokenSet_14.member(LA(3))))) { int _m363 = mark(); synPredMatched363 = true; inputState.guessing++; try { { mDECIMAL_LITERAL(false); { switch ( LA(1)) { case 'e': { match('e'); break; } case 'E': { match('E'); break; } default: { throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); } } } } } catch (RecognitionException pe) { synPredMatched363 = false; } rewind(_m363); inputState.guessing--; } if ( synPredMatched363 ) { mDOUBLE_LITERAL(false); if ( inputState.guessing==0 ) { _ttype = DOUBLE_LITERAL; } } else if ((LA(1)=='-') && (LA(2)=='-') && (LA(3)=='>')) { mXML_COMMENT_END(false); if ( inputState.guessing==0 ) { _ttype = XML_COMMENT_END; } } else if ((LA(1)=='<') && (LA(2)=='!')) { mXML_COMMENT(false); if ( inputState.guessing==0 ) { _ttype = XML_COMMENT; } } else { boolean synPredMatched354 = false; if (((LA(1)=='<') && (LA(2)=='?'))) { int _m354 = mark(); synPredMatched354 = true; inputState.guessing++; try { { mXML_PI_START(false); } } catch (RecognitionException pe) { synPredMatched354 = false; } rewind(_m354); inputState.guessing--; } if ( synPredMatched354 ) { mXML_PI(false); if ( inputState.guessing==0 ) { _ttype = XML_PI; } } else if ((LA(1)=='<') && (LA(2)=='/')) { mEND_TAG_START(false); if ( inputState.guessing==0 ) { inElementContent= false; wsExplicit= false; _ttype = END_TAG_START; } } else if ((LA(1)=='<') && (LA(2)=='=')) { mLTEQ(false); if ( inputState.guessing==0 ) { _ttype = LTEQ; } } else if (((LA(1)=='"'||LA(1)=='\'') && ((LA(2) >= '\u0003' && LA(2) <= '\uffff')) && (true))&&( parseStringLiterals )) { mSTRING_LITERAL(false); if ( inputState.guessing==0 ) { _ttype = STRING_LITERAL; } } else { boolean synPredMatched356 = false; if (((LA(1)=='.') && (LA(2)=='.') && (true))) { int _m356 = mark(); synPredMatched356 = true; inputState.guessing++; try { { match('.'); match('.'); } } catch (RecognitionException pe) { synPredMatched356 = false; } rewind(_m356); inputState.guessing--; } if ( synPredMatched356 ) { mPARENT(false); if ( inputState.guessing==0 ) { _ttype = PARENT; } } else { boolean synPredMatched358 = false; if (((_tokenSet_12.member(LA(1))) && (_tokenSet_12.member(LA(2))) && (true))) { int _m358 = mark(); synPredMatched358 = true; inputState.guessing++; try { { match('.'); mINTEGER_LITERAL(false); } } catch (RecognitionException pe) { synPredMatched358 = false; } rewind(_m358); inputState.guessing--; } if ( synPredMatched358 ) { mDECIMAL_LITERAL(false); if ( inputState.guessing==0 ) { _ttype = DECIMAL_LITERAL; } } else { boolean synPredMatched365 = false; if (((_tokenSet_12.member(LA(1))) && (_tokenSet_12.member(LA(2))) && (true))) { int _m365 = mark(); synPredMatched365 = true; inputState.guessing++; try { { mINTEGER_LITERAL(false); match('.'); } } catch (RecognitionException pe) { synPredMatched365 = false; } rewind(_m365); inputState.guessing--; } if ( synPredMatched365 ) { mDECIMAL_LITERAL(false); if ( inputState.guessing==0 ) { _ttype = DECIMAL_LITERAL; } } else if ((LA(1)=='/') && (LA(2)=='/') && (true)) { mDSLASH(false); if ( inputState.guessing==0 ) { _ttype = DSLASH; } } else if ((LA(1)=='|') && (LA(2)=='=') && (true)) { mOREQ(false); if ( inputState.guessing==0 ) { _ttype = OREQ; } } else if ((LA(1)=='!') && (LA(2)=='=') && (true)) { mNEQ(false); if ( inputState.guessing==0 ) { _ttype = NEQ; } } else if ((LA(1)=='>') && (LA(2)=='=') && (true)) { mGTEQ(false); if ( inputState.guessing==0 ) { _ttype = GTEQ; } } else if ((LA(1)=='?') && (LA(2)=='>') && (true)) { mXML_PI_END(false); if ( inputState.guessing==0 ) { _ttype = XML_PI_END; } } else if ((LA(1)=='<') && (true)) { mLT(false); if ( inputState.guessing==0 ) { inElementContent= false; _ttype = LT; } } else if (((_tokenSet_15.member(LA(1))) && (true) && (true))&&( inAttributeContent )) { mATTRIBUTE_CONTENT(false); if ( inputState.guessing==0 ) { _ttype = ATTRIBUTE_CONTENT; } } else if (((LA(1)=='"') && (true) && (true))&&( !(parseStringLiterals || inElementContent) )) { mQUOT(false); if ( inputState.guessing==0 ) { _ttype = QUOT; } } else if (((_tokenSet_16.member(LA(1))) && (true) && (true))&&( inElementContent )) { mELEMENT_CONTENT(false); if ( inputState.guessing==0 ) { _ttype = ELEMENT_CONTENT; } } else if ((LA(1)=='\t'||LA(1)=='\n'||LA(1)=='\r'||LA(1)==' ') && (true) && (true)) { mWS(false); if ( inputState.guessing==0 ) { if (wsExplicit) _ttype = WS; else _ttype = Token.SKIP; } } else if ((_tokenSet_17.member(LA(1))) && (true) && (true)) { mNCNAME(false); if ( inputState.guessing==0 ) { _ttype = NCNAME; } } else { boolean synPredMatched360 = false; if (((LA(1)=='.') && (true) && (true))) { int _m360 = mark(); synPredMatched360 = true; inputState.guessing++; try { { match('.'); } } catch (RecognitionException pe) { synPredMatched360 = false; } rewind(_m360); inputState.guessing--; } if ( synPredMatched360 ) { mSELF(false); if ( inputState.guessing==0 ) { _ttype = SELF; } } else if ((_tokenSet_3.member(LA(1))) && (true) && (true)) { mINTEGER_LITERAL(false); if ( inputState.guessing==0 ) { _ttype = INTEGER_LITERAL; } } else if ((LA(1)=='/') && (true) && (true)) { mSLASH(false); if ( inputState.guessing==0 ) { _ttype = SLASH; } } else if ((LA(1)==':') && (true) && (true)) { mCOLON(false); if ( inputState.guessing==0 ) { _ttype = COLON; } } else if ((LA(1)==',') && (true) && (true)) { mCOMMA(false); if ( inputState.guessing==0 ) { _ttype = COMMA; } } else if ((LA(1)==';') && (true) && (true)) { mSEMICOLON(false); if ( inputState.guessing==0 ) { _ttype = SEMICOLON; } } else if ((LA(1)=='*') && (true) && (true)) { mSTAR(false); if ( inputState.guessing==0 ) { _ttype = STAR; } } else if ((LA(1)=='+') && (true) && (true)) { mPLUS(false); if ( inputState.guessing==0 ) { _ttype = PLUS; } } else if ((LA(1)=='-') && (true) && (true)) { mMINUS(false); if ( inputState.guessing==0 ) { _ttype = MINUS; } } else if ((LA(1)=='[') && (true) && (true)) { mLPPAREN(false); if ( inputState.guessing==0 ) { _ttype = LPPAREN; } } else if ((LA(1)==']') && (true) && (true)) { mRPPAREN(false); if ( inputState.guessing==0 ) { _ttype = RPPAREN; } } else if ((LA(1)=='(') && (true) && (true)) { mLPAREN(false); if ( inputState.guessing==0 ) { _ttype = LPAREN; } } else if ((LA(1)==')') && (true) && (true)) { mRPAREN(false); if ( inputState.guessing==0 ) { _ttype = RPAREN; } } else if ((LA(1)=='|') && (true) && (true)) { mUNION(false); if ( inputState.guessing==0 ) { _ttype = UNION; } } else if ((LA(1)=='@') && (true) && (true)) { mAT(false); if ( inputState.guessing==0 ) { _ttype = AT; } } else if ((LA(1)=='$') && (true) && (true)) { mDOLLAR(false); if ( inputState.guessing==0 ) { _ttype = DOLLAR; } } else if ((LA(1)=='=') && (true) && (true)) { mEQ(false); if ( inputState.guessing==0 ) { _ttype = EQ; } } else if ((LA(1)=='>') && (true) && (true)) { mGT(false); if ( inputState.guessing==0 ) { _ttype = GT; } } else { throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); } }}}}}} if ( _createToken && _token==null && _ttype!=Token.SKIP ) { _token = makeToken(_ttype); _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); } _returnToken = _token; } | 2909 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2909/542794bb5fd4ba67897c2c2677f4f663483ba69d/XPathLexer2.java/buggy/src/org/exist/parser/XPathLexer2.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
312,
25539,
67,
8412,
12,
6494,
389,
2640,
1345,
13,
1216,
9539,
16,
3703,
1228,
503,
16,
3155,
1228,
503,
288,
202,
202,
474,
389,
88,
723,
31,
3155,
389,
2316,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
312,
25539,
67,
8412,
12,
6494,
389,
2640,
1345,
13,
1216,
9539,
16,
3703,
1228,
503,
16,
3155,
1228,
503,
288,
202,
202,
474,
389,
88,
723,
31,
3155,
389,
2316,
3... |
final String exceptionName = (String) iterator.next(); | final String exceptionName = (String) aNameList; | private void formatNameCheckString(){ final StringBuffer buffer = new StringBuffer(); boolean first = true; for(Iterator iterator = nameList.iterator(); iterator.hasNext();){ if(first){ first = false; } else{ buffer.append(','); } final String exceptionName = (String) iterator.next(); buffer.append(exceptionName); } nameCheckString = buffer.toString(); } | 56627 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56627/2d46d291193579a7564649b4881c7ea8e02eda5b/NonBooleanMethodNameMayNotStartWithQuestionInspection.java/buggy/plugins/InspectionGadgets/src/com/siyeh/ig/naming/NonBooleanMethodNameMayNotStartWithQuestionInspection.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
740,
461,
1564,
780,
1435,
95,
3639,
727,
6674,
1613,
273,
394,
6674,
5621,
3639,
1250,
1122,
273,
638,
31,
3639,
364,
12,
3198,
2775,
273,
508,
682,
18,
9838,
5621,
2775,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
740,
461,
1564,
780,
1435,
95,
3639,
727,
6674,
1613,
273,
394,
6674,
5621,
3639,
1250,
1122,
273,
638,
31,
3639,
364,
12,
3198,
2775,
273,
508,
682,
18,
9838,
5621,
2775,
18... |
projectNameField.setFocus(); | this.locationPathField.setFocus(); | public void createControl(Composite parent) { Composite composite = new Composite(parent, SWT.NULL); WorkbenchHelp.setHelp(composite, IHelpContextIds.NEW_PROJECT_WIZARD_PAGE); composite.setLayout(new GridLayout()); composite.setLayoutData(new GridData(GridData.FILL_BOTH)); createProjectNameGroup(composite); createProjectLocationGroup(composite); projectNameField.setFocus(); validatePage(); // Show description on opening setErrorMessage(null); setMessage(null); setControl(composite); } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/712fddb5e27c68525c0df5ce7d3bf8f2cee73714/WizardExternalProjectImportPage.java/clean/bundles/org.eclipse.ui/Eclipse UI Standard Components/org/eclipse/ui/wizards/datatransfer/WizardExternalProjectImportPage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
752,
3367,
12,
9400,
982,
13,
288,
202,
202,
9400,
9635,
273,
394,
14728,
12,
2938,
16,
348,
8588,
18,
8560,
1769,
202,
202,
2421,
22144,
6696,
18,
542,
6696,
12,
27676,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3367,
12,
9400,
982,
13,
288,
202,
202,
9400,
9635,
273,
394,
14728,
12,
2938,
16,
348,
8588,
18,
8560,
1769,
202,
202,
2421,
22144,
6696,
18,
542,
6696,
12,
27676,
... |
RefreshBugzillaReportsAction.this.view.getViewer().refresh(); | if(TaskListView.getDefault() != null) TaskListView.getDefault().getViewer().refresh(); | public void run() { bqc.refreshBugs(); for(BugzillaHit hit: bqc.getChildren()){ if(hit.hasCorrespondingActivatableTask()){ BugzillaTask task = ((BugzillaTask)hit.getOrCreateCorrespondingTask()); if(!task.isCompleted()){ task.refresh(); } } } RefreshBugzillaReportsAction.this.view.getViewer().refresh(); } | 51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/40a2f3c097a428c2e7bf80c35f83d2e2a58e8463/RefreshBugzillaReportsAction.java/clean/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/actions/RefreshBugzillaReportsAction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
9944,
202,
482,
918,
1086,
1435,
288,
6862,
1082,
202,
70,
30675,
18,
9144,
31559,
5621,
6862,
1082,
202,
1884,
12,
19865,
15990,
13616,
6800,
30,
324,
30675,
18,
588,
4212,
10756,
95,
6862,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
9944,
202,
482,
918,
1086,
1435,
288,
6862,
1082,
202,
70,
30675,
18,
9144,
31559,
5621,
6862,
1082,
202,
1884,
12,
19865,
15990,
13616,
6800,
30,
324,
30675,
18,
588,
4212,
10756,
95,
6862,
9... |
StringWriter writer = new StringWriter(); writer.write("class A { \n"); writer.write(" int var; \n"); writer.write(" void f(); \n"); writer.write("}; \n"); writer.write("void A::f(){ \n"); writer.write(" v[^] \n"); writer.write("} \n"); String code = writer.toString(); IFile t = importFile( "testMemberCompletion.cpp", code ); ICompletionProposal [] results = getResults( t, code.indexOf( "[^]" ) ); assertEquals( 4, results.length); assertEquals( "var : int", results[0].getDisplayString()); assertEquals( "virtual", results[1].getDisplayString()); assertEquals( "void", results[2].getDisplayString()); assertEquals( "volatile", results[3].getDisplayString()); } | StringWriter writer = new StringWriter(); writer.write("class A { \n"); writer.write(" int var; \n"); writer.write(" void f(); \n"); writer.write("}; \n"); writer.write("void A::f(){ \n"); writer.write(" v[^] \n"); writer.write("} \n"); String code = writer.toString(); IFile t = importFile( "testMemberCompletion.cpp", code ); ICompletionProposal [] results = getResults( t, code.indexOf( "[^]" ) ); assertEquals( 4, results.length); assertEquals( "var : int", results[0].getDisplayString()); assertEquals( "virtual", results[1].getDisplayString()); assertEquals( "void", results[2].getDisplayString()); assertEquals( "volatile", results[3].getDisplayString()); } | public void testMemberCompletion() throws Exception { StringWriter writer = new StringWriter(); writer.write("class A { \n"); //$NON-NLS-1$ writer.write(" int var; \n"); //$NON-NLS-1$ writer.write(" void f(); \n"); //$NON-NLS-1$ writer.write("}; \n"); //$NON-NLS-1$ writer.write("void A::f(){ \n"); //$NON-NLS-1$ writer.write(" v[^] \n"); //$NON-NLS-1$ writer.write("} \n"); //$NON-NLS-1$ String code = writer.toString(); IFile t = importFile( "testMemberCompletion.cpp", code ); //$NON-NLS-1$ ICompletionProposal [] results = getResults( t, code.indexOf( "[^]" ) ); //$NON-NLS-1$ assertEquals( 4, results.length); assertEquals( "var : int", results[0].getDisplayString()); //$NON-NLS-1$ assertEquals( "virtual", results[1].getDisplayString()); //$NON-NLS-1$ assertEquals( "void", results[2].getDisplayString()); //$NON-NLS-1$ assertEquals( "volatile", results[3].getDisplayString()); //$NON-NLS-1$ } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/b385ee2234c666c7eff7f048393323fa087f1353/ContentAssistRegressionTests.java/clean/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/regression/ContentAssistRegressionTests.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
4419,
11238,
1435,
1216,
1185,
288,
3639,
17436,
2633,
273,
394,
17436,
5621,
3639,
2633,
18,
2626,
2932,
1106,
432,
288,
1171,
521,
82,
8863,
4329,
3993,
17,
5106,
17,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
4419,
11238,
1435,
1216,
1185,
288,
3639,
17436,
2633,
273,
394,
17436,
5621,
3639,
2633,
18,
2626,
2932,
1106,
432,
288,
1171,
521,
82,
8863,
4329,
3993,
17,
5106,
17,
2... |
return constructSpecific(cx, scope, this, args, ctors[index], ctorTypes[index]); | return constructSpecific(cx, scope, this, args, ctors[index]); | public Scriptable construct(Context cx, Scriptable scope, Object[] args) throws JavaScriptException { Class classObject = getClassObject(); int modifiers = classObject.getModifiers(); if (! (Modifier.isInterface(modifiers) || Modifier.isAbstract(modifiers))) { Constructor[] ctors = members.ctors; Class[][] ctorTypes = members.ctorTypes; int index = NativeJavaMethod.findFunction(ctors, ctorTypes, args); if (index < 0) { String sig = NativeJavaMethod.scriptSignature(args); throw Context.reportRuntimeError2( "msg.no.java.ctor", classObject.getName(), sig); } // Found the constructor, so try invoking it. return constructSpecific(cx, scope, this, args, ctors[index], ctorTypes[index]); } else { Scriptable topLevel = ScriptableObject.getTopLevelScope(this); String msg = ""; try { // trying to construct an interface; use JavaAdapter to // construct a new class on the fly that implements this // interface. Object v = topLevel.get("JavaAdapter", topLevel); if (v != NOT_FOUND) { Function f = (Function) v; Object[] adapterArgs = { this, args[0] }; return (Scriptable) f.construct(cx, topLevel, adapterArgs); } } catch (Exception ex) { // fall through to error String m = ex.getMessage(); if (m != null) msg = m; } throw Context.reportRuntimeError2( "msg.cant.instantiate", msg, classObject.getName()); } } | 12904 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12904/2d7d723eefd13d815225702c9924a8c553325f33/NativeJavaClass.java/clean/js/rhino/src/org/mozilla/javascript/NativeJavaClass.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
22780,
4872,
12,
1042,
9494,
16,
22780,
2146,
16,
1033,
8526,
833,
13,
3639,
1216,
11905,
503,
565,
288,
3639,
1659,
667,
921,
273,
2900,
921,
5621,
3639,
509,
10429,
273,
667,
921,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
22780,
4872,
12,
1042,
9494,
16,
22780,
2146,
16,
1033,
8526,
833,
13,
3639,
1216,
11905,
503,
565,
288,
3639,
1659,
667,
921,
273,
2900,
921,
5621,
3639,
509,
10429,
273,
667,
921,... |
this( focusFirstElement, null, -1, -1 ); | this( null, focusFirstElement, null, -1, -1 ); | public Container( boolean focusFirstElement ) { this( focusFirstElement, null, -1, -1 ); } | 9804 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9804/4e8983ac96e4e1a995d9f8434572c31f4d05d76c/Container.java/buggy/enough-polish-j2me/source/src/de/enough/polish/ui/Container.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
4039,
12,
1250,
7155,
3759,
1046,
262,
288,
202,
202,
2211,
12,
7155,
3759,
1046,
16,
446,
16,
300,
21,
16,
300,
21,
11272,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
4039,
12,
1250,
7155,
3759,
1046,
262,
288,
202,
202,
2211,
12,
7155,
3759,
1046,
16,
446,
16,
300,
21,
16,
300,
21,
11272,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
FilePopupMenu(FileTextArea w) { super(); | public FilePopupMenu(FileTextArea w) { | FilePopupMenu(FileTextArea w) { super(); this.w = w; JMenuItem item; add(item = new JMenuItem("Set Breakpoint")); item.addActionListener(w); add(item = new JMenuItem("Clear Breakpoint")); item.addActionListener(w); add(item = new JMenuItem("Run")); item.addActionListener(w); } | 47345 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47345/e4c74a91b5c4165a9c90cde4d7b2ddd72e81af8d/SwingGui.java/buggy/toolsrc/org/mozilla/javascript/tools/debugger/SwingGui.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1387,
13770,
4599,
12,
812,
1528,
5484,
341,
13,
288,
3639,
2240,
5621,
3639,
333,
18,
91,
273,
341,
31,
3639,
804,
12958,
761,
31,
3639,
527,
12,
1726,
273,
394,
804,
12958,
2932,
694,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1387,
13770,
4599,
12,
812,
1528,
5484,
341,
13,
288,
3639,
2240,
5621,
3639,
333,
18,
91,
273,
341,
31,
3639,
804,
12958,
761,
31,
3639,
527,
12,
1726,
273,
394,
804,
12958,
2932,
694,... |
setCompletionValues( scope, CompletionKind.NO_SUCH_KIND, Key.EMPTY ); | setCompletionValues( scope, CompletionKind.NO_SUCH_KIND, KeywordSetKey.EMPTY ); | protected void declaration( IASTScope scope, IASTTemplate ownerTemplate, CompletionKind overideKind) throws EndOfFileException, BacktrackException { IASTCompletionNode.CompletionKind kind = getCompletionKindForDeclaration(scope, overideKind); setCompletionValues(scope, kind, Key.DECLARATION ); IASTDeclaration resultDeclaration = null; switch (LT(1)) { case IToken.t_asm : IToken first = consume(IToken.t_asm); setCompletionValues( scope, CompletionKind.NO_SUCH_KIND, Key.EMPTY ); consume(IToken.tLPAREN); String assembly = consume(IToken.tSTRING).getImage(); consume(IToken.tRPAREN); IToken last = consume(IToken.tSEMI); try { resultDeclaration = astFactory.createASMDefinition( scope, assembly, first.getOffset(), first.getLineNumber(), last.getEndOffset(), last.getLineNumber()); } catch (Exception e) { logException( "declaration:createASMDefinition", e ); //$NON-NLS-1$ throw backtrack; } // if we made it this far, then we have all we need // do the callback resultDeclaration.acceptElement(requestor, astFactory.getReferenceManager()); setCompletionValues(scope, kind, Key.DECLARATION ); break; case IToken.t_namespace : resultDeclaration = namespaceDefinition(scope); break; case IToken.t_using : resultDeclaration = usingClause(scope); break; case IToken.t_export : case IToken.t_template : resultDeclaration = templateDeclaration(scope); break; case IToken.t_extern : if (LT(2) == IToken.tSTRING) { resultDeclaration = linkageSpecification(scope); break; } default : resultDeclaration = simpleDeclarationStrategyUnion(scope, ownerTemplate, overideKind, Key.DECLARATION ); } setCompletionValues(scope, kind, Key.DECLARATION ); endDeclaration( resultDeclaration ); } | 54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/fb57293d470c0087b6edd9673084d38ceb95e5c2/Parser.java/buggy/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/Parser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
8266,
12,
3639,
467,
9053,
3876,
2146,
16,
3639,
467,
9053,
2283,
3410,
2283,
16,
20735,
5677,
1879,
831,
5677,
13,
3639,
1216,
4403,
951,
812,
503,
16,
4297,
4101,
503,
565,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
8266,
12,
3639,
467,
9053,
3876,
2146,
16,
3639,
467,
9053,
2283,
3410,
2283,
16,
20735,
5677,
1879,
831,
5677,
13,
3639,
1216,
4403,
951,
812,
503,
16,
4297,
4101,
503,
565,
... |
public static void preloadSpecialClass( OPT_Options options ) { String klassName = "L"+options.PRELOAD_CLASS+";"; if (options.PRELOAD_AS_BOOT ) { setBootOptions( options ); // Make a local copy so that some options can be altered to mimic options // during boot build options = (OPT_Options)options.clone(); } try { loadSpecialClass(klassName, options); } catch (Throwable e) { e.printStackTrace(); VM.sysWrite("Ignoring failure of preloadSpecialClass of "+klassName+"\n"); } } | 49871 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49871/12eb5722bb90f24db4ec2d2cf68e285fa9395033/OPT_Compiler.java/clean/rvm/src/vm/compilers/optimizing/driver/OPT_Compiler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
3845,
6459,
1484,
945,
12193,
797,
12,
15620,
67,
1320,
2116,
15329,
780,
22626,
461,
1546,
48,
6,
15,
2116,
18,
3670,
7783,
67,
5237,
9078,
4868,
31,
430,
12,
2116,
18,
3670,
7783,
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,
1071,
3845,
6459,
1484,
945,
12193,
797,
12,
15620,
67,
1320,
2116,
15329,
780,
22626,
461,
1546,
48,
6,
15,
2116,
18,
3670,
7783,
67,
5237,
9078,
4868,
31,
430,
12,
2116,
18,
3670,
7783,
67... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.