rem
stringlengths
1
53.3k
add
stringlengths
0
80.5k
context
stringlengths
6
326k
meta
stringlengths
141
403
input_ids
list
attention_mask
list
labels
list
if (((Comparable) this.theResult).compareTo(other.theResult) == -1) { return this; } else { return other; }
try { if (((Comparable) this.theResult).compareTo(other.getResult()) <= 0) { return this; } else { return other; } } catch (NoResultsException e) { return this; }
public Result returnTheBest(Result other) { if (((Comparable) this.theResult).compareTo(other.theResult) == -1) { return this; } else { return other; } }
50951 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50951/e16010995aca23bab08debf55adb3babc6937a6e/Result.java/buggy/src/org/objectweb/proactive/p2p/api/core/Result.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 3438, 327, 1986, 14173, 12, 1253, 1308, 13, 288, 3639, 309, 261, 12443, 799, 10207, 13, 333, 18, 5787, 1253, 2934, 9877, 774, 12, 3011, 18, 5787, 1253, 13, 422, 300, 21, 13, 288, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 3438, 327, 1986, 14173, 12, 1253, 1308, 13, 288, 3639, 309, 261, 12443, 799, 10207, 13, 333, 18, 5787, 1253, 2934, 9877, 774, 12, 3011, 18, 5787, 1253, 13, 422, 300, 21, 13, 288, ...
protected Destination createDestination(ActiveMQDestination destination) throws Throwable { Destination rc = super.createDestination(destination);
protected Destination createDestination(ConnectionContext context, ActiveMQDestination destination) throws Throwable { Destination rc = super.createDestination(context, destination);
protected Destination createDestination(ActiveMQDestination destination) throws Throwable { Destination rc = super.createDestination(destination); regionBroker.register(destination, rc); return rc; }
11783 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11783/0f502fae3d40a2b7d928c950e77c183405c90f03/ManagedTopicRegion.java/clean/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagedTopicRegion.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 10691, 752, 5683, 12, 3896, 9682, 5683, 2929, 13, 1216, 4206, 288, 3639, 10691, 4519, 273, 2240, 18, 2640, 5683, 12, 10590, 1769, 3639, 3020, 11194, 18, 4861, 12, 10590, 16, 4519, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4750, 10691, 752, 5683, 12, 3896, 9682, 5683, 2929, 13, 1216, 4206, 288, 3639, 10691, 4519, 273, 2240, 18, 2640, 5683, 12, 10590, 1769, 3639, 3020, 11194, 18, 4861, 12, 10590, 16, 4519, 1...
private VmType[] split(char[] signature, AbstractVmClassLoader loader)
private VmType[] split(char[] signature, VmClassLoader loader)
private VmType[] split(char[] signature, AbstractVmClassLoader loader) throws ClassNotFoundException { ArrayList list = new ArrayList(); int ofs = 0; final int len = signature.length; if (signature[ofs] == '(') { ofs++; } while (ofs < len) { int start = ofs; char ch = signature[ofs++]; VmType vmClass; switch (ch) { case ')' : continue; case 'B' : // Byte case 'Z' : // Boolean case 'C' : // Char case 'S' : // Short case 'I' : // Int case 'F' : // Float case 'D' : // Double case 'J' : // Long case 'V' : // Void vmClass = VmType.getPrimitiveClass(ch); break; case '[' : // Array { while (signature[ofs] == '[') { ofs++; } if (signature[ofs] == 'L') { ofs++; while (signature[ofs] != ';') { ofs++; } } ofs++; String sig = new String(signature, start, ofs - start).replace('/', '.'); vmClass = loader.loadClass(sig, true); } break; case 'L' : // Object { start++; while (signature[ofs] != ';') { ofs++; } String sig = new String(signature, start, ofs - start).replace('/', '.'); ofs++; vmClass = loader.loadClass(sig, true); } break; default : throw new ClassFormatError( "Unknown signature character " + ch); } list.add(vmClass); } return (VmType[])list.toArray(new VmType[list.size()]); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c2a519140737c4d249f6c5d568256db2030112e9/Signature.java/clean/core/src/core/org/jnode/vm/classmgr/Signature.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 776, 81, 559, 8526, 1416, 12, 3001, 8526, 3372, 16, 4115, 22143, 7805, 4088, 13, 202, 202, 15069, 10403, 288, 202, 202, 19558, 666, 273, 394, 2407, 5621, 202, 202, 474, 26927, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 776, 81, 559, 8526, 1416, 12, 3001, 8526, 3372, 16, 4115, 22143, 7805, 4088, 13, 202, 202, 15069, 10403, 288, 202, 202, 19558, 666, 273, 394, 2407, 5621, 202, 202, 474, 26927, ...
return new Table_browser_docs( rs );
return new Table_url_docs( rs );
public Object mapOneRow( ResultSet rs ) throws SQLException { return new Table_browser_docs( rs ); }
8781 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8781/eaad68c572f6502718c284362add74adb162803f/DatabaseService.java/clean/server/src/imcode/server/db/DatabaseService.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 2398, 1071, 1033, 852, 3335, 1999, 12, 10842, 3597, 262, 1216, 6483, 288, 7734, 327, 394, 3555, 67, 718, 67, 8532, 12, 3597, 11272, 5411, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 2398, 1071, 1033, 852, 3335, 1999, 12, 10842, 3597, 262, 1216, 6483, 288, 7734, 327, 394, 3555, 67, 718, 67, 8532, 12, 3597, 11272, 5411, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100...
ScriptSecurity getScriptSecurity(final String scriptType, final URL scriptURL, final URL docURL);
ScriptSecurity getScriptSecurity(String scriptType, ParsedURL scriptURL, ParsedURL docURL);
ScriptSecurity getScriptSecurity(final String scriptType, final URL scriptURL, final URL docURL);
46680 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46680/b3bfbdc9cdab85ed31fcac017fd38c721cc6713e/SVGUserAgent.java/buggy/sources/org/apache/batik/swing/svg/SVGUserAgent.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 7739, 4368, 22611, 4368, 12, 6385, 514, 2728, 559, 16, 19694, 727, 1976, 2728, 1785, 16, 19694, 727, 1976, 997, 1785, 1769, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 7739, 4368, 22611, 4368, 12, 6385, 514, 2728, 559, 16, 19694, 727, 1976, 2728, 1785, 16, 19694, 727, 1976, 997, 1785, 1769, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
throw new SocketException("MulticastSocket.setInterface - not yet implemented");
impl.setOption(SocketOptions.IP_MULTICAST_IF, inf);
public void setInterface(InetAddress inf) throws SocketException { // FIXME: TODO - MulticastSocket.setInterface throw new SocketException("MulticastSocket.setInterface - not yet implemented"); }
1739 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1739/9378f999718203e09ed4e030ad6ef70f9d666322/MulticastSocket.java/buggy/libjava/java/net/MulticastSocket.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 444, 1358, 12, 382, 278, 1887, 8286, 13, 1216, 8758, 503, 225, 288, 565, 368, 9852, 30, 2660, 300, 7778, 12544, 4534, 18, 542, 1358, 282, 9380, 18, 542, 1895, 12, 4534, 1320,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 444, 1358, 12, 382, 278, 1887, 8286, 13, 1216, 8758, 503, 225, 288, 565, 368, 9852, 30, 2660, 300, 7778, 12544, 4534, 18, 542, 1358, 282, 9380, 18, 542, 1895, 12, 4534, 1320,...
public void removePropertyChangeListener(String prop, PropertyChangeListener listener);
void removePropertyChangeListener(String prop, PropertyChangeListener listener);
public void removePropertyChangeListener(String prop, PropertyChangeListener listener);
50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/b423075a6102e6577bf2f242ea1a1cf4f2234d1c/BeanContextChild.java/buggy/core/src/classpath/java/java/beans/beancontext/BeanContextChild.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1206, 1396, 15744, 12, 780, 2270, 16, 4276, 15744, 2991, 1769, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1206, 1396, 15744, 12, 780, 2270, 16, 4276, 15744, 2991, 1769, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
occurrences = encode.remaining(); }
occurrences = encode.remaining(); }
public static RubyArray unpack(String encodedString, RubyString formatString) { IRuby runtime = formatString.getRuntime(); RubyArray result = runtime.newArray(); PtrList format = new PtrList(formatString.getValue()); PtrList encode = new PtrList(encodedString); char type = format.nextChar(); // Type to be unpacked while(!format.isAtEnd()) { // Possible next type, format of current type, occurrences of type char next = format.nextChar(); // Next indicates to decode using native encoding format if (next == '_' || next == '!') { if (NATIVE_CODES.indexOf(type) == -1) { throw runtime.newArgumentError("'" + next + "' allowed only after types " + NATIVE_CODES); } // We advance in case occurences follows next = format.nextChar(); } // How many occurrences of 'type' we want int occurrences = 0; if (format.isAtEnd()) { occurrences = 1; } else if (next == '*') { occurrences = IS_STAR; next = format.nextChar(); } else if (Character.isDigit(next)) { format.backup(1); occurrences = format.nextAsciiNumber(); next = format.nextChar(); } else { occurrences = type == '@' ? 0 : 1; } // See if we have a converter for the job... Converter converter = (Converter) converters.get(new Character(type)); if (converter != null) { decode(runtime, encode, occurrences, result, converter); type = next; continue; } // Otherwise the unpack should be here... switch (type) { case '@' : encode.setPosition(occurrences); break; case '%' : throw runtime.newArgumentError("% is not supported"); case 'A' : { if (occurrences == IS_STAR || occurrences > encode.remaining()) { occurrences = encode.remaining(); } String potential = encode.nextSubstring(occurrences); for (int t = occurrences - 1; occurrences > 0; occurrences--, t--) { char c = potential.charAt(t); if (c != '\0' && c != ' ') { break; } } potential = potential.substring(0, occurrences); result.append(runtime.newString(potential)); } break; case 'Z' : { if (occurrences == IS_STAR || occurrences > encode.remaining()) { occurrences = encode.remaining(); } String potential = encode.nextSubstring(occurrences); for (int t = occurrences - 1; occurrences > 0; occurrences--, t--) { char c = potential.charAt(t); if (c != '\0') { break; } } potential = potential.substring(0, occurrences); result.append(runtime.newString(potential)); } break; case 'a' : if (occurrences == IS_STAR || occurrences > encode.remaining()) { occurrences = encode.remaining(); } result.append(runtime.newString(encode.nextSubstring(occurrences))); break; case 'b' : { if (occurrences == IS_STAR || occurrences > encode.remaining() * 8) { occurrences = encode.remaining() * 8; } int bits = 0; StringBuffer lElem = new StringBuffer(occurrences); for (int lCurByte = 0; lCurByte < occurrences; lCurByte++) { if ((lCurByte & 7) != 0) { bits >>>= 1; } else { bits = encode.nextChar(); } lElem.append((bits & 1) != 0 ? '1' : '0'); } result.append(runtime.newString(lElem.toString())); } break; case 'B' : { if (occurrences == IS_STAR || occurrences > encode.remaining() * 8) { occurrences = encode.remaining() * 8; } int bits = 0; StringBuffer lElem = new StringBuffer(occurrences); for (int lCurByte = 0; lCurByte < occurrences; lCurByte++) { if ((lCurByte & 7) != 0) bits <<= 1; else bits = encode.nextChar(); lElem.append((bits & 128) != 0 ? '1' : '0'); } result.append(runtime.newString(lElem.toString())); } break; case 'h' : { if (occurrences == IS_STAR || occurrences > encode.remaining() * 2) { occurrences = encode.remaining() * 2; } int bits = 0; StringBuffer lElem = new StringBuffer(occurrences); for (int lCurByte = 0; lCurByte < occurrences; lCurByte++) { if ((lCurByte & 1) != 0) { bits >>>= 4; } else { bits = encode.nextChar(); } lElem.append(sHexDigits[bits & 15]); } result.append(runtime.newString(lElem.toString())); } break; case 'H' : { if (occurrences == IS_STAR || occurrences > encode.remaining() * 2) { occurrences = encode.remaining() * 2; } int bits = 0; StringBuffer lElem = new StringBuffer(occurrences); for (int lCurByte = 0; lCurByte < occurrences; lCurByte++) { if ((lCurByte & 1) != 0) bits <<= 4; else bits = encode.nextChar(); lElem.append(sHexDigits[(bits >>> 4) & 15]); } result.append(runtime.newString(lElem.toString())); } break; case 'U' : { if (occurrences == IS_STAR || occurrences > encode.remaining()) { occurrences = encode.remaining(); } //get the correct substring String toUnpack = encode.nextSubstring(occurrences); String lUtf8 = null; try { lUtf8 = new String(toUnpack.getBytes("iso8859-1"), "UTF-8"); } catch (java.io.UnsupportedEncodingException e) { assert false : "can't convert from UTF8"; } char[] c = lUtf8.toCharArray(); for (int lCurCharIdx = 0; occurrences-- > 0 && lCurCharIdx < c.length; lCurCharIdx++) result.append(runtime.newFixnum(c[lCurCharIdx])); } break; case 'X': if (occurrences == IS_STAR) { occurrences = encode.getLength() - encode.remaining(); } try { encode.backup(occurrences); } catch (IllegalArgumentException e) { throw runtime.newArgumentError("in `unpack': X outside of string"); } break; case 'x': if (occurrences == IS_STAR) { occurrences = encode.remaining(); } try { encode.nextSubstring(occurrences); } catch (IllegalArgumentException e) { throw runtime.newArgumentError("in `unpack': x outside of string"); } break; } type = next; } return result; }
1060 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1060/415b1e0db282c02d672a7e34a34a2bea0f69ccb2/Pack.java/clean/src/org/jruby/util/Pack.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 760, 19817, 1076, 6167, 12, 780, 3749, 780, 16, 2398, 19817, 780, 27107, 13, 288, 3639, 15908, 10340, 3099, 273, 27107, 18, 588, 5576, 5621, 3639, 19817, 1076, 563, 273, 3099, 18, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 760, 19817, 1076, 6167, 12, 780, 3749, 780, 16, 2398, 19817, 780, 27107, 13, 288, 3639, 15908, 10340, 3099, 273, 27107, 18, 588, 5576, 5621, 3639, 19817, 1076, 563, 273, 3099, 18, 2...
return false;
return preIncrement;
public boolean isPreBuildIncrementer() { return false; }
55334 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55334/43efbb485915c9b443ae653f9b64f16bd045ca3f/DefaultLabelIncrementer.java/clean/main/src/net/sourceforge/cruisecontrol/labelincrementers/DefaultLabelIncrementer.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 1250, 353, 1386, 3116, 10798, 264, 1435, 288, 3639, 327, 675, 10798, 31, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 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, 377, 1071, 1250, 353, 1386, 3116, 10798, 264, 1435, 288, 3639, 327, 675, 10798, 31, 565, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
public RepositorySettingsPage() { super(LABEL); super.setTitle(TITLE); super.setDescription(LABEL_WARNING);
public RepositorySettingsPage(String title, String description) { super(title); super.setTitle(title); super.setDescription(description);
public RepositorySettingsPage() { super(LABEL); super.setTitle(TITLE); super.setDescription(LABEL_WARNING); }
51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/2449a22c60a14a98459f28b18202951cfec74a33/RepositorySettingsPage.java/buggy/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/wizards/RepositorySettingsPage.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 6281, 2628, 1964, 1435, 288, 202, 202, 9565, 12, 13545, 1769, 202, 202, 9565, 18, 542, 4247, 12, 14123, 1769, 202, 202, 9565, 18, 542, 3291, 12, 13545, 67, 9511, 1769, 202, 97...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 6281, 2628, 1964, 1435, 288, 202, 202, 9565, 12, 13545, 1769, 202, 202, 9565, 18, 542, 4247, 12, 14123, 1769, 202, 202, 9565, 18, 542, 3291, 12, 13545, 67, 9511, 1769, 202, 97...
protected void declaration( Object container ) throws Exception {
protected void declaration( Object container ) throws Backtrack {
protected void declaration( Object container ) throws Exception { switch (LT(1)) { case Token.t_asm: // asmDefinition( ); consume(); return; case Token.t_namespace: // namespaceDefinition(); consume(); return; case Token.t_using: // usingDeclaration(); consume(); return; case Token.t_export: case Token.t_template: // templateDeclaration(); consume(); return; case Token.t_extern: if (LT(2) == Token.tSTRING) { // linkageSpecification(); consume(); return; } // else drop through default: simpleDeclaration( container ); } }
54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/21e625463ac72cd0c38a44efef717152428f5f14/Parser.java/buggy/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/Parser.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1117, 918, 8266, 12, 1033, 1478, 262, 1216, 1185, 288, 202, 202, 9610, 261, 12050, 12, 21, 3719, 288, 1082, 202, 3593, 3155, 18, 88, 67, 23522, 30, 9506, 202, 759, 20415, 1852, 12,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1117, 918, 8266, 12, 1033, 1478, 262, 1216, 1185, 288, 202, 202, 9610, 261, 12050, 12, 21, 3719, 288, 1082, 202, 3593, 3155, 18, 88, 67, 23522, 30, 9506, 202, 759, 20415, 1852, 12,...
} catch (DBException dbe) { LOG.warn(dbe);
public boolean removeCollection(User user, String name) throws PermissionDeniedException { if (readOnly) throw new PermissionDeniedException("database is read-only"); try { if (!name.startsWith("/db")) name = "/db" + name; Collection collection = getCollection(name); if (collection == null) { LOG.debug("collection " + name + " not found!"); return false; } Collection parent = collection.getParent(); if (!collection.getPermissions().validate(user, Permission.WRITE)) throw new PermissionDeniedException("not allowed to remove collection"); ((NativeTextEngine) textEngine).removeCollection(collection); LOG.debug("removing elements ..."); short collectionId = collection.getId(); Value ref = new ElementValue(collectionId); IndexQuery query = new IndexQuery(null, IndexQuery.TRUNC_RIGHT, ref); Lock lock = elementsDb.getLock(); try { lock.acquire(this, Lock.WRITE_LOCK); lock.enter(this); ArrayList elements = elementsDb.findKeys(query); LOG.debug("found " + elements.size() + " elements."); Value val; for (Iterator i = elements.iterator(); i.hasNext();) { val = (Value) i.next(); elementsDb.remove(val.getAddress()); elementsDb.removeValue(val); } } catch (LockException e) { LOG.error("could not acquire lock on elements index", e); } finally { lock.release(this); } elementPool.clear(); if (parent != null) { parent.removeCollection(name.substring(name.lastIndexOf("/") + 1)); saveCollection(parent); } String childCollection; LOG.debug("removing sub-collections"); for (Iterator i = collection.collectionIterator(); i.hasNext();) { childCollection = (String) i.next(); removeCollection( (name.equals("/") ? "/" + childCollection : name + "/" + childCollection)); } // if this is not the root collection remove it completely if (name.equals("/db")) saveCollection(collection); else { Value key; try { key = new Value(name.getBytes("UTF-8")); } catch (UnsupportedEncodingException uee) { key = new Value(name.getBytes()); } synchronized (collectionsDb) { collectionsDb.remove(key); } } LOG.debug("removed collection ..."); LOG.debug("removing dom ..."); DocumentImpl doc; for (Iterator i = collection.iterator(); i.hasNext();) { doc = (DocumentImpl) i.next(); synchronized (domDb) { NodeList children = doc.getChildNodes(); NodeImpl node; for (int j = 0; j < children.getLength(); j++) { node = (NodeImpl) children.item(j); Iterator k = getDOMIterator(doc, node.getGID()); removeNodes(k); } } ref = new NodeRef(doc.getDocId()); query = new IndexQuery(null, IndexQuery.TRUNC_RIGHT, ref); lock = domDb.getLock(); // try to acquire a lock on the file try { lock.acquire(this, Lock.WRITE_LOCK); lock.enter(this); domDb.setOwnerObject(this); ArrayList nodes = domDb.findKeys(query); for (Iterator j = nodes.iterator(); j.hasNext();) { ref = (Value) j.next(); domDb.removeValue(ref); } domDb.flush(); } catch (LockException e) { // timed out e.printStackTrace(); return false; } finally { lock.release(this); } } return true; } catch (IOException ioe) { LOG.warn(ioe); } catch (BTreeException bte) { LOG.warn(bte); } catch (DBException dbe) { LOG.warn(dbe); } catch (ReadOnlyException e) { LOG.warn("database is read-only"); } return false; }
2909 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2909/79512eae28b7219239f4a67965b185d1c560ab43/NativeBroker.java/clean/src/org/exist/storage/NativeBroker.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 1250, 1206, 2532, 12, 1299, 729, 16, 514, 508, 13, 1216, 8509, 15877, 288, 202, 202, 430, 261, 896, 3386, 13, 1082, 202, 12849, 394, 8509, 15877, 2932, 6231, 353, 855, 17, 370...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1206, 2532, 12, 1299, 729, 16, 514, 508, 13, 1216, 8509, 15877, 288, 202, 202, 430, 261, 896, 3386, 13, 1082, 202, 12849, 394, 8509, 15877, 2932, 6231, 353, 855, 17, 370...
&& (this.state == STATE_INSERT || this.state == STATE_WRITE)) {
&& (this.state == STATE_INSERT || this.state == STATE_WRITE || this.state == STATE_DELETE)) {
public void startTransformingElement(String uri, String name, String raw, Attributes attr) throws SAXException, IOException, ProcessingException { if (this.getLogger().isDebugEnabled() == true) { this.getLogger().debug("BEGIN startTransformingElement uri=" + uri + ", name=" + name + ", raw=" + raw + ", attr=" + attr); } // Element: insert if (this.state == STATE_OUTSIDE && (name.equals(INSERT_ELEMENT) || name.equals(WRITE_ELEMENT))) { this.state = (name.equals(INSERT_ELEMENT) ? STATE_INSERT : STATE_WRITE); this.parent_state = this.state; if (attr.getValue(CREATE_ATTRIBUTE) != null && attr.getValue(CREATE_ATTRIBUTE).equals("false")) { this.stack.push("false"); } else { this.stack.push("true"); // default value } if (attr.getValue(OVERWRITE_ATTRIBUTE) != null && attr.getValue(OVERWRITE_ATTRIBUTE).equals("false")) { this.stack.push("false"); } else { this.stack.push("true"); // default value } this.stack.push(attr.getValue(SERIALIZER_ATTRIBUTE)); this.stack.push("END"); // Element: file } else if (name.equals(SOURCE_ELEMENT) && (this.state == STATE_INSERT || this.state == STATE_WRITE)) { this.state = STATE_FILE; this.startTextRecording(); // Element: path } else if (name.equals(PATH_ELEMENT) && (this.state == STATE_INSERT || this.state == STATE_WRITE)) { this.state = STATE_PATH; this.startTextRecording(); // Element: replace } else if (name.equals(REPLACE_ELEMENT) && this.state == STATE_INSERT) { this.state = STATE_REPLACE; this.startTextRecording(); // Element: fragment } else if (name.equals(FRAGMENT_ELEMENT) && (this.state == STATE_INSERT || this.state == STATE_WRITE)) { this.state = STATE_FRAGMENT; this.startRecording(); // Element: reinsert } else if (name.equals(REINSERT_ELEMENT) && this.state == STATE_INSERT) { this.state = STATE_REINSERT; this.startTextRecording(); } else { super.startTransformingElement(uri, name, raw, attr); } if (this.getLogger().isDebugEnabled() == true) { this.getLogger().debug("END startTransformingElement"); } }
46428 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46428/de0639fc09557c41a35a28993f715bf7f8245ee5/SourceWritingTransformer.java/clean/src/java/org/apache/cocoon/transformation/SourceWritingTransformer.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 787, 4059, 310, 1046, 12, 780, 2003, 16, 514, 508, 16, 514, 1831, 16, 9055, 1604, 13, 565, 1216, 14366, 16, 1860, 16, 19652, 503, 288, 3639, 309, 261, 2211, 18, 588, 3328, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 787, 4059, 310, 1046, 12, 780, 2003, 16, 514, 508, 16, 514, 1831, 16, 9055, 1604, 13, 565, 1216, 14366, 16, 1860, 16, 19652, 503, 288, 3639, 309, 261, 2211, 18, 588, 3328, ...
WorkingMemoryImpl workingMemory) throws Exception {
WorkingMemoryImpl workingMemory, boolean noColumnsToken) throws Exception {
final static void evaluateExistsConditions(LeapsTuple tuple, WorkingMemoryImpl workingMemory) throws Exception { FactHandleImpl factHandle; FactTable factTable; TableIterator tableIterator; ColumnConstraints constraint; ColumnConstraints[] exists = tuple.getExistsConstraints(); for (int i = 0, length = exists.length; i < length; i++) { constraint = exists[i]; // scan the whole table factTable = workingMemory .getFactTable(((ClassObjectType) constraint.getColumn() .getObjectType()).getClassType()); tableIterator = factTable.iterator(); // fails if exists while (tableIterator.hasNext()) { factHandle = (FactHandleImpl) tableIterator.next(); // check alphas if (constraint.isAllowed(factHandle, tuple, workingMemory)) { tuple.addExistsFactHandle(factHandle, i); factTable.addTuple(tuple); factHandle.addExistsTuple(tuple, i); } } } }
5490 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5490/fdcfb072ff129fe9333a5cb3c55a2660b41233e3/TokenEvaluator.java/clean/drools-core/src/main/java/org/drools/leaps/TokenEvaluator.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 6385, 760, 918, 5956, 4002, 8545, 12, 1682, 6679, 9038, 3193, 16, 1082, 202, 14836, 6031, 2828, 5960, 6031, 13, 1216, 1185, 288, 202, 202, 9766, 3259, 2828, 5410, 3259, 31, 202, 202,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 6385, 760, 918, 5956, 4002, 8545, 12, 1682, 6679, 9038, 3193, 16, 1082, 202, 14836, 6031, 2828, 5960, 6031, 13, 1216, 1185, 288, 202, 202, 9766, 3259, 2828, 5410, 3259, 31, 202, 202,...
this(token); if (preloadAllMembers) refresh(true);
this.token = token; this.name = token.getCellName(); cellHandle = getCellHandle( name, token.getHandle() ); users = null; userNames = null; groups = null; groupNames = null; servers = null; serverNames = null; cachedInfo = false; tokenExpiration = null;
public Cell( Token token, boolean preloadAllMembers ) throws AFSException { this(token); if (preloadAllMembers) refresh(true); }
46627 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46627/2a4a4f417dd4193df9e0a3deae14aacd3f94ccb1/Cell.java/clean/src/JAVA/classes/org/openafs/jafs/Cell.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 8614, 12, 3155, 1147, 16, 1250, 20941, 1595, 6918, 262, 4202, 1216, 432, 4931, 503, 225, 288, 565, 333, 12, 2316, 1769, 565, 309, 261, 1484, 945, 1595, 6918, 13, 4460, 12, 3767, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 8614, 12, 3155, 1147, 16, 1250, 20941, 1595, 6918, 262, 4202, 1216, 432, 4931, 503, 225, 288, 565, 333, 12, 2316, 1769, 565, 309, 261, 1484, 945, 1595, 6918, 13, 4460, 12, 3767, 1...
super(Messages.getString("ClientGUI.viewMenuItem") + entity.getDisplayName());
super(Messages.getString("ClientGUI.viewMenuItem") + entity.getDisplayName() + (entity.isDone()?" (" + Messages.getString("ClientGUI.doneMenuItem").trim() + ")":""));
public ViewMenuItem(Entity entity) { super(Messages.getString("ClientGUI.viewMenuItem") + entity.getDisplayName()); //$NON-NLS-1$ this.entity = entity; addActionListener(this); }
3464 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3464/b2b41e6e367b18cccb53871091b3e56a7edf983c/ClientGUI.java/buggy/megamek/src/megamek/client/ui/AWT/ClientGUI.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 540, 1071, 4441, 12958, 12, 1943, 1522, 13, 288, 5411, 2240, 12, 5058, 18, 588, 780, 2932, 1227, 43, 5370, 18, 1945, 12958, 7923, 397, 1522, 18, 588, 20524, 1435, 397, 261, 1096, 18, 291, 73...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 540, 1071, 4441, 12958, 12, 1943, 1522, 13, 288, 5411, 2240, 12, 5058, 18, 588, 780, 2932, 1227, 43, 5370, 18, 1945, 12958, 7923, 397, 1522, 18, 588, 20524, 1435, 397, 261, 1096, 18, 291, 73...
SimpleFieldSet sfs = new SimpleFieldSet();
SimpleFieldSet sfs = new SimpleFieldSet(false);
public SimpleFieldSet getFieldSet() { SimpleFieldSet sfs = new SimpleFieldSet(); if(ident != null) sfs.put("Identifier", ident); sfs.put("Code", Integer.toString(code)); sfs.put("CodeDescription", codeDescription()); if(extra != null) sfs.put("ExtraDescription", extra); sfs.put("Fatal", Boolean.toString(fatal)); return sfs; }
46035 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46035/2d2b5012400f5bab60d65d3d26d67efa9cf7d1d6/ProtocolErrorMessage.java/buggy/src/freenet/node/fcp/ProtocolErrorMessage.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 4477, 974, 694, 5031, 694, 1435, 288, 202, 202, 5784, 974, 694, 272, 2556, 273, 394, 4477, 974, 694, 5621, 202, 202, 430, 12, 6392, 480, 446, 13, 1082, 202, 87, 2556, 18, 45...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 4477, 974, 694, 5031, 694, 1435, 288, 202, 202, 5784, 974, 694, 272, 2556, 273, 394, 4477, 974, 694, 5621, 202, 202, 430, 12, 6392, 480, 446, 13, 1082, 202, 87, 2556, 18, 45...
stringBuffer.append(TEXT_121);
stringBuffer.append(TEXT_123);
public String generate(Object argument) { final StringBuffer stringBuffer = new StringBuffer(); final GenDiagram genDiagram = (GenDiagram) ((Object[]) argument)[0];final ImportAssistant importManager = (ImportAssistant) ((Object[]) argument)[1];final GenEditorGenerator editorGen = genDiagram.getEditorGen();final GenModel genModel = editorGen.getDomainGenModel();final String pluginActivatorClass = importManager.getImportedName(editorGen.getPlugin().getActivatorQualifiedClassName());final boolean isRichClientPlatform = genDiagram.getEditorGen().getDomainGenModel().isRichClientPlatform(); stringBuffer.append(TEXT_1); String copyrightText = genDiagram.getEditorGen().getCopyrightText();if (copyrightText != null && copyrightText.trim().length() > 0) { stringBuffer.append(TEXT_2); stringBuffer.append(copyrightText.replaceAll("\n", "\n * ")); stringBuffer.append(TEXT_3); } importManager.emitPackageStatement(stringBuffer);importManager.markImportLocation(stringBuffer);importManager.registerInnerClass("RootElementSelectorPage");if (isRichClientPlatform) { importManager.registerInnerClass("URISelectorPage"); importManager.registerInnerClass("SourceURISelectorPage"); importManager.registerInnerClass("DiagramURISelectorPage");} stringBuffer.append(TEXT_4); class FeatureGetAccessorHelper { /** * @param containerName the name of the container * @param feature the feature whose value is in interest * @param containerMetaClass the <code>GenClass</code> of the container, or <code>null</code>, if the container is declared as an <code>EObject</code>. * @param needsCastToResultType whether the cast to the result type is required (this parameter is only used if the <code>EClass</code> this feature belongs to is an external interface). */ public void appendFeatureValueGetter(String containerName, GenFeature feature, GenClass containerMetaClass, boolean needsCastToResultType) { if (feature.getGenClass().isExternalInterface()) { boolean needsCastToEObject = containerMetaClass != null && containerMetaClass.isExternalInterface(); if (needsCastToResultType) { stringBuffer.append(TEXT_5); stringBuffer.append(importManager.getImportedName(feature.isListType() ? "java.util.Collection" : feature.getTypeGenClass().getQualifiedInterfaceName())); stringBuffer.append(TEXT_6); } if (needsCastToEObject) { stringBuffer.append(TEXT_7); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); stringBuffer.append(TEXT_8); } stringBuffer.append(containerName); if (needsCastToEObject) { stringBuffer.append(TEXT_9); } stringBuffer.append(TEXT_10); stringBuffer.append(importManager.getImportedName(feature.getGenPackage().getQualifiedPackageInterfaceName())); stringBuffer.append(TEXT_11); stringBuffer.append(feature.getFeatureAccessorName()); stringBuffer.append(TEXT_12); if (needsCastToResultType) { stringBuffer.append(TEXT_13); } } else { boolean needsCastToFeatureGenType = containerMetaClass == null || containerMetaClass.isExternalInterface(); if (needsCastToFeatureGenType) { stringBuffer.append(TEXT_14); stringBuffer.append(importManager.getImportedName(feature.getGenClass().getQualifiedInterfaceName())); stringBuffer.append(TEXT_15); } stringBuffer.append(containerName); if (needsCastToFeatureGenType) { stringBuffer.append(TEXT_16); } stringBuffer.append(TEXT_17); stringBuffer.append(feature.getGetAccessor()); stringBuffer.append(TEXT_18); } }}final FeatureGetAccessorHelper myFeatureGetAccessorHelper = new FeatureGetAccessorHelper(); stringBuffer.append(TEXT_19); stringBuffer.append(genDiagram.getNewDiagramFileWizardClassName()); stringBuffer.append(TEXT_20); stringBuffer.append(importManager.getImportedName("org.eclipse.jface.wizard.Wizard")); stringBuffer.append(TEXT_21); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); stringBuffer.append(TEXT_22); if (isRichClientPlatform) { stringBuffer.append(TEXT_23); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.util.URI")); stringBuffer.append(TEXT_24); } else { stringBuffer.append(TEXT_25); stringBuffer.append(importManager.getImportedName("org.eclipse.core.resources.IFile")); stringBuffer.append(TEXT_26); stringBuffer.append(importManager.getImportedName("org.eclipse.ui.dialogs.WizardNewFileCreationPage")); stringBuffer.append(TEXT_27); stringBuffer.append(importManager.getImportedName("org.eclipse.ui.IWorkbenchPage")); stringBuffer.append(TEXT_28); stringBuffer.append(importManager.getImportedName("org.eclipse.jface.viewers.IStructuredSelection")); stringBuffer.append(TEXT_29); } stringBuffer.append(TEXT_30); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); stringBuffer.append(TEXT_31); if (isRichClientPlatform) { stringBuffer.append(TEXT_32); stringBuffer.append(genDiagram.getNewDiagramFileWizardClassName()); stringBuffer.append(TEXT_33); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.util.URI")); stringBuffer.append(TEXT_34); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); stringBuffer.append(TEXT_35); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); stringBuffer.append(TEXT_36); } else { stringBuffer.append(TEXT_37); stringBuffer.append(genDiagram.getNewDiagramFileWizardClassName()); stringBuffer.append(TEXT_38); stringBuffer.append(importManager.getImportedName("org.eclipse.core.resources.IFile")); stringBuffer.append(TEXT_39); stringBuffer.append(importManager.getImportedName("org.eclipse.ui.IWorkbenchPage")); stringBuffer.append(TEXT_40); stringBuffer.append(importManager.getImportedName("org.eclipse.jface.viewers.IStructuredSelection")); stringBuffer.append(TEXT_41); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); stringBuffer.append(TEXT_42); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); stringBuffer.append(TEXT_43); stringBuffer.append(genDiagram.getNewDiagramFileWizardClassName()); stringBuffer.append(TEXT_44); stringBuffer.append(genDiagram.getNewDiagramFileWizardClassName()); stringBuffer.append(TEXT_45); stringBuffer.append(genDiagram.getNewDiagramFileWizardClassName()); stringBuffer.append(TEXT_46); stringBuffer.append(genDiagram.getNewDiagramFileWizardClassName()); stringBuffer.append(TEXT_47); } stringBuffer.append(TEXT_48); stringBuffer.append(genDiagram.getNewDiagramFileWizardClassName()); stringBuffer.append(TEXT_49); if (isRichClientPlatform) { stringBuffer.append(TEXT_50); } else { stringBuffer.append(TEXT_51); } stringBuffer.append(TEXT_52); if (isRichClientPlatform) { stringBuffer.append(TEXT_53); } else { stringBuffer.append(TEXT_54); stringBuffer.append(importManager.getImportedName("org.eclipse.ui.dialogs.WizardNewFileCreationPage")); stringBuffer.append(TEXT_55); stringBuffer.append(genModel.getModelName()); stringBuffer.append(TEXT_56); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.widgets.Composite")); stringBuffer.append(TEXT_57); stringBuffer.append(importManager.getImportedName("org.eclipse.core.resources.IContainer")); stringBuffer.append(TEXT_58); stringBuffer.append(editorGen.getDiagramFileExtension()); stringBuffer.append(TEXT_59); stringBuffer.append(importManager.getImportedName("org.eclipse.core.runtime.Path")); stringBuffer.append(TEXT_60); stringBuffer.append(importManager.getImportedName("org.eclipse.core.runtime.Path")); stringBuffer.append(TEXT_61); stringBuffer.append(genModel.getModelName()); stringBuffer.append(TEXT_62); } stringBuffer.append(TEXT_63); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.resource.ResourceSet")); stringBuffer.append(TEXT_64); if (isRichClientPlatform) { stringBuffer.append(TEXT_65); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.util.URI")); stringBuffer.append(TEXT_66); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.resource.Resource")); stringBuffer.append(TEXT_67); } else { stringBuffer.append(TEXT_68); stringBuffer.append(importManager.getImportedName("org.eclipse.core.resources.IFile")); stringBuffer.append(TEXT_69); stringBuffer.append(importManager.getImportedName("org.eclipse.core.runtime.NullProgressMonitor")); stringBuffer.append(TEXT_70); stringBuffer.append(importManager.getImportedName("org.eclipse.core.runtime.CoreException")); stringBuffer.append(TEXT_71); stringBuffer.append(pluginActivatorClass); stringBuffer.append(TEXT_72); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.resource.Resource")); stringBuffer.append(TEXT_73); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.util.URI")); stringBuffer.append(TEXT_74); } stringBuffer.append(TEXT_75); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.AbstractCommand")); stringBuffer.append(TEXT_76); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.AbstractCommand")); stringBuffer.append(TEXT_77); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Diagram")); stringBuffer.append(TEXT_78); stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())); stringBuffer.append(TEXT_79); stringBuffer.append(importManager.getImportedName(genDiagram.getEditPartQualifiedClassName())); stringBuffer.append(TEXT_80); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationFactory")); stringBuffer.append(TEXT_81); stringBuffer.append(importManager.getImportedName(genDiagram.getNotationViewFactoryQualifiedClassName())); stringBuffer.append(TEXT_82); if (editorGen.isSameFileForDiagramAndModel()) { stringBuffer.append(TEXT_83); } stringBuffer.append(TEXT_84); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand")); stringBuffer.append(TEXT_85); stringBuffer.append(importManager.getImportedName("java.util.Collections")); stringBuffer.append(TEXT_86); if (isRichClientPlatform) { stringBuffer.append(TEXT_87); stringBuffer.append(importManager.getImportedName("org.eclipse.ui.IEditorPart")); stringBuffer.append(TEXT_88); stringBuffer.append(importManager.getImportedName(genDiagram.getDiagramEditorUtilQualifiedClassName())); stringBuffer.append(TEXT_89); } else { stringBuffer.append(TEXT_90); stringBuffer.append(importManager.getImportedName("org.eclipse.ui.IEditorPart")); stringBuffer.append(TEXT_91); stringBuffer.append(importManager.getImportedName("org.eclipse.ui.ide.IDE")); stringBuffer.append(TEXT_92); } stringBuffer.append(TEXT_93); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.services.IDiagramLayouter")); stringBuffer.append(TEXT_94); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.services.IDiagramLayouter")); stringBuffer.append(TEXT_95); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.services.IDiagramLayouter")); stringBuffer.append(TEXT_96); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.GraphicalViewer")); stringBuffer.append(TEXT_97); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.GraphicalViewer")); stringBuffer.append(TEXT_98); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.GraphicalViewer")); stringBuffer.append(TEXT_99); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command")); stringBuffer.append(TEXT_100); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.GraphicalEditPart")); stringBuffer.append(TEXT_101); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand")); stringBuffer.append(TEXT_102); stringBuffer.append(importManager.getImportedName("java.io.IOException")); stringBuffer.append(TEXT_103); if (isRichClientPlatform) { stringBuffer.append(TEXT_104); stringBuffer.append(pluginActivatorClass); stringBuffer.append(TEXT_105); } else { stringBuffer.append(TEXT_106); stringBuffer.append(pluginActivatorClass); stringBuffer.append(TEXT_107); stringBuffer.append(importManager.getImportedName("org.eclipse.ui.PartInitException")); stringBuffer.append(TEXT_108); stringBuffer.append(pluginActivatorClass); stringBuffer.append(TEXT_109); } stringBuffer.append(TEXT_110); stringBuffer.append(TEXT_111); stringBuffer.append(TEXT_112); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Diagram")); stringBuffer.append(TEXT_113); stringBuffer.append(genDiagram.getUniqueIdentifier()); stringBuffer.append(TEXT_114); if(!genDiagram.getLinks().isEmpty()) { stringBuffer.append(TEXT_115); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.NaiveViewService")); stringBuffer.append(TEXT_116); stringBuffer.append(genDiagram.getUniqueIdentifier()); stringBuffer.append(TEXT_117); } stringBuffer.append(TEXT_118); final Comparator<GenContainerBase> comparator = new Comparator<GenContainerBase>() { public int compare(GenContainerBase o1, GenContainerBase o2) { return o1.getVisualID() - o2.getVisualID(); }};TreeSet<GenContainerBase> containers2Generate = new TreeSet<GenContainerBase>(comparator);for (Iterator containers = genDiagram.getAllContainers().iterator(); containers.hasNext();) { GenContainerBase nextContainer = (GenContainerBase) containers.next(); if (!nextContainer.getContainedNodes().isEmpty()) { containers2Generate.add(nextContainer); continue; } if (nextContainer instanceof GenDiagram) { containers2Generate.add(nextContainer); continue; } if (nextContainer instanceof GenNode) { //May need to generate if contains compartments with children for(Iterator compartments = ((GenNode) nextContainer).getCompartments().iterator(); compartments.hasNext(); ) { GenCompartment nextCompartment = (GenCompartment) compartments.next(); if (!nextCompartment.getContainedNodes().isEmpty()) { containers2Generate.add(nextContainer); break; } } }}for (Iterator<GenContainerBase> containers = containers2Generate.iterator(); containers.hasNext();) { GenContainerBase nextContainer = containers.next(); stringBuffer.append(TEXT_119); stringBuffer.append(nextContainer.getUniqueIdentifier()); stringBuffer.append(TEXT_120); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); stringBuffer.append(TEXT_121); if (nextContainer instanceof GenNode) { boolean shouldIterateOverCompartments = false; for(Iterator compartments = ((GenNode) nextContainer).getCompartments().iterator(); compartments.hasNext(); ) { GenCompartment nextCompartment = (GenCompartment) compartments.next(); if (!nextCompartment.getContainedNodes().isEmpty()) { shouldIterateOverCompartments = true; break; } } if (shouldIterateOverCompartments) { stringBuffer.append(TEXT_122); stringBuffer.append(importManager.getImportedName("java.util.Iterator")); stringBuffer.append(TEXT_123); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); stringBuffer.append(TEXT_124); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); stringBuffer.append(TEXT_125); stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())); stringBuffer.append(TEXT_126); for(Iterator compartments = ((GenNode) nextContainer).getCompartments().iterator(); compartments.hasNext(); ) { GenCompartment nextCompartment = (GenCompartment) compartments.next(); if (nextCompartment.getContainedNodes().isEmpty()) { continue; } stringBuffer.append(TEXT_127); stringBuffer.append(importManager.getImportedName(nextCompartment.getEditPartQualifiedClassName())); stringBuffer.append(TEXT_128); stringBuffer.append(nextCompartment.getUniqueIdentifier()); stringBuffer.append(TEXT_129); } stringBuffer.append(TEXT_130); } } stringBuffer.append(TEXT_131); stringBuffer.append(importManager.getImportedName("java.util.List")); stringBuffer.append(TEXT_132); stringBuffer.append(nextContainer.getUniqueIdentifier()); stringBuffer.append(TEXT_133); stringBuffer.append(importManager.getImportedName("java.util.Iterator")); stringBuffer.append(TEXT_134); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ElementDescriptor")); stringBuffer.append(TEXT_135); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ElementDescriptor")); stringBuffer.append(TEXT_136); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.CreateNotationalElementCommand")); stringBuffer.append(TEXT_137); stringBuffer.append(nextContainer.getUniqueIdentifier()); stringBuffer.append(TEXT_138); boolean shouldIterateToGenerate = false; for(Iterator containedNodes = nextContainer.getContainedNodes().iterator(); containedNodes.hasNext(); ) { GenNode nextNode = (GenNode) containedNodes.next(); if (containers2Generate.contains(nextNode)) { shouldIterateToGenerate = true; break; } } if (shouldIterateToGenerate) { stringBuffer.append(TEXT_139); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); stringBuffer.append(TEXT_140); for(Iterator containedNodes = nextContainer.getContainedNodes().iterator(); containedNodes.hasNext(); ) { GenNode nextNode = (GenNode) containedNodes.next(); if (containers2Generate.contains(nextNode)) { stringBuffer.append(TEXT_141); stringBuffer.append(importManager.getImportedName(nextNode.getEditPartQualifiedClassName())); stringBuffer.append(TEXT_142); stringBuffer.append(nextNode.getUniqueIdentifier()); stringBuffer.append(TEXT_143); } } stringBuffer.append(TEXT_144); } stringBuffer.append(TEXT_145); stringBuffer.append(importManager.getImportedName("java.util.List")); stringBuffer.append(TEXT_146); stringBuffer.append(nextContainer.getUniqueIdentifier()); stringBuffer.append(TEXT_147); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); stringBuffer.append(TEXT_148); { String _getViewCode = "parentView"; List childNodes = nextContainer.getContainedNodes(); stringBuffer.append(TEXT_149); if (childNodes.size() == 0) { stringBuffer.append(TEXT_150); stringBuffer.append(importManager.getImportedName("java.util.Collections")); stringBuffer.append(TEXT_151); } else { stringBuffer.append(TEXT_152); stringBuffer.append(importManager.getImportedName("java.util.List")); stringBuffer.append(TEXT_153); stringBuffer.append(importManager.getImportedName("java.util.LinkedList")); stringBuffer.append(TEXT_154); Map genFeature2genNodeMap = new LinkedHashMap(); for (int nodeIndex = 0; nodeIndex < childNodes.size(); nodeIndex++) { GenNode nextNode = (GenNode) childNodes.get(nodeIndex); TypeModelFacet typeModelFacet = nextNode.getModelFacet(); if (typeModelFacet == null) { continue; } GenFeature childMetaFeature = typeModelFacet.getChildMetaFeature(); if (!genFeature2genNodeMap.containsKey(childMetaFeature)) { genFeature2genNodeMap.put(childMetaFeature, new ArrayList()); } ((Collection) genFeature2genNodeMap.get(childMetaFeature)).add(nextNode); } Set entrySet = genFeature2genNodeMap.entrySet(); if (entrySet.size() > 0) { stringBuffer.append(TEXT_155); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); stringBuffer.append(TEXT_156); stringBuffer.append(_getViewCode); stringBuffer.append(TEXT_157); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); stringBuffer.append(TEXT_158); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); stringBuffer.append(TEXT_159); } for (Iterator entries = entrySet.iterator(); entries.hasNext();) { Map.Entry nextEntry = (Map.Entry) entries.next(); GenFeature childMetaFeature = (GenFeature) nextEntry.getKey(); Collection genNodesCollection = (Collection) nextEntry.getValue(); if (childMetaFeature.isListType()) { stringBuffer.append(TEXT_160); stringBuffer.append(importManager.getImportedName("java.util.Iterator")); stringBuffer.append(TEXT_161); myFeatureGetAccessorHelper.appendFeatureValueGetter("modelObject", childMetaFeature, null, true); stringBuffer.append(TEXT_162); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); stringBuffer.append(TEXT_163); } else { stringBuffer.append(TEXT_164); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); stringBuffer.append(TEXT_165); myFeatureGetAccessorHelper.appendFeatureValueGetter("modelObject", childMetaFeature, null, false); stringBuffer.append(TEXT_166); } stringBuffer.append(TEXT_167); stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())); stringBuffer.append(TEXT_168); boolean generateSwitch = genNodesCollection.size() != 1; if (generateSwitch) { stringBuffer.append(TEXT_169); } for (Iterator genNodesIterator = genNodesCollection.iterator(); genNodesIterator.hasNext();) { GenNode nextNode = (GenNode) genNodesIterator.next(); if (generateSwitch) { stringBuffer.append(TEXT_170); stringBuffer.append(importManager.getImportedName(nextNode.getEditPartQualifiedClassName())); stringBuffer.append(TEXT_171); } else { stringBuffer.append(TEXT_172); stringBuffer.append(importManager.getImportedName(nextNode.getEditPartQualifiedClassName())); stringBuffer.append(TEXT_173); } stringBuffer.append(TEXT_174); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ElementDescriptor")); stringBuffer.append(TEXT_175); if (generateSwitch) { stringBuffer.append(TEXT_176); } else { stringBuffer.append(TEXT_177); } } if (generateSwitch) { stringBuffer.append(TEXT_178); } if (childMetaFeature.isListType()) { stringBuffer.append(TEXT_179); }} stringBuffer.append(TEXT_180); } } stringBuffer.append(TEXT_181); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.CreateNotationalElementCommand")); stringBuffer.append(TEXT_182); stringBuffer.append(nextContainer.getUniqueIdentifier()); stringBuffer.append(TEXT_183); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); stringBuffer.append(TEXT_184); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ElementDescriptor")); stringBuffer.append(TEXT_185); { String _parentNode = "parentView"; List childNodes = nextContainer.getContainedNodes(); boolean isListLayout; if (nextContainer instanceof GenNode) { isListLayout = !org.eclipse.gmf.codegen.gmfgen.util.ViewmapLayoutTypeHelper.getSharedInstance().isStoringChildPositions((GenNode) nextContainer); } else if (nextContainer instanceof GenCompartment) { isListLayout = ((GenCompartment) nextContainer).isListLayout(); } else if (nextContainer instanceof GenDiagram) { isListLayout = false; } else { throw new RuntimeException("Unexpected container"); } stringBuffer.append(TEXT_186); stringBuffer.append(TEXT_187); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); stringBuffer.append(TEXT_188); for (Iterator it = childNodes.iterator(); it.hasNext(); ) { GenNode nextNode = (GenNode) it.next(); TypeModelFacet typeModelFacet = nextNode.getModelFacet(); if (typeModelFacet == null) { continue; } String childNodeInterfaceName = importManager.getImportedName(nextNode.getDomainMetaClass().getQualifiedInterfaceName()); stringBuffer.append(TEXT_189); stringBuffer.append(importManager.getImportedName(nextNode.getEditPartQualifiedClassName())); stringBuffer.append(TEXT_190); stringBuffer.append(childNodeInterfaceName); stringBuffer.append(TEXT_191); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.CreateNotationalNodeCommand")); stringBuffer.append(TEXT_192); stringBuffer.append(_parentNode); stringBuffer.append(TEXT_193); if (!isListLayout) { int defaultWidth = 40; int defaultHeight = 40; DefaultSizeAttributes defSizeAttrs = (DefaultSizeAttributes) nextNode.getViewmap().find(DefaultSizeAttributes.class); if (defSizeAttrs != null) { defaultWidth = defSizeAttrs.getWidth(); defaultHeight = defSizeAttrs.getHeight(); } stringBuffer.append(TEXT_194); stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle")); stringBuffer.append(TEXT_195); stringBuffer.append(defaultWidth); stringBuffer.append(TEXT_196); stringBuffer.append(defaultHeight); stringBuffer.append(TEXT_197); } else { stringBuffer.append(TEXT_198); } stringBuffer.append(TEXT_199); stringBuffer.append(importManager.getImportedName(nextNode.getNotationViewFactoryQualifiedClassName())); stringBuffer.append(TEXT_200); } stringBuffer.append(TEXT_201); } stringBuffer.append(TEXT_202); }class LinksCollection { private Collection<GenLink> myTypeModelFacetLinks = new LinkedList<GenLink>(); private Collection<GenLink> myFeatureModelFacetLinks = new LinkedList<GenLink>(); public void add(GenLink link) { if (link.getModelFacet() instanceof TypeLinkModelFacet) { myTypeModelFacetLinks.add(link); } else if (link.getModelFacet() instanceof FeatureLinkModelFacet) { myFeatureModelFacetLinks.add(link); } } public Iterator<GenLink> getContainedTypeModelFacetLinks() { return myTypeModelFacetLinks.iterator(); } public Iterator<GenLink> getContainedFeatureModelFacetLinks() { return myFeatureModelFacetLinks.iterator(); }}class CreateChildLinkElements { private TreeMap<GenContainerBase, LinksCollection> myElements; public CreateChildLinkElements() { myElements = new TreeMap<GenContainerBase, LinksCollection>(comparator); } public void add(GenContainerBase o, GenLink link) { buildAncestors(o); myElements.get(o).add(link); } private void buildAncestors(GenContainerBase o) { if (!myElements.containsKey(o)) { LinksCollection elements = new LinksCollection(); myElements.put(o, elements); addAncestors(o); } } private void addAncestors(GenContainerBase o) { if (o instanceof GenCompartment) { GenCompartment compartment = (GenCompartment) o; buildAncestors(compartment.getNode()); } else if (o instanceof GenTopLevelNode) { GenTopLevelNode node = (GenTopLevelNode) o; buildAncestors(node.getDiagram()); } else if (o instanceof GenChildNode) { GenChildNode node = (GenChildNode) o; for(Iterator it = node.getContainers().iterator(); it.hasNext(); ) { GenContainerBase next = (GenContainerBase) it.next(); buildAncestors(next); } } } public boolean contains(GenContainerBase o) { return myElements.containsKey(o); } public Iterator<Map.Entry<GenContainerBase, LinksCollection>> iterator() { return myElements.entrySet().iterator(); }}if (!genDiagram.getLinks().isEmpty()) { CreateChildLinkElements linkContainers2Generate = new CreateChildLinkElements(); //No need to explicitly add diagram, since we build the whole hierarchy up. for(Iterator links = genDiagram.getLinks().iterator(); links.hasNext(); ) { GenLink next = (GenLink) links.next(); GenClass containerClass; LinkModelFacet nextModelFacet = next.getModelFacet(); if (nextModelFacet instanceof TypeLinkModelFacet) { TypeLinkModelFacet modelFacet = (TypeLinkModelFacet) next.getModelFacet(); if (modelFacet.getSourceMetaFeature() == null && modelFacet.getTargetMetaFeature() == null) { //if one link feature is null, the element is treated as this end of the link. If both are null, we cannot do anything about such a link. containerClass = null; } else { containerClass = modelFacet.getContainmentMetaFeature().getGenClass(); } } else if (nextModelFacet instanceof FeatureLinkModelFacet) { GenFeature metaFeature = ((FeatureModelFacet) next.getModelFacet()).getMetaFeature(); containerClass = metaFeature.getGenClass(); } else { continue; } for (Iterator nodes = genDiagram.getAllNodes().iterator(); nodes.hasNext(); ) { GenNode nextNode = (GenNode) nodes.next(); if (containerClass.getEcoreClass().isSuperTypeOf(nextNode.getDomainMetaClass().getEcoreClass())) { linkContainers2Generate.add(nextNode, next); } } } for(Iterator<Map.Entry<GenContainerBase, LinksCollection>> entryIt = linkContainers2Generate.iterator(); entryIt.hasNext(); ) { Map.Entry<GenContainerBase, LinksCollection> next = entryIt.next(); GenContainerBase nextContainer = next.getKey(); LinksCollection linksCollection = next.getValue(); Iterator<GenLink> typeModelFacetLinks = linksCollection.getContainedTypeModelFacetLinks(); Iterator<GenLink> featureModelFacetLinks = linksCollection.getContainedFeatureModelFacetLinks(); stringBuffer.append(TEXT_203); stringBuffer.append(nextContainer.getUniqueIdentifier()); stringBuffer.append(TEXT_204); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); stringBuffer.append(TEXT_205); if (typeModelFacetLinks.hasNext() || featureModelFacetLinks.hasNext()) { stringBuffer.append(TEXT_206); stringBuffer.append(importManager.getImportedName("java.util.List")); stringBuffer.append(TEXT_207); stringBuffer.append(nextContainer.getUniqueIdentifier()); stringBuffer.append(TEXT_208); stringBuffer.append(importManager.getImportedName("java.util.Iterator")); stringBuffer.append(TEXT_209); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.LinkDescriptor")); stringBuffer.append(TEXT_210); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.LinkDescriptor")); stringBuffer.append(TEXT_211); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.CreateNotationalElementCommand")); stringBuffer.append(TEXT_212); stringBuffer.append(nextContainer.getUniqueIdentifier()); stringBuffer.append(TEXT_213); } boolean shouldIterateToGenerate = false; Collection childElements = new ArrayList(nextContainer.getContainedNodes()); if (nextContainer instanceof GenNode) { childElements.addAll(((GenNode) nextContainer).getCompartments()); } for(Iterator childrenIterator = childElements.iterator(); childrenIterator.hasNext(); ) { GenContainerBase nextChild = (GenContainerBase) childrenIterator.next(); if (linkContainers2Generate.contains(nextChild)) { shouldIterateToGenerate = true; break; } } if (shouldIterateToGenerate) { stringBuffer.append(TEXT_214); stringBuffer.append(importManager.getImportedName("java.util.Iterator")); stringBuffer.append(TEXT_215); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); stringBuffer.append(TEXT_216); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); stringBuffer.append(TEXT_217); stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())); stringBuffer.append(TEXT_218); for(Iterator childrenIterator = childElements.iterator(); childrenIterator.hasNext(); ) { GenContainerBase nextChild = (GenContainerBase) childrenIterator.next(); if (!linkContainers2Generate.contains(nextChild)) { continue; } stringBuffer.append(TEXT_219); stringBuffer.append(importManager.getImportedName(nextChild.getEditPartQualifiedClassName())); stringBuffer.append(TEXT_220); stringBuffer.append(nextChild.getUniqueIdentifier()); stringBuffer.append(TEXT_221); } stringBuffer.append(TEXT_222); } stringBuffer.append(TEXT_223); if (typeModelFacetLinks.hasNext() || featureModelFacetLinks.hasNext()) { stringBuffer.append(TEXT_224); stringBuffer.append(importManager.getImportedName("java.util.List")); stringBuffer.append(TEXT_225); stringBuffer.append(nextContainer.getUniqueIdentifier()); stringBuffer.append(TEXT_226); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); stringBuffer.append(TEXT_227); { String _getViewCode = "parentView"; List childNodes = nextContainer.getContainedNodes(); Iterator<GenLink> _containedTypeModelFacetLinks = linksCollection.getContainedTypeModelFacetLinks();; Iterator<GenLink> _containedFeatureModelFacetLinks = linksCollection.getContainedFeatureModelFacetLinks();; stringBuffer.append(TEXT_228); stringBuffer.append(TEXT_229); stringBuffer.append(importManager.getImportedName("java.util.List")); stringBuffer.append(TEXT_230); stringBuffer.append(importManager.getImportedName("java.util.LinkedList")); stringBuffer.append(TEXT_231); Map genFeature2genLinkMap = new LinkedHashMap();for(Iterator it = _containedTypeModelFacetLinks; it.hasNext(); ) { GenLink genLink = (GenLink)it.next(); TypeLinkModelFacet modelFacet = (TypeLinkModelFacet) genLink.getModelFacet(); GenFeature metaFeature = modelFacet.getChildMetaFeature(); if (!genFeature2genLinkMap.containsKey(metaFeature)) { genFeature2genLinkMap.put(metaFeature, new ArrayList()); } ((Collection) genFeature2genLinkMap.get(metaFeature)).add(genLink);}Map genFeature2featureGenLinkMap = new LinkedHashMap();for(Iterator it = _containedFeatureModelFacetLinks; it.hasNext(); ) { GenLink genLink = (GenLink)it.next(); GenFeature metaFeature = ((FeatureModelFacet) genLink.getModelFacet()).getMetaFeature(); if (!genFeature2featureGenLinkMap.containsKey(metaFeature)) { genFeature2featureGenLinkMap.put(metaFeature, new ArrayList()); } ((Collection) genFeature2featureGenLinkMap.get(metaFeature)).add(genLink);}if (!genFeature2genLinkMap.isEmpty() || !genFeature2featureGenLinkMap.isEmpty()) { stringBuffer.append(TEXT_232); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); stringBuffer.append(TEXT_233); stringBuffer.append(_getViewCode); stringBuffer.append(TEXT_234); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); stringBuffer.append(TEXT_235); }if (!genFeature2genLinkMap.isEmpty()) { stringBuffer.append(TEXT_236); }for (Iterator entries = genFeature2genLinkMap.entrySet().iterator(); entries.hasNext();) { Map.Entry nextEntry = (Map.Entry) entries.next(); GenFeature metaFeature = (GenFeature) nextEntry.getKey(); Collection genLinksCollection = (Collection) nextEntry.getValue(); if (metaFeature.isListType()) { stringBuffer.append(TEXT_237); stringBuffer.append(importManager.getImportedName("java.util.Iterator")); stringBuffer.append(TEXT_238); myFeatureGetAccessorHelper.appendFeatureValueGetter("modelObject", metaFeature, null, true); stringBuffer.append(TEXT_239); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); stringBuffer.append(TEXT_240); } else { stringBuffer.append(TEXT_241); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); stringBuffer.append(TEXT_242); myFeatureGetAccessorHelper.appendFeatureValueGetter("modelObject", metaFeature, null, false); stringBuffer.append(TEXT_243); } stringBuffer.append(TEXT_244); stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())); stringBuffer.append(TEXT_245); boolean generateSwitch = genLinksCollection.size() != 1; if (generateSwitch) { stringBuffer.append(TEXT_246); } for (Iterator genLinksIterator = genLinksCollection.iterator(); genLinksIterator.hasNext(); ) { GenLink nextLink = (GenLink) genLinksIterator.next(); TypeLinkModelFacet modelFacet = (TypeLinkModelFacet) nextLink.getModelFacet(); if (generateSwitch) { stringBuffer.append(TEXT_247); stringBuffer.append(importManager.getImportedName(nextLink.getEditPartQualifiedClassName())); stringBuffer.append(TEXT_248); } else { stringBuffer.append(TEXT_249); stringBuffer.append(importManager.getImportedName(nextLink.getEditPartQualifiedClassName())); stringBuffer.append(TEXT_250); } if (modelFacet.getSourceMetaFeature() != null) { stringBuffer.append(TEXT_251); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); stringBuffer.append(TEXT_252); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); stringBuffer.append(TEXT_253); myFeatureGetAccessorHelper.appendFeatureValueGetter("nextValue", modelFacet.getSourceMetaFeature(), null, false); stringBuffer.append(TEXT_254); } else { stringBuffer.append(TEXT_255); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); stringBuffer.append(TEXT_256); stringBuffer.append(_getViewCode); stringBuffer.append(TEXT_257); } if (modelFacet.getTargetMetaFeature() != null) { stringBuffer.append(TEXT_258); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); stringBuffer.append(TEXT_259); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); stringBuffer.append(TEXT_260); myFeatureGetAccessorHelper.appendFeatureValueGetter("nextValue", modelFacet.getTargetMetaFeature(), null, false); stringBuffer.append(TEXT_261); } else { stringBuffer.append(TEXT_262); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); stringBuffer.append(TEXT_263); stringBuffer.append(_getViewCode); stringBuffer.append(TEXT_264); } stringBuffer.append(TEXT_265); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.LinkDescriptor")); stringBuffer.append(TEXT_266); if (generateSwitch) { stringBuffer.append(TEXT_267); } else { stringBuffer.append(TEXT_268); } } //iterate over genLinksCollection if (generateSwitch) { stringBuffer.append(TEXT_269); } if (metaFeature.isListType()) { stringBuffer.append(TEXT_270); }}for (Iterator entries = genFeature2featureGenLinkMap.entrySet().iterator(); entries.hasNext();) { Map.Entry nextEntry = (Map.Entry) entries.next(); GenFeature metaFeature = (GenFeature) nextEntry.getKey(); Collection genLinksCollection = (Collection) nextEntry.getValue(); if (metaFeature.isListType()) { stringBuffer.append(TEXT_271); stringBuffer.append(importManager.getImportedName("java.util.Iterator")); stringBuffer.append(TEXT_272); myFeatureGetAccessorHelper.appendFeatureValueGetter("modelObject", metaFeature, null, true); stringBuffer.append(TEXT_273); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); stringBuffer.append(TEXT_274); } else { stringBuffer.append(TEXT_275); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); stringBuffer.append(TEXT_276); myFeatureGetAccessorHelper.appendFeatureValueGetter("modelObject", metaFeature, null, false); stringBuffer.append(TEXT_277); } stringBuffer.append(TEXT_278); for (Iterator genLinksIterator = genLinksCollection.iterator(); genLinksIterator.hasNext(); ) { GenLink nextLink = (GenLink) genLinksIterator.next(); stringBuffer.append(TEXT_279); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.LinkDescriptor")); stringBuffer.append(TEXT_280); stringBuffer.append(importManager.getImportedName(nextLink.getEditPartQualifiedClassName())); stringBuffer.append(TEXT_281); } stringBuffer.append(TEXT_282); if (metaFeature.isListType()) { stringBuffer.append(TEXT_283); }} stringBuffer.append(TEXT_284); } stringBuffer.append(TEXT_285); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.CreateNotationalElementCommand")); stringBuffer.append(TEXT_286); stringBuffer.append(nextContainer.getUniqueIdentifier()); stringBuffer.append(TEXT_287); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); stringBuffer.append(TEXT_288); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.LinkDescriptor")); stringBuffer.append(TEXT_289); { String _diagramCode = "parentView.getDiagram()"; Iterator<GenLink> _containedTypeModelFacetLinks = linksCollection.getContainedTypeModelFacetLinks();; Iterator<GenLink> _containedFeatureModelFacetLinks = linksCollection.getContainedFeatureModelFacetLinks();; stringBuffer.append(TEXT_290); stringBuffer.append(TEXT_291); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); stringBuffer.append(TEXT_292); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); stringBuffer.append(TEXT_293); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.services.IViewDecorator")); stringBuffer.append(TEXT_294); for(Iterator it = _containedTypeModelFacetLinks; it.hasNext(); ) { GenLink nextLink = (GenLink) it.next(); TypeLinkModelFacet modelFacet = (TypeLinkModelFacet) nextLink.getModelFacet(); if (modelFacet == null) { continue; } stringBuffer.append(TEXT_295); stringBuffer.append(importManager.getImportedName(nextLink.getEditPartQualifiedClassName())); stringBuffer.append(TEXT_296); stringBuffer.append(importManager.getImportedName(modelFacet.getMetaClass().getQualifiedInterfaceName())); stringBuffer.append(TEXT_297); stringBuffer.append(importManager.getImportedName(nextLink.getNotationViewFactoryQualifiedClassName())); stringBuffer.append(TEXT_298); } for(Iterator it = _containedFeatureModelFacetLinks; it.hasNext(); ) { GenLink nextLink = (GenLink) it.next(); stringBuffer.append(TEXT_299); stringBuffer.append(importManager.getImportedName(nextLink.getEditPartQualifiedClassName())); stringBuffer.append(TEXT_300); stringBuffer.append(importManager.getImportedName(nextLink.getNotationViewFactoryQualifiedClassName())); stringBuffer.append(TEXT_301); } stringBuffer.append(TEXT_302); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.CreateNotationalEdgeCommand")); stringBuffer.append(TEXT_303); stringBuffer.append(_diagramCode); stringBuffer.append(TEXT_304); } stringBuffer.append(TEXT_305); } }}if(!genDiagram.getLinks().isEmpty()) { stringBuffer.append(TEXT_306); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.IViewService")); stringBuffer.append(TEXT_307); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.IViewService")); stringBuffer.append(TEXT_308); } stringBuffer.append(TEXT_309); if (isRichClientPlatform) { stringBuffer.append(TEXT_310); stringBuffer.append(importManager.getImportedName("org.eclipse.jface.wizard.WizardPage")); stringBuffer.append(TEXT_311); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.widgets.Text")); stringBuffer.append(TEXT_312); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.widgets.Composite")); stringBuffer.append(TEXT_313); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.widgets.Composite")); stringBuffer.append(TEXT_314); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.widgets.Composite")); stringBuffer.append(TEXT_315); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.SWT")); stringBuffer.append(TEXT_316); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.layout.GridLayout")); stringBuffer.append(TEXT_317); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.layout.GridLayout")); stringBuffer.append(TEXT_318); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.layout.GridData")); stringBuffer.append(TEXT_319); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.layout.GridData")); stringBuffer.append(TEXT_320); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.layout.GridData")); stringBuffer.append(TEXT_321); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.layout.GridData")); stringBuffer.append(TEXT_322); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.widgets.Label")); stringBuffer.append(TEXT_323); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.widgets.Label")); stringBuffer.append(TEXT_324); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.SWT")); stringBuffer.append(TEXT_325); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.layout.GridData")); stringBuffer.append(TEXT_326); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.layout.GridData")); stringBuffer.append(TEXT_327); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.layout.GridData")); stringBuffer.append(TEXT_328); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.widgets.Composite")); stringBuffer.append(TEXT_329); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.widgets.Composite")); stringBuffer.append(TEXT_330); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.SWT")); stringBuffer.append(TEXT_331); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.layout.GridData")); stringBuffer.append(TEXT_332); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.layout.GridData")); stringBuffer.append(TEXT_333); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.layout.GridData")); stringBuffer.append(TEXT_334); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.layout.GridLayout")); stringBuffer.append(TEXT_335); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.layout.GridLayout")); stringBuffer.append(TEXT_336); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.widgets.Text")); stringBuffer.append(TEXT_337); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.SWT")); stringBuffer.append(TEXT_338); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.layout.GridData")); stringBuffer.append(TEXT_339); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.layout.GridData")); stringBuffer.append(TEXT_340); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.layout.GridData")); stringBuffer.append(TEXT_341); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.widgets.Button")); stringBuffer.append(TEXT_342); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.widgets.Button")); stringBuffer.append(TEXT_343); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.SWT")); stringBuffer.append(TEXT_344); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.events.SelectionAdapter")); stringBuffer.append(TEXT_345); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.events.SelectionEvent")); stringBuffer.append(TEXT_346); stringBuffer.append(importManager.getImportedName(genDiagram.getDiagramEditorUtilQualifiedClassName())); stringBuffer.append(TEXT_347); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.SWT")); stringBuffer.append(TEXT_348); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.events.ModifyListener")); stringBuffer.append(TEXT_349); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.events.ModifyListener")); stringBuffer.append(TEXT_350); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.events.ModifyEvent")); stringBuffer.append(TEXT_351); stringBuffer.append(importManager.getImportedName("java.io.File")); stringBuffer.append(TEXT_352); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.util.URI")); stringBuffer.append(TEXT_353); stringBuffer.append(importManager.getImportedName("java.io.File")); stringBuffer.append(TEXT_354); stringBuffer.append(importManager.getImportedName("java.io.File")); stringBuffer.append(TEXT_355); stringBuffer.append(importManager.getImportedName("java.io.File")); stringBuffer.append(TEXT_356); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.util.URI")); stringBuffer.append(TEXT_357); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.util.URI")); stringBuffer.append(TEXT_358); stringBuffer.append(editorGen.getDomainFileExtension()); stringBuffer.append(TEXT_359); stringBuffer.append(importManager.getImportedName("java.io.File")); stringBuffer.append(TEXT_360); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.util.URI")); stringBuffer.append(TEXT_361); stringBuffer.append(editorGen.getDiagramFileExtension()); stringBuffer.append(TEXT_362); stringBuffer.append(editorGen.getDomainGenModel().getModelName()); stringBuffer.append(TEXT_363); stringBuffer.append(editorGen.getDiagramFileExtension()); stringBuffer.append(TEXT_364); stringBuffer.append(importManager.getImportedName("java.io.File")); stringBuffer.append(TEXT_365); stringBuffer.append(importManager.getImportedName("java.io.File")); stringBuffer.append(TEXT_366); stringBuffer.append(importManager.getImportedName("java.io.File")); stringBuffer.append(TEXT_367); stringBuffer.append(importManager.getImportedName("java.io.File")); stringBuffer.append(TEXT_368); stringBuffer.append(importManager.getImportedName("java.io.File")); stringBuffer.append(TEXT_369); stringBuffer.append(importManager.getImportedName("java.io.File")); stringBuffer.append(TEXT_370); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.util.URI")); stringBuffer.append(TEXT_371); stringBuffer.append(importManager.getImportedName("java.io.File")); stringBuffer.append(TEXT_372); } stringBuffer.append(TEXT_373); stringBuffer.append(importManager.getImportedName("org.eclipse.jface.wizard.WizardPage")); stringBuffer.append(TEXT_374); stringBuffer.append(importManager.getImportedName("org.eclipse.jface.viewers.ISelectionChangedListener")); stringBuffer.append(TEXT_375); if (isRichClientPlatform) { stringBuffer.append(TEXT_376); stringBuffer.append(importManager.getImportedName("org.eclipse.jface.viewers.TreeViewer")); stringBuffer.append(TEXT_377); } stringBuffer.append(TEXT_378); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.widgets.Composite")); stringBuffer.append(TEXT_379); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.widgets.Composite")); stringBuffer.append(TEXT_380); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.widgets.Composite")); stringBuffer.append(TEXT_381); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.SWT")); stringBuffer.append(TEXT_382); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.layout.GridLayout")); stringBuffer.append(TEXT_383); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.layout.GridData")); stringBuffer.append(TEXT_384); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.layout.GridData")); stringBuffer.append(TEXT_385); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.layout.GridData")); stringBuffer.append(TEXT_386); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.widgets.Composite")); stringBuffer.append(TEXT_387); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.widgets.Composite")); stringBuffer.append(TEXT_388); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.widgets.Composite")); stringBuffer.append(TEXT_389); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.SWT")); stringBuffer.append(TEXT_390); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.layout.GridData")); stringBuffer.append(TEXT_391); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.layout.GridData")); stringBuffer.append(TEXT_392); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.layout.GridLayout")); stringBuffer.append(TEXT_393); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.layout.GridLayout")); stringBuffer.append(TEXT_394); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.widgets.Label")); stringBuffer.append(TEXT_395); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.widgets.Label")); stringBuffer.append(TEXT_396); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.SWT")); stringBuffer.append(TEXT_397); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.layout.GridData")); stringBuffer.append(TEXT_398); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.layout.GridData")); stringBuffer.append(TEXT_399); final String treeViewer = isRichClientPlatform ? "myTreeViewer" : "treeViewer"; stringBuffer.append(TEXT_400); if (!isRichClientPlatform){ stringBuffer.append(importManager.getImportedName("org.eclipse.jface.viewers.TreeViewer")); stringBuffer.append(TEXT_401); } stringBuffer.append(treeViewer); stringBuffer.append(TEXT_402); stringBuffer.append(importManager.getImportedName("org.eclipse.jface.viewers.TreeViewer")); stringBuffer.append(TEXT_403); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.SWT")); stringBuffer.append(TEXT_404); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.SWT")); stringBuffer.append(TEXT_405); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.SWT")); stringBuffer.append(TEXT_406); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.SWT")); stringBuffer.append(TEXT_407); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.layout.GridData")); stringBuffer.append(TEXT_408); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.layout.GridData")); stringBuffer.append(TEXT_409); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.layout.GridData")); stringBuffer.append(TEXT_410); stringBuffer.append(treeViewer); stringBuffer.append(TEXT_411); stringBuffer.append(treeViewer); stringBuffer.append(TEXT_412); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider")); stringBuffer.append(TEXT_413); stringBuffer.append(pluginActivatorClass); stringBuffer.append(TEXT_414); stringBuffer.append(treeViewer); stringBuffer.append(TEXT_415); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider")); stringBuffer.append(TEXT_416); stringBuffer.append(pluginActivatorClass); stringBuffer.append(TEXT_417); if (!isRichClientPlatform) { stringBuffer.append(TEXT_418); stringBuffer.append(treeViewer); stringBuffer.append(TEXT_419); stringBuffer.append(treeViewer); stringBuffer.append(TEXT_420); stringBuffer.append(importManager.getImportedName("org.eclipse.jface.viewers.StructuredSelection")); stringBuffer.append(TEXT_421); } stringBuffer.append(TEXT_422); stringBuffer.append(treeViewer); stringBuffer.append(TEXT_423); if (isRichClientPlatform) { stringBuffer.append(TEXT_424); stringBuffer.append(treeViewer); stringBuffer.append(TEXT_425); stringBuffer.append(importManager.getImportedName("org.eclipse.jface.viewers.StructuredSelection")); stringBuffer.append(TEXT_426); } stringBuffer.append(TEXT_427); stringBuffer.append(importManager.getImportedName("org.eclipse.jface.viewers.SelectionChangedEvent")); stringBuffer.append(TEXT_428); stringBuffer.append(importManager.getImportedName("org.eclipse.jface.viewers.IStructuredSelection")); stringBuffer.append(TEXT_429); stringBuffer.append(importManager.getImportedName("org.eclipse.jface.viewers.IStructuredSelection")); stringBuffer.append(TEXT_430); stringBuffer.append(importManager.getImportedName("org.eclipse.jface.viewers.IStructuredSelection")); stringBuffer.append(TEXT_431); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.provider.IWrapperItemProvider")); stringBuffer.append(TEXT_432); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.provider.IWrapperItemProvider")); stringBuffer.append(TEXT_433); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")); stringBuffer.append(TEXT_434); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")); stringBuffer.append(TEXT_435); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); stringBuffer.append(TEXT_436); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); stringBuffer.append(TEXT_437); stringBuffer.append(importManager.getImportedName(genDiagram.getEditPartQualifiedClassName())); stringBuffer.append(TEXT_438); stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())); stringBuffer.append(TEXT_439); importManager.emitSortedImports(); stringBuffer.append(TEXT_440); return stringBuffer.toString(); }
7409 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7409/88670058e3792eb12387f6a2bac58d878ca8f3f6/NewDiagramFileWizardGenerator.java/clean/plugins/org.eclipse.gmf.codegen.lite/src-templates/org/eclipse/gmf/codegen/templates/lite/editor/NewDiagramFileWizardGenerator.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 514, 2103, 12, 921, 1237, 13, 225, 288, 565, 727, 6674, 533, 1892, 273, 394, 6674, 5621, 565, 727, 10938, 14058, 1940, 3157, 14058, 1940, 273, 261, 7642, 14058, 1940, 13, 14015, 921...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 514, 2103, 12, 921, 1237, 13, 225, 288, 565, 727, 6674, 533, 1892, 273, 394, 6674, 5621, 565, 727, 10938, 14058, 1940, 3157, 14058, 1940, 273, 261, 7642, 14058, 1940, 13, 14015, 921...
Context cx = theData.itsCX; Scriptable scope = theData.itsScope;
public static Object interpret(InterpreterData theData) throws JavaScriptException { Object lhs; Object[] stack = new Object[theData.itsMaxStack]; int stackTop = -1; byte[] iCode = theData.itsICode; int pc = 0; int iCodeLength = theData.itsICodeTop; Object[] local = null; // used for newtemp/usetemp etc. if (theData.itsMaxLocals > 0) local = new Object[theData.itsMaxLocals]; Object[] vars = null; final Scriptable undefined = Undefined.instance; int i = theData.itsVariableTable.size(); if (i > 0) { vars = new Object[i]; for (i = 0; i < theData.itsVariableTable.getParameterCount(); i++) { if (i >= theData.itsInArgs.length) vars[i] = undefined; else vars[i] = theData.itsInArgs[i]; } for ( ; i < vars.length; i++) vars[i] = undefined; } Context cx = theData.itsCX; Scriptable scope = theData.itsScope; if (theData.itsNestedFunctions != null) { for (i = 0; i < theData.itsNestedFunctions.length; i++) createFunctionObject(theData.itsNestedFunctions[i], scope); } Object id; Object rhs; int count; int slot; String name = null; Object[] outArgs; int lIntValue; long lLongValue; int rIntValue; int[] catchStack = null; int[] finallyStack = null; Scriptable[] scopeStack = null; int tryStackTop = 0; if (theData.itsMaxTryDepth > 0) { catchStack = new int[theData.itsMaxTryDepth]; finallyStack = new int[theData.itsMaxTryDepth]; scopeStack = new Scriptable[theData.itsMaxTryDepth]; } /* Save the security domain. Must restore upon normal exit. * If we exit the interpreter loop by throwing an exception, * set cx.interpreterSecurityDomain to null, and require the * catching function to restore it. */ Object savedSecurityDomain = cx.interpreterSecurityDomain; cx.interpreterSecurityDomain = theData.securityDomain; Object result = undefined; Scriptable theThisObj = theData.itsThisObj; while (pc < iCodeLength) { try { switch ((int)(iCode[pc] & 0xff)) { case TokenStream.ENDTRY : tryStackTop--; break; case TokenStream.TRY : i = getTarget(iCode, pc + 1); if (i == pc) i = 0; catchStack[tryStackTop] = i; i = getTarget(iCode, pc + 3); if (i == (pc + 2)) i = 0; finallyStack[tryStackTop] = i; scopeStack[tryStackTop++] = scope; pc += 4; break; case TokenStream.GE : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.cmp_LEB(rhs, lhs); break; case TokenStream.LE : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.cmp_LEB(lhs, rhs); break; case TokenStream.GT : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.cmp_LTB(rhs, lhs); break; case TokenStream.LT : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.cmp_LTB(lhs, rhs); break; case TokenStream.IN : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = new Boolean(ScriptRuntime.in(lhs, rhs)); break; case TokenStream.INSTANCEOF : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = new Boolean( ScriptRuntime.instanceOf(scope, lhs, rhs)); break; case TokenStream.EQ : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.eqB(lhs, rhs); break; case TokenStream.NE : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.neB(lhs, rhs); break; case TokenStream.SHEQ : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.seqB(lhs, rhs); break; case TokenStream.SHNE : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.sneB(lhs, rhs); break; case TokenStream.IFNE : if (!ScriptRuntime.toBoolean(stack[stackTop--])) { pc = getTarget(iCode, pc + 1); continue; } pc += 2; break; case TokenStream.IFEQ : if (ScriptRuntime.toBoolean(stack[stackTop--])) { pc = getTarget(iCode, pc + 1); continue; } pc += 2; break; case TokenStream.GOTO : pc = getTarget(iCode, pc + 1); continue; case TokenStream.GOSUB : stack[++stackTop] = new Integer(pc + 3); pc = getTarget(iCode, pc + 1); continue; case TokenStream.RETSUB : slot = (iCode[++pc] & 0xFF); pc = ((Integer)local[slot]).intValue(); continue; case TokenStream.POP : stackTop--; break; case TokenStream.DUP : stack[stackTop + 1] = stack[stackTop]; stackTop++; break; case TokenStream.POPV : result = stack[stackTop--]; break; case TokenStream.RETURN : result = stack[stackTop--]; pc = getTarget(iCode, pc + 1); break; case TokenStream.BITNOT : rIntValue = ScriptRuntime.toInt32(stack[stackTop]); stack[stackTop] = new Double(~rIntValue); break; case TokenStream.BITAND : rIntValue = ScriptRuntime.toInt32(stack[stackTop--]); lIntValue = ScriptRuntime.toInt32(stack[stackTop]); stack[stackTop] = new Double(lIntValue & rIntValue); break; case TokenStream.BITOR : rIntValue = ScriptRuntime.toInt32(stack[stackTop--]); lIntValue = ScriptRuntime.toInt32(stack[stackTop]); stack[stackTop] = new Double(lIntValue | rIntValue); break; case TokenStream.BITXOR : rIntValue = ScriptRuntime.toInt32(stack[stackTop--]); lIntValue = ScriptRuntime.toInt32(stack[stackTop]); stack[stackTop] = new Double(lIntValue ^ rIntValue); break; case TokenStream.LSH : rIntValue = ScriptRuntime.toInt32(stack[stackTop--]); lIntValue = ScriptRuntime.toInt32(stack[stackTop]); stack[stackTop] = new Double(lIntValue << rIntValue); break; case TokenStream.RSH : rIntValue = ScriptRuntime.toInt32(stack[stackTop--]); lIntValue = ScriptRuntime.toInt32(stack[stackTop]); stack[stackTop] = new Double(lIntValue >> rIntValue); break; case TokenStream.URSH : rIntValue = (ScriptRuntime.toInt32(stack[stackTop--]) & 0x1F); lLongValue = ScriptRuntime.toUint32(stack[stackTop]); stack[stackTop] = new Double(lLongValue >>> rIntValue); break; case TokenStream.ADD : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.add(lhs, rhs); break; case TokenStream.SUB : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = new Double(ScriptRuntime.toNumber(lhs) - ScriptRuntime.toNumber(rhs)); break; case TokenStream.NEG : rhs = stack[stackTop]; stack[stackTop] = new Double(-ScriptRuntime.toNumber(rhs)); break; case TokenStream.POS : rhs = stack[stackTop]; stack[stackTop] = new Double(ScriptRuntime.toNumber(rhs)); break; case TokenStream.MUL : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = new Double(ScriptRuntime.toNumber(lhs) * ScriptRuntime.toNumber(rhs)); break; case TokenStream.DIV : rhs = stack[stackTop--]; lhs = stack[stackTop]; // Detect the divide by zero or let Java do it ? stack[stackTop] = new Double(ScriptRuntime.toNumber(lhs) / ScriptRuntime.toNumber(rhs)); break; case TokenStream.MOD : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = new Double(ScriptRuntime.toNumber(lhs) % ScriptRuntime.toNumber(rhs)); break; case TokenStream.BINDNAME : stack[++stackTop] = ScriptRuntime.bind(scope, getString(theData.itsStringTable, iCode, pc + 1)); pc += 2; break; case TokenStream.GETBASE : stack[++stackTop] = ScriptRuntime.getBase(scope, getString(theData.itsStringTable, iCode, pc + 1)); pc += 2; break; case TokenStream.SETNAME : rhs = stack[stackTop--]; lhs = stack[stackTop]; // what about class cast exception here ? stack[stackTop] = ScriptRuntime.setName((Scriptable)lhs, rhs, scope, getString(theData.itsStringTable, iCode, pc + 1)); pc += 2; break; case TokenStream.DELPROP : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.delete(lhs, rhs); break; case TokenStream.GETPROP : name = (String)stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.getProp(lhs, name, scope); break; case TokenStream.SETPROP : rhs = stack[stackTop--]; name = (String)stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.setProp(lhs, name, rhs, scope); break; case TokenStream.GETELEM : id = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.getElem(lhs, id, scope); break; case TokenStream.SETELEM : rhs = stack[stackTop--]; id = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.setElem(lhs, id, rhs, scope); break; case TokenStream.PROPINC : name = (String)stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.postIncrement(lhs, name, scope); break; case TokenStream.PROPDEC : name = (String)stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.postDecrement(lhs, name, scope); break; case TokenStream.ELEMINC : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.postIncrementElem(lhs, rhs, scope); break; case TokenStream.ELEMDEC : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.postDecrementElem(lhs, rhs, scope); break; case TokenStream.GETTHIS : lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.getThis((Scriptable)lhs); break; case TokenStream.NEWTEMP : lhs = stack[stackTop]; slot = (iCode[++pc] & 0xFF); local[slot] = lhs; break; case TokenStream.USETEMP : slot = (iCode[++pc] & 0xFF); stack[++stackTop] = local[slot]; break; case TokenStream.CALLSPECIAL : i = (iCode[pc + 1] << 8) | (iCode[pc + 2] & 0xFF); name = getString(theData.itsStringTable, iCode, pc + 3); count = (iCode[pc + 5] << 8) | (iCode[pc + 6] & 0xFF); outArgs = new Object[count]; for (i = count - 1; i >= 0; i--) outArgs[i] = stack[stackTop--]; rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.callSpecial( cx, lhs, rhs, outArgs, theThisObj, scope, name, i); pc += 6; break; case TokenStream.CALL : count = (iCode[pc + 3] << 8) | (iCode[pc + 4] & 0xFF); outArgs = new Object[count]; for (i = count - 1; i >= 0; i--) outArgs[i] = stack[stackTop--]; rhs = stack[stackTop--]; lhs = stack[stackTop]; if (lhs == undefined) { lhs = getString(theData.itsStringTable, iCode, pc + 1); } Scriptable calleeScope = scope; if (theData.itsNeedsActivation) { calleeScope = ScriptableObject.getTopLevelScope(scope); } stack[stackTop] = ScriptRuntime.call(cx, lhs, rhs, outArgs, calleeScope); pc += 4; break; case TokenStream.NEW : count = (iCode[pc + 3] << 8) | (iCode[pc + 4] & 0xFF); outArgs = new Object[count]; for (i = count - 1; i >= 0; i--) outArgs[i] = stack[stackTop--]; lhs = stack[stackTop]; if (lhs == undefined) { lhs = getString(theData.itsStringTable, iCode, pc + 1); } stack[stackTop] = ScriptRuntime.newObject(cx, lhs, outArgs, scope); pc += 4; break; case TokenStream.TYPEOF : lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.typeof(lhs); break; case TokenStream.TYPEOFNAME : name = getString(theData.itsStringTable, iCode, pc + 1); stack[++stackTop] = ScriptRuntime.typeofName(scope, name); pc += 2; break; case TokenStream.STRING : stack[++stackTop] = getString(theData.itsStringTable, iCode, pc + 1); pc += 2; break; case TokenStream.NUMBER : stack[++stackTop] = getNumber(theData.itsNumberTable, iCode, pc + 1); pc += 2; break; case TokenStream.NAME : stack[++stackTop] = ScriptRuntime.name(scope, getString(theData.itsStringTable, iCode, pc + 1)); pc += 2; break; case TokenStream.NAMEINC : stack[++stackTop] = ScriptRuntime.postIncrement(scope, getString(theData.itsStringTable, iCode, pc + 1)); pc += 2; break; case TokenStream.NAMEDEC : stack[++stackTop] = ScriptRuntime.postDecrement(scope, getString(theData.itsStringTable, iCode, pc + 1)); pc += 2; break; case TokenStream.SETVAR : lhs = stack[stackTop]; slot = (iCode[++pc] & 0xFF); vars[slot] = lhs; break; case TokenStream.GETVAR : slot = (iCode[++pc] & 0xFF); stack[++stackTop] = vars[slot]; break; case TokenStream.VARINC : slot = (iCode[++pc] & 0xFF); stack[++stackTop] = vars[slot]; vars[slot] = ScriptRuntime.postIncrement(vars[slot]); break; case TokenStream.VARDEC : slot = (iCode[++pc] & 0xFF); stack[++stackTop] = vars[slot]; vars[slot] = ScriptRuntime.postDecrement(vars[slot]); break; case TokenStream.ZERO : stack[++stackTop] = zero; break; case TokenStream.ONE : stack[++stackTop] = one; break; case TokenStream.NULL : stack[++stackTop] = null; break; case TokenStream.THIS : stack[++stackTop] = theThisObj; break; case TokenStream.FALSE : stack[++stackTop] = Boolean.FALSE; break; case TokenStream.TRUE : stack[++stackTop] = Boolean.TRUE; break; case TokenStream.UNDEFINED : stack[++stackTop] = Undefined.instance; break; case TokenStream.THROW : cx.interpreterSecurityDomain = null; throw new JavaScriptException(stack[stackTop--]); case TokenStream.JTHROW : cx.interpreterSecurityDomain = null; lhs = stack[stackTop--]; if (lhs instanceof JavaScriptException) throw (JavaScriptException)lhs; else throw (RuntimeException)lhs; case TokenStream.ENTERWITH : lhs = stack[stackTop--]; scope = ScriptRuntime.enterWith(lhs, scope); break; case TokenStream.LEAVEWITH : scope = ScriptRuntime.leaveWith(scope); break; case TokenStream.NEWSCOPE : stack[++stackTop] = ScriptRuntime.newScope(); break; case TokenStream.ENUMINIT : slot = (iCode[++pc] & 0xFF); lhs = stack[stackTop--]; local[slot] = ScriptRuntime.initEnum(lhs, scope); break; case TokenStream.ENUMNEXT : slot = (iCode[++pc] & 0xFF); stack[++stackTop] = ScriptRuntime.nextEnum((Enumeration)local[slot]); break; case TokenStream.GETPROTO : lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.getProto(lhs, scope); break; case TokenStream.GETPARENT : lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.getParent(lhs); break; case TokenStream.GETSCOPEPARENT : lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.getParent(lhs, scope); break; case TokenStream.SETPROTO : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.setProto(lhs, rhs, scope); break; case TokenStream.SETPARENT : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.setParent(lhs, rhs, scope); break; case TokenStream.SCOPE : stack[++stackTop] = scope; break; case TokenStream.CLOSURE : i = (iCode[pc + 1] << 8) | (iCode[pc + 2] & 0xFF); stack[++stackTop] = new InterpretedFunction( theData.itsNestedFunctions[i], scope, cx); createFunctionObject( (InterpretedFunction)stack[stackTop], scope); pc += 2; break; case TokenStream.OBJECT : i = (iCode[pc + 1] << 8) | (iCode[pc + 2] & 0xFF); stack[++stackTop] = theData.itsRegExpLiterals[i]; pc += 2; break; case TokenStream.LINE : i = (iCode[pc + 1] << 8) | (iCode[pc + 2] & 0xFF); cx.interpreterLine = i; pc += 2; break; case TokenStream.SOURCEFILE : cx.interpreterSourceFile = theData.itsSourceFile; break; default : dumpICode(theData); throw new RuntimeException("Unknown icode : " + (iCode[pc] & 0xff) + " @ pc : " + pc); } pc++; } catch (EcmaError ee) { // an offical ECMA error object, // handle as if it were a JavaScriptException stackTop = 0; cx.interpreterSecurityDomain = null; if (tryStackTop > 0) { pc = catchStack[--tryStackTop]; scope = scopeStack[tryStackTop]; if (pc == 0) { pc = finallyStack[tryStackTop]; if (pc == 0) throw ee; stack[0] = ee.getErrorObject(); } else stack[0] = ee.getErrorObject(); } else throw ee; // We caught an exception; restore this function's // security domain. cx.interpreterSecurityDomain = theData.securityDomain; } catch (JavaScriptException jsx) { stackTop = 0; cx.interpreterSecurityDomain = null; if (tryStackTop > 0) { pc = catchStack[--tryStackTop]; scope = scopeStack[tryStackTop]; if (pc == 0) { pc = finallyStack[tryStackTop]; if (pc == 0) throw jsx; stack[0] = jsx; } else stack[0] = ScriptRuntime.unwrapJavaScriptException(jsx); } else throw jsx; // We caught an exception; restore this function's // security domain. cx.interpreterSecurityDomain = theData.securityDomain; } catch (RuntimeException jx) { cx.interpreterSecurityDomain = null; if (tryStackTop > 0) { stackTop = 0; stack[0] = jx; pc = finallyStack[--tryStackTop]; scope = scopeStack[tryStackTop]; if (pc == 0) throw jx; } else throw jx; // We caught an exception; restore this function's // security domain. cx.interpreterSecurityDomain = theData.securityDomain; } } cx.interpreterSecurityDomain = savedSecurityDomain; return result; }
12376 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12376/54e6f7c03ff7e92a44c059a5aaac54521ad9a7db/Interpreter.java/buggy/js/rhino/org/mozilla/javascript/Interpreter.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 760, 1033, 10634, 12, 30010, 751, 326, 751, 13, 3639, 1216, 11905, 503, 565, 288, 3639, 1033, 8499, 31, 3639, 1033, 8526, 2110, 273, 394, 1033, 63, 5787, 751, 18, 1282, 2747, 2624, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 760, 1033, 10634, 12, 30010, 751, 326, 751, 13, 3639, 1216, 11905, 503, 565, 288, 3639, 1033, 8499, 31, 3639, 1033, 8526, 2110, 273, 394, 1033, 63, 5787, 751, 18, 1282, 2747, 2624, ...
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
2652 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2652/a6f5baeab4d6c54e6d56b3f1867a376e2177a64f/Llnmon.java/clean/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, ...
public int getId() {
public String getId() {
public int getId() { return id; }
51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/6f349472f453609a630d48f7596ea92999810019/AbstractQueryHit.java/clean/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/provisional/tasklist/AbstractQueryHit.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 509, 2634, 1435, 288, 202, 202, 2463, 612, 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, 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, 225, 202, 482, 509, 2634, 1435, 288, 202, 202, 2463, 612, 31, 202, 97, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
public Extension( final String extensionName, final String specificationVersion, final String specificationVendor, final String implementationVersion, final String implementationVendor, final String implementationVendorId, final String implementationURL ) { if( null == extensionName ) { throw new NullPointerException( "extensionName" ); } m_extensionName = extensionName; m_specificationVendor = specificationVendor; if( null != specificationVersion ) { try { m_specificationVersion = new DeweyDecimal( specificationVersion ); } catch( final NumberFormatException nfe ) { final String error = "Bad specification version format '" + specificationVersion + "' in '" + extensionName + "'. (Reason: " + nfe + ")"; throw new IllegalArgumentException( error ); } } m_implementationURL = implementationURL; m_implementationVendor = implementationVendor; m_implementationVendorID = implementationVendorId; m_implementationVersion = implementationVersion; }
2797 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2797/cdc1c3a918255ef5983ce6909ee7d2a77335c959/Extension.java/buggy/spice/components/extension/src/java/org/realityforge/extension/Extension.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1071, 3625, 12, 6385, 780, 6447, 461, 16, 6385, 780, 31543, 1444, 16, 6385, 780, 31543, 14786, 16, 6385, 780, 30810, 1444, 16, 6385, 780, 30810, 14786, 16, 6385, 780, 30810, 14786, 548, 16, 63...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1071, 3625, 12, 6385, 780, 6447, 461, 16, 6385, 780, 31543, 1444, 16, 6385, 780, 31543, 14786, 16, 6385, 780, 30810, 1444, 16, 6385, 780, 30810, 14786, 16, 6385, 780, 30810, 14786, 548, 16, 63...
public BundleDescription[] getBundles() { return (BundleDescription[]) bundleDescriptions.elements(new BundleDescription[bundleDescriptions.size()]);
public BundleDescription[] getBundles(final String symbolicName) { final List bundles = new ArrayList(); for (Iterator iter = bundleDescriptions.iterator(); iter.hasNext();) { BundleDescription bundle = (BundleDescription) iter.next(); if (symbolicName.equals(bundle.getSymbolicName())) bundles.add(bundle); } return (BundleDescription[]) bundles.toArray(new BundleDescription[bundles.size()]);
public BundleDescription[] getBundles() { return (BundleDescription[]) bundleDescriptions.elements(new BundleDescription[bundleDescriptions.size()]); }
2516 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2516/004445721bcd135458e3e53100cbb701369726e9/StateImpl.java/buggy/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateImpl.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 8539, 3291, 8526, 2882, 7663, 1435, 288, 202, 202, 2463, 261, 3405, 3291, 63, 5717, 3440, 16844, 18, 6274, 12, 2704, 8539, 3291, 63, 9991, 16844, 18, 1467, 1435, 19226, 202, 97,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 8539, 3291, 8526, 2882, 7663, 1435, 288, 202, 202, 2463, 261, 3405, 3291, 63, 5717, 3440, 16844, 18, 6274, 12, 2704, 8539, 3291, 63, 9991, 16844, 18, 1467, 1435, 19226, 202, 97,...
for (int i=0; i<lines-1; i++) if (widths[i]>max) max = widths[i]; ip.setColor(new Color(255,255, 140));
max = ip.getWidth(); ip.setColor(new Color(255,255,140));
public void run(String arg) { int lines = 7; String[] text = new String[lines]; text[0] = "ImageJ "+ImageJ.VERSION; text[1] = "Wayne Rasband"; text[2] = "National Institutes of Health, USA"; text[3] = "http://rsb.info.nih.gov/ij/"; text[4] = "Java "+System.getProperty("java.version"); text[5] = IJ.freeMemory(); text[6] = "ImageJ is in the public domain"; ImageProcessor ip = null; ImageJ ij = IJ.getInstance(); URL url = ij .getClass() .getResource("/about.jpg"); if (url!=null) { Image img = null; try {img = ij.createImage((ImageProducer)url.getContent());} catch(Exception e) {} if (img!=null) { ImagePlus imp = new ImagePlus("", img); ip = imp.getProcessor(); } } if (ip==null) ip = new ColorProcessor(55,45); ip = ip.resize(ip.getWidth()*4, ip.getHeight()*4); ip.setFont(new Font("SansSerif", Font.PLAIN, LARGE_FONT)); ip.setAntialiasedText(true); int[] widths = new int[lines]; widths[0] = ip.getStringWidth(text[0]); ip.setFont(new Font("SansSerif", Font.PLAIN, SMALL_FONT)); for (int i=1; i<lines-1; i++) widths[i] = ip.getStringWidth(text[i]); int max = 0; for (int i=0; i<lines-1; i++) if (widths[i]>max) max = widths[i]; ip.setColor(new Color(255,255, 140)); ip.setFont(new Font("SansSerif", Font.PLAIN, LARGE_FONT)); int y = 45; ip.drawString(text[0], x(text[0],ip,max), y); ip.setFont(new Font("SansSerif", Font.PLAIN, SMALL_FONT)); y += 30; ip.drawString(text[1], x(text[1],ip,max), y); y += 18; ip.drawString(text[2], x(text[2],ip,max), y); y += 18; ip.drawString(text[3], x(text[3],ip,max), y); y += 18; ip.drawString(text[4], x(text[4],ip,max), y); if (IJ.maxMemory()>0L) { y += 18; ip.drawString(text[5], x(text[5],ip,max), y); } ip.drawString(text[6], ip.getWidth()-ip.getStringWidth(text[6])-10, ip.getHeight()-3); new ImagePlus("About ImageJ", ip).show(); }
7783 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7783/e250803a1d69222184f715ac59ba98d082f7cfd6/AboutBox.java/buggy/fudge/image_editor/src/ij/plugin/AboutBox.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1086, 12, 780, 1501, 13, 288, 202, 202, 474, 2362, 273, 2371, 31, 202, 202, 780, 8526, 977, 273, 394, 514, 63, 3548, 15533, 202, 202, 955, 63, 20, 65, 273, 315, 2040, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1086, 12, 780, 1501, 13, 288, 202, 202, 474, 2362, 273, 2371, 31, 202, 202, 780, 8526, 977, 273, 394, 514, 63, 3548, 15533, 202, 202, 955, 63, 20, 65, 273, 315, 2040, ...
if (!(next instanceof IResource)) return false; if (!resourceIsType((IResource) next, resourceMask)) return false;
if (!(next instanceof IResource)) { return false; } if (!resourceIsType((IResource) next, resourceMask)) { return false; }
public static boolean allResourcesAreOfType(IStructuredSelection selection, int resourceMask) { Iterator resources = selection.iterator(); while (resources.hasNext()) { Object next = resources.next(); if (!(next instanceof IResource)) return false; if (!resourceIsType((IResource) next, resourceMask)) return false; } return true; }
56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/3a23c3b9bac4db696a0452560047155775a707b7/ResourceSelectionUtil.java/buggy/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/ResourceSelectionUtil.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 760, 1250, 777, 3805, 4704, 18859, 12, 45, 30733, 6233, 4421, 16, 5411, 509, 1058, 5796, 13, 288, 3639, 4498, 2703, 273, 4421, 18, 9838, 5621, 3639, 1323, 261, 4683, 18, 5332, 2134,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1250, 777, 3805, 4704, 18859, 12, 45, 30733, 6233, 4421, 16, 5411, 509, 1058, 5796, 13, 288, 3639, 4498, 2703, 273, 4421, 18, 9838, 5621, 3639, 1323, 261, 4683, 18, 5332, 2134,...
Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_14()) { jj_scanpos = xsp; break; } } if (jj_3R_15()) return true; return false;
Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_14()) { jj_scanpos = xsp; break; }
final private boolean jj_3_2() { Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_14()) { jj_scanpos = xsp; break; } } if (jj_3R_15()) return true; return false; }
45569 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45569/bad9201cffeb6c6da295101be65bfa4924caa39e/JspParser.java/buggy/pmd/src/net/sourceforge/pmd/jsp/ast/JspParser.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 727, 3238, 1250, 10684, 67, 23, 67, 22, 1435, 288, 3639, 3155, 619, 1752, 31, 3639, 1323, 261, 3767, 13, 288, 5411, 619, 1752, 273, 10684, 67, 9871, 917, 31, 5411, 309, 261, 78, 78, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 727, 3238, 1250, 10684, 67, 23, 67, 22, 1435, 288, 3639, 3155, 619, 1752, 31, 3639, 1323, 261, 3767, 13, 288, 5411, 619, 1752, 273, 10684, 67, 9871, 917, 31, 5411, 309, 261, 78, 78, 6...
url_string = url_string.substring(start, end); if (!url.getProtocol().equals("jar")) return; setURL(url, "jar", url.getHost(), url.getPort(), url_string, null); }
try { new URL(url_string.substring (0, jar_stop)); } catch (MalformedURLException e) { throw new URLParseError("invalid inner URL: " + e.getMessage()); } if (!url.getProtocol().equals ("jar") ) throw new URLParseError("unexpected protocol " + url.getProtocol()); setURL (url, "jar", url.getHost(), url.getPort(), url_string, null); }
protected void parseURL(URL url, String url_string, int start, int end) { // This method does not throw an exception or return a value. Thus our // strategy when we encounter an error in parsing is to return without // doing anything. String file = url.getFile(); if (file != null && file != "") { //has context url url_string = url_string.substring(start, end); if (url_string.startsWith("/")) { //url string is an absolute path int idx = file.lastIndexOf("!/"); if (idx == -1) //context path is weird file = file + "!" + url_string; else file = file.substring(0, idx + 1) + url_string; } else { int idx = file.lastIndexOf("/"); if (idx == -1) //context path is weird file = "/" + url_string; else if (idx == (file.length() - 1)) //just concatenate two parts file = file + url_string; else // according to Java API Documentation, here is a little different // with URLStreamHandler.parseURL // but JDK seems doesn't handle it well file = file + "/" + url_string; } setURL(url, "jar", url.getHost(), url.getPort(), file, null); return; } // Bunches of things should be true. Make sure. if (end < start) return; if (end - start < 2) return; if (start > url_string.length()) return; // Skip remains of protocol url_string = url_string.substring(start, end); if (!url.getProtocol().equals("jar")) return; setURL(url, "jar", url.getHost(), url.getPort(), url_string, null); }
50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/b423075a6102e6577bf2f242ea1a1cf4f2234d1c/Handler.java/buggy/core/src/classpath/gnu/gnu/java/net/protocol/jar/Handler.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1117, 918, 1109, 1785, 12, 1785, 880, 16, 514, 880, 67, 1080, 16, 509, 787, 16, 509, 679, 13, 288, 202, 202, 759, 1220, 707, 1552, 486, 604, 392, 1520, 578, 327, 279, 460, 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, 1109, 1785, 12, 1785, 880, 16, 514, 880, 67, 1080, 16, 509, 787, 16, 509, 679, 13, 288, 202, 202, 759, 1220, 707, 1552, 486, 604, 392, 1520, 578, 327, 279, 460, 18, ...
public void doTag(XMLOutput xmlOutput) throws JellyTagException {
public void doTag(final XMLOutput xmlOutput) throws JellyTagException {
public void doTag(XMLOutput xmlOutput) throws JellyTagException { final WebClient webClient = getWebClient(); webClient.setWebConnection( new MockWebConnection(webClient) ); invokeBody(xmlOutput); }
3508 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3508/bfbb9e2a2e54bf7040308f5f0b4fd744c80370c8/MockWebConnectionTag.java/buggy/htmlunit/src/java/com/gargoylesoftware/htmlunit/jelly/MockWebConnectionTag.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 741, 1805, 12, 6385, 3167, 1447, 2025, 1447, 13, 1216, 804, 292, 715, 1805, 503, 288, 3639, 727, 2999, 1227, 3311, 1227, 273, 20312, 1227, 5621, 3639, 3311, 1227, 18, 542, 4079...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 741, 1805, 12, 6385, 3167, 1447, 2025, 1447, 13, 1216, 804, 292, 715, 1805, 503, 288, 3639, 727, 2999, 1227, 3311, 1227, 273, 20312, 1227, 5621, 3639, 3311, 1227, 18, 542, 4079...
catch (ArrayIndexOutOfBoundsException e) { throw new PainterException(e.toString());
int numberOfElements, numberOfPositions, i; numberOfElements = ( (Number) data[0]).intValue(); numberOfPositions = ( (Number) data[1]).intValue(); if (numberOfPositions == 0 || numberOfElements <= 0) { return; } rollData = context.popOperands(numberOfElements); if (numberOfPositions < 0) { numberOfPositions = -numberOfPositions; numberOfPositions = numberOfPositions % numberOfElements; for (i = numberOfPositions; i < numberOfElements; i++) { context.operands.push(rollData[i]); } for (i = 0; i < numberOfPositions; i++) { context.operands.push(rollData[i]); } } else { numberOfPositions = numberOfPositions % numberOfElements; for (i = numberOfElements - numberOfPositions; i < numberOfElements; i++) { context.operands.push(rollData[i]); } for (i = 0; i < numberOfElements - numberOfPositions; i++) { context.operands.push(rollData[i]); }
public void execute(PAContext context) throws PainterException { Object data[]; data = context.popOperands(1); if (! (data[0] instanceof Number)) { throw new PainterException("index: wrong arguments"); } int index = ( (Number) data[0]).intValue(); try { context.operands.push(context.operands.elementAt(index)); } catch (ArrayIndexOutOfBoundsException e) { throw new PainterException(e.toString()); } }
4174 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4174/3c314818d71d25f7c37e4f26642c8ef894a7fcd4/PAContext.java/clean/src/com/lowagie/text/pdf/codec/postscript/PAContext.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 4202, 1071, 918, 1836, 12, 4066, 1042, 819, 13, 1216, 453, 11606, 503, 288, 3639, 1033, 501, 8526, 31, 3639, 501, 273, 819, 18, 5120, 3542, 5708, 12, 21, 1769, 3639, 309, 16051, 261, 892, 63...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 4202, 1071, 918, 1836, 12, 4066, 1042, 819, 13, 1216, 453, 11606, 503, 288, 3639, 1033, 501, 8526, 31, 3639, 501, 273, 819, 18, 5120, 3542, 5708, 12, 21, 1769, 3639, 309, 16051, 261, 892, 63...
protected String doComplete(Symbol clasz) throws IOException { ClassfileParser.parse(global, file, clasz);
protected String doComplete(Symbol root) throws IOException { assert root.isClassType(): Debug.show(root); ClassfileParser.parse(global, file, root);
protected String doComplete(Symbol clasz) throws IOException { ClassfileParser.parse(global, file, clasz); return "class file '" + file + "'"; }
10130 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10130/c07702b37e088aa67e697b3bfebb4cc4d71e51c9/ClassParser.java/clean/sources/scalac/symtab/classfile/ClassParser.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 514, 741, 6322, 12, 5335, 23268, 94, 13, 1216, 1860, 288, 3639, 1659, 768, 2678, 18, 2670, 12, 6347, 16, 585, 16, 23268, 94, 1769, 3639, 327, 315, 1106, 585, 2119, 397, 585, 397, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 514, 741, 6322, 12, 5335, 23268, 94, 13, 1216, 1860, 288, 3639, 1659, 768, 2678, 18, 2670, 12, 6347, 16, 585, 16, 23268, 94, 1769, 3639, 327, 315, 1106, 585, 2119, 397, 585, 397, ...
space_seen = true;
space_seen++;
private int yylex() { int c; boolean space_seen = false; boolean cmd_state; kwtable kw; cmd_state = ph.isCommandStart(); ph.setCommandStart(false); retry : for (; ; ) { switch (c = nextc()) { case '\0': // NUL case '\004': // ^D case '\032': // ^Z case -1: //end of script. return 0; // white spaces case ' ': case '\t': case '\f': case '\r': case '\013': // '\v' space_seen = true; continue retry; case '#': // it's a comment while ((c = nextc()) != '\n') { if (c == -1) { return 0; } } // fall through case '\n': switch (ph.getLexState()) { case LexState.EXPR_BEG: case LexState.EXPR_FNAME: case LexState.EXPR_DOT: continue retry; default: break; } ph.setCommandStart(true); ph.setLexState(LexState.EXPR_BEG); return '\n'; case '*': if ((c = nextc()) == '*') { ph.setLexState(LexState.EXPR_BEG); if (nextc() == '=') { yyVal = ph.newId(Token.tPOW); return Token.tOP_ASGN; } pushback(c); return Token.tPOW; } if (c == '=') { yyVal = ph.newId('*'); ph.setLexState(LexState.EXPR_BEG); return Token.tOP_ASGN; } pushback(c); if (IS_ARG() && space_seen && !ISSPACE(c)) { ph.rb_warning("`*' interpreted as argument prefix"); c = Token.tSTAR; } else if (ph.getLexState() == LexState.EXPR_BEG || ph.getLexState() == LexState.EXPR_MID) { c = Token.tSTAR; } else { c = '*'; } ph.setLexState(LexState.EXPR_BEG); return c; case '!': ph.setLexState(LexState.EXPR_BEG); if ((c = nextc()) == '=') { return Token.tNEQ; } if (c == '~') { return Token.tNMATCH; } pushback(c); return '!'; case '=': if (lex_p == 1) { // skip embedded rd document if (lex_curline.startsWith("=begin") && (lex_pend == 6 || ISSPACE(lex_curline.charAt(6)))) { for (; ; ) { lex_p = lex_pend; c = nextc(); if (c == -1) { ph.rb_compile_error("embedded document meets end of file"); return 0; } if (c != '=') { continue; } if (lex_curline.substring(lex_p, lex_p + 3).equals("end") && (lex_p + 3 == lex_pend || ISSPACE(lex_curline.charAt(lex_p + 3)))) { break; } } lex_p = lex_pend; continue retry; } } ph.setLexState(LexState.EXPR_BEG); if ((c = nextc()) == '=') { if ((c = nextc()) == '=') { return Token.tEQQ; } pushback(c); return Token.tEQ; } if (c == '~') { return Token.tMATCH; } else if (c == '>') { return Token.tASSOC; } pushback(c); return '='; case '<': c = nextc(); if (c == '<' && ph.getLexState() != LexState.EXPR_END && ph.getLexState() != LexState.EXPR_ENDARG && ph.getLexState() != LexState.EXPR_CLASS && (!IS_ARG() || space_seen)) { int c2 = nextc(); int indent = 0; if (c2 == '-') { indent = 1; c2 = nextc(); } if (!ISSPACE(c2) && ("\"'`".indexOf(c2) != -1 || is_identchar(c2))) { return here_document(c2, indent); } pushback(c2); } ph.setLexState(LexState.EXPR_BEG); if (c == '=') { if ((c = nextc()) == '>') { return Token.tCMP; } pushback(c); return Token.tLEQ; } if (c == '<') { if (nextc() == '=') { yyVal = ph.newId(Token.tLSHFT); return Token.tOP_ASGN; } pushback(c); return Token.tLSHFT; } pushback(c); return '<'; case '>': ph.setLexState(LexState.EXPR_BEG); if ((c = nextc()) == '=') { return Token.tGEQ; } if (c == '>') { if ((c = nextc()) == '=') { yyVal = ph.newId(Token.tRSHFT); return Token.tOP_ASGN; } pushback(c); return Token.tRSHFT; } pushback(c); return '>'; case '"': return parse_string(c, c, c); case '`': if (ph.getLexState() == LexState.EXPR_FNAME) { return c; } if (ph.getLexState() == LexState.EXPR_DOT) { return c; } return parse_string(c, c, c); case '\'': return parse_qstring(c, 0); case '?': if (ph.getLexState() == LexState.EXPR_END || ph.getLexState() == LexState.EXPR_ENDARG) { ph.setLexState(LexState.EXPR_BEG); return '?'; } c = nextc(); if (c == -1) { /* FIX 1.6.5 */ ph.rb_compile_error("incomplete character syntax"); return 0; } if (IS_ARG() && ISSPACE(c)) { pushback(c); ph.setLexState(LexState.EXPR_BEG); return '?'; } if (c == '\\') { c = read_escape(); } c &= 0xff; yyVal = RubyFixnum.m_newFixnum(ruby, c); ph.setLexState(LexState.EXPR_END); return Token.tINTEGER; case '&': if ((c = nextc()) == '&') { ph.setLexState(LexState.EXPR_BEG); if ((c = nextc()) == '=') { yyVal = ph.newId(Token.tANDOP); return Token.tOP_ASGN; } pushback(c); return Token.tANDOP; } else if (c == '=') { yyVal = ph.newId('&'); ph.setLexState(LexState.EXPR_BEG); return Token.tOP_ASGN; } pushback(c); if (IS_ARG() && space_seen && !ISSPACE(c)) { ph.rb_warning("`&' interpeted as argument prefix"); c = Token.tAMPER; } else if (ph.getLexState() == LexState.EXPR_BEG || ph.getLexState() == LexState.EXPR_MID) { c = Token.tAMPER; } else { c = '&'; } ph.setLexState(LexState.EXPR_BEG); return c; case '|': ph.setLexState(LexState.EXPR_BEG); if ((c = nextc()) == '|') { if ((c = nextc()) == '=') { yyVal = ph.newId(Token.tOROP); return Token.tOP_ASGN; } pushback(c); return Token.tOROP; } else if (c == '=') { yyVal = ph.newId('|'); return Token.tOP_ASGN; } pushback(c); return '|'; case '+': c = nextc(); if (ph.getLexState() == LexState.EXPR_FNAME || ph.getLexState() == LexState.EXPR_DOT) { if (c == '@') { return Token.tUPLUS; } pushback(c); return '+'; } if (c == '=') { ph.setLexState(LexState.EXPR_BEG); yyVal = ph.newId('+'); return Token.tOP_ASGN; } if (ph.getLexState() == LexState.EXPR_BEG || ph.getLexState() == LexState.EXPR_MID || (IS_ARG() && space_seen && !ISSPACE(c))) { if (IS_ARG()) { arg_ambiguous(); } ph.setLexState(LexState.EXPR_BEG); pushback(c); if (Character.isDigit((char) c)) { c = '+'; return start_num(c); } return Token.tUPLUS; } ph.setLexState(LexState.EXPR_BEG); pushback(c); return '+'; case '-': c = nextc(); if (ph.getLexState() == LexState.EXPR_FNAME || ph.getLexState() == LexState.EXPR_DOT) { if (c == '@') { return Token.tUMINUS; } pushback(c); return '-'; } if (c == '=') { ph.setLexState(LexState.EXPR_BEG); yyVal = ph.newId('-'); return Token.tOP_ASGN; } if (ph.getLexState() == LexState.EXPR_BEG || ph.getLexState() == LexState.EXPR_MID || (IS_ARG() && space_seen && !ISSPACE(c))) { if (IS_ARG()) { arg_ambiguous(); } ph.setLexState(LexState.EXPR_BEG); pushback(c); if (Character.isDigit((char) c)) { c = '-'; return start_num(c); } return Token.tUMINUS; } ph.setLexState(LexState.EXPR_BEG); pushback(c); return '-'; case '.': ph.setLexState(LexState.EXPR_BEG); if ((c = nextc()) == '.') { if ((c = nextc()) == '.') { return Token.tDOT3; } pushback(c); return Token.tDOT2; } pushback(c); if (!Character.isDigit((char) c)) { ph.setLexState(LexState.EXPR_DOT); return '.'; } c = '.'; // fall through //start_num: case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': return start_num(c); case ']': case '}': ph.setLexState(LexState.EXPR_END); return c; case ')': if (cond_nest > 0) { cond_stack >>= 1; } ph.setLexState(LexState.EXPR_END); return c; case ':': c = nextc(); if (c == ':') { if (ph.getLexState() == LexState.EXPR_BEG || ph.getLexState() == LexState.EXPR_MID || (IS_ARG() && space_seen)) { ph.setLexState(LexState.EXPR_BEG); return Token.tCOLON3; } ph.setLexState(LexState.EXPR_DOT); return Token.tCOLON2; } pushback(c); if (ph.getLexState() == LexState.EXPR_END || ph.getLexState() == LexState.EXPR_ENDARG || ISSPACE(c)) { ph.setLexState(LexState.EXPR_BEG); return ':'; } ph.setLexState(LexState.EXPR_FNAME); return Token.tSYMBEG; case '/': if (ph.getLexState() == LexState.EXPR_BEG || ph.getLexState() == LexState.EXPR_MID) { return parse_regx('/', '/'); } if ((c = nextc()) == '=') { ph.setLexState(LexState.EXPR_BEG); yyVal = ph.newId('/'); return Token.tOP_ASGN; } pushback(c); if (IS_ARG() && space_seen) { if (!ISSPACE(c)) { arg_ambiguous(); return parse_regx('/', '/'); } } ph.setLexState(LexState.EXPR_BEG); return '/'; case '^': ph.setLexState(LexState.EXPR_BEG); if ((c = nextc()) == '=') { yyVal = ph.newId('^'); return Token.tOP_ASGN; } pushback(c); return '^'; case ',': case ';': // ph.setCommandStart(true); ph.setLexState(LexState.EXPR_BEG); return c; case '~': if (ph.getLexState() == LexState.EXPR_FNAME || ph.getLexState() == LexState.EXPR_DOT) { if ((c = nextc()) != '@') { pushback(c); } } ph.setLexState(LexState.EXPR_BEG); return '~'; case '(': if (cond_nest > 0) { cond_stack = (cond_stack << 1 ) | 0; } // ph.setCommandStart(true); if (ph.getLexState() == LexState.EXPR_BEG || ph.getLexState() == LexState.EXPR_MID) { c = Token.tLPAREN; } else if (space_seen) { if (ph.getLexState() == LexState.EXPR_CMDARG) { c = Token.tLPAREN_ARG; } else if (ph.getLexState() == LexState.EXPR_ARG) { ph.rb_warning(tok() + " (...) interpreted as method call"); c = Token.tLPAREN_ARG; } } ph.setLexState(LexState.EXPR_BEG); return c; case '[': if (ph.getLexState() == LexState.EXPR_FNAME || ph.getLexState() == LexState.EXPR_DOT) { if ((c = nextc()) == ']') { if ((c = nextc()) == '=') { return Token.tASET; } pushback(c); return Token.tAREF; } pushback(c); return '['; } else if (ph.getLexState() == LexState.EXPR_BEG || ph.getLexState() == LexState.EXPR_MID) { c = Token.tLBRACK; } else if (IS_ARG() && space_seen) { c = Token.tLBRACK; } ph.setLexState(LexState.EXPR_BEG); return c; case '{': if (!IS_ARG()) { if (space_seen && ph.getLexState() == LexState.EXPR_ENDARG) { c = Token.tLBRACE_ARG; } if (ph.getLexState() != LexState.EXPR_END && ph.getLexState() != LexState.EXPR_ENDARG) { c = Token.tLBRACE; } } ph.setLexState(LexState.EXPR_BEG); return c; case '\\': c = nextc(); if (c == '\n') { space_seen = true; continue retry; // skip \\n } pushback(c); return '\\'; case '%': quotation : for (; ; ) { if (ph.getLexState() == LexState.EXPR_BEG || ph.getLexState() == LexState.EXPR_MID) { int term; int paren; c = nextc(); if (!Character.isLetterOrDigit((char) c)) { term = c; c = 'Q'; } else { term = nextc(); } if (c == -1 || term == -1) { ph.rb_compile_error("unterminated quoted string meets end of file"); return 0; } paren = term; if (term == '(') { term = ')'; } else if (term == '[') { term = ']'; } else if (term == '{') { term = '}'; } else if (term == '<') { term = '>'; } else { paren = 0; } switch (c) { case 'Q': return parse_string('"', term, paren); case 'q': return parse_qstring(term, paren); case 'w': return parse_quotedwords(term, paren); case 'x': return parse_string('`', term, paren); case 'r': return parse_regx(term, paren); default: yyerror("unknown type of %string"); return 0; } } if ((c = nextc()) == '=') { yyVal = ph.newId('%'); return Token.tOP_ASGN; } if (IS_ARG() && space_seen && !ISSPACE(c)) { pushback(c); continue quotation; } break quotation; } ph.setLexState(LexState.EXPR_BEG); pushback(c); return '%'; case '$': ph.setLexState(LexState.EXPR_END); newtok(); c = nextc(); switch (c) { case '_': // $_: last read line string c = nextc(); if (is_identchar(c)) { tokadd('$'); tokadd('_'); break; } pushback(c); c = '_'; // fall through case '~': // $~: match-data ph.local_cnt(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 tokadd('$'); tokadd(c); tokfix(); yyVal = ruby.intern(tok()); return Token.tGVAR; case '-': tokadd('$'); tokadd(c); c = nextc(); tokadd(c); tokfix(); yyVal = ruby.intern(tok()); /* * xxx shouldn't check if valid option variable */ return Token.tGVAR; case '&': // $&: last match case '`': // $`: string before last match case '\'':// $': string after last match case '+': // $+: string matches last paren. yyVal = nf.newBackRef(c); return Token.tBACK_REF; case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': tokadd('$'); while (Character.isDigit((char) c)) { tokadd(c); c = nextc(); } if (is_identchar(c)) { break; } pushback(c); tokfix(); yyVal = nf.newNthRef(Integer.parseInt(tok().substring(1))); return Token.tNTH_REF; default: if (!is_identchar(c)) { pushback(c); return '$'; } case '0': tokadd('$'); } break; case '@': c = nextc(); newtok(); tokadd('@'); if (c == '@') { tokadd('@'); c = nextc(); } if (Character.isDigit((char) c)) { ph.rb_compile_error("`@" + c + "' is not a valid instance variable name"); } if (!is_identchar(c)) { pushback(c); return '@'; } break; default: if (!is_identchar(c) || Character.isDigit((char) c)) { ph.rb_compile_error("Invalid char `\\" + c + "' in expression"); continue retry; } newtok(); break; } break retry; } while (is_identchar(c)) { tokadd(c); /* * if (ismbchar(c)) { * int i, len = mbclen(c)-1; * for (i = 0; i < len; i++) { * c = nextc(); * tokadd(c); * } * } */ c = nextc(); } if ((c == '!' || c == '?') && is_identchar(tok().charAt(0)) && !peek('=')) { tokadd(c); } else { pushback(c); } tokfix(); { int result = 0; switch (tok().charAt(0)) { case '$': ph.setLexState(LexState.EXPR_END); result = Token.tGVAR; break; case '@': ph.setLexState(LexState.EXPR_END); if (tok().charAt(1) == '@') { result = Token.tCVAR; } else { result = Token.tIVAR; } break; default: if (ph.getLexState() != LexState.EXPR_DOT) { // See if it is a reserved word. kw = rb_reserved_word(tok(), toklen()); if (kw != null) { // enum lex_state int state = ph.getLexState(); ph.setLexState(kw.state); if (state == LexState.EXPR_FNAME) { yyVal = ruby.intern(kw.name); } if (kw.id0 == Token.kDO) { if (COND_P()) { return Token.kDO_COND; } if (CMDARG_P() && state != LexState.EXPR_CMDARG) { return Token.kDO_BLOCK; } return Token.kDO; } if (state == LexState.EXPR_BEG) { return kw.id0; } else { if (kw.id0 != kw.id1) { ph.setLexState(LexState.EXPR_BEG); } return kw.id1; } } } if (toklast() == '!' || toklast() == '?') { result = Token.tFID; } else { if (ph.getLexState() == LexState.EXPR_FNAME) { if ((c = nextc()) == '=' && !peek('~') && !peek('>') && (!peek('=') || lex_p + 1 < lex_pend && lex_curline.charAt(lex_p + 1) == '>')) { result = Token.tIDENTIFIER; tokadd(c); } else { pushback(c); } } if (result == 0 && Character.isUpperCase(tok().charAt(0))) { result = Token.tCONSTANT; } else { result = Token.tIDENTIFIER; } } if (ph.getLexState() == LexState.EXPR_BEG || ph.getLexState() == LexState.EXPR_DOT || ph.getLexState() == LexState.EXPR_ARG || ph.getLexState() == LexState.EXPR_CMDARG) { if (cmd_state) { ph.setLexState(LexState.EXPR_CMDARG); } else { ph.setLexState(LexState.EXPR_ARG); } } else { ph.setLexState(LexState.EXPR_END); } } tokfix(); yyVal = /* last_id = */ ruby.intern(tok()); //XXX really overwrite last_id? return result; } }
50993 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50993/75e51682c6dfb1ff67ffb81cea2dfd23c3e3a9f4/DefaultRubyParser.java/clean/org/jruby/parser/DefaultRubyParser.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 509, 677, 1362, 92, 1435, 288, 3639, 509, 276, 31, 3639, 1250, 3476, 67, 15156, 273, 629, 31, 3639, 1250, 1797, 67, 2019, 31, 3639, 5323, 2121, 5323, 31, 3639, 1797, 67, 2019, 273...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 509, 677, 1362, 92, 1435, 288, 3639, 509, 276, 31, 3639, 1250, 3476, 67, 15156, 273, 629, 31, 3639, 1250, 1797, 67, 2019, 31, 3639, 5323, 2121, 5323, 31, 3639, 1797, 67, 2019, 273...
content.addLast(applyB = new mButton(MyLocale.getMsg(615,"Apply")),CellConstants.DONTSTRETCH, (CellConstants.DONTFILL|CellConstants.EAST));
content.addLast(applyB = new mButton(MyLocale.getMsg(620,"Save")),CellConstants.DONTSTRETCH, (CellConstants.DONTFILL|CellConstants.EAST));
public ProfilesScreen(Preferences p){ scp = new ScrollBarPanel(content); pref = p; setMinimumSize(240,240); setMaximumSize(300,400); this.title = MyLocale.getMsg(1100,"Profiles"); //content.addLast(new mLabel(MyLocale.getMsg(1101,"Profile 1"))); content.addNext(new mLabel(MyLocale.getMsg(1101,"Profile 1"))); content.addLast(btnCoords1 = new mButton(pref.lats[0] + " " + pref.longs[0])); content.addNext(new mLabel("Name")); content.addLast(name1 = new mInput()); content.addNext(new mLabel("Dir")); content.addNext(dir1 = new mInput()); content.addLast(but1 = new mButton(MyLocale.getMsg(1105,"Browse"))); name1.setText(pref.profiles[0]); dir1.setText(pref.profdirs[0]); //content.addLast(new mLabel(MyLocale.getMsg(1102,"Profile 1"))); content.addNext(new mLabel(MyLocale.getMsg(1102,"Profile 2"))); content.addLast(btnCoords2 = new mButton(pref.lats[1] + " " + pref.longs[1])); content.addNext(new mLabel("Name")); content.addLast(name2 = new mInput()); content.addNext(new mLabel("Dir")); content.addNext(dir2 = new mInput()); content.addLast(but2 = new mButton(MyLocale.getMsg(1105,"Browse"))); name2.setText(pref.profiles[1]); dir2.setText(pref.profdirs[1]); //content.addLast(new mLabel(MyLocale.getMsg(1103,"Profile 1"))); content.addNext(new mLabel(MyLocale.getMsg(1103,"Profile 3"))); content.addLast(btnCoords3 = new mButton(pref.lats[2] + " " + pref.longs[2])); content.addNext(new mLabel("Name")); content.addLast(name3 = new mInput()); content.addNext(new mLabel("Dir")); content.addNext(dir3 = new mInput()); content.addLast(but3 = new mButton(MyLocale.getMsg(1105,"Browse"))); name3.setText(pref.profiles[2]); dir3.setText(pref.profdirs[2]); //content.addLast(new mLabel(MyLocale.getMsg(1104,"Profile 1"))); content.addNext(new mLabel(MyLocale.getMsg(1104,"Profile 4"))); content.addLast(btnCoords4 = new mButton(pref.lats[3] + " " + pref.longs[3])); content.addNext(new mLabel("Name")); content.addLast(name4 = new mInput()); content.addNext(new mLabel("Dir")); content.addNext(dir4 = new mInput()); content.addLast(but4 = new mButton(MyLocale.getMsg(1105,"Browse"))); name4.setText(pref.profiles[3]); dir4.setText(pref.profdirs[3]); content.addNext(new mLabel("")); content.addNext(cancelB = new mButton(MyLocale.getMsg(614,"Cancel")),CellConstants.DONTSTRETCH, (CellConstants.DONTFILL|CellConstants.WEST)); content.addLast(applyB = new mButton(MyLocale.getMsg(615,"Apply")),CellConstants.DONTSTRETCH, (CellConstants.DONTFILL|CellConstants.EAST)); this.addLast(scp.getScrollablePanel(), CellConstants.STRETCH, CellConstants.FILL); }
57191 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57191/3a42b7c41e65b369561b9cdd4550a1d5cf2ef594/ProfilesScreen.java/clean/trunk/src/CacheWolf/ProfilesScreen.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 1186, 2354, 7956, 12, 12377, 293, 15329, 202, 202, 18461, 273, 394, 23134, 5190, 5537, 12, 1745, 1769, 202, 202, 25724, 273, 293, 31, 202, 202, 542, 13042, 1225, 12, 28784, 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, 1186, 2354, 7956, 12, 12377, 293, 15329, 202, 202, 18461, 273, 394, 23134, 5190, 5537, 12, 1745, 1769, 202, 202, 25724, 273, 293, 31, 202, 202, 542, 13042, 1225, 12, 28784, 16, ...
public void multiplicativeExpression() throws RecognitionException { try { // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/java.g:611:17: ( unaryExpression ( (STAR|DIV|MOD) unaryExpression )* ) // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/java.g:611:17: unaryExpression ( (STAR|DIV|MOD) unaryExpression )* { following.push(FOLLOW_unaryExpression_in_multiplicativeExpression2408); unaryExpression(); following.pop(); // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/java.g:611:33: ( (STAR|DIV|MOD) unaryExpression )* loop63: do { int alt63=2; int LA63_0 = input.LA(1); if ( LA63_0==STAR||(LA63_0>=DIV && LA63_0<=MOD) ) { alt63=1; } switch (alt63) { case 1 : // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/java.g:611:34: (STAR|DIV|MOD) unaryExpression { if ( input.LA(1)==STAR||(input.LA(1)>=DIV && input.LA(1)<=MOD) ) { input.consume(); errorRecovery=false; } else { MismatchedSetException mse = new MismatchedSetException(null,input); recoverFromMismatchedSet(input,mse,FOLLOW_set_in_multiplicativeExpression2412); throw mse; } following.push(FOLLOW_unaryExpression_in_multiplicativeExpression2424); unaryExpression(); following.pop(); } break; default : break loop63; } } while (true); } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { } }
6736 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6736/7e425814ce563fcc662b266adb2a4dc8e1a95d19/JavaParser.java/clean/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1071, 918, 3309, 28884, 2300, 1435, 1216, 9539, 288, 282, 775, 288, 759, 342, 6588, 19, 70, 947, 19, 12922, 19, 14915, 19, 10649, 8464, 7482, 19, 12215, 17, 9576, 19, 4816, 19, 5254, 19, 629...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1071, 918, 3309, 28884, 2300, 1435, 1216, 9539, 288, 282, 775, 288, 759, 342, 6588, 19, 70, 947, 19, 12922, 19, 14915, 19, 10649, 8464, 7482, 19, 12215, 17, 9576, 19, 4816, 19, 5254, 19, 629...
log.error("No peers to put in the new tunnel! selectPeers returned an empty list?! fake=" + fake);
log.error("No peers to put in the new tunnel! selectPeers returned an empty list?! fake=" + zeroHop);
private PooledTunnelCreatorConfig configTunnel(RouterContext ctx, TunnelPool pool, boolean fake) { Log log = ctx.logManager().getLog(TunnelBuilder.class); TunnelPoolSettings settings = pool.getSettings(); long expiration = ctx.clock().now() + settings.getDuration(); List peers = null; long failures = countFailures(ctx); boolean failing = (failures > 5) && (pool.getSettings().getAllowZeroHop()); boolean failsafe = false; if (failing && (ctx.random().nextInt(100) < failures) ) failsafe = true; if (fake || failsafe) { peers = new ArrayList(1); peers.add(ctx.routerHash()); if ( (failsafe) && (log.shouldLog(Log.WARN)) ) log.warn("Building failsafe tunnel for " + pool); } else { peers = pool.getSelector().selectPeers(ctx, settings); } if ( (peers == null) || (peers.size() <= 0) ) { // no inbound or outbound tunnels to send the request through, and // the pool is refusing 0 hop tunnels if (peers == null) { if (log.shouldLog(Log.ERROR)) log.error("No peers to put in the new tunnel! selectPeers returned null! boo, hiss! fake=" + fake); } else { if (log.shouldLog(Log.ERROR)) log.error("No peers to put in the new tunnel! selectPeers returned an empty list?! fake=" + fake); } return null; } PooledTunnelCreatorConfig cfg = new PooledTunnelCreatorConfig(ctx, peers.size(), settings.isInbound(), settings.getDestination()); // peers[] is ordered endpoint first, but cfg.getPeer() is ordered gateway first for (int i = 0; i < peers.size(); i++) { int j = peers.size() - 1 - i; cfg.setPeer(j, (Hash)peers.get(i)); HopConfig hop = cfg.getConfig(j); hop.setExpiration(expiration); hop.setIVKey(ctx.keyGenerator().generateSessionKey()); hop.setLayerKey(ctx.keyGenerator().generateSessionKey()); // tunnelIds will be updated during building, and as the creator, we // don't need to worry about prev/next hop } cfg.setExpiration(expiration); Log l = ctx.logManager().getLog(TunnelBuilder.class); if (l.shouldLog(Log.DEBUG)) l.debug("Config contains " + peers + ": " + cfg); return cfg; }
3808 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3808/10ed058c2eb31f7552a375d40653e9c7575a38fa/TunnelBuilder.java/buggy/router/java/src/net/i2p/router/tunnel/pool/TunnelBuilder.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 453, 22167, 20329, 10636, 809, 642, 20329, 12, 8259, 1042, 1103, 16, 399, 8564, 2864, 2845, 16, 1250, 10517, 13, 288, 3639, 1827, 613, 273, 1103, 18, 1330, 1318, 7675, 588, 1343, 12...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 453, 22167, 20329, 10636, 809, 642, 20329, 12, 8259, 1042, 1103, 16, 399, 8564, 2864, 2845, 16, 1250, 10517, 13, 288, 3639, 1827, 613, 273, 1103, 18, 1330, 1318, 7675, 588, 1343, 12...
if (_log.shouldLog(Log.DEBUG)) _log.debug(getJobId() + ": Send search to " + router.getIdentity().getHash().toBase64());
if (_log.shouldLog(Log.INFO)) _log.info(getJobId() + ": Send search to " + router.getIdentity().getHash().toBase64() + " for " + _state.getTarget().toBase64());
protected void sendSearch(RouterInfo router) { if (router.getIdentity().equals(getContext().router().getRouterInfo().getIdentity())) { // don't search ourselves if (_log.shouldLog(Log.ERROR)) _log.error(getJobId() + ": Dont send search to ourselves - why did we try?"); return; } else { if (_log.shouldLog(Log.DEBUG)) _log.debug(getJobId() + ": Send search to " + router.getIdentity().getHash().toBase64()); } getContext().statManager().addRateData("netDb.searchMessageCount", 1, 0); if (_isLease || false) // moo sendLeaseSearch(router); else sendRouterSearch(router); }
45677 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45677/d74aa6e53db101dcab9bf76b9279dc44df63637d/SearchJob.java/buggy/router/java/src/net/i2p/router/networkdb/kademlia/SearchJob.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 918, 1366, 2979, 12, 8259, 966, 4633, 13, 288, 3639, 309, 261, 10717, 18, 588, 4334, 7675, 14963, 12, 29120, 7675, 10717, 7675, 588, 8259, 966, 7675, 588, 4334, 1435, 3719, 288, 541...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 918, 1366, 2979, 12, 8259, 966, 4633, 13, 288, 3639, 309, 261, 10717, 18, 588, 4334, 7675, 14963, 12, 29120, 7675, 10717, 7675, 588, 8259, 966, 7675, 588, 4334, 1435, 3719, 288, 541...
private static void enterFrame(Context cx, CallFrame frame, Object[] args) { boolean usesActivation = frame.idata.itsNeedsActivation; boolean isDebugged = frame.debuggerFrame != null; if(usesActivation || isDebugged) { // Walk the parent chain of frame.scope until a NativeCall is found. // Normally, frame.scope is a NativeCall when called from initFrame() // for a debugged or activatable function. However, when called // from interpreterLoop() as part of restarting a continuation, it // can also be a NativeWith if the continuation was captured within // a "with" or "catch" block ("catch" implicitly uses NativeWith to // create a scope to expose the exception variable). Scriptable scope = frame.scope; if(scope == null) { Kit.codeBug(); } else { for(;;) { if(scope instanceof NativeCall) { if (isDebugged) { frame.debuggerFrame.onEnter(cx, scope, frame.thisObj, args); } // Enter activation only when itsNeedsActivation true, // since debugger should not interfere with activation // chaining if (usesActivation) { ScriptRuntime.enterActivationFunction(cx, (NativeCall)scope); } break; } else { scope = scope.getParentScope(); if(scope == null || (frame.parentFrame != null && frame.parentFrame.scope == scope)) { // If we get here, we didn't find a NativeCall in // the call chain before reaching parent frame's // scope. This should not be possible. Kit.codeBug(); break; // Never reached, but keeps the static analyzer happy about "scope" not being null 5 lines above. } } } } } }
47345 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47345/ff59a6eb5c9021e9de8b00c2d972b7707c5548cf/Interpreter.java/buggy/src/org/mozilla/javascript/Interpreter.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 760, 918, 6103, 3219, 12, 1042, 9494, 16, 3049, 3219, 2623, 16, 1033, 8526, 833, 13, 565, 288, 1250, 4692, 14857, 273, 2623, 18, 350, 396, 18, 1282, 26419, 14857, 31, 225, 1250, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 760, 918, 6103, 3219, 12, 1042, 9494, 16, 3049, 3219, 2623, 16, 1033, 8526, 833, 13, 565, 288, 1250, 4692, 14857, 273, 2623, 18, 350, 396, 18, 1282, 26419, 14857, 31, 225, 1250, 4...
return createAssignment(makeReferenceGet(left), right);
throw Kit.codeBug();
Node createAssignment(Node left, Node right) { int nodeType = left.getType(); switch (nodeType) { case Token.NAME: left.setType(Token.BINDNAME); return new Node(Token.SETNAME, left, right); case Token.GETPROP: case Token.GETELEM: { Node obj = left.getFirstChild(); Node id = left.getLastChild(); int type; if (nodeType == Token.GETPROP) { type = Token.SETPROP; } else { type = Token.SETELEM; } return new Node(type, obj, id, right); } case Token.GET_REF: { Node ref = left.getFirstChild(); return new Node(Token.SET_REF, ref, right); } } return createAssignment(makeReferenceGet(left), right); }
47345 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47345/08a2c249ed69fa0fb972c35558018ad575f4a516/IRFactory.java/buggy/src/org/mozilla/javascript/IRFactory.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 2029, 752, 7729, 12, 907, 2002, 16, 2029, 2145, 13, 565, 288, 3639, 509, 9507, 273, 2002, 18, 588, 559, 5621, 3639, 1620, 261, 2159, 559, 13, 288, 1850, 648, 3155, 18, 1985, 30, 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, 2029, 752, 7729, 12, 907, 2002, 16, 2029, 2145, 13, 565, 288, 3639, 509, 9507, 273, 2002, 18, 588, 559, 5621, 3639, 1620, 261, 2159, 559, 13, 288, 1850, 648, 3155, 18, 1985, 30, 5411, ...
public AnnotationParserTokenManager(SimpleCharStream stream) { if (input_stream != null) { throw new TokenMgrError( "ERROR: Second call to constructor of static lexer. You must use ReInit() to initialize the static variables.", TokenMgrError.STATIC_LEXER_ERROR ); } input_stream = stream; }
public AnnotationParserTokenManager(SimpleCharStream stream) { if (input_stream != null) throw new TokenMgrError("ERROR: Second call to constructor of static lexer. You must use ReInit() to initialize the static variables.", TokenMgrError.STATIC_LEXER_ERROR); input_stream = stream; }
public AnnotationParserTokenManager(SimpleCharStream stream) { if (input_stream != null) { throw new TokenMgrError( "ERROR: Second call to constructor of static lexer. You must use ReInit() to initialize the static variables.", TokenMgrError.STATIC_LEXER_ERROR ); } input_stream = stream; }
7954 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7954/fcfd72e089ab163c5f4883bd2ffb60888a5d7900/AnnotationParserTokenManager.java/buggy/aspectwerkz3/src/main/org/codehaus/aspectwerkz/annotation/expression/ast/AnnotationParserTokenManager.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 6090, 2678, 1345, 1318, 12, 5784, 2156, 1228, 1407, 13, 288, 3639, 309, 261, 2630, 67, 3256, 480, 446, 13, 288, 5411, 604, 394, 3155, 9455, 668, 12, 10792, 315, 3589, 30, 7631, 74...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6090, 2678, 1345, 1318, 12, 5784, 2156, 1228, 1407, 13, 288, 3639, 309, 261, 2630, 67, 3256, 480, 446, 13, 288, 5411, 604, 394, 3155, 9455, 668, 12, 10792, 315, 3589, 30, 7631, 74...
else if ((_tokenSet_0.member(LA(1)))) {
else if ((_tokenSet_1.member(LA(1)))) {
public final void forwardOrReverseStep() throws RecognitionException, TokenStreamException { returnAST = null; ASTPair currentAST = new ASTPair(); AST forwardOrReverseStep_AST = null; boolean synPredMatched51 = false; if ((((LA(1) >= LITERAL_child && LA(1) <= 52)))) { int _m51 = mark(); synPredMatched51 = true; inputState.guessing++; try { { forwardAxisSpecifier(); match(COLON); } } catch (RecognitionException pe) { synPredMatched51 = false; } rewind(_m51); inputState.guessing--; } if ( synPredMatched51 ) { forwardAxis(); astFactory.addASTChild(currentAST, returnAST); nodeTest(); astFactory.addASTChild(currentAST, returnAST); forwardOrReverseStep_AST = (AST)currentAST.root; } else { boolean synPredMatched53 = false; if ((((LA(1) >= LITERAL_parent && LA(1) <= 56)))) { int _m53 = mark(); synPredMatched53 = true; inputState.guessing++; try { { reverseAxisSpecifier(); match(COLON); } } catch (RecognitionException pe) { synPredMatched53 = false; } rewind(_m53); inputState.guessing--; } if ( synPredMatched53 ) { reverseAxis(); astFactory.addASTChild(currentAST, returnAST); nodeTest(); astFactory.addASTChild(currentAST, returnAST); forwardOrReverseStep_AST = (AST)currentAST.root; } else if ((_tokenSet_0.member(LA(1)))) { abbrevStep(); astFactory.addASTChild(currentAST, returnAST); forwardOrReverseStep_AST = (AST)currentAST.root; } else { throw new NoViableAltException(LT(1), getFilename()); } } returnAST = forwardOrReverseStep_AST; }
2909 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2909/ad9d55f515de2cb1fa50cf09c9e42150efc8374f/XPathParser2.java/buggy/src/org/exist/parser/XPathParser2.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 727, 918, 5104, 1162, 12650, 4160, 1435, 1216, 9539, 16, 3155, 1228, 503, 288, 9506, 202, 2463, 9053, 273, 446, 31, 202, 202, 9053, 4154, 783, 9053, 273, 394, 9183, 4154, 5621, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5104, 1162, 12650, 4160, 1435, 1216, 9539, 16, 3155, 1228, 503, 288, 9506, 202, 2463, 9053, 273, 446, 31, 202, 202, 9053, 4154, 783, 9053, 273, 394, 9183, 4154, 5621, ...
cdiBreakpoint = cdiTarget.setLocationBreakpoint( ICDIBreakpoint.REGULAR, location, condition, null, true );
cdiBreakpoint = cdiTarget.setLocationBreakpoint( ICDIBreakpoint.REGULAR, location, condition, true );
private ICDIBreakpoint setLineBreakpoint( ICLineBreakpoint breakpoint ) throws CDIException, CoreException { ICDITarget cdiTarget = getCDITarget(); ICDILocation location = cdiTarget.createLocation( breakpoint.getMarker().getResource().getLocation().lastSegment(), null, breakpoint.getLineNumber() ); ICDICondition condition = cdiTarget.createCondition( breakpoint.getIgnoreCount(), breakpoint.getCondition() ); ICDIBreakpoint cdiBreakpoint = null; synchronized ( getBreakpointMap() ) { cdiBreakpoint = cdiTarget.setLocationBreakpoint( ICDIBreakpoint.REGULAR, location, condition, null, true ); getBreakpointMap().put( breakpoint, cdiBreakpoint ); } return cdiBreakpoint; }
6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/f5bde83546ef21b7bda1a823287e9bf2ef00d1d4/CBreakpointManager.java/buggy/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CBreakpointManager.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 26899, 2565, 20552, 26482, 20552, 12, 26899, 1670, 20552, 18820, 262, 1216, 385, 2565, 503, 16, 30015, 288, 202, 202, 2871, 40, 1285, 826, 276, 3211, 2326, 273, 1927, 40, 1285, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 26899, 2565, 20552, 26482, 20552, 12, 26899, 1670, 20552, 18820, 262, 1216, 385, 2565, 503, 16, 30015, 288, 202, 202, 2871, 40, 1285, 826, 276, 3211, 2326, 273, 1927, 40, 1285, ...
fDebugTimeoutText.setPropertyChangeListener( new IPropertyChangeListener() { public void propertyChange( PropertyChangeEvent event ) { if ( event.getProperty().equals( FieldEditor.IS_VALID ) ) setValid( getDebugTimeoutText().isValid() ); } } );
fDebugTimeoutText.setPropertyChangeListener( this );
private void createCommunicationPreferences( Composite composite ) { Composite comp = createGroupComposite( composite, 1, PreferenceMessages.getString( "MIPreferencePage.1" ) ); //$NON-NLS-1$ //Add in an intermediate composite to allow for spacing Composite spacingComposite = new Composite( comp, SWT.NONE ); GridLayout layout = new GridLayout(); spacingComposite.setLayout( layout ); GridData data = new GridData(); data.horizontalSpan = 2; spacingComposite.setLayoutData( data ); fDebugTimeoutText = createTimeoutField( IMIConstants.PREF_REQUEST_TIMEOUT, PreferenceMessages.getString( "MIPreferencePage.2" ), spacingComposite ); //$NON-NLS-1$ fDebugTimeoutText.setPropertyChangeListener( new IPropertyChangeListener() { public void propertyChange( PropertyChangeEvent event ) { if ( event.getProperty().equals( FieldEditor.IS_VALID ) ) setValid( getDebugTimeoutText().isValid() ); } } ); fLaunchTimeoutText = createTimeoutField( IMIConstants.PREF_REQUEST_LAUNCH_TIMEOUT, PreferenceMessages.getString( "MIPreferencePage.3" ), spacingComposite ); //$NON-NLS-1$ fLaunchTimeoutText.setPropertyChangeListener( new IPropertyChangeListener() { public void propertyChange( PropertyChangeEvent event ) { if ( event.getProperty().equals( FieldEditor.IS_VALID ) ) setValid( getLaunchTimeoutText().isValid() ); } } ); fRefreshSolibsButton = createRefreshField( IMIConstants.PREF_SHARED_LIBRARIES_AUTO_REFRESH, PreferenceMessages.getString( "MIPreferencePage.6" ), spacingComposite ); //$NON-NLS-1$ }
54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/c7b5a7da639b3078d54dd9a1e393e16f9ef6694b/MIPreferencePage.java/clean/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/preferences/MIPreferencePage.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 918, 752, 25219, 12377, 12, 14728, 9635, 262, 288, 202, 202, 9400, 1161, 273, 752, 1114, 9400, 12, 9635, 16, 404, 16, 29125, 5058, 18, 588, 780, 12, 315, 7492, 9624, 1964, 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, 1152, 918, 752, 25219, 12377, 12, 14728, 9635, 262, 288, 202, 202, 9400, 1161, 273, 752, 1114, 9400, 12, 9635, 16, 404, 16, 29125, 5058, 18, 588, 780, 12, 315, 7492, 9624, 1964, 18...
case PathIterator.SEG_CLOSE:
private double[] computeInSlope(double[] prev, int prevSegType, double[] cur, int curSegType, double[] moveTo){ // Compute point into which the slope runs Point2D curEndPoint = null; if(curSegType != PathIterator.SEG_CLOSE){ curEndPoint = getSegmentTerminatingPoint(cur, curSegType); if(curEndPoint == null){ return null; } } else{ curEndPoint = new Point2D.Double(moveTo[0], moveTo[1]); } double dx = 0, dy = 0; switch(curSegType){ case PathIterator.SEG_QUADTO: // If the current segment is a line, quad or cubic curve. // the slope is about equal to that of the // line from the last control point and the curEndPoint dx = curEndPoint.getX() - cur[0]; dy = curEndPoint.getY() - cur[1]; break; case PathIterator.SEG_LINETO: case PathIterator.SEG_CLOSE: // // This is equivalent to a line from the previous // segment's terminating point and the current end // point. Point2D prevEndPoint = null; if(prevSegType != PathIterator.SEG_CLOSE){ prevEndPoint = getSegmentTerminatingPoint(prev, prevSegType); if(prevEndPoint == null){ return null; } } else{ prevEndPoint = new Point2D.Double(moveTo[0], moveTo[1]); } dx = curEndPoint.getX() - prevEndPoint.getX(); dy = curEndPoint.getY() - prevEndPoint.getY(); break; case PathIterator.SEG_CUBICTO: // If the current segment is a line, quad or cubic curve. // the slope is about equal to that of the // line from the last control point and the curEndPoint dx = curEndPoint.getX() - cur[2]; dy = curEndPoint.getY() - cur[3]; break; case PathIterator.SEG_MOVETO: // Cannot compute the slope default: return null; } return new double[] { dx, dy }; }
46680 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46680/ad73cbdd55db09ba5c155962f8ba18d70ee51e5c/DecoratedShapeNode.java/clean/sources/org/apache/batik/gvt/DecoratedShapeNode.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 1645, 8526, 3671, 382, 55, 12232, 12, 9056, 8526, 2807, 16, 4766, 565, 509, 2807, 3289, 559, 16, 4766, 565, 1645, 8526, 662, 16, 4766, 565, 509, 662, 3289, 559, 16, 4766, 565, 164...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1645, 8526, 3671, 382, 55, 12232, 12, 9056, 8526, 2807, 16, 4766, 565, 509, 2807, 3289, 559, 16, 4766, 565, 1645, 8526, 662, 16, 4766, 565, 509, 662, 3289, 559, 16, 4766, 565, 164...
myExpectation.verify(); }
myExpectation.verify(); }
public void testFlushActual() { myExpectation.setActual("a string"); myExpectation.setExpectNothing(); myExpectation.verify(); }
57371 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57371/4aaf60d8fa76687c3492c508dd98678fbbd3d935/ExpectationSegmentTest.java/clean/jmock/core/src/test/jmock/expectation/ExpectationSegmentTest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1842, 8207, 11266, 1435, 288, 3639, 3399, 11988, 367, 18, 542, 11266, 2932, 69, 533, 8863, 3639, 3399, 11988, 367, 18, 542, 11988, 23814, 5621, 3639, 3399, 11988, 367, 18, 8705, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1842, 8207, 11266, 1435, 288, 3639, 3399, 11988, 367, 18, 542, 11266, 2932, 69, 533, 8863, 3639, 3399, 11988, 367, 18, 542, 11988, 23814, 5621, 3639, 3399, 11988, 367, 18, 8705, ...
try { getSession().reconnect(); } catch(HibernateException ex) { invalidateSession(); throw ex; } }
try { getDelegatedSession().reconnect(); } catch (HibernateException ex) { throw handleException(ex); } catch (RuntimeException ex) { throw handleException(ex); } }
public void reconnect() throws HibernateException { try { getSession().reconnect(); } catch(HibernateException ex) { invalidateSession(); throw ex; } }
9344 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9344/cfa1414127b7a9b2e82c8e522e6166c1f1472f81/SessionDelegator.java/clean/java/nanocontainer-persistence/trunk/persistence/src/java/org/nanocontainer/persistence/hibernate/classic/SessionDelegator.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 11812, 1435, 1216, 670, 24360, 503, 288, 4202, 775, 288, 5411, 7183, 7675, 25913, 5621, 4202, 289, 1044, 12, 44, 24360, 503, 431, 13, 288, 5411, 11587, 2157, 5621, 5411, 604, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 11812, 1435, 1216, 670, 24360, 503, 288, 4202, 775, 288, 5411, 7183, 7675, 25913, 5621, 4202, 289, 1044, 12, 44, 24360, 503, 431, 13, 288, 5411, 11587, 2157, 5621, 5411, 604, 4...
boolean held = Thread.currentThread().holdsLock(lock); System.out.println(held);
Thread this_thread = Thread.currentThread(); System.out.println(this_thread.holdsLock(lock));
public void check() { boolean held = Thread.currentThread().holdsLock(lock); System.out.println(held); }
13625 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13625/713eba072c5903a401778afb174de08cbd11a77d/Thread_HoldsLock.java/clean/libjava/testsuite/libjava.lang/Thread_HoldsLock.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 866, 1435, 225, 288, 565, 1250, 15770, 273, 4884, 18, 2972, 3830, 7675, 21056, 87, 2531, 12, 739, 1769, 565, 2332, 18, 659, 18, 8222, 12, 76, 488, 1769, 225, 289, 2, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 866, 1435, 225, 288, 565, 1250, 15770, 273, 4884, 18, 2972, 3830, 7675, 21056, 87, 2531, 12, 739, 1769, 565, 2332, 18, 659, 18, 8222, 12, 76, 488, 1769, 225, 289, 2, -100, ...
data = new GridData(); data.horizontalAlignment = GridData.FILL; data.grabExcessHorizontalSpace = true; data.horizontalSpan = 2;
data = new GridData(GridData.FILL_HORIZONTAL); data.widthHint = convertWidthInCharsToPixels(8);
protected Control createContents(Composite parent) { Font font = parent.getFont(); PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, IHelpUIConstants.PREF_PAGE_APPSERVER); Composite mainComposite = new Composite(parent, SWT.NULL); mainComposite.setLayoutData(new GridData(GridData.FILL_BOTH)); GridLayout layout = new GridLayout(); layout.marginHeight = 0; layout.marginWidth = 0; layout.numColumns = 2; mainComposite.setLayout(layout); Label label = new Label(mainComposite, SWT.NONE); label.setText(Messages.AppserverPreferencePage_description); //$NON-NLS-1$ GridData data = new GridData(); data.horizontalSpan = 2; label.setLayoutData(data); label.setFont(font); // Spacer label = new Label(mainComposite, SWT.NONE); data = new GridData(); data.horizontalSpan = 2; label.setLayoutData(data); label.setFont(font); label = new Label(mainComposite, SWT.NONE); label.setFont(font); label.setText(Messages.AppserverPreferencePage_hostDescription); //$NON-NLS-1$ data = new GridData(); data.horizontalSpan = 2; label.setLayoutData(data); //Label labelHost = new Label(mainComposite, SWT.LEFT); //labelHost.setText( // WorkbenchResources.getString("AppserverPreferencePage.host")); //data = new GridData(); //labelHost.setLayoutData(data); //labelHost.setFont(font); textServerAddr = new Text(mainComposite, SWT.SINGLE | SWT.BORDER); //text.addListener(SWT.Modify, this); data = new GridData(); data.horizontalAlignment = GridData.FILL; data.grabExcessHorizontalSpace = true; data.horizontalSpan = 2; textServerAddr.setLayoutData(data); textServerAddr.setFont(font); // Spacer label = new Label(mainComposite, SWT.NONE); data = new GridData(); data.horizontalSpan = 2; label.setLayoutData(data); label.setFont(font); label = new Label(mainComposite, SWT.NONE); label.setFont(font); label.setText(Messages.AppserverPreferencePage_portDescription); //$NON-NLS-1$ data = new GridData(); data.horizontalSpan = 2; label.setLayoutData(data); label.setFont(font); //Label labelPort = new Label(mainComposite, SWT.LEFT); //labelPort.setText( // WorkbenchResources.getString("AppserverPreferencePage.port")); //data = new GridData(); //labelPort.setLayoutData(data); //labelPort.setFont(font); textServerPort = new Text(mainComposite, SWT.SINGLE | SWT.BORDER); textServerPort.setTextLimit(5); data = new GridData(); data.widthHint = convertWidthInCharsToPixels(8); data.horizontalAlignment = GridData.FILL; data.grabExcessHorizontalSpace = true; data.horizontalSpan = 2; textServerPort.setLayoutData(data); textServerPort.setFont(font); // Validation of port field textServerPort.addModifyListener(new ModifyListener() { public void modifyText(ModifyEvent e) { if (textServerPort.getText().length() == 0) { AppserverPreferencePage.this.setValid(true); setErrorMessage(null); return; } try { int num = Integer.valueOf(textServerPort.getText()) .intValue(); if (0 <= num && num <= 0xFFFF) { // port is valid AppserverPreferencePage.this.setValid(true); setErrorMessage(null); return; } // port is invalid } catch (NumberFormatException nfe) { } AppserverPreferencePage.this.setValid(false); setErrorMessage(Messages.AppserverPreferencePage_invalidPort); //$NON-NLS-1$ } }); // Spacer label = new Label(mainComposite, SWT.NONE); data = new GridData(); data.horizontalSpan = 2; label.setLayoutData(data); label.setFont(font); label = new Label(mainComposite, SWT.NONE); label .setText(Messages.AppserverPreferencePage_Note); //$NON-NLS-1$ // Make this bold FontData[] fontData = font.getFontData(); for (int i = 0; i < fontData.length; i++) { fontData[i].setStyle(fontData[i].getStyle() | SWT.BOLD); } final Font boldFont = new Font(label.getDisplay(), fontData); label.setFont(boldFont); label.addDisposeListener(new DisposeListener() { public void widgetDisposed(DisposeEvent e) { boldFont.dispose(); } }); // data = new GridData(GridData.VERTICAL_ALIGN_BEGINNING); //data.horizontalSpan = 2; label.setLayoutData(data); label = new Label(mainComposite, SWT.NONE); label.setText(Messages.AppserverPreferencePage_requireRestart); //$NON-NLS-1$ data = new GridData(); //data.horizontalSpan = 2; label.setLayoutData(data); label.setFont(font); Preferences pref = AppserverPlugin.getDefault().getPluginPreferences(); textServerAddr.setText(pref.getString(AppserverPlugin.HOST_KEY)); textServerPort.setText(pref.getString(AppserverPlugin.PORT_KEY)); return mainComposite; }
13822 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13822/5cc189be6cf638638b8785e2c5cb4b05c5373de0/AppserverPreferencePage.java/buggy/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/AppserverPreferencePage.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1117, 8888, 752, 6323, 12, 9400, 982, 13, 288, 202, 202, 5711, 3512, 273, 982, 18, 588, 5711, 5621, 202, 202, 8201, 5370, 18, 588, 2421, 22144, 7675, 588, 6696, 3163, 7675, 542, 66...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1117, 8888, 752, 6323, 12, 9400, 982, 13, 288, 202, 202, 5711, 3512, 273, 982, 18, 588, 5711, 5621, 202, 202, 8201, 5370, 18, 588, 2421, 22144, 7675, 588, 6696, 3163, 7675, 542, 66...
} else { sfs.put("UploadFrom", "direct");
public SimpleFieldSet getFieldSet() { SimpleFieldSet sfs = new SimpleFieldSet(false); sfs.put("URI", uri.toString()); sfs.put("Identifier", identifier); sfs.put("Verbosity", Integer.toString(verbosity)); sfs.put("MaxRetries", Integer.toString(maxRetries)); sfs.put("Metadata.ContentType", contentType); sfs.put("ClientToken", clientToken); if(fromDisk) { sfs.put("UploadFrom", "disk"); sfs.put("Filename", origFilename.getAbsolutePath()); } else { sfs.put("UploadFrom", "direct"); sfs.put("DataLength", Long.toString(dataLength)); } sfs.put("GetCHKOnly", Boolean.toString(getCHKOnly)); sfs.put("PriorityClass", Short.toString(priorityClass)); sfs.put("PersistenceType", ClientRequest.persistenceTypeString(persistenceType)); sfs.put("DontCompress", Boolean.toString(dontCompress)); sfs.put("Global", Boolean.toString(global)); return sfs; }
50653 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50653/5f6cd14357e2fd98f1b8e460aa78526429387ea0/ClientPutMessage.java/buggy/src/freenet/node/fcp/ClientPutMessage.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 4477, 974, 694, 5031, 694, 1435, 288, 202, 202, 5784, 974, 694, 272, 2556, 273, 394, 4477, 974, 694, 12, 5743, 1769, 202, 202, 87, 2556, 18, 458, 2932, 3098, 3113, 2003, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 4477, 974, 694, 5031, 694, 1435, 288, 202, 202, 5784, 974, 694, 272, 2556, 273, 394, 4477, 974, 694, 12, 5743, 1769, 202, 202, 87, 2556, 18, 458, 2932, 3098, 3113, 2003, 18, ...
trueHigh = (((inHigh[trailingIdx2]) > (inClose[trailingIdx2-1])) ? (inHigh[trailingIdx2]) : (inClose[trailingIdx2-1])) ; trueLow = (((inLow[trailingIdx2]) < (inClose[trailingIdx2-1])) ? (inLow[trailingIdx2]) : (inClose[trailingIdx2-1])) ; closeMinusTrueLow = inClose[trailingIdx2] - trueLow; trueRange = trueHigh - trueLow;
{ tempLT = inLow[trailingIdx2]; tempHT = inHigh[trailingIdx2]; tempCY = inClose[trailingIdx2-1]; trueLow = (((tempLT) < (tempCY)) ? (tempLT) : (tempCY)) ; closeMinusTrueLow = inClose[trailingIdx2] - trueLow; trueRange = tempHT - tempLT; tempDouble = Math.abs ( tempCY - tempHT ); if( tempDouble > trueRange ) trueRange = tempDouble; tempDouble = Math.abs ( tempCY - tempLT ); if( tempDouble > trueRange ) trueRange = tempDouble; } ;
public TA_RetCode ULTOSC( int startIdx, int endIdx, double inHigh[], double inLow[], double inClose[], int optInTimePeriod1, int optInTimePeriod2, int optInTimePeriod3, MInteger outBegIdx, MInteger outNbElement, double outReal[] ) { double a1Total, a2Total, a3Total; double b1Total, b2Total, b3Total; double trueHigh, trueLow, trueRange, closeMinusTrueLow; double tempDouble; int lookbackTotal; int longestPeriod, longestIndex; int i,j,today,outIdx; int trailingIdx1, trailingIdx2, trailingIdx3; int []usedFlag = new int[3] ; int []periods = new int[3] ; int []sortedPeriods = new int[3] ; if( startIdx < 0 ) return TA_RetCode. TA_OUT_OF_RANGE_START_INDEX; if( (endIdx < 0) || (endIdx < startIdx)) return TA_RetCode. TA_OUT_OF_RANGE_END_INDEX; if( (int)optInTimePeriod1 == ( Integer.MIN_VALUE ) ) optInTimePeriod1 = 7; else if( ((int)optInTimePeriod1 < 1) || ((int)optInTimePeriod1 > 100000) ) return TA_RetCode. TA_BAD_PARAM; if( (int)optInTimePeriod2 == ( Integer.MIN_VALUE ) ) optInTimePeriod2 = 14; else if( ((int)optInTimePeriod2 < 1) || ((int)optInTimePeriod2 > 100000) ) return TA_RetCode. TA_BAD_PARAM; if( (int)optInTimePeriod3 == ( Integer.MIN_VALUE ) ) optInTimePeriod3 = 28; else if( ((int)optInTimePeriod3 < 1) || ((int)optInTimePeriod3 > 100000) ) return TA_RetCode. TA_BAD_PARAM; outBegIdx.value = 0 ; outNbElement.value = 0 ; periods[0] = optInTimePeriod1; periods[1] = optInTimePeriod2; periods[2] = optInTimePeriod3; usedFlag[0] = 0; usedFlag[1] = 0; usedFlag[2] = 0; for ( i = 0; i < 3; ++i ) { longestPeriod = 0; longestIndex = 0; for ( j = 0; j < 3; ++j ) { if ( (usedFlag[j] == 0) && (periods[j] > longestPeriod) ) { longestPeriod = periods[j]; longestIndex = j; } } usedFlag[longestIndex] = 1; sortedPeriods[i] = longestPeriod; } optInTimePeriod1 = sortedPeriods[0]; optInTimePeriod2 = sortedPeriods[1]; optInTimePeriod3 = sortedPeriods[2]; lookbackTotal = ULTOSC_Lookback ( optInTimePeriod1, optInTimePeriod2, optInTimePeriod3 ); if( startIdx < lookbackTotal ) startIdx = lookbackTotal; if( startIdx > endIdx ) return TA_RetCode. TA_SUCCESS; a1Total = 0; b1Total = 0; for ( i = startIdx-optInTimePeriod1; i < startIdx; ++i ) { trueHigh = (((inHigh[i]) > (inClose[i-1])) ? (inHigh[i]) : (inClose[i-1])) ; trueLow = (((inLow[i]) < (inClose[i-1])) ? (inLow[i]) : (inClose[i-1])) ; closeMinusTrueLow = inClose[i] - trueLow; trueRange = trueHigh - trueLow; a1Total += closeMinusTrueLow; b1Total += trueRange; } a2Total = 0; b2Total = 0; for ( i = startIdx-optInTimePeriod2; i < startIdx; ++i ) { trueHigh = (((inHigh[i]) > (inClose[i-1])) ? (inHigh[i]) : (inClose[i-1])) ; trueLow = (((inLow[i]) < (inClose[i-1])) ? (inLow[i]) : (inClose[i-1])) ; closeMinusTrueLow = inClose[i] - trueLow; trueRange = trueHigh - trueLow; a2Total += closeMinusTrueLow; b2Total += trueRange; } a3Total = 0; b3Total = 0; for ( i = startIdx-optInTimePeriod3; i < startIdx; ++i ) { trueHigh = (((inHigh[i]) > (inClose[i-1])) ? (inHigh[i]) : (inClose[i-1])) ; trueLow = (((inLow[i]) < (inClose[i-1])) ? (inLow[i]) : (inClose[i-1])) ; closeMinusTrueLow = inClose[i] - trueLow; trueRange = trueHigh - trueLow; a3Total += closeMinusTrueLow; b3Total += trueRange; } today = startIdx; outIdx = 0; trailingIdx1 = today - optInTimePeriod1; trailingIdx2 = today - optInTimePeriod2; trailingIdx3 = today - optInTimePeriod3; while( today <= endIdx ) { trueHigh = (((inHigh[today]) > (inClose[today-1])) ? (inHigh[today]) : (inClose[today-1])) ; trueLow = (((inLow[today]) < (inClose[today-1])) ? (inLow[today]) : (inClose[today-1])) ; closeMinusTrueLow = inClose[today] - trueLow; trueRange = trueHigh - trueLow; a1Total += closeMinusTrueLow; a2Total += closeMinusTrueLow; a3Total += closeMinusTrueLow; b1Total += trueRange; b2Total += trueRange; b3Total += trueRange; trueHigh = (((inHigh[trailingIdx1]) > (inClose[trailingIdx1-1])) ? (inHigh[trailingIdx1]) : (inClose[trailingIdx1-1])) ; trueLow = (((inLow[trailingIdx1]) < (inClose[trailingIdx1-1])) ? (inLow[trailingIdx1]) : (inClose[trailingIdx1-1])) ; closeMinusTrueLow = inClose[trailingIdx1] - trueLow; trueRange = trueHigh - trueLow; a1Total -= closeMinusTrueLow; b1Total -= trueRange; trueHigh = (((inHigh[trailingIdx2]) > (inClose[trailingIdx2-1])) ? (inHigh[trailingIdx2]) : (inClose[trailingIdx2-1])) ; trueLow = (((inLow[trailingIdx2]) < (inClose[trailingIdx2-1])) ? (inLow[trailingIdx2]) : (inClose[trailingIdx2-1])) ; closeMinusTrueLow = inClose[trailingIdx2] - trueLow; trueRange = trueHigh - trueLow; a2Total -= closeMinusTrueLow; b2Total -= trueRange; trueHigh = (((inHigh[trailingIdx3]) > (inClose[trailingIdx3-1])) ? (inHigh[trailingIdx3]) : (inClose[trailingIdx3-1])) ; trueLow = (((inLow[trailingIdx3]) < (inClose[trailingIdx3-1])) ? (inLow[trailingIdx3]) : (inClose[trailingIdx3-1])) ; closeMinusTrueLow = inClose[trailingIdx3] - trueLow; trueRange = trueHigh - trueLow; a3Total -= closeMinusTrueLow; b3Total -= trueRange; tempDouble = 0.0; if( ! (((-0.00000001)<b1Total)&&(b1Total<0.00000001)) ) tempDouble += 4.0*a1Total/b1Total; if( ! (((-0.00000001)<b2Total)&&(b2Total<0.00000001)) ) tempDouble += 2.0*a2Total/b2Total; if( ! (((-0.00000001)<b3Total)&&(b3Total<0.00000001)) ) tempDouble += a3Total/b3Total; outReal[outIdx] = 100.0 * (tempDouble / 7.0); outIdx++; today++; trailingIdx1++; trailingIdx2++; trailingIdx3++; } outNbElement.value = outIdx; outBegIdx.value = startIdx; return TA_RetCode. TA_SUCCESS; }
7231 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7231/045b687ca5f25fc510e9e22fb38364fc072f39a6/Core.java/clean/ta-lib/java/src/TA/Lib/Core.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 565, 1071, 399, 37, 67, 7055, 1085, 587, 48, 4296, 2312, 12, 509, 27108, 16, 1377, 509, 679, 4223, 16, 1377, 1645, 316, 8573, 63, 6487, 1377, 1645, 316, 10520, 63, 6487, 1377, 1645, 316, 460...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 399, 37, 67, 7055, 1085, 587, 48, 4296, 2312, 12, 509, 27108, 16, 1377, 509, 679, 4223, 16, 1377, 1645, 316, 8573, 63, 6487, 1377, 1645, 316, 10520, 63, 6487, 1377, 1645, 316, 460...
public void eSet( EStructuralFeature eFeature, Object newValue )
public void eSet( int featureID, Object newValue )
public void eSet( EStructuralFeature eFeature, Object newValue ) { switch ( eDerivedStructuralFeatureID( eFeature ) ) { case AttributePackage.PALETTE__NAME : setName( (String) newValue ); return; case AttributePackage.PALETTE__ENTRIES : getEntries( ).clear( ); getEntries( ).addAll( (Collection) newValue ); return; } eDynamicSet( eFeature, newValue ); }
46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/036e8c78765730b146e5854b9d6c397a296fed86/PaletteImpl.java/clean/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/model/attribute/impl/PaletteImpl.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 20199, 12, 512, 14372, 4595, 425, 4595, 16, 1033, 6129, 262, 202, 95, 202, 202, 9610, 261, 425, 21007, 14372, 4595, 734, 12, 425, 4595, 262, 262, 202, 202, 95, 1082, 202,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 20199, 12, 512, 14372, 4595, 425, 4595, 16, 1033, 6129, 262, 202, 95, 202, 202, 9610, 261, 425, 21007, 14372, 4595, 734, 12, 425, 4595, 262, 262, 202, 202, 95, 1082, 202,...
public void addMCParticleContribution(MCParticle p, float energy, float time, int pdg) { checkAccess(); int i = getIndexForNextContrib(); this.particle[i] = p; this.energyContrib[i] = energy; this.time[i] = time; this.pdg[i] = pdg; }
1612 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1612/c981b170f1c94cbcfd8bac8c2da34ea4623b48e2/ISimCalorimeterHit.java/clean/src/java/hep/lcio/implementation/event/ISimCalorimeterHit.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 565, 1071, 918, 527, 20022, 1988, 3711, 442, 4027, 12, 20022, 1988, 3711, 293, 16, 1431, 12929, 16, 1431, 813, 16, 509, 4863, 75, 13, 282, 288, 1377, 28484, 5621, 1377, 509, 277, 273, 8088, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 527, 20022, 1988, 3711, 442, 4027, 12, 20022, 1988, 3711, 293, 16, 1431, 12929, 16, 1431, 813, 16, 509, 4863, 75, 13, 282, 288, 1377, 28484, 5621, 1377, 509, 277, 273, 8088, ...
for(j = 0; j < facetCount; j++)
for(j = 0; j <= depthFacetCount; j++)
private void regenerateStandardPatch() { int i, j, ki, kj; double i_inter, i_inc; double j_inter, j_inc; double bi, bj; double x, y, z; int cnt, p_cnt; int last = facetCount * 3; int last_depth = (numDepthControlPoints - 1) * 3; int last_width = numWidthControlPoints - 1; // Step size along the curve i_inc = (numWidthControlPoints - widthDegree + 1) / (double)facetCount; j_inc = (numDepthControlPoints - depthDegree + 1) / (double)facetCount; i_inter = 0; for(i = 0; i < facetCount; i++) { j_inter = 0; p_cnt = 0; for(j = 0; j < facetCount; j++) { x = 0; y = 0; z = 0; cnt = 0; kj = 0; for(ki = 0; ki < numWidthControlPoints; ki++) { cnt = 0; for(kj = 0; kj < numDepthControlPoints; kj++) { bi = splineBlend(ki, widthDegree, false, i_inter); bj = splineBlend(kj, depthDegree, true, j_inter); x += controlPointCoordinates[ki][cnt++] * bi * bj; y += controlPointCoordinates[ki][cnt++] * bi * bj; z += controlPointCoordinates[ki][cnt++] * bi * bj; } } patchCoordinates[i][p_cnt++] = (float)x; patchCoordinates[i][p_cnt++] = (float)y; patchCoordinates[i][p_cnt++] = (float)z; j_inter += j_inc; } i_inter += i_inc; } // Process the last row along the depth. i_inter = 0; for(i = 0; i < facetCount; i++) { x = 0; y = 0; z = 0; for(ki = 0; ki < numWidthControlPoints; ki++) { bi = splineBlend(ki, widthDegree, false, i_inter); x += controlPointCoordinates[ki][last_depth] * bi; y += controlPointCoordinates[ki][last_depth + 1] * bi; z += controlPointCoordinates[ki][last_depth + 2] * bi; } patchCoordinates[i][last] = (float)x; patchCoordinates[i][last + 1] = (float)y; patchCoordinates[i][last + 2] = (float)z; i_inter += i_inc; } patchCoordinates[facetCount][last] = controlPointCoordinates[last_width][last_depth]; patchCoordinates[facetCount][last + 1] = controlPointCoordinates[last_width][last_depth + 1]; patchCoordinates[facetCount][last + 2] = controlPointCoordinates[last_width][last_depth + 2]; // Process the last row along the width. j_inter = 0; for(j = 0; j < facetCount; j++) { x = 0; y = 0; z = 0; cnt = 0; for(kj = 0; kj < numDepthControlPoints; kj++) { bj = splineBlend(kj, depthDegree, true, j_inter); x += controlPointCoordinates[last_width][cnt++] * bj; y += controlPointCoordinates[last_width][cnt++] * bj; z += controlPointCoordinates[last_width][cnt++] * bj; } patchCoordinates[facetCount][j * 3] = (float)x; patchCoordinates[facetCount][j * 3 + 1] = (float)y; patchCoordinates[facetCount][j * 3 + 2] = (float)z; j_inter += j_inc; } patchCoordinates[facetCount][last] = controlPointCoordinates[last_width][last_depth]; patchCoordinates[facetCount][last + 1] = controlPointCoordinates[last_width][last_depth + 1]; patchCoordinates[facetCount][last + 2] = controlPointCoordinates[last_width][last_depth + 2]; }
46075 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46075/8b547f8eacb158f4811528bcdcd3f1ba7ec3edb2/BSplinePatchGenerator.java/buggy/src/java/org/j3d/geom/spline/BSplinePatchGenerator.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 20821, 8336, 7332, 1435, 565, 288, 3639, 509, 277, 16, 525, 16, 29027, 16, 417, 78, 31, 3639, 1645, 277, 67, 2761, 16, 277, 67, 9523, 31, 3639, 1645, 525, 67, 2761, 16, 525...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 20821, 8336, 7332, 1435, 565, 288, 3639, 509, 277, 16, 525, 16, 29027, 16, 417, 78, 31, 3639, 1645, 277, 67, 2761, 16, 277, 67, 9523, 31, 3639, 1645, 525, 67, 2761, 16, 525...
public void maybeUpdate(){ synchronized(this) { try{ if(isFetching || (!isRunning) || (!isUpdatable())) return; }catch (PrivkeyHasBeenBlownException e){ isRunning=false; return; }
public synchronized void maybeUpdate(){ try{ if(isFetching || (!isRunning) || (!isUpdatable())) return; }catch (PrivkeyHasBeenBlownException e){ isRunning=false; return;
public void maybeUpdate(){ synchronized(this) { try{ if(isFetching || (!isRunning) || (!isUpdatable())) return; }catch (PrivkeyHasBeenBlownException e){ // Handled in blow(). isRunning=false; return; } } alert.set(availableVersion,false); alert.isValid(true); Logger.normal(this,"Starting the update process"); System.err.println("Starting the update process: found the update, now fetching it.");// We fetch it try{ if((cg==null)||cg.isCancelled()){ cg = new ClientGetter(this, node.chkFetchScheduler, node.sskFetchScheduler, URI.setSuggestedEdition(availableVersion), ctx, RequestStarter.BULK_SPLITFILE_PRIORITY_CLASS, this, new ArrayBucket()); } cg.start(); isFetching = true; queueFetchRevocation(0); }catch (Exception e) { Logger.error(this, "Error while starting the fetching: "+e, e); isFetching=false; } }
46731 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46731/0ce52e9ff1e0048c34e8d11f2ad596bc8936f6e9/NodeUpdater.java/clean/src/freenet/node/updater/NodeUpdater.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 6944, 1891, 1435, 95, 202, 202, 22043, 12, 2211, 13, 288, 1082, 202, 698, 95, 9506, 202, 430, 12, 291, 30806, 747, 16051, 291, 7051, 13, 747, 16051, 291, 1211, 3404, 429,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6944, 1891, 1435, 95, 202, 202, 22043, 12, 2211, 13, 288, 1082, 202, 698, 95, 9506, 202, 430, 12, 291, 30806, 747, 16051, 291, 7051, 13, 747, 16051, 291, 1211, 3404, 429,...
buffer.append(RrdFileConstants.RRD_SUFFIX);
buffer.append(RrdFileConstants.getRrdSuffix());
public String getRelativePathForAttribute(String resourceType, String resourceParent, String resource, String attribute) { StringBuffer buffer = new StringBuffer(); buffer.append(resource); buffer.append(File.separator); buffer.append(attribute); buffer.append(RrdFileConstants.RRD_SUFFIX); return buffer.toString(); }
47678 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47678/da1833373ca16bbb379588d9784d901d24de3148/ResponseTimeModel.java/buggy/opennms-webapp/src/main/java/org/opennms/web/response/ResponseTimeModel.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 514, 26986, 1290, 1499, 12, 780, 14110, 16, 514, 1058, 3054, 16, 514, 1058, 16, 514, 1566, 13, 288, 3639, 6674, 1613, 273, 394, 6674, 5621, 3639, 1613, 18, 6923, 12, 3146, 1769, 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, 514, 26986, 1290, 1499, 12, 780, 14110, 16, 514, 1058, 3054, 16, 514, 1058, 16, 514, 1566, 13, 288, 3639, 6674, 1613, 273, 394, 6674, 5621, 3639, 1613, 18, 6923, 12, 3146, 1769, 3...
(ResourceHistory) this.history, container), IResource.NONE);
(ResourceHistory) this.history, container, filter), IResource.NONE);
protected void searchResults(Set filteredHistory, SearcherProgressMonitor monitor) throws CoreException { SearcherProgressMonitor progress = new SearcherProgressMonitor( monitor, model); if (progress != null) progress.beginTask("", container.members().length); //$NON-NLS-1$ container.accept(new ResourceProxyVisitor(model, progress, (ResourceHistory) this.history, container), IResource.NONE); if (progress != null) progress.done(); ArrayList resources = new ArrayList(Arrays.asList(this.model .getElements())); resourceSearcher.rememberResult(fTicket, resources); }
55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/ae3d354a71713373749ce0e06f69f1d25ce8c0e4/ResourceSearcher.java/clean/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/ResourceSearcher.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 3196, 202, 1117, 918, 1623, 3447, 12, 694, 5105, 5623, 16, 9506, 202, 2979, 264, 5491, 7187, 6438, 13, 1216, 30015, 288, 1082, 202, 2979, 264, 5491, 7187, 4007, 273, 394, 5167, 264, 5491, 7187...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 3196, 202, 1117, 918, 1623, 3447, 12, 694, 5105, 5623, 16, 9506, 202, 2979, 264, 5491, 7187, 6438, 13, 1216, 30015, 288, 1082, 202, 2979, 264, 5491, 7187, 4007, 273, 394, 5167, 264, 5491, 7187...
16, 17, 18, 0,
16, 17, 18, 0, 0, 0, 0, 19, 20, 21, 22, 23, 24, 25, 0, 0, 26, 0, 0, 0, 0, 0, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 0, 41, 42, 0, 43, 44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45, 0, 0, 46, 47, 48, 49, 0, 50, 59, 51, 52, 53, 54, 55, 56, 58, 0, 0, 0, 57, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 396, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 280, 280, 280, 0, 0, 0, 280, 280, 0, 280, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 280, 280, 0, 280, 280, 280, 280, 280, 0, 0, 0, 0, 0, 0, 0, 0, 59, 0, 0, 0, 0, 0, 0, 58, 0, 0, 0, 0, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 0, 0, 280, 280, 280, 3, 4, 5, 6, 7, 8, 0, 0, 0, 9, 10, 0, 0, 0, 11, 0, 12, 13, 14, 15, 16, 17, 18, 0, 0, 0, 0, 19, 20, 21, 22, 23, 24, 25, 0, 0, 26, 0, 0, 0, 0, 0, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 0, 41, 42, 0, 43, 44, 0, 0, 0, 0, 0, 0, 0, 0, 59, 0, 0, 233, 0, 0, 0, 0, 0, 0, 45, 412, 0, 261, 47, 48, 49, 0, 50, 0, 51, 52, 53, 54, 55, 56, 0, 0, 0, 0, 57,
private static final short[] yyTable3() { return new short[] { 0, 0, 188, 0, 186, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 187, 187, 188, 188, 0, 0, 188, 188, 188, 188, 188, 0, 188, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 188, 188, 188, 0, 188, 188, 0, 0, 0, 0, 0, 0, 0, 0, 0, 190, 0, 0, 0, 0, 0, 0, 0, 0, 0, 190, 0, 0, 0, 0, 0, 0, 0, 0, 0, 188, 188, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 190, 190, 0, 0, 190, 190, 190, 190, 190, 0, 190, 0, 0, 0, 188, 188, 0, 0, 0, 0, 0, 190, 190, 190, 0, 190, 190, 0, 0, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 0, 0, 322, 323, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 190, 190, 0, 0, 0, 0, 0, 187, 187, 187, 0, 0, 187, 187, 187, 0, 187, 0, 212, 0, 0, 0, 0, 0, 0, 0, 187, 187, 212, 0, 0, 190, 190, 0, 0, 187, 187, 0, 187, 187, 187, 187, 187, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 212, 0, 0, 212, 0, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, 212, 212, 187, 187, 0, 212, 0, 187, 0, 0, 0, 0, 187, 0, 0, 0, 0, 0, 0, 0, 188, 188, 188, 0, 0, 188, 188, 188, 0, 188, 0, 0, 0, 0, 0, 212, 0, 0, 0, 188, 188, 0, 0, 0, 0, 0, 0, 0, 188, 188, 0, 188, 188, 188, 188, 188, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 212, 0, 0, 0, 0, 0, 0, 0, 0, 0, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 0, 0, 188, 188, 190, 190, 190, 188, 0, 190, 190, 190, 188, 190, 0, 0, 0, 0, 0, 0, 0, 0, 0, 190, 190, 0, 0, 0, 0, 0, 0, 0, 190, 190, 0, 190, 190, 190, 190, 190, 0, 0, 0, 0, 0, 191, 0, 0, 0, 0, 0, 0, 0, 0, 0, 191, 0, 0, 0, 0, 0, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 0, 0, 190, 190, 0, 0, 0, 190, 0, 191, 191, 0, 190, 191, 191, 191, 191, 191, 0, 191, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 191, 191, 191, 0, 191, 191, 0, 0, 0, 0, 0, 0, 212, 212, 212, 184, 0, 212, 212, 212, 0, 212, 0, 0, 0, 184, 0, 0, 0, 0, 0, 212, 212, 0, 0, 191, 191, 0, 0, 0, 212, 212, 0, 212, 212, 212, 212, 212, 0, 0, 0, 0, 0, 184, 0, 0, 184, 0, 184, 184, 184, 0, 0, 0, 0, 0, 191, 191, 0, 0, 0, 0, 0, 184, 184, 184, 212, 184, 184, 212, 212, 0, 0, 0, 0, 0, 0, 0, 212, 0, 0, 0, 185, 212, 0, 0, 0, 0, 0, 0, 0, 0, 185, 0, 0, 0, 0, 0, 184, 184, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 185, 0, 0, 185, 0, 185, 185, 185, 0, 184, 184, 0, 0, 0, 0, 0, 0, 0, 0, 0, 185, 185, 185, 0, 185, 185, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 185, 185, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 191, 191, 191, 0, 0, 191, 191, 191, 0, 191, 0, 0, 185, 185, 0, 0, 0, 0, 0, 191, 191, 0, 0, 0, 0, 0, 0, 0, 191, 191, 0, 191, 191, 191, 191, 191, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 0, 0, 191, 191, 184, 184, 184, 191, 0, 184, 184, 184, 191, 184, 0, 0, 0, 0, 0, 0, 0, 0, 0, 184, 184, 0, 0, 0, 0, 0, 0, 0, 184, 184, 0, 184, 184, 184, 184, 184, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 0, 0, 184, 184, 0, 0, 0, 184, 185, 185, 185, 0, 184, 185, 185, 185, 0, 185, 0, 0, 0, 0, 0, 0, 0, 0, 0, 185, 185, 0, 0, 0, 0, 0, 0, 0, 185, 185, 0, 185, 185, 185, 185, 185, 209, 0, 0, 0, 0, 0, 0, 0, 0, 0, 209, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 0, 0, 185, 185, 0, 209, 0, 185, 209, 0, 0, 209, 185, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 209, 209, 209, 0, 209, 209, 0, 0, 0, 0, 0, 0, 0, 0, 0, 210, 0, 0, 0, 0, 0, 0, 0, 0, 0, 210, 0, 0, 0, 0, 0, 0, 334, 329, 0, 209, 209, 332, 330, 0, 331, 0, 333, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 210, 0, 326, 210, 325, 324, 210, 0, 0, 0, 0, 0, 0, 209, 209, 0, 0, 0, 0, 0, 210, 210, 210, 0, 210, 210, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 328, 0, 0, 196, 0, 0, 0, 0, 0, 0, 0, 0, 0, 196, 0, 0, 0, 0, 0, 210, 210, 0, 0, 0, 0, 0, 0, 0, 0, 0, 327, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 196, 0, 0, 196, 0, 0, 196, 0, 0, 210, 210, 0, 0, 0, 0, 0, 0, 0, 0, 0, 196, 196, 196, 0, 196, 196, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 334, 329, 0, 0, 0, 332, 330, 0, 331, 0, 333, 0, 0, 0, 0, 196, 196, 0, 0, 0, 0, 0, 0, 326, 0, 325, 0, 0, 0, 0, 0, 0, 0, 0, 209, 209, 209, 0, 0, 209, 209, 209, 0, 209, 0, 0, 196, 196, 0, 0, 0, 0, 0, 209, 209, 0, 0, 328, 0, 0, 0, 0, 209, 209, 0, 209, 209, 209, 209, 209, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 327, 0, 0, 0, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 0, 0, 209, 209, 210, 210, 210, 209, 0, 210, 210, 210, 209, 210, 0, 0, 0, 0, 0, 0, 0, 0, 0, 210, 210, 0, 0, 0, 0, 0, 0, 0, 210, 210, 0, 210, 210, 210, 210, 210, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 0, 0, 322, 323, 0, 0, 0, 0, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 0, 0, 210, 210, 0, 0, 0, 210, 196, 196, 196, 0, 210, 196, 196, 196, 0, 196, 0, 194, 0, 0, 0, 0, 0, 0, 0, 196, 196, 194, 0, 0, 0, 0, 0, 0, 196, 196, 0, 196, 196, 196, 196, 196, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 194, 0, 0, 194, 0, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 194, 194, 194, 0, 194, 194, 0, 196, 0, 0, 0, 0, 196, 0, 0, 195, 0, 0, 0, 0, 0, 0, 0, 0, 0, 195, 0, 0, 309, 310, 311, 312, 313, 314, 315, 194, 194, 318, 319, 0, 0, 0, 0, 322, 323, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 195, 0, 0, 195, 0, 0, 0, 0, 0, 0, 194, 194, 0, 0, 0, 0, 0, 195, 195, 195, 0, 195, 195, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 199, 0, 0, 0, 0, 0, 0, 0, 0, 0, 199, 0, 0, 0, 0, 0, 195, 195, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 199, 0, 0, 199, 0, 0, 195, 195, 0, 0, 0, 0, 0, 0, 0, 0, 0, 199, 199, 199, 0, 199, 199, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 183, 178, 0, 0, 0, 181, 179, 0, 180, 0, 182, 0, 0, 0, 0, 0, 199, 0, 0, 0, 0, 0, 0, 175, 0, 174, 0, 0, 0, 0, 0, 0, 0, 0, 0, 194, 194, 194, 0, 0, 194, 194, 194, 0, 194, 0, 0, 0, 199, 0, 0, 0, 0, 0, 194, 194, 0, 177, 0, 185, 0, 0, 0, 194, 194, 0, 194, 194, 194, 194, 194, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 176, 0, 184, 0, 0, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 0, 0, 0, 0, 195, 195, 195, 194, 0, 195, 195, 195, 194, 195, 0, 0, 0, 0, 0, 0, 0, 0, 0, 195, 195, 0, 0, 0, 0, 0, 0, 0, 195, 195, 201, 195, 195, 195, 195, 195, 0, 0, 0, 0, 201, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 0, 0, 201, 0, 0, 201, 0, 195, 199, 199, 199, 0, 195, 199, 199, 199, 0, 199, 0, 201, 201, 201, 0, 201, 201, 0, 0, 199, 199, 0, 0, 0, 0, 0, 0, 0, 199, 199, 198, 199, 199, 199, 199, 199, 0, 0, 0, 0, 198, 0, 0, 0, 0, 0, 201, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 0, 0, 198, 0, 0, 198, 0, 199, 0, 201, 0, 0, 199, 515, 516, 0, 0, 517, 0, 198, 198, 198, 0, 198, 198, 160, 161, 162, 163, 164, 165, 0, 166, 167, 200, 0, 168, 0, 0, 0, 169, 170, 171, 172, 200, 0, 0, 0, 0, 0, 0, 0, 0, 173, 198, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 200, 0, 0, 200, 0, 0, 0, 0, 0, 0, 0, 198, 0, 0, 0, 0, 0, 200, 200, 200, 0, 200, 200, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 200, 203, 0, 0, 0, 0, 0, 0, 0, 0, 0, 203, 0, 0, 0, 0, 0, 0, 0, 201, 201, 201, 0, 0, 201, 201, 201, 0, 201, 0, 0, 0, 200, 0, 0, 0, 0, 0, 201, 201, 0, 0, 203, 0, 0, 203, 0, 201, 201, 0, 201, 201, 201, 201, 201, 0, 0, 0, 0, 203, 203, 0, 0, 0, 203, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 0, 0, 0, 0, 0, 0, 203, 201, 198, 198, 198, 0, 201, 198, 198, 198, 0, 198, 0, 0, 0, 0, 0, 0, 0, 0, 0, 198, 198, 0, 0, 0, 0, 0, 0, 0, 198, 198, 203, 198, 198, 198, 198, 198, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, 0, 0, 0, 0, 200, 200, 200, 198, 0, 200, 200, 200, 198, 200, 0, 204, 0, 0, 0, 0, 0, 0, 0, 200, 200, 204, 0, 0, 0, 0, 0, 0, 200, 200, 0, 200, 200, 200, 200, 200, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 204, 0, 0, 204, 0, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 204, 204, 0, 0, 0, 204, 0, 200, 0, 0, 0, 0, 200, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 203, 203, 203, 211, 0, 203, 203, 203, 0, 203, 204, 0, 0, 211, 0, 0, 0, 0, 0, 203, 203, 0, 0, 0, 0, 0, 0, 0, 203, 203, 0, 203, 203, 203, 203, 203, 0, 0, 0, 0, 0, 263, 204, 0, 211, 0, 0, 211, 0, 0, 0, 263, 0, 0, 0, 0, 0, 0, 0, 0, 0, 211, 211, 203, 203, 0, 211, 203, 203, 0, 0, 0, 0, 0, 0, 0, 203, 0, 0, 0, 205, 203, 263, 0, 0, 262, 0, 0, 0, 0, 205, 0, 0, 0, 0, 0, 211, 0, 0, 263, 263, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 205, 0, 0, 205, 0, 0, 0, 211, 0, 0, 206, 0, 0, 0, 0, 0, 0, 205, 205, 0, 206, 0, 205, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 263, 0, 0, 0, 0, 0, 206, 205, 0, 206, 0, 0, 0, 204, 204, 204, 182, 0, 204, 204, 204, 0, 204, 206, 206, 0, 182, 0, 206, 0, 0, 0, 204, 204, 0, 0, 0, 0, 0, 205, 0, 204, 204, 0, 204, 204, 204, 204, 204, 0, 0, 0, 0, 0, 183, 0, 0, 182, 206, 0, 182, 0, 0, 0, 183, 0, 0, 0, 0, 0, 0, 0, 0, 0, 182, 182, 204, 204, 0, 182, 204, 204, 0, 0, 0, 0, 0, 0, 0, 204, 206, 0, 0, 0, 204, 183, 0, 0, 183, 211, 211, 211, 0, 0, 211, 211, 211, 0, 211, 182, 0, 0, 183, 183, 0, 0, 0, 183, 211, 211, 0, 0, 0, 0, 0, 0, 0, 211, 211, 0, 211, 211, 211, 211, 211, 0, 0, 263, 263, 263, 0, 182, 263, 263, 263, 0, 263, 183, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 211, 211, 0, 0, 211, 211, 263, 263, 263, 263, 263, 0, 0, 211, 205, 205, 205, 183, 211, 205, 205, 205, 0, 205, 0, 0, 0, 0, 0, 0, 0, 0, 0, 205, 205, 0, 0, 0, 0, 0, 0, 0, 205, 205, 0, 205, 205, 205, 205, 205, 0, 263, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 206, 206, 206, 0, 0, 206, 206, 206, 0, 206, 0, 0, 205, 205, 0, 0, 205, 205, 0, 206, 206, 0, 0, 0, 0, 205, 0, 0, 206, 206, 205, 206, 206, 206, 206, 206, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 182, 182, 182, 0, 0, 182, 182, 182, 0, 182, 0, 0, 206, 206, 0, 0, 206, 206, 0, 182, 182, 0, 0, 0, 0, 206, 0, 0, 182, 182, 206, 182, 182, 182, 182, 182, 217, 0, 183, 183, 183, 0, 0, 183, 183, 183, 217, 183, 0, 0, 0, 0, 0, 0, 0, 0, 0, 183, 183, 0, 0, 0, 0, 0, 0, 0, 183, 183, 0, 183, 183, 183, 183, 183, 181, 0, 182, 217, 0, 0, 217, 182, 0, 0, 181, 0, 0, 0, 0, 0, 0, 0, 0, 0, 217, 217, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 174, 183, 181, 0, 0, 181, 183, 0, 0, 0, 174, 0, 0, 0, 0, 0, 217, 0, 0, 181, 181, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 214, 0, 174, 0, 0, 174, 0, 0, 0, 217, 214, 0, 0, 0, 0, 181, 0, 0, 0, 174, 174, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 180, 0, 0, 214, 0, 0, 214, 0, 0, 181, 180, 0, 0, 0, 0, 0, 174, 0, 0, 0, 214, 214, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 215, 0, 180, 0, 0, 180, 0, 0, 0, 174, 215, 0, 0, 0, 0, 0, 214, 0, 0, 180, 180, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 215, 0, 0, 215, 0, 0, 0, 214, 0, 0, 0, 0, 0, 180, 0, 0, 0, 215, 215, 0, 0, 0, 0, 0, 0, 0, 0, 0, 217, 217, 217, 0, 0, 217, 217, 217, 0, 217, 0, 0, 0, 0, 0, 0, 0, 180, 0, 217, 217, 0, 0, 0, 215, 0, 0, 0, 217, 217, 0, 217, 217, 217, 217, 217, 0, 0, 181, 181, 181, 0, 0, 181, 181, 181, 0, 181, 0, 0, 0, 0, 0, 0, 0, 0, 215, 181, 181, 0, 0, 0, 0, 0, 0, 0, 181, 181, 0, 181, 181, 181, 181, 181, 0, 0, 217, 174, 174, 174, 0, 217, 174, 174, 174, 0, 174, 0, 0, 0, 0, 0, 0, 0, 0, 0, 174, 174, 0, 0, 0, 0, 0, 0, 0, 174, 174, 0, 174, 174, 174, 174, 174, 0, 181, 0, 214, 214, 214, 181, 0, 214, 214, 214, 0, 214, 0, 0, 0, 0, 0, 0, 0, 0, 0, 214, 214, 0, 0, 0, 0, 0, 0, 0, 214, 214, 0, 214, 214, 214, 214, 214, 0, 174, 180, 180, 180, 0, 174, 180, 180, 180, 0, 180, 0, 0, 0, 0, 0, 0, 0, 0, 0, 180, 180, 0, 0, 0, 0, 0, 0, 0, 180, 180, 0, 180, 180, 180, 180, 180, 0, 0, 214, 215, 215, 215, 178, 214, 215, 215, 215, 0, 215, 0, 0, 0, 178, 0, 0, 0, 0, 0, 215, 215, 0, 0, 0, 0, 0, 0, 0, 215, 215, 0, 215, 215, 215, 215, 215, 0, 180, 0, 179, 0, 0, 180, 0, 178, 0, 0, 178, 0, 179, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 178, 178, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 215, 0, 0, 0, 179, 215, 0, 179, 0, 0, 0, 0, 0, 0, 176, 0, 0, 0, 0, 0, 178, 179, 179, 0, 176, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 177, 0, 178, 0, 0, 176, 179, 0, 176, 0, 177, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 176, 176, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 173, 179, 0, 0, 177, 0, 0, 177, 0, 0, 173, 0, 0, 0, 0, 0, 0, 0, 0, 0, 176, 177, 177, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 175, 0, 0, 0, 0, 173, 0, 0, 173, 0, 175, 0, 0, 0, 0, 0, 176, 0, 0, 0, 177, 0, 173, 173, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 175, 0, 0, 175, 0, 0, 0, 0, 0, 0, 0, 177, 0, 0, 0, 0, 173, 175, 175, 0, 0, 0, 0, 0, 0, 178, 178, 178, 0, 0, 178, 178, 178, 0, 178, 0, 0, 0, 0, 0, 0, 261, 0, 0, 178, 178, 0, 0, 173, 0, 0, 261, 175, 178, 178, 0, 178, 178, 178, 178, 178, 179, 179, 179, 0, 0, 179, 179, 179, 0, 179, 0, 0, 0, 0, 0, 0, 0, 0, 0, 179, 179, 261, 0, 175, 261, 0, 0, 0, 179, 179, 0, 179, 179, 179, 179, 179, 0, 0, 261, 261, 178, 0, 0, 0, 0, 178, 0, 0, 0, 0, 0, 176, 176, 176, 0, 0, 176, 176, 176, 0, 176, 0, 0, 0, 0, 0, 0, 0, 0, 0, 176, 176, 0, 261, 0, 0, 179, 0, 0, 176, 176, 179, 176, 176, 176, 176, 176, 177, 177, 177, 0, 0, 177, 177, 177, 0, 177, 0, 0, 0, 0, 0, 0, 0, 0, 261, 177, 177, 0, 0, 0, 0, 0, 0, 0, 177, 177, 0, 177, 177, 177, 177, 177, 0, 173, 173, 173, 176, 0, 173, 173, 173, 176, 173, 0, 0, 0, 0, 0, 0, 172, 0, 0, 173, 173, 0, 0, 0, 0, 0, 172, 0, 173, 173, 0, 173, 173, 173, 173, 173, 175, 175, 175, 177, 0, 175, 175, 175, 177, 175, 0, 0, 0, 0, 0, 0, 262, 0, 0, 175, 175, 172, 0, 0, 172, 0, 262, 0, 175, 175, 0, 175, 175, 175, 175, 175, 0, 0, 172, 172, 173, 0, 0, 0, 0, 173, 334, 329, 0, 0, 0, 332, 330, 0, 331, 0, 333, 262, 0, 0, 262, 0, 0, 0, 0, 0, 0, 0, 0, 326, 0, 325, 0, 172, 262, 262, 175, 0, 0, 0, 0, 175, 261, 261, 261, 318, 0, 261, 261, 261, 0, 261, 0, 0, 0, 318, 0, 0, 0, 0, 0, 261, 261, 328, 0, 172, 0, 0, 0, 262, 261, 261, 0, 261, 261, 261, 261, 261, 0, 0, 0, 0, 318, 318, 0, 0, 318, 318, 318, 318, 318, 318, 318, 327, 0, 0, 0, 0, 0, 0, 0, 262, 0, 318, 318, 318, 0, 318, 318, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 261, 172, 0, 0, 0, 0, 0, 0, 0, 0, 0, 172, 319, 318, 0, 0, 318, 0, 0, 0, 0, 0, 319, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 172, 0, 0, 217, 318, 318, 0, 319, 319, 0, 0, 319, 319, 319, 319, 319, 319, 319, 172, 0, 0, 0, 0, 0, 0, 0, 0, 0, 319, 319, 319, 0, 319, 319, 0, 0, 0, 172, 172, 172, 0, 0, 172, 172, 172, 0, 172, 0, 0, 0, 0, 0, 0, 0, 0, 0, 172, 172, 0, 0, 0, 319, 0, 0, 319, 172, 172, 0, 172, 172, 172, 172, 0, 262, 262, 262, 0, 0, 262, 262, 262, 0, 262, 0, 172, 0, 0, 0, 0, 0, 0, 0, 262, 262, 319, 319, 0, 0, 0, 0, 0, 262, 262, 0, 262, 262, 262, 262, 262, 0, 0, 0, 0, 172, 0, 0, 0, 0, 172, 0, 0, 0, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 0, 0, 0, 0, 322, 323, 0, 0, 0, 318, 318, 318, 0, 0, 318, 318, 318, 0, 318, 0, 0, 262, 0, 0, 0, 0, 0, 0, 318, 0, 0, 0, 0, 0, 0, 0, 0, 318, 318, 0, 318, 318, 318, 318, 318, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 318, 318, 318, 318, 318, 318, 318, 318, 318, 318, 318, 318, 318, 0, 0, 318, 318, 318, 0, 0, 318, 0, 0, 172, 172, 172, 0, 0, 0, 172, 172, 0, 172, 0, 319, 319, 319, 0, 0, 319, 319, 319, 0, 319, 0, 0, 0, 0, 0, 0, 0, 172, 172, 319, 172, 172, 172, 172, 0, 0, 0, 0, 319, 319, 0, 319, 319, 319, 319, 319, 0, 283, 0, 0, 0, 0, 0, 0, 0, 0, 0, 283, 0, 0, 0, 0, 0, 0, 0, 0, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 0, 0, 319, 319, 319, 283, 283, 319, 0, 283, 283, 283, 283, 283, 283, 283, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 283, 283, 283, 0, 283, 283, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 334, 329, 0, 0, 0, 332, 330, 0, 331, 423, 333, 0, 0, 0, 0, 283, 0, 0, 283, 423, 0, 0, 0, 326, 0, 325, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 423, 423, 283, 283, 423, 423, 423, 74, 423, 423, 423, 328, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 423, 423, 82, 423, 423, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 273, 0, 327, 0, 0, 0, 0, 0, 0, 0, 273, 0, 0, 0, 0, 423, 0, 40, 423, 0, 0, 0, 0, 0, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 273, 273, 0, 0, 273, 273, 273, 81, 273, 273, 273, 423, 423, 0, 0, 0, 0, 0, 0, 0, 0, 40, 273, 273, 89, 273, 273, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40, 40, 0, 0, 0, 0, 0, 0, 0, 0, 54, 0, 0, 0, 0, 0, 273, 0, 0, 273, 54, 0, 0, 0, 0, 0, 283, 283, 283, 0, 0, 283, 283, 283, 0, 283, 0, 0, 0, 0, 0, 0, 0, 0, 0, 283, 0, 0, 0, 273, 273, 54, 0, 0, 283, 283, 0, 283, 283, 283, 283, 283, 0, 0, 0, 0, 0, 40, 54, 54, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 0, 0, 283, 283, 283, 42, 0, 283, 54, 0, 0, 0, 0, 0, 0, 42, 423, 423, 423, 0, 0, 0, 423, 423, 0, 423, 309, 310, 311, 312, 313, 314, 315, 316, 0, 318, 319, 0, 0, 0, 54, 322, 323, 0, 423, 423, 42, 423, 423, 423, 423, 423, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 42, 0, 0, 0, 0, 0, 0, 0, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 0, 0, 423, 423, 423, 0, 424, 273, 273, 273, 0, 0, 0, 273, 273, 0, 273, 0, 0, 0, 0, 0, 0, 0, 40, 40, 40, 0, 0, 40, 40, 40, 0, 40, 0, 273, 273, 0, 273, 273, 273, 273, 273, 40, 279, 42, 0, 0, 0, 0, 0, 0, 40, 40, 279, 40, 40, 40, 40, 40, 0, 0, 0, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 0, 0, 273, 273, 273, 279, 279, 0, 0, 279, 279, 279, 80, 279, 279, 279, 54, 54, 54, 0, 0, 54, 54, 54, 0, 54, 0, 279, 279, 88, 279, 279, 0, 0, 0, 54, 54, 0, 0, 0, 0, 0, 280, 0, 54, 54, 0, 54, 54, 54, 54, 54, 280, 0, 0, 0, 0, 0, 0, 279, 0, 0, 279, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 280, 280, 0, 0, 280, 280, 280, 75, 280, 280, 280, 0, 0, 279, 279, 0, 0, 0, 0, 0, 0, 0, 280, 280, 83, 280, 280, 42, 42, 42, 0, 0, 42, 42, 42, 0, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 0, 0, 0, 0, 0, 0, 0, 280, 42, 42, 280, 42, 42, 42, 42, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 58, 0, 0, 0, 0, 0, 4, 5, 6, 0, 8, 280, 280, 0, 9, 10, 0, 0, 0, 11, 0, 12, 13, 14, 96, 97, 17, 18, 0, 0, 0, 0, 98, 99, 100, 22, 23, 24, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 101, 0, 0, 31, 32, 102, 34, 35, 36, 103, 38, 39, 40, 0, 41, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 279, 279, 279, 0, 0, 0, 279, 279, 0, 279, 105, 0, 0, 106, 47, 48, 49, 0, 59, 0, 51, 52, 53, 54, 55, 56, 58, 0, 279, 279, 107, 279, 279, 279, 279, 279, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 0, 0, 279, 279, 279, 280, 280, 280, 0, 0, 0, 280, 280, 0, 280, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 280, 280, 0, 280, 280, 280, 280, 280, 0, 0, 0, 0, 0, 0, 0, 0, 0, 59, 0, 0, 0, 0, 0, 0, 0, 0, 58, 0, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 0, 0, 280, 280, 280, 3, 4, 5, 6, 7, 8, 396, 0, 0, 9, 10, 0, 0, 0, 11, 0, 12, 13, 14, 15, 16, 17, 18, 0, }; }
45753 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45753/f5c9a1ebd775712f2dc086acfce1a14a123ec632/YyTables.java/buggy/src/org/jruby/parser/YyTables.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 565, 3238, 760, 727, 3025, 8526, 9016, 1388, 23, 1435, 288, 1377, 327, 394, 3025, 8526, 288, 5411, 374, 16, 565, 374, 16, 225, 404, 5482, 16, 565, 374, 16, 225, 404, 5292, 16, 565, 374, 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, 565, 3238, 760, 727, 3025, 8526, 9016, 1388, 23, 1435, 288, 1377, 327, 394, 3025, 8526, 288, 5411, 374, 16, 565, 374, 16, 225, 404, 5482, 16, 565, 374, 16, 225, 404, 5292, 16, 565, 374, 16...
skipToNewLine();
skipToLastBeforeNewline();
protected void handlePPInclude(int pos2, boolean include_next, int startingLineNumber) { char[] buffer = bufferStack[bufferStackPos]; int limit = bufferLimit[bufferStackPos]; skipOverWhiteSpace(); int startOffset = pos2; int pos = ++bufferPos[bufferStackPos]; if (pos >= limit) return; boolean local = false; String filename = null; int endOffset = startOffset; int nameOffset = 0; int nameEndOffset = 0; int nameLine = 0, endLine = 0; char c = buffer[pos]; int start; int length; switch (c) { case '\n': return; case '"': nameLine = getLineNumber(bufferPos[bufferStackPos]); local = true; start = bufferPos[bufferStackPos] + 1; length = 0; boolean escaped = false; while (++bufferPos[bufferStackPos] < limit) { ++length; c = buffer[bufferPos[bufferStackPos]]; if (c == '"') { if (!escaped) break; } else if (c == '\\') { escaped = !escaped; continue; } escaped = false; } --length; filename = new String(buffer, start, length); nameOffset = start; nameEndOffset = start + length; endOffset = start + length + 1; break; case '<': nameLine = getLineNumber(bufferPos[bufferStackPos]); local = false; start = bufferPos[bufferStackPos] + 1; length = 0; while (++bufferPos[bufferStackPos] < limit && buffer[bufferPos[bufferStackPos]] != '>') ++length; endOffset = start + length + 1; nameOffset = start; nameEndOffset = start + length; filename = new String(buffer, start, length); break; default: // handle macro expansions int startPos = pos; int len = 1; while (++bufferPos[bufferStackPos] < limit) { c = buffer[bufferPos[bufferStackPos]]; if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || c == '_' || (c >= '0' && c <= '9') || Character.isUnicodeIdentifierPart(c)) { ++len; continue; } else if (c == '\\' && bufferPos[bufferStackPos] + 1 < buffer.length && buffer[bufferPos[bufferStackPos] + 1] == '\n') { // escaped newline ++bufferPos[bufferStackPos]; len += 2; continue; } break; } Object expObject = definitions.get(buffer, startPos, len); if (expObject != null) { --bufferPos[bufferStackPos]; char[] t = null; if (expObject instanceof FunctionStyleMacro) { t = handleFunctionStyleMacro( (FunctionStyleMacro) expObject, false); } else if (expObject instanceof ObjectStyleMacro) { t = ((ObjectStyleMacro) expObject).getExpansion(); } if (t != null) { t = replaceArgumentMacros(t); if ((t[t.length - 1] == t[0]) && (t[0] == '\"')) { local = true; filename = new String(t, 1, t.length - 2); } else if (t[0] == '<' && t[t.length - 1] == '>') { local = false; filename = new String(t, 1, t.length - 2); } } } break; } if (filename == null || filename == EMPTY_STRING) { handleProblem(IProblem.PREPROCESSOR_INVALID_DIRECTIVE, startOffset, null); return; } char[] fileNameArray = filename.toCharArray(); // TODO else we need to do macro processing on the rest of the line endLine = getLineNumber(bufferPos[bufferStackPos]); skipToNewLine(); findAndPushInclusion(filename, fileNameArray, local, include_next, startOffset, nameOffset, nameEndOffset, endOffset, startingLineNumber, nameLine, endLine); }
54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/92b49872f2c9895f7f9b9a4e19f3e752f1acf50a/BaseScanner.java/buggy/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner2/BaseScanner.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 918, 1640, 6584, 8752, 12, 474, 949, 22, 16, 1250, 2341, 67, 4285, 16, 5411, 509, 5023, 31063, 13, 288, 3639, 1149, 8526, 1613, 273, 1613, 2624, 63, 4106, 2624, 1616, 15533, 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, 4750, 918, 1640, 6584, 8752, 12, 474, 949, 22, 16, 1250, 2341, 67, 4285, 16, 5411, 509, 5023, 31063, 13, 288, 3639, 1149, 8526, 1613, 273, 1613, 2624, 63, 4106, 2624, 1616, 15533, 3639, ...
"(const char*)"+convName+"_copy[_copyIndex]");
convName+"_copy[_copyIndex]");
protected void emitBodyVariablePreCallSetup(PrintWriter writer, boolean emittingPrimitiveArrayCritical) { if (!emittingPrimitiveArrayCritical) { // Convert all Buffers to pointers first so we don't have to // call ReleasePrimitiveArrayCritical for any arrays if any // incoming buffers aren't direct if (binding.hasContainingType()) { emitPointerConversion(writer, binding, binding.getContainingType(), binding.getContainingCType(), JavaMethodBindingEmitter.javaThisArgumentName(), CMethodBindingEmitter.cThisArgumentName()); } for (int i = 0; i < binding.getNumArguments(); i++) { JavaType type = binding.getJavaArgumentType(i); if (type.isJNIEnv() || binding.isArgumentThisPointer(i)) { continue; } if (type.isNIOBuffer()) { emitPointerConversion(writer, binding, type, binding.getCArgumentType(i), binding.getArgumentName(i), pointerConversionArgumentName(i)); } } } // Convert all arrays to pointers, and get UTF-8 versions of jstring args for (int i = 0; i < binding.getNumArguments(); i++) { JavaType javaArgType = binding.getJavaArgumentType(i); if (javaArgType.isJNIEnv() || binding.isArgumentThisPointer(i)) { continue; } if (javaArgType.isArray()) { boolean needsDataCopy = javaArgTypeNeedsDataCopy(javaArgType); Class subArrayElementJavaType = javaArgType.getJavaClass().getComponentType(); // We only defer the emission of GetPrimitiveArrayCritical // calls that won't be matched up until after the function // we're calling if ((!needsDataCopy && !emittingPrimitiveArrayCritical) || (needsDataCopy && emittingPrimitiveArrayCritical)) { continue; } if (EMIT_NULL_CHECKS) { writer.print(" if ("); writer.print(binding.getArgumentName(i)); writer.println(" != NULL) {"); } Type cArgType = binding.getCArgumentType(i); String cArgTypeName = cArgType.getName(); String convName = pointerConversionArgumentName(i); if (!needsDataCopy) { writer.print(" "); writer.print(convName); writer.print(" = ("); if (javaArgType.isArray() && javaArgType.getJavaClass().getComponentType() == java.lang.String.class) { // java-side type is String[] cArgTypeName = "jstring *"; } writer.print(cArgTypeName); writer.print(") (*env)->GetPrimitiveArrayCritical(env, "); writer.print(binding.getArgumentName(i)); writer.println(", NULL);"); } else { // Handle the case where the array elements are of a type that needs a // data copy operation to convert from the java memory model to the C // memory model (e.g., int[][], String[], etc) // // FIXME: should factor out this whole block of code into a separate // method for clarity and maintenance purposes if (cArgType.toString().indexOf("const") == -1) { // FIXME: if the arg type is non-const, the sematics might be that // the function modifies the argument -- we don't yet support // this. // // Note: the check for "const" in the CVAttributes string isn't // truly checking the constness of the target types at both // pointer depths. However, it's a quick approximation, and quite // often C code doesn't get the constness right anyhow. throw new RuntimeException( "Cannot copy data for ptr-to-ptr arg type \"" + cArgType + "\": support for non-const ptr-to-ptr types not implemented."); } writer.println(); writer.println(" /* Copy contents of " + binding.getArgumentName(i) + " into " + convName + "_copy */"); // get length of array being copied String arrayLenName = "_tmpArrayLen"; writer.print(" "); writer.print(arrayLenName); writer.print(" = (*env)->GetArrayLength(env, "); writer.print(binding.getArgumentName(i)); writer.println(");"); // allocate an array to hold each element if (cArgType.pointerDepth() != 2) { throw new RuntimeException( "Could not copy data for type \"" + cArgType + "\"; copying only supported for types of the form " + "ptr-to-ptr-to-type."); } PointerType cArgPtrType = cArgType.asPointer(); if (cArgPtrType == null) { throw new RuntimeException( "Could not copy data for type \"" + cArgType + "\"; currently only pointer types supported."); } PointerType cArgElementType = cArgPtrType.getTargetType().asPointer(); emitMalloc( writer, convName+"_copy", cArgElementType.getName(), arrayLenName, "Could not allocate buffer for copying data in argument \\\""+binding.getArgumentName(i)+"\\\""); // process each element in the array writer.println(" for (_copyIndex = 0; _copyIndex < "+arrayLenName+"; ++_copyIndex) {"); // get each array element writer.println(" /* get each element of the array argument \"" + binding.getArgumentName(i) + "\" */"); String subArrayElementJNITypeString = jniType(subArrayElementJavaType); writer.print(" _tmpObj = ("); writer.print(subArrayElementJNITypeString); writer.print(") (*env)->GetObjectArrayElement(env, "); writer.print(binding.getArgumentName(i)); writer.println(", _copyIndex);"); if (subArrayElementJNITypeString == "jstring") { writer.print(" "); emitGetStringUTFChars(writer, "(jstring) _tmpObj", "(const char*)"+convName+"_copy[_copyIndex]"); } else if (isNIOBufferClass(subArrayElementJavaType)) { emitGetDirectBufferAddress(writer, "_tmpObj", cArgElementType.getName(), convName + "_copy[_copyIndex]"); } else { // Question: do we always need to copy the sub-arrays, or just // GetPrimitiveArrayCritical on each jobjectarray element and // assign it to the appropriate elements at pointer depth 1? // Probably depends on const-ness of the argument. // Malloc enough space to hold a copy of each sub-array writer.print(" "); emitMalloc( writer, convName+"_copy[_copyIndex]", cArgElementType.getTargetType().getName(), // assumes cArgPtrType is ptr-to-ptr-to-primitive !! "(*env)->GetArrayLength(env, _tmpObj)", "Could not allocate buffer during copying of data in argument \\\""+binding.getArgumentName(i)+"\\\""); // FIXME: copy the data (use matched Get/ReleasePrimitiveArrayCritical() calls) if (true) throw new RuntimeException( "Cannot yet handle type \"" + cArgType.getName() + "\"; need to add support for copying ptr-to-ptr-to-primitiveType subarrays"); } writer.println(" }"); writer.println(); } // end of data copy if (EMIT_NULL_CHECKS) { writer.println(" }"); } } else if (javaArgType.isString()) { if (emittingPrimitiveArrayCritical) { continue; } if (EMIT_NULL_CHECKS) { writer.print(" if ("); writer.print(binding.getArgumentName(i)); writer.println(" != NULL) {"); } emitGetStringUTFChars(writer, binding.getArgumentName(i), "_UTF8" + binding.getArgumentName(i)); if (EMIT_NULL_CHECKS) { writer.println(" }"); } } else if (javaArgType.isArrayOfCompoundTypeWrappers()) { // FIXME throw new RuntimeException("Outgoing arrays of StructAccessors not yet implemented"); } } }
47702 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47702/57b593f06e39e92b4c41b12e53862ca30e8a41bf/CMethodBindingEmitter.java/clean/src/net/java/games/gluegen/CMethodBindingEmitter.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 4750, 918, 3626, 2250, 3092, 1386, 1477, 7365, 12, 5108, 2289, 2633, 16, 4766, 2868, 1250, 3626, 1787, 9840, 1076, 30286, 13, 225, 288, 565, 309, 16051, 18356, 1787, 9840, 1076, 30286, 13, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 4750, 918, 3626, 2250, 3092, 1386, 1477, 7365, 12, 5108, 2289, 2633, 16, 4766, 2868, 1250, 3626, 1787, 9840, 1076, 30286, 13, 225, 288, 565, 309, 16051, 18356, 1787, 9840, 1076, 30286, 13, ...
public void import_statement() throws RecognitionException { String name = null; try { // C:\Projects\jboss-rules\drools-compiler\src\main\resources\org\drools\lang\drl.g:126:17: ( 'import' opt_eol name= dotted_name ( ';' )? opt_eol ) // C:\Projects\jboss-rules\drools-compiler\src\main\resources\org\drools\lang\drl.g:126:17: 'import' opt_eol name= dotted_name ( ';' )? opt_eol { match(input,17,FOLLOW_17_in_import_statement197); following.push(FOLLOW_opt_eol_in_import_statement199); opt_eol(); following.pop(); following.push(FOLLOW_dotted_name_in_import_statement203); name=dotted_name(); following.pop(); // C:\Projects\jboss-rules\drools-compiler\src\main\resources\org\drools\lang\drl.g:126:51: ( ';' )? int alt9=2; int LA9_0 = input.LA(1); if ( LA9_0==16 ) { alt9=1; } else if ( LA9_0==-1||LA9_0==EOL||(LA9_0>=17 && LA9_0<=20)||LA9_0==26||LA9_0==28 ) { alt9=2; } else { NoViableAltException nvae = new NoViableAltException("126:51: ( \';\' )?", 9, 0, input); throw nvae; } switch (alt9) { case 1 : // C:\Projects\jboss-rules\drools-compiler\src\main\resources\org\drools\lang\drl.g:126:51: ';' { match(input,16,FOLLOW_16_in_import_statement205); } break; } following.push(FOLLOW_opt_eol_in_import_statement208); opt_eol(); following.pop(); packageDescr.addImport( name ); } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { } return ; }
31577 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/31577/9c6423b7a31fdc4a1317e71a6d2850c94e2140e0/RuleParser.java/buggy/drools-compiler/src/main/java/org/drools/lang/RuleParser.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1930, 67, 11516, 1435, 1216, 9539, 288, 6647, 514, 508, 273, 446, 31, 3639, 775, 288, 5411, 368, 385, 5581, 15298, 64, 10649, 8464, 17, 7482, 64, 12215, 17, 9576, 64, 4816, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1930, 67, 11516, 1435, 1216, 9539, 288, 6647, 514, 508, 273, 446, 31, 3639, 775, 288, 5411, 368, 385, 5581, 15298, 64, 10649, 8464, 17, 7482, 64, 12215, 17, 9576, 64, 4816, 6...
throws IOException, InterruptedException {
throws IOException, InterruptedException {
private String[] collectChangelistSinceLastBuild(Date lastBuild, Date now) throws IOException, InterruptedException { Commandline command = buildChangesCommand(lastBuild, now, Util.isWindows()); LOG.debug("Executing: " + command.toString()); Process p = Runtime.getRuntime().exec(command.getCommandline()); logErrorStream(p.getErrorStream()); InputStream p4Stream = p.getInputStream(); String[] changelistNumbers = parseChangelistNumbers(p4Stream); getRidOfLeftoverData(p4Stream); p.waitFor(); p.getInputStream().close(); p.getOutputStream().close(); p.getErrorStream().close(); return changelistNumbers; }
52149 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52149/9a2a2265bbed9582d4204149a67417b6477ece56/P4.java/clean/main/src/net/sourceforge/cruisecontrol/sourcecontrols/P4.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 514, 8526, 3274, 782, 539, 5449, 9673, 3024, 3116, 12, 1626, 1142, 3116, 16, 2167, 2037, 13, 3639, 1216, 1860, 16, 7558, 288, 3639, 3498, 1369, 1296, 273, 1361, 7173, 2189, 12, 2722...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 514, 8526, 3274, 782, 539, 5449, 9673, 3024, 3116, 12, 1626, 1142, 3116, 16, 2167, 2037, 13, 3639, 1216, 1860, 16, 7558, 288, 3639, 3498, 1369, 1296, 273, 1361, 7173, 2189, 12, 2722...
result.add(new SynteticCodeBlock(localResult, null, getSettings(), indent, null));
result.add(createCodeBlockBlock(localResult, indent));
private ASTNode composeCodeBlock(final ArrayList<Block> result, ASTNode child, final Indent indent) { final ArrayList<Block> localResult = new ArrayList<Block>(); processChild(localResult, child, null, null, Formatter.getInstance().getNoneIndent()); child = child.getTreeNext(); while (child != null) { if (!FormatterUtil.containsWhiteSpacesOnly(child)) { final Indent childIndent = isRBrace(child) ? Formatter.getInstance().getNoneIndent() : getCodeBlockInternalIndent(myChildrenIndent); processChild(localResult, child, null, null, childIndent); if (isRBrace(child)) { result.add(new SynteticCodeBlock(localResult, null, getSettings(), indent, null)); return child; } } child = child.getTreeNext(); } result.add(new SynteticCodeBlock(localResult, null, getSettings(), indent, null)); return null; }
12814 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12814/06e708c71712950cf48fd4b1ff1e8674504b6913/CodeBlockBlock.java/clean/source/com/intellij/psi/formatter/java/CodeBlockBlock.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 3238, 9183, 907, 11458, 1085, 1768, 12, 6385, 2407, 32, 1768, 34, 563, 16, 9183, 907, 1151, 16, 727, 28653, 3504, 13, 288, 565, 727, 2407, 32, 1768, 34, 1191, 1253, 273, 394, 2407, 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, 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, 9183, 907, 11458, 1085, 1768, 12, 6385, 2407, 32, 1768, 34, 563, 16, 9183, 907, 1151, 16, 727, 28653, 3504, 13, 288, 565, 727, 2407, 32, 1768, 34, 1191, 1253, 273, 394, 2407, 32, ...
public void testAddObjectSink() {
public void testAddObjectSink() throws Exception {
public void testAddObjectSink() { final MockObjectSource source = new MockObjectSource( 15 ); assertLength( 0, source.getObjectSinksAsList() ); source.addObjectSink( new MockObjectSink() ); assertLength( 1, source.getObjectSinksAsList() ); source.addObjectSink( new MockObjectSink() ); assertLength( 2, source.getObjectSinksAsList() ); }
5490 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5490/4f51e1bfeaa8eef4c740c85c06f195176edc70ed/ObjectSourceTest.java/buggy/drools-core/src/test/java/org/drools/reteoo/ObjectSourceTest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1842, 986, 921, 11326, 1435, 1216, 1185, 288, 3639, 727, 7867, 921, 1830, 1084, 273, 394, 7867, 921, 1830, 12, 4711, 11272, 3639, 1815, 1782, 12, 374, 16, 8227, 1084, 18, 588, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1842, 986, 921, 11326, 1435, 1216, 1185, 288, 3639, 727, 7867, 921, 1830, 1084, 273, 394, 7867, 921, 1830, 12, 4711, 11272, 3639, 1815, 1782, 12, 374, 16, 8227, 1084, 18, 588, ...
classFile.startMethod(methodName, methodDesc,
cfw.startMethod(methodName, methodDesc,
private void startCodeBodyMethod(String methodName, String methodDesc) { classFile.startMethod(methodName, methodDesc, (short)(ClassFileWriter.ACC_PUBLIC | ClassFileWriter.ACC_FINAL)); locals = new boolean[MAX_LOCALS]; funObjLocal = 0; contextLocal = 1; variableObjectLocal = 2; thisObjLocal = 3; localsMax = (short) 4; // number of parms + "this" firstFreeLocal = 4; scriptResultLocal = -1; argsLocal = -1; itsZeroArgArray = -1; itsOneArgArray = -1; epilogueLabel = -1; }
47345 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47345/64dc04549cad044865eae2e65e775ddc0f292717/Codegen.java/clean/src/org/mozilla/javascript/optimizer/Codegen.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 787, 1085, 2250, 1305, 12, 780, 4918, 16, 514, 707, 4217, 13, 565, 288, 3639, 6080, 91, 18, 1937, 1305, 12, 2039, 461, 16, 707, 4217, 16, 17311, 261, 6620, 21433, 797, 812, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 787, 1085, 2250, 1305, 12, 780, 4918, 16, 514, 707, 4217, 13, 565, 288, 3639, 6080, 91, 18, 1937, 1305, 12, 2039, 461, 16, 707, 4217, 16, 17311, 261, 6620, 21433, 797, 812, ...
if ( serviceprovider != null )
if ( getContext( ).getUIServiceProvider( ) != null )
protected Composite getComponent( Composite parent ) { cmpContent = new Composite( parent, SWT.NONE ); { GridLayout glMain = new GridLayout( ); glMain.numColumns = 2; cmpContent.setLayout( glMain ); } Composite cmpLeft = new Composite( cmpContent, SWT.NONE ); { GridLayout gl = new GridLayout( ); gl.numColumns = 2; cmpLeft.setLayout( gl ); GridData gd = new GridData( GridData.FILL_VERTICAL ); cmpLeft.setLayoutData( gd ); } lblValue = new Label( cmpLeft, SWT.NONE ); { GridData gd = new GridData( ); lblValue.setLayoutData( gd ); lblValue.setText( Messages.getString( "SeriesTrendlineSheet.Label.Label" ) + ":" ); //$NON-NLS-1$ //$NON-NLS-2$ } List keys = null; if ( serviceprovider != null ) { keys = serviceprovider.getRegisteredKeys( ); } txtValue = new ExternalizedTextEditorComposite( cmpLeft, SWT.BORDER | SWT.SINGLE, -1, -1, keys, serviceprovider, getTrendline( ).getLabel( ).getCaption( ).getValue( ) ); { GridData gd = new GridData( ); gd.widthHint = 125; txtValue.setLayoutData( gd ); txtValue.addListener( this ); } lblAnchor = new Label( cmpLeft, SWT.NONE ); GridData gdLBLAnchor = new GridData( ); lblAnchor.setLayoutData( gdLBLAnchor ); lblAnchor.setText( Messages.getString( "BlockAttributeComposite.Lbl.Anchor" ) ); //$NON-NLS-1$ cmbAnchor = new Combo( cmpLeft, SWT.DROP_DOWN | SWT.READ_ONLY ); GridData gdCBAnchor = new GridData( GridData.FILL_HORIZONTAL ); cmbAnchor.setLayoutData( gdCBAnchor ); cmbAnchor.addSelectionListener( this ); // btnTriggers = new Button( cmpLeft, SWT.PUSH ); // GridData gdBTNTriggers = new GridData( ); // gdBTNTriggers.horizontalSpan = 2; // btnTriggers.setLayoutData( gdBTNTriggers ); // btnTriggers.setText( Messages.getString( "Shared.Lbl.Triggers" ) ); // //$NON-NLS-1$ // btnTriggers.addSelectionListener( this ); Composite cmpRight = new Composite( cmpContent, SWT.NONE ); { cmpRight.setLayout( new FillLayout( ) ); GridData gd = new GridData( GridData.FILL_HORIZONTAL ); cmpRight.setLayoutData( gd ); } trendLineText = new LineAttributesComposite( cmpRight, SWT.NONE, getTrendline( ).getLineAttributes( ), true, true, false ); trendLineText.addListener( this ); Group cmpLabel = new Group( cmpContent, SWT.NONE ); { GridLayout gl = new GridLayout( 2, false ); cmpLabel.setLayout( gl ); GridData gd = new GridData( GridData.FILL_HORIZONTAL ); gd.horizontalSpan = 2; cmpLabel.setLayoutData( gd ); cmpLabel.setText( Messages.getString( "SeriesTrendlineSheet.Label.Label" ) ); //$NON-NLS-1$ } Composite cmpLabelInner = new Composite( cmpLabel, SWT.NONE ); { GridLayout gl = new GridLayout( 2, false ); cmpLabelInner.setLayout( gl ); GridData gd = new GridData( GridData.FILL_VERTICAL ); gd.verticalAlignment = SWT.BEGINNING; cmpLabelInner.setLayoutData( gd ); } btnVisible = new Button( cmpLabelInner, SWT.CHECK ); GridData gdCBVisible = new GridData( GridData.FILL_HORIZONTAL ); gdCBVisible.horizontalSpan = 2; btnVisible.setLayoutData( gdCBVisible ); btnVisible.setSelection( getTrendline( ).getLabel( ).isVisible( ) ); btnVisible.setText( Messages.getString( "LabelAttributesComposite.Lbl.IsVisible" ) ); //$NON-NLS-1$ btnVisible.addSelectionListener( this ); // lblPosition = new Label( cmpLabelInner, SWT.NONE ); // GridData gdLBLPosition = new GridData( ); // lblPosition.setLayoutData( gdLBLPosition ); // lblPosition.setText( Messages.getString( // "LabelAttributesComposite.Lbl.Position" ) ); //$NON-NLS-1$ // // cmbPosition = new Combo( cmpLabelInner, SWT.DROP_DOWN | SWT.READ_ONLY // ); // GridData gdCMBPosition = new GridData( GridData.FILL_BOTH ); // cmbPosition.setLayoutData( gdCMBPosition ); // cmbPosition.addSelectionListener( this ); lblFont = new Label( cmpLabelInner, SWT.NONE ); GridData gdLFont = new GridData( ); lblFont.setLayoutData( gdLFont ); lblFont.setText( Messages.getString( "LabelAttributesComposite.Lbl.Font" ) ); //$NON-NLS-1$ fdcFont = new FontDefinitionComposite( cmpLabelInner, SWT.NONE, getTrendline( ).getLabel( ).getCaption( ).getFont( ), getTrendline( ).getLabel( ).getCaption( ).getColor( ), false ); GridData gdFDCFont = new GridData( GridData.FILL_BOTH ); gdFDCFont.heightHint = fdcFont.getPreferredSize( ).y; gdFDCFont.widthHint = 96; gdFDCFont.grabExcessVerticalSpace = false; fdcFont.setLayoutData( gdFDCFont ); fdcFont.addListener( this ); lblFill = new Label( cmpLabelInner, SWT.NONE ); GridData gdLFill = new GridData( ); lblFill.setLayoutData( gdLFill ); lblFill.setText( Messages.getString( "LabelAttributesComposite.Lbl.Background" ) ); //$NON-NLS-1$ fccBackground = new FillChooserComposite( cmpLabelInner, SWT.NONE, getContext( ), getTrendline( ).getLabel( ).getBackground( ), false, false ); GridData gdFCCBackground = new GridData( GridData.FILL_BOTH ); gdFCCBackground.heightHint = fccBackground.getPreferredSize( ).y; fccBackground.setLayoutData( gdFCCBackground ); fccBackground.addListener( this ); lblShadow = new Label( cmpLabelInner, SWT.NONE ); GridData gdLBLShadow = new GridData( ); lblShadow.setLayoutData( gdLBLShadow ); lblShadow.setText( Messages.getString( "LabelAttributesComposite.Lbl.Shadow" ) ); //$NON-NLS-1$ fccShadow = new FillChooserComposite( cmpLabelInner, SWT.NONE, getContext( ), getTrendline( ).getLabel( ).getShadowColor( ), false, false ); GridData gdFCCShadow = new GridData( GridData.FILL_BOTH ); fccShadow.setLayoutData( gdFCCShadow ); fccShadow.addListener( this ); Group grpOutline = new Group( cmpLabel, SWT.NONE ); grpOutline.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) ); grpOutline.setLayout( new FillLayout( ) ); grpOutline.setText( Messages.getString( "SeriesTrendlineSheet.Label.Outline" ) ); //$NON-NLS-1$ outlineText = new LineAttributesComposite( grpOutline, SWT.NONE, getTrendline( ).getLabel( ).getOutline( ), true, true, true ); outlineText.addListener( this ); icLabel = new InsetsComposite( cmpLabel, SWT.NONE, 1, getTrendline( ).getLabel( ).getInsets( ), chart.getUnits( ), serviceprovider ); GridData gdICBlock = new GridData( GridData.FILL_HORIZONTAL ); gdICBlock.horizontalSpan = 2; icLabel.setLayoutData( gdICBlock ); icLabel.addListener( this ); populateLists( ); setState( btnVisible.getSelection( ) ); return cmpContent; }
5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/e89bee61a969154f0d074fedf34da17dd208f822/SeriesTrendlineSheet.java/buggy/chart/org.eclipse.birt.chart.ui.extension/src/org/eclipse/birt/chart/ui/swt/wizard/format/popup/series/SeriesTrendlineSheet.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1117, 14728, 10322, 12, 14728, 982, 262, 202, 95, 202, 202, 9625, 1350, 273, 394, 14728, 12, 982, 16, 348, 8588, 18, 9826, 11272, 202, 202, 95, 1082, 202, 6313, 3744, 5118, 6376, 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, 1117, 14728, 10322, 12, 14728, 982, 262, 202, 95, 202, 202, 9625, 1350, 273, 394, 14728, 12, 982, 16, 348, 8588, 18, 9826, 11272, 202, 202, 95, 1082, 202, 6313, 3744, 5118, 6376, 2...
_context.profileManager().dbStoreSent(_peer.getIdentity().getHash(), howLong); _context.statManager().addRateData("netDb.ackTime", howLong, howLong);
getContext().profileManager().dbStoreSent(_peer.getIdentity().getHash(), howLong); getContext().statManager().addRateData("netDb.ackTime", howLong, howLong);
public void runJob() { long howLong = _state.confirmed(_peer.getIdentity().getHash()); if (_log.shouldLog(Log.INFO)) _log.info(StoreJob.this.getJobId() + ": Marking store of " + _state.getTarget() + " to " + _peer.getIdentity().getHash().toBase64() + " successful after " + howLong); _context.profileManager().dbStoreSent(_peer.getIdentity().getHash(), howLong); _context.statManager().addRateData("netDb.ackTime", howLong, howLong); if (_state.getSuccessful().size() >= REDUNDANCY) { succeed(); } else { sendNext(); } }
27437 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/27437/e737e5c9507ed0d463dc9e45a8f63657f466b177/StoreJob.java/clean/router/java/src/net/i2p/router/networkdb/kademlia/StoreJob.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 540, 1071, 918, 1086, 2278, 1435, 288, 5411, 1525, 3661, 3708, 273, 389, 2019, 18, 21606, 24899, 12210, 18, 588, 4334, 7675, 588, 2310, 10663, 5411, 309, 261, 67, 1330, 18, 13139, 1343, 12, 13...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 540, 1071, 918, 1086, 2278, 1435, 288, 5411, 1525, 3661, 3708, 273, 389, 2019, 18, 21606, 24899, 12210, 18, 588, 4334, 7675, 588, 2310, 10663, 5411, 309, 261, 67, 1330, 18, 13139, 1343, 12, 13...
else if (x1 > getWidth()) {
else if (x1 > this.getWidth()) {
private FastVector makePolygon(FastVector v) { FastVector building = new FastVector(v.size() + 10); double x1, y1, x2, y2; int edge1 = 0, edge2 = 0; for (int noa = 0; noa < v.size() - 2; noa++) { building.addElement(new Double(((Double)v.elementAt(noa)). doubleValue())); } //now clip the lines double[] new_coords; //note lineIntersect , expects the values to have been converted to //screen coords //note the first point passed is the one that gets shifted. x1 = convertToPanelX(((Double)v.elementAt(1)).doubleValue()); y1 = convertToPanelY(((Double)v.elementAt(2)).doubleValue()); x2 = convertToPanelX(((Double)v.elementAt(3)).doubleValue()); y2 = convertToPanelY(((Double)v.elementAt(4)).doubleValue()); if (x1 < 0) { //test left new_coords = lineIntersect(x1, y1, x2, y2, 0, getHeight(), 0); edge1 = 0; if (new_coords[0] < 0) { //then not left if (y1 < 0) { //test top new_coords = lineIntersect(x1, y1, x2, y2, getWidth(), 0, 0); edge1 = 1; } else { //test bottom new_coords = lineIntersect(x1, y1, x2, y2, getWidth(), 0, getHeight()); edge1 = 3; } } } else if (x1 > getWidth()) { //test right new_coords = lineIntersect(x1, y1, x2, y2, 0, getHeight(), getWidth()); edge1 = 2; if (new_coords[0] < 0) { //then not right if (y1 < 0) { //test top new_coords = lineIntersect(x1, y1, x2, y2, getWidth(), 0, 0); edge1 = 1; } else { //test bottom new_coords = lineIntersect(x1, y1, x2, y2, getWidth(), 0, getHeight()); edge1 = 3; } } } else if (y1 < 0) { //test top new_coords = lineIntersect(x1, y1, x2, y2, getWidth(), 0, 0); edge1 = 1; } else { //test bottom new_coords = lineIntersect(x1, y1, x2, y2, getWidth(), 0, getHeight()); edge1 = 3; } building.setElementAt(new Double(convertToAttribX(new_coords[0])), 1); building.setElementAt(new Double(convertToAttribY(new_coords[1])), 2); x1 = convertToPanelX(((Double)v.elementAt(v.size() - 4)).doubleValue()); y1 = convertToPanelY(((Double)v.elementAt(v.size() - 3)).doubleValue()); x2 = convertToPanelX(((Double)v.elementAt(v.size() - 6)).doubleValue()); y2 = convertToPanelY(((Double)v.elementAt(v.size() - 5)).doubleValue()); if (x1 < 0) { //test left new_coords = lineIntersect(x1, y1, x2, y2, 0, getHeight(), 0); edge2 = 0; if (new_coords[0] < 0) { //then not left if (y1 < 0) { //test top new_coords = lineIntersect(x1, y1, x2, y2, getWidth(), 0, 0); edge2 = 1; } else { //test bottom new_coords = lineIntersect(x1, y1, x2, y2, getWidth(), 0, getHeight()); edge2 = 3; } } } else if (x1 > getWidth()) { //test right new_coords = lineIntersect(x1, y1, x2, y2, 0, getHeight(), getWidth()); edge2 = 2; if (new_coords[0] < 0) { //then not right if (y1 < 0) { //test top new_coords = lineIntersect(x1, y1, x2, y2, getWidth(), 0, 0); edge2 = 1; } else { //test bottom new_coords = lineIntersect(x1, y1, x2, y2, getWidth(), 0, getHeight()); edge2 = 3; } } } else if (y1 < 0) { //test top new_coords = lineIntersect(x1, y1, x2, y2, getWidth(), 0, 0); edge2 = 1; } else { //test bottom new_coords = lineIntersect(x1, y1, x2, y2, getWidth(), 0, getHeight()); edge2 = 3; } building.setElementAt(new Double(convertToAttribX(new_coords[0])), building.size() - 2); building.setElementAt(new Double(convertToAttribY(new_coords[1])), building.size() - 1); //trust me this complicated piece of code will //determine what points on the boundary of the view to add to the polygon int xp, yp; xp = getWidth() * ((edge2 & 1) ^ ((edge2 & 2) / 2)); yp = getHeight() * ((edge2 & 2) / 2); //System.out.println(((-1 + 4) % 4) + " hoi"); if (inPolyline(v, convertToAttribX(xp), convertToAttribY(yp))) { //then add points in a clockwise direction building.addElement(new Double(convertToAttribX(xp))); building.addElement(new Double(convertToAttribY(yp))); for (int noa = (edge2 + 1) % 4; noa != edge1; noa = (noa + 1) % 4) { xp = getWidth() * ((noa & 1) ^ ((noa & 2) / 2)); yp = getHeight() * ((noa & 2) / 2); building.addElement(new Double(convertToAttribX(xp))); building.addElement(new Double(convertToAttribY(yp))); } } else { xp = getWidth() * ((edge2 & 2) / 2); yp = getHeight() * (1 & ~((edge2 & 1) ^ ((edge2 & 2) / 2))); if (inPolyline(v, convertToAttribX(xp), convertToAttribY(yp))) { //then add points in anticlockwise direction building.addElement(new Double(convertToAttribX(xp))); building.addElement(new Double(convertToAttribY(yp))); for (int noa = (edge2 + 3) % 4; noa != edge1; noa = (noa + 3) % 4) { xp = getWidth() * ((noa & 2) / 2); yp = getHeight() * (1 & ~((noa & 1) ^ ((noa & 2) / 2))); building.addElement(new Double(convertToAttribX(xp))); building.addElement(new Double(convertToAttribY(yp))); } } } return building; }
48918 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48918/bf889fda0ae771630a90a87d42ed742a79e83641/VisualizePanel.java/clean/weka/gui/explorer/VisualizePanel.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 9545, 5018, 1221, 11787, 12, 12305, 5018, 331, 13, 288, 1377, 9545, 5018, 10504, 273, 394, 9545, 5018, 12, 90, 18, 1467, 1435, 397, 1728, 1769, 1377, 1645, 619, 21, 16, 677, 21, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 9545, 5018, 1221, 11787, 12, 12305, 5018, 331, 13, 288, 1377, 9545, 5018, 10504, 273, 394, 9545, 5018, 12, 90, 18, 1467, 1435, 397, 1728, 1769, 1377, 1645, 619, 21, 16, 677, 21, 1...
switch (iCode[pc]) {
switch ((int)(iCode[pc] & 0xff)) {
private static void dumpICode(InterpreterData theData) { if (printICode) { try { int iCodeLength = theData.itsICodeTop; byte iCode[] = theData.itsICode; out = new PrintWriter(new FileOutputStream("icode.txt", true)); out.println("ICode dump, for " + theData.itsName + ", length = " + iCodeLength); out.println("MaxStack = " + theData.itsMaxStack); for (int pc = 0; pc < iCodeLength; ) { out.print("[" + pc + "] "); switch (iCode[pc]) { case TokenStream.SCOPE : case TokenStream.GETPROTO : case TokenStream.GETPARENT : case TokenStream.GETSCOPEPARENT : case TokenStream.SETPROTO : case TokenStream.SETPARENT : case TokenStream.DELPROP : case TokenStream.TYPEOF : case TokenStream.NEWSCOPE : case TokenStream.ENTERWITH : case TokenStream.LEAVEWITH : case TokenStream.ENDTRY : case TokenStream.THROW : case TokenStream.JTHROW : case TokenStream.GETTHIS : case TokenStream.SETELEM : case TokenStream.GETELEM : case TokenStream.SETPROP : case TokenStream.GETPROP : case TokenStream.PROPINC : case TokenStream.PROPDEC : case TokenStream.ELEMINC : case TokenStream.ELEMDEC : case TokenStream.BITNOT : case TokenStream.BITAND : case TokenStream.BITOR : case TokenStream.BITXOR : case TokenStream.LSH : case TokenStream.RSH : case TokenStream.URSH : case TokenStream.NEG : case TokenStream.POS : case TokenStream.SUB : case TokenStream.MUL : case TokenStream.DIV : case TokenStream.MOD : case TokenStream.ADD : case TokenStream.POPV : case TokenStream.POP : case TokenStream.DUP : case TokenStream.LT : case TokenStream.GT : case TokenStream.LE : case TokenStream.GE : case TokenStream.IN : case TokenStream.INSTANCEOF : case TokenStream.EQ : case TokenStream.NE : case TokenStream.SHEQ : case TokenStream.SHNE : case TokenStream.ZERO : case TokenStream.ONE : case TokenStream.NULL : case TokenStream.THIS : case TokenStream.FALSE : case TokenStream.TRUE : case TokenStream.UNDEFINED : out.println(TokenStream.tokenToName(iCode[pc] & 0xff)); break; case TokenStream.GOSUB : case TokenStream.RETURN : case TokenStream.GOTO : case TokenStream.IFEQ : case TokenStream.IFNE : { int newPC = getTarget(iCode, pc + 1); out.println( TokenStream.tokenToName(iCode[pc] & 0xff) + " " + newPC); pc += 2; } break; case TokenStream.TRY : { int newPC1 = getTarget(iCode, pc + 1); int newPC2 = getTarget(iCode, pc + 3); out.println( TokenStream.tokenToName(iCode[pc] & 0xff) + " " + newPC1 + " " + newPC2); pc += 4; } break; case TokenStream.RETSUB : case TokenStream.ENUMINIT : case TokenStream.ENUMNEXT : case TokenStream.VARINC : case TokenStream.VARDEC : case TokenStream.GETVAR : case TokenStream.SETVAR : case TokenStream.NEWTEMP : case TokenStream.USETEMP : { int slot = (iCode[pc + 1] & 0xFF); out.println( TokenStream.tokenToName(iCode[pc] & 0xff) + " " + slot); pc++; } break; case TokenStream.CALLSPECIAL : { int line = (iCode[pc + 1] << 8) | (iCode[pc + 2] & 0xFF); String name = getString(theData.itsStringTable, iCode, pc + 3); int count = (iCode[pc + 5] << 8) | (iCode[pc + 6] & 0xFF); out.println( TokenStream.tokenToName(iCode[pc] & 0xff) + " " + count + " " + line + " " + name); pc += 6; } break; case TokenStream.OBJECT : case TokenStream.CLOSURE : case TokenStream.NEW : case TokenStream.CALL : { int count = (iCode[pc + 1] << 8) | (iCode[pc + 2] & 0xFF); out.println( TokenStream.tokenToName(iCode[pc] & 0xff) + " " + count); pc += 2; } break; case TokenStream.NUMBER : out.println( TokenStream.tokenToName(iCode[pc] & 0xff) + " " + getNumber(theData.itsNumberTable, iCode, pc + 1)); pc += 2; break; case TokenStream.TYPEOFNAME : case TokenStream.GETBASE : case TokenStream.BINDNAME : case TokenStream.SETNAME : case TokenStream.NAME : case TokenStream.NAMEINC : case TokenStream.NAMEDEC : case TokenStream.STRING : out.println( TokenStream.tokenToName(iCode[pc] & 0xff) + " \"" + getString(theData.itsStringTable, iCode, pc + 1) + "\""); pc += 2; break; default : out.close(); throw new RuntimeException("Unknown icode : " + (iCode[pc] & 0xff) + " @ pc : " + pc); } pc++; } out.close(); } catch (IOException x) {} } }
19000 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/19000/c484f4965fe783e973a6b679078412270c6c5773/Interpreter.java/buggy/src/org/mozilla/javascript/Interpreter.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 760, 918, 4657, 45, 1085, 12, 30010, 751, 326, 751, 13, 288, 3639, 309, 261, 1188, 45, 1085, 13, 288, 5411, 775, 288, 7734, 509, 277, 1085, 1782, 273, 326, 751, 18, 1282, 45, 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, 3238, 760, 918, 4657, 45, 1085, 12, 30010, 751, 326, 751, 13, 288, 3639, 309, 261, 1188, 45, 1085, 13, 288, 5411, 775, 288, 7734, 509, 277, 1085, 1782, 273, 326, 751, 18, 1282, 45, 10...
classClass.defineSingletonMethod("inherited", CallbackFactory.getNilMethod());
classClass.defineSingletonMethod("inherited", CallbackFactory.getNilMethod(1));
public static void createClassClass(RubyClass classClass) { classClass.defineSingletonMethod("new", CallbackFactory.getOptSingletonMethod(RubyClass.class, "newInstance")); classClass.defineMethod("new", CallbackFactory.getOptMethod(RubyClass.class, "newInstance")); classClass.defineMethod("superclass", CallbackFactory.getMethod(RubyClass.class, "superclass")); classClass.defineSingletonMethod("inherited", CallbackFactory.getNilMethod()); classClass.undefMethod("module_function"); }
49687 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49687/6076c5ab87d25a488469aa1a32f1d2c9c9e470b2/RubyClass.java/clean/org/jruby/RubyClass.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 760, 918, 752, 797, 797, 12, 54, 10340, 797, 667, 797, 13, 288, 3639, 667, 797, 18, 11255, 19571, 1305, 2932, 2704, 3113, 8444, 1733, 18, 588, 6179, 19571, 1305, 12, 54, 10340, 79...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 760, 918, 752, 797, 797, 12, 54, 10340, 797, 667, 797, 13, 288, 3639, 667, 797, 18, 11255, 19571, 1305, 2932, 2704, 3113, 8444, 1733, 18, 588, 6179, 19571, 1305, 12, 54, 10340, 79...
assert clazz.isClass(): Debug.show(clazz);
assert clazz.isClassType(): Debug.show(clazz);
public This This(int pos, Symbol clazz) { assert clazz.isClass(): Debug.show(clazz); This tree = make.This(pos, clazz); global.nextPhase(); tree.setType(clazz.thisType()); global.prevPhase(); return tree; }
1156 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1156/ec2cf46df2a18f9bcc56e8ac63f27d7fed5c12a6/TreeGen.java/clean/sources/scalac/ast/TreeGen.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 1220, 1220, 12, 474, 949, 16, 8565, 4003, 13, 288, 3639, 1815, 4003, 18, 291, 18328, 13332, 4015, 18, 4500, 12, 830, 3638, 1769, 3639, 1220, 2151, 273, 1221, 18, 2503, 12, 917, 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, 1220, 1220, 12, 474, 949, 16, 8565, 4003, 13, 288, 3639, 1815, 4003, 18, 291, 18328, 13332, 4015, 18, 4500, 12, 830, 3638, 1769, 3639, 1220, 2151, 273, 1221, 18, 2503, 12, 917, 16...
public org.quickfix.field.SecurityType getSecurityType() throws FieldNotFound { org.quickfix.field.SecurityType value = new org.quickfix.field.SecurityType();
public quickfix.field.SecurityType getSecurityType() throws FieldNotFound { quickfix.field.SecurityType value = new quickfix.field.SecurityType();
public org.quickfix.field.SecurityType getSecurityType() throws FieldNotFound { org.quickfix.field.SecurityType value = new org.quickfix.field.SecurityType(); getField(value); return value; }
5926 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5926/fecc27f98261270772ff182a1d4dfd94b5daa73d/QuoteRequest.java/clean/src/java/src/quickfix/fix41/QuoteRequest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 2358, 18, 19525, 904, 18, 1518, 18, 4368, 559, 19288, 559, 1435, 1216, 2286, 2768, 225, 288, 2358, 18, 19525, 904, 18, 1518, 18, 4368, 559, 460, 273, 394, 2358, 18, 19525, 904, 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, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 2358, 18, 19525, 904, 18, 1518, 18, 4368, 559, 19288, 559, 1435, 1216, 2286, 2768, 225, 288, 2358, 18, 19525, 904, 18, 1518, 18, 4368, 559, 460, 273, 394, 2358, 18, 19525, 904, 18...
player.updatePos();
appClass.updatePos();
public void processNormalProtocol() throws Exception { zlibInflater = new Inflater(); tightInflaters = new Inflater[4]; // Show current time position in the control panel. player.updatePos(); // Tell our FbsInputStream object to notify us when it goes to the // `paused' mode. rfb.fbs.addObserver(this); // Main dispatch loop. while (true) { int msgType = rfb.readServerMessageType(); switch (msgType) { case RfbProto.FramebufferUpdate: rfb.readFramebufferUpdate(); for (int i = 0; i < rfb.updateNRects; i++) { rfb.readFramebufferUpdateRectHdr(); boolean cursorPosReceived = false; int rx = rfb.updateRectX, ry = rfb.updateRectY; int rw = rfb.updateRectW, rh = rfb.updateRectH; if (rfb.updateRectEncoding == rfb.EncodingLastRect) break; if (rfb.updateRectEncoding == rfb.EncodingNewFBSize) { if (rfb.updateRectW != 0 && rfb.updateRectH != 0) { rfb.setFramebufferSize(rfb.updateRectW, rfb.updateRectH); updateFramebufferSize(); } break; } if (rfb.updateRectEncoding == rfb.EncodingXCursor || rfb.updateRectEncoding == rfb.EncodingRichCursor) { handleCursorShapeUpdate(rfb.updateRectEncoding, rx, ry, rw, rh); continue; }// if (rfb.updateRectEncoding == rfb.EncodingXCursor ||// rfb.updateRectEncoding == rfb.EncodingRichCursor) {// throw new Exception("Sorry, no support for" +// " cursor shape updates yet");// } if (rfb.updateRectEncoding == rfb.EncodingPointerPos) { softCursorMove(rx, ry); cursorPosReceived = true; continue; } switch (rfb.updateRectEncoding) { case RfbProto.EncodingRaw: handleRawRect(rx, ry, rw, rh); break; case RfbProto.EncodingCopyRect: handleCopyRect(rx, ry, rw, rh); break; case RfbProto.EncodingRRE: handleRRERect(rx, ry, rw, rh); break; case RfbProto.EncodingCoRRE: handleCoRRERect(rx, ry, rw, rh); break; case RfbProto.EncodingHextile: handleHextileRect(rx, ry, rw, rh); break; case RfbProto.EncodingZlib: handleZlibRect(rx, ry, rw, rh); break; case RfbProto.EncodingTight: handleTightRect(rx, ry, rw, rh); break; default: throw new Exception("Unknown RFB rectangle encoding " + Integer.toString(rfb.updateRectEncoding, 16)); } } break; case RfbProto.SetColourMapEntries: throw new Exception("Can't handle SetColourMapEntries message"); case RfbProto.Bell: Toolkit.getDefaultToolkit().beep(); break; case RfbProto.ServerCutText: String s = rfb.readServerCutText(); break; default: throw new Exception("Unknown RFB message type " + Integer.toString(msgType, 16)); } player.updatePos(); } }
5301 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5301/d2ddbc73a632e8e826f9e9fc26c886b09d268f6e/VncCanvas.java/buggy/java/src/com/tightvnc/rfbplayer/VncCanvas.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 1207, 5506, 5752, 1435, 1216, 1185, 288, 565, 24220, 27040, 2045, 273, 394, 657, 2242, 2045, 5621, 565, 26066, 382, 15401, 414, 273, 394, 657, 2242, 2045, 63, 24, 15533, 565, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 1207, 5506, 5752, 1435, 1216, 1185, 288, 565, 24220, 27040, 2045, 273, 394, 657, 2242, 2045, 5621, 565, 26066, 382, 15401, 414, 273, 394, 657, 2242, 2045, 63, 24, 15533, 565, 3...
HttpServletRequest request = (HttpServletRequest) pageContext.getRequest(); url = absoluteURL(request, page);
url.append(request.getContextPath()); url.append(page);
public static URL computeURL(PageContext pageContext, String forward, String href, String page, Map params, String anchor, boolean redirect) throws MalformedURLException { // Validate that exactly one specifier was included int n = 0; if (forward != null) n++; if (href != null) n++; if (page != null) n++; if (n != 1) throw new MalformedURLException (messages.getMessage("computeURL.specifier")); // Calculate the appropriate URL URL url = null; if (forward != null) { ActionForwards forwards = (ActionForwards) pageContext.getAttribute(Action.FORWARDS_KEY, PageContext.APPLICATION_SCOPE); if (forwards == null) throw new MalformedURLException (messages.getMessage("computeURL.forwards")); ActionForward af = forwards.findForward(forward); if (af == null) throw new MalformedURLException (messages.getMessage("computeURL.forward", forward)); HttpServletRequest request = (HttpServletRequest) pageContext.getRequest(); url = absoluteURL(request, af.getPath()); } else if (href != null) { url = new URL(href); } else /* if (page != null) */ { HttpServletRequest request = (HttpServletRequest) pageContext.getRequest(); url = absoluteURL(request, page); } // Add anchor if requested (replacing any existing anchor) if (anchor != null) { String temp = url.toString(); int hash = temp.indexOf('#'); if (hash >= 0) temp = temp.substring(0, hash); StringBuffer sb = new StringBuffer(temp); sb.append('#'); sb.append(URLEncoder.encode(anchor)); url = new URL(sb.toString()); } // Add dynamic parameters if requested if ((params != null) && (params.size() > 0)) { // Save any existing anchor String temp = url.toString(); int hash = temp.indexOf('#'); if (hash >= 0) { anchor = temp.substring(hash + 1); temp = temp.substring(0, hash); } else anchor = null; // Add the required request parameters boolean question = temp.indexOf('?') >= 0; StringBuffer sb = new StringBuffer(temp); Iterator keys = params.keySet().iterator(); while (keys.hasNext()) { String key = (String) keys.next(); Object value = params.get(key); if (value == null) { if (!question) { sb.append('?'); question = true; } else sb.append('&'); sb.append(URLEncoder.encode(key)); sb.append('='); // Interpret null as "no value" } else if (value instanceof String) { if (!question) { sb.append('?'); question = true; } else sb.append('&'); sb.append(URLEncoder.encode(key)); sb.append('='); sb.append(URLEncoder.encode((String) value)); } else /* if (value instanceof String[]) */ { String values[] = (String[]) value; for (int i = 0; i < values.length; i++) { if (!question) { sb.append('?'); question = true; } else sb.append('&'); sb.append(URLEncoder.encode(key)); sb.append('='); sb.append(URLEncoder.encode(values[i])); } } } // Re-add the saved anchor (if any) if (anchor != null) { sb.append('#'); sb.append(anchor); } // Update to the completed URL url = new URL(sb.toString()); } // Perform URL rewriting to include our session ID (if any) if (pageContext.getSession() != null) { HttpServletResponse response = (HttpServletResponse) pageContext.getResponse(); if (redirect) url = new URL(response.encodeRedirectURL(url.toString())); else url = new URL(response.encodeURL(url.toString())); } return (url); }
48068 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48068/efc69a235670660e4697d7a0f65847d4941b6e9b/RequestUtils.java/buggy/src/share/org/apache/struts/util/RequestUtils.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 760, 1976, 3671, 1785, 12, 1964, 1042, 21442, 16, 514, 5104, 16, 4766, 514, 3897, 16, 514, 1363, 16, 4766, 1635, 859, 16, 514, 6984, 16, 1250, 3136, 13, 3639, 1216, 20710, 288, 36...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1976, 3671, 1785, 12, 1964, 1042, 21442, 16, 514, 5104, 16, 4766, 514, 3897, 16, 514, 1363, 16, 4766, 1635, 859, 16, 514, 6984, 16, 1250, 3136, 13, 3639, 1216, 20710, 288, 36...
if ( ze.getName().equals("one.txt")) { assertEquals( 0640, UnixStat.PERM_MASK & ze.getUnixMode() ); } else if ( ze.getName().equals("two.txt")) { assertEquals( 0664, UnixStat.PERM_MASK & ze.getUnixMode() ); } else { assertEquals( 0400, UnixStat.PERM_MASK & ze.getUnixMode() ); }
if ( ze.getName().equals( "one.txt" ) ) { assertEquals( 0640, UnixStat.PERM_MASK & ze.getUnixMode() ); } else if ( ze.getName().equals( "two.txt" ) ) { assertEquals( 0664, UnixStat.PERM_MASK & ze.getUnixMode() ); } else { assertEquals( 0400, UnixStat.PERM_MASK & ze.getUnixMode() ); }
public void testCreateArchive() throws Exception { ZipArchiver archiver = (ZipArchiver) lookup( Archiver.ROLE, "zip" ); archiver.setDefaultDirectoryMode( 0500 ); archiver.setDefaultFileMode( 0400 ); archiver.addDirectory( getTestFile( "src" ) ); archiver.setDefaultFileMode( 0640 ); archiver.addFile( getTestFile( "src/test/resources/manifests/manifest1.mf" ), "one.txt" ); archiver.addFile( getTestFile( "src/test/resources/manifests/manifest2.mf" ), "two.txt", 0664 ); // reset default file mode for files included from now on archiver.setDefaultFileMode( 0400 ); archiver.setDefaultDirectoryMode( 0777 ); archiver.addDirectory( getTestFile( "src/test/resources/world-writable/" ), "worldwritable/" ); archiver.setDefaultDirectoryMode( 0070 ); archiver.addDirectory( getTestFile( "src/test/resources/group-writable/" ), "groupwritable/" ); archiver.setDestFile( getTestFile( "target/output/archive.zip" ) ); archiver.createArchive(); ZipFile zf = new ZipFile( archiver.getDestFile() ); Enumeration e = zf.getEntries(); while ( e.hasMoreElements() ) { ZipEntry ze = (ZipEntry) e.nextElement(); if ( ze.isDirectory() ) { if ( ze.getName().startsWith( "worldwritable") ) { assertEquals( 0777, UnixStat.PERM_MASK & ze.getUnixMode() ); } else if ( ze.getName().startsWith( "groupwritable") ) { assertEquals( 0070, UnixStat.PERM_MASK & ze.getUnixMode() ); } else { assertEquals( 0500, UnixStat.PERM_MASK & ze.getUnixMode() ); } } else { if ( ze.getName().equals("one.txt")) { assertEquals( 0640, UnixStat.PERM_MASK & ze.getUnixMode() ); } else if ( ze.getName().equals("two.txt")) { assertEquals( 0664, UnixStat.PERM_MASK & ze.getUnixMode() ); } else { assertEquals( 0400, UnixStat.PERM_MASK & ze.getUnixMode() ); } } } }
10884 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10884/8348e0b29d34f62b8f140a99598373fb0cbf7fcb/ZipArchiverTest.java/clean/src/test/java/org/codehaus/plexus/archiver/zip/ZipArchiverTest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1842, 1684, 7465, 1435, 3639, 1216, 1185, 565, 288, 3639, 8603, 12269, 1667, 6637, 1667, 273, 261, 9141, 12269, 1667, 13, 3689, 12, 16959, 1667, 18, 16256, 16, 315, 4450, 6, 11...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1842, 1684, 7465, 1435, 3639, 1216, 1185, 565, 288, 3639, 8603, 12269, 1667, 6637, 1667, 273, 261, 9141, 12269, 1667, 13, 3689, 12, 16959, 1667, 18, 16256, 16, 315, 4450, 6, 11...
loop: for(int i = str.length() - 1; i >= 0; i--) { switch(str.charAt(i))
loop: for(int i = str.length() - 1; i >= 0; i--)
public static int getTrailingWhiteSpace(String str) { int whitespace = 0;loop: for(int i = str.length() - 1; i >= 0; i--) { switch(str.charAt(i)) { case ' ': case '\t': whitespace++; break; default: break loop; } } return whitespace; } //}}}
8690 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8690/44a5f5803f850e1a89f536b419abe4f58e772d29/MiscUtilities.java/buggy/org/gjt/sp/jedit/MiscUtilities.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 760, 509, 336, 16808, 23108, 12, 780, 609, 13, 202, 95, 202, 202, 474, 7983, 273, 374, 31, 6498, 30, 202, 202, 1884, 12, 474, 277, 273, 609, 18, 2469, 1435, 300, 404, 31, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 760, 509, 336, 16808, 23108, 12, 780, 609, 13, 202, 95, 202, 202, 474, 7983, 273, 374, 31, 6498, 30, 202, 202, 1884, 12, 474, 277, 273, 609, 18, 2469, 1435, 300, 404, 31, ...
return null; if(keywordLabels == null){ keywordLabels = new ArrayList(0); Iterator referenceIterator = keywordReferences.iterator(); while(referenceIterator.hasNext()){ Object label = keywords.get(referenceIterator.next()); if(label != null) keywordLabels.add(label); }
return Collections.EMPTY_LIST; Collection keywordLabels = new ArrayList(keywordReferences.size()); Iterator referenceIterator = keywordReferences.iterator(); while(referenceIterator.hasNext()){ Object label = KeywordRegistry.getInstance().getKeywordLabel( (String) referenceIterator.next()); if(label != null) keywordLabels.add(label);
public Collection getKeywordLabels() { if(keywordReferences == null) return null; if(keywordLabels == null){ keywordLabels = new ArrayList(0); Iterator referenceIterator = keywordReferences.iterator(); while(referenceIterator.hasNext()){ Object label = keywords.get(referenceIterator.next()); if(label != null) keywordLabels.add(label); } } return keywordLabels; }
58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/1c12ca2bf5f4c3b8348566e31ca6eb1f3119cc3c/WorkbenchPreferenceExtensionNode.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/preferences/WorkbenchPreferenceExtensionNode.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 2200, 3579, 1095, 5888, 1435, 288, 202, 202, 430, 12, 11041, 8221, 422, 446, 13, 1082, 202, 2463, 446, 31, 202, 202, 430, 12, 11041, 5888, 422, 446, 15329, 1082, 202, 11041, 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, 2200, 3579, 1095, 5888, 1435, 288, 202, 202, 430, 12, 11041, 8221, 422, 446, 13, 1082, 202, 2463, 446, 31, 202, 202, 430, 12, 11041, 5888, 422, 446, 15329, 1082, 202, 11041, 5...
assertEquals("text/html; charset=UTF-8",response.getContentType());
assertEquals("text/html; charset=utf-8",response.getContentType());
public void testContentTypeCharacterEncoding() throws Exception { HttpConnection connection = new HttpConnection(connector,connector.endp,connector.server); Request request = connection.getRequest(); Response response = connection.getResponse(); response.setContentType("foo/bar"); response.setCharacterEncoding("utf-8"); assertEquals("foo/bar; charset=utf-8",response.getContentType()); response.getWriter(); assertEquals("foo/bar; charset=utf-8",response.getContentType()); response.setContentType("foo2/bar2"); assertEquals("foo2/bar2; charset=utf-8",response.getContentType()); response.setCharacterEncoding("ISO-8859-1"); assertEquals("foo2/bar2; charset=utf-8",response.getContentType()); response.recycle(); response.setContentType("text/html"); response.setCharacterEncoding("utf-8"); assertEquals("text/html; charset=UTF-8",response.getContentType()); response.getWriter(); assertEquals("text/html; charset=UTF-8",response.getContentType()); response.setContentType("text/xml"); assertEquals("text/xml; charset=UTF-8",response.getContentType()); response.setCharacterEncoding("ISO-8859-1"); assertEquals("text/xml; charset=UTF-8",response.getContentType()); }
13242 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13242/2979677644b299de3c62bb2977f28365723a56f8/ResponseTest.java/buggy/trunk/modules/jetty/src/test/java/org/mortbay/jetty/ResponseTest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1842, 8046, 7069, 4705, 1435, 3639, 1216, 1185, 565, 288, 3639, 2541, 1952, 1459, 273, 394, 2541, 1952, 12, 23159, 16, 23159, 18, 409, 84, 16, 23159, 18, 3567, 1769, 7734, 1567...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8046, 7069, 4705, 1435, 3639, 1216, 1185, 565, 288, 3639, 2541, 1952, 1459, 273, 394, 2541, 1952, 12, 23159, 16, 23159, 18, 409, 84, 16, 23159, 18, 3567, 1769, 7734, 1567...
} offset++; prevStart = lineStart; lineStart = offset; lineno++; return '\n';
}
int read() throws IOException { for(;;) { if (end == offset && !fill()) return -1; // Do only a bitmask + branch per character, at the cost of // three branches per low-bits-only character. if ((buffer[offset] & '\ufff0') == 0) { if (buffer[offset] == '\r') { // if the next character is a newline, skip past it. if ((offset + 1) < end) { if (buffer[offset + 1] == '\n') offset++; } else { // set a flag for fill(), in case the first char of the // next fill is a newline. lastWasCR = true; } } else if (buffer[offset] != '\n') { return (int) buffer[offset++]; } offset++; prevStart = lineStart; lineStart = offset; lineno++; return '\n'; } if ((buffer[offset] >= 128) && Character.getType(buffer[offset]) == Character.FORMAT) { hadCFSinceStringStart = true; offset++; } else break; } return (int) buffer[offset++]; }
7555 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7555/a912f99c105742299def40e5379d8c4bf79beee6/LineBuffer.java/clean/js/rhino/org/mozilla/javascript/LineBuffer.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 509, 855, 1435, 1216, 1860, 288, 202, 202, 1884, 12, 25708, 13, 288, 1082, 202, 430, 261, 409, 422, 1384, 597, 401, 5935, 10756, 9506, 565, 327, 300, 21, 31, 1082, 202, 759, 2256, 1338,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 509, 855, 1435, 1216, 1860, 288, 202, 202, 1884, 12, 25708, 13, 288, 1082, 202, 430, 261, 409, 422, 1384, 597, 401, 5935, 10756, 9506, 565, 327, 300, 21, 31, 1082, 202, 759, 2256, 1338,...
if (container.getType() != IResource.PROJECT)
if (container.getType() != IResource.PROJECT && container.getType() != IResource.FOLDER)
private boolean isValidContainer() { if (container.getType() != IResource.PROJECT) return false; try { IWorkspace workspace = IDEWorkbenchPlugin.getPluginWorkspace(); IProject project = (IProject) container; String[] natureIds = project.getDescription().getNatureIds(); for (int i = 0; i < natureIds.length; i++) { IProjectNatureDescriptor descriptor = workspace .getNatureDescriptor(natureIds[i]); if (descriptor != null && descriptor.isLinkingAllowed() == false) return false; } } catch (CoreException exception) { // project does not exist or is closed return false; } return true; }
55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/c9b4289824fce91e3a9f32310c32c06f7aa250d3/NewFolderDialog.java/buggy/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/NewFolderDialog.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 1250, 4908, 2170, 1435, 288, 3639, 309, 261, 3782, 18, 588, 559, 1435, 480, 467, 1420, 18, 17147, 597, 1478, 18, 588, 559, 1435, 480, 467, 1420, 18, 17357, 13, 5411, 327, 629, 31,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 1250, 4908, 2170, 1435, 288, 3639, 309, 261, 3782, 18, 588, 559, 1435, 480, 467, 1420, 18, 17147, 597, 1478, 18, 588, 559, 1435, 480, 467, 1420, 18, 17357, 13, 5411, 327, 629, 31,...
super(project, file, XmlElementType.HTML_FILE, XmlElementType.HTML_FILE_TEXT);
super(project, file, XmlElementType.HTML_FILE, XmlElementType.HTML_FILE);
public HtmlFileImpl(Project project, VirtualFile file) { super(project, file, XmlElementType.HTML_FILE, XmlElementType.HTML_FILE_TEXT); }
12814 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12814/7cc49f57fd75f032b80560ecde54c4a99bda9ac7/HtmlFileImpl.java/buggy/source/com/intellij/psi/impl/source/html/HtmlFileImpl.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 5430, 812, 2828, 12, 4109, 1984, 16, 7269, 812, 585, 13, 288, 565, 2240, 12, 4406, 16, 585, 16, 15412, 559, 18, 4870, 67, 3776, 16, 15412, 559, 18, 4870, 67, 3776, 1769, 225, 28...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 5430, 812, 2828, 12, 4109, 1984, 16, 7269, 812, 585, 13, 288, 565, 2240, 12, 4406, 16, 585, 16, 15412, 559, 18, 4870, 67, 3776, 16, 15412, 559, 18, 4870, 67, 3776, 1769, 225, 28...
ihText = _nodeTestSeq.compile(classGen, methodGen, ihLoop); _testSeq[DOM.TEXT] = _nodeTestSeq;
ihText = _childNodeTestSeq.compile(classGen, methodGen, ihLoop); _testSeq[DOM.TEXT] = _childNodeTestSeq;
public void compileApplyTemplates(ClassGenerator classGen) { final XSLTC xsltc = classGen.getParser().getXSLTC(); final ConstantPoolGen cpg = classGen.getConstantPool(); final Vector names = xsltc.getNamesIndex(); // Create the applyTemplates() method final org.apache.bcel.generic.Type[] argTypes = new org.apache.bcel.generic.Type[3]; argTypes[0] = Util.getJCRefType(DOM_INTF_SIG); argTypes[1] = Util.getJCRefType(NODE_ITERATOR_SIG); argTypes[2] = Util.getJCRefType(TRANSLET_OUTPUT_SIG); final String[] argNames = new String[3]; argNames[0] = DOCUMENT_PNAME; argNames[1] = ITERATOR_PNAME; argNames[2] = TRANSLET_OUTPUT_PNAME; final InstructionList mainIL = new InstructionList(); final MethodGenerator methodGen = new MethodGenerator(ACC_PUBLIC | ACC_FINAL, org.apache.bcel.generic.Type.VOID, argTypes, argNames, functionName(), getClassName(), mainIL, classGen.getConstantPool()); methodGen.addException("org.apache.xalan.xsltc.TransletException"); // Create a local variable to hold the current node final LocalVariableGen current; current = methodGen.addLocalVariable2("current", org.apache.bcel.generic.Type.INT, mainIL.getEnd()); _currentIndex = current.getIndex(); // Create the "body" instruction list that will eventually hold the // code for the entire method (other ILs will be appended). final InstructionList body = new InstructionList(); body.append(NOP); // Create an instruction list that contains the default next-node // iteration final InstructionList ilLoop = new InstructionList(); ilLoop.append(methodGen.loadIterator()); ilLoop.append(methodGen.nextNode()); ilLoop.append(DUP); ilLoop.append(new ISTORE(_currentIndex)); // The body of this code can get very large - large than can be handled // by a single IFNE(body.getStart()) instruction - need workaround: final BranchHandle ifeq = ilLoop.append(new IFEQ(null)); final BranchHandle loop = ilLoop.append(new GOTO_W(null)); ifeq.setTarget(ilLoop.append(RETURN)); // applyTemplates() ends here! final InstructionHandle ihLoop = ilLoop.getStart(); // Compile default handling of elements (traverse children) InstructionList ilRecurse = compileDefaultRecursion(classGen, methodGen, ihLoop); InstructionHandle ihRecurse = ilRecurse.getStart(); // Compile default handling of text/attribute nodes (output text) InstructionList ilText = compileDefaultText(classGen, methodGen, ihLoop); InstructionHandle ihText = ilText.getStart(); // Distinguish attribute/element/namespace tests for further processing final int[] types = new int[DOM.NTYPES + names.size()]; for (int i = 0; i < types.length; i++) { types[i] = i; } // Initialize isAttribute[] and isNamespace[] arrays final boolean[] isAttribute = new boolean[types.length]; final boolean[] isNamespace = new boolean[types.length]; for (int i = 0; i < names.size(); i++) { final String name = (String)names.elementAt(i); isAttribute[i + DOM.NTYPES] = isAttributeName(name); isNamespace[i + DOM.NTYPES] = isNamespaceName(name); } // Compile all templates - regardless of pattern type compileTemplates(classGen, methodGen, ihLoop); // Handle template with explicit "*" pattern final TestSeq elemTest = _testSeq[DOM.ELEMENT]; InstructionHandle ihElem = ihRecurse; if (elemTest != null) ihElem = elemTest.compile(classGen, methodGen, ihRecurse); // Handle template with explicit "@*" pattern final TestSeq attrTest = _testSeq[DOM.ATTRIBUTE]; InstructionHandle ihAttr = ihText; if (attrTest != null) ihAttr = attrTest.compile(classGen, methodGen, ihAttr); // Do tests for id() and key() patterns first InstructionList ilKey = null; if (_idxTestSeq != null) { loop.setTarget(_idxTestSeq.compile(classGen, methodGen, body.getStart())); ilKey = _idxTestSeq.getInstructionList(); } else { loop.setTarget(body.getStart()); } // If there is a match on node() we need to replace ihElem // and ihText if the priority of node() is higher if (_nodeTestSeq != null) { // Compare priorities of node() and "*" double nodePrio = _nodeTestSeq.getPriority(); int nodePos = _nodeTestSeq.getPosition(); double elemPrio = (0 - Double.MAX_VALUE); int elemPos = Integer.MIN_VALUE; if (elemTest != null) { elemPrio = elemTest.getPriority(); elemPos = elemTest.getPosition(); } if (elemPrio == Double.NaN || elemPrio < nodePrio || (elemPrio == nodePrio && elemPos < nodePos)) { ihElem = _nodeTestSeq.compile(classGen, methodGen, ihLoop); } // Compare priorities of node() and text() final TestSeq textTest = _testSeq[DOM.TEXT]; double textPrio = (0 - Double.MAX_VALUE); int textPos = Integer.MIN_VALUE; if (textTest != null) { textPrio = textTest.getPriority(); textPos = textTest.getPosition(); } if (textPrio == Double.NaN || textPrio < nodePrio || (textPrio == nodePrio && textPos < nodePos)) { ihText = _nodeTestSeq.compile(classGen, methodGen, ihLoop); _testSeq[DOM.TEXT] = _nodeTestSeq; } } // Handle templates with "ns:*" pattern InstructionHandle elemNamespaceHandle = ihElem; InstructionList nsElem = compileNamespaces(classGen, methodGen, isNamespace, isAttribute, false, ihElem); if (nsElem != null) elemNamespaceHandle = nsElem.getStart(); // Handle templates with "ns:@*" pattern InstructionHandle attrNamespaceHandle = ihAttr; InstructionList nsAttr = compileNamespaces(classGen, methodGen, isNamespace, isAttribute, true, ihAttr); if (nsAttr != null) attrNamespaceHandle = nsAttr.getStart(); // Handle templates with "ns:elem" or "ns:@attr" pattern final InstructionHandle[] targets = new InstructionHandle[types.length]; for (int i = DOM.NTYPES; i < targets.length; i++) { final TestSeq testSeq = _testSeq[i]; // Jump straight to namespace tests ? if (isNamespace[i]) { if (isAttribute[i]) targets[i] = attrNamespaceHandle; else targets[i] = elemNamespaceHandle; } // Test first, then jump to namespace tests else if (testSeq != null) { if (isAttribute[i]) targets[i] = testSeq.compile(classGen, methodGen, attrNamespaceHandle); else targets[i] = testSeq.compile(classGen, methodGen, elemNamespaceHandle); } else { targets[i] = ihLoop; } } // Handle pattern with match on root node - default: traverse children targets[DOM.ROOT] = _rootPattern != null ? getTemplateInstructionHandle(_rootPattern.getTemplate()) : ihRecurse; // Handle any pattern with match on text nodes - default: output text targets[DOM.TEXT] = _testSeq[DOM.TEXT] != null ? _testSeq[DOM.TEXT].compile(classGen, methodGen, ihText) : ihText; // This DOM-type is not in use - default: process next node targets[DOM.NAMESPACE] = ihLoop; // Match unknown element in DOM - default: check for namespace match targets[DOM.ELEMENT] = elemNamespaceHandle; // Match unknown attribute in DOM - default: check for namespace match targets[DOM.ATTRIBUTE] = attrNamespaceHandle; // Match on processing instruction - default: process next node InstructionHandle ihPI = ihLoop; if (_nodeTestSeq != null) ihPI = ihElem; if (_testSeq[DOM.PROCESSING_INSTRUCTION] != null) targets[DOM.PROCESSING_INSTRUCTION] = _testSeq[DOM.PROCESSING_INSTRUCTION]. compile(classGen, methodGen, ihPI); else targets[DOM.PROCESSING_INSTRUCTION] = ihPI; // Match on comments - default: process next node InstructionHandle ihComment = ihLoop; if (_nodeTestSeq != null) ihComment = ihElem; targets[DOM.COMMENT] = _testSeq[DOM.COMMENT] != null ? _testSeq[DOM.COMMENT].compile(classGen, methodGen, ihComment) : ihComment; // Now compile test sequences for various match patterns: for (int i = DOM.NTYPES; i < targets.length; i++) { final TestSeq testSeq = _testSeq[i]; // Jump straight to namespace tests ? if ((testSeq == null) || (isNamespace[i])) { if (isAttribute[i]) targets[i] = attrNamespaceHandle; else targets[i] = elemNamespaceHandle; } // Match on node type else { if (isAttribute[i]) targets[i] = testSeq.compile(classGen, methodGen, attrNamespaceHandle); else targets[i] = testSeq.compile(classGen, methodGen, elemNamespaceHandle); } } if (ilKey != null) body.insert(ilKey); // Append first code in applyTemplates() - get type of current node final int getType = cpg.addInterfaceMethodref(DOM_INTF, "getType", "(I)I"); body.append(methodGen.loadDOM()); body.append(new ILOAD(_currentIndex)); body.append(new INVOKEINTERFACE(getType, 2)); // Append switch() statement - main dispatch loop in applyTemplates() InstructionHandle disp = body.append(new SWITCH(types, targets, ihLoop)); // Append all the "case:" statements appendTestSequences(body); // Append the actual template code appendTemplateCode(body); // Append NS:* node tests (if any) if (nsElem != null) body.append(nsElem); // Append NS:@* node tests (if any) if (nsAttr != null) body.append(nsAttr); // Append default action for element and root nodes body.append(ilRecurse); // Append default action for text and attribute nodes body.append(ilText); // putting together constituent instruction lists mainIL.append(new GOTO_W(ihLoop)); mainIL.append(body); // fall through to ilLoop mainIL.append(ilLoop); peepHoleOptimization(methodGen); methodGen.stripAttributes(true); methodGen.setMaxLocals(); methodGen.setMaxStack(); methodGen.removeNOPs(); classGen.addMethod(methodGen.getMethod()); // Compile method(s) for <xsl:apply-imports/> for this mode if (_importLevels != null) { Enumeration levels = _importLevels.keys(); while (levels.hasMoreElements()) { Integer max = (Integer)levels.nextElement(); Integer min = (Integer)_importLevels.get(max); compileApplyImports(classGen, min.intValue(), max.intValue()); } } }
2723 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2723/3997d939907610b1342d6ed5a6c05ee671a0ee8c/Mode.java/buggy/src/org/apache/xalan/xsltc/compiler/Mode.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 4074, 7001, 8218, 12, 797, 3908, 667, 7642, 13, 288, 202, 6385, 17243, 15988, 20791, 5111, 273, 667, 7642, 18, 588, 2678, 7675, 588, 60, 4559, 15988, 5621, 202, 6385, 10551, 28...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4074, 7001, 8218, 12, 797, 3908, 667, 7642, 13, 288, 202, 6385, 17243, 15988, 20791, 5111, 273, 667, 7642, 18, 588, 2678, 7675, 588, 60, 4559, 15988, 5621, 202, 6385, 10551, 28...
ze.setTime(fromDosTime(new ZipLong(cfh, off)).getTime());
long time = dosToJavaTime(ZipLong.getValue(cfh, off)); ze.setTime(time);
private void populateFromCentralDirectory() throws IOException { positionAtCentralDirectory(); byte[] cfh = new byte[CFH_LEN]; byte[] signatureBytes = new byte[4]; archive.readFully(signatureBytes); ZipLong sig = new ZipLong(signatureBytes); while (sig.equals(ZipOutputStream.CFH_SIG)) { archive.readFully(cfh); int off = 0; ZipEntry ze = new ZipEntry(); ZipShort versionMadeBy = new ZipShort(cfh, off); off += 2; ze.setPlatform((versionMadeBy.getValue() >> 8) & 0x0F); off += 4; // skip version info and general purpose byte ze.setMethod((new ZipShort(cfh, off)).getValue()); off += 2; ze.setTime(fromDosTime(new ZipLong(cfh, off)).getTime()); off += 4; ze.setCrc((new ZipLong(cfh, off)).getValue()); off += 4; ze.setCompressedSize((new ZipLong(cfh, off)).getValue()); off += 4; ze.setSize((new ZipLong(cfh, off)).getValue()); off += 4; int fileNameLen = (new ZipShort(cfh, off)).getValue(); off += 2; int extraLen = (new ZipShort(cfh, off)).getValue(); off += 2; int commentLen = (new ZipShort(cfh, off)).getValue(); off += 2; off += 2; // disk number ze.setInternalAttributes((new ZipShort(cfh, off)).getValue()); off += 2; ze.setExternalAttributes((new ZipLong(cfh, off)).getValue()); off += 4; // LFH offset entries.put(ze, new Long((new ZipLong(cfh, off)).getValue())); byte[] fileName = new byte[fileNameLen]; archive.readFully(fileName); ze.setName(getString(fileName)); nameMap.put(ze.getName(), ze); archive.skipBytes(extraLen); byte[] comment = new byte[commentLen]; archive.readFully(comment); ze.setComment(getString(comment)); archive.readFully(signatureBytes); sig = new ZipLong(signatureBytes); } }
506 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/506/a05d1f12196d34b23d4ab80c3598f6fb63410ac5/ZipFile.java/clean/src/main/org/apache/tools/zip/ZipFile.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 6490, 1265, 39, 12839, 2853, 1435, 3639, 1216, 1860, 288, 3639, 1754, 861, 39, 12839, 2853, 5621, 3639, 1160, 8526, 6080, 76, 273, 394, 1160, 63, 8955, 44, 67, 13017, 15533, 36...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6490, 1265, 39, 12839, 2853, 1435, 3639, 1216, 1860, 288, 3639, 1754, 861, 39, 12839, 2853, 5621, 3639, 1160, 8526, 6080, 76, 273, 394, 1160, 63, 8955, 44, 67, 13017, 15533, 36...
throw IdFunction.onBadMethodId(this, methodId);
throw f.unknown();
public Object execMethod(int methodId, IdFunction function, Context cx, Scriptable scope, Scriptable thisObj, Object[] args) throws JavaScriptException { if (scopeSlaveFlag) { switch (methodId) { case Id_decodeURI: case Id_decodeURIComponent: { String str = ScriptRuntime.toString(args, 0); return decode(cx, str, methodId == Id_decodeURI); } case Id_encodeURI: case Id_encodeURIComponent: { String str = ScriptRuntime.toString(args, 0); return encode(cx, str, methodId == Id_encodeURI); } case Id_escape: return js_escape(cx, args); case Id_eval: return js_eval(cx, scope, args); case Id_isFinite: { if (args.length < 1) return Boolean.FALSE; double d = ScriptRuntime.toNumber(args[0]); return (d != d || d == Double.POSITIVE_INFINITY || d == Double.NEGATIVE_INFINITY) ? Boolean.FALSE : Boolean.TRUE; } case Id_isNaN: { // The global method isNaN, as per ECMA-262 15.1.2.6. if (args.length < 1) return Boolean.TRUE; double d = ScriptRuntime.toNumber(args[0]); return (d != d) ? Boolean.TRUE : Boolean.FALSE; } case Id_parseFloat: return js_parseFloat(cx, args); case Id_parseInt: return js_parseInt(cx, args); case Id_unescape: return js_unescape(cx, args); case Id_uneval: { Object value = (args.length != 0) ? args[0] : Undefined.instance; return ScriptRuntime.uneval(cx, scope, value); } case Id_new_CommonError: // The implementation of all the ECMA error constructors // (SyntaxError, TypeError, etc.) return NativeError.make(cx, scope, function, args); } } throw IdFunction.onBadMethodId(this, methodId); }
11366 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11366/8f28fc868ac3f30ea37494abfddb6358154786c3/NativeGlobal.java/buggy/js/rhino/src/org/mozilla/javascript/NativeGlobal.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 1033, 1196, 1305, 12, 474, 707, 548, 16, 3124, 2083, 445, 16, 1772, 9494, 16, 11794, 22780, 2146, 16, 22780, 15261, 16, 11794, 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, 12, 474, 707, 548, 16, 3124, 2083, 445, 16, 1772, 9494, 16, 11794, 22780, 2146, 16, 22780, 15261, 16, 11794, 1033, 8526, 833, 13, 3639, 1216, 11905, 503, 565, 288,...
returnValue.put(newProperty, new BooleanIcon(getMessageInfo().hasAttachments(), Pooka.getProperty("FolderTable.Attachments.icon", "")));
returnValue.put(newProperty, new BooleanIcon(getMessageInfo().hasAttachments(), Pooka.getProperty("FolderTable.Attachments.icon", ""), propertyName));
protected HashMap createTableInfo() throws MessagingException { int columnCount = columnHeaders.size(); HashMap returnValue = new HashMap(); for(int j=0; j < columnCount; j++) { try { Object newProperty = columnHeaders.elementAt(j); if (newProperty instanceof String) { String propertyName = (String)newProperty; if (propertyName.startsWith("FLAG")) returnValue.put(newProperty, getMessageFlag(propertyName)); else if (propertyName.equals("attachments")) returnValue.put(newProperty, new BooleanIcon(getMessageInfo().hasAttachments(), Pooka.getProperty("FolderTable.Attachments.icon", ""))); else if (propertyName.equals("crypto")) returnValue.put(newProperty, new BooleanIcon(getMessageInfo().hasEncryption(), Pooka.getProperty("FolderTable.Crypto.icon", ""))); else if (propertyName.equalsIgnoreCase("subject")) returnValue.put(newProperty, new SubjectLine((String) getMessageInfo().getMessageProperty(propertyName))); else if (propertyName.equalsIgnoreCase("from")) returnValue.put(newProperty, new AddressLine((String) getMessageInfo().getMessageProperty(propertyName))); else returnValue.put(newProperty, getMessageInfo().getMessageProperty(propertyName)); } else if (newProperty instanceof SearchTermIconManager) { SearchTermIconManager stm = (SearchTermIconManager) newProperty; returnValue.put(newProperty, new SearchTermIcon(stm, this)); } else if (newProperty instanceof RowCounter) { returnValue.put(newProperty, newProperty); } } catch (Exception e) { // if we catch an exception, keep going for the rest. if (getFolderInfo().getLogger().isLoggable(java.util.logging.Level.WARNING)) e.printStackTrace(); } } return returnValue; }
967 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/967/f2577f9b0679162bd494e07c5f9f0de47e96d8d4/MessageProxy.java/clean/src/net/suberic/pooka/gui/MessageProxy.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 4750, 4317, 19565, 966, 1435, 1216, 23794, 503, 288, 565, 509, 22429, 273, 1057, 3121, 18, 1467, 5621, 3639, 4317, 7750, 273, 394, 4317, 5621, 3639, 364, 12, 474, 525, 33, 20, 31, 525, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4317, 19565, 966, 1435, 1216, 23794, 503, 288, 565, 509, 22429, 273, 1057, 3121, 18, 1467, 5621, 3639, 4317, 7750, 273, 394, 4317, 5621, 3639, 364, 12, 474, 525, 33, 20, 31, 525, ...
new SingleFileInserter(this, this, block, isMetadata, ctx, false, getCHKOnly, false, baseMetadata, insertAsArchiveManifest);
new SingleFileInserter(this, this, block, isMetadata, ctx, false, getCHKOnly, false, baseMetadata, insertAsArchiveManifest, true);
private void resolveAndStartBase() { Bucket bucket = null; synchronized(this) { if(hasResolvedBase) return; } while(true) { try { bucket = BucketTools.makeImmutableBucket(ctx.bf, baseMetadata.writeToByteArray()); break; } catch (IOException e) { fail(new InserterException(InserterException.BUCKET_ERROR, e, null)); return; } catch (MetadataUnresolvedException e) { try { resolve(e); } catch (IOException e1) { fail(new InserterException(InserterException.BUCKET_ERROR, e, null)); return; } catch (InserterException e2) { fail(e2); } } } if(bucket == null) return; synchronized(this) { if(hasResolvedBase) return; hasResolvedBase = true; } InsertBlock block; boolean isMetadata = true; boolean insertAsArchiveManifest = false; if(!(elementsToPutInZip.isEmpty())) { // There is a zip to insert. // We want to include the metadata. // We have the metadata, fortunately enough, because everything has been resolve()d. // So all we need to do is create the actual ZIP. try { // FIXME support formats other than .zip. // Only the *decoding* is generic at present. Bucket zipBucket = ctx.bf.makeBucket(-1); OutputStream os = zipBucket.getOutputStream(); ZipOutputStream zos = new ZipOutputStream(os); ZipEntry ze; for(Iterator i=elementsToPutInZip.iterator();i.hasNext();) { PutHandler ph = (PutHandler) i.next(); ze = new ZipEntry(ph.targetInZip); ze.setTime(0); zos.putNextEntry(ze); BucketTools.copyTo(ph.data, zos, ph.data.size()); } // Add .metadata - after the rest. ze = new ZipEntry(".metadata"); ze.setTime(0); // -1 = now, 0 = 1970. zos.putNextEntry(ze); BucketTools.copyTo(bucket, zos, bucket.size()); zos.closeEntry(); // Both finish() and close() are necessary. zos.finish(); zos.close(); // Now we have to insert the ZIP. // Can we just insert it, and not bother with a redirect to it? // Thereby exploiting implicit manifest support, which will pick up on .metadata?? // We ought to be able to !! block = new InsertBlock(zipBucket, new ClientMetadata("application/zip"), targetURI); isMetadata = false; insertAsArchiveManifest = true; } catch (ZipException e) { fail(new InserterException(InserterException.INTERNAL_ERROR, e, null)); return; } catch (IOException e) { fail(new InserterException(InserterException.BUCKET_ERROR, e, null)); return; } } else block = new InsertBlock(bucket, null, targetURI); try { SingleFileInserter metadataInserter = new SingleFileInserter(this, this, block, isMetadata, ctx, false, getCHKOnly, false, baseMetadata, insertAsArchiveManifest); Logger.minor(this, "Inserting main metadata: "+metadataInserter); this.metadataPuttersByMetadata.put(baseMetadata, metadataInserter); metadataInserter.start(null); } catch (InserterException e) { fail(e); } }
50287 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50287/ba61984610fbdc6ae89adf37e39660cc27c3f343/SimpleManifestPutter.java/buggy/src/freenet/client/async/SimpleManifestPutter.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 918, 2245, 1876, 1685, 2171, 1435, 288, 202, 202, 4103, 2783, 273, 446, 31, 202, 202, 22043, 12, 2211, 13, 288, 1082, 202, 430, 12, 5332, 12793, 2171, 13, 327, 31, 202, 202, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 918, 2245, 1876, 1685, 2171, 1435, 288, 202, 202, 4103, 2783, 273, 446, 31, 202, 202, 22043, 12, 2211, 13, 288, 1082, 202, 430, 12, 5332, 12793, 2171, 13, 327, 31, 202, 202, ...
TypeDeclaration decl= (TypeDeclaration) fTypeNode;
AbstractTypeDeclaration decl= (AbstractTypeDeclaration) fTypeNode;
protected ASTRewrite getRewrite() throws CoreException { ITypeBinding binding; AST ast= fTypeNode.getAST(); ASTRewrite rewrite= ASTRewrite.create(ast); ListRewrite listRewrite; if (fTypeNode instanceof AnonymousClassDeclaration) { AnonymousClassDeclaration decl= (AnonymousClassDeclaration) fTypeNode; binding= decl.resolveBinding(); listRewrite= rewrite.getListRewrite(decl, AnonymousClassDeclaration.BODY_DECLARATIONS_PROPERTY); } else { TypeDeclaration decl= (TypeDeclaration) fTypeNode; binding= decl.resolveBinding(); listRewrite= rewrite.getListRewrite(decl, TypeDeclaration.BODY_DECLARATIONS_PROPERTY); } IMethodBinding[] methods= evalUnimplementedMethods(binding); fMethodsToOverride= methods; CodeGenerationSettings settings= JavaPreferencesSettings.getCodeGenerationSettings(); if (!settings.createComments || binding.isAnonymous()) { settings= null; } for (int i= 0; i < methods.length; i++) { MethodDeclaration newMethodDecl= createNewMethodDeclaration(ast, methods[i], rewrite, binding.getName(), settings); listRewrite.insertLast(newMethodDecl, null); } return rewrite; }
9698 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9698/83d50dc50a6280134095bf53b227a8b225dab16d/UnimplementedMethodsCompletionProposal.java/buggy/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/UnimplementedMethodsCompletionProposal.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1117, 432, 3902, 12341, 4170, 12341, 1435, 1216, 30015, 288, 202, 202, 45, 559, 5250, 5085, 31, 202, 202, 9053, 3364, 33, 284, 559, 907, 18, 588, 9053, 5621, 9506, 202, 37, 3902, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 432, 3902, 12341, 4170, 12341, 1435, 1216, 30015, 288, 202, 202, 45, 559, 5250, 5085, 31, 202, 202, 9053, 3364, 33, 284, 559, 907, 18, 588, 9053, 5621, 9506, 202, 37, 3902, 1...
retValue.width = retValue.width + ReportDesignLayout.MINRIGHTSPACE;
retValue.width = retValue.width + ReportDesignLayout.MINRIGHTSPACE;
public Rectangle getFreeformExtent( ) { Rectangle rect = super.getFreeformExtent(); Rectangle retValue = rect.getCopy(); Object obj = getViewer().getProperty( DeferredGraphicalViewer.REPORT_SIZE ); if (obj instanceof Rectangle) { Rectangle temp = (Rectangle)obj; if (temp.width - rect.right() <= ReportDesignLayout.MINRIGHTSPACE) { retValue.width = retValue.width + ReportDesignLayout.MINRIGHTSPACE; } if (temp.height - rect.bottom() <= ReportDesignLayout.MINBOTTOMSPACE) { retValue.height = retValue.height + ReportDesignLayout.MINBOTTOMSPACE; } } return retValue; }
5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/7c069590b95389226364c6455ac220378423411d/ReportRootEditPart.java/buggy/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/editors/schematic/editparts/ReportRootEditPart.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1875, 202, 482, 13264, 2812, 992, 687, 17639, 12, 262, 1082, 202, 95, 6862, 202, 19463, 4917, 273, 2240, 18, 588, 9194, 687, 17639, 5621, 9506, 202, 19463, 21236, 273, 4917, 18, 588, 2951, 562...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1875, 202, 482, 13264, 2812, 992, 687, 17639, 12, 262, 1082, 202, 95, 6862, 202, 19463, 4917, 273, 2240, 18, 588, 9194, 687, 17639, 5621, 9506, 202, 19463, 21236, 273, 4917, 18, 588, 2951, 562...
firePropertyChange(LABEL_FOR_CHANGED_PROPERTY, labelFor, c);
Component oldLabelFor = labelFor;
public void setLabelFor(Component c) { if (c != labelFor) { firePropertyChange(LABEL_FOR_CHANGED_PROPERTY, labelFor, c); labelFor = c; } }
45713 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45713/c754360f408c2c16385a58f8faaf10fbcf3e9594/JLabel.java/buggy/libraries/javalib/javax/swing/JLabel.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 16558, 1290, 12, 1841, 276, 13, 225, 288, 565, 309, 261, 71, 480, 1433, 1290, 13, 1377, 288, 202, 12179, 1396, 3043, 12, 13545, 67, 7473, 67, 24435, 67, 9900, 16, 1433, 1290,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 16558, 1290, 12, 1841, 276, 13, 225, 288, 565, 309, 261, 71, 480, 1433, 1290, 13, 1377, 288, 202, 12179, 1396, 3043, 12, 13545, 67, 7473, 67, 24435, 67, 9900, 16, 1433, 1290,...
assertEquals("ConverterManager[6 instant,5 duration,2 interval]", ConverterManager.getInstance().toString());
assertEquals("ConverterManager[6 instant,6 duration,5 period,2 interval]", ConverterManager.getInstance().toString());
public void testToString() { assertEquals("ConverterManager[6 instant,5 duration,2 interval]", ConverterManager.getInstance().toString()); }
52859 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52859/226fd68cc77369f5c7cec5195e32c41229a7cac1/TestConverterManager.java/buggy/JodaTime/src/test/org/joda/time/convert/TestConverterManager.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1842, 5808, 1435, 288, 3639, 1815, 8867, 2932, 5072, 1318, 63, 26, 5934, 16, 26, 3734, 16, 25, 3879, 16, 22, 3673, 65, 3113, 14768, 1318, 18, 588, 1442, 7675, 10492, 10663, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1842, 5808, 1435, 288, 3639, 1815, 8867, 2932, 5072, 1318, 63, 26, 5934, 16, 26, 3734, 16, 25, 3879, 16, 22, 3673, 65, 3113, 14768, 1318, 18, 588, 1442, 7675, 10492, 10663, 5...
if (iface != null) { if (interfaceContainsOnlyConstants(iface)) {
if(iface != null){ if(interfaceContainsOnlyConstants(iface)){
public void visitClass(PsiClass aClass) { // no call to super, so it doesn't drill down final PsiReferenceList implementsList = aClass.getImplementsList(); if (implementsList == null) { return; } final PsiJavaCodeReferenceElement[] refs = implementsList.getReferenceElements(); for (int i = 0; i < refs.length; i++) { final PsiJavaCodeReferenceElement ref = refs[i]; final PsiClass iface = (PsiClass) ref.resolve(); if (iface != null) { if (interfaceContainsOnlyConstants(iface)) { registerError(ref); } } } }
56598 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56598/5aa35b2df570765c60519b186a4c55bd7ac791a6/StaticInheritanceInspection.java/clean/plugins/InspectionGadgets/src/com/siyeh/ig/classlayout/StaticInheritanceInspection.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 540, 1071, 918, 3757, 797, 12, 52, 7722, 797, 20148, 13, 288, 5411, 368, 1158, 745, 358, 2240, 16, 1427, 518, 3302, 1404, 5081, 737, 2588, 5411, 727, 453, 7722, 2404, 682, 4792, 682, 273, 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, 540, 1071, 918, 3757, 797, 12, 52, 7722, 797, 20148, 13, 288, 5411, 368, 1158, 745, 358, 2240, 16, 1427, 518, 3302, 1404, 5081, 737, 2588, 5411, 727, 453, 7722, 2404, 682, 4792, 682, 273, 20...
} catch(java.util.ConcurrentModificationException e) {
} catch(final java.util.ConcurrentModificationException e) {
public boolean isAlreadyPresent(FCPTransferQuery query) { boolean interrupted=true; Iterator it; while(interrupted) { interrupted = false; try { for(it = this.runningQueries.iterator(); it.hasNext(); ) { FCPTransferQuery plop = (FCPTransferQuery)it.next(); if(this.isTheSame(plop, query)) return true; } for(int i = 0 ; i <= PRIORITY_MIN ; i++) { for(it = this.pendingQueries[i].iterator(); it.hasNext(); ) { FCPTransferQuery plop = (FCPTransferQuery)it.next(); if(this.isTheSame(plop, query)) return true; } } } catch(java.util.ConcurrentModificationException e) { Logger.notice(this, "isAlreadyPresent(): Collission. Reitering"); interrupted = true; } } return false; }
47012 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47012/0458430a0dc8a713aa2b4d64f000cbbaaeb4adea/FCPQueueManager.java/clean/src/thaw/fcp/FCPQueueManager.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 1250, 353, 9430, 6351, 12, 42, 4258, 5912, 1138, 843, 13, 288, 202, 202, 6494, 15711, 33, 3767, 31, 202, 202, 3198, 518, 31, 202, 202, 17523, 12, 474, 5954, 13, 288, 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, 1250, 353, 9430, 6351, 12, 42, 4258, 5912, 1138, 843, 13, 288, 202, 202, 6494, 15711, 33, 3767, 31, 202, 202, 3198, 518, 31, 202, 202, 17523, 12, 474, 5954, 13, 288, 1082, 2...
public void selectNextWindow() { JInternalFrame[] allFrames = getAllFrames(); if (allFrames.length > 0) { for(int i = 0; i < allFrames.length; i++) { if (allFrames[i].isSelected()) { JInternalFrame selected = allFrames[i]; JInternalFrame newSelected = allFrames[i + 1 % allFrames.length]; try { setPosition(selected, allFrames.length -1); newSelected.setSelected(true); } catch (java.beans.PropertyVetoException e) { } return; } } // if we get to this point, it means that there are windows, // but none of them are selected. try { allFrames[0].setSelected(true); } catch (java.beans.PropertyVetoException e) { } } }
967 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/967/538edc8a94ad8ef2062ef68f8ea643b251c1a947/MessagePanel.java/buggy/src/net/suberic/pooka/gui/MessagePanel.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 2027, 2134, 3829, 1435, 288, 565, 804, 3061, 3219, 8526, 777, 15162, 273, 5514, 15162, 5621, 3639, 309, 261, 454, 15162, 18, 2469, 405, 374, 13, 288, 1377, 364, 12, 474, 277, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 2027, 2134, 3829, 1435, 288, 565, 804, 3061, 3219, 8526, 777, 15162, 273, 5514, 15162, 5621, 3639, 309, 261, 454, 15162, 18, 2469, 405, 374, 13, 288, 1377, 364, 12, 474, 277, ...
if (e.type == SWT.KeyDown) { e.doit = false;
if (e.type == SWT.KeyDown) { e.doit = false;
public void handleEvent(Event e) { if (!isValid()) { return; } char key = e.character; // Traverse events are handled depending on whether the // event has a character. if (e.type == SWT.Traverse) { // If the traverse event contains a legitimate character, // then we must set doit false so that the widget will // receive the key event. We return immediately so that // the character is handled only in the key event. // See https://bugs.eclipse.org/bugs/show_bug.cgi?id=132101 if (key != 0) { e.doit = false; return; } // Traversal does not contain a character. Set doit true // to indicate TRAVERSE_NONE will occur and that no key // event will be triggered. We will check for navigation // keys below. e.detail = SWT.TRAVERSE_NONE; e.doit = true; } else { // Default is to only propagate when configured that way. // Some keys will always set doit to false anyway. e.doit = propagateKeys; } // No character. Check for navigation keys. if (key == 0) { int newSelection = proposalTable.getSelectionIndex(); int visibleRows = (proposalTable.getSize().y / proposalTable .getItemHeight()) - 1; switch (e.keyCode) { case SWT.ARROW_UP: newSelection -= 1; if (newSelection < 0) { newSelection = proposalTable.getItemCount() - 1; } // Not typical - usually we get this as a Traverse and // therefore it never propagates. Added for consistency. if (e.type == SWT.KeyDown) { // don't propagate to control e.doit = false; } break; case SWT.ARROW_DOWN: newSelection += 1; if (newSelection > proposalTable.getItemCount() - 1) { newSelection = 0; } // Not typical - usually we get this as a Traverse and // therefore it never propagates. Added for consistency. if (e.type == SWT.KeyDown) { // don't propagate to control e.doit = false; } break; case SWT.PAGE_DOWN: newSelection += visibleRows; if (newSelection >= proposalTable.getItemCount()) { newSelection = proposalTable.getItemCount() - 1; } if (e.type == SWT.KeyDown) { // don't propagate to control e.doit = false; } break; case SWT.PAGE_UP: newSelection -= visibleRows; if (newSelection < 0) { newSelection = 0; } if (e.type == SWT.KeyDown) { // don't propagate to control e.doit = false; } break; case SWT.HOME: newSelection = 0; if (e.type == SWT.KeyDown) { // don't propagate to control e.doit = false; } break; case SWT.END: newSelection = proposalTable.getItemCount() - 1; if (e.type == SWT.KeyDown) { // don't propagate to control e.doit = false; } break; // If received as a Traverse, these should propagate // to the control as keydown. If received as a keydown, // proposals should be recomputed since the cursor // position has changed. case SWT.ARROW_LEFT: case SWT.ARROW_RIGHT: if (e.type == SWT.Traverse) { e.doit = false; } else { e.doit = true; String contents = getControlContentAdapter().getControlContents( getControl()); // If there are no contents, changes in cursor position // have no effect. Note also that we do not affect the filter // text on ARROW_LEFT as we would with BS. if (contents.length() > 0) { asyncRecomputeProposals(filterText); } } break; // Any unknown keycodes will cause the popup to close. // Modifier keys are explicitly checked and ignored because // they are not complete yet (no character). default: if (e.keyCode != SWT.CAPS_LOCK && e.keyCode != SWT.MOD1 && e.keyCode != SWT.MOD2 && e.keyCode != SWT.MOD3 && e.keyCode != SWT.MOD4) { close(); } return; } // If any of these navigation events caused a new selection, // then handle that now and return. if (newSelection >= 0) { selectProposal(newSelection); } return; } // key != 0 // Check for special keys involved in cancelling, accepting, or // filtering the proposals. switch (key) { case SWT.ESC: e.doit = false; close(); break; case SWT.LF: case SWT.CR: e.doit = false; Object p = getSelectedProposal(); if (p != null) { acceptCurrentProposal(); } close(); break; case SWT.TAB: e.doit = false; getShell().setFocus(); return; case SWT.BS: // Backspace should back out of any stored filter text if (filterStyle != FILTER_NONE) { // We have no filter to back out of, so do nothing if (filterText.length() == 0) { return; } // There is filter to back out of filterText = filterText.substring(0, filterText .length() - 1); asyncRecomputeProposals(filterText); return; } // There is no filtering provided by us, but some // clients provide their own filtering based on content. // Recompute the proposals if the cursor position // will change (is not at 0). int pos = getControlContentAdapter().getCursorPosition(getControl()); // We rely on the fact that the contents and pos do not yet // reflect the result of the BS. If the contents were already empty, then BS should not cause // a recompute. if (pos > 0) { asyncRecomputeProposals(filterText); } break; default: // If the key is a defined unicode character, and not one of // the special cases processed above, update the filter text // and filter the proposals. if (Character.isDefined(key)) { if (filterStyle == FILTER_CUMULATIVE) { filterText = filterText + String.valueOf(key); } else if (filterStyle == FILTER_CHARACTER) { filterText = String.valueOf(key); } // Recompute proposals after processing this event. asyncRecomputeProposals(filterText); } break; } }
55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/3c8429a60e5e65142c6024e843a14c5deaeb91fd/ContentProposalAdapter.java/clean/bundles/org.eclipse.jface/src/org/eclipse/jface/fieldassist/ContentProposalAdapter.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1875, 202, 482, 918, 1640, 1133, 12, 1133, 425, 13, 288, 9506, 202, 430, 16051, 26810, 10756, 288, 6862, 202, 2463, 31, 9506, 202, 97, 9506, 202, 3001, 498, 273, 425, 18, 11560, 31, 9506, 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, 1875, 202, 482, 918, 1640, 1133, 12, 1133, 425, 13, 288, 9506, 202, 430, 16051, 26810, 10756, 288, 6862, 202, 2463, 31, 9506, 202, 97, 9506, 202, 3001, 498, 273, 425, 18, 11560, 31, 9506, 20...
Statement stmt = cx.createStatement(); stmt.executeUpdate("create table #t0016 " + " (i integer not null, " + " s char(10) not null) ");
Statement stmt = cx.createStatement(); stmt.executeUpdate("create table #t0016 " + " (i integer not null, " + " s char(10) not null) ");
public void testMissingParameter0016() throws Exception { Connection cx = getConnection(); dropTable("#t0016"); Statement stmt = cx.createStatement(); stmt.executeUpdate("create table #t0016 " + " (i integer not null, " + " s char(10) not null) "); stmt = cx.createStatement(); final int rowsToAdd = 20; int count = 0; for (int i = 1; i <= rowsToAdd; i++) { String sql = "insert into #t0016 values (" + i + ", 'row" + i + "')"; count += stmt.executeUpdate(sql); } assertTrue(count == rowsToAdd); PreparedStatement pStmt = cx.prepareStatement( "select s from #t0016 where i=? and s=?"); // see what happens if neither is set try { ResultSet rs = pStmt.executeQuery(); assertTrue("Failed to throw exception", false); } catch (SQLException e) { assertTrue( (e.getMessage().equals("parameter #1 has not been set") || e.getMessage().equals("parameter #2 has not been set"))); } pStmt.clearParameters(); try { pStmt.setInt(1, 7); pStmt.setString(2, "row7"); pStmt.clearParameters(); ResultSet rs = pStmt.executeQuery(); assertTrue("Failed to throw exception", false); } catch (SQLException e) { assertTrue( (e.getMessage().equals("parameter #1 has not been set") || e.getMessage().equals("parameter #2 has not been set"))); } pStmt.clearParameters(); try { pStmt.setInt(1, 7); ResultSet rs = pStmt.executeQuery(); assertTrue("Failed to throw exception", false); } catch (SQLException e) { assertTrue(e.getMessage().equals("parameter #2 has not been set")); } pStmt.clearParameters(); try { pStmt.setString(2, "row7"); ResultSet rs = pStmt.executeQuery(); assertTrue("Failed to throw exception", false); } catch (SQLException e) { assertTrue(e.getMessage().equals("parameter #1 has not been set")); } }
439 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/439/d9d3f9d24e5fe3f189bd2899a4d10846c0832a3b/TimestampTest.java/buggy/trunk/jtds/src.old/test/freetds/TimestampTest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1842, 4841, 1662, 713, 2313, 1435, 1216, 1185, 202, 95, 202, 202, 1952, 9494, 273, 6742, 5621, 202, 202, 7285, 1388, 2932, 7, 88, 713, 2313, 8863, 202, 202, 3406, 3480, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1842, 4841, 1662, 713, 2313, 1435, 1216, 1185, 202, 95, 202, 202, 1952, 9494, 273, 6742, 5621, 202, 202, 7285, 1388, 2932, 7, 88, 713, 2313, 8863, 202, 202, 3406, 3480, 2...
assertEquals("should get a description even if argument is null", "eq(null)", new IsEqual(null).describeTo(new StringBuffer()).toString()); }
assertEquals("should get a description even if argument is null", "eq(null)", new IsEqual(null).describeTo(new StringBuffer()).toString()); }
public void testReturnsGoodDescriptionIfCreatedWithNullReference() { assertEquals("should get a description even if argument is null", "eq(null)", new IsEqual(null).describeTo(new StringBuffer()).toString()); }
2796 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2796/a917aff361c58c31c5dce12a5e8052df6803dbe1/IsEqualTest.java/buggy/jmock/core/src/test/jmock/core/constraint/IsEqualTest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1842, 1356, 18195, 3291, 2047, 6119, 1190, 2041, 2404, 1435, 288, 202, 202, 11231, 8867, 2932, 13139, 336, 279, 2477, 5456, 309, 1237, 353, 446, 3113, 1082, 2398, 315, 11253,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1356, 18195, 3291, 2047, 6119, 1190, 2041, 2404, 1435, 288, 202, 202, 11231, 8867, 2932, 13139, 336, 279, 2477, 5456, 309, 1237, 353, 446, 3113, 1082, 2398, 315, 11253,...
public void addToOutput(String text, String textType){
public void addToOutput(JComponent component){ boolean shouldScroll = prepareAdding(); boolean wasEditable = outputComponent.isEditable(); outputComponent.setEditable(true); outputComponent.setCaretPosition(outputComponent.getDocument().getLength()); StyledDocument document = outputComponent.getStyledDocument(); outputComponent.insertComponent(component); LayoutManager layout = component.getParent().getLayout(); if (layout instanceof OverlayLayout) ((OverlayLayout)layout).invalidateLayout(component.getParent());
public void addToOutput(String text, String textType){ try{ boolean shouldScroll = prepareAdding(); addToOutputImpl(text, textType); assureScrolling(shouldScroll); } catch (BadLocationException e){ e.printStackTrace(); // Why the heck is this checked? } }
50794 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50794/7ad97f640609065fb4cffaab0b5437105af2ce96/Console.java/buggy/src/free/jin/console/Console.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 9604, 1447, 12, 46, 1841, 1794, 15329, 1250, 1410, 6806, 273, 2911, 13962, 5621, 225, 1250, 1703, 15470, 273, 876, 1841, 18, 291, 15470, 5621, 876, 1841, 18, 542, 15470, 12, 37...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 9604, 1447, 12, 46, 1841, 1794, 15329, 1250, 1410, 6806, 273, 2911, 13962, 5621, 225, 1250, 1703, 15470, 273, 876, 1841, 18, 291, 15470, 5621, 876, 1841, 18, 542, 15470, 12, 37...
return (HeapVertex)_heapVertices.get(v);
return (HeapVertex) _heapVertices.get( v );
private final HeapVertex heapVertex(Object v) { if (v instanceof HeapVertex) { return (HeapVertex)v; } return (HeapVertex)_heapVertices.get(v); }
4188 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4188/f63e1142cae73862c9c4f7b6ce46225b40f3ef86/DijkstraAlgorithm.java/buggy/src/org/_3pq/jgrapht/experimental/alg/DijkstraAlgorithm.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 727, 30241, 6475, 10500, 6475, 12, 921, 331, 13, 288, 3639, 309, 261, 90, 1276, 30241, 6475, 13, 288, 5411, 327, 261, 15648, 6475, 13, 90, 31, 3639, 289, 540, 327, 261, 15648, 647...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 727, 30241, 6475, 10500, 6475, 12, 921, 331, 13, 288, 3639, 309, 261, 90, 1276, 30241, 6475, 13, 288, 5411, 327, 261, 15648, 6475, 13, 90, 31, 3639, 289, 540, 327, 261, 15648, 647...
font=new Font("Helvetica", Font.PLAIN, 12);
myFont=new Font("Helvetica", Font.PLAIN, 12);
public Topology() { addWindowListener(this); //g=getGraphics(); fm=getFontMetrics(new Font("Helvetica", Font.PLAIN, 12)); font=new Font("Helvetica", Font.PLAIN, 12); }
3550 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3550/5ad015d9a78e1da3350d9b398b46b2f5d4508564/Topology.java/clean/src/org/jgroups/demos/Topology.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 19726, 1435, 288, 3639, 527, 3829, 2223, 12, 2211, 1769, 3639, 368, 75, 33, 588, 17558, 5621, 3639, 10940, 33, 588, 5711, 5653, 12, 2704, 10063, 2932, 44, 292, 90, 7943, 69, 3113, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 19726, 1435, 288, 3639, 527, 3829, 2223, 12, 2211, 1769, 3639, 368, 75, 33, 588, 17558, 5621, 3639, 10940, 33, 588, 5711, 5653, 12, 2704, 10063, 2932, 44, 292, 90, 7943, 69, 3113, ...
JavaGenerationParameters params = getJavaGenerationParameters(); Iterator types = api.typeIterator(); while (types.hasNext()) { Type type = (Type) types.next(); if (type instanceof ListType) { String typeName = TypeGenerator.qualifiedClassName(params, type); String emptyName = emptyListVariable(type); println(" private " + typeName + ' ' + emptyName + ";"); } } println(); }
JavaGenerationParameters params = getJavaGenerationParameters(); Iterator types = api.typeIterator(); while (types.hasNext()) { Type type = (Type) types.next(); if (type instanceof ListType) { String typeName = TypeGenerator.qualifiedClassName(params, type); String emptyName = emptyListVariable(type); println(" private " + typeName + ' ' + emptyName + ";"); } } println(); }
private void genFactoryEmptyLists(ADT api) { JavaGenerationParameters params = getJavaGenerationParameters(); Iterator types = api.typeIterator(); while (types.hasNext()) { Type type = (Type) types.next(); if (type instanceof ListType) { String typeName = TypeGenerator.qualifiedClassName(params, type); String emptyName = emptyListVariable(type); println(" private " + typeName + ' ' + emptyName + ";"); } } println(); }
3664 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3664/8a7f5eefd6d08ce575d82dee6d963fc83f20a5c0/FactoryGenerator.java/clean/apigen/apigen/gen/java/FactoryGenerator.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 918, 3157, 1733, 1921, 7432, 12, 1880, 56, 1536, 13, 288, 202, 202, 5852, 13842, 2402, 859, 273, 18911, 13842, 2402, 5621, 202, 202, 3198, 1953, 273, 1536, 18, 723, 3198, 5621,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 918, 3157, 1733, 1921, 7432, 12, 1880, 56, 1536, 13, 288, 202, 202, 5852, 13842, 2402, 859, 273, 18911, 13842, 2402, 5621, 202, 202, 3198, 1953, 273, 1536, 18, 723, 3198, 5621,...
catch (ClassNotFoundException e) { }
public byte[] unprotectHeader(byte[] rawData, MessageAddress source, MessageAddress destination) { SecureMethodParam policy = cps.getReceivePolicy(source.toAddress() +":" +destination.toAddress()); if (policy == null) { throw new RuntimeException("Could not find message policy between " + source.getAddress() + " and " + destination.getAddress()); } ByteArrayInputStream bais = new ByteArrayInputStream(rawData); ProtectedObject po = null; try { ObjectInputStream ois = new ObjectInputStream(bais); po = (ProtectedObject) ois.readObject(); } catch (IOException e) { } catch (ClassNotFoundException e) { } Object o = encryptService.unprotectObject(source, destination, po, policy); return (byte[])o; }
12869 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12869/d293fe3e5ebdb257a29487cc4600f66f408b45f5/MessageProtectionServiceImpl.java/buggy/securityservices/src/org/cougaar/core/security/crypto/MessageProtectionServiceImpl.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 1160, 8526, 640, 11815, 386, 1864, 12, 7229, 8526, 16503, 16, 9506, 202, 1079, 1887, 1084, 16, 9506, 202, 1079, 1887, 2929, 13, 288, 565, 15653, 1305, 786, 3329, 273, 1377, 276, 112...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1160, 8526, 640, 11815, 386, 1864, 12, 7229, 8526, 16503, 16, 9506, 202, 1079, 1887, 1084, 16, 9506, 202, 1079, 1887, 2929, 13, 288, 565, 15653, 1305, 786, 3329, 273, 1377, 276, 112...
AST tmp1244_AST_in = (AST)_t;
AST tmp1248_AST_in = (AST)_t;
public final void displaystate(AST _t) throws RecognitionException { AST displaystate_AST_in = (_t == ASTNULL) ? null : (AST)_t; AST head = null; AST __t688 = _t; head = _t==ASTNULL ? null :(AST)_t; match(_t,DISPLAY); _t = _t.getFirstChild(); if ( inputState.guessing==0 ) { action.frameInitializingStatement(head); } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case STREAM: { stream_name(_t); _t = _retTree; break; } case EOF: case PERIOD: case EXCEPT: case IN_KW: case NOERROR_KW: case UNLESSHIDDEN: case WITH: case Form_item: { break; } default: { throw new NoViableAltException(_t); } } } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case UNLESSHIDDEN: { AST tmp1241_AST_in = (AST)_t; match(_t,UNLESSHIDDEN); _t = _t.getNextSibling(); break; } case EOF: case PERIOD: case EXCEPT: case IN_KW: case NOERROR_KW: case WITH: case Form_item: { break; } default: { throw new NoViableAltException(_t); } } } { _loop692: do { if (_t==null) _t=ASTNULL; if ((_t.getType()==Form_item)) { displaystate_item(_t); _t = _retTree; } else { break _loop692; } } while (true); } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case EXCEPT: { AST __t694 = _t; AST tmp1242_AST_in = (AST)_t; match(_t,EXCEPT); _t = _t.getFirstChild(); { _loop696: do { if (_t==null) _t=ASTNULL; if ((_t.getType()==Field_ref)) { fld1(_t,CQ.SYMBOL); _t = _retTree; } else { break _loop696; } } while (true); } _t = __t694; _t = _t.getNextSibling(); break; } case EOF: case PERIOD: case IN_KW: case NOERROR_KW: case WITH: { break; } default: { throw new NoViableAltException(_t); } } } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case IN_KW: { AST __t698 = _t; AST tmp1243_AST_in = (AST)_t; match(_t,IN_KW); _t = _t.getFirstChild(); AST tmp1244_AST_in = (AST)_t; match(_t,WINDOW); _t = _t.getNextSibling(); expression(_t); _t = _retTree; _t = __t698; _t = _t.getNextSibling(); break; } case EOF: case PERIOD: case NOERROR_KW: case WITH: { break; } default: { throw new NoViableAltException(_t); } } } { _loop700: do { if (_t==null) _t=ASTNULL; if ((_t.getType()==WITH)) { display_with(_t); _t = _retTree; } else { break _loop700; } } while (true); } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case NOERROR_KW: { AST tmp1245_AST_in = (AST)_t; match(_t,NOERROR_KW); _t = _t.getNextSibling(); break; } case EOF: case PERIOD: { break; } default: { throw new NoViableAltException(_t); } } } state_end(_t); _t = _retTree; if ( inputState.guessing==0 ) { action.frameStatementEnd(); } _t = __t688; _t = _t.getNextSibling(); _retTree = _t; }
13952 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13952/daa15e07422d3491bbbb4d0060450c81983332a4/TreeParser01.java/buggy/trunk/org.prorefactor.core/src/org/prorefactor/treeparser01/TreeParser01.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 727, 918, 2562, 2019, 12, 9053, 389, 88, 13, 1216, 9539, 288, 9506, 202, 9053, 2562, 2019, 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, 2562, 2019, 12, 9053, 389, 88, 13, 1216, 9539, 288, 9506, 202, 9053, 2562, 2019, 67, 9053, 67, 267, 273, 261, 67, 88, 422, 9183, 8560, 13, 692, 446, 294, 261, 9053...
if (ps.type == Param.EMPTY_ATTRIBUTE_GROUP) return true;
private boolean isAttributeGroup() { ParamStream ps = new ParamStream(parsed); if (!ps.advance()) return false; if (ps.type == Param.EMPTY_ATTRIBUTE_GROUP) return true; do { if (ps.type != Param.ATTRIBUTE_NAME || !ps.advance() || (ps.type == Param.ATTRIBUTE_TYPE_NOTATION && !ps.advance()) || !ps.advance() || (ps.type == Param.FIXED && !ps.advance())) return false; } while (ps.advance()); return true; }
50651 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50651/2a2aa4d1750fc952ad962a04f113635b3d29b8d2/Entity.java/buggy/dtdinst/src/com/thaiopensource/xml/dtd/Entity.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 3238, 1250, 353, 1499, 1114, 1435, 288, 565, 3014, 1228, 4250, 273, 394, 3014, 1228, 12, 10817, 1769, 565, 309, 16051, 1121, 18, 361, 5882, 10756, 1377, 327, 629, 31, 565, 309, 261, 1121,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1250, 353, 1499, 1114, 1435, 288, 565, 3014, 1228, 4250, 273, 394, 3014, 1228, 12, 10817, 1769, 565, 309, 16051, 1121, 18, 361, 5882, 10756, 1377, 327, 629, 31, 565, 309, 261, 1121,...