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 |
|---|---|---|---|---|---|---|
fireOpened( pageComponent ); } | fireOpened(pageComponent); } | protected void addPageComponent( PageComponent pageComponent ) { pageComponents.add( pageComponent ); doAddPageComponent( pageComponent ); pageComponent.addPropertyChangeListener( pageComponentUpdater ); fireOpened( pageComponent ); } | 55916 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55916/8714295888617ff9794a708e79d3e93069542e46/AbstractApplicationPage.java/buggy/support/src/main/java/org/springframework/richclient/application/support/AbstractApplicationPage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
527,
1964,
1841,
12,
3460,
1841,
1363,
1841,
262,
288,
3639,
1363,
7171,
18,
1289,
12,
1363,
1841,
11272,
3639,
741,
986,
1964,
1841,
12,
1363,
1841,
11272,
3639,
1363,
1841,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
527,
1964,
1841,
12,
3460,
1841,
1363,
1841,
262,
288,
3639,
1363,
7171,
18,
1289,
12,
1363,
1841,
11272,
3639,
741,
986,
1964,
1841,
12,
1363,
1841,
11272,
3639,
1363,
1841,
1... |
"will try to slot into conversation " + conversationId); | "will try to slot into conversation " + conversationId); | private synchronized Message addMessageInternal(OperationContext octxt, ParsedMessage pm, int folderId, boolean noICal, int flags, String tagStr, int conversationId, String rcptEmail, Message.DraftInfo dinfo, SharedDeliveryContext sharedDeliveryCtxt) throws IOException, ServiceException { if (pm == null) throw ServiceException.INVALID_REQUEST("null ParsedMessage when adding message to mailbox " + mId, null); boolean debug = ZimbraLog.mailbox.isDebugEnabled(); byte[] data; String digest; int msgSize; try { data = pm.getRawData(); digest = pm.getRawDigest(); msgSize = pm.getRawSize(); } catch (MessagingException me) { throw MailServiceException.MESSAGE_PARSE_ERROR(me); } if (conversationId <= HIGHEST_SYSTEM_ID) conversationId = ID_AUTO_INCREMENT; CreateMessage redoPlayer = (octxt == null ? null : (CreateMessage) octxt.player); // quick check to make sure we don't deliver 5 copies of the same message String msgidHeader = pm.getMessageID(); boolean isSent = ((flags & Flag.FLAG_FROM_ME) != 0); boolean checkDuplicates = (redoPlayer == null && msgidHeader != null); if (checkDuplicates && !isSent && mSentMessageIDs.containsKey(msgidHeader)) { Integer sentMsgID = (Integer) mSentMessageIDs.get(msgidHeader); // if the rules say to drop this duplicated incoming message, return null now if (dedupe(pm.getMimeMessage(), sentMsgID)) return null; // if we're not dropping the new message, see if it goes in the same conversation as the old sent message if (conversationId == ID_AUTO_INCREMENT) { conversationId = getConversationIdFromReferent(pm.getMimeMessage(), sentMsgID.intValue()); if (debug) ZimbraLog.mailbox.debug(" duplicate detected but not deduped (" + msgidHeader + "); " + "will try to slot into conversation " + conversationId); } } CreateMessage redoRecorder = new CreateMessage(mId, rcptEmail, sharedDeliveryCtxt.getShared(), digest, msgSize, folderId, noICal, flags, tagStr); StoreIncomingBlob storeRedoRecorder = null; // Strip out unread flag for internal storage. // This should not be done earlier than redoRecorder initialization. boolean unread = (flags & Flag.FLAG_UNREAD) > 0; flags = flags & ~Flag.FLAG_UNREAD; boolean isSpam = folderId == ID_FOLDER_SPAM; boolean isDraft = ((flags & Flag.FLAG_DRAFT) != 0); Message msg = null; Blob blob = null; MailboxBlob mboxBlob = null; boolean success = false; try { if (redoPlayer != null) { beginTransaction("addMessage", octxt, redoRecorder); rcptEmail = redoPlayer.getRcptEmail(); } else beginTransaction("addMessage", octxt, pm, redoRecorder); // the caller can specify the received date via redo recorder, ParsedMessge constructor, or X-Zimbra-Received header long timestamp = getOperationTimestampMillis(); // "having attachments" is currently tracked via flags if (pm.hasAttachments()) flags |= Flag.FLAG_ATTACHED; else flags &= ~Flag.FLAG_ATTACHED; Folder folder = getFolderById(folderId); String subject = pm.getNormalizedSubject(); long tags = Tag.tagsToBitmask(tagStr); // step 1: get an ID assigned for the new message int messageId = getNextItemId(redoPlayer == null ? ID_AUTO_INCREMENT : redoPlayer.getMessageId()); if (redoPlayer != null) conversationId = redoPlayer.getConversationId(); // step 2: figure out where the message belongs Conversation conv = null; String hash = null; if (!DebugConfig.disableConversation) { if (conversationId != ID_AUTO_INCREMENT) { try { conv = getConversationById(conversationId); if (debug) ZimbraLog.mailbox.debug(" fetched explicitly-specified conversation " + conv.getId()); } catch (ServiceException e) { if (e.getCode() != MailServiceException.NO_SUCH_CONV) throw e; if (debug) ZimbraLog.mailbox.debug(" could not find explicitly-specified conversation " + conversationId); } } else if (!isSpam && !isDraft && pm.isReply()) { conv = getConversationByHash(hash = getHash(subject)); if (debug) ZimbraLog.mailbox.debug(" found conversation " + (conv == null ? -1 : conv.getId()) + " for hash: " + hash); if (conv != null && timestamp > conv.getDate() + ONE_MONTH_MILLIS) { conv = null; if (debug) ZimbraLog.mailbox.debug(" but rejected it because it's too old"); } } } // step 3: create the message and update the cache // and if the message is also an invite, deal with the appointment Conversation convTarget = (conv instanceof VirtualConversation ? null : conv); if (convTarget != null && debug) ZimbraLog.mailbox.debug(" placing message in existing conversation " + convTarget.getId()); short volumeId = redoPlayer == null ? Volume.getCurrentMessageVolume().getId() : redoPlayer.getVolumeId(); ZVCalendar iCal = pm.getiCalendar(); msg = Message.create(messageId, folder, convTarget, pm, msgSize, digest, volumeId, unread, flags, tags, dinfo, noICal, iCal); redoRecorder.setMessageId(msg.getId()); // step 4: create a conversation for the message, if necessary if (!DebugConfig.disableConversation && convTarget == null) { if (conv == null && conversationId == ID_AUTO_INCREMENT) { conv = VirtualConversation.create(this, msg); if (debug) ZimbraLog.mailbox.debug(" placed message " + msg.getId() + " in vconv " + conv.getId()); } else { VirtualConversation vconv = (VirtualConversation) conv; Message[] contents = (conv == null ? new Message[] { msg } : new Message[] { vconv.getMessage(), msg }); conv = createConversation(contents, conversationId); if (vconv != null) { if (debug) ZimbraLog.mailbox.debug(" removed vconv " + vconv.getId()); vconv.removeChild(vconv.getMessage()); } } if (!isSpam && !isDraft) openConversation(conv, hash); } redoRecorder.setConversationId(conv != null && !(conv instanceof VirtualConversation) ? conv.getId() : -1); // step 5: store the blob // TODO: Add partition support. Need to store as many times as there // are unique partitions in the set of recipient mailboxes. blob = sharedDeliveryCtxt.getBlob(); StoreManager sm = StoreManager.getInstance(); if (blob == null) { // This mailbox is the only recipient, or it is the first // of multiple recipients. Save message to incoming directory. if (redoPlayer == null) blob = sm.storeIncoming(data, digest, null, msg.getVolumeId()); else blob = sm.storeIncoming(data, digest, redoPlayer.getPath(), redoPlayer.getVolumeId()); String blobPath = blob.getPath(); short blobVolumeId = blob.getVolumeId(); if (sharedDeliveryCtxt.getShared()) { markOtherItemDirty(blob); // Log entry in redolog for blob save. Blob bytes are // logged in StoreToIncoming entry. storeRedoRecorder = new StoreIncomingBlob( digest, msgSize, sharedDeliveryCtxt.getMailboxIdList()); storeRedoRecorder.start(timestamp); storeRedoRecorder.setBlobBodyInfo(data, blobPath, blobVolumeId); storeRedoRecorder.log(); // Create a link in mailbox directory and leave the incoming // copy alone, so other recipients can link to it later. redoRecorder.setMessageLinkInfo(blobPath, blobVolumeId, msg.getVolumeId()); mboxBlob = sm.link(blob, this, messageId, msg.getSavedSequence(), msg.getVolumeId()); } else { // If the only recipient, move the incoming copy into // mailbox directory. This is more efficient than // creating a link in mailbox directory and deleting // incoming copy. mboxBlob = sm.renameTo(blob, this, messageId, msg.getSavedSequence(), msg.getVolumeId()); // In single-recipient case the blob bytes are logged in // CreateMessage entry, to avoid having to write two // redolog entries for a single delivery. redoRecorder.setMessageBodyInfo(data, blobPath, blobVolumeId); } } else { String srcPath; Blob srcBlob; MailboxBlob srcMboxBlob = sharedDeliveryCtxt.getMailboxBlob(); if (srcMboxBlob != null && srcMboxBlob.getMailbox().getId() == mId) { // With filter rules, a message can be copied to one or // more folders and optionally kept in Inbox, meaning // one delivery can result in multiple deliveries. But // the first copy delivered will not know there are copies // coming, and if there was only one recipient for the // message, we will end up doing the rename case above. // Second and later copies cannot link to the blob file // in incoming directory because it was renamed out. // Instead they have to link to the MailboxBlob file of // the previous delivery. (Bug 2283) srcPath = srcMboxBlob.getPath(); srcBlob = srcMboxBlob.getBlob(); } else { // Second or later recipient in multi-recipient message. // Link to blob in incoming directory. srcPath = blob.getPath(); srcBlob = blob; } redoRecorder.setMessageLinkInfo(srcPath, srcBlob.getVolumeId(), msg.getVolumeId()); mboxBlob = sm.link(srcBlob, this, messageId, msg.getSavedSequence(), msg.getVolumeId()); } markOtherItemDirty(mboxBlob); mCurrentChange.setIndexedItem(msg, pm); success = true; } finally { if (storeRedoRecorder != null) { if (success) storeRedoRecorder.commit(); else storeRedoRecorder.abort(); } endTransaction(success); if (success) { // Everything worked. Update the blob field in ParsedMessage // so the next recipient in the multi-recipient case will link // to this blob as opposed to saving its own copy. sharedDeliveryCtxt.setBlob(blob); sharedDeliveryCtxt.setMailboxBlob(mboxBlob); } } // step 6: remember the Message-ID header so that we can avoid receiving duplicates if (isSent && checkDuplicates) mSentMessageIDs.put(msgidHeader, new Integer(msg.getId())); if (msg != null && ZimbraLog.mailbox.isInfoEnabled()) ZimbraLog.mailbox.info("Added message id=" + msg.getId() + " digest=" + digest + " mailbox=" + getId() + " rcpt=" + rcptEmail); return msg; } | 6965 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6965/c2968386a64d285ddcd668a68b39b84d790490b4/Mailbox.java/clean/ZimbraServer/src/java/com/zimbra/cs/mailbox/Mailbox.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
3852,
2350,
16487,
3061,
12,
2988,
1042,
320,
20364,
16,
19244,
1079,
7430,
16,
509,
31996,
16,
4766,
10792,
1250,
1158,
2871,
287,
16,
509,
2943,
16,
514,
1047,
1585,
16,
509,
1003... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
3852,
2350,
16487,
3061,
12,
2988,
1042,
320,
20364,
16,
19244,
1079,
7430,
16,
509,
31996,
16,
4766,
10792,
1250,
1158,
2871,
287,
16,
509,
2943,
16,
514,
1047,
1585,
16,
509,
1003... |
else if (cl == Integer.class) | else if (cl == Integer.class) | private Class getPrimativeClass(Object obj) { if(obj instanceof XPath) return XPath.class; Class cl = obj.getClass(); if (cl == Double.class) { cl = double.class; } if (cl == Float.class) { cl = float.class; } else if (cl == Boolean.class) { cl = boolean.class; } else if (cl == Byte.class) { cl = byte.class; } else if (cl == Character.class) { cl = char.class; } else if (cl == Short.class) { cl = short.class; } else if (cl == Integer.class) { cl = int.class; } else if (cl == Long.class) { cl = long.class; } return cl; } | 46591 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46591/6fbfc5b396871b2ddb731ea98fccffe88307b5d3/XSLTAttributeDef.java/clean/src/org/apache/xalan/processor/XSLTAttributeDef.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
1659,
8248,
381,
1535,
797,
12,
921,
1081,
13,
225,
288,
565,
309,
12,
2603,
1276,
10172,
13,
1377,
327,
10172,
18,
1106,
31,
3639,
1659,
927,
273,
1081,
18,
588,
797,
5621,
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,
3238,
1659,
8248,
381,
1535,
797,
12,
921,
1081,
13,
225,
288,
565,
309,
12,
2603,
1276,
10172,
13,
1377,
327,
10172,
18,
1106,
31,
3639,
1659,
927,
273,
1081,
18,
588,
797,
5621,
565,
... |
throw new ArgumentError(recv.getRuntime(), args.length, 1); | throw recv.getRuntime().newArgumentError(args.length, 1); | public static IRubyObject mkdir(IRubyObject recv, IRubyObject[] args) { if (args.length < 1) { throw new ArgumentError(recv.getRuntime(), args.length, 1); } if (args.length > 2) { throw new ArgumentError(recv.getRuntime(), args.length, 2); } args[0].checkSafeString(); String path = args[0].toString(); File newDir = new File(path); if (newDir.exists()) { throw new IOError(recv.getRuntime(), path + " already exists"); } return newDir.mkdir() ? RubyFixnum.zero(recv.getRuntime()) : RubyFixnum.one(recv.getRuntime()); } | 47134 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47134/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubyDir.java/clean/src/org/jruby/RubyDir.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
15908,
10340,
921,
6535,
12,
7937,
10340,
921,
10665,
16,
15908,
10340,
921,
8526,
833,
13,
288,
3639,
309,
261,
1968,
18,
2469,
411,
404,
13,
288,
5411,
604,
10665,
18,
588,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
15908,
10340,
921,
6535,
12,
7937,
10340,
921,
10665,
16,
15908,
10340,
921,
8526,
833,
13,
288,
3639,
309,
261,
1968,
18,
2469,
411,
404,
13,
288,
5411,
604,
10665,
18,
588,
... |
gl.glPushMatrix(); | private static void teapot(GL gl, int grid, double scale, int type, boolean backCompatible) { // As mentioned above, GL.glMap2f expects a packed array of floats float[] p = new float[4*4*3]; float[] q = new float[4*4*3]; float[] r = new float[4*4*3]; float[] s = new float[4*4*3]; int i, j, k, l; gl.glPushAttrib(GL.GL_ENABLE_BIT | GL.GL_EVAL_BIT | GL.GL_POLYGON_BIT); gl.glEnable(GL.GL_AUTO_NORMAL); gl.glEnable(GL.GL_NORMALIZE); gl.glEnable(GL.GL_MAP2_VERTEX_3); gl.glEnable(GL.GL_MAP2_TEXTURE_COORD_2); if (!backCompatible) { // The time has come to have the teapot no longer be inside out gl.glFrontFace(GL.GL_CW); gl.glScaled(0.5*scale, 0.5*scale, 0.5*scale); } else { // We want the teapot in it's backward compatible position and // orientation gl.glPushMatrix(); gl.glRotatef(270.0f, 1, 0, 0); gl.glScalef((float)(0.5 * scale), (float)(0.5 * scale), (float)(0.5 * scale)); gl.glTranslatef(0.0f, 0.0f, -1.5f); } for (i = 0; i < 10; i++) { for (j = 0; j < 4; j++) { for (k = 0; k < 4; k++) { for (l = 0; l < 3; l++) { p[(j*4+k)*3+l] = teapotCPData[teapotPatchData[i][j * 4 + k]][l]; q[(j*4+k)*3+l] = teapotCPData[teapotPatchData[i][j * 4 + (3 - k)]][l]; if (l == 1) q[(j*4+k)*3+l] *= -1.0; if (i < 6) { r[(j*4+k)*3+l] = teapotCPData[teapotPatchData[i][j * 4 + (3 - k)]][l]; if (l == 0) r[(j*4+k)*3+l] *= -1.0; s[(j*4+k)*3+l] = teapotCPData[teapotPatchData[i][j * 4 + k]][l]; if (l == 0) s[(j*4+k)*3+l] *= -1.0; if (l == 1) s[(j*4+k)*3+l] *= -1.0; } } } } gl.glMap2f(GL.GL_MAP2_TEXTURE_COORD_2, 0, 1, 2, 2, 0, 1, 4, 2, teapotTex, 0); gl.glMap2f(GL.GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4, p, 0); gl.glMapGrid2f(grid, 0.0f, 1.0f, grid, 0.0f, 1.0f); evaluateTeapotMesh(gl, grid, type, i, !backCompatible); gl.glMap2f(GL.GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4, q, 0); evaluateTeapotMesh(gl, grid, type, i, !backCompatible); if (i < 6) { gl.glMap2f(GL.GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4, r, 0); evaluateTeapotMesh(gl, grid, type, i, !backCompatible); gl.glMap2f(GL.GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4, s, 0); evaluateTeapotMesh(gl, grid, type, i, !backCompatible); } } if (backCompatible) { gl.glPopMatrix(); } gl.glPopAttrib(); } | 46278 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46278/7f700910e4e885623cf170a04de4c7b20a169988/GLUT.java/buggy/src/classes/com/sun/opengl/util/GLUT.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
760,
918,
6489,
438,
352,
12,
11261,
5118,
16,
11794,
509,
3068,
16,
11794,
1645,
3159,
16,
11794,
509,
618,
16,
11794,
1250,
1473,
14599,
13,
225,
288,
565,
368,
2970,
27635,
5721,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
760,
918,
6489,
438,
352,
12,
11261,
5118,
16,
11794,
509,
3068,
16,
11794,
1645,
3159,
16,
11794,
509,
618,
16,
11794,
1250,
1473,
14599,
13,
225,
288,
565,
368,
2970,
27635,
5721,... | |
public void addRetry(int pairId, Status failureType) throws SQLException{ | public void addRetry(int pairId) throws SQLException{ | public void addRetry(int pairId, Status failureType) throws SQLException{ if(!tableContains(pairId)){insert(pairId);} updateRetry(pairId, failureType.getAsShort(), getTimestamp(pairId)); } | 45996 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45996/454cae64b57e89cf12d61a56871d50c6acc219d7/JDBCEventChannelRetry.java/clean/src/edu/sc/seis/sod/database/waveform/JDBCEventChannelRetry.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
527,
7539,
12,
474,
3082,
548,
13,
1216,
6483,
95,
3639,
309,
12,
5,
2121,
10846,
12,
6017,
548,
3719,
95,
6387,
12,
6017,
548,
1769,
97,
3639,
1089,
7539,
12,
6017,
548,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
527,
7539,
12,
474,
3082,
548,
13,
1216,
6483,
95,
3639,
309,
12,
5,
2121,
10846,
12,
6017,
548,
3719,
95,
6387,
12,
6017,
548,
1769,
97,
3639,
1089,
7539,
12,
6017,
548,
1... |
public synchronized void setInstances(Instances newins) { | public void setInstances(Instances newins) { | public synchronized void setInstances(Instances newins) { attribIndex = 0; m_data = newins; as=null; if(m_colorAttrib!=null) { m_colorAttrib.removeAllItems(); for(int i=0; i<m_data.numAttributes(); i++) { m_colorAttrib.addItem(new String("Colour: "+m_data.attribute(i).name()+" "+ ((m_data.attribute(i).isNominal()) ? "(Nom)":"(Num)"))); } m_colorAttrib.setSelectedIndex(m_data.numAttributes()-1); //if (m_data.classIndex() >= 0) { // m_colorAttrib.setSelectedIndex(m_data.classIndex()); //} } classIndex = m_data.numAttributes()-1; this.repaint(); } | 48918 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48918/b21d6fdbff319fc4f5d42be532545eb0fc18c597/AttributeVisualizationPanel.java/clean/weka/gui/AttributeVisualizationPanel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
444,
5361,
12,
5361,
394,
2679,
13,
288,
565,
5885,
1016,
273,
374,
31,
565,
312,
67,
892,
273,
394,
2679,
31,
565,
487,
33,
2011,
31,
565,
309,
12,
81,
67,
3266,
12399,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
444,
5361,
12,
5361,
394,
2679,
13,
288,
565,
5885,
1016,
273,
374,
31,
565,
312,
67,
892,
273,
394,
2679,
31,
565,
487,
33,
2011,
31,
565,
309,
12,
81,
67,
3266,
12399,
... |
assertEquals( 1, modifiedUser2.active ); | assertTrue( modifiedUser2.active ); | public void test_sproc_ChangeUserActiveStatus() { DatabaseService.Table_users user = static_createDummyUser(); user.active = 1; for( int i = 0; i < databaseServices.length; i++ ) { DatabaseService dbService = databaseServices[i]; dbService.sproc_AddNewuser( user ); dbService.sproc_ChangeUserActiveStatus( USER_TEST_ID, false ); DatabaseService.Table_users modifiedUser = dbService.selectFrom_users( new Integer( USER_TEST_ID ) ); assertEquals( 0, modifiedUser.active ); dbService.sproc_ChangeUserActiveStatus( USER_TEST_ID, true ); DatabaseService.Table_users modifiedUser2 = dbService.selectFrom_users( new Integer( USER_TEST_ID ) ); assertEquals( 1, modifiedUser2.active ); } } | 8781 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8781/038e53b4558ddc7040be78beaaf14e7b48d7a765/TestDatabaseService.java/buggy/server/src/imcode/server/db/TestDatabaseService.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
67,
87,
9381,
67,
3043,
1299,
3896,
1482,
1435,
288,
3639,
5130,
1179,
18,
1388,
67,
5577,
729,
273,
760,
67,
2640,
20094,
1299,
5621,
3639,
729,
18,
3535,
273,
404,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
67,
87,
9381,
67,
3043,
1299,
3896,
1482,
1435,
288,
3639,
5130,
1179,
18,
1388,
67,
5577,
729,
273,
760,
67,
2640,
20094,
1299,
5621,
3639,
729,
18,
3535,
273,
404,
31... |
sibling = sibling.getChildAt(size - 1); size = sibling.getChildCount(); | sibling = mod.getChild(sibling, size - 1); size = mod.getChildCount(sibling); | TreeNode getPreviousNode(TreeNode node) { TreeNode parent = node.getParent(); if (parent == null) return null; TreeNode sibling = getPreviousSibling(node); if (sibling == null) return parent; int size = sibling.getChildCount(); while (size > 0) { sibling = sibling.getChildAt(size - 1); size = sibling.getChildCount(); } return sibling; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/f7b0a77266671350e38451a50ce054282a5860ef/BasicTreeUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
20270,
17225,
907,
12,
12513,
756,
13,
225,
288,
565,
20270,
982,
273,
756,
18,
588,
3054,
5621,
565,
309,
261,
2938,
422,
446,
13,
1377,
327,
446,
31,
3639,
20270,
10841,
273,
17225,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
20270,
17225,
907,
12,
12513,
756,
13,
225,
288,
565,
20270,
982,
273,
756,
18,
588,
3054,
5621,
565,
309,
261,
2938,
422,
446,
13,
1377,
327,
446,
31,
3639,
20270,
10841,
273,
17225,
1... |
PlanningFactory rootFactory = null; if (domainService != null) { rootFactory = (PlanningFactory) domainService.getFactory("planning"); } return rootFactory; | PlanningFactory rootFactory = null; if (domainService != null) { rootFactory = (PlanningFactory) domainService.getFactory("planning"); | public PlanningFactory getPlanningFactory() { PlanningFactory rootFactory = null; if (domainService != null) { rootFactory = (PlanningFactory) domainService.getFactory("planning"); } return rootFactory; } | 11319 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11319/32d5bc147d31f5ae79984ead92c6f1994fc6219c/DemandForecastPlugin.java/buggy/bbn/src/org/cougaar/logistics/plugin/demand/DemandForecastPlugin.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3008,
10903,
1733,
9774,
10903,
1733,
1435,
288,
3639,
3008,
10903,
1733,
1365,
1733,
273,
446,
31,
3639,
309,
261,
4308,
1179,
480,
446,
13,
288,
5411,
1365,
1733,
273,
261,
1749,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3008,
10903,
1733,
9774,
10903,
1733,
1435,
288,
3639,
3008,
10903,
1733,
1365,
1733,
273,
446,
31,
3639,
309,
261,
4308,
1179,
480,
446,
13,
288,
5411,
1365,
1733,
273,
261,
1749,
... |
SettingsManager settings=SettingsManager.instance(); sendString(settings.getConnectString()+"\n\n"); expectString(settings.getConnectOkString()+"\n\n"); if ( doShutdown ) sock.close(); | SettingsManager settings=SettingsManager.instance(); sendString(settings.getConnectString()+"\n\n"); expectString(settings.getConnectOkString()+"\n\n"); if ( doShutdown ) sock.close(); | public synchronized void connect() throws IOException { Assert.that(sock==null && in==null && out==null, "Illegal state"); //Entering CONNECTING state. TODO: notify GUI sock=new Socket(host, port); //Entering CONNECTED state. TODO: notify GUI in=new BufferedInputStream(sock.getInputStream()); out=new BufferedOutputStream(sock.getOutputStream()); //Handshake SettingsManager settings=SettingsManager.instance(); sendString(settings.getConnectString()+"\n\n"); expectString(settings.getConnectOkString()+"\n\n"); if ( doShutdown ) sock.close(); } | 5134 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5134/41422245404c0fad8a30437d75fc29381b02be42/Connection.java/clean/components/gnutella-core/src/main/java/com/limegroup/gnutella/Connection.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3852,
918,
3077,
1435,
1216,
1860,
288,
202,
8213,
18,
19056,
12,
15031,
631,
2011,
597,
316,
631,
2011,
597,
596,
631,
2011,
16,
315,
12195,
919,
8863,
202,
759,
10237,
310,
21593,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3077,
1435,
1216,
1860,
288,
202,
8213,
18,
19056,
12,
15031,
631,
2011,
597,
316,
631,
2011,
597,
596,
631,
2011,
16,
315,
12195,
919,
8863,
202,
759,
10237,
310,
21593,... |
final String[] storedPropertyNames = { "inPort", "synthName", "port", "channel", "driver", }; HashSet set = new HashSet(); set.addAll(Arrays.asList(storedPropertyNames)); return set; } | final String[] storedPropertyNames = { "inPort", "synthName", "port", "channel", "driver", }; HashSet set = new HashSet(); set.addAll(Arrays.asList(storedPropertyNames)); return set; } | public Set storedProperties() { final String[] storedPropertyNames = { "inPort", "synthName", "port", "channel", "driver", }; HashSet set = new HashSet(); set.addAll(Arrays.asList(storedPropertyNames)); return set; } | 7591 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7591/497be036ae1a86e2d69f94781ff3f4c8bc65f3c7/Device.java/buggy/JSynthLib/core/Device.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1000,
4041,
2297,
1435,
288,
202,
202,
6385,
514,
8526,
4041,
29932,
273,
288,
1082,
202,
6,
267,
2617,
3113,
315,
11982,
451,
461,
3113,
315,
655,
3113,
315,
4327,
3113,
1082,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1000,
4041,
2297,
1435,
288,
202,
202,
6385,
514,
8526,
4041,
29932,
273,
288,
1082,
202,
6,
267,
2617,
3113,
315,
11982,
451,
461,
3113,
315,
655,
3113,
315,
4327,
3113,
1082,
... |
OS.ImageList_DragShowNolock(false); | void showDropTargetEffect(int effect, int x, int y) { effect = checkEffect(effect); int handle = tree.handle; Point coordinates = new Point(x, y); coordinates = tree.toControl(coordinates); TVHITTESTINFO lpht = new TVHITTESTINFO (); lpht.x = coordinates.x; lpht.y = coordinates.y; OS.SendMessage (handle, OS.TVM_HITTEST, 0, lpht); int hItem = lpht.hItem; if ((effect & DND.FEEDBACK_SCROLL) == 0) { scrollBeginTime = 0; scrollIndex = -1; } else { if (hItem != -1 && scrollIndex == hItem && scrollBeginTime != 0) { if (System.currentTimeMillis() >= scrollBeginTime) { int topItem = OS.SendMessage(handle, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0); int nextItem = OS.SendMessage(handle, OS.TVM_GETNEXTITEM, hItem == topItem ? OS.TVGN_PREVIOUSVISIBLE : OS.TVGN_NEXTVISIBLE, hItem); boolean scroll = true; if (hItem == topItem) { scroll = nextItem != 0; } else { RECT itemRect = new RECT (); itemRect.left = nextItem; if (OS.SendMessage (handle, OS.TVM_GETITEMRECT, 1, itemRect) != 0) { RECT rect = new RECT (); OS.GetClientRect (handle, rect); POINT pt = new POINT (); pt.x = itemRect.left; pt.y = itemRect.top; if (OS.PtInRect (rect, pt)) { pt.y = itemRect.bottom; if (OS.PtInRect (rect, pt)) scroll = false; } } } if (scroll) { OS.ImageList_DragShowNolock(false); OS.SendMessage (handle, OS.TVM_ENSUREVISIBLE, 0, nextItem); tree.update(); OS.ImageList_DragShowNolock(true); } scrollBeginTime = 0; scrollIndex = -1; } } else { scrollBeginTime = System.currentTimeMillis() + SCROLL_HYSTERESIS; scrollIndex = hItem; } } if ((effect & DND.FEEDBACK_EXPAND) == 0) { expandBeginTime = 0; expandIndex = -1; } else { if (hItem != -1 && expandIndex == hItem && expandBeginTime != 0) { if (System.currentTimeMillis() >= expandBeginTime) { if (OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, hItem) != 0) { TVITEM tvItem = new TVITEM (); tvItem.hItem = hItem; tvItem.mask = OS.TVIF_STATE; OS.SendMessage (handle, OS.TVM_GETITEM, 0, tvItem); if ((tvItem.state & OS.TVIS_EXPANDED) == 0) { OS.ImageList_DragShowNolock(false); OS.SendMessage (handle, OS.TVM_EXPAND, OS.TVE_EXPAND, hItem); tree.update(); OS.ImageList_DragShowNolock(true); } } expandBeginTime = 0; expandIndex = -1; } } else { expandBeginTime = System.currentTimeMillis() + EXPAND_HYSTERESIS; expandIndex = hItem; } } if (dropIndex != -1 && (dropIndex != hItem || (effect & DND.FEEDBACK_SELECT) == 0)) { TVITEM tvItem = new TVITEM (); tvItem.hItem = dropIndex; tvItem.mask = OS.TVIF_STATE; tvItem.stateMask = OS.TVIS_DROPHILITED; tvItem.state = 0; OS.ImageList_DragShowNolock(false); OS.SendMessage (handle, OS.TVM_SETITEM, 0, tvItem); tree.update(); OS.ImageList_DragShowNolock(true); dropIndex = -1; } if (hItem != -1 && hItem != dropIndex && (effect & DND.FEEDBACK_SELECT) != 0) { TVITEM tvItem = new TVITEM (); tvItem.hItem = hItem; tvItem.mask = OS.TVIF_STATE; tvItem.stateMask = OS.TVIS_DROPHILITED; tvItem.state = OS.TVIS_DROPHILITED; OS.ImageList_DragShowNolock(false); OS.SendMessage (handle, OS.TVM_SETITEM, 0, tvItem); tree.update(); OS.ImageList_DragShowNolock(true); dropIndex = hItem; } if ((effect & DND.FEEDBACK_INSERT_BEFORE) != 0 || (effect & DND.FEEDBACK_INSERT_AFTER) != 0) { boolean before = (effect & DND.FEEDBACK_INSERT_BEFORE) != 0; /* * Bug in Windows. When TVM_SETINSERTMARK is used to set * an insert mark for a tree and an item is expanded or * collapsed near the insert mark, the tree does not redraw * the insert mark properly. The fix is to hide and show * the insert mark whenever an item is expanded or collapsed. * Since the insert mark can not be queried from the tree, * use the Tree API rather than calling the OS directly. */ TreeItem insertItem = (TreeItem)tree.getDisplay().findWidget(tree.handle, hItem); if (insertItem != null) { OS.ImageList_DragShowNolock(false); tree.setInsertMark(insertItem, before); tree.update(); OS.ImageList_DragShowNolock(true); clearInsert = true; } } else { if (clearInsert) { OS.ImageList_DragShowNolock(false); tree.setInsertMark(null, false); tree.update(); OS.ImageList_DragShowNolock(true); } clearInsert = false; } return;} | 12413 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12413/a3f5ca78a9a757f67007e90931f528488156c2d8/TreeDragAndDropEffect.java/buggy/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TreeDragAndDropEffect.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
918,
2405,
7544,
2326,
12477,
12,
474,
5426,
16,
509,
619,
16,
509,
677,
13,
288,
202,
13867,
273,
866,
12477,
12,
13867,
1769,
202,
474,
1640,
273,
2151,
18,
4110,
31,
202,
2148,
5513,
273,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
918,
2405,
7544,
2326,
12477,
12,
474,
5426,
16,
509,
619,
16,
509,
677,
13,
288,
202,
13867,
273,
866,
12477,
12,
13867,
1769,
202,
474,
1640,
273,
2151,
18,
4110,
31,
202,
2148,
5513,
273,... | |
private final int jjStopStringLiteralDfa_5(int pos, long active0) { switch (pos) { default : return -1; } } | private final int jjStopStringLiteralDfa_5(int pos, long active0) { switch (pos) { default : return -1; } } | private final int jjStopStringLiteralDfa_5(int pos, long active0) { switch (pos) { default : return -1; } } | 45569 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45569/bad9201cffeb6c6da295101be65bfa4924caa39e/JspParserTokenManager.java/buggy/pmd/src/net/sourceforge/pmd/jsp/ast/JspParserTokenManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
727,
509,
10684,
4947,
28565,
40,
507,
67,
25,
12,
474,
949,
16,
1525,
2695,
20,
13,
288,
3639,
1620,
261,
917,
13,
288,
5411,
805,
294,
7734,
327,
300,
21,
31,
3639,
289,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
727,
509,
10684,
4947,
28565,
40,
507,
67,
25,
12,
474,
949,
16,
1525,
2695,
20,
13,
288,
3639,
1620,
261,
917,
13,
288,
5411,
805,
294,
7734,
327,
300,
21,
31,
3639,
289,
565,
... |
long spaceUsed() { | synchronized long spaceUsed() { | long spaceUsed() { return FileUtil.estimateUsage(myFilename, underBucket.size()); } | 45341 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45341/0066e8dd59f16d833d74cc774713d1d0613dd00d/RealArchiveStoreItem.java/buggy/src/freenet/client/RealArchiveStoreItem.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
5748,
3476,
6668,
1435,
288,
202,
202,
2463,
1387,
1304,
18,
23562,
5357,
12,
4811,
5359,
16,
3613,
4103,
18,
1467,
10663,
202,
97,
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,
225,
202,
5748,
3476,
6668,
1435,
288,
202,
202,
2463,
1387,
1304,
18,
23562,
5357,
12,
4811,
5359,
16,
3613,
4103,
18,
1467,
10663,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
&& executableExtension instanceof IStartup) ((IStartup) executableExtension).earlyStartup(); else { | && executableExtension instanceof IStartup) { ((IStartup) executableExtension).earlyStartup(); } else { | private void runEarlyStartup(Object executableExtension) { if (executableExtension != null && executableExtension instanceof IStartup) ((IStartup) executableExtension).earlyStartup(); else { IStatus status = new Status(IStatus.ERROR, extension.getNamespace(), 0, "startup class must implement org.eclipse.ui.IStartup", //$NON-NLS-1$ null); WorkbenchPlugin.log("Bad extension specification", status); //$NON-NLS-1$ } } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/fa4a8cff0e027f8d3c6b1fcb92b30f46767dd191/EarlyStartupRunnable.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EarlyStartupRunnable.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1086,
41,
20279,
22178,
12,
921,
9070,
3625,
13,
288,
3639,
309,
261,
17751,
3625,
480,
446,
7734,
597,
9070,
3625,
1276,
467,
22178,
13,
5411,
14015,
45,
22178,
13,
9070,
3625... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1086,
41,
20279,
22178,
12,
921,
9070,
3625,
13,
288,
3639,
309,
261,
17751,
3625,
480,
446,
7734,
597,
9070,
3625,
1276,
467,
22178,
13,
5411,
14015,
45,
22178,
13,
9070,
3625... |
filter.verb = Verb.getVerb(verbPattern); | filter.verb = Verb.get(verbPattern); | private void parseParams() { StringBuffer assetName = new StringBuffer(); assetName.append("UniversalSink"); for (Enumeration e = getParameters().elements();e.hasMoreElements();) { String param = (String) e.nextElement(); Filter filter = new Filter(); ScheduleElement el; Schedule schedule = new ScheduleImpl(); boolean defaultIsFailure = param.startsWith("-"); if (defaultIsFailure) param = param.substring(1); StringTokenizer tokens = new StringTokenizer(param, ";"); String verbPattern = tokens.nextToken(); int slashPos = verbPattern.indexOf('/'); if (slashPos >= 0) { filter.verb = Verb.getVerb(verbPattern.substring(0, slashPos)); filter.regex = Pattern.compile(verbPattern.substring(slashPos + 1)); } else { filter.verb = Verb.getVerb(verbPattern); filter.regex = null; } while (tokens.hasMoreTokens()) { String token = tokens.nextToken(); String sub; int dotdot = token.indexOf(".."); long from = TimeSpan.MIN_VALUE; long to = TimeSpan.MAX_VALUE; if (dotdot < 0) { from = Date.parse(token); } else { sub = token.substring(0, dotdot); if (sub.length() > 0) { from = Date.parse(sub); } sub = token.substring(dotdot + 2); if (sub.length() > 0) { to = Date.parse(sub); } } el = new ScheduleElementImpl(from, to); schedule.add(el); } if (defaultIsFailure) { /* We built a schedule of exceptions to failure (a success schedule). It must be converted to a failure schedule. */ long startTime = TimeSpan.MIN_VALUE; filter.schedule = new ScheduleImpl(); for (ListIterator i = schedule.listIterator(); i.hasNext(); ) { ScheduleElement el2 = (ScheduleElement) i.next(); el = new ScheduleElementImpl(startTime, el2.getStartTime()); filter.schedule.add(el); startTime = el2.getEndTime(); } el = new ScheduleElementImpl(startTime, TimeSpan.MAX_VALUE); filter.schedule.add(el); } else { /* We build a schedule of exceptions to success (a failure schedule) and that is exactly what we need */ filter.schedule = schedule; } verbMap.put(filter.verb, filter); System.out.println("AdaptiveUniversalAllocatorPlugin adding " + filter); assetName.append('_'); assetName.append(filter.verb); } sink_asset = theLDMF.createPrototype("AbstractAsset", assetName.substring(0)); publishAdd(sink_asset); } | 7171 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7171/6c245e9a4b46cd0066408cc5ff7f4f953b95f742/AdaptiveUniversalAllocatorPlugin.java/clean/glm/src/org/cougaar/mlm/plugin/sample/AdaptiveUniversalAllocatorPlugin.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1109,
1370,
1435,
288,
3639,
6674,
3310,
461,
273,
394,
6674,
5621,
3639,
3310,
461,
18,
6923,
2932,
984,
14651,
11326,
8863,
202,
1884,
261,
21847,
425,
273,
10028,
7675,
6274,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1109,
1370,
1435,
288,
3639,
6674,
3310,
461,
273,
394,
6674,
5621,
3639,
3310,
461,
18,
6923,
2932,
984,
14651,
11326,
8863,
202,
1884,
261,
21847,
425,
273,
10028,
7675,
6274,
... |
long rc[] = new long[nrClusters]; | int i; int entryIndex = -1; for (i = lastFreeCluster; i < entries.length; i++) { if (isFreeCluster(entries[i])) { entryIndex=i; break; } } if(entryIndex<0){ for(i = 2; i < lastFreeCluster;i++){ if (isFreeCluster(entries[i])) { entryIndex=i; break; } } } if(entryIndex < 0){ throw new IOException("FAT Full (" + entries.length + ", " + i + ")"); } entries[entryIndex] = eofMarker; lastFreeCluster = entryIndex+1; this.dirty = true; | public synchronized long[] allocNew(int nrClusters) throws IOException { long rc[] = new long[nrClusters]; rc[0] = allocNew(); for (int i = 1; i < nrClusters; i++) { rc[i] = allocAppend(rc[i - 1]); } return rc; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/51e4aed2205f326c2698e2154ea7f83ae5dfc2b6/Fat.java/buggy/fs/src/fs/org/jnode/fs/fat/Fat.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3852,
1525,
8526,
4767,
1908,
12,
474,
9884,
13698,
13,
1216,
1860,
288,
202,
202,
5748,
4519,
8526,
273,
394,
1525,
63,
11611,
13698,
15533,
202,
202,
1310,
63,
20,
65,
273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3852,
1525,
8526,
4767,
1908,
12,
474,
9884,
13698,
13,
1216,
1860,
288,
202,
202,
5748,
4519,
8526,
273,
394,
1525,
63,
11611,
13698,
15533,
202,
202,
1310,
63,
20,
65,
273,
... |
public abstract void openEditor(IWorkbenchPage page, boolean activate, int matchFlags, boolean rememberEditor) throws PartInitException; | public abstract void openEditor(IWorkbenchPage page, boolean activate, int matchFlags, boolean rememberEditor) throws PartInitException; | public abstract void openEditor(IWorkbenchPage page, boolean activate, int matchFlags, boolean rememberEditor) throws PartInitException; | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/b75e713412ed293b947f6e7d04b30466166103b1/OpenWithEntry.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/provisional/ide/OpenWithEntry.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
8770,
918,
1696,
6946,
12,
45,
2421,
22144,
1964,
1363,
16,
1082,
202,
6494,
10235,
16,
509,
845,
5094,
16,
1250,
11586,
6946,
13,
1216,
6393,
2570,
503,
31,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
8770,
918,
1696,
6946,
12,
45,
2421,
22144,
1964,
1363,
16,
1082,
202,
6494,
10235,
16,
509,
845,
5094,
16,
1250,
11586,
6946,
13,
1216,
6393,
2570,
503,
31,
2,
-100,
-100,
-1... |
db = (DatabaseImpl) _jdo.getDatabase(); db.begin(); | _db = (DatabaseImpl) _jdo.getDatabase(); _db.begin(); | public void testReadOnlyCached() throws Exception { long start = System.currentTimeMillis(); db = (DatabaseImpl) _jdo.getDatabase(); db.begin(); long begin = System.currentTimeMillis(); OQLQuery query = db.getOQLQuery( "SELECT o FROM " + Locked.class.getName() + " o order by o.id"); QueryResults results = query.execute(Database.ReadOnly); long result = System.currentTimeMillis(); initIterateQueries(); int count = 0; while (results.hasMore()) { iterateStates((Locked) results.next(), Database.ReadOnly); count++; } long iterate = System.currentTimeMillis(); db.commit(); long commit = System.currentTimeMillis(); db.close(); long close = System.currentTimeMillis(); LOG.info(format("ReadOnlyCached", df.format(begin - start), df.format(result- begin), df.format(iterate - result), df.format(commit - iterate), df.format(close - commit))); } | 3614 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3614/dd1523da0d80afe68cbe531453f26c85802eb5e5/TestLoadUni1toN.java/buggy/trunk/castor/src/tests/ptf/jdo/rel1toN/TestLoadUni1toN.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
12066,
9839,
1435,
1216,
1185,
288,
3639,
1525,
787,
273,
2332,
18,
2972,
28512,
5621,
7734,
1319,
273,
261,
4254,
2828,
13,
389,
78,
2896,
18,
588,
4254,
5621,
3639,
131... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12066,
9839,
1435,
1216,
1185,
288,
3639,
1525,
787,
273,
2332,
18,
2972,
28512,
5621,
7734,
1319,
273,
261,
4254,
2828,
13,
389,
78,
2896,
18,
588,
4254,
5621,
3639,
131... |
Cache cache = event.getMap(); if ((cache.getName() != null) && !Cache.NESTED_EVENT.equals(event.getOrigin()) && !ClusterManager.CLUSTER_ORIGIN.equals(event.getOrigin())) { | if (!Cache.NESTED_EVENT.equals(event.getOrigin()) && !ClusterManager.CLUSTER_ORIGIN.equals(event.getOrigin())) { | public void cacheEntryFlushed(CacheEntryEvent event) { Cache cache = event.getMap(); if ((cache.getName() != null) && !Cache.NESTED_EVENT.equals(event.getOrigin()) && !ClusterManager.CLUSTER_ORIGIN.equals(event.getOrigin())) { if (log.isDebugEnabled()) { log.debug("cacheEntryFlushed called (" + event + ")"); } cm.signalEntryFlush(event.getKey(), cache.getName()); } } | 58834 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58834/d500f24c8aede88f65f71296055255d1ee78d231/BroadcastingCacheEventListener.java/buggy/src/plugins/clustersupport/java/com/opensymphony/oscache/plugins/clustersupport/BroadcastingCacheEventListener.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
26969,
8207,
329,
12,
27630,
1133,
871,
13,
288,
3639,
4379,
1247,
273,
871,
18,
588,
863,
5621,
3639,
309,
14015,
2493,
18,
17994,
1435,
480,
446,
13,
597,
401,
1649,
18,
54... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
26969,
8207,
329,
12,
27630,
1133,
871,
13,
288,
3639,
4379,
1247,
273,
871,
18,
588,
863,
5621,
3639,
309,
14015,
2493,
18,
17994,
1435,
480,
446,
13,
597,
401,
1649,
18,
54... |
String logDirectory = servletConfig.getServletContext( ) | String logDirectory = servletContext | private ReportEngineService( ServletConfig servletConfig ) { System.setProperty( "RUN_UNDER_ECLIPSE", "false" ); //$NON-NLS-1$ //$NON-NLS-2$ if ( servletConfig == null ) { return; } config = new EngineConfig( ); // Register new image handler HTMLEmitterConfig emitterConfig = new HTMLEmitterConfig( ); emitterConfig.setActionHandler( new HTMLActionHandler( ) ); imageHandler = new HTMLServerImageHandler( ); emitterConfig.setImageHandler( imageHandler ); config.getEmitterConfigs( ).put( "html", emitterConfig ); //$NON-NLS-1$ // Prepare image directory. imageDirectory = servletConfig.getServletContext( ) .getInitParameter( ParameterAccessor.INIT_PARAM_IMAGE_DIR ); if ( imageDirectory == null || imageDirectory.trim( ).length( ) <= 0 || ParameterAccessor.isRelativePath( imageDirectory ) ) { imageDirectory = ParameterAccessor.getRealPath( servletConfig.getServletContext( ), "/report/images" ); //$NON-NLS-1$ } // Prepare image base url. imageBaseUrl = IBirtConstants.SERVLET_PATH_PREVIEW + "?__imageID="; //$NON-NLS-1$ // Prepare log directory. String logDirectory = servletConfig.getServletContext( ) .getInitParameter( ParameterAccessor.INIT_PARAM_LOG_DIR ); if ( logDirectory == null || logDirectory.trim( ).length( ) <= 0 || ParameterAccessor.isRelativePath( logDirectory ) ) { logDirectory = ParameterAccessor.getRealPath( servletConfig.getServletContext( ), "/logs" ); //$NON-NLS-1$ } // Prepare log level. String logLevel = servletConfig.getServletContext( ) .getInitParameter( ParameterAccessor.INIT_PARAM_LOG_LEVEL ); Level level = logLevel != null && logLevel.length( ) > 0 ? Level.parse( logLevel ) : Level.OFF; config.setLogConfig( logDirectory, level ); // Prepare ScriptLib location String scriptLibDir = servletConfig.getServletContext( ) .getInitParameter( ParameterAccessor.INIT_PARAM_SCRIPTLIB_DIR ); if ( scriptLibDir == null || scriptLibDir.trim( ).length( ) <= 0 || ParameterAccessor.isRelativePath( scriptLibDir ) ) { scriptLibDir = ParameterAccessor.getRealPath( servletConfig.getServletContext( ), "/scriptlib" ); //$NON-NLS-1$ } ArrayList jarFileList = new ArrayList( ); if ( scriptLibDir != null ) { File dir = new File( scriptLibDir ); getAllJarFiles( dir, jarFileList ); } String scriptlibClassPath = ""; //$NON-NLS-1$ for ( int i = 0; i < jarFileList.size( ); i++ ) scriptlibClassPath += EngineConstants.PROPERTYSEPARATOR + ( (File) jarFileList.get( i ) ).getAbsolutePath( ); if ( scriptlibClassPath.startsWith( EngineConstants.PROPERTYSEPARATOR ) ) scriptlibClassPath = scriptlibClassPath.substring( EngineConstants.PROPERTYSEPARATOR.length( ) ); System.setProperty( EngineConstants.WEBAPP_CLASSPATH_KEY, scriptlibClassPath ); config.setEngineHome( "" ); //$NON-NLS-1$ } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/4ea91dbf969b6a2c94d239aeb7a50028eecd14bb/ReportEngineService.java/clean/viewer/org.eclipse.birt.report.viewer/birt/WEB-INF/classes/org/eclipse/birt/report/service/ReportEngineService.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
8706,
4410,
1179,
12,
7971,
809,
8100,
809,
262,
202,
95,
202,
202,
3163,
18,
542,
1396,
12,
315,
15238,
67,
31625,
67,
7228,
2053,
52,
1090,
3113,
315,
5743,
6,
11272,
4329,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8706,
4410,
1179,
12,
7971,
809,
8100,
809,
262,
202,
95,
202,
202,
3163,
18,
542,
1396,
12,
315,
15238,
67,
31625,
67,
7228,
2053,
52,
1090,
3113,
315,
5743,
6,
11272,
4329,... |
return bounds.getSize(); | Dimension retVal = bounds.getSize(); Component parent = list.getParent(); if ((visibleRows == -1) && (parent instanceof JViewport)) { JViewport viewport = (JViewport) parent; if (layoutOrientation == JList.HORIZONTAL_WRAP) { int h = viewport.getSize().height; int cellsPerCol = h / cellHeight; int w = size / cellsPerCol * cellWidth; retVal = new Dimension(w, h); } else if (layoutOrientation == JList.VERTICAL_WRAP) { int w = viewport.getSize().width; int cellsPerRow = Math.max(w / cellWidth, 1); int h = size / cellsPerRow * cellHeight; retVal = new Dimension(w, h); } } return retVal; | public Dimension getPreferredSize(JComponent c) { if (list.getModel().getSize() == 0) return new Dimension(0, 0); Rectangle bounds = getCellBounds(list, 0, list.getModel().getSize() - 1); return bounds.getSize(); } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/b12e4b97d99b73f08ccf219bf0a3ffe50371c94a/BasicListUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicListUI.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
13037,
12822,
4193,
1225,
12,
46,
1841,
276,
13,
225,
288,
565,
309,
261,
1098,
18,
588,
1488,
7675,
588,
1225,
1435,
422,
374,
13,
1377,
327,
394,
13037,
12,
20,
16,
374,
1769,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
13037,
12822,
4193,
1225,
12,
46,
1841,
276,
13,
225,
288,
565,
309,
261,
1098,
18,
588,
1488,
7675,
588,
1225,
1435,
422,
374,
13,
1377,
327,
394,
13037,
12,
20,
16,
374,
1769,
... |
if (verboseJNI) VM.sysWrite("JNI called: NewGlobalRef\n"); | if (traceJNI) VM.sysWrite("JNI called: NewGlobalRef\n"); | private static int NewGlobalRef(int envJREF, int objectJREF) { if (verboseJNI) VM.sysWrite("JNI called: NewGlobalRef\n"); try { VM_JNIEnvironment env = VM_Thread.getCurrentThread().getJNIEnv(); Object obj1 = (Object) env.getJNIRef(objectJREF); return VM_JNIGlobalRefTable.newGlobalRef( obj1 ); } catch (Throwable whatever) { VM_JNIEnvironment env = VM_Thread.getCurrentThread().getJNIEnv(); env.recordException(whatever); return 0; } } | 4011 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4011/5489af23028d99d43283369db343b90e6193f926/VM_JNIFunctions.java/buggy/rvm/src/vm/jni/VM_JNIFunctions.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
760,
509,
1166,
5160,
1957,
12,
474,
1550,
46,
10771,
16,
509,
733,
46,
10771,
13,
288,
565,
309,
261,
5129,
46,
50,
45,
13,
8251,
18,
9499,
3067,
2932,
46,
50,
45,
2566,
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,
282,
3238,
760,
509,
1166,
5160,
1957,
12,
474,
1550,
46,
10771,
16,
509,
733,
46,
10771,
13,
288,
565,
309,
261,
5129,
46,
50,
45,
13,
8251,
18,
9499,
3067,
2932,
46,
50,
45,
2566,
30,
... |
log.info("Dropping " + studentUid + " from all sections in category " + category + " in site " + siteContext); | if(log.isDebugEnabled()) log.debug("Dropping " + studentUid + " from all sections in category " + category + " in site " + siteContext); | public void dropEnrollmentFromCategory(String studentUid, String siteContext, String category) { log.info("Dropping " + studentUid + " from all sections in category " + category + " in site " + siteContext); // Get the sections in this category Site site; try { site = siteService.getSite(siteContext); } catch (IdUnusedException ide) { log.error("Unable to find site " + siteContext); return; } Collection groups = site.getGroups(); for(Iterator iter = groups.iterator(); iter.hasNext();) { // Drop the user from this section if they are enrolled Group group= (Group)iter.next(); CourseSectionImpl section = new CourseSectionImpl(group); if(section.getCategory().equals(category)) { log.info("group size pre-drop = " + group.getMembers().size() + " for " + group.getReference()); group.removeMember(studentUid); log.info("group size post-drop = " + group.getMembers().size() + " for " + group.getReference()); } } try { siteService.saveGroupMembership(site); postEvent("Removed " + studentUid + " from any sections of category " + category, site.getReference()); } catch (IdUnusedException e) { log.error("unable to find site: ", e); return; } catch (PermissionException e) { log.error("access denied while attempting to save site: ", e); return; } } | 2021 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2021/5dadeaef948b88def93a0bc0280bf50e176a1476/SectionManagerImpl.java/clean/sections/sections-comp-shared/sakai21/src/java/org/sakaiproject/component/section/sakai21/SectionManagerImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
3640,
664,
17118,
1265,
4457,
12,
780,
18110,
11994,
16,
514,
2834,
1042,
16,
514,
3150,
13,
288,
202,
202,
1330,
18,
1376,
2932,
7544,
1382,
315,
397,
18110,
11994,
397,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
3640,
664,
17118,
1265,
4457,
12,
780,
18110,
11994,
16,
514,
2834,
1042,
16,
514,
3150,
13,
288,
202,
202,
1330,
18,
1376,
2932,
7544,
1382,
315,
397,
18110,
11994,
397,
... |
cUseSep.setText( Messages.getString( "FormatNumberPreferencePage.use1000sSeparator.label" ) ); | cUseSep.setText( LABEL_USE_1000S_SEPARATOR ); | private Composite getCurrencyPage( Composite parent ) { if ( currencyPage == null ) { currencyPage = new Composite( parent, SWT.NULL ); currencyPage.setLayout( new GridLayout( 1, false ) ); Group cSetting = new Group( currencyPage, SWT.NONE ); cSetting.setText( Messages.getString( "FormatNumberPreferencePage.currencySetting.groupLabel" ) ); //$NON-NLS-1$ cSetting.setLayoutData( createGridData4Group( ) ); cSetting.setLayout( new GridLayout( 2, false ) ); new Label( cSetting, SWT.NONE ).setText( Messages.getString( "FormatNumberPreferencePage.currencySetting.decimalPlaces" ) ); //$NON-NLS-1$ cPlacesChoice = new Combo( cSetting, SWT.BORDER | SWT.SINGLE | SWT.V_SCROLL ); cPlacesChoice.setItems( new String[]{ "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10" //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$ } ); GridData data = new GridData( GridData.FILL_HORIZONTAL ); data.heightHint = 20; cPlacesChoice.setLayoutData( data ); cPlacesChoice.addSelectionListener( mySelectionListener ); cPlacesChoice.addModifyListener( myModifyListener ); cPlacesChoice.select( 2 ); cUseSep = new Button( cSetting, SWT.CHECK ); cUseSep.setText( Messages.getString( "FormatNumberPreferencePage.use1000sSeparator.label" ) ); //$NON-NLS-1$ data = new GridData( ); data.horizontalSpan = 2; cUseSep.setLayoutData( data ); cUseSep.addSelectionListener( mySelectionListener ); new Label( cSetting, SWT.NONE ).setText( Messages.getString( "FormatNumberPreferencePage.symbol.label" ) ); //$NON-NLS-1$ cSymbolChoice = new Combo( cSetting, SWT.DROP_DOWN | SWT.READ_ONLY ); cSymbolChoice.setLayoutData( new GridData( GridData.HORIZONTAL_ALIGN_FILL ) ); cSymbolChoice.setItems( symbols ); cSymbolChoice.addSelectionListener( new SelectionAdapter( ) { public void widgetSelected( SelectionEvent e ) { if ( cSymbolChoice.getSelectionIndex( ) == 0 ) { cSymPosChoice.deselectAll( ); cSymPosChoice.setEnabled( false ); } else { if ( !cSymPosChoice.isEnabled( ) ) { cSymPosChoice.setEnabled( true ); cSymPosChoice.select( 1 ); } } updatePreview( ); } } ); cSymbolChoice.select( 0 ); new Label( cSetting, SWT.NONE ).setText( Messages.getString( "FormatNumberPreferencePage.symbolPosition.label" ) ); //$NON-NLS-1$ cSymPosChoice = new Combo( cSetting, SWT.DROP_DOWN | SWT.READ_ONLY ); cSymPosChoice.setItems( new String[]{ SYMBOL_POSITION_AFTER, SYMBOL_POSITION_BEFORE } ); cSymPosChoice.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) ); cSymPosChoice.addSelectionListener( mySelectionListener ); cSymPosChoice.setEnabled( false ); Label label = new Label( cSetting, SWT.NONE ); label.setLayoutData( new GridData( GridData.VERTICAL_ALIGN_BEGINNING ) ); label.setText( Messages.getString( "FormatNumberPreferencePage.negativeNum.label" ) ); //$NON-NLS-1$ cNegNumChoice = new List( cSetting, SWT.SINGLE | SWT.BORDER | SWT.V_SCROLL ); cNegNumChoice.add( "-1234.56" ); //$NON-NLS-1$ cNegNumChoice.add( "(-1234.56)" ); //$NON-NLS-1$ data = new GridData( GridData.FILL_HORIZONTAL ); cNegNumChoice.setLayoutData( data ); cNegNumChoice.addSelectionListener( mySelectionListener ); cNegNumChoice.select( 0 ); cPreviewLabel = createPreviewText( currencyPage, DEFAULT_WITH ); } return currencyPage; } | 5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/ed52f1732ec1c1eef0fd79e44d2e45f78973153a/FormatNumberPage.java/clean/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/dialogs/FormatNumberPage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
14728,
17910,
1964,
12,
14728,
982,
262,
202,
95,
202,
202,
430,
261,
5462,
1964,
422,
446,
262,
202,
202,
95,
1082,
202,
7095,
1964,
273,
394,
14728,
12,
982,
16,
348,
8588,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
14728,
17910,
1964,
12,
14728,
982,
262,
202,
95,
202,
202,
430,
261,
5462,
1964,
422,
446,
262,
202,
202,
95,
1082,
202,
7095,
1964,
273,
394,
14728,
12,
982,
16,
348,
8588,... |
doSetLocationsExposure(entity, curHex, | doSetLocationsExposure(entity, curHex, | private void processMovement(Entity entity, MovePath md) { Report r; boolean sideslipped = false; // for VTOL sideslipping // check for fleeing if (md.contains(MovePath.STEP_FLEE)) { // Unit has fled the battlefield. r = new Report(2005, Report.PUBLIC); r.addDesc(entity); addReport(r); // Is the unit carrying passengers? final Vector passengers = entity.getLoadedUnits(); if ( !passengers.isEmpty() ) { final Enumeration iter = passengers.elements(); while ( iter.hasMoreElements() ) { final Entity passenger = (Entity) iter.nextElement(); // Unit has fled the battlefield. r = new Report(2010, Report.PUBLIC); r.indent(); r.addDesc(passenger); addReport(r); game.removeEntity( passenger.getId(), IEntityRemovalConditions.REMOVE_IN_RETREAT ); send( createRemoveEntityPacket(passenger.getId(), IEntityRemovalConditions.REMOVE_IN_RETREAT) ); } } // Handle any picked up MechWarriors Enumeration iter = entity.getPickedUpMechWarriors().elements(); while (iter.hasMoreElements() ) { Integer mechWarriorId = (Integer)iter.nextElement(); Entity mw = game.getEntity(mechWarriorId.intValue()); // Is the MechWarrior an enemy? int condition = IEntityRemovalConditions.REMOVE_IN_RETREAT; r = new Report(2010); if (mw.isCaptured()) { r = new Report(2015); condition = IEntityRemovalConditions.REMOVE_CAPTURED; } game.removeEntity( mw.getId(), condition ); send( createRemoveEntityPacket(mw.getId(), condition) ); r.addDesc(mw); r.indent(); addReport(r); } // Is the unit being swarmed? final int swarmerId = entity.getSwarmAttackerId(); if ( Entity.NONE != swarmerId ) { final Entity swarmer = game.getEntity( swarmerId ); // Has the swarmer taken a turn? if ( !swarmer.isDone() ) { // Dead entities don't take turns. game.removeTurnFor(swarmer); send(createTurnVectorPacket()); } // End swarmer-still-to-move // Unit has fled the battlefield. swarmer.setSwarmTargetId( Entity.NONE ); entity.setSwarmAttackerId( Entity.NONE ); r = new Report(2015, Report.PUBLIC); r.indent(); r.addDesc(swarmer); addReport(r); game.removeEntity( swarmerId, IEntityRemovalConditions.REMOVE_CAPTURED ); send( createRemoveEntityPacket(swarmerId, IEntityRemovalConditions.REMOVE_CAPTURED) ); } game.removeEntity( entity.getId(), IEntityRemovalConditions.REMOVE_IN_RETREAT ); send( createRemoveEntityPacket(entity.getId(), IEntityRemovalConditions.REMOVE_IN_RETREAT) ); return; } if (md.contains(MovePath.STEP_EJECT)) { if (entity instanceof Mech) { r = new Report(2020); r.subject = entity.getId(); r.add(entity.getCrew().getName()); r.addDesc(entity); addReport(r); } else if (entity instanceof Tank) { r = new Report(2025); r.subject = entity.getId(); r.addDesc(entity); addReport(r); } addReport( ejectEntity(entity, false)); return; } // okay, proceed with movement calculations Coords lastPos = entity.getPosition(); Coords curPos = entity.getPosition(); int curFacing = entity.getFacing(); int curVTOLElevation = entity.getElevation(); int distance = 0; int mpUsed = 0; int moveType = IEntityMovementType.MOVE_NONE; int overallMoveType = IEntityMovementType.MOVE_NONE; // if the entity already used some MPs, // it previously tried to get up and fell, // and then got another turn. set moveType // and overallMoveType accordingly if (entity.mpUsed > 0) { moveType = IEntityMovementType.MOVE_WALK; overallMoveType = IEntityMovementType.MOVE_WALK; if (entity.mpUsed > entity.getWalkMP()) { moveType = IEntityMovementType.MOVE_RUN; overallMoveType = IEntityMovementType.MOVE_RUN; } } boolean firstStep; boolean wasProne; boolean fellDuringMovement; int prevFacing = curFacing; IHex prevHex = null; final boolean isInfantry = (entity instanceof Infantry); AttackAction charge = null; PilotingRollData rollTarget; // cache this here, otherwise changing MP in the turn causes // errorneous gravity PSRs int cachedGravityLimit = (IEntityMovementType.MOVE_JUMP == moveType)? entity.getOriginalJumpMP() : entity.getRunMP(false); // Compile the move md.compile(game, entity); if (md.contains(MovePath.STEP_CLEAR_MINEFIELD)) { ClearMinefieldAction cma = new ClearMinefieldAction(entity.getId()); entity.setClearingMinefield(true); game.addAction(cma); } // check for MASC failure if (entity instanceof Mech) { Vector crits = new Vector(); Vector vReport = new Vector(); if (((Mech)entity).checkForMASCFailure(md, vReport, crits)) { addReport(vReport); CriticalSlot cs = null; int loc = Entity.LOC_NONE; for(Enumeration e = crits.elements();e.hasMoreElements();) { Object o = e.nextElement(); if(o instanceof Integer) loc = (Integer) o; else if (o instanceof CriticalSlot) { cs = (CriticalSlot) o; applyCriticalHit(entity, loc, cs, true); } } // no movement after that md.clear(); } } overallMoveType = md.getLastStepMovementType(); //check for starting in liquid magma if(game.getBoard().getHex(entity.getPosition()).terrainLevel(Terrains.MAGMA) == 2 && entity.getElevation() == 0) { doMagmaDamage(entity, false); } // iterate through steps firstStep = true; fellDuringMovement = false; /* Bug 754610: Revert fix for bug 702735. */ MoveStep prevStep = null; Vector movePath = new Vector(); for (final Enumeration i = md.getSteps(); i.hasMoreElements();) { final MoveStep step = (MoveStep)i.nextElement(); wasProne = entity.isProne(); boolean isPavementStep = step.isPavementStep(); boolean entityFellWhileAttemptingToStand = false; // stop for illegal movement if (step.getMovementType() == IEntityMovementType.MOVE_ILLEGAL) { break; } //stop if the entity already killed itself if(entity.isDestroyed() || entity.isDoomed()) { break; } // check piloting skill for getting up rollTarget = entity.checkGetUp(step); if (rollTarget.getValue() != TargetRoll.CHECK_FALSE) { entity.heatBuildup += 1; entity.setProne(false); entity.setHullDown(false); wasProne = false; game.resetPSRs(entity); entityFellWhileAttemptingToStand = !doSkillCheckInPlace(entity, rollTarget); } // did the entity just fall? if (entityFellWhileAttemptingToStand) { moveType = step.getMovementType(); curFacing = entity.getFacing(); curPos = entity.getPosition(); mpUsed = step.getMpUsed(); fellDuringMovement = true; break; } if (step.getType() == MovePath.STEP_UNJAM_RAC) { entity.setUnjammingRAC(true); game.addAction(new UnjamAction(entity.getId())); break; } if (step.getType() == MovePath.STEP_LAY_MINE) { LayMinefieldAction lma = new LayMinefieldAction(entity.getId(), step.getMineToLay()); game.addLayMinefieldAction(lma); entity.setLayingMines(true); break; } if (step.getType() == MovePath.STEP_SEARCHLIGHT && entity.hasSpotlight()) { final boolean SearchOn = !entity.isUsingSpotlight(); entity.setSpotlightState(SearchOn); sendServerChat(entity.getDisplayName() + " switched searchlight "+(SearchOn?"on":"off")+"."); } // set most step parameters moveType = step.getMovementType(); distance = step.getDistance(); mpUsed = step.getMpUsed(); // check for charge if (step.getType() == MovePath.STEP_CHARGE) { if (entity.canCharge()) { checkExtremeGravityMovement(entity, step, curPos, cachedGravityLimit); Targetable target = step.getTarget( game ); ChargeAttackAction caa = new ChargeAttackAction(entity.getId(), target.getTargetType(), target.getTargetId(), target.getPosition()); entity.setDisplacementAttack(caa); game.addCharge(caa); charge = caa; } else { sendServerChat("Illegal charge!! I don't think "+entity.getDisplayName() +" should be allowed to charge,"+ " but the client of "+entity.getOwner().getName()+" disagrees."); sendServerChat("Please make sure "+entity.getOwner().getName()+" is running MegaMek "+MegaMek.VERSION+ ", or if that is already the case, submit a bug report at http://megamek.sf.net/"); return; } break; } // check for dfa if (step.getType() == MovePath.STEP_DFA) { if (entity.canDFA()) { checkExtremeGravityMovement(entity, step, curPos, cachedGravityLimit); Targetable target = step.getTarget( game ); DfaAttackAction daa = new DfaAttackAction(entity.getId(), target.getTargetType(), target.getTargetId(), target.getPosition()); entity.setDisplacementAttack(daa); game.addCharge(daa); charge = daa; } else { sendServerChat("Illegal DFA!! I don't think "+entity.getDisplayName() +" should be allowed to DFA,"+ " but the client of "+entity.getOwner().getName()+" disagrees."); sendServerChat("Please make sure "+entity.getOwner().getName()+" is running MegaMek "+MegaMek.VERSION+ ", or if that is already the case, submit a bug report at http://megamek.sf.net/"); return; } break; } // set last step parameters curPos = step.getPosition(); if(moveType != IEntityMovementType.MOVE_JUMP || entity.getJumpType() != Mech.JUMP_BOOSTER) curFacing = step.getFacing(); curVTOLElevation = step.getElevation(); //set elevation in case of collapses entity.setElevation(step.getElevation()); final IHex curHex = game.getBoard().getHex(curPos); // check for automatic unstick if(entity.canUnstickByJumping() && entity.isStuck() && moveType == IEntityMovementType.MOVE_JUMP) { entity.setStuck(false); entity.setCanUnstickByJumping(false); } // Check for skid. rollTarget = entity.checkSkid(moveType, prevHex, overallMoveType, prevStep, prevFacing, curFacing, lastPos, curPos, isInfantry, distance); if (rollTarget.getValue() != TargetRoll.CHECK_FALSE) { // Have an entity-meaningful PSR message. boolean psrPassed = true; if ( entity instanceof Mech ) { psrPassed = doSkillCheckWhileMoving( entity, lastPos, lastPos, rollTarget, true ); } else { psrPassed = doSkillCheckWhileMoving( entity, lastPos, lastPos, rollTarget, false ); } // Does the entity skid? if ( !psrPassed ){ curPos = lastPos; Coords nextPos = curPos; IHex nextHex = null; int skidDistance = 0; Enumeration targets = null; Entity target = null; int curElevation; int nextElevation; int skidDirection = prevFacing; // All charge damage is based upon // the pre-skid move distance. entity.delta_distance = distance-1; // Attacks against a skidding target have additional +2. moveType = IEntityMovementType.MOVE_SKID; // What is the first hex in the skid? if(step.isThisStepBackwards()) { skidDirection = (skidDirection + 3) % 6; } nextPos = curPos.translated( skidDirection ); nextHex = game.getBoard().getHex( nextPos ); // Move the entity a number hexes from curPos in the // skidDirection direction equal to half the distance moved // this turn (rounded up), unless something intervenes. for ( skidDistance = 0; skidDistance < (int) Math.ceil(entity.delta_distance / 2.0); skidDistance++ ) { // Is the next hex off the board? if ( !game.getBoard().contains(nextPos) ) { // Can the entity skid off the map? if (game.getOptions().booleanOption("push_off_board")) { // Yup. One dead entity. game.removeEntity(entity.getId(), IEntityRemovalConditions.REMOVE_PUSHED); send(createRemoveEntityPacket(entity.getId(), IEntityRemovalConditions.REMOVE_PUSHED)); r = new Report(2030, Report.PUBLIC); r.addDesc(entity); addReport(r); // TODO: remove passengers and swarmers. // The entity's movement is completed. return; } else { // Nope. Update the report. r = new Report(2035); r.subject = entity.getId(); r.indent(); addReport(r); } // Stay in the current hex and stop skidding. break; } // Can the skiding entity enter the next hex from this? // N.B. can skid along roads. if ( ( entity.isHexProhibited(curHex) || entity.isHexProhibited(nextHex) ) && !Compute.canMoveOnPavement(game, curPos, nextPos) ) { // Update report. r = new Report(2040); r.subject = entity.getId(); r.indent(); r.add(nextPos.getBoardNum(), true); addReport(r); // N.B. the BMRr pg. 22 says that the unit // "crashes" into the terrain but it doesn't // mention any damage. // Stay in the current hex and stop skidding. break; } // Hovercraft can "skid" over water. // all units can skid over ice. // TODO: allow entities to occupy different levels of // buildings. curElevation = curHex.floor(); nextElevation = nextHex.floor(); if ( entity instanceof Tank && entity.getMovementMode() == IEntityMovementMode.HOVER ) { if ( curHex.containsTerrain(Terrains.WATER) ) { curElevation = curHex.surface(); } if ( nextHex.containsTerrain(Terrains.WATER) ) { nextElevation += nextHex.surface(); } } else { if(curHex.containsTerrain(Terrains.ICE)) { curElevation = curHex.surface(); } if(nextHex.containsTerrain(Terrains.ICE)) { nextElevation = nextHex.surface(); } } // BMRr pg. 22 - Can't skid uphill, // but can skid downhill. if ( curElevation < nextElevation ) { r = new Report(2045); r.subject = entity.getId(); r.indent(); r.add(nextPos.getBoardNum(), true); addReport(r); // Stay in the current hex and stop skidding. break; } // Have skidding units suffer falls. else if ( curElevation > nextElevation + 1 ) { doEntityFallsInto( entity, curPos, nextPos, entity.getBasePilotingRoll() ); doEntityDisplacementMinefieldCheck(entity, curPos, nextPos); // Stay in the current hex and stop skidding. break; } // Get any building in the hex. Building bldg = game.getBoard().getBuildingAt(nextPos); boolean bldgSuffered = false; boolean stopTheSkid = false; // Does the next hex contain an entities? // ASSUMPTION: hurt EVERYONE in the hex. // TODO: allow entities to occupy different levels of // buildings, and only skid into a single level. targets = game.getEntities( nextPos ); if ( targets.hasMoreElements()) { boolean skidChargeHit = false; while ( targets.hasMoreElements() ) { target = (Entity) targets.nextElement(); // TODO : allow ready targets to move out of way // Mechs and vehicles get charged, // but need to make a to-hit roll if ( target instanceof Mech || target instanceof Tank ) { ChargeAttackAction caa = new ChargeAttackAction(entity.getId(), target.getTargetType(), target.getTargetId(), target.getPosition()); ToHitData toHit = caa.toHit(game, true); // Calculate hit location. if ( entity instanceof Tank && ((entity.getMovementMode() == IEntityMovementMode.HOVER) || (entity.getMovementMode() == IEntityMovementMode.NAVAL) || (entity.getMovementMode() == IEntityMovementMode.HYDROFOIL)) && 0 < nextHex.terrainLevel(Terrains.WATER) && target.getElevation() < 0) { if ( 2 <= nextHex.terrainLevel(Terrains.WATER) || target.isProne() ) { // Hovercraft/Naval Craft can't hit the Mek. continue; } else { toHit.setHitTable(ToHitData.HIT_PUNCH); } } else if ( entity.getHeight() < target.getHeight() ) { toHit.setHitTable(ToHitData.HIT_KICK); } else { toHit.setHitTable(ToHitData.HIT_NORMAL); } toHit.setSideTable (Compute.targetSideTable(entity, target)); // roll int roll = Compute.d6(2); // Update report. r = new Report(2050); r.subject = entity.getId(); r.indent(); r.add(target.getShortName(), true); r.add(nextPos.getBoardNum(), true); r.newlines = 0; addReport(r); if (toHit.getValue() == ToHitData.IMPOSSIBLE) { roll = -12; r = new Report(2055); r.subject = entity.getId(); r.add(toHit.getDesc()); r.newlines = 0; addReport(r); } else if (toHit.getValue() == ToHitData.AUTOMATIC_SUCCESS) { r = new Report(2060); r.subject = entity.getId(); r.add(toHit.getDesc()); r.newlines = 0; addReport(r); roll = Integer.MAX_VALUE; } else { // report the roll r = new Report(2065); r.subject = entity.getId(); r.add(toHit.getValue()); r.add(roll); r.newlines = 0; addReport(r); } // Resolve a charge against the target. // ASSUMPTION: buildings block damage for // *EACH* entity charged. if (roll < toHit.getValue()) { r = new Report(2070); r.subject = entity.getId(); addReport(r); } else { // Resolve the charge. resolveChargeDamage (entity, target, toHit, skidDirection); // HACK: set the entity's location // to the original hex again, for the other targets if (targets.hasMoreElements()) { entity.setPosition(curPos); } bldgSuffered = true; skidChargeHit = true; } // The skid ends here if the target lives. if ( !target.isDoomed() && !target.isDestroyed() && !game.isOutOfGame(target) ) { stopTheSkid = true; } // if we don't do this here, // we can have a mech without a leg // standing on the field and moving // as if it still had his leg after // getting skid-charged. if (!target.isDone()) { resolvePilotingRolls(target); game.resetPSRs(target); target.applyDamage(); addNewLines(); } } // Resolve "move-through" damage on infantry. // Infantry inside of a building don't get a // move-through, but suffer "bleed through" // from the building. else if ( target instanceof Infantry && bldg != null ) { // Update report. r = new Report(2075); r.subject = entity.getId(); r.indent(); r.add(target.getShortName(), true); r.add(nextPos.getBoardNum(), true); r.newlines = 0; addReport(r); // Infantry don't have different // tables for punches and kicks HitData hit = target.rollHitLocation( ToHitData.HIT_NORMAL, Compute.targetSideTable(entity, target) ); // Damage equals tonnage, divided by 5. // ASSUMPTION: damage is applied in one hit. addReport( damageEntity(target, hit, Math.round(entity.getWeight()/5))); addNewLines(); } // Has the target been destroyed? if ( target.isDoomed() ) { // Has the target taken a turn? if ( !target.isDone() ) { // Dead entities don't take turns. game.removeTurnFor(target); send(createTurnVectorPacket()); } // End target-still-to-move // Clean out the entity. target.setDestroyed(true); game.moveToGraveyard(target.getId()); send(createRemoveEntityPacket(target.getId())); } // Update the target's position, // unless it is off the game map. if ( !game.isOutOfGame(target) ) { entityUpdate( target.getId() ); } } // Check the next entity in the hex. // if we missed all the entities in the hex, // move attacker to side hex if (!skidChargeHit) { Coords src = entity.getPosition(); Coords dest = Compute.getMissedChargeDisplacement (game, entity.getId(), src, skidDirection); doEntityDisplacement(entity, src, dest, null); } else { // HACK: otherwise, set the entities position to that // hex's coords, because we had to move the entity // back earlier for the other targets entity.setPosition(nextPos); } } // Handle the building in the hex. // TODO : BMRr pg. 22, only count buildings that are // higher than our starting terrain height. // TODO: allow units to skid on top of buildings. if ( bldg != null ) { // Report that the entity has entered the bldg. r = new Report(2080); r.subject = entity.getId(); r.indent(); r.add(bldg.getName()); r.add(nextPos.getBoardNum(), true); addReport(r); // If the building hasn't already suffered // damage, then apply charge damage to the // building and displace the entity inside. // ASSUMPTION: you don't charge the building // if Tanks or Mechs were charged. int chargeDamage = ChargeAttackAction.getDamageFor ( entity ); if ( !bldgSuffered ) { Report buildingReport = damageBuilding( bldg, chargeDamage ); buildingReport.indent(2); buildingReport.subject = entity.getId(); addReport(buildingReport); // Apply damage to the attacker. int toAttacker = ChargeAttackAction.getDamageTakenBy ( entity, bldg ); HitData hit = entity.rollHitLocation( ToHitData.HIT_NORMAL, entity.sideTable(nextPos) ); addReport( damageEntity( entity, hit, toAttacker )); addNewLines(); entity.setPosition( nextPos ); doEntityDisplacementMinefieldCheck(entity, curPos, nextPos); curPos = nextPos; } // End buildings-suffer-too // Any infantry in the building take damage // equal to the building being charged. // ASSUMPTION: infantry take no damage from the // building absorbing damage from // Tanks and Mechs being charged. damageInfantryIn( bldg, chargeDamage ); // If a building still stands, then end the skid, // and add it to the list of affected buildings. if ( bldg.getCurrentCF() > 0 ) { stopTheSkid = true; this.addAffectedBldg( bldg, false ); } } // End handle-building. // Do we stay in the current hex and stop skidding? if ( stopTheSkid ) { break; } // is the next hex a rubble hex? rollTarget = entity.checkRubbleMove(step, nextHex, curPos, nextPos); if (rollTarget.getValue() != TargetRoll.CHECK_FALSE) { doSkillCheckWhileMoving(entity, curPos, nextPos, rollTarget, true); if (entity.isProne()) { // if we fell, stop the skid (see bug 1115608) break; } } //check for breaking magma crust if(curHex.terrainLevel(Terrains.MAGMA) == 1) { int roll = Compute.d6(1); r = new Report(2395); r.addDesc(entity); r.add(roll); r.subject = entity.getId(); addReport(r); if(roll == 6) { curHex.removeTerrain(Terrains.MAGMA); curHex.addTerrain(Terrains.getTerrainFactory().createTerrain(Terrains.MAGMA, 2)); sendChangedHex(curPos); for(Enumeration e=game.getEntities(curPos);e.hasMoreElements();) { Entity en = (Entity)e.nextElement(); if(en != entity) doMagmaDamage(en, false); } } } //check for entering liquid magma if(curHex.terrainLevel(Terrains.MAGMA) == 2) { doMagmaDamage(entity, false); } // is the next hex a swamp? rollTarget = entity.checkSwampMove(step, nextHex, curPos, nextPos); if (rollTarget.getValue() != TargetRoll.CHECK_FALSE) { if (!doSkillCheckWhileMoving(entity, curPos, nextPos, rollTarget, false)){ entity.setStuck(true); r = new Report(2081); r.subject = entity.getId(); r.add(entity.getDisplayName(), true); // stay here and stop skidding, see bug 1115608 break; } } // Update the position and keep skidding. entity.setPosition( nextPos ); doEntityDisplacementMinefieldCheck(entity, curPos, nextPos); curPos = nextPos; r = new Report(2085); r.subject = entity.getId(); r.indent(); r.add(curPos.getBoardNum(), true); addReport(r); // Get the next hex in the skid? nextPos = nextPos.translated( skidDirection ); nextHex = game.getBoard().getHex( nextPos ); } // Handle the next skid hex. // If the skidding entity violates stacking, // displace targets until it doesn't. curPos = entity.getPosition(); target = Compute.stackingViolation (game, entity.getId(), curPos); while (target != null) { nextPos = Compute.getValidDisplacement (game, target.getId(), target.getPosition(), skidDirection); // ASSUMPTION // There should always be *somewhere* that // the target can go... last skid hex if // nothing else is available. if ( null == nextPos ) { // But I don't trust the assumption fully. // Report the error and try to continue. System.err.println( "The skid of " + entity.getShortName() + " should displace " + target.getShortName() + " in hex " + curPos.getBoardNum() + " but there is nowhere to go." ); break; } // indent displacement r = new Report(1210, Report.PUBLIC); r.indent(); r.newlines = 0; addReport(r); doEntityDisplacement(target, curPos, nextPos, null); doEntityDisplacementMinefieldCheck(entity, curPos, nextPos); target = Compute.stackingViolation( game, entity.getId(), curPos ); } // Mechs suffer damage for every hex skidded. if ( entity instanceof Mech ) { // Calculate one half falling damage times skid length. int damage = skidDistance * (int) Math.ceil(Math.round(entity.getWeight() / 10.0) / 2.0); // report skid damage r = new Report(2090); r.subject = entity.getId(); r.indent(); r.addDesc(entity); r.add(damage); addReport(r); // standard damage loop // All skid damage is to the front. while (damage > 0) { int cluster = Math.min(5, damage); HitData hit = entity.rollHitLocation(ToHitData.HIT_NORMAL, ToHitData.SIDE_FRONT); addReport( damageEntity(entity, hit, cluster)); damage -= cluster; } addNewLines(); } // Clean up the entity if it has been destroyed. if ( entity.isDoomed() ) { entity.setDestroyed(true); game.moveToGraveyard(entity.getId()); send(createRemoveEntityPacket(entity.getId())); // The entity's movement is completed. return; } // Let the player know the ordeal is over. r = new Report(2095); r.subject = entity.getId(); r.indent(); addReport(r); // set entity parameters curFacing = entity.getFacing(); curPos = entity.getPosition(); entity.setSecondaryFacing( curFacing ); // skid consumes all movement if (md.hasActiveMASC()) { mpUsed = entity.getRunMP(); } else { mpUsed = entity.getRunMPwithoutMASC(); } entity.moved = moveType; fellDuringMovement = true; distance = entity.delta_distance; break; } // End failed-skid-psr } // End need-skid-psr if(entity instanceof VTOL) { rollTarget = ((VTOL)entity).checkSideSlip(moveType, prevHex, overallMoveType, prevStep, prevFacing, curFacing, lastPos, curPos, distance); if(rollTarget.getValue() != TargetRoll.CHECK_FALSE) { if(!doSkillCheckWhileMoving(entity,lastPos,curPos,rollTarget, false)) { //report sideslip sideslipped = true; r = new Report(2100); r.subject = entity.getId(); r.addDesc(entity); addReport(r); Coords newPos = lastPos.translated((prevFacing));//does this work for opposing hex? // Is the next hex off the board? if ( !game.getBoard().contains(newPos) ) { // Can the entity skid off the map? if (game.getOptions().booleanOption("push_off_board")) { // Yup. One dead entity. game.removeEntity(entity.getId(), IEntityRemovalConditions.REMOVE_PUSHED); send(createRemoveEntityPacket(entity.getId(), IEntityRemovalConditions.REMOVE_PUSHED)); r = new Report(2030); r.subject = entity.getId(); r.addDesc(entity); addReport(r); // TODO: remove passengers and swarmers. // The entity's movement is completed. return; } else { // Nope. Update the report. r = new Report(2035); r.subject = entity.getId(); addReport(r); } // Stay in the current hex and stop skidding. break; } IHex hex = game.getBoard().getHex(newPos); int terrainLevel = hex.ceiling() - hex.surface(); int newElevation=(entity.calcElevation(game.getBoard().getHex(curPos),game.getBoard().getHex(newPos),curVTOLElevation,step.climbMode())); if(newElevation<=terrainLevel) { r = new Report(2105); r.subject = entity.getId(); r.add(newPos.getBoardNum(), true); addReport(r); int hitSide=curFacing-prevFacing+6; hitSide=hitSide % 6; int table=0; switch(hitSide) {//quite hackish...I think it ought to work, though. case 0://can this happen? table=ToHitData.SIDE_FRONT; break; case 1: case 2: table=ToHitData.SIDE_LEFT; break; case 3: table=ToHitData.SIDE_REAR; break; case 4: case 5: table=ToHitData.SIDE_RIGHT; break; } curPos=newPos; curVTOLElevation=newElevation; addReport(crashVTOL(((VTOL)entity),true,distance,curPos,curVTOLElevation,table)); if((hex.containsTerrain(Terrains.WATER) && !hex.containsTerrain(Terrains.ICE)) || hex.containsTerrain(Terrains.WOODS) || hex.containsTerrain(Terrains.JUNGLE)) { addReport(destroyEntity(entity,"could not land in crash site")); } else if(newElevation < hex.terrainLevel(Terrains.BLDG_ELEV)){ addReport(destroyEntity(entity, "crashed into building")); } } else { r = new Report(2110); r.subject = entity.getId(); r.add(newPos.getBoardNum(), true); addReport(r); entity.setElevation(entity.calcElevation(game.getBoard().getHex(curPos),game.getBoard().getHex(newPos),curVTOLElevation,step.climbMode())); curPos=newPos; } if(!entity.isDestroyed() && !entity.isDoomed()) { fellDuringMovement= true; //No, but it should work... } break; } } } // check if we've moved into rubble rollTarget = entity.checkRubbleMove(step, curHex, lastPos, curPos); if (rollTarget.getValue() != TargetRoll.CHECK_FALSE) { doSkillCheckWhileMoving(entity, lastPos, curPos, rollTarget, true); } //check for breaking magma crust if(curHex.terrainLevel(Terrains.MAGMA) == 1 && step.getElevation() == 0 && step.getMovementType() != IEntityMovementType.MOVE_JUMP) { int roll = Compute.d6(1); r = new Report(2395); r.addDesc(entity); r.add(roll); r.subject = entity.getId(); addReport(r); if(roll == 6) { curHex.removeTerrain(Terrains.MAGMA); curHex.addTerrain(Terrains.getTerrainFactory().createTerrain(Terrains.MAGMA, 2)); sendChangedHex(curPos); for(Enumeration e=game.getEntities(curPos);e.hasMoreElements();) { Entity en = (Entity)e.nextElement(); if(en != entity) doMagmaDamage(en, false); } } } //check for entering liquid magma if(curHex.terrainLevel(Terrains.MAGMA) == 2 && step.getElevation() == 0 && step.getMovementType() != IEntityMovementType.MOVE_JUMP) { doMagmaDamage(entity, false); } // check if we've moved into a swamp rollTarget = entity.checkSwampMove(step, curHex, lastPos, curPos); if (rollTarget.getValue() != TargetRoll.CHECK_FALSE) { if (!doSkillCheckWhileMoving(entity, lastPos, curPos, rollTarget, false)){ entity.setStuck(true); entity.setCanUnstickByJumping(true); r = new Report(2081); r.add(entity.getDisplayName()); r.subject = entity.getId(); addReport(r); break; } } // check to see if we are a mech and we've moved OUT of fire IHex lastHex = game.getBoard().getHex(lastPos); if (entity instanceof Mech) { if ( !lastPos.equals(curPos) && (lastHex.containsTerrain(Terrains.FIRE) || lastHex.containsTerrain(Terrains.MAGMA)) && ( step.getMovementType() != IEntityMovementType.MOVE_JUMP // Bug #828741 -- jumping bypasses fire, but not on the first step // getMpUsed -- total MP used to this step // getMp -- MP used in this step // the difference will always be 0 on the "first step" of a jump, // and >0 on a step in the midst of a jump || ( 0 == step.getMpUsed() - step.getMp() ) ) ) { int heat=0; if(lastHex.containsTerrain(Terrains.FIRE)) heat+=2; if(lastHex.terrainLevel(Terrains.MAGMA) == 1) { heat+=2; } else if(lastHex.terrainLevel(Terrains.MAGMA) == 2) { heat+=5; } entity.heatBuildup+=heat; r = new Report(2115); r.subject = entity.getId(); r.addDesc(entity); r.add(heat); addReport(r); } } // check to see if we are not a mech and we've moved INTO fire if (!(entity instanceof Mech)) { if ( game.getBoard().getHex(curPos).containsTerrain(Terrains.FIRE) && !lastPos.equals(curPos) && step.getMovementType() != IEntityMovementType.MOVE_JUMP && step.getElevation() <= 1 ) { if(game.getOptions().booleanOption("vehicle_fires") && entity instanceof Tank) { checkForVehicleFire((Tank)entity, false); } else { doFlamingDeath(entity); } } } // check for extreme gravity movement if (!i.hasMoreElements() && !firstStep) { checkExtremeGravityMovement(entity, step, curPos, cachedGravityLimit); } // check for minefields. if ((!lastPos.equals(curPos) && (step.getMovementType() != IEntityMovementType.MOVE_JUMP)) || ((overallMoveType == IEntityMovementType.MOVE_JUMP) && (!i.hasMoreElements()))) { checkVibrabombs(entity, curPos, false, lastPos, curPos); if (game.containsMinefield(curPos)) { Enumeration minefields = game.getMinefields(curPos).elements(); while (minefields.hasMoreElements()) { Minefield mf = (Minefield) minefields.nextElement(); boolean isOnGround = (!i.hasMoreElements()); isOnGround |= (step.getMovementType() != IEntityMovementType.MOVE_JUMP); isOnGround &= step.getElevation() == 0; if (isOnGround) { enterMinefield(entity, mf, curPos, curPos, true); } else if (mf.getType() == Minefield.TYPE_THUNDER_ACTIVE) { enterMinefield(entity, mf, curPos, curPos, true, 2); } } } } // infantry discovers minefields if they end their move // in a minefield. if (!lastPos.equals(curPos) && !i.hasMoreElements() && isInfantry) { if (game.containsMinefield(curPos)) { Player owner = entity.getOwner(); Enumeration minefields = game.getMinefields(curPos).elements(); while (minefields.hasMoreElements()) { Minefield mf = (Minefield) minefields.nextElement(); if (!owner.containsMinefield(mf)) { r = new Report(2120); r.subject = entity.getId(); r.add(entity.getShortName(), true); addReport(r); revealMinefield(owner, mf); } } } } // check if we've moved into water rollTarget = entity.checkWaterMove(step, curHex, lastPos, curPos, isPavementStep); if (rollTarget.getValue() != TargetRoll.CHECK_FALSE) { // Swarmers need special handling. final int swarmerId = entity.getSwarmAttackerId(); boolean swarmerDone = true; Entity swarmer = null; if (Entity.NONE != swarmerId) { swarmer = game.getEntity( swarmerId ); swarmerDone = swarmer.isDone(); } // Now do the skill check. doSkillCheckWhileMoving(entity, lastPos, curPos, rollTarget, true); // Swarming infantry platoons may drown. if (curHex.terrainLevel(Terrains.WATER) > 1) { drownSwarmer(entity, curPos); } // Do we need to remove a game turn for the swarmer if (!swarmerDone && ( swarmer.isDoomed() || swarmer.isDestroyed() )) { // We have to diddle with the swarmer's // status to get its turn removed. swarmer.setDone( false ); swarmer.setUnloaded( false ); // Dead entities don't take turns. game.removeTurnFor( swarmer ); send( createTurnVectorPacket() ); // Return the original status. swarmer.setDone( true ); swarmer.setUnloaded( true ); } // check for inferno wash-off checkForWashedInfernos(entity, curPos); } // In water, may or may not be a new hex, neccessary to // check during movement, for breach damage, and always // set dry if appropriate //TODO: possibly make the locations local and set later doSetLocationsExposure(entity, curHex, step.getMovementType() == IEntityMovementType.MOVE_JUMP, step.getElevation()); //check for breaking ice by breaking through from below if(prevHex != null && prevStep != null && prevStep.getElevation() < 0 && step.getElevation() == 0 && prevHex.containsTerrain(Terrains.ICE) && prevHex.containsTerrain(Terrains.WATER) && step.getMovementType() != IEntityMovementType.MOVE_JUMP && !(lastPos.equals(curPos))) { r = new Report(2410); r.addDesc(entity); addReport(r); resolveIceBroken(lastPos); } //check for breaking ice by stepping on it if(curHex.containsTerrain(Terrains.ICE) && curHex.containsTerrain(Terrains.WATER) && step.getMovementType() != IEntityMovementType.MOVE_JUMP && !(lastPos.equals(curPos))) { if(step.getElevation() == 0 ) { int roll = Compute.d6(1); r = new Report(2118); r.addDesc(entity); r.add(roll); r.subject = entity.getId(); addReport(r); if(roll == 6) { resolveIceBroken(curPos); doEntityFallsInto(entity, lastPos, curPos, entity.getBasePilotingRoll(), false); } } //or intersecting it else if(step.getElevation() + entity.height() == 0) { r = new Report(2410); r.addDesc(entity); addReport(r); resolveIceBroken(curPos); } } // Handle loading units. if ( step.getType() == MovePath.STEP_LOAD ) { // Find the unit being loaded. Entity loaded = null; Enumeration entities = game.getEntities( curPos ); while ( entities.hasMoreElements() ) { // Is the other unit friendly and not the current entity? loaded = (Entity)entities.nextElement(); if ( entity.getOwner() == loaded.getOwner() && !entity.equals(loaded) ) { // The moving unit should be able to load the other // unit and the other should be able to have a turn. if ( !entity.canLoad(loaded) || !loaded.isSelectableThisTurn() ) { // Something is fishy in Denmark. System.err.println( entity.getShortName() + " can not load " + loaded.getShortName() ); loaded = null; } else { // Have the deployed unit load the indicated unit. this.loadUnit( entity, loaded ); // Stop looking. break; } } else { // Nope. Discard it. loaded = null; } } // Handle the next entity in this hex. // We were supposed to find someone to load. if ( loaded == null ) { System.err.println( "Could not find unit for " + entity.getShortName() + " to load in " + curPos ); } } // End STEP_LOAD // Handle unloading units. if ( step.getType() == MovePath.STEP_UNLOAD ) { Targetable unloaded = step.getTarget( game ); if ( !this.unloadUnit( entity, unloaded, curPos, curFacing, step.getElevation() ) ) { System.err.println( "Error! Server was told to unload " + unloaded.getDisplayName() + " from " + entity.getDisplayName() + " into " + curPos.getBoardNum() ); } } // Handle non-infantry moving into a building. int buildingMove = entity.checkMovementInBuilding(step, prevStep, curPos, lastPos); if (buildingMove > 0) { // Get the building being exited. Building bldgExited = null; if((buildingMove & 1) == 1) bldgExited = game.getBoard().getBuildingAt( lastPos ); // Get the building being entered. Building bldgEntered = null; if((buildingMove & 2) == 2) bldgEntered = game.getBoard().getBuildingAt( curPos ); // Get the building being stepped on. Building bldgStepped = null; if((buildingMove & 4) == 4) bldgStepped = game.getBoard().getBuildingAt( curPos ); boolean collapsed = false; //are we passing through a building wall? if(bldgEntered != null || bldgExited != null) { // If we're not leaving a building, just handle the "entered". if ( bldgExited == null) { collapsed = passBuildingWall( entity, bldgEntered, lastPos, curPos, distance, "entering" ); this.addAffectedBldg( bldgEntered, collapsed ); } // If we're moving withing the same building, just handle // the "within". else if ( bldgExited.equals( bldgEntered ) ) { collapsed = passBuildingWall( entity, bldgEntered, lastPos, curPos, distance, "moving in" ); this.addAffectedBldg( bldgEntered, collapsed ); } // If we have different buildings, roll for each. else if ( bldgExited != null && bldgEntered != null ) { collapsed = passBuildingWall( entity, bldgExited, lastPos, curPos, distance, "exiting" ); this.addAffectedBldg( bldgExited, collapsed ); collapsed = passBuildingWall( entity, bldgEntered, lastPos, curPos, distance, "entering" ); this.addAffectedBldg( bldgEntered, collapsed ); } // Otherwise, just handle the "exited". else if (bldgExited != null){ collapsed = passBuildingWall( entity, bldgExited, lastPos, curPos, distance, "exiting" ); this.addAffectedBldg( bldgExited, collapsed ); } } //stepping on roof, no PSR just check for over weight if(bldgStepped != null) { collapsed = checkBuildingCollapseWhileMoving(bldgStepped, entity, curPos); this.addAffectedBldg( bldgStepped, collapsed ); } // Clean up the entity if it has been destroyed. if ( entity.isDoomed() ) { entity.setDestroyed(true); game.moveToGraveyard(entity.getId()); send(createRemoveEntityPacket(entity.getId())); // The entity's movement is completed. return; } // TODO: what if a building collapses into rubble? } // did the entity just fall? if (!wasProne && entity.isProne()) { curFacing = entity.getFacing(); curPos = entity.getPosition(); mpUsed = step.getMpUsed(); fellDuringMovement = true; break; } // dropping prone intentionally? if (step.getType() == MovePath.STEP_GO_PRONE) { mpUsed = step.getMpUsed(); rollTarget = entity.checkDislodgeSwarmers(step); if (rollTarget.getValue() == TargetRoll.CHECK_FALSE) { // Not being swarmed entity.setProne(true); // check to see if we washed off infernos checkForWashedInfernos(entity, curPos); break; } else { // Being swarmed entity.setPosition(curPos); if (doDislodgeSwarmerSkillCheck(entity, rollTarget, curPos)) { // Entity falls curFacing = entity.getFacing(); curPos = entity.getPosition(); fellDuringMovement = true; break; } } } //going hull down if(step.getType() == MovePath.STEP_HULL_DOWN) { mpUsed = step.getMpUsed(); entity.setHullDown(true); } // Track this step's location. movePath.addElement( new UnitLocation( entity.getId(), curPos, curFacing ) ); // update lastPos, prevStep, prevFacing & prevHex lastPos = new Coords(curPos); prevStep = step; /* Bug 754610: Revert fix for bug 702735. if (prevHex != null && !curHex.equals(prevHex)) { */ if (!curHex.equals(prevHex)) { prevFacing = curFacing; } prevHex = curHex; firstStep = false; } // set entity parameters entity.setPosition(curPos); entity.setFacing(curFacing); entity.setSecondaryFacing(curFacing); entity.delta_distance = distance; entity.moved = moveType; entity.mpUsed = mpUsed; if (!sideslipped && !fellDuringMovement) { entity.setElevation(curVTOLElevation); } entity.setClimbMode(md.getFinalClimbMode()); // if we ran with destroyed hip or gyro, we need a psr rollTarget = entity.checkRunningWithDamage(overallMoveType); if (rollTarget.getValue() != TargetRoll.CHECK_FALSE) { doSkillCheckInPlace(entity, rollTarget); } // but the danger isn't over yet! landing from a jump can be risky! if (overallMoveType == IEntityMovementType.MOVE_JUMP && !entity.isMakingDfa()) { final IHex curHex = game.getBoard().getHex(curPos); // check for damaged criticals rollTarget = entity.checkLandingWithDamage(); if (rollTarget.getValue() != TargetRoll.CHECK_FALSE) { doSkillCheckInPlace(entity, rollTarget); } // jumped into water? int waterLevel = curHex.terrainLevel(Terrains.WATER); if(curHex.containsTerrain(Terrains.ICE) && waterLevel > 0) { waterLevel = 0; //check for breaking ice int roll = Compute.d6(1); r = new Report(2122); r.add(entity.getDisplayName(), true); r.add(roll); r.subject = entity.getId(); addReport(r); if(roll >= 4) { //oops! resolveIceBroken(curPos); doEntityFallsInto(entity, lastPos, curPos, entity.getBasePilotingRoll(), false); } } rollTarget = entity.checkWaterMove(waterLevel); if (rollTarget.getValue() != TargetRoll.CHECK_FALSE) { doSkillCheckInPlace(entity, rollTarget); } if (waterLevel > 1) { // Any swarming infantry will be destroyed. drownSwarmer(entity, curPos); } //check for building collapse Building bldg = game.getBoard().getBuildingAt(curPos); if(bldg != null) { checkForCollapse( bldg, game.getPositionMap() ); } //check for breaking magma crust if(curHex.terrainLevel(Terrains.MAGMA) == 1) { int roll = Compute.d6(1); r = new Report(2395); r.addDesc(entity); r.add(roll); r.subject = entity.getId(); addReport(r); if(roll == 6) { curHex.removeTerrain(Terrains.MAGMA); curHex.addTerrain(Terrains.getTerrainFactory().createTerrain(Terrains.MAGMA, 2)); sendChangedHex(curPos); for(Enumeration e=game.getEntities(curPos);e.hasMoreElements();) { Entity en = (Entity)e.nextElement(); if(en != entity) doMagmaDamage(en, false); } } } //check for entering liquid magma if(curHex.terrainLevel(Terrains.MAGMA) == 2) { doMagmaDamage(entity, false); } // jumped into swamp? maybe stuck! if (curHex.containsTerrain(Terrains.SWAMP) || curHex.containsTerrain(Terrains.MAGMA) || curHex.containsTerrain(Terrains.SNOW) || curHex.containsTerrain(Terrains.MUD) || curHex.containsTerrain(Terrains.TUNDRA)) { if (entity instanceof Mech) { entity.setStuck(true); r = new Report(2121); r.add(entity.getDisplayName(), true); r.subject = entity.getId(); addReport(r); } else if (entity instanceof Infantry) { PilotingRollData roll = entity.getBasePilotingRoll(); roll.addModifier(5, "infantry jumping into swamp"); if (!doSkillCheckWhileMoving(entity, curPos, curPos, roll, false)) { entity.setStuck(true); r = new Report(2081); r.add(entity.getDisplayName()); r.subject = entity.getId(); addReport(r); } } } // If the entity is being swarmed, jumping may dislodge the fleas. final int swarmerId = entity.getSwarmAttackerId(); if ( Entity.NONE != swarmerId ) { final Entity swarmer = game.getEntity( swarmerId ); final PilotingRollData roll = entity.getBasePilotingRoll(); entity.addPilotingModifierForTerrain(roll); // Add a +4 modifier. roll.addModifier( 4, "dislodge swarming infantry" ); // If the swarmer has Assault claws, give a 1 modifier. // We can stop looking when we find our first match. for ( Enumeration iter = swarmer.getMisc(); iter.hasMoreElements(); ) { Mounted mount = (Mounted) iter.nextElement(); EquipmentType equip = mount.getType(); if ( BattleArmor.ASSAULT_CLAW.equals (equip.getInternalName()) ) { roll.addModifier( 1, "swarmer has assault claws" ); break; } } // okay, print the info r = new Report(2125); r.subject = entity.getId(); r.addDesc(entity); addReport(r); // roll final int diceRoll = Compute.d6(2); r = new Report(2130); r.subject = entity.getId(); r.add(roll.getValueAsString()); r.add(roll.getDesc()); r.add(diceRoll); if (diceRoll < roll.getValue()) { r.choose(false); addReport(r); } else { // Dislodged swarmers don't get turns. game.removeTurnFor( swarmer ); send( createTurnVectorPacket() ); // Update the report and the swarmer's status. r.choose(true); addReport(r); entity.setSwarmAttackerId( Entity.NONE ); swarmer.setSwarmTargetId( Entity.NONE ); // Did the infantry fall into water? if ( curHex.terrainLevel(Terrains.WATER) > 0 ) { // Swarming infantry die. swarmer.setPosition( curPos ); r = new Report(2135); r.subject = entity.getId(); r.indent(); r.addDesc(swarmer); addReport(r); addReport( destroyEntity(swarmer, "a watery grave", false)); } else { // Swarming infantry take an 11 point hit. // ASSUMPTION : damage should not be doubled. r = new Report(2140); r.subject = entity.getId(); r.indent(); r.addDesc(swarmer); addReport(r); addReport(damageEntity(swarmer, swarmer.rollHitLocation(ToHitData.HIT_NORMAL, ToHitData.SIDE_FRONT), 11)); addNewLines(); swarmer.setPosition( curPos ); } entityUpdate( swarmerId ); } // End successful-PSR } // End try-to-dislodge-swarmers // one more check for inferno wash-off checkForWashedInfernos(entity, curPos); } // End entity-is-jumping // update entity's locations' exposure doSetLocationsExposure(entity, game.getBoard().getHex(curPos), false, entity.getElevation()); // should we give another turn to the entity to keep moving? if (fellDuringMovement && entity.mpUsed < entity.getRunMP() && entity.isSelectableThisTurn() && !entity.isDoomed()) { entity.applyDamage(); entity.setDone(false); GameTurn newTurn = new GameTurn.SpecificEntityTurn(entity.getOwner().getId(), entity.getId()); game.insertNextTurn(newTurn); // brief everybody on the turn update send(createTurnVectorPacket()); // let everyone know about what just happened send(entity.getOwner().getId(), createSpecialReportPacket()); } else { entity.setDone(true); } // If the entity is being swarmed, update the attacker's position. final int swarmerId = entity.getSwarmAttackerId(); if ( Entity.NONE != swarmerId ) { final Entity swarmer = game.getEntity( swarmerId ); swarmer.setPosition( curPos ); // If the hex is on fire, and the swarming infantry is // *not* Battle Armor, it drops off. if ( !(swarmer instanceof BattleArmor) && game.getBoard().getHex(curPos).containsTerrain(Terrains.FIRE) ) { swarmer.setSwarmTargetId( Entity.NONE ); entity.setSwarmAttackerId( Entity.NONE ); r = new Report(2145); r.subject = entity.getId(); r.indent(); r.add(swarmer.getShortName(), true); addReport(r); } entityUpdate( swarmerId ); } // Update the entitiy's position, // unless it is off the game map. if (!game.isOutOfGame(entity)) { entityUpdate( entity.getId(), movePath ); if (entity.isDoomed()) { send(createRemoveEntityPacket(entity.getId(), entity.getRemovalCondition())); } } // if using double blind, update the player on new units he might see if (doBlind()) { send(entity.getOwner().getId(), createFilteredEntitiesPacket(entity.getOwner())); } // if we generated a charge attack, report it now if (charge != null) { send(createAttackPacket(charge, 1)); } } | 4135 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4135/cbe74d020e74a85c0e3b8ebf32d1ebc85c1ba62f/Server.java/buggy/megamek/src/megamek/server/Server.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1207,
49,
26140,
12,
1943,
1522,
16,
9933,
743,
3481,
13,
288,
3639,
8706,
436,
31,
3639,
1250,
22423,
3169,
1845,
273,
629,
31,
368,
364,
22944,
1741,
22423,
3169,
1382,
7734,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1207,
49,
26140,
12,
1943,
1522,
16,
9933,
743,
3481,
13,
288,
3639,
8706,
436,
31,
3639,
1250,
22423,
3169,
1845,
273,
629,
31,
368,
364,
22944,
1741,
22423,
3169,
1382,
7734,... |
lptvdi.iImage = lptvdi.iSelectedImage = imageIndex (image); | lptvdi.iImage = lptvdi.iSelectedImage = imageIndex (image, index); | LRESULT wmNotifyChild (int wParam, int lParam) { NMHDR hdr = new NMHDR (); OS.MoveMemory (hdr, lParam, NMHDR.sizeof); switch (hdr.code) { case OS.TVN_GETDISPINFOA: case OS.TVN_GETDISPINFOW: { NMTVDISPINFO lptvdi = new NMTVDISPINFO (); OS.MoveMemory (lptvdi, lParam, NMTVDISPINFO.sizeof); /* * Feature in Windows. When a new tree item is inserted * using TVM_INSERTITEM, a TVN_GETDISPINFO is sent before * TVM_INSERTITEM returns and before the item is added to * the items array. The fix is to check for null. * * NOTE: This only happens on XP with the version 6.00 of * COMCTL32.DLL, */ if (items == null) break; TreeItem item = items [lptvdi.lParam]; if (item == null) break; if (!item.cached) { if ((style & SWT.VIRTUAL) != 0) { if (drawCount == 0 && OS.IsWindowVisible (handle)) { RECT itemRect = new RECT (); itemRect.left = lptvdi.hItem; if (OS.SendMessage (handle, OS.TVM_GETITEMRECT, 0, itemRect) != 0) { RECT rect = new RECT (); OS.GetClientRect (handle, rect); if (OS.IntersectRect (rect, rect, itemRect)) { if (!checkData (item, false)) break; } } } } else { item.cached = true; } } int index = 0; if (hwndHeader != 0) { index = OS.SendMessage (hwndHeader, OS.HDM_ORDERTOINDEX, 0, 0); } if ((lptvdi.mask & OS.TVIF_TEXT) != 0) { String string = null; if (index == 0) { string = item.text; } else { String [] strings = item.strings; if (strings != null) string = strings [index]; } if (string != null) { TCHAR buffer = new TCHAR (getCodePage (), string, false); int byteCount = Math.min (buffer.length (), lptvdi.cchTextMax - 1) * TCHAR.sizeof; OS.MoveMemory (lptvdi.pszText, buffer, byteCount); OS.MoveMemory (lptvdi.pszText + byteCount, new byte [TCHAR.sizeof], TCHAR.sizeof); lptvdi.cchTextMax = Math.min (lptvdi.cchTextMax, string.length () + 1); } } if ((lptvdi.mask & (OS.TVIF_IMAGE | OS.TVIF_SELECTEDIMAGE)) != 0) { Image image = null; if (index == 0) { image = item.image; } else { Image [] images = item.images; if (images != null) image = images [index]; } lptvdi.iImage = lptvdi.iSelectedImage = OS.I_IMAGENONE; if (image != null) { lptvdi.iImage = lptvdi.iSelectedImage = imageIndex (image); } } OS.MoveMemory (lParam, lptvdi, NMTVDISPINFO.sizeof); break; } case OS.NM_CUSTOMDRAW: { if (!customDraw) break; NMTVCUSTOMDRAW nmcd = new NMTVCUSTOMDRAW (); OS.MoveMemory (nmcd, lParam, NMTVCUSTOMDRAW.sizeof); switch (nmcd.dwDrawStage) { case OS.CDDS_PREPAINT: { return new LRESULT (OS.CDRF_NOTIFYITEMDRAW | OS.CDRF_NOTIFYPOSTPAINT); } case OS.CDDS_POSTPAINT: { if (linesVisible) { int hDC = nmcd.hdc; if (hwndHeader != 0) { int x = 0; RECT rect = new RECT (); HDITEM hdItem = new HDITEM (); hdItem.mask = OS.HDI_WIDTH; int count = OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0); for (int i=0; i<count; i++) { int index = OS.SendMessage (hwndHeader, OS.HDM_ORDERTOINDEX, i, 0); OS.SendMessage (hwndHeader, OS.HDM_GETITEM, index, hdItem); OS.SetRect (rect, x, nmcd.top, x + hdItem.cxy, nmcd.bottom); OS.DrawEdge (hDC, rect, OS.BDR_SUNKENINNER, OS.BF_RIGHT); x += hdItem.cxy; } } RECT rect = new RECT (); int hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_LASTVISIBLE, 0); rect.left = hItem; if (OS.SendMessage (handle, OS.TVM_GETITEMRECT, 0, rect) != 0) { int height = rect.bottom - rect.top; while (rect.bottom < nmcd.bottom) { int top = rect.top + height; OS.SetRect (rect, rect.left, top, rect.right, top + height); OS.DrawEdge (hDC, rect, OS.BDR_SUNKENINNER, OS.BF_BOTTOM); } } } return new LRESULT (OS.CDRF_DODEFAULT); } case OS.CDDS_ITEMPREPAINT: { /* * Feature in Windows. When a new tree item is inserted * using TVM_INSERTITEM and the tree is using custom draw, * a NM_CUSTOMDRAW is sent before TVM_INSERTITEM returns * and before the item is added to the items array. The * fix is to check for null. * * NOTE: This only happens on XP with the version 6.00 of * COMCTL32.DLL, */ TreeItem item = items [nmcd.lItemlParam]; if (item == null) break; if (nmcd.left >= nmcd.right || nmcd.top >= nmcd.bottom) { break; } int hDC = nmcd.hdc; OS.SaveDC (hDC); if (linesVisible) { RECT rect = new RECT (); OS.SetRect (rect, nmcd.left, nmcd.top, nmcd.right, nmcd.bottom); OS.DrawEdge (hDC, rect, OS.BDR_SUNKENINNER, OS.BF_BOTTOM); } if (!printClient && (style & SWT.FULL_SELECTION) == 0) { if (hwndHeader != 0) { int count = OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0); if (count != 0) { HDITEM hdItem = new HDITEM (); hdItem.mask = OS.HDI_WIDTH; int index = OS.SendMessage (hwndHeader, OS.HDM_ORDERTOINDEX, 0, 0); OS.SendMessage (hwndHeader, OS.HDM_GETITEM, index, hdItem); int hRgn = OS.CreateRectRgn (nmcd.left, nmcd.top, nmcd.left + hdItem.cxy, nmcd.bottom); OS.SelectClipRgn (hDC, hRgn); OS.DeleteObject (hRgn); } } } if (item.font == -1 && item.foreground == -1 && item.background == -1) { if (item.cellForeground == null && item.cellBackground == null && item.cellFont == null) { return new LRESULT (OS.CDRF_DODEFAULT | OS.CDRF_NOTIFYPOSTPAINT); } } int hFont = item.cellFont != null ? item.cellFont [0] : item.font; if (hFont != -1) OS.SelectObject (hDC, hFont); if (OS.IsWindowEnabled (handle)) { TVITEM tvItem = new TVITEM (); tvItem.mask = OS.TVIF_STATE; tvItem.hItem = item.handle; OS.SendMessage (handle, OS.TVM_GETITEM, 0, tvItem); if ((tvItem.state & (OS.TVIS_SELECTED | OS.TVIS_DROPHILITED)) == 0) { int clrText = item.cellForeground != null ? item.cellForeground [0] : item.foreground; nmcd.clrText = clrText == -1 ? getForegroundPixel () : clrText; int clrTextBk = item.cellBackground != null ? item.cellBackground [0] : item.background; nmcd.clrTextBk = clrTextBk == -1 ? getBackgroundPixel () : clrTextBk; OS.MoveMemory (lParam, nmcd, NMTVCUSTOMDRAW.sizeof); } } return new LRESULT (OS.CDRF_NEWFONT | OS.CDRF_NOTIFYPOSTPAINT); } case OS.CDDS_ITEMPOSTPAINT: { TreeItem item = items [nmcd.lItemlParam]; if (item == null) break; /* * Feature in Windows. Under certain circumstances, Windows * sends CDDS_ITEMPOSTPAINT for an empty rectangle. This is * not a problem providing that graphics do not occur outside * the rectangle. The fix is to test for the rectangle and * draw nothing. * * NOTE: This seems to happen when both I_IMAGECALLBACK * and LPSTR_TEXTCALLBACK are used at the same time with * TVM_SETITEM. */ if (nmcd.left >= nmcd.right || nmcd.top >= nmcd.bottom) { break; } int hDC = nmcd.hdc; OS.RestoreDC (hDC, -1); OS.SetBkMode (hDC, OS.TRANSPARENT); boolean useColor = OS.IsWindowEnabled (handle); if (useColor) { if ((style & SWT.FULL_SELECTION) != 0) { TVITEM tvItem = new TVITEM (); tvItem.mask = OS.TVIF_STATE; tvItem.hItem = item.handle; OS.SendMessage (handle, OS.TVM_GETITEM, 0, tvItem); if ((tvItem.state & OS.TVIS_SELECTED) != 0) { useColor = false; } else { /* * Feature in Windows. When the mouse is pressed and the * selection is first drawn for a tree, the item is drawn * selected, but the TVIS_SELECTED bits for the item are * not set. When the user moves the mouse slightly and * a drag and drop operation is not started, the item is * drawn again and this time TVIS_SELECTED is set. This * means that an item that is in a tree that has the style * TVS_FULLROWSELECT and that also contains colored cells * will not draw the entire row selected until the user * moves the mouse. The fix is to test for the selection * colors and guess that the item is selected. * * NOTE: This code doesn't work when the foreground and * background of the tree are set to the selection colors * but this does not happen in a regular application. */ int clrForeground = OS.GetTextColor (hDC); if (clrForeground == OS.GetSysColor (OS.COLOR_HIGHLIGHTTEXT)) { int clrBackground = OS.GetBkColor (hDC); if (clrBackground == OS.GetSysColor (OS.COLOR_HIGHLIGHT)) { useColor = false; } } } } else { OS.SetTextColor (hDC, getForegroundPixel ()); } } if (hwndHeader != 0) { GCData data = new GCData(); data.device = display; GC gc = GC.win32_new (hDC, data); int x = 0, gridWidth = linesVisible ? GRID_WIDTH : 0; Point size = null; RECT rect = new RECT (); HDITEM hdItem = new HDITEM (); hdItem.mask = OS.HDI_WIDTH; int count = OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0); for (int i=0; i<count; i++) { int index = OS.SendMessage (hwndHeader, OS.HDM_ORDERTOINDEX, i, 0); OS.SendMessage (hwndHeader, OS.HDM_GETITEM, index, hdItem); if (i > 0) { OS.SetRect (rect, x, nmcd.top, x + hdItem.cxy, nmcd.bottom - gridWidth); if (printClient || (style & SWT.FULL_SELECTION) != 0) { drawBackground (hDC, OS.GetBkColor (hDC), rect); } if (useColor) { int clrTextBk = item.cellBackground != null ? item.cellBackground [index] : item.background; if (clrTextBk != -1) drawBackground (hDC, clrTextBk, rect); } Image image = null; if (index == 0) { image = item.image; } else { Image [] images = item.images; if (images != null) image = images [index]; } if (image != null) { Rectangle bounds = image.getBounds (); if (size == null) size = getImageSize (); gc.drawImage (image, 0, 0, bounds.width, bounds.height, rect.left, rect.top, size.x, size.y); OS.SetRect (rect, rect.left + size.x + INSET, rect.top, rect.right - INSET, rect.bottom); } else { OS.SetRect (rect, rect.left + INSET, rect.top, rect.right - INSET, rect.bottom); } /* * Bug in Windows. When DrawText() is used with DT_VCENTER * and DT_ENDELLIPSIS, the ellipsis can draw outside of the * rectangle when the rectangle is empty. The fix is avoid * all text drawing for empty rectangles. */ if (rect.left < rect.right) { String string = null; if (index == 0) { string = item.text; } else { String [] strings = item.strings; if (strings != null) string = strings [index]; } if (string != null) { int hFont = item.cellFont != null ? item.cellFont [index] : item.font; hFont = hFont != -1 ? OS.SelectObject (hDC, hFont) : -1; int clrText = -1; if (useColor) { clrText = item.cellForeground != null ? item.cellForeground [index] : item.foreground; clrText = clrText != -1? OS.SetTextColor (hDC, clrText) : -1; } int flags = OS.DT_NOPREFIX | OS.DT_SINGLELINE | OS.DT_VCENTER | OS.DT_ENDELLIPSIS; TreeColumn column = columns [index]; if ((column.style & SWT.LEFT) != 0) flags |= OS.DT_LEFT; if ((column.style & SWT.CENTER) != 0) flags |= OS.DT_CENTER; if ((column.style & SWT.RIGHT) != 0) flags |= OS.DT_RIGHT; TCHAR buffer = new TCHAR (getCodePage (), string, false); OS.DrawText (hDC, buffer, buffer.length (), rect, flags); if (hFont != -1) OS.SelectObject (hDC, hFont); if (clrText != -1) OS.SetTextColor (hDC, clrText); } } } x += hdItem.cxy; } if (count > 0) { if (printClient || (style & SWT.FULL_SELECTION) != 0) { OS.SetRect (rect, x, nmcd.top, nmcd.right, nmcd.bottom - gridWidth); drawBackground (hDC, OS.GetBkColor (hDC), rect); } } gc.dispose (); } if (linesVisible) { if (printClient && (style & SWT.FULL_SELECTION) == 0) { if (hwndHeader != 0) { int count = OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0); if (count != 0 && printClient) { HDITEM hdItem = new HDITEM (); hdItem.mask = OS.HDI_WIDTH; OS.SendMessage (hwndHeader, OS.HDM_GETITEM, 0, hdItem); RECT rect = new RECT (); OS.SetRect (rect, nmcd.left + hdItem.cxy, nmcd.top, nmcd.right, nmcd.bottom); OS.DrawEdge (hDC, rect, OS.BDR_SUNKENINNER, OS.BF_BOTTOM); } } } RECT rect = new RECT (); if (OS.COMCTL32_MAJOR < 6 || (style & SWT.FULL_SELECTION) != 0) { OS.SetRect (rect, nmcd.left, nmcd.top, nmcd.right, nmcd.bottom); } else { rect.left = item.handle; if (OS.SendMessage (handle, OS.TVM_GETITEMRECT, 1, rect) != 0) { int hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0); if (hItem == item.handle) { OS.SetRect (rect, rect.right, nmcd.top, nmcd.right, nmcd.bottom); } else { TVITEM tvItem = new TVITEM (); tvItem.mask = OS.TVIF_STATE; tvItem.hItem = item.handle; OS.SendMessage (handle, OS.TVM_GETITEM, 0, tvItem); if ((tvItem.state & OS.TVIS_SELECTED) != 0) { OS.SetRect (rect, rect.right, nmcd.top, nmcd.right, nmcd.bottom); } else { OS.SetRect (rect, rect.left, nmcd.top, nmcd.right, nmcd.bottom); } } } else { rect.left = 0; } } OS.DrawEdge (hDC, rect, OS.BDR_SUNKENINNER, OS.BF_BOTTOM); } return new LRESULT (OS.CDRF_DODEFAULT); } } break; } case OS.NM_DBLCLK: { if (hooks (SWT.DefaultSelection)) return LRESULT.ONE; break; } case OS.TVN_SELCHANGEDA: case OS.TVN_SELCHANGEDW: { if ((style & SWT.MULTI) != 0) { if (lockSelection) { /* Restore the old selection state of both items */ if (oldSelected) { TVITEM tvItem = new TVITEM (); int offset = NMHDR.sizeof + 4; OS.MoveMemory (tvItem, lParam + offset, TVITEM.sizeof); tvItem.mask = OS.TVIF_STATE; tvItem.stateMask = OS.TVIS_SELECTED; tvItem.state = OS.TVIS_SELECTED; OS.SendMessage (handle, OS.TVM_SETITEM, 0, tvItem); } if (!newSelected && ignoreSelect) { TVITEM tvItem = new TVITEM (); int offset = NMHDR.sizeof + 4 + TVITEM.sizeof; OS.MoveMemory (tvItem, lParam + offset, TVITEM.sizeof); tvItem.mask = OS.TVIF_STATE; tvItem.stateMask = OS.TVIS_SELECTED; tvItem.state = 0; OS.SendMessage (handle, OS.TVM_SETITEM, 0, tvItem); } } } if (!ignoreSelect) { TVITEM tvItem = new TVITEM (); int offset = NMHDR.sizeof + 4 + TVITEM.sizeof; OS.MoveMemory (tvItem, lParam + offset, TVITEM.sizeof); hAnchor = tvItem.hItem; Event event = new Event (); event.item = items [tvItem.lParam]; postEvent (SWT.Selection, event); } updateScrollBar (); break; } case OS.TVN_SELCHANGINGA: case OS.TVN_SELCHANGINGW: { if ((style & SWT.MULTI) != 0) { if (lockSelection) { /* Save the old selection state for both items */ TVITEM tvItem = new TVITEM (); int offset1 = NMHDR.sizeof + 4; OS.MoveMemory (tvItem, lParam + offset1, TVITEM.sizeof); oldSelected = (tvItem.state & OS.TVIS_SELECTED) != 0; int offset2 = NMHDR.sizeof + 4 + TVITEM.sizeof; OS.MoveMemory (tvItem, lParam + offset2, TVITEM.sizeof); newSelected = (tvItem.state & OS.TVIS_SELECTED) != 0; } } if (!ignoreSelect && !ignoreDeselect) { hAnchor = 0; if ((style & SWT.MULTI) != 0) deselectAll (); } break; } case OS.TVN_ITEMEXPANDEDA: case OS.TVN_ITEMEXPANDEDW: { /* * Bug in Windows. When TVM_SETINSERTMARK is used to set * an insert mark for a tree and an item is expanded or * collapsed near the insert mark, the tree does not redraw * the insert mark properly. The fix is to hide and show * the insert mark whenever an item is expanded or collapsed. */ if (hInsert != 0) { OS.SendMessage (handle, OS.TVM_SETINSERTMARK, insertAfter ? 1 : 0, hInsert); } updateScrollBar (); break; } case OS.TVN_ITEMEXPANDINGA: case OS.TVN_ITEMEXPANDINGW: { /* * Bug in Windows. When TVM_SETINSERTMARK is used to set * an insert mark for a tree and an item is expanded or * collapsed near the insert mark, the tree does not redraw * the insert mark properly. The fix is to hide and show * the insert mark whenever an item is expanded or collapsed. */ if (hInsert != 0) { OS.SendMessage (handle, OS.TVM_SETINSERTMARK, 0, 0); } if (!ignoreExpand) { TVITEM tvItem = new TVITEM (); int offset = NMHDR.sizeof + 4 + TVITEM.sizeof; OS.MoveMemory (tvItem, lParam + offset, TVITEM.sizeof); /* * Feature in Windows. In some cases, TVM_ITEMEXPANDING * is sent from within TVM_DELETEITEM for the tree item * being destroyed. By the time the message is sent, * the item has already been removed from the list of * items. The fix is to check for null. */ if (items == null) break; TreeItem item = items [tvItem.lParam]; if (item == null) break; Event event = new Event (); event.item = item; int [] action = new int [1]; OS.MoveMemory (action, lParam + NMHDR.sizeof, 4); switch (action [0]) { case OS.TVE_EXPAND: /* * Bug in Windows. When the numeric keypad asterisk * key is used to expand every item in the tree, Windows * sends TVN_ITEMEXPANDING to items in the tree that * have already been expanded. The fix is to detect * that the item is already expanded and ignore the * notification. */ if ((tvItem.state & OS.TVIS_EXPANDED) == 0) { sendEvent (SWT.Expand, event); if (isDisposed ()) return LRESULT.ZERO; } break; case OS.TVE_COLLAPSE: sendEvent (SWT.Collapse, event); if (isDisposed ()) return LRESULT.ZERO; break; } } break; } case OS.TVN_BEGINDRAGA: case OS.TVN_BEGINDRAGW: case OS.TVN_BEGINRDRAGA: case OS.TVN_BEGINRDRAGW: { TVITEM tvItem = new TVITEM (); int offset = NMHDR.sizeof + 4 + TVITEM.sizeof; OS.MoveMemory (tvItem, lParam + offset, TVITEM.sizeof); if (tvItem.hItem != 0 && (tvItem.state & OS.TVIS_SELECTED) == 0) { ignoreSelect = ignoreDeselect = true; OS.SendMessage (handle, OS.TVM_SELECTITEM, OS.TVGN_CARET, tvItem.hItem); ignoreSelect = ignoreDeselect = false; } dragStarted = true; break; } case OS.NM_RECOGNIZEGESTURE: { /* * Feature in Pocket PC. The tree and table controls detect the tap * and hold gesture by default. They send a GN_CONTEXTMENU message to show * the popup menu. This default behaviour is unwanted on Pocket PC 2002 * when no menu has been set, as it still draws a red circle. The fix * is to disable this default behaviour when no menu is set by returning * TRUE when receiving the Pocket PC 2002 specific NM_RECOGNIZEGESTURE * message. */ if (OS.IsPPC) { boolean hasMenu = menu != null && !menu.isDisposed (); if (!hasMenu && !hooks (SWT.MenuDetect)) return LRESULT.ONE; } break; } case OS.GN_CONTEXTMENU: { if (OS.IsPPC) { boolean hasMenu = menu != null && !menu.isDisposed (); if (hasMenu || hooks (SWT.MenuDetect)) { NMRGINFO nmrg = new NMRGINFO (); OS.MoveMemory (nmrg, lParam, NMRGINFO.sizeof); showMenu (nmrg.x, nmrg.y); gestureCompleted = true; return LRESULT.ONE; } } break; } } return super.wmNotifyChild (wParam, lParam);} | 12413 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12413/a9d8e109610d5be1453b2f0887454bda42f16ccf/Tree.java/clean/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
511,
12289,
18200,
9168,
1763,
261,
474,
341,
786,
16,
509,
328,
786,
13,
288,
202,
50,
49,
44,
6331,
7723,
273,
394,
423,
49,
44,
6331,
261,
1769,
202,
4618,
18,
7607,
6031,
261,
16587,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
511,
12289,
18200,
9168,
1763,
261,
474,
341,
786,
16,
509,
328,
786,
13,
288,
202,
50,
49,
44,
6331,
7723,
273,
394,
423,
49,
44,
6331,
261,
1769,
202,
4618,
18,
7607,
6031,
261,
16587,
1... |
javaModule.defineClassUnder("JavaConstructor", runtime.getClasses().getObjectClass()); | javaModule.defineClassUnder("JavaConstructor", runtime.getObject()); | public static RubyClass createJavaConstructorClass(Ruby runtime, RubyModule javaModule) { RubyClass result = javaModule.defineClassUnder("JavaConstructor", runtime.getClasses().getObjectClass()); CallbackFactory callbackFactory = runtime.callbackFactory(JavaConstructor.class); JavaCallable.registerRubyMethods(runtime, result, JavaConstructor.class); result.defineMethod("arity", callbackFactory.getMethod("arity")); result.defineMethod("inspect", callbackFactory.getMethod("inspect")); result.defineMethod("argument_types", callbackFactory.getMethod("argument_types")); result.defineMethod("new_instance", callbackFactory.getOptMethod("new_instance")); return result; } | 46454 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46454/ca6b16e996ea9af83ce593594b9c69b9364a9924/JavaConstructor.java/buggy/src/org/jruby/javasupport/JavaConstructor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
19817,
797,
752,
5852,
6293,
797,
12,
54,
10340,
3099,
16,
19817,
3120,
2252,
3120,
13,
288,
3639,
19817,
797,
563,
273,
7734,
2252,
3120,
18,
11255,
797,
14655,
2932,
5852,
62... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
19817,
797,
752,
5852,
6293,
797,
12,
54,
10340,
3099,
16,
19817,
3120,
2252,
3120,
13,
288,
3639,
19817,
797,
563,
273,
7734,
2252,
3120,
18,
11255,
797,
14655,
2932,
5852,
62... |
switch( evt.getType() ) { | switch(evt.getType()) { | public void down(Event evt) { Message msg; //System.out.println("DOWN: " + evt); switch( evt.getType() ) { case Event.VIEW_CHANGE: // this will probably never happen log.error( "NOTE: VIEW_CHANGE Event going down through " + PROTOCOL_NAME ); Vector new_members=((View)evt.getArg()).getMembers(); synchronized(members) { members.removeAllElements(); if(new_members != null && new_members.size() > 0) for(int i=0; i < new_members.size(); i++) members.addElement(new_members.elementAt(i)); } break; case Event.MSG: Object temp_obj = evt.getArg(); if ( temp_obj instanceof Message ) { msg = (Message) temp_obj; // note: a TotalHeader is added to every message (Event.MSG) // that is sent // check if this is a broadcast message if ( msg.getDest() == null ) { // yes, this is a broadcast message // send out a request for a message to be broadcast // (the sequencer will handle this) Address sequencer = getSequencer(); if ( sequencer != null ) { // we only need to send the request to the sequencer (who will broadcast it) msg.setDest( sequencer ); } else { // couldn't find sequencer of the group // for now, just send it to the original destination // (don't need to do anything here) } //msg.putHeader(getName(), TotalHeader.getRequestHeader() ); msg.putHeader(getName(), new TotalHeader(TotalHeader.TOTAL_REQUEST, -1)); } else { // this is a point to point unicast message so just send it to its original destination msg.putHeader(getName(), new TotalHeader( TotalHeader.TOTAL_UNICAST, -1 ) ); // sequence id in header is irrelevant } } else { log.error( "Error: TOTAL_OLD.down() - could not cast argument of Event to a Message (case Event.MSG)" ); } // if ( temp_obj instanceof Message ) break; default: break; } // switch( evt.getType() ) passDown(evt); // Pass on to the layer below us } | 48949 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48949/5ad015d9a78e1da3350d9b398b46b2f5d4508564/TOTAL_OLD.java/clean/src/org/jgroups/protocols/TOTAL_OLD.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
2588,
12,
1133,
6324,
13,
288,
3639,
2350,
1234,
31,
3639,
368,
3163,
18,
659,
18,
8222,
2932,
12711,
30,
315,
397,
6324,
1769,
3639,
1620,
12,
73,
11734,
18,
588,
559,
10756... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
2588,
12,
1133,
6324,
13,
288,
3639,
2350,
1234,
31,
3639,
368,
3163,
18,
659,
18,
8222,
2932,
12711,
30,
315,
397,
6324,
1769,
3639,
1620,
12,
73,
11734,
18,
588,
559,
10756... |
kpg.initialize(512); keyPair = kpg.genKeyPair(); Assert._assert( keyPair.getPublic() instanceof DSAPublicKey); dsaPubKey = (DSAPublicKey) keyPair.getPublic(); System.out.println("Generated 512-bit DSA KeyPair!"); dsaParams = dsaPubKey.getParams(); System.out.println("P: "+dsaParams.getP()); System.out.println("Q: "+dsaParams.getQ()); System.out.println("G: "+dsaParams.getG()); System.out.println("Y: "+dsaPubKey.getY()); | for (int cntr=0; cntr<5; cntr++ ) { try { kpg.initialize(512); keyPair = kpg.genKeyPair(); Assert._assert( keyPair.getPublic() instanceof DSAPublicKey); dsaPubKey = (DSAPublicKey) keyPair.getPublic(); System.out.println("Generated 512-bit DSA KeyPair!"); dsaParams = dsaPubKey.getParams(); System.out.println("P: "+dsaParams.getP()); System.out.println("Q: "+dsaParams.getQ()); System.out.println("G: "+dsaParams.getG()); System.out.println("Y: "+dsaPubKey.getY()); break; } catch (org.mozilla.jss.crypto.TokenRuntimeException TRExDSA512) { if (cntr==5) { System.out.println("Generation of 512-bit DSA KeyPair Failed\n"); TRExDSA512.printStackTrace(); } } } | public static void main(String[] args) { try { CryptoManager manager; java.security.KeyPair keyPair; Base64OutputStream base64; if(args.length != 2) { System.err.println("Usage: java org.mozilla.jss.pkcs11." + "TestKeyGen <dbdir> <pwfile>"); System.exit(1); } CryptoManager.initialize(args[0]); manager = CryptoManager.getInstance(); manager.setPasswordCallback( new FilePasswordCallback(args[1]) ); java.util.Enumeration tokens = manager.getTokensSupportingAlgorithm(KeyPairAlgorithm.RSA); System.out.println("The following tokens support RSA keygen:"); while(tokens.hasMoreElements()) { System.out.println("\t"+ ((CryptoToken)tokens.nextElement()).getName() ); } tokens = manager.getTokensSupportingAlgorithm(KeyPairAlgorithm.DSA); System.out.println("The following tokens support DSA keygen:"); while(tokens.hasMoreElements()) { System.out.println("\t"+ ((CryptoToken)tokens.nextElement()).getName() ); } RSAPublicKey rsaPubKey; DSAPublicKey dsaPubKey; DSAParams dsaParams; RSAParameterSpec rsaParams; java.security.KeyPairGenerator kpg = java.security.KeyPairGenerator.getInstance("RSA", "Mozilla-JSS"); // 512-bit RSA with default exponent kpg.initialize(512); keyPair = kpg.genKeyPair(); Assert._assert( keyPair.getPublic() instanceof RSAPublicKey); rsaPubKey = (RSAPublicKey) keyPair.getPublic(); System.out.println("Generated 512-bit RSA KeyPair!"); System.out.println("Modulus: "+rsaPubKey.getModulus()); System.out.println("Exponent: "+rsaPubKey.getPublicExponent()); // 1024-bit RSA with default exponent kpg.initialize(1024); keyPair = kpg.genKeyPair(); Assert._assert( keyPair.getPublic() instanceof RSAPublicKey); rsaPubKey = (RSAPublicKey) keyPair.getPublic(); System.out.println("Generated 1024-bit RSA KeyPair!"); System.out.println("Modulus: "+rsaPubKey.getModulus()); System.out.println("Exponent: "+rsaPubKey.getPublicExponent()); // 512-bit RSA with exponent = 3 rsaParams = new RSAParameterSpec(512, BigInteger.valueOf(3)); kpg.initialize(rsaParams); keyPair = kpg.genKeyPair(); Assert._assert( keyPair.getPublic() instanceof RSAPublicKey); rsaPubKey = (RSAPublicKey) keyPair.getPublic(); System.out.println("Generated 512-bit RSA KeyPair with public exponent=3!"); System.out.println("Modulus: "+rsaPubKey.getModulus()); System.out.println("Exponent: "+rsaPubKey.getPublicExponent()); // 512-bit DSA kpg = java.security.KeyPairGenerator.getInstance("DSA", "Mozilla-JSS"); kpg.initialize(512); keyPair = kpg.genKeyPair(); Assert._assert( keyPair.getPublic() instanceof DSAPublicKey); dsaPubKey = (DSAPublicKey) keyPair.getPublic(); System.out.println("Generated 512-bit DSA KeyPair!"); dsaParams = dsaPubKey.getParams(); System.out.println("P: "+dsaParams.getP()); System.out.println("Q: "+dsaParams.getQ()); System.out.println("G: "+dsaParams.getG()); System.out.println("Y: "+dsaPubKey.getY()); // 1024-bit DSA, passing in PQG params kpg.initialize(PK11KeyPairGenerator.PQG1024); keyPair = kpg.genKeyPair(); Assert._assert( keyPair.getPublic() instanceof DSAPublicKey); dsaPubKey = (DSAPublicKey) keyPair.getPublic(); System.out.println("Generated 1024-bit DSA KeyPair with PQG params!"); dsaParams = dsaPubKey.getParams(); System.out.println("P: "+dsaParams.getP()); System.out.println("Q: "+dsaParams.getQ()); System.out.println("G: "+dsaParams.getG()); System.out.println("Y: "+dsaPubKey.getY()); System.out.println("TestKeyGen passed"); System.exit(0); } catch (Exception e) { e.printStackTrace(); System.exit(1); } } | 47609 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47609/e5e6b59c1971f64da1015487204096f609f36441/TestKeyGen.java/buggy/security/jss/org/mozilla/jss/tests/TestKeyGen.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
2774,
12,
780,
8526,
833,
13,
288,
1377,
775,
288,
3639,
15629,
1318,
3301,
31,
3639,
2252,
18,
7462,
18,
15099,
31527,
31,
3639,
3360,
1105,
4632,
1026,
1105,
31,
3639,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
2774,
12,
780,
8526,
833,
13,
288,
1377,
775,
288,
3639,
15629,
1318,
3301,
31,
3639,
2252,
18,
7462,
18,
15099,
31527,
31,
3639,
3360,
1105,
4632,
1026,
1105,
31,
3639,
... |
if (iPath.length != 0) | if (iPath.length != 3) | public void testDepSourceChangeTable() throws Exception{ //Add a file to the project IFile cH = importFile("c.h","resources/dependency/c.h"); IFile aH = importFile("a.h","resources/dependency/a.h"); IFile Inc1H = importFile("Inc1.h","resources/dependency/Inc1.h"); IFile dH = importFile("d.h","resources/dependency/d.h"); IFile depTestH = importFile("DepTest.h","resources/dependency/DepTest.h"); IFile depTestC = importFile("DepTest.cpp","resources/dependency/DepTest.cpp"); String[] beforeModel = {Path.SEPARATOR + "DepTestProject" + IPath.SEPARATOR + "DepTest.cpp"}; PathCollector pathCollector = new PathCollector(); getTableRefs(depTestH, pathCollector); String[] iPath = pathCollector.getPaths(); compareArrays(iPath,beforeModel); pathCollector = new PathCollector(); getTableRefs(dH, pathCollector); iPath = pathCollector.getPaths(); compareArrays(iPath,beforeModel); pathCollector = new PathCollector(); getTableRefs(Inc1H, pathCollector); iPath = pathCollector.getPaths(); compareArrays(iPath,beforeModel); pathCollector = new PathCollector(); getTableRefs(aH, pathCollector); iPath = pathCollector.getPaths(); compareArrays(iPath,beforeModel); pathCollector = new PathCollector(); getTableRefs(cH, pathCollector); iPath = pathCollector.getPaths(); compareArrays(iPath,beforeModel); editCode(depTestC,"#include \"DepTest.h\"","//#include \"DepTest.h\""); pathCollector = new PathCollector(); getTableRefs(depTestH, pathCollector); iPath = pathCollector.getPaths(); if (iPath.length != 0) fail("Number of included files differs from model"); pathCollector = new PathCollector(); getTableRefs(dH, pathCollector); iPath = pathCollector.getPaths(); compareArrays(iPath,beforeModel); pathCollector = new PathCollector(); getTableRefs(Inc1H, pathCollector); iPath = pathCollector.getPaths(); if (iPath.length != 0) fail("Number of included files differs from model"); pathCollector = new PathCollector(); getTableRefs(aH, pathCollector); iPath = pathCollector.getPaths(); if (iPath.length != 0) fail("Number of included files differs from model"); pathCollector = new PathCollector(); getTableRefs(cH, pathCollector); iPath = pathCollector.getPaths(); if (iPath.length != 0) fail("Number of included files differs from model"); } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/c59364cdd56db8f8ae5aacc862e7df64ab37534d/DependencyTests.java/buggy/core/org.eclipse.cdt.core.tests/indexer/org/eclipse/cdt/core/indexer/tests/DependencyTests.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
1071,
918,
1842,
16316,
1830,
3043,
1388,
1435,
1216,
1185,
95,
282,
368,
986,
279,
585,
358,
326,
1984,
282,
467,
812,
276,
44,
273,
1930,
812,
2932,
71,
18,
76,
15937,
4683,
19,
15896... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1071,
918,
1842,
16316,
1830,
3043,
1388,
1435,
1216,
1185,
95,
282,
368,
986,
279,
585,
358,
326,
1984,
282,
467,
812,
276,
44,
273,
1930,
812,
2932,
71,
18,
76,
15937,
4683,
19,
15896... |
FetchResult result = runMetadata(dm, recursionLevel, key, metaStrings, metadata, null, key.getURI(), dontEnterImplicitArchives); | FetchResult result = runMetadata(dm, recursionLevel, key, metaStrings, metadata, null, key.getURI(), dontEnterImplicitArchives, localOnly); | FetchResult realRun(ClientMetadata dm, int recursionLevel, FreenetURI uri, boolean dontEnterImplicitArchives) throws FetchException, MetadataParseException, ArchiveFailureException, ArchiveRestartException { Logger.minor(this, "Running fetch for: "+uri); ClientKey key; try { key = ClientKey.getBaseKey(uri); } catch (MalformedURLException e2) { throw new FetchException(FetchException.INVALID_URI, "Invalid URI: "+uri); } LinkedList metaStrings = uri.listMetaStrings(); recursionLevel++; if(recursionLevel > ctx.maxRecursionLevel) throw new FetchException(FetchException.TOO_MUCH_RECURSION, ""+recursionLevel+" should be < "+ctx.maxRecursionLevel); // Do the fetch KeyBlock block; try { block = ctx.client.getKey(key, ctx.localRequestOnly, ctx.starterClient); } catch (LowLevelGetException e) { switch(e.code) { case LowLevelGetException.DATA_NOT_FOUND: throw new FetchException(FetchException.DATA_NOT_FOUND); case LowLevelGetException.DATA_NOT_FOUND_IN_STORE: throw new FetchException(FetchException.DATA_NOT_FOUND); case LowLevelGetException.DECODE_FAILED: throw new FetchException(FetchException.BLOCK_DECODE_ERROR); case LowLevelGetException.INTERNAL_ERROR: throw new FetchException(FetchException.INTERNAL_ERROR); case LowLevelGetException.REJECTED_OVERLOAD: throw new FetchException(FetchException.REJECTED_OVERLOAD); case LowLevelGetException.ROUTE_NOT_FOUND: throw new FetchException(FetchException.ROUTE_NOT_FOUND); case LowLevelGetException.TRANSFER_FAILED: throw new FetchException(FetchException.TRANSFER_FAILED); case LowLevelGetException.VERIFY_FAILED: throw new FetchException(FetchException.BLOCK_DECODE_ERROR); default: Logger.error(this, "Unknown LowLevelGetException code: "+e.code); throw new FetchException(FetchException.INTERNAL_ERROR); } } ctx.eventProducer.produceEvent(new GotBlockEvent(key)); Bucket data; try { data = block.decode(key, ctx.bucketFactory, (int) (Math.min(ctx.maxTempLength, Integer.MAX_VALUE))); } catch (KeyDecodeException e1) { throw new FetchException(FetchException.BLOCK_DECODE_ERROR, e1.getMessage()); } catch (IOException e) { Logger.error(this, "Could not capture data - disk full?: "+e, e); throw new FetchException(FetchException.BUCKET_ERROR, e); } ctx.eventProducer.produceEvent(new DecodedBlockEvent(key)); if(!key.isMetadata()) { // Just return the data return new FetchResult(dm, data); } // Otherwise we need to parse the metadata if(data.size() > ctx.maxMetadataSize) throw new FetchException(FetchException.TOO_BIG_METADATA); Metadata metadata; try { metadata = Metadata.construct(BucketTools.toByteArray(data)); } catch (IOException e) { throw new FetchException(FetchException.BUCKET_ERROR, e); } ctx.eventProducer.produceEvent(new FetchedMetadataEvent()); FetchResult result = runMetadata(dm, recursionLevel, key, metaStrings, metadata, null, key.getURI(), dontEnterImplicitArchives); if(metaStrings.isEmpty()) return result; // Still got some meta-strings throw new FetchException(FetchException.HAS_MORE_METASTRINGS); } | 50653 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50653/308b196ee77f38c4a2c6b11b7182c054b6b5e3e6/Fetcher.java/clean/src/freenet/client/Fetcher.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
5005,
1253,
2863,
1997,
12,
1227,
2277,
9113,
16,
509,
13917,
2355,
16,
478,
2842,
278,
3098,
2003,
16,
1250,
14046,
10237,
15787,
12269,
3606,
13,
225,
202,
15069,
8065,
503,
16,
69... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5005,
1253,
2863,
1997,
12,
1227,
2277,
9113,
16,
509,
13917,
2355,
16,
478,
2842,
278,
3098,
2003,
16,
1250,
14046,
10237,
15787,
12269,
3606,
13,
225,
202,
15069,
8065,
503,
16,
69... |
if ( patternStr.equals( "Scientific" ) ) | if ( patternStr.equals( "Scientific" ) ) | private void handleNamedFormats( String patternStr ) { if ( patternStr.equals( "General Number" ) ) { numberFormat = NumberFormat.getInstance( locale ); return; } if ( patternStr.equals( "Currency" ) ) { //numberFormat.applyPattern("??###,##0.00"); numberFormat = NumberFormat.getCurrencyInstance( locale ); return; } if ( patternStr.equals( "Fixed" ) ) { numberFormat = new DecimalFormat( "#0.00", new DecimalFormatSymbols( locale ) ); return; } if ( patternStr.equals( "Percent" ) ) { numberFormat = new DecimalFormat( "0.00%", new DecimalFormatSymbols( locale ) ); return; } if ( patternStr.equals( "Scientific" ) ) { numberFormat = new DecimalFormat( "0.00E00", new DecimalFormatSymbols( locale ) ); return; } if ( patternStr.equals( "Standard" ) ) { numberFormat = new DecimalFormat( "###,##0.00", new DecimalFormatSymbols( locale ) ); return; } numberFormat = new DecimalFormat( patternStr, new DecimalFormatSymbols( locale ) ); } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/5e9b56cf7b8135282c03b97d8af0909f1c511509/NumberFormatter.java/buggy/core/org.eclipse.birt.core/src/org/eclipse/birt/core/format/NumberFormatter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1640,
7604,
8976,
12,
514,
1936,
1585,
262,
202,
95,
202,
202,
430,
261,
1936,
1585,
18,
14963,
12,
315,
12580,
3588,
6,
262,
262,
202,
202,
95,
1082,
202,
2696,
1630,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1640,
7604,
8976,
12,
514,
1936,
1585,
262,
202,
95,
202,
202,
430,
261,
1936,
1585,
18,
14963,
12,
315,
12580,
3588,
6,
262,
262,
202,
202,
95,
1082,
202,
2696,
1630,
... |
this.classId = columns[3].indexOf( "seal" ) != -1 ? AscensionSnapshotTable.SEAL_CLUBBER : | this.classId = columns[3].indexOf( "club" ) != -1 ? AscensionSnapshotTable.SEAL_CLUBBER : | private void setCurrentColumns( String [] columns ) { try { this.classId = columns[3].indexOf( "seal" ) != -1 ? AscensionSnapshotTable.SEAL_CLUBBER : columns[3].indexOf( "turtle" ) != -1 ? AscensionSnapshotTable.TURTLE_TAMER : columns[3].indexOf( "pasta" ) != -1 ? AscensionSnapshotTable.PASTAMANCER : columns[3].indexOf( "sauce" ) != -1 ? AscensionSnapshotTable.SAUCEROR : columns[3].indexOf( "disco" ) != -1 ? AscensionSnapshotTable.DISCO_BANDIT : AscensionSnapshotTable.ACCORDION_THIEF; this.isSoftcore = columns[8].indexOf( "hardcore" ) == -1; this.pathId = columns[8].indexOf( "bowl" ) != -1 ? AscensionSnapshotTable.TEETOTALER : columns[8].indexOf( "martini" ) != -1 ? AscensionSnapshotTable.BOOZETAFARIAN : columns[8].indexOf( "oxy" ) != -1 ? AscensionSnapshotTable.OXYGENARIAN : AscensionSnapshotTable.NOPATH; } 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/4572cc481b7c6f33293c997507c7b9de7fdde703/AscensionDataRequest.java/buggy/src/net/sourceforge/kolmafia/AscensionDataRequest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
1152,
918,
12589,
3380,
12,
514,
5378,
2168,
262,
202,
202,
95,
1082,
202,
698,
1082,
202,
95,
9506,
202,
2211,
18,
1106,
548,
273,
2168,
63,
23,
8009,
31806,
12,
315,
307,
287,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
1152,
918,
12589,
3380,
12,
514,
5378,
2168,
262,
202,
202,
95,
1082,
202,
698,
1082,
202,
95,
9506,
202,
2211,
18,
1106,
548,
273,
2168,
63,
23,
8009,
31806,
12,
315,
307,
287,
... |
if (! Compilation.fewerClasses) code.popScope(); | public void compileEnd (Compilation comp) { gnu.bytecode.CodeAttr code = comp.getCode(); if (! getInlineOnly()) { if (comp.method.reachableHere() && (Compilation.defaultCallConvention < Compilation.CALL_WITH_TAILCALLS || isModuleBody() || isClassMethod() || isHandlingTailCalls())) code.emitReturn(); code.popScope(); // Undoes enterScope in allocParameters } if (! Compilation.fewerClasses) // FIXME code.popScope(); // Undoes pushScope in method.initCode. if (heapFrame != null) comp.generateConstructor((ClassType) heapFrame.getType(), this); comp.generateApplyMethods(this); } | 41089 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/41089/67cfe987d47641f90504b9a2e109491c1bc60fad/LambdaExp.java/buggy/gnu/expr/LambdaExp.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
4074,
1638,
261,
19184,
1161,
13,
225,
288,
565,
314,
13053,
18,
1637,
16651,
18,
1085,
3843,
981,
273,
1161,
18,
588,
1085,
5621,
565,
309,
16051,
7854,
1369,
3386,
10756,
137... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4074,
1638,
261,
19184,
1161,
13,
225,
288,
565,
314,
13053,
18,
1637,
16651,
18,
1085,
3843,
981,
273,
1161,
18,
588,
1085,
5621,
565,
309,
16051,
7854,
1369,
3386,
10756,
137... | |
public ComponentTreeNode (Component _component) | public ComponentTreeNode (Component _component, DefaultTreeModel _model) | public ComponentTreeNode (Component _component) { super() ; this.component = _component ; this.setUserObject(component.getDescriptor().getName()) ; DefaultMutableTreeNode localWDNode = new DefaultMutableTreeNode(Bundle.getText("MainTreeNodeWorkDefinitions")) ; DefaultMutableTreeNode localRoleNode = new DefaultMutableTreeNode(Bundle.getText("MainTreeNodeRoles")) ; DefaultMutableTreeNode localProductsNode = new DefaultMutableTreeNode(Bundle.getText("MainTreeNodeWorkProducts")) ; Collection <BreakdownElement> localNested = component.getNestedElements() ; BreakdownElement localElement ; Iterator <BreakdownElement> localIterator = localNested.iterator() ; while (localIterator.hasNext()) { localElement = localIterator.next() ; if (localElement instanceof RoleDescriptor) { localRoleNode.add(new RoleDescriptorTreeNode((RoleDescriptor) localElement)) ; } else if (localElement instanceof Activity) { localWDNode.add(new ActivityTreeNode((Activity) localElement)) ; } else if (localElement instanceof WorkProductDescriptor) { localProductsNode.add(new WorkProductDescriptorTreeNode((WorkProductDescriptor) localElement)) ; } } this.add(localWDNode) ; this.add(localRoleNode) ; this.add(localProductsNode) ; } | 12231 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12231/9f6042d11539358e55b16db9f104acb673b76978/ComponentTreeNode.java/clean/PSI/src/ui/tree/ComponentTreeNode.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
5435,
12513,
261,
1841,
389,
4652,
13,
202,
95,
202,
202,
9565,
1435,
274,
202,
202,
2211,
18,
4652,
273,
389,
4652,
274,
202,
202,
2211,
18,
542,
1299,
921,
12,
4652,
18,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
5435,
12513,
261,
1841,
389,
4652,
13,
202,
95,
202,
202,
9565,
1435,
274,
202,
202,
2211,
18,
4652,
273,
389,
4652,
274,
202,
202,
2211,
18,
542,
1299,
921,
12,
4652,
18,
5... |
Community fromCache = (Community) ourContext.fromCache( | Community owner = (Community) ourContext.fromCache( | public Community[] getCommunities() throws SQLException { List communities = new ArrayList(); // Get community table rows TableRowIterator tri = DatabaseManager.query(ourContext, "community", "SELECT community.* FROM community, community2item " + "WHERE community2item.community_id=community.community_id " + "AND community2item.item_id=" + itemRow.getIntColumn("item_id") + ";"); while (tri.hasNext()) { TableRow row = tri.next(); // First check the cache Community fromCache = (Community) ourContext.fromCache( Community.class, row.getIntColumn("community_id")); if (fromCache != null) { communities.add(fromCache); } else { communities.add(new Community(ourContext, row)); } } Community[] communityArray = new Community[communities.size()]; communityArray = (Community[]) communities.toArray(communityArray); return communityArray; } | 31338 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/31338/d0e0d90dcc6daa16279170869e7ff68817f7e88c/Item.java/buggy/dspace/src/org/dspace/content/Item.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
16854,
13352,
8526,
336,
12136,
318,
1961,
1435,
3639,
1216,
6483,
565,
288,
3639,
987,
8391,
1961,
273,
394,
2407,
5621,
3639,
368,
968,
19833,
1014,
2595,
3639,
3555,
1999,
3198,
68... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
16854,
13352,
8526,
336,
12136,
318,
1961,
1435,
3639,
1216,
6483,
565,
288,
3639,
987,
8391,
1961,
273,
394,
2407,
5621,
3639,
368,
968,
19833,
1014,
2595,
3639,
3555,
1999,
3198,
68... |
PropertyGroupSchedule physicalPGSchedule = milvan.getPhysicalPGSchedule(); PhysicalPG defaultPhysicalPG = (PhysicalPG) physicalPGSchedule.getDefault(); if (defaultPhysicalPG == null) { _gp.getLoggingService().error("AmmoTransport: milvan with a null default physicalPG"); } physicalPGSchedule = PropertyGroupFactory.newPhysicalPGSchedule(defaultPhysicalPG); milvan.setPhysicalPGSchedule(physicalPGSchedule); | protected Asset makeMilvan() { if (MILVAN_PROTOTYPE == null) { MILVAN_PROTOTYPE = _gp.getGPFactory().getPrototype(MILVAN_NSN); if (MILVAN_PROTOTYPE == null) { _gp.getLoggingService().error("AmmoTransport: Error! Unable to get prototype for" + " milvan NSN -" + MILVAN_NSN); return null; } } Container milvan = (Container)_gp.getGPFactory().createInstance(MILVAN_PROTOTYPE); // AMMO Cargo Code NewMovabilityPG movabilityPG = PropertyGroupFactory.newMovabilityPG(milvan.getMovabilityPG()); movabilityPG.setCargoCategoryCode(AMMO_CATEGORY_CODE); milvan.setMovabilityPG(movabilityPG); // Milvan Contents NewContentsPG contentsPG = PropertyGroupFactory.newContentsPG(); milvan.setContentsPG(contentsPG); // Unique Item Identification NewItemIdentificationPG itemIdentificationPG = (NewItemIdentificationPG)milvan.getItemIdentificationPG(); String itemID = makeMilvanID(); itemIdentificationPG.setItemIdentification(itemID); itemIdentificationPG.setNomenclature("Milvan"); itemIdentificationPG.setAlternateItemIdentification(itemID); milvan.setItemIdentificationPG(itemIdentificationPG); // Make unique physicalPG so weight can be modified to reflect current load PropertyGroupSchedule physicalPGSchedule = milvan.getPhysicalPGSchedule(); PhysicalPG defaultPhysicalPG = (PhysicalPG) physicalPGSchedule.getDefault(); if (defaultPhysicalPG == null) { _gp.getLoggingService().error("AmmoTransport: milvan with a null default physicalPG"); } physicalPGSchedule = PropertyGroupFactory.newPhysicalPGSchedule(defaultPhysicalPG); milvan.setPhysicalPGSchedule(physicalPGSchedule); return milvan; } | 7171 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7171/241b04a1154016c17fd81943558942fcd18fe867/AmmoTransport.java/buggy/glm/src/org/cougaar/glm/packer/AmmoTransport.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
10494,
1221,
49,
330,
90,
304,
1435,
288,
3639,
309,
261,
49,
2627,
58,
1258,
67,
3373,
56,
1974,
1738,
422,
446,
13,
288,
1377,
490,
2627,
58,
1258,
67,
3373,
56,
1974,
1738,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
10494,
1221,
49,
330,
90,
304,
1435,
288,
3639,
309,
261,
49,
2627,
58,
1258,
67,
3373,
56,
1974,
1738,
422,
446,
13,
288,
1377,
490,
2627,
58,
1258,
67,
3373,
56,
1974,
1738,
2... | |
editor = PydevPlugin.getDefault().doOpenEditor(path, true); | editor = PydevPlugin.doOpenEditor(path, true); | public void run(ItemPointer p) { IEditorPart editor = null; if (p.file instanceof IFile) editor = PydevPlugin.getDefault().doOpenEditor(((IFile)p.file).getFullPath(), true); else if (p.file instanceof IPath) { editor = PydevPlugin.getDefault().doOpenEditor((IPath)p.file, true); } else if (p.file instanceof File) { Path path = new Path(((File)p.file).getAbsolutePath()); editor = PydevPlugin.getDefault().doOpenEditor(path, true); } if (editor instanceof ITextEditor) { showInEditor((ITextEditor)editor, p.start, p.end); } } | 1319 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1319/a71e14de37a8973cd3053470e0eb1c1ab82f1d7e/PyOpenAction.java/clean/org.python.pydev/src/org/python/pydev/editor/actions/PyOpenAction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1086,
12,
1180,
4926,
293,
13,
288,
202,
202,
45,
6946,
1988,
4858,
273,
446,
31,
202,
202,
430,
261,
84,
18,
768,
1276,
467,
812,
13,
1082,
202,
9177,
273,
4707,
5206,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1086,
12,
1180,
4926,
293,
13,
288,
202,
202,
45,
6946,
1988,
4858,
273,
446,
31,
202,
202,
430,
261,
84,
18,
768,
1276,
467,
812,
13,
1082,
202,
9177,
273,
4707,
5206,... |
public void retractOK(Object oldFact, Object keys[]) throws Exception {} | public void retractOK(Object keys[]) throws Exception {} | public void retractOK(Object oldFact, Object keys[]) throws Exception {} | 45303 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45303/ae04c055714f74e3760665ded069f40e9c16ddac/RuleEngine.java/clean/javanet/gnu/cajo/utils/extra/RuleEngine.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4202,
1071,
918,
283,
1575,
3141,
12,
921,
1592,
9766,
16,
1033,
1311,
63,
5717,
540,
1216,
1185,
2618,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4202,
1071,
918,
283,
1575,
3141,
12,
921,
1592,
9766,
16,
1033,
1311,
63,
5717,
540,
1216,
1185,
2618,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
AST tmp1945_AST_in = (AST)_t; | AST tmp1949_AST_in = (AST)_t; | public final void io_phrase(AST _t) throws RecognitionException { AST io_phrase_AST_in = (_t == ASTNULL) ? null : (AST)_t; { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case OSDIR: { AST __t1516 = _t; AST tmp1940_AST_in = (AST)_t; match(_t,OSDIR); _t = _t.getFirstChild(); AST tmp1941_AST_in = (AST)_t; match(_t,LEFTPAREN); _t = _t.getNextSibling(); expression(_t); _t = _retTree; AST tmp1942_AST_in = (AST)_t; match(_t,RIGHTPAREN); _t = _t.getNextSibling(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case NOATTRLIST: { AST tmp1943_AST_in = (AST)_t; match(_t,NOATTRLIST); _t = _t.getNextSibling(); break; } case 3: { break; } default: { throw new NoViableAltException(_t); } } } _t = __t1516; _t = _t.getNextSibling(); break; } case PRINTER: { AST __t1518 = _t; AST tmp1944_AST_in = (AST)_t; match(_t,PRINTER); _t = _t.getFirstChild(); { if (_t==null) _t=ASTNULL; if (((_t.getType() >= LEXDATE && _t.getType() <= SYMMETRICENCRYPTIONALGORITHM))) { AST tmp1945_AST_in = (AST)_t; if ( _t==null ) throw new MismatchedTokenException(); _t = _t.getNextSibling(); } else if ((_t.getType()==3)) { } else { throw new NoViableAltException(_t); } } _t = __t1518; _t = _t.getNextSibling(); break; } case TERMINAL: { AST tmp1946_AST_in = (AST)_t; match(_t,TERMINAL); _t = _t.getNextSibling(); break; } case EOF: case PERIOD: case APPEND: case BINARY: case COLLATE: case CONVERT: case ECHO: case FILENAME: case KEEPMESSAGES: case LANDSCAPE: case MAP: case NOCONVERT: case NOECHO: case NOMAP: case NUMCOPIES: case PAGESIZE_KW: case PAGED: case PORTRAIT: case UNBUFFERED: case VALUE: case LOBDIR: { { _loop1521: do { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case VALUE: { valueexpression(_t); _t = _retTree; break; } case FILENAME: { AST tmp1947_AST_in = (AST)_t; match(_t,FILENAME); _t = _t.getNextSibling(); break; } default: { break _loop1521; } } } while (true); } break; } default: { throw new NoViableAltException(_t); } } } { _loop1531: do { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case APPEND: { AST tmp1948_AST_in = (AST)_t; match(_t,APPEND); _t = _t.getNextSibling(); break; } case BINARY: { AST tmp1949_AST_in = (AST)_t; match(_t,BINARY); _t = _t.getNextSibling(); break; } case COLLATE: { AST tmp1950_AST_in = (AST)_t; match(_t,COLLATE); _t = _t.getNextSibling(); break; } case CONVERT: { AST __t1523 = _t; AST tmp1951_AST_in = (AST)_t; match(_t,CONVERT); _t = _t.getFirstChild(); { _loop1526: do { if (_t==null) _t=ASTNULL; if ((_t.getType()==SOURCE||_t.getType()==TARGET)) { { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case SOURCE: { AST tmp1952_AST_in = (AST)_t; match(_t,SOURCE); _t = _t.getNextSibling(); break; } case TARGET: { AST tmp1953_AST_in = (AST)_t; match(_t,TARGET); _t = _t.getNextSibling(); break; } default: { throw new NoViableAltException(_t); } } } expression(_t); _t = _retTree; } else { break _loop1526; } } while (true); } _t = __t1523; _t = _t.getNextSibling(); break; } case LOBDIR: { AST __t1527 = _t; AST tmp1954_AST_in = (AST)_t; match(_t,LOBDIR); _t = _t.getFirstChild(); filenameorvalue(_t); _t = _retTree; _t = __t1527; _t = _t.getNextSibling(); break; } case NOCONVERT: { AST tmp1955_AST_in = (AST)_t; match(_t,NOCONVERT); _t = _t.getNextSibling(); break; } case ECHO: { AST tmp1956_AST_in = (AST)_t; match(_t,ECHO); _t = _t.getNextSibling(); break; } case NOECHO: { AST tmp1957_AST_in = (AST)_t; match(_t,NOECHO); _t = _t.getNextSibling(); break; } case KEEPMESSAGES: { AST tmp1958_AST_in = (AST)_t; match(_t,KEEPMESSAGES); _t = _t.getNextSibling(); break; } case LANDSCAPE: { AST tmp1959_AST_in = (AST)_t; match(_t,LANDSCAPE); _t = _t.getNextSibling(); break; } case MAP: { AST __t1528 = _t; AST tmp1960_AST_in = (AST)_t; match(_t,MAP); _t = _t.getFirstChild(); anyorvalue(_t); _t = _retTree; _t = __t1528; _t = _t.getNextSibling(); break; } case NOMAP: { AST tmp1961_AST_in = (AST)_t; match(_t,NOMAP); _t = _t.getNextSibling(); break; } case NUMCOPIES: { AST __t1529 = _t; AST tmp1962_AST_in = (AST)_t; match(_t,NUMCOPIES); _t = _t.getFirstChild(); anyorvalue(_t); _t = _retTree; _t = __t1529; _t = _t.getNextSibling(); break; } case PAGED: { AST tmp1963_AST_in = (AST)_t; match(_t,PAGED); _t = _t.getNextSibling(); break; } case PAGESIZE_KW: { AST __t1530 = _t; AST tmp1964_AST_in = (AST)_t; match(_t,PAGESIZE_KW); _t = _t.getFirstChild(); anyorvalue(_t); _t = _retTree; _t = __t1530; _t = _t.getNextSibling(); break; } case PORTRAIT: { AST tmp1965_AST_in = (AST)_t; match(_t,PORTRAIT); _t = _t.getNextSibling(); break; } case UNBUFFERED: { AST tmp1966_AST_in = (AST)_t; match(_t,UNBUFFERED); _t = _t.getNextSibling(); break; } default: { break _loop1531; } } } while (true); } _retTree = _t; } | 13952 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13952/daa15e07422d3491bbbb4d0060450c81983332a4/JPTreeParser.java/clean/trunk/org.prorefactor.core/src/org/prorefactor/treeparserbase/JPTreeParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
2527,
67,
9429,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
2527,
67,
9429,
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,
2527,
67,
9429,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
2527,
67,
9429,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
13,
692,
446,
294,
... |
logger.error("Exception occured during ejbStore()", re); | public void beforeCompletion(){ if(isAssociated){ try{ //DMB: You can't change the PK of the thread without caching the old pk // and restoring it after the operation // ThreadContext.getThreadContext().setPrimaryKey( myIndex.getPK() ); bean.ejbStore(); }catch(Exception re){ // TODO: Use spec compliant callback exception cleanup. javax.transaction.TransactionManager txmgr = OpenEJB.getTransactionManager(); try{ txmgr.setRollbackOnly(); }catch(javax.transaction.SystemException se){ // log the exception } } } } | 47052 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47052/d811ada81b251b56473b588e9a4b33da10a3d8b8/EntityInstanceManager.java/clean/openejb0/src/main/org/openejb/core/entity/EntityInstanceManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1194,
18,
1636,
2932,
503,
16206,
4982,
18024,
2257,
1435,
3113,
283,
1769,
1194,
18,
1636,
2932,
503,
16206,
4982,
18024,
2257,
1435,
3113,
283,
1769,
1194,
18,
1636,
2932,
503,
16206,
4982,
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,
1194,
18,
1636,
2932,
503,
16206,
4982,
18024,
2257,
1435,
3113,
283,
1769,
1194,
18,
1636,
2932,
503,
16206,
4982,
18024,
2257,
1435,
3113,
283,
1769,
1194,
18,
1636,
2932,
503,
16206,
4982,
18... | |
tabbedPane.addTab(m_resources.getString("processStatusTableTab.title"), m_resources.getImageIcon( "processStatusTableTab.image"), new JScrollPane(new Table(processStatusModel)), m_resources.getString("processStatusTableTab.tip")); | tabbedPane.addTab(m_resources.getString("processStatusTableTab.title"), m_resources.getImageIcon( "processStatusTableTab.image"), new JScrollPane(new Table(processStatusModel)), m_resources.getString("processStatusTableTab.tip")); | public ConsoleUI(Model model, ActionListener startProcessesHandler, ActionListener resetProcessesHandler, ActionListener stopProcessesHandler) throws ConsoleException { m_model = model; m_resources = new Resources(); // Create the frame to contain the a menu and the top level // pane. Need to do this before our actions are constructed as // the use the frame to create dialogs. m_frame = new JFrame(m_resources.getString("title")); m_stateIgnoringString = m_resources.getString("state.ignoring.label") + " "; m_stateWaitingString = m_resources.getString("state.waiting.label"); m_stateStoppedString = m_resources.getString("state.stopped.label"); m_stateStoppedAndIgnoringString = m_resources.getString("state.stoppedAndIgnoring.label") + " "; m_stateCapturingString = m_resources.getString("state.capturing.label") + " "; m_stateUnknownString = m_resources.getString("state.unknown.label"); m_startAction = new StartAction(); m_stopAction = new StopAction(); final LabelledGraph totalGraph = new LabelledGraph(m_resources.getString("totalGraph.title"), m_resources, Color.darkGray, m_model.getTPSExpression(), m_model.getPeakTPSExpression()); final JLabel tpsLabel = new JLabel(); tpsLabel.setForeground(Color.black); tpsLabel.setFont(s_tpsFont); m_model.addTotalSampleListener( new SampleListener() { private final String m_suffix = " " + m_resources.getString("tps.units"); public void update(TestStatistics intervalStatistics, TestStatistics cumulativeStatistics) { final NumberFormat format = m_model.getNumberFormat(); tpsLabel.setText( format.format(m_model.getTPSExpression(). getDoubleValue(intervalStatistics)) + m_suffix); totalGraph.add(intervalStatistics, cumulativeStatistics, format); } }); final JButton stateButton = new JButton(); stateButton.putClientProperty("hideActionText", Boolean.TRUE); stateButton.setAction(m_stopAction); stateButton.setBorder(BorderFactory.createEmptyBorder(1, 1, 1, 1)); m_stopAction.registerButton(stateButton); m_stateLabel.setBorder(BorderFactory.createEmptyBorder(5, 0, 0, 0)); final Box statePanel = Box.createHorizontalBox(); statePanel.add(stateButton); statePanel.add(m_stateLabel); m_samplingControlPanel = new SamplingControlPanel(m_resources); m_samplingControlPanel.add(statePanel); m_samplingControlPanel.setBorder( BorderFactory.createEmptyBorder(0, 10, 0, 10)); m_samplingControlPanel.setProperties(m_model.getProperties()); final JPanel controlAndTotalPanel = new JPanel(); controlAndTotalPanel.setLayout( new BoxLayout(controlAndTotalPanel, BoxLayout.Y_AXIS)); controlAndTotalPanel.add(m_samplingControlPanel); controlAndTotalPanel.add(Box.createRigidArea(new Dimension(0, 20))); controlAndTotalPanel.add(tpsLabel); controlAndTotalPanel.add(Box.createRigidArea(new Dimension(0, 20))); controlAndTotalPanel.add(totalGraph); // Really wanted this left alligned, but doesn't really work // with a box layout. tpsLabel.setAlignmentX(Component.CENTER_ALIGNMENT); final JPanel hackToFixLayout = new JPanel(); hackToFixLayout.add(controlAndTotalPanel); // Create the tabbed test display. final JTabbedPane tabbedPane = new JTabbedPane(); tabbedPane.addTab(m_resources.getString("graphTab.title"), m_resources.getImageIcon("graphTab.image"), new JScrollPane(new TestGraphPanel(model, m_resources)), m_resources.getString("graphTab.tip")); final CumulativeStatisticsTableModel cumulativeModel = new CumulativeStatisticsTableModel(model, m_resources, true); tabbedPane.addTab(m_resources.getString("cumulativeTableTab.title"), m_resources.getImageIcon("cumulativeTableTab.image"), new JScrollPane(new Table(cumulativeModel)), m_resources.getString("cumulativeTableTab.tip")); final SampleStatisticsTableModel sampleModel = new SampleStatisticsTableModel(model, m_resources); tabbedPane.addTab(m_resources.getString("sampleTableTab.title"), m_resources.getImageIcon("sampleTableTab.image"), new JScrollPane(new Table(sampleModel)), m_resources.getString("sampleTableTab.tip")); final ProcessStatusTableModel processStatusModel = new ProcessStatusTableModel(model, m_resources); tabbedPane.addTab(m_resources.getString("processStatusTableTab.title"), m_resources.getImageIcon( "processStatusTableTab.image"), new JScrollPane(new Table(processStatusModel)), m_resources.getString("processStatusTableTab.tip")); final JPanel contentPanel = new JPanel(new BorderLayout()); contentPanel.add(hackToFixLayout, BorderLayout.WEST); contentPanel.add(tabbedPane, BorderLayout.CENTER); final ImageIcon logoIcon = m_resources.getImageIcon("logo.image"); final MyAction[] actions = { new StartProcessesGrinderAction(startProcessesHandler), new ResetProcessesGrinderAction(resetProcessesHandler), new StopProcessesGrinderAction(stopProcessesHandler), m_startAction, m_stopAction, new SaveAction(), new OptionsAction(), new ExitAction(), new AboutAction(logoIcon), }; for (int i=0; i<actions.length; i++) { m_actionTable.put(actions[i].getKey(), actions[i]); } // Create a panel to hold the tool bar and the test pane. final JPanel toolBarPanel = new JPanel(new BorderLayout()); toolBarPanel.add(createToolBar(), BorderLayout.NORTH); toolBarPanel.add(contentPanel, BorderLayout.CENTER); m_frame.addWindowListener(new WindowCloseAdapter()); final Container topLevelPane= m_frame.getContentPane(); topLevelPane.add(createMenuBar(), BorderLayout.NORTH); topLevelPane.add(toolBarPanel, BorderLayout.CENTER); if (logoIcon != null) { final Image logoImage = logoIcon.getImage(); if (logoImage != null) { m_frame.setIconImage(logoImage); } } m_model.addModelListener(new SwingDispatchedModelListener(this)); update(); m_frame.pack(); // Arbitary sizing that looks good for Phil. m_frame.setSize(new Dimension(900, 600)); final Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); m_frame.setLocation(screenSize.width/2 - m_frame.getSize().width/2, screenSize.height/2 - m_frame.getSize().height/2); m_frame.show(); } | 7770 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7770/d5095282593ea1fa8c83b82db02d2aef4eb27594/ConsoleUI.java/clean/src/net/grinder/console/swingui/ConsoleUI.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
9657,
5370,
12,
1488,
938,
16,
1082,
377,
25962,
787,
10599,
1503,
16,
1082,
377,
25962,
2715,
10599,
1503,
16,
1082,
377,
25962,
2132,
10599,
1503,
13,
202,
15069,
9657,
503,
565,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
9657,
5370,
12,
1488,
938,
16,
1082,
377,
25962,
787,
10599,
1503,
16,
1082,
377,
25962,
2715,
10599,
1503,
16,
1082,
377,
25962,
2132,
10599,
1503,
13,
202,
15069,
9657,
503,
565,
... |
int encodedIndex = 0; int dataIndex = 0; decodedData = new byte[ numberQuadruple*3 + 1 ]; | byte arrayOctect[] = new byte[length]; System.arraycopy(base64Data,0,arrayOctect,0,length); length = removeWS(arrayOctect); if (length == 0 || length % FOURBYTE != 0) return null; | public static byte[] decode( byte[] base64Data ) { int numberQuadruple = base64Data.length/FOURBYTE; byte decodedData[] = null; byte b1=0,b2=0,b3=0, b4=0, marker0=0, marker1=0; // Throw away anything not in base64Data // Adjust size int encodedIndex = 0; int dataIndex = 0; decodedData = new byte[ numberQuadruple*3 + 1 ]; for (int i = 0; i<numberQuadruple; i++ ) { dataIndex = i*4; marker0 = base64Data[dataIndex +2]; marker1 = base64Data[dataIndex +3]; b1 = base64Alphabet[base64Data[dataIndex]]; b2 = base64Alphabet[base64Data[dataIndex +1]]; if ( marker0 != PAD && marker1 != PAD ) { //No PAD e.g 3cQl b3 = base64Alphabet[ marker0 ]; b4 = base64Alphabet[ marker1 ]; decodedData[encodedIndex] = (byte)( b1 <<2 | b2>>4 ) ; decodedData[encodedIndex+1] = (byte)(((b2 & 0xf)<<4 ) |( (b3>>2) & 0xf) ); decodedData[encodedIndex+2] = (byte)( b3<<6 | b4 ); } else if ( marker0 == PAD ) { //Two PAD e.g. 3c[Pad][Pad] decodedData[encodedIndex] = (byte)( b1 <<2 | b2>>4 ) ; decodedData[encodedIndex+1] = (byte)((b2 & 0xf)<<4 ); decodedData[encodedIndex+2] = (byte) 0; } else if ( marker1 == PAD ) { //One PAD e.g. 3cQ[Pad] b3 = base64Alphabet[ marker0 ]; decodedData[encodedIndex] = (byte)( b1 <<2 | b2>>4 ); decodedData[encodedIndex+1] = (byte)(((b2 & 0xf)<<4 ) |( (b3>>2) & 0xf) ); decodedData[encodedIndex+2] = (byte)( b3<<6); } encodedIndex += 3; } return decodedData; } | 4434 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4434/883e3640a5fdfbff1ae8c32eabc60743dc590d6c/Base64.java/clean/src/org/apache/xerces/utils/Base64.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1160,
8526,
2495,
12,
1160,
8526,
1026,
1105,
751,
262,
288,
3639,
509,
1377,
1300,
24483,
86,
2268,
565,
273,
1026,
1105,
751,
18,
2469,
19,
3313,
1099,
15377,
31,
3639,
1160,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1160,
8526,
2495,
12,
1160,
8526,
1026,
1105,
751,
262,
288,
3639,
509,
1377,
1300,
24483,
86,
2268,
565,
273,
1026,
1105,
751,
18,
2469,
19,
3313,
1099,
15377,
31,
3639,
1160,... |
clickLinkWithText( "Notifier" ); | clickLinkWithText( "Notifiers" ); | public void testNotifiers() { File pomFile = new File( getBasedir(), "src/test/resources/unit/maven-two-projects/specified-notifiers-pom.xml" ); submitAddMavenTwoProjectPage( "file:/" + pomFile.getAbsolutePath(), "", true ); assertTextPresent( "Maven Two Notifiers Project" ); clickLinkWithText( "Maven Two Notifiers Project" ); clickLinkWithText( "Notifier" ); assertTextPresent( "Project Group Notifiers" ); assertTextPresent( "mail" ); assertTextPresent( "Error" ); assertTextPresent( "Fail" ); assertTextPresent( "Success" ); assertTextNotPresent( "Warning" ); } | 48499 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48499/d39b81d173fc1976b18be0c60e921cbc4504f372/AddMavenTwoProjectTestCase.java/clean/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AddMavenTwoProjectTestCase.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
1248,
3383,
1435,
565,
288,
3639,
1387,
21400,
812,
273,
5411,
394,
1387,
12,
8297,
1214,
9334,
315,
4816,
19,
3813,
19,
4683,
19,
4873,
19,
81,
7638,
17,
15415,
17,
13... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
1248,
3383,
1435,
565,
288,
3639,
1387,
21400,
812,
273,
5411,
394,
1387,
12,
8297,
1214,
9334,
315,
4816,
19,
3813,
19,
4683,
19,
4873,
19,
81,
7638,
17,
15415,
17,
13... |
return result; | protected String computeContentDescription() { String result = super.computeContentDescription(); if (result.equals("")) { //$NON-NLS-1$ String title = getRawTitle(); String partName = computePartName(); if (!Util.equals(title, partName)) { result = title; } } return result; } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/28f4ed5e8dfb04b7279f48de337c3c6c1a8836af/ViewFactory.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ViewFactory.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
1117,
514,
3671,
1350,
3291,
1435,
288,
1082,
202,
780,
563,
273,
2240,
18,
9200,
1350,
3291,
5621,
25083,
202,
430,
261,
2088,
18,
14963,
2932,
6,
3719,
288,
4329,
3993,
17,
5106,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
1117,
514,
3671,
1350,
3291,
1435,
288,
1082,
202,
780,
563,
273,
2240,
18,
9200,
1350,
3291,
5621,
25083,
202,
430,
261,
2088,
18,
14963,
2932,
6,
3719,
288,
4329,
3993,
17,
5106,
... | |
for (Enumeration e = entitiesForModelGroup(EOModelGroup.defaultGroup()).objectEnumerator(); e.hasMoreElements();) { | for (Enumeration e = entitiesForModelGroup(ERXEOAccessUtilities.modelGroup(null)).objectEnumerator(); e.hasMoreElements();) { | public static EOEntity caseInsensitiveEntityNamed(String entityName) { EOEntity entity = null; if (entityName != null) { if (_entityNameEntityCache == null) { _entityNameEntityCache = new NSMutableDictionary(); for (Enumeration e = entitiesForModelGroup(EOModelGroup.defaultGroup()).objectEnumerator(); e.hasMoreElements();) { EOEntity anEntity = (EOEntity)e.nextElement(); _entityNameEntityCache.setObjectForKey(anEntity, anEntity.name().toLowerCase()); } } entity = (EOEntity)_entityNameEntityCache.objectForKey(entityName.toLowerCase()); } return entity; } | 50512 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50512/407575373c57c20c17c163ba1bf0a8767593a0fc/ERXUtilities.java/clean/Common/Frameworks/ERExtensions/Sources/er/extensions/ERXUtilities.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
512,
51,
1943,
648,
21931,
1943,
7604,
12,
780,
14868,
13,
288,
3639,
512,
51,
1943,
1522,
273,
446,
31,
3639,
309,
261,
1096,
461,
480,
446,
13,
288,
5411,
309,
261,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
512,
51,
1943,
648,
21931,
1943,
7604,
12,
780,
14868,
13,
288,
3639,
512,
51,
1943,
1522,
273,
446,
31,
3639,
309,
261,
1096,
461,
480,
446,
13,
288,
5411,
309,
261,
67,
1... |
sb.append("T").append(fleshOut(hours)).append(':').append(fleshOut(minutes)).append(':').append(fleshOut(seconds)); | { sb.append("T") .append(fleshOut(hours)) .append(':') .append(fleshOut(minutes)) .append(':') .append(fleshOut(seconds)); } | public String toString() { StringBuffer sb = new StringBuffer(); if (year > 0) sb.append(year); if (month > 0) sb.append('-').append(fleshOut(month)); if (day > 0) sb.append('-').append(fleshOut(day)); if (hours > 0) sb.append("T").append(fleshOut(hours)).append(':').append(fleshOut(minutes)).append(':').append(fleshOut(seconds)); return (sb.toString()); } | 25205 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/25205/85c7430ba7691f831fafc420459d280408310eb9/DCDate.java/buggy/dspace/src/org/dspace/content/DCDate.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
1762,
1435,
565,
288,
3639,
6674,
2393,
273,
394,
6674,
5621,
3639,
309,
261,
6874,
405,
374,
13,
2393,
18,
6923,
12,
6874,
1769,
3639,
309,
261,
7496,
405,
374,
13,
2393,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
1762,
1435,
565,
288,
3639,
6674,
2393,
273,
394,
6674,
5621,
3639,
309,
261,
6874,
405,
374,
13,
2393,
18,
6923,
12,
6874,
1769,
3639,
309,
261,
7496,
405,
374,
13,
2393,
18... |
else inTryBlock = false; | buildReferenceMaps(VM_Method method, int[] stackHeights, VM_ReferenceMaps referenceMaps, VM_BuildBB buildBB) { //****************************************************************// // // // These were calculated by VM_BuildBB.determineTheBasicBlocks // // // //****************************************************************// int gcPointCount = buildBB.gcPointCount; short byteToBlockMap[] = buildBB.byteToBlockMap; VM_BasicBlock basicBlocks[] = buildBB.basicBlocks; int jsrCount = buildBB.numJsrs; byte bbMaps[][]; // The starting map for each block, a block is not // processed until it has a starting map. int[] blockStkTop; // For each block, track where its current // stack top is. int currBBNum; // Block number of block currently being processed byte currBBMap[]; // The current map, used during processing thru // a block int currBBStkTop; // Stack top for the current map int currBBStkEmpty; // Level when stack is empty - value depends on // number of locals int paramCount; // Number of parameters to the method being // processed // Variables for processing JSR instructions, RET instructions and JSR // subroutines VM_PendingRETInfo bbPendingRETs[] = null; VM_PendingRETInfo currPendingRET; VM_JSRSubroutineInfo JSRSubs[] = null; // Blocks that need to be processed are put on the workStk short workStk[]; // Track whether a block has already been seen once. Any recording of maps done // within such a block will be processed as a "rerecording" instead of a new map. // boolean blockSeen[]; // blocks that represent "catch" blocks need special processing. Catch blocks // also referred to as handlers // VM_ExceptionHandlerMap exceptions; // exception table class for // method being processed int tryStartPC[]; // array of try start indices // into byte code table int tryEndPC[]; // array of try end indices // into byte code table int tryHandlerPC[]; // array of try handlers // start indices into bytecode int tryHandlerLength; // length of try handlers // array int reachableHandlerBBNums[]; // array of reachable handlers // from a given try block int reachableHandlersCount; // Number of reachable handlers boolean handlerProcessed[]; // Handler blocks are processed // after the normal flow. As // they may be nested, they // need to be handled // individually. This array is // used to track which // have been processed. boolean handlersAllDone; // Other local variables // byte bytecodes[]; // byte codes for the method int i; // index into bytecode array short brBBNum; // For processing branches, need block // number of target VM_Class declaringClass; // The declaring class of the method // Note that the mapping done here is "double mapping" of parameters. // Double mapping is when the parameters for a method are included in the map of // the method as well as in the map of the caller of the method. The original // intent was that with double mapping call sites that are tricks // (eg VM_Magic.callFunctionReturnVoid ) would at least be correctly mapped on one // of the two sides. However with more recent changes to the runtime stack frame // layout, the parameters specified on the caller side occupy different // locations than the parameters on the callee side for the baseline compiler. // Thus both need to be described. // // Initialization // // Determine what stack empty looks like paramCount = method.getParameterWords(); if (!method.isStatic()) paramCount++; currBBStkEmpty = method.getLocalWords()-1; // -1 to locate the last "local" index if (debug) VM.sysWrite("getLocalWords() : " + method.getLocalWords() + "\n"); // Get information from the method being processed bytecodes = method.getBytecodes(); declaringClass = method.getDeclaringClass(); // Set up the array of maps per block; block 0 is not used bbMaps = new byte[VM_BasicBlock.getNumberofBlocks()+1][]; blockStkTop = new int[bbMaps.length]; blockSeen = new boolean[bbMaps.length]; // Try Handler processing initialization exceptions = method.getExceptionHandlerMap(); if (exceptions != null) { tryStartPC = exceptions.getStartPC(); tryEndPC = exceptions.getEndPC(); tryHandlerPC = exceptions.getHandlerPC(); tryHandlerLength = tryHandlerPC.length; reachableHandlerBBNums = new int[tryStartPC.length]; handlerProcessed = new boolean[tryStartPC.length]; if (jsrCount > 0) { JSRSubs = new VM_JSRSubroutineInfo[jsrCount]; JSRSubNext = 0; bbPendingRETs = new VM_PendingRETInfo[bbMaps.length]; } handlersAllDone = (tryHandlerLength == 0); // write poison values to help distinguish different errors for(int ii = 0; ii < reachableHandlerBBNums.length; ii++) reachableHandlerBBNums[ii] = -1; } else { tryHandlerLength = 0; handlersAllDone = true; tryStartPC = null; tryEndPC = null; tryHandlerPC = null; reachableHandlerBBNums = null; handlerProcessed = null; } reachableHandlersCount = 0; // Start a new set of maps with the reference Map class. // 3rd argument is parameter count included with the maps referenceMaps.startNewMaps(gcPointCount, jsrCount, paramCount); if (VM.ReferenceMapsStatistics) referenceMaps.bytecount = referenceMaps.bytecount + bytecodes.length; // Set up the Work stack workStk = new short[10+tryHandlerLength]; // Start by putting the first block on the work stack workStkTop = 0; workStk[workStkTop] = byteToBlockMap[0]; currBBMap = new byte[method.getOperandWords() + currBBStkEmpty+1]; // // Need to include the parameters of this method in the map // VM_Type[] parameterTypes = method.getParameterTypes(); int paramStart; if (!method.isStatic()) { currBBMap[0] = REFERENCE; // implicit "this" object paramStart = 1; } else paramStart = 0; int n = parameterTypes.length; for (i = 0; i < n; i++, paramStart++) { VM_Type parameterType = parameterTypes[i]; currBBMap[paramStart] = parameterType.isReferenceType() ? REFERENCE : NON_REFERENCE; if (parameterType.getStackWords() == DOUBLEWORD) paramStart++; } // The map for the start of the first block, is stack empty, with none // of the locals set yet // currBBStkTop = currBBStkEmpty; bbMaps[byteToBlockMap[0]] = currBBMap; blockStkTop[byteToBlockMap[0]] = currBBStkTop; // For all methods, record a map at the start of the method for the corresponding // conditional call to "yield". referenceMaps.recordStkMap(0, currBBMap, currBBStkTop, false); currBBMap = new byte[currBBMap.length]; //---------------------------------------------------------- // // Keep looping until the Work Stack is empty // //---------------------------------------------------------- while (workStkTop > -1) { // Get the next item off the work stack currBBNum = workStk[workStkTop]; workStkTop--; //-#if RVM_FOR_IA32 // SJF: The following mysterious code magically works around a bug // in the Intel JDK during boot image writing of a // FastBaseBaseSemispace image. Without this dumb print, the JDK // slows to almost a stop. For unknown reasons, the following // statement changes the JDK behavior such that everything works OK. // Reference: bug 2368 if (VM.writingBootImage) { if (method.toString().indexOf("VM_Compiler") > -1) { gcCountDown--; if (gcCountDown <= 0) { System.gc(); gcCountDown = 100; } } } //-#endif boolean inJSRSub = false; if (bbMaps[currBBNum] != null) { currBBStkTop = blockStkTop[currBBNum]; for (int k = 0; k <= currBBStkTop; k++) currBBMap[k] = bbMaps[currBBNum][k]; if (jsrCount > 0 && basicBlocks[currBBNum].isInJSR()) { inJSRSub = true; } } else { VM.sysWrite("VM_BuildReferenceMaps, error: found a block on work stack with"); VM.sysWrite(" no starting map. The block number is "); VM.sysWrite(basicBlocks[currBBNum].blockNumber); VM.sysWrite("\n"); VM.sysFail("VM_BuildReferenceMaps work stack failure"); } int start = basicBlocks[currBBNum].getStart(); int end = basicBlocks[currBBNum].getEnd(); //-#if RVM_FOR_IA32 // SJF: The following mysterious code magically works around a bug // in the Intel JDK during boot image writing of a // FastBaseBaseSemispace image. Without this dumb print, the JDK // slows to almost a stop. For unknown reasons, the following // statement changes the JDK behavior such that everything works OK. // Reference: bug 2368 if (VM.writingBootImage) { if (method.toString().indexOf("VM_Compiler") > -1) { gcCountDown--; if (gcCountDown <= 0) { System.gc(); gcCountDown = 100; } } } //-#endif if (jsrCount > 0 && inJSRSub ) { currPendingRET = bbPendingRETs[currBBNum]; if (basicBlocks[currBBNum].isTryStart()) { for (int k = 0; k < tryHandlerLength; k++) { if (tryStartPC[k] == start) { int handlerBBNum = byteToBlockMap[tryHandlerPC[k]]; bbPendingRETs[handlerBBNum] = new VM_PendingRETInfo(currPendingRET); } } } } else currPendingRET = null; boolean inTryBlock; if (basicBlocks[currBBNum].isTryBlock()) { inTryBlock = true; reachableHandlersCount = 0; for (i=0; i<tryHandlerLength; i++) if (tryStartPC[i] <= start && tryEndPC[i] >= end) { reachableHandlerBBNums[reachableHandlersCount] = byteToBlockMap[tryHandlerPC[i]]; reachableHandlersCount++; // if (tryStartPC[i] == start) { int handlerBBNum = byteToBlockMap[tryHandlerPC[i]]; if (bbMaps[handlerBBNum] == null) { bbMaps[handlerBBNum] = new byte[currBBMap.length]; for (int k=0; k<=currBBStkEmpty; k++) bbMaps[handlerBBNum][k] = currBBMap[k]; bbMaps[handlerBBNum][currBBStkEmpty+1] = REFERENCE; blockStkTop[handlerBBNum] = currBBStkEmpty+1; } // } } } else inTryBlock = false; boolean processNextBlock = true; for (i=start; i<= end; ) { // increment is at bottom of loop, using opLength int opcode = ((int)bytecodes[i]) & 0x000000FF; int opLength = JBC_length[opcode]; if (stackHeights != null) { stackHeights[i] = currBBStkTop; } if (debug) { VM.sysWrite("opcode : " + opcode + "\n"); VM.sysWrite("current map: "); for (int j=0; j<=currBBStkTop; j++) { VM.sysWrite(currBBMap[j]); } VM.sysWrite("\n"); } switch (opcode) { case JBC_nop : { break; } case JBC_aconst_null : { currBBStkTop++; currBBMap[currBBStkTop] = REFERENCE; break; } case JBC_aload_0 : { int localNumber = 0; currBBStkTop++; currBBMap[currBBStkTop] = currBBMap[localNumber]; break; } case JBC_aload_1 : { int localNumber = 1; currBBStkTop++; currBBMap[currBBStkTop] = currBBMap[localNumber]; break; } case JBC_aload_2 : { int localNumber = 2; currBBStkTop++; currBBMap[currBBStkTop] = currBBMap[localNumber]; break; } case JBC_aload_3 : { int localNumber = 3; currBBStkTop++; currBBMap[currBBStkTop] = currBBMap[localNumber]; break; } case JBC_aload : { int localNumber = ((int)bytecodes[i+1]) & 0x000000FF; currBBStkTop++; currBBMap[currBBStkTop] = currBBMap[localNumber]; break; } case JBC_iconst_m1 : case JBC_iconst_0 : case JBC_iconst_1 : case JBC_iconst_2 : case JBC_iconst_3 : case JBC_iconst_4 : case JBC_iconst_5 : case JBC_fconst_0 : case JBC_fconst_1 : case JBC_fconst_2 : case JBC_iload_0 : case JBC_iload_1 : case JBC_iload_2 : case JBC_iload_3 : case JBC_fload_0 : case JBC_fload_1 : case JBC_fload_2 : case JBC_fload_3 : case JBC_bipush : case JBC_iload : case JBC_fload : case JBC_sipush : case JBC_i2l : case JBC_i2d : case JBC_f2l : case JBC_f2d : { currBBStkTop++; currBBMap[currBBStkTop] = NON_REFERENCE; break; } case JBC_lconst_0 : case JBC_lconst_1 : case JBC_dconst_0 : case JBC_dconst_1 : case JBC_lload_0 : case JBC_lload_1 : case JBC_lload_2 : case JBC_lload_3 : case JBC_dload_0 : case JBC_dload_1 : case JBC_dload_2 : case JBC_dload_3 : case JBC_ldc2_w : case JBC_lload : case JBC_dload : { currBBStkTop++; currBBMap[currBBStkTop] = NON_REFERENCE; currBBStkTop++; currBBMap[currBBStkTop] = NON_REFERENCE; break; } case JBC_ldc : { // Get cp index - unsigned 8-bit. int cpindex = ((int)bytecodes[i+1]) & 0xFF; currBBStkTop++; if (declaringClass.getLiteralDescription(cpindex) == VM_Statics.STRING_LITERAL) currBBMap[currBBStkTop] = REFERENCE; else currBBMap[currBBStkTop] = NON_REFERENCE; break; } case JBC_ldc_w : { // Get cpindex - unsigned 16-bit. int cpindex = (((int)bytecodes[i+1]) << 8 | (((int)bytecodes[i+2]) & 0xFF)) & 0xFFFF; currBBStkTop++; if (declaringClass.getLiteralDescription(cpindex) == VM_Statics.STRING_LITERAL) currBBMap[currBBStkTop] = REFERENCE; else currBBMap[currBBStkTop] = NON_REFERENCE; break; } case JBC_istore : case JBC_fstore : { int index = ((int)bytecodes[i+1]) & 0xFF; // Get local index - unsigned byte. index = index; if (!inJSRSub) currBBMap[index] = NON_REFERENCE; else currBBMap[index] = SET_TO_NONREFERENCE; if (inTryBlock) setHandlersMapsNonRef(index,ONEWORD,reachableHandlerBBNums, reachableHandlersCount, inJSRSub, bbMaps); currBBStkTop--; break; } case JBC_lstore : case JBC_dstore : { int index = ((int)bytecodes[i+1]) & 0xFF; // Get local index - unsigned byte. index = index; if (!inJSRSub) { currBBMap[index] = NON_REFERENCE; currBBMap[index+1] = NON_REFERENCE; } else { currBBMap[index] = SET_TO_NONREFERENCE; currBBMap[index+1] = SET_TO_NONREFERENCE; } if (inTryBlock) setHandlersMapsNonRef(index, DOUBLEWORD, reachableHandlerBBNums, reachableHandlersCount, inJSRSub, bbMaps); currBBStkTop = currBBStkTop - 2; break; } case JBC_astore : { int index = ((int)bytecodes[i+1]) & 0xFF; // Get local index - unsigned byte. currBBMap[index] = currBBMap[currBBStkTop];// may be a reference or a return // address if (inJSRSub) { if (currBBMap[index] == RETURN_ADDRESS) currPendingRET.updateReturnAddressLocation(index); if (inTryBlock) { if (currBBMap[index] == REFERENCE) setHandlersMapsRef(index, reachableHandlerBBNums, reachableHandlersCount, bbMaps); else setHandlersMapsReturnAddress(index, reachableHandlerBBNums, reachableHandlersCount, bbMaps); } } currBBStkTop--; break; } case JBC_istore_0 : case JBC_fstore_0 : { if (!inJSRSub) currBBMap[0] = NON_REFERENCE; else currBBMap[0] = SET_TO_NONREFERENCE; if (inTryBlock) setHandlersMapsNonRef(0,ONEWORD,reachableHandlerBBNums, reachableHandlersCount, inJSRSub, bbMaps); currBBStkTop--; break; } case JBC_istore_1 : case JBC_fstore_1 : { if (!inJSRSub) currBBMap[1] = NON_REFERENCE; else currBBMap[1] = SET_TO_NONREFERENCE; if (inTryBlock) setHandlersMapsNonRef(1,ONEWORD,reachableHandlerBBNums, reachableHandlersCount,inJSRSub, bbMaps); currBBStkTop--; break; } case JBC_istore_2 : case JBC_fstore_2 : { if (!inJSRSub) currBBMap[2] = NON_REFERENCE; else currBBMap[2] = SET_TO_NONREFERENCE; if (inTryBlock) setHandlersMapsNonRef(2,ONEWORD,reachableHandlerBBNums, reachableHandlersCount, inJSRSub, bbMaps); currBBStkTop--; break; } case JBC_istore_3 : case JBC_fstore_3 : { if (!inJSRSub) currBBMap[3] = NON_REFERENCE; else currBBMap[3] = SET_TO_NONREFERENCE; if (inTryBlock) setHandlersMapsNonRef(3,ONEWORD,reachableHandlerBBNums, reachableHandlersCount, inJSRSub, bbMaps); currBBStkTop--; break; } case JBC_lstore_0 : case JBC_dstore_0 : { if (inJSRSub) { currBBMap[0] = NON_REFERENCE; currBBMap[1] = NON_REFERENCE; } else { currBBMap[0] = SET_TO_NONREFERENCE; currBBMap[1] = SET_TO_NONREFERENCE; } if (inTryBlock) setHandlersMapsNonRef(0,DOUBLEWORD,reachableHandlerBBNums, reachableHandlersCount, inJSRSub, bbMaps); currBBStkTop = currBBStkTop - 2; break; } case JBC_lstore_1 : case JBC_dstore_1 : { if (!inJSRSub) { currBBMap[1]=NON_REFERENCE; currBBMap[2]=NON_REFERENCE; } else { currBBMap[1]=SET_TO_NONREFERENCE; currBBMap[2]=SET_TO_NONREFERENCE; } if (inTryBlock) setHandlersMapsNonRef(1, DOUBLEWORD, reachableHandlerBBNums, reachableHandlersCount, inJSRSub, bbMaps); currBBStkTop = currBBStkTop - 2; break; } case JBC_lstore_2 : case JBC_dstore_2 : { if (!inJSRSub) { currBBMap[2]=NON_REFERENCE; currBBMap[3]=NON_REFERENCE; } else { currBBMap[2]=SET_TO_NONREFERENCE; currBBMap[3]=SET_TO_NONREFERENCE; } if (inTryBlock) setHandlersMapsNonRef(2,DOUBLEWORD,reachableHandlerBBNums, reachableHandlersCount, inJSRSub, bbMaps); currBBStkTop = currBBStkTop - 2; break; } case JBC_lstore_3 : case JBC_dstore_3 : { if (!inJSRSub) { currBBMap[3]=NON_REFERENCE; currBBMap[4]=NON_REFERENCE; } else { currBBMap[3]=SET_TO_NONREFERENCE; currBBMap[4]=SET_TO_NONREFERENCE; } if (inTryBlock) setHandlersMapsNonRef(3, DOUBLEWORD, reachableHandlerBBNums, reachableHandlersCount,inJSRSub, bbMaps); currBBStkTop = currBBStkTop - 2; break; } case JBC_astore_0 : { currBBMap[0]=currBBMap[currBBStkTop]; if (inJSRSub) { if (currBBMap[0] == RETURN_ADDRESS) currPendingRET.updateReturnAddressLocation(0); if (inTryBlock) { if (currBBMap[0] == REFERENCE) setHandlersMapsRef(0, reachableHandlerBBNums, reachableHandlersCount, bbMaps); else setHandlersMapsReturnAddress(0, reachableHandlerBBNums, reachableHandlersCount, bbMaps); } } currBBStkTop--; break; } case JBC_astore_1 : { currBBMap[1]=currBBMap[currBBStkTop]; if (inJSRSub) { if (currBBMap[1] == RETURN_ADDRESS) currPendingRET.updateReturnAddressLocation(1); if (inTryBlock) { if (currBBMap[1] == REFERENCE) setHandlersMapsRef(1, reachableHandlerBBNums, reachableHandlersCount, bbMaps); else setHandlersMapsReturnAddress(1, reachableHandlerBBNums, reachableHandlersCount, bbMaps); } } currBBStkTop--; break; } case JBC_astore_2 : { currBBMap[2]=currBBMap[currBBStkTop]; if (inJSRSub) { if (currBBMap[2] == RETURN_ADDRESS) currPendingRET.updateReturnAddressLocation(2); if (inTryBlock) { if (currBBMap[2] == REFERENCE) setHandlersMapsRef(2, reachableHandlerBBNums, reachableHandlersCount, bbMaps); else setHandlersMapsReturnAddress(2, reachableHandlerBBNums, reachableHandlersCount, bbMaps); } } currBBStkTop--; break; } case JBC_astore_3 : { currBBMap[3]=currBBMap[currBBStkTop]; if (inJSRSub) { if (currBBMap[3] == RETURN_ADDRESS) currPendingRET.updateReturnAddressLocation(3); if (inTryBlock) { if (currBBMap[3] == REFERENCE) setHandlersMapsRef(3, reachableHandlerBBNums, reachableHandlersCount, bbMaps); else setHandlersMapsReturnAddress(3, reachableHandlerBBNums, reachableHandlersCount, bbMaps); } } currBBStkTop--; break; } case JBC_dup : { currBBMap[currBBStkTop+1] = currBBMap[currBBStkTop]; currBBStkTop++; break; } case JBC_dup2 : { currBBMap[currBBStkTop+1] = currBBMap[currBBStkTop-1]; currBBMap[currBBStkTop+2] = currBBMap[currBBStkTop]; currBBStkTop = currBBStkTop + 2; break; } case JBC_dup_x1 : { currBBMap[currBBStkTop+1] = currBBMap[currBBStkTop]; currBBMap[currBBStkTop] = currBBMap[currBBStkTop-1]; currBBMap[currBBStkTop-1] = currBBMap[currBBStkTop+1]; currBBStkTop++; break; } case JBC_dup2_x1 : { currBBMap[currBBStkTop+2] = currBBMap[currBBStkTop]; currBBMap[currBBStkTop+1] = currBBMap[currBBStkTop-1]; currBBMap[currBBStkTop] = currBBMap[currBBStkTop-2]; currBBMap[currBBStkTop-1] = currBBMap[currBBStkTop+2]; currBBMap[currBBStkTop-2] = currBBMap[currBBStkTop+1]; currBBStkTop = currBBStkTop + 2; break; } case JBC_dup_x2 : { currBBMap[currBBStkTop+1] = currBBMap[currBBStkTop]; currBBMap[currBBStkTop] = currBBMap[currBBStkTop-1]; currBBMap[currBBStkTop-1] = currBBMap[currBBStkTop-2]; currBBMap[currBBStkTop-2] = currBBMap[currBBStkTop+1]; currBBStkTop++; break; } case JBC_dup2_x2 : { currBBMap[currBBStkTop+2] = currBBMap[currBBStkTop]; currBBMap[currBBStkTop+1] = currBBMap[currBBStkTop-1]; currBBMap[currBBStkTop] = currBBMap[currBBStkTop-2]; currBBMap[currBBStkTop-1] = currBBMap[currBBStkTop-3]; currBBMap[currBBStkTop-2] = currBBMap[currBBStkTop+2]; currBBMap[currBBStkTop-3] = currBBMap[currBBStkTop+1]; currBBStkTop = currBBStkTop + 2; break; } case JBC_swap : { byte temp; temp = currBBMap[currBBStkTop]; currBBMap[currBBStkTop] = currBBMap[currBBStkTop-1]; currBBMap[currBBStkTop-1] = temp; break; } case JBC_pop : case JBC_iadd : case JBC_fadd : case JBC_isub : case JBC_fsub : case JBC_imul : case JBC_fmul : case JBC_fdiv : case JBC_frem : case JBC_ishl : case JBC_ishr : case JBC_iushr : case JBC_lshl : // long shifts that int shift value case JBC_lshr : case JBC_lushr : case JBC_iand : case JBC_ior : case JBC_ixor : case JBC_l2i : case JBC_l2f : case JBC_d2i : case JBC_d2f : case JBC_fcmpl : case JBC_fcmpg : { currBBStkTop--; break; } case JBC_irem : case JBC_idiv : { currBBStkTop = currBBStkTop-2; // record map after 2 integers popped off stack if (!inJSRSub) referenceMaps.recordStkMap(i, currBBMap, currBBStkTop, blockSeen[currBBNum]); else referenceMaps.recordJSRSubroutineMap(i, currBBMap, currBBStkTop, currPendingRET.returnAddressLocation, blockSeen[currBBNum]); currBBStkTop++; break; } case JBC_ladd : case JBC_dadd : case JBC_lsub : case JBC_dsub : case JBC_lmul : case JBC_dmul : case JBC_ddiv : case JBC_drem : case JBC_land : case JBC_lor : case JBC_lxor : case JBC_pop2 : { currBBStkTop = currBBStkTop - 2; break; } case JBC_lrem : case JBC_ldiv : { currBBStkTop = currBBStkTop - 4; // record map after 2 longs popped off stack if (!inJSRSub) referenceMaps.recordStkMap(i, currBBMap, currBBStkTop, blockSeen[currBBNum]); else referenceMaps.recordJSRSubroutineMap(i, currBBMap, currBBStkTop, currPendingRET.returnAddressLocation, blockSeen[currBBNum]); currBBStkTop = currBBStkTop + 2; break; } case JBC_ineg : case JBC_lneg : case JBC_fneg : case JBC_dneg : case JBC_iinc : case JBC_i2f : case JBC_l2d : case JBC_f2i : case JBC_d2l : case JBC_int2byte : case JBC_int2char : case JBC_int2short : { break; } case JBC_lcmp : case JBC_dcmpl : case JBC_dcmpg : { currBBStkTop = currBBStkTop - 3; break; } case JBC_ifeq : case JBC_ifne : case JBC_iflt : case JBC_ifge : case JBC_ifgt : case JBC_ifle : { short offset = (short)(((int)bytecodes[i+1]) << 8 | (((int)bytecodes[i+2]) & 0xFF)); if(offset< 0){ // potential backward branch-generate reference map // Register the reference map if (!inJSRSub) referenceMaps.recordStkMap(i, currBBMap, currBBStkTop, blockSeen[currBBNum]); else // in a jsr subroutine referenceMaps.recordJSRSubroutineMap(i, currBBMap, currBBStkTop, currPendingRET.returnAddressLocation, blockSeen[currBBNum]); } // process the basic block logic currBBStkTop--; if (offset < 0) { short fallThruBBNum = byteToBlockMap[i+3]; workStk = processBranchBB(fallThruBBNum, currBBStkTop, currBBMap, currBBStkEmpty, inJSRSub, bbMaps, blockStkTop, currPendingRET, bbPendingRETs, workStk); processNextBlock = false; } brBBNum = byteToBlockMap[i+offset]; workStk = processBranchBB(brBBNum, currBBStkTop, currBBMap, currBBStkEmpty, inJSRSub, bbMaps, blockStkTop, currPendingRET, bbPendingRETs, workStk); break; } case JBC_if_icmpeq : case JBC_if_icmpne : case JBC_if_icmplt : case JBC_if_icmpge : case JBC_if_icmpgt : case JBC_if_icmple : case JBC_if_acmpeq : case JBC_if_acmpne : { short offset = (short)(((int)bytecodes[i+1]) << 8 | (((int)bytecodes[i+2]) & 0xFF)); if(offset< 0){ // possible backward branch-generate reference map // Register the reference map if (!inJSRSub) referenceMaps.recordStkMap(i, currBBMap, currBBStkTop, blockSeen[currBBNum]); else // in a jsr subroutine referenceMaps.recordJSRSubroutineMap(i, currBBMap, currBBStkTop, currPendingRET.returnAddressLocation, blockSeen[currBBNum]); } //process the basic blocks currBBStkTop = currBBStkTop - 2; if (offset < 0) { short fallThruBBNum = byteToBlockMap[i+3]; workStk = processBranchBB(fallThruBBNum, currBBStkTop, currBBMap, currBBStkEmpty, inJSRSub, bbMaps, blockStkTop, currPendingRET, bbPendingRETs, workStk); processNextBlock = false; } brBBNum = byteToBlockMap[i+offset]; workStk = processBranchBB(brBBNum, currBBStkTop, currBBMap, currBBStkEmpty, inJSRSub, bbMaps, blockStkTop, currPendingRET, bbPendingRETs, workStk); break; } case JBC_ifnull : case JBC_ifnonnull : { short offset = (short)(((int)bytecodes[i+1]) << 8 | (((int)bytecodes[i+2]) & 0xFF)); if(offset< 0){ // possible backward branch-generate reference map // Register the reference map if (!inJSRSub) referenceMaps.recordStkMap(i, currBBMap, currBBStkTop, blockSeen[currBBNum]); else // in a jsr subroutine referenceMaps.recordJSRSubroutineMap(i, currBBMap, currBBStkTop, currPendingRET.returnAddressLocation, blockSeen[currBBNum]); } //process the basic block logic currBBStkTop--; if (offset < 0) { short fallThruBBNum = byteToBlockMap[i+3]; workStk = processBranchBB(fallThruBBNum, currBBStkTop, currBBMap, currBBStkEmpty, inJSRSub, bbMaps, blockStkTop, currPendingRET, bbPendingRETs, workStk); processNextBlock = false; } brBBNum = byteToBlockMap[i+offset]; workStk = processBranchBB(brBBNum, currBBStkTop, currBBMap, currBBStkEmpty, inJSRSub, bbMaps, blockStkTop, currPendingRET, bbPendingRETs, workStk); break; } case JBC_goto : { // The offset is a 16-bit value, but we sign extend to an int, and // it still works. int offset = (int)((short)(((int)bytecodes[i+1]) << 8 | (((int)bytecodes[i+2]) & 0xFF))); if(offset< 0){ // backward branch-generate reference map // Register the reference map if (!inJSRSub) referenceMaps.recordStkMap(i, currBBMap, currBBStkTop, blockSeen[currBBNum]); else // in a jsr subroutine referenceMaps.recordJSRSubroutineMap(i, currBBMap, currBBStkTop, currPendingRET.returnAddressLocation, blockSeen[currBBNum]); } // process the basic block logic brBBNum = byteToBlockMap[i+offset]; workStk = processBranchBB(brBBNum, currBBStkTop, currBBMap, currBBStkEmpty, inJSRSub, bbMaps, blockStkTop, currPendingRET, bbPendingRETs, workStk); processNextBlock = false; break; } case JBC_goto_w : { int offset = getIntOffset(i, bytecodes); if(offset< 0){ // backward branch-generate reference map // Register the reference map if (!inJSRSub) referenceMaps.recordStkMap(i, currBBMap, currBBStkTop, blockSeen[currBBNum]); else // in a jsr subroutine referenceMaps.recordJSRSubroutineMap(i, currBBMap, currBBStkTop, currPendingRET.returnAddressLocation, blockSeen[currBBNum]); } //process basic block structures brBBNum = byteToBlockMap[i+offset]; workStk = processBranchBB(brBBNum, currBBStkTop, currBBMap, currBBStkEmpty, inJSRSub, bbMaps, blockStkTop, currPendingRET, bbPendingRETs, workStk); processNextBlock = false; break; } case JBC_tableswitch : { int j = i; // save initial value opLength = 0; currBBStkTop--; i = i + 1; // space past op code i = (((i + 3)/4)*4); // align to next word boundary // get default offset and generate basic block at default offset int def = getIntOffset(i-1,bytecodes); // getIntOffset expects byte before // offset workStk = processBranchBB(byteToBlockMap[j+def], currBBStkTop, currBBMap, currBBStkEmpty, inJSRSub, bbMaps, blockStkTop, currPendingRET, bbPendingRETs, workStk); // get low offset i = i + 4; // go past default br offset int low = getIntOffset(i-1,bytecodes); i = i + 4; // space past low offset // get high offset int high = getIntOffset(i-1,bytecodes); i = i + 4; // go past high offset // generate labels for offsets for (int k = 0; k < (high - low +1); k++) { int l = i + k*4; // point to next offset // get next offset int offset = getIntOffset(l-1,bytecodes); workStk = processBranchBB(byteToBlockMap[j+offset], currBBStkTop, currBBMap, currBBStkEmpty, inJSRSub, bbMaps, blockStkTop, currPendingRET, bbPendingRETs, workStk); } processNextBlock = false; i = i + (high - low +1) * 4; // space past offsets break; } case JBC_lookupswitch : { int j = i; // save initial value for labels opLength = 0; currBBStkTop--; i = i +1; // space past op code i = (((i + 3)/4)*4); // align to next word boundary // get default offset and // process branch to default branch point int def = getIntOffset(i-1,bytecodes); workStk = processBranchBB(byteToBlockMap[j+def], currBBStkTop, currBBMap, currBBStkEmpty, inJSRSub, bbMaps, blockStkTop, currPendingRET, bbPendingRETs, workStk); i = i + 4; // go past default offset // get number of pairs int npairs = getIntOffset(i-1,bytecodes); i = i + 4; // space past number of pairs // generate label for each offset in table for (int k = 0; k < npairs; k++) { int l = i + k*8 + 4; // point to next offset // get next offset int offset = getIntOffset(l-1,bytecodes); workStk = processBranchBB(byteToBlockMap[j+offset], currBBStkTop, currBBMap, currBBStkEmpty, inJSRSub, bbMaps, blockStkTop, currPendingRET, bbPendingRETs, workStk); } processNextBlock = false; i = i + (npairs) *8; // space past match-offset pairs break; } case JBC_jsr : { processNextBlock = false; short offset = (short)(((int)bytecodes[i+1]) << 8 | (((int)bytecodes[i+2]) & 0xFF)); if (!inJSRSub) referenceMaps.recordStkMap(i, currBBMap, currBBStkEmpty, blockSeen[currBBNum]); else referenceMaps.recordJSRSubroutineMap(i, currBBMap, currBBStkEmpty, currPendingRET.returnAddressLocation, blockSeen[currBBNum]); currBBStkTop++; currBBMap[currBBStkTop] = RETURN_ADDRESS; workStk = processJSR(byteToBlockMap[i], i+offset, byteToBlockMap[i+offset], byteToBlockMap[i+3], bbMaps, currBBStkTop, currBBMap, currBBStkEmpty, blockStkTop, bbPendingRETs, currPendingRET, JSRSubs, workStk); break; } case JBC_jsr_w : { processNextBlock = false; if (!inJSRSub) referenceMaps.recordStkMap(i, currBBMap, currBBStkEmpty, blockSeen[currBBNum]); else referenceMaps.recordJSRSubroutineMap(i, currBBMap, currBBStkEmpty, currPendingRET.returnAddressLocation, blockSeen[currBBNum]); currBBStkTop++; currBBMap[currBBStkTop] = RETURN_ADDRESS; int offset = getIntOffset(i, bytecodes); workStk = processJSR(byteToBlockMap[i], i+offset, byteToBlockMap[i+offset], byteToBlockMap[i+5], bbMaps, currBBStkTop, currBBMap, currBBStkEmpty, blockStkTop, bbPendingRETs, currPendingRET, JSRSubs, workStk); break; } case JBC_ret : { // Index of local variable (unsigned byte) int index = ((int)bytecodes[i+1]) & 0xFF; // Can not be used again as a return addr. // currBBMap[index] = SET_TO_NONREFERENCE; processNextBlock = false; int subStart = currPendingRET.JSRSubStartByteIndex; int k; for (k=0; k<JSRSubNext; k++) { if (JSRSubs[k].subroutineByteCodeStart == subStart) { JSRSubs[k].newEndMaps(currBBMap, currBBStkTop); break; } } boolean JSRisinJSRSub = bbPendingRETs[currPendingRET.JSRBBNum] != null; workStk = computeJSRNextMaps(currPendingRET.JSRNextBBNum, currBBMap.length, k, JSRisinJSRSub, bbMaps, blockStkTop, JSRSubs, currBBStkEmpty, workStk); if (JSRisinJSRSub && bbPendingRETs[currPendingRET.JSRNextBBNum] == null) bbPendingRETs[currPendingRET.JSRNextBBNum] = new VM_PendingRETInfo(bbPendingRETs[currPendingRET.JSRBBNum]); break; } case JBC_invokevirtual : case JBC_invokespecial : case JBC_invokeinterface : { int index = (((int)bytecodes[i+1]) << 8 | (((int)bytecodes[i+2]) & 0xFF)) & 0xFFFF; VM_Method calledMethod = declaringClass.getMethodRef(index); currBBStkTop = processInvoke(calledMethod, i, currBBStkTop, currBBMap, false, inJSRSub, referenceMaps, currPendingRET, blockSeen[currBBNum], currBBStkEmpty); break; } case JBC_invokestatic : { int index = (((int)bytecodes[i+1]) << 8 | (((int)bytecodes[i+2]) & 0xFF)) & 0xFFFF; VM_Method calledMethod = declaringClass.getMethodRef(index); currBBStkTop = processInvoke(calledMethod, i, currBBStkTop, currBBMap, true, inJSRSub, referenceMaps, currPendingRET, blockSeen[currBBNum], currBBStkEmpty); break; } case JBC_ireturn : case JBC_lreturn : case JBC_freturn : case JBC_dreturn : case JBC_areturn : case JBC_return :{ if (VM.UseEpilogueYieldPoints || method.isSynchronized()) referenceMaps.recordStkMap(i, currBBMap, currBBStkTop, blockSeen[currBBNum]); processNextBlock = false; break; } case JBC_getstatic : { int index = (((int)bytecodes[i+1]) << 8 | (((int)bytecodes[i+2]) & 0xFF)) & 0xFFFF; // Register the reference map // note: getstatic could result in a call to the classloader if (!inJSRSub) referenceMaps.recordStkMap(i, currBBMap, currBBStkTop, blockSeen[currBBNum]); else referenceMaps.recordJSRSubroutineMap(i, currBBMap, currBBStkTop, currPendingRET.returnAddressLocation, blockSeen[currBBNum]); VM_Type fieldType = declaringClass.getFieldRef(index).getType(); currBBMap[++currBBStkTop] = fieldType.isReferenceType() ? REFERENCE : NON_REFERENCE; if (fieldType.getStackWords() == 2) currBBMap[++currBBStkTop] = NON_REFERENCE; break; } case JBC_putstatic : { int index = (((int)bytecodes[i+1]) << 8 | (((int)bytecodes[i+2]) & 0xFF)) & 0xFFFF; // Register the reference map // note: putstatic could result in a call to the classloader if (!inJSRSub) referenceMaps.recordStkMap(i, currBBMap, currBBStkTop, blockSeen[currBBNum]); else referenceMaps.recordJSRSubroutineMap(i, currBBMap, currBBStkTop, currPendingRET.returnAddressLocation, blockSeen[currBBNum]); VM_Type fieldType = declaringClass.getFieldRef(index).getType(); currBBStkTop--; if (fieldType.getStackWords() == 2) currBBStkTop--; break; } case JBC_getfield : { int index = (((int)bytecodes[i+1]) << 8 | (((int)bytecodes[i+2]) & 0xFF)) & 0xFFFF; VM_Type fieldType = declaringClass.getFieldRef(index).getType(); // Register the reference map, minus the object pointer on the stack // note: getfield could result in a call to the classloader if (!inJSRSub) referenceMaps.recordStkMap(i, currBBMap, currBBStkTop, blockSeen[currBBNum]); else referenceMaps.recordJSRSubroutineMap(i, currBBMap, currBBStkTop, currPendingRET.returnAddressLocation, blockSeen[currBBNum]); currBBStkTop--; // pop object pointer currBBMap[++currBBStkTop] = fieldType.isReferenceType() ? REFERENCE : NON_REFERENCE; if (fieldType.getStackWords() == 2) currBBMap[++currBBStkTop] = NON_REFERENCE; break; } case JBC_putfield : { int index = (((int)bytecodes[i+1]) << 8 | (((int)bytecodes[i+2]) & 0xFF)) & 0xFFFF; VM_Type fieldType = declaringClass.getFieldRef(index).getType(); // Register the reference map with the values still on the stack // note: putfield could result in a call to the classloader if (!inJSRSub) referenceMaps.recordStkMap(i, currBBMap, currBBStkTop, blockSeen[currBBNum]); else referenceMaps.recordJSRSubroutineMap(i, currBBMap, currBBStkTop, currPendingRET.returnAddressLocation, blockSeen[currBBNum]); currBBStkTop -= 2; // remove objectref and one value if (fieldType.getStackWords() == 2) currBBStkTop--; break; } case JBC_checkcast : { if (!inJSRSub) referenceMaps.recordStkMap(i, currBBMap, currBBStkTop, blockSeen[currBBNum]); else referenceMaps.recordJSRSubroutineMap(i, currBBMap, currBBStkTop, currPendingRET.returnAddressLocation, blockSeen[currBBNum]); break; } case JBC_instanceof : { if (!inJSRSub) referenceMaps.recordStkMap(i, currBBMap, currBBStkTop, blockSeen[currBBNum]); else referenceMaps.recordJSRSubroutineMap(i, currBBMap, currBBStkTop, currPendingRET.returnAddressLocation, blockSeen[currBBNum]); currBBMap[currBBStkTop] = NON_REFERENCE; break; } case JBC_new : { if (!inJSRSub) referenceMaps.recordStkMap(i, currBBMap, currBBStkTop, blockSeen[currBBNum]); else referenceMaps.recordJSRSubroutineMap(i, currBBMap, currBBStkTop, currPendingRET.returnAddressLocation, blockSeen[currBBNum]); currBBStkTop++; currBBMap[currBBStkTop] = REFERENCE; break; } // For the <x>aload instructions the map is needed in case gc occurs // while the array index check is taking place. Stack has not been // altered yet. case JBC_iaload : case JBC_faload : case JBC_baload : case JBC_caload : case JBC_saload : { if (!inJSRSub) referenceMaps.recordStkMap(i, currBBMap, currBBStkTop, blockSeen[currBBNum]); else referenceMaps.recordJSRSubroutineMap(i, currBBMap, currBBStkTop, currPendingRET.returnAddressLocation, blockSeen[currBBNum]); currBBStkTop--; currBBMap[currBBStkTop] = NON_REFERENCE; break; } case JBC_laload : case JBC_daload : { if (!inJSRSub) referenceMaps.recordStkMap(i, currBBMap, currBBStkTop, blockSeen[currBBNum]); else referenceMaps.recordJSRSubroutineMap(i, currBBMap, currBBStkTop, currPendingRET.returnAddressLocation, blockSeen[currBBNum]); currBBMap[currBBStkTop-1] = NON_REFERENCE; break; } case JBC_aaload : { if (!inJSRSub) referenceMaps.recordStkMap(i, currBBMap, currBBStkTop, blockSeen[currBBNum]); else referenceMaps.recordJSRSubroutineMap(i, currBBMap, currBBStkTop, currPendingRET.returnAddressLocation, blockSeen[currBBNum]); currBBStkTop--; break; } // For the <x>astore instructions the map recorded is in case gc occurs // during the array index bounds check or the arraystore check (for aastore). // Stack has not been modified at this point. case JBC_iastore : case JBC_fastore : case JBC_aastore : case JBC_bastore : case JBC_castore : case JBC_sastore : { if (!inJSRSub) referenceMaps.recordStkMap(i, currBBMap, currBBStkTop, blockSeen[currBBNum]); else referenceMaps.recordJSRSubroutineMap(i, currBBMap, currBBStkTop, currPendingRET.returnAddressLocation, blockSeen[currBBNum]); currBBStkTop = currBBStkTop - 3; break; } case JBC_lastore : case JBC_dastore : { if (!inJSRSub) referenceMaps.recordStkMap(i, currBBMap, currBBStkTop, blockSeen[currBBNum]); else referenceMaps.recordJSRSubroutineMap(i, currBBMap, currBBStkTop, currPendingRET.returnAddressLocation, blockSeen[currBBNum]); currBBStkTop = currBBStkTop - 4; break; } case JBC_newarray : case JBC_anewarray : { if (!inJSRSub) referenceMaps.recordStkMap(i, currBBMap, currBBStkTop, blockSeen[currBBNum]); else referenceMaps.recordJSRSubroutineMap(i, currBBMap, currBBStkTop, currPendingRET.returnAddressLocation, blockSeen[currBBNum]); currBBMap[currBBStkTop] = REFERENCE; break; } case JBC_multianewarray : { short dim = (short)(((int)bytecodes[i+3]) & 0xFF); if (!inJSRSub) referenceMaps.recordStkMap(i, currBBMap, currBBStkTop, blockSeen[currBBNum]); else referenceMaps.recordJSRSubroutineMap(i, currBBMap, currBBStkTop, currPendingRET.returnAddressLocation, blockSeen[currBBNum]); currBBStkTop = currBBStkTop - dim + 1; currBBMap[currBBStkTop] = REFERENCE; break; } case JBC_arraylength : { currBBMap[currBBStkTop] = NON_REFERENCE; break; } case JBC_athrow : { if (!inJSRSub) referenceMaps.recordStkMap(i, currBBMap, currBBStkTop, blockSeen[currBBNum]); else referenceMaps.recordJSRSubroutineMap(i, currBBMap, currBBStkTop, currPendingRET.returnAddressLocation, blockSeen[currBBNum]); currBBStkTop = currBBStkEmpty+1; currBBMap[currBBStkTop] = REFERENCE; processNextBlock = false; break; } case JBC_monitorenter : case JBC_monitorexit : { currBBStkTop--; if (!inJSRSub) referenceMaps.recordStkMap(i, currBBMap, currBBStkTop, blockSeen[currBBNum]); else referenceMaps.recordJSRSubroutineMap(i, currBBMap, currBBStkTop, currPendingRET.returnAddressLocation, blockSeen[currBBNum]); break; } case JBC_wide : { int wopcode = ((int)bytecodes[i+1]) & 0xFF; opLength = JBC_length[wopcode]; opLength += opLength; if (wopcode != JBC_iinc) { int index = (((int)bytecodes[i+2]) << 8 | (((int)bytecodes[i+3]) & 0xFF)) & 0xFFFF; switch (wopcode) { case JBC_iload : case JBC_fload : { currBBStkTop++; currBBMap[currBBStkTop] = NON_REFERENCE; break; } case JBC_lload : case JBC_dload : { currBBStkTop++; currBBMap[currBBStkTop] = NON_REFERENCE; currBBStkTop++; currBBMap[currBBStkTop] = NON_REFERENCE; break; } case JBC_aload : { int high = (((int)bytecodes[i+1]) & 0x000000FF) << 8; int low = (((int)bytecodes[i+2]) & 0x000000FF); int localNumber = high | low; currBBStkTop++; currBBMap[currBBStkTop] = currBBMap[localNumber]; break; } case JBC_istore : case JBC_fstore : { if (!inJSRSub) currBBMap[index]=NON_REFERENCE; else currBBMap[index]=SET_TO_NONREFERENCE; currBBStkTop--; break; } case JBC_lstore : case JBC_dstore : { if (!inJSRSub) { currBBMap[index]=NON_REFERENCE; currBBMap[index+1]=NON_REFERENCE; } else { currBBMap[index]=SET_TO_NONREFERENCE; currBBMap[index+1]=SET_TO_NONREFERENCE; } currBBStkTop = currBBStkTop - 2; break; } case JBC_astore : { currBBMap[index]=currBBMap[currBBStkTop]; currBBStkTop--; break; } } } break; } // case JBC_wide : { default : { System.out.println("Unknown opcode:" + opcode); System.exit(10); } } // end switch (opcode) i = i + opLength; } // for start to end blockSeen[currBBNum] = true; if (processNextBlock) { short fallThruBBNum = byteToBlockMap[i]; workStk = processBranchBB(fallThruBBNum, currBBStkTop, currBBMap, currBBStkEmpty, inJSRSub, bbMaps, blockStkTop, currPendingRET, bbPendingRETs, workStk); } // if the work stack is empty, we must have processed the whole program // we can now process the try handlers if there are any. // If a handler doesn't have a starting map already, then the associated try // has not been processed yet. The try and the handler must be in another // handler, so that handler must be processed first. // If one handler is in the try block associated with a second handler, then // the second handler must not be processed until the first handler has been. // if ((workStkTop == -1) && !handlersAllDone ) { for (i=0; i < tryHandlerLength; i++) { if (handlerProcessed[i] || bbMaps[byteToBlockMap[tryHandlerPC[i]]] == null) continue; // already processed this handler, or, haven't seen the // associated try block yet so no starting map is available, // the try block must be in one of the other handlers else break; } if (i == tryHandlerLength) handlersAllDone = true; else { int considerIndex = i; while (i != tryHandlerLength) { int tryStart = tryStartPC[considerIndex]; int tryEnd = tryEndPC[considerIndex]; for (i=0; i<tryHandlerLength; i++) // For every handler that has not yet been processed, // but already has a known starting map, // make sure it is not in the try block part of the handler // we are considering working on. if (!handlerProcessed[i] && tryStart <= tryHandlerPC[i] && tryHandlerPC[i] < tryEnd && bbMaps[byteToBlockMap[tryHandlerPC[i]]] != null) break; if (i != tryHandlerLength) considerIndex = i; } short blockNum = byteToBlockMap[tryHandlerPC[considerIndex]]; handlerProcessed[considerIndex] = true; workStk = addToWorkStk(blockNum, workStk); } } } // while workStk not empty // Indicate that any temporaries can be freed referenceMaps.recordingComplete(); return;} | 49871 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49871/61f424033a380413a9ac1688dfbe87025e7724f4/VM_BuildReferenceMaps.java/clean/rvm/src/vm/compilers/baseline/GCMap/VM_BuildReferenceMaps.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
1361,
2404,
8903,
12,
7397,
67,
1305,
707,
16,
509,
8526,
2110,
2686,
87,
16,
1082,
565,
8251,
67,
2404,
8903,
2114,
8903,
16,
8251,
67,
3116,
9676,
1361,
9676,
13,
288,
225,
368,
11125... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1361,
2404,
8903,
12,
7397,
67,
1305,
707,
16,
509,
8526,
2110,
2686,
87,
16,
1082,
565,
8251,
67,
2404,
8903,
2114,
8903,
16,
8251,
67,
3116,
9676,
1361,
9676,
13,
288,
225,
368,
11125... | |
Object[] storage = getThreadContextStorage(); if (storage != null) { return (Context)storage[0]; } return getCurrentContext_jdk11(); | Object helper = VMBridge.instance.getThreadContextHelper(); return VMBridge.instance.getContext(helper); | public static Context getCurrentContext() { Object[] storage = getThreadContextStorage(); if (storage != null) { return (Context)storage[0]; } return getCurrentContext_jdk11(); } | 54155 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54155/83dec5965707ef248c6c98e102494a5dd70d2cd0/Context.java/clean/js/rhino/src/org/mozilla/javascript/Context.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1772,
5175,
1042,
1435,
565,
288,
3639,
1033,
8526,
2502,
273,
24459,
1042,
3245,
5621,
3639,
309,
261,
5697,
480,
446,
13,
288,
5411,
327,
261,
1042,
13,
5697,
63,
20,
15533,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1772,
5175,
1042,
1435,
565,
288,
3639,
1033,
8526,
2502,
273,
24459,
1042,
3245,
5621,
3639,
309,
261,
5697,
480,
446,
13,
288,
5411,
327,
261,
1042,
13,
5697,
63,
20,
15533,
... |
public static Message createFNPDataRequest(long id, short htl, NodeCHK key) { | public static Message createFNPDataRequest(long id, short htl, Key key) { | public static Message createFNPDataRequest(long id, short htl, NodeCHK key) { Message msg = new Message(FNPDataRequest); msg.set(UID, id); msg.set(HTL, htl); msg.set(FREENET_ROUTING_KEY, key); return msg; } | 51834 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51834/52fadbe4420bc8c2fb61a8e805e65feb1b7e21db/DMT.java/clean/src/freenet/io/comm/DMT.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
2350,
752,
19793,
52,
751,
691,
12,
5748,
612,
16,
3025,
366,
6172,
16,
1929,
498,
13,
288,
3639,
2350,
1234,
273,
394,
2350,
12,
19793,
52,
751,
691,
1769,
3639,
1234,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
2350,
752,
19793,
52,
751,
691,
12,
5748,
612,
16,
3025,
366,
6172,
16,
1929,
498,
13,
288,
3639,
2350,
1234,
273,
394,
2350,
12,
19793,
52,
751,
691,
1769,
3639,
1234,
18,
... |
log.error(e); | System.err.println(e); | public void go() { try { if(!no_channel) { System.out.println("Creating control channel"); control_channel=new JChannel(control_props); System.out.println("Connecting control channel"); control_channel.connect(control_groupname); System.out.println("Creating data channel"); data_channel=new JChannel(data_props); // data_channel.SetOpt(Channel.VIEW, Boolean.FALSE); System.out.println("Connecting data channel"); data_channel.connect(data_groupname); } mainFrame=new JFrame(); mainFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); panel=new DrawPanel(); panel.setBackground(background_color); sub_panel=new JPanel(); mainFrame.getContentPane().add("Center", panel); clear_button=new JButton("Clear"); clear_button.setFont(default_font); clear_button.addActionListener(this); leave_button=new JButton("Leave & Exit"); leave_button.setFont(default_font); leave_button.addActionListener(this); sub_panel.add("South", clear_button); sub_panel.add("South", leave_button); mainFrame.getContentPane().add("South", sub_panel); mainFrame.setVisible(true); mainFrame.setBackground(background_color); clear_button.setForeground(Color.blue); leave_button.setForeground(Color.blue); setTitle(); mainFrame.pack(); mainFrame.setLocation(15, 25); mainFrame.setVisible(true); if(!no_channel) { System.out.println("Starting control receiver thread"); control_receiver=new ControlReceiver(); control_receiver.start(); System.out.println("Starting data receiver thread"); data_receiver=new DataReceiver(); data_receiver.start(); } } catch(Exception e) { log.error(e); return; } } | 49475 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49475/13de68466e3cf7fde6ee0bde0cee09a33e837e89/Draw2Channels.java/clean/src/org/jgroups/demos/Draw2Channels.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1960,
1435,
288,
202,
698,
288,
202,
565,
309,
12,
5,
2135,
67,
4327,
13,
288,
1082,
202,
3163,
18,
659,
18,
8222,
2932,
11092,
3325,
1904,
8863,
202,
202,
7098,
67,
4327,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1960,
1435,
288,
202,
698,
288,
202,
565,
309,
12,
5,
2135,
67,
4327,
13,
288,
1082,
202,
3163,
18,
659,
18,
8222,
2932,
11092,
3325,
1904,
8863,
202,
202,
7098,
67,
4327,
... |
jv.removed(info); | jv.removed(jte); | void remove(KeptJobsListener sender, JobInfo info) { if (keptjobinfos.remove(info)) { if (NewProgressViewer.DEBUG) System.err.println("FinishedJobs: sucessfully removed job"); Object l[]= listeners.getListeners(); for (int i= 0; i < l.length; i++) { KeptJobsListener jv= (KeptJobsListener) l[i]; if (jv != sender) jv.removed(info); } } } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/f52d6b94fa30f7dd2c2921a0ba5441c40e4c4f88/FinishedJobs.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/FinishedJobs.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
1206,
12,
47,
73,
337,
7276,
2223,
5793,
16,
3956,
966,
1123,
13,
288,
3639,
309,
261,
4491,
337,
4688,
18227,
18,
4479,
12,
1376,
3719,
288,
540,
202,
430,
261,
1908,
5491,
18415,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
1206,
12,
47,
73,
337,
7276,
2223,
5793,
16,
3956,
966,
1123,
13,
288,
3639,
309,
261,
4491,
337,
4688,
18227,
18,
4479,
12,
1376,
3719,
288,
540,
202,
430,
261,
1908,
5491,
18415,... |
case NoPrefix: | public SymbolTablePrinter printType0(Type type) { printCommonPart(type); switch (type) { case NoPrefix: case ThisType(_): case SingleType(_,_): return print(".type"); default: return this; } } | 32355 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/32355/224c54733ed22db02599836a1299b503b900e255/SymbolTablePrinter.java/buggy/sources/scalac/symtab/SymbolTablePrinter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
8565,
1388,
12149,
1172,
559,
20,
12,
559,
618,
13,
288,
3639,
1172,
6517,
1988,
12,
723,
1769,
3639,
1620,
261,
723,
13,
288,
9079,
648,
1220,
559,
24899,
4672,
3639,
648,
10326,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8565,
1388,
12149,
1172,
559,
20,
12,
559,
618,
13,
288,
3639,
1172,
6517,
1988,
12,
723,
1769,
3639,
1620,
261,
723,
13,
288,
9079,
648,
1220,
559,
24899,
4672,
3639,
648,
10326,
... | |
RubyArray argArray = RubyArray.newArray(recv.getRuntime(), args); return argArray.join(RubyString.newString(recv.getRuntime(), separator())); | RubyArray argArray = recv.getRuntime().newArray(args); return argArray.join(recv.getRuntime().newString(separator())); | public static RubyString join(IRubyObject recv, IRubyObject[] args) { RubyArray argArray = RubyArray.newArray(recv.getRuntime(), args); return argArray.join(RubyString.newString(recv.getRuntime(), separator())); } | 46217 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46217/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubyFile.java/buggy/src/org/jruby/RubyFile.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
19817,
780,
1233,
12,
7937,
10340,
921,
10665,
16,
15908,
10340,
921,
8526,
833,
13,
288,
202,
202,
54,
10340,
1076,
1501,
1076,
273,
19817,
1076,
18,
2704,
1076,
12,
18334,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
19817,
780,
1233,
12,
7937,
10340,
921,
10665,
16,
15908,
10340,
921,
8526,
833,
13,
288,
202,
202,
54,
10340,
1076,
1501,
1076,
273,
19817,
1076,
18,
2704,
1076,
12,
18334,
18... |
RetargetAction action = new RetargetAction(getId(), WorkbenchMessages.getString("Workbench.refresh")); | LabelRetargetAction action = new LabelRetargetAction(getId(), WorkbenchMessages.getString("Workbench.redo")); | public IWorkbenchAction create(IWorkbenchWindow window) { if (window == null) { throw new IllegalArgumentException(); } RetargetAction action = new RetargetAction(getId(), WorkbenchMessages.getString("Workbench.refresh")); //$NON-NLS-1$ //$NON-NLS-2$ action.setToolTipText(WorkbenchMessages .getString("Workbench.refreshToolTip")); //$NON-NLS-1$ window.getPartService().addPartListener(action); action.setActionDefinitionId("org.eclipse.ui.file.refresh"); //$NON-NLS-1$ return action; } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/a068a7b2f086dec18f37d899ac6f919caaf29048/ActionFactory.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/ActionFactory.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
467,
2421,
22144,
1803,
752,
12,
45,
2421,
22144,
3829,
2742,
13,
288,
5411,
309,
261,
5668,
422,
446,
13,
288,
7734,
604,
394,
2754,
5621,
5411,
289,
5411,
17100,
826,
1803,
1301,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
467,
2421,
22144,
1803,
752,
12,
45,
2421,
22144,
3829,
2742,
13,
288,
5411,
309,
261,
5668,
422,
446,
13,
288,
7734,
604,
394,
2754,
5621,
5411,
289,
5411,
17100,
826,
1803,
1301,
... |
createButton( composite, IDialogConstants.HELP_ID, IDialogConstants.HELP_LABEL, false ); | protected Control createButtonBar( Composite parent ) { Composite composite = (Composite) super.createButtonBar( buttonBar ); createButton( composite, IDialogConstants.HELP_ID, IDialogConstants.HELP_LABEL, false ); GridLayout layout = (GridLayout) composite.getLayout( ); layout.numColumns = 1; composite.setLayoutData( new GridData( GridData.FILL_VERTICAL ) ); return composite; } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/4b82747ca92655e2a505cfacc3654325883d0612/ExpressionBuilder.java/buggy/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/ui/dialogs/ExpressionBuilder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
8888,
752,
3616,
5190,
12,
14728,
982,
262,
202,
95,
202,
202,
9400,
9635,
273,
261,
9400,
13,
2240,
18,
2640,
3616,
5190,
12,
3568,
5190,
11272,
202,
202,
2640,
3616,
12,
96... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8888,
752,
3616,
5190,
12,
14728,
982,
262,
202,
95,
202,
202,
9400,
9635,
273,
261,
9400,
13,
2240,
18,
2640,
3616,
5190,
12,
3568,
5190,
11272,
202,
202,
2640,
3616,
12,
96... | |
interrupt(); | private void freezeAll(Set dataItems) { synchronized (dataItems) { Iterator i = dataItems.iterator(); String itemName; while (i.hasNext()) { itemName = (String) i.next(); freeze(itemName); } } interrupt(); // this interrupts the DataFreezer thread. } | 5494 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5494/488375b3750dc70971cb086fad798d28df6001d8/DataRepository.java/clean/processdash/src/net/sourceforge/processdash/data/repository/DataRepository.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1171,
3238,
918,
16684,
1595,
12,
694,
501,
3126,
13,
288,
10792,
3852,
261,
892,
3126,
13,
288,
13491,
4498,
277,
273,
501,
3126,
18,
9838,
5621,
13491,
514,
23488,
31,
13491,
1323,
261,
77,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1171,
3238,
918,
16684,
1595,
12,
694,
501,
3126,
13,
288,
10792,
3852,
261,
892,
3126,
13,
288,
13491,
4498,
277,
273,
501,
3126,
18,
9838,
5621,
13491,
514,
23488,
31,
13491,
1323,
261,
77,
... | |
log.debug("Retour de la valeur de la proprit : " + result); | log.debug("Retour de la valeur de la propriété : " + result); | public String getColumnText(Object element, int columnIndex) { String result = ""; if (element instanceof RuleProperty) { RuleProperty ruleProperty = (RuleProperty) element; if (columnIndex == 0) { result = ruleProperty.getProperty(); log.debug("Retour du nom de la proprit : " + result); } else if (columnIndex == 1) { result = ruleProperty.getValue(); log.debug("Retour de la valeur de la proprit : " + result); } } return result; } | 45569 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45569/92e71548fdc4b721b4397f0f374b56289f99e0c5/RulePropertyLabelProvider.java/buggy/pmd-eclipse/src/net/sourceforge/pmd/eclipse/preferences/RulePropertyLabelProvider.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
6716,
1528,
12,
921,
930,
16,
509,
14882,
13,
288,
3639,
514,
563,
273,
1408,
31,
3639,
309,
261,
2956,
1276,
6781,
1396,
13,
288,
5411,
6781,
1396,
1720,
1396,
273,
261,
217... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
6716,
1528,
12,
921,
930,
16,
509,
14882,
13,
288,
3639,
514,
563,
273,
1408,
31,
3639,
309,
261,
2956,
1276,
6781,
1396,
13,
288,
5411,
6781,
1396,
1720,
1396,
273,
261,
217... |
public Primitive(boolean value) { this(new Boolean(value)); } | public Primitive(Object value) { if(value == null) throw new InterpreterError( "Use Primitve.NULL instead of Primitive(null)"); this.value = value; } | public Primitive(boolean value) { this(new Boolean(value)); } | 6564 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6564/392317a6154c2a68df57a53b23121b11ef7b9f3e/Primitive.java/buggy/bsh/Primitive.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
14488,
12,
6494,
460,
13,
288,
333,
12,
2704,
3411,
12,
1132,
10019,
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,
... | [
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
14488,
12,
6494,
460,
13,
288,
333,
12,
2704,
3411,
12,
1132,
10019,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
{ | public final void clearPassword() { if (password == null) return; for (int i = 0; i < password.length; i++) { password[i] = '\u0000'; } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/99e9abeef27c28d491d6cbb3f304d7454d599169/PBEKeySpec.java/clean/core/src/classpath/javax/javax/crypto/spec/PBEKeySpec.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
727,
918,
2424,
3913,
1435,
377,
309,
261,
3664,
422,
446,
13,
327,
31,
565,
364,
261,
474,
277,
273,
374,
31,
277,
411,
2201,
18,
2469,
31,
277,
27245,
2398,
2201,
63,
77,
65,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
727,
918,
2424,
3913,
1435,
377,
309,
261,
3664,
422,
446,
13,
327,
31,
565,
364,
261,
474,
277,
273,
374,
31,
277,
411,
2201,
18,
2469,
31,
277,
27245,
2398,
2201,
63,
77,
65,
... | |
MylarTasklistPlugin.getDefault().saveTaskListAndContexts(); | MylarTaskListPlugin.getDefault().saveTaskListAndContexts(); | protected void switchMainTaskDirectory(String newDir){ //Order matters: MylarTasklistPlugin.getDefault().saveTaskListAndContexts(); MylarPlugin.getDefault().getPreferenceStore().setValue(MylarPlugin.MYLAR_DIR, newDir); MylarTasklistPlugin.getDefault().setDataDirectory(MylarPlugin.getDefault().getMylarDataDirectory()); } | 51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/7434c54adb9b67993df3b0ee032cca0eaf5003f3/ChangeMainTaskDirTest.java/buggy/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasklist/tests/ChangeMainTaskDirTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
1620,
6376,
2174,
2853,
12,
780,
394,
1621,
15329,
202,
202,
759,
2448,
4834,
5432,
30,
202,
202,
12062,
7901,
2174,
1098,
3773,
18,
588,
1868,
7675,
5688,
2174,
682,
1876... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1620,
6376,
2174,
2853,
12,
780,
394,
1621,
15329,
202,
202,
759,
2448,
4834,
5432,
30,
202,
202,
12062,
7901,
2174,
1098,
3773,
18,
588,
1868,
7675,
5688,
2174,
682,
1876... |
void setupPlayerLabel() { if (playerLabelDone) { return; } String playerName = client.getPlayerName(); if (bottomBar == null) { // add a bottom bar bottomBar = new BottomBar(); contentPane.add(bottomBar, BorderLayout.SOUTH); // notify masterFrame.pack(); } bottomBar.setPlayerName(playerName); String colorName = client.getColor(); // If we call this before player colors are chosen, just use // the defaults. if (colorName != null) { Color color = PickColor.getBackgroundColor(colorName); bottomBar.setPlayerColor(color); // Don't do this again. playerLabelDone = true; } } | 51862 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51862/3b94339c5da22616c071505c2ca11e99d5248d84/MasterBoard.java/buggy/Colossus/net/sf/colossus/client/MasterBoard.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
3875,
12148,
2224,
1435,
565,
288,
3639,
309,
261,
14872,
2224,
7387,
13,
3639,
288,
5411,
327,
31,
3639,
289,
3639,
514,
7291,
461,
273,
1004,
18,
588,
12148,
461,
5621,
3639,
309,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
3875,
12148,
2224,
1435,
565,
288,
3639,
309,
261,
14872,
2224,
7387,
13,
3639,
288,
5411,
327,
31,
3639,
289,
3639,
514,
7291,
461,
273,
1004,
18,
588,
12148,
461,
5621,
3639,
309,
... | ||
int bias = p.getNextInt(); api.giEngine(new InstantGI(samples, sets, b, bias)); | api.parameter("gi.igi.bias_samples", p.getNextInt()); | private void parseGIBlock(SunflowAPI api) throws ParserException, IOException { p.checkNextToken("{"); p.checkNextToken("type"); if (p.peekNextToken("irr-cache")) { p.checkNextToken("samples"); int samples = p.getNextInt(); p.checkNextToken("tolerance"); float tolerance = p.getNextFloat(); p.checkNextToken("spacing"); float min = p.getNextFloat(); float max = p.getNextFloat(); // parse global photon map info GlobalPhotonMapInterface gmap = null; if (p.peekNextToken("global")) { int numEmit = p.getNextInt(); String type = p.getNextToken(); int gather = p.getNextInt(); float radius = p.getNextFloat(); if (type.equals("kd")) gmap = new GlobalPhotonMap(numEmit, gather, radius); else if (type.equals("grid")) gmap = new GridPhotonMap(numEmit, gather, radius); else if (type.equals("none")) gmap = null; else UI.printWarning(Module.API, "Unrecognized global photon map type: %s", type); } api.giEngine(new IrradianceCacheGIEngine(samples, tolerance, min, max, gmap)); } else if (p.peekNextToken("path")) { p.checkNextToken("samples"); int samples = p.getNextInt(); if (p.peekNextToken("bounces")) { UI.printWarning(Module.API, "Deprecated setting: bounces - use diffuse trace depth instead"); p.getNextInt(); } api.giEngine(new PathTracingGIEngine(samples)); } else if (p.peekNextToken("fake")) { p.checkNextToken("up"); Vector3 up = parseVector(); p.checkNextToken("sky"); Color sky = parseColor(); p.checkNextToken("ground"); Color ground = parseColor(); api.giEngine(new FakeGIEngine(up, sky, ground)); } else if (p.peekNextToken("igi")) { p.checkNextToken("samples"); int samples = p.getNextInt(); p.checkNextToken("sets"); int sets = p.getNextInt(); p.checkNextToken("b"); float b = p.getNextFloat(); p.checkNextToken("bias-samples"); int bias = p.getNextInt(); api.giEngine(new InstantGI(samples, sets, b, bias)); } else if (p.peekNextToken("ambocc")) { p.checkNextToken("bright"); Color bright = parseColor(); p.checkNextToken("dark"); Color dark = parseColor(); p.checkNextToken("samples"); int samples = p.getNextInt(); float maxdist = 0; if (p.peekNextToken("maxdist")) maxdist = p.getNextFloat(); api.giEngine(new AmbientOcclusionGIEngine(bright, dark, samples, maxdist)); } else if (p.peekNextToken("none") || p.peekNextToken("null")) { // disable GI api.giEngine(null); } else UI.printWarning(Module.API, "Unrecognized gi engine type: %s", p.getNextToken()); p.checkNextToken("}"); } | 51147 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51147/bde086532652a65ecbe6edd569047beed349acff/SCParser.java/buggy/src/org/sunflow/core/parser/SCParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1109,
13797,
1768,
12,
29636,
2426,
2557,
1536,
13,
1216,
27990,
16,
1860,
288,
3639,
293,
18,
1893,
9399,
2932,
95,
8863,
3639,
293,
18,
1893,
9399,
2932,
723,
8863,
3639,
309... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1109,
13797,
1768,
12,
29636,
2426,
2557,
1536,
13,
1216,
27990,
16,
1860,
288,
3639,
293,
18,
1893,
9399,
2932,
95,
8863,
3639,
293,
18,
1893,
9399,
2932,
723,
8863,
3639,
309... |
return (URL[]) fNotExportedLibs .toArray(new URL[fNotExportedLibs.size()]); | return fNotExportedLibs.toArray(new URL[fNotExportedLibs.size()]); | public URL[] getNotExportedLibUrls() { return (URL[]) fNotExportedLibs .toArray(new URL[fNotExportedLibs.size()]); } | 50818 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50818/cd00889fb5930fea91d208ac97a4b7fafa399a8e/PluginDescriptor.java/clean/src/java/org/apache/nutch/plugin/PluginDescriptor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1976,
8526,
336,
1248,
31140,
5664,
10509,
1435,
288,
565,
327,
261,
1785,
63,
5717,
284,
1248,
31140,
5664,
87,
1377,
263,
31447,
12,
2704,
1976,
63,
74,
1248,
31140,
5664,
87,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1976,
8526,
336,
1248,
31140,
5664,
10509,
1435,
288,
565,
327,
261,
1785,
63,
5717,
284,
1248,
31140,
5664,
87,
1377,
263,
31447,
12,
2704,
1976,
63,
74,
1248,
31140,
5664,
87,
18,... |
if (decorators[i].getEnablement().isEnabledFor(element)) { | if (decorators[i].isEnabledFor(element)) { | public String decorateText(String text, Object element) { //Get any adaptions to IResource Object adapted = getResourceAdapter(element); String result = scheduler.decorateWithText(text, element, adapted); FullDecoratorDefinition[] decorators = getDecoratorsFor(element); for (int i = 0; i < decorators.length; i++) { if (decorators[i].getEnablement().isEnabledFor(element)) { String newResult = safeDecorateText(element, result, decorators[i]); if (newResult != null) result = newResult; } } if (adapted != null) { decorators = getDecoratorsFor(adapted); for (int i = 0; i < decorators.length; i++) { if (decorators[i].isAdaptable() && decorators[i].getEnablement().isEnabledFor(adapted)) { String newResult = safeDecorateText(adapted, result, decorators[i]); if (newResult != null) result = newResult; } } } return result; } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/e4870ae566720c9a538c7ef68573b301746e6c42/DecoratorManager.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/decorators/DecoratorManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
15752,
1528,
12,
780,
977,
16,
1033,
930,
13,
288,
3639,
368,
967,
1281,
1261,
69,
573,
358,
467,
1420,
3639,
1033,
28345,
273,
5070,
4216,
12,
2956,
1769,
3639,
514,
563,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
15752,
1528,
12,
780,
977,
16,
1033,
930,
13,
288,
3639,
368,
967,
1281,
1261,
69,
573,
358,
467,
1420,
3639,
1033,
28345,
273,
5070,
4216,
12,
2956,
1769,
3639,
514,
563,
27... |
public ErrorDialog( String sTitle, String sMessage, String[] sErrors, String[] sFixes ) | public ErrorDialog( Shell shellParent, String sTitle, String sMessage, String[] sErrors, String[] sFixes ) | public ErrorDialog( String sTitle, String sMessage, String[] sErrors, String[] sFixes ) { this.sMessage = sMessage; this.sErrors = getOrganizedErrors( sErrors ); this.sFixes = getOrganizedFixes( sFixes ); this.bError = true; init( sTitle ); } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/f4298611861d413e6f895c73f8dde535a9a1d9d2/ErrorDialog.java/buggy/core/org.eclipse.birt.core.ui/src/org/eclipse/birt/core/ui/frameworks/errordisplay/ErrorDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1068,
6353,
12,
514,
272,
4247,
16,
514,
28699,
16,
514,
8526,
272,
4229,
16,
1082,
202,
780,
8526,
272,
8585,
281,
262,
202,
95,
202,
202,
2211,
18,
87,
1079,
273,
28699,
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,
1068,
6353,
12,
514,
272,
4247,
16,
514,
28699,
16,
514,
8526,
272,
4229,
16,
1082,
202,
780,
8526,
272,
8585,
281,
262,
202,
95,
202,
202,
2211,
18,
87,
1079,
273,
28699,
3... |
int size = 0; | public void execute(PAContext context) throws PainterException { Object data[]; PAToken patoken; int size = 0; data = context.popOperands(1); if (data[0] instanceof PAToken) { patoken = (PAToken) data[0]; if (! (patoken.type == PAToken.KEY)) { throw new PainterException("wrong arguments"); } size = ( (String) patoken.value).length(); } else if (data[0] instanceof HashMap) { size = ( (HashMap) data[0]).size(); } else if (data[0] instanceof ArrayList) { size = ( (ArrayList) data[0]).size(); } else if (data[0] instanceof String) { size = ( (String) data[0]).length(); } else { throw new PainterException("wrong arguments"); } context.operands.push(new Integer(size)); } | 4174 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4174/d2f614f1cabfa6f585b4e67b060a3e4e49a9f71e/PAContext.java/clean/src/com/lowagie/text/pdf/codec/postscript/PAContext.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4202,
1071,
918,
1836,
12,
4066,
1042,
819,
13,
1216,
453,
11606,
503,
288,
3639,
1033,
501,
8526,
31,
3639,
17988,
969,
9670,
969,
31,
9079,
501,
273,
819,
18,
5120,
3542,
5708,
12,
21,
176... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4202,
1071,
918,
1836,
12,
4066,
1042,
819,
13,
1216,
453,
11606,
503,
288,
3639,
1033,
501,
8526,
31,
3639,
17988,
969,
9670,
969,
31,
9079,
501,
273,
819,
18,
5120,
3542,
5708,
12,
21,
176... | |
int parenCount = GET_ARG(program, pc); pc += ARG_LEN; int parenIndex = GET_ARG(program, pc); pc += 2 * ARG_LEN; | int parenCount = getIndex(program, pc); pc += INDEX_LEN; int parenIndex = getIndex(program, pc); pc += 2 * INDEX_LEN; | executeREBytecode(REGlobalData gData, char[] chars, int end) { int pc = 0; byte program[] = gData.regexp.program; int op = program[pc++]; int currentContinuation_op; int currentContinuation_pc; boolean result = false; currentContinuation_pc = 0; currentContinuation_op = REOP_END;if (debug) {System.out.println("Input = \"" + new String(chars) + "\", start at " + gData.cp);} for (;;) {if (debug) {System.out.println("Testing at " + gData.cp + ", op = " + op);} switch (op) { case REOP_EMPTY: result = true; break; case REOP_BOL: if (gData.cp != 0) { if (gData.multiline || ((gData.regexp.flags & JSREG_MULTILINE) != 0)) { if (!isLineTerm(chars[gData.cp - 1])) { result = false; break; } } else { result = false; break; } } result = true; break; case REOP_EOL: if (gData.cp != end) { if (gData.multiline || ((gData.regexp.flags & JSREG_MULTILINE) != 0)) { if (!isLineTerm(chars[gData.cp])) { result = false; break; } } else { result = false; break; } } result = true; break; case REOP_WBDRY: result = ((gData.cp == 0 || !isWord(chars[gData.cp - 1])) ^ !((gData.cp < end) && isWord(chars[gData.cp]))); break; case REOP_WNONBDRY: result = ((gData.cp == 0 || !isWord(chars[gData.cp - 1])) ^ ((gData.cp < end) && isWord(chars[gData.cp]))); break; case REOP_DOT: result = (gData.cp != end && !isLineTerm(chars[gData.cp])); if (result) { gData.cp++; } break; case REOP_DIGIT: result = (gData.cp != end && isDigit(chars[gData.cp])); if (result) { gData.cp++; } break; case REOP_NONDIGIT: result = (gData.cp != end && !isDigit(chars[gData.cp])); if (result) { gData.cp++; } break; case REOP_SPACE: result = (gData.cp != end && isREWhiteSpace(chars[gData.cp])); if (result) { gData.cp++; } break; case REOP_NONSPACE: result = (gData.cp != end && !isREWhiteSpace(chars[gData.cp])); if (result) { gData.cp++; } break; case REOP_ALNUM: result = (gData.cp != end && isWord(chars[gData.cp])); if (result) { gData.cp++; } break; case REOP_NONALNUM: result = (gData.cp != end && !isWord(chars[gData.cp])); if (result) { gData.cp++; } break; case REOP_FLAT: { int offset = GET_ARG(program, pc); pc += ARG_LEN; int length = GET_ARG(program, pc); pc += ARG_LEN; result = flatNMatcher(gData, offset, length, chars, end); } break; case REOP_FLATi: { int offset = GET_ARG(program, pc); pc += ARG_LEN; int length = GET_ARG(program, pc); pc += ARG_LEN; result = flatNIMatcher(gData, offset, length, chars, end); } break; case REOP_FLAT1: { char matchCh = (char)(program[pc++] & 0xFF); result = (gData.cp != end && chars[gData.cp] == matchCh); if (result) { gData.cp++; } } break; case REOP_FLAT1i: { char matchCh = (char)(program[pc++] & 0xFF); result = (gData.cp != end && upcase(chars[gData.cp]) == upcase(matchCh)); if (result) { gData.cp++; } } break; case REOP_UCFLAT1: { char matchCh = (char)GET_ARG(program, pc); pc += ARG_LEN; result = (gData.cp != end && chars[gData.cp] == matchCh); if (result) { gData.cp++; } } break; case REOP_UCFLAT1i: { char matchCh = (char)GET_ARG(program, pc); pc += ARG_LEN; result = (gData.cp != end && upcase(chars[gData.cp]) == upcase(matchCh)); if (result) { gData.cp++; } } break; case REOP_ALT: { int nextpc; byte nextop; pushProgState(gData, 0, 0, null, currentContinuation_pc, currentContinuation_op); nextpc = pc + GET_OFFSET(program, pc); nextop = program[nextpc++]; pushBackTrackState(gData, nextop, nextpc); pc += ARG_LEN; op = program[pc++]; } continue; case REOP_JUMP: { int offset; REProgState state = popProgState(gData); currentContinuation_pc = state.continuation_pc; currentContinuation_op = state.continuation_op; offset = GET_OFFSET(program, pc); pc += offset; op = program[pc++]; } continue; case REOP_LPAREN: { int parenIndex = GET_ARG(program, pc); pc += ARG_LEN; gData.set_parens(parenIndex, gData.cp, 0); op = program[pc++]; } continue; case REOP_RPAREN: { int cap_index; int parenIndex = GET_ARG(program, pc); pc += ARG_LEN; cap_index = gData.parens_index(parenIndex); gData.set_parens(parenIndex, cap_index, gData.cp - cap_index); if (parenIndex > gData.lastParen) gData.lastParen = parenIndex; op = program[pc++]; } continue; case REOP_BACKREF: { int parenIndex = GET_ARG(program, pc); pc += ARG_LEN; result = backrefMatcher(gData, parenIndex, chars, end); } break; case REOP_CLASS: { int index = GET_ARG(program, pc); pc += ARG_LEN; if (gData.cp != end) { if (classMatcher(gData, gData.regexp.classList[index], chars[gData.cp])) { gData.cp++; result = true; break; } } result = false; } break; case REOP_ASSERT: case REOP_ASSERT_NOT: { byte testOp; pushProgState(gData, 0, 0, gData.backTrackLast, currentContinuation_pc, currentContinuation_op); if (op == REOP_ASSERT) { testOp = REOP_ASSERTTEST; } else { testOp = REOP_ASSERTNOTTEST; } pushBackTrackState(gData, testOp, pc + GET_OFFSET(program, pc)); pc += ARG_LEN; op = program[pc++]; } continue; case REOP_ASSERTTEST: case REOP_ASSERTNOTTEST: { REProgState state = popProgState(gData); gData.cp = state.index; gData.backTrackLast = state.savedBackTrackLast; currentContinuation_pc = state.continuation_pc; currentContinuation_op = state.continuation_op; if (result) { if (op == REOP_ASSERTTEST) { result = true; } else { result = false; } } else { if (op == REOP_ASSERTTEST) { // Do nothing } else { result = true; } } } break; case REOP_STAR: case REOP_PLUS: case REOP_OPT: case REOP_QUANT: case REOP_MINIMALSTAR: case REOP_MINIMALPLUS: case REOP_MINIMALOPT: case REOP_MINIMALQUANT: { int min, max; boolean greedy = false; switch (op) { case REOP_STAR: greedy = true; // fallthrough case REOP_MINIMALSTAR: min = 0; max = -1; break; case REOP_PLUS: greedy = true; // fallthrough case REOP_MINIMALPLUS: min = 1; max = -1; break; case REOP_OPT: greedy = true; // fallthrough case REOP_MINIMALOPT: min = 0; max = 1; break; case REOP_QUANT: greedy = true; // fallthrough case REOP_MINIMALQUANT: min = GET_ARG(program, pc); pc += ARG_LEN; max = GET_ARG(program, pc); pc += ARG_LEN; break; default: throw Kit.codeBug(); } pushProgState(gData, min, max, null, currentContinuation_pc, currentContinuation_op); if (greedy) { currentContinuation_op = REOP_REPEAT; currentContinuation_pc = pc; pushBackTrackState(gData, REOP_REPEAT, pc); /* Step over <parencount>, <parenindex> & <next> */ pc += 3 * ARG_LEN; op = program[pc++]; } else { if (min != 0) { currentContinuation_op = REOP_MINIMALREPEAT; currentContinuation_pc = pc; /* <parencount> <parenindex> & <next> */ pc += 3 * ARG_LEN; op = program[pc++]; } else { pushBackTrackState(gData, REOP_MINIMALREPEAT, pc); popProgState(gData); pc += 2 * ARG_LEN; // <parencount> & <parenindex> pc = pc + GET_OFFSET(program, pc); op = program[pc++]; } } } continue; case REOP_ENDCHILD: pc = currentContinuation_pc; op = currentContinuation_op; continue; case REOP_REPEAT: { REProgState state = popProgState(gData); if (!result) { // // There's been a failure, see if we have enough // children. // if (state.min == 0) result = true; currentContinuation_pc = state.continuation_pc; currentContinuation_op = state.continuation_op; pc += 2 * ARG_LEN; /* <parencount> & <parenindex> */ pc = pc + GET_OFFSET(program, pc); break; } else { if (state.min == 0 && gData.cp == state.index) { // matched an empty string, that'll get us nowhere result = false; currentContinuation_pc = state.continuation_pc; currentContinuation_op = state.continuation_op; pc += 2 * ARG_LEN; pc = pc + GET_OFFSET(program, pc); break; } int new_min = state.min, new_max = state.max; if (new_min != 0) new_min--; if (new_max != -1) new_max--; if (new_max == 0) { result = true; currentContinuation_pc = state.continuation_pc; currentContinuation_op = state.continuation_op; pc += 2 * ARG_LEN; pc = pc + GET_OFFSET(program, pc); break; } pushProgState(gData, new_min, new_max, null, state.continuation_pc, state.continuation_op); currentContinuation_op = REOP_REPEAT; currentContinuation_pc = pc; pushBackTrackState(gData, REOP_REPEAT, pc); int parenCount = GET_ARG(program, pc); pc += ARG_LEN; int parenIndex = GET_ARG(program, pc); pc += 2 * ARG_LEN; op = program[pc++]; for (int k = 0; k < parenCount; k++) { gData.set_parens(parenIndex + k, -1, 0); } } } continue; case REOP_MINIMALREPEAT: { REProgState state = popProgState(gData); if (!result) { // // Non-greedy failure - try to consume another child. // if (state.max == -1 || state.max > 0) { pushProgState(gData, state.min, state.max, null, state.continuation_pc, state.continuation_op); currentContinuation_op = REOP_MINIMALREPEAT; currentContinuation_pc = pc; int parenCount = GET_ARG(program, pc); pc += ARG_LEN; int parenIndex = GET_ARG(program, pc); pc += 2 * ARG_LEN; for (int k = 0; k < parenCount; k++) { gData.set_parens(parenIndex + k, -1, 0); } op = program[pc++]; continue; } else { // Don't need to adjust pc since we're going to pop. currentContinuation_pc = state.continuation_pc; currentContinuation_op = state.continuation_op; break; } } else { if (state.min == 0 && gData.cp == state.index) { // Matched an empty string, that'll get us nowhere. result = false; currentContinuation_pc = state.continuation_pc; currentContinuation_op = state.continuation_op; break; } int new_min = state.min, new_max = state.max; if (new_min != 0) new_min--; if (new_max != -1) new_max--; pushProgState(gData, new_min, new_max, null, state.continuation_pc, state.continuation_op); if (new_min != 0) { currentContinuation_op = REOP_MINIMALREPEAT; currentContinuation_pc = pc; int parenCount = GET_ARG(program, pc); pc += ARG_LEN; int parenIndex = GET_ARG(program, pc); pc += 2 * ARG_LEN; for (int k = 0; k < parenCount; k++) { gData.set_parens(parenIndex + k, -1, 0); } op = program[pc++]; } else { currentContinuation_pc = state.continuation_pc; currentContinuation_op = state.continuation_op; pushBackTrackState(gData, REOP_MINIMALREPEAT, pc); popProgState(gData); pc += 2 * ARG_LEN; pc = pc + GET_OFFSET(program, pc); op = program[pc++]; } continue; } } case REOP_END: return true; default: throw Kit.codeBug(); } /* * If the match failed and there's a backtrack option, take it. * Otherwise this is a complete and utter failure. */ if (!result) { REBackTrackData backTrackData = gData.backTrackLast; if (backTrackData != null) { gData.backTrackLast = backTrackData.previous; gData.lastParen = backTrackData.lastParen; // XXX: If backTrackData will no longer be used, then // there is no need to clone backTrackData.parens if (backTrackData.parens != null) { gData.parens = (long[])backTrackData.parens.clone(); } gData.cp = backTrackData.cp; for (int k = 0; k < backTrackData.precedingStateTop; k++) gData.stateStack[k] = backTrackData.precedingState[k]; gData.stateStackTop = backTrackData.precedingStateTop + 1; gData.stateStack[gData.stateStackTop - 1] = backTrackData.currentState; currentContinuation_op = gData.stateStack[gData.stateStackTop - 1].continuation_op; currentContinuation_pc = gData.stateStack[gData.stateStackTop - 1].continuation_pc; pc = backTrackData.continuation_pc; op = backTrackData.continuation_op; continue; } else return false; } /* * Continue with the expression. If this the end of the child, use * the current continuation. */ op = program[pc++]; if (op == REOP_ENDCHILD) { pc = currentContinuation_pc; op = currentContinuation_op; } } } | 47609 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47609/21f0e29bbdfc8503803ff1fb05a60d0d11f579d5/NativeRegExp.java/clean/js/rhino/src/org/mozilla/javascript/regexp/NativeRegExp.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1836,
862,
858,
16651,
12,
862,
5160,
751,
314,
751,
16,
1149,
8526,
5230,
16,
509,
679,
13,
565,
288,
3639,
509,
6125,
273,
374,
31,
3639,
1160,
5402,
8526,
273,
314,
751,
18,
17745,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1836,
862,
858,
16651,
12,
862,
5160,
751,
314,
751,
16,
1149,
8526,
5230,
16,
509,
679,
13,
565,
288,
3639,
509,
6125,
273,
374,
31,
3639,
1160,
5402,
8526,
273,
314,
751,
18,
17745,
... |
Oplan plan = PSPOplanUtilities.getOplan(psc); Enumeration org_activities = plan.getOrgActivities(); while(org_activities.hasMoreElements() ) { OrgActivity org = (OrgActivity)org_activities.nextElement(); if(org.getOrgID().equals(orgID) && org.getActivityType().equals(activityType)) | Collection orgActivities = PSPOplanUtilities.getOrgActivities(psc, orgID ); for (Iterator iterator = orgActivities.iterator(); iterator.hasNext();) { OrgActivity org = (OrgActivity)iterator.next(); if (org.getActivityType().equals(activityType)) | private OrgActivity getOrgActivityWith(String orgID,String activityType,PlanServiceContext psc) { Oplan plan = PSPOplanUtilities.getOplan(psc); Enumeration org_activities = plan.getOrgActivities(); while(org_activities.hasMoreElements() ) { OrgActivity org = (OrgActivity)org_activities.nextElement(); if(org.getOrgID().equals(orgID) && org.getActivityType().equals(activityType)) return org; } return null; } | 7171 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7171/afef3c0a8e975f740b420d451ebc1861b128f8c7/PSP_Closure.java/buggy/glm/src/org/cougaar/domain/mlm/ui/psp/plan/PSP_Closure.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
8533,
6193,
336,
6001,
6193,
1190,
12,
780,
2358,
734,
16,
780,
5728,
559,
16,
5365,
1179,
1042,
293,
1017,
13,
225,
288,
565,
531,
7088,
4995,
273,
26320,
2419,
7088,
11864,
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,
8533,
6193,
336,
6001,
6193,
1190,
12,
780,
2358,
734,
16,
780,
5728,
559,
16,
5365,
1179,
1042,
293,
1017,
13,
225,
288,
565,
531,
7088,
4995,
273,
26320,
2419,
7088,
11864,
18,
... |
Thread.sleep(1000); | Thread.sleep(250); | public void run() { Runtime r = Runtime.getRuntime(); while(true) { try { Thread.sleep(1000); } catch (InterruptedException e) { // Ignore } Logger.minor(this, "Memory in use: "+(r.totalMemory()-r.freeMemory())); } } | 56348 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56348/ced3795ecc2b20f014f9a19e382925422ae80af4/Node.java/clean/src/freenet/node/Node.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
918,
1086,
1435,
288,
1082,
202,
5576,
436,
273,
2509,
18,
588,
5576,
5621,
1082,
202,
17523,
12,
3767,
13,
288,
9506,
202,
698,
288,
6862,
202,
3830,
18,
19607,
12,
18088,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1086,
1435,
288,
1082,
202,
5576,
436,
273,
2509,
18,
588,
5576,
5621,
1082,
202,
17523,
12,
3767,
13,
288,
9506,
202,
698,
288,
6862,
202,
3830,
18,
19607,
12,
18088,
1... |
for(ISeq s = seq(), ms = ((IPersistentCollection)obj).seq();s!=null;s = s.rest(), ms = ms.rest()) | ISeq ms = ((IPersistentCollection)obj).seq(); for(int i=0;i<count();i++, ms = ms.rest()) | public boolean equals(Object obj) { if(obj instanceof IPersistentArray) { IPersistentArray ma = (IPersistentArray) obj; if(ma.count() != count()) return false; for(int i=0;i<count();i++) { if(!RT.equal(nth(i),ma.nth(i))) return false; } } else { if(!(obj instanceof Sequential)) return false; for(ISeq s = seq(), ms = ((IPersistentCollection)obj).seq();s!=null;s = s.rest(), ms = ms.rest()) { if(ms == null || !RT.equal(s.first(),ms.first())) return false; } } return true;} | 51883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51883/be12a746746c53c1f00758df7daa1fa5edc03935/APersistentArray.java/clean/src/jvm/clojure/lang/APersistentArray.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
1250,
1606,
12,
921,
1081,
13,
288,
565,
309,
12,
2603,
1276,
2971,
6572,
1076,
13,
3639,
288,
3639,
2971,
6572,
1076,
10843,
273,
261,
2579,
6572,
1076,
13,
1081,
31,
3639,
309,
12,
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,
1071,
1250,
1606,
12,
921,
1081,
13,
288,
565,
309,
12,
2603,
1276,
2971,
6572,
1076,
13,
3639,
288,
3639,
2971,
6572,
1076,
10843,
273,
261,
2579,
6572,
1076,
13,
1081,
31,
3639,
309,
12,
2... |
_cache.interruptDownload(true); | _cache.interruptDownload(false); | private void checkCurrentFrame() { _nextFrame = getFrame(_level, currentTime() + _lookahead); Client.out.println(Calendar.getInstance().getTime() + ": next frame is: " + _nextFrame); if (_nextFrame == null) { Client.out.println("Are we at the end of the Video?"); _isActive = false; return; } // if time has changed, and we need to show a new frame // if (!_adjustingFrame && _nextFrame.getStart() < _neededFrame.getStart()) if (_neededFrame != _nextFrame) { if (_currentFrame != null && _currentFrame != _neededFrame && !_cache.isDownloaded(_nextFrame.getNum() + IMAGE_FORMAT)) { // 999 Client.err.println("missed a frame! " + _neededFrame + " interrupting"); System.out.println("missed a frame! " + _neededFrame.getNum() + " interrupting"); probe.endTimeProbe(0, _clock.currentTime(), SienaConstants.AI2TV_FRAME_MISSED); _cache.interruptDownload(true); } _neededFrame = _nextFrame; } if (_currentFrame == null || _currentFrame.getNum() != _neededFrame.getNum()) { if (!probe.getProbeStatus(0)){ probe.startTimeProbe(0, _clock.currentTime()); } // Client.debug.println("Time is: " + currentTime() + " trying to show frame: " + _neededFrame.getNum()); if (_cache.isDownloaded(_neededFrame.getNum() + IMAGE_FORMAT)) { // then show it. Client.debug.println(Calendar.getInstance().getTime() + ": showing new frame: " +_neededFrame.getNum() + IMAGE_FORMAT); // probe.startTimeProbe(0, (double)_neededFrame.getStart() * 1000 / _frameRate); _viewer.setNewFrame(true); if (_viewer.displayImage(_cacheDir + _neededFrame.getNum() + IMAGE_FORMAT)){ _currentFrame = _neededFrame; // if the cache is downloading frames for a different level, then // we need to decrement from that number if (_cache.getLevel() != _level) _reserveFrames--; // from here, the Viewer tries to load in the image, and calls this object's // imageShown method after the image is actually painted on the screen. } else { ; // we haven't loaded it yet } } else { // _viewer.displayImage("ai2tv_loading.jpg"); Client.out.println(_neededFrame.getNum() + ".jpg was not downloaded in time for showing!"); } } // } } | 14573 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/14573/23a6ad83ba34f9f490d9124b743266402cc735fd/Client.java/clean/client/Client.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
866,
3935,
3219,
1435,
288,
565,
389,
4285,
3219,
273,
25396,
24899,
2815,
16,
6680,
1435,
397,
389,
7330,
11617,
1769,
565,
2445,
18,
659,
18,
8222,
12,
7335,
18,
588,
1442,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
866,
3935,
3219,
1435,
288,
565,
389,
4285,
3219,
273,
25396,
24899,
2815,
16,
6680,
1435,
397,
389,
7330,
11617,
1769,
565,
2445,
18,
659,
18,
8222,
12,
7335,
18,
588,
1442,
... |
return ("6.4"); | return ("6.5.2"); | public String getDatabaseProductVersion() throws SQLException { return ("6.4"); } | 45534 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45534/24c82830cf8e7cc6d378c622ef1028937a4ee488/DatabaseMetaData.java/buggy/src/interfaces/jdbc/postgresql/jdbc2/DatabaseMetaData.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
514,
11263,
4133,
1444,
1435,
1216,
6483,
225,
288,
565,
327,
7566,
26,
18,
25,
18,
22,
8863,
225,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
514,
11263,
4133,
1444,
1435,
1216,
6483,
225,
288,
565,
327,
7566,
26,
18,
25,
18,
22,
8863,
225,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
public Experimenter lookupExperimenter(final String omeName) { Experimenter e = iQuery.execute( new UserQ( new Parameters( ) .addString("name",omeName))); if (e == null) { throw new ApiUsageException("No such experimenter: " + omeName); } | public Experimenter lookupExperimenter(final String omeName) { Experimenter e = iQuery.execute(new UserQ(new Parameters().addString( "name", omeName))); | public Experimenter lookupExperimenter(final String omeName) { Experimenter e = iQuery.execute( new UserQ( new Parameters( ) .addString("name",omeName))); if (e == null) { throw new ApiUsageException("No such experimenter: " + omeName); } return e; } | 55636 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55636/7e7c45d25ea1bbef3485ae116b3eb108d9f6f5ef/AdminImpl.java/buggy/components/server/src/ome/logic/AdminImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1312,
457,
381,
2328,
3689,
424,
457,
381,
2328,
12,
6385,
514,
320,
3501,
461,
13,
565,
288,
377,
202,
424,
457,
381,
2328,
425,
273,
277,
1138,
18,
8837,
12,
377,
1082,
202,
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,
1312,
457,
381,
2328,
3689,
424,
457,
381,
2328,
12,
6385,
514,
320,
3501,
461,
13,
565,
288,
377,
202,
424,
457,
381,
2328,
425,
273,
277,
1138,
18,
8837,
12,
377,
1082,
202,
2... |
negate=-1; | protected String dateToString(DateTimeData date) { StringBuffer message = new StringBuffer(30); int negate = 1; if ( date.year<0 ) { message.append('-'); negate=-1; } message.append('P'); message.append(negate * date.year); message.append('Y'); message.append(negate * date.month); message.append('M'); message.append(negate * date.day); message.append('D'); message.append('T'); message.append(negate * date.hour); message.append('H'); message.append(negate * date.minute); message.append('M'); message.append(negate * date.second); message.append('S'); return message.toString(); } | 4434 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4434/5ccad056fa983f0878f55e02837fcc4d8e8ae96e/DurationDV.java/clean/src/org/apache/xerces/impl/dv/xs/DurationDV.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
514,
1509,
5808,
12,
5096,
751,
1509,
13,
288,
3639,
6674,
883,
273,
394,
6674,
12,
5082,
1769,
3639,
509,
15626,
273,
404,
31,
3639,
309,
261,
1509,
18,
6874,
32,
20,
262,
288,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
514,
1509,
5808,
12,
5096,
751,
1509,
13,
288,
3639,
6674,
883,
273,
394,
6674,
12,
5082,
1769,
3639,
509,
15626,
273,
404,
31,
3639,
309,
261,
1509,
18,
6874,
32,
20,
262,
288,
... | |
FunDefBase(FunDef funDef) { this(funDef.getName(), funDef.getSignature(), funDef.getDescription(), funDef.getSyntax(), funDef.getReturnCategory(), funDef.getParameterCategories()); | FunDefBase( String name, String signature, String description, Syntax syntax, int returnCategory, int[] parameterCategories) { this.name = name; Util.discard(signature); this.description = description; this.flags = syntax.ordinal; this.returnCategory = returnCategory; this.parameterCategories = parameterCategories; | FunDefBase(FunDef funDef) { this(funDef.getName(), funDef.getSignature(), funDef.getDescription(), funDef.getSyntax(), funDef.getReturnCategory(), funDef.getParameterCategories()); } | 37907 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/37907/12224d87549282df37af973421074cdd36b5581a/FunDefBase.java/buggy/src/main/mondrian/olap/fun/FunDefBase.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
478,
318,
3262,
2171,
12,
22783,
3262,
9831,
3262,
13,
288,
3639,
333,
12,
12125,
3262,
18,
17994,
9334,
9831,
3262,
18,
588,
5374,
9334,
7734,
9831,
3262,
18,
588,
3291,
9334,
9831,
3262... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
478,
318,
3262,
2171,
12,
22783,
3262,
9831,
3262,
13,
288,
3639,
333,
12,
12125,
3262,
18,
17994,
9334,
9831,
3262,
18,
588,
5374,
9334,
7734,
9831,
3262,
18,
588,
3291,
9334,
9831,
3262... |
JLabel message = pane.msg != null ? new JLabel((String)pane.msg) : null; | JLabel message = pane.getMessage() != null ? new JLabel((String)pane.getMessage()) : null; | public void installUI(JComponent c) { super.installUI(c); pane = (JOptionPane)c; System.out.println(" -------------: " + pane); JLabel message = pane.msg != null ? new JLabel((String)pane.msg) : null; JButton ok_button = new JButton("Ok"); ok_button.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent a) { System.out.println("ACTION ---> " + a); // pane.dialog.dispose(); if (pane.dialog.isModal()) { System.out.println("modal dialog !!"); pane.dialog.setModal(false); } pane.dialog.setVisible(false); } }); if (pane.args != null) { for (int i=0; i<pane.args.length; i++) { Object o = pane.args[i]; if (o != null) { if (o instanceof String) { String s = (String) o; JLabel m = new JLabel(s); pane.add(m); } else if (o instanceof Component) { Component com = (Component) o; pane.add(com); } else { System.out.println("UNRECOGNIZED ARG: " + o); } } } } pane.add(message); pane.add(ok_button); } | 1043 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1043/aa02dd93620b2e2adc36b239c79543906d0e6565/BasicOptionPaneUI.java/clean/libjava/javax/swing/plaf/basic/BasicOptionPaneUI.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
3799,
5370,
12,
46,
1841,
276,
13,
565,
288,
202,
9565,
18,
5425,
5370,
12,
71,
1769,
202,
29009,
273,
261,
46,
1895,
8485,
13,
71,
31,
202,
3163,
18,
659,
18,
8222,
2932,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3799,
5370,
12,
46,
1841,
276,
13,
565,
288,
202,
9565,
18,
5425,
5370,
12,
71,
1769,
202,
29009,
273,
261,
46,
1895,
8485,
13,
71,
31,
202,
3163,
18,
659,
18,
8222,
2932,
... |
pc = finallyStack[tryStackTop]; | pc = finallyStack[tryStackTop - 1]; | public static Object interpret(InterpreterData theData) throws JavaScriptException { Object lhs; Object[] stack = new Object[theData.itsMaxStack]; int stackTop = -1; byte[] iCode = theData.itsICode; int pc = 0; int iCodeLength = theData.itsICodeTop; Object[] local = null; // used for newtemp/usetemp etc. if (theData.itsMaxLocals > 0) local = new Object[theData.itsMaxLocals]; Object[] vars = null; int i = theData.itsVariableTable.size(); if (i > 0) { vars = new Object[i]; for (i = 0; i < theData.itsVariableTable.getParameterCount(); i++) { if (i >= theData.itsInArgs.length) vars[i] = Undefined.instance; else vars[i] = theData.itsInArgs[i]; } for ( ; i < vars.length; i++) vars[i] = Undefined.instance; } Context cx = theData.itsCX; Scriptable scope = theData.itsScope; if (theData.itsNestedFunctions != null) { for (i = 0; i < theData.itsNestedFunctions.length; i++) createFunctionObject(theData.itsNestedFunctions[i], scope); } Object id; Object rhs; int count; int slot; String name = null; Object[] outArgs; int lIntValue; long lLongValue; int rIntValue; int[] catchStack = null; int[] finallyStack = null; Scriptable[] scopeStack = null; int tryStackTop = 0; if (theData.itsMaxTryDepth > 0) { catchStack = new int[theData.itsMaxTryDepth]; finallyStack = new int[theData.itsMaxTryDepth]; scopeStack = new Scriptable[theData.itsMaxTryDepth]; } /* Save the security domain. Must restore upon normal exit. * If we exit the interpreter loop by throwing an exception, * set cx.interpreterSecurityDomain to null, and require the * catching function to restore it. */ Object savedSecurityDomain = cx.interpreterSecurityDomain; cx.interpreterSecurityDomain = theData.securityDomain; Object result = Undefined.instance; while (pc < iCodeLength) { try { switch ((int)(iCode[pc] & 0xff)) { case TokenStream.ENDTRY : tryStackTop--; break; case TokenStream.TRY : i = getTarget(iCode, pc + 1); if (i == pc) i = 0; catchStack[tryStackTop] = i; i = getTarget(iCode, pc + 3); if (i == (pc + 2)) i = 0; finallyStack[tryStackTop] = i; scopeStack[tryStackTop++] = scope; pc += 4; break; case TokenStream.GE : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.cmp_LEB(rhs, lhs); break; case TokenStream.LE : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.cmp_LEB(lhs, rhs); break; case TokenStream.GT : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.cmp_LTB(rhs, lhs); break; case TokenStream.LT : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.cmp_LTB(lhs, rhs); break; case TokenStream.IN : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = new Boolean(ScriptRuntime.in(lhs, rhs)); break; case TokenStream.INSTANCEOF : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = new Boolean(ScriptRuntime.instanceOf(lhs, rhs)); break; case TokenStream.EQ : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.eqB(rhs, lhs); break; case TokenStream.NE : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.neB(lhs, rhs); break; case TokenStream.SHEQ : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.seqB(lhs, rhs); break; case TokenStream.SHNE : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.sneB(lhs, rhs); break; case TokenStream.IFNE : if (!ScriptRuntime.toBoolean(stack[stackTop--])) { pc = getTarget(iCode, pc + 1); continue; } pc += 2; break; case TokenStream.IFEQ : if (ScriptRuntime.toBoolean(stack[stackTop--])) { pc = getTarget(iCode, pc + 1); continue; } pc += 2; break; case TokenStream.GOTO : pc = getTarget(iCode, pc + 1); continue; case TokenStream.GOSUB : stack[++stackTop] = new Integer(pc + 3); pc = getTarget(iCode, pc + 1); continue; case TokenStream.RETSUB : slot = (iCode[++pc] & 0xFF); pc = ((Integer)local[slot]).intValue(); continue; case TokenStream.POP : stackTop--; break; case TokenStream.DUP : stack[stackTop + 1] = stack[stackTop]; stackTop++; break; case TokenStream.POPV : result = stack[stackTop--]; break; case TokenStream.RETURN : result = stack[stackTop--]; pc = getTarget(iCode, pc + 1); break; case TokenStream.BITNOT : rIntValue = ScriptRuntime.toInt32(stack[stackTop]); stack[stackTop] = new Double(~rIntValue); break; case TokenStream.BITAND : rIntValue = ScriptRuntime.toInt32(stack[stackTop--]); lIntValue = ScriptRuntime.toInt32(stack[stackTop]); stack[stackTop] = new Double(lIntValue & rIntValue); break; case TokenStream.BITOR : rIntValue = ScriptRuntime.toInt32(stack[stackTop--]); lIntValue = ScriptRuntime.toInt32(stack[stackTop]); stack[stackTop] = new Double(lIntValue | rIntValue); break; case TokenStream.BITXOR : rIntValue = ScriptRuntime.toInt32(stack[stackTop--]); lIntValue = ScriptRuntime.toInt32(stack[stackTop]); stack[stackTop] = new Double(lIntValue ^ rIntValue); break; case TokenStream.LSH : rIntValue = ScriptRuntime.toInt32(stack[stackTop--]); lIntValue = ScriptRuntime.toInt32(stack[stackTop]); stack[stackTop] = new Double(lIntValue << rIntValue); break; case TokenStream.RSH : rIntValue = ScriptRuntime.toInt32(stack[stackTop--]); lIntValue = ScriptRuntime.toInt32(stack[stackTop]); stack[stackTop] = new Double(lIntValue >> rIntValue); break; case TokenStream.URSH : rIntValue = (ScriptRuntime.toInt32(stack[stackTop--]) & 0x1F); lLongValue = ScriptRuntime.toUint32(stack[stackTop]); stack[stackTop] = new Double(lLongValue >>> rIntValue); break; case TokenStream.ADD : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.add(lhs, rhs); break; case TokenStream.SUB : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = new Double(ScriptRuntime.toNumber(lhs) - ScriptRuntime.toNumber(rhs)); break; case TokenStream.NEG : rhs = stack[stackTop]; stack[stackTop] = new Double(-ScriptRuntime.toNumber(rhs)); break; case TokenStream.POS : rhs = stack[stackTop]; stack[stackTop] = new Double(ScriptRuntime.toNumber(rhs)); break; case TokenStream.MUL : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = new Double(ScriptRuntime.toNumber(lhs) * ScriptRuntime.toNumber(rhs)); break; case TokenStream.DIV : rhs = stack[stackTop--]; lhs = stack[stackTop]; // Detect the divide by zero or let Java do it ? stack[stackTop] = new Double(ScriptRuntime.toNumber(lhs) / ScriptRuntime.toNumber(rhs)); break; case TokenStream.MOD : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = new Double(ScriptRuntime.toNumber(lhs) % ScriptRuntime.toNumber(rhs)); break; case TokenStream.BINDNAME : stack[++stackTop] = ScriptRuntime.bind(scope, getString(theData.itsStringTable, iCode, pc + 1)); pc += 2; break; case TokenStream.GETBASE : stack[++stackTop] = ScriptRuntime.getBase(scope, getString(theData.itsStringTable, iCode, pc + 1)); pc += 2; break; case TokenStream.SETNAME : rhs = stack[stackTop--]; lhs = stack[stackTop]; // what about class cast exception here ? stack[stackTop] = ScriptRuntime.setName((Scriptable)lhs, rhs, scope, getString(theData.itsStringTable, iCode, pc + 1)); pc += 2; break; case TokenStream.DELPROP : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.delete(lhs, rhs); break; case TokenStream.GETPROP : name = (String)stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.getProp(lhs, name, scope); break; case TokenStream.SETPROP : rhs = stack[stackTop--]; name = (String)stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.setProp(lhs, name, rhs, scope); break; case TokenStream.GETELEM : id = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.getElem(lhs, id, scope); break; case TokenStream.SETELEM : rhs = stack[stackTop--]; id = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.setElem(lhs, id, rhs, scope); break; case TokenStream.PROPINC : name = (String)stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.postIncrement(lhs, name, scope); break; case TokenStream.PROPDEC : name = (String)stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.postDecrement(lhs, name, scope); break; case TokenStream.ELEMINC : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.postIncrementElem(lhs, rhs, scope); break; case TokenStream.ELEMDEC : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.postDecrementElem(lhs, rhs, scope); break; case TokenStream.GETTHIS : lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.getThis((Scriptable)lhs); break; case TokenStream.NEWTEMP : lhs = stack[stackTop]; slot = (iCode[++pc] & 0xFF); local[slot] = lhs; break; case TokenStream.USETEMP : slot = (iCode[++pc] & 0xFF); stack[++stackTop] = local[slot]; break; case TokenStream.CALLSPECIAL : i = (iCode[pc + 1] << 8) | (iCode[pc + 2] & 0xFF); name = getString(theData.itsStringTable, iCode, pc + 3); count = (iCode[pc + 5] << 8) | (iCode[pc + 6] & 0xFF); outArgs = new Object[count]; for (i = count - 1; i >= 0; i--) outArgs[i] = stack[stackTop--]; rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.callSpecial( cx, lhs, rhs, outArgs, theData.itsThisObj, scope, name, i); pc += 6; break; case TokenStream.CALL : count = (iCode[pc + 1] << 8) | (iCode[pc + 2] & 0xFF); outArgs = new Object[count]; for (i = count - 1; i >= 0; i--) outArgs[i] = stack[stackTop--]; rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.call(cx, lhs, rhs, outArgs); pc += 2; break; case TokenStream.NEW : count = (iCode[pc + 1] << 8) | (iCode[pc + 2] & 0xFF); outArgs = new Object[count]; for (i = count - 1; i >= 0; i--) outArgs[i] = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.newObject(cx, lhs, outArgs, scope); pc += 2; break; case TokenStream.TYPEOF : lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.typeof(lhs); break; case TokenStream.TYPEOFNAME : name = getString(theData.itsStringTable, iCode, pc + 1); stack[++stackTop] = ScriptRuntime.typeofName(scope, name); pc += 2; break; case TokenStream.STRING : stack[++stackTop] = getString(theData.itsStringTable, iCode, pc + 1); pc += 2; break; case TokenStream.NUMBER : stack[++stackTop] = getNumber(theData.itsNumberTable, iCode, pc + 1); pc += 2; break; case TokenStream.NAME : stack[++stackTop] = ScriptRuntime.name(scope, getString(theData.itsStringTable, iCode, pc + 1)); pc += 2; break; case TokenStream.NAMEINC : stack[++stackTop] = ScriptRuntime.postIncrement(scope, getString(theData.itsStringTable, iCode, pc + 1)); pc += 2; break; case TokenStream.NAMEDEC : stack[++stackTop] = ScriptRuntime.postDecrement(scope, getString(theData.itsStringTable, iCode, pc + 1)); pc += 2; break; case TokenStream.SETVAR : lhs = stack[stackTop]; slot = (iCode[++pc] & 0xFF); vars[slot] = lhs; break; case TokenStream.GETVAR : slot = (iCode[++pc] & 0xFF); stack[++stackTop] = vars[slot]; break; case TokenStream.VARINC : slot = (iCode[++pc] & 0xFF); stack[++stackTop] = vars[slot]; vars[slot] = ScriptRuntime.postIncrement(vars[slot]); break; case TokenStream.VARDEC : slot = (iCode[++pc] & 0xFF); stack[++stackTop] = vars[slot]; vars[slot] = ScriptRuntime.postDecrement(vars[slot]); break; case TokenStream.ZERO : stack[++stackTop] = zero; break; case TokenStream.ONE : stack[++stackTop] = one; break; case TokenStream.NULL : stack[++stackTop] = null; break; case TokenStream.THIS : stack[++stackTop] = theData.itsThisObj; break; case TokenStream.FALSE : stack[++stackTop] = Boolean.FALSE; break; case TokenStream.TRUE : stack[++stackTop] = Boolean.TRUE; break; case TokenStream.UNDEFINED : stack[++stackTop] = Undefined.instance; break; case TokenStream.THROW : cx.interpreterSecurityDomain = null; throw new JavaScriptException(stack[stackTop--]); case TokenStream.JTHROW : cx.interpreterSecurityDomain = null; lhs = stack[stackTop--]; if (lhs instanceof JavaScriptException) throw (JavaScriptException)lhs; else throw (RuntimeException)lhs; case TokenStream.ENTERWITH : lhs = stack[stackTop--]; scope = ScriptRuntime.enterWith(lhs, scope); break; case TokenStream.LEAVEWITH : scope = ScriptRuntime.leaveWith(scope); break; case TokenStream.NEWSCOPE : stack[++stackTop] = ScriptRuntime.newScope(); break; case TokenStream.ENUMINIT : slot = (iCode[++pc] & 0xFF); lhs = stack[stackTop--]; local[slot] = ScriptRuntime.initEnum(lhs, scope); break; case TokenStream.ENUMNEXT : slot = (iCode[++pc] & 0xFF); stack[++stackTop] = ScriptRuntime.nextEnum((Enumeration)local[slot]); break; case TokenStream.GETPROTO : lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.getProto(lhs, scope); break; case TokenStream.GETPARENT : lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.getParent(lhs); break; case TokenStream.GETSCOPEPARENT : lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.getParent(lhs, scope); break; case TokenStream.SETPROTO : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.setProto(lhs, rhs, scope); break; case TokenStream.SETPARENT : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.setParent(lhs, rhs, scope); break; case TokenStream.SCOPE : stack[++stackTop] = scope; break; case TokenStream.CLOSURE : i = (iCode[pc + 1] << 8) | (iCode[pc + 2] & 0xFF); stack[++stackTop] = new NativeClosure(cx, scope, theData.itsNestedFunctions[i]); pc += 2; break; case TokenStream.OBJECT : i = (iCode[pc + 1] << 8) | (iCode[pc + 2] & 0xFF); stack[++stackTop] = theData.itsRegExpLiterals[i]; pc += 2; break; case TokenStream.LINE : i = (iCode[pc + 1] << 8) | (iCode[pc + 2] & 0xFF); cx.interpreterLine = i; pc += 2; break; case TokenStream.SOURCEFILE : cx.interpreterSourceFile = theData.itsSourceFile; break; default : dumpICode(theData); throw new RuntimeException("Unknown icode : " + (iCode[pc] & 0xff) + " @ pc : " + pc); } pc++; } catch (EcmaError ee) { // an offical ECMA error object, // handle as if it were a JavaScriptException stackTop = 0; cx.interpreterSecurityDomain = null; if (tryStackTop > 0) { pc = catchStack[--tryStackTop]; scope = scopeStack[tryStackTop]; if (pc == 0) { pc = finallyStack[tryStackTop]; if (pc == 0) throw ee; stack[0] = ee.getErrorObject(); } else stack[0] = ee.getErrorObject(); } else throw ee; // We caught an exception; restore this function's // security domain. cx.interpreterSecurityDomain = theData.securityDomain; } catch (JavaScriptException jsx) { stackTop = 0; cx.interpreterSecurityDomain = null; if (tryStackTop > 0) { pc = catchStack[--tryStackTop]; scope = scopeStack[tryStackTop]; if (pc == 0) { pc = finallyStack[tryStackTop]; if (pc == 0) throw jsx; stack[0] = jsx; } else stack[0] = ScriptRuntime.unwrapJavaScriptException(jsx); } else throw jsx; // We caught an exception; restore this function's // security domain. cx.interpreterSecurityDomain = theData.securityDomain; } /* debug only, will be going soon catch (ArrayIndexOutOfBoundsException oob) { System.out.println("OOB @ " + pc + " " + oob + " in " + theData.itsName + " " + oob.getMessage()); throw oob; } */ catch (RuntimeException jx) { cx.interpreterSecurityDomain = null; if (tryStackTop > 0) { stackTop = 0; stack[0] = jx; pc = finallyStack[--tryStackTop]; scope = scopeStack[tryStackTop]; if (pc == 0) throw jx; } else throw jx; // We caught an exception; restore this function's // security domain. cx.interpreterSecurityDomain = theData.securityDomain; } } cx.interpreterSecurityDomain = savedSecurityDomain; return result; } | 7555 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7555/32feff141e5ccc7b1b5e5423d181b6baf24616a0/Interpreter.java/clean/js/rhino/src/org/mozilla/javascript/Interpreter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1033,
10634,
12,
30010,
751,
326,
751,
13,
3639,
1216,
11905,
503,
565,
288,
3639,
1033,
8499,
31,
3639,
1033,
8526,
2110,
273,
394,
1033,
63,
5787,
751,
18,
1282,
2747,
2624,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1033,
10634,
12,
30010,
751,
326,
751,
13,
3639,
1216,
11905,
503,
565,
288,
3639,
1033,
8499,
31,
3639,
1033,
8526,
2110,
273,
394,
1033,
63,
5787,
751,
18,
1282,
2747,
2624,
... |
if (changed) { | if (changed) { | public void applyEditorValue() { if (editor == null) { return; } // Check if editor has a valid value if (!editor.isValueValid()) { setErrorText(editor.getErrorMessage()); return; } setErrorText(null); // See if the value changed and if so update Object newValue = editor.getValue(); boolean changed = false; if (values.length > 1) { changed = true; } else if (editValue == null) { if (newValue != null) { changed = true; } } else if (!editValue.equals(newValue)) { changed = true; } // Set the editor value if (changed) { setValue(newValue); } } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/1ccb6f8ddf35b3b40ebd3ebe3e7982aa947ec045/PropertySheetEntry.java/clean/bundles/org.eclipse.ui.views/src/org/eclipse/ui/views/properties/PropertySheetEntry.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
2230,
6946,
620,
1435,
288,
3639,
309,
261,
9177,
422,
446,
13,
288,
1082,
202,
2463,
31,
202,
202,
97,
3639,
368,
2073,
309,
4858,
711,
279,
923,
460,
3639,
309,
16051,
9177... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2230,
6946,
620,
1435,
288,
3639,
309,
261,
9177,
422,
446,
13,
288,
1082,
202,
2463,
31,
202,
202,
97,
3639,
368,
2073,
309,
4858,
711,
279,
923,
460,
3639,
309,
16051,
9177... |
pagebreakAfterCombo.select( index ); | if(index < 0 || index >= pagebreakAfterCombo.getItemCount( )) { pagebreakAfterCombo.setText( inputGroup.getPageBreakAfter( ) ); }else { pagebreakAfterCombo.select( index ); } | protected boolean initDialog( ) { if ( inputGroup.getName( ) != null ) { nameEditor.setText( inputGroup.getName( ) ); } refreshColumnList( ); setKeyExpression( inputGroup.getKeyExpr( ) ); int index = getIntervalTypeIndex( inputGroup.getInterval( ) ); intervalType.select( index ); if ( index == 0 ) { intervalRange.setEnabled( false ); intervalBaseButton.setEnabled( false ); intervalBaseText.setEnabled( false ); } else { intervalRange.setEnabled( true ); intervalRange.setSelection( inputGroup.getIntervalRange( ) ); if ( getColumnType( ) == String.class ) { intervalBaseButton.setEnabled( false ); intervalBaseText.setEnabled( false ); } else { intervalBaseButton.setEnabled( true ); intervalBaseButton.setSelection( inputGroup.getIntervalBase( ) != null ); intervalBaseText.setEnabled( intervalBaseButton.getSelection( ) ); if ( inputGroup.getIntervalBase( ) != null ) { intervalBaseText.setText( inputGroup.getIntervalBase( ) ); } } } if ( DesignChoiceConstants.SORT_DIRECTION_ASC.equals( inputGroup.getSortDirection( ) ) ) { ascending.setSelection( true ); } else { descending.setSelection( true ); } List list = new ArrayList( 1 ); list.add( inputGroup ); // filterPage.setInput( list ); tocEditor.setText( UIUtil.convertToGUIString( inputGroup.getTocExpression( ) ) ); index = getPagebreakBeforeIndex( inputGroup.getPageBreakBefore( ) ); pagebreakBeforeCombo.select( index ); index = getPagebreakAfterIndex( inputGroup.getPageBreakAfter( ) ); pagebreakAfterCombo.select( index ); if ( inputGroup.repeatHeader( ) ) { repeatHeaderButton.setSelection( true ); } hideDetail.setSelection( inputGroup.hideDetail( ) ); return true; } | 5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/8062f646e1bfa2a19213849ca49e5be100056a20/GroupDialog.java/buggy/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/ui/dialogs/GroupDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
1250,
1208,
6353,
12,
262,
202,
95,
202,
202,
430,
261,
810,
1114,
18,
17994,
12,
262,
480,
446,
262,
202,
202,
95,
1082,
202,
529,
6946,
18,
542,
1528,
12,
810,
1114,
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,
1117,
1250,
1208,
6353,
12,
262,
202,
95,
202,
202,
430,
261,
810,
1114,
18,
17994,
12,
262,
480,
446,
262,
202,
202,
95,
1082,
202,
529,
6946,
18,
542,
1528,
12,
810,
1114,
18,
... |
return dfs.BLOCK_SIZE; | return FSConstants.BLOCK_SIZE; | public long getBlockSize() { return dfs.BLOCK_SIZE; } | 51718 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51718/ba0ca973d8fbf49c1b7c2d29e7763226576364e8/DistributedFileSystem.java/clean/src/java/org/apache/hadoop/dfs/DistributedFileSystem.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1525,
11902,
1225,
1435,
288,
1377,
327,
9247,
2918,
18,
11403,
67,
4574,
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,
... | [
1,
1,
1,
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,
1525,
11902,
1225,
1435,
288,
1377,
327,
9247,
2918,
18,
11403,
67,
4574,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
id + " is not a non-colonized name"); | id + " is not a non-colonized name", inex); | public static Nodes resolve(Document doc, String xptr) throws XPointerSyntaxException, XPointerResourceException { Nodes result = new Nodes(); boolean found = false; xptr = decode(xptr); try { // Is this a shorthand XPointer new Element(xptr); Element identified = findByID(doc.getRootElement(), xptr); if (identified != null) { result.append(identified); return result; } } catch (IllegalNameException ex) { // not a bare name; try element() scheme List elementSchemeData = findElementSchemeData(xptr); if (elementSchemeData.size() == 0) { // This may be a legal XPointer, but it doesn't // have an element() scheme so we can't handle it. throw new XPointerSyntaxException( "No supported XPointer schemes found" ); } for (int i = 0; i < elementSchemeData.size(); i++) { String currentData = (String) (elementSchemeData.get(i)); int[] keys = new int[0]; ParentNode current = doc; if (currentData.indexOf('/') == -1) { // raw id in element like element(f2) try { new Element(currentData); } catch (IllegalNameException inex) { // not a bare name throw new XPointerSyntaxException( "bad element scheme data " + elementSchemeData, inex ); } Element identified = findByID( doc.getRootElement(), currentData); if (identified != null) { if (!found) result.append(identified); found = true; // return result; } } else if (!currentData.startsWith("/")) { String id = currentData.substring( 0, currentData.indexOf('/')); // Check to make sure this is a legal // XML name/ID value try { new Element(id); } catch (IllegalNameException inex) { throw new XPointerSyntaxException( id + " is not a non-colonized name"); } current = findByID(doc.getRootElement(), id); keys = split(currentData.substring( currentData.indexOf('/'))); if (current == null) continue; } else { keys = split(currentData); } for (int j = 0; j < keys.length; j++) { current = findNthChildElement(current, keys[j]); if (current == null) break; } if (current != null) { if (!found) result.append(current); found = true; // return result; } } } if (found) return result; else { // If we get here and still haven't been able to match an // element, the XPointer has failed. throw new XPointerResourceException( "XPointer " + xptr + " did not locate any nodes in the document " + doc.getBaseURI() ); } } | 8327 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8327/5170014fe2f2b2dcb8f897ba7461cd975164f024/XPointer.java/clean/src/nu/xom/xinclude/XPointer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
14037,
2245,
12,
2519,
997,
16,
514,
619,
6723,
13,
4202,
1216,
1139,
4926,
14714,
16,
1139,
4926,
14785,
288,
13491,
14037,
563,
273,
394,
14037,
5621,
3639,
1250,
1392,
273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
14037,
2245,
12,
2519,
997,
16,
514,
619,
6723,
13,
4202,
1216,
1139,
4926,
14714,
16,
1139,
4926,
14785,
288,
13491,
14037,
563,
273,
394,
14037,
5621,
3639,
1250,
1392,
273,
... |
return new SourcePosition(filename, startLine, endLine, startOffset, source.getOffset()); | lastPosition = new SourcePosition(filename, startLine, endLine, startOffset, source.getOffset()); return lastPosition; | public ISourcePosition getPosition(LexerSource source, ISourcePosition startPosition) { int startLine; int startOffset; int endLine = source.getLine(); String filename = source.getFilename(); if (startPosition == null) { startLine = lastPosition.getEndLine(); startOffset = lastPosition.getEndOffset(); } else { startLine = startPosition.getEndLine(); startOffset = startPosition.getEndOffset(); } return new SourcePosition(filename, startLine, endLine, startOffset, source.getOffset()); } | 47134 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47134/b1293eda8454686e846e2a9837b348e2983bb423/SourcePositionFactory.java/clean/src/org/jruby/lexer/yacc/SourcePositionFactory.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
467,
1830,
2555,
14441,
12,
13356,
1830,
1084,
16,
467,
1830,
2555,
23549,
13,
288,
377,
202,
474,
24636,
31,
377,
202,
474,
18245,
31,
377,
202,
474,
31763,
273,
1084,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
467,
1830,
2555,
14441,
12,
13356,
1830,
1084,
16,
467,
1830,
2555,
23549,
13,
288,
377,
202,
474,
24636,
31,
377,
202,
474,
18245,
31,
377,
202,
474,
31763,
273,
1084,
18,
588,
1... |
if (p.isIncluded()) { ary.push(p.getRubyClass()); } else { ary.push(p); } } | if (p.isIncluded()) { ary.push(p.getRubyClass()); } else { ary.push(p); } } | public RubyArray m_ancestors() { RubyArray ary = RubyArray.m_newArray(getRuby()); for (RubyModule p = this; p != null; p = p.getSuperClass()) { if (p.isSingleton()) { continue; } if (p.isIncluded()) { ary.push(p.getRubyClass()); } else { ary.push(p); } } return ary; } | 52337 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52337/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/clean/org/jruby/RubyModule.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
19817,
1076,
312,
67,
304,
11116,
1435,
288,
202,
202,
54,
10340,
1076,
11841,
273,
19817,
1076,
18,
81,
67,
2704,
1076,
12,
588,
54,
10340,
10663,
202,
202,
1884,
261,
54,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
19817,
1076,
312,
67,
304,
11116,
1435,
288,
202,
202,
54,
10340,
1076,
11841,
273,
19817,
1076,
18,
81,
67,
2704,
1076,
12,
588,
54,
10340,
10663,
202,
202,
1884,
261,
54,
10... |
Element kelem = XUtil.getFirstChildElement(element, SchemaSymbols.ELT_KEY, SchemaSymbols.ATT_NAME, | Element kelem = XUtil.getFirstChildElement(element, SchemaSymbols.ELT_KEY, SchemaSymbols.ATT_NAME, | private void traverseKeyRef(Element krelem, XMLElementDecl edecl) throws Exception { // create identity constraint String krname = krelem.getAttribute(SchemaSymbols.ATT_NAME); String kname = krelem.getAttribute(SchemaSymbols.ATT_REFER); if (DEBUG_IDENTITY_CONSTRAINTS) { System.out.println("<IC>: traverseKeyRef(\""+krelem.getNodeName()+"\") ["+krname+','+kname+']'); } // verify that key reference "refer" attribute is valid Element element = (Element)krelem.getParentNode(); Element kelem = XUtil.getFirstChildElement(element, SchemaSymbols.ELT_KEY, SchemaSymbols.ATT_NAME, kname); if (kelem == null) { reportSchemaError(SchemaMessageProvider.KeyRefReferNotFound, new Object[]{krname,kname}); return; } String ename = getElementNameFor(krelem); KeyRef keyRef = new KeyRef(krname, kname, ename); // add to element decl traverseIdentityConstraint(keyRef, krelem); // add key reference to element decl edecl.keyRef.addElement(keyRef); } // traverseKeyRef(Element,XMLElementDecl) | 46079 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46079/0561c4be90e07e6ba8d6b8f42edef5dc8d6d453c/TraverseSchema.java/buggy/src/org/apache/xerces/validators/schema/TraverseSchema.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
10080,
653,
1957,
12,
1046,
417,
266,
3269,
16,
1139,
11155,
3456,
425,
8840,
13,
540,
1216,
1185,
288,
3639,
368,
752,
4215,
4954,
3639,
514,
23953,
529,
273,
417,
266,
3269,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
10080,
653,
1957,
12,
1046,
417,
266,
3269,
16,
1139,
11155,
3456,
425,
8840,
13,
540,
1216,
1185,
288,
3639,
368,
752,
4215,
4954,
3639,
514,
23953,
529,
273,
417,
266,
3269,
... |
SetOfReactions reactionSet = new SetOfReactions(); reactionSet.addReaction(new Reaction()); reactionSet.addReaction(new Reaction()); reactionSet.addReaction(new Reaction()); reactionSet.addReaction(new Reaction()); | SetOfReactions reactionSet = builder.newSetOfReactions(); reactionSet.addReaction(builder.newReaction()); reactionSet.addReaction(builder.newReaction()); reactionSet.addReaction(builder.newReaction()); reactionSet.addReaction(builder.newReaction()); | public void testClone_Reaction() { SetOfReactions reactionSet = new SetOfReactions(); reactionSet.addReaction(new Reaction()); // 1 reactionSet.addReaction(new Reaction()); // 2 reactionSet.addReaction(new Reaction()); // 3 reactionSet.addReaction(new Reaction()); // 4 SetOfReactions clone = (SetOfReactions)reactionSet.clone(); assertEquals(reactionSet.getReactionCount(), clone.getReactionCount()); for (int f = 0; f < reactionSet.getReactionCount(); f++) { for (int g = 0; g < clone.getReactionCount(); g++) { assertNotNull(reactionSet.getReaction(f)); assertNotNull(clone.getReaction(g)); assertNotSame(reactionSet.getReaction(f), clone.getReaction(g)); } } } | 46046 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46046/67261c8143759a6ee4feb79dc1687d6dcfa25f40/SetOfReactionsTest.java/clean/src/org/openscience/cdk/test/SetOfReactionsTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
10930,
67,
21581,
1435,
288,
202,
202,
694,
951,
426,
4905,
12836,
694,
273,
394,
1000,
951,
426,
4905,
5621,
202,
202,
266,
1128,
694,
18,
1289,
21581,
12,
2704,
868,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
10930,
67,
21581,
1435,
288,
202,
202,
694,
951,
426,
4905,
12836,
694,
273,
394,
1000,
951,
426,
4905,
5621,
202,
202,
266,
1128,
694,
18,
1289,
21581,
12,
2704,
868,
... |
protected Item confluence(List items, List itemKeys, Term node, FlowGraph graph) { return confluence(items, node, graph); } | protected abstract Item confluence(List items, Term node, FlowGraph graph); | protected Item confluence(List items, List itemKeys, Term node, FlowGraph graph) { return confluence(items, node, graph); } | 11982 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11982/3bff287c7d8b93054f8272d22f7a916696c97442/DataFlow.java/buggy/src/polyglot/visit/DataFlow.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
4342,
2195,
80,
23209,
12,
682,
1516,
16,
987,
761,
2396,
16,
6820,
756,
16,
9473,
4137,
2667,
13,
288,
3639,
327,
2195,
80,
23209,
12,
3319,
16,
756,
16,
2667,
1769,
377,
289,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
4342,
2195,
80,
23209,
12,
682,
1516,
16,
987,
761,
2396,
16,
6820,
756,
16,
9473,
4137,
2667,
13,
288,
3639,
327,
2195,
80,
23209,
12,
3319,
16,
756,
16,
2667,
1769,
377,
289,
... |
public void foldLevelChanged(Buffer buffer, int line, int level) | public void foldLevelChanged(Buffer buffer, int start, int end) | public void foldLevelChanged(Buffer buffer, int line, int level) { } //}}} | 6564 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6564/3460d6f5ceb6b77a479ec19f44ee9e3d3d5c51cf/BufferChangeAdapter.java/buggy/org/gjt/sp/jedit/buffer/BufferChangeAdapter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
11590,
2355,
5033,
12,
1892,
1613,
16,
509,
980,
16,
509,
1801,
13,
202,
95,
202,
97,
368,
9090,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
225,
202,
482,
918,
11590,
2355,
5033,
12,
1892,
1613,
16,
509,
980,
16,
509,
1801,
13,
202,
95,
202,
97,
368,
9090,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
protected void restoreResourceAttributes(IResource resource, IProgressMonitor monitor) throws CoreException { | protected void restoreResourceAttributes(IResource resource) throws CoreException { | protected void restoreResourceAttributes(IResource resource, IProgressMonitor monitor) throws CoreException { if (modificationStamp != IResource.NULL_STAMP) { resource.revertModificationStamp(modificationStamp); } if (localTimeStamp != IResource.NULL_STAMP) { resource.setLocalTimeStamp(localTimeStamp); } if (resourceAttributes != null) { resource.setResourceAttributes(resourceAttributes); } if (markerDescriptions != null) { for (int i = 0; i < markerDescriptions.length; i++) { markerDescriptions[i].resource = resource; markerDescriptions[i].createMarker(); } } } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/b00723022a886a825fab75650580041dfe0e7bad/ResourceDescription.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/undo/ResourceDescription.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
5217,
1420,
2498,
12,
45,
1420,
1058,
16,
1082,
202,
45,
5491,
7187,
6438,
13,
1216,
30015,
288,
202,
202,
430,
261,
31064,
8860,
480,
467,
1420,
18,
8560,
67,
12192,
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,
225,
202,
1117,
918,
5217,
1420,
2498,
12,
45,
1420,
1058,
16,
1082,
202,
45,
5491,
7187,
6438,
13,
1216,
30015,
288,
202,
202,
430,
261,
31064,
8860,
480,
467,
1420,
18,
8560,
67,
12192,
13... |
"JPEG image - probably not dangerous", false, null, null)); | "JPEG image - probably not dangerous but can contain EXIF data", false, null, null)); | public static void init() { // Register known MIME types // Plain text register(new MIMEType("text/plain", "txt", new String[0], new String[] { "text", "pot" }, true, true, null, null, false, false, false, false, false, false, "Plain text - not dangerous unless your browser is stupid (e.g. Internet Explorer)", "Plain text - not dangerous unless you include compromizing information", true, "US-ASCII", null)); // GIF - probably safe - FIXME check this out, write filters register(new MIMEType("image/gif", "gif", new String[0], new String[0], true, false, null, null, false, false, false, false, false, false, "GIF image - probably not dangerous", "GIF image - probably not dangerous but you should wipe any comments", false, null, null)); // JPEG - probably safe - FIXME check this out, write filters register(new MIMEType("image/jpeg", "jpeg", new String[0], new String[] { "jpg" }, true, true, null, null, false, false, false, false, false, false, "JPEG image - probably not dangerous", "JPEG image - probably not dangerous", false, null, null)); // PNG - probably safe - FIXME check this out, write filters register(new MIMEType("image/png", "png", new String[0], new String[0], true, false, null, null, false, false, false, false, true, false, "PNG image - probably not dangerous", "PNG image - probably not dangerous but you should wipe any comments or text blocks", false, null, null)); // PDF - very dangerous - FIXME ideally we would have a filter, this is such a common format... register(new MIMEType("application/pdf", "pdf", new String[] { "application/x-pdf" }, new String[0], false, false, null, null, true, true, true, false, true, true, "Adobe(R) PDF document - VERY DANGEROUS!", "Adobe(R) PDF document - VERY DANGEROUS!", false, null, null)); // HTML - dangerous if not filtered register(new MIMEType("text/html", "html", new String[] { "text/xhtml", "text/xml+xhtml" }, new String[] { "htm" }, false, false /* maybe? */, new HTMLFilter(), null /* FIXME */, true, true, true, true, true, true, "HTML - not dangerous if filtered", "HTML - may contain dangerous metadata etc; suggest you check it by hand", true, "iso-8859-1", new HTMLFilter())); // CSS - danagerous if not filtered, not sure about the filter register(new MIMEType("text/css", "css", new String[0], new String[0], false, false /* unknown */, new CSSReadFilter(), null, true, true, true, true, true, false, "CSS (cascading style sheet, usually used with HTML) - probably not dangerous if filtered, but the filter is not a whitelist filter so take care", "CSS (cascading style sheet, usually used with HTML) - this can probably contain metadata, check it by hand", true, "utf-8", new CSSReadFilter())); } | 50653 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50653/43f61cab7c740ee019ecaae1577095dbc9928eb2/ContentFilter.java/clean/src/freenet/clients/http/filter/ContentFilter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
918,
1208,
1435,
288,
202,
202,
759,
5433,
4846,
13195,
1953,
9506,
202,
759,
17367,
977,
202,
202,
4861,
12,
2704,
13195,
559,
2932,
955,
19,
7446,
3113,
315,
5830,
3113,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
918,
1208,
1435,
288,
202,
202,
759,
5433,
4846,
13195,
1953,
9506,
202,
759,
17367,
977,
202,
202,
4861,
12,
2704,
13195,
559,
2932,
955,
19,
7446,
3113,
315,
5830,
3113,
... |
table.setToolTipText( provider.getTooltipText( item.getData( ) ) ); | table.setToolTipText( provider.getTooltipText( item .getData( ) ) ); | private void initTable( TableViewer tableViewer ) { final Table table = tableViewer.getTable( ); GridData gd = new GridData( GridData.FILL_BOTH ); gd.heightHint = 150; table.setLayoutData( gd ); table.setToolTipText( null ); new TableColumn( table, SWT.NONE ).setWidth( 200 ); table.addMouseTrackListener( new MouseTrackAdapter( ) { public void mouseHover( MouseEvent event ) { Widget widget = event.widget; if ( widget == table ) { Point pt = new Point( event.x, event.y ); TableItem item = table.getItem( pt ); if ( item == null ) { table.setToolTipText( null ); } else { table.setToolTipText( provider.getTooltipText( item.getData( ) ) ); } } } } ); tableViewer.setLabelProvider( tableLabelProvider ); tableViewer.setContentProvider( new TableContentProvider( tableViewer ) ); tableViewer.addSelectionChangedListener( selectionListener ); tableViewer.addDoubleClickListener( doubleClickListener ); } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/018ed60258a7970a95a6d310022fe87bdd503e3b/ExpressionBuilder.java/clean/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/ui/dialogs/ExpressionBuilder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1208,
1388,
12,
3555,
18415,
1014,
18415,
262,
202,
95,
202,
202,
6385,
3555,
1014,
273,
1014,
18415,
18,
588,
1388,
12,
11272,
202,
202,
6313,
751,
15551,
273,
394,
7145,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1208,
1388,
12,
3555,
18415,
1014,
18415,
262,
202,
95,
202,
202,
6385,
3555,
1014,
273,
1014,
18415,
18,
588,
1388,
12,
11272,
202,
202,
6313,
751,
15551,
273,
394,
7145,... |
return (i<0) ? 0 : DATA[i + ((DATA[i+1]==0)?2:13)]; | return (i<0) ? 0 : DATA[i + ((DATA[i]==0)?2:13)]; | public static int countEquivalentIDs(String ID) { int i = lookup(ID); return (i<0) ? 0 : DATA[i + ((DATA[i+1]==0)?2:13)]; } | 5620 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5620/3784bba968871d80baa9119ad20289a7867c3ce2/TimeZoneData.java/clean/icu4j/src/com/ibm/icu/util/TimeZoneData.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
509,
1056,
22606,
5103,
12,
780,
1599,
13,
288,
3639,
509,
277,
273,
3689,
12,
734,
1769,
3639,
327,
261,
77,
32,
20,
13,
692,
374,
294,
8730,
63,
77,
397,
14015,
4883,
63,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
509,
1056,
22606,
5103,
12,
780,
1599,
13,
288,
3639,
509,
277,
273,
3689,
12,
734,
1769,
3639,
327,
261,
77,
32,
20,
13,
692,
374,
294,
8730,
63,
77,
397,
14015,
4883,
63,... |
public List addJarFile(File inFile, File outDir, boolean canBeDirectory) throws IOException { | public List addJarFile(File inFile, File outDir, boolean canBeDirectory){ | public List addJarFile(File inFile, File outDir, boolean canBeDirectory) throws IOException {// System.err.println("? addJarFile(" + inFile + ", " + outDir + ")"); List addedClassFiles = new ArrayList(); needToReweaveWorld = true; // Is this a directory we are looking at? if (inFile.isDirectory() && canBeDirectory) { addedClassFiles.addAll(addDirectoryContents(inFile,outDir)); } else { ZipInputStream inStream = new ZipInputStream(new FileInputStream(inFile)); //??? buffered while (true) { ZipEntry entry = inStream.getNextEntry(); if (entry == null) break; byte[] bytes = FileUtil.readAsByteArray(inStream); String filename = entry.getName(); UnwovenClassFile classFile = new UnwovenClassFile(new File(outDir, filename).getAbsolutePath(), bytes); if (filename.endsWith(".class")) { this.addClassFile(classFile); addedClassFiles.add(classFile); } else if (!entry.isDirectory()) { /* bug-44190 Copy meta-data */ addResource(filename,classFile); } inStream.closeEntry(); } inStream.close(); } return addedClassFiles; } | 7955 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7955/5202e56a57ad06ac4140f4a70505e6771595200e/BcelWeaver.java/buggy/org.aspectj/modules/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
987,
527,
10813,
812,
12,
812,
316,
812,
16,
1387,
596,
1621,
16,
1250,
24978,
2853,
13,
1216,
1860,
288,
759,
202,
202,
3163,
18,
370,
18,
8222,
2932,
35,
527,
10813,
812,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
987,
527,
10813,
812,
12,
812,
316,
812,
16,
1387,
596,
1621,
16,
1250,
24978,
2853,
13,
1216,
1860,
288,
759,
202,
202,
3163,
18,
370,
18,
8222,
2932,
35,
527,
10813,
812,
... |
iVisited.accept(_Payload); | _Payload.visitCVarNode(iVisited); | public void visitCVarNode(CVarNode iVisited) { iVisited.accept(_Payload); } | 47273 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47273/043fa4419ad506aa6f8843684eb8114b226fe4b5/DefaultIteratorVisitor.java/clean/org/jruby/nodes/visitor/DefaultIteratorVisitor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
3757,
39,
1537,
907,
12,
39,
1537,
907,
277,
30019,
13,
288,
202,
202,
77,
30019,
18,
9436,
24899,
6110,
1769,
202,
97,
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,
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,
482,
918,
3757,
39,
1537,
907,
12,
39,
1537,
907,
277,
30019,
13,
288,
202,
202,
77,
30019,
18,
9436,
24899,
6110,
1769,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Vector attrList = new Vector(); Vector refList = new Vector(); | attrList = new Vector(); refList = new Vector(); | public TablePanel(Element e, TabPanel tp, OMEXMLNode on) { isTopLevel = false; //check if this TablePanel is "top level" if ( tp.oNode == null ) { Vector foundEles = DOMUtil.getChildElements("OMEElement", tParse.getRoot()); for (int i = 0;i < foundEles.size();i++) { Element thisNode = (Element) foundEles.get(i); if (thisNode == e) isTopLevel = true; } } else if(tp.oNode != null && tp.oNode == on) isTopLevel = true; el = e; oNode = on; tPanel = tp; id = null; newTable = null; refTable = null; JComboBox comboBox = null; if (on != null) name = getTreePathName(e,on); else name = getTreePathName(e); String thisName = name; panelList.add(this); Vector fullList = DOMUtil.getChildElements("OMEAttribute",e); Vector attrList = new Vector(); Vector refList = new Vector(); for(int i = 0;i<fullList.size();i++) { Element thisE = (Element) fullList.get(i); if(thisE.hasAttribute("Type") ) { if(thisE.getAttribute("Type").equals("Ref")) { if (oNode != null) { String value = oNode.getAttribute(thisE.getAttribute("XMLName")); if (value != null && !value.equals("")) { if ( addItems.indexOf("(External) " + value) < 0) { addItems.add("(External) " + value); } } } refList.add(thisE); } else if(thisE.getAttribute("Type").equals("ID") && oNode != null) { if (oNode.getDOMElement().hasAttribute("ID")) { id = oNode.getAttribute("ID"); panelsWithID.add(this); } } else attrList.add(thisE); } else attrList.add(thisE); } Element cDataEl = DOMUtil.getChildElement("CData",e); if (cDataEl != null) attrList.add(0,cDataEl); JPanel lowPanel = new JPanel(); FormLayout layout = new FormLayout( "pref, 10dlu, pref:grow, pref", "pref,2dlu,pref,pref,pref,3dlu,pref,3dlu"); PanelBuilder builder = new PanelBuilder(layout); CellConstraints cc = new CellConstraints(); JLabel tableName = null; if(oNode == null) tableName = new JLabel(thisName, NO_DATA_BULLET, JLabel.LEFT); else tableName = new JLabel(thisName, DATA_BULLET, JLabel.LEFT); Font thisFont = tableName.getFont(); thisFont = new Font(thisFont.getFontName(), Font.BOLD,thisFont.getSize()); tableName.setFont(thisFont); if (attrList.size() != 0) { myTableModel = new DefaultTableModel(TREE_COLUMNS, 0) { public boolean isCellEditable(int row, int col) { if(col < 1) return false; else return true; } }; myTableModel.addTableModelListener(this); setLayout(new GridLayout(0,1)); newTable = new ClickableTable(myTableModel, this); newTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); newTable.getColumnModel().getColumn(0).setPreferredWidth(125); newTable.getColumnModel().getColumn(1).setPreferredWidth(500); newTable.getColumnModel().getColumn(0).setMinWidth(125); JTableHeader tHead = newTable.getTableHeader(); tHead.setResizingAllowed(false); tHead.setReorderingAllowed(false); noteButton = new JButton("Notes"); noteButton.setPreferredSize(new Dimension(85,15)); noteButton.addActionListener(this); noteButton.setActionCommand("getNotes"); JButton addButton = new JButton("Make New"); addButton.setPreferredSize(new Dimension(85,15)); addButton.addActionListener(this); addButton.setActionCommand("Make"); if ( !isTopLevel && tPanel.oNode == null) addButton.setEnabled(false); builder.add(tableName, cc.xy(1,1)); builder.add(noteButton, cc.xy(3,1, "left,center")); builder.add(addButton, cc.xyw(3,1, 2, "right,center")); builder.add(tHead, cc.xyw(1,3,4)); builder.add(newTable, cc.xyw(1,4,4)); if (oNode == null) { tHead.setVisible(false); noteButton.setVisible(false); newTable.setVisible(false); } // update OME-XML attributes table myTableModel.setRowCount(attrList.size()); for (int i=0; i<attrList.size(); i++) { Element thisEle = null; if (attrList.get(i) instanceof Element) { thisEle = (Element) attrList.get(i); } if (thisEle != null) { String attrName = thisEle.getAttribute("XMLName"); if (thisEle.hasAttribute("Name")) { myTableModel.setValueAt(thisEle.getAttribute("Name"), i, 0); if(oNode != null) { if(oNode.getDOMElement().hasAttribute(attrName)) { myTableModel.setValueAt(oNode.getAttribute(attrName), i, 1); } } } else if (thisEle.hasAttribute("XMLName")) { myTableModel.setValueAt(thisEle.getAttribute("XMLName"), i, 0); if(oNode != null) { if(oNode.getDOMElement().hasAttribute(attrName)) { myTableModel.setValueAt(oNode.getAttribute(attrName), i, 1); } } } else { if(e.hasAttribute("Name")) { myTableModel.setValueAt(e.getAttribute("Name") + " CharData", i, 0); } else { myTableModel.setValueAt(e.getAttribute("XMLName") + " CharData", i, 0); } if(oNode != null) { if(DOMUtil.getCharacterData(oNode.getDOMElement()) != null) { myTableModel.setValueAt( DOMUtil.getCharacterData(oNode.getDOMElement() ), i, 1); } } } } } } if (refList.size() > 0) { myTableModel = new DefaultTableModel(TREE_COLUMNS, 0) { public boolean isCellEditable(int row, int col) { if(col < 1) return false; else return true; } }; myTableModel.addTableModelListener(this); refTable = new ClickableTable(myTableModel, this); refTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); refTable.getColumnModel().getColumn(0).setPreferredWidth(125); refTable.getColumnModel().getColumn(1).setPreferredWidth(430); refTable.getColumnModel().getColumn(0).setMinWidth(125); TableColumn refColumn = refTable.getColumnModel().getColumn(1); comboBox = new JComboBox(); refColumn.setCellEditor(new DefaultCellEditor(comboBox)); JPanel buttonPanel; String rowString = ""; for (int i=0; i<refList.size(); i++) { rowString = rowString + "pref:grow, "; } rowString = rowString.substring(0,rowString.length()-2); FormLayout layout2 = new FormLayout( "pref", rowString); PanelBuilder builder2 = new PanelBuilder(layout2); CellConstraints cc2 = new CellConstraints(); myTableModel.setRowCount(refList.size()); for (int i=0; i<refList.size(); i++) { Element thisEle = null; if (refList.get(i) instanceof Element) { thisEle = (Element) refList.get(i); } if (thisEle != null) { if (thisEle.hasAttribute("Name")) { myTableModel.setValueAt(thisEle.getAttribute("Name"), i, 0); } else if (thisEle.hasAttribute("XMLName")) { myTableModel.setValueAt(thisEle.getAttribute("XMLName"), i, 0); } } TableButton tb = new TableButton(refTable,i); tb.addActionListener(this); builder2.add(tb, cc2.xy(1,i+1, "center,fill")); } buttonPanel = builder2.getPanel(); if(attrList.size() == 0) { JTableHeader tHead = refTable.getTableHeader(); tHead.setResizingAllowed(false); tHead.setReorderingAllowed(false); noteButton = new JButton("Notes"); noteButton.setPreferredSize(new Dimension(85,15)); noteButton.addActionListener(this); noteButton.setActionCommand("getNotes"); JButton addButton = new JButton("Make New"); addButton.setPreferredSize(new Dimension(85,15)); addButton.addActionListener(this); addButton.setActionCommand("Make"); if (!isTopLevel && tPanel.oNode == null) addButton.setEnabled(false); builder.add(tableName, cc.xy(1,1)); builder.add(noteButton, cc.xy(3,1, "left,center")); builder.add(addButton, cc.xyw(3,1,2, "right,center")); builder.add(tHead, cc.xyw(1,3,3)); builder.add(refTable, cc.xyw(1,4,3)); builder.add(buttonPanel, cc.xy(4,4)); if (oNode == null) { tHead.setVisible(false); noteButton.setVisible(false); refTable.setVisible(false); buttonPanel.setVisible(false); } } else { builder.add(refTable, cc.xyw(1,5,3)); builder.add(buttonPanel, cc.xy(4,5, "center,fill")); if (oNode == null) { refTable.setVisible(false); buttonPanel.setVisible(false); } } } noteP = new NotePanel(this); builder.add(noteP, cc.xyw(1,7,4, "fill,center")); setNumNotes(noteP.getNumNotes()); add(builder.getPanel()); } | 46826 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46826/b42c864cb203850e496d6d8313f92675605092c6/MetadataPane.java/clean/loci/ome/notebook/MetadataPane.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3555,
5537,
12,
1046,
425,
16,
9483,
5537,
8071,
16,
531,
958,
4201,
907,
603,
13,
288,
1377,
353,
27046,
273,
629,
31,
5411,
368,
1893,
309,
333,
3555,
5537,
353,
315,
3669,
1801... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3555,
5537,
12,
1046,
425,
16,
9483,
5537,
8071,
16,
531,
958,
4201,
907,
603,
13,
288,
1377,
353,
27046,
273,
629,
31,
5411,
368,
1893,
309,
333,
3555,
5537,
353,
315,
3669,
1801... |
VirtualFileManager.getInstance().refresh(false); | if (!ApplicationManager.getApplication().isUnitTestMode()) { VirtualFileManager.getInstance().refresh(true); } | public void runPostStartupActivities() { ApplicationManager.getApplication().assertIsDispatchThread(); runActivities(myPostStartupActivities); VirtualFileManager.getInstance().refresh(false); } | 56598 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56598/b313d3489940a7226dcd17fec6acc475914c1696/StartupManagerImpl.java/buggy/source/com/intellij/ide/startup/impl/StartupManagerImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1086,
3349,
22178,
21101,
1435,
288,
565,
4257,
1318,
18,
588,
3208,
7675,
11231,
2520,
5325,
3830,
5621,
565,
1086,
21101,
12,
4811,
3349,
22178,
21101,
1769,
565,
309,
16051,
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,
1071,
918,
1086,
3349,
22178,
21101,
1435,
288,
565,
4257,
1318,
18,
588,
3208,
7675,
11231,
2520,
5325,
3830,
5621,
565,
1086,
21101,
12,
4811,
3349,
22178,
21101,
1769,
565,
309,
16051,
3... |
setCompletionValues( scope, CompletionKind.ARGUMENT_TYPE, Key.DECL_SPECIFIER_SEQUENCE ); | setCompletionValues( parameterScope, CompletionKind.ARGUMENT_TYPE, Key.DECL_SPECIFIER_SEQUENCE ); | protected Declarator declarator( IDeclaratorOwner owner, IASTScope scope, SimpleDeclarationStrategy strategy, CompletionKind kind ) throws EndOfFileException, BacktrackException { Declarator d = null; DeclarationWrapper sdw = owner.getDeclarationWrapper(); overallLoop : do { d = new Declarator(owner); consumePointerOperators(d); if (LT(1) == IToken.tLPAREN) { consume(); declarator(d, scope, strategy, kind ); consume(IToken.tRPAREN); } else consumeTemplatedOperatorName(d, kind); for (;;) { switch (LT(1)) { case IToken.tLPAREN : boolean failed = false; // temporary fix for initializer/function declaration ambiguity if ( queryLookaheadCapability(2) && !LA(2).looksLikeExpression() && strategy != SimpleDeclarationStrategy.TRY_VARIABLE ) { if( LT(2) == IToken.tIDENTIFIER ) { IToken newMark = mark(); consume( IToken.tLPAREN ); try { try { if( ! astFactory.queryIsTypeName( scope, name(scope, CompletionKind.TYPE_REFERENCE ) ) ) failed = true; } catch (Exception e) { throw backtrack; } } catch( BacktrackException b ) { failed = true; } backup( newMark ); } } if( ( queryLookaheadCapability(2) && !LA(2).looksLikeExpression() && strategy != SimpleDeclarationStrategy.TRY_VARIABLE && !failed) || ! queryLookaheadCapability(3) ) { // parameterDeclarationClause d.setIsFunction(true); // TODO need to create a temporary scope object here consume(IToken.tLPAREN); setCompletionValues( scope, CompletionKind.ARGUMENT_TYPE, Key.DECL_SPECIFIER_SEQUENCE ); boolean seenParameter = false; parameterDeclarationLoop : for (;;) { switch (LT(1)) { case IToken.tRPAREN : consume(); setCompletionValues( scope, CompletionKind.NO_SUCH_KIND, KeywordSets.Key.FUNCTION_MODIFIER ); break parameterDeclarationLoop; case IToken.tELLIPSIS : consume(); d.setIsVarArgs( true ); break; case IToken.tCOMMA : consume(); setCompletionValues( scope, CompletionKind.ARGUMENT_TYPE, Key.DECL_SPECIFIER_SEQUENCE ); seenParameter = false; break; default : if (seenParameter) throw backtrack; parameterDeclaration(d, scope); seenParameter = true; } } } if (LT(1) == IToken.tCOLON || LT(1) == IToken.t_try ) break overallLoop; IToken beforeCVModifier = mark(); IToken cvModifier = null; IToken afterCVModifier = beforeCVModifier; // const-volatile // 2 options: either this is a marker for the method, // or it might be the beginning of old K&R style parameter declaration, see // void getenv(name) const char * name; {} // This will be determined further below if (LT(1) == IToken.t_const || LT(1) == IToken.t_volatile) { cvModifier = consume(); afterCVModifier = mark(); } //check for throws clause here List exceptionSpecIds = null; if (LT(1) == IToken.t_throw) { exceptionSpecIds = new ArrayList(); consume(); // throw consume(IToken.tLPAREN); // ( boolean done = false; IASTTypeId duple = null; while (!done) { switch (LT(1)) { case IToken.tRPAREN : consume(); done = true; break; case IToken.tCOMMA : consume(); break; default : String image = LA(1).getImage(); try { duple = typeId(scope, false, CompletionKind.EXCEPTION_REFERENCE ); exceptionSpecIds.add(duple); } catch (BacktrackException e) { failParse(); TraceUtil.outputTrace( log, "Unexpected Token =", null, image, null, null ); consume(); // eat this token anyway continue; } break; } } if (exceptionSpecIds != null) try { d.setExceptionSpecification( astFactory .createExceptionSpecification( d.getDeclarationWrapper().getScope(), exceptionSpecIds)); } catch (ASTSemanticException e) { failParse(); throw backtrack; } catch (Exception e) { throw backtrack; } } // check for optional pure virtual if (LT(1) == IToken.tASSIGN && LT(2) == IToken.tINTEGER && LA(2).getImage().equals("0")) //$NON-NLS-1$ { consume(IToken.tASSIGN); consume(IToken.tINTEGER); d.setPureVirtual(true); } if (afterCVModifier != LA(1) || LT(1) == IToken.tSEMI) { // There were C++-specific clauses after const/volatile modifier // Then it is a marker for the method if (cvModifier != null) { if (cvModifier.getType() == IToken.t_const) d.setConst(true); if (cvModifier.getType() == IToken.t_volatile) d.setVolatile(true); } afterCVModifier = mark(); // In this case (method) we can't expect K&R parameter declarations, // but we'll check anyway, for errorhandling } break; case IToken.tLBRACKET : consumeArrayModifiers(d, sdw.getScope()); continue; case IToken.tCOLON : consume(IToken.tCOLON); IASTExpression exp = constantExpression(scope, CompletionKind.SINGLE_NAME_REFERENCE); d.setBitFieldExpression(exp); default : break; } break; } if (LA(1).getType() != IToken.tIDENTIFIER) break; } while (true); if (d.getOwner() instanceof IDeclarator) ((Declarator)d.getOwner()).setOwnedDeclarator(d); return d; } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/32abdb30e8d9deecec547756506cf26658032ec0/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,
16110,
5880,
3496,
5880,
12,
3639,
1599,
557,
80,
5880,
5541,
3410,
16,
467,
9053,
3876,
2146,
16,
4477,
6094,
4525,
6252,
16,
20735,
5677,
3846,
262,
3639,
1216,
4403,
951,
812,
50... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
16110,
5880,
3496,
5880,
12,
3639,
1599,
557,
80,
5880,
5541,
3410,
16,
467,
9053,
3876,
2146,
16,
4477,
6094,
4525,
6252,
16,
20735,
5677,
3846,
262,
3639,
1216,
4403,
951,
812,
50... |
metadataArray = items[i].getDC(element, qualifier, Item.ANY); | metadataArray = items[i].getMetadata(schema, element, qualifier, Item.ANY); | public int doStartTag() throws JspException { JspWriter out = pageContext.getOut(); HttpServletRequest hrq = (HttpServletRequest) pageContext.getRequest(); boolean emphasiseDate = false; boolean emphasiseTitle = false; if (emphColumn != null) { emphasiseDate = emphColumn.equalsIgnoreCase("date"); emphasiseTitle = emphColumn.equalsIgnoreCase("title"); } // get the elements to display String configLine = ConfigurationManager.getProperty("webui.itemlist.columns"); if (configLine != null) { listFields = configLine; } // get the date and title fields String dateLine = ConfigurationManager.getProperty("webui.browse.index.date"); if (dateLine != null) { dateField = dateLine; } String titleLine = ConfigurationManager.getProperty("webui.browse.index.title"); if (titleLine != null) { titleField = titleLine; } StringTokenizer st = new StringTokenizer(listFields, ","); // make an array to hold all the frags that we will use int columns = st.countTokens(); String[] frags = new String[columns * items.length]; try { out.println("<table align=\"center\" class=\"miscTable\" summary=\"This table browse all dspace content\">"); out.println("<tr>"); // Write the column headings int colCount = 1; boolean isDate = false; boolean emph = false; while (st.hasMoreTokens()) { String field = st.nextToken().toLowerCase().trim(); String cOddOrEven = ((colCount % 2) == 0 ? "Odd" : "Even"); // find out if the field is a date if (field.indexOf("(date)") > 0) { field = field.replaceAll("\\(date\\)", ""); isDate = true; } // get the schema and the element qualifier pair // (Note, the schema is not used for anything yet) // (second note, I hate this bit of code. There must be // a much more elegant way of doing this. Tomcat has // some weird problems with variations on this code that // I tried, which is why it has ended up the way it is) StringTokenizer eq = new StringTokenizer(field, "."); String[] tokens = { "", "", "" }; int k = 0; while(eq.hasMoreTokens()) { tokens[k] = eq.nextToken().toLowerCase().trim(); k++; } String schema = tokens[0]; String element = tokens[1]; String qualifier = tokens[2]; // find out if we are emphasising this field if ((field.equals(dateField) && emphasiseDate) || (field.equals(titleField) && emphasiseTitle)) { emph = true; } // prepare the strings for the header String id = "t" + Integer.toString(colCount); String css = "oddRow" + cOddOrEven + "Col"; String message = "itemlist." + field; // output the header out.print("<th id=\"" + id + "\" class=\"" + css + "\">" + (emph ? "<strong>" : "") + LocaleSupport.getLocalizedMessage(pageContext, message) + (emph ? "</strong>" : "") + "</th>"); // now prepare the frags for each of the table elements for (int i = 0; i < items.length; i++) { // first get hold of the relevant metadata for this column DCValue[] metadataArray; if (qualifier.equals("*")) { metadataArray = items[i].getDC(element, Item.ANY, Item.ANY); } else if (qualifier.equals("")) { metadataArray = items[i].getDC(element, null, Item.ANY); } else { metadataArray = items[i].getDC(element, qualifier, Item.ANY); } // now prepare the content of the table division String metadata = "-"; if (metadataArray.length > 0) { // format the date field correctly if (isDate) { // this is to be consistent with the existing setup. // seems like an odd place to put it though (FIXME) String thumbs = ""; if (showThumbs) { thumbs = getThumbMarkup(hrq, items[i]); } DCDate dd = new DCDate(metadataArray[0].value); metadata = UIUtil.displayDate(dd, false, false) + thumbs; } // format the title field correctly else if (field.equals(titleField)) { metadata = "<a href=\"" + hrq.getContextPath() + "/handle/" + items[i].getHandle() + "\">" + Utils.addEntities(metadataArray[0].value) + "</a>"; } // format all other fields else { StringBuffer sb = new StringBuffer(); for (int j = 0; j < metadataArray.length; j++) { sb.append(Utils.addEntities(metadataArray[j].value)); if (j < (metadataArray.length - 1)) { sb.append("; "); } } metadata = "<em>" + sb.toString() + "</em>"; } } // now prepare the XHTML frag for this division String rOddOrEven; if (i == highlightRow) { rOddOrEven = "highlight"; } else { rOddOrEven = ((i % 2) == 1 ? "odd" : "even"); } // prepare extra special layout requirements for dates String extras = ""; if (isDate) { extras = "nowrap=\"nowrap\" align=\"right\""; } int idx = ((i + 1) * columns) - columns + colCount - 1; frags[idx] = "<td headers=\"" + id + "\" class=\"" + rOddOrEven + "Row" + cOddOrEven + "Col\" " + extras + ">" + (emph ? "<strong>" : "") + metadata + (emph ? "</strong>" : "") + "</td>"; } colCount++; isDate = false; emph = false; } out.println("</tr>"); // now output all the frags in the right order for the page for (int i = 0; i < frags.length; i++) { if ((i + 1) % columns == 1) { out.println("<tr>"); } out.println(frags[i]); if ((i + 1) % columns == 0) { out.println("</tr>"); } } // close the table out.println("</table>"); } catch (IOException ie) { throw new JspException(ie); } return SKIP_BODY; } | 51882 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51882/792e695713d23ebb03ffcf677f053bfcf20eb96e/ItemListTag.java/buggy/dspace/src/org/dspace/app/webui/jsptag/ItemListTag.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
741,
30512,
1435,
1216,
27485,
565,
288,
3639,
19300,
2289,
596,
273,
21442,
18,
588,
1182,
5621,
3639,
9984,
15407,
85,
273,
261,
2940,
18572,
13,
21442,
18,
588,
691,
5621,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
741,
30512,
1435,
1216,
27485,
565,
288,
3639,
19300,
2289,
596,
273,
21442,
18,
588,
1182,
5621,
3639,
9984,
15407,
85,
273,
261,
2940,
18572,
13,
21442,
18,
588,
691,
5621,
7... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.