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
public org.quickfix.field.LegPool getLegPool() throws FieldNotFound { org.quickfix.field.LegPool value = new org.quickfix.field.LegPool();
public quickfix.field.LegPool getLegPool() throws FieldNotFound { quickfix.field.LegPool value = new quickfix.field.LegPool();
public org.quickfix.field.LegPool getLegPool() throws FieldNotFound { org.quickfix.field.LegPool value = new org.quickfix.field.LegPool(); getField(value); return value; }
5926 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5926/fecc27f98261270772ff182a1d4dfd94b5daa73d/TradeCaptureReportAck.java/buggy/src/java/src/quickfix/fix44/TradeCaptureReportAck.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 2358, 18, 19525, 904, 18, 1518, 18, 8329, 2864, 336, 8329, 2864, 1435, 1216, 2286, 2768, 225, 288, 2358, 18, 19525, 904, 18, 1518, 18, 8329, 2864, 460, 273, 394, 2358, 18, 19525, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 2358, 18, 19525, 904, 18, 1518, 18, 8329, 2864, 336, 8329, 2864, 1435, 1216, 2286, 2768, 225, 288, 2358, 18, 19525, 904, 18, 1518, 18, 8329, 2864, 460, 273, 394, 2358, 18, 19525, ...
byte[] getNetPacket(int streamId, byte buffer[]) throws IOException { synchronized (socketTable) { VirtualSocket vsock = lookup(streamId); // // Return any cached input // if (vsock.inputPkts > 0) { return dequeueInput(vsock); } // // See if we need to: // 1. Send a request // 2. Read and save another callers request // 3. Flush the end of our previous request and send a new one // if (responseOwner == -1 || responseOwner != streamId || vsock.flushInput) { byte[] tmpBuf; if (responseOwner != -1) { // Complex case there is another socket's data in the network pipe // or we had our own incomplete request to discard first // Read and store other socket's data or flush our own VirtualSocket other = (VirtualSocket)socketTable.get(responseOwner); do { tmpBuf = readPacket(null, other, 0); if (!other.flushInput) { // We need to save this input enqueueInput(other, tmpBuf); } } while (tmpBuf[1] == 0); // Read all data to complete TDS packet other.flushInput = false; } // OK All input either read and stored or read and discarded // now send our cached request packet. tmpBuf = dequeueOutput(vsock); if (tmpBuf == null) { // Oops something has gone wrong. Trying to read but no // complete request packet to send first. throw new IOException("No client request to send"); } while (tmpBuf != null) { getOut().write(tmpBuf, 0, getPktLen(tmpBuf, 2)); tmpBuf = dequeueOutput(vsock); } responseOwner = streamId; } // Simple case we are reading our input directly from the server buffer = readPacket(buffer, vsock, vsock.timeOut); return buffer; } }
5753 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5753/2c6b79107e175244186289d6b526b670a6bcb122/SharedSocket.java/clean/src/main/net/sourceforge/jtds/jdbc/SharedSocket.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1160, 8526, 336, 7308, 6667, 12, 474, 21035, 16, 1160, 1613, 63, 5717, 1216, 1860, 288, 3639, 3852, 261, 7814, 1388, 13, 288, 5411, 7269, 4534, 6195, 975, 273, 3689, 12, 3256, 548, 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, 377, 1160, 8526, 336, 7308, 6667, 12, 474, 21035, 16, 1160, 1613, 63, 5717, 1216, 1860, 288, 3639, 3852, 261, 7814, 1388, 13, 288, 5411, 7269, 4534, 6195, 975, 273, 3689, 12, 3256, 548, 1769, ...
public void paintFixed(Context c, BlockBox block) { int xoff = 0; int yoff = 0; xoff = c.canvas.getWidth(); yoff = c.canvas.getHeight(); if (block.right_set) { xoff = xoff - block.width; } if (block.bottom_set) { //joshy: this should really be block.height instead of bnds.y // need to fix the setting of block.height //joshy: need to do horizontal calcs too, inc scrolling //joshy: need to make the body paint the whole canvas. // start at the bottom of the viewport yoff = c.viewport.getHeight(); // account for the width of the box yoff = yoff - block.height; // - bnds.y // account for the current y offset of the box yoff = yoff - c.getExtents().y; //orig.y; // account for the scrolling of the viewport yoff = yoff - c.canvas.getLocation().y; } c.translate(xoff, yoff); paintNormal(c,block); c.translate(-xoff, -yoff); }
53937 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/53937/07ab625b03cad242caa27ac48e830592130b24a1/BoxLayout.java/clean/src/java/org/joshy/html/BoxLayout.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1071, 6459, 84, 1598, 7505, 12, 1042, 71, 16, 1768, 3514, 2629, 15329, 474, 92, 3674, 33, 20, 31, 474, 93, 3674, 33, 20, 31, 92, 3674, 33, 71, 18, 15424, 18, 588, 2384, 5621, 93, 3674, 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, 1071, 6459, 84, 1598, 7505, 12, 1042, 71, 16, 1768, 3514, 2629, 15329, 474, 92, 3674, 33, 20, 31, 474, 93, 3674, 33, 20, 31, 92, 3674, 33, 71, 18, 15424, 18, 588, 2384, 5621, 93, 3674, 3...
ac.addBond(new Bond(a1, a2, bond.getOrder()));
Bond newBond = new Bond(a1, a2, bond.getOrder()); newBond.setFlag( CDKConstants.ISAROMATIC, bond.getFlag(CDKConstants.ISAROMATIC) ); ac.addBond(newBond);
public static AtomContainer project(List rMapList, AtomContainer g, int id) { AtomContainer ac = new AtomContainer(); Bond[] bondList = g.getBonds(); Hashtable table = new Hashtable(); Atom a1 = null; Atom a2 = null; Atom a = null; Bond bond = null; for (Iterator i = rMapList.iterator(); i.hasNext(); ) { RMap rMap = (RMap) i.next(); if (id == UniversalIsomorphismTester.ID1) { bond = bondList[rMap.getId1()]; } else { bond = bondList[rMap.getId2()]; } a = bond.getAtomAt(0); a1 = (Atom) table.get(a); if (a1 == null) { a1 = (Atom) a.clone(); ac.addAtom(a1); table.put(a, a1); } a = bond.getAtomAt(1); a2 = (Atom) table.get(a); if (a2 == null) { a2 = (Atom) a.clone(); ac.addAtom(a2); table.put(a, a2); } ac.addBond(new Bond(a1, a2, bond.getOrder())); } return ac; }
45167 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45167/fda85e2e70b3cd137c9404e72e9414d9bf306284/UniversalIsomorphismTester.java/clean/src/org/openscience/cdk/isomorphism/UniversalIsomorphismTester.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 760, 7149, 2170, 1984, 12, 682, 436, 863, 682, 16, 7149, 2170, 314, 16, 509, 612, 13, 288, 565, 7149, 2170, 1721, 273, 394, 7149, 2170, 5621, 565, 605, 1434, 8526, 8427, 682, 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, 282, 1071, 760, 7149, 2170, 1984, 12, 682, 436, 863, 682, 16, 7149, 2170, 314, 16, 509, 612, 13, 288, 565, 7149, 2170, 1721, 273, 394, 7149, 2170, 5621, 565, 605, 1434, 8526, 8427, 682, 273,...
X86RegisterPool pool = eContext.getPool(); if (!it.uses(reg)) { if (!pool.isFree(reg)) { notImplemented(); } pool.request(reg, it); }
X86RegisterPool pool = eContext.getPool(); if (!it.uses(reg)) { if (!pool.isFree(reg)) { notImplemented(); } pool.request(reg, it); }
private void requestRegister(Register reg, Item it) { X86RegisterPool pool = eContext.getPool(); // check item doesn't already use register if (!it.uses(reg)) { if (!pool.isFree(reg)) { notImplemented(); //TODO: spill register; make sure that the stack items // and floating items are handled correctly } pool.request(reg, it); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/2dae0b481ae2c6630293d1adeea4e81e12d7547b/X86BytecodeVisitor.java/buggy/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 590, 3996, 12, 3996, 960, 16, 4342, 518, 13, 288, 377, 202, 60, 5292, 3996, 2864, 2845, 273, 425, 1042, 18, 588, 2864, 5621, 377, 202, 377, 202, 759, 866, 761, 3302, 1404, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 590, 3996, 12, 3996, 960, 16, 4342, 518, 13, 288, 377, 202, 60, 5292, 3996, 2864, 2845, 273, 425, 1042, 18, 588, 2864, 5621, 377, 202, 377, 202, 759, 866, 761, 3302, 1404, ...
result.merge(checkCallsToDeclaringClassConstructors(new SubProgressMonitor(pm, 1)));
result.merge(checkCallsToClassConstructors(getDeclaringType(), new SubProgressMonitor(pm, 1)));
public RefactoringStatus checkFinalConditions(IProgressMonitor pm) throws CoreException { try { pm.beginTask(RefactoringCoreMessages.getString("PushDownRefactoring.creating_preview"), 5); //$NON-NLS-1$ clearCaches(); RefactoringStatus result= new RefactoringStatus(); result.merge(checkMembersInDestinationClasses(new SubProgressMonitor(pm, 1))); result.merge(checkElementsAccessedByModifiedMembers(new SubProgressMonitor(pm, 1))); result.merge(checkReferencesToPushedDownMembers(new SubProgressMonitor(pm, 1))); if (shouldMakeDeclaringClassAbstract()) result.merge(checkCallsToDeclaringClassConstructors(new SubProgressMonitor(pm, 1))); else pm.worked(1); if (result.hasFatalError()) return result; fChangeManager= createChangeManager(new SubProgressMonitor(pm, 1)); result.merge(validateModifiesFiles()); return result; } finally { pm.done(); } }
9698 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9698/4c432e231311c8cf3a59a661132d21bc0ea55380/PushDownRefactoring.java/buggy/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/PushDownRefactoring.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 868, 3493, 6053, 1482, 866, 7951, 8545, 12, 45, 5491, 7187, 7430, 13, 1216, 30015, 288, 202, 202, 698, 288, 1082, 202, 7755, 18, 10086, 2174, 12, 426, 3493, 6053, 4670, 5058, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 868, 3493, 6053, 1482, 866, 7951, 8545, 12, 45, 5491, 7187, 7430, 13, 1216, 30015, 288, 202, 202, 698, 288, 1082, 202, 7755, 18, 10086, 2174, 12, 426, 3493, 6053, 4670, 5058, ...
if (presentationSite.getState() == IPresentationSite.STATE_MAXIMIZED) {
if (newState == IPresentationSite.STATE_MAXIMIZED) {
private void setState(int newState) { if (newState == presentationSite.getState()) { return; } int oldState = presentationSite.getState(); presentationSite.setPresentationState(newState); if (current != null) { if (presentationSite.getState() == IPresentationSite.STATE_MAXIMIZED) { ((PartPane) current).doZoom(); } else { WorkbenchPage page = ((PartPane) current).getPage(); if (page.isZoomed()) { page.zoomOut(); } updateControlBounds(); if (oldState == IPresentationSite.STATE_MINIMIZED) { forceLayout(); } } } if (presentationSite.getState() == IPresentationSite.STATE_MINIMIZED) { page.refreshActiveView(); } }
55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/14827ce06d2a1c73b89c11076cc8a1b4cdcb9379/PartTabFolder.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PartTabFolder.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 918, 12947, 12, 474, 15907, 13, 288, 202, 202, 430, 261, 2704, 1119, 422, 22525, 4956, 18, 588, 1119, 10756, 288, 1082, 202, 2463, 31, 202, 202, 97, 9506, 202, 474, 26440, 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, 225, 202, 1152, 918, 12947, 12, 474, 15907, 13, 288, 202, 202, 430, 261, 2704, 1119, 422, 22525, 4956, 18, 588, 1119, 10756, 288, 1082, 202, 2463, 31, 202, 202, 97, 9506, 202, 474, 26440, 27...
if (elementName == null) {
if (elementName==null) {
public void startElement(String uri, String loc, String raw, Attributes a) throws SAXException { level++; switch (level) { case 1: if (loc.equals("pagesheet")) { // This object represents pagesheet return; } break; case 2: if (loc.equals("rules")) { if (this.pageRules == null) { this.pageRules = new ResizableContainer(2); } String key = a.getValue("page"); if (key != null) { try { pg = Integer.parseInt(key); } catch (NumberFormatException e) { throw new SAXException("Syntax error: the attribute 'rules/@page' must contain a number"); } } else { pg = 0; } rules = new PageRules(); return; } else if (loc.equals("items")) { if (this.itemGroupsPerName == null) { this.itemGroupsPerName = new HashMap(2); } if (this.itemGroupsPerElement == null) { this.itemGroupsPerElement = new HashMap(2); } return; } break; case 3: if (loc.equals("count")) { rules.elementName = a.getValue("name"); rules.elementURI = a.getValue("namespace"); if (a.getValue("type").equals("element")) { try { rules.elementCount = Integer.parseInt(a.getValue("num")); } catch (NumberFormatException e) { throw new SAXException("Syntax error: the attribute 'count/@num' must contain a number"); } } else if (a.getValue("type").equals("chars")) { try { rules.charCount = Integer.parseInt(a.getValue("num")); } catch (NumberFormatException e) { throw new SAXException("Syntax error: the attribute 'count/@num' must contain a number."); } } else { throw new SAXException("Syntax error: count type not supported."); } return; } else if (loc.equals("link")) { if (a.getValue("type").equals("unit")) { try { rules.unitLinks = Integer.parseInt(a.getValue("num")); } catch (NumberFormatException e) { throw new SAXException("Syntax error: the attribute 'link/@num' must contain a number."); } } else if (a.getValue("type").equals("range")) { try { rules.rangeLink = Integer.parseInt(a.getValue("value")); } catch (NumberFormatException e) { throw new SAXException("Syntax error: the attribute 'link/@value' must contain a number."); } } else { throw new SAXException("Syntax error: link type not supported."); } return; } else if (loc.equals("group")) { String name = a.getValue("name"); if (name == null) { throw new SAXException("Syntax error: the attribute 'group/@name' must be present."); } String elementName = a.getValue("element"); if (elementName == null) { throw new SAXException("Syntax error: the attribute 'group/@element' must be present."); } String elementURI = a.getValue("namespace"); ItemGroup group = new ItemGroup(name, elementURI, elementName); this.itemGroupsPerName.put(name, group); this.itemGroupsPerElement.put(elementURI + elementName, group); return; } } throw new SAXException("Syntax error: element " + raw + " is not recognized or is misplaced."); }
46428 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46428/88da451e7ed0aeef9bb960d9348189d3ed40d79d/Pagesheet.java/clean/src/scratchpad/src/org/apache/cocoon/transformation/pagination/Pagesheet.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 13591, 12, 780, 2003, 16, 514, 1515, 16, 514, 1831, 16, 9055, 279, 13, 1216, 14366, 288, 3639, 1801, 9904, 31, 3639, 1620, 261, 2815, 13, 288, 5411, 648, 404, 30, 7734, 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, 1071, 918, 13591, 12, 780, 2003, 16, 514, 1515, 16, 514, 1831, 16, 9055, 279, 13, 1216, 14366, 288, 3639, 1801, 9904, 31, 3639, 1620, 261, 2815, 13, 288, 5411, 648, 404, 30, 7734, 309, ...
Vector refPos = getPositionsInRange(this.positions, where, this.content.length + nitems - where); Iterator iter = refPos.iterator();
if (marks != null) { Iterator iter = marks.iterator();
public UndoableEdit remove(int where, int nitems) throws BadLocationException { checkLocation(where, nitems + 1); char[] temp = new char[(this.content.length - nitems)]; this.count = this.count - nitems; RemoveUndo rundo = new RemoveUndo(where, new String(this.content, where, nitems)); // Copy array. System.arraycopy(this.content, 0, temp, 0, where); System.arraycopy(this.content, where + nitems, temp, where, this.content.length - where - nitems); this.content = new char[temp.length]; // Then copy the result in the original char array. System.arraycopy(temp, 0, this.content, 0, this.content.length); // Move all the positions. Vector refPos = getPositionsInRange(this.positions, where, this.content.length + nitems - where); Iterator iter = refPos.iterator(); while (iter.hasNext()) { StickyPosition p = (StickyPosition)iter.next(); int result = p.getOffset() - nitems; p.setOffset(result); if (result < 0) this.positions.remove(p); } return rundo; }
50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/ba862f89183b5347853381927a04e1e399fae5db/StringContent.java/clean/core/src/classpath/javax/javax/swing/text/StringContent.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 1351, 2896, 429, 4666, 1206, 12, 474, 1625, 16, 509, 290, 3319, 13, 1216, 6107, 2735, 503, 225, 288, 565, 866, 2735, 12, 6051, 16, 290, 3319, 397, 404, 1769, 565, 1149, 8526, 1906...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1351, 2896, 429, 4666, 1206, 12, 474, 1625, 16, 509, 290, 3319, 13, 1216, 6107, 2735, 503, 225, 288, 565, 866, 2735, 12, 6051, 16, 290, 3319, 397, 404, 1769, 565, 1149, 8526, 1906...
+ ( (DesignElementHandle) firstSelectedElement ).getDefn( ) .getDisplayName( ) );
+ ( (DesignElementHandle) firstSelectedElement ) .getDefn( ).getDisplayName( ) );
public void buildContextMenu( IMenuManager menuManager ) { GEFActionConstants.addStandardActionGroups( menuManager ); Object firstSelectedElement = getFirstElement( ); Object selectedElements = getSelectedElement( ); Object multiSelection = getMultiSelectedElement( ); // special for dealing with multi selected elements (items). if ( isMutilSelection( multiSelection ) ) { menuManager.appendToGroup( GEFActionConstants.GROUP_UNDO, getAction( ActionFactory.UNDO.getId( ) ) ); menuManager.appendToGroup( GEFActionConstants.GROUP_UNDO, getAction( ActionFactory.REDO.getId( ) ) ); menuManager.appendToGroup( GEFActionConstants.GROUP_COPY, new CutAction( selectedElements ) ); menuManager.appendToGroup( GEFActionConstants.GROUP_COPY, new CopyAction( selectedElements ) ); menuManager.appendToGroup( GEFActionConstants.GROUP_COPY, new PasteAction( selectedElements ) ); menuManager.appendToGroup( GEFActionConstants.GROUP_COPY, new DeleteAction( selectedElements ) ); if ( isRootElementHandleClass( multiSelection ) ) { createInsertElementMenu( menuManager, GEFActionConstants.GROUP_EDIT ); } if ( isListHandleCalss( multiSelection ) ) { IAction action = getAction( CreatePlaceHolderPartAction.ID ); menuManager.appendToGroup( GEFActionConstants.GROUP_EDIT, action ); } createStyleMenu( menuManager, GEFActionConstants.GROUP_REST ); if ( Policy.TRACING_MENU_SHOW ) { System.out.println( "Menu(for Editor) >> Shows for multi-selcetion." ); //$NON-NLS-1$ } } // ----------------------------------------------------------------- else if ( firstSelectedElement instanceof DesignElementHandle ) { menuManager.appendToGroup( GEFActionConstants.GROUP_UNDO, getAction( ActionFactory.UNDO.getId( ) ) ); menuManager.appendToGroup( GEFActionConstants.GROUP_UNDO, getAction( ActionFactory.REDO.getId( ) ) ); menuManager.appendToGroup( GEFActionConstants.GROUP_COPY, new CutAction( selectedElements ) ); menuManager.appendToGroup( GEFActionConstants.GROUP_COPY, new CopyAction( selectedElements ) ); menuManager.appendToGroup( GEFActionConstants.GROUP_COPY, new PasteAction( selectedElements ) ); createStyleMenu( menuManager, GEFActionConstants.GROUP_REST ); if ( ( (IStructuredSelection) getSelection( ) ).size( ) == 1 ) { Object element = ( (IStructuredSelection) getSelection( ) ).getFirstElement( ); if ( element instanceof LabelEditPart || element instanceof ImageEditPart ) { IAction action = getAction( GEFActionConstants.DIRECT_EDIT ); action.setAccelerator( SWT.F2 ); if ( element instanceof DataEditPart ) { action.setText( Messages.getString( "SchematicContextMenuProvider.ActionText.editData" ) ); //$NON-NLS-1$ } else { action.setText( Messages.getString( "SchematicContextMenuProvider.ActionText.editLabel" ) ); //$NON-NLS-1$ } menuManager.appendToGroup( GEFActionConstants.GROUP_EDIT, action ); } if ( firstSelectedElement instanceof ReportItemHandle ) { IAction action = getAction( CreatePlaceHolderPartAction.ID ); menuManager.appendToGroup( GEFActionConstants.GROUP_EDIT, action ); action = getAction( RevertToReportItemPartAction.ID ); menuManager.appendToGroup( GEFActionConstants.GROUP_EDIT, action ); action = getAction( RevertToTemplatePartAction.ID ); menuManager.appendToGroup( GEFActionConstants.GROUP_EDIT, action ); } if ( firstSelectedElement instanceof TemplateReportItemHandle ) { IAction action = getAction( RevertToReportItemPartAction.ID ); menuManager.appendToGroup( GEFActionConstants.GROUP_EDIT, action ); } } if ( firstSelectedElement instanceof RowHandle ) { if ( getRowHandles( ).size( ) != 0 ) { MenuManager insertMenu = new MenuManager( INSERT_MENU_ITEM_TEXT ); MenuManager rowMenu = new MenuManager( INSERT_ROW_MENU_ITEM_TEXT ); rowMenu.add( getAction( InsertRowAboveAction.ID ) ); rowMenu.add( getAction( InsertRowBelowAction.ID ) ); RowHandle row = (RowHandle) getRowHandles( ).get( 0 ); if ( !( row.getContainer( ) instanceof GridHandle ) ) { insertMenu.add( getAction( IncludeHeaderAction.ID ) ); insertMenu.add( getAction( IncludeDetailAction.ID ) ); insertMenu.add( getAction( IncludeFooterAction.ID ) ); } insertMenu.add( rowMenu ); menuManager.appendToGroup( GEFActionConstants.GROUP_EDIT, insertMenu ); } // delete row action. menuManager.appendToGroup( GEFActionConstants.GROUP_COPY, getAction( DeleteRowAction.ID ) ); menuManager.appendToGroup( GEFActionConstants.GROUP_EDIT, getAction( MergeAction.ID ) ); menuManager.appendToGroup( GEFActionConstants.GROUP_EDIT, getAction( SplitAction.ID ) ); } else if ( firstSelectedElement instanceof ColumnHandle ) { menuManager.appendToGroup( GEFActionConstants.GROUP_EDIT, new InsertPasteColumnAction( selectedElements ) ); if ( getColumnHandles( ).size( ) != 0 ) { MenuManager subMenu = new MenuManager( INSERT_MENU_ITEM_TEXT ); subMenu.add( getAction( InsertColumnRightAction.ID ) ); subMenu.add( getAction( InsertColumnLeftAction.ID ) ); menuManager.appendToGroup( GEFActionConstants.GROUP_EDIT, subMenu ); } // delete column action. menuManager.appendToGroup( GEFActionConstants.GROUP_COPY, getAction( DeleteColumnAction.ID ) ); menuManager.appendToGroup( GEFActionConstants.GROUP_EDIT, getAction( MergeAction.ID ) ); menuManager.appendToGroup( GEFActionConstants.GROUP_EDIT, getAction( SplitAction.ID ) ); } else if ( firstSelectedElement instanceof CellHandle ) { createInsertElementMenu( menuManager, GEFActionConstants.GROUP_EDIT ); menuManager.appendToGroup( GEFActionConstants.GROUP_EDIT, getAction( MergeAction.ID ) ); menuManager.appendToGroup( GEFActionConstants.GROUP_EDIT, getAction( SplitAction.ID ) ); // delete action in cell menuManager.appendToGroup( GEFActionConstants.GROUP_COPY, new DeleteAction( selectedElements ) ); } else { // common delete action menuManager.appendToGroup( GEFActionConstants.GROUP_COPY, new DeleteAction( selectedElements ) ); } if ( Policy.TRACING_MENU_SHOW ) { System.out.println( "Menu(for Editor) >> Shows for " //$NON-NLS-1$ + ( (DesignElementHandle) firstSelectedElement ).getDefn( ) .getDisplayName( ) ); } } else if ( firstSelectedElement instanceof SlotHandle ) { menuManager.appendToGroup( GEFActionConstants.GROUP_UNDO, getAction( ActionFactory.UNDO.getId( ) ) ); menuManager.appendToGroup( GEFActionConstants.GROUP_UNDO, getAction( ActionFactory.REDO.getId( ) ) ); menuManager.appendToGroup( GEFActionConstants.GROUP_COPY, new CutAction( selectedElements ) ); menuManager.appendToGroup( GEFActionConstants.GROUP_COPY, new CopyAction( selectedElements ) ); menuManager.appendToGroup( GEFActionConstants.GROUP_COPY, new PasteAction( selectedElements ) ); menuManager.appendToGroup( GEFActionConstants.GROUP_COPY, new DeleteAction( selectedElements ) ); createInsertElementMenu( menuManager, GEFActionConstants.GROUP_EDIT ); if ( Policy.TRACING_MENU_SHOW ) { System.out.println( "Menu(for Editor) >> Shows for the slot " //$NON-NLS-1$ + ( (SlotHandle) firstSelectedElement ).getSlotID( ) + " of " //$NON-NLS-1$ + ( (SlotHandle) firstSelectedElement ).getElementHandle( ) .getDefn( ) .getDisplayName( ) ); } } else { // } if ( !getTableEditParts( ).isEmpty( ) ) { createInsertGroupMenu( menuManager, GEFActionConstants.GROUP_ADD ); menuManager.appendToGroup( GEFActionConstants.GROUP_ADD, getAction( DeleteTableGroupAction.ID ) ); if ( getTableEditParts( ).size( ) == 1 ) { createEditGroupMenu( menuManager, GEFActionConstants.GROUP_ADD ); Separator separator = new Separator( EditBindingAction.ID ); menuManager.add( separator ); menuManager.appendToGroup( EditBindingAction.ID, getAction( EditBindingAction.ID ) ); } } if ( !getListEditParts( ).isEmpty( ) ) { createInsertGroupMenu( menuManager, GEFActionConstants.GROUP_ADD ); menuManager.appendToGroup( GEFActionConstants.GROUP_ADD, getAction( DeleteListGroupAction.ID ) ); if ( getListEditParts( ).size( ) == 1 ) { createEditGroupMenu( menuManager, GEFActionConstants.GROUP_ADD ); } } if ( getElements( ).size( ) == 1 || isMutilSelection( multiSelection ) ) { if ( firstSelectedElement instanceof DesignElementHandle ) { String elementName = ( (DesignElementHandle) firstSelectedElement ).getDefn( ) .getName( ); IMenuBuilder menuBuilder = ExtensionPointManager.getInstance( ) .getMenuBuilder( elementName ); if ( menuBuilder != null ) { menuBuilder.buildMenu( menuManager, getElements( ) ); } } } }
12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/e2cfefeda592f2030e7f1600e05d1ce18b6d2faf/SchematicContextMenuProvider.java/clean/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/editors/schematic/providers/SchematicContextMenuProvider.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1361, 27315, 12, 467, 4599, 1318, 3824, 1318, 262, 202, 95, 202, 202, 7113, 42, 1803, 2918, 18, 1289, 8336, 1803, 3621, 12, 3824, 1318, 11272, 202, 202, 921, 1122, 7416, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1361, 27315, 12, 467, 4599, 1318, 3824, 1318, 262, 202, 95, 202, 202, 7113, 42, 1803, 2918, 18, 1289, 8336, 1803, 3621, 12, 3824, 1318, 11272, 202, 202, 921, 1122, 7416, ...
assertEquals("", new ToStringBuilder(null, null).toString());
assertEquals("<null>", new ToStringBuilder(null, null).toString());
public void testConstructorEx2() { assertEquals("", new ToStringBuilder(null, null).toString()); new ToStringBuilder(this.base, null).toString(); }
4554 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4554/8e45d583ee93d357c0949320da79f3d4a4596aa5/ToStringBuilderTest.java/clean/src/test/org/apache/commons/lang/builder/ToStringBuilderTest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1842, 6293, 424, 22, 1435, 288, 3639, 1815, 8867, 2932, 32, 2011, 2984, 16, 394, 2974, 21253, 12, 2011, 16, 446, 2934, 10492, 10663, 3639, 394, 2974, 21253, 12, 2211, 18, 1969,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1842, 6293, 424, 22, 1435, 288, 3639, 1815, 8867, 2932, 32, 2011, 2984, 16, 394, 2974, 21253, 12, 2011, 16, 446, 2934, 10492, 10663, 3639, 394, 2974, 21253, 12, 2211, 18, 1969,...
if (a < 0)
while (a < start)
public boolean containsAngle(double a) { double start = getAngleStart(); double end = start + getAngleExtent(); start %= 360; if (start < 0) start += 360; end %= 360; if (end < 0) end += 360; a %= 360; if (a < 0) a += 360; return a >= start && a <= end; }
50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/560cf787ab92cba97cf57ce7b258e72947e5efbc/Arc2D.java/clean/core/src/classpath/java/java/awt/geom/Arc2D.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 1250, 1914, 8467, 12, 9056, 279, 13, 225, 288, 565, 1645, 787, 273, 336, 8467, 1685, 5621, 565, 1645, 679, 273, 787, 397, 336, 8467, 17639, 5621, 565, 787, 30582, 12360, 31, 565, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 1250, 1914, 8467, 12, 9056, 279, 13, 225, 288, 565, 1645, 787, 273, 336, 8467, 1685, 5621, 565, 1645, 679, 273, 787, 397, 336, 8467, 17639, 5621, 565, 787, 30582, 12360, 31, 565, ...
alertNode.addChild("#", NEVER_CONN_START.replace("{NEVER_CONN}", Integer.toString(neverConn)));
alertNode.addChild("#", replace(NEVER_CONN_START, "{NEVER_CONN}", Integer.toString(neverConn)));
public HTMLNode getHTMLText() { HTMLNode alertNode = new HTMLNode("div"); int disconnected = peers - conns; if (peers == 0) { if(n.isTestnetEnabled()) alertNode.addChild("#", NO_PEERS_TESTNET); else alertNode.addChild("#", NO_PEERS_DARKNET); } else if (conns == 0) { alertNode.addChild("#", NO_CONNS); } else if (conns == 1) { alertNode.addChild("#", ONE_CONN); } else if (conns == 2) { alertNode.addChild("#", TWO_CONNS); } else if (neverConn > MAX_NEVER_CONNECTED_PEER_ALERT_THRESHOLD) { alertNode.addChild("#", NEVER_CONN_START.replace("{NEVER_CONN}", Integer.toString(neverConn))); alertNode.addChild(NEVER_CONN_MIDDLE_NODE()); alertNode.addChild("#", NEVER_CONN_END.replace("{NEVER_CONN}", Integer.toString(neverConn))); } else if ((peers - conns) > MAX_DISCONN_PEER_ALERT_THRESHOLD) { alertNode.addChild("#", DISCONNECTED.replace("{DISCONNECTED}", Integer.toString(disconnected))); } else if (conns > MAX_CONN_ALERT_THRESHOLD) { alertNode.addChild("#", TOO_MANY_CONNECTIONS.replace("{CONNS}", Integer.toString(conns))); } else if (peers > MAX_PEER_ALERT_THRESHOLD) { alertNode.addChild("#", TOO_MANY_PEERS.replace("{PEERS}", Integer.toString(peers))); } else if (n.bwlimitDelayAlertRelevant && (bwlimitDelayTime > Node.MAX_BWLIMIT_DELAY_TIME_ALERT_THRESHOLD)) { alertNode.addChild("#", TOO_HIGH_BWLIMITDELAYTIME.replace("{BWLIMIT_DELAY_TIME}", Integer.toString(bwlimitDelayTime))); } else if (n.nodeAveragePingAlertRelevant && (nodeAveragePingTime > Node.MAX_NODE_AVERAGE_PING_TIME_ALERT_THRESHOLD)) { alertNode.addChild("#", TOO_HIGH_PING.replace("{PING_TIME}", Integer.toString(bwlimitDelayTime))); } else if (oldestNeverConnectedPeerAge > MAX_OLDEST_NEVER_CONNECTED_PEER_AGE_ALERT_THRESHOLD) { alertNode.addChild("#", NEVER_CONNECTED_TWO_WEEKS); } else throw new IllegalArgumentException("not valid"); return alertNode; }
50619 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50619/89258c127cb3b0f73aa57374b50b6d35a02ac021/PeerManagerUserAlert.java/clean/src/freenet/node/useralerts/PeerManagerUserAlert.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 3982, 907, 336, 4870, 1528, 1435, 288, 202, 202, 4870, 907, 6881, 907, 273, 394, 3982, 907, 2932, 2892, 8863, 202, 202, 474, 17853, 273, 10082, 300, 18976, 31, 202, 202, 430, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 3982, 907, 336, 4870, 1528, 1435, 288, 202, 202, 4870, 907, 6881, 907, 273, 394, 3982, 907, 2932, 2892, 8863, 202, 202, 474, 17853, 273, 10082, 300, 18976, 31, 202, 202, 430, ...
public void init (ChannelConfig chConfig) {}
public void init (ChannelConfig chConfig) {this.chConfig = chConfig;}
public void init (ChannelConfig chConfig) {}
24959 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/24959/01c21dcb2efe47440ca901bbf760f68f438d09e9/CBookmarks.java/clean/source/org/jasig/portal/channels/CBookmarks.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 1208, 261, 2909, 809, 462, 809, 13, 288, 2211, 18, 343, 809, 273, 462, 809, 31, 97, 282, 2, 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, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 1208, 261, 2909, 809, 462, 809, 13, 288, 2211, 18, 343, 809, 273, 462, 809, 31, 97, 282, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
synchronized(subscriptionListeners){ Iterator listeners = subscriptionListeners.iterator();
Iterator listeners = null;
void fireContactPropertyChangeEvent( String eventID, ContactIcqImpl sourceContact, Object oldValue, Object newValue) { ContactPropertyChangeEvent evt = new ContactPropertyChangeEvent(sourceContact, eventID , oldValue, newValue); logger.debug("Dispatching a Contact Property Change Event to" +subscriptionListeners.size() + " listeners. Evt="+evt); synchronized(subscriptionListeners){ Iterator listeners = subscriptionListeners.iterator(); while (listeners.hasNext()) { SubscriptionListener listener = (SubscriptionListener) listeners.next(); listener.contactModified(evt); } } }
43455 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/43455/4b7af66795876f56cf66335081d9d374016ece8d/OperationSetPersistentPresenceIcqImpl.java/buggy/src/net/java/sip/communicator/impl/protocol/icq/OperationSetPersistentPresenceIcqImpl.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 918, 4452, 6567, 1396, 20930, 12, 514, 9079, 871, 734, 16, 29159, 13329, 45, 71, 85, 2828, 4202, 1084, 6567, 16, 29159, 1033, 9079, 11144, 16, 29159, 1033, 9079, 6129, 13, 565, 288, 3639,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 918, 4452, 6567, 1396, 20930, 12, 514, 9079, 871, 734, 16, 29159, 13329, 45, 71, 85, 2828, 4202, 1084, 6567, 16, 29159, 1033, 9079, 11144, 16, 29159, 1033, 9079, 6129, 13, 565, 288, 3639,...
AST __t2037 = _t; AST tmp2193_AST_in = (AST)_t;
AST __t2040 = _t; AST tmp2196_AST_in = (AST)_t;
public final void spacephrase(AST _t) throws RecognitionException { AST spacephrase_AST_in = (_t == ASTNULL) ? null : (AST)_t; AST __t2037 = _t; AST tmp2193_AST_in = (AST)_t; match(_t,SPACE); _t = _t.getFirstChild(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case LEFTPAREN: { funargs(_t); _t = _retTree; break; } case 3: { break; } default: { throw new NoViableAltException(_t); } } } _t = __t2037; _t = _t.getNextSibling(); _retTree = _t; }
13952 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13952/daa15e07422d3491bbbb4d0060450c81983332a4/TreeParser03.java/clean/trunk/org.prorefactor.core/src/org/prorefactor/treeparser03/TreeParser03.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 727, 918, 3476, 9429, 12, 9053, 389, 88, 13, 1216, 9539, 288, 9506, 202, 9053, 3476, 9429, 67, 9053, 67, 267, 273, 261, 67, 88, 422, 9183, 8560, 13, 692, 446, 294, 261, 9053...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 727, 918, 3476, 9429, 12, 9053, 389, 88, 13, 1216, 9539, 288, 9506, 202, 9053, 3476, 9429, 67, 9053, 67, 267, 273, 261, 67, 88, 422, 9183, 8560, 13, 692, 446, 294, 261, 9053...
};
}
void createStyledTextStyleGroup () { final Display display = controlGroup.getDisplay (); styledTextStyleGroup = new Group (controlGroup, SWT.NONE); styledTextStyleGroup.setText (ControlExample.getResourceString ("StyledText_Styles")); styledTextStyleGroup.setLayout (new GridLayout(5, false)); GridData data = new GridData (GridData.HORIZONTAL_ALIGN_FILL); data.horizontalSpan = 2; styledTextStyleGroup.setLayoutData (data); /* Get images */ boldImage = createBitmapImage (display, "bold"); italicImage = createBitmapImage (display, "italic"); redImage = createBitmapImage (display, "red"); yellowImage = createBitmapImage (display, "yellow"); /* Create controls to modify the StyledText */ Label label = new Label (styledTextStyleGroup, SWT.NONE); label.setText (ControlExample.getResourceString ("StyledText_Style_Instructions")); data = new GridData(GridData.FILL_HORIZONTAL); data.horizontalSpan = 5; label.setLayoutData(data); new Label (styledTextStyleGroup, SWT.NONE).setText (ControlExample.getResourceString ("Bold")); boldButton = new Button (styledTextStyleGroup, SWT.PUSH); boldButton.setImage (boldImage); boldButton.addSelectionListener(new SelectionAdapter () { public void widgetSelected (SelectionEvent e) { Point sel = styledText.getSelectionRange(); if ((sel == null) || (sel.y == 0)) return; StyleRange style; for (int i = sel.x; i<sel.x+sel.y; i++) { StyleRange range = styledText.getStyleRangeAtOffset(i); if (range == null) {style = new StyleRange(i, 1, null, null, SWT.BOLD);} else {style = new StyleRange(i, 1, range.foreground, range.background, range.fontStyle | SWT.BOLD);}; styledText.setStyleRange(style); } styledText.setSelectionRange(sel.x + sel.y, 0); } }); new Label (styledTextStyleGroup, SWT.NONE).setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); new Label (styledTextStyleGroup, SWT.NONE).setText (ControlExample.getResourceString ("Foreground_Style")); redButton = new Button (styledTextStyleGroup, SWT.PUSH); redButton.setImage (redImage); new Label (styledTextStyleGroup, SWT.NONE).setText (ControlExample.getResourceString ("Italic")); italicButton = new Button (styledTextStyleGroup, SWT.PUSH); italicButton.setImage (italicImage); italicButton.addSelectionListener(new SelectionAdapter () { public void widgetSelected (SelectionEvent e) { Point sel = styledText.getSelectionRange(); if ((sel == null) || (sel.y == 0)) return; StyleRange style; for (int i = sel.x; i<sel.x+sel.y; i++) { StyleRange range = styledText.getStyleRangeAtOffset(i); if (range == null) {style = new StyleRange(i, 1, null, null, SWT.ITALIC);} else {style = new StyleRange(i, 1, range.foreground, range.background, range.fontStyle | SWT.ITALIC);}; styledText.setStyleRange(style); } styledText.setSelectionRange(sel.x + sel.y, 0); } }); new Label (styledTextStyleGroup, SWT.NONE).setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); new Label (styledTextStyleGroup, SWT.NONE).setText (ControlExample.getResourceString ("Background_Style")); yellowButton = new Button (styledTextStyleGroup, SWT.PUSH); yellowButton.setImage (yellowImage); SelectionListener colorListener = new SelectionAdapter () { public void widgetSelected (SelectionEvent e) { Point sel = styledText.getSelectionRange(); if ((sel == null) || (sel.y == 0)) return; Color fg, bg; if (e.widget == redButton) { fg = display.getSystemColor (SWT.COLOR_RED); bg = null; } else if (e.widget == yellowButton) { fg = null; bg = display.getSystemColor (SWT.COLOR_YELLOW); } else { fg = bg = null; } StyleRange style; for (int i = sel.x; i<sel.x+sel.y; i++) { StyleRange range = styledText.getStyleRangeAtOffset(i); if (range == null) { style = new StyleRange(i, 1, fg, bg, SWT.NORMAL); } else { if (range.foreground != null) fg = range.foreground; if (range.background != null) bg = range.background; style = new StyleRange(i, 1, fg, bg, range.fontStyle); }; styledText.setStyleRange(style); } styledText.setSelectionRange(sel.x + sel.y, 0); }; }; redButton.addSelectionListener(colorListener); yellowButton.addSelectionListener(colorListener); yellowButton.addDisposeListener(new DisposeListener () { public void widgetDisposed (DisposeEvent e) { boldImage.dispose(); italicImage.dispose(); redImage.dispose(); yellowImage.dispose(); } }); }
12413 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12413/c2ce437a63d3b60125a283c15cfca323c2e2ec7b/StyledTextTab.java/clean/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/StyledTextTab.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 6459, 752, 24273, 1259, 1528, 2885, 1114, 1832, 288, 202, 202, 6385, 9311, 2562, 273, 3325, 1114, 18, 588, 4236, 261, 1769, 202, 202, 334, 93, 1259, 1528, 2885, 1114, 273, 394, 3756,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6459, 752, 24273, 1259, 1528, 2885, 1114, 1832, 288, 202, 202, 6385, 9311, 2562, 273, 3325, 1114, 18, 588, 4236, 261, 1769, 202, 202, 334, 93, 1259, 1528, 2885, 1114, 273, 394, 3756,...
viewConsoleItemActionPerformed(evt);
loadBugsItemActionPerformed(evt);
public void actionPerformed(java.awt.event.ActionEvent evt) { viewConsoleItemActionPerformed(evt); }
7352 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7352/9e786b0d1a7e5b23874458bb460631bf7df21105/FindBugsFrame.java/buggy/findbugs/src/java/edu/umd/cs/findbugs/gui/FindBugsFrame.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 2398, 1071, 918, 26100, 12, 6290, 18, 2219, 88, 18, 2575, 18, 1803, 1133, 6324, 13, 288, 7734, 1262, 31559, 1180, 19449, 12, 73, 11734, 1769, 5411, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 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, 2398, 1071, 918, 26100, 12, 6290, 18, 2219, 88, 18, 2575, 18, 1803, 1133, 6324, 13, 288, 7734, 1262, 31559, 1180, 19449, 12, 73, 11734, 1769, 5411, 289, 2, -100, -100, -100, -100, -100, -100, ...
return (FilterRule) loadClass( (String) filter_el, "FilterRule");
return (FilterRule) loadClass( (String) filter_el, FilterRule.class);
protected FilterRule constructFilterRule(String mimeType) { Object filter_el = definitionMap.getMapElement(mimeType + AU_FILTER_SUFFIX); if (filter_el instanceof String) { return (FilterRule) loadClass( (String) filter_el, "FilterRule"); } else if (filter_el instanceof List) { if ( ( (List) filter_el).size() > 0) { return new DefinableFilterRule( (List) filter_el); } } return super.constructFilterRule(mimeType); }
8150 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8150/50e37e97a4b2e7cad04ad752a91f8e53c18a8468/DefinableArchivalUnit.java/buggy/src/org/lockss/plugin/definable/DefinableArchivalUnit.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 4750, 4008, 2175, 4872, 1586, 2175, 12, 780, 10707, 13, 288, 565, 1033, 1034, 67, 292, 273, 2379, 863, 18, 588, 863, 1046, 12, 19176, 3639, 397, 28235, 67, 11126, 67, 14964, 1769, 565, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 4750, 4008, 2175, 4872, 1586, 2175, 12, 780, 10707, 13, 288, 565, 1033, 1034, 67, 292, 273, 2379, 863, 18, 588, 863, 1046, 12, 19176, 3639, 397, 28235, 67, 11126, 67, 14964, 1769, 565, ...
if (myValue.getClass().isArray() && other.getValue().getClass().isArray()) { return arrayEquals(other.getValue()); } else { return myKey.equals(other.getKey()) && myValue.equals(other.getValue()); } }
if (myValue.getClass().isArray() && other.getValue().getClass().isArray()) { return arrayEquals(other.getValue()); } else { return myKey.equals(other.getKey()) && myValue.equals(other.getValue()); } }
public boolean equals( Object o ) { if (!(o instanceof MapEntry)) { return false; } MapEntry other = (MapEntry)o; if (myValue.getClass().isArray() && other.getValue().getClass().isArray()) { return arrayEquals(other.getValue()); } else { return myKey.equals(other.getKey()) && myValue.equals(other.getValue()); } }
2796 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2796/a917aff361c58c31c5dce12a5e8052df6803dbe1/MapEntry.java/clean/jmock/core/src/org/jmock/expectation/MapEntry.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 1250, 1606, 12, 1033, 320, 262, 288, 202, 202, 430, 16051, 12, 83, 1276, 1635, 1622, 3719, 288, 1082, 202, 2463, 629, 31, 202, 202, 97, 202, 202, 863, 1622, 1308, 273, 261, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 1250, 1606, 12, 1033, 320, 262, 288, 202, 202, 430, 16051, 12, 83, 1276, 1635, 1622, 3719, 288, 1082, 202, 2463, 629, 31, 202, 202, 97, 202, 202, 863, 1622, 1308, 273, 261, ...
System.out.println(changeEvent.getState() + " " + d);
log.info(changeEvent.getState() + " " + d);
public void onSessionChanged(SessionChangeEvent changeEvent) { Session ses = (Session)changeEvent.getSource(); switch (changeEvent.getState()) { case STATE_CONNECTED: final String d = ses.getAllocDeviceName(); if (d != null) { System.out.println(changeEvent.getState() + " " + d); final int index = getIndexOfSession(ses);// System.out.println(" index of session " + index + " num frames " + desktop.getAllFrames().length); if (index == -1) return; Runnable tc = new Runnable () { public void run() { JInternalFrame[] frames = desktop.getAllFrames(); int id = ((MyInternalFrame)frames[index]).getInternalId(); frames[index].setTitle("#" + id + " " + d); } }; SwingUtilities.invokeLater(tc); } break; } }
4212 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4212/41959614f13a424f5e04ebb4ca1b8fee5af0f908/Gui5250MDIFrame.java/buggy/src/org/tn5250j/Gui5250MDIFrame.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 565, 1071, 918, 603, 2157, 5033, 12, 2157, 20930, 2549, 1133, 13, 288, 1377, 3877, 24138, 273, 261, 2157, 13, 3427, 1133, 18, 588, 1830, 5621, 1377, 1620, 261, 3427, 1133, 18, 588, 1119, 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, 565, 1071, 918, 603, 2157, 5033, 12, 2157, 20930, 2549, 1133, 13, 288, 1377, 3877, 24138, 273, 261, 2157, 13, 3427, 1133, 18, 588, 1830, 5621, 1377, 1620, 261, 3427, 1133, 18, 588, 1119, 10756...
if(uploadFrom == null || uploadFrom.equalsIgnoreCase("direct")) {
if((uploadFrom == null) || uploadFrom.equalsIgnoreCase("direct")) {
public ClientPutMessage(SimpleFieldSet fs) throws MessageInvalidException { identifier = fs.get("Identifier"); if(identifier == null) throw new MessageInvalidException(ProtocolErrorMessage.MISSING_FIELD, "No Identifier", null); try { String u = fs.get("URI"); if(u == null) throw new MessageInvalidException(ProtocolErrorMessage.MISSING_FIELD, "No URI", identifier); uri = new FreenetURI(fs.get("URI")); } catch (MalformedURLException e) { throw new MessageInvalidException(ProtocolErrorMessage.URI_PARSE_ERROR, e.getMessage(), identifier); } global = Fields.stringToBool(fs.get("Global"), false); String verbosityString = fs.get("Verbosity"); if(verbosityString == null) verbosity = 0; else { try { verbosity = Integer.parseInt(verbosityString, 10); } catch (NumberFormatException e) { throw new MessageInvalidException(ProtocolErrorMessage.ERROR_PARSING_NUMBER, "Error parsing Verbosity field: "+e.getMessage(), identifier); } } contentType = fs.get("Metadata.ContentType"); String maxRetriesString = fs.get("MaxRetries"); if(maxRetriesString == null) // default to 0 maxRetries = 0; else { try { maxRetries = Integer.parseInt(maxRetriesString, 10); } catch (NumberFormatException e) { throw new MessageInvalidException(ProtocolErrorMessage.ERROR_PARSING_NUMBER, "Error parsing MaxSize field: "+e.getMessage(), identifier); } } getCHKOnly = Fields.stringToBool(fs.get("GetCHKOnly"), false); String priorityString = fs.get("PriorityClass"); if(priorityString == null) { // defaults to the one just below FProxy priorityClass = RequestStarter.IMMEDIATE_SPLITFILE_PRIORITY_CLASS; } else { try { priorityClass = Short.parseShort(priorityString, 10); if(priorityClass < RequestStarter.MAXIMUM_PRIORITY_CLASS || priorityClass > RequestStarter.MINIMUM_PRIORITY_CLASS) throw new MessageInvalidException(ProtocolErrorMessage.INVALID_FIELD, "Valid priorities are from "+RequestStarter.MAXIMUM_PRIORITY_CLASS+" to "+RequestStarter.MINIMUM_PRIORITY_CLASS, identifier); } catch (NumberFormatException e) { throw new MessageInvalidException(ProtocolErrorMessage.ERROR_PARSING_NUMBER, "Error parsing PriorityClass field: "+e.getMessage(), identifier); } } String uploadFrom = fs.get("UploadFrom"); if(uploadFrom == null || uploadFrom.equalsIgnoreCase("direct")) { uploadFromType = UPLOAD_FROM_DIRECT; String dataLengthString = fs.get("DataLength"); if(dataLengthString == null) throw new MessageInvalidException(ProtocolErrorMessage.MISSING_FIELD, "Need DataLength on a ClientPut", identifier); try { dataLength = Long.parseLong(dataLengthString, 10); } catch (NumberFormatException e) { throw new MessageInvalidException(ProtocolErrorMessage.ERROR_PARSING_NUMBER, "Error parsing DataLength field: "+e.getMessage(), identifier); } this.origFilename = null; redirectTarget = null; } else if(uploadFrom.equalsIgnoreCase("disk")) { uploadFromType = UPLOAD_FROM_DISK; String filename = fs.get("Filename"); if(filename == null) throw new MessageInvalidException(ProtocolErrorMessage.MISSING_FIELD, "Missing field Filename", identifier); File f = new File(filename); if(!(f.exists() && f.isFile() && f.canRead())) throw new MessageInvalidException(ProtocolErrorMessage.FILE_NOT_FOUND, null, identifier); dataLength = f.length(); FileBucket fileBucket = new FileBucket(f, true, false, false, false); this.bucket = fileBucket; this.origFilename = f; redirectTarget = null; } else if(uploadFrom.equalsIgnoreCase("redirect")) { uploadFromType = UPLOAD_FROM_REDIRECT; String target = fs.get("TargetURI"); if(target == null) throw new MessageInvalidException(ProtocolErrorMessage.MISSING_FIELD, "TargetURI missing but UploadFrom=redirect", identifier); try { redirectTarget = new FreenetURI(target); } catch (MalformedURLException e) { throw new MessageInvalidException(ProtocolErrorMessage.INVALID_FIELD, "Invalid TargetURI: "+e, identifier); } dataLength = 0; origFilename = null; bucket = null; } else throw new MessageInvalidException(ProtocolErrorMessage.INVALID_FIELD, "UploadFrom invalid or unrecognized: "+uploadFrom, identifier); dontCompress = Fields.stringToBool(fs.get("DontCompress"), false); String persistenceString = fs.get("Persistence"); if(persistenceString == null || persistenceString.equalsIgnoreCase("connection")) { // Default: persists until connection loss. persistenceType = ClientRequest.PERSIST_CONNECTION; } else if(persistenceString.equalsIgnoreCase("reboot")) { // Reports to client by name; persists over connection loss. // Not saved to disk, so dies on reboot. persistenceType = ClientRequest.PERSIST_REBOOT; } else if(persistenceString.equalsIgnoreCase("forever")) { // Same as reboot but saved to disk, persists forever. persistenceType = ClientRequest.PERSIST_FOREVER; } else { throw new MessageInvalidException(ProtocolErrorMessage.ERROR_PARSING_NUMBER, "Error parsing Persistence field: "+persistenceString, identifier); } clientToken = fs.get("ClientToken"); }
51738 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51738/ca136843ae9ecb30cadada58a33a5dc2cf8ad064/ClientPutMessage.java/buggy/src/freenet/node/fcp/ClientPutMessage.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 2445, 6426, 1079, 12, 5784, 974, 694, 2662, 13, 1216, 2350, 1941, 503, 288, 202, 202, 5644, 273, 2662, 18, 588, 2932, 3004, 8863, 202, 202, 430, 12, 5644, 422, 446, 13, 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, 2445, 6426, 1079, 12, 5784, 974, 694, 2662, 13, 1216, 2350, 1941, 503, 288, 202, 202, 5644, 273, 2662, 18, 588, 2932, 3004, 8863, 202, 202, 430, 12, 5644, 422, 446, 13, 1082, ...
final float radius = 0.03f;
final float radius = 0.015f;
public static void main(String[] args) { SunflowAPI api = SunflowAPI.create(null); api.shader("ao", new AmbientOcclusionShader()); final float size = 5; final float radius = 0.03f; final int numFrames = 24 * 16; Display display = null; if (args.length == 0) { final int numParticles = 1000000; DLAParticleGrid grid = new DLAParticleGrid(new BoundingBox(size), numParticles, radius); grid.addParticle(0, 0, 0); // add a particle right in the center Timer timer = new Timer(); timer.start(); int delta = 100; double last = 0; for (int i = 1; i < numParticles; i++) { if (i % delta == 0) { timer.end(); double sec = timer.seconds(); if (sec - last < 5) delta *= 10; last = sec; sec = (sec / i) * (numParticles - i); UI.printInfo(Module.USER, "Simulating particle %8d (%s elapsed - %s remaining)...", i, timer, Timer.toString(sec)); } // start with a random seed on the boundary of the surface double rx = Math.random(); double ry = Math.random(); int side = (int) (rx * 6); rx = rx * 6 - side; float ox, oy, oz; switch (side) { case 0: ox = -size; oy = (float) (2 * size * rx - size); oz = (float) (2 * size * ry - size); break; case 1: ox = +size; oy = (float) (2 * size * rx - size); oz = (float) (2 * size * ry - size); break; case 2: oy = -size; oz = (float) (2 * size * rx - size); ox = (float) (2 * size * ry - size); break; case 3: oy = +size; oz = (float) (2 * size * rx - size); ox = (float) (2 * size * ry - size); break; case 4: oz = -size; ox = (float) (2 * size * rx - size); oy = (float) (2 * size * ry - size); break; case 5: default: oz = +size; ox = (float) (2 * size * rx - size); oy = (float) (2 * size * ry - size); break; } boolean stored = false; for (int iter = 0; iter < 1000000; iter++) { double s, a; double dx, dy, dz; do { dx = -1 + 2 * Math.random(); dy = -1 + 2 * Math.random(); s = (dx) * (dx) + (dy) * (dy); } while (s > 1.0); dz = -1 + 2 * s; a = 2 * Math.sqrt(1 - s); dx *= a; dy *= a; // bounce backwards off the bounds if (ox + dx < -size || ox + dx > +size) dx = -dx; if (oy + dy < -size || oy + dy > +size) dy = -dy; if (oz + dz < -size || oz + dz > +size) dz = -dz; if (!grid.isInside((float) (ox + dx), (float) (oy + dy), (float) (oz + dz))) { UI.printWarning(Module.USER, "Particle %d escaped bounds on iteration %d!", i, iter); UI.printWarning(Module.USER, "Particle pos: (%7.3f, %7.3f, %7.3f)", ox, oy, oz); UI.printWarning(Module.USER, "Particle dir: (%7.3f, %7.3f, %7.3f)", dx, dy, dz); UI.printWarning(Module.USER, "Particle dst: (%7.3f, %7.3f, %7.3f)", ox + dx, oy + dy, oz + dz); break; } Ray r = new Ray(ox, oy, oz, (float) dx, (float) dy, (float) dz); r.setMax(1); float t = grid.intersect(r); if (t > 0 && t < 1) { // found a hit! we can store the particle float px = (float) (ox + t * dx); float py = (float) (oy + t * dy); float pz = (float) (oz + t * dz); grid.addParticle(px, py, pz); stored = true; break; } else { ox += dx; oy += dy; oz += dz; } } if (!stored) UI.printWarning(Module.USER, "Particle %d couldn't be stored", i); } timer.end(); UI.printInfo(Module.USER, "Particle tracing took: %s", timer); UI.printInfo(Module.USER, "Writing particles to file ..."); try { FileOutputStream file = new FileOutputStream("/home/ckulla/Desktop/particles.dla"); DataOutputStream stream = new DataOutputStream(file); for (float p : grid.particles.trim()) stream.writeFloat(p); file.close(); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } UI.printInfo(Module.USER, "Writing particles to file done."); api.parameter("particles", "point", "vertex", grid.particles.trim()); api.parameter("num", grid.particles.getSize() / 3); api.parameter("radius", radius); api.geometry("particles.geo", new DLASurface()); display = new FrameDisplay(); } else if (args.length == 2 || args.length == 3) { String filename = args[0]; int frameNumber = Integer.parseInt(args[1]); UI.printInfo(Module.USER, "Loading particle file: %s", filename); int numParticles = (int) (new File(filename).length() / 12); int n = Math.min((numParticles + numFrames - 1) / numFrames * frameNumber, numParticles); try { File file = new File(filename); FileInputStream stream = new FileInputStream(filename); MappedByteBuffer map = stream.getChannel().map(FileChannel.MapMode.READ_ONLY, 0, file.length()); FloatBuffer buffer = map.asFloatBuffer(); float[] data = new float[buffer.capacity()]; for (int i = 0; i < data.length; i++) data[i] = buffer.get(i); stream.close(); api.parameter("particles", "point", "vertex", data); api.parameter("num", n); api.parameter("radius", radius); api.geometry("particles.geo", new DLASurface()); } catch (IOException e) { e.printStackTrace(); System.exit(1); } if (args.length > 2) display = new FileDisplay(args[2]); else display = new FrameDisplay(); } else if (args.length == 1) { String filename = args[0]; UI.printInfo(Module.USER, "Loading particle file: %s", filename); int numParticles = (int) (new File(filename).length() / 12); UI.printInfo(Module.USER, "Found %d particles ...", numParticles); try { File file = new File(filename); FileInputStream stream = new FileInputStream(filename); MappedByteBuffer map = stream.getChannel().map(FileChannel.MapMode.READ_ONLY, 0, file.length()); FloatBuffer buffer = map.asFloatBuffer(); float[] data = new float[buffer.capacity()]; for (int i = 0; i < data.length; i++) data[i] = buffer.get(i); stream.close(); api.parameter("particles", "point", "vertex", data); api.parameter("num", 1); api.parameter("radius", radius); api.geometry("particles.geo", new DLASurface()); } catch (IOException e) { e.printStackTrace(); System.exit(1); } api.shader("quick", new SimpleShader()); api.parameter("shaders", new String[] { "quick" }); api.instance("particles.instance", "particles.geo"); api.parameter("target", new Point3(0, 0, 0)); api.parameter("eye", new Point3(0, 0, -size * 2)); api.parameter("up", new Vector3(0, 1, 0)); api.parameter("fov", 90.0f); api.parameter("aspect", 1.0f); api.camera("cam", new PinholeLens()); api.parameter("aa.min", 0); api.parameter("aa.max", 2); api.filter("mitchell"); api.parameter("resolutionX", 1024); api.parameter("resolutionY", 1024); api.parameter("camera", "cam"); api.options(SunflowAPI.DEFAULT_OPTIONS); for (int frameNumber = 1; frameNumber <= numFrames; frameNumber++) { int n = Math.min((numParticles + numFrames - 1) / numFrames * frameNumber, numParticles); api.parameter("num", n); api.geometry("particles.geo", (PrimitiveList) null); // update api.render(SunflowAPI.DEFAULT_OPTIONS, new FileDisplay(String.format("%s/file.%04d.png", new File(filename).getAbsoluteFile().getParent(), frameNumber))); } } else { System.exit(1); } api.parameter("shaders", new String[] { "ao" }); api.instance("particles.instance", "particles.geo"); api.parameter("target", new Point3(0, 0, 0)); api.parameter("eye", new Point3(0, 0, -size * 2)); api.parameter("up", new Vector3(0, 1, 0)); api.parameter("fov", 90.0f); api.parameter("aspect", 1.0f); api.camera("cam", new PinholeLens()); api.parameter("aa.min", 0); api.parameter("aa.max", 2); api.filter("mitchell"); api.parameter("resolutionX", 1024); api.parameter("resolutionY", 1024); api.parameter("camera", "cam"); api.options(SunflowAPI.DEFAULT_OPTIONS); api.render(SunflowAPI.DEFAULT_OPTIONS, display); }
51147 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51147/340ca3c65fd2efc9927cd494952a25e06ad8badc/DLASimulator.java/clean/src/DLASimulator.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 760, 918, 2774, 12, 780, 8526, 833, 13, 288, 3639, 31608, 2426, 2557, 1536, 273, 31608, 2426, 2557, 18, 2640, 12, 2011, 1769, 3639, 1536, 18, 674, 1143, 2932, 6033, 3113, 394, 432, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 760, 918, 2774, 12, 780, 8526, 833, 13, 288, 3639, 31608, 2426, 2557, 1536, 273, 31608, 2426, 2557, 18, 2640, 12, 2011, 1769, 3639, 1536, 18, 674, 1143, 2932, 6033, 3113, 394, 432, ...
requestRegister(ECX, cnt);
L1AHelper.requestRegister(eContext, ECX, cnt);
public final void visit_lshr() { final IntItem cnt = vstack.popInt(); final LongItem val = vstack.popLong(); final X86RegisterPool pool = eContext.getPool(); // Get cnt into ECX if (!cnt.uses(ECX)) { val.spillIfUsing(eContext, ECX); requestRegister(ECX, cnt); cnt.loadTo(eContext, ECX); } // Load val val.load(eContext); final Register lsb = val.getLsbRegister(); final Register msb = val.getMsbRegister(); // Calculate os.writeAND(ECX, 63); os.writeCMP_Const(ECX, 32); final Label gt32Label = new Label(curInstrLabel + "gt32"); final Label endLabel = new Label(curInstrLabel + "end"); os.writeJCC(gt32Label, X86Constants.JAE); // JAE /** ECX < 32 */ os.writeSHRD_CL(lsb, msb); os.writeSAR_CL(msb); os.writeJMP(endLabel); /** ECX >= 32 */ os.setObjectRef(gt32Label); os.writeMOV(INTSIZE, lsb, msb); os.writeSAR(msb, 31); os.writeSAR_CL(lsb); os.setObjectRef(endLabel); // Push final LongItem result = LongItem.createReg(lsb, msb); pool.transferOwnerTo(lsb, result); pool.transferOwnerTo(msb, result); vstack.push(result); // Release cnt.release(eContext); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/7f3f443c80552e30cb144c1a1ce760d89fa35f2b/X86BytecodeVisitor.java/buggy/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 727, 918, 3757, 67, 80, 674, 86, 1435, 288, 202, 202, 6385, 3094, 1180, 7599, 273, 19510, 18, 5120, 1702, 5621, 202, 202, 6385, 3407, 1180, 1244, 273, 19510, 18, 5120, 3708, 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, 727, 918, 3757, 67, 80, 674, 86, 1435, 288, 202, 202, 6385, 3094, 1180, 7599, 273, 19510, 18, 5120, 1702, 5621, 202, 202, 6385, 3407, 1180, 1244, 273, 19510, 18, 5120, 3708, 5...
String iconPath = "icons/full/"; try { AbstractUIPlugin plugin = (AbstractUIPlugin) Platform .getPlugin(PlatformUI.PLUGIN_ID); URL installURL = plugin.getDescriptor().getInstallURL(); URL url = new URL(installURL, iconPath + relativePath); return ImageDescriptor.createFromURL(url); } catch (MalformedURLException e) { return ImageDescriptor.getMissingImageDescriptor(); }
return WorkbenchImages.getWorkbenchImageDescriptor(relativePath);
protected ImageDescriptor getImageDescriptor(String relativePath) { String iconPath = "icons/full/"; //$NON-NLS-1$ try { AbstractUIPlugin plugin = (AbstractUIPlugin) Platform .getPlugin(PlatformUI.PLUGIN_ID); URL installURL = plugin.getDescriptor().getInstallURL(); URL url = new URL(installURL, iconPath + relativePath); return ImageDescriptor.createFromURL(url); } catch (MalformedURLException e) { // should not happen return ImageDescriptor.getMissingImageDescriptor(); } }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/8fd0f2b4fd47f07d36004083215b102b7c5bcc8b/ResourceNavigatorActionGroup.java/clean/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/ResourceNavigatorActionGroup.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 3421, 3187, 10567, 3187, 12, 780, 12820, 13, 288, 3639, 514, 4126, 743, 273, 315, 14516, 19, 2854, 4898, 31, 4329, 3993, 17, 5106, 17, 21, 8, 3639, 775, 288, 5411, 4115, 5370, 377...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3421, 3187, 10567, 3187, 12, 780, 12820, 13, 288, 3639, 514, 4126, 743, 273, 315, 14516, 19, 2854, 4898, 31, 4329, 3993, 17, 5106, 17, 21, 8, 3639, 775, 288, 5411, 4115, 5370, 377...
if (i.callMethod(cmp, to).isTrue()) {
if (i.callMethod(cmp, test).isTrue()) {
public IRubyObject step(RubyNumeric to, RubyNumeric step) { RubyNumeric i = this; if (step.getLongValue() == 0) { throw getRuntime().newArgumentError("step cannot be 0"); } String cmp = "<"; if (((RubyBoolean) step.callMethod("<", getRuntime().newFixnum(0))).isFalse()) { cmp = ">"; } while (true) { if (i.callMethod(cmp, to).isTrue()) { break; } getRuntime().yield(i); i = (RubyNumeric) i.callMethod("+", step); } return this; }
46217 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46217/803c66ee682936beecc8a43fe2cfc90fe5645b22/RubyInteger.java/clean/src/org/jruby/RubyInteger.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 15908, 10340, 921, 2235, 12, 54, 10340, 9902, 358, 16, 19817, 9902, 2235, 13, 288, 3639, 19817, 9902, 277, 273, 333, 31, 3639, 309, 261, 4119, 18, 588, 3708, 620, 1435, 422, 374, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 15908, 10340, 921, 2235, 12, 54, 10340, 9902, 358, 16, 19817, 9902, 2235, 13, 288, 3639, 19817, 9902, 277, 273, 333, 31, 3639, 309, 261, 4119, 18, 588, 3708, 620, 1435, 422, 374, ...
networks.addElement(cache);
networkAdd(cache);
public void run() { setProgressOwner(this); CacheNetworkAccess cache; logger.debug("Before networks"); if(configuredNetworks == null || configuredNetworks.length == 0) { NetworkAccess[] nets = netdc.a_finder().retrieve_all(); netDCToNetMap.put(netdc, nets); setProgressMax(this, nets.length+1); int progressVal = 1; setProgressValue(this, progressVal); progressVal++; logger.debug("Got all networks, num="+nets.length); for (int i=0; i<nets.length; i++) { // skip null networks...probably a bug on the server if (nets[i] != null) { // cache = new CacheNetworkAccess(nets[i]); cache = new DNDNetworkAccess(nets[i]); NetworkAttr attr = cache.get_attributes(); netIdToNetMap.put(NetworkIdUtil.toString(cache.get_attributes().get_id()), cache); logger.debug("Got attributes "+attr.get_code()); // preload attributes networks.addElement(cache); } else { logger.warn("a networkaccess returned from NetworkFinder.retrieve_all() is null, skipping."); } // end of else setProgressValue(this, progressVal); progressVal++; } } else { //when the channelChooser is configured with networkCodes.... int totalNetworks = 0; setProgressMax(this, configuredNetworks.length); for(int counter = 0; counter < configuredNetworks.length; counter++) { try { logger.debug("Getting network for "+configuredNetworks[counter]); NetworkAccess[] nets = netdc.a_finder().retrieve_by_code(configuredNetworks[counter]); logger.debug("Got "+nets.length+" networks for "+configuredNetworks[counter]); for(int subCounter = 0; subCounter < nets.length; subCounter++) { if (nets[subCounter] != null) { // cache = new CacheNetworkAccess(nets[subCounter]); cache = new DNDNetworkAccess(nets[subCounter]); NetworkAttr attr = cache.get_attributes(); NetworkAccess[] storedNets = (NetworkAccess[])netDCToNetMap.get(netdc); if ( storedNets == null) { storedNets = new NetworkAccess[1]; storedNets[0] = cache; netDCToNetMap.put(netdc, storedNets); } else { NetworkAccess[] tmp = new NetworkAccess[storedNets.length+1]; System.arraycopy(storedNets, 0, tmp, 0, storedNets.length); tmp[storedNets.length] = cache; netDCToNetMap.put(netdc, tmp); } // end of else netIdToNetMap.put(NetworkIdUtil.toString(cache.get_attributes().get_id()), cache); logger.debug("Got attributes "+attr.get_code()); // preload attributes networks.addElement(cache); totalNetworks++; } else { logger.warn("a networkaccess returned from NetworkFinder.retrieve_by_code is null, skipping."); } // end of else }//end of inner for subCounter = 0; }catch(NetworkNotFound nnfe) { logger.warn("Network "+configuredNetworks[counter]+" not found while getting network access uding NetworkFinder.retrieve_by_code"); } setProgressValue(this, counter+1); }//end of outer for counter = 0; }//end of if else checking for configuredNetworks == null if (doSelect) { // need to do this later to give java Event thread time to set // up network list before setting selection SwingUtilities.invokeLater(new Runnable() { public void run() { networkList.getSelectionModel().setSelectionInterval(0, networkList.getModel().getSize()-1); } }); } // end of if () setProgressValue(this, progressBar.getMaximum()); }
52623 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52623/b183f8e71d17b20aa1e9acf1014a5ad8f36f3dd7/ChannelChooser.java/clean/src/edu/sc/seis/fissuresUtil/chooser/ChannelChooser.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1086, 1435, 288, 202, 565, 444, 5491, 5541, 12, 2211, 1769, 202, 565, 4379, 3906, 1862, 1247, 31, 202, 565, 1194, 18, 4148, 2932, 4649, 13884, 8863, 202, 565, 309, 12, 16...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1086, 1435, 288, 202, 565, 444, 5491, 5541, 12, 2211, 1769, 202, 565, 4379, 3906, 1862, 1247, 31, 202, 565, 1194, 18, 4148, 2932, 4649, 13884, 8863, 202, 565, 309, 12, 16...
public IManagedDependencyGenerator getDependencyGeneratorForExtension(String sourceExt) {
public IManagedDependencyGeneratorType getDependencyGeneratorForExtension(String sourceExt) {
public IManagedDependencyGenerator getDependencyGeneratorForExtension(String sourceExt) { return null; }
6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/c7f73a40517ebbe266d35bf3a3c441c1f33003b8/ToolReference.java/clean/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ToolReference.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 6246, 4184, 7787, 3908, 336, 7787, 3908, 1290, 3625, 12, 780, 1084, 2482, 13, 288, 202, 202, 2463, 446, 31, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 6246, 4184, 7787, 3908, 336, 7787, 3908, 1290, 3625, 12, 780, 1084, 2482, 13, 288, 202, 202, 2463, 446, 31, 202, 97, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
return(_properties.getProperty(name));
return _properties.getProperty(name);
public String getOutputProperty(String name) throws IllegalArgumentException { if (!validOutputProperty(name)) { ErrorMsg err = new ErrorMsg(ErrorMsg.JAXP_UNKNOWN_PROP_ERR, name); throw new IllegalArgumentException(err.toString()); } return(_properties.getProperty(name)); }
46591 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46591/ee5f7629a90e982a1395486f1cb4e74a3269d07f/TransformerImpl.java/buggy/src/org/apache/xalan/xsltc/trax/TransformerImpl.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 514, 11062, 1396, 12, 780, 508, 13, 202, 15069, 2754, 288, 202, 430, 16051, 877, 1447, 1396, 12, 529, 3719, 288, 202, 565, 1068, 3332, 393, 273, 394, 1068, 3332, 12, 668, 3332, 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, 11062, 1396, 12, 780, 508, 13, 202, 15069, 2754, 288, 202, 430, 16051, 877, 1447, 1396, 12, 529, 3719, 288, 202, 565, 1068, 3332, 393, 273, 394, 1068, 3332, 12, 668, 3332, 18...
jj_la1[11] = jj_gen;
jj_la1[13] = jj_gen;
final public void NestedClassDeclaration() throws ParseException { /*@bgen(jjtree) NestedClassDeclaration */ ASTNestedClassDeclaration jjtn000 = new ASTNestedClassDeclaration(this, JJTNESTEDCLASSDECLARATION); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); try { label_5: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ABSTRACT: case FINAL: case PRIVATE: case PROTECTED: case PUBLIC: case STATIC: case STRICTFP: ; break; default: jj_la1[10] = jj_gen; break label_5; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STATIC: jj_consume_token(STATIC); jjtn000.setStatic(); break; case ABSTRACT: jj_consume_token(ABSTRACT); jjtn000.setAbstract(); break; case FINAL: jj_consume_token(FINAL); jjtn000.setFinal(); break; case PUBLIC: jj_consume_token(PUBLIC); jjtn000.setPublic(); break; case PROTECTED: jj_consume_token(PROTECTED); jjtn000.setProtected(); break; case PRIVATE: jj_consume_token(PRIVATE); jjtn000.setPrivate(); break; case STRICTFP: jj_consume_token(STRICTFP); jjtn000.setStrict(); break; default: jj_la1[11] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } UnmodifiedClassDeclaration(); } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { {if (true) throw (RuntimeException)jjte000;} } if (jjte000 instanceof ParseException) { {if (true) throw (ParseException)jjte000;} } {if (true) throw (RuntimeException)jjte000;} } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } }
45569 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45569/6b2ea5d38e0b6b4adb468f80aa5e82b2d9884c6d/JavaParser.java/buggy/pmd/src/net/sourceforge/pmd/ast/JavaParser.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 727, 1071, 918, 19071, 797, 6094, 1435, 1216, 10616, 288, 1748, 36, 70, 4507, 12, 78, 78, 3413, 13, 19071, 797, 6094, 1195, 225, 9183, 8649, 797, 6094, 10684, 5088, 3784, 273, 394, 9183, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 727, 1071, 918, 19071, 797, 6094, 1435, 1216, 10616, 288, 1748, 36, 70, 4507, 12, 78, 78, 3413, 13, 19071, 797, 6094, 1195, 225, 9183, 8649, 797, 6094, 10684, 5088, 3784, 273, 394, 9183, ...
int tempVal = AttributeVisualizationPanel.this.getWidth()-4; if (tempVal < 1) { tempVal = 1;
int intervals = as.totalCount>10 ? (int)(as.totalCount*0.1):(int)as.totalCount; if(intervals > AttributeVisualizationPanel.this.getWidth()) { intervals = AttributeVisualizationPanel.this.getWidth()-4; if(intervals<1) intervals = 1;
public void run() { synchronized (m_locker) { if(m_data.attribute(classIndex).isNominal()) { int tempVal = AttributeVisualizationPanel.this.getWidth()-4; if (tempVal < 1) { tempVal = 1; } int histClassCounts[][] = (AttributeVisualizationPanel.this.getWidth()<(int)(as.totalCount*0.1)) ? new int[tempVal][m_data.attribute(classIndex).numValues()+1] : new int[(int)(as.totalCount*0.1)][m_data.attribute(classIndex).numValues()+1]; double barRange = (as.numericStats.max - as.numericStats.min)/(double)histClassCounts.length; double currentBar = as.numericStats.min; // + barRange; maxValue = 0; if(m_colorList.size()==0) m_colorList.addElement(Color.black); for(int i=m_colorList.size(); i<m_data.attribute(classIndex).numValues()+1; i++) { Color pc = m_defaultColors[(i-1) % 10]; int ija = (i-1) / 10; ija *= 2; for (int j=0;j<ija;j++) { pc = pc.darker(); } m_colorList.addElement(pc); } for(int k=0; k<m_data.numInstances(); k++) { int t=0; try { if(!m_data.instance(k).isMissing(attribIndex)) { t = (int) Math.ceil((float)((m_data.instance(k).value(attribIndex)-as.numericStats.min)/barRange)); if(t==0) { if(m_data.instance(k).isMissing(classIndex)) histClassCounts[t][0]++; else histClassCounts[t][(int)m_data.instance(k).value(classIndex)+1]++; //if(histCounts[t]>maxValue) // maxValue = histCounts[t]; } else { if(m_data.instance(k).isMissing(classIndex)) histClassCounts[t-1][0]++; else histClassCounts[t-1][(int)m_data.instance(k).value(classIndex)+1]++; //if(histCounts[t-1]>maxValue) // maxValue = histCounts[t-1]; } } } catch(ArrayIndexOutOfBoundsException ae) { System.out.println("t:"+(t)+ " barRange:"+barRange+ " histLength:"+histClassCounts.length+ " value:"+m_data.instance(k).value(attribIndex)+ " min:"+as.numericStats.min+ " sumResult:"+(m_data.instance(k).value(attribIndex)-as.numericStats.min)+ " divideResult:"+(float)((m_data.instance(k).value(attribIndex)-as.numericStats.min)/barRange)+ " finalResult:"+ Math.ceil((float)((m_data.instance(k).value(attribIndex)-as.numericStats.min)/barRange)) ); } } for(int i=0; i<histClassCounts.length; i++) { int sum=0; for(int j=0; j<histClassCounts[i].length; j++) sum = sum+histClassCounts[i][j]; if(maxValue<sum) maxValue = sum; } histBarClassCounts = histClassCounts; m_barRange = barRange; } else { //else if the class attribute is numeric int tempVal = AttributeVisualizationPanel.this.getWidth()-4; if (tempVal < 1) { tempVal = 1; } int histCounts[] = (AttributeVisualizationPanel.this.getWidth()<(int)(as.totalCount*0.1)) ? new int[tempVal] : new int[(int)(as.totalCount*0.1)]; double barRange = (as.numericStats.max - as.numericStats.min)/(double)histCounts.length; double currentBar = as.numericStats.min; // + barRange; maxValue = 0; for(int k=0; k<m_data.numInstances(); k++) { int t=0; try { t = (int) Math.ceil((float)((m_data.instance(k).value(attribIndex)-as.numericStats.min)/barRange)); if(t==0) { histCounts[t]++; if(histCounts[t]>maxValue) maxValue = histCounts[t]; } else { histCounts[t-1]++; if(histCounts[t-1]>maxValue) maxValue = histCounts[t-1]; } } catch(ArrayIndexOutOfBoundsException ae) { ae.printStackTrace(); System.out.println("t:"+(t)+ " barRange:"+barRange+ " histLength:"+histCounts.length+ " value:"+m_data.instance(k).value(attribIndex)+ " min:"+as.numericStats.min+ " sumResult:"+(m_data.instance(k).value(attribIndex)-as.numericStats.min)+ " divideResult:"+(float)((m_data.instance(k).value(attribIndex)-as.numericStats.min)/barRange)+ " finalResult:"+ Math.ceil((float)((m_data.instance(k).value(attribIndex)-as.numericStats.min)/barRange)) ); } } histBarCounts = histCounts; m_barRange = barRange; } threadRun=false; //Image tmpImg = new BufferedImage(getWidth(), getHeight(), BufferedImage.TYPE_INT_RGB); //drawGraph( tmpImg.getGraphics() ); //img = tmpImg; AttributeVisualizationPanel.this.repaint(); } }
48918 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48918/4e3f217939366bfb75cdbbae5f243491de506bd7/AttributeVisualizationPanel.java/clean/weka/gui/AttributeVisualizationPanel.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1086, 1435, 288, 1377, 3852, 261, 81, 67, 739, 264, 13, 288, 202, 430, 12, 81, 67, 892, 18, 4589, 12, 1106, 1016, 2934, 291, 26685, 1490, 10756, 288, 202, 225, 509, 1906, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1086, 1435, 288, 1377, 3852, 261, 81, 67, 739, 264, 13, 288, 202, 430, 12, 81, 67, 892, 18, 4589, 12, 1106, 1016, 2934, 291, 26685, 1490, 10756, 288, 202, 225, 509, 1906, 3...
Rule rule = new MockRule("name", "desc");
Rule rule = new MockRule("name", "desc", "msg");
public void testComparatorWithDifferentFilenames() { Rule rule = new MockRule("name", "desc"); RuleViolation.RuleViolationComparator comp = new RuleViolation.RuleViolationComparator(); RuleViolation r1 = new RuleViolation(rule, 10, "description", "filename1"); RuleViolation r2 = new RuleViolation(rule, 20, "description", "filename2"); assertEquals(-1, comp.compare(r1, r2)); assertEquals(1, comp.compare(r2, r1)); }
45569 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45569/4d17923c1e55d25a2db5e2fa96f62312bc1e97bb/RuleViolationTest.java/clean/pmd/regress/test/net/sourceforge/pmd/RuleViolationTest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1842, 5559, 1190, 26270, 25579, 6809, 1435, 288, 3639, 6781, 1720, 273, 394, 7867, 2175, 2932, 529, 3113, 315, 5569, 3113, 315, 3576, 8863, 3639, 6781, 11683, 18, 2175, 11683, 55...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5559, 1190, 26270, 25579, 6809, 1435, 288, 3639, 6781, 1720, 273, 394, 7867, 2175, 2932, 529, 3113, 315, 5569, 3113, 315, 3576, 8863, 3639, 6781, 11683, 18, 2175, 11683, 55...
if (getEditorInput() != prePage.getEditorInput()) { setInput(prePage.getEditorInput());
if ( prePage.isDirty( ) ) { prePage.doSave( null );
public boolean onBroughtToTop(IReportEditorPage prePage) { if (this.isMissingParameter()) { if (this.parameterDialog != null) { this.parameterDialog.open(); } return true; } if (getEditorInput() != prePage.getEditorInput()) { setInput(prePage.getEditorInput()); } if (prePage.isDirty()) { prePage.doSave(null); } if (getBrowser() != null) { display(); } return true; }
46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/e1379dc44d22afdeafb3e66d4b2a9adc8b7f4f7a/ReportPreviewFormPage.java/clean/UI/org.eclipse.birt.report.designer.ui.preview/src/org/eclipse/birt/report/designer/ui/preview/editors/ReportPreviewFormPage.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 1250, 603, 38, 303, 9540, 774, 3401, 12, 45, 4820, 6946, 1964, 675, 1964, 13, 288, 202, 202, 430, 261, 2211, 18, 291, 4841, 1662, 10756, 288, 1082, 202, 430, 261, 2211, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 1250, 603, 38, 303, 9540, 774, 3401, 12, 45, 4820, 6946, 1964, 675, 1964, 13, 288, 202, 202, 430, 261, 2211, 18, 291, 4841, 1662, 10756, 288, 1082, 202, 430, 261, 2211, 18, ...
String label= CorrectionMessages.getFormattedString("UnresolvedElementsSubProcessor.createclassusingwizard.description", typeName); proposals.add(new NewCUCompletionUsingWizardProposal(label, cu, node, true, relevance));
proposals.add(new NewCUCompletionUsingWizardProposal(cu, node, true, enclosingPackage, relevance));
private static void addNewTypeProposals(ICompilationUnit cu, Name node, int kind, ArrayList proposals) { String typeName= ASTResolving.getSimpleName(node); while (true) { String addedCUName= typeName + ".java"; //$NON-NLS-1$ if (!JavaConventions.validateCompilationUnitName(addedCUName).matches(IStatus.ERROR)) { int relevance= 0; ICompilationUnit addedCU; if (node.isSimpleName()) { addedCU= ((IPackageFragment) cu.getParent()).getCompilationUnit(addedCUName); } else { IPackageFragmentRoot root= (IPackageFragmentRoot) cu.getAncestor(IJavaElement.PACKAGE_FRAGMENT_ROOT); String packName= ASTResolving.getQualifier(node); addedCU= root.getPackageFragment(packName).getCompilationUnit(addedCUName); typeName= JavaModelUtil.concatenateName(packName, typeName); if (Character.isLowerCase(packName.charAt(0))) { relevance++; } } if (Character.isUpperCase(addedCUName.charAt(0))) { relevance++; } if (!addedCU.exists()) { if ((kind & SimilarElementsRequestor.CLASSES) != 0) { String label= CorrectionMessages.getFormattedString("UnresolvedElementsSubProcessor.createclassusingwizard.description", typeName); //$NON-NLS-1$ proposals.add(new NewCUCompletionUsingWizardProposal(label, cu, node, true, relevance)); } if ((kind & SimilarElementsRequestor.INTERFACES) != 0) { String label= CorrectionMessages.getFormattedString("UnresolvedElementsSubProcessor.createinterfaceusingwizard.description", typeName); //$NON-NLS-1$ proposals.add(new NewCUCompletionUsingWizardProposal(label, cu, node, false, relevance)); } } } if (node.isSimpleName()) { return; } node= ((QualifiedName) node).getQualifier(); typeName= ASTResolving.getSimpleName(node); if (Character.isLowerCase(typeName.charAt(0))) { return; } } }
9698 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9698/988b31305987b37af88f24031d0e867f63ff179c/UnresolvedElementsSubProcessor.java/buggy/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/UnresolvedElementsSubProcessor.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 760, 918, 20973, 559, 626, 22536, 12, 45, 19184, 2802, 15985, 16, 1770, 756, 16, 509, 3846, 16, 2407, 450, 22536, 13, 288, 202, 202, 780, 8173, 33, 9183, 2903, 6282, 18, 588,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 760, 918, 20973, 559, 626, 22536, 12, 45, 19184, 2802, 15985, 16, 1770, 756, 16, 509, 3846, 16, 2407, 450, 22536, 13, 288, 202, 202, 780, 8173, 33, 9183, 2903, 6282, 18, 588,...
public org.quickfix.field.EncodedUnderlyingIssuerLen getEncodedUnderlyingIssuerLen() throws FieldNotFound { org.quickfix.field.EncodedUnderlyingIssuerLen value = new org.quickfix.field.EncodedUnderlyingIssuerLen();
public quickfix.field.EncodedUnderlyingIssuerLen getEncodedUnderlyingIssuerLen() throws FieldNotFound { quickfix.field.EncodedUnderlyingIssuerLen value = new quickfix.field.EncodedUnderlyingIssuerLen();
public org.quickfix.field.EncodedUnderlyingIssuerLen getEncodedUnderlyingIssuerLen() throws FieldNotFound { org.quickfix.field.EncodedUnderlyingIssuerLen value = new org.quickfix.field.EncodedUnderlyingIssuerLen(); getField(value); return value; }
5926 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5926/fecc27f98261270772ff182a1d4dfd94b5daa73d/OrderMassCancelRequest.java/clean/src/java/src/quickfix/fix44/OrderMassCancelRequest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 2358, 18, 19525, 904, 18, 1518, 18, 10397, 14655, 6291, 16667, 2891, 28799, 14655, 6291, 16667, 2891, 1435, 1216, 2286, 2768, 225, 288, 2358, 18, 19525, 904, 18, 1518, 18, 10397, 1465...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 2358, 18, 19525, 904, 18, 1518, 18, 10397, 14655, 6291, 16667, 2891, 28799, 14655, 6291, 16667, 2891, 1435, 1216, 2286, 2768, 225, 288, 2358, 18, 19525, 904, 18, 1518, 18, 10397, 1465...
JMenu menu = view.getWindowsMenu();
JMenu menu = ImViewerFactory.getWindowsMenu();
private void attachWindowListeners() { JMenu menu = view.getWindowsMenu(); menu.addMenuListener(new MenuListener() { public void menuSelected(MenuEvent e) { createWindowsMenuItems(); } /** * Required by I/F but not actually needed in our case, * no op implementation. * @see MenuListener#menuCanceled(MenuEvent) */ public void menuCanceled(MenuEvent e) {} /** * Required by I/F but not actually needed in our case, * no op implementation. * @see MenuListener#menuDeselected(MenuEvent) */ public void menuDeselected(MenuEvent e) {} }); //Listen to keyboard selection menu.addMenuKeyListener(new MenuKeyListener() { public void menuKeyReleased(MenuKeyEvent e) { createWindowsMenuItems(); } /** * Required by I/F but not actually needed in our case, * no op implementation. * @see MenuKeyListener#menuKeyPressed(MenuKeyEvent) */ public void menuKeyPressed(MenuKeyEvent e) {} /** * Required by I/F but not actually needed in our case, * no op implementation. * @see MenuKeyListener#menuKeyTyped(MenuKeyEvent) */ public void menuKeyTyped(MenuKeyEvent e) {} }); view.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE); view.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { model.discard(); } public void windowDeiconified(WindowEvent e) { model.iconified(false); } public void windowIconified(WindowEvent e) { model.iconified(true); } }); view.getLoadingWindow().addPropertyChangeListener( LoadingWindow.CLOSED_PROPERTY, this); }
55464 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55464/8b5ed57b1a06841fc56344f3b4489a5dc633e6c0/ImViewerControl.java/clean/SRC/org/openmicroscopy/shoola/agents/imviewer/view/ImViewerControl.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 3306, 3829, 5583, 1435, 565, 288, 3639, 804, 4599, 3824, 273, 2221, 18415, 1733, 18, 588, 10399, 4599, 5621, 3639, 3824, 18, 1289, 4599, 2223, 12, 2704, 9809, 2223, 1435, 288, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 3306, 3829, 5583, 1435, 565, 288, 3639, 804, 4599, 3824, 273, 2221, 18415, 1733, 18, 588, 10399, 4599, 5621, 3639, 3824, 18, 1289, 4599, 2223, 12, 2704, 9809, 2223, 1435, 288, ...
if (MylarPlugin.getDefault().getStructureBridge(node.getStructureKind()).isDocument(node.getElementHandle())) {
if (MylarPlugin.getDefault().getStructureBridge(node.getContentKind()).isDocument(node.getElementHandle())) {
public Set<IMylarContextNode> getInterestingResources(IMylarContext context) { Set<IMylarContextNode> interestingFiles = new HashSet<IMylarContextNode>(); List<IMylarContextNode> allIntersting = context.getInteresting(); for (IMylarContextNode node : allIntersting) { if (MylarPlugin.getDefault().getStructureBridge(node.getStructureKind()).isDocument(node.getElementHandle())) { interestingFiles.add(node); } } return interestingFiles; }
51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/ffea9ed89adc29b1ae1184818ee9577e822d6fde/MylarContextManager.java/clean/org.eclipse.mylyn.context.core/src/org/eclipse/mylyn/core/internal/MylarContextManager.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 1000, 32, 3445, 93, 7901, 1042, 907, 34, 336, 2465, 10100, 3805, 12, 3445, 93, 7901, 1042, 819, 13, 288, 3639, 1000, 32, 3445, 93, 7901, 1042, 907, 34, 26122, 2697, 273, 394, 6847...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1000, 32, 3445, 93, 7901, 1042, 907, 34, 336, 2465, 10100, 3805, 12, 3445, 93, 7901, 1042, 819, 13, 288, 3639, 1000, 32, 3445, 93, 7901, 1042, 907, 34, 26122, 2697, 273, 394, 6847...
yaccValue = ">"; src.unread(c);
src.unread(c); yaccValue = new Token(">", getPosition(null, false));
private int yylex() { char c; boolean spaceSeen = false; boolean commandState; if (lex_strterm != null) { int tok = lex_strterm.parseString(this, src); if (tok == Tokens.tSTRING_END || tok == Tokens.tREGEXP_END) { lex_strterm = null; lex_state = LexState.EXPR_END; } return tok; } currentPos = src.getPosition(); commandState = commandStart; commandStart = false; retry: for(;;) { c = src.read(); switch(c) { case '\004': /* ^D */ case '\032': /* ^Z */ case 0: /* end of script. */ return 0; /* white spaces */ case ' ': case '\t': case '\f': case '\r': case '\13': /* '\v' */ spaceSeen = true; continue retry; case '#': /* it's a comment */ while ((c = src.read()) != '\n') { if (c == EOF) { return 0; } } /* fall through */ case '\n': // Replace a string of newlines with a single one while((c = src.read()) == '\n') { currentPos = src.getPosition(); } src.unread( c ); if (lex_state == LexState.EXPR_BEG || lex_state == LexState.EXPR_FNAME || lex_state == LexState.EXPR_DOT || lex_state == LexState.EXPR_CLASS) { continue retry; } commandStart = true; lex_state = LexState.EXPR_BEG; return '\n'; case '*': if ((c = src.read()) == '*') { if ((c = src.read()) == '=') { yaccValue = "**"; lex_state = LexState.EXPR_BEG; return Tokens.tOP_ASGN; } yaccValue = "**"; src.unread(c); c = Tokens.tPOW; } else { if (c == '=') { yaccValue = "*"; lex_state = LexState.EXPR_BEG; return Tokens.tOP_ASGN; } src.unread(c); if (lex_state.isArgument() && spaceSeen && !Character.isWhitespace(c)) { warnings.warning(src.getPosition(), "`*' interpreted as argument prefix"); c = Tokens.tSTAR; } else if (lex_state == LexState.EXPR_BEG || lex_state == LexState.EXPR_MID) { c = Tokens.tSTAR; } else { c = Tokens.tSTAR2; } } if (lex_state == LexState.EXPR_FNAME || lex_state == LexState.EXPR_DOT) { lex_state = LexState.EXPR_ARG; } else { lex_state = LexState.EXPR_BEG; } yaccValue = "*"; return c; case '!': lex_state = LexState.EXPR_BEG; if ((c = src.read()) == '=') { return Tokens.tNEQ; } if (c == '~') { return Tokens.tNMATCH; } src.unread(c); return Tokens.tBANG; case '=': // Skip documentation nodes if (src.wasBeginOfLine()) { /* skip embedded rd document */ if (isNextNoCase("begin")) { c = src.read(); if (Character.isWhitespace(c)) { // In case last next was the newline. src.unread(c); for (;;) { c = src.read(); // If a line is followed by a blank line put // it back. while (c == '\n') { c = src.read(); } if (c == EOF) { throw new SyntaxException(src.getPosition(), "embedded document meets end of file"); } if (c != '=') continue; if (src.wasBeginOfLine() && isNextNoCase("end")) { //if (src.peek('\n')) { // break; //} //c = src.read(); //if (Character.isWhitespace(c)) { src.readLine(); break; //} //src.unread(c); } } continue retry; } src.unread(c); } } if (lex_state == LexState.EXPR_FNAME || lex_state == LexState.EXPR_DOT) { lex_state = LexState.EXPR_ARG; } else { lex_state = LexState.EXPR_BEG; } c = src.read(); if (c == '=') { c = src.read(); if (c == '=') { yaccValue = "==="; return Tokens.tEQQ; } src.unread(c); yaccValue = "=="; return Tokens.tEQ; } if (c == '~') { yaccValue = "=~"; return Tokens.tMATCH; } else if (c == '>') { return Tokens.tASSOC; } src.unread(c); return '='; case '<': c = src.read(); if (c == '<' && lex_state != LexState.EXPR_END && lex_state != LexState.EXPR_DOT && lex_state != LexState.EXPR_ENDARG && lex_state != LexState.EXPR_CLASS && (!lex_state.isArgument() || spaceSeen)) { int tok = hereDocumentIdentifier(); if (tok != 0) return tok; } if (lex_state == LexState.EXPR_FNAME || lex_state == LexState.EXPR_DOT) { lex_state = LexState.EXPR_ARG; } else { lex_state = LexState.EXPR_BEG; } if (c == '=') { if ((c = src.read()) == '>') { yaccValue = "<=>"; return Tokens.tCMP; } yaccValue = "<="; src.unread(c); return Tokens.tLEQ; } if (c == '<') { yaccValue = "<<"; if ((c = src.read()) == '=') { lex_state = LexState.EXPR_BEG; return Tokens.tOP_ASGN; } src.unread(c); return Tokens.tLSHFT; } yaccValue = "<"; src.unread(c); return Tokens.tLT; case '>': if (lex_state == LexState.EXPR_FNAME || lex_state == LexState.EXPR_DOT) { lex_state = LexState.EXPR_ARG; } else { lex_state = LexState.EXPR_BEG; } if ((c = src.read()) == '=') { yaccValue = ">="; return Tokens.tGEQ; } if (c == '>') { yaccValue = ">>"; if ((c = src.read()) == '=') { lex_state = LexState.EXPR_BEG; return Tokens.tOP_ASGN; } src.unread(c); return Tokens.tRSHFT; } yaccValue = ">"; src.unread(c); return Tokens.tGT; case '"': lex_strterm = new StringTerm(str_dquote, '"', '\0'); return Tokens.tSTRING_BEG; case '`': yaccValue = "`"; if (lex_state == LexState.EXPR_FNAME) { lex_state = LexState.EXPR_END; return Tokens.tBACK_REF2; } if (lex_state == LexState.EXPR_DOT) { if (commandState) { lex_state = LexState.EXPR_CMDARG; } else { lex_state = LexState.EXPR_ARG; } return Tokens.tBACK_REF2; } lex_strterm = new StringTerm(str_xquote, '`', '\0'); return Tokens.tXSTRING_BEG; case '\'': lex_strterm = new StringTerm(str_squote, '\'', '\0'); return Tokens.tSTRING_BEG; case '?': if (lex_state == LexState.EXPR_END || lex_state == LexState.EXPR_ENDARG) { lex_state = LexState.EXPR_BEG; return '?'; } c = src.read(); if (c == EOF) { throw new SyntaxException(src.getPosition(), "incomplete character syntax"); } if (Character.isWhitespace(c)){ if (!lex_state.isArgument()){ int c2 = 0; switch (c) { case ' ': c2 = 's'; break; case '\n': c2 = 'n'; break; case '\t': c2 = 't'; break; /* What is \v in C? case '\v': c2 = 'v'; break; */ case '\r': c2 = 'r'; break; case '\f': c2 = 'f'; break; } if (c2 != 0) { warnings.warn(src.getPosition(), "invalid character syntax; use ?\\" + c2); } } src.unread(c); lex_state = LexState.EXPR_BEG; return '?'; /*} else if (ismbchar(c)) { // ruby - we don't support them either? rb_warn("multibyte character literal not supported yet; use ?\\" + c); support.unread(c); lexState = LexState.EXPR_BEG; return '?';*/ } else if ((Character.isLetterOrDigit(c) || c == '_') && !src.peek('\n') && isNext_identchar()) { src.unread(c); lex_state = LexState.EXPR_BEG; return '?'; } else if (c == '\\') { c = src.readEscape(); } c &= 0xff; lex_state = LexState.EXPR_END; yaccValue = new Long(c); return Tokens.tINTEGER; case '&': if ((c = src.read()) == '&') { lex_state = LexState.EXPR_BEG; if ((c = src.read()) == '=') { yaccValue = "&&"; lex_state = LexState.EXPR_BEG; return Tokens.tOP_ASGN; } src.unread(c); return Tokens.tANDOP; } else if (c == '=') { yaccValue = "&"; lex_state = LexState.EXPR_BEG; return Tokens.tOP_ASGN; } src.unread(c); if (lex_state.isArgument() && spaceSeen && !Character.isWhitespace(c)){ warnings.warning(src.getPosition(), "`&' interpreted as argument prefix"); c = Tokens.tAMPER; } else if (lex_state == LexState.EXPR_BEG || lex_state == LexState.EXPR_MID) { c = Tokens.tAMPER; } else { c = Tokens.tAMPER2; } if (lex_state == LexState.EXPR_FNAME || lex_state == LexState.EXPR_DOT) { lex_state = LexState.EXPR_ARG; } else { lex_state = LexState.EXPR_BEG; } yaccValue = "&"; return c; case '|': if ((c = src.read()) == '|') { lex_state = LexState.EXPR_BEG; if ((c = src.read()) == '=') { yaccValue = "||"; lex_state = LexState.EXPR_BEG; return Tokens.tOP_ASGN; } src.unread(c); return Tokens.tOROP; } if (c == '=') { yaccValue = "|"; lex_state = LexState.EXPR_BEG; return Tokens.tOP_ASGN; } if (lex_state == LexState.EXPR_FNAME || lex_state == LexState.EXPR_DOT) { lex_state = LexState.EXPR_ARG; } else { lex_state = LexState.EXPR_BEG; } yaccValue = "|"; src.unread(c); return Tokens.tPIPE; case '+': c = src.read(); if (lex_state == LexState.EXPR_FNAME || lex_state == LexState.EXPR_DOT) { lex_state = LexState.EXPR_ARG; if (c == '@') { yaccValue = "@+"; return Tokens.tUPLUS; } yaccValue = "+"; src.unread(c); return Tokens.tPLUS; } if (c == '=') { yaccValue = "+"; lex_state = LexState.EXPR_BEG; return Tokens.tOP_ASGN; } if (lex_state == LexState.EXPR_BEG || lex_state == LexState.EXPR_MID || (lex_state.isArgument() && spaceSeen && !Character.isWhitespace(c))) { if (lex_state.isArgument()) arg_ambiguous(); lex_state = LexState.EXPR_BEG; src.unread(c); if (Character.isDigit(c)) { c = '+'; return parseNumber(c); } return Tokens.tUPLUS; } lex_state = LexState.EXPR_BEG; src.unread(c); return Tokens.tPLUS; case '-': c = src.read(); if (lex_state == LexState.EXPR_FNAME || lex_state == LexState.EXPR_DOT) { lex_state = LexState.EXPR_ARG; if (c == '@') { yaccValue = "@-"; return Tokens.tUMINUS; } yaccValue = "-"; src.unread(c); return Tokens.tMINUS; } if (c == '=') { yaccValue = "-"; lex_state = LexState.EXPR_BEG; return Tokens.tOP_ASGN; } if (lex_state == LexState.EXPR_BEG || lex_state == LexState.EXPR_MID || (lex_state.isArgument() && spaceSeen && !Character.isWhitespace(c))) { if (lex_state.isArgument()) arg_ambiguous(); lex_state = LexState.EXPR_BEG; src.unread(c); if (Character.isDigit(c)) { return Tokens.tUMINUS_NUM; } return Tokens.tUMINUS; } lex_state = LexState.EXPR_BEG; src.unread(c); return Tokens.tMINUS; case '.': lex_state = LexState.EXPR_BEG; if ((c = src.read()) == '.') { if ((c = src.read()) == '.') { return Tokens.tDOT3; } src.unread(c); return Tokens.tDOT2; } src.unread(c); if (Character.isDigit(c)) { throw new SyntaxException(src.getPosition(), "no .<digit> floating literal anymore; put 0 before dot"); } lex_state = LexState.EXPR_DOT; return Tokens.tDOT; case '0' : case '1' : case '2' : case '3' : case '4' : case '5' : case '6' : case '7' : case '8' : case '9' : return parseNumber(c); case ']': case '}': case ')': conditionState.restart(); cmdArgumentState.restart(); lex_state = LexState.EXPR_END; return c; case ':': c = src.read(); if (c == ':') { if (lex_state == LexState.EXPR_BEG || lex_state == LexState.EXPR_MID || lex_state == LexState.EXPR_CLASS || (lex_state.isArgument() && spaceSeen)) { lex_state = LexState.EXPR_BEG; return Tokens.tCOLON3; } lex_state = LexState.EXPR_DOT; return Tokens.tCOLON2; } if (lex_state == LexState.EXPR_END || lex_state == LexState.EXPR_ENDARG || Character.isWhitespace(c)) { src.unread(c); lex_state = LexState.EXPR_BEG; return ':'; } switch (c) { case '\'': lex_strterm = new StringTerm(str_ssym, c, '\0'); break; case '"': lex_strterm = new StringTerm(str_dsym, c, '\0'); break; default: src.unread(c); break; } lex_state = LexState.EXPR_FNAME; return Tokens.tSYMBEG; case '/': if (lex_state == LexState.EXPR_BEG || lex_state == LexState.EXPR_MID) { lex_strterm = new StringTerm(str_regexp, '/', '\0'); return Tokens.tREGEXP_BEG; } if ((c = src.read()) == '=') { yaccValue = "/"; lex_state = LexState.EXPR_BEG; return Tokens.tOP_ASGN; } src.unread(c); if (lex_state.isArgument() && spaceSeen) { if (!Character.isWhitespace(c)) { arg_ambiguous(); lex_strterm = new StringTerm(str_regexp, '/', '\0'); return Tokens.tREGEXP_BEG; } } if (lex_state == LexState.EXPR_FNAME || lex_state == LexState.EXPR_DOT) { lex_state = LexState.EXPR_ARG; } else { lex_state = LexState.EXPR_BEG; } yaccValue = "/"; return Tokens.tDIVIDE; case '^': yaccValue = "^"; if ((c = src.read()) == '=') { lex_state = LexState.EXPR_BEG; return Tokens.tOP_ASGN; } if (lex_state == LexState.EXPR_FNAME || lex_state == LexState.EXPR_DOT) { lex_state = LexState.EXPR_ARG; } else { lex_state = LexState.EXPR_BEG; } src.unread(c); return Tokens.tCARET; case ';': commandStart = true; case ',': lex_state = LexState.EXPR_BEG; return c; case '~': if (lex_state == LexState.EXPR_FNAME || lex_state == LexState.EXPR_DOT) { if ((c = src.read()) != '@') { src.unread(c); } } if (lex_state == LexState.EXPR_FNAME || lex_state == LexState.EXPR_DOT) { lex_state = LexState.EXPR_ARG; } else { lex_state = LexState.EXPR_BEG; } yaccValue = "~"; return Tokens.tTILDE; case '(': c = Tokens.tLPAREN2; commandStart = true; if (lex_state == LexState.EXPR_BEG || lex_state == LexState.EXPR_MID) { c = Tokens.tLPAREN; } else if (spaceSeen) { if (lex_state == LexState.EXPR_CMDARG) { c = Tokens.tLPAREN_ARG; } else if (lex_state == LexState.EXPR_ARG) { warnings.warn(src.getPosition(), "don't put space before argument parentheses"); c = Tokens.tLPAREN2; } } conditionState.stop(); cmdArgumentState.stop(); lex_state = LexState.EXPR_BEG; return c; case '[': if (lex_state == LexState.EXPR_FNAME || lex_state == LexState.EXPR_DOT) { lex_state = LexState.EXPR_ARG; if ((c = src.read()) == ']') { if ((c = src.read()) == '=') { yaccValue = "[]="; return Tokens.tASET; } yaccValue = "[]"; src.unread(c); return Tokens.tAREF; } src.unread(c); return '['; } else if (lex_state == LexState.EXPR_BEG || lex_state == LexState.EXPR_MID) { c = Tokens.tLBRACK; } else if (lex_state.isArgument() && spaceSeen) { c = Tokens.tLBRACK; } lex_state = LexState.EXPR_BEG; conditionState.stop(); cmdArgumentState.stop(); return c; case '{': c = Tokens.tLCURLY; if (lex_state.isArgument() || lex_state == LexState.EXPR_END) { c = Tokens.tLCURLY; /* block (primary) */ } else if (lex_state == LexState.EXPR_ENDARG) { c = Tokens.tLBRACE_ARG; /* block (expr) */ } else { c = Tokens.tLBRACE; /* hash */ } conditionState.stop(); cmdArgumentState.stop(); lex_state = LexState.EXPR_BEG; return c; case '\\': c = src.read(); if (c == '\n') { spaceSeen = true; continue retry; /* skip \\n */ } src.unread(c); return '\\'; case '%': if (lex_state == LexState.EXPR_BEG || lex_state == LexState.EXPR_MID) { return parseQuote(src.read()); } if ((c = src.read()) == '=') { yaccValue = "%"; lex_state = LexState.EXPR_BEG; return Tokens.tOP_ASGN; } if (lex_state.isArgument() && spaceSeen && !Character.isWhitespace(c)) { return parseQuote(c); } if (lex_state == LexState.EXPR_FNAME || lex_state == LexState.EXPR_DOT) { lex_state = LexState.EXPR_ARG; } else { lex_state = LexState.EXPR_BEG; } yaccValue = "%"; src.unread(c); return Tokens.tPERCENT; case '$': lex_state = LexState.EXPR_END; tokenBuffer.setLength(0); c = src.read(); switch (c) { case '_': /* $_: last read line string */ c = src.read(); if (isIdentifierChar(c)) { tokenBuffer.append('$'); tokenBuffer.append('_'); break; } src.unread(c); c = '_'; /* fall through */ case '*': /* $*: argv */ case '$': /* $$: pid */ case '?': /* $?: last status */ case '!': /* $!: error string */ case '@': /* $@: error position */ case '/': /* $/: input record separator */ case '\\': /* $\: output record separator */ case ';': /* $;: field separator */ case ',': /* $,: output field separator */ case '.': /* $.: last read line number */ case '=': /* $=: ignorecase */ case ':': /* $:: load path */ case '<': /* $<: reading filename */ case '>': /* $>: default output handle */ case '\"': /* $": already loaded files */ tokenBuffer.append('$'); tokenBuffer.append(c); yaccValue = tokenBuffer.toString(); return Tokens.tGVAR; case '-': tokenBuffer.append('$'); tokenBuffer.append(c); c = src.read(); tokenBuffer.append(c); yaccValue = tokenBuffer.toString(); /* xxx shouldn't check if valid option variable */ return Tokens.tGVAR; case '~': /* $~: match-data */ case '&': /* $&: last match */ case '`': /* $`: string before last match */ case '\'': /* $': string after last match */ case '+': /* $+: string matches last paren. */ yaccValue = new BackRefNode(src.getPosition(), c); return Tokens.tBACK_REF; case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': tokenBuffer.append('$'); do { tokenBuffer.append(c); c = src.read(); } while (Character.isDigit(c)); src.unread(c); yaccValue = new NthRefNode(src.getPosition(), Integer.parseInt(tokenBuffer.substring(1))); return Tokens.tNTH_REF; default: if (!isIdentifierChar(c)) { src.unread(c); return '$'; } case '0': tokenBuffer.append('$'); } break; case '@': c = src.read(); tokenBuffer.setLength(0); tokenBuffer.append('@'); if (c == '@') { tokenBuffer.append('@'); c = src.read(); } if (Character.isDigit(c)) { if (tokenBuffer.length() == 1) { throw new SyntaxException(src.getPosition(), "`@" + c + "' is not allowed as an instance variable name"); } throw new SyntaxException(src.getPosition(), "`@@" + c + "' is not allowed as a class variable name"); } if (!isIdentifierChar(c)) { src.unread(c); return '@'; } break; case '_': if (src.wasBeginOfLine() && src.matchString("_END__\n", false)) { parserSupport.getResult().setEndSeen(true); return 0; } tokenBuffer.setLength(0); break; default: if (!isIdentifierChar(c)) { throw new SyntaxException(src.getPosition(), "Invalid char `\\" + new PrintfFormat("%.3o").sprintf(c) + "' in expression"); } tokenBuffer.setLength(0); break; } do { tokenBuffer.append(c); /* no special multibyte character handling is needed in Java * if (ismbchar(c)) { int i, len = mbclen(c)-1; for (i = 0; i < len; i++) { c = src.read(); tokenBuffer.append(c); } }*/ c = src.read(); } while (isIdentifierChar(c)); char peek = src.read(); if ((c == '!' || c == '?') && isIdentifierChar(tokenBuffer.charAt(0)) && peek != '=') { src.unread(peek); tokenBuffer.append(c); } else { src.unread(peek); src.unread(c); } int result = 0; switch (tokenBuffer.charAt(0)) { case '$': lex_state = LexState.EXPR_END; result = Tokens.tGVAR; break; case '@': lex_state = LexState.EXPR_END; if (tokenBuffer.charAt(1) == '@') { result = Tokens.tCVAR; } else { result = Tokens.tIVAR; } break; default: char last = tokenBuffer.charAt(tokenBuffer.length() - 1); if (last == '!' || last == '?') { result = Tokens.tFID; } else { if (lex_state == LexState.EXPR_FNAME) { /* // Enebo: This should be equivalent to below without // so much read/unread action. if ((c = src.read()) == '=') { char c2 = src.read(); if (c2 != '~' && c2 != '>' && (c2 != '=' || (c2 == '\n' && src.peek('>')))) { result = Token.tIDENTIFIER; tokenBuffer.append(c); } else { src.unread(c2); src.unread(c); } } else { src.unread(c); } */ if ((c = src.read()) == '=' && !src.peek('~') && !src.peek('>') && (!src.peek('=') || (src.peek('\n') && src.getCharAt(1) == '>'))) { result = Tokens.tIDENTIFIER; tokenBuffer.append(c); } else { src.unread(c); } } if (result == 0 && ISUPPER(tokenBuffer.charAt(0))) { result = Tokens.tCONSTANT; } else { result = Tokens.tIDENTIFIER; } } if (lex_state != LexState.EXPR_DOT) { /* See if it is a reserved word. */ Keyword keyword = Keyword.getKeyword(tokenBuffer.toString(), tokenBuffer.length()); if (keyword != null) { // enum lex_state LexState state = lex_state; lex_state = keyword.state; if (state.isExprFName()) { yaccValue = keyword.name; } if (keyword.id0 == Tokens.kDO) { if (conditionState.isInState()) { return Tokens.kDO_COND; } if (cmdArgumentState.isInState() && state != LexState.EXPR_CMDARG) { return Tokens.kDO_BLOCK; } if (state == LexState.EXPR_ENDARG) { return Tokens.kDO_BLOCK; } return Tokens.kDO; } if (state == LexState.EXPR_BEG) { return keyword.id0; } if (keyword.id0 != keyword.id1) { lex_state = LexState.EXPR_BEG; } return keyword.id1; } } if (lex_state == LexState.EXPR_BEG || lex_state == LexState.EXPR_MID || lex_state == LexState.EXPR_DOT || lex_state == LexState.EXPR_ARG || lex_state == LexState.EXPR_CMDARG) { if (commandState) { lex_state = LexState.EXPR_CMDARG; } else { lex_state = LexState.EXPR_ARG; } } else { lex_state = LexState.EXPR_END; } } yaccValue = tokenBuffer.toString(); // Lame: parsing logic made it into lexer in ruby...So we // are emulating if (IdUtil.isLocal((String)yaccValue) && ((((LocalNamesElement) parserSupport.getLocalNames().peek()).isInBlock() && ((BlockNamesElement) parserSupport.getBlockNames().peek()).isDefined((String) yaccValue)) || ((LocalNamesElement) parserSupport.getLocalNames().peek()).isLocalRegistered((String) yaccValue))) { lex_state = LexState.EXPR_END; } return result; } }
50993 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50993/b1293eda8454686e846e2a9837b348e2983bb423/RubyYaccLexer.java/buggy/src/org/jruby/lexer/yacc/RubyYaccLexer.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 509, 677, 1362, 92, 1435, 288, 3639, 1149, 276, 31, 3639, 1250, 3476, 15160, 273, 629, 31, 3639, 1250, 1296, 1119, 31, 7734, 309, 261, 4149, 67, 701, 6408, 480, 446, 13, 288, 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, 377, 3238, 509, 677, 1362, 92, 1435, 288, 3639, 1149, 276, 31, 3639, 1250, 3476, 15160, 273, 629, 31, 3639, 1250, 1296, 1119, 31, 7734, 309, 261, 4149, 67, 701, 6408, 480, 446, 13, 288, 1082...
Map compilerOptions= null; if (input instanceof IResourceProvider) { IResource resource= ((IResourceProvider) input).getResource(); if (resource != null) { IJavaElement element= JavaCore.create(resource); if (element != null) { IJavaProject javaProject= element.getJavaProject(); if (javaProject != null) compilerOptions= javaProject.getOptions(true); } } } if (compilerOptions == null) compilerOptions= fDefaultCompilerOptions; if (doc != null) { boolean isEditable= false; if (input instanceof IEditableContent) isEditable= ((IEditableContent) input).isEditable(); JavaNode root= new JavaNode(doc, isEditable) { void nodeChanged(JavaNode node) { save(this, input); } }; if (buffer == null) { contents= doc.get(); int n= contents.length(); buffer= new char[n]; contents.getChars(0, n, buffer, 0); } ASTParser parser= ASTParser.newParser(AST.JLS3); if (compilerOptions != null) parser.setCompilerOptions(compilerOptions); parser.setSource(buffer); parser.setFocalPosition(0); CompilationUnit cu= (CompilationUnit) parser.createAST(null); cu.accept(new JavaParseTreeBuilder(root, buffer, true)); return root; } return null;
return createStructureComparator(input, buffer, doc, null);
public IStructureComparator getStructure(final Object input) { String contents= null; char[] buffer= null; IDocument doc= CompareUI.getDocument(input); if (doc == null) { if (input instanceof IStreamContentAccessor) { IStreamContentAccessor sca= (IStreamContentAccessor) input; try { contents= JavaCompareUtilities.readString(sca); } catch (CoreException ex) { // return null indicates the error. return null; } } if (contents != null) { int n= contents.length(); buffer= new char[n]; contents.getChars(0, n, buffer, 0); doc= new Document(contents); //CompareUI.registerDocument(input, doc); JavaCompareUtilities.setupDocument(doc); } } Map compilerOptions= null; if (input instanceof IResourceProvider) { IResource resource= ((IResourceProvider) input).getResource(); if (resource != null) { IJavaElement element= JavaCore.create(resource); if (element != null) { IJavaProject javaProject= element.getJavaProject(); if (javaProject != null) compilerOptions= javaProject.getOptions(true); } } } if (compilerOptions == null) compilerOptions= fDefaultCompilerOptions; if (doc != null) { boolean isEditable= false; if (input instanceof IEditableContent) isEditable= ((IEditableContent) input).isEditable(); // we hook into the root node to intercept all node changes JavaNode root= new JavaNode(doc, isEditable) { void nodeChanged(JavaNode node) { save(this, input); } }; if (buffer == null) { contents= doc.get(); int n= contents.length(); buffer= new char[n]; contents.getChars(0, n, buffer, 0); } ASTParser parser= ASTParser.newParser(AST.JLS3); if (compilerOptions != null) parser.setCompilerOptions(compilerOptions); parser.setSource(buffer); parser.setFocalPosition(0); CompilationUnit cu= (CompilationUnit) parser.createAST(null); cu.accept(new JavaParseTreeBuilder(root, buffer, true)); return root; } return null; }
9698 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9698/2cc61b3806ec5eee7dc12e2ddd226ef13221c89a/JavaStructureCreator.java/buggy/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaStructureCreator.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 467, 6999, 5559, 18730, 12, 6385, 1033, 810, 13, 288, 202, 202, 780, 2939, 33, 446, 31, 202, 202, 3001, 8526, 1613, 33, 446, 31, 202, 202, 734, 504, 650, 997, 33, 11051, 537...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 467, 6999, 5559, 18730, 12, 6385, 1033, 810, 13, 288, 202, 202, 780, 2939, 33, 446, 31, 202, 202, 3001, 8526, 1613, 33, 446, 31, 202, 202, 734, 504, 650, 997, 33, 11051, 537...
context = new LimitedScannerContext( this, scannerData.getInitialReader(), resolvedFilename, ScannerContext.ContextKind.TOP, offsetLimit );
context = new LimitedScannerContext( this, scannerData.getInitialReader(), resolvedFilename, ScannerContext.ContextKind.TOP, offsetLimit, 0 );
private void setupInitialContext() { String resolvedFilename = scannerData.getInitialFilename() == null ? TEXT : scannerData.getInitialFilename(); IScannerContext context = null; try { if( offsetLimit == NO_OFFSET_LIMIT ) context = new ScannerContext(scannerData.getInitialReader(), resolvedFilename, ScannerContext.ContextKind.TOP, null ); else context = new LimitedScannerContext( this, scannerData.getInitialReader(), resolvedFilename, ScannerContext.ContextKind.TOP, offsetLimit ); scannerData.getContextStack().push( context, scannerData.getClientRequestor() ); } catch( ContextException ce ) { handleInternalError(); } initialContextInitialized = true; }
6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/7a2c6de5fb3f720d4ccf6d80c100a157056f2b77/Scanner.java/clean/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/Scanner.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 918, 3875, 4435, 1042, 1435, 565, 288, 377, 202, 780, 4640, 5359, 273, 7683, 751, 18, 588, 4435, 5359, 1435, 422, 446, 692, 9204, 294, 7683, 751, 18, 588, 4435, 5359, 5621, 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, 1152, 918, 3875, 4435, 1042, 1435, 565, 288, 377, 202, 780, 4640, 5359, 273, 7683, 751, 18, 588, 4435, 5359, 1435, 422, 446, 692, 9204, 294, 7683, 751, 18, 588, 4435, 5359, 5621, 3...
public void addRightFloat(Box block) { //Uu.p("adding a right float: " + block); right_floats.add(block); offset_map.put(block, getOffset()); }
52947 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52947/9ac58abece8ac0f02983d3b07df9656b6a59c78a/BlockFormattingContext.java/buggy/src/java/org/xhtmlrenderer/layout/BlockFormattingContext.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 527, 4726, 4723, 12, 3514, 1203, 13, 288, 202, 202, 759, 57, 89, 18, 84, 2932, 3439, 279, 2145, 1431, 30, 315, 397, 1203, 1769, 3639, 2145, 67, 5659, 87, 18, 1289, 12, 2629...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4726, 4723, 12, 3514, 1203, 13, 288, 202, 202, 759, 57, 89, 18, 84, 2932, 3439, 279, 2145, 1431, 30, 315, 397, 1203, 1769, 3639, 2145, 67, 5659, 87, 18, 1289, 12, 2629...
il.append(methodGen.loadCurrentNode()); il.append(new INVOKEINTERFACE(pos, 4));
il.append(methodGen.loadContextNode()); il.append(new INVOKEINTERFACE(pos, 3));
public void translate(ClassGenerator classGen, MethodGenerator methodGen) { final InstructionList il = methodGen.getInstructionList(); // If we're a part of an expression's preficate we want to know what // type of node we want to be looking for if (getParent() instanceof Expression) { if (getParent().getParent() instanceof Predicate) { Predicate pred = (Predicate)getParent().getParent(); _type = pred.getPosType(); if ((_type==DOM.ELEMENT) || (_type==DOM.ATTRIBUTE)) _type = -1; } } if (methodGen instanceof CompareGenerator) { il.append(((CompareGenerator)methodGen).loadCurrentNode()); } else if (methodGen instanceof TestGenerator) { il.append(new ILOAD(POSITION_INDEX)); } else if (_type == -1) { final ConstantPoolGen cpg = classGen.getConstantPool(); final int getPosition = cpg.addInterfaceMethodref(NODE_ITERATOR, "getPosition", "()I"); il.append(methodGen.loadIterator()); il.append(new INVOKEINTERFACE(getPosition, 1)); } else { final ConstantPoolGen cpg = classGen.getConstantPool(); // public int getTypedPosition(NodeIterator iterator, int type) { final String params = "("+NODE_ITERATOR_SIG+"II)I"; final int pos = cpg.addInterfaceMethodref(DOM_INTF, "getTypedPosition", params); il.append(methodGen.loadDOM()); il.append(methodGen.loadIterator()); il.append(new PUSH(cpg, _type)); il.append(methodGen.loadCurrentNode()); il.append(new INVOKEINTERFACE(pos, 4)); } }
46591 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46591/55c7e7b1d0d253233427e97e19ee63ad1f81ba31/PositionCall.java/buggy/src/org/apache/xalan/xsltc/compiler/PositionCall.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 4204, 12, 797, 3908, 667, 7642, 16, 2985, 3908, 707, 7642, 13, 288, 202, 6385, 24605, 682, 14254, 273, 707, 7642, 18, 588, 11983, 682, 5621, 202, 759, 971, 732, 4565, 279, 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, 377, 1071, 918, 4204, 12, 797, 3908, 667, 7642, 16, 2985, 3908, 707, 7642, 13, 288, 202, 6385, 24605, 682, 14254, 273, 707, 7642, 18, 588, 11983, 682, 5621, 202, 759, 971, 732, 4565, 279, 10...
sizeDif = -sizeDif;
sizeDif = 0;
public Double identity() { int sizeMul = 1; // assuming DNA; use 3 for protein. long qAliSize = sizeMul * this.getQueryEnd() - this.getQueryStart(); long tAliSize = this.getTargetEnd() - this.getTargetStart(); long aliSize = Math.min( qAliSize, tAliSize ); if ( aliSize <= 0 ) return 0.0; long sizeDif = qAliSize = tAliSize; if ( sizeDif < 0 ) { sizeDif = -sizeDif; // here assuming "isMrna" is false; } int insertFactor = this.getQueryGapCount(); int milliBad = ( 1000 * ( this.getMismatches() * sizeMul + insertFactor + ( int ) Math.round( 3 * Math .log( 1.0 + sizeDif ) ) ) ) / ( sizeMul * ( this.getMatches() + this.getRepMatches() + this.getMismatches() ) ); assert milliBad >= 0 && milliBad <= 1000 : "Millibad was ourside of range 0-1000: " + milliBad; return 100.0 - milliBad * 0.1; }
4335 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4335/f1c5ceaec58726a9823420ae4d836610b8ede4d5/BlatResultImpl.java/buggy/gemma-mda/src/main/java/ubic/gemma/model/genome/sequenceAnalysis/BlatResultImpl.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 3698, 4215, 1435, 288, 3639, 509, 963, 27860, 273, 404, 31, 368, 15144, 463, 11277, 31, 999, 890, 364, 14314, 18, 3639, 1525, 1043, 37, 549, 1225, 273, 963, 27860, 380, 333, 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, 377, 1071, 3698, 4215, 1435, 288, 3639, 509, 963, 27860, 273, 404, 31, 368, 15144, 463, 11277, 31, 999, 890, 364, 14314, 18, 3639, 1525, 1043, 37, 549, 1225, 273, 963, 27860, 380, 333, 18, 5...
WebClient webClient = new WebClient(); WebResponse webResponse = new HttpWebConnection(webClient).getResponse(
final WebClient webClient = new WebClient(); final WebResponse webResponse = new HttpWebConnection(webClient).getResponse(
public static void testHtmlUnitHomePage() throws Exception { URL htmlUnitSite = new URL("http://htmlunit.sourceforge.net"); try { URLConnection connection = htmlUnitSite.openConnection(); connection.connect(); } catch (ConnectException e) { /* sf.net's flaky web servers and not being able to connect * here from the shell server can cause this, doesn't mean something * is broken */ System.out.println("Connection could not be made to " + htmlUnitSite.toExternalForm()); return; } catch (SocketException e) { /* Some systems do not have access to the sf.net's web page. If the connection * timesout, do not fail the test */ System.out.println("Connection could not be made to " + htmlUnitSite.toExternalForm()); return; } WebClient webClient = new WebClient(); WebResponse webResponse = new HttpWebConnection(webClient).getResponse( htmlUnitSite, SubmitMethod.GET, Collections.EMPTY_LIST, Collections.EMPTY_MAP ); HtmlPage page = HTMLParser.parse(webResponse, webClient.getCurrentWindow()); //find the copyright string HtmlUnitXPath xpath = new HtmlUnitXPath("//div[@id='footer']/div[@class='xright']"); String stringVal = xpath.stringValueOf(page).trim(); assertEquals("\u00A9 2002-2005, Gargoyle Software Inc.", stringVal); //see if the Google adds were added via Javascript xpath = new HtmlUnitXPath("//iframe[@name = 'google_ads_frame']"); HtmlInlineFrame inline = (HtmlInlineFrame)xpath.selectSingleNode(page); assertNotNull("find Google ads", inline); HtmlPage innerPage = (HtmlPage)inline.getEnclosedPage(); assertNotNull(innerPage); }
47843 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47843/bfbb9e2a2e54bf7040308f5f0b4fd744c80370c8/HTMLParserTest.java/clean/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/HTMLParserTest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 760, 918, 1842, 4353, 2802, 8684, 1964, 1435, 1216, 1185, 288, 3639, 1976, 1729, 2802, 4956, 273, 394, 1976, 2932, 2505, 2207, 2620, 4873, 18, 3168, 1884, 908, 18, 2758, 8863, 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, 1842, 4353, 2802, 8684, 1964, 1435, 1216, 1185, 288, 3639, 1976, 1729, 2802, 4956, 273, 394, 1976, 2932, 2505, 2207, 2620, 4873, 18, 3168, 1884, 908, 18, 2758, 8863, 3639, ...
public Message create( String beginString, String msgType ) { if("0".equals(msgType)) { return new quickfix.fix41.Heartbeat(); } if("A".equals(msgType)) { return new quickfix.fix41.Logon(); } if("1".equals(msgType)) { return new quickfix.fix41.TestRequest(); } if("2".equals(msgType)) { return new quickfix.fix41.ResendRequest(); } if("3".equals(msgType)) { return new quickfix.fix41.Reject(); } if("4".equals(msgType)) { return new quickfix.fix41.SequenceReset(); } if("5".equals(msgType)) { return new quickfix.fix41.Logout(); } if("7".equals(msgType)) { return new quickfix.fix41.Advertisement(); } if("6".equals(msgType)) { return new quickfix.fix41.IndicationofInterest(); } if("B".equals(msgType)) { return new quickfix.fix41.News(); } if("C".equals(msgType)) { return new quickfix.fix41.Email(); } if("R".equals(msgType)) { return new quickfix.fix41.QuoteRequest(); } if("S".equals(msgType)) { return new quickfix.fix41.Quote(); } if("D".equals(msgType)) { return new quickfix.fix41.NewOrderSingle(); } if("8".equals(msgType)) { return new quickfix.fix41.ExecutionReport(); } if("Q".equals(msgType)) { return new quickfix.fix41.DontKnowTrade(); } if("G".equals(msgType)) { return new quickfix.fix41.OrderCancelReplaceRequest(); } if("F".equals(msgType)) { return new quickfix.fix41.OrderCancelRequest(); } if("9".equals(msgType)) { return new quickfix.fix41.OrderCancelReject(); } if("H".equals(msgType)) { return new quickfix.fix41.OrderStatusRequest(); } if("J".equals(msgType)) { return new quickfix.fix41.Allocation(); } if("P".equals(msgType)) { return new quickfix.fix41.AllocationACK(); } if("T".equals(msgType)) { return new quickfix.fix41.SettlementInstructions(); } if("E".equals(msgType)) { return new quickfix.fix41.NewOrderList(); } if("N".equals(msgType)) { return new quickfix.fix41.ListStatus(); } if("L".equals(msgType)) { return new quickfix.fix41.ListExecute(); } if("K".equals(msgType)) { return new quickfix.fix41.ListCancelRequest(); } if("M".equals(msgType)) { return new quickfix.fix41.ListStatusRequest(); } return new quickfix.fix41.Message(); }
5926 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5926/1550773ed3d856616a145b520aada7f5e496c228/MessageFactory.java/buggy/src/java/src/quickfix/fix41/MessageFactory.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 2350, 752, 12, 514, 2376, 780, 16, 514, 1234, 559, 262, 288, 282, 309, 2932, 20, 9654, 14963, 12, 3576, 559, 3719, 288, 377, 327, 394, 9549, 904, 18, 904, 9803, 18, 15894, 5621, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 2350, 752, 12, 514, 2376, 780, 16, 514, 1234, 559, 262, 288, 282, 309, 2932, 20, 9654, 14963, 12, 3576, 559, 3719, 288, 377, 327, 394, 9549, 904, 18, 904, 9803, 18, 15894, 5621, ...
_context.statManager().addRateData("netDb.lookupsMatched", 1, 0); _context.statManager().addRateData("netDb.lookupsHandled", 1, 0);
getContext().statManager().addRateData("netDb.lookupsMatched", 1, 0); getContext().statManager().addRateData("netDb.lookupsHandled", 1, 0);
private void sendData(Hash key, DataStructure data, Hash toPeer, TunnelId replyTunnel) { if (_log.shouldLog(Log.DEBUG)) _log.debug("Sending data matching key key " + key.toBase64() + " to peer " + toPeer.toBase64() + " tunnel " + replyTunnel); DatabaseStoreMessage msg = new DatabaseStoreMessage(_context); msg.setKey(key); if (data instanceof LeaseSet) { msg.setLeaseSet((LeaseSet)data); msg.setValueType(DatabaseStoreMessage.KEY_TYPE_LEASESET); } else if (data instanceof RouterInfo) { msg.setRouterInfo((RouterInfo)data); msg.setValueType(DatabaseStoreMessage.KEY_TYPE_ROUTERINFO); } _context.statManager().addRateData("netDb.lookupsMatched", 1, 0); _context.statManager().addRateData("netDb.lookupsHandled", 1, 0); sendMessage(msg, toPeer, replyTunnel); }
27493 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/27493/e737e5c9507ed0d463dc9e45a8f63657f466b177/HandleDatabaseLookupMessageJob.java/buggy/router/java/src/net/i2p/router/networkdb/HandleDatabaseLookupMessageJob.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 1366, 751, 12, 2310, 498, 16, 1910, 6999, 501, 16, 2474, 358, 6813, 16, 399, 8564, 548, 4332, 20329, 13, 288, 3639, 309, 261, 67, 1330, 18, 13139, 1343, 12, 1343, 18, 9394, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1366, 751, 12, 2310, 498, 16, 1910, 6999, 501, 16, 2474, 358, 6813, 16, 399, 8564, 548, 4332, 20329, 13, 288, 3639, 309, 261, 67, 1330, 18, 13139, 1343, 12, 1343, 18, 9394, ...
super(data);
this(defaultMessage);
public ShortMessage(byte[] data) { super(data); }
50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/563d61706c08a9c62b0e997a1e5a45e90d1e8cd7/ShortMessage.java/buggy/core/src/classpath/javax/javax/sound/midi/ShortMessage.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 7925, 1079, 12, 7229, 8526, 501, 13, 225, 288, 565, 333, 12, 1886, 1079, 1769, 225, 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, 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, 282, 1071, 7925, 1079, 12, 7229, 8526, 501, 13, 225, 288, 565, 333, 12, 1886, 1079, 1769, 225, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
public org.quickfix.field.RelatdSym getRelatdSym() throws FieldNotFound { org.quickfix.field.RelatdSym value = new org.quickfix.field.RelatdSym();
public quickfix.field.RelatdSym getRelatdSym() throws FieldNotFound { quickfix.field.RelatdSym value = new quickfix.field.RelatdSym();
public org.quickfix.field.RelatdSym getRelatdSym() throws FieldNotFound { org.quickfix.field.RelatdSym value = new org.quickfix.field.RelatdSym(); getField(value); return value; }
8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/News.java/buggy/src/java/src/quickfix/fix41/News.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 2358, 18, 19525, 904, 18, 1518, 18, 1971, 270, 72, 11901, 336, 1971, 270, 72, 11901, 1435, 1216, 2286, 2768, 225, 288, 2358, 18, 19525, 904, 18, 1518, 18, 1971, 270, 72, 11901, 46...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 2358, 18, 19525, 904, 18, 1518, 18, 1971, 270, 72, 11901, 336, 1971, 270, 72, 11901, 1435, 1216, 2286, 2768, 225, 288, 2358, 18, 19525, 904, 18, 1518, 18, 1971, 270, 72, 11901, 46...
protected String format(LocoNetMessage l) { boolean showStatus = false; /* show track status in this message? */ int minutes; // temporary time values int hours; switch (l.getOpCode()) { /*************************** * ; 2 Byte MESSAGE OPCODES * * ; FORMAT = <OPC>,<CKSUM> * * ; * ***************************/ /************************************************* * OPC_BUSY 0x81 ;MASTER busy code, NUL * *************************************************/ case LnConstants.OPC_GPBUSY: /* page 8 of Loconet PE */ return "Master is busy\n"; /**************************************************** * OPC_GPOFF 0x82 ;GLOBAL power OFF request * ****************************************************/ case LnConstants.OPC_GPOFF: /* page 8 of Loconet PE */ return "Global Power OFF\n"; /*************************************************** * OPC_GPON 0x83 ;GLOBAL power ON request * ***************************************************/ case LnConstants.OPC_GPON: /* page 8 of Loconet PE */ return "Global Power ON\n"; /********************************************************************** * OPC_IDLE 0x85 ;FORCE IDLE state, Broadcast emergency STOP * **********************************************************************/ case LnConstants.OPC_IDLE: /* page 8 of Loconet PE */ return "Force Idle, Emergency STOP\n"; /***************************************** * ; 4 byte MESSAGE OPCODES * * ; FORMAT = <OPC>,<ARG1>,<ARG2>,<CKSUM> * * : * * CODES 0xA8 to 0xAF have responses * * CODES 0xB8 to 0xBF have responses * *****************************************/ /*************************************************************************** * OPC_LOCO_ADR 0xBF ; REQ loco ADR * * ; Follow on message: <E7>SLOT READ * * ; <0xBF>,<0>,<ADR>,<CHK> REQ loco ADR * * ; DATA return <E7>, is SLOT#, DATA that ADR was * * : found in. * * ; IF ADR not found, MASTER puts ADR in FREE slot * * ; and sends DATA/STATUS return <E7>...... * * ; IF no FREE slot, Fail LACK,0 is returned * * ; [<B4>,<3F>,<0>,<CHK>] * ***************************************************************************/ case LnConstants.OPC_LOCO_ADR: { /* page 8 of Loconet PE */ int adrHi = l.getElement(1); // Hi address listed as zero above int adrLo = l.getElement(2); // ADR above, the low part return "Request slot information for loco address " +convertToMixed(adrLo, adrHi)+"\n"; } /***************************************************************************** * OPC_SW_ACK 0xBD ; REQ SWITCH WITH acknowledge function (not DT200) * * ; Follow on message: LACK * * ; <0xBD>,<SW1>,<SW2>,<CHK> REQ SWITCH function * * ; <SW1> =<0,A6,A5,A4- A3,A2,A1,A0> * * ; 7 ls adr bits. * * ; A1,A0 select 1 of 4 input pairs * * ; in a DS54 * * ; <SW2> =<0,0,DIR,ON- A10,A9,A8,A7> * * ; Control bits and 4 MS adr bits. * * ; DIR=1 for Closed/GREEN * * ; =0 for Thrown/RED * * ; ON=1 for Output ON * * ; =0 FOR output OFF * * ; response is: * * ; <0xB4><3D><00> if DCS100 FIFO is full, rejected. * * ; <0xB4><3D><7F> if DCS100 accepted * *****************************************************************************/ case LnConstants.OPC_SW_ACK: { /* page 8 of Loconet PE */ int sw1 = l.getElement(1); int sw2 = l.getElement(2); return "Request switch "+ String.valueOf(SENSOR_ADR(sw1, sw2))+ ((sw2 & LnConstants.OPC_SW_ACK_CLOSED)!=0 ? " Closed/Green" : " Thrown/Red")+ ((sw2 & LnConstants.OPC_SW_ACK_OUTPUT)!=0 ? " (Output On)" : " (Output Off)")+ " with Acknowledge\n"; } /************************************************************************* * OPC_SW_STATE 0xBC ; REQ state of SWITCH * * ; Follow on message: LACK * * ; <0xBC>,<SW1>,<SW2>,<CHK> REQ state of SWITCH * *************************************************************************/ case LnConstants.OPC_SW_STATE: { /* page 8 of Loconet PE */ int sw1 = l.getElement(1); int sw2 = l.getElement(2); return "Request state of switch "+ String.valueOf(SENSOR_ADR(sw1, sw2))+"\n"; } /************************************************************************************ * OPC_RQ_SL_DATA 0xBB ; Request SLOT DATA/status block * * ; Follow on message: <E7>SLOT READ * * ; <0xBB>,<SLOT>,<0>,<CHK> Request SLOT DATA/status block. * ************************************************************************************/ case LnConstants.OPC_RQ_SL_DATA: { /* page 8 of Loconet PE */ int slot = l.getElement(1); return "Request data/status for slot "+slot+"\n"; } /******************************************************************************* * OPC_MOVE_SLOTS 0xBA ; MOVE slot SRC to DEST * * ; Follow on message: <E7>SLOT READ * * ; <0xBA>,<SRC>,<DEST>,<CHK> Move SRC to DEST if * * ; SRC or LACK etc is NOT IN_USE, clr SRC * * ; SPECIAL CASES: * * ; If SRC=0 ( DISPATCH GET) , DEST=dont care, * * ; Return SLOT READ DATA of DISPATCH Slot * * ; IF SRC=DEST (NULL move) then SRC=DEST is set to * * ; IN_USE , if legal move. * * ; If DEST=0, is DISPATCH Put, mark SLOT as DISPATCH * * ; RETURN slot status <0xE7> of DESTINATION slot * * ; DEST if move legal * * ; RETURN Fail LACK code if illegal move * * ; <B4>,<3A>,<0>,<chk>, illegal to move to/from * * ; slots 120/127 * *******************************************************************************/ case LnConstants.OPC_MOVE_SLOTS: { /* page 8 of Loconet PE */ int src = l.getElement(1); int dest = l.getElement(2); /* check special cases */ if (src == 0) { /* DISPATCH GET */ return "Get most recently dispatched slot\n"; } else if (src == dest) { /* IN USE */ return "Set status of slot "+src+" to IN_USE\n"; } else if (dest == 0) { /* DISPATCH PUT */ return "Mark slot "+dest+" as DISPATCHED\n"; } else { /* general move */ return "Move data in slot "+src+" to slot "+dest+"\n"; } } /******************************************************************************** * OPC_LINK_SLOTS 0xB9 ; LINK slot ARG1 to slot ARG2 * * ; Follow on message: <E7>SLOT READ * * ; <0xB9>,<SL1>,<SL2>,<CHK> SLAVE slot SL1 to slot SL2 * * ; Master LINKER sets the SL_CONUP/DN flags * * ; appropriately. Reply is return of SLOT Status * * ; <0xE7>. Inspect to see result of Link, invalid * * ; Link will return Long Ack Fail <B4>,<39>,<0>,<CHK> * ********************************************************************************/ case LnConstants.OPC_LINK_SLOTS: { /* page 9 of Loconet PE */ int src = l.getElement(1); int dest = l.getElement(2); return "Consist loco in slot "+src+" to loco in slot "+dest+"\n"; } /******************************************************************************************* * OPC_UNLINK_SLOTS 0xB8 ;UNLINK slot ARG1 from slot ARG2 * * ; Follow on message: <E7>SLOT READ * * ; <0xB8>,<SL1>,<SL2>,<CHK> UNLINK slot SL1 from SL2 * * ; UNLINKER executes unlink STRATEGY and returns new SLOT# * * ; DATA/STATUS of unlinked LOCO . Inspect data to evaluate UNLINK * *******************************************************************************************/ case LnConstants.OPC_UNLINK_SLOTS: { /* page 9 of Loconet PE */ int src = l.getElement(1); int dest = l.getElement(2); return "Remove loco in slot "+src+" from consist with loco in slot "+dest+"\n"; } /************************************************************************************* * OPC_CONSIST_FUNC 0xB6 ; SET FUNC bits in a CONSIST uplink element * * ; <0xB6>,<SLOT>,<DIRF>,<CHK> UP consist FUNC bits * * ; NOTE this SLOT adr is considered in UPLINKED slot space. * *************************************************************************************/ case LnConstants.OPC_CONSIST_FUNC: { /* page 9 of Loconet PE */ int slot = l.getElement(1); int dirf = l.getElement(2); return "Set consist in slot "+slot +" direction to "+((dirf & LnConstants.DIRF_DIR)!=0 ? "REV" : "FWD") +"F0="+((dirf & LnConstants.DIRF_F0)!=0 ? "On, " : "Off,") +"F1="+((dirf & LnConstants.DIRF_F1)!=0 ? "On, " : "Off,") +"F2="+((dirf & LnConstants.DIRF_F2)!=0 ? "On, " : "Off,") +"F3="+((dirf & LnConstants.DIRF_F3)!=0 ? "On, " : "Off,") +"F4="+((dirf & LnConstants.DIRF_F4)!=0 ? "On" : "Off")+"\n"; } /******************************************************************** * OPC_SLOT_STAT1 0xB5 ; WRITE slot stat1 * * ; <0xB5>,<SLOT>,<STAT1>,<CHK> WRITE stat1 * ********************************************************************/ case LnConstants.OPC_SLOT_STAT1: { /* page 9 of Loconet PE */ int slot = l.getElement(1); int stat = l.getElement(2); return "Write slot "+slot +" with status value "+stat +" (0x"+Integer.toHexString(stat) +") - Loco is "+LnConstants.CONSIST_STAT(stat)+", "+LnConstants.LOCO_STAT(stat) +"\n\tand operating in "+LnConstants.DEC_MODE(stat) +" speed step mode\n"; } /******************************************************************************* * OPC_LONG_ACK 0xB4 ; Long acknowledge * * ; <0xB4>,<LOPC>,<ACK1>,<CHK> Long acknowledge * * ; <LOPC> is COPY of OPCODE responding to (msb=0). * * ; LOPC=0 (unused OPC) is also VALID fail code * * ; <ACK1> is appropriate response code for the OPCode * *******************************************************************************/ case LnConstants.OPC_LONG_ACK: /* page 9 of Loconet PE */ int opcode = l.getElement(1); int ack1 = l.getElement(2); switch (opcode | 0x80) { case (LnConstants.OPC_LOCO_ADR): /* response for OPC_LOCO_ADR */ return "LONG_ACK: No free slot\n"; case (LnConstants.OPC_LINK_SLOTS): /* response for OPC_LINK_SLOTS */ return "LONG_ACK: Invalid consist\n"; case (LnConstants.OPC_SW_ACK): /* response for OPC_SW_ACK */ if (ack1 == 0) { return "LONG_ACK: The DCS-100 FIFO is full, the switch command was rejected\n"; } else if (ack1 == 0x7f) { return "LONG_ACK: The DCS-100 accepted the switch command\n"; } else { forceHex = true; return "LONG_ACK: Unknown response to 'Request Switch with ACK' command, 0x"+Integer.toHexString(ack1)+"\n"; } case (LnConstants.OPC_SW_REQ): /* response for OPC_SW_REQ */ return "LONG_ACK: Switch request Failed!\n"; case (LnConstants.OPC_WR_SL_DATA): if (ack1 == 0) { return "LONG_ACK: The Slot Write command was rejected\n"; } else if (ack1 == 0x01) { return "LONG_ACK: The Slot Write command was accepted\n"; } else if (ack1 == 0x40) { return "LONG_ACK: The Slot Write command was accepted blind (no response will be sent)\n"; } else if (ack1 == 0x7f) { return "LONG_ACK: Function not implemented, no reply will follow\n"; } else { forceHex = true; return "LONG_ACK: Unknown response to Write Slot Data message 0x"+Integer.toHexString(ack1)+"\n"; } case (LnConstants.OPC_SW_STATE): return "LONG_ACK: Response to switch state message 0x"+Integer.toHexString(ack1)+"\n"; case (LnConstants.OPC_MOVE_SLOTS): if (ack1 == 0) { return "LONG_ACK: The Move Slots command was rejected\n"; } else if (ack1 == 0x7f) { return "LONG_ACK: The Move Slots command was accepted\n"; } else { forceHex = true; return "LONG_ACK: unknown reponse to Move Slots message 0x"+Integer.toHexString(ack1)+"\n"; } case LnConstants.OPC_IMM_PACKET: /* special response to OPC_IMM_PACKET */ if (ack1 == 0) { return "LONG_ACK: the Send IMM Packet command was rejected, the buffer is full/busy\n"; } else if (ack1 == 0x7f) { return "LONG_ACK: the Send IMM Packet command was accepted\n"; } else { forceHex = true; return "Unknown reponse to Send IMM Packet message 0x"+Integer.toHexString(ack1)+"\n"; } case LnConstants.OPC_IMM_PACKET_2: /* special response to OPC_IMM_PACKET */ return "LONG_ACK: the Lim Master responded to the Send IMM Packet command with "+ack1+" (0x"+Integer.toHexString(ack1)+")\n"; default: // forceHex = TRUE; return "LONG_ACK: Response "+ack1+" (0x"+Integer.toHexString(ack1) +") to opcode 0x"+Integer.toHexString(opcode)+" not available in plain english\n"; } /******************************************************************************************** * OPC_INPUT_REP 0xB2 ; General SENSOR Input codes * * ; <0xB2>, <IN1>, <IN2>, <CHK> * * ; <IN1> =<0,A6,A5,A4- A3,A2,A1,A0>, * * ; 7 ls adr bits. * * ; A1,A0 select 1 of 4 inputs pairs in a DS54. * * ; <IN2> =<0,X,I,L- A10,A9,A8,A7>, * * ; Report/status bits and 4 MS adr bits. * * ; "I"=0 for DS54 "aux" inputs * * ; =1 for "switch" inputs mapped to 4K SENSOR space. * * ; * * ; (This is effectively a least significant adr bit when * * ; using DS54 input configuration) * * ; * * ; "L"=0 for input SENSOR now 0V (LO), * * ; =1 for Input sensor >=+6V (HI) * * ; "X"=1, control bit, * * ; =0 is RESERVED for future! * ********************************************************************************************/ case LnConstants.OPC_INPUT_REP: /* page 9 of Loconet PE */ int in1 = l.getElement(1); int in2 = l.getElement(2); String bdl = " (BDL16 "+in1/8+" "; if ( ((in1/2) & 3) == 0 ) bdl = bdl+"A"; else if ( ((in1/2) & 3) == 1 ) bdl = bdl+"B"; else if ( ((in1/2) & 3) == 2 ) bdl = bdl+"C"; else bdl = bdl+"D"; if ( ((in1 & 1) !=0) && ((in2 & LnConstants.OPC_INPUT_REP_SW)!=0) ) bdl=bdl+"4)"; else if ( ((in1 & 1) !=0) && ((in2 & LnConstants.OPC_INPUT_REP_SW)==0) ) bdl=bdl+"3)"; else if ( ((in1 & 1) ==0) && ((in2 & LnConstants.OPC_INPUT_REP_SW)!=0) ) bdl=bdl+"2)"; else bdl=bdl+"1)"; String ds = " (DS54 "+(SENSOR_ADR(in1,in2)/4)+" ch"+((SENSOR_ADR(in1, in2)&3)+1) +((in2 & LnConstants.OPC_INPUT_REP_SW)!=0 ? " Sw input)" : " Aux input)"); return "General sensor input report: contact "+ (SENSOR_ADR(in1, in2)*2+((in2 & LnConstants.OPC_INPUT_REP_SW)!=0?1:0)) +ds+ bdl+ " is "+ ((in2 & LnConstants.OPC_INPUT_REP_HI)!=0 ? "Hi" : "Lo")+" "+ ((in2 & LnConstants.OPC_INPUT_REP_CB)==0 ? "\n\t(Unexpected 0 value of reserved control bit)" : "")+ "\n"; /*************************************************************************************** * OPC_SW_REP 0xB1 ; Turnout SENSOR state REPORT * * ; <0xB1>,<SN1>,<SN2>,<CHK> SENSOR state REPORT * * ; <SN1> =<0,A6,A5,A4- A3,A2,A1,A0>, * * ; 7 ls adr bits. * * ; A1,A0 select 1 of 4 input pairs in a DS54 * * ; <SN2> =<0,1,I,L- A10,A9,A8,A7> * * ; Report/status bits and 4 MS adr bits. * * ; this <B1> opcode encodes input levels * * ; for turnout feedback * * ; "I" =0 for "aux" inputs (normally not feedback), * * ; =1 for "switch" input used for * * ; turnout feedback for DS54 * * ; ouput/turnout # encoded by A0-A10 * * ; "L" =0 for this input 0V (LO), * * ; =1 this input > +6V (HI) * * ; * * ; alternately; * * ; * * ; <SN2> =<0,0,C,T- A10,A9,A8,A7> * * ; Report/status bits and 4 MS adr bits. * * ; this <B1> opcode encodes current OUTPUT levels * * ; "C" =0 if "Closed" ouput line is OFF, * * ; =1 "closed" output line is ON * * ; (sink current) * * ; "T" =0 if "Thrown" output line is OFF, * * ; =1 "thrown" output line is ON * * ; (sink I) * ***************************************************************************************/ case LnConstants.OPC_SW_REP: /* page 9 of Loconet PE */ int sn1 = l.getElement(1); int sn2 = l.getElement(2); if ((sn2 & LnConstants.OPC_SW_REP_INPUTS)!=0) { return "Turnout sensor input state for address "+ SENSOR_ADR(sn1, sn2)+ ":\n\t"+ ((sn2 & LnConstants.OPC_SW_REP_SW) !=0 ? "Switch" : "Aux input")+ " is "+ (((sn2 & LnConstants.OPC_SW_REP_HI)!=0) ? "Hi" : "Lo")+"\n"; } else { // OPC_SW_REP_INPUTS is 0 return "Turnout sensor output state for address "+ SENSOR_ADR(sn1, sn2)+ ":\n\tClosed output is "+ ((sn2 & LnConstants.OPC_SW_REP_CLOSED)!=0 ? "ON (sink)" : "OFF (open)")+ ", Thrown output is "+ ((sn2 & LnConstants.OPC_SW_REP_THROWN)!=0 ? "ON (sink)" : "OFF (open)")+"\n"; } /******************************************************************************************* * OPC_SW_REQ 0xB0 ; REQ SWITCH function * * ; <0xB0>,<SW1>,<SW2>,<CHK> REQ SWITCH function * * ; <SW1> =<0,A6,A5,A4- A3,A2,A1,A0>, * * ; 7 ls adr bits. * * ; A1,A0 select 1 of 4 input pairs in a DS54 * * ; <SW2> =<0,0,DIR,ON- A10,A9,A8,A7> * * ; Control bits and 4 MS adr bits. * * ; DIR =1 for Closed,/GREEN, * * ; =0 for Thrown/RED * * ; ON =1 for Output ON, * * ; =0 FOR output OFF * * ; * * ; Note-Immediate response of <0xB4><30><00> if command failed, * * ; otherwise no response "A" CLASS codes * * ; * * ; Special form: broadcast (PE page 12) * * ; * * ; * * ; Special form: LocoNet interrogate (PE page 13) * * ; * * ; * * ; * * ; * * ; * * ; * * ; * * ; * *******************************************************************************************/ case LnConstants.OPC_SW_REQ: /* page 9 of Loconet PE */ int sw1 = l.getElement(1); int sw2 = l.getElement(2); String retVal; // check for special forms first if ( ((sw2 & 0xCF) == 0x0F) && ((sw1 & 0xFC) == 0x78) ) { // broadcast address LPU V1.0 page 12 retVal = "Request Switch to broadcast address with bits "+ "a="+ ((sw2&0x20)>>5)+((sw2 & LnConstants.OPC_SW_REQ_DIR)!=0 ? " (Closed)" : " (Thrown)")+ " c="+ ((sw1 & 0x02)>>1) + " b="+ ((sw1 & 0x01)) + "\n\tOutput "+ ((sw2 & LnConstants.OPC_SW_REQ_OUT)!=0 ? "On" : "Off")+"\n"; } else if ( ((sw2 & 0xCF) == 0x07) && ((sw1 & 0xFC) == 0x78) ) { // broadcast address LPU V1.0 page 13 retVal = "Request switch command is Interrogate LocoNet with bits "+ "a="+ ((sw2 & 0x20)>>5) + " c="+ ((sw1&0x02)>>1) + " b="+ ((sw1&0x01)) + "\n\tOutput "+ ((sw2 & LnConstants.OPC_SW_REQ_OUT)!=0 ? "On" : "Off")+"\n"+ ( ( (sw2&0x10) == 0 ) ? "" : "\tNote 0x10 bit in sw2 is unexpectedly 0\n"); } else { // normal command retVal = "Requesting Switch at "+ SENSOR_ADR(sw1, sw2)+ " to "+ ((sw2 & LnConstants.OPC_SW_REQ_DIR)!=0 ? "Closed" : "Thrown")+ " (output "+ ((sw2 & LnConstants.OPC_SW_REQ_OUT)!=0 ? "On" : "Off")+")\n"; } return retVal; /**************************************************** * OPC_LOCO_SND 0xA2 ;SET SLOT sound functions * ****************************************************/ case LnConstants.OPC_LOCO_SND: { /* page 10 of Loconet PE */ int slot = l.getElement(1); int snd = l.getElement(2); return "Set loco in slot " +slot +" Sound1/F5=" +((snd & LnConstants.SND_F5) != 0 ? "On" : "Off") +", Sound2/F6=" +((snd & LnConstants.SND_F6) != 0 ? "On" : "Off") +", Sound3/F7=" +((snd & LnConstants.SND_F7) != 0 ? "On" : "Off") +", Sound4/F8=" +((snd & LnConstants.SND_F8) != 0 ? "On" : "Off") +"\n"; } /**************************************************** * OPC_LOCO_DIRF 0xA1 ;SET SLOT dir, F0-4 state * ****************************************************/ case LnConstants.OPC_LOCO_DIRF: /* page 10 of Loconet PE */ { int slot = l.getElement(1); int dirf = l.getElement(2); return "Set loco in slot " +slot +" direction to " +((dirf & LnConstants.DIRF_DIR) != 0 ? "REV" : "FWD") +", F0=" +((dirf & LnConstants.DIRF_F0) != 0 ? "On, " : "Off,") +" F1=" +((dirf & LnConstants.DIRF_F1) != 0 ? "On, " : "Off,") +" F2=" +((dirf & LnConstants.DIRF_F2) != 0 ? "On, " : "Off,") +" F3=" +((dirf & LnConstants.DIRF_F3) != 0 ? "On, " : "Off,") +" F4=" +((dirf & LnConstants.DIRF_F4) != 0 ? "On" : "Off") +"\n"; } /*********************************************************************** * OPC_LOCO_SPD 0xA0 ;SET SLOT speed e.g. <0xA0><SLOT#><SPD><CHK> * ***********************************************************************/ case LnConstants.OPC_LOCO_SPD: { /* page 10 of Loconet PE */ int slot = l.getElement(1); int spd = l.getElement(2); if (spd == LnConstants.OPC_LOCO_SPD_ESTOP) { /* emergency stop */ return "Set speed of loco in slot "+slot+" to EMERGENCY STOP!\n"; } else { return "Set speed of loco in slot "+slot+" to "+spd+"\n"; } } /******************************************************* * ; 6 byte MESSAGE OPCODES * * ; FORMAT = <OPC>,<ARG1>,<ARG2>,<ARG3>,<ARG4>,<CKSUM> * * : * * CODES 0xC8 to 0xCF have responses * * CODES 0xD8 to 0xDF have responses * ********************************************************/ /************************************************************************ * OPC_MULTI_SENSE 0xD0 messages about power management * * and transponding * * * * If byte 1 high nibble is 0x20 or 0x00 this is a transponding message * *************************************************************************/ case LnConstants.OPC_MULTI_SENSE: { // definition courtesy Al Silverstein int type = l.getElement(1)&LnConstants.OPC_MULTI_SENSE_MSG; forceHex = true; String m; String zone; if ((l.getElement(2)&0x0F) == 0x00) zone = "A"; else if ((l.getElement(2)&0x0F) == 0x02) zone = "B"; else if ((l.getElement(2)&0x0F) == 0x04) zone = "C"; else if ((l.getElement(2)&0x0F) == 0x06) zone = "D"; else zone="<unknown "+(l.getElement(2)&0x0F)+">"; switch (type) { case LnConstants.OPC_MULTI_SENSE_POWER: return "OPC_MULTI_SENSE power message PM4 " +l.getElement(2)+" "; case LnConstants.OPC_MULTI_SENSE_PRESENT: // from transponding app note m = "OPC_MULTI_SENSE transponder present zone " +zone+" decoder address "; if (l.getElement(3)==0x7D) m+=l.getElement(4)+" (short) "; else m+=l.getElement(3)*128+l.getElement(4)+" (long) "; return m; case LnConstants.OPC_MULTI_SENSE_ABSENT: m = "OPC_MULTI_SENSE transponder absent zone " +zone+" decoder address "; if (l.getElement(3)==0x7D) m+=l.getElement(4)+" (short) "; else m+=l.getElement(3)*128+l.getElement(4)+" (long) "; return m; default: return "OPC_MULTI_SENSE unknown format "; } } /******************************************************************** * ; VARIABLE Byte MESSAGE OPCODES * * ; FORMAT = <OPC>,<COUNT>,<ARG2>,<ARG3>,...,<ARG(COUNT-3)>,<CKSUM> * ********************************************************************/ /********************************************************************************************** * OPC_WR_SL_DATA 0xEF ; WRITE SLOT DATA, 10 bytes * * ; Follow on message: LACK * * ; <0xEF>,<0E>,<SLOT#>,<STAT>,<ADR>,<SPD>,<DIRF>, * * ; <TRK>,<SS2>,<ADR2>,<SND>,<ID1>,<ID2>,<CHK> * * ; SLOT DATA WRITE, 10 bytes data /14 byte MSG * *********************************************************************************************** * OPC_SL_RD_DATA 0xE7 ; SLOT DATA return, 10 bytes * * ; <0xE7>,<0E>,<SLOT#>,<STAT>,<ADR>,<SPD>,<DIRF>, * * ; <TRK>,<SS2>,<ADR2>,<SND>,<ID1>,<ID2>,<CHK> * * ; SLOT DATA READ, 10 bytes data /14 byte MSG * * ; * * ; NOTE; If STAT2.2=0 EX1/EX2 encodes an ID#, * * ; [if STAT2.2=1 the STAT.3=0 means EX1/EX2 * * ; are ALIAS] * * ; * * ; ID1/ID2 are two 7 bit values encoding a 14 bit * * ; unique DEVICE usage ID. * * ; * * ; 00/00 - means NO ID being used * * ; * * ; 01/00 - ID shows PC usage. * * ; to Lo nibble is TYP PC# * * ; 7F/01 (PC can use hi values) * * ; * * ; 00/02 -SYSTEM reserved * * ; to * * ; 7F/03 * * ; * * ; 00/04 -NORMAL throttle RANGE * * ; to * * ; 7F/7E * *********************************************************************************************** * Notes: * * The SLOT DATA bytes are, in order of TRANSMISSION for <E7> READ or <EF> WRITE. * * NOTE SLOT 0 <E7> read will return MASTER config information bytes. * * * * 0) SLOT NUMBER: * * * * ; 0-7FH, 0 is special SLOT, * * ; 070H-07FH DIGITRAX reserved: * * * * 1) SLOT STATUS1: * * * * D7-SL_SPURGE ; 1=SLOT purge en, * * ; ALSO adrSEL (INTERNAL use only) (not seen on NET!) * * * * D6-SL_CONUP ; CONDN/CONUP: bit encoding-Control double linked Consist List * * ; 11=LOGICAL MID CONSIST , Linked up AND down * * ; 10=LOGICAL CONSIST TOP, Only linked downwards * * ; 01=LOGICAL CONSIST SUB-MEMBER, Only linked upwards * * ; 00=FREE locomotive, no CONSIST indirection/linking * * ; ALLOWS "CONSISTS of CONSISTS". Uplinked means that * * ; Slot SPD number is now SLOT adr of SPD/DIR and STATUS * * ; of consist. i.e. is ;an Indirect pointer. This Slot * * ; has same BUSY/ACTIVE bits as TOP of Consist. TOP is * * ; loco with SPD/DIR for whole consist. (top of list). * * ; BUSY/ACTIVE: bit encoding for SLOT activity * * * * D5-SL_BUSY ; 11=IN_USE loco adr in SLOT -REFRESHED * * * * D4-SL_ACTIVE ; 10=IDLE loco adr in SLOT -NOT refreshed * * ; 01=COMMON loco adr IN SLOT -refreshed * * ; 00=FREE SLOT, no valid DATA -not refreshed * * * * D3-SL_CONDN ; shows other SLOT Consist linked INTO this slot, see SL_CONUP * * * * D2-SL_SPDEX ; 3 BITS for Decoder TYPE encoding for this SLOT * * * * D1-SL_SPD14 ; 011=send 128 speed mode packets * * * * D0-SL_SPD28 ; 010=14 step MODE * * ; 001=28 step. Generate Trinary packets for this * * ; Mobile ADR * * ; 000=28 step. 3 BYTE PKT regular mode * * ; 111=128 Step decoder, Allow Advanced DCC consisting * * ; 100=28 Step decoder ,Allow Advanced DCC consisting * * * * 2) SLOT LOCO ADR: * * * * LOCO adr Low 7 bits (byte sent as ARG2 in ADR req opcode <0xBF>) * * * * 3) SLOT SPEED: * * 0x00=SPEED 0 ,STOP inertially * * 0x01=SPEED 0 EMERGENCY stop * * 0x02->0x7F increasing SPEED,0x7F=MAX speed * * (byte also sent as ARG2 in SPD opcode <0xA0> ) * * * * 4) SLOT DIRF byte: (byte also sent as ARG2 in DIRF opcode <0xA1>) * * * * D7-0 ; always 0 * * D6-SL_XCNT ; reserved , set 0 * * D5-SL_DIR ; 1=loco direction FORWARD * * D4-SL_F0 ; 1=Directional lighting ON * * D3-SL_F4 ; 1=F4 ON * * D2-SL_F3 ; 1=F3 ON * * D1-SL_F2 ; 1=F2 ON * * D0-SL_F1 ; 1=F1 ON * * * * * * * * * * 5) TRK byte: (GLOBAL system /track status) * * * * D7-D4 Reserved * * D3 GTRK_PROG_BUSY 1=Programming TRACK in this Master is BUSY. * * D2 GTRK_MLOK1 1=This Master IMPLEMENTS LocoNet 1.1 capability, * * 0=Master is DT200 * * D1 GTRK_IDLE 0=TRACK is PAUSED, B'cast EMERG STOP. * * D0 GTRK_POWER 1=DCC packets are ON in MASTER, Global POWER up * * * * 6) SLOT STATUS: * * * * D3 1=expansion IN ID1/2, 0=ENCODED alias * * D2 1=Expansion ID1/2 is NOT ID usage * * D0 1=this slot has SUPPRESSED ADV consist-7) * * * * 7) SLOT LOCO ADR HIGH: * * * * Locomotive address high 7 bits. If this is 0 then Low address is normal 7 bit NMRA SHORT * * address. If this is not zero then the most significant 6 bits of this address are used in * * the first LONG address byte ( matching CV17). The second DCC LONG address byte matches CV18 * * and includes the Adr Low 7 bit value with the LS bit of ADR high in the MS postion of this * * track adr byte. * * * * Note a DT200 MASTER will always interpret this as 0. * * * * 8) SLOT SOUND: * * * * Slot sound/ Accesory Function mode II packets. F5-F8 * * (byte also sent as ARG2 in SND opcode) * * * * D7-D4 reserved * * D3-SL_SND4/F8 * * D2-SL_SND3/F7 * * D1-SL_SND2/F6 * * D0-SL_SND1/F5 1= SLOT Sound 1 function 1active (accessory 2) * * * * 9) EXPANSION RESERVED ID1: * * * * 7 bit ls ID code written by THROTTLE/PC when STAT2.4=1 * * * * 10) EXPANSION RESERVED ID2: * * * * 7 bit ms ID code written by THROTTLE/PC when STAT2.4=1 * **********************************************************************************************/ case LnConstants.OPC_WR_SL_DATA: /* page 10 of Loconet PE */ case LnConstants.OPC_SL_RD_DATA: /* page 10 of Loconet PE */ { String mode; String locoAdrStr; String mixedAdrStr; String logString; // rwSlotData = (rwSlotDataMsg *) msgBuf; int command = l.getElement(0); int mesg_size = l.getElement(1); // ummmmm, size of the message in bytes? int slot = l.getElement(2); // slot number for this request int stat = l.getElement(3); // slot status int adr = l.getElement(4); // loco address int spd = l.getElement(5); // command speed int dirf = l.getElement(6); // direction and F0-F4 bits int trk = l.getElement(7); // track status int ss2 = l.getElement(8); // slot status 2 (tells how to use ID1/ID2 & ADV Consist) int adr2 = l.getElement(9); // loco address high int snd = l.getElement(10); // Sound 1-4 / F5-F8 int id1 = l.getElement(11); // ls 7 bits of ID code int id2 = l.getElement(12); // ms 7 bits of ID code /* build loco address string */ mixedAdrStr = convertToMixed(adr, adr2); /* figure out the alias condition, and create the loco address string */ if (adr2 == 0x7f) { if ((ss2 & LnConstants.STAT2_ALIAS_MASK) == LnConstants.STAT2_ID_IS_ALIAS) { /* this is an aliased address and we have the alias*/ locoAdrStr = "" +LOCO_ADR(id2, id1) +" (Alias for loco " +mixedAdrStr +")"; } else { /* this is an aliased address and we don't have the alias */ locoAdrStr = mixedAdrStr +" (via Alias)"; } } else { /* regular 4 digit address, 128 to 9983 */ locoAdrStr = mixedAdrStr; } /* * These share a common data format with the only * difference being whether we are reading or writing * the slot data. */ if (command == LnConstants.OPC_WR_SL_DATA) { mode = "Write"; } else { mode = "Read"; } if (slot == LnConstants.FC_SLOT) { /********************************************************************************************** * FAST Clock: * * =========== * * The system FAST clock and parameters are implemented in Slot#123 <7B>. * * * * Use <EF> to write new clock information, Slot read of 0x7B,<BB><7B>.., will return current * * System clock information, and other throttles will update to this SYNC. Note that all * * attached display devices keep a current clock calculation based on this SYNC read value, * * i.e. devices MUST not continuously poll the clock SLOT to generate time, but use this * * merely to restore SYNC and follow current RATE etc. This clock slot is typically "pinged" * * or read SYNC'd every 70 to 100 seconds , by a single user, so all attached devices can * * synchronise any phase drifts. Upon seeing a SYNC read, all devices should reset their local * * sub-minute phase counter and invalidate the SYNC update ping generator. * * * * Clock Slot Format: * * * * <0xEF>,<0E>,<7B>,<CLK_RATE>,<FRAC_MINSL>,<FRAC_MINSH>,<256-MINS_60>, * * <TRK><256-HRS_24>,<DAYS>,<CLK_CNTRL>,<ID1>,<1D2>,<CHK> * * * * <CLK_RATE> 0=Freeze clock, * * 1=normal 1:1 rate, * * 10=10:1 etc, max VALUE is 7F/128 to 1 * * <FRAC_MINSL> FRAC mins hi/lo are a sub-minute counter , depending * * on the CLOCK generator * * <FRAC_MINSH> Not for ext. usage. This counter is reset when valid * * <E6><7B> SYNC msg seen * * <256-MINS_60> This is FAST clock MINUTES subtracted from 256. Modulo 0-59 * * <256-HRS_24> This is FAST clock HOURS subtracted from 256. Modulo 0-23 * * <DAYS> number of 24 Hr clock rolls, positive count * * <CLK_CNTRL> Clock Control Byte * * D6- 1=This is valid Clock information, * * 0=ignore this <E6><7B>, SYNC reply * * <ID1>,<1D2> This is device ID last setting the clock. * * <00><00> shows no set has happened * * <7F><7x> are reserved for PC access * **********************************************************************************************/ /* make message easier to deal with internally */ // fastClock = (fastClockMsg *)msgBuf; int clk_rate = l.getElement(3); // 0 = Freeze clock, 1 = normal, 10 = 10:1 etc. Max is 0x7f int frac_minsl = l.getElement(4); // fractional minutes. not for external use. int frac_minsh = l.getElement(5); int mins_60 = l.getElement(6); // 256 - minutes int track_stat = l.getElement(7); // track status int hours_24 = l.getElement(8); // 256 - hours int days = l.getElement(9); // clock rollovers int clk_cntrl = l.getElement(10); // bit 6 = 1; data is valid clock info // " " 0; ignore this reply // id1/id2 is device id of last device to set the clock // " " = zero shows not set has happened /* recover hours and minutes values */ minutes = ((256 - mins_60) & 0x7f) % 60; hours = ((256 - hours_24)& 0x7f) % 24; hours = (24 - hours) % 24; minutes = (60 - minutes) % 60; /* check track status value and display */ if ((trackStatus != track_stat) || showTrackStatus) { trackStatus = track_stat; showStatus = true; } if (showStatus) { logString = mode +" Fast Clock: (Data is " +((clk_cntrl & 0x20) != 0 ? "Valid" : "Invalid - ignore") +")\n\t" +(clk_rate != 0 ? "Running" : "Frozen") +", rate is "+clk_rate +":1. Day "+days+", "+hours+":"+minutes +". Last set by ID 0x"+Integer.toHexString(id2)+Integer.toHexString(id1) +"\n\tMaster controller " +((track_stat & LnConstants.GTRK_MLOK1)!=0 ? "implements LocoNet 1.1" : "is a DT-200") +",\n\tTrack Status is " +((track_stat & LnConstants.GTRK_IDLE)!=0 ? "On" : "Off") +",\n\tProgramming Track is " +((track_stat & LnConstants.GTRK_PROG_BUSY)!=0 ? "Busy" : "Available") +"\n"; } else { logString = mode +" Fast Clock: (Data is " +((clk_cntrl & 0x20) != 0 ? "Valid" : "Invalid - ignore") +")\n\t" +(clk_rate != 0 ? "Frozen" : "Running") +", rate is "+clk_rate +":1. Day "+days+", "+hours+":"+minutes +". Last set by ID 0x"+Integer.toHexString(id2)+Integer.toHexString(id1)+"\n"; } // end fast clock block } else if (slot == LnConstants.PRG_SLOT) { /********************************************************************************************** * Programmer track: * * ================= * * The programmer track is accessed as Special slot #124 ( $7C, 0x7C). It is a full * * asynchronous shared system resource. * * * * To start Programmer task, write to slot 124. There will be an immediate LACK acknowledge * * that indicates what programming will be allowed. If a valid programming task is started, * * then at the final (asynchronous) programming completion, a Slot read <E7> from slot 124 * * will be sent. This is the final task status reply. * * * * Programmer Task Start: * * ---------------------- * * <0xEF>,<0E>,<7C>,<PCMD>,<0>,<HOPSA>,<LOPSA>,<TRK>;<CVH>,<CVL>, * * <DATA7>,<0>,<0>,<CHK> * * * * This OPC leads to immediate LACK codes: * * <B4>,<7F>,<7F>,<chk> Function NOT implemented, no reply. * * <B4>,<7F>,<0>,<chk> Programmer BUSY , task aborted, no reply. * * <B4>,<7F>,<1>,<chk> Task accepted , <E7> reply at completion. * * <B4>,<7F>,<0x40>,<chk> Task accepted blind NO <E7> reply at completion. * * * * Note that the <7F> code will occur in Operations Mode Read requests if the System is not * * configured for and has no Advanced Acknowlegement detection installed.. Operations Mode * * requests can be made and executed whilst a current Service Mode programming task is keeping * * the Programming track BUSY. If a Programming request is rejected, delay and resend the * * complete request later. Some readback operations can keep the Programming track busy for up * * to a minute. Multiple devices, throttles/PC's etc, can share and sequentially use the * * Programming track as long as they correctly interpret the response messages. Any Slot RD * * from the master will also contain the Programmer Busy status in bit 3 of the <TRK> byte. * * * * A <PCMD> value of <00> will abort current SERVICE mode programming task and will echo with * * an <E6> RD the command string that was aborted. * * * * <PCMD> Programmer Command: * * -------------------------- * * Defined as * * D7 -0 * * D6 -Write/Read 1= Write, * * 0=Read * * D5 -Byte Mode 1= Byte operation, * * 0=Bit operation (if possible) * * D4 -TY1 Programming Type select bit * * D3 -TY0 Prog type select bit * * D2 -Ops Mode 1=Ops Mode on Mainlines, * * 0=Service Mode on Programming Track * * D1 -0 reserved * * D0 -0-reserved * * * * Type codes: * * ----------- * * Byte Mode Ops Mode TY1 TY0 Meaning * * 1 0 0 0 Paged mode byte Read/Write on Service Track * * 1 0 0 0 Paged mode byte Read/Write on Service Track * * 1 0 0 1 Direct mode byteRead/Write on Service Track * * 0 0 0 1 Direct mode bit Read/Write on Service Track * * x 0 1 0 Physical Register byte Read/Write on Service Track * * x 0 1 1 Service Track- reserved function * * 1 1 0 0 Ops mode Byte program, no feedback * * 1 1 0 1 Ops mode Byte program, feedback * * 0 1 0 0 Ops mode Bit program, no feedback * * 0 1 0 1 Ops mode Bit program, feedback * * * * <HOPSA>Operations Mode Programming * * 7 High address bits of Loco to program, 0 if Service Mode * * <LOPSA>Operations Mode Programming * * 7 Low address bits of Loco to program, 0 if Service Mode * * <TRK> Normal Global Track status for this Master, * * Bit 3 also is 1 WHEN Service Mode track is BUSY * * <CVH> High 3 BITS of CV#, and ms bit of DATA.7 * * <0,0,CV9,CV8 - 0,0, D7,CV7> * * <CVL> Low 7 bits of 10 bit CV address. * * <0,CV6,CV5,CV4-CV3,CV2,CV1,CV0> * * <DATA7>Low 7 BITS OF data to WR or RD COMPARE * * <0,D6,D5,D4 - D3,D2,D1,D0> * * ms bit is at CVH bit 1 position. * * * * Programmer Task Final Reply: * * ---------------------------- * * (if saw LACK <B4>,<7F>,<1>,<chk> code reply at task start) * * * * <0xE7>,<0E>,<7C>,<PCMD>,<PSTAT>,<HOPSA>,<LOPSA>,<TRK>;<CVH>,<CVL>, * * <DATA7>,<0>,<0>,<CHK> * * * * <PSTAT> Programmer Status error flags. Reply codes resulting from * * completed task in PCMD * * D7-D4 -reserved * * D3 -1= User Aborted this command * * D2 -1= Failed to detect READ Compare acknowledge response * * from decoder * * D1 -1= No Write acknowledge response from decoder * * D0 -1= Service Mode programming track empty- No decoder detected * * * * This <E7> response is issued whenever a Programming task is completed. It echos most of the * * request information and returns the PSTAT status code to indicate how the task completed. * * If a READ was requested <DATA7> and <CVH> contain the returned data, if the PSTAT indicates * * a successful readback (typically =0). Note that if a Paged Read fails to detect a * * successful Page write acknowledge when first setting the Page register, the read will be * * aborted, showing no Write acknowledge flag D1=1. * **********************************************************************************************/ String operation; String progMode; int cvData; boolean opsMode = false; int cvNumber; // progTask = (progTaskMsg *) msgBuf; // slot - slot number for this request - slot 124 is programmer int pcmd = l.getElement(3); // programmer command int pstat = l.getElement(4); // programmer status error flags in reply message int hopsa = l.getElement(5); // Ops mode - 7 high address bits of loco to program int lopsa = l.getElement(6); // Ops mode - 7 low address bits of loco to program /* trk - track status. Note: bit 3 shows if prog track is busy */ int cvh = l.getElement(8); // hi 3 bits of CV# and msb of data7 int cvl = l.getElement(9); // lo 7 bits of CV# int data7 = l.getElement(10); // 7 bits of data to program, msb is in cvh above cvData = (((cvh & LnConstants.CVH_D7) << 6) | (data7 & 0x7f)); // was PROG_DATA cvNumber = (((((cvh & LnConstants.CVH_CV8_CV9) >> 3) | (cvh & LnConstants.CVH_CV7)) * 128) + (cvl & 0x7f))+1; // was PROG_CV_NUM(progTask) /* generate loco address, mixed mode or true 4 digit */ mixedAdrStr = convertToMixed(lopsa, hopsa); /* determine programming mode for printing */ if ((pcmd & LnConstants.PCMD_MODE_MASK) == LnConstants.PAGED_ON_SRVC_TRK) { progMode = "Byte in Paged Mode on Service Track"; } else if ((pcmd & LnConstants.PCMD_MODE_MASK) == LnConstants.DIR_BYTE_ON_SRVC_TRK) { progMode = "Byte in Direct Mode on Service Track"; } else if ((pcmd & LnConstants.PCMD_MODE_MASK) == LnConstants.DIR_BIT_ON_SRVC_TRK) { progMode = "Bits in Direct Mode on Service Track"; } else if (((pcmd & ~LnConstants.PCMD_BYTE_MODE) & LnConstants.PCMD_MODE_MASK) == LnConstants.REG_BYTE_RW_ON_SRVC_TRK) { progMode = "Byte in Physical Register R/W Mode on Service Track"; } else if ((pcmd & LnConstants.PCMD_MODE_MASK) == LnConstants.OPS_BYTE_NO_FEEDBACK) { progMode = "Byte in OP's Mode (NO feedback)"; opsMode = true; } else if ((pcmd & LnConstants.PCMD_MODE_MASK) == LnConstants.OPS_BYTE_FEEDBACK) { progMode = "Byte in OP's Mode"; opsMode = true; } else if ((pcmd & LnConstants.PCMD_MODE_MASK) == LnConstants.OPS_BIT_NO_FEEDBACK) { progMode = "Bits in OP's Mode (NO feedback)"; opsMode = true; } else if ((pcmd & LnConstants.PCMD_MODE_MASK) == LnConstants.OPS_BIT_FEEDBACK) { progMode = "Bits in OP's Mode"; opsMode = true; } else if (((pcmd & ~LnConstants.PCMD_BYTE_MODE) & LnConstants.PCMD_MODE_MASK) == LnConstants.SRVC_TRK_RESERVED) { progMode = "SERVICE TRACK RESERVED MODE DETECTED!"; } else { progMode = "Unknown mode "+pcmd+" (0x"+Integer.toHexString(pcmd)+")"; forceHex = true; } /* are we sending or receiving? */ if ((pcmd & LnConstants.PCMD_RW) != 0) { /* sending a command */ operation = "Programming Track: Write"; /* printout based on whether we're doing Ops mode or not */ if (opsMode) { logString = mode+" " +operation+" " +progMode+"\n" +"\tSetting CV"+cvNumber +" of Loco "+mixedAdrStr+" to "+cvData +" (0x"+Integer.toHexString(cvData)+")\n"; } else { logString = mode+" " +operation+" " +progMode+"\n" +"\tSetting CV"+cvNumber +" to "+cvData +" (0x"+Integer.toHexString(cvData)+")\n"; } } else { /* receiving a reply */ operation = "Programming Track: Read"; /* printout based on whether we're doing Ops mode or not */ if (opsMode) { logString = mode+" " +operation+" " +progMode+"\n" +"\tSetting CV"+cvNumber +" of Loco "+mixedAdrStr+" to "+cvData +" (0x"+Integer.toHexString(cvData)+")\n"; } else { logString = mode+" " +operation+" " +progMode+"\n" +"\tSetting CV"+cvNumber +" to "+cvData +" (0x"+Integer.toHexString(cvData)+")\n"; } /* if we're reading the slot back, check the status */ /* this is supposed to be the Programming task final reply */ /* and will have the resulting status byte */ if (command == LnConstants.OPC_SL_RD_DATA) { if (pstat != 0) { if ((pstat & LnConstants.PSTAT_USER_ABORTED) != 0) { logString += "\tStatus = Failed, User Aborted\n"; } if ((pstat & LnConstants.PSTAT_READ_FAIL) != 0) { logString += "\tStatus = Failed, Read Compare Acknowledge not detected\n"; } if ((pstat & LnConstants.PSTAT_WRITE_FAIL) != 0 ) { logString += "\tStatus = Failed, No Write Acknowledge from decoder\n"; } if ((pstat & LnConstants.PSTAT_NO_DECODER) != 0 ) { logString += "\tStatus = Failed, Service Mode programming track empty\n"; } if ((pstat & 0xF0) != 0) { logString += "Warning: reserved bit set. Message may be invalid. PSTAT = 0x" +Integer.toHexString(pstat); } } else { logString += "\tStatus = Success\n"; } } } // end programming track block } else { /************************************************** * normal slot read/write message - see info above * **************************************************/ if ((trackStatus != trk) || showTrackStatus) { trackStatus = trk; showStatus = true; } if (showStatus) { logString = mode +" slot "+slot +":\n\tLoco "+locoAdrStr +" is "+LnConstants.CONSIST_STAT(stat) +", "+LnConstants.LOCO_STAT(stat) +", operating in "+LnConstants.DEC_MODE(stat)+" SS mode, and is going " +((dirf & LnConstants.DIRF_DIR)!=0 ? "in Reverse" : "Foward") +" at speed "+spd+",\n" +"\tF0="+((dirf & LnConstants.DIRF_F0) != 0 ? "On, " : "Off,") +" F1="+((dirf & LnConstants.DIRF_F1) != 0 ? "On, " : "Off,") +" F2="+((dirf & LnConstants.DIRF_F2) != 0 ? "On, " : "Off,") +" F3="+((dirf & LnConstants.DIRF_F3) != 0 ? "On, " : "Off,") +" F4="+((dirf & LnConstants.DIRF_F4) != 0 ? "On, " : "Off,") +" Sound1/F5="+((snd & LnConstants.SND_F5) != 0 ? "On, " : "Off,") +" Sound2/F6="+((snd & LnConstants.SND_F6) != 0 ? "On, " : "Off,") +" Sound3/F7="+((snd & LnConstants.SND_F7) != 0 ? "On, " : "Off,") +" Sound4/F8="+((snd & LnConstants.SND_F8) != 0 ? "On" : "Off") +"\n\tMaster controller "+((trk & LnConstants.GTRK_MLOK1) !=0 ? "implements LocoNet 1.1" : "is a DT-200") +",\n\tTrack Status is "+((trk & LnConstants.GTRK_IDLE) != 0 ? "On" : "Off") +",\n\tProgramming Track is "+((trk & LnConstants.GTRK_PROG_BUSY) != 0 ? "Busy" : "Available") +"\n\tSS2=0x"+Integer.toHexString(ss2) +", ID =0x"+Integer.toHexString(id2)+Integer.toHexString(id1)+"\n"; } else { logString = mode +" slot "+slot +":\n\tLoco "+locoAdrStr +" is "+LnConstants.CONSIST_STAT(stat) +", "+LnConstants.LOCO_STAT(stat) +", operating in "+LnConstants.DEC_MODE(stat)+" SS mode, and is going " +((dirf & LnConstants.DIRF_DIR)!=0 ? "in Reverse" : "Foward") +" at speed "+spd+",\n" +"\tF0="+((dirf & LnConstants.DIRF_F0) != 0 ? "On, " : "Off,") +" F1="+((dirf & LnConstants.DIRF_F1) != 0 ? "On, " : "Off,") +" F2="+((dirf & LnConstants.DIRF_F2) != 0 ? "On, " : "Off,") +" F3="+((dirf & LnConstants.DIRF_F3) != 0 ? "On, " : "Off,") +" F4="+((dirf & LnConstants.DIRF_F4) != 0 ? "On, " : "Off,") +" Sound1/F5="+((snd & LnConstants.SND_F5) != 0 ? "On, " : "Off,") +" Sound2/F6="+((snd & LnConstants.SND_F6) != 0 ? "On, " : "Off,") +" Sound3/F7="+((snd & LnConstants.SND_F7) != 0 ? "On, " : "Off,") +" Sound4/F8="+((snd & LnConstants.SND_F8) != 0 ? "On" : "Off") +"\n\tSS2=0x"+Integer.toHexString(ss2) +", ID =0x"+Integer.toHexString(id2)+Integer.toHexString(id1)+"\n"; } // end normal slot read/write case } // end of OPC_WR_SL_DATA, OPC_SL_RD_DATA case return logString; } /*********************************************************************************** * OPC_PEER_XFER 0xE5 ; move 8 bytes PEER to PEER, SRC->DST * * ; Message has response * * ; <0xE5>,<10>,<SRC>,<DSTL><DSTH>,<PXCT1>,<D1>, * * ; <D2>,<D3>,<D4>,<PXCT2>,<D5>,<D6>,<D7>, * * ; <D8>,<CHK> * * ; SRC/DST are 7 bit args. DSTL/H=0 is BROADCAST msg * * ; SRC=0 is MASTER * * ; SRC=0x70-0x7E are reserved * * ; SRC=7F is THROTTLE msg xfer, * * ; <DSTL><DSTH> encode ID#, * * ; <0><0> is THROT B'CAST * * ; <PXCT1>=<0,XC2,XC1,XC0 - D4.7,D3.7,D2.7,D1.7> * * ; XC0-XC2=ADR type CODE-0=7 bit Peer TO Peer adrs * * ; 1=<D1>is SRC HI,<D2>is DST HI * * ; <PXCT2>=<0,XC5,XC4,XC3 - D8.7,D7.7,D6.7,D5.7> * * ; XC3-XC5=data type CODE- 0=ANSI TEXT string, * * ; balance RESERVED * ***********************************************************************************/ case LnConstants.OPC_PEER_XFER: /* page 10 of Loconet PE */ int src = l.getElement(2); // source of transfer int dst_l = l.getElement(3); // ls 7 bits of destination int dst_h = l.getElement(4); // ms 7 bits of destination int pxct1 = l.getElement(5); int pxct2 = l.getElement(10); int d[] = l.getPeerXfrData(); return "Peer to Peer transfer: SRC=0x"+Integer.toHexString(src) +", DSTL=0x"+Integer.toHexString(dst_l) +", DSTH=0x"+Integer.toHexString(dst_h) +", PXCT1=0x"+Integer.toHexString(pxct1) +", PXCT2=0x"+Integer.toHexString(pxct2)+"\n" +"\tD1=0x"+Integer.toHexString(d[0]) +", D2=0x"+Integer.toHexString(d[1]) +", D3=0x"+Integer.toHexString(d[2]) +", D4=0x"+Integer.toHexString(d[3]) +", D5=0x"+Integer.toHexString(d[4]) +", D6=0x"+Integer.toHexString(d[5]) +", D7=0x"+Integer.toHexString(d[6]) +", D8=0x"+Integer.toHexString(d[7]) +"\n"; /*********************************************************************************** * 0xE4 ; * * ; * * ; <0xE4>,<0x09>,... * ***********************************************************************************/ case 0XE4: if (l.getElement(1)!=0x09) { forceHex = true; return "Unrecognized command varient\n"; } // OK, format int element = l.getElement(2)*128+l.getElement(3); int stat = l.getElement(5); String status; if ( (stat&0x10) !=0 ) if ( (stat&0x20) !=0 ) status = " AX, XA reserved; "; else status = " AX reserved; "; else if ( (stat&0x20) !=0 ) status = " XA reserved; "; else status = " no reservation; "; if ( (stat&0x01) !=0 ) status+="Turnout normal; "; else status+="Turnout reversed; "; if ( (stat&0x04) !=0 ) status+="Occupied"; else status+="Not occupied"; return "SE"+element+" reports AX:"+l.getElement(6)*4 +" XA:"+l.getElement(7)*4 +status+"\n"; /************************************************************************** * OPC_IMM_PACKET 0xED ;SEND n-byte packet immediate LACK * * ; Follow on message: LACK * * ; <0xED>,<0B>,<7F>,<REPS>,<DHI>,<IM1>,<IM2>, * * ; <IM3>,<IM4>,<IM5>,<CHK> * * ; <DHI>=<0,0,1,IM5.7-IM4.7,IM3.7,IM2.7,IM1.7> * * ; <REPS> D4,5,6=#IM bytes, * * ; D3=0(reserved); * * ; D2,1,0=repeat CNT * * ; IF Not limited MASTER then * * ; LACK=<B4>,<7D>,<7F>,<chk> if CMD ok * * ; IF limited MASTER then Lim Masters respond * * ; with <B4>,<7E>,<lim adr>,<chk> * * ; IF internal buffer BUSY/full respond * * ; with <B4>,<7D>,<0>,<chk> * * ; (NOT IMPLEMENTED IN DT200) * **************************************************************************/ case LnConstants.OPC_IMM_PACKET: /* page 11 of Loconet PE */ //sendPkt = (sendPktMsg *) msgBuf; int val7f = l.getElement(3); /* fixed value of 0x7f */ int reps = l.getElement(4); /* repeat count */ int dhi = l.getElement(5); /* high bits of data bytes */ int im1 = l.getElement(6); int im2 = l.getElement(7); int im3 = l.getElement(8); int im4 = l.getElement(9); int im5 = l.getElement(10); /* see if it really is a 'Send Packet' as defined in Loconet PE */ if (val7f == 0x7f) { /* it is */ return "Send packet immediate: "+((reps & 0x70) >> 4) +" bytes, repeat count "+(reps & 0x07) +", DHI=0x"+Integer.toHexString(dhi) +",\n\tIM1=0x"+Integer.toHexString(im1) +", IM2=0x"+Integer.toHexString(im2) +", IM3=0x"+Integer.toHexString(im3) +", IM4=0x"+Integer.toHexString(im4) +", IM5=0x"+Integer.toHexString(im5) +"\n"; } else { /* Hmmmm... */ forceHex = true; return "Weird Send Packet Immediate, 3rd byte id 0x"+Integer.toHexString(val7f) +" not 0x7f\n"; } default: forceHex = true; return "Command is not defined in Loconet Personal Use Edition 1.0\n"; } // end switch over opcode type - default handles unrecognized cases, so can't reach here } // end of format() member function
213 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/213/4a837d20a59978313a3b2ca9554db41b11210910/Llnmon.java/buggy/jmri/jmrix/loconet/locomon/Llnmon.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 514, 740, 12, 1333, 83, 7308, 1079, 328, 13, 288, 7734, 1250, 2405, 1482, 273, 629, 31, 282, 1748, 2405, 3298, 1267, 316, 333, 883, 35, 1195, 540, 202, 474, 6824, 31, 225, 368, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 514, 740, 12, 1333, 83, 7308, 1079, 328, 13, 288, 7734, 1250, 2405, 1482, 273, 629, 31, 282, 1748, 2405, 3298, 1267, 316, 333, 883, 35, 1195, 540, 202, 474, 6824, 31, 225, 368, ...
gopher.l = l; CrossProductResidue r = (CrossProductResidue) ourResidues.get(gopher);
CrossProductResidue r; synchronized(gopher) { gopher.l = l; r = (CrossProductResidue) ourResidues.get(gopher); }
public CrossProductResidue getResidue(List l) throws IllegalAlphabetException { gopher.l = l; CrossProductResidue r = (CrossProductResidue) ourResidues.get(gopher); if (r == null) { throw new IllegalAlphabetException( "Unable to find CrossProduct residue for " + l + " in alphabet " + getName() ); } return r; }
50115 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50115/dc7b3edc7f85e7b94903a263787fdbfcd26d71e3/SimpleCrossProductAlphabet.java/buggy/src/org/biojava/bio/seq/tools/SimpleCrossProductAlphabet.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 19742, 4133, 607, 23965, 31792, 23965, 12, 682, 328, 13, 1216, 2141, 27316, 503, 288, 565, 22096, 1614, 18, 80, 273, 328, 31, 565, 19742, 4133, 607, 23965, 436, 273, 261, 13941, 413...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 19742, 4133, 607, 23965, 31792, 23965, 12, 682, 328, 13, 1216, 2141, 27316, 503, 288, 565, 22096, 1614, 18, 80, 273, 328, 31, 565, 19742, 4133, 607, 23965, 436, 273, 261, 13941, 413...
"ms, missing ACKs from " + ack_collector.getMissing() + " (received=" + ack_collector.getReceived() +
"ms, missing ACKs from " + ack_collector.printMissing() + " (received=" + ack_collector.printReceived() +
public void castViewChangeWithDest(View new_view, Digest digest, java.util.List members) { Message view_change_msg; GmsHeader hdr; long start, stop; ViewId vid=new_view.getVid(); int size=-1; if(members == null || members.size() == 0) members=new_view.getMembers(); if(log.isTraceEnabled()) log.trace("mcasting view {" + new_view + "} (" + new_view.size() + " mbrs)\n"); start=System.currentTimeMillis(); view_change_msg=new Message(); // bcast to all members hdr=new GmsHeader(GmsHeader.VIEW, new_view); hdr.my_digest=digest; view_change_msg.putHeader(name, hdr); ack_collector.reset(vid, members); size=ack_collector.size(); passDown(new Event(Event.MSG, view_change_msg)); try { ack_collector.waitForAllAcks(view_ack_collection_timeout); stop=System.currentTimeMillis(); if(trace) log.trace("received all ACKs (" + size + ") for " + vid + " in " + (stop-start) + "ms"); } catch(TimeoutException e) { log.warn("failed to collect all ACKs (" + size + ") for view " + new_view + " after " + view_ack_collection_timeout + "ms, missing ACKs from " + ack_collector.getMissing() + " (received=" + ack_collector.getReceived() + "), local_addr=" + local_addr); } }
48949 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48949/5f54b164eba4b5bcde2aa03985f78bbe2cc05deb/GMS.java/buggy/src/org/jgroups/protocols/pbcast/GMS.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 4812, 1767, 3043, 1190, 9378, 12, 1767, 394, 67, 1945, 16, 15864, 5403, 16, 2252, 18, 1367, 18, 682, 4833, 13, 288, 3639, 2350, 282, 1476, 67, 3427, 67, 3576, 31, 3639, 611, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4812, 1767, 3043, 1190, 9378, 12, 1767, 394, 67, 1945, 16, 15864, 5403, 16, 2252, 18, 1367, 18, 682, 4833, 13, 288, 3639, 2350, 282, 1476, 67, 3427, 67, 3576, 31, 3639, 611, ...
if (linkTargetFile.exists() == false) {
if (linkTargetFile.exists()) { IStatus fileTypeStatus = validateFileType(linkTargetFile); if (fileTypeStatus.isOK() == false) return fileTypeStatus; } else if (locationStatus.getSeverity() == IStatus.OK) {
public IStatus validateLinkLocation(IResource linkHandle) { if (linkTargetField == null || linkTargetField.isDisposed()) return createStatus(IStatus.OK, ""); //$NON-NLS-1$ IWorkspace workspace = WorkbenchPlugin.getPluginWorkspace(); String linkTargetName = linkTargetField.getText(); IPath path = new Path(linkTargetName); if (createLink == false) return createStatus(IStatus.OK, ""); //$NON-NLS-1$ IStatus locationStatus = workspace.validateLinkLocation(linkHandle, path); if (locationStatus.getSeverity() != IStatus.OK) { return locationStatus; } // use the resolved link target name linkTargetName = resolvedPathLabelData.getText(); path = new Path(linkTargetName); File linkTargetFile = new Path(linkTargetName).toFile(); if (linkTargetFile.exists() == false) { return createStatus( IStatus.WARNING, WorkbenchMessages.getString("CreateLinkedResourceGroup.linkTargetNonExistent")); //$NON-NLS-1$ } IStatus fileTypeStatus = validateFileType(linkTargetFile); if (fileTypeStatus.isOK() == false) { return fileTypeStatus; } return locationStatus;}
55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/1249a6d5d0d0b1943d05cb5937bcd35b679a88d7/CreateLinkedResourceGroup.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/CreateLinkedResourceGroup.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1071, 467, 1482, 1954, 2098, 2735, 12, 45, 1420, 1692, 3259, 13, 288, 202, 430, 261, 1232, 2326, 974, 422, 446, 747, 1692, 2326, 974, 18, 291, 1669, 7423, 10756, 202, 202, 2463, 752, 1482, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1071, 467, 1482, 1954, 2098, 2735, 12, 45, 1420, 1692, 3259, 13, 288, 202, 430, 261, 1232, 2326, 974, 422, 446, 747, 1692, 2326, 974, 18, 291, 1669, 7423, 10756, 202, 202, 2463, 752, 1482, 1...
public Iterator findIterator (Object instance) throws PropertyException { if (iteratorMethod != null) { Object ret = invoke(iteratorMethod, instance, null); if (ret instanceof Iterator) { return (Iterator) ret; } else if (ret instanceof Enumeration) { return new EnumIterator((Enumeration) ret); } else if (ret instanceof Object[]) { return new ArrayIterator((Object[]) ret); } } throw new PropertyException((instance == null ? "null" : instance.getClass().getName()) + " is not a list"); }
public Iterator findIterator(Object instance) throws PropertyException { if (iteratorMethod != null) { Object ret = invoke(iteratorMethod, instance, null); if (ret instanceof Iterator) { return (Iterator) ret; } else if (ret instanceof Enumeration) { return new EnumIterator((Enumeration) ret); } else if (ret instanceof Object[]) { return new ArrayIterator((Object[]) ret); } } throw new PropertyException((instance == null ? "null" : instance.getClass().getName()) + " is not a list"); }
public Iterator findIterator (Object instance) throws PropertyException { if (iteratorMethod != null) { Object ret = invoke(iteratorMethod, instance, null); if (ret instanceof Iterator) { return (Iterator) ret; } else if (ret instanceof Enumeration) { return new EnumIterator((Enumeration) ret); } else if (ret instanceof Object[]) { return new ArrayIterator((Object[]) ret); } } throw new PropertyException((instance == null ? "null" : instance.getClass().getName()) + " is not a list"); }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/67ca4e7044b0f2675e520acfb786c52497facbe2/PropertyOperatorCache.java/buggy/webmacro/src/org/webmacro/engine/PropertyOperatorCache.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 4498, 1104, 3198, 261, 921, 791, 13, 5411, 1216, 4276, 503, 565, 288, 3639, 309, 261, 9838, 1305, 480, 446, 13, 3639, 288, 5411, 1033, 325, 273, 4356, 12, 9838, 1305, 16, 791, 16,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 4498, 1104, 3198, 261, 921, 791, 13, 5411, 1216, 4276, 503, 565, 288, 3639, 309, 261, 9838, 1305, 480, 446, 13, 3639, 288, 5411, 1033, 325, 273, 4356, 12, 9838, 1305, 16, 791, 16,...
m_tcpPort = port;
m_tcpPort = TCP_PORT;
TcpServer(Fiber parent, List handlers, int port ) throws IOException { m_parent = parent; m_tcpPort = port; m_tcpSock = new ServerSocket(m_tcpPort); m_receivers = new LinkedList(); m_stop = false; m_context = null; m_handlers= handlers; m_logPrefix = org.opennms.netmgt.eventd.Eventd.LOG4J_CATEGORY; m_recsPerConn = TcpEventReceiver.UNLIMITED_EVENTS; }
25465 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/25465/b3612967cb053036bdb295ee74cb2e369c6ca18d/TcpServer.java/buggy/src/services/org/opennms/netmgt/eventd/adaptors/tcp/TcpServer.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 27591, 2081, 12, 22041, 982, 16, 987, 4919, 16, 509, 1756, 262, 202, 202, 15069, 1860, 202, 95, 202, 202, 81, 67, 2938, 225, 273, 982, 31, 202, 202, 81, 67, 14832, 2617, 273, 175...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 27591, 2081, 12, 22041, 982, 16, 987, 4919, 16, 509, 1756, 262, 202, 202, 15069, 1860, 202, 95, 202, 202, 81, 67, 2938, 225, 273, 982, 31, 202, 202, 81, 67, 14832, 2617, 273, 175...
org.exist.xquery.parser.XQueryAST tmp189_AST = null; tmp189_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.makeASTRoot(currentAST, tmp189_AST);
org.exist.xquery.parser.XQueryAST tmp190_AST = null; tmp190_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.makeASTRoot(currentAST, tmp190_AST);
public final void multiplicativeExpr() throws RecognitionException, TokenStreamException, XPathException { returnAST = null; ASTPair currentAST = new ASTPair(); org.exist.xquery.parser.XQueryAST multiplicativeExpr_AST = null; unaryExpr(); astFactory.addASTChild(currentAST, returnAST); { _loop169: do { if ((_tokenSet_5.member(LA(1)))) { { switch ( LA(1)) { case STAR: { org.exist.xquery.parser.XQueryAST tmp189_AST = null; tmp189_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.makeASTRoot(currentAST, tmp189_AST); match(STAR); break; } case LITERAL_div: { org.exist.xquery.parser.XQueryAST tmp190_AST = null; tmp190_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.makeASTRoot(currentAST, tmp190_AST); match(LITERAL_div); break; } case LITERAL_idiv: { org.exist.xquery.parser.XQueryAST tmp191_AST = null; tmp191_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.makeASTRoot(currentAST, tmp191_AST); match(LITERAL_idiv); break; } case LITERAL_mod: { org.exist.xquery.parser.XQueryAST tmp192_AST = null; tmp192_AST = (org.exist.xquery.parser.XQueryAST)astFactory.create(LT(1)); astFactory.makeASTRoot(currentAST, tmp192_AST); match(LITERAL_mod); break; } default: { throw new NoViableAltException(LT(1), getFilename()); } } } unaryExpr(); astFactory.addASTChild(currentAST, returnAST); } else { break _loop169; } } while (true); } multiplicativeExpr_AST = (org.exist.xquery.parser.XQueryAST)currentAST.root; returnAST = multiplicativeExpr_AST; }
2909 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2909/10544e5ec103a411822c6180ed81ef38eab15de8/XQueryParser.java/buggy/src/org/exist/xquery/parser/XQueryParser.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 727, 918, 3309, 28884, 4742, 1435, 1216, 9539, 16, 3155, 1228, 503, 16, 10172, 503, 288, 9506, 202, 2463, 9053, 273, 446, 31, 202, 202, 9053, 4154, 783, 9053, 273, 394, 9183, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3309, 28884, 4742, 1435, 1216, 9539, 16, 3155, 1228, 503, 16, 10172, 503, 288, 9506, 202, 2463, 9053, 273, 446, 31, 202, 202, 9053, 4154, 783, 9053, 273, 394, 9183, ...
if (this.resultId != 0) { int currentRow = getResultCount(); setResultRows(currentRow); if (isError()) { Exception ex = getException(); setError(null); setException(null);
int currentRow = 0; if (this.resultId != 0) { try { currentRow = database.getNumRows(resultId); setResultRows(currentRow); } catch (Exception ex){ logger.error("Get number of results failed. Exception caught in UserManager. Details: "+ex.getMessage());
public void processResult(int from, int count) throws Exception { if (this.resultId != 0) { int currentRow = getResultCount(); setResultRows(currentRow); if (isError()) { Exception ex = getException(); setError(null); setException(null); throw ex; } logger.debug("Rows in the result: "+currentRow); logger.debug("Max available rows: "+(from+count-1)); // Find out how many rows we can retrieve - it cannot be more than number of rows in the result int to = Math.min(currentRow, from+count-1); if (to <= 0) { userList = new ArrayList<User>(); setDisplayRows(0); setCurrentDisplayRows("0-0"); } else { logger.debug("Retrieving query results: 1 -" + to); setCurrentDisplayRows(from+ "-" + to); // Retrieve selected row interval Object[] objectUser; try { objectUser = database.more(this.resultId, 0, to-1); } catch(Exception e) { logger.error("Processing search results failed: " + e.getMessage()); throw e; } if (objectUser == null) { logger.error("tUser doesn`t contain required data"); throw new DBLayerException(ERROR_PROCESS + "tUser doesn`t contain required data"); } int countResult = objectUser.length; logger.debug("Results retrieved. Count: "+ countResult); this.userList = new ArrayList<User>(); // Cast the results to the User objects for (int i=0; i<countResult; i++ ) { Object[] objHis = (Object[])objectUser[i]; this.userList.add((User)objHis[0]); } // Update current first displayed row logger.info("Results successfuly retrieved"); setCurrentFirstRow(from); } } }
57211 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57211/4ce496b391a312d560b94be94ee4ceb687bfc0a5/UserManager.java/clean/trunk/src/net/sf/plantlore/client/user/UserManager.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1207, 1253, 12, 474, 628, 16, 509, 1056, 13, 1216, 1185, 288, 7734, 309, 261, 2211, 18, 2088, 548, 480, 374, 13, 288, 5411, 509, 31185, 273, 8601, 1380, 5621, 5411, 21582, 43...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1207, 1253, 12, 474, 628, 16, 509, 1056, 13, 1216, 1185, 288, 7734, 309, 261, 2211, 18, 2088, 548, 480, 374, 13, 288, 5411, 509, 31185, 273, 8601, 1380, 5621, 5411, 21582, 43...
Account account = prov.get(AccountBy.NAME, username);
Account account = prov.get(AccountBy.name, username);
boolean doLOGIN(String tag, String username, String password) throws IOException { if (!checkState(tag, ImapSession.STATE_NOT_AUTHENTICATED)) return CONTINUE_PROCESSING; else if (!mStartedTLS && !allowCleartextLogin()) { sendNO(tag, "cleartext logins disabled"); return CONTINUE_PROCESSING; } // the Windows Mobile 5 hacks are enabled by appending "/wm" to the username EnabledHack hack = EnabledHack.NONE; if (username.endsWith("/wm")) { username = username.substring(0, username.length() - 3); hack = EnabledHack.WM5; } Mailbox mailbox = null; ImapSession session = null; try { Provisioning prov = Provisioning.getInstance(); Account account = prov.get(AccountBy.NAME, username); if (account == null) { sendNO(tag, "LOGIN failed"); return CONTINUE_PROCESSING; } prov.authAccount(account, password); if (!account.getBooleanAttr(Provisioning.A_zimbraImapEnabled, false)) { sendNO(tag, "account does not have IMAP access enabled"); return CONTINUE_PROCESSING; } else if (!Provisioning.onLocalServer(account)) { String correctHost = account.getAttr(Provisioning.A_zimbraMailHost); ZimbraLog.imap.info("LOGIN failed; should be on host " + correctHost); if (correctHost == null || correctHost.trim().equals("")) sendNO(tag, "LOGIN failed [wrong host]"); else sendNO(tag, "[REFERRAL imap://" + URLEncoder.encode(account.getName(), "utf-8") + '@' + correctHost + "/] LOGIN failed"); return CONTINUE_PROCESSING; } session = (ImapSession) SessionCache.getNewSession(account.getId(), SessionCache.SESSION_IMAP); if (session == null) { sendNO(tag, "LOGIN failed"); return CONTINUE_PROCESSING; } session.enableHack(hack); mailbox = session.getMailbox(); synchronized (mailbox) { session.setUsername(account.getName()); session.cacheFlags(mailbox); for (Tag ltag : mailbox.getTagList(session.getContext())) session.cacheTag(ltag); } // Session timeout will take care of closing an IMAP connection with // no activity. if (ZimbraLog.imap.isDebugEnabled()) ZimbraLog.imap.debug("disabling unauth connection alarm"); mConnection.cancelAlarm(); } catch (ServiceException e) { if (mSession != null) mSession.clearTagCache(); ZimbraLog.imap.warn("LOGIN failed", e); if (e.getCode() == AccountServiceException.CHANGE_PASSWORD) sendNO(tag, "[ALERT] password must be changed before IMAP login permitted"); else if (e.getCode() == AccountServiceException.MAINTENANCE_MODE) sendNO(tag, "[ALERT] account undergoing maintenance; please try again later"); else sendNO(tag, "LOGIN failed"); return canContinue(e); } // XXX: could use mSession.getMailbox() instead of saving a copy... mMailbox = mailbox; mSession = session; mSession.setHandler(this); sendCapability(); sendOK(tag, "LOGIN completed"); return CONTINUE_PROCESSING; }
6965 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6965/fd0f862d7df8ece6c184e0d4602c7c3b874e5623/OzImapConnectionHandler.java/clean/ZimbraServer/src/java/com/zimbra/cs/imap/OzImapConnectionHandler.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1250, 741, 19022, 12, 780, 1047, 16, 514, 2718, 16, 514, 2201, 13, 1216, 1860, 288, 3639, 309, 16051, 1893, 1119, 12, 2692, 16, 467, 1458, 2157, 18, 7998, 67, 4400, 67, 25114, 6344, 371...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1250, 741, 19022, 12, 780, 1047, 16, 514, 2718, 16, 514, 2201, 13, 1216, 1860, 288, 3639, 309, 16051, 1893, 1119, 12, 2692, 16, 467, 1458, 2157, 18, 7998, 67, 4400, 67, 25114, 6344, 371...
final ArrayList<FocusTrackback> stack = getStackForRoot(myRoot);
final List<FocusTrackback> stack = getStackForRoot(myRoot);
public FocusTrackback(Object requestor, Window parent) { myRequestor = requestor; myParentWindow = parent; if (ApplicationManager.getApplication().isUnitTestMode() || SystemInfo.isWindows) return; register(parent); final ArrayList<FocusTrackback> stack = getStackForRoot(myRoot); if (stack.indexOf(this) == 0) { final KeyboardFocusManager manager = KeyboardFocusManager.getCurrentKeyboardFocusManager(); myFocusOwner = manager.getPermanentFocusOwner(); if (myFocusOwner == null) { final Window window = manager.getActiveWindow(); if (window instanceof Provider) { myFocusOwner = ((Provider)window).getFocusTrackback().getFocusOwner(); } } } else { myFocusOwner = stack.get(0).getFocusOwner(); } }
17306 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17306/81fc6eec603453d2027dd6381b24767971ee6c45/FocusTrackback.java/buggy/source/com/intellij/ui/FocusTrackback.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 478, 4560, 4402, 823, 12, 921, 590, 280, 16, 6076, 982, 13, 288, 565, 3399, 691, 280, 273, 590, 280, 31, 565, 3399, 3054, 3829, 273, 982, 31, 565, 309, 261, 3208, 1318, 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, 282, 1071, 478, 4560, 4402, 823, 12, 921, 590, 280, 16, 6076, 982, 13, 288, 565, 3399, 691, 280, 273, 590, 280, 31, 565, 3399, 3054, 3829, 273, 982, 31, 565, 309, 261, 3208, 1318, 18, 588,...
CreateEMWindow();
CreateEMWindow(url, NewWindowListener.CHROME_ALL);
public EmbeddedMozillaImpl() { CreateEMWindow();}
54155 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54155/c51f266635955ea9a40fa057209a78cf7b0fb900/EmbeddedMozillaImpl.java/buggy/java/webclient/classes_spec/org/mozilla/webclient/test/EmbeddedMozillaImpl.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1071, 21829, 49, 11142, 10745, 2828, 1435, 288, 225, 1788, 3375, 3829, 5621, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1071, 21829, 49, 11142, 10745, 2828, 1435, 288, 225, 1788, 3375, 3829, 5621, 97, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
throws XOMException { ElementDef def = null; try { Object[] args = new Object[1]; args[0] = elt; def = (ElementDef)(rootConstructor.newInstance(args)); } catch (InstantiationException ex) { throw new XOMException("Unable to instantiate holder class " + rootDef.getName() + ": " + ex.getMessage()); } catch (IllegalAccessException ex) { throw new XOMException("Unable to instantiate holder class " + rootDef.getName() + ": " + ex.getMessage()); } catch (InvocationTargetException ex) { Throwable sub = ex.getTargetException(); if(sub instanceof RuntimeException) throw (RuntimeException)sub; else if(sub instanceof XOMException) throw (XOMException)sub; else throw new XOMException("Exeception occurred while " + "instantiating holder class " + rootDef.getName() + ": " + sub.toString()); } return def; }
throws XOMException { ElementDef def = null; try { Object[] args = new Object[1]; args[0] = elt; def = (ElementDef)(rootConstructor.newInstance(args)); } catch (InstantiationException ex) { throw new XOMException("Unable to instantiate holder class " + rootDef.getName() + ": " + ex.getMessage()); } catch (IllegalAccessException ex) { throw new XOMException("Unable to instantiate holder class " + rootDef.getName() + ": " + ex.getMessage()); } catch (InvocationTargetException ex) { Throwable sub = ex.getTargetException(); if(sub instanceof RuntimeException) throw (RuntimeException)sub; else if(sub instanceof XOMException) throw (XOMException)sub; else throw new XOMException("Exeception occurred while " + "instantiating holder class " + rootDef.getName() + ": " + sub.toString()); } return def; }
private ElementDef instantiate(DOMWrapper elt) throws XOMException { ElementDef def = null; try { Object[] args = new Object[1]; args[0] = elt; def = (ElementDef)(rootConstructor.newInstance(args)); } catch (InstantiationException ex) { throw new XOMException("Unable to instantiate holder class " + rootDef.getName() + ": " + ex.getMessage()); } catch (IllegalAccessException ex) { throw new XOMException("Unable to instantiate holder class " + rootDef.getName() + ": " + ex.getMessage()); } catch (InvocationTargetException ex) { Throwable sub = ex.getTargetException(); if(sub instanceof RuntimeException) throw (RuntimeException)sub; else if(sub instanceof XOMException) throw (XOMException)sub; else throw new XOMException("Exeception occurred while " + "instantiating holder class " + rootDef.getName() + ": " + sub.toString()); } return def; }
4891 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4891/b5b5168edc3af09cb74945a80b0c36e6630ed502/MetaTester.java/buggy/src/main/mondrian/xom/MetaTester.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 3010, 3262, 10275, 12, 8168, 3611, 11572, 13, 202, 202, 15069, 1139, 1872, 503, 202, 95, 202, 202, 1046, 3262, 1652, 273, 446, 31, 202, 202, 698, 288, 1082, 202, 921, 8526, 8...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 3010, 3262, 10275, 12, 8168, 3611, 11572, 13, 202, 202, 15069, 1139, 1872, 503, 202, 95, 202, 202, 1046, 3262, 1652, 273, 446, 31, 202, 202, 698, 288, 1082, 202, 921, 8526, 8...
private void setSource(VehicleCollection source) { VehicleIterator iter = source.iterator(); while(iter.hasNext()) addUnit(iter.next()); // source.addMspCollectionEventListener(this); }
49678 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49678/5fda2950c143ad8d1b0e934bde42458164834421/VehicleTableModel.java/buggy/org/mars_sim/msp/ui/standard/tool/monitor/VehicleTableModel.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 918, 18913, 12, 58, 73, 18870, 2532, 1084, 13, 288, 202, 202, 58, 73, 18870, 3198, 1400, 273, 1084, 18, 9838, 5621, 202, 202, 17523, 12, 2165, 18, 5332, 2134, 10756, 527, 280...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 18913, 12, 58, 73, 18870, 2532, 1084, 13, 288, 202, 202, 58, 73, 18870, 3198, 1400, 273, 1084, 18, 9838, 5621, 202, 202, 17523, 12, 2165, 18, 5332, 2134, 10756, 527, 280...
assertTrue("d) Failed on tertiary difference", c.compare(o, o2) == 0);
assertEquals("d) Failed on tertiary difference", 0, c.compare(o, o2));
public void test_compareLjava_lang_ObjectLjava_lang_Object() { Collator c = Collator.getInstance(Locale.FRENCH); Object o, o2; c.setStrength(Collator.IDENTICAL); o = "E"; o2 = "F"; assertTrue("a) Failed on primary difference", c.compare(o, o2) < 0); o = "e"; o2 = "\u00e9"; assertTrue("a) Failed on secondary difference", c.compare(o, o2) < 0); o = "e"; o2 = "E"; assertTrue("a) Failed on tertiary difference", c.compare(o, o2) < 0); o = "\u0001"; o2 = "\u0002"; assertTrue("a) Failed on identical", c.compare(o, o2) < 0); o = "e"; o2 = "e"; assertTrue("a) Failed on equivalence", c.compare(o, o2) == 0); assertTrue("a) Failed on primary expansion", c.compare("\u01db", "v") < 0); c.setStrength(Collator.TERTIARY); o = "E"; o2 = "F"; assertTrue("b) Failed on primary difference", c.compare(o, o2) < 0); o = "e"; o2 = "\u00e9"; assertTrue("b) Failed on secondary difference", c.compare(o, o2) < 0); o = "e"; o2 = "E"; assertTrue("b) Failed on tertiary difference", c.compare(o, o2) < 0); o = "\u0001"; o2 = "\u0002"; assertTrue("b) Failed on identical", c.compare(o, o2) == 0); o = "e"; o2 = "e"; assertTrue("b) Failed on equivalence", c.compare(o, o2) == 0); c.setStrength(Collator.SECONDARY); o = "E"; o2 = "F"; assertTrue("c) Failed on primary difference", c.compare(o, o2) < 0); o = "e"; o2 = "\u00e9"; assertTrue("c) Failed on secondary difference", c.compare(o, o2) < 0); o = "e"; o2 = "E"; assertTrue("c) Failed on tertiary difference", c.compare(o, o2) == 0); o = "\u0001"; o2 = "\u0002"; assertTrue("c) Failed on identical", c.compare(o, o2) == 0); o = "e"; o2 = "e"; assertTrue("c) Failed on equivalence", c.compare(o, o2) == 0); c.setStrength(Collator.PRIMARY); o = "E"; o2 = "F"; assertTrue("d) Failed on primary difference", c.compare(o, o2) < 0); o = "e"; o2 = "\u00e9"; assertTrue("d) Failed on secondary difference", c.compare(o, o2) == 0); o = "e"; o2 = "E"; assertTrue("d) Failed on tertiary difference", c.compare(o, o2) == 0); o = "\u0001"; o2 = "\u0002"; assertTrue("d) Failed on identical", c.compare(o, o2) == 0); o = "e"; o2 = "e"; assertTrue("d) Failed on equivalence", c.compare(o, o2) == 0); try { c.compare("e", new StringBuffer("Blah")); } catch (ClassCastException e) { // correct return; } fail("Failed to throw ClassCastException"); }
54769 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54769/aa7f5ac38085143bcf2542c95a675411434e9ae6/CollatorTest.java/clean/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/CollatorTest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1842, 67, 9877, 21159, 67, 4936, 67, 921, 21159, 67, 4936, 67, 921, 1435, 288, 202, 202, 13535, 639, 276, 273, 17596, 639, 18, 588, 1442, 12, 3916, 18, 42, 24296, 1792, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1842, 67, 9877, 21159, 67, 4936, 67, 921, 21159, 67, 4936, 67, 921, 1435, 288, 202, 202, 13535, 639, 276, 273, 17596, 639, 18, 588, 1442, 12, 3916, 18, 42, 24296, 1792, ...
while (! additionalPath.segments.isEmpty()) { additionalHead = (IntLine) additionalPath.segments.removeFirst();
while (i.hasNext()) { additionalHead = (IntLine) i.next();
public Point moveTailTo(TrainPath additionalPath) { IntLine additionalHead = (IntLine) additionalPath.segments.removeFirst(); IntLine tail = getLastSegment(); Point oldHeadPoint = new Point (additionalHead.x1, additionalHead.y1); if (tail.getDirection() == additionalHead.getDirection()) { tail.append(additionalHead); } else { segments.add(additionalHead); } actualLength.add(additionalHead.getLength()); /* add the rest of the path */ while (! additionalPath.segments.isEmpty()) { additionalHead = (IntLine) additionalPath.segments.removeFirst(); segments.add(additionalHead); actualLength.add(additionalHead.getLength()); } IntLine head = null; while (actualLength.getLength() > length) { head = (IntLine) segments.removeFirst(); actualLength.subtract(head.getLength()); }; if (actualLength.getLength() < length) { PathLength headLength = new PathLength(head.getLength()); headLength.setLength(length - actualLength.getLength()); head.setLengthFromTail(headLength); segments.addFirst(head); } return oldHeadPoint; }
9170 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9170/bfd6774f5be1d037bbcc2f2732e4b72ea8102291/TrainPath.java/buggy/railz/src/jfreerails/world/train/TrainPath.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 4686, 3635, 12363, 774, 12, 23419, 743, 3312, 743, 13, 288, 202, 1702, 1670, 3312, 1414, 273, 261, 1702, 1670, 13, 202, 565, 3312, 743, 18, 12838, 18, 4479, 3759, 5621, 202, 1702, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4686, 3635, 12363, 774, 12, 23419, 743, 3312, 743, 13, 288, 202, 1702, 1670, 3312, 1414, 273, 261, 1702, 1670, 13, 202, 565, 3312, 743, 18, 12838, 18, 4479, 3759, 5621, 202, 1702, ...
return new Object[]{"UTF-8", null};
return new Object[]{"UTF-8", null, Boolean.FALSE};
private Object[] getEncodingName(byte[] b4, int count) { if (count < 2) { return new Object[]{"UTF-8", null}; } // UTF-16, with BOM int b0 = b4[0] & 0xFF; int b1 = b4[1] & 0xFF; if (b0 == 0xFE && b1 == 0xFF) { // UTF-16, big-endian return new Object [] {"UTF-16BE", new Boolean(true)}; } if (b0 == 0xFF && b1 == 0xFE) { // UTF-16, little-endian return new Object [] {"UTF-16LE", new Boolean(false)}; } // default to UTF-8 if we don't have enough bytes to make a // good determination of the encoding if (count < 3) { return new Object [] {"UTF-8", null}; } // UTF-8 with a BOM int b2 = b4[2] & 0xFF; if (b0 == 0xEF && b1 == 0xBB && b2 == 0xBF) { return new Object [] {"UTF-8", null}; } // default to UTF-8 if we don't have enough bytes to make a // good determination of the encoding if (count < 4) { return new Object [] {"UTF-8", null}; } // other encodings int b3 = b4[3] & 0xFF; if (b0 == 0x00 && b1 == 0x00 && b2 == 0x00 && b3 == 0x3C) { // UCS-4, big endian (1234) return new Object [] {"ISO-10646-UCS-4", new Boolean(true)}; } if (b0 == 0x3C && b1 == 0x00 && b2 == 0x00 && b3 == 0x00) { // UCS-4, little endian (4321) return new Object [] {"ISO-10646-UCS-4", new Boolean(false)}; } if (b0 == 0x00 && b1 == 0x00 && b2 == 0x3C && b3 == 0x00) { // UCS-4, unusual octet order (2143) // REVISIT: What should this be? return new Object [] {"ISO-10646-UCS-4", null}; } if (b0 == 0x00 && b1 == 0x3C && b2 == 0x00 && b3 == 0x00) { // UCS-4, unusual octect order (3412) // REVISIT: What should this be? return new Object [] {"ISO-10646-UCS-4", null}; } if (b0 == 0x00 && b1 == 0x3C && b2 == 0x00 && b3 == 0x3F) { // UTF-16, big-endian, no BOM // (or could turn out to be UCS-2... // REVISIT: What should this be? return new Object [] {"UTF-16BE", new Boolean(true)}; } if (b0 == 0x3C && b1 == 0x00 && b2 == 0x3F && b3 == 0x00) { // UTF-16, little-endian, no BOM // (or could turn out to be UCS-2... return new Object [] {"UTF-16LE", new Boolean(false)}; } if (b0 == 0x4C && b1 == 0x6F && b2 == 0xA7 && b3 == 0x94) { // EBCDIC // a la xerces1, return CP037 instead of EBCDIC here return new Object [] {"CP037", null}; } // default encoding return new Object [] {"UTF-8", null}; }
26330 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/26330/7e55d59e7a32637ca63b2cec65835a56dd760a98/XMLEncodingDetector.java/buggy/java/org/apache/jasper/xmlparser/XMLEncodingDetector.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 1033, 8526, 29505, 461, 12, 7229, 8526, 324, 24, 16, 509, 1056, 13, 288, 3639, 309, 261, 1883, 411, 576, 13, 288, 5411, 327, 394, 1033, 63, 7073, 6, 5159, 17, 28, 3113, 446, 16,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 1033, 8526, 29505, 461, 12, 7229, 8526, 324, 24, 16, 509, 1056, 13, 288, 3639, 309, 261, 1883, 411, 576, 13, 288, 5411, 327, 394, 1033, 63, 7073, 6, 5159, 17, 28, 3113, 446, 16,...
else
else
public final SelectionKey register (Selector selin, int ops, Object att) throws ClosedChannelException { if (!isOpen ()) throw new ClosedChannelException(); SelectionKey k = null; AbstractSelector selector = (AbstractSelector) selin; synchronized (LOCK) { k = locate (selector); if (k != null) { k.attach (att); } else { k = selector.register (this, ops, att); if (k != null) add (k); } } return k; }
27835 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/27835/f851ffbfdbf05aefe9acc61f2645a3318e3c201c/AbstractSelectableChannel.java/clean/libjava/java/nio/channels/spi/AbstractSelectableChannel.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 727, 12977, 653, 1744, 261, 4320, 357, 267, 16, 509, 6727, 16, 1033, 2403, 13, 565, 1216, 25582, 2909, 503, 225, 288, 565, 309, 16051, 291, 3678, 1832, 13, 1377, 604, 394, 25582, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 727, 12977, 653, 1744, 261, 4320, 357, 267, 16, 509, 6727, 16, 1033, 2403, 13, 565, 1216, 25582, 2909, 503, 225, 288, 565, 309, 16051, 291, 3678, 1832, 13, 1377, 604, 394, 25582, ...
int bufferSize) throws IOException { super(new Buffer(new PositionCache(new Summer(fs, file, overwrite, conf)), bufferSize));
int bufferSize, short replication ) throws IOException { super(new Buffer( new PositionCache( new Summer(fs, file, overwrite, replication, conf)), bufferSize));
public FSDataOutputStream(FileSystem fs, File file, boolean overwrite, Configuration conf, int bufferSize) throws IOException { super(new Buffer(new PositionCache(new Summer(fs, file, overwrite, conf)), bufferSize)); }
49935 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49935/ba0ca973d8fbf49c1b7c2d29e7763226576364e8/FSDataOutputStream.java/clean/src/java/org/apache/hadoop/fs/FSDataOutputStream.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 9247, 751, 4632, 12, 11785, 2662, 16, 1387, 585, 16, 18701, 1250, 6156, 16, 4659, 2195, 16, 18701, 509, 16939, 13, 565, 1216, 1860, 288, 565, 2240, 12, 2704, 3525, 12, 2704, 11010, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 9247, 751, 4632, 12, 11785, 2662, 16, 1387, 585, 16, 18701, 1250, 6156, 16, 4659, 2195, 16, 18701, 509, 16939, 13, 565, 1216, 1860, 288, 565, 2240, 12, 2704, 3525, 12, 2704, 11010, ...
if (this.rights.getEditGroup() != null) {
if (this.plantloreUser.getRight().getEditAll() == 1) { equal = true; } if (this.rights.getEditGroup() != null) {
private void checkRights(Object data, int type) throws DBLayerException { DBLayerException ex; Session sess; // Check rights for table TAUTHORS if (data instanceof Author) { if ((type == DELETE) || (type == UPDATE)) { // Only data of the user and those listed in CEDITGROUP sess = this.sessionFactory.openSession(); ScrollableResults sc = sess.createCriteria(Author.class) .add(Restrictions.eq(Author.ID, ((Author)data).getId())) .scroll(); // If we haven't found the author in the database, raise exception if (!sc.next()) { logger.error("To-be-updated/deleted author not found in the database. Author ID:"+((Author)data).getId()); ex = new DBLayerException("To-be-updated/deleted author not found in the database. Author ID:"+((Author)data).getId()); ex.setError(ex.ERROR_OTHER, null); sess.close(); throw ex; } Object[] res = sc.get(); Author aut = (Author)res[0]; boolean equal = false; // Close the session sess.close(); // Check for administrator rights if (this.plantloreUser.getRight().getAdministrator() == 1) { equal = true; } // Check for direct ownership first. We have to compare IDs since equals doesn't work // for User object if (aut.getCreatedWho().getId().equals(this.plantloreUser.getId())) { equal = true; } // Then check for indirect (group) ownership if (this.rights.getEditGroup() != null) { String[] group = this.rights.getEditGroup().split(","); String strId = aut.getCreatedWho().getId().toString(); for (int i=0;i<group.length;i++) { if (strId.equals(group[i])) { equal = true; break; } } } if (equal == false) { logger.warn("User doesn't have sufficient rights for this operation. Entity: "+PlantloreConstants.ENTITY_AUTHOR); ex = new DBLayerException("User doesn't have sufficient rights for this operation. Entity: "+PlantloreConstants.ENTITY_AUTHOR); ex.setError(ex.ERROR_RIGHTS, PlantloreConstants.ENTITY_AUTHOR); throw ex; } } if (type == INSERT) { // Insert only if CADD = 1 if (this.rights.getAdd() == 0) { logger.warn("User doesn't have sufficient rights for this operation. Entity: "+PlantloreConstants.ENTITY_AUTHOR); ex = new DBLayerException("User doesn't have sufficient rights for this operation. Entity: "+PlantloreConstants.ENTITY_AUTHOR); ex.setError(ex.ERROR_RIGHTS, PlantloreConstants.ENTITY_AUTHOR); throw ex; } } } // Check rights for table TUSER if (data instanceof User) { // Only admin can insert/update/delete from this table if (this.rights.getAdministrator() != 1) { logger.warn("User doesn't have sufficient rights for this operation. Entity: "+PlantloreConstants.ENTITY_USER); ex = new DBLayerException("User doesn't have sufficient rights for this operation. Entity: "+PlantloreConstants.ENTITY_USER); ex.setError(ex.ERROR_RIGHTS, PlantloreConstants.ENTITY_USER); throw ex; } // User can edit his own data except for login name } // Check rights for table TRIGHT, TPHYTOCHORIA, TVILLAGES, TTERRITORIES, TPLANTS, TMETADATA if ((data instanceof Right) || (data instanceof Phytochorion) || (data instanceof Village) || (data instanceof Territory) || (data instanceof Plant) || (data instanceof Metadata)) { String entity = ""; if (data instanceof Right) { entity = PlantloreConstants.ENTITY_RIGHT; } if (data instanceof Phytochorion) { entity = PlantloreConstants.ENTITY_PHYTOCHORION; } if (data instanceof Village) { entity = PlantloreConstants.ENTITY_VILLAGE; } if (data instanceof Territory) { entity = PlantloreConstants.ENTITY_TERRITORY; } if (data instanceof Plant) { entity = PlantloreConstants.ENTITY_PLANT; } if (data instanceof Metadata) { entity = PlantloreConstants.ENTITY_METADATA; } // Only admin can insert/update/delete from this table if (this.rights.getAdministrator() != 1) { logger.warn("User doesn't have sufficient rights for this operation. Entity: "+entity); ex = new DBLayerException("User doesn't have sufficient rights for this operation. Entity: "+entity); ex.setError(ex.ERROR_RIGHTS, entity); throw ex; } } // Check rights for table THISTORYCOLUMN if (data instanceof HistoryColumn) { logger.warn("User doesn't have sufficient rights for this operation. Entity: "+PlantloreConstants.ENTITY_HISTORYCOLUMN); ex = new DBLayerException("User doesn't have sufficient rights for this operation. Entity: "+PlantloreConstants.ENTITY_HISTORYCOLUMN); ex.setError(ex.ERROR_RIGHTS, PlantloreConstants.ENTITY_HISTORYCOLUMN); throw ex; } // Check rights for table THISTORY and THISTORYCHANGE if ((data instanceof HistoryChange) || (data instanceof HistoryRecord)) { if ((type == INSERT) || (type == UPDATE)) { String entity = ""; if (data instanceof HistoryChange) { entity = PlantloreConstants.ENTITY_HISTORYCHANGE; } if (data instanceof HistoryRecord) { entity = PlantloreConstants.ENTITY_HISTORYRECORD; } logger.warn("User doesn't have sufficient rights for this operation. Entity: "+entity); ex = new DBLayerException("User doesn't have sufficient rights for this operation. Entity: "+entity); ex.setError(ex.ERROR_RIGHTS, entity); throw ex; } else if (type == DELETE) { // Tu to bude zlozitejsie... // TODO } } // Check rights for table TPUBLICATIONS if (data instanceof Publication) { if ((type == DELETE) || (type == UPDATE)) { // Only data of the user and those listed in CEDITGROUP sess = this.sessionFactory.openSession(); ScrollableResults sc = sess.createCriteria(Publication.class) .add(Restrictions.eq(Publication.ID, ((Publication)data).getId())) .scroll(); // If we haven't found the publication in the database, raise exception if (!sc.next()) { logger.error("To-be-updated/deleted publication not found in the database. Publication ID:"+((Publication)data).getId()); ex = new DBLayerException("To-be-updated/deleted publication not found in the database. Publication ID:"+((Publication)data).getId()); ex.setError(ex.ERROR_OTHER, null); sess.close(); throw ex; } Object[] res = sc.get(); Publication pub = (Publication)res[0]; boolean equal = false; sess.close(); // Check for direct ownership first if (pub.getCreatedWho().getId().equals(this.plantloreUser.getId())) { equal = true; } // Check for administrator rights if (this.plantloreUser.getRight().getAdministrator() == 1) { equal = true; } // Then check for indirect (group) ownership if (this.rights.getEditGroup() != null) { String[] group = this.rights.getEditGroup().split(","); String strId = pub.getCreatedWho().getId().toString(); for (int i=0;i<group.length;i++) { if (strId.equals(group[i])) { equal = true; break; } } } if (equal == false) { logger.warn("User doesn't have sufficient rights for this operation. Entity: "+PlantloreConstants.ENTITY_PUBLICATION); ex = new DBLayerException("User doesn't have sufficient rights for this operation. Entity: "+PlantloreConstants.ENTITY_PUBLICATION); ex.setError(ex.ERROR_RIGHTS, PlantloreConstants.ENTITY_PUBLICATION); throw ex; } } if (type == INSERT) { // Only if CADD = 1 if (this.rights.getAdd() == 0) { logger.warn("User doesn't have sufficient rights for this operation. Entity: "+PlantloreConstants.ENTITY_PUBLICATION); ex = new DBLayerException("User doesn't have sufficient rights for this operation. Entity: "+PlantloreConstants.ENTITY_PUBLICATION); ex.setError(ex.ERROR_RIGHTS, PlantloreConstants.ENTITY_PUBLICATION); throw ex; } } } // Check rights for table TOCCURRENCES if (data instanceof Occurrence) { if ((type == DELETE) || (type == UPDATE)) { // Only data of the user and those listed in CEDITGROUP sess = this.sessionFactory.openSession(); ScrollableResults sc = sess.createCriteria(Occurrence.class) .add(Restrictions.eq(Occurrence.ID, ((Occurrence)data).getId())) .scroll(); // If we haven't found the occurrence in the database, raise exception if (!sc.next()) { logger.error("To-be-updated/deleted occurrence not found in the database. Occurrence ID:"+((Publication)data).getId()); ex = new DBLayerException("To-be-updated/deleted occurrence not found in the database. Occurrence ID:"+((Publication)data).getId()); ex.setError(ex.ERROR_OTHER, null); sess.close(); throw ex; } Object[] res = sc.get(); Occurrence occ = (Occurrence)res[0]; boolean equal = false; sess.close(); // Check for direct ownership first if (occ.getCreatedWho().getId().equals(this.plantloreUser.getId())) { equal = true; } // Check for administrator rights if (this.plantloreUser.getRight().getAdministrator() == 1) { equal = true; } // Then check for indirect (group) ownership if (this.rights.getEditGroup() != null) { String[] group = this.rights.getEditGroup().split(","); String strId = occ.getCreatedWho().getId().toString(); for (int i=0;i<group.length;i++) { if (strId.equals(group[i])) { equal = true; break; } } } if (equal == false) { logger.warn("User doesn't have sufficient rights for this operation. Entity: "+PlantloreConstants.ENTITY_OCCURRENCE); ex = new DBLayerException("User doesn't have sufficient rights for this operation. Entity: "+PlantloreConstants.ENTITY_OCCURRENCE); ex.setError(ex.ERROR_RIGHTS, PlantloreConstants.ENTITY_OCCURRENCE); throw ex; } } if (type == INSERT) { // Insert only if CADD = 1 if (this.rights.getAdd() == 0) { logger.warn("User doesn't have sufficient rights for this operation. Entity: "+PlantloreConstants.ENTITY_OCCURRENCE); ex = new DBLayerException("User doesn't have sufficient rights for this operation. Entity: "+PlantloreConstants.ENTITY_OCCURRENCE); ex.setError(ex.ERROR_RIGHTS, PlantloreConstants.ENTITY_OCCURRENCE); throw ex; } } } // Check rights for table THABITATS if (data instanceof Habitat) { if ((type == DELETE) || (type == UPDATE)) { // Only data of the user and those listed in CEDITGROUP sess = this.sessionFactory.openSession(); ScrollableResults sc = sess.createCriteria(Habitat.class) .add(Restrictions.eq(Habitat.ID, ((Habitat)data).getId())) .scroll(); // If we haven't found the habitat in the database, raise exception if (!sc.next()) { logger.error("To-be-updated/deleted habitat not found in the database. Occurrence ID:"+((Habitat)data).getId()); ex = new DBLayerException("To-be-updated/deleted habitat not found in the database. Occurrence ID:"+((Habitat)data).getId()); ex.setError(ex.ERROR_OTHER, null); sess.close(); throw ex; } Object[] res = sc.get(); Habitat hab = (Habitat)res[0]; sess.close(); sess = this.sessionFactory.openSession(); boolean equal = false; // Check for direct ownership first. Find owner of associated occurrence sc = sess.createCriteria(Occurrence.class) .add(Restrictions.eq(Occurrence.HABITAT, hab)) .scroll(); // If no occurrence was found if (!sc.next()) { logger.error("No occurrence references selected habitat. Habitat ID:"+hab.getId()); ex = new DBLayerException("No occurrence references selected habitat. Habitat ID:"+hab.getId()); ex.setError(ex.ERROR_DB, null); sess.close(); throw ex; } res = sc.get(); Occurrence occ = (Occurrence)res[0]; sess.close(); if (occ.getCreatedWho().getId().equals(this.plantloreUser.getId())) { equal = true; } // Check for administrator rights // TODO: This should be done at the beginning to save one query if the user is admin if (this.plantloreUser.getRight().getAdministrator() == 1) { equal = true; } // Then check for indirect (group) ownership if (this.rights.getEditGroup() != null) { String[] group = this.rights.getEditGroup().split(","); String strId = occ.getCreatedWho().getId().toString(); for (int i=0;i<group.length;i++) { if (strId.equals(group[i])) { equal = true; break; } } } if (equal == false) { logger.warn("User doesn't have sufficient rights for this operation. Entity: "+PlantloreConstants.ENTITY_HABITAT); ex = new DBLayerException("User doesn't have sufficient rights for this operation. Entity: "+PlantloreConstants.ENTITY_HABITAT); ex.setError(ex.ERROR_RIGHTS, PlantloreConstants.ENTITY_HABITAT); throw ex; } } if (type == INSERT) { // Insert only if CADD = 1 if (this.rights.getAdd() == 0) { logger.warn("User doesn't have sufficient rights for this operation. Entity: "+PlantloreConstants.ENTITY_HABITAT); ex = new DBLayerException("User doesn't have sufficient rights for this operation. Entity: "+PlantloreConstants.ENTITY_HABITAT); ex.setError(ex.ERROR_RIGHTS, PlantloreConstants.ENTITY_HABITAT); throw ex; } } } // Check rights for table TAUTHORSOCCURRENCES if (data instanceof AuthorOccurrence) { if ((type == DELETE) || (type == UPDATE)) { // Only data of the user and those listed in CEDITGROUP sess = this.sessionFactory.openSession(); ScrollableResults sc = sess.createCriteria(AuthorOccurrence.class) .add(Restrictions.eq(AuthorOccurrence.ID, ((AuthorOccurrence)data).getId())) .scroll(); // If we haven't found the occurrence in the database, raise exception if (!sc.next()) { logger.error("To-be-updated/deleted authoroccurrence not found in the database. Occurrence ID:"+((AuthorOccurrence)data).getId()); ex = new DBLayerException("To-be-updated/deleted authoroccurrence not found in the database. Occurrence ID:"+((AuthorOccurrence)data).getId()); ex.setError(ex.ERROR_OTHER, null); sess.close(); throw ex; } Object[] res = sc.get(); AuthorOccurrence ao = (AuthorOccurrence)res[0]; boolean equal = false; sess.close(); // Check for direct ownership first if (ao.getOccurrence().getCreatedWho().getId().equals(this.plantloreUser.getId())) { equal = true; } // Check for administrator rights // TODO: This should be done at the beginning to save one query if (this.plantloreUser.getRight().getAdministrator() == 1) { equal = true; } // Then check for indirect (group) ownership if (this.rights.getEditGroup() != null) { String[] group = this.rights.getEditGroup().split(","); String strId = ao.getOccurrence().getCreatedWho().getId().toString(); for (int i=0;i<group.length;i++) { if (strId.equals(group[i])) { equal = true; break; } } } if (equal == false) { logger.warn("User doesn't have sufficient rights for this operation. Entity: "+PlantloreConstants.ENTITY_AUTHOROCCURRENCE); ex = new DBLayerException("User doesn't have sufficient rights for this operation. Entity: "+PlantloreConstants.ENTITY_AUTHOROCCURRENCE); ex.setError(ex.ERROR_RIGHTS, PlantloreConstants.ENTITY_AUTHOROCCURRENCE); throw ex; } } if (type == INSERT) { // Insert only if CADD = 1 if (this.rights.getAdd() == 0) { logger.warn("User doesn't have sufficient rights for this operation. Entity: "+PlantloreConstants.ENTITY_AUTHOROCCURRENCE); ex = new DBLayerException("User doesn't have sufficient rights for this operation. Entity: "+PlantloreConstants.ENTITY_AUTHOROCCURRENCE); ex.setError(ex.ERROR_RIGHTS, PlantloreConstants.ENTITY_AUTHOROCCURRENCE); throw ex; } } } }
57211 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57211/768f7952f9f656f5d41a6d51bcc974d36a0559b2/HibernateDBLayer.java/buggy/trunk/src/net/sf/plantlore/server/HibernateDBLayer.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 866, 18464, 12, 921, 501, 16, 509, 618, 13, 1216, 2383, 4576, 503, 288, 3639, 2383, 4576, 503, 431, 31, 3639, 3877, 8451, 31, 7734, 368, 2073, 14989, 364, 1014, 399, 7131, 14...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 866, 18464, 12, 921, 501, 16, 509, 618, 13, 1216, 2383, 4576, 503, 288, 3639, 2383, 4576, 503, 431, 31, 3639, 3877, 8451, 31, 7734, 368, 2073, 14989, 364, 1014, 399, 7131, 14...
i < parser.getNamespaceCount (parser.getDepth ())-1; i++) {
i <= parser.getNamespaceCount (parser.getDepth ())-1; i++) {
public void writeStartTag () throws XmlPullParserException, IOException { //check forcase when feature xml roundtrip is supported //if (parser.getFeature (FEATURE_XML_ROUNDTRIP)) { //TODO: how to do pass through string with actual start tag in getText() //return; //} if (!parser.getFeature (XmlPullParser.FEATURE_REPORT_NAMESPACE_ATTRIBUTES)) { for (int i = parser.getNamespaceCount (parser.getDepth ()-1); i < parser.getNamespaceCount (parser.getDepth ())-1; i++) { serializer.setPrefix (parser.getNamespacePrefix (i), parser.getNamespaceUri (i)); } } serializer.startTag(parser.getNamespace (), parser.getName ()); for (int i = 0; i < parser.getAttributeCount (); i++) { serializer.attribute (parser.getAttributeNamespace (i), parser.getAttributeName (i), parser.getAttributeValue (i)); } //serializer.closeStartTag(); }
3949 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3949/01ca7d4eb52ddd064614b58fc473f9ea1346001b/Roundtrip.java/buggy/src/java/samples/Roundtrip.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 24961, 1805, 1832, 1216, 5714, 9629, 25746, 16, 1860, 288, 3639, 368, 1893, 364, 3593, 1347, 2572, 2025, 3643, 25125, 353, 3260, 3639, 368, 430, 261, 4288, 18, 588, 4595, 261, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 24961, 1805, 1832, 1216, 5714, 9629, 25746, 16, 1860, 288, 3639, 368, 1893, 364, 3593, 1347, 2572, 2025, 3643, 25125, 353, 3260, 3639, 368, 430, 261, 4288, 18, 588, 4595, 261, ...
if (children.length == 0) {
if(children.length == 0){
private void replaceIteratorNext(PsiElement element, String contentVariableName, String iteratorName, PsiElement childToSkip, StringBuffer out) { if (isIteratorNext(element, iteratorName)) { out.append(contentVariableName); } else { final PsiElement[] children = element.getChildren(); if (children.length == 0) { out.append(element.getText()); } else { boolean skippingWhiteSpace = false; for (int i = 0; i < children.length; i++) { final PsiElement child = children[i]; if (child.equals(childToSkip)) { skippingWhiteSpace = true; } else if (child instanceof PsiWhiteSpace && skippingWhiteSpace) { //don't do anything } else { skippingWhiteSpace = false; replaceIteratorNext(child, contentVariableName, iteratorName, childToSkip, out); } } } } }
56627 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56627/dba8b183fc1b08e7ad664812bfc0c64d1e4abd3c/ForCanBeForeachInspection.java/clean/plugins/InspectionGadgets/src/com/siyeh/ig/verbose/ForCanBeForeachInspection.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 540, 3238, 918, 1453, 3198, 2134, 12, 52, 7722, 1046, 930, 16, 514, 913, 21519, 16, 514, 2775, 461, 16, 29159, 453, 7722, 1046, 1151, 774, 6368, 16, 6674, 596, 13, 288, 5411, 309, 261, 291, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 540, 3238, 918, 1453, 3198, 2134, 12, 52, 7722, 1046, 930, 16, 514, 913, 21519, 16, 514, 2775, 461, 16, 29159, 453, 7722, 1046, 1151, 774, 6368, 16, 6674, 596, 13, 288, 5411, 309, 261, 291, ...
public void setActionCommand(String s) { com = s; }
public void setActionCommand(String s) { if (actionCommand != s) { actionCommand = s; fireStateChanged(changeEvent); } }
public void setActionCommand(String s) { com = s; }
50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/2703ae3b51c371a2a79d28271cd57b4046c647d0/DefaultButtonModel.java/buggy/core/src/classpath/javax/javax/swing/DefaultButtonModel.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 22517, 2189, 12, 780, 272, 13, 288, 202, 202, 832, 273, 272, 31, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 22517, 2189, 12, 780, 272, 13, 288, 202, 202, 832, 273, 272, 31, 202, 97, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
closeULTag(buffer);
closeULTag(buffer);
private void getUnitsList(Unit parentUnit, StringBuilder buffer) { openLITag(buffer); if (parentUnit.hasAnySubUnits()) { putImage(parentUnit, buffer); } buffer.append("<a href=\"").append(getContextPath()).append( "/departmentAdmOffice/functionsManagement/chooseFunction.faces?personID=").append( personID).append("&unitID=").append(parentUnit.getIdInternal()).append("\">").append( parentUnit.getName()).append("</a>").append("</li>"); if (parentUnit.hasAnySubUnits()) { openULTag(parentUnit, buffer); } for (Unit subUnit : parentUnit.getSubUnits()) { if (subUnit.isActive(Calendar.getInstance().getTime())) { getUnitsList(subUnit, buffer); } } if (parentUnit.hasAnySubUnits()) { closeULTag(buffer); } }
2645 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2645/e17bdd6146311612f2d913a22731a9cc3ffc4548/FunctionsManagementBackingBean.java/clean/src/net/sourceforge/fenixedu/presentationTier/backBeans/departmentAdmOffice/FunctionsManagementBackingBean.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 336, 7537, 682, 12, 2802, 982, 2802, 16, 3225, 1613, 13, 288, 3639, 1696, 15716, 346, 12, 4106, 1769, 3639, 309, 261, 2938, 2802, 18, 5332, 2961, 1676, 7537, 10756, 288, 5411, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 336, 7537, 682, 12, 2802, 982, 2802, 16, 3225, 1613, 13, 288, 3639, 1696, 15716, 346, 12, 4106, 1769, 3639, 309, 261, 2938, 2802, 18, 5332, 2961, 1676, 7537, 10756, 288, 5411, ...
public org.quickfix.field.CouponRate getCouponRate() throws FieldNotFound { org.quickfix.field.CouponRate value = new org.quickfix.field.CouponRate();
public quickfix.field.CouponRate getCouponRate() throws FieldNotFound { quickfix.field.CouponRate value = new quickfix.field.CouponRate();
public org.quickfix.field.CouponRate getCouponRate() throws FieldNotFound { org.quickfix.field.CouponRate value = new org.quickfix.field.CouponRate(); getField(value); return value; }
8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/SecurityStatus.java/buggy/src/java/src/quickfix/fix43/SecurityStatus.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 2358, 18, 19525, 904, 18, 1518, 18, 22744, 4727, 19850, 9899, 4727, 1435, 1216, 2286, 2768, 225, 288, 2358, 18, 19525, 904, 18, 1518, 18, 22744, 4727, 460, 273, 394, 2358, 18, 19525...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 2358, 18, 19525, 904, 18, 1518, 18, 22744, 4727, 19850, 9899, 4727, 1435, 1216, 2286, 2768, 225, 288, 2358, 18, 19525, 904, 18, 1518, 18, 22744, 4727, 460, 273, 394, 2358, 18, 19525...
returnSet.addAll(getUserRecipients(allCourseMembers));
returnSet.add(matchingItem.getUser());
private Set getRecipients() { Set allCourseMembers = getAllCourseMembers(); List selectedList = getSelectedComposeToList(); Set returnSet = new HashSet(); for (Iterator i = selectedList.iterator(); i.hasNext();){ String selectedItem = (String) i.next(); if (selectedItem.equals(RECIPIANTS_ENTIRE_CLASS)){ returnSet.addAll(getUserRecipients(allCourseMembers)); break; } else{ /** search totalComposeToList for matching name */ RecipientItem matchingItem = null; for (Iterator j = totalComposeToListRecipients.iterator(); j.hasNext();){ RecipientItem item = (RecipientItem) j.next(); if (item.getName().equalsIgnoreCase(selectedItem)){ matchingItem = item; break; } } if (matchingItem != null){ if (matchingItem.getUser() == null){ /** role **/ returnSet.addAll(getUserRecipientsForRole(matchingItem.getRole().getId(), allCourseMembers)); } else{ /** user **/ returnSet.addAll(getUserRecipients(allCourseMembers)); } } } } return returnSet; }
52248 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52248/d0393d6eee68ff0564560b86de020e85fb85a327/PrivateMessagesTool.java/clean/messageforums-app/src/java/org/sakaiproject/tool/messageforums/PrivateMessagesTool.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 3238, 1000, 5561, 15079, 1435, 225, 288, 3639, 1000, 777, 39, 3117, 6918, 273, 5514, 39, 3117, 6918, 5621, 565, 987, 3170, 682, 273, 16625, 22375, 25772, 5621, 3639, 1000, 327, 694, 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, 282, 3238, 1000, 5561, 15079, 1435, 225, 288, 3639, 1000, 777, 39, 3117, 6918, 273, 5514, 39, 3117, 6918, 5621, 565, 987, 3170, 682, 273, 16625, 22375, 25772, 5621, 3639, 1000, 327, 694, 273, ...
switch (args.length) { case 0 : return this; case 1 : return (RubyException) m_new(getRuby(), this, args); default : throw new RubyArgumentException(getRuby(), "Wrong argument count"); }
switch (args.length) { case 0 : return this; case 1 : return (RubyException) m_new(getRuby(), this, args); default : throw new RubyArgumentException(getRuby(), "Wrong argument count"); }
public RubyException m_exception(RubyObject[] args) { switch (args.length) { case 0 : return this; case 1 : return (RubyException) m_new(getRuby(), this, args); default : throw new RubyArgumentException(getRuby(), "Wrong argument count"); } }
47273 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47273/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyException.java/buggy/org/jruby/RubyException.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 19817, 503, 312, 67, 4064, 12, 54, 10340, 921, 8526, 833, 13, 288, 202, 202, 9610, 261, 1968, 18, 2469, 13, 288, 1082, 202, 3593, 374, 294, 9506, 202, 2463, 333, 31, 1082, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 19817, 503, 312, 67, 4064, 12, 54, 10340, 921, 8526, 833, 13, 288, 202, 202, 9610, 261, 1968, 18, 2469, 13, 288, 1082, 202, 3593, 374, 294, 9506, 202, 2463, 333, 31, 1082, 2...
return org.apache.derby.client.am.DateTime.timestampBytesToDate(dataBuffer_, columnDataPosition_[column - 1], recyclableDate_);
try { return org.apache.derby.client.am.DateTime.timestampBytesToDate(dataBuffer_, columnDataPosition_[column - 1], recyclableDate_, charsetName_[column -1]); } catch (UnsupportedEncodingException e) { throw new SqlException(agent_.logWriter_, e, "Encoding is unsupported for conversion to DATE"); }
private final java.sql.Date getDateFromTIMESTAMP(int column) throws SqlException { return org.apache.derby.client.am.DateTime.timestampBytesToDate(dataBuffer_, columnDataPosition_[column - 1], recyclableDate_); }
56322 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56322/491c5b6e92688d7480de337b81cbc1d45e56451e/Cursor.java/clean/java/client/org/apache/derby/client/am/Cursor.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 727, 2252, 18, 4669, 18, 1626, 10713, 1265, 17201, 12, 474, 1057, 13, 1216, 8855, 503, 288, 3639, 327, 2358, 18, 19211, 18, 765, 1637, 18, 2625, 18, 301, 18, 5096, 18, 5508, 2160,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 727, 2252, 18, 4669, 18, 1626, 10713, 1265, 17201, 12, 474, 1057, 13, 1216, 8855, 503, 288, 3639, 327, 2358, 18, 19211, 18, 765, 1637, 18, 2625, 18, 301, 18, 5096, 18, 5508, 2160,...
metaClass.setProperty(target,DomainClassMethods.ERRORS_PROPERTY,errors.getAllErrors());
metaClass.setProperty(target,DomainClassMethods.ERRORS_PROPERTY,errors);
protected Object doInvokeInternal(Object target, Object[] arguments) { Errors errors = new BindException(target, target.getClass().getName()); GrailsDomainClass domainClass = application.getGrailsDomainClass( target.getClass().getName() ); Validator validator = null; if(domainClass != null) validator = application.getGrailsDomainClass( target.getClass().getName() ).getValidator(); Boolean valid = new Boolean(true); if(validator != null) { validator.validate(target,errors); if(errors.hasErrors()) { valid = new Boolean(!errors.hasErrors()); DelegatingMetaClass metaClass = (DelegatingMetaClass)InvokerHelper.getInstance().getMetaRegistry().getMetaClass(target.getClass()); metaClass.setProperty(target,DomainClassMethods.HAS_ERRORS_PROPERTY,valid); metaClass.setProperty(target,DomainClassMethods.ERRORS_PROPERTY,errors.getAllErrors()); } } return valid; }
26970 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/26970/9319b2487e82433202c4b7e86c557193a7ad2ae3/ValidatePersistentMethod.java/buggy/src/persistence/org/codehaus/groovy/grails/orm/hibernate/metaclass/ValidatePersistentMethod.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1117, 1033, 741, 10969, 3061, 12, 921, 1018, 16, 1033, 8526, 1775, 13, 288, 202, 202, 4229, 1334, 273, 394, 6936, 503, 12, 3299, 16, 1018, 18, 588, 797, 7675, 17994, 10663, 202, 20...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1117, 1033, 741, 10969, 3061, 12, 921, 1018, 16, 1033, 8526, 1775, 13, 288, 202, 202, 4229, 1334, 273, 394, 6936, 503, 12, 3299, 16, 1018, 18, 588, 797, 7675, 17994, 10663, 202, 20...
resolver );
resolver );
public RuleBaseImpl() { ObjectTypeResolver resolver = new ClassObjectTypeResolver(); this.rete = new Rete( resolver ); this.reteBuilder = new ReteBuilder( this, resolver ); this.factHandleFactory = new DefaultFactHandleFactory(); this.pkgs = new HashSet(); this.globalDeclarations = new HashMap(); this.workingMemories = new WeakHashMap(); }
5490 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5490/a87b2c8a9b5103c50661f46e554225ed51da192b/RuleBaseImpl.java/buggy/drools-core/src/main/java/org/drools/reteoo/RuleBaseImpl.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 6781, 2171, 2828, 1435, 288, 7734, 21338, 4301, 5039, 273, 394, 1659, 17610, 4301, 5621, 3639, 333, 18, 266, 736, 273, 394, 534, 12865, 12, 5039, 11272, 3639, 333, 18, 266, 736, 126...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6781, 2171, 2828, 1435, 288, 7734, 21338, 4301, 5039, 273, 394, 1659, 17610, 4301, 5621, 3639, 333, 18, 266, 736, 273, 394, 534, 12865, 12, 5039, 11272, 3639, 333, 18, 266, 736, 126...
if (!delegate.isFullyStarted())
if (!isFullyStarted())
private void updateFromStarted() { if (!delegate.isFullyStarted()) delegate.setServerStopped(); }
10123 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10123/c285a1d49e5bd5f7fb10e1609df1d46d094856f2/UpdateServerStateTask.java/clean/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/UpdateServerStateTask.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 918, 1089, 1265, 9217, 1435, 288, 202, 202, 430, 16051, 22216, 18, 291, 16999, 9217, 10756, 1082, 202, 22216, 18, 542, 2081, 15294, 5621, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 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, 1152, 918, 1089, 1265, 9217, 1435, 288, 202, 202, 430, 16051, 22216, 18, 291, 16999, 9217, 10756, 1082, 202, 22216, 18, 542, 2081, 15294, 5621, 202, 97, 2, -100, -100, -100, -100, -1...
HashMap attributes = dm.authenticate(goodCredentials, new String[] {});
HashMap attributes = dm.authenticate(null, goodCredentials, new String[] {});
public void testGoodAuthenticationWithoutAttributes() { // Set configuration properties. Properties config = new Properties(); config.setProperty(DirectoryManagerConfiguration.CONFIGURATION_PROPERTY, goodConfiguration); try { // Test successful authentication with empty array request. dm.setConfig(config); HashMap attributes = dm.authenticate(goodCredentials, new String[] {}); // Verify attributes. Assert.assertEquals("Attributes were returned", attributes.size(), 0); // Test successful authentication with null request. attributes = dm.authenticate(goodCredentials, null); // Verify attributes. Assert.assertEquals("Attributes were returned", attributes.size(), 0); } catch (AuthenticationFailedException e) { e.printStackTrace(); Assert.fail("Unexpected AuthenticationFailedException"); } catch (BackendException e) { e.printStackTrace(); Assert.fail("Unexpected BackendException"); } }
1637 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1637/e87879c325461797bb66534e0461f7ade58100a6/DummyDirectoryManagerTest.java/buggy/moria2/modules/moria-dm/src/test/java/no/feide/moria/directory/DummyDirectoryManagerTest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1842, 18195, 6492, 8073, 2498, 1435, 288, 3639, 368, 1000, 1664, 1790, 18, 3639, 6183, 642, 273, 394, 6183, 5621, 3639, 642, 18, 542, 1396, 12, 2853, 1318, 1750, 18, 21200, 67,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1842, 18195, 6492, 8073, 2498, 1435, 288, 3639, 368, 1000, 1664, 1790, 18, 3639, 6183, 642, 273, 394, 6183, 5621, 3639, 642, 18, 542, 1396, 12, 2853, 1318, 1750, 18, 21200, 67,...
public void actionPerformed( ActionEvent evt ) { getFrame( DOMInspector.this ).hide(); }
public void actionPerformed(ActionEvent evt) { getFrame(DOMInspector.this).hide(); }
public void actionPerformed( ActionEvent evt ) { getFrame( DOMInspector.this ).hide(); }
53937 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/53937/93d814d7886e593bc9bd7f476b2a18571a009aa6/DOMInspector.java/buggy/src/java/org/xhtmlrenderer/swing/DOMInspector.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 7682, 1071, 918, 26100, 12, 19641, 6324, 262, 288, 18701, 25396, 12, 4703, 19443, 18, 2211, 262, 18, 11248, 5621, 13491, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 7682, 1071, 918, 26100, 12, 19641, 6324, 262, 288, 18701, 25396, 12, 4703, 19443, 18, 2211, 262, 18, 11248, 5621, 13491, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
public AbstractContent( IContent content )
public AbstractContent( )
public AbstractContent( IContent content ) { this( content.getReport( ) ); this.name = content.getName( ); this.bounds = content.getBounds( ); this.x = content.getX( ); this.y = content.getY( ); this.width = content.getWidth( ); this.height = content.getHeight( ); this.hyperlink = content.getHyperlinkAction( ); this.bookmark = content.getBookmark( ); this.helpText = content.getHelpText( ); this.inlineStyle = content.getInlineStyle( ); this.generateBy = content.getGenerateBy( ); this.styleClass = content.getStyleClass( ); this.instanceId = content.getInstanceID( ); this.toc = content.getTOC( ); }
12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/d6a1d0c77febe86e6fbda983160d688704b57e87/AbstractContent.java/buggy/engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/content/impl/AbstractContent.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 4115, 1350, 12, 467, 1350, 913, 262, 202, 95, 202, 202, 2211, 12, 913, 18, 588, 4820, 12, 262, 11272, 202, 202, 2211, 18, 529, 273, 913, 18, 17994, 12, 11272, 202, 202, 2211...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4115, 1350, 12, 467, 1350, 913, 262, 202, 95, 202, 202, 2211, 12, 913, 18, 588, 4820, 12, 262, 11272, 202, 202, 2211, 18, 529, 273, 913, 18, 17994, 12, 11272, 202, 202, 2211...
String [] fieldRefResultModel = {"EntryResult: word=fieldRef/y/C/B/A, refs={ 1 }"};
String [] fieldRefResultModel = {"EntryResult: word=fieldRef/y/C/B/A, refs={ 1 }, offsets={ [ 2161] }"};
public void testRefs() throws Exception{ //Add a new file to the project importFile("reftest.cpp","resources/indexer/reftest.cpp"); //$NON-NLS-1$ //$NON-NLS-2$ //Make sure project got added to index IPath testProjectPath = testProject.getFullPath(); IIndex ind = sourceIndexer.getIndex(testProjectPath,true,true); assertTrue("Index exists for project",ind != null); //$NON-NLS-1$ String [] typeRefEntryResultModel ={"EntryResult: word=typeRef/C/C/B/A, refs={ 1 }", "EntryResult: word=typeRef/E/e1/B/A, refs={ 1 }", //$NON-NLS-1$ //$NON-NLS-2$ "EntryResult: word=typeRef/G/ForwardA/A, refs={ 1 }", "EntryResult: word=typeRef/V/x/B/A, refs={ 1 }"}; //$NON-NLS-1$ //$NON-NLS-2$ IEntryResult[] typerefresults = ind.queryEntries(IIndexConstants.TYPE_REF); assertTrue("Entry exists",typerefresults != null); //$NON-NLS-1$ if (typerefresults.length != typeRefEntryResultModel.length) fail("Entry Result length different from model for typeRef"); //$NON-NLS-1$ for (int i=0;i<typerefresults.length; i++) { assertEquals(typeRefEntryResultModel[i],typerefresults[i].toString()); } String [] funRefEntryResultModel ={"EntryResult: word=functionRef/something/A, refs={ 1 }"};//$NON-NLS-1$ IEntryResult[] funRefresults = ind.queryEntries(IIndexConstants.FUNCTION_REF); assertTrue("Entry exists",funRefresults != null); //$NON-NLS-1$ if (funRefresults.length != funRefEntryResultModel.length) fail("Entry Result length different from model for funcRef"); //$NON-NLS-1$ for (int i=0;i<funRefresults.length; i++) { assertEquals(funRefEntryResultModel[i],funRefresults[i].toString()); } String [] namespaceRefResultModel = {"EntryResult: word=namespaceRef/A, refs={ 1 }", "EntryResult: word=namespaceRef/B/A, refs={ 1 }"}; //$NON-NLS-1$ //$NON-NLS-2$ IEntryResult[] namespacerefresults = ind.queryEntries(IIndexConstants.NAMESPACE_REF); assertTrue("Entry exists",namespacerefresults!=null); //$NON-NLS-1$ if (namespacerefresults.length != namespaceRefResultModel.length) fail("Entry Result length different from model for namespaceRef"); //$NON-NLS-1$ for (int i=0;i<namespacerefresults.length; i++) { assertEquals(namespaceRefResultModel[i],namespacerefresults[i].toString()); } String [] fieldRefResultModel = {"EntryResult: word=fieldRef/y/C/B/A, refs={ 1 }"}; //$NON-NLS-1$ IEntryResult[] fieldrefresults = ind.queryEntries(IIndexConstants.FIELD_REF); assertTrue("Entry exists",fieldrefresults!=null); //$NON-NLS-1$ if (fieldrefresults.length != fieldRefResultModel.length) fail("Entry Result length different from model for fieldRef"); //$NON-NLS-1$ for (int i=0;i<fieldrefresults.length; i++) { assertEquals(fieldRefResultModel[i],fieldrefresults[i].toString()); } String [] methodRefResultModel = {"EntryResult: word=methodRef/bar/C/B/A, refs={ 1 }"}; //$NON-NLS-1$ IEntryResult[] methodrefresults = ind.queryEntries(IIndexConstants.METHOD_REF); assertTrue("Entry exists", methodrefresults != null); //$NON-NLS-1$ if (methodrefresults.length != methodRefResultModel.length) fail("Entry Result length different from model for methodRef");//$NON-NLS-1$ for (int i=0;i<methodrefresults.length; i++) { assertEquals(methodRefResultModel[i],methodrefresults[i].toString()); } }
6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/985b120edf25579fa8305435a8ee93f694d389ab/SourceIndexerTests.java/buggy/core/org.eclipse.cdt.core.tests/indexer/org/eclipse/cdt/core/indexer/tests/SourceIndexerTests.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 1842, 9837, 1435, 1216, 1185, 95, 1082, 225, 368, 986, 279, 394, 585, 358, 326, 1984, 1082, 225, 1930, 812, 2932, 266, 1222, 395, 18, 4057, 84, 15937, 4683, 19, 24541, 19, 26...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 1842, 9837, 1435, 1216, 1185, 95, 1082, 225, 368, 986, 279, 394, 585, 358, 326, 1984, 1082, 225, 1930, 812, 2932, 266, 1222, 395, 18, 4057, 84, 15937, 4683, 19, 24541, 19, 26...
suite.addTestSuite(test.ClassPatternTest.class); suite.addTestSuite(test.MethodPatternTest.class); suite.addTestSuite(test.ConstructorPatternTest.class); suite.addTestSuite(test.FieldPatternTest.class); suite.addTestSuite(test.ExceptionTest.class); suite.addTestSuite(test.MethodComparatorTest.class); suite.addTestSuite(test.StringsTest.class); suite.addTestSuite(test.ExpressionTest.class); suite.addTestSuite(test.ExpressionGrammarTest.class);
public static Test suite() { TestSuite suite = new TestSuite("All tests"); // definition tests suite.addTestSuite(test.ClassPatternTest.class); suite.addTestSuite(test.MethodPatternTest.class); suite.addTestSuite(test.ConstructorPatternTest.class); suite.addTestSuite(test.FieldPatternTest.class); suite.addTestSuite(test.ExceptionTest.class); suite.addTestSuite(test.MethodComparatorTest.class); suite.addTestSuite(test.StringsTest.class); suite.addTestSuite(test.ExpressionTest.class); suite.addTestSuite(test.ExpressionGrammarTest.class); // transformer and engine tests suite.addTestSuite(test.MemberMethodAdviceTest.class); suite.addTestSuite(test.StaticMethodAdviceTest.class); suite.addTestSuite(test.FieldAdviceTest.class); suite.addTestSuite(test.CallerSideAdviceTest.class); suite.addTestSuite(test.CFlowTest.class); suite.addTestSuite(test.IntroductionTest.class); suite.addTestSuite(test.constructor.ConstructorAdviceTest.class); suite.addTestSuite(test.handler.HandlerTest.class); suite.addTestSuite(test.orthogonal.OrthogonalTest.class); // bug tests suite.addTestSuite(test.abstractclass.AbstractClassTest.class); suite.addTestSuite(test.hierarchicalpattern.HierachicalPatternTest.class); suite.addTestSuite(test.pointcutexpression.PointcutExpressionTest.class); suite.addTestSuite(test.reflection.ReflectionTest.class); suite.addTestSuite(test.staticfield.StaticFieldAdviceTest.class); suite.addTestSuite(test.superclassconstructor.SuperClassConstructorTest.class); suite.addTestSuite(test.mixindeployment.IntroductionDeploymentTest.class); suite.addTestSuite(test.bindingsyntax.AdviceBindingTest.class); // performance tests , suite.addTestSuite(test.performance.PerformanceTest.class); // TODO: deprecated until a better hot deployment model has been implemented// suite.addTestSuite(test.DynamicDeploymentTest.class); return suite; }
7954 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7954/c348135b38cae1482bbb489d82e473326972ab61/AllTests.java/clean/aspectwerkz2/src/test/test/AllTests.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 760, 7766, 11371, 1435, 288, 3639, 7766, 13587, 11371, 273, 394, 7766, 13587, 2932, 1595, 7434, 8863, 3639, 368, 2379, 7434, 3639, 11371, 18, 1289, 4709, 13587, 12, 3813, 18, 797, 323...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7766, 11371, 1435, 288, 3639, 7766, 13587, 11371, 273, 394, 7766, 13587, 2932, 1595, 7434, 8863, 3639, 368, 2379, 7434, 3639, 11371, 18, 1289, 4709, 13587, 12, 3813, 18, 797, 323...
MarkerList getCurrentMarkers(){ return lastMarkers; }
58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/9c327194f7a9a7699e6d64522542c2dd844398bd/MarkerAdapter.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerAdapter.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 7078, 682, 5175, 21644, 1435, 95, 202, 202, 2463, 1142, 21644, 31, 1082, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 7078, 682, 5175, 21644, 1435, 95, 202, 202, 2463, 1142, 21644, 31, 1082, 202, 97, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
private static void duplicateExtensionIdentifier( DesignElementHandle source, DesignElementHandle destination )
static void duplicateExtensionIdentifier( DesignElement source, DesignElement destination, Module sourceModule )
private static void duplicateExtensionIdentifier( DesignElementHandle source, DesignElementHandle destination ) { // for the special oda cases, the extension id must be set before // copy properties. Otherwise, destination cannot find its ODA // properties. if ( source.getElement( ) instanceof IOdaExtendableElementModel ) { String extensionId = (String) source .getProperty( IOdaExtendableElementModel.EXTENSION_ID_PROP ); destination.getElement( ).setProperty( IOdaExtendableElementModel.EXTENSION_ID_PROP, extensionId ); } else if ( source.getElement( ) instanceof IExtendedItemModel ) { String extensionId = (String) source .getProperty( IExtendedItemModel.EXTENSION_NAME_PROP ); destination.getElement( ).setProperty( IExtendedItemModel.EXTENSION_NAME_PROP, extensionId ); } else { assert false; } }
5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/109f373d0c281370aac71b18e0a0c73a11c18729/ModelUtil.java/buggy/model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/util/ModelUtil.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 760, 918, 6751, 3625, 3004, 12, 1082, 202, 15478, 1046, 3259, 1084, 16, 29703, 1046, 3259, 2929, 262, 202, 95, 202, 202, 759, 364, 326, 4582, 320, 2414, 6088, 16, 326, 2710, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 760, 918, 6751, 3625, 3004, 12, 1082, 202, 15478, 1046, 3259, 1084, 16, 29703, 1046, 3259, 2929, 262, 202, 95, 202, 202, 759, 364, 326, 4582, 320, 2414, 6088, 16, 326, 2710, ...
setIcon(getOpenIcon());
setOpenIcon(getOpenIcon());
public Component getTreeCellRendererComponent(JTree tree, Object val, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) { this.selected = selected; this.hasFocus = hasFocus; if (leaf) setIcon(getLeafIcon()); else if (expanded) setIcon(getOpenIcon()); else setIcon(getClosedIcon()); setText(val.toString()); setHorizontalAlignment(LEFT); setVerticalAlignment(TOP); return this; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/65fc7899e6a31f0880fa2d7c7f5bd6905d251de4/DefaultTreeCellRenderer.java/buggy/core/src/classpath/javax/javax/swing/tree/DefaultTreeCellRenderer.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 5435, 15867, 4020, 6747, 1841, 12, 46, 2471, 2151, 16, 4766, 15604, 1033, 1244, 16, 4766, 15604, 1250, 3170, 16, 4766, 15604, 1250, 8406, 16, 4766, 15604, 1250, 7839, 16, 4766, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 15867, 4020, 6747, 1841, 12, 46, 2471, 2151, 16, 4766, 15604, 1033, 1244, 16, 4766, 15604, 1250, 3170, 16, 4766, 15604, 1250, 8406, 16, 4766, 15604, 1250, 7839, 16, 4766, ...
String defaultPrefix = MylarPlugin.getDefault().getPreferenceStore().getString(MylarTasklistPlugin.DEFAULT_URL_PREFIX);
String defaultPrefix = MylarPlugin.getDefault().getPreferenceStore().getString(MylarTaskListPlugin.DEFAULT_URL_PREFIX);
protected void setButtonStatus(){ String url = issueURLTextWidget.getText(); if (url.length() > 10 && (url.startsWith("http://") || url.startsWith("https://"))){ String defaultPrefix = MylarPlugin.getDefault().getPreferenceStore().getString(MylarTasklistPlugin.DEFAULT_URL_PREFIX); if (url.equals(defaultPrefix)){ getDescButton.setEnabled(false); } else{ getDescButton.setEnabled(true); } } else{ getDescButton.setEnabled(false); } }
51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/7434c54adb9b67993df3b0ee032cca0eaf5003f3/TaskInputDialog.java/clean/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/views/TaskInputDialog.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1117, 918, 444, 3616, 1482, 1435, 95, 202, 202, 780, 880, 273, 5672, 1785, 1528, 4609, 18, 588, 1528, 5621, 9506, 202, 430, 261, 718, 18, 2469, 1435, 405, 1728, 597, 261, 718, 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, 918, 444, 3616, 1482, 1435, 95, 202, 202, 780, 880, 273, 5672, 1785, 1528, 4609, 18, 588, 1528, 5621, 9506, 202, 430, 261, 718, 18, 2469, 1435, 405, 1728, 597, 261, 718, 18, ...
case Id_italics: return realThis(thisObj, f). jsFunction_italics();
case Id_fixed: return realThis(thisObj, f).jsFunction_fixed();
public Object execMethod (int methodId, IdFunction f, Context cx, Scriptable scope, Scriptable thisObj, Object[] args) throws JavaScriptException { switch (methodId) { case ConstructorId_fromCharCode: return jsStaticFunction_fromCharCode(args); case Id_constructor: return jsConstructor(args, thisObj == null); case Id_toString: return realThis(thisObj, f). jsFunction_toString(); case Id_valueOf: return realThis(thisObj, f). jsFunction_valueOf(); case Id_charAt: return jsFunction_charAt(ScriptRuntime.toString(thisObj), args); case Id_charCodeAt: return wrap_double( jsFunction_charCodeAt(ScriptRuntime.toString(thisObj), args)); case Id_indexOf: return wrap_int( jsFunction_indexOf(ScriptRuntime.toString(thisObj), args)); case Id_lastIndexOf: return wrap_int( jsFunction_lastIndexOf(ScriptRuntime.toString(thisObj), args)); case Id_split: return jsFunction_split(cx, ScriptRuntime.toString(thisObj), args, f); case Id_substring: return jsFunction_substring(cx, ScriptRuntime.toString(thisObj), args); case Id_toLowerCase: return jsFunction_toLowerCase(ScriptRuntime.toString(thisObj)); case Id_toUpperCase: return jsFunction_toUpperCase(ScriptRuntime.toString(thisObj)); case Id_substr: return jsFunction_substr(ScriptRuntime.toString(thisObj), args); case Id_concat: return jsFunction_concat(ScriptRuntime.toString(thisObj), args); case Id_slice: return jsFunction_slice(ScriptRuntime.toString(thisObj), args); case Id_bold: return realThis(thisObj, f). jsFunction_bold(); case Id_italics: return realThis(thisObj, f). jsFunction_italics(); case Id_fixed: return realThis(thisObj, f). jsFunction_fixed(); case Id_strike: return realThis(thisObj, f). jsFunction_strike(); case Id_small: return realThis(thisObj, f). jsFunction_small(); case Id_big: return realThis(thisObj, f). jsFunction_big(); case Id_blink: return realThis(thisObj, f). jsFunction_blink(); case Id_sup: return realThis(thisObj, f). jsFunction_sup(); case Id_sub: return realThis(thisObj, f). jsFunction_sub(); case Id_fontsize: return realThis(thisObj, f). jsFunction_fontsize(ScriptRuntime.toString(args, 0)); case Id_fontcolor: return realThis(thisObj, f). jsFunction_fontcolor(ScriptRuntime.toString(args, 0)); case Id_link: return realThis(thisObj, f). jsFunction_link(ScriptRuntime.toString(args, 0)); case Id_anchor: return realThis(thisObj, f). jsFunction_anchor(ScriptRuntime.toString(args, 0)); case Id_equals: return wrap_boolean( jsFunction_equals(ScriptRuntime.toString(thisObj), ScriptRuntime.toString(args, 0))); case Id_equalsIgnoreCase: return wrap_boolean( jsFunction_equalsIgnoreCase(ScriptRuntime.toString(thisObj), ScriptRuntime.toString(args, 0))); case Id_match: return jsFunction_match(cx, thisObj, args, f); case Id_search: return jsFunction_search(cx, thisObj, args, f); case Id_replace: return jsFunction_replace(cx, thisObj, args, f); } return super.execMethod(methodId, f, cx, scope, thisObj, args); }
11366 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11366/35caf7c2bb93872680ae16e34746d94fe1e533e3/NativeString.java/buggy/js/rhino/src/org/mozilla/javascript/NativeString.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 1033, 1196, 1305, 3639, 261, 474, 707, 548, 16, 3124, 2083, 284, 16, 540, 1772, 9494, 16, 22780, 2146, 16, 22780, 15261, 16, 1033, 8526, 833, 13, 3639, 1216, 11905, 503, 565, 288, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 1033, 1196, 1305, 3639, 261, 474, 707, 548, 16, 3124, 2083, 284, 16, 540, 1772, 9494, 16, 22780, 2146, 16, 22780, 15261, 16, 1033, 8526, 833, 13, 3639, 1216, 11905, 503, 565, 288, ...
(pixels[y*width + x] & 0x00ffffff) : pixels[y*width + x];
(pixels[y*width + x] | 0xff000000) : pixels[y*width + x];
public int get(int x, int y) { if ((x < 0) || (y < 0) || (x >= width) || (y >= height)) return 0; return (format == RGB) ? (pixels[y*width + x] & 0x00ffffff) : pixels[y*width + x]; //(pixels[y*width + x] & 0xff000000) : pixels[y*width + x]; }
8833 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8833/331bf24f949323923485cf63f610d7922d31946f/PImage.java/clean/core/PImage.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 509, 336, 12, 474, 619, 16, 509, 677, 13, 288, 565, 309, 14015, 92, 411, 374, 13, 747, 261, 93, 411, 374, 13, 747, 261, 92, 1545, 1835, 13, 747, 261, 93, 1545, 2072, 3719, 327...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 509, 336, 12, 474, 619, 16, 509, 677, 13, 288, 565, 309, 14015, 92, 411, 374, 13, 747, 261, 93, 411, 374, 13, 747, 261, 92, 1545, 1835, 13, 747, 261, 93, 1545, 2072, 3719, 327...
public CredentialsNotSetException(UMOMessage umoMessage, UMOSecurityContext context, UMOImmutableEndpoint endpoint, UMOEndpointSecurityFilter filter)
public CredentialsNotSetException(Message message, UMOMessage umoMessage)
public CredentialsNotSetException(UMOMessage umoMessage, UMOSecurityContext context, UMOImmutableEndpoint endpoint, UMOEndpointSecurityFilter filter) { super(umoMessage, context, endpoint, filter); }
28323 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/28323/5f11d3c7c4a6860001997529ec9cb38955dcdcf5/CredentialsNotSetException.java/buggy/mule/src/main/java/org/mule/umo/security/CredentialsNotSetException.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 14582, 1248, 24582, 12, 2799, 51, 1079, 9570, 83, 1079, 16, 4766, 1377, 587, 5980, 28646, 819, 16, 4766, 1377, 587, 5980, 16014, 3293, 2494, 16, 4766, 1377, 587, 5980, 3293, 4368, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 14582, 1248, 24582, 12, 2799, 51, 1079, 9570, 83, 1079, 16, 4766, 1377, 587, 5980, 28646, 819, 16, 4766, 1377, 587, 5980, 16014, 3293, 2494, 16, 4766, 1377, 587, 5980, 3293, 4368, 1...
else return id;
return id;
public String getRootPath() { String[] path = getParentPath(); if (path != null && path.length > 0) return path[0]; else return id; }
58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/23cbb9b66f3df77f808e086e90482a516f0c469f/Category.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/Category.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 514, 18863, 1435, 288, 3639, 514, 8526, 589, 273, 5089, 743, 5621, 3639, 309, 261, 803, 480, 446, 597, 589, 18, 2469, 405, 374, 13, 5411, 327, 589, 63, 20, 15533, 3639, 469, 5411,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 514, 18863, 1435, 288, 3639, 514, 8526, 589, 273, 5089, 743, 5621, 3639, 309, 261, 803, 480, 446, 597, 589, 18, 2469, 405, 374, 13, 5411, 327, 589, 63, 20, 15533, 3639, 469, 5411,...
locationEClass = createEClass(LOCATION); createEAttribute(locationEClass, LOCATION__X); createEAttribute(locationEClass, LOCATION__Y);
locationEClass = createEClass(LOCATION); createEAttribute(locationEClass, LOCATION__X); createEAttribute(locationEClass, LOCATION__Y);
public void createPackageContents() { if (isCreated) return; isCreated = true; // Create classes and their features edgeEClass = createEClass(EDGE); createEReference(edgeEClass, EDGE__SOURCE); createEReference(edgeEClass, EDGE__TARGET); createEReference(edgeEClass, EDGE__BENDPOINTS); createEReference(edgeEClass, EDGE__SOURCE_ANCHOR); createEReference(edgeEClass, EDGE__TARGET_ANCHOR); nodeEClass = createEClass(NODE); createEReference(nodeEClass, NODE__LAYOUT_CONSTRAINT); styleEClass = createEClass(STYLE); fillStyleEClass = createEClass(FILL_STYLE); createEAttribute(fillStyleEClass, FILL_STYLE__FILL_COLOR); lineStyleEClass = createEClass(LINE_STYLE); createEAttribute(lineStyleEClass, LINE_STYLE__LINE_COLOR); fontStyleEClass = createEClass(FONT_STYLE); createEAttribute(fontStyleEClass, FONT_STYLE__FONT_COLOR); createEAttribute(fontStyleEClass, FONT_STYLE__FONT_NAME); createEAttribute(fontStyleEClass, FONT_STYLE__FONT_HEIGHT); createEAttribute(fontStyleEClass, FONT_STYLE__BOLD); createEAttribute(fontStyleEClass, FONT_STYLE__ITALIC); createEAttribute(fontStyleEClass, FONT_STYLE__UNDERLINE); createEAttribute(fontStyleEClass, FONT_STYLE__STRIKE_THROUGH); titleStyleEClass = createEClass(TITLE_STYLE); createEAttribute(titleStyleEClass, TITLE_STYLE__SHOW_TITLE); sortingStyleEClass = createEClass(SORTING_STYLE); createEAttribute(sortingStyleEClass, SORTING_STYLE__SORTING); createEAttribute(sortingStyleEClass, SORTING_STYLE__SORTING_KEYS); createEReference(sortingStyleEClass, SORTING_STYLE__SORTED_OBJECTS); descriptionStyleEClass = createEClass(DESCRIPTION_STYLE); createEAttribute(descriptionStyleEClass, DESCRIPTION_STYLE__DESCRIPTION); layoutConstraintEClass = createEClass(LAYOUT_CONSTRAINT); sizeEClass = createEClass(SIZE); createEAttribute(sizeEClass, SIZE__WIDTH); createEAttribute(sizeEClass, SIZE__HEIGHT); locationEClass = createEClass(LOCATION); createEAttribute(locationEClass, LOCATION__X); createEAttribute(locationEClass, LOCATION__Y); boundsEClass = createEClass(BOUNDS); ratioEClass = createEClass(RATIO); createEAttribute(ratioEClass, RATIO__VALUE); anchorEClass = createEClass(ANCHOR); bendpointsEClass = createEClass(BENDPOINTS); identityAnchorEClass = createEClass(IDENTITY_ANCHOR); createEAttribute(identityAnchorEClass, IDENTITY_ANCHOR__ID); routingStyleEClass = createEClass(ROUTING_STYLE); createEAttribute(routingStyleEClass, ROUTING_STYLE__ROUTING); createEAttribute(routingStyleEClass, ROUTING_STYLE__SMOOTHNESS); createEAttribute(routingStyleEClass, ROUTING_STYLE__AVOID_OBSTRUCTIONS); createEAttribute(routingStyleEClass, ROUTING_STYLE__CLOSEST_DISTANCE); createEAttribute(routingStyleEClass, ROUTING_STYLE__JUMP_LINK_STATUS); createEAttribute(routingStyleEClass, ROUTING_STYLE__JUMP_LINK_TYPE); createEAttribute(routingStyleEClass, ROUTING_STYLE__JUMP_LINKS_REVERSE); viewEClass = createEClass(VIEW); createEAttribute(viewEClass, VIEW__VISIBLE); createEAttribute(viewEClass, VIEW__TYPE); createEAttribute(viewEClass, VIEW__MUTABLE); createEReference(viewEClass, VIEW__SOURCE_EDGES); createEReference(viewEClass, VIEW__TARGET_EDGES); createEReference(viewEClass, VIEW__PERSISTED_CHILDREN); createEReference(viewEClass, VIEW__STYLES); createEReference(viewEClass, VIEW__ELEMENT); createEReference(viewEClass, VIEW__DIAGRAM); createEReference(viewEClass, VIEW__TRANSIENT_CHILDREN); relativeBendpointsEClass = createEClass(RELATIVE_BENDPOINTS); createEAttribute(relativeBendpointsEClass, RELATIVE_BENDPOINTS__POINTS); diagramEClass = createEClass(DIAGRAM); createEAttribute(diagramEClass, DIAGRAM__NAME); createEAttribute(diagramEClass, DIAGRAM__MEASUREMENT_UNIT); createEReference(diagramEClass, DIAGRAM__PERSISTED_EDGES); createEReference(diagramEClass, DIAGRAM__TRANSIENT_EDGES); imageEClass = createEClass(IMAGE); createEAttribute(imageEClass, IMAGE__DATA); canonicalStyleEClass = createEClass(CANONICAL_STYLE); createEAttribute(canonicalStyleEClass, CANONICAL_STYLE__CANONICAL); shapeStyleEClass = createEClass(SHAPE_STYLE); connectorStyleEClass = createEClass(CONNECTOR_STYLE); pageStyleEClass = createEClass(PAGE_STYLE); createEAttribute(pageStyleEClass, PAGE_STYLE__PAGE_X); createEAttribute(pageStyleEClass, PAGE_STYLE__PAGE_Y); createEAttribute(pageStyleEClass, PAGE_STYLE__PAGE_WIDTH); createEAttribute(pageStyleEClass, PAGE_STYLE__PAGE_HEIGHT); drawerStyleEClass = createEClass(DRAWER_STYLE); createEAttribute(drawerStyleEClass, DRAWER_STYLE__COLLAPSED); guideStyleEClass = createEClass(GUIDE_STYLE); createEReference(guideStyleEClass, GUIDE_STYLE__HORIZONTAL_GUIDES); createEReference(guideStyleEClass, GUIDE_STYLE__VERTICAL_GUIDES); guideEClass = createEClass(GUIDE); createEAttribute(guideEClass, GUIDE__POSITION); createEReference(guideEClass, GUIDE__NODE_MAP); nodeEntryEClass = createEClass(NODE_ENTRY); createEAttribute(nodeEntryEClass, NODE_ENTRY__VALUE); createEReference(nodeEntryEClass, NODE_ENTRY__KEY); filteringStyleEClass = createEClass(FILTERING_STYLE); createEAttribute(filteringStyleEClass, FILTERING_STYLE__FILTERING); createEAttribute(filteringStyleEClass, FILTERING_STYLE__FILTERING_KEYS); createEReference(filteringStyleEClass, FILTERING_STYLE__FILTERED_OBJECTS); diagramStyleEClass = createEClass(DIAGRAM_STYLE); imageStyleEClass = createEClass(IMAGE_STYLE); createEAttribute(imageStyleEClass, IMAGE_STYLE__ANTI_ALIAS); createEAttribute(imageStyleEClass, IMAGE_STYLE__MAINTAIN_ASPECT_RATIO); createEReference(imageStyleEClass, IMAGE_STYLE__CROP_BOUND); imageBufferStyleEClass = createEClass(IMAGE_BUFFER_STYLE); createEReference(imageBufferStyleEClass, IMAGE_BUFFER_STYLE__IMAGE_BUFFER); // Create enums sortingEEnum = createEEnum(SORTING); filteringEEnum = createEEnum(FILTERING); routingEEnum = createEEnum(ROUTING); smoothnessEEnum = createEEnum(SMOOTHNESS); jumpLinkStatusEEnum = createEEnum(JUMP_LINK_STATUS); jumpLinkTypeEEnum = createEEnum(JUMP_LINK_TYPE); alignmentEEnum = createEEnum(ALIGNMENT); sortingDirectionEEnum = createEEnum(SORTING_DIRECTION); measurementUnitEEnum = createEEnum(MEASUREMENT_UNIT); // Create data types relativeBendpointListEDataType = createEDataType(RELATIVE_BENDPOINT_LIST); filterKeyListEDataType = createEDataType(FILTER_KEY_LIST); sortKeyMapEDataType = createEDataType(SORT_KEY_MAP); }
1758 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1758/1d1e28c0f7853dd16bd3fe819770773ed4e61d20/NotationPackageImpl.java/buggy/org.eclipse.gmf.notation/plugins/org.eclipse.gmf.runtime.notation/src/org/eclipse/gmf/runtime/notation/impl/NotationPackageImpl.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 752, 2261, 6323, 1435, 288, 202, 202, 430, 261, 291, 6119, 13, 327, 31, 202, 202, 291, 6119, 273, 638, 31, 202, 202, 759, 1788, 3318, 471, 3675, 4467, 202, 202, 7126, 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, 918, 752, 2261, 6323, 1435, 288, 202, 202, 430, 261, 291, 6119, 13, 327, 31, 202, 202, 291, 6119, 273, 638, 31, 202, 202, 759, 1788, 3318, 471, 3675, 4467, 202, 202, 7126, 5...
if (ref != null) { IWorkbenchPart part = ref.getPart(true); Assert.isNotNull(part); if (part instanceof MultiEditor) { IWorkbenchPartSite site = ((MultiEditor) part)
if (ref != null) { IWorkbenchPart part = ref.getPart(true); Assert.isNotNull(part); if (part instanceof MultiEditor) { IWorkbenchPartSite site = ((MultiEditor) part)
public void setActiveEditor(IEditorReference ref) { if (ref == activeEditorReference) { return; } // A part can't be activated until it is added //Assert.isTrue(ref == null || parts.contains(ref)); if (ref != null) { IWorkbenchPart part = ref.getPart(true); Assert.isNotNull(part); if (part instanceof MultiEditor) { IWorkbenchPartSite site = ((MultiEditor) part) .getActiveEditor().getSite(); if (site instanceof PartSite) { ref = (IEditorReference) ((PartSite) site).getPane() .getPartReference(); } } } activeEditorReference = ref; fireActiveEditorChanged(ref); }
58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/1b0dac5907b7e377a3c295ce4c321d6a5feea581/PartList.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PartList.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 20669, 6946, 12, 45, 6946, 2404, 1278, 13, 288, 3639, 309, 261, 1734, 422, 2695, 6946, 2404, 13, 288, 5411, 327, 31, 3639, 289, 7734, 368, 432, 1087, 848, 1404, 506, 14892, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 20669, 6946, 12, 45, 6946, 2404, 1278, 13, 288, 3639, 309, 261, 1734, 422, 2695, 6946, 2404, 13, 288, 5411, 327, 31, 3639, 289, 7734, 368, 432, 1087, 848, 1404, 506, 14892, 3...
System.err.println("NOTE: Using compiler class: " +
System.err.println(Messages.getString("rmi.console.08") +
public static final JavaCompiler locateJavaCompiler(boolean verbose) throws JavaCompilerException { // Checking JAVA_COMPILER_CLASS_PROPERTY. String compilerClassName = System.getProperty(JAVA_COMPILER_CLASS_PROPERTY); if (compilerClassName != null) { String compilerMethodName = System.getProperty(JAVA_COMPILER_METHOD_PROPERTY); if (verbose) { System.err.println("NOTE: Using compiler class: " + compilerClassName + ((compilerMethodName != null) ? (", method: " + compilerMethodName) : "")); } return new MethodJavaCompiler( compilerClassName, compilerMethodName); } // Checking JAVA_COMPILER_EXECUTABLE_PROPERTY. String executableName = System.getProperty(JAVA_COMPILER_EXECUTABLE_PROPERTY); if (executableName != null) { if (verbose) { System.err.println("NOTE: Using compiler executable: " + executableName); } return new ExecJavaCompiler(executableName); } // Trying to run Eclipse Compiler. try { JavaCompiler compiler = new EclipseJavaCompiler(); if (verbose) { System.err.println("NOTE: Using Eclipse Compiler"); } return compiler; } catch (JavaCompilerException e) { if (verbose) { System.err.println( "NOTE: Eclipse Compiler class not found: " + e); } } // Trying to run Javac executable from JAVA_HOME. try { JavaCompiler compiler = new ExecJavaCompiler(true); if (verbose) { System.err.println("NOTE: Using JAVA_HOME Javac compiler"); } return compiler; } catch (JavaCompilerException e) { if (verbose) { System.err.println( "NOTE: JAVA_HOME Javac compiler not found: " + e); } } // Trying to run Javac executable from system path, as a last resort. return new ExecJavaCompiler(false); }
54769 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54769/b348e06c6dac9b88f66841b025d00af43b5afac0/JavaCompiler.java/clean/modules/rmi/src/main/java/org/apache/harmony/rmi/common/JavaCompiler.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 760, 727, 5110, 9213, 10627, 5852, 9213, 12, 6494, 3988, 13, 5411, 1216, 5110, 9213, 503, 288, 3639, 368, 24471, 21227, 67, 31075, 14668, 67, 5237, 67, 9900, 18, 3639, 514, 5274, 38...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 760, 727, 5110, 9213, 10627, 5852, 9213, 12, 6494, 3988, 13, 5411, 1216, 5110, 9213, 503, 288, 3639, 368, 24471, 21227, 67, 31075, 14668, 67, 5237, 67, 9900, 18, 3639, 514, 5274, 38...
case SINGLETON_FACTORY : return m_handler.getComponentManager().getInstance();
case SINGLETON_FACTORY : return m_handler.getComponentManager().getInstance();
public Object getService(Bundle bundle, ServiceRegistration registration) { switch(m_metadata.getFactoryPolicy()) { case SINGLETON_FACTORY : return m_handler.getComponentManager().getInstance(); case SERVICE_FACTORY : return m_handler.getComponentManager().createInstance(); case COMPONENT_FACTORY : //TODO Component Factory Behavior return null; default : Activator.getLogger().log(Level.SEVERE, "[" + m_handler.getComponentManager().getComponentMetatada().getClassName() + "] Unknown factory policy for " + m_metadata.getServiceSpecification() + " : " + m_metadata.getFactoryPolicy()); return null; } }
45948 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45948/ade5d36d9bda6dfac49dec23cf83e543691726ab/ProvidedService.java/clean/ipojo/src/main/java/org/apache/felix/ipojo/handlers/providedservice/ProvidedService.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 1033, 6373, 12, 3405, 3440, 16, 1956, 7843, 7914, 13, 288, 377, 202, 9610, 12, 81, 67, 4165, 18, 588, 1733, 2582, 10756, 288, 377, 202, 3593, 15915, 56, 673, 67, 16193, 294, 5411,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 1033, 6373, 12, 3405, 3440, 16, 1956, 7843, 7914, 13, 288, 377, 202, 9610, 12, 81, 67, 4165, 18, 588, 1733, 2582, 10756, 288, 377, 202, 3593, 15915, 56, 673, 67, 16193, 294, 5411,...
super ("UTF-16LE", null);
super ("UTF-16LE", new String[] { "UTF16LE", /* These names are provided by * http: */ "x-utf-16le", "ibm-1202", "ibm-13490", "ibm-17586", "UTF16_LittleEndian", "UnicodeLittleUnmarked" });
UTF_16LE () { super ("UTF-16LE", null); }
5916 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5916/8b9521b543363733791b0cb3aa8b0aad118ae75e/UTF_16LE.java/buggy/libjava/gnu/java/nio/charset/UTF_16LE.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 6380, 67, 2313, 900, 1832, 225, 288, 565, 2240, 7566, 5159, 17, 2313, 900, 3113, 394, 514, 8526, 288, 225, 315, 5159, 2313, 900, 3113, 1748, 8646, 1257, 854, 2112, 635, 380, 1062, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 6380, 67, 2313, 900, 1832, 225, 288, 565, 2240, 7566, 5159, 17, 2313, 900, 3113, 394, 514, 8526, 288, 225, 315, 5159, 2313, 900, 3113, 1748, 8646, 1257, 854, 2112, 635, 380, 1062, 30, 1...
final int node = _node + 1; return node < _treeNodeLimit ? returnNode(_node = node) : NULL; }
final int node = _node + 1; return node < _treeNodeLimit ? returnNode(_node = node) : NULL; }
public int next() { final int node = _node + 1; return node < _treeNodeLimit ? returnNode(_node = node) : NULL; }
2723 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2723/264066e4e3d606d5167a1f5680c45669efd7e5c9/DOMImpl.java/clean/src/org/apache/xalan/xsltc/dom/DOMImpl.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 509, 1024, 1435, 288, 202, 565, 727, 509, 756, 273, 389, 2159, 397, 404, 31, 202, 565, 327, 756, 411, 389, 3413, 907, 3039, 692, 327, 907, 24899, 2159, 273, 756, 13, 294, 32...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 225, 202, 482, 509, 1024, 1435, 288, 202, 565, 727, 509, 756, 273, 389, 2159, 397, 404, 31, 202, 565, 327, 756, 411, 389, 3413, 907, 3039, 692, 327, 907, 24899, 2159, 273, 756, 13, 294, 32...
SipURI toAddress = addressFactory.createSipURI(toUser, toSipAddress);
SipURI toAddress = addressFactory .createSipURI(toUser, toSipAddress);
public void sendInvite() { try { String fromName = "BigGuy"; String fromSipAddress = "here.com"; String fromDisplayName = "The Master Blaster"; String toSipAddress = "there.com"; String toUser = "LittleGuy"; String toDisplayName = "The Little Blister"; // create >From Header SipURI fromAddress = addressFactory.createSipURI(fromName, fromSipAddress); Address fromNameAddress = addressFactory.createAddress(fromAddress); fromNameAddress.setDisplayName(fromDisplayName); String tag = new Integer((int)(Math.random() * 10000)).toString(); FromHeader fromHeader = headerFactory.createFromHeader(fromNameAddress, tag); // create To Header SipURI toAddress = addressFactory.createSipURI(toUser, toSipAddress); Address toNameAddress = addressFactory.createAddress(toAddress); toNameAddress.setDisplayName(toDisplayName); ToHeader toHeader = headerFactory.createToHeader(toNameAddress, null); // create Request URI SipURI requestURI = addressFactory.createSipURI(toUser, toSipAddress); // Create ViaHeaders ArrayList viaHeaders = new ArrayList(); int port = sipProvider.getListeningPoint().getPort(); ViaHeader viaHeader = headerFactory.createViaHeader( sipStack.getIPAddress(), sipProvider.getListeningPoint().getPort(), transport, null); // add via headers viaHeaders.add(viaHeader); // Create ContentTypeHeader ContentTypeHeader contentTypeHeader = headerFactory.createContentTypeHeader("application", "sdp"); // Create a new CallId header CallIdHeader callIdHeader = sipProvider.getNewCallId(); // Create a new Cseq header CSeqHeader cSeqHeader = headerFactory.createCSeqHeader(1, Request.INVITE); // Create a new MaxForwardsHeader MaxForwardsHeader maxForwards = headerFactory.createMaxForwardsHeader(70); // Create the request. Request request = messageFactory.createRequest( requestURI, Request.INVITE, callIdHeader, cSeqHeader, fromHeader, toHeader, viaHeaders, maxForwards); // Create contact headers String host = sipStack.getIPAddress(); SipURI contactUrl = addressFactory.createSipURI(fromName, host); contactUrl.setPort(tcpListeningPoint.getPort()); // Create the contact name address. SipURI contactURI = addressFactory.createSipURI(fromName, host); contactURI.setPort(sipProvider.getListeningPoint().getPort()); Address contactAddress = addressFactory.createAddress(contactURI); // Add the contact address. contactAddress.setDisplayName(fromName); contactHeader = headerFactory.createContactHeader(contactAddress); request.addHeader(contactHeader); // Add the extension header. Header extensionHeader = headerFactory.createHeader("My-Header", "my header value"); request.addHeader(extensionHeader); String sdpData = "v=0\r\n" + "o=4855 13760799956958020 13760799956958020" + " IN IP4 129.6.55.78\r\n" + "s=mysession session\r\n" + "p=+46 8 52018010\r\n" + "c=IN IP4 129.6.55.78\r\n" + "t=0 0\r\n" + "m=audio 6022 RTP/AVP 0 4 18\r\n" + "a=rtpmap:0 PCMU/8000\r\n" + "a=rtpmap:4 G723/8000\r\n" + "a=rtpmap:18 G729A/8000\r\n" + "a=ptime:20\r\n";/** StringBuffer sdpBuff = new StringBuffer(); for (int i = 0; i < 500; i++) { sdpBuff.append(sdp); } String sdpData = sdpBuff.toString(); File dataFile = new File("data.txt"); long length = dataFile.length(); FileInputStream fis = new FileInputStream(dataFile); byte[] contents = new byte[(int)length]; fis.read(contents); System.out.println("length = " + contents.length);**/ byte[] contents = sdpData.getBytes(); //byte[] contents = sdpBuff.toString().getBytes(); request.setContent(contents, contentTypeHeader); extensionHeader = headerFactory.createHeader( "My-Other-Header", "my new header value "); request.addHeader(extensionHeader); Header callInfoHeader = headerFactory.createHeader( "Call-Info", "<http://www.antd.nist.gov>"); request.addHeader(callInfoHeader); // Create the client transaction. ClientTransaction inviteTid = sipProvider.getNewClientTransaction(request); // send the request out. inviteTid.sendRequest(); Dialog dialog = inviteTid.getDialog(); // Set a pointer to our application data Appdata appdata = new Appdata(dialog); dialog.setApplicationData(appdata); } catch (Exception ex) { System.out.println(ex.getMessage()); ex.printStackTrace(); usage(); } }
3364 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3364/68c0ca844a7d5fe4a7744cbf9898184966ce0680/Shootist.java/clean/src/test/load/concurrency/Shootist.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1366, 22730, 1435, 288, 202, 202, 698, 288, 1082, 202, 780, 628, 461, 273, 315, 9901, 6099, 93, 14432, 1082, 202, 780, 628, 17550, 1887, 273, 315, 14852, 18, 832, 14432, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1366, 22730, 1435, 288, 202, 202, 698, 288, 1082, 202, 780, 628, 461, 273, 315, 9901, 6099, 93, 14432, 1082, 202, 780, 628, 17550, 1887, 273, 315, 14852, 18, 832, 14432, ...
System.out.println("Can't execute native browser. ErrMsg is " + e.getMessage());
System.out.println("Can't execute native browser. Error message is: " + e.getCause().getMessage());
public void run() { // create native browser process try { if (WebBrowser.getBrowserBinary() == null) { setBrowsersInitFailReason("BrowserBinary not set"); WebBrowser.trace("browserBinary not set, system exit"); return; } String jvmVendor = System.getProperty("java.vm.vendor"); if (WebBrowser.getBrowserBinary().endsWith("IeEmbed.exe") && jvmVendor.startsWith("Sun")) WebBrowserUtil.nativeSetEnv(); final String cmd = WebBrowser.getBrowserBinary() + " -port=" + messenger.getPort(); WebBrowser.trace("Executing " + cmd); AccessController.doPrivileged( new PrivilegedExceptionAction() { public Object run() throws IOException { nativeBrowser = Runtime.getRuntime().exec(cmd); new StreamGobbler(nativeBrowser.getErrorStream()).start(); new StreamGobbler(nativeBrowser.getInputStream()).start(); return null; } } ); } catch (PrivilegedActionException e) { setBrowsersInitFailReason("Can't find native browser"); System.out.println("Can't execute native browser. ErrMsg is " + e.getMessage()); return; } // create socket client and connect to socket server try { AccessController.doPrivileged( new PrivilegedExceptionAction() { public Object run() throws Exception { messenger.connect(); return null; } } ); } catch (PrivilegedActionException e) { System.out.println("Can't connect to native browser. ErrMsg is " + e.getMessage()); setBrowsersInitFailReason("Can't connect to native browser"); return; } // main event loop while (true) { try { Thread.sleep(1); } catch (Exception e) { } try { int exitValue = nativeBrowser.exitValue(); WebBrowser.trace("Native browser died."); return; } catch (IllegalThreadStateException e) { } try { processEvents(); } catch (Exception e) { WebBrowser.trace("Exception occured when processEvent: " + e.getMessage()); return; } try { messenger.portListening(); processIncomingMessage(messenger.getMessage()); } catch (Exception e) { WebBrowser.trace("Exception occured when portListening: " + e.getMessage()); return; } } }
46042 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46042/2e48a3c2b6c09a2a916e9b864fd3933c0da477c0/NativeEventThread.java/buggy/src/jdic/src/share/classes/org/jdesktop/jdic/browser/NativeEventThread.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1086, 1435, 288, 3639, 368, 752, 6448, 4748, 1207, 3639, 775, 288, 5411, 309, 261, 4079, 9132, 18, 588, 9132, 5905, 1435, 422, 446, 13, 288, 1171, 15268, 13221, 2570, 3754, 838...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1086, 1435, 288, 3639, 368, 752, 6448, 4748, 1207, 3639, 775, 288, 5411, 309, 261, 4079, 9132, 18, 588, 9132, 5905, 1435, 422, 446, 13, 288, 1171, 15268, 13221, 2570, 3754, 838...
return this.get(positionY - this.getWidth());
return this.get(position - this.getWidth());
public Object up(Object o) { int positionY = this.getY(this.indexOf(o)); if (positionY != 0) { return this.get(positionY - this.getWidth()); } else { return null; } }
58694 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58694/f65ce438302658787d8a974be204323b67888d57/Cube.java/clean/src/org/objectweb/proactive/core/group/topology/Cube.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 1033, 731, 12, 921, 320, 13, 288, 3639, 509, 1754, 61, 273, 333, 18, 588, 61, 12, 2211, 18, 31806, 12, 83, 10019, 3639, 309, 261, 3276, 61, 480, 374, 13, 288, 5411, 327, 333, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 1033, 731, 12, 921, 320, 13, 288, 3639, 509, 1754, 61, 273, 333, 18, 588, 61, 12, 2211, 18, 31806, 12, 83, 10019, 3639, 309, 261, 3276, 61, 480, 374, 13, 288, 5411, 327, 333, ...