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
target.setType( (java.lang.String) value);
target.setTransient( ((Boolean)value).booleanValue());
public void setValue( Object object, Object value) throws IllegalStateException, IllegalArgumentException { try { FieldMapping target = (FieldMapping) object; target.setType( (java.lang.String) value); } catch (Exception ex) { throw new IllegalStateException(ex.toString()); } }
3614 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3614/f21979d3e63f8be8d1ac204f745c2944078dbf5f/FieldMappingDescriptor.java/clean/trunk/castor-2002/castor/src/main/org/exolab/castor/mapping/xml/FieldMappingDescriptor.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 2398, 1071, 918, 5524, 12, 1033, 733, 16, 1033, 460, 13, 1171, 1216, 5477, 16, 2754, 5411, 288, 7734, 775, 288, 10792, 2286, 3233, 1018, 273, 261, 974, 3233, 13, 733, 31, 10792, 1018, 18, 54...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 2398, 1071, 918, 5524, 12, 1033, 733, 16, 1033, 460, 13, 1171, 1216, 5477, 16, 2754, 5411, 288, 7734, 775, 288, 10792, 2286, 3233, 1018, 273, 261, 974, 3233, 13, 733, 31, 10792, 1018, 18, 54...
this.outStream = new BufferedOutputStream(new FileOutputStream(file, append));
this.outStream = new BufferedOutputStream(new FileOutputStream(file.getAbsolutePath(), append));
protected void openInternal(String path, String mode) { this.path = path; setMode(mode); File file = new File(path); try { if (isReadable()) { this.inStream = new RubyInputStream(new BufferedInputStream(new FileInputStream(file))); } if (isWriteable()) { this.outStream = new BufferedOutputStream(new FileOutputStream(file, append)); } } catch (IOException ioExcptn) { throw new IOError(getRuby(), ioExcptn.getMessage()); } }
45827 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45827/263d8797aa5be7bc604097d1d483cf474b827c91/RubyFile.java/buggy/org/jruby/RubyFile.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 918, 1696, 3061, 12, 780, 589, 16, 514, 1965, 13, 288, 3639, 333, 18, 803, 273, 589, 31, 7734, 444, 2309, 12, 3188, 1769, 7734, 1387, 585, 273, 394, 1387, 12, 803, 1769, 7734, 7...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 918, 1696, 3061, 12, 780, 589, 16, 514, 1965, 13, 288, 3639, 333, 18, 803, 273, 589, 31, 7734, 444, 2309, 12, 3188, 1769, 7734, 1387, 585, 273, 394, 1387, 12, 803, 1769, 7734, 7...
throw createSSLException(exc);
public static SSLSocketFactory createSSLSocketFactory(SSLTrustManager[] tm) throws SSLException, SSLNotSupportedException { try { return createJava14SSLSocketFactory(tm); } catch (ClassNotFoundException cnfe) { // try JSSE after try/catch block } catch (NoSuchMethodException nsme) { // try JSSE after try/catch block } catch (InvocationTargetException ite) { // try JSSE after try/catch block } catch (IllegalAccessException eae) { // try JSSE after try/catch block } catch (Exception exc) { throw createSSLException(exc); } SSLNotSupportedException exception = new SSLNotSupportedException( "Neither JSSE nor J2SE >= 1.4 installed"); try { return createJsseSSLSocketFactory(tm); } catch (ClassNotFoundException cnfe) { throw exception; } catch (NoSuchMethodException nsme) { throw exception; } catch (InvocationTargetException ite) { throw exception; } catch (IllegalAccessException eae) { throw exception; } catch (Exception exc) { throw createSSLException(exc); } }
47437 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47437/7d288df826331ee38d037e04a038fabc414be21b/SSLSocketFactoryFactory.java/buggy/src/org/schwering/irc/lib/ssl/SSLSocketFactoryFactory.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 760, 12867, 25831, 1733, 752, 1260, 25831, 1733, 12, 6745, 14146, 1318, 8526, 6118, 13, 225, 202, 15069, 7419, 503, 16, 7419, 25482, 288, 202, 202, 698, 288, 1082, 202, 2463, 75...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 760, 12867, 25831, 1733, 752, 1260, 25831, 1733, 12, 6745, 14146, 1318, 8526, 6118, 13, 225, 202, 15069, 7419, 503, 16, 7419, 25482, 288, 202, 202, 698, 288, 1082, 202, 2463, 75...
((Double) value).doubleValue(), (double) 321.0, (double) 0.005);
((Double) value).doubleValue(), 321.0, 0.005);
public void testGetSimpleDouble() { try { Object value = PropertyUtils.getSimpleProperty(bean, "doubleProperty"); assertNotNull("Got a value", value); assertTrue("Got correct type", (value instanceof Double)); assertEquals("Got correct value", ((Double) value).doubleValue(), (double) 321.0, (double) 0.005); } catch (IllegalAccessException e) { fail("IllegalAccessException"); } catch (IllegalArgumentException e) { fail("IllegalArgumentException"); } catch (InvocationTargetException e) { fail("InvocationTargetException"); } catch (NoSuchMethodException e) { fail("NoSuchMethodException"); } }
54521 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54521/563cb810bc92fd1ec7cc4af1bcde00af99056757/DynaPropertyUtilsTestCase.java/clean/src/test/org/apache/commons/beanutils/DynaPropertyUtilsTestCase.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1842, 967, 5784, 5265, 1435, 288, 3639, 775, 288, 5411, 1033, 460, 273, 10792, 4276, 1989, 18, 588, 5784, 1396, 12, 14496, 16, 18701, 315, 9056, 1396, 8863, 5411, 25395, 2932, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1842, 967, 5784, 5265, 1435, 288, 3639, 775, 288, 5411, 1033, 460, 273, 10792, 4276, 1989, 18, 588, 5784, 1396, 12, 14496, 16, 18701, 315, 9056, 1396, 8863, 5411, 25395, 2932, ...
public void testLessThan() throws Exception { final DeweyDecimal dd1 = new DeweyDecimal( DD1 ); final DeweyDecimal dd2 = new DeweyDecimal( DD2 ); final DeweyDecimal dd3 = new DeweyDecimal( DD3 ); final DeweyDecimal dd4 = new DeweyDecimal( DD4 ); final DeweyDecimal dd5 = new DeweyDecimal( DD5 ); assertTrue( "Bad: " + DD1 + " <= " + DD1, !dd1.isLessThan( dd1 ) ); assertTrue( "Bad: " + DD1 + " <= " + DD2, dd1.isLessThan( dd2 ) ); assertTrue( "Bad: " + DD1 + " <= " + DD3, dd1.isLessThan( dd3 ) ); assertTrue( "Bad: " + DD1 + " >= " + DD4, !dd1.isLessThan( dd4 ) ); assertTrue( "Bad: " + DD1 + " <= " + DD5, dd1.isLessThan( dd5 ) ); assertTrue( "Bad: " + DD2 + " >= " + DD1, !dd2.isLessThan( dd1 ) ); assertTrue( "Bad: " + DD2 + " <= " + DD2, !dd2.isLessThan( dd2 ) ); assertTrue( "Bad: " + DD2 + " <= " + DD3, dd2.isLessThan( dd3 ) ); assertTrue( "Bad: " + DD2 + " >= " + DD4, !dd2.isLessThan( dd4 ) ); assertTrue( "Bad: " + DD2 + " <= " + DD5, dd2.isLessThan( dd5 ) ); assertTrue( "Bad: " + DD3 + " >= " + DD1, !dd3.isLessThan( dd1 ) ); assertTrue( "Bad: " + DD3 + " >= " + DD2, !dd3.isLessThan( dd2 ) ); assertTrue( "Bad: " + DD3 + " <= " + DD3, !dd3.isLessThan( dd3 ) ); assertTrue( "Bad: " + DD3 + " >= " + DD4, !dd3.isLessThan( dd4 ) ); assertTrue( "Bad: " + DD3 + " <= " + DD5, dd3.isLessThan( dd5 ) ); assertTrue( "Bad: " + DD4 + " <= " + DD1, dd4.isLessThan( dd1 ) ); assertTrue( "Bad: " + DD4 + " <= " + DD2, dd4.isLessThan( dd2 ) ); assertTrue( "Bad: " + DD4 + " <= " + DD3, dd4.isLessThan( dd3 ) ); assertTrue( "Bad: " + DD4 + " <= " + DD4, !dd4.isLessThan( dd4 ) ); assertTrue( "Bad: " + DD4 + " <= " + DD5, dd4.isLessThan( dd5 ) ); assertTrue( "Bad: " + DD5 + " >= " + DD1, !dd5.isLessThan( dd1 ) ); assertTrue( "Bad: " + DD5 + " >= " + DD2, !dd5.isLessThan( dd2 ) ); assertTrue( "Bad: " + DD5 + " >= " + DD3, !dd5.isLessThan( dd3 ) ); assertTrue( "Bad: " + DD5 + " >= " + DD4, !dd5.isLessThan( dd4 ) ); assertTrue( "Bad: " + DD5 + " <= " + DD5, !dd5.isLessThan( dd5 ) ); }
2044 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2044/e622ff134f94da7c133006a05d0aab68115a1013/DeweyDecimalTestCase.java/buggy/loom/support/extension/src/test/org/realityforge/extension/DeweyDecimalTestCase.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1071, 6459, 3813, 30899, 1435, 15069, 503, 95, 6385, 40, 359, 402, 5749, 449, 21, 33, 2704, 40, 359, 402, 5749, 12, 5698, 21, 1769, 6385, 40, 359, 402, 5749, 449, 22, 33, 2704, 40, 359, 40...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1071, 6459, 3813, 30899, 1435, 15069, 503, 95, 6385, 40, 359, 402, 5749, 449, 21, 33, 2704, 40, 359, 402, 5749, 12, 5698, 21, 1769, 6385, 40, 359, 402, 5749, 449, 22, 33, 2704, 40, 359, 40...
case Icode_NAME_FAST_THIS :
case Icode_NAME_FAST_THIS :
static Object interpret(Context cx, Scriptable scope, Scriptable thisObj, Object[] args, double[] argsDbl, int argShift, int argCount, NativeFunction fnOrScript, InterpreterData idata) throws JavaScriptException { if (cx.interpreterSecurityDomain != idata.securityDomain) { if (argsDbl != null) { args = getArgsArray(args, argsDbl, argShift, argCount); } SecurityController sc = idata.securityController; Object savedDomain = cx.interpreterSecurityDomain; cx.interpreterSecurityDomain = idata.securityDomain; try { return sc.callWithDomain(idata.securityDomain, cx, fnOrScript, scope, thisObj, args); } finally { cx.interpreterSecurityDomain = savedDomain; } } final Object DBL_MRK = Interpreter.DBL_MRK; final Scriptable undefined = Undefined.instance; final int VAR_SHFT = 0; final int maxVars = idata.itsMaxVars; final int LOCAL_SHFT = VAR_SHFT + maxVars; final int STACK_SHFT = LOCAL_SHFT + idata.itsMaxLocals;// stack[VAR_SHFT <= i < LOCAL_SHFT]: variables// stack[LOCAL_SHFT <= i < TRY_STACK_SHFT]: used for newtemp/usetemp// stack[STACK_SHFT <= i < STACK_SHFT + idata.itsMaxStack]: stack data// sDbl[i]: if stack[i] is DBL_MRK, sDbl[i] holds the number value int maxFrameArray = idata.itsMaxFrameArray; if (maxFrameArray != STACK_SHFT + idata.itsMaxStack) Kit.codeBug(); Object[] stack = new Object[maxFrameArray]; double[] sDbl = new double[maxFrameArray]; int stackTop = STACK_SHFT - 1; int withDepth = 0; int definedArgs = fnOrScript.argCount; if (definedArgs > argCount) { definedArgs = argCount; } for (int i = 0; i != definedArgs; ++i) { Object arg = args[argShift + i]; stack[VAR_SHFT + i] = arg; if (arg == DBL_MRK) { sDbl[VAR_SHFT + i] = argsDbl[argShift + i]; } } for (int i = definedArgs; i != maxVars; ++i) { stack[VAR_SHFT + i] = undefined; } DebugFrame debuggerFrame = null; if (cx.debugger != null) { debuggerFrame = cx.debugger.getFrame(cx, idata); } if (idata.itsFunctionType != 0) { InterpretedFunction f = (InterpretedFunction)fnOrScript; if (!idata.useDynamicScope) { scope = fnOrScript.getParentScope(); } if (idata.itsCheckThis) { thisObj = ScriptRuntime.getThis(thisObj); } if (idata.itsNeedsActivation) { if (argsDbl != null) { args = getArgsArray(args, argsDbl, argShift, argCount); argShift = 0; argsDbl = null; } scope = ScriptRuntime.initVarObj(cx, scope, fnOrScript, thisObj, args); } } else { ScriptRuntime.initScript(cx, scope, fnOrScript, thisObj, idata.itsFromEvalCode); } if (idata.itsNestedFunctions != null) { if (idata.itsFunctionType != 0 && !idata.itsNeedsActivation) Kit.codeBug(); for (int i = 0; i < idata.itsNestedFunctions.length; i++) { InterpreterData fdata = idata.itsNestedFunctions[i]; if (fdata.itsFunctionType == FunctionNode.FUNCTION_STATEMENT) { createFunction(cx, scope, fdata, idata.itsFromEvalCode); } } } // Wrapped regexps for functions are stored in InterpretedFunction // but for script which should not contain references to scope // the regexps re-wrapped during each script execution Scriptable[] scriptRegExps = null; boolean useActivationVars = false; if (debuggerFrame != null) { if (argsDbl != null) { args = getArgsArray(args, argsDbl, argShift, argCount); argShift = 0; argsDbl = null; } if (idata.itsFunctionType != 0 && !idata.itsNeedsActivation) { useActivationVars = true; scope = ScriptRuntime.initVarObj(cx, scope, fnOrScript, thisObj, args); } debuggerFrame.onEnter(cx, scope, thisObj, args); } InterpreterData savedData = cx.interpreterData; cx.interpreterData = idata; Object result = undefined; // If javaException != null on exit, it will be throw instead of // normal return Throwable javaException = null; int exceptionPC = -1; byte[] iCode = idata.itsICode; int pc = 0; int pcPrevBranch = 0; final int instructionThreshold = cx.instructionThreshold; // During function call this will be set to -1 so catch can properly // adjust it int instructionCount = cx.instructionCount; // arbitrary number to add to instructionCount when calling // other functions final int INVOCATION_COST = 100; String[] strings = idata.itsStringTable; String stringReg = null; int indexReg = 0; Loop: for (;;) { int pcJump; try { int op = 0xFF & iCode[pc++]; switch (op) { // Back indent to ease imlementation reading case Icode_CATCH: { // The following code should be executed inside try/catch inside main // loop, not in the loop catch block itself to deal with exceptions // from observeInstructionCount. A special bytecode is used only to // simplify logic. if (javaException == null) Kit.codeBug(); pcJump = -1; boolean doCatch = false; int handlerOffset = getExceptionHandler(idata.itsExceptionTable, exceptionPC); if (handlerOffset >= 0) { final int SCRIPT_CAN_CATCH = 0, ONLY_FINALLY = 1, OTHER = 2; int exType; if (javaException instanceof JavaScriptException) { exType = SCRIPT_CAN_CATCH; } else if (javaException instanceof EcmaError) { // an offical ECMA error object, exType = SCRIPT_CAN_CATCH; } else if (javaException instanceof EvaluatorException) { exType = SCRIPT_CAN_CATCH; } else if (javaException instanceof RuntimeException) { exType = ONLY_FINALLY; } else { // Error instance exType = OTHER; } if (exType != OTHER) { // Do not allow for JS to interfere with Error instances // (exType == OTHER), as they can be used to terminate // long running script if (exType == SCRIPT_CAN_CATCH) { // Allow JS to catch only JavaScriptException and // EcmaError pcJump = idata.itsExceptionTable[handlerOffset + EXCEPTION_CATCH_SLOT]; if (pcJump >= 0) { // Has catch block doCatch = true; } } if (pcJump < 0) { pcJump = idata.itsExceptionTable[handlerOffset + EXCEPTION_FINALLY_SLOT]; } } } if (debuggerFrame != null && !(javaException instanceof Error)) { debuggerFrame.onExceptionThrown(cx, javaException); } if (pcJump < 0) { break Loop; } // We caught an exception // restore scope at try point int tryWithDepth = idata.itsExceptionTable[ handlerOffset + EXCEPTION_WITH_DEPTH_SLOT]; while (tryWithDepth != withDepth) { if (scope == null) Kit.codeBug(); scope = ScriptRuntime.leaveWith(scope); --withDepth; } if (doCatch) { stackTop = STACK_SHFT - 1; int exLocal = idata.itsExceptionTable[ handlerOffset + EXCEPTION_LOCAL_SLOT]; stack[LOCAL_SHFT + exLocal] = ScriptRuntime.getCatchObject( cx, scope, javaException); } else { stackTop = STACK_SHFT; // Call finally handler with javaException on stack top to // distinguish from normal invocation through GOSUB // which would contain DBL_MRK on the stack stack[stackTop] = javaException; } // clear exception javaException = null; // go to generic jump code break; } case Token.THROW: { Object value = stack[stackTop]; if (value == DBL_MRK) value = doubleWrap(sDbl[stackTop]); --stackTop; int sourceLine = getShort(iCode, pc); throw new JavaScriptException(value, idata.itsSourceFile, sourceLine); } case Token.GE : { --stackTop; Object rhs = stack[stackTop + 1]; Object lhs = stack[stackTop]; boolean valBln; if (rhs == DBL_MRK || lhs == DBL_MRK) { double rDbl = stack_double(stack, sDbl, stackTop + 1); double lDbl = stack_double(stack, sDbl, stackTop); valBln = (rDbl <= lDbl); } else { valBln = ScriptRuntime.cmp_LE(rhs, lhs); } stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; continue Loop; } case Token.LE : { --stackTop; Object rhs = stack[stackTop + 1]; Object lhs = stack[stackTop]; boolean valBln; if (rhs == DBL_MRK || lhs == DBL_MRK) { double rDbl = stack_double(stack, sDbl, stackTop + 1); double lDbl = stack_double(stack, sDbl, stackTop); valBln = (lDbl <= rDbl); } else { valBln = ScriptRuntime.cmp_LE(lhs, rhs); } stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; continue Loop; } case Token.GT : { --stackTop; Object rhs = stack[stackTop + 1]; Object lhs = stack[stackTop]; boolean valBln; if (rhs == DBL_MRK || lhs == DBL_MRK) { double rDbl = stack_double(stack, sDbl, stackTop + 1); double lDbl = stack_double(stack, sDbl, stackTop); valBln = (rDbl < lDbl); } else { valBln = ScriptRuntime.cmp_LT(rhs, lhs); } stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; continue Loop; } case Token.LT : { --stackTop; Object rhs = stack[stackTop + 1]; Object lhs = stack[stackTop]; boolean valBln; if (rhs == DBL_MRK || lhs == DBL_MRK) { double rDbl = stack_double(stack, sDbl, stackTop + 1); double lDbl = stack_double(stack, sDbl, stackTop); valBln = (lDbl < rDbl); } else { valBln = ScriptRuntime.cmp_LT(lhs, rhs); } stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; continue Loop; } case Token.IN : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); boolean valBln = ScriptRuntime.in(lhs, rhs, scope); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; continue Loop; } case Token.INSTANCEOF : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); boolean valBln = ScriptRuntime.instanceOf(lhs, rhs, scope); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; continue Loop; } case Token.EQ : { --stackTop; boolean valBln = do_eq(stack, sDbl, stackTop); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; continue Loop; } case Token.NE : { --stackTop; boolean valBln = !do_eq(stack, sDbl, stackTop); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; continue Loop; } case Token.SHEQ : { --stackTop; boolean valBln = do_sheq(stack, sDbl, stackTop); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; continue Loop; } case Token.SHNE : { --stackTop; boolean valBln = !do_sheq(stack, sDbl, stackTop); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; continue Loop; } case Token.IFNE : { boolean valBln = stack_boolean(stack, sDbl, stackTop); --stackTop; if (valBln) { pc += 2; continue Loop; } pcJump = getTarget(iCode, pc); break; } case Token.IFEQ : { boolean valBln = stack_boolean(stack, sDbl, stackTop); --stackTop; if (!valBln) { pc += 2; continue Loop; } pcJump = getTarget(iCode, pc); break; } case Icode_IFEQ_POP : { boolean valBln = stack_boolean(stack, sDbl, stackTop); --stackTop; if (!valBln) { pc += 2; continue Loop; } stack[stackTop] = null; --stackTop; pcJump = getTarget(iCode, pc); break; } case Token.GOTO : pcJump = getTarget(iCode, pc); break; case Icode_GOSUB : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = pc + 2; pcJump = getTarget(iCode, pc); break; case Icode_RETSUB : { int slot = (iCode[pc] & 0xFF); Object value = stack[LOCAL_SHFT + slot]; if (value != DBL_MRK) { // Invocation from exception handler, restore object to rethrow javaException = (Throwable)value; exceptionPC = pc - 1; pcJump = getJavaCatchPC(iCode); } else { // Normal return from GOSUB pcJump = (int)sDbl[LOCAL_SHFT + slot]; } break; } case Token.POP : stack[stackTop] = null; stackTop--; continue Loop; case Icode_DUP : stack[stackTop + 1] = stack[stackTop]; sDbl[stackTop + 1] = sDbl[stackTop]; stackTop++; continue Loop; case Icode_DUPSECOND : { stack[stackTop + 1] = stack[stackTop - 1]; sDbl[stackTop + 1] = sDbl[stackTop - 1]; stackTop++; continue Loop; } case Icode_SWAP : { Object o = stack[stackTop]; stack[stackTop] = stack[stackTop - 1]; stack[stackTop - 1] = o; double d = sDbl[stackTop]; sDbl[stackTop] = sDbl[stackTop - 1]; sDbl[stackTop - 1] = d; continue Loop; } case Token.POPV : result = stack[stackTop]; if (result == DBL_MRK) result = doubleWrap(sDbl[stackTop]); stack[stackTop] = null; --stackTop; continue Loop; case Token.RETURN : result = stack[stackTop]; if (result == DBL_MRK) result = doubleWrap(sDbl[stackTop]); --stackTop; break Loop; case Token.RETURN_POPV : break Loop; case Icode_RETUNDEF : result = undefined; break Loop; case Token.BITNOT : { int rIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = ~rIntValue; continue Loop; } case Token.BITAND : { int rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; int lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue & rIntValue; continue Loop; } case Token.BITOR : { int rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; int lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue | rIntValue; continue Loop; } case Token.BITXOR : { int rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; int lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue ^ rIntValue; continue Loop; } case Token.LSH : { int rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; int lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue << rIntValue; continue Loop; } case Token.RSH : { int rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; int lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue >> rIntValue; continue Loop; } case Token.URSH : { int rIntValue = stack_int32(stack, sDbl, stackTop) & 0x1F; --stackTop; double lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = ScriptRuntime.toUint32(lDbl) >>> rIntValue; continue Loop; } case Token.ADD : --stackTop; do_add(stack, sDbl, stackTop); continue Loop; case Token.SUB : { double rDbl = stack_double(stack, sDbl, stackTop); --stackTop; double lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lDbl - rDbl; continue Loop; } case Token.NEG : { double rDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = -rDbl; continue Loop; } case Token.POS : { double rDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = rDbl; continue Loop; } case Token.MUL : { double rDbl = stack_double(stack, sDbl, stackTop); --stackTop; double lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lDbl * rDbl; continue Loop; } case Token.DIV : { double rDbl = stack_double(stack, sDbl, stackTop); --stackTop; double lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; // Detect the divide by zero or let Java do it ? sDbl[stackTop] = lDbl / rDbl; continue Loop; } case Token.MOD : { double rDbl = stack_double(stack, sDbl, stackTop); --stackTop; double lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lDbl % rDbl; continue Loop; } case Token.NOT : { stack[stackTop] = stack_boolean(stack, sDbl, stackTop) ? Boolean.FALSE : Boolean.TRUE; continue Loop; } case Icode_REG_STR1: stringReg = strings[0xFF & iCode[pc]]; ++pc; continue Loop; case Icode_REG_STR2: stringReg = strings[getIndex(iCode, pc)]; pc += 2; continue Loop; case Icode_REG_STR4: stringReg = strings[getInt(iCode, pc)]; pc += 4; continue Loop; case Icode_REG_IND1: indexReg = 0xFF & iCode[pc]; ++pc; continue Loop; case Icode_REG_IND2: indexReg = getIndex(iCode, pc); pc += 2; continue Loop; case Icode_REG_IND4: indexReg = getInt(iCode, pc); pc += 4; continue Loop; case Token.BINDNAME : stack[++stackTop] = ScriptRuntime.bind(scope, stringReg); continue Loop; case Token.SETNAME : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Scriptable lhs = (Scriptable)stack[stackTop]; stack[stackTop] = ScriptRuntime.setName(lhs, rhs, scope, stringReg); continue Loop; } case Token.DELPROP : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.delete(cx, scope, lhs, rhs); continue Loop; } case Token.GETPROP : { String name = (String)stack[stackTop]; --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.getProp(lhs, name, scope); continue Loop; } case Token.SETPROP : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; String name = (String)stack[stackTop]; --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.setProp(lhs, name, rhs, scope); continue Loop; } case Token.GETELEM : do_getElem(cx, stack, sDbl, stackTop, scope); --stackTop; continue Loop; case Token.SETELEM : do_setElem(cx, stack, sDbl, stackTop, scope); stackTop -= 2; continue Loop; case Icode_PROPINC : case Icode_PROPDEC : { String name = (String)stack[stackTop]; --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.postIncrDecr(lhs, name, scope, op == Icode_PROPINC); continue Loop; } case Icode_ELEMINC : case Icode_ELEMDEC : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.postIncrDecrElem(lhs, rhs, scope, op == Icode_ELEMINC); continue Loop; } case Token.LOCAL_SAVE : { int slot = (iCode[pc] & 0xFF); stack[LOCAL_SHFT + slot] = stack[stackTop]; sDbl[LOCAL_SHFT + slot] = sDbl[stackTop]; --stackTop; ++pc; continue Loop; } case Token.LOCAL_LOAD : { int slot = (iCode[pc] & 0xFF); ++stackTop; stack[stackTop] = stack[LOCAL_SHFT + slot]; sDbl[stackTop] = sDbl[LOCAL_SHFT + slot]; ++pc; continue Loop; } case Icode_CALLSPECIAL : { if (instructionThreshold != 0) { instructionCount += INVOCATION_COST; cx.instructionCount = instructionCount; instructionCount = -1; } // indexReg: number of arguments int callType = iCode[pc] & 0xFF; boolean isNew = (iCode[pc + 1] != 0); int sourceLine = getShort(iCode, pc + 2); stackTop -= indexReg; Object[] outArgs = getArgsArray(stack, sDbl, stackTop + 1, indexReg); Object functionThis; if (isNew) { functionThis = null; } else { functionThis = stack[stackTop]; if (functionThis == DBL_MRK) { functionThis = doubleWrap(sDbl[stackTop]); } --stackTop; } Object function = stack[stackTop]; if (function == DBL_MRK) function = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.callSpecial( cx, function, isNew, functionThis, outArgs, scope, thisObj, callType, idata.itsSourceFile, sourceLine); instructionCount = cx.instructionCount; pc += 4; continue Loop; } case Token.CALL : { if (instructionThreshold != 0) { instructionCount += INVOCATION_COST; cx.instructionCount = instructionCount; instructionCount = -1; } // indexReg: number of arguments stackTop -= indexReg; int calleeArgShft = stackTop + 1; Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; Scriptable calleeScope = scope; if (idata.itsNeedsActivation) { calleeScope = ScriptableObject.getTopLevelScope(scope); } Scriptable calleeThis; if (rhs instanceof Scriptable || rhs == null) { calleeThis = (Scriptable)rhs; } else { calleeThis = ScriptRuntime.toObject(cx, calleeScope, rhs); } if (lhs instanceof InterpretedFunction) { // Inlining of InterpretedFunction.call not to create // argument array InterpretedFunction f = (InterpretedFunction)lhs; stack[stackTop] = interpret(cx, calleeScope, calleeThis, stack, sDbl, calleeArgShft, indexReg, f, f.itsData); } else if (lhs instanceof Function) { Function f = (Function)lhs; Object[] outArgs = getArgsArray(stack, sDbl, calleeArgShft, indexReg); stack[stackTop] = f.call(cx, calleeScope, calleeThis, outArgs); } else { if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); else if (lhs == undefined) { // special code for better error message for call // to undefined lhs = stringReg; } throw ScriptRuntime.typeError1("msg.isnt.function", ScriptRuntime.toString(lhs)); } instructionCount = cx.instructionCount; continue Loop; } case Token.NEW : { if (instructionThreshold != 0) { instructionCount += INVOCATION_COST; cx.instructionCount = instructionCount; instructionCount = -1; } // indexReg: number of arguments stackTop -= indexReg; int calleeArgShft = stackTop + 1; Object lhs = stack[stackTop]; if (lhs instanceof InterpretedFunction) { // Inlining of InterpretedFunction.construct not to create // argument array InterpretedFunction f = (InterpretedFunction)lhs; Scriptable newInstance = f.createObject(cx, scope); Object callResult = interpret(cx, scope, newInstance, stack, sDbl, calleeArgShft, indexReg, f, f.itsData); if (callResult instanceof Scriptable && callResult != undefined) { stack[stackTop] = callResult; } else { stack[stackTop] = newInstance; } } else if (lhs instanceof Function) { Function f = (Function)lhs; Object[] outArgs = getArgsArray(stack, sDbl, calleeArgShft, indexReg); stack[stackTop] = f.construct(cx, scope, outArgs); } else { if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); else if (lhs == undefined) { // special code for better error message for call // to undefined lhs = stringReg; } throw ScriptRuntime.typeError1("msg.isnt.function", ScriptRuntime.toString(lhs)); } instructionCount = cx.instructionCount; continue Loop; } case Token.TYPEOF : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.typeof(lhs); continue Loop; } case Icode_TYPEOFNAME : stack[++stackTop] = ScriptRuntime.typeofName(scope, stringReg); continue Loop; case Icode_NAME_FAST_THIS : case Icode_NAME_SLOW_THIS : stackTop = do_nameAndThis(stack, stackTop, scope, stringReg, op); continue Loop; case Token.STRING : stack[++stackTop] = stringReg; continue Loop; case Icode_SHORTNUMBER : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = getShort(iCode, pc); pc += 2; continue Loop; case Icode_INTNUMBER : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = getInt(iCode, pc); pc += 4; continue Loop; case Token.NUMBER : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = idata.itsDoubleTable[indexReg]; continue Loop; case Token.NAME : stack[++stackTop] = ScriptRuntime.name(scope, stringReg); continue Loop; case Icode_NAMEINC : case Icode_NAMEDEC : stack[++stackTop] = ScriptRuntime.postIncrDecr(scope, stringReg, op == Icode_NAMEINC); continue Loop; case Token.SETVAR : { int slot = (iCode[pc] & 0xFF); if (!useActivationVars) { stack[VAR_SHFT + slot] = stack[stackTop]; sDbl[VAR_SHFT + slot] = sDbl[stackTop]; } else { Object val = stack[stackTop]; if (val == DBL_MRK) val = doubleWrap(sDbl[stackTop]); activationPut(fnOrScript, scope, slot, val); } ++pc; continue Loop; } case Token.GETVAR : { int slot = (iCode[pc] & 0xFF); ++stackTop; if (!useActivationVars) { stack[stackTop] = stack[VAR_SHFT + slot]; sDbl[stackTop] = sDbl[VAR_SHFT + slot]; } else { stack[stackTop] = activationGet(fnOrScript, scope, slot); } ++pc; continue Loop; } case Icode_VARINC : case Icode_VARDEC : { int slot = (iCode[pc] & 0xFF); ++stackTop; if (!useActivationVars) { Object val = stack[VAR_SHFT + slot]; stack[stackTop] = val; double d; if (val == DBL_MRK) { d = sDbl[VAR_SHFT + slot]; sDbl[stackTop] = d; } else { d = ScriptRuntime.toNumber(val); } stack[VAR_SHFT + slot] = DBL_MRK; sDbl[VAR_SHFT + slot] = (op == Icode_VARINC) ? d + 1.0 : d - 1.0; } else { Object val = activationGet(fnOrScript, scope, slot); stack[stackTop] = val; double d = ScriptRuntime.toNumber(val); val = doubleWrap((op == Icode_VARINC) ? d + 1.0 : d - 1.0); activationPut(fnOrScript, scope, slot, val); } ++pc; continue Loop; } case Token.ZERO : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = 0; continue Loop; case Token.ONE : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = 1; continue Loop; case Token.NULL : stack[++stackTop] = null; continue Loop; case Token.THIS : stack[++stackTop] = thisObj; continue Loop; case Token.THISFN : stack[++stackTop] = fnOrScript; continue Loop; case Token.FALSE : stack[++stackTop] = Boolean.FALSE; continue Loop; case Token.TRUE : stack[++stackTop] = Boolean.TRUE; continue Loop; case Token.UNDEFINED : stack[++stackTop] = Undefined.instance; continue Loop; case Token.ENTERWITH : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); --stackTop; scope = ScriptRuntime.enterWith(lhs, scope); ++withDepth; continue Loop; } case Token.LEAVEWITH : scope = ScriptRuntime.leaveWith(scope); --withDepth; continue Loop; case Token.CATCH_SCOPE : stack[stackTop] = ScriptRuntime.newCatchScope(stringReg, stack[stackTop]); continue Loop; case Token.ENUM_INIT : { int slot = (iCode[pc] & 0xFF); Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); --stackTop; stack[LOCAL_SHFT + slot] = ScriptRuntime.enumInit(lhs, scope); ++pc; continue Loop; } case Token.ENUM_NEXT : case Token.ENUM_ID : { int slot = (iCode[pc] & 0xFF); Object val = stack[LOCAL_SHFT + slot]; ++stackTop; stack[stackTop] = (op == Token.ENUM_NEXT) ? (Object)ScriptRuntime.enumNext(val) : (Object)ScriptRuntime.enumId(val); ++pc; continue Loop; } case Icode_PUSH_PARENT : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[++stackTop] = ScriptRuntime.getParent(lhs); continue Loop; } case Icode_GETPROTO : case Icode_GETSCOPEPARENT : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); Object val; if (op == Icode_GETPROTO) { val = ScriptRuntime.getProto(lhs, scope); } else { val = ScriptRuntime.getParent(lhs, scope); } stack[stackTop] = val; continue Loop; } case Icode_SETPROTO : case Icode_SETPARENT : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); Object val; if (op == Icode_SETPROTO) { val = ScriptRuntime.setProto(lhs, rhs, scope); } else { val = ScriptRuntime.setParent(lhs, rhs, scope); } stack[stackTop] = val; continue Loop; } case Icode_SCOPE : stack[++stackTop] = scope; continue Loop; case Icode_CLOSURE : { InterpreterData closureData = idata.itsNestedFunctions[indexReg]; stack[++stackTop] = createFunction(cx, scope, closureData, idata.itsFromEvalCode); continue Loop; } case Token.REGEXP : { Scriptable regexp; if (idata.itsFunctionType != 0) { regexp = ((InterpretedFunction)fnOrScript).itsRegExps[indexReg]; } else { if (scriptRegExps == null) { scriptRegExps = wrapRegExps(cx, scope, idata); } regexp = scriptRegExps[indexReg]; } stack[++stackTop] = regexp; continue Loop; } case Icode_LITERAL_NEW : // indexReg: number of values in the literal ++stackTop; stack[stackTop] = new Object[indexReg]; sDbl[stackTop] = 0; continue Loop; case Icode_LITERAL_SET : { Object value = stack[stackTop]; if (value == DBL_MRK) value = doubleWrap(sDbl[stackTop]); --stackTop; int i = (int)sDbl[stackTop]; ((Object[])stack[stackTop])[i] = value; sDbl[stackTop] = i + 1; continue Loop; } case Token.ARRAYLIT : case Icode_SPARE_ARRAYLIT : case Token.OBJECTLIT : { Object[] data = (Object[])stack[stackTop]; Object val; if (op == Token.OBJECTLIT) { Object[] ids = (Object[])idata.literalIds[indexReg]; val = ScriptRuntime.newObjectLiteral(ids, data, cx, scope); } else { int[] skipIndexces = null; if (op == Icode_SPARE_ARRAYLIT) { skipIndexces = (int[])idata.literalIds[indexReg]; } val = ScriptRuntime.newArrayLiteral(data, skipIndexces, cx, scope); } stack[stackTop] = val; continue Loop; } case Icode_LINE : { cx.interpreterLineIndex = pc; if (debuggerFrame != null) { int line = getShort(iCode, pc); debuggerFrame.onLineChange(cx, line); } pc += 2; continue Loop; } default : { dumpICode(idata); throw new RuntimeException("Unknown icode : "+op+" @ pc : "+(pc-1)); } } // end of interpreter switch // This should be reachable only for jump implementation if (instructionThreshold != 0) { instructionCount += pc - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } pcPrevBranch = pcJump; } pc = pcJump; continue Loop; } // end of interpreter try catch (Throwable ex) { pcJump = getJavaCatchPC(iCode); if (instructionThreshold != 0) { if (instructionCount < 0) { // throw during function call instructionCount = cx.instructionCount; } else { // throw during any other operation instructionCount += pc - pcPrevBranch; cx.instructionCount = instructionCount; } pcPrevBranch = pcJump; } javaException = ex; exceptionPC = pc - 1; pc = pcJump; continue Loop; } } // end of interpreter loop cx.interpreterData = savedData; if (debuggerFrame != null) { if (javaException != null) { debuggerFrame.onExit(cx, true, javaException); } else { debuggerFrame.onExit(cx, false, result); } } if (idata.itsNeedsActivation || debuggerFrame != null) { ScriptRuntime.popActivation(cx); } if (instructionThreshold != 0) { if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } cx.instructionCount = instructionCount; } if (javaException != null) { if (javaException instanceof JavaScriptException) { throw (JavaScriptException)javaException; } else if (javaException instanceof RuntimeException) { throw (RuntimeException)javaException; } else { // Must be instance of Error or code bug throw (Error)javaException; } } return result; }
47609 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47609/5b81311a845598f1a18a6f94fb54470e92728630/Interpreter.java/clean/js/rhino/src/org/mozilla/javascript/Interpreter.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 760, 1033, 10634, 12, 1042, 9494, 16, 22780, 2146, 16, 22780, 15261, 16, 18701, 1033, 8526, 833, 16, 1645, 8526, 833, 40, 3083, 16, 18701, 509, 1501, 10544, 16, 509, 1501, 1380, 16, 18701...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 760, 1033, 10634, 12, 1042, 9494, 16, 22780, 2146, 16, 22780, 15261, 16, 18701, 1033, 8526, 833, 16, 1645, 8526, 833, 40, 3083, 16, 18701, 509, 1501, 10544, 16, 509, 1501, 1380, 16, 18701...
if (vars.get(name) != null) {
if (vars.getVariable(name) != null) {
public Node transform(Node tree, Node enclosing, TokenStream ts, Scriptable scope) { loops = new Stack(); loopEnds = new Stack(); inFunction = tree.getType() == TokenStream.FUNCTION; if (!inFunction) { addVariables(tree, getVariableTable(tree)); } irFactory = createIRFactory(ts, scope); // to save against upchecks if no finally blocks are used. boolean hasFinally = false; PreorderNodeIterator iterator = tree.getPreorderIterator(); Node node; while ((node = iterator.nextNode()) != null) { int type = node.getType(); typeswitch: switch (type) { case TokenStream.FUNCTION: if (node == tree) { // Add the variables to variable table, the // parameters were added earlier. VariableTable vars = getVariableTable(tree); addVariables(tree, vars); // Add return to end if needed. Node stmts = node.getLastChild(); Node lastStmt = stmts.getLastChild(); if (lastStmt == null || lastStmt.getType() != TokenStream.RETURN) { stmts.addChildToBack(new Node(TokenStream.RETURN)); } } else { if (inFunction) { // Nested functions require activation objects. ((FunctionNode) tree).setRequiresActivation(true); } FunctionNode fnNode = (FunctionNode) node.getProp(Node.FUNCTION_PROP); addParameters(fnNode); NodeTransformer inner = newInstance(); fnNode = (FunctionNode) inner.transform(fnNode, tree, ts, scope); node.putProp(Node.FUNCTION_PROP, fnNode); Vector fns = (Vector) tree.getProp(Node.FUNCTION_PROP); if (fns == null) { fns = new Vector(7); tree.putProp(Node.FUNCTION_PROP, fns); } fns.addElement(fnNode); } break; case TokenStream.LABEL: { Node child = node.getFirstChild(); node.removeChild(child); String id = child.getString(); // check against duplicate labels... for (int i=loops.size()-1; i >= 0; i--) { Node n = (Node) loops.elementAt(i); if (n.getType() == TokenStream.LABEL) { String otherId = (String)n.getProp(Node.LABEL_PROP); if (id.equals(otherId)) { Object[] errArgs = { id }; String message = Context.getMessage("msg.dup.label", errArgs); reportMessage(Context.getContext(), message, node, tree, true, scope); break typeswitch; } } } node.putProp(Node.LABEL_PROP, id); /* Make a target and put it _after_ the following * node. And in the LABEL node, so breaks get the * right target. */ Node breakTarget = new Node(TokenStream.TARGET); Node parent = iterator.getCurrentParent(); Node next = node.getNextSibling(); while (next != null && (next.getType() == TokenStream.LABEL || next.getType() == TokenStream.TARGET)) next = next.getNextSibling(); if (next == null) break; parent.addChildAfter(breakTarget, next); node.putProp(Node.BREAK_PROP, breakTarget); if (next.getType() == TokenStream.LOOP) { node.putProp(Node.CONTINUE_PROP, next.getProp(Node.CONTINUE_PROP)); } loops.push(node); loopEnds.push(breakTarget); break; } case TokenStream.SWITCH: { Node breakTarget = new Node(TokenStream.TARGET); Node parent = iterator.getCurrentParent(); parent.addChildAfter(breakTarget, node); // make all children siblings except for selector Node sib = node; Node child = node.getFirstChild().next; while (child != null) { Node next = child.next; node.removeChild(child); parent.addChildAfter(child, sib); sib = child; child = next; } node.putProp(Node.BREAK_PROP, breakTarget); loops.push(node); loopEnds.push(breakTarget); node.putProp(Node.CASES_PROP, new Vector(13)); break; } case TokenStream.DEFAULT: case TokenStream.CASE: { Node sw = (Node) loops.peek(); if (type == TokenStream.CASE) { Vector cases = (Vector) sw.getProp(Node.CASES_PROP); cases.addElement(node); } else { sw.putProp(Node.DEFAULT_PROP, node); } break; } case TokenStream.NEWLOCAL : { Integer localCount = (Integer)(tree.getProp(Node.LOCALCOUNT_PROP)); if (localCount == null) { tree.putProp(Node.LOCALCOUNT_PROP, new Integer(1)); } else { tree.putProp(Node.LOCALCOUNT_PROP, new Integer(localCount.intValue() + 1)); } } break; case TokenStream.LOOP: loops.push(node); loopEnds.push(node.getProp(Node.BREAK_PROP)); break; case TokenStream.WITH: { if (inFunction) { // With statements require an activation object. ((FunctionNode) tree).setRequiresActivation(true); } loops.push(node); Node leave = node.getNextSibling(); if (leave.getType() != TokenStream.LEAVEWITH) { throw new RuntimeException("Unexpected tree"); } loopEnds.push(leave); break; } case TokenStream.TRY: { Node finallytarget = (Node)node.getProp(Node.FINALLY_PROP); if (finallytarget != null) { hasFinally = true; loops.push(node); loopEnds.push(finallytarget); } Integer localCount = (Integer)(tree.getProp(Node.LOCALCOUNT_PROP)); if (localCount == null) { tree.putProp(Node.LOCALCOUNT_PROP, new Integer(1)); } else { tree.putProp(Node.LOCALCOUNT_PROP, new Integer(localCount.intValue() + 1)); } break; } case TokenStream.TARGET: case TokenStream.LEAVEWITH: if (!loopEnds.empty() && loopEnds.peek() == node) { loopEnds.pop(); loops.pop(); } break; case TokenStream.RETURN: { /* If we didn't support try/finally, it wouldn't be * necessary to put LEAVEWITH nodes here... but as * we do need a series of JSR FINALLY nodes before * each RETURN, we need to ensure that each finally * block gets the correct scope... which could mean * that some LEAVEWITH nodes are necessary. */ if (!hasFinally) break; // skip the whole mess. Node parent = iterator.getCurrentParent(); for (int i=loops.size()-1; i >= 0; i--) { Node n = (Node) loops.elementAt(i); int elemtype = n.getType(); if (elemtype == TokenStream.TRY) { Node jsrnode = new Node(TokenStream.JSR); Object jsrtarget = n.getProp(Node.FINALLY_PROP); jsrnode.putProp(Node.TARGET_PROP, jsrtarget); parent.addChildBefore(jsrnode, node); } else if (elemtype == TokenStream.WITH) { parent.addChildBefore(new Node(TokenStream.LEAVEWITH), node); } } break; } case TokenStream.BREAK: case TokenStream.CONTINUE: { Node loop = null; boolean labelled = node.hasChildren(); String id = null; if (labelled) { /* get the label */ Node child = node.getFirstChild(); id = child.getString(); node.removeChild(child); } int i; Node parent = iterator.getCurrentParent(); for (i=loops.size()-1; i >= 0; i--) { Node n = (Node) loops.elementAt(i); int elemtype = n.getType(); if (elemtype == TokenStream.WITH) { parent.addChildBefore(new Node(TokenStream.LEAVEWITH), node); } else if (elemtype == TokenStream.TRY) { Node jsrFinally = new Node(TokenStream.JSR); Object jsrTarget = n.getProp(Node.FINALLY_PROP); jsrFinally.putProp(Node.TARGET_PROP, jsrTarget); parent.addChildBefore(jsrFinally, node); } else if (!labelled && (elemtype == TokenStream.LOOP || (elemtype == TokenStream.SWITCH && type == TokenStream.BREAK))) { /* if it's a simple break/continue, break from the * nearest enclosing loop or switch */ loop = n; break; } else if (labelled && elemtype == TokenStream.LABEL && id.equals((String)n.getProp(Node.LABEL_PROP))) { loop = n; break; } } int propType = type == TokenStream.BREAK ? Node.BREAK_PROP : Node.CONTINUE_PROP; Node target = loop == null ? null : (Node) loop.getProp(propType); if (loop == null || target == null) { String message; if (!labelled) { // didn't find an appropriate target if (type == TokenStream.CONTINUE) { message = Context.getMessage ("msg.continue.outside", null); } else { message = Context.getMessage ("msg.bad.break", null); } } else if (loop != null) { message = Context.getMessage("msg.continue.nonloop", null); } else { Object[] errArgs = { id }; message = Context.getMessage ("msg.undef.label", errArgs); } reportMessage(Context.getContext(), message, node, tree, true, scope); node.setType(TokenStream.NOP); break; } node.setType(TokenStream.GOTO); node.putProp(Node.TARGET_PROP, target); break; } case TokenStream.CALL: if (isSpecialCallName(tree, node)) node.putProp(Node.SPECIALCALL_PROP, Boolean.TRUE); visitCall(node, tree); break; case TokenStream.NEW: if (isSpecialCallName(tree, node)) node.putProp(Node.SPECIALCALL_PROP, Boolean.TRUE); visitNew(node, tree); break; case TokenStream.DOT: { Node right = node.getLastChild(); right.setType(TokenStream.STRING); break; } case TokenStream.EXPRSTMT: node.setType(inFunction ? TokenStream.POP : TokenStream.POPV); break; case TokenStream.OBJECT: { Vector regexps = (Vector) tree.getProp(Node.REGEXP_PROP); if (regexps == null) { regexps = new Vector(3); tree.putProp(Node.REGEXP_PROP, regexps); } regexps.addElement(node); Node n = new Node(TokenStream.OBJECT); iterator.replaceCurrent(n); n.putProp(Node.REGEXP_PROP, node); break; } case TokenStream.VAR: { ShallowNodeIterator i = node.getChildIterator(); Node result = new Node(TokenStream.BLOCK); while (i.hasMoreElements()) { Node n = i.nextNode(); if (!n.hasChildren()) continue; Node init = n.getFirstChild(); n.removeChild(init); Node asn = (Node) irFactory.createAssignment( TokenStream.NOP, n, init, null, false); Node pop = new Node(TokenStream.POP, asn, node.getDatum()); result.addChildToBack(pop); } iterator.replaceCurrent(result); break; } case TokenStream.DELPROP: case TokenStream.SETNAME: { if (!inFunction || inWithStatement()) break; Node bind = node.getFirstChild(); if (bind == null || bind.getType() != TokenStream.BINDNAME) break; String name = bind.getString(); if (name.equals("arguments")) { // use of "arguments" requires an activation object. ((FunctionNode) tree).setRequiresActivation(true); } VariableTable vars = getVariableTable(tree); if (vars.get(name) != null) { if (type == TokenStream.SETNAME) { node.setType(TokenStream.SETVAR); bind.setType(TokenStream.STRING); } else { // Local variables are by definition permanent Node n = new Node(TokenStream.PRIMARY, new Integer(TokenStream.FALSE)); iterator.replaceCurrent(n); } } break; } case TokenStream.GETPROP: if (inFunction) { Node n = node.getFirstChild().getNextSibling(); String name = n == null ? "" : n.getString(); if (name.equals("arguments") || (name.equals("length") && Context.getContext().getLanguageVersion() == Context.VERSION_1_2)) { // Use of "arguments" or "length" in 1.2 requires // an activation object. ((FunctionNode) tree).setRequiresActivation(true); } } break; case TokenStream.NAME: { if (!inFunction || inWithStatement()) break; String name = node.getString(); if (name.equals("arguments")) { // Use of "arguments" requires an activation object. ((FunctionNode) tree).setRequiresActivation(true); } VariableTable vars = getVariableTable(tree); if (vars.get(name) != null) { node.setType(TokenStream.GETVAR); } break; } } } return tree; }
19042 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/19042/3eb542db2c80d7521ea272c802d999a32072bfb6/NodeTransformer.java/buggy/src/org/mozilla/javascript/NodeTransformer.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 2029, 2510, 12, 907, 2151, 16, 2029, 16307, 16, 3155, 1228, 3742, 16, 12900, 22780, 2146, 13, 377, 288, 3639, 14075, 273, 394, 7283, 5621, 3639, 2798, 24980, 273, 394, 7283, 5621, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 2029, 2510, 12, 907, 2151, 16, 2029, 16307, 16, 3155, 1228, 3742, 16, 12900, 22780, 2146, 13, 377, 288, 3639, 14075, 273, 394, 7283, 5621, 3639, 2798, 24980, 273, 394, 7283, 5621, 3...
inline_block.floated = true;
public static InlineBox generateFloatedBlockInlineBox(Context c, Content content, int avail, LineBox curr_line) { //Uu.p("generate floated block inline box: avail = " + avail); //Uu.p("generate floated block inline box"); Rectangle oe = c.getExtents();// copy the extents for safety c.setExtents(new Rectangle(oe)); //BlockBox block = (BlockBox)layout.layout( c, (Element)node ); InlineBlockBox inline_block = new InlineBlockBox(); inline_block.element = content.getElement(); Boxing.layout(c, inline_block, content); //HACK: tobe 2004-12-22 - guessing here // calculate the float property if (c.getCurrentStyle().isIdent(CSSName.FLOAT, IdentValue.NONE)) { throw new XRRuntimeException("Invalid call to generateFloatedBlockInlineBox(); where float: none "); } inline_block.floated = true; IdentValue ident = c.getCurrentStyle().getIdent(CSSName.FLOAT); if (ident == IdentValue.LEFT) { //inline_block.x = 0; } if (ident == IdentValue.RIGHT) { inline_block.x = oe.width - inline_block.getWidth(); } //HACK: tobe 2004-12-22 end Point offset = c.getBlockFormattingContext().getOffset(inline_block); inline_block.y += offset.y; c.setExtents(oe); //TODO: check if floats should be affected by vertical alignment inline_block.break_after = false; inline_block.floated = true; if (inline_block.getWidth() > avail) { inline_block.break_before = true; } return inline_block; }
8125 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8125/d78edbe00854320b48eb4ef97095b253df533dd8/FloatUtil.java/clean/src/java/org/xhtmlrenderer/layout/inline/FloatUtil.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 760, 16355, 3514, 2103, 42, 383, 690, 1768, 10870, 3514, 12, 1042, 276, 16, 3697, 913, 16, 509, 15783, 16, 5377, 3514, 4306, 67, 1369, 13, 288, 3639, 368, 57, 89, 18, 84, 2932, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 760, 16355, 3514, 2103, 42, 383, 690, 1768, 10870, 3514, 12, 1042, 276, 16, 3697, 913, 16, 509, 15783, 16, 5377, 3514, 4306, 67, 1369, 13, 288, 3639, 368, 57, 89, 18, 84, 2932, ...
wordRelation.addWord(digit2num[c-'0']);
wordRelation.addWord(tokenItem,digit2num[c-'0']);
public static void expandLetters(String letters, WordRelation wordRelation) { letters = letters.toLowerCase(); char c; for (int i = 0; i < letters.length(); i++) { // if this is a number c = letters.charAt(i); if (isDigit(c)) { wordRelation.addWord(digit2num[c-'0']); } else if (letters.equals("a")) { wordRelation.addWord("_a"); } else { wordRelation.addWord(String.valueOf(c)); } } }
18648 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/18648/460d07833503253a5c476790f8921bd1e3c702a9/NumberExpander.java/buggy/java/de/dfki/lt/mary/modules/en/NumberExpander.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 760, 918, 4542, 24181, 5432, 12, 780, 13768, 16, 4405, 377, 9926, 3963, 2076, 3963, 13, 288, 202, 26054, 273, 13768, 18, 869, 5630, 5621, 202, 3001, 276, 31, 9506, 202, 1884, 261, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 760, 918, 4542, 24181, 5432, 12, 780, 13768, 16, 4405, 377, 9926, 3963, 2076, 3963, 13, 288, 202, 26054, 273, 13768, 18, 869, 5630, 5621, 202, 3001, 276, 31, 9506, 202, 1884, 261, ...
public org.quickfix.field.UnderlyingCPRegType getUnderlyingCPRegType() throws FieldNotFound { org.quickfix.field.UnderlyingCPRegType value = new org.quickfix.field.UnderlyingCPRegType();
public quickfix.field.UnderlyingCPRegType getUnderlyingCPRegType() throws FieldNotFound { quickfix.field.UnderlyingCPRegType value = new quickfix.field.UnderlyingCPRegType();
public org.quickfix.field.UnderlyingCPRegType getUnderlyingCPRegType() throws FieldNotFound { org.quickfix.field.UnderlyingCPRegType value = new org.quickfix.field.UnderlyingCPRegType(); getField(value); return value; }
8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/OrderCancelReplaceRequest.java/clean/src/java/src/quickfix/fix44/OrderCancelReplaceRequest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 2358, 18, 19525, 904, 18, 1518, 18, 14655, 6291, 4258, 1617, 559, 10833, 765, 6291, 4258, 1617, 559, 1435, 1216, 2286, 2768, 225, 288, 2358, 18, 19525, 904, 18, 1518, 18, 14655, 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, 282, 1071, 2358, 18, 19525, 904, 18, 1518, 18, 14655, 6291, 4258, 1617, 559, 10833, 765, 6291, 4258, 1617, 559, 1435, 1216, 2286, 2768, 225, 288, 2358, 18, 19525, 904, 18, 1518, 18, 14655, 629...
if( refpath.length() == 0 )
if( refpath.length() == 0 ) {
protected String getReferenceFilesParameter() { //bail on no references if( _references == null ) return null; //iterate through the ref list & generate an entry for each //or just rely on the fact that the toString operator does this, but //noting that the separator is ';' on windows, ':' on unix String refpath = _references.toString(); //bail on no references listed if( refpath.length() == 0 ) return null; StringBuffer s = new StringBuffer( "/reference:" ); s.append( refpath ); return new String( s ); }
17033 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17033/b95d90a13da3fb8d362982bc84652f1e03e8325e/CSharp.java/buggy/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/dotnet/CSharp.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 514, 13223, 2697, 1662, 1435, 565, 288, 3639, 368, 70, 671, 603, 1158, 5351, 3639, 309, 12, 389, 14353, 422, 446, 262, 5411, 327, 446, 31, 3639, 368, 18793, 3059, 326, 1278, 666, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 13223, 2697, 1662, 1435, 565, 288, 3639, 368, 70, 671, 603, 1158, 5351, 3639, 309, 12, 389, 14353, 422, 446, 262, 5411, 327, 446, 31, 3639, 368, 18793, 3059, 326, 1278, 666, ...
meta = (Vector)dbc.getMetaData().clone() ;
public String[] sqlQueryExt(String sqlQuery) { Vector data = new Vector() ; Vector meta = new Vector() ; DBConnect dbc = new DBConnect(m_conPool,sqlQuery) ; dbc.getConnection() ; dbc.createStatement() ; data = (Vector)dbc.executeQuery().clone() ; meta = (Vector)dbc.getMetaData().clone() ; if ( data.size() > 0 ) { String result[] = new String[data.size() + dbc.getColumnCount() + 1] ; // no of fields result[0] = dbc.getColumnCount() + "" ; // meta int i = 0 ; for ( i = 0 ; i < dbc.getColumnCount() ; i++ ) result[i+1] = meta.elementAt(i).toString() ; // data for ( int j = 0 ; j < data.size() ; j++ ) result[j+i+1] = data.elementAt(j).toString() ; dbc.clearResultSet() ; dbc.closeConnection() ; dbc = null ; data = null ; meta = null ; return result ; } else { dbc.clearResultSet() ; dbc.closeConnection() ; dbc = null ; data = null ; meta = null ; return null ; } }
8781 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8781/bb0afaec593ded2585202ce0e0b09060c7106ea9/IMCPool.java/clean/server/src/imcode/server/IMCPool.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 514, 8526, 24451, 2482, 12, 780, 24451, 13, 288, 202, 5018, 501, 273, 394, 5589, 1435, 274, 202, 5018, 2191, 273, 394, 5589, 1435, 274, 202, 2290, 5215, 9881, 273, 394, 2383, 5215, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8526, 24451, 2482, 12, 780, 24451, 13, 288, 202, 5018, 501, 273, 394, 5589, 1435, 274, 202, 5018, 2191, 273, 394, 5589, 1435, 274, 202, 2290, 5215, 9881, 273, 394, 2383, 5215, ...
public BeanPointer(QName name, Object bean, JXPathBeanInfo beanInfo, Locale locale){ super(null, locale); this.name = name; this.bean = bean; this.beanInfo = beanInfo; }
public BeanPointer( QName name, Object bean, JXPathBeanInfo beanInfo, Locale locale) { super(null, locale); this.name = name; this.bean = bean; this.beanInfo = beanInfo; }
public BeanPointer(QName name, Object bean, JXPathBeanInfo beanInfo, Locale locale){ super(null, locale); this.name = name; this.bean = bean; this.beanInfo = beanInfo; }
52531 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52531/430fdd01e75a5e681274aa65adeb2d9826ee45a8/BeanPointer.java/buggy/src/java/org/apache/commons/jxpath/ri/model/beans/BeanPointer.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 7704, 4926, 12, 13688, 508, 16, 1033, 3931, 16, 804, 14124, 3381, 966, 3931, 966, 16, 6458, 2573, 15329, 3639, 2240, 12, 2011, 16, 2573, 1769, 3639, 333, 18, 529, 273, 508, 31, 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, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 7704, 4926, 12, 13688, 508, 16, 1033, 3931, 16, 804, 14124, 3381, 966, 3931, 966, 16, 6458, 2573, 15329, 3639, 2240, 12, 2011, 16, 2573, 1769, 3639, 333, 18, 529, 273, 508, 31, 36...
x++;
} if (selection.equals(debugConfigs[i].getID())) { defaultSelection = debugConfigs[i].getName();
protected void loadDebuggerComboBox( ILaunchConfiguration config, String selection ) { fDCombo.removeAll(); ICDebugConfiguration[] debugConfigs = CDebugCorePlugin.getDefault().getDebugConfigurations(); String projectPlatform = getProjectPlatform( config ); int x = 0; int selndx = -1; for( int i = 0; i < debugConfigs.length; i++ ) { if ( debugConfigs[i].supportsMode( ICDTLaunchConfigurationConstants.DEBUGGER_MODE_CORE ) ) { if ( validatePlatform( config, debugConfigs[i] ) ) { fDCombo.add( debugConfigs[i].getName() ); fDCombo.setData( Integer.toString( x ), debugConfigs[i] ); // select first exact matching debugger for platform or requested selection String debuggerPlatform = debugConfigs[i].getPlatform(); if ( (selndx == -1 && debuggerPlatform.equalsIgnoreCase( projectPlatform )) || selection.equals( debugConfigs[i].getID() ) ) { selndx = x; } x++; } } } // if no selection meaning nothing in config the force initdefault on tab setInitializeDefault( selection.equals( "" ) ? true : false ); //$NON-NLS-1$ fDCombo.select( selndx == -1 ? 0 : selndx ); //The behaviour is undefined for if the callbacks should be triggered for this, //so to avoid unnecessary confusion, we force an update. handleDebuggerChanged(); getControl().getParent().layout( true ); }
54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/a192c2f172621fd921dbaebb14ee66fcee4f8f12/CoreFileDebuggerTab.java/clean/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CoreFileDebuggerTab.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1117, 918, 1262, 24113, 22199, 12, 467, 9569, 1750, 642, 16, 514, 4421, 262, 288, 202, 202, 74, 40, 16156, 18, 4479, 1595, 5621, 202, 202, 2871, 2829, 1750, 8526, 1198, 8062, 273, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1117, 918, 1262, 24113, 22199, 12, 467, 9569, 1750, 642, 16, 514, 4421, 262, 288, 202, 202, 74, 40, 16156, 18, 4479, 1595, 5621, 202, 202, 2871, 2829, 1750, 8526, 1198, 8062, 273, ...
return handler.readFilter.readFilter(data, bf, charset, otherParams, new GenericReadFilterCallback());
return handler.readFilter.readFilter(data, bf, charset, otherParams, new GenericReadFilterCallback(baseURI));
public static Bucket filter(Bucket data, BucketFactory bf, String typeName) throws UnsafeContentTypeException, IOException { String type = typeName; String options = ""; String charset = null; HashMap otherParams = null; // First parse the MIME type int idx = type.indexOf(';'); if(idx != -1) { options = type.substring(idx+1); type = type.substring(0, idx); // Parse options // Format: <type>/<subtype>[ optional white space ];[ optional white space ]<param>=<value>; <param2>=<value2>; ... String[] rawOpts = options.split(";"); for(int i=0;i<rawOpts.length;i++) { String raw = rawOpts[i]; idx = raw.indexOf('='); if(idx == -1) { Logger.error(ContentFilter.class, "idx = -1 for '=' on option: "+raw+" from "+typeName); continue; } String before = raw.substring(0, idx).trim(); String after = raw.substring(idx+1).trim(); if(before.equals("charset")) { charset = after; } else { if(otherParams == null) otherParams = new HashMap(); otherParams.put(before, after); } } } // Now look for a MIMEType handler MIMEType handler = getMIMEType(type); if(handler == null) throw new UnknownContentTypeException(typeName); else { if(handler.safeToRead) { return data; } if(handler.readFilter != null) { if(handler.takesACharset && (charset == null || charset.length() == 0)) { charset = detectCharset(data, handler); } return handler.readFilter.readFilter(data, bf, charset, otherParams, new GenericReadFilterCallback()); } handler.throwUnsafeContentTypeException(); return null; } }
56348 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56348/fed5a513af06f8d2ce8e1af88eb3fb217ee029e5/ContentFilter.java/buggy/src/freenet/clients/http/filter/ContentFilter.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 760, 7408, 1034, 12, 4103, 501, 16, 7408, 1733, 16222, 16, 514, 8173, 13, 1216, 27476, 8046, 503, 16, 1860, 288, 202, 202, 780, 618, 273, 8173, 31, 202, 202, 780, 702, 273, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 760, 7408, 1034, 12, 4103, 501, 16, 7408, 1733, 16222, 16, 514, 8173, 13, 1216, 27476, 8046, 503, 16, 1860, 288, 202, 202, 780, 618, 273, 8173, 31, 202, 202, 780, 702, 273, ...
throw NativeGlobal.typeError1("msg.not.ctor", "eval", scope);
throw typeError1("msg.not.ctor", "eval");
public static Object callSpecial(Context cx, Object fun, boolean isNew, Object thisObj, Object[] args, Scriptable scope, Scriptable callerThis, int callType, String filename, int lineNumber) throws JavaScriptException { if (callType == Node.SPECIALCALL_EVAL) { if (NativeGlobal.isEvalFunction(fun)) { if (isNew) { throw NativeGlobal.typeError1("msg.not.ctor", "eval", scope); } return NativeGlobal.evalSpecial(cx, scope, callerThis, args, filename, lineNumber); } } else if (callType == Node.SPECIALCALL_WITH) { if (NativeWith.isWithFunction(fun)) { if (!isNew) { throw Context.reportRuntimeError1("msg.only.from.new", "With"); } return NativeWith.newWithSpecial(cx, scope, args); } } else { Context.codeBug(); } if (isNew) { return newObject(cx, fun, args, scope); } else { return call(cx, fun, thisObj, args, scope); } }
47345 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47345/40f7554390dea10ea64bd490d09230d2c0814929/ScriptRuntime.java/clean/src/org/mozilla/javascript/ScriptRuntime.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 760, 1033, 745, 12193, 12, 1042, 9494, 16, 1033, 9831, 16, 19694, 1250, 10783, 16, 1033, 15261, 16, 19694, 1033, 8526, 833, 16, 22780, 2146, 16, 19694, 22780, 4894, 2503, 16, 509, 7...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 760, 1033, 745, 12193, 12, 1042, 9494, 16, 1033, 9831, 16, 19694, 1250, 10783, 16, 1033, 15261, 16, 19694, 1033, 8526, 833, 16, 22780, 2146, 16, 19694, 22780, 4894, 2503, 16, 509, 7...
request = new KoLRequest( "beanstalk.php" ); request.run();
REDIRECT_FOLLOWER.constructURLString( "beanstalk.php" ); REDIRECT_FOLLOWER.run();
private void validate( boolean visitedCouncil ) { if ( isValidAdventure ) return; if ( getRequest().getURLString().indexOf( "adventure.php" ) == -1 ) { isValidAdventure = true; return; } if ( adventureName.indexOf( "In Disguise" ) != -1 || adventureName.indexOf( "Cloaca Uniform" ) != -1 || adventureName.indexOf( "Dyspepsi Uniform" ) != -1 ) { int outfitID = EquipmentDatabase.getOutfitID( this ); if ( !EquipmentDatabase.isWearingOutfit( outfitID ) ) { EquipmentDatabase.retrieveOutfit( outfitID ); if ( !KoLmafia.permitsContinue() ) return; (new EquipmentRequest( EquipmentDatabase.getOutfit( outfitID ) )).run(); } // If it's the pirate quest in disguise, make sure // you visit the council beforehand. if ( adventureName.indexOf( "Pirate" ) != -1 ) DEFAULT_SHELL.executeLine( "council" ); } // If we're trying to take a trip, make sure it's the right one if ( adventureID.equals( "96" ) || adventureID.equals( "97" ) || adventureID.equals( "98" ) ) { // You must be Half-Astral to go on a trip int astral = ASTRAL.getCount( ( activeEffects ) ); if ( astral == 0 ) { DEFAULT_SHELL.executeLine( "use 1 astral mushroom" ); if ( !KoLmafia.permitsContinue() ) { isValidAdventure = false; return; } } // If we haven't selected a trip yet, do so now if ( astral == 5 ) { String choice; if ( adventureID.equals( "96" ) ) choice = "1"; else if ( adventureID.equals( "98" ) ) choice = "2"; else choice = "3"; // Choose the trip StaticEntity.setProperty( "choiceAdventure71", choice ); String name = getAdventureName(); StaticEntity.setProperty( "chosenTrip", name ); // Arm the adventure by running it once // to get the "Journey to the Center of // your Mind" choice. isValidAdventure = true; StaticEntity.getClient().makeRequest( this, 1 ); return; } String chosenTrip = StaticEntity.getProperty( "chosenTrip" ); // If we've already selected a trip, we can't switch if ( !chosenTrip.equals( getAdventureName() ) ) { KoLmafia.updateDisplay( ERROR_STATE, "You're already taking a different trip." ); isValidAdventure = false; return; } isValidAdventure = true; return; } KoLRequest request = null; // The casino is unlocked provided the player // has a casino pass in their inventory. if ( zone.equals( "Casino" ) ) { AdventureDatabase.retrieveItem( "casino pass" ); isValidAdventure = KoLmafia.permitsContinue(); return; } // The island is unlocked provided the player // has a dingy dinghy in their inventory. else if ( zone.equals( "Island" ) ) { if ( KoLCharacter.hasItem( DINGHY, false ) ) AdventureDatabase.retrieveItem( DINGHY ); else { AdventureDatabase.retrieveItem( "dingy planks" ); DEFAULT_SHELL.executeLine( "use dinghy plans" ); } isValidAdventure = KoLmafia.permitsContinue(); return; } // The Castle in the Clouds in the Sky is unlocked provided the // character has either a S.O.C.K. or an intragalactic rowboat else if ( adventureID.equals( "82" ) ) { if ( KoLCharacter.hasItem( SOCK, true ) ) AdventureDatabase.retrieveItem( SOCK ); else AdventureDatabase.retrieveItem( ROWBOAT ); isValidAdventure = KoLmafia.permitsContinue(); return; } // The Hole in the Sky is unlocked provided the player has an // intragalactic rowboat in their inventory. else if ( adventureID.equals( "83" ) ) { AdventureDatabase.retrieveItem( ROWBOAT ); isValidAdventure = KoLmafia.permitsContinue(); return; } // The beanstalk is unlocked when the player // has planted a beanstalk -- but, the zone // needs to be armed first. else if ( adventureID.equals( "81" ) && !KoLCharacter.beanstalkArmed() ) { // If the character has a S.O.C.K. or an intragalactic // rowboat, they can get to the airship if ( KoLCharacter.hasItem( SOCK, false ) || KoLCharacter.hasItem( ROWBOAT, false ) ) { isValidAdventure = true; return; } // Obviate following request by checking accomplishment: // questlog.php?which=3 // "You have planted a Beanstalk in the Nearby Plains." request = new KoLRequest( "plains.php" ); request.run(); if ( request.responseText.indexOf( "beanstalk.php" ) == -1 ) { // If not, check to see if the player has an enchanted // bean which can be used. If they don't, then try to // find one through adventuring. if ( !KoLCharacter.hasItem( BEAN, false ) ) { ArrayList temporary = new ArrayList(); temporary.addAll( conditions ); conditions.clear(); DEFAULT_SHELL.executeConditionsCommand( "add enchanted bean" ); DEFAULT_SHELL.executeLine( "adventure * beanbat" ); if ( !conditions.isEmpty() ) { KoLmafia.updateDisplay( ERROR_STATE, "Unable to complete enchanted bean quest." ); return; } conditions.clear(); conditions.addAll( temporary ); } // Now that you've retrieved the bean, ensure that // it is in your inventory, and then use it. Take // advantage of item consumption automatically doing // what's needed in grabbing the item. DEFAULT_SHELL.executeLine( "council" ); DEFAULT_SHELL.executeLine( "use enchanted bean" ); } request = new KoLRequest( "beanstalk.php" ); request.run(); KoLCharacter.armBeanstalk(); isValidAdventure = true; return; } else if ( zone.equals( "Spookyraven" ) ) { // It takes RNG luck at the Haunted Pantry to unlock // the rest of Spookyraven Manor. Assume it is // unlocked. However, we can verify that the zones that // require keys are accessible. if ( adventureID.equals( "104" ) ) { // Haunted Library AdventureDatabase.retrieveItem( LIBRARY_KEY ); isValidAdventure = KoLmafia.permitsContinue(); return; } if ( adventureID.equals( "106" ) ) { // Haunted Gallery AdventureDatabase.retrieveItem( GALLERY_KEY ); isValidAdventure = KoLmafia.permitsContinue(); return; } // It takes a special action to make the upstairs areas // available. Assume they are accessible if the player // can get into the library if ( adventureID.equals( "107" ) || adventureID.equals( "108" ) ) { // Haunted Bathroom & Bedroom AdventureDatabase.retrieveItem( LIBRARY_KEY ); isValidAdventure = KoLmafia.permitsContinue(); return; } if ( adventureID.equals( "109" ) ) { // Haunted Ballroom AdventureDatabase.retrieveItem( BALLROOM_KEY ); isValidAdventure = KoLmafia.permitsContinue(); return; } } else if ( adventureID.equals( "11" ) ) { isValidAdventure = true; return; } // If a zone validation is sufficient, then validate the // zone normally. if ( AdventureDatabase.validateZone( zone, adventureID ) ) { isValidAdventure = true; return; } // If the person has a continuum transfunctioner, then find // some way of equipping it. If they do not have one, then // acquire one then try to equip it. If the person has a two // handed weapon, then report an error. if ( adventureID.equals( "73" ) ) { if ( !KoLCharacter.hasItem( TRANSFUNCTIONER, false ) ) { request = new KoLRequest( "town_wrong.php?place=crackpot" ); request.run(); request = new KoLRequest( "town_wrong.php?action=crackyes1" ); request.run(); request = new KoLRequest( "town_wrong.php?action=crackyes2" ); request.run(); } if ( EquipmentDatabase.getHands( KoLCharacter.getEquipment( KoLCharacter.WEAPON ).getName() ) > 1 ) { KoLmafia.updateDisplay( ERROR_STATE, "You need to free up a hand." ); return; } DEFAULT_SHELL.executeLine( "equip " + TRANSFUNCTIONER.getName() ); isValidAdventure = true; return; } // Attempt to unlock the Degrassi Knoll by visiting Paco. // Though we can unlock the guild quest, sometimes people // don't want to open up the guild store right now. So, // only keep trying until paco is unlocked. if ( adventureID.equals( "10" ) || adventureID.equals( "100" ) ) { StaticEntity.getClient().unlockGuildStore( true ); if ( KoLmafia.permitsContinue() ) validate( true ); return; } // The beach is unlocked provided the player has the meat car // accomplishment and a meatcar in inventory. if ( zone.equals( "Beach" ) ) { // If the beach hasn't been unlocked, then visit Paco // with your meatcar. visitedCouncil = true; AdventureDatabase.retrieveItem( "bitchin' meatcar" ); if ( KoLmafia.permitsContinue() ) { StaticEntity.getClient().unlockGuildStore( true ); isValidAdventure = KoLmafia.permitsContinue(); return; } } // You can unlock pieces of the bat hole by using up to // three different sonars. if ( zone.equals( "McLarge" ) && !visitedCouncil ) { // Obviate following request by checking accomplishment: // questlog.php?which=2 // "You have learned how to hunt Yetis from the L337 // Tr4pz0r." // See if the trapper will give it to us DEFAULT_SHELL.executeLine( "council" ); request = new KoLRequest( "trapper.php" ); request.run(); validate( true ); return; } // Check to see if the Knob is unlocked; all areas are // automatically present when this is true. if ( visitedCouncil ) { KoLmafia.updateDisplay( ABORT_STATE, "This adventure is not yet unlocked." ); return; } DEFAULT_SHELL.executeLine( "council" ); validate( true ); }
50364 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50364/85bf20ecca330c92f4049ea21335a864ec203962/KoLAdventure.java/buggy/src/net/sourceforge/kolmafia/KoLAdventure.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 918, 1954, 12, 1250, 9711, 39, 465, 71, 330, 262, 202, 95, 202, 202, 430, 261, 4908, 1871, 616, 594, 262, 1082, 202, 2463, 31, 202, 202, 430, 261, 4328, 7675, 588, 1785, 78...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1954, 12, 1250, 9711, 39, 465, 71, 330, 262, 202, 95, 202, 202, 430, 261, 4908, 1871, 616, 594, 262, 1082, 202, 2463, 31, 202, 202, 430, 261, 4328, 7675, 588, 1785, 78...
void addJobConfToEnvironment(JobConf conf, Properties env) { logprintln("addJobConfToEnvironment: begin");
void addJobConfToEnvironment(JobConf conf, Properties env) { if (debug_) { logprintln("addJobConfToEnvironment: begin"); }
void addJobConfToEnvironment(JobConf conf, Properties env) { logprintln("addJobConfToEnvironment: begin"); Iterator it = conf.entries(); while(it.hasNext()) { Map.Entry en = (Map.Entry)it.next(); String name = (String)en.getKey(); String value = (String)en.getValue(); name = safeEnvVarName(name); envPut(env, name, value); } logprintln("addJobConfToEnvironment: end"); }
50331 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50331/e10b40e8014547113799b2653164e8c990d41209/PipeMapRed.java/buggy/src/contrib/streaming/src/java/org/apache/hadoop/streaming/PipeMapRed.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 918, 527, 2278, 3976, 774, 5494, 12, 2278, 3976, 2195, 16, 6183, 1550, 13, 225, 288, 565, 613, 8222, 2932, 1289, 2278, 3976, 774, 5494, 30, 2376, 8863, 565, 4498, 518, 273, 2195, 18, 82...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 918, 527, 2278, 3976, 774, 5494, 12, 2278, 3976, 2195, 16, 6183, 1550, 13, 225, 288, 565, 613, 8222, 2932, 1289, 2278, 3976, 774, 5494, 30, 2376, 8863, 565, 4498, 518, 273, 2195, 18, 82...
containingDocument.dispatchExternalEvent(pipelineContext, new XXFormsInitializeEvent(containingDocument));
containingDocument.dispatchEvent(pipelineContext, new XXFormsInitializeEvent(containingDocument));
public void readImpl(final PipelineContext pipelineContext, ContentHandler contentHandler) { // Get XForms model XFormsModel model = (XFormsModel) readCacheInputAsObject(pipelineContext, getInputByName(INPUT_MODEL), new CacheableInputReader(){ public Object read(PipelineContext pipelineContext, ProcessorInput input) { return new XFormsModel(readInputAsDOM4J(pipelineContext, input)); } }); try { // Clone because we set the instance, and that must not be cached model = (XFormsModel) model.clone(); } catch (CloneNotSupportedException e) { throw new OXFException(e); }// XFormsInstance contextInstance = XFormsInstance.createInstanceFromContext(pipelineContext);// TODO: do we still need this? XFormsInstance contextInstance = null; if (contextInstance != null) { // Instance comes from context in case of a forward model.setInstanceDocument(pipelineContext, 0, contextInstance.getInstanceDocument(), null, null, null); } else { // Extract parameters from request final RequestParameters requestParameters = (RequestParameters) readCacheInputAsObject(pipelineContext, getInputByName(INPUT_REQUEST), new CacheableInputReader(){ public Object read(PipelineContext context, ProcessorInput input) { Document requestDocument = readInputAsDOM4J(context, input); return new RequestParameters(pipelineContext, requestDocument); } }); // Set instance on model if provided if (requestParameters.getInstance() != null) model.setInstanceDocument(pipelineContext, 0, (Document) requestParameters.getInstance().clone(), null, null, null); // Set initialization listener model.setInstanceConstructListener(new XFormsModel.InstanceConstructListener() { public void updateInstance(int position, XFormsInstance localInstance) { if (position == 0) { // Update instance from request int[] ids = requestParameters.getIds(); for (int i = 0; i < ids.length; i++) { int id = ids[i]; localInstance.setValueForId(id, requestParameters.getValue(id), requestParameters.getType(id)); } // Update instance from path info { final List groupElements = readCacheInputAsDOM4J (pipelineContext, INPUT_MATCHER_RESULT).getRootElement().elements("group"); final Element inputFilterRootElement = readCacheInputAsDOM4J (pipelineContext, INPUT_FILTER).getRootElement(); final List setValueElements; { // Handle legacy <param> element final List paramElements = inputFilterRootElement.elements("param"); if (paramElements != null && paramElements.size() > 0) setValueElements = paramElements; else setValueElements = inputFilterRootElement.elements("setvalue"); } if (groupElements.size() != setValueElements.size()) throw new OXFException("Number of <setvalue> or <param> elements does not match number of groups in path regular expression"); for (Iterator setValueIterator = setValueElements.iterator(), groupIterator = groupElements.iterator(); setValueIterator.hasNext();) { final Element paramElement = (Element) setValueIterator.next(); final Element groupElement = (Element) groupIterator.next(); final String value = groupElement.getStringValue(); if (!"".equals(value)) localInstance.setValueForParam(pipelineContext, paramElement.attributeValue("ref"), Dom4jUtils.getNamespaceContextNoDefault(paramElement), value); } } if (logger.isDebugEnabled()) logger.debug("1) Instance recontructed from request:\n" + Dom4jUtils.domToString(localInstance.getInstanceDocument())); // Run actions // TODO: this has to be done in Model Action[] actions = requestParameters.getActions(); for (int i = 0; i < actions.length; i++) { Action action = actions[i]; action.run(pipelineContext, new ActionFunctionContext(), requestParameters.getEncryptionKey(), localInstance.getInstanceDocumentInfo()); } if (logger.isDebugEnabled()) logger.debug("2) Instance with actions applied:\n" + Dom4jUtils.domToString(localInstance.getInstanceDocument())); } } }); } // Create and initialize XForms Engine final ExternalContext externalContext = (ExternalContext) pipelineContext.getAttribute(PipelineContext.EXTERNAL_CONTEXT); final XFormsContainingDocument containingDocument = new XFormsContainingDocument(model, externalContext); containingDocument.dispatchExternalEvent(pipelineContext, new XXFormsInitializeEvent(containingDocument)); if (logger.isDebugEnabled()) logger.debug("3) Instance with model item properties applied:\n" + Dom4jUtils.domToString(model.getDefaultInstance().getInstanceDocument())); // Get instance from XForms model XFormsInstance instance = model.getDefaultInstance(); // Read out instance instance.read(contentHandler); }
57229 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57229/e9e5c165d524bda80b4fe2b76ca37220ce0fe11b/XFormsInput.java/buggy/src/java/org/orbeon/oxf/processor/xforms/input/XFormsInput.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 2398, 1071, 918, 855, 2828, 12, 6385, 13671, 1042, 5873, 1042, 16, 3697, 1503, 913, 1503, 13, 288, 7734, 368, 968, 1139, 18529, 938, 7734, 1139, 18529, 1488, 938, 273, 261, 60, 18529, 1488, 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, 2398, 1071, 918, 855, 2828, 12, 6385, 13671, 1042, 5873, 1042, 16, 3697, 1503, 913, 1503, 13, 288, 7734, 368, 968, 1139, 18529, 938, 7734, 1139, 18529, 1488, 938, 273, 261, 60, 18529, 1488, 13...
public DataGridBean(String beanId) {
public DataGridBean() {
public DataGridBean(String beanId) { super(); this.beanId = beanId; }
49343 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49343/3349ba869eb63edf91e64fe6d47320f64bd579ed/DataGridBean.java/buggy/src/org/gridlab/gridsphere/provider/portletui/beans/DataGridBean.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 1910, 6313, 3381, 1435, 288, 3639, 2240, 5621, 3639, 333, 18, 14496, 548, 273, 3931, 548, 31, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 1910, 6313, 3381, 1435, 288, 3639, 2240, 5621, 3639, 333, 18, 14496, 548, 273, 3931, 548, 31, 565, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
if (patarray.length>1) { for (int j=0;j<patarray.length;j++) { myModel.PatchList.add(patarray[j]); } } else { if (table.getSelectedRowCount()==0) myModel.PatchList.add(firstpat); else myModel.PatchList.add(table.getSelectedRow(),firstpat); }
if (patarray.length>1) { for (int j=0;j<patarray.length;j++) { myModel.PatchList.add(patarray[j]); } } else { if (table.getSelectedRowCount()==0) myModel.PatchList.add(firstpat); else myModel.PatchList.add(table.getSelectedRow(),firstpat); }
public void ImportPatch(File file) throws IOException,FileNotFoundException { int i; int offset=0; if (ImportMidiFile.doImport(file)) { return; } FileInputStream fileIn= new FileInputStream(file); byte [] buffer =new byte [(int)file.length()]; fileIn.read(buffer); fileIn.close(); while (offset<buffer.length-1) { // There is still something unprocessed in the file Patch firstpat=new Patch(buffer,offset); offset+=firstpat.sysex.length; System.out.println("Buffer length:"+ buffer.length+" Patch Lenght: "+firstpat.sysex.length); Patch[] patarray=firstpat.dissect(); if (patarray.length>1) { // Conversion was sucessfull, we have at least one converted patch for (int j=0;j<patarray.length;j++) { myModel.PatchList.add(patarray[j]); // add all converted patches } } else { // No conversion. Try just the original patch.... if (table.getSelectedRowCount()==0) myModel.PatchList.add(firstpat); else myModel.PatchList.add(table.getSelectedRow(),firstpat); } } myModel.fireTableDataChanged(); changed=true; //statusBar.setText(myModel.PatchList.size()+" Patches"); }
7591 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7591/20bc8bc346af6352a17c3800757afb8d86f7ddd5/LibraryFrame.java/clean/JSynthLib/core/LibraryFrame.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 6164, 7332, 12, 812, 585, 13, 1216, 1860, 16, 812, 3990, 565, 288, 3639, 509, 277, 31, 3639, 509, 1384, 33, 20, 31, 3639, 309, 261, 5010, 20711, 77, 812, 18, 2896, 5010, 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, 1071, 918, 6164, 7332, 12, 812, 585, 13, 1216, 1860, 16, 812, 3990, 565, 288, 3639, 509, 277, 31, 3639, 509, 1384, 33, 20, 31, 3639, 309, 261, 5010, 20711, 77, 812, 18, 2896, 5010, 12...
private void addDocumentationTag (MModelElement me, String sJavaDocs) { if ((sJavaDocs != null) && (! "".equals (sJavaDocs))) { //System.out.println ("Modeller.addDocumentationTag: sJavaDocs = \"" + sJavaDocs + "\""); StringBuffer sbPureDocs = new StringBuffer(80); String sCurrentTagName = null; String sCurrentTagData = null; int nStartPos = 3; // skip the leading /** boolean fHadAsterisk = true; while (nStartPos < sJavaDocs.length()) { switch (sJavaDocs.charAt (nStartPos)) { case '*': fHadAsterisk = true; nStartPos++; break; case ' ': // all white space, hope I didn't miss any ;-) case '\t': if (! fHadAsterisk) { // forget every white space before the first asterisk nStartPos++; break; } default: // normal comment text or standard tag // check ahead for tag int j = nStartPos; while ((j < sJavaDocs.length()) && ((sJavaDocs.charAt (j) == ' ') || (sJavaDocs.charAt (j) == '\t'))) { j++; } if (j < sJavaDocs.length()) { if (sJavaDocs.charAt (j) == '@') { // start standard tag // potentially add current tag to set of tagged values... if (sCurrentTagName != null) { addJavadocTagContents (me, sCurrentTagName, sCurrentTagData); } // open new tag int nTemp = sJavaDocs.indexOf (' ', j + 1); if (nTemp == -1) { nTemp = sJavaDocs.length() - 1; } sCurrentTagName = sJavaDocs.substring ( j + 1, nTemp ); //System.out.println ( // "Modeller.addDocumentationTag (starting tag): " + // "current tag name: " + sCurrentTagName // ); int nTemp1 = sJavaDocs.indexOf ('\n', ++nTemp); if (nTemp1 == -1) { nTemp1 = sJavaDocs.length(); } else { nTemp1++; } sCurrentTagData = sJavaDocs.substring (nTemp, nTemp1); //System.out.println ( // "Modeller.addDocumentationTag (starting tag): "+ // "current tag data: " + sCurrentTagData // ); nStartPos = nTemp1; } else { // continue standard tag or comment text int nTemp = sJavaDocs.indexOf ('\n', nStartPos); if (nTemp == -1) { nTemp = sJavaDocs.length(); } else { nTemp++; } if (sCurrentTagName != null) { //System.out.println ( // "Modeller.addDocumentationTag (continuing tag): nTemp = " + // nTemp + ", nStartPos = " + nStartPos // ); sCurrentTagData += " " + sJavaDocs.substring (nStartPos, nTemp); //System.out.println ( // "Modeller.addDocumentationTag (continuing tag): tag data = " + // sCurrentTagData // ); } else { //System.out.println ("Modeller.addDocumentationTag: nTemp = " + nTemp + ", nStartPos = " + nStartPos); sbPureDocs.append (sJavaDocs.substring (nStartPos, nTemp)); } nStartPos = nTemp; } } fHadAsterisk = false; } } sJavaDocs = sbPureDocs.toString(); /* * After this, we have the documentation text, but unfortunately, there's * still a trailing '/' left. If this is even the only thing on it's line, * we want to remove the complete line, otherwise we remove just the '/'. * * This will be either at the end of the actual comment text or at the end * of the last tag. */ if (sCurrentTagName != null) { // handle last tag... sCurrentTagData = sCurrentTagData.substring ( 0, sCurrentTagData.lastIndexOf ('/') - 1 ); if (sCurrentTagData.charAt (sCurrentTagData.length() - 1) == '\n') { sCurrentTagData = sCurrentTagData.substring ( 0, sCurrentTagData.length() - 1 ); } // store tag addJavadocTagContents (me, sCurrentTagName, sCurrentTagData); } else { sJavaDocs = sJavaDocs.substring (0, sJavaDocs.lastIndexOf ('/') - 1); if (sJavaDocs.length() > 0) { if (sJavaDocs.charAt (sJavaDocs.length() - 1) == '\n') { sJavaDocs = sJavaDocs.substring (0, sJavaDocs.length() - 1); } } } // Now store documentation text getTaggedValue (me, "documentation").setValue (sJavaDocs); } }
7166 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7166/7a887a8a0456dac7c049ca3749da8c8bd2807b27/Modeller.java/buggy/src_new/org/argouml/uml/reveng/java/Modeller.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 3238, 918, 527, 18905, 1805, 261, 49, 1488, 1046, 1791, 16, 4766, 565, 514, 272, 5852, 12656, 13, 288, 565, 309, 14015, 87, 5852, 12656, 480, 446, 13, 597, 3639, 16051, 1408, 18, 14963, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 3238, 918, 527, 18905, 1805, 261, 49, 1488, 1046, 1791, 16, 4766, 565, 514, 272, 5852, 12656, 13, 288, 565, 309, 14015, 87, 5852, 12656, 480, 446, 13, 597, 3639, 16051, 1408, 18, 14963, ...
result.put(meta.elementAt(i).toString(),temp_str) ;
result.put(meta[i] ,temp_str) ;
public Hashtable sqlQueryHash(String sqlQuery) { Vector data = new Vector() ; Vector meta = new Vector() ; DBConnect dbc = new DBConnect(m_conPool,sqlQuery) ; dbc.getConnection() ; dbc.createStatement() ; data = (Vector)dbc.executeQuery().clone() ; meta = (Vector)dbc.getMetaData().clone() ; int columns = dbc.getColumnCount() ; Hashtable result = new Hashtable(columns,0.5f) ; dbc.clearResultSet() ; dbc.closeConnection() ; if ( data.size() > 0 ) { for ( int i = 0 ; i < columns ; i++ ) { String temp_str[] = new String[data.size() / columns] ; int counter = 0 ; for ( int j = i ; j < data.size() ; j+=columns ) temp_str[counter++] = data.elementAt(j).toString() ;; result.put(meta.elementAt(i).toString(),temp_str) ; } return result ; } else { return new Hashtable(1,0.5f) ; } }
8781 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8781/bb0afaec593ded2585202ce0e0b09060c7106ea9/IMCPool.java/clean/server/src/imcode/server/IMCPool.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 18559, 24451, 2310, 12, 780, 24451, 13, 288, 202, 5018, 501, 273, 394, 5589, 1435, 274, 202, 5018, 2191, 273, 394, 5589, 1435, 274, 202, 2290, 5215, 9881, 273, 394, 2383, 5215, 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, 1071, 18559, 24451, 2310, 12, 780, 24451, 13, 288, 202, 5018, 501, 273, 394, 5589, 1435, 274, 202, 5018, 2191, 273, 394, 5589, 1435, 274, 202, 2290, 5215, 9881, 273, 394, 2383, 5215, 12, ...
Set elementsToUnhook = new HashSet(elementsListenedTo); for (int i = 0; i < newValues.length; i++) { Object newValue = newValues[i]; IdentityWrapper identityWrapper = new IdentityWrapper(newValue); if(!elementsToUnhook.remove(identityWrapper)) { elementsListenedTo.add(identityWrapper); hookListener(newValue); } }
Set elementsToUnhook = hookToValues(values);
public void propertyChange(java.beans.PropertyChangeEvent event) { if (!updating) { Object[] newValues = getValues(); // make a copy of the set of objects listened to Set elementsToUnhook = new HashSet(elementsListenedTo); for (int i = 0; i < newValues.length; i++) { Object newValue = newValues[i]; IdentityWrapper identityWrapper = new IdentityWrapper(newValue); if(!elementsToUnhook.remove(identityWrapper)) { // element was not in the set, add listener to it elementsListenedTo.add(identityWrapper); hookListener(newValue); } } for (Iterator it = elementsToUnhook.iterator(); it.hasNext();) { Object o = it.next(); elementsListenedTo.remove(new IdentityWrapper(o)); unhookListener(o); } fireChangeEvent(ChangeEvent.CHANGE, null, null, ChangeEvent.POSITION_UNKNOWN); } }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/60d469d086884a8575679c3fcf123b813421cd40/JavaBeanUpdatableCollection.java/clean/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/internal/beans/JavaBeanUpdatableCollection.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 3196, 202, 482, 918, 1272, 3043, 12, 6290, 18, 2196, 634, 18, 1396, 20930, 871, 13, 288, 1082, 202, 430, 16051, 5533, 1776, 13, 288, 9506, 202, 921, 8526, 23793, 273, 13500, 5621, 9506, 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, 3196, 202, 482, 918, 1272, 3043, 12, 6290, 18, 2196, 634, 18, 1396, 20930, 871, 13, 288, 1082, 202, 430, 16051, 5533, 1776, 13, 288, 9506, 202, 921, 8526, 23793, 273, 13500, 5621, 9506, 202, ...
MockPage page = new MockPage();
MockTypeValidatorTestFormPage page = new MockTypeValidatorTestFormPage();
public void testDateField() { application.createRequestCycle(); MockPage page = new MockPage(); Form form = new Form<Person>(page, "form", new CompoundPropertyModel<Person>(new Person())); new DateField(form, "birthdate"); form.onFormSubmitted(); }
46434 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46434/2acf256eee6be637aaafe4bb05c2eef7c18f1d91/TypeValidatorTest.java/clean/wicket/src/test/wicket/markup/html/form/validation/TypeValidatorTest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1842, 1626, 974, 1435, 202, 95, 202, 202, 3685, 18, 2640, 691, 13279, 5621, 202, 202, 9865, 1964, 1363, 273, 394, 7867, 1964, 5621, 202, 202, 1204, 646, 273, 394, 2748, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1842, 1626, 974, 1435, 202, 95, 202, 202, 3685, 18, 2640, 691, 13279, 5621, 202, 202, 9865, 1964, 1363, 273, 394, 7867, 1964, 5621, 202, 202, 1204, 646, 273, 394, 2748, 3...
} else if ( GraphModelNode.HIGHLIGHT_PROP.equals( prop ) ) { setSelected( 1 ); } else if ( GraphModelNode.UNHIGHLIGHT_PROP.equals( prop ) ) { setSelected( 0 );
} else if ( IGraphModelNode.HIGHLIGHT_PROP.equals( prop ) ) { if (((Boolean)evt.getNewValue()).booleanValue()) { setSelected(1); } else { setSelected(0); }
public void propertyChange(PropertyChangeEvent evt) { String prop = evt.getPropertyName(); // these properties are fired when Nodes and connections are added into or removed from // the LayoutDiagram instance and must cause a call of refreshChildren() // to update the diagram's contents. if (GraphModel.NODE_ADDED_PROP.equals(prop) || GraphModel.NODE_REMOVED_PROP.equals(prop)) { refreshChildren(); } else if ( GraphModelNode.HIGHLIGHT_PROP.equals( prop ) ) { setSelected( 1 ); } else if ( GraphModelNode.UNHIGHLIGHT_PROP.equals( prop ) ) { setSelected( 0 ); } }
11225 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11225/1aa9d8e4021b81d1278aaf3ff0dc441a0f195829/GraphEditPart.java/buggy/org.eclipse.zest.core/src/org/eclipse/zest/core/internal/graphviewer/parts/GraphEditPart.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1272, 3043, 12, 1396, 20930, 6324, 13, 288, 202, 202, 780, 2270, 273, 6324, 18, 588, 13073, 5621, 202, 202, 759, 4259, 1790, 854, 15950, 1347, 14037, 471, 5921, 854, 3096, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1272, 3043, 12, 1396, 20930, 6324, 13, 288, 202, 202, 780, 2270, 273, 6324, 18, 588, 13073, 5621, 202, 202, 759, 4259, 1790, 854, 15950, 1347, 14037, 471, 5921, 854, 3096, ...
recoverFromMismatchedSet(input,mse,FOLLOW_set_in_square_chunk2602); throw mse;
recoverFromMismatchedSet(input,mse,FOLLOW_set_in_square_chunk2728); throw mse;
public String square_chunk() throws RecognitionException { String text = null; Token loc=null; String chunk = null; StringBuffer buf = null; Integer channel = null; try { // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1110:10: (loc= LEFT_SQUARE ( (~ (LEFT_SQUARE|RIGHT_SQUARE))=>~ (LEFT_SQUARE|RIGHT_SQUARE) | ( square_chunk )=>chunk= square_chunk )* loc= RIGHT_SQUARE ) // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1110:10: loc= LEFT_SQUARE ( (~ (LEFT_SQUARE|RIGHT_SQUARE))=>~ (LEFT_SQUARE|RIGHT_SQUARE) | ( square_chunk )=>chunk= square_chunk )* loc= RIGHT_SQUARE { if ( backtracking==0 ) { channel = ((SwitchingCommonTokenStream)input).getTokenTypeChannel( WS ); ((SwitchingCommonTokenStream)input).setTokenTypeChannel( WS, Token.DEFAULT_CHANNEL ); buf = new StringBuffer(); } loc=(Token)input.LT(1); match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_square_chunk2586); if (failed) return text; if ( backtracking==0 ) { buf.append( loc.getText()); } // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1120:3: ( (~ (LEFT_SQUARE|RIGHT_SQUARE))=>~ (LEFT_SQUARE|RIGHT_SQUARE) | ( square_chunk )=>chunk= square_chunk )* loop40: do { int alt40=3; int LA40_0 = input.LA(1); if ( ((LA40_0>=ID && LA40_0<=RIGHT_PAREN)||(LA40_0>=END && LA40_0<=73)) ) { alt40=1; } else if ( (LA40_0==LEFT_SQUARE) ) { alt40=2; } switch (alt40) { case 1 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1121:4: (~ (LEFT_SQUARE|RIGHT_SQUARE))=>~ (LEFT_SQUARE|RIGHT_SQUARE) { if ( (input.LA(1)>=ID && input.LA(1)<=RIGHT_PAREN)||(input.LA(1)>=END && input.LA(1)<=73) ) { input.consume(); errorRecovery=false;failed=false; } else { if (backtracking>0) {failed=true; return text;} MismatchedSetException mse = new MismatchedSetException(null,input); recoverFromMismatchedSet(input,mse,FOLLOW_set_in_square_chunk2602); throw mse; } if ( backtracking==0 ) { buf.append( input.LT(-1).getText() ); } } break; case 2 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1126:4: ( square_chunk )=>chunk= square_chunk { pushFollow(FOLLOW_square_chunk_in_square_chunk2626); chunk=square_chunk(); _fsp--; if (failed) return text; if ( backtracking==0 ) { buf.append( chunk ); } } break; default : break loop40; } } while (true); if ( backtracking==0 ) { if( channel != null ) { ((SwitchingCommonTokenStream)input).setTokenTypeChannel(WS, channel.intValue()); } else { ((SwitchingCommonTokenStream)input).setTokenTypeChannel(WS, Token.HIDDEN_CHANNEL); } } loc=(Token)input.LT(1); match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_square_chunk2662); if (failed) return text; if ( backtracking==0 ) { buf.append( loc.getText() ); text = buf.toString(); } } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { } return text; }
31577 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/31577/158de3e3177d9b48d45fb4c3fae8404e0f01f690/DRLParser.java/buggy/drools-compiler/src/main/java/org/drools/lang/DRLParser.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 514, 8576, 67, 6551, 1435, 1216, 9539, 288, 6647, 514, 977, 273, 446, 31, 3639, 3155, 1515, 33, 2011, 31, 3639, 514, 2441, 273, 446, 31, 21821, 6674, 1681, 273, 446, 31, 10402, 21...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 514, 8576, 67, 6551, 1435, 1216, 9539, 288, 6647, 514, 977, 273, 446, 31, 3639, 3155, 1515, 33, 2011, 31, 3639, 514, 2441, 273, 446, 31, 21821, 6674, 1681, 273, 446, 31, 10402, 21...
m_cmdl.addVmArgument( argument );
m_exec.getVmArguments().addArgument( argument );
public void addJvmarg( final Argument argument ) { m_cmdl.addVmArgument( argument ); }
506 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/506/3fee832d2527f3b952683181980a446b44f5e5bf/Java.java/clean/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/Java.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 527, 6071, 3175, 12, 727, 5067, 1237, 262, 565, 288, 3639, 312, 67, 4177, 18, 588, 22143, 4628, 7675, 1289, 1379, 12, 1237, 11272, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 527, 6071, 3175, 12, 727, 5067, 1237, 262, 565, 288, 3639, 312, 67, 4177, 18, 588, 22143, 4628, 7675, 1289, 1379, 12, 1237, 11272, 565, 289, 2, -100, -100, -100, -100, -100, ...
event.getDropTargetContext ().dropComplete (true);
event.getDropTargetContext().dropComplete(true);
public void drop (DropTargetDropEvent event) { System.out.println ("DNDLibraryTable drop"); try { Transferable transferable = event.getTransferable (); Patch pat=(Patch)((PatchListModel)getModel ()).PatchList.get (this.rowAtPoint (event.getLocation ())); DataFlavor df=new DataFlavor (PatchEdit.getDriver(pat.deviceNum,pat.driverNum).getClass (),pat.toString ()); if (transferable.isDataFlavorSupported (df)) { //System.out.println ("IsSupported"); Patch so=(Patch)event.getTransferable ().getTransferData (df); so.ChooseDriver (); // Because the driverNum is transient in Patch //System.out.println(so.getType()+" "+so.getName()); event.acceptDrop (DnDConstants.ACTION_COPY_OR_MOVE); Point p=event.getLocation (); //System.out.println ("Zieltabelle Zeile: "+this.rowAtPoint (p)); ((PatchListModel)getModel ()).setPatchAt (so,this.rowAtPoint (p));/* String s = (String)transferable.getTransferData ( DataFlavor.stringFlavor); addElement( s ); */ event.getDropTargetContext ().dropComplete (true); event.dropComplete(true); } else { //System.out.println (transferable.toString ()+" "+df.getMimeType ()); //System.out.println ("DNDLibraryTable:rejectDrop"); event.rejectDrop (); } } catch (IOException exception) { ErrorMsg.reportError ("Error", "IO Exception",exception); // exception.printStackTrace (); // System.err.println ( "Exception" + exception.getMessage ()); event.rejectDrop (); } catch (UnsupportedFlavorException ufException ) { ErrorMsg.reportError ("Error", "Unsupported Dnd Flavor",ufException); // ufException.printStackTrace (); // System.err.println ( "Exception" + ufException.getMessage ()); event.rejectDrop (); } }
7591 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7591/3b16911f3034387b67fd800fe8f1e5d32ef48df6/DNDLibraryTable.java/clean/JSynthLib/core/DNDLibraryTable.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 3640, 261, 7544, 2326, 7544, 1133, 871, 13, 565, 288, 3639, 2332, 18, 659, 18, 8222, 7566, 40, 2908, 9313, 1388, 3640, 8863, 7734, 775, 3639, 288, 5411, 12279, 429, 7412, 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, 377, 1071, 918, 3640, 261, 7544, 2326, 7544, 1133, 871, 13, 565, 288, 3639, 2332, 18, 659, 18, 8222, 7566, 40, 2908, 9313, 1388, 3640, 8863, 7734, 775, 3639, 288, 5411, 12279, 429, 7412, 429, ...
try
try
public void ejbStore() throws RemoteException { PreparedStatement stmt= null; Connection conn = null; if (isDirty) { isDirty = false; try { conn = getConnection(); stmt = conn.prepareStatement("UPDATE ids SET category=?, region=?, users=?, item=?, comment=?, bid=?, buyNow=? WHERE id=?"); stmt.setInt(1, categoryCount.intValue()); stmt.setInt(2, regionCount.intValue()); stmt.setInt(3, userCount.intValue()); stmt.setInt(4, itemCount.intValue()); stmt.setInt(5, commentCount.intValue()); stmt.setInt(6, bidCount.intValue()); stmt.setInt(7, buyNowCount.intValue()); stmt.setInt(8, id.intValue()); stmt.executeUpdate(); stmt.close(); conn.close(); } catch (Exception e) { try { if(stmt != null) stmt.close(); if(conn != null) conn.close(); } catch (Exception ignore){} throw new EJBException("Failed to update object idManager: " +e); } } }
5750 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5750/3d57ae5a342bc10d6c418636c07193a0289ffd6b/IDManagerBean.java/buggy/EJB_EntityBean_id_BMP/edu/rice/rubis/beans/IDManagerBean.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 18024, 2257, 1435, 1216, 18361, 225, 288, 565, 16913, 3480, 33, 446, 31, 565, 4050, 1487, 273, 446, 31, 565, 309, 261, 291, 10785, 13, 565, 288, 1377, 25206, 273, 629, 31, 13...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 18024, 2257, 1435, 1216, 18361, 225, 288, 565, 16913, 3480, 33, 446, 31, 565, 4050, 1487, 273, 446, 31, 565, 309, 261, 291, 10785, 13, 565, 288, 1377, 25206, 273, 629, 31, 13...
/*
/*
private void genAltHashFunction(Type type, Alternative alt) { if (!hasReservedTypeFields(type, alt)) { int arity = type.getAltArity(alt); String goldenratio = "0x9e3779b9"; int changingArg = guessChangingArgument(type, alt); String initval; if (changingArg > 0) { initval = "getArgument(" + changingArg + ").hashCode()"; } else { initval = "0"; } println(" protected int hashFunction() {"); println(" int c = " + initval + " + (getAnnotations().hashCode()<<8);"); println(" int a = " + goldenratio + ";"); println(" int b = (getAFun().hashCode()<<8);"); /* * This piece of code generates a number of shifts following the * algorithm of the Doobs hash functions (Google: Doobs), you can * find a general implementation in shared.HashFunctions of the * shared-objects library. This code specializes the algorithm for * a fixed number of arguments. */ for (int i = arity - 1; i >= 0; i--) { int shift = (i % 4) * 8; println( " " + "aaaabbbbcccc".toCharArray()[i % 12] + " += (getArgument(" + i + ").hashCode() << " + shift + ");"); } println(); println(" a -= b; a -= c; a ^= (c >> 13);"); println(" b -= c; b -= a; b ^= (a << 8);"); println(" c -= a; c -= b; c ^= (b >> 13);"); println(" a -= b; a -= c; a ^= (c >> 12);"); println(" b -= c; b -= a; b ^= (a << 16);"); println(" c -= a; c -= b; c ^= (b >> 5);"); println(" a -= b; a -= c; a ^= (c >> 3);"); println(" b -= c; b -= a; b ^= (a << 10);"); println(" c -= a; c -= b; c ^= (b >> 15);"); println(); println(" return c;"); println(" }"); println(); } }
3664 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3664/76875cdfe2af0d6de4ab58a245cce8bd703a86ab/AlternativeGenerator.java/clean/apigen/src/apigen/gen/java/AlternativeGenerator.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 918, 3157, 10655, 2310, 2083, 12, 559, 618, 16, 21498, 1535, 3770, 13, 288, 202, 202, 430, 16051, 5332, 10435, 559, 2314, 12, 723, 16, 3770, 3719, 288, 1082, 202, 474, 19353, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 10655, 2310, 2083, 12, 559, 618, 16, 21498, 1535, 3770, 13, 288, 202, 202, 430, 16051, 5332, 10435, 559, 2314, 12, 723, 16, 3770, 3719, 288, 1082, 202, 474, 19353, ...
final String leftString = appendKeywords(leftKeywordHandler, leftFile.getContent(), DiffCreator.ENCODING); final String rightString = appendKeywords(rightKeywordHandler, rightFile.getContent(), DiffCreator.ENCODING);
final String leftString = replaceLeadingSpaces(appendKeywords(leftKeywordHandler, leftFile.getContent(), DiffCreator.ENCODING)); final String rightString = replaceLeadingSpaces(appendKeywords(rightKeywordHandler, rightFile.getContent(), DiffCreator.ENCODING));
public DiffCreator(final RawTextFile leftFile, final KeywordHandler leftKeywordHandler, final RawTextFile rightFile, final KeywordHandler rightKeywordHandler) throws DiffException { final LineNumberAppender lineNumberAppender = new LineNumberAppender(); lineNumberAppender.setEmbedStart("<span class=\"sventonLineNo\">"); lineNumberAppender.setEmbedEnd(":&nbsp;</span>"); lineNumberAppender.setPadding(5); final InputStream leftStream = new ByteArrayInputStream(leftFile.getContent().getBytes()); final InputStream rightStream = new ByteArrayInputStream(rightFile.getContent().getBytes()); try { final ByteArrayOutputStream diffResult = new ByteArrayOutputStream(); final DiffProducer diffProducer = new DiffProducer(leftStream, rightStream, DiffCreator.ENCODING); diffProducer.doNormalDiff(diffResult); diffResultString = diffResult.toString(); if ("".equals(diffResultString)) { throw new DiffException("Files are identical."); } final String leftString = appendKeywords(leftKeywordHandler, leftFile.getContent(), DiffCreator.ENCODING); final String rightString = appendKeywords(rightKeywordHandler, rightFile.getContent(), DiffCreator.ENCODING); final List<String> leftSourceLines = toLinesList(lineNumberAppender.appendTo(leftString)); final List<String> rightSourceLines = toLinesList(lineNumberAppender.appendTo(rightString)); final List<DiffSegment> diffSegments = DiffResultParser.parseNormalDiffResult(diffResultString); leftLinesList = process(LEFT, leftSourceLines, diffSegments); rightLinesList = process(RIGHT, rightSourceLines, diffSegments); assertEqualListSize(leftLinesList, rightLinesList); } catch (IOException ioex) { throw new DiffException("Unable to produce diff."); } }
50734 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50734/9e55c98f837bd8624dfb0c1bc13430ded0ccdbb2/DiffCreator.java/buggy/sventon/dev/java/src/de/berlios/sventon/diff/DiffCreator.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 13008, 10636, 12, 6385, 6576, 1528, 812, 2002, 812, 16, 727, 18317, 1503, 2002, 8736, 1503, 16, 5397, 727, 6576, 1528, 812, 2145, 812, 16, 727, 18317, 1503, 2145, 8736, 1503, 13, 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, 282, 1071, 13008, 10636, 12, 6385, 6576, 1528, 812, 2002, 812, 16, 727, 18317, 1503, 2002, 8736, 1503, 16, 5397, 727, 6576, 1528, 812, 2145, 812, 16, 727, 18317, 1503, 2145, 8736, 1503, 13, 12...
else
} else {
makeDiagonalHatch(int fgColor, int bgColor, int spacing) { int w = imageWidth_; int h = imageHeight_; int pix[] = new int[w*h]; int index, y,x; index = 0; for (y=0; y<h; y++) { for (x=0; x<w; x++) { if ((x-y) % spacing == 0 || (x+y) % spacing == 0) pix[index++] = fgColor; else pix[index++] = bgColor; } } MemoryImageSource mi = new MemoryImageSource(w, h, pix, 0, w); Image image = tk_.createImage(mi); return image; }
11319 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11319/5deff89a0be0904aa602d8d38154596a7aeb1360/PatternMaker.java/buggy/datagrabber/src/org/cougaar/mlm/ui/newtpfdd/gui/component/PatternMaker.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1221, 14058, 9528, 44, 505, 12, 474, 10186, 2957, 16, 509, 7611, 2957, 16, 509, 13259, 13, 288, 565, 509, 341, 273, 1316, 2384, 67, 31, 565, 509, 366, 273, 1316, 2686, 67, 31, 565, 50...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1221, 14058, 9528, 44, 505, 12, 474, 10186, 2957, 16, 509, 7611, 2957, 16, 509, 13259, 13, 288, 565, 509, 341, 273, 1316, 2384, 67, 31, 565, 509, 366, 273, 1316, 2686, 67, 31, 565, 50...
logger.warning("Invalid Frame" + id);
logger.warning("Invalid Frame");
protected void readFrames(ByteBuffer byteBuffer, int size) throws IOException { logger.finest("Start of frame body at" + byteBuffer.position()); //Now start looking for frames ID3v24Frame next; frameMap = new LinkedHashMap(); //Read the size from the Tag Header this.fileReadSize = size; // Read the frames until got to upto the size as specified in header logger.finest("Start of frame body at:" + byteBuffer.position() + ",frames data size is:" + size); while (byteBuffer.position() <= size) { String id = null; try { //Read Frame logger.finest("looking for next frame at:" + byteBuffer.position()); next = new ID3v24Frame(byteBuffer); id = next.getIdentifier(); loadFrameIntoMap(id, next); } //Found Empty Frame catch (EmptyFrameException ex) { this.emptyFrameBytes += TAG_HEADER_LENGTH; } //Problem trying to find frame catch (InvalidFrameException ex) { logger.warning("Invalid Frame" + id); this.invalidFrameBytes++; //Dont try and find any more frames break; } } }
4849 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4849/1f7617a332391805c306c6f2fcd2dbf8bc4d25cf/ID3v24Tag.java/buggy/src/org/jaudiotagger/tag/id3/ID3v24Tag.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 918, 855, 15162, 12, 12242, 21734, 16, 509, 963, 13, 3639, 1216, 1860, 565, 288, 3639, 1194, 18, 926, 395, 2932, 1685, 434, 2623, 1417, 622, 6, 397, 21734, 18, 3276, 10663, 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, 855, 15162, 12, 12242, 21734, 16, 509, 963, 13, 3639, 1216, 1860, 565, 288, 3639, 1194, 18, 926, 395, 2932, 1685, 434, 2623, 1417, 622, 6, 397, 21734, 18, 3276, 10663, 3639, ...
if (debug) System.out.println("calling AVIReader.initFile(" + id + ")");
if (debug) debug("initFile(" + id + ")");
protected void initFile(String id) throws FormatException, IOException { if (debug) System.out.println("calling AVIReader.initFile(" + id + ")"); super.initFile(id); in = new RandomAccessStream(getMappedId(id)); in.order(true); offsets = new Vector(); byte[] list = new byte[4]; String listString; type = readStringBytes(); size = in.readInt(); fcc = readStringBytes(); if (type.equals("RIFF")) { bigChunkSize = size; if (!fcc.equals("AVI ")) { whine("Sorry, AVI RIFF format not found."); } } else { whine("Not an AVI file"); } pos = in.getFilePointer(); long spos = pos; while ((in.length() - in.getFilePointer()) > 4) { in.read(list); in.seek((int) pos); listString = new String(list); if (listString.equals("JUNK")) { type = readStringBytes(); size = in.readInt(); if (type.equals("JUNK")) { in.skipBytes(size); } } else if (listString.equals("LIST")) { spos = in.getFilePointer(); type = readStringBytes(); size = in.readInt(); fcc = readStringBytes(); in.seek((int) spos); if (fcc.equals("hdrl")) { type = readStringBytes(); size = in.readInt(); fcc = readStringBytes(); if (type.equals("LIST")) { if (fcc.equals("hdrl")) { type = readStringBytes(); size = in.readInt(); if (type.equals("avih")) { spos = in.getFilePointer(); dwMicroSecPerFrame = in.readInt(); dwMaxBytesPerSec = in.readInt(); dwReserved1 = in.readInt(); dwFlags = in.readInt(); dwTotalFrames = in.readInt(); dwInitialFrames = in.readInt(); dwStreams = in.readInt(); dwSuggestedBufferSize = in.readInt(); dwWidth = in.readInt(); dwHeight = in.readInt(); dwScale= in.readInt(); dwRate = in.readInt(); dwStart = in.readInt(); dwLength = in.readInt(); metadata.put("Microseconds per frame", new Integer(dwMicroSecPerFrame)); metadata.put("Max. bytes per second", new Integer(dwMaxBytesPerSec)); metadata.put("Total frames", new Integer(dwTotalFrames)); metadata.put("Initial frames", new Integer(dwInitialFrames)); metadata.put("Frame width", new Integer(dwWidth)); metadata.put("Frame height", new Integer(dwHeight)); metadata.put("Scale factor", new Integer(dwScale)); metadata.put("Frame rate", new Integer(dwRate)); metadata.put("Start time", new Integer(dwStart)); metadata.put("Length", new Integer(dwLength)); try { in.seek((int) (spos + size)); } catch (Exception e) { } } } } } else if (fcc.equals("strl")) { long startPos = in.getFilePointer(); long streamSize = size; type = readStringBytes(); size = in.readInt(); fcc = readStringBytes(); if (type.equals("LIST")) { if (fcc.equals("strl")) { type = readStringBytes(); size = in.readInt(); if (type.equals("strh")) { spos = in.getFilePointer(); String fccStreamTypeOld = fccStreamType; fccStreamType = readStringBytes(); if (!fccStreamType.equals("vids")) { fccStreamType = fccStreamTypeOld; } fccStreamHandler = readStringBytes(); dwStreamFlags = in.readInt(); dwStreamReserved1 = in.readInt(); dwStreamInitialFrames = in.readInt(); dwStreamScale = in.readInt(); dwStreamRate = in.readInt(); dwStreamStart = in.readInt(); dwStreamLength = in.readInt(); dwStreamSuggestedBufferSize = in.readInt(); dwStreamQuality = in.readInt(); dwStreamSampleSize = in.readInt(); metadata.put("Stream quality", new Integer(dwStreamQuality)); metadata.put("Stream sample size", new Integer(dwStreamSampleSize)); try { in.seek((int) (spos + size)); } catch (Exception e) { } } type = readStringBytes(); size = in.readInt(); if (type.equals("strf")) { spos = in.getFilePointer(); bmpSize = in.readInt(); bmpWidth = in.readInt(); bmpHeight = in.readInt(); bmpPlanes = in.readShort(); bmpBitsPerPixel = in.readShort(); bmpCompression = in.readInt(); bmpSizeOfBitmap = in.readInt(); bmpHorzResolution = in.readInt(); bmpVertResolution = in.readInt(); bmpColorsUsed = in.readInt(); bmpColorsImportant = in.readInt(); bmpTopDown = (bmpHeight < 0); bmpNoOfPixels = bmpWidth * bmpHeight; metadata.put("Bitmap compression value", new Integer(bmpCompression)); metadata.put("Horizontal resolution", new Integer(bmpHorzResolution)); metadata.put("Vertical resolution", new Integer(bmpVertResolution)); metadata.put("Number of colors used", new Integer(bmpColorsUsed)); metadata.put("Bits per pixel", new Integer(bmpBitsPerPixel)); // scan line is padded with zeros to be a multiple of 4 bytes int npad = bmpWidth % 4; if (npad > 0) npad = 4 - npad; bmpScanLineSize = (bmpWidth + npad) * (bmpBitsPerPixel / 8); if (bmpSizeOfBitmap != 0) { bmpActualSize = bmpSizeOfBitmap; } else { // a value of 0 doesn't mean 0 -- it means we have // to calculate it bmpActualSize = bmpScanLineSize * bmpHeight; } if (bmpColorsUsed != 0) { bmpActualColorsUsed = bmpColorsUsed; } else { // a value of 0 means we determine this based on the // bits per pixel if (bmpBitsPerPixel < 16) { bmpActualColorsUsed = 1 << bmpBitsPerPixel; } else { // no palette bmpActualColorsUsed = 0; } } if (bmpCompression != 0) { whine("Sorry, compressed AVI files not supported."); } if (!(bmpBitsPerPixel == 8 || bmpBitsPerPixel == 24 || bmpBitsPerPixel == 32)) { whine("Sorry, " + bmpBitsPerPixel + " bits per pixel not " + "supported"); } if (bmpActualColorsUsed != 0) { // read the palette pr = new byte[bmpColorsUsed]; pg = new byte[bmpColorsUsed]; pb = new byte[bmpColorsUsed]; for (int i=0; i<bmpColorsUsed; i++) { pb[i] = (byte) in.read(); pg[i] = (byte) in.read(); pr[i] = (byte) in.read(); in.read(); } } in.seek((int) (spos + size)); } } spos = in.getFilePointer(); type = readStringBytes(); size = in.readInt(); if (type.equals("strd")) { in.skipBytes(size); } else { in.seek(spos); } spos = in.getFilePointer(); type = readStringBytes(); size = in.readInt(); if (type.equals("strn")) { in.skipBytes(size); } else { in.seek(spos); } } try { in.seek(startPos + 8 + streamSize); } catch (Exception e) { } } else if (fcc.equals("movi")) { type = readStringBytes(); size = in.readInt(); fcc = readStringBytes(); if (type.equals("LIST")) { if (fcc.equals("movi")) { spos = in.getFilePointer(); type = readStringBytes(); size = in.readInt(); fcc = readStringBytes(); if (!(type.equals("LIST") && fcc.equals("rec "))) { in.seek((int) spos); } spos = in.getFilePointer(); type = readStringBytes(); size = in.readInt(); while (type.substring(2).equals("db") || type.substring(2).equals("dc") || type.substring(2).equals("wb")) { if (type.substring(2).equals("db") || type.substring(2).equals("dc")) { offsets.add(new Long(in.getFilePointer())); in.skipBytes(bmpHeight * bmpScanLineSize); } spos = in.getFilePointer(); type = readStringBytes(); size = in.readInt(); if (type.equals("JUNK")) { in.skipBytes(size); spos = in.getFilePointer(); type = readStringBytes(); size = in.readInt(); } } in.seek(spos); } } } else { // skipping unknown block try { in.skipBytes(8 + size); } catch (IllegalArgumentException iae) { } } } else { // skipping unknown block type = readStringBytes(); try { size = in.readInt(); in.skipBytes(size); } catch (Exception iae) { } } pos = in.getFilePointer(); } numImages = offsets.size(); sizeX[0] = dwWidth; sizeY[0] = bmpHeight; sizeZ[0] = 1; sizeC[0] = isRGB(id) ? 3 : 1; sizeT[0] = numImages; pixelType[0] = FormatReader.UINT8; currentOrder[0] = sizeC[0] == 3 ? "XYCTZ" : "XYTCZ"; initOMEMetadata(); }
11426 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11426/2c680a5618955854e02d652bc68024b9a011950a/AVIReader.java/buggy/loci/formats/in/AVIReader.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 4750, 918, 1208, 812, 12, 780, 612, 13, 1216, 4077, 503, 16, 1860, 288, 565, 309, 261, 4148, 13, 1198, 2932, 2738, 812, 2932, 397, 612, 397, 7310, 1769, 565, 2240, 18, 2738, 812, 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, 282, 4750, 918, 1208, 812, 12, 780, 612, 13, 1216, 4077, 503, 16, 1860, 288, 565, 309, 261, 4148, 13, 1198, 2932, 2738, 812, 2932, 397, 612, 397, 7310, 1769, 565, 2240, 18, 2738, 812, 12, ...
Item v; Register r; if (type == JvmType.REFERENCE) { RefItem vr = vstack.popRef(); vr.load(eContext); r = vr.getRegister(); v = vr; } else { IntItem vi = vstack.popInt(); vi.load(eContext); r = vi.getRegister(); v = vi; } vstack.push(eContext);
Item v; Register r; if (type == JvmType.REFERENCE) { RefItem vr = vstack.popRef(); vr.load(eContext); r = vr.getRegister(); v = vr; } else { IntItem vi = vstack.popInt(); vi.load(eContext); r = vi.getRegister(); v = vi; } vstack.push(eContext);
private void visit_ifxx(int type, int address, int jccOpcode) { //IMPROVE: Constant case / Local case Item v; Register r; if (type == JvmType.REFERENCE) { RefItem vr = vstack.popRef(); vr.load(eContext); r = vr.getRegister(); v = vr; } else { IntItem vi = vstack.popInt(); vi.load(eContext); r = vi.getRegister(); v = vi; } // flush vstack before jumping vstack.push(eContext); v.release(eContext); os.writeTEST(r, r); os.writeJCC(helper.getInstrLabel(address), jccOpcode); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/55b12818040bb69b51502c4cd0f42118d2046977/X86BytecodeVisitor.java/buggy/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 3757, 67, 430, 5279, 12, 474, 618, 16, 509, 1758, 16, 509, 525, 952, 22808, 13, 288, 3639, 368, 3445, 3373, 3412, 30, 10551, 648, 342, 3566, 648, 3639, 4342, 331, 31, 3639, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 3757, 67, 430, 5279, 12, 474, 618, 16, 509, 1758, 16, 509, 525, 952, 22808, 13, 288, 3639, 368, 3445, 3373, 3412, 30, 10551, 648, 342, 3566, 648, 3639, 4342, 331, 31, 3639, ...
}
}
public static void runInAWTThread(Runnable run) { ioThreadPool.addWorkRequest(run,true); }
6564 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6564/65bb6a2acf338a840d8b22d96810ba924d55277b/VFSManager.java/clean/org/gjt/sp/jedit/io/VFSManager.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 760, 918, 1086, 382, 37, 8588, 3830, 12, 20013, 1086, 13, 202, 95, 202, 202, 1594, 20621, 18, 1289, 2421, 691, 12, 2681, 16, 3767, 1769, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 760, 918, 1086, 382, 37, 8588, 3830, 12, 20013, 1086, 13, 202, 95, 202, 202, 1594, 20621, 18, 1289, 2421, 691, 12, 2681, 16, 3767, 1769, 202, 97, 2, -100, -100, -100, -100, ...
logger.info(message);
logger.info( message);
public void logVelocityMessage(int level, String message) { switch (level) { case LogSystem.WARN_ID: logger.warn( message ); break; case LogSystem.INFO_ID: logger.info(message); break; case LogSystem.DEBUG_ID: logger.debug(message); break; case LogSystem.ERROR_ID: logger.error(message); break; default: logger.info(message); break; } }
9291 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9291/d247c305d3e3c2c7d4e74d17b922c0dc0f68482f/AvalonLogSystem.java/clean/src/java/org/apache/velocity/runtime/log/AvalonLogSystem.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 613, 27522, 1079, 12, 474, 1801, 16, 514, 883, 13, 565, 288, 3639, 1620, 261, 2815, 13, 540, 288, 5411, 648, 1827, 3163, 18, 27999, 67, 734, 30, 7734, 1194, 18, 8935, 12, 8...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 613, 27522, 1079, 12, 474, 1801, 16, 514, 883, 13, 565, 288, 3639, 1620, 261, 2815, 13, 540, 288, 5411, 648, 1827, 3163, 18, 27999, 67, 734, 30, 7734, 1194, 18, 8935, 12, 8...
} else if (name == "Java::JavaClass") { return getJavaClassClass();
private RubyModule getAutoload(String name) { name = name.intern(); if (name == "Array") { return getArrayClass(); } else if (name == "Bignum") { return getBignumClass(); } else if (name == "Binding") { return getBindingClass(); } else if (name == "Comparable") { return getComparableModule(); } else if (name == "Continuation") { return getContinuationClass(); } else if (name == "Dir") { return getDirClass(); } else if (name == "Enumerable") { return getEnumerableModule(); } else if (name == "Exception") { return getExceptionClass(); } else if (name == "File") { return getFileClass(); } else if (name == "Fixnum") { return getFixnumClass(); } else if (name == "Float") { return getFloatClass(); } else if (name == "GC") { return getGcModule(); } else if (name == "Hash") { return getHashClass(); } else if (name == "Integer") { return getIntegerClass(); } else if (name == "IO") { return getIoClass(); } else if (name == "Java") { return getJavaModule(); } else if (name == "Java::JavaClass") { return getJavaClassClass(); } else if (name == "Marshal") { return getMarshalModule(); } else if (name == "MatchData") { return getMatchDataClass(); } else if (name == "Math") { return getMathModule(); } else if (name == "Method") { return getMethodClass(); } else if (name == "Numeric") { return getNumericClass(); } else if (name == "ObjectSpace") { return getObjectSpaceModule(); } else if (name == "Precision") { return getPrecisionModule(); } else if (name == "Proc") { return getProcClass(); } else if (name == "Process") { return getProcessModule(); } else if (name == "Range") { return getRangeClass(); } else if (name == "Regexp") { return getRegExpClass(); } else if (name == "String") { return getStringClass(); } else if (name == "Struct") { return getStructClass(); } else if (name == "Symbol") { return getSymbolClass(); } else if (name == "ThreadGroup") { return getThreadGroupClass(); } else if (name == "Time") { return getTimeClass(); } return null; }
49687 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49687/c7458ac1061bb236d4839296f3de89e6dcca1370/RubyClasses.java/clean/org/jruby/RubyClasses.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 19817, 3120, 4506, 322, 10565, 12, 780, 508, 13, 288, 3639, 508, 273, 508, 18, 267, 798, 5621, 3639, 309, 261, 529, 422, 315, 1076, 7923, 288, 5411, 327, 12634, 797, 5621, 3639, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 19817, 3120, 4506, 322, 10565, 12, 780, 508, 13, 288, 3639, 508, 273, 508, 18, 267, 798, 5621, 3639, 309, 261, 529, 422, 315, 1076, 7923, 288, 5411, 327, 12634, 797, 5621, 3639, 2...
public static final JType createArrayList(JType jType) { return new JCollectionType("java.util.ArrayList", jType);
public static final JType createArrayList(JType jType, boolean usejava50) { return new JCollectionType("java.util.ArrayList", jType, usejava50);
public static final JType createArrayList(JType jType) { return new JCollectionType("java.util.ArrayList", jType); }
3614 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3614/44087e16fa464906abff19b2390830195c60355f/SGTypes.java/buggy/castor/trunk/src/main/java/org/exolab/castor/builder/SGTypes.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 760, 727, 804, 559, 752, 19558, 12, 46, 559, 525, 559, 13, 288, 3639, 327, 394, 804, 2532, 559, 2932, 6290, 18, 1367, 18, 19558, 3113, 525, 559, 1769, 565, 289, 2, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 760, 727, 804, 559, 752, 19558, 12, 46, 559, 525, 559, 13, 288, 3639, 327, 394, 804, 2532, 559, 2932, 6290, 18, 1367, 18, 19558, 3113, 525, 559, 1769, 565, 289, 2, -100, -100, -...
private void internalRefreshAll(boolean updateLabels) { // the parent // in the code below, it is important to do all disassociates // before any associates, since a later disassociate can undo an // earlier associate // e.g. if (a, b) is replaced by (b, a), the disassociate of b to // item 1 could undo // the associate of b to item 0. Object[] children = getSortedChildren(getRoot()); TableItem[] items = getTable().getItems(); int min = Math.min(children.length, items.length); for (int i = 0; i < min; ++i) { TableItem item = items[i]; // if the element is unchanged, update its label if appropriate if (equals(children[i], item.getData())) { if (updateLabels) { updateItem(item, children[i]); } else { // associate the new element, even if equal to the old // one, // to remove stale references (see bug 31314) associate(children[i], item); } } else { // updateItem does an associate(...), which can mess up // the associations if the order of elements has changed. // E.g. (a, b) -> (b, a) first replaces a->0 with b->0, then // replaces b->1 with a->1, but this actually removes b->0. // So, if the object associated with this item has changed, // just disassociate it for now, and update it below. item.setText(""); //$NON-NLS-1$ item.setImage(new Image[Math.max(1,table.getColumnCount())]);//Clear all images disassociate(item); } } // dispose of all items beyond the end of the current elements if (min < items.length) { for (int i = items.length; --i >= min;) { disassociate(items[i]); } table.remove(min, items.length - 1); } // Workaround for 1GDGN4Q: ITPUI:WIN2000 - TableViewer icons get // scrunched if (table.getItemCount() == 0) { table.removeAll(); } // Update items which were removed above for (int i = 0; i < min; ++i) { TableItem item = items[i]; if (item.getData() == null) { updateItem(item, children[i]); } } // add any remaining elements for (int i = min; i < children.length; ++i) { createItem(children[i],i); } }
58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/72b02dfa9a75652d45af68d329d447e0e8bbe40d/TableViewer.java/clean/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/TableViewer.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 918, 2713, 8323, 1595, 12, 6494, 1089, 5888, 13, 288, 202, 202, 759, 326, 982, 202, 202, 759, 316, 326, 981, 5712, 16, 518, 353, 10802, 358, 741, 777, 1015, 7836, 815, 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, 2713, 8323, 1595, 12, 6494, 1089, 5888, 13, 288, 202, 202, 759, 326, 982, 202, 202, 759, 316, 326, 981, 5712, 16, 518, 353, 10802, 358, 741, 777, 1015, 7836, 815, 202, ...
AST tmp1169_AST_in = (AST)_t;
AST tmp1179_AST_in = (AST)_t;
public final void record_fields(AST _t) throws RecognitionException { AST record_fields_AST_in = (_t == ASTNULL) ? null : (AST)_t; if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case FIELDS: { AST __t1032 = _t; AST tmp1166_AST_in = (AST)_t; match(_t,FIELDS); _t = _t.getFirstChild(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case LEFTPAREN: { AST tmp1167_AST_in = (AST)_t; match(_t,LEFTPAREN); _t = _t.getNextSibling(); { _loop1037: do { if (_t==null) _t=ASTNULL; if ((_t.getType()==Field_ref)) { fld1(_t,CQ.SYMBOL); _t = _retTree; { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case WHEN: { AST __t1036 = _t; AST tmp1168_AST_in = (AST)_t; match(_t,WHEN); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t1036; _t = _t.getNextSibling(); break; } case RIGHTPAREN: case Field_ref: { break; } default: { throw new NoViableAltException(_t); } } } } else { break _loop1037; } } while (true); } AST tmp1169_AST_in = (AST)_t; match(_t,RIGHTPAREN); _t = _t.getNextSibling(); break; } case 3: { break; } default: { throw new NoViableAltException(_t); } } } _t = __t1032; _t = _t.getNextSibling(); break; } case EXCEPT: { AST __t1038 = _t; AST tmp1170_AST_in = (AST)_t; match(_t,EXCEPT); _t = _t.getFirstChild(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case LEFTPAREN: { AST tmp1171_AST_in = (AST)_t; match(_t,LEFTPAREN); _t = _t.getNextSibling(); { _loop1043: do { if (_t==null) _t=ASTNULL; if ((_t.getType()==Field_ref)) { fld1(_t,CQ.SYMBOL); _t = _retTree; { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case WHEN: { AST __t1042 = _t; AST tmp1172_AST_in = (AST)_t; match(_t,WHEN); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t1042; _t = _t.getNextSibling(); break; } case RIGHTPAREN: case Field_ref: { break; } default: { throw new NoViableAltException(_t); } } } } else { break _loop1043; } } while (true); } AST tmp1173_AST_in = (AST)_t; match(_t,RIGHTPAREN); _t = _t.getNextSibling(); break; } case 3: { break; } default: { throw new NoViableAltException(_t); } } } _t = __t1038; _t = _t.getNextSibling(); break; } default: { throw new NoViableAltException(_t); } } _retTree = _t; }
13952 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13952/f492fd11e745beb562b4e209643ba003aa8a6271/TreeParser01.java/clean/trunk/org.prorefactor.core/src/org/prorefactor/treeparser01/TreeParser01.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 727, 918, 1409, 67, 2821, 12, 9053, 389, 88, 13, 1216, 9539, 288, 9506, 202, 9053, 1409, 67, 2821, 67, 9053, 67, 267, 273, 261, 67, 88, 422, 9183, 8560, 13, 692, 446, 294, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 727, 918, 1409, 67, 2821, 12, 9053, 389, 88, 13, 1216, 9539, 288, 9506, 202, 9053, 1409, 67, 2821, 67, 9053, 67, 267, 273, 261, 67, 88, 422, 9183, 8560, 13, 692, 446, 294, ...
if ( metadataType.equals( GROUP_TYPE ) )
if ( metadataType.equals( MetadataRepositoryIndex.GROUP_METADATA ) )
private RepositoryMetadata getMetadata( String groupId, String artifactId, String version, String filename, String metadataType ) throws Exception { RepositoryMetadata repoMetadata = null; URL url; InputStream is = null; MetadataXpp3Reader metadataReader = new MetadataXpp3Reader(); //group metadata if ( metadataType.equals( GROUP_TYPE ) ) { url = new File( repository.getBasedir() + groupId.replace( '.', '/' ) + "/" + filename ).toURL(); is = url.openStream(); repoMetadata = new GroupRepositoryMetadata( groupId ); repoMetadata.setMetadata( metadataReader.read( new InputStreamReader( is ) ) ); } //artifact metadata else if ( metadataType.equals( ARTIFACT_TYPE ) ) { url = new File( repository.getBasedir() + groupId.replace( '.', '/' ) + "/" + artifactId + "/" + filename ).toURL(); is = url.openStream(); repoMetadata = new ArtifactRepositoryMetadata( getArtifact( groupId, artifactId, version ) ); repoMetadata.setMetadata( metadataReader.read( new InputStreamReader( is ) ) ); } //snapshot/version metadata else if ( metadataType.equals( SNAPSHOT_TYPE ) ) { url = new File( repository.getBasedir() + groupId.replace( '.', '/' ) + "/" + artifactId + "/" + version + "/" + filename ).toURL(); is = url.openStream(); repoMetadata = new SnapshotArtifactRepositoryMetadata( getArtifact( groupId, artifactId, version ) ); repoMetadata.setMetadata( metadataReader.read( new InputStreamReader( is ) ) ); } return repoMetadata; }
28441 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/28441/b06ee5cab37ea8091419fd4d369457271ce9c12f/MetadataRepositoryIndexingTest.java/clean/maven-repository-indexer/src/test/java/org/apache/maven/repository/indexing/MetadataRepositoryIndexingTest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 6281, 2277, 11159, 12, 514, 6612, 16, 514, 25496, 16, 514, 1177, 16, 514, 1544, 16, 4766, 5411, 514, 1982, 559, 262, 3639, 1216, 1185, 565, 288, 3639, 6281, 2277, 3538, 2277, 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, 6281, 2277, 11159, 12, 514, 6612, 16, 514, 25496, 16, 514, 1177, 16, 514, 1544, 16, 4766, 5411, 514, 1982, 559, 262, 3639, 1216, 1185, 565, 288, 3639, 6281, 2277, 3538, 2277, 273, ...
wait();
runningDecodesSync.wait();
public void encode(SplitfileBlock[] dataBlockStatus, SplitfileBlock[] checkBlockStatus, int blockLength, BucketFactory bf) throws IOException { // Encodes count as decodes. synchronized(runningDecodesSync) { while(runningDecodes >= PARALLEL_DECODES) { try { wait(); } catch (InterruptedException e) { // Ignore } } runningDecodes++; } try { // Run on a separate thread so we can tweak priority Encoder et = new Encoder(dataBlockStatus, checkBlockStatus, blockLength, bf); Thread t = new Thread(et, "Encoder thread for k="+k+", n="+n+" started at "+System.currentTimeMillis()); t.setDaemon(true); t.setPriority(Thread.MIN_PRIORITY); t.start(); synchronized(et) { while(!et.finished) { try { et.wait(10*1000); } catch (InterruptedException e) { // Ignore } } } et.throwException(); } finally { synchronized(runningDecodesSync) { runningDecodes--; } } }
46731 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46731/f3e8db3d18ab7fe6278e45269c4260e3bc7ea7aa/StandardOnionFECCodec.java/buggy/src/freenet/client/StandardOnionFECCodec.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 2017, 12, 5521, 768, 1768, 8526, 501, 1768, 1482, 16, 5385, 768, 1768, 8526, 866, 1768, 1482, 16, 509, 25367, 16, 7408, 1733, 16222, 13, 1216, 1860, 288, 202, 202, 759, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2017, 12, 5521, 768, 1768, 8526, 501, 1768, 1482, 16, 5385, 768, 1768, 8526, 866, 1768, 1482, 16, 509, 25367, 16, 7408, 1733, 16222, 13, 1216, 1860, 288, 202, 202, 759, 1...
private synchronized void updateStores() { if (fSession == null) { getSession(); } if (fStores != null) { closeStores(); } ServerArray prefs = ServerArray.GetMaster(); fStores = new ViewedStore[prefs.size()]; for (int i=0; i<prefs.size(); i++) { fStores[i] = createStore(i); } }
51996 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51996/2769f32da7bc2e7ccdde98f47e0c777769fb9113/StoreFactory.java/buggy/grendel/sources/grendel/ui/StoreFactory.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 3238, 3852, 918, 1089, 13125, 1435, 288, 565, 309, 261, 74, 2157, 422, 446, 13, 288, 1377, 7183, 5621, 565, 289, 565, 309, 261, 74, 13125, 480, 446, 13, 288, 1377, 1746, 13125, 5621, 56...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3852, 918, 1089, 13125, 1435, 288, 565, 309, 261, 74, 2157, 422, 446, 13, 288, 1377, 7183, 5621, 565, 289, 565, 309, 261, 74, 13125, 480, 446, 13, 288, 1377, 1746, 13125, 5621, 56...
&& misfiredTriggers.length > getMaxMisfiresToHandleAtATime()) getLog() .info(
&& misfiredTriggers.length > getMaxMisfiresToHandleAtATime()) { getLog().info(
protected boolean recoverMisfiredJobs(Connection conn, boolean recovering) throws JobPersistenceException, NoSuchDelegateException, SQLException, ClassNotFoundException, IOException { Key[] misfiredTriggers = getDelegate().selectTriggersInState(conn, STATE_MISFIRED); if (misfiredTriggers.length > 0 && misfiredTriggers.length > getMaxMisfiresToHandleAtATime()) getLog() .info( "Handling " + getMaxMisfiresToHandleAtATime() + " of " + misfiredTriggers.length + " triggers that missed their scheduled fire-time."); else if (misfiredTriggers.length > 0) getLog().info( "Handling " + misfiredTriggers.length + " triggers that missed their scheduled fire-time."); else getLog().debug( "Found 0 triggers that missed their scheduled fire-time."); lastRecoverCount = misfiredTriggers.length; for (int i = 0; i < misfiredTriggers.length && i < getMaxMisfiresToHandleAtATime(); i++) { Trigger trig = getDelegate().selectTrigger(conn, misfiredTriggers[i].getName(), misfiredTriggers[i].getGroup()); if (trig == null) continue; Calendar cal = null; if (trig.getCalendarName() != null) cal = retrieveCalendar(conn, null, trig.getCalendarName()); String[] listeners = getDelegate().selectTriggerListeners(conn, trig.getName(), trig.getGroup()); for (int l = 0; l < listeners.length; ++l) { trig.addTriggerListener(listeners[l]); } signaler.notifyTriggerListenersMisfired(trig); trig.updateAfterMisfire(cal); if (trig.getNextFireTime() == null) storeTrigger(conn, null, trig, null, true, STATE_COMPLETE, false, recovering); else storeTrigger(conn, null, trig, null, true, STATE_WAITING, false, recovering); } if (misfiredTriggers.length > getMaxMisfiresToHandleAtATime()) return true; return false; }
15562 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15562/f6eeea5a952e67d6b7fc8b54ae64d0b9e7098a98/JobStoreSupport.java/clean/src/java/org/quartz/impl/jdbcjobstore/JobStoreSupport.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 1250, 5910, 49, 7396, 2921, 7276, 12, 1952, 1487, 16, 1250, 5910, 310, 13, 5411, 1216, 3956, 13182, 503, 16, 5823, 9586, 503, 16, 5411, 6483, 16, 10403, 16, 1860, 288, 3639, 1929, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 1250, 5910, 49, 7396, 2921, 7276, 12, 1952, 1487, 16, 1250, 5910, 310, 13, 5411, 1216, 3956, 13182, 503, 16, 5823, 9586, 503, 16, 5411, 6483, 16, 10403, 16, 1860, 288, 3639, 1929, ...
Location result = (Location) ((ResultsRow) cl.findLocations(Chromosome.class, Contig.class).next()).get(2);
Iterator chrContigIter = CalculateLocations.findLocations(osw.getObjectStore(), Chromosome.class, Contig.class); Location result = (Location) ((ResultsRow) chrContigIter.next()).get(2);
public void testContigToSupercontig() throws Exception { Set toStore = new HashSet(Arrays.asList(new Object[] {getChromosome(), getChromosomeBand(), getBandOnChr()})); Supercontig sc = (Supercontig) DynamicUtil.createObject(Collections.singleton(Supercontig.class)); Contig c = (Contig) DynamicUtil.createObject(Collections.singleton(Contig.class)); sc.setId(new Integer(104)); c.setId(new Integer(105)); Location scOnChr = createLocation(getChromosome(), sc, 1, 1201, 1600); Location contigOnSc = createLocation(sc, c, 1, 101, 350); toStore.add(sc); toStore.add(c); toStore.add(scOnChr); toStore.add(contigOnSc); //Source source = iw.getMainSource("genomic-test"); //Source skelSource = iw.getSkeletonSource("genomic-test"); Iterator i = toStore.iterator(); while (i.hasNext()) { osw.store((InterMineObject) i.next()); } CalculateLocations cl = new CalculateLocations(osw); cl.createLocations(); // test contig location on chromosome Location expected = createLocation(getChromosome(), c, 1, 1301, 1550); expected.setId(new Integer(0)); Item expItem = FullRenderer.toItem(expected, model); Location result = (Location) ((ResultsRow) cl.findLocations(Chromosome.class, Contig.class).next()).get(2); Item resItem = FullRenderer.toItem(result, model); resItem.setIdentifier("0"); assertEquals(expItem, resItem); // test contig location on ChromosomeBand expected = createLocation(getChromosomeBand(), c, 1, 301, 550); expected.setId(new Integer(0)); expItem = FullRenderer.toItem(expected, model); result = (Location) ((ResultsRow) cl.findLocations(ChromosomeBand.class, Contig.class).next()).get(2); resItem = FullRenderer.toItem(result, model); resItem.setIdentifier("0"); assertEquals(expItem, resItem); }
29158 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/29158/29227f0ba7639e148be613907fd5e8178603c022/CalculateLocationsTest.java/clean/flymine/model/genomic/src/test/org/flymine/postprocess/CalculateLocationsTest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1842, 660, 360, 774, 8051, 26075, 1435, 1216, 1185, 288, 3639, 1000, 358, 2257, 273, 394, 6847, 12, 12726, 18, 345, 682, 12, 2704, 1033, 8526, 288, 588, 30761, 16958, 9334, 336...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 660, 360, 774, 8051, 26075, 1435, 1216, 1185, 288, 3639, 1000, 358, 2257, 273, 394, 6847, 12, 12726, 18, 345, 682, 12, 2704, 1033, 8526, 288, 588, 30761, 16958, 9334, 336...
sb.append( "-box(" + x + "," + y + ")-(" + width + "x" + height + ")" );
sb.append("-box(" + x + "," + y + ")-(" + width + "x" + height + ")");
public String getTestString() { StringBuffer sb = new StringBuffer(); // type if ( this instanceof LineBox ) { sb.append( "line:" ); } else if ( this instanceof InlineBox ) { sb.append( "inline:" ); } else { sb.append( "box:" ); } // dimensions and location sb.append( "-box(" + x + "," + y + ")-(" + width + "x" + height + ")" ); if ( fixed ) { sb.append( "-fixed" ); } if ( absolute ) { sb.append( "-absolute" ); } sb.append( "-pos(" + top + "," + right + "," + bottom + "," + left + ")" ); if ( floated ) { sb.append( "-floated" ); } // insets sb.append("\n"); sb.append(" margin = " + this.margin +"\n"); sb.append(" border = " + this.border +"\n"); sb.append(" padding = " + this.padding +"\n"); // background images sb.append( "-backimg(" + background_image ); sb.append( "-" + repeat ); sb.append( "-" + attachment ); sb.append( "-" + background_position_vertical ); sb.append( "-" + background_position_horizontal + ")" ); return sb.toString(); }
52947 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52947/8f81e5fe9f6f8593d3c596d30a3f100cb87dbf27/Box.java/clean/src/java/org/xhtmlrenderer/render/Box.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 514, 29384, 780, 1435, 288, 3639, 6674, 2393, 273, 394, 6674, 5621, 3639, 368, 618, 3639, 309, 261, 333, 1276, 5377, 3514, 262, 288, 5411, 2393, 18, 6923, 12, 315, 1369, 2773, 11272...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 514, 29384, 780, 1435, 288, 3639, 6674, 2393, 273, 394, 6674, 5621, 3639, 368, 618, 3639, 309, 261, 333, 1276, 5377, 3514, 262, 288, 5411, 2393, 18, 6923, 12, 315, 1369, 2773, 11272...
public RubyArray instance_variables() { ArrayList names = new ArrayList(); for(Iterator iter = getInstanceVariablesSnapshot().keySet().iterator();iter.hasNext();) { String name = (String) iter.next(); // Do not include constants which also get stored in instance var list in classes. if (!Character.isUpperCase(name.charAt(0))) { names.add(getRuntime().newString(name)); } } return getRuntime().newArray(names); }
52337 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52337/c8b66db475de1dc66f347884891dd70d9943689b/RubyObject.java/clean/src/org/jruby/RubyObject.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 19817, 1076, 791, 67, 7528, 1435, 288, 3639, 2407, 1257, 273, 394, 2407, 5621, 3639, 364, 12, 3198, 1400, 273, 3694, 6158, 4568, 7675, 856, 694, 7675, 9838, 5621, 2165, 18, 5332, 21...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 19817, 1076, 791, 67, 7528, 1435, 288, 3639, 2407, 1257, 273, 394, 2407, 5621, 3639, 364, 12, 3198, 1400, 273, 3694, 6158, 4568, 7675, 856, 694, 7675, 9838, 5621, 2165, 18, 5332, 21...
int offset = ((IDocumentAttribute)attr).getValueOffset() + value.indexOf(group) + attr.getValue().indexOf(value);
int offset = ((IDocumentAttribute)attr).getValueOffset() + value.indexOf(group); int attOffset = attr.getValue().indexOf(value); if (attOffset != -1) offset += attOffset;
private void checkMatch(IPluginAttribute attr, IFile file) { String value = null; Matcher matcher = null; if (fSearchFor == S_FOR_TYPES) { value = attr.getValue(); matcher = getMatcher(value); } if (value == null || (matcher != null && !matcher.matches()) ){ value = getProperValue(attr.getValue()); matcher = getMatcher(value); } if (matcher.matches()) { String group = matcher.group(0); int offset = ((IDocumentAttribute)attr).getValueOffset() + value.indexOf(group) + attr.getValue().indexOf(value); int length = group.length(); fSearchRequestor.reportMatch(new Match(file, Match.UNIT_CHARACTER, offset, length)); } }
8783 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8783/cf890111d2e295c84879813774721a2301aae78f/ClassSearchParticipant.java/clean/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/search/ClassSearchParticipant.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 918, 866, 2060, 12, 45, 3773, 1499, 1604, 16, 467, 812, 585, 13, 288, 202, 202, 780, 460, 273, 446, 31, 202, 202, 6286, 4546, 273, 446, 31, 202, 202, 430, 261, 74, 2979, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 866, 2060, 12, 45, 3773, 1499, 1604, 16, 467, 812, 585, 13, 288, 202, 202, 780, 460, 273, 446, 31, 202, 202, 6286, 4546, 273, 446, 31, 202, 202, 430, 261, 74, 2979, ...
for (Iterator i = FeatureStream.iterator(); i.hasNext();) {
for (Iterator i = linguist.getFeatureStreams(); i.hasNext();) {
private void prune() { pruneTimer.start(); debugPrint("Pruning"); if (doFeaturePruning) { for (Iterator i = FeatureStream.iterator(); i.hasNext();) { FeatureStream stream = (FeatureStream) i.next(); debugPrint(" ActiveList, " + stream.getName() + ": " + stream.getActiveList().size()); stream.setActiveList (featureScorePruner.prune(stream.getActiveList())); debugPrint(" ActiveList, " + stream.getName() + ": " + stream.getActiveList().size()); } } debugPrint(" done Pruning"); pruneTimer.stop(); }
48839 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48839/f9ac364ceffffb4c07a0409366d6f26d8028b996/ParallelSearchManager.java/buggy/sphinx4/edu/cmu/sphinx/research/parallel/ParallelSearchManager.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 13293, 1435, 288, 202, 28545, 6777, 18, 1937, 5621, 3639, 1198, 5108, 2932, 2050, 13036, 8863, 202, 430, 261, 2896, 4595, 2050, 13036, 13, 288, 202, 565, 364, 261, 3198, 277, 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, 3238, 918, 13293, 1435, 288, 202, 28545, 6777, 18, 1937, 5621, 3639, 1198, 5108, 2932, 2050, 13036, 8863, 202, 430, 261, 2896, 4595, 2050, 13036, 13, 288, 202, 565, 364, 261, 3198, 277, 2...
try { position++; bCodeStream[classFileOffset++] = OPC_ldiv; } catch (IndexOutOfBoundsException e) { resizeByteArray(OPC_ldiv);
if (classFileOffset >= bCodeStream.length) { resizeByteArray();
final public void ldiv() { if (DEBUG) System.out.println(position + "\t\tldiv"); //$NON-NLS-1$ countLabels = 0; stackDepth -= 2; try { position++; bCodeStream[classFileOffset++] = OPC_ldiv; } catch (IndexOutOfBoundsException e) { resizeByteArray(OPC_ldiv); }}
10698 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10698/3a562aaf09f9f323b583086b80b4683378886606/CodeStream.java/buggy/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 727, 1071, 918, 328, 2892, 1435, 288, 202, 430, 261, 9394, 13, 2332, 18, 659, 18, 8222, 12, 3276, 397, 1548, 88, 64, 88, 1236, 427, 8863, 4329, 3993, 17, 5106, 17, 21, 8, 202, 1883, 5888, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 727, 1071, 918, 328, 2892, 1435, 288, 202, 430, 261, 9394, 13, 2332, 18, 659, 18, 8222, 12, 3276, 397, 1548, 88, 64, 88, 1236, 427, 8863, 4329, 3993, 17, 5106, 17, 21, 8, 202, 1883, 5888, ...
protected String getPersistedEncoding( Object element ) { if ( element instanceof IStorageEditorInput ) { IStorage storage; try { storage = ( (IStorageEditorInput) element ).getStorage( ); if ( storage instanceof IEncodedStorage ) return ( (IEncodedStorage) storage ).getCharset( ); } catch ( CoreException e ) { return null; } } return null; }
abstract protected String getPersistedEncoding( Object element );
protected String getPersistedEncoding( Object element ) { if ( element instanceof IStorageEditorInput ) { IStorage storage; try { storage = ( (IStorageEditorInput) element ).getStorage( ); if ( storage instanceof IEncodedStorage ) return ( (IEncodedStorage) storage ).getCharset( ); } catch ( CoreException e ) { return null; } } return null; }
5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/6f2cf7b4fd162793a87225de7707b5275d4356a3/DocumentProvider.java/buggy/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/editors/DocumentProvider.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1117, 514, 1689, 2462, 329, 4705, 12, 1033, 930, 262, 202, 95, 202, 202, 430, 261, 930, 1276, 467, 3245, 6946, 1210, 262, 202, 202, 95, 1082, 202, 45, 3245, 2502, 31, 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, 1117, 514, 1689, 2462, 329, 4705, 12, 1033, 930, 262, 202, 95, 202, 202, 430, 261, 930, 1276, 467, 3245, 6946, 1210, 262, 202, 202, 95, 1082, 202, 45, 3245, 2502, 31, 1082, 202, ...
Object resultCars = getCars.invoke(action, null); assertEquals(Arrays.asList(new String[]{"renault", "fiat"}), resultCars);
String[] resultCars = (String[]) getCars.invoke(action, null); String[] expectedCars = new String[]{"renault", "fiat"}; assertEquals(Arrays.asList(expectedCars), Arrays.asList(resultCars));
public void testParametersShouldBeSetAndExecuteInvokedOnGroovyAction() throws IOException, ServletException, NoSuchMethodException, IllegalAccessException, InvocationTargetException { // url params Map parameterMap = new HashMap(); parameterMap.put("year", "2003"); parameterMap.put("cars", new String[]{"renault", "fiat"}); requestMock.expectAndReturn("getParameterMap", parameterMap); // path, action and view requestMock.expectAndReturn("getServletPath", "/test.groovy"); requestMock.expect("setAttribute", C.args(C.eq("action"), C.isA(Object.class))); requestMock.expectAndReturn("getRequestDispatcher", C.args(C.eq("/test_success.vm")), requestDispatcherMock.proxy()); nanoServlet.service((HttpServletRequest)requestMock.proxy(), (HttpServletResponse)responseMock.proxy()); // assertions Object action = requestContainer.getComponentInstance("/test.groovy"); Method getYear = action.getClass().getMethod("getYear", null); Object resultYear = getYear.invoke(action, null); assertEquals("2003", resultYear); Method getCars = action.getClass().getMethod("getCars", null); Object resultCars = getCars.invoke(action, null); assertEquals(Arrays.asList(new String[]{"renault", "fiat"}), resultCars); verifyMocks(); }
14040 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/14040/1773ae9d68e9eee5e3a13ba200cc6ee01377a610/NanoWebServletTestCase.java/buggy/java/nanoweb/src/test/org/nanocontainer/nanoweb/NanoWebServletTestCase.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1842, 2402, 14309, 1919, 694, 1876, 5289, 26215, 1398, 43, 12859, 1803, 1435, 1216, 1860, 16, 16517, 16, 15959, 16, 11900, 16, 15342, 288, 3639, 368, 880, 859, 3639, 1635, 1569, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2402, 14309, 1919, 694, 1876, 5289, 26215, 1398, 43, 12859, 1803, 1435, 1216, 1860, 16, 16517, 16, 15959, 16, 11900, 16, 15342, 288, 3639, 368, 880, 859, 3639, 1635, 1569, ...
PeerNode[] peerNodes = node.getDarknetConnections();
PeerNodeStatus[] peerNodeStatuses = node.getPeerNodeStatuses();
public void handleGet(URI uri, ToadletContext ctx) throws ToadletContextClosedException, IOException, RedirectException { String path = uri.getPath(); if(path.endsWith("myref.txt")) { SimpleFieldSet fs = node.exportPublicFieldSet(); StringWriter sw = new StringWriter(); fs.writeTo(sw); this.writeReply(ctx, 200, "text/plain", "OK", sw.toString()); return; } final boolean advancedEnabled = node.getToadletContainer().isAdvancedDarknetEnabled(); /* gather connection statistics */ PeerNode[] peerNodes = node.getDarknetConnections(); Arrays.sort(peerNodes, new Comparator() { public int compare(Object first, Object second) { PeerNode firstNode = (PeerNode) first; PeerNode secondNode = (PeerNode) second; int statusDifference = firstNode.getPeerNodeStatus() - secondNode.getPeerNodeStatus(); if (statusDifference != 0) { return statusDifference; } return firstNode.getName().compareTo(secondNode.getName()); } }); /* copy peer node statuses for consistent display. */ int[] peerNodeStatuses = new int[peerNodes.length]; for (int peerIndex = 0, peerCount = peerNodes.length; peerIndex < peerCount; peerIndex++) { peerNodeStatuses[peerIndex] = peerNodes[peerIndex].getPeerNodeStatus(); } int numberOfConnected = getPeerStatusCount(peerNodeStatuses, Node.PEER_NODE_STATUS_CONNECTED); int numberOfRoutingBackedOff = getPeerStatusCount(peerNodeStatuses, Node.PEER_NODE_STATUS_ROUTING_BACKED_OFF); int numberOfTooNew = getPeerStatusCount(peerNodeStatuses, Node.PEER_NODE_STATUS_TOO_NEW); int numberOfTooOld = getPeerStatusCount(peerNodeStatuses, Node.PEER_NODE_STATUS_TOO_OLD); int numberOfDisconnected = getPeerStatusCount(peerNodeStatuses, Node.PEER_NODE_STATUS_DISCONNECTED); int numberOfNeverConnected = getPeerStatusCount(peerNodeStatuses, Node.PEER_NODE_STATUS_NEVER_CONNECTED); int numberOfDisabled = getPeerStatusCount(peerNodeStatuses, Node.PEER_NODE_STATUS_DISABLED); int numberOfBursting = getPeerStatusCount(peerNodeStatuses, Node.PEER_NODE_STATUS_BURSTING); int numberOfListening = getPeerStatusCount(peerNodeStatuses, Node.PEER_NODE_STATUS_LISTENING); int numberOfListenOnly = getPeerStatusCount(peerNodeStatuses, Node.PEER_NODE_STATUS_LISTEN_ONLY); int numberOfSimpleConnected = numberOfConnected + numberOfRoutingBackedOff; int numberOfNotConnected = numberOfTooNew + numberOfTooOld + numberOfDisconnected + numberOfNeverConnected + numberOfDisabled + numberOfBursting + numberOfListening + numberOfListenOnly; String titleCountString = null; if(advancedEnabled) { titleCountString = "(" + numberOfConnected + "/" + numberOfRoutingBackedOff + "/" + numberOfTooNew + "/" + numberOfTooOld + "/" + numberOfNotConnected + ")"; } else { titleCountString = String.valueOf(numberOfSimpleConnected); } HTMLNode pageNode = ctx.getPageMaker().getPageNode(titleCountString + " Darknet Peers of " + node.getMyName()); HTMLNode contentNode = ctx.getPageMaker().getContentNode(pageNode); // FIXME! We need some nice images long now = System.currentTimeMillis(); contentNode.addChild(node.alerts.createSummary()); /* node status values */ int bwlimitDelayTime = (int) node.getBwlimitDelayTime(); int nodeAveragePingTime = (int) node.getNodeAveragePingTime(); int networkSizeEstimate = node.getNetworkSizeEstimate(0); DecimalFormat fix4 = new DecimalFormat("0.0000"); double missRoutingDistance = node.missRoutingDistance.currentValue(); DecimalFormat fix1 = new DecimalFormat("##0.0%"); double backedoffPercent = node.backedoffPercent.currentValue(); String nodeUptimeString = timeIntervalToString(( now - node.startupTime ) / 1000); // BEGIN OVERVIEW TABLE HTMLNode overviewTable = contentNode.addChild("table", "class", "column"); HTMLNode overviewTableRow = overviewTable.addChild("tr"); HTMLNode nextTableCell = overviewTableRow.addChild("td", "class", "first"); /* node status overview box */ if(advancedEnabled) { HTMLNode overviewInfobox = nextTableCell.addChild("div", "class", "infobox"); overviewInfobox.addChild("div", "class", "infobox-header", "Node status overview"); HTMLNode overviewInfoboxContent = overviewInfobox.addChild("div", "class", "infobox-content"); HTMLNode overviewList = overviewInfoboxContent.addChild("ul"); overviewList.addChild("li", "bwlimitDelayTime:\u00a0" + bwlimitDelayTime + "ms"); overviewList.addChild("li", "nodeAveragePingTime:\u00a0" + nodeAveragePingTime + "ms"); overviewList.addChild("li", "networkSizeEstimate:\u00a0" + networkSizeEstimate + "\u00a0nodes"); overviewList.addChild("li", "nodeUptime:\u00a0" + nodeUptimeString); overviewList.addChild("li", "missRoutingDistance:\u00a0" + fix4.format(missRoutingDistance)); overviewList.addChild("li", "backedoffPercent:\u00a0" + fix1.format(backedoffPercent)); nextTableCell = overviewTableRow.addChild("td"); } // Activity box int numInserts = node.getNumInserts(); int numRequests = node.getNumRequests(); int numTransferringRequests = node.getNumTransferringRequests(); int numARKFetchers = node.getNumARKFetchers(); HTMLNode activityInfobox = nextTableCell.addChild("div", "class", "infobox"); activityInfobox.addChild("div", "class", "infobox-header", "Current activity"); HTMLNode activityInfoboxContent = activityInfobox.addChild("div", "class", "infobox-content"); if ((numInserts == 0) && (numRequests == 0) && (numTransferringRequests == 0) && (numARKFetchers == 0)) { activityInfoboxContent.addChild("#", "Your node is not processing any requests right now."); } else { HTMLNode activityList = activityInfoboxContent.addChild("ul", "id", "activity"); if (numInserts > 0) { activityList.addChild("li", "Inserts:\u00a0" + numInserts); } if (numRequests > 0) { activityList.addChild("li", "Requests:\u00a0" + numRequests); } if (numTransferringRequests > 0) { activityList.addChild("li", "Transferring\u00a0Requests:\u00a0" + numTransferringRequests); } if (advancedEnabled) { if (numARKFetchers > 0) { activityList.addChild("li", "ARK\u00a0Fetch\u00a0Requests:\u00a0" + numARKFetchers); } } } nextTableCell = advancedEnabled ? overviewTableRow.addChild("td") : overviewTableRow.addChild("td", "class", "last"); // Peer statistics box HTMLNode peerStatsInfobox = nextTableCell.addChild("div", "class", "infobox"); peerStatsInfobox.addChild("div", "class", "infobox-header", "Peer statistics"); HTMLNode peerStatsContent = peerStatsInfobox.addChild("div", "class", "infobox-content"); HTMLNode peerStatsList = peerStatsContent.addChild("ul"); if (numberOfConnected > 0) { peerStatsList.addChild("li").addChild("span", "class", "peer_connected", "Connected:\u00a0" + numberOfConnected); } if (numberOfRoutingBackedOff > 0) { peerStatsList.addChild("li").addChild("span", "class", "peer_backedoff", (advancedEnabled ? "Backed off" : "Busy") + ":\u00a0" + numberOfRoutingBackedOff); } if (numberOfTooNew > 0) { peerStatsList.addChild("li").addChild("span", "class", "peer_too_new", "Too new:\u00a0" + numberOfTooNew); } if (numberOfTooOld > 0) { peerStatsList.addChild("li").addChild("span", "class", "peer_too_old", "Too old:\u00a0" + numberOfTooOld); } if (numberOfDisconnected > 0) { peerStatsList.addChild("li").addChild("span", "class", "peer_disconnected", "Disconnected:\u00a0" + numberOfDisconnected); } if (numberOfNeverConnected > 0) { peerStatsList.addChild("li").addChild("span", "class", "peer_never_connected", "Never Connected:\u00a0" + numberOfNeverConnected); } if (numberOfDisabled > 0) { peerStatsList.addChild("li").addChild("span", "class", "peer_never_connected", "Disabled:\u00a0" + numberOfDisabled); /* TODO */ } if (numberOfBursting > 0) { peerStatsList.addChild("li").addChild("span", "class", "peer_never_connected", "Bursting:\u00a0" + numberOfBursting); /* TODO */ } if (numberOfListening > 0) { peerStatsList.addChild("li").addChild("span", "class", "peer_never_connected", "Listening:\u00a0" + numberOfListening); /* TODO */ } if (numberOfListenOnly > 0) { peerStatsList.addChild("li").addChild("span", "class", "peer_never_connected", "Listen Only:\u00a0" + numberOfListenOnly); /* TODO */ } // Peer routing backoff reason box if(advancedEnabled) { nextTableCell = overviewTableRow.addChild("td", "class", "last"); HTMLNode backoffReasonInfobox = nextTableCell.addChild("div", "class", "infobox"); backoffReasonInfobox.addChild("div", "class", "infobox-header", "Peer backoff reasons"); HTMLNode backoffReasonContent = backoffReasonInfobox.addChild("div", "class", "infobox-content"); String [] routingBackoffReasons = node.getPeerNodeRoutingBackoffReasons(); if(routingBackoffReasons.length == 0) { backoffReasonContent.addChild("#", "Good, your node is not backed off from any peers!"); } else { HTMLNode reasonList = backoffReasonContent.addChild("ul"); for(int i=0;i<routingBackoffReasons.length;i++) { int reasonCount = node.getPeerNodeRoutingBackoffReasonSize(routingBackoffReasons[i]); if(reasonCount > 0) { reasonList.addChild("li", routingBackoffReasons[i] + '\u00a0' + reasonCount); } } } } // END OVERVIEW TABLE // BEGIN PEER TABLE HTMLNode peerTableInfobox = contentNode.addChild("div", "class", "infobox infobox-normal"); HTMLNode peerTableInfoboxHeader = peerTableInfobox.addChild("div", "class", "infobox-header"); peerTableInfoboxHeader.addChild("#", "My peers"); if (advancedEnabled) { if (!path.endsWith("displaymessagetypes.html")) { peerTableInfoboxHeader.addChild("#", " "); peerTableInfoboxHeader.addChild("a", "href", "displaymessagetypes.html", "(more detailed)"); } } HTMLNode peerTableInfoboxContent = peerTableInfobox.addChild("div", "class", "infobox-content"); if (peerNodes.length == 0) { peerTableInfoboxContent.addChild("#", "Freenet can not work as you have not added any peers so far. Please go to the "); peerTableInfoboxContent.addChild("a", "href", "/", "node homepage"); peerTableInfoboxContent.addChild("#", " and read the top infobox to see how it is done."); } else { HTMLNode peerForm = peerTableInfoboxContent.addChild("form", new String[] { "action", "method", "enctype" }, new String[] { ".", "post", "multipart/form-data" }); peerForm.addChild("input", new String[] { "type", "name", "value" }, new String[] { "hidden", "formPassword", node.formPassword }); HTMLNode peerTable = peerForm.addChild("table", "class", "darknet_connections"); HTMLNode peerTableHeaderRow = peerTable.addChild("tr"); peerTableHeaderRow.addChild("th"); peerTableHeaderRow.addChild("th", "Status"); peerTableHeaderRow.addChild("th").addChild("span", new String[] { "title", "style" }, new String[] { "Click on the nodename link to send N2NTM", "border-bottom: 1px dotted; cursor: help;" }, "Name"); if (advancedEnabled) { peerTableHeaderRow.addChild("th").addChild("span", new String[] { "title", "style" }, new String[] { "Address:Port", "border-bottom: 1px dotted; cursor: help;" }, "Address"); } peerTableHeaderRow.addChild("th", "Version"); if (advancedEnabled) { peerTableHeaderRow.addChild("th", "Location"); peerTableHeaderRow.addChild("th").addChild("span", new String[] { "title", "style" }, new String[] { "Temporarily disconnected. Other node busy? Wait time(s) remaining/total", "border-bottom: 1px dotted; cursor: help;" }, "Backoff"); } peerTableHeaderRow.addChild("th").addChild("span", new String[] { "title", "style" }, new String[] { "How long since the node connected or was last seen", "border-bottom: 1px dotted; cursor: help;" }, "Connected\u00a0/\u00a0Idle"); for (int peerIndex = 0, peerCount = peerNodes.length; peerIndex < peerCount; peerIndex++) { PeerNode peerNode = peerNodes[peerIndex]; HTMLNode peerRow = peerTable.addChild("tr"); // check box column peerRow.addChild("td", "class", "peer-marker").addChild("input", new String[] { "type", "name" }, new String[] { "checkbox", "node_" + peerNode.hashCode() }); // status column String statusString = peerNode.getPeerNodeStatusString(); if (!advancedEnabled && (peerNode.getPeerNodeStatus() == Node.PEER_NODE_STATUS_ROUTING_BACKED_OFF)) { statusString = "BUSY"; } peerRow.addChild("td", "class", "peer-status").addChild("span", "class", peerNode.getPeerNodeStatusCSSClassName(), statusString + (peerNode.isFetchingARK() ? "*" : "")); // name column if (peerNode.isConnected() && (Integer.parseInt(peerNode.getSimpleVersion()) > 476)) { peerRow.addChild("td", "class", "peer-name").addChild("a", "href", "/send_n2ntm/?peernode_hashcode=" + peerNode.hashCode(), peerNode.getName()); } else { peerRow.addChild("td", "class", "peer-name").addChild("#", peerNode.getName()); } // address column if (advancedEnabled) { String pingTime = ""; if (peerNode.isConnected()) { pingTime = " (" + String.valueOf((int) peerNode.averagePingTime()) + "ms)"; } peerRow.addChild("td", "class", "peer-address").addChild("#", ((peerNode.getDetectedPeer() != null) ? (peerNode.getDetectedPeer().toString()) : ("(unknown address)")) + pingTime); } // version column if (peerNode.publicReverseInvalidVersion()) { peerRow.addChild("td", "class", "peer-version").addChild("span", "class", "peer_too_new", advancedEnabled ? peerNode.getVersion() : peerNode.getSimpleVersion()); } else { peerRow.addChild("td", "class", "peer-version").addChild("#", advancedEnabled ? peerNode.getVersion() : peerNode.getSimpleVersion()); } // location column if (advancedEnabled) { peerRow.addChild("td", "class", "peer-location", String.valueOf(peerNode.getLocation().getValue())); } // backoff column if (advancedEnabled) { HTMLNode backoffCell = peerRow.addChild("td", "class", "peer-backoff"); backoffCell.addChild("#", fix1.format(peerNode.backedOffPercent.currentValue())); int backoff = (int) (Math.max(peerNode.getRoutingBackedOffUntil() - now, 0)); // Don't list the backoff as zero before it's actually zero if ((backoff > 0) && (backoff < 1000)) { backoff = 1000; } backoffCell.addChild("#", " " + String.valueOf(backoff / 1000) + "/" + String.valueOf(peerNode.getRoutingBackoffLength() / 1000)); backoffCell.addChild("#", (peerNode.getLastBackoffReason() == null) ? "" : ("/" + (peerNode.getLastBackoffReason()))); } // idle column long idle = peerNode.timeLastRoutable(); if(peerNode.isRoutable()) { idle = peerNode.timeLastConnectionCompleted(); } else if(peerNodeStatuses[peerIndex] == Node.PEER_NODE_STATUS_NEVER_CONNECTED) { idle = peerNode.getPeerAddedTime(); } peerRow.addChild("td", "class", "peer-idle", idleToString(now, idle)); if (path.endsWith("displaymessagetypes.html")) { HTMLNode messageCountRow = peerTable.addChild("tr", "class", "message-status"); messageCountRow.addChild("td", "colspan", "2"); HTMLNode messageCountCell = messageCountRow.addChild("td", "colspan", String.valueOf(advancedEnabled ? 6 : 3)); HTMLNode messageCountTable = messageCountCell.addChild("table", "class", "message-count"); HTMLNode countHeaderRow = messageCountTable.addChild("tr"); countHeaderRow.addChild("th", "Message"); countHeaderRow.addChild("th", "Incoming"); countHeaderRow.addChild("th", "Outgoing"); List messageNames = new ArrayList(); Map messageCounts = new HashMap(); for (Iterator incomingMessages = peerNode.getLocalNodeReceivedMessagesFromStatistic().keySet().iterator(); incomingMessages.hasNext(); ) { String messageName = (String) incomingMessages.next(); messageNames.add(messageName); Long messageCount = (Long) peerNode.getLocalNodeReceivedMessagesFromStatistic().get(messageName); messageCounts.put(messageName, new Long[] { messageCount, new Long(0) }); } for (Iterator outgoingMessages = peerNode.getLocalNodeSentMessagesToStatistic().keySet().iterator(); outgoingMessages.hasNext(); ) { String messageName = (String) outgoingMessages.next(); if (!messageNames.contains(messageName)) { messageNames.add(messageName); } Long messageCount = (Long) peerNode.getLocalNodeSentMessagesToStatistic().get(messageName); Long[] existingCounts = (Long[]) messageCounts.get(messageName); if (existingCounts == null) { messageCounts.put(messageName, new Long[] { new Long(0), messageCount }); } else { existingCounts[1] = messageCount; } } Collections.sort(messageNames, new Comparator() { public int compare(Object first, Object second) { return ((String) first).compareToIgnoreCase((String) second); } }); for (Iterator messageNamesIterator = messageNames.iterator(); messageNamesIterator.hasNext(); ) { String messageName = (String) messageNamesIterator.next(); Long[] messageCount = (Long[]) messageCounts.get(messageName); HTMLNode messageRow = messageCountTable.addChild("tr"); messageRow.addChild("td", messageName); messageRow.addChild("td", "class", "right-align", String.valueOf(messageCount[0])); messageRow.addChild("td", "class", "right-align", String.valueOf(messageCount[1])); } } } if(!advancedEnabled) { peerForm.addChild("input", new String[] { "type", "name", "value" }, new String[] { "submit", "remove", "Remove selected peers" }); } else { HTMLNode actionSelect = peerForm.addChild("select", "name", "action"); actionSelect.addChild("option", "value", "", "-- Select action --"); actionSelect.addChild("option", "value", "enable", "Enable selected peers"); actionSelect.addChild("option", "value", "disable", "Disable selected peers"); actionSelect.addChild("option", "value", "set_burst_only", "On selected peers, set BurstOnly"); actionSelect.addChild("option", "value", "clear_burst_only", "On selected peers, clear BurstOnly"); actionSelect.addChild("option", "value", "set_listen_only", "On selected peers, set ListenOnly"); actionSelect.addChild("option", "value", "clear_listen_only", "On selected peers, clear ListenOnly"); actionSelect.addChild("option", "value", "", "-- -- --"); actionSelect.addChild("option", "value", "remove", "Remove selected peers"); peerForm.addChild("input", new String[] { "type", "name", "value" }, new String[] { "submit", "submit", "Go" }); } } // END PEER TABLE // BEGIN PEER ADDITION BOX HTMLNode peerAdditionInfobox = contentNode.addChild("div", "class", "infobox infobox-normal"); peerAdditionInfobox.addChild("div", "class", "infobox-header", "Add another peer"); HTMLNode peerAdditionContent = peerAdditionInfobox.addChild("div", "class", "infobox-content"); HTMLNode peerAdditionForm = peerAdditionContent.addChild("form", new String[] { "action", "method", "enctype" }, new String[] { ".", "post", "multipart/form-data" }); peerAdditionForm.addChild("input", new String[] { "type", "name", "value" }, new String[] { "hidden", "formPassword", node.formPassword }); peerAdditionForm.addChild("#", "Paste the reference here:"); peerAdditionForm.addChild("br"); peerAdditionForm.addChild("textarea", new String[] { "id", "name", "rows", "cols" }, new String[] { "reftext", "ref", "8", "74" }); peerAdditionForm.addChild("br"); peerAdditionForm.addChild("#", "Enter the URL of the reference here: "); peerAdditionForm.addChild("input", new String[] { "id", "type", "name" }, new String[] { "refurl", "text", "url" }); peerAdditionForm.addChild("br"); peerAdditionForm.addChild("#", "Choose the file containing the reference here: "); peerAdditionForm.addChild("input", new String[] { "id", "type", "name" }, new String[] { "reffile", "file", "reffile" }); peerAdditionForm.addChild("br"); peerAdditionForm.addChild("input", new String[] { "type", "name", "value" }, new String[] { "submit", "add", "Add" }); // our reference HTMLNode referenceInfobox = contentNode.addChild("div", "class", "infobox infobox-normal"); referenceInfobox.addChild("div", "class", "infobox-header").addChild("a", "href", "myref.txt", "My reference"); referenceInfobox.addChild("div", "class", "infobox-content").addChild("pre", "id", "reference", node.exportPublicFieldSet().toString()); StringBuffer pageBuffer = new StringBuffer(); pageNode.generate(pageBuffer); this.writeReply(ctx, 200, "text/html", "OK", pageBuffer.toString()); }
50619 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50619/8894de616e17a43e740747a9eb17956bab9b3b3d/DarknetConnectionsToadlet.java/clean/src/freenet/clients/http/DarknetConnectionsToadlet.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1640, 967, 12, 3098, 2003, 16, 2974, 361, 1810, 1042, 1103, 13, 1216, 2974, 361, 1810, 1042, 7395, 503, 16, 1860, 16, 9942, 503, 288, 9506, 202, 780, 589, 273, 2003, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1640, 967, 12, 3098, 2003, 16, 2974, 361, 1810, 1042, 1103, 13, 1216, 2974, 361, 1810, 1042, 7395, 503, 16, 1860, 16, 9942, 503, 288, 9506, 202, 780, 589, 273, 2003, 18, ...
client.saveBugReport(task.getBugReport());
client.saveBugReport(task.getTaskData());
public void testSynchronize() throws InterruptedException, PartInitException, LoginException, BugzillaException, PossibleBugzillaFailureException { // Get the task BugzillaTask task = (BugzillaTask) client.createTaskFromExistingKey(repository, "1"); MylarTaskListPlugin.getTaskListManager().getTaskList().moveToRoot(task); assertTrue(task.isDownloaded()); // (The initial local copy from server) client.saveBugReport(task.getBugReport()); assertEquals(task.getSyncState(), RepositoryTaskSyncState.SYNCHRONIZED); // Modify it String newCommentText = "BugzillaRepositoryClientTest.testSynchronize(): " + (new Date()).toString(); task.getBugReport().setNewComment(newCommentText); // overwrites old fields/attributes with new content (ususually done by // BugEditor) task.getBugReport().setHasChanged(true);// updateBug(task.getBugReport()); assertEquals(task.getSyncState(), RepositoryTaskSyncState.SYNCHRONIZED); client.saveBugReport(task.getBugReport()); assertEquals(RepositoryTaskSyncState.OUTGOING, task.getSyncState()); // Submit changes MockBugzillaReportSubmitForm form = new MockBugzillaReportSubmitForm(BugzillaPlugin.ENCODING_UTF_8); client.submitBugReport(task.getBugReport(), form, null); assertEquals(RepositoryTaskSyncState.SYNCHRONIZED, task.getSyncState()); // TODO: Test that comment was appended // ArrayList<Comment> comments = task.getBugReport().getComments(); // assertNotNull(comments); // assertTrue(comments.size() > 0); // Comment lastComment = comments.get(comments.size() - 1); // assertEquals(newCommentText, lastComment.getText()); client.synchronize(task, true, null); assertEquals(RepositoryTaskSyncState.SYNCHRONIZED, task.getSyncState()); // OUTGOING with forceddSynch=false task.setSyncState(RepositoryTaskSyncState.OUTGOING); client.synchronize(task, false, null); assertEquals(RepositoryTaskSyncState.OUTGOING, task.getSyncState()); // OUTGOING with forcedSynch=true --> Update Local Copy dialog // Choosing to override local changes results in SYNCHRONIZED // Choosing not to override results in CONFLICT task.setSyncState(RepositoryTaskSyncState.CONFLICT); client.synchronize(task, false, null); assertEquals(RepositoryTaskSyncState.CONFLICT, task.getSyncState()); // CONFLICT with forcedSynch=true --> Update Local Copy dialog // Has no outgoing changes or conflicts yet needs synch // because task doesn't have bug report (new query hit) // Result: retrieved with no incoming status task.setSyncState(RepositoryTaskSyncState.SYNCHRONIZED); RepositoryReport bugReport = task.getBugReport(); task.setBugReport(null); client.synchronize(task, false, null); assertEquals(RepositoryTaskSyncState.SYNCHRONIZED, task.getSyncState()); assertNotNull(task.getBugReport()); assertEquals(task.getBugReport().getId(), bugReport.getId()); }
51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/d6adf902ecafbef942349464348e4435750dd099/BugzillaRepositoryConnectorTest.java/buggy/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaRepositoryConnectorTest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1842, 19298, 554, 1435, 1216, 7558, 16, 6393, 2570, 503, 16, 11744, 503, 16, 16907, 15990, 503, 16, 1082, 202, 13576, 19865, 15990, 14389, 288, 202, 202, 759, 968, 326, 156...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 19298, 554, 1435, 1216, 7558, 16, 6393, 2570, 503, 16, 11744, 503, 16, 16907, 15990, 503, 16, 1082, 202, 13576, 19865, 15990, 14389, 288, 202, 202, 759, 968, 326, 156...
public org.quickfix.field.OrigOrdModTime getOrigOrdModTime() throws FieldNotFound { org.quickfix.field.OrigOrdModTime value = new org.quickfix.field.OrigOrdModTime();
public quickfix.field.OrigOrdModTime getOrigOrdModTime() throws FieldNotFound { quickfix.field.OrigOrdModTime value = new quickfix.field.OrigOrdModTime();
public org.quickfix.field.OrigOrdModTime getOrigOrdModTime() throws FieldNotFound { org.quickfix.field.OrigOrdModTime value = new org.quickfix.field.OrigOrdModTime(); getField(value); return value; }
8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/CrossOrderCancelRequest.java/buggy/src/java/src/quickfix/fix43/CrossOrderCancelRequest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 2358, 18, 19525, 904, 18, 1518, 18, 4741, 15383, 1739, 950, 336, 4741, 15383, 1739, 950, 1435, 1216, 2286, 2768, 225, 288, 2358, 18, 19525, 904, 18, 1518, 18, 4741, 15383, 1739, 950...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 2358, 18, 19525, 904, 18, 1518, 18, 4741, 15383, 1739, 950, 336, 4741, 15383, 1739, 950, 1435, 1216, 2286, 2768, 225, 288, 2358, 18, 19525, 904, 18, 1518, 18, 4741, 15383, 1739, 950...
public PagelMatrixModel(String name, Class dataClass, int behavior) { super(name,dataClass,charsFromBehavior(behavior)); this.modelType = behavior; this.params=null; // model's parameters qConstrained=null; // true if a parameter is somehow constrained qBound=null; // parameter bound to another parameter (-1 = not bound) qConstant=null; // parameter is set to this value; this.setConstraints(modelType); needToPrepareMatrices = true; recalcProbsNeeded = true; minChecker = new MesquiteNumber(MesquiteDouble.unassigned); //prepareMatrices(); if (modelType == MODEL4PARAM) optimizationMode = FLIP_FLOP; else optimizationMode = BASE_ON_SIMPLER; }
56479 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56479/6b851d6552b6f3d5f999eeb504d2e4524f44dce0/PagelMatrixModel.java/buggy/Source/mesquite/correl/lib/PagelMatrixModel.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1071, 7724, 292, 4635, 1488, 12, 780, 508, 16, 1659, 501, 797, 16, 509, 6885, 13, 288, 202, 202, 9565, 12, 529, 16, 892, 797, 16, 7549, 1265, 9212, 12, 31936, 10019, 3196, 225, 202, 2211, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1071, 7724, 292, 4635, 1488, 12, 780, 508, 16, 1659, 501, 797, 16, 509, 6885, 13, 288, 202, 202, 9565, 12, 529, 16, 892, 797, 16, 7549, 1265, 9212, 12, 31936, 10019, 3196, 225, 202, 2211, ...
MylarTaskEditor taskEditor = (MylarTaskEditor) page.getActiveEditor();
TaskEditor taskEditor = (TaskEditor) page.getActiveEditor();
public void testStackTraceOther() throws Exception { // jamvm, sablevm, kaffe, cacao (space before brackets, one set of brackets) String stackTrace = "java.lang.Error: Something bad happened\n" + " at testcase.main (testcase.java:3)\n" + " at java.lang.VirtualMachine.invokeMain (VirtualMachine.java)\n" + " at java.lang.VirtualMachine.main (VirtualMachine.java:108)"; NewBugzillaReport model = new NewBugzillaReport(repository.getUrl(), TasksUiPlugin.getDefault() .getTaskDataManager().getNewRepositoryTaskId()); model.setNewComment(stackTrace); model.setHasLocalChanges(true); IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(); NewTaskEditorInput input = new NewTaskEditorInput(repository, model); TasksUiUtil.openEditor(input, TaskListPreferenceConstants.TASK_EDITOR_ID, page); MylarTaskEditor taskEditor = (MylarTaskEditor) page.getActiveEditor(); NewBugzillaTaskEditor editor = (NewBugzillaTaskEditor) taskEditor.getActivePageInstance(); assertEquals(stackTrace, editor.getStackTraceFromDescription().trim()); editor.markDirty(false); editor.close(); }
51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/1ab2ed5625d0594349ae757fb5814739d0eff502/DuplicateDetetionTest.java/clean/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/DuplicateDetetionTest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1842, 6332, 8290, 1435, 1216, 1185, 288, 202, 202, 759, 525, 301, 3489, 16, 272, 429, 3489, 16, 417, 7329, 73, 16, 276, 1077, 6033, 261, 2981, 1865, 15597, 16, 1245, 444,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6332, 8290, 1435, 1216, 1185, 288, 202, 202, 759, 525, 301, 3489, 16, 272, 429, 3489, 16, 417, 7329, 73, 16, 276, 1077, 6033, 261, 2981, 1865, 15597, 16, 1245, 444,...
if (null != prot_adapter) {
if(null != prot_adapter) {
public void start() { if (corr == null) { if (transport_adapter != null) { corr = new RequestCorrelator("MessageDispatcher", transport_adapter, this, deadlock_detection, local_addr, concurrent_processing); } else { corr = new RequestCorrelator("MessageDispatcher", prot_adapter, this, deadlock_detection, local_addr, concurrent_processing); } corr.start(); } if (channel != null) { Vector tmp_mbrs = channel.getView() != null ? channel.getView().getMembers() : null; setMembers(tmp_mbrs); } if (null != prot_adapter) { //null if called from the constructor that uses PullPushAdapter prot_adapter.resume(); } }
48949 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48949/896f3041ac6c83d0d1b4ad10041face165c97e1d/MessageDispatcher.java/buggy/src/org/jgroups/blocks/MessageDispatcher.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 787, 1435, 288, 3639, 309, 261, 17515, 422, 446, 13, 288, 5411, 309, 261, 13049, 67, 10204, 480, 446, 13, 288, 7734, 19480, 273, 394, 1567, 6217, 2878, 639, 2932, 1079, 6681, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1435, 288, 3639, 309, 261, 17515, 422, 446, 13, 288, 5411, 309, 261, 13049, 67, 10204, 480, 446, 13, 288, 7734, 19480, 273, 394, 1567, 6217, 2878, 639, 2932, 1079, 6681, ...
return (EAttribute)scaleEClass.getEStructuralFeatures().get(4);
return (EAttribute) scaleEClass.getEStructuralFeatures().get(4);
public EAttribute getScale_MinorGridsPerUnit() { return (EAttribute)scaleEClass.getEStructuralFeatures().get(4); }
15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/e5c78f0e8317166d02fa384e14c3dd7aa1796f2c/ComponentPackageImpl.java/buggy/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/model/component/impl/ComponentPackageImpl.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 512, 1499, 1322, 1869, 67, 19549, 6313, 87, 2173, 2802, 1435, 565, 288, 3639, 327, 261, 41, 1499, 13, 3159, 5720, 18, 588, 41, 14372, 8696, 7675, 588, 12, 24, 1769, 565, 289, 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, 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, 512, 1499, 1322, 1869, 67, 19549, 6313, 87, 2173, 2802, 1435, 565, 288, 3639, 327, 261, 41, 1499, 13, 3159, 5720, 18, 588, 41, 14372, 8696, 7675, 588, 12, 24, 1769, 565, 289, 2, ...
if(StreamItOptions.sync) count++; else { FlatNode[] edges = ((FlatNode)entry.getValue()).edges; int increment = 1; for (int i=0; i<edges.length; i++) { if (edges[i]!=null && edges[i].contents instanceof SIRJoiner) { increment = 0; }
FlatNode[] edges = ((FlatNode)entry.getValue()).edges; int increment = 1; for (int i=0; i<edges.length; i++) { if (edges[i]!=null && edges[i].contents instanceof SIRJoiner) { increment = 0;
public int getNumTiles() { dumpGraph("crash.dot"); int count = 0; for (Iterator it = SIRMap.entrySet().iterator(); it.hasNext(); ) { Map.Entry entry = (Map.Entry)it.next(); if (entry.getKey() instanceof SIRFilter) { if (Util.countMe((SIRFilter)entry.getKey())) count++; } else if (entry.getKey() instanceof SIRJoiner) { if(StreamItOptions.sync) //Sync removal should give an accurate count of joiners //(Adjacent Joiners Coalesced) count++; else { // count a joiner if none of its outgoing edges is to // another joiner FlatNode[] edges = ((FlatNode)entry.getValue()).edges; int increment = 1; for (int i=0; i<edges.length; i++) { if (edges[i]!=null && edges[i].contents instanceof SIRJoiner) { increment = 0; } } count += increment; } } } return count; }
5955 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5955/e3f6bd0573bf8b2edbc6cda4a9c3bada2dec21b1/RawFlattener.java/clean/streams/src/at/dms/kjc/raw/RawFlattener.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 509, 11187, 27669, 1435, 288, 202, 8481, 4137, 2932, 3353, 961, 18, 9811, 8863, 202, 474, 1056, 273, 374, 31, 202, 1884, 261, 3198, 518, 273, 5705, 54, 863, 18, 4099, 694, 7675, 9...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 509, 11187, 27669, 1435, 288, 202, 8481, 4137, 2932, 3353, 961, 18, 9811, 8863, 202, 474, 1056, 273, 374, 31, 202, 1884, 261, 3198, 518, 273, 5705, 54, 863, 18, 4099, 694, 7675, 9...
SessionFactory sessionFactory = super.buildSessionFactory(); Collection classMetaData = sessionFactory.getAllClassMetadata().values(); for (Iterator i = classMetaData.iterator(); i.hasNext();) { ClassMetadata cmd = (ClassMetadata) i.next(); Class persistentClass = cmd.getMappedClass(EntityMode.POJO); LOG.info("[GrailsDomainConfiguration] Registering dynamic methods on externally configured hibernate persistent class ["+persistentClass+"]"); try { new DomainClassMethods(this.grailsApplication,persistentClass,sessionFactory,this.grailsApplication.getClassLoader()); } catch (IntrospectionException e) { LOG.warn("[GrailsDomainConfiguration] Introspection exception registering dynamic methods for ["+persistentClass+"]:" + e.getMessage(), e); } } return sessionFactory; }
SessionFactory sessionFactory = super.buildSessionFactory(); if(configureDynamicMethods) { configureDynamicMethods(sessionFactory); } return sessionFactory; }
public SessionFactory buildSessionFactory() throws HibernateException { SessionFactory sessionFactory = super.buildSessionFactory(); Collection classMetaData = sessionFactory.getAllClassMetadata().values(); for (Iterator i = classMetaData.iterator(); i.hasNext();) { ClassMetadata cmd = (ClassMetadata) i.next(); Class persistentClass = cmd.getMappedClass(EntityMode.POJO); LOG.info("[GrailsDomainConfiguration] Registering dynamic methods on externally configured hibernate persistent class ["+persistentClass+"]"); try { new DomainClassMethods(this.grailsApplication,persistentClass,sessionFactory,this.grailsApplication.getClassLoader()); } catch (IntrospectionException e) { LOG.warn("[GrailsDomainConfiguration] Introspection exception registering dynamic methods for ["+persistentClass+"]:" + e.getMessage(), e); } } return sessionFactory; }
53275 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/53275/903f4b388a57a464f9d14176ea5d25485de66436/DefaultGrailsDomainConfiguration.java/clean/src/persistence/org/codehaus/groovy/grails/orm/hibernate/cfg/DefaultGrailsDomainConfiguration.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 3877, 1733, 1361, 2157, 1733, 1435, 1216, 670, 24360, 503, 288, 202, 202, 2157, 1733, 1339, 1733, 273, 225, 2240, 18, 3510, 2157, 1733, 5621, 202, 202, 2532, 667, 6998, 273, 133...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3877, 1733, 1361, 2157, 1733, 1435, 1216, 670, 24360, 503, 288, 202, 202, 2157, 1733, 1339, 1733, 273, 225, 2240, 18, 3510, 2157, 1733, 5621, 202, 202, 2532, 667, 6998, 273, 133...
if (eIsProxy()) return super.toString();
if (eIsProxy()) return super.toString();
public String toString() { if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); result.append(" (types: "); //$NON-NLS-1$ result.append(types); result.append(')'); return result.toString(); }
8196 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8196/ebce0dfcf980c405fd07c019b6f4466152262cb7/ArchiveImpl.java/buggy/plugins/org.eclipse.jst.j2ee.core/commonArchive/org/eclipse/jst/j2ee/commonarchivecore/internal/impl/ArchiveImpl.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 514, 1762, 1435, 288, 202, 202, 430, 261, 73, 2520, 3886, 10756, 1082, 202, 2463, 2240, 18, 10492, 5621, 202, 202, 780, 1892, 563, 273, 394, 6674, 12, 9565, 18, 10492, 10663, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 514, 1762, 1435, 288, 202, 202, 430, 261, 73, 2520, 3886, 10756, 1082, 202, 2463, 2240, 18, 10492, 5621, 202, 202, 780, 1892, 563, 273, 394, 6674, 12, 9565, 18, 10492, 10663, ...
decoration.addOverlay(JiraImages.OVERLAY_IMPROVEMENT, IDecoration.BOTTOM_RIGHT);
decoration.addOverlay(JiraImages.OVERLAY_IMPROVEMENT, IDecoration.TOP_LEFT);
public void decorate(Object element, IDecoration decoration) { if (element instanceof JiraFilterHit) { JiraFilterHit hit = (JiraFilterHit) element; if (hit.getCorrespondingTask() != null) { decorate(hit.getCorrespondingTask(), decoration); } } if (element instanceof JiraTask) { JiraTask task = (JiraTask) element; if (JiraTask.Kind.BUG.toString().equals(task.getKind())) { decoration.addOverlay(JiraImages.OVERLAY_BUG, IDecoration.BOTTOM_RIGHT); } else if (JiraTask.Kind.FEATURE.toString().equals(task.getKind())) { decoration.addOverlay(JiraImages.OVERLAY_FEATURE, IDecoration.BOTTOM_RIGHT); } else if (JiraTask.Kind.IMPROVEMENT.toString().equals(task.getKind())) { decoration.addOverlay(JiraImages.OVERLAY_IMPROVEMENT, IDecoration.BOTTOM_RIGHT); } else if (JiraTask.Kind.TASK.toString().equals(task.getKind())) { decoration.addOverlay(JiraImages.OVERLAY_TASK, IDecoration.BOTTOM_RIGHT); } } }
51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/471307e5d8de847fded72a0e6835fe36d31939c1/JiraTaskDecorator.java/clean/org.eclipse.mylyn.jira.ui/src/org/eclipse/mylyn/internal/jira/ui/JiraTaskDecorator.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 15752, 12, 921, 930, 16, 1599, 557, 22226, 29217, 13, 288, 202, 202, 430, 261, 2956, 1276, 804, 11547, 1586, 13616, 13, 288, 1082, 202, 46, 11547, 1586, 13616, 6800, 273, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 15752, 12, 921, 930, 16, 1599, 557, 22226, 29217, 13, 288, 202, 202, 430, 261, 2956, 1276, 804, 11547, 1586, 13616, 13, 288, 1082, 202, 46, 11547, 1586, 13616, 6800, 273, ...
if(names.length != 2) throw new IllegalArgumentException("Found project insted of a file.");
private FileIdentifier getFileIdentifierFor(Long fileIdentifier) { for(Entry<String, Long> entry : identifiers.entrySet()) { if(entry.getValue().equals(fileIdentifier)) { String key = entry.getKey(); String[] names = key.split("[|]"); if(names.length != 2) throw new IllegalArgumentException("Found project insted of a file."); FileIdentifier file = new FileIdentifier(names[0], names[1]); return file; } } return null; }
48076 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48076/c49798ac892fce395e10fd06f084263060c4fd6e/Cache.java/clean/src/web/onClient/hr/fer/zemris/vhdllab/applets/main/Cache.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 3196, 202, 1152, 1387, 3004, 6034, 3004, 1290, 12, 3708, 585, 3004, 13, 288, 1082, 202, 1884, 12, 1622, 32, 780, 16, 3407, 34, 1241, 294, 9863, 18, 4099, 694, 10756, 288, 9506, 202, 430, 12,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 3196, 202, 1152, 1387, 3004, 6034, 3004, 1290, 12, 3708, 585, 3004, 13, 288, 1082, 202, 1884, 12, 1622, 32, 780, 16, 3407, 34, 1241, 294, 9863, 18, 4099, 694, 10756, 288, 9506, 202, 430, 12,...
if (monitor.isCanceled()) throw new OperationCanceledException();
if (monitor.isCanceled()) { throw new OperationCanceledException(); }
protected void createFile(IFile fileHandle, InputStream contents, IProgressMonitor monitor) throws CoreException { if (contents == null) contents = new ByteArrayInputStream(new byte[0]); try { // Create a new file resource in the workspace if (linkTargetPath != null) fileHandle.createLink(linkTargetPath, IResource.ALLOW_MISSING_LOCAL, monitor); else { IPath path = fileHandle.getFullPath(); IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); int numSegments= path.segmentCount(); if (numSegments > 2 && !root.getFolder(path.removeLastSegments(1)).exists()) { // If the direct parent of the path doesn't exist, try to create the // necessary directories. for (int i= numSegments - 2; i > 0; i--) { IFolder folder = root.getFolder(path.removeLastSegments(i)); if (!folder.exists()) { folder.create(false, true, monitor); } } } fileHandle.create(contents, false, monitor); } } catch (CoreException e) { // If the file already existed locally, just refresh to get contents if (e.getStatus().getCode() == IResourceStatus.PATH_OCCUPIED) fileHandle.refreshLocal(IResource.DEPTH_ZERO, null); else throw e; } if (monitor.isCanceled()) throw new OperationCanceledException(); }
55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/e38d295ea613cf9f08aadb93a84a33d2e91abc5f/WizardNewFileCreationPage.java/clean/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/WizardNewFileCreationPage.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 918, 21266, 12, 45, 812, 26662, 16, 5037, 2939, 16, 5411, 467, 5491, 7187, 6438, 13, 1216, 30015, 288, 3639, 309, 261, 3980, 422, 446, 13, 5411, 2939, 273, 394, 16180, 12, 2704, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 918, 21266, 12, 45, 812, 26662, 16, 5037, 2939, 16, 5411, 467, 5491, 7187, 6438, 13, 1216, 30015, 288, 3639, 309, 261, 3980, 422, 446, 13, 5411, 2939, 273, 394, 16180, 12, 2704, 1...
Atom partner = null; Atom atom = null; Atom[] partners = null; AtomType[] atomTypes1 = null; AtomType[] atomTypes2 = null; Bond bond = null; for (int i = 1; i < 4; i++) {
for (int i = 1; i < 4; i++) { logger.debug("Considering atoms with " + i + " neighbours...");
public void saturate(AtomContainer atomContainer) throws CDKException { logger.info("Saturating atomContainer by adjusting bond orders..."); Atom partner = null; Atom atom = null; Atom[] partners = null; AtomType[] atomTypes1 = null; AtomType[] atomTypes2 = null; Bond bond = null; for (int i = 1; i < 4; i++) { // handle atoms with degree 1 first and then proceed to higher order for (int f = 0; f < atomContainer.getAtomCount(); f++) { atom = atomContainer.getAtomAt(f); logger.debug("symbol: " + atom.getSymbol()); atomTypes1 = structgenATF.getAtomTypes(atom.getSymbol()); logger.debug("first atom type: " + atomTypes1[0]); if (atomContainer.getBondCount(atom) == i) { if (atom.getFlag(CDKConstants.ISAROMATIC) && atomContainer.getBondOrderSum(atom) < atomTypes1[0].getMaxBondOrderSum() - atom.getHydrogenCount()){ partners = atomContainer.getConnectedAtoms(atom); for (int g = 0; g < partners.length; g++) { partner = partners[g]; logger.debug("Atom has " + partners.length + " partners"); atomTypes2 = structgenATF.getAtomTypes(partner.getSymbol()); if (atomContainer.getBond(partner,atom).getFlag(CDKConstants.ISAROMATIC) && atomContainer.getBondOrderSum(partner) < atomTypes2[0].getMaxBondOrderSum() - partner.getHydrogenCount()) { logger.debug("Partner has " + atomContainer.getBondOrderSum(partner) + ", may have: " + atomTypes2[0].getMaxBondOrderSum()); bond = atomContainer.getBond(atom, partner); logger.debug("Bond order was " + bond.getOrder()); bond.setOrder(bond.getOrder() + 1); logger.debug("Bond order now " + bond.getOrder()); break; } } } if (atomContainer.getBondOrderSum(atom) < atomTypes1[0].getMaxBondOrderSum() - atom.getHydrogenCount()) { logger.debug("Atom has " + atomContainer.getBondOrderSum(atom) + ", may have: " + atomTypes1[0].getMaxBondOrderSum()); partners = atomContainer.getConnectedAtoms(atom); for (int g = 0; g < partners.length; g++) { partner = partners[g]; logger.debug("Atom has " + partners.length + " partners"); atomTypes2 = structgenATF.getAtomTypes(partner.getSymbol()); if(atomTypes2.length==0) throw new CDKException("Missing entry in structgen_atomtypes.xml for "+partner.getSymbol()); if (atomContainer.getBondOrderSum(partner) < atomTypes2[0].getMaxBondOrderSum() - partner.getHydrogenCount()) { logger.debug("Partner has " + atomContainer.getBondOrderSum(partner) + ", may have: " + atomTypes2[0].getMaxBondOrderSum()); bond = atomContainer.getBond(atom, partner); logger.debug("Bond order was " + bond.getOrder()); bond.setOrder(bond.getOrder() + 1); logger.debug("Bond order now " + bond.getOrder()); break; } } } } } } }
45167 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45167/be13fdf1f2a350aa09b1005daaf9f9a71c02f4a6/SaturationChecker.java/buggy/src/org/openscience/cdk/tools/SaturationChecker.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 5942, 295, 340, 12, 3641, 2170, 22487, 13, 1216, 24570, 202, 95, 3639, 1194, 18, 1376, 2932, 15163, 295, 1776, 22487, 635, 5765, 310, 8427, 11077, 7070, 1769, 202, 202, 364...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5942, 295, 340, 12, 3641, 2170, 22487, 13, 1216, 24570, 202, 95, 3639, 1194, 18, 1376, 2932, 15163, 295, 1776, 22487, 635, 5765, 310, 8427, 11077, 7070, 1769, 202, 202, 364...
public void setAddfiles( Path addfiles ) { if ( this .addfiles == null ) { this .addfiles = addfiles;
public void setAddfiles(Path addfiles) { if (this.addfiles == null) { this.addfiles = addfiles;
public void setAddfiles( Path addfiles ) { if ( this .addfiles == null ) { this .addfiles = addfiles; } else { this .addfiles .append( addfiles ); } }
17033 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17033/c7b5b643b25b20f5c96097b2c54e2e26a054f212/JlinkTask.java/buggy/src/main/org/apache/tools/ant/taskdefs/optional/jlink/JlinkTask.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 225, 918, 444, 986, 2354, 12, 2666, 527, 2354, 262, 288, 3639, 309, 261, 333, 263, 1289, 2354, 422, 446, 262, 288, 5411, 333, 263, 1289, 2354, 273, 527, 2354, 31, 3639, 289, 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, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 225, 918, 444, 986, 2354, 12, 2666, 527, 2354, 262, 288, 3639, 309, 261, 333, 263, 1289, 2354, 422, 446, 262, 288, 5411, 333, 263, 1289, 2354, 273, 527, 2354, 31, 3639, 289, 3639,...
int todo = 0; A_CmsXmlDocument xmlDoc = (A_CmsXmlDocument)document; String encoding = xmlDoc.getEncoding(); CmsLinkProcessor linkProcessor = xmlDoc.getLinkProcessor(cms, new CmsLinkTable());
if (document != null) {
public void setStringValue(CmsObject cms, I_CmsXmlDocument document, String value) throws CmsXmlException { Element content = m_element.element(CmsXmlPage.NODE_CONTENT); Element links = m_element.element(CmsXmlPage.NODE_LINKS); int todo = 0; // TODO: solve Interface vs. abstract issue A_CmsXmlDocument xmlDoc = (A_CmsXmlDocument)document; String encoding = xmlDoc.getEncoding(); CmsLinkProcessor linkProcessor = xmlDoc.getLinkProcessor(cms, new CmsLinkTable()); if (encoding != null) { // ensure all chars in the given content are valid chars for the selected charset value = CmsEncoder.adjustHtmlEncoding(value, encoding); } // do some processing to remove unnecessary tags if necessary String contentConversion = xmlDoc.getConversion(); if (CmsHtmlConverter.isConversionEnabled(contentConversion)) { CmsHtmlConverter converter = new CmsHtmlConverter(encoding, contentConversion); value = converter.convertToStringSilent(value); } if (linkProcessor != null) { try { // replace links in HTML by macros and fill link table value = linkProcessor.replaceLinks(value); } catch (Exception exc) { throw new CmsXmlException("HTML data processing failed", exc); } } content.clearContent(); content.addCDATA(value); CmsLinkTable linkTable = linkProcessor.getLinkTable(); links.setContent(null); for (Iterator i = linkTable.iterator(); i.hasNext();) { CmsLink link = linkTable.getLink((String)i.next()); Element linkElement = links.addElement(CmsXmlPage.NODE_LINK).addAttribute( CmsXmlPage.ATTRIBUTE_NAME, link.getName()).addAttribute(CmsXmlPage.ATTRIBUTE_TYPE, link.getType()).addAttribute( CmsXmlPage.ATTRIBUTE_INTERNAL, Boolean.toString(link.isInternal())); linkElement.addElement(CmsXmlPage.NODE_TARGET).addCDATA(link.getTarget()); if (link.getAnchor() != null) { linkElement.addElement(CmsXmlPage.NODE_ANCHOR).addCDATA(link.getAnchor()); } if (link.getQuery() != null) { linkElement.addElement(CmsXmlPage.NODE_QUERY).addCDATA(link.getQuery()); } } // ensure the String value is re-calculated next time m_stringValue = null; }
51784 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51784/6544df384a08c2b3f4af8dd8d906cd9bfffe7189/CmsXmlHtmlValue.java/buggy/src/org/opencms/xml/types/CmsXmlHtmlValue.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 14600, 620, 12, 4747, 921, 6166, 16, 467, 67, 4747, 4432, 2519, 1668, 16, 514, 460, 13, 1216, 16084, 503, 288, 3639, 3010, 913, 273, 312, 67, 2956, 18, 2956, 12, 4747, 4432, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 14600, 620, 12, 4747, 921, 6166, 16, 467, 67, 4747, 4432, 2519, 1668, 16, 514, 460, 13, 1216, 16084, 503, 288, 3639, 3010, 913, 273, 312, 67, 2956, 18, 2956, 12, 4747, 4432, ...
btnDecoration.setSelection( ( (GanttSeries) series ).isUseDecorationLabelValue( ) );
btnDecoration.setSelection( series.isUseDecorationLabelValue( ) );
private void placeComponents( ) { // Layout for content composite GridLayout glContent = new GridLayout( ); glContent.numColumns = 8; glContent.marginHeight = 2; glContent.marginWidth = 2; // Main content composite this.setLayout( glContent ); // Layout for the Marker group GridLayout glMarker = new GridLayout( ); glMarker.marginHeight = 4; glMarker.marginWidth = 4; glMarker.verticalSpacing = 4; glMarker.horizontalSpacing = 4; Composite cmpMarker = new Composite( this, SWT.NONE ); cmpMarker.setLayout( new GridLayout( ) ); GridData gdMarker = new GridData( GridData.FILL_BOTH ); gdMarker.horizontalSpan = 2; cmpMarker.setLayoutData( gdMarker ); // Layout for the Start Marker grpMarkerStart = new Group( cmpMarker, SWT.NONE ); grpMarkerStart.setLayoutData( new GridData( GridData.FILL_BOTH ) ); grpMarkerStart.setLayout( glMarker ); grpMarkerStart.setText( Messages.getString( "GanttSeriesAttributeComposite.Lbl.StartMarker" ) ); //$NON-NLS-1$ new MarkerEditorComposite( grpMarkerStart, createMarker( ( (GanttSeries) series ).getStartMarker( ) ) ); // Layout for the End Marker grpMarkerEnd = new Group( cmpMarker, SWT.NONE ); grpMarkerEnd.setLayoutData( new GridData( GridData.FILL_BOTH ) ); grpMarkerEnd.setLayout( glMarker ); grpMarkerEnd.setText( Messages.getString( "GanttSeriesAttributeComposite.Lbl.EndMarker" ) ); //$NON-NLS-1$ new MarkerEditorComposite( grpMarkerEnd, createMarker( ( (GanttSeries) series ).getEndMarker( ) ) ); // Layout for Connection Line grpLine = new Group( this, SWT.NONE ); GridData gdGRPLine = new GridData( GridData.FILL_BOTH ); gdGRPLine.horizontalSpan = 2; grpLine.setLayout( new FillLayout( ) ); grpLine.setLayoutData( gdGRPLine ); grpLine.setText( Messages.getString( "GanttSeriesAttributeComposite.Lbl.Line" ) ); //$NON-NLS-1$ gliacGantt = new GanttLineAttributesComposite( grpLine, context, SWT.NONE, ( (GanttSeries) series ).getConnectionLine( ), true, true, true ); gliacGantt.addListener( this ); // Layout for Outine grpOutline = new Group( this, SWT.NONE ); GridData gdGRPOutline = new GridData( GridData.FILL_BOTH ); gdGRPOutline.horizontalSpan = 2; grpOutline.setLayout( new FillLayout( ) ); grpOutline.setLayoutData( gdGRPOutline ); grpOutline.setText( Messages.getString( "GanttSeriesAttributeComposite.Lbl.Outline" ) ); //$NON-NLS-1$ oliacGantt = new LineAttributesComposite( grpOutline, SWT.NONE, context, ( (GanttSeries) series ).getOutline( ), true, true, true ); oliacGantt.addListener( this ); Composite cmpFill = new Composite( this, SWT.NONE ); cmpFill.setLayout( new GridLayout( ) ); GridData gdFill = new GridData( GridData.FILL_BOTH | GridData.VERTICAL_ALIGN_BEGINNING); gdFill.horizontalSpan = 2; cmpFill.setLayoutData( gdFill ); /*Label lblFill = new Label( cmpFill, SWT.NONE ); GridData gdLBLFill = new GridData( ); lblFill.setLayoutData( gdLBLFill ); lblFill.setText( Messages.getString( "GanttSeriesAttributeComposite.Lbl.OutlineFill" ) ); //$NON-NLS-1$ fccFill = new FillChooserComposite( cmpFill, SWT.NONE, context, ( (GanttSeries) series ).getOutlineFill( ), false, false ); fccFill.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) ); fccFill.addListener( this );*/ btnDecoration = new Button( cmpFill, SWT.CHECK ); { btnDecoration.setText( Messages.getString( "GanttSeriesAttributeComposite.Lbl.UseDecoration" ) ); //$NON-NLS-1$ btnDecoration.setSelection( ( (GanttSeries) series ).isUseDecorationLabelValue( ) ); btnDecoration.addSelectionListener( this ); } btnPalette = new Button( cmpFill, SWT.CHECK ); { btnPalette.setText( Messages.getString( "GanttSeriesAttributeComposite.Lbl.LinePalette" ) ); //$NON-NLS-1$ btnPalette.setSelection( ( (GanttSeries) series ).isPaletteLineColor( ) ); btnPalette.addSelectionListener( this ); } }
15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/c14da3b527cef2399a3a605a3129c5e9e98d840f/GanttSeriesAttributeComposite.java/clean/chart/org.eclipse.birt.chart.ui.extension/src/org/eclipse/birt/chart/ui/swt/series/GanttSeriesAttributeComposite.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 918, 3166, 7171, 12, 262, 202, 95, 202, 202, 759, 9995, 364, 913, 9635, 202, 202, 6313, 3744, 5118, 1350, 273, 394, 7145, 3744, 12, 11272, 202, 202, 7043, 1350, 18, 2107, 338...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3166, 7171, 12, 262, 202, 95, 202, 202, 759, 9995, 364, 913, 9635, 202, 202, 6313, 3744, 5118, 1350, 273, 394, 7145, 3744, 12, 11272, 202, 202, 7043, 1350, 18, 2107, 338...
asm.emitSUBFC(KLUDGE_TI_REG, PROCESSOR_REGISTER, TI );
asm.emitSUBFC(KLUDGE_TI_REG, PROCESSOR_REGISTER, KLUDGE_TI_REG);
static void storeParametersForOSX(VM_Assembler asm, int frameSize, VM_Method method, VM_Class klass) { int nextOSXArgReg, nextOSXArgFloatReg, nextVMArgReg, nextVMArgFloatReg; // offset to the spill area in the callee (Osx frame) // remove int spillOffsetOSX = NATIVE_FRAME_HEADER_SIZE; spillOffsetOSX += 8; // 1st spill = JNIEnv, 2nd spill = class // offset to the spill area in the caller (RVM frame), relative to // the callee's FP int spillOffsetVM = frameSize + STACKFRAME_HEADER_SIZE; // does NOT include implicit this or class ptr VM_TypeReference[] types = method.getParameterTypes(); // number of arguments for this method int numArguments = types.length; // Set up the Reference table for GC // PR <- JREFS array base asm.emitLAddr(PROCESSOR_REGISTER, VM_Entrypoints.JNIRefsField.getOffset(), S0); // TI <- JREFS current top asm.emitLWZ(KLUDGE_TI_REG, VM_Entrypoints.JNIRefsTopField.getOffset(), S0); // JREFS offset for current TOP asm.emitADD(KLUDGE_TI_REG, PROCESSOR_REGISTER, KLUDGE_TI_REG); // convert into address // TODO - count number of refs // TODO - emit overflow check for JNIRefs array // start a new JNIRefs frame on each transition from Java to native C // push current SavedFP ptr onto top of JNIRefs stack (use available S1 reg as a temp) // and make current TOP the new savedFP // asm.emitLWZ (S1, VM_Entrypoints.JNIRefsSavedFPField.getOffset(), S0); asm.emitSTWU (S1, 4, KLUDGE_TI_REG); // push prev frame ptr onto JNIRefs array asm.emitSUBFC(S1, PROCESSOR_REGISTER, KLUDGE_TI_REG); // compute offset for new TOP asm.emitSTW (S1, VM_Entrypoints.JNIRefsSavedFPField.getOffset(), S0); // save new TOP as new frame ptr in JNIEnv // for static methods: caller has placed args in r3,r4,... // for non-static methods:"this" ptr is in r3, and args start in r4,r5,... // // for static methods: for nonstatic methods: // Java caller OSX callee Java caller OSX callee // ----------- ---------- ----------- ---------- // spill = arg11 -> new spill spill = arg11 -> new spill // spill = arg10 -> new spill spill = arg10 -> new spill // spill = arg9 -> new spill // R12 = arg9 -> new spill // R11 = arg8 -> new spill R12 = arg8 -> new spill // R10 = arg7 -> new spill R11 = arg7 -> new spill // R9 = arg6 -> new spill R10 = arg6 -> new spill // // R8 = arg5 -> R10 R9 = arg5 -> R10 // R7 = arg4 -> R9 R8 = arg4 -> R9 // R6 = arg3 -> R8 R7 = arg3 -> R8 // R5 = arg2 -> R7 R6 = arg2 -> R7 // R4 = arg1 -> R6 R5 = arg1 -> R6 // R3 = arg0 -> R5 R4 = arg0 -> R5 // R4 = class R3 = this -> R4 // R3 = JNIenv R3 = JNIenv // // if the number of args in GPR does not exceed R11, then we can use R12 as scratch // to move the args // if the number of args in GPR exceed R12, then we need to save R12 first to make // room for a scratch register // if the number of args in FPR does not exceed F12, then we can use F13 as scratch nextOSXArgFloatReg = FIRST_OS_PARAMETER_FPR; nextVMArgFloatReg = FIRST_VOLATILE_FPR; nextOSXArgReg = FIRST_OS_PARAMETER_GPR + 2; // 1st reg = JNIEnv, 2nd reg = class if ( method.isStatic() ) { nextVMArgReg = FIRST_VOLATILE_GPR; } else { nextVMArgReg = FIRST_VOLATILE_GPR+1; // 1st reg = this, to be processed separately } // The loop below assumes the following relationship: if (VM.VerifyAssertions) VM._assert(FIRST_OS_PARAMETER_FPR==FIRST_VOLATILE_FPR); if (VM.VerifyAssertions) VM._assert(LAST_OS_PARAMETER_FPR<=LAST_VOLATILE_FPR); if (VM.VerifyAssertions) VM._assert(FIRST_OS_PARAMETER_GPR==FIRST_VOLATILE_GPR); if (VM.VerifyAssertions) VM._assert(LAST_OS_PARAMETER_GPR<=LAST_VOLATILE_GPR); // create one VM_Assembler object for each argument // This is needed for the following reason: // -2 new arguments are added in front for native methods, so the normal arguments // need to be shifted down in addition to being moved // -to avoid overwriting each other, the arguments must be copied in reverse order // -the analysis for mapping however must be done in forward order // -the moving/mapping for each argument may involve a sequence of 1-3 instructions // which must be kept in the normal order // To solve this problem, the instructions for each argument is generated in its // own VM_Assembler in the forward pass, then in the reverse pass, each VM_Assembler // emist the instruction sequence and copies it into the main VM_Assembler VM_Assembler[] asmForArgs = new VM_Assembler[numArguments]; for (int arg = 0; arg < numArguments; arg++) { int spillSizeOSX = 0; int nextOsxGprIncrement = 1; asmForArgs[arg] = new VM_Assembler(0); VM_Assembler asmArg = asmForArgs[arg]; if (types[arg].isFloatType() || types[arg].isDoubleType()) { boolean is32bits = types[arg].isFloatType(); if (is32bits) spillSizeOSX = 4; else { spillSizeOSX = 8; nextOsxGprIncrement = 2; } // 1. check the source, the value will be in srcVMArg int srcVMArg; // scratch fpr if (nextVMArgFloatReg <= LAST_VOLATILE_FPR) { srcVMArg = nextVMArgFloatReg; nextVMArgFloatReg ++; } else { srcVMArg = FIRST_SCRATCH_FPR; // VM float reg is in spill area if (is32bits) { asmArg.emitLFS(srcVMArg, spillOffsetVM, FP); spillOffsetVM += 4; } else { asmArg.emitLFD(srcVMArg, spillOffsetVM, FP); spillOffsetVM += 8; } } // 2. check the destination, if (nextOSXArgFloatReg <= LAST_OS_PARAMETER_FPR) { // leave it there nextOSXArgFloatReg ++; } else { if (is32bits) { asmArg.emitSTFS(srcVMArg, spillOffsetOSX, FP); } else { asmArg.emitSTFD(srcVMArg, spillOffsetOSX, FP); } } // for 64-bit long arguments } else if (types[arg].isLongType()) { spillSizeOSX = 8; nextOsxGprIncrement = 2; // copyWord(asmArg,// nextVMArgReg+1, spillOffsetVM+4,// nextOSXArgReg+1, spillOffsetOSX+4);// copyWord(asmArg,// nextVMArgReg, spillOffsetVM,// nextOSXArgReg, spillOffsetOSX); // if (nextVMArgReg == LAST_VOLATILE_GPR)// spillOffsetVM += 4;// else if (nextVMArgReg > LAST_VOLATILE_GPR)// spillOffsetVM += 8;// nextVMArgReg += 2; // handle OSX first boolean dstSpilling; int regOrSpilling = -1; // it is register number or spilling offset // 1. check if Osx register > 9 if (nextOSXArgReg > (LAST_OS_PARAMETER_GPR - 1)) { // goes to spilling area dstSpilling = true; // // NOTE: following adjustment is not stated in SVR4 ABI, but // // implemented in GCC// // -- Feng// nextOSXArgReg = LAST_OS_PARAMETER_GPR + 1; // compute spilling offset regOrSpilling = spillOffsetOSX; } else { // use registers dstSpilling = false; regOrSpilling = nextOSXArgReg; //nextOSXArgReg += 2; } // handle RVM source if (nextVMArgReg < LAST_VOLATILE_GPR) { // both parts in registers if (dstSpilling) { asmArg.emitSTW(nextVMArgReg+1, regOrSpilling+4, FP); if (nextOSXArgReg == LAST_OS_PARAMETER_GPR) { asmArg.emitADDIS(nextOSXArgReg, nextVMArgReg, 0); } else { asmArg.emitSTW(nextVMArgReg, regOrSpilling, FP); } } else { asmArg.emitADDIS(regOrSpilling+1, nextVMArgReg+1, 0); asmArg.emitADDIS(regOrSpilling, nextVMArgReg, 0); } // advance register counting, Osx register number // already advanced nextVMArgReg += 2; } else if (nextVMArgReg == LAST_VOLATILE_GPR) { // VM striding if (dstSpilling) { asmArg.emitLWZ(0, spillOffsetVM, FP); asmArg.emitSTW(0, regOrSpilling+4, FP); asmArg.emitSTW(nextVMArgReg, regOrSpilling, FP); } else { asmArg.emitLWZ(regOrSpilling + 1, spillOffsetVM, FP); asmArg.emitADDIS(regOrSpilling, nextVMArgReg, 0); } // advance spillOffsetVM and nextVMArgReg nextVMArgReg ++; spillOffsetVM += 4; } else if (nextVMArgReg > LAST_VOLATILE_GPR) { if (dstSpilling) { asmArg.emitLFD(FIRST_SCRATCH_FPR, spillOffsetVM, FP); asmArg.emitSTFD(FIRST_SCRATCH_FPR, regOrSpilling, FP); } else { // this shouldnot happen, VM spills, OSX has registers asmArg.emitLWZ(regOrSpilling + 1, spillOffsetVM+4, FP); asmArg.emitLWZ(regOrSpilling, spillOffsetVM, FP); } spillOffsetVM += 8; } } else if (types[arg].isReferenceType() ) { spillSizeOSX = 4; // For reference type, replace with handlers before passing to OSX int srcreg, dstreg; if (nextVMArgReg <= LAST_VOLATILE_GPR) { srcreg = nextVMArgReg++; } else { srcreg = 0; asmArg.emitLWZ(srcreg, spillOffsetVM, FP); spillOffsetVM += 4; } asmArg.emitSTWU(srcreg, 4, KLUDGE_TI_REG); if (nextOSXArgReg <= LAST_OS_PARAMETER_GPR) { asmArg.emitSUBFC(nextOSXArgReg, PROCESSOR_REGISTER, KLUDGE_TI_REG); } else { asmArg.emitSUBFC(0, PROCESSOR_REGISTER, KLUDGE_TI_REG); asmArg.emitSTW(0, spillOffsetOSX, FP); } } else { spillSizeOSX = 4; // For all other types: int, short, char, byte, boolean // (1a) fit in OSX register, move the register if (nextOSXArgReg<=LAST_OS_PARAMETER_GPR) { asmArg.emitADDIS(nextOSXArgReg, nextVMArgReg++, 0); } // (1b) spill OSX register, but still fit in VM register else if (nextVMArgReg<=LAST_VOLATILE_GPR) { asmArg.emitSTW(nextVMArgReg++, spillOffsetOSX, FP); } else { // (1c) spill VM register asmArg.emitLWZ(0,spillOffsetVM, FP); // retrieve arg from VM spill area asmArg.emitSTW(0, spillOffsetOSX, FP); spillOffsetVM+=4; } } spillOffsetOSX += spillSizeOSX; nextOSXArgReg += nextOsxGprIncrement; } // Append the code sequences for parameter mapping // to the current machine code in reverse order // so that the move does not overwrite the parameters for (int arg = numArguments-1; arg >= 0; arg--) { VM_MachineCode codeForArg = asmForArgs[arg].makeMachineCode(); asm.appendInstructions(codeForArg.getInstructions()); } // Now add the 2 new JNI parameters: JNI environment and Class or "this" object // if static method, append ref for class, else append ref for "this" // and pass offset in JNIRefs array in r4 (as second arg to called native code) int secondOSXVolatileReg = FIRST_OS_PARAMETER_GPR + 1; if (method.isStatic()) { klass.getClassForType(); // ensure the Java class object is created // JTOC saved above in JNIEnv is still valid, used by following emitLWZtoc asm.emitLAddrToc(secondOSXVolatileReg, klass.getTibOffset() ); // r4 <- class TIB ptr from jtoc asm.emitLWZ (secondOSXVolatileReg, 0, secondOSXVolatileReg); // r4 <- first TIB entry == -> class object asm.emitLWZ (secondOSXVolatileReg, VM_Entrypoints.classForTypeField.getOffset(), secondOSXVolatileReg); // r4 <- java Class for this VM_Class asm.emitSTWU (secondOSXVolatileReg, 4, TI ); // append class ptr to end of JNIRefs array asm.emitSUBFC (secondOSXVolatileReg, PROCESSOR_REGISTER, TI ); // pass offset in bytes } else { asm.emitSTWU (FIRST_OS_PARAMETER_GPR, 4, TI ); // append this ptr to end of JNIRefs array asm.emitSUBFC (secondOSXVolatileReg, PROCESSOR_REGISTER, TI ); // pass offset in bytes } // store the new JNIRefs array TOP back into JNIEnv asm.emitSUBFC(KLUDGE_TI_REG, PROCESSOR_REGISTER, TI ); // compute offset for the current TOP asm.emitSTW(KLUDGE_TI_REG, VM_Entrypoints.JNIRefsTopField.getOffset(), S0); }
5245 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5245/e31cb833225947f4b1d41534a3c2e3390f239133/VM_JNICompiler.java/clean/rvm/src/vm/arch/powerPC/jni/VM_JNICompiler.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 760, 918, 1707, 2402, 1290, 4618, 60, 12, 7397, 67, 1463, 5747, 749, 20415, 16, 6862, 1377, 509, 2623, 1225, 16, 6862, 1377, 8251, 67, 1305, 707, 16, 4766, 565, 8251, 67, 797, 7352, 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, 760, 918, 1707, 2402, 1290, 4618, 60, 12, 7397, 67, 1463, 5747, 749, 20415, 16, 6862, 1377, 509, 2623, 1225, 16, 6862, 1377, 8251, 67, 1305, 707, 16, 4766, 565, 8251, 67, 797, 7352, 13,...
tokfix();
private int parse_string(int func, int term, int paren) { int c; Node list = null; int strstart; int nest = 0; if (func == '\'') { return parse_qstring(term, paren); } if (func == 0) { // read 1 line for heredoc // -1 for chomp yyVal = RubyString.newString(ruby, lex_curline, lex_pend - 1); lex_p = lex_pend; return Token.tSTRING; } strstart = ruby.getSourceLine(); newtok(); while ((c = nextc()) != term || nest > 0) { if (c == -1) { //unterm_str: ruby.setSourceLine(strstart); ph.rb_compile_error("unterminated string meets end of file"); return 0; } /* * if (ismbchar(c)) { * int i, len = mbclen(c)-1; * for (i = 0; i < len; i++) { * tokadd(c); * c = nextc(); * } * } * else */ if (c == '#') { list = str_extend(list, term); if (list == Node.MINUS_ONE) { //goto unterm_str; ruby.setSourceLine(strstart); ph.rb_compile_error("unterminated string meets end of file"); return 0; } continue; } else if (c == '\\') { c = nextc(); if (c == '\n') { continue; } if (c == term) { tokadd(c); } else { pushback(c); if (func != '"') { tokadd('\\'); } tokadd(read_escape()); } continue; } if (paren != 0) { if (c == paren) { nest++; } if (c == term && nest-- == 0) { break; } } tokadd(c); } tokfix(); ph.setLexState(LexState.EXPR_END); if (list != null) { list.setLine(strstart); if (toklen() > 0) { RubyObject ss = RubyString.newString(ruby, tok(), toklen()); ph.list_append(list, nf.newStr(ss)); } yyVal = list; if (func == '`') { // new RuntimeException("[BUG] want to change " + list.getClass().getName() + " to DXStrNode").printStackTrace(); // list.nd_set_type(Constants.NODE_DXSTR); list = new DXStrNode(list.getLiteral()); yyVal = list; return Token.tDXSTRING; } else { return Token.tDSTRING; } } else { yyVal = RubyString.newString(ruby, tok(), toklen()); return (func == '`') ? Token.tXSTRING : Token.tSTRING; } }
49687 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49687/d31a76ee29d5978a9bec41e3ac9134cee024bcab/DefaultRubyScanner.java/buggy/org/jruby/parser/DefaultRubyScanner.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 509, 1109, 67, 1080, 12, 474, 1326, 16, 509, 2481, 16, 509, 22146, 13, 288, 3639, 509, 276, 31, 3639, 2029, 666, 273, 446, 31, 3639, 509, 609, 1937, 31, 3639, 509, 15095, 273, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 509, 1109, 67, 1080, 12, 474, 1326, 16, 509, 2481, 16, 509, 22146, 13, 288, 3639, 509, 276, 31, 3639, 2029, 666, 273, 446, 31, 3639, 509, 609, 1937, 31, 3639, 509, 15095, 273, 3...
public void testTransformations() throws Exception { Encoding encoding = Encoding.getEncoding("UNICODE", null); assertEquals("ab", encoding.decode(new byte[] { 97, 98 })); assertEquals(2, encoding.encode("ab").length); assertEquals(97, encoding.encode("a")[0]); assertEquals(98, encoding.encode("b")[0]); encoding = Encoding.defaultEncoding(); assertEquals("a".getBytes()[0], encoding.encode("a")[0]); assertEquals(new String(new byte[] { 97 }), encoding.decode(new byte[] { 97 })); }
public void testCreation() throws Exception { Encoding encoding; encoding = Encoding.getEncoding("UNICODE", null); assertEquals("UTF", encoding.name().substring(0, 3).toUpperCase()); encoding = Encoding.getEncoding("SQL_ASCII", null); assert(encoding.name().toUpperCase().indexOf("ASCII") != -1); assertEquals("When encoding is unknown the default encoding should be used", Encoding.defaultEncoding(), Encoding.getEncoding("UNKNOWN", null)); encoding = Encoding.getEncoding("SQL_ASCII", "utf-8"); assert("Encoding passed in by the user should be preferred", encoding.name().toUpperCase().indexOf("UTF") != -1); } public void testTransformations() throws Exception { Encoding encoding = Encoding.getEncoding("UNICODE", null); assertEquals("ab", encoding.decode(new byte[] { 97, 98 })); assertEquals(2, encoding.encode("ab").length); assertEquals(97, encoding.encode("a")[0]); assertEquals(98, encoding.encode("b")[0]); encoding = Encoding.defaultEncoding(); assertEquals("a".getBytes()[0], encoding.encode("a")[0]); assertEquals(new String(new byte[] { 97 }), encoding.decode(new byte[] { 97 })); }
49504 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49504/b75814aee320ef2b67ad01ba72c266dbbf94db45/EncodingTest.java/buggy/src/interfaces/jdbc/org/postgresql/test/jdbc2/EncodingTest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1842, 9906, 1435, 1216, 1185, 288, 202, 4705, 2688, 31, 202, 5999, 273, 13400, 18, 588, 4705, 2932, 26642, 3113, 446, 1769, 202, 11231, 8867, 2932, 5159, 3113, 2688, 18, 529, 7...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1842, 9906, 1435, 1216, 1185, 288, 202, 4705, 2688, 31, 202, 5999, 273, 13400, 18, 588, 4705, 2932, 26642, 3113, 446, 1769, 202, 11231, 8867, 2932, 5159, 3113, 2688, 18, 529, 7...
if (rect.y <= topMargin) { scrolled = scrollVertical(rect.y - topMargin, true); } else if (rect.y + rect.height > clientAreaHeight) { scrolled = scrollVertical(rect.y + rect.height - clientAreaHeight, true); }
boolean showLocation(Rectangle rect) { int clientAreaWidth = this.clientAreaWidth - leftMargin - rightMargin; int clientAreaHeight = this.clientAreaHeight - topMargin - bottomMargin; boolean scrolled = false; if (clientAreaWidth > 0) { // always make 1/4 of a page visible if (rect.x < leftMargin) { int scrollWidth = Math.max(leftMargin - rect.x, clientAreaWidth / 4); int maxScroll = horizontalScrollOffset; scrolled = scrollHorizontal(-Math.min(maxScroll, scrollWidth), true); } else if (rect.x + rect.width > clientAreaWidth) { int scrollWidth = Math.max(rect.x + rect.width - clientAreaWidth,clientAreaWidth / 4); int maxScroll = renderer.getWidth() - horizontalScrollOffset - this.clientAreaWidth; scrolled = scrollHorizontal(Math.min(maxScroll, scrollWidth), true); } } if (rect.y <= topMargin) { scrolled = scrollVertical(rect.y - topMargin, true); } else if (rect.y + rect.height > clientAreaHeight) { scrolled = scrollVertical(rect.y + rect.height - clientAreaHeight, true); } return scrolled;}
12413 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12413/c1944febeea9219ca29a4c8310702a14850295a7/StyledText.java/clean/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1250, 2405, 2735, 12, 19463, 4917, 13, 288, 202, 474, 1004, 5484, 2384, 273, 333, 18, 2625, 5484, 2384, 300, 2002, 9524, 300, 2145, 9524, 31, 202, 474, 1004, 5484, 2686, 273, 333, 18, 2625, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1250, 2405, 2735, 12, 19463, 4917, 13, 288, 202, 474, 1004, 5484, 2384, 273, 333, 18, 2625, 5484, 2384, 300, 2002, 9524, 300, 2145, 9524, 31, 202, 474, 1004, 5484, 2686, 273, 333, 18, 2625, ...
existinglength=existingData.length; newlength=data.length; AdditionalData[] updateddata=new AdditionalData [existinglength +newlength]; System.arraycopy(existingData,0,updateddata,0,existinglength); System.arraycopy(data,0,updateddata,existinglength,newlength); existingregObject.setAdditionalData(updateddata);
public RegistrationAlert addtoRegistartion(RegistrationAlert existingregObject,RegistrationAlert newregobject) { Classification [] existingClassifications=existingregObject.getClassifications(); Source[] existingSources=existingregObject.getSources(); Target[]existingTargets=existingregObject.getTargets(); AdditionalData[] existingData=existingregObject.getAdditionalData(); Classification[] classifications=newregobject.getClassifications(); Source[] sources=newregobject.getSources(); Target[] targets=newregobject.getTargets(); AdditionalData[]data=newregobject.getAdditionalData(); int existinglength=existingClassifications.length; int newlength=classifications.length; if(classifications!=null) { Classification[] updatedclassification=new Classification[existinglength +newlength]; System.arraycopy(existingClassifications,0,updatedclassification,0,existinglength); System.arraycopy(classifications,0,updatedclassification,existinglength,newlength); existingregObject.setClassifications(updatedclassification); } if(sources!=null) { existinglength=existingSources.length; newlength=sources.length; Source[] updatedsources=new Source[existinglength +newlength]; System.arraycopy(existingSources,0,updatedsources,0,existinglength); System.arraycopy(sources,0,updatedsources,existinglength,newlength); existingregObject.setSources(updatedsources); } if(targets!=null) { existinglength=existingTargets.length; newlength=targets.length; Target[] updatedtargets=new Target[existinglength +newlength]; System.arraycopy(existingTargets,0,updatedtargets,0,existinglength); System.arraycopy(targets,0,updatedtargets,existinglength,newlength); existingregObject.setTargets(updatedtargets); } /* for now we are not consolidating additional data */ if(data!=null) { } return existingregObject; }
12869 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12869/a818a300930387b0f1ae9bde04631eba32944c10/CapabilitiesProcessingPlugin.java/clean/securityservices/src/org/cougaar/core/security/monitoring/plugin/CapabilitiesProcessingPlugin.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 2062, 2469, 33, 11711, 751, 18, 2469, 31, 394, 2469, 33, 892, 18, 2469, 31, 15119, 751, 8526, 3526, 892, 33, 2704, 15119, 751, 306, 11711, 2469, 397, 2704, 2469, 15533, 2332, 18, 1126, 3530, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 2062, 2469, 33, 11711, 751, 18, 2469, 31, 394, 2469, 33, 892, 18, 2469, 31, 15119, 751, 8526, 3526, 892, 33, 2704, 15119, 751, 306, 11711, 2469, 397, 2704, 2469, 15533, 2332, 18, 1126, 3530, ...
public HashMap match(Map query) throws Error {
public HashMap match(Map query) throws Error {
public HashMap match(Map query) throws Error { if (!(type instanceof TypeObject)) throw new Error(NOT_A_JSONR_OBJECT_TYPE); Type type; String name; String[] strings; HashMap namespace = ((TypeObject) this.type).namespace(); HashMap valid = new HashMap(); Iterator iter = query.keySet().iterator(); while (iter.hasNext()) { name = (String) iter.next(); type = (Type) namespace.get(name); strings = (String[]) query.get(name); if (type != null && strings != null && strings.length > 0) { valid.put(name, type.eval(strings[0])); } } return valid; }
55996 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55996/9879c06a79e084e106d2421c35cbe9acac302aef/JSONR.java/clean/trunk/org/less4j/JSONR.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 4317, 845, 12, 863, 843, 13, 377, 1216, 1068, 288, 3639, 309, 16051, 12, 723, 1276, 1412, 921, 3719, 5411, 604, 394, 1068, 12, 4400, 67, 37, 67, 2986, 54, 67, 9422, 67, 2399, 17...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4317, 845, 12, 863, 843, 13, 377, 1216, 1068, 288, 3639, 309, 16051, 12, 723, 1276, 1412, 921, 3719, 5411, 604, 394, 1068, 12, 4400, 67, 37, 67, 2986, 54, 67, 9422, 67, 2399, 17...
if (kind > 53) kind = 53;
if (kind > 56) kind = 56;
private final int jjMoveNfa_0(int startState, int curPos){ int[] nextStates; int startsAt = 0; jjnewStateCnt = 28; int i = 1; jjstateSet[0] = startState; int j, kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << curChar; MatchLoop: do { switch(jjstateSet[--i]) { case 1: case 27: if ((0xfbfffcfaffffd9ffL & l) == 0L) break; if (kind > 53) kind = 53; jjCheckNAdd(27); break; case 18: if ((0xfbfffcfaffffd9ffL & l) == 0L) break; if (kind > 53) kind = 53; jjCheckNAdd(27); break; case 2: if ((0xfbffd4faffffd9ffL & l) != 0L) { if (kind > 53) kind = 53; jjCheckNAdd(27); } if (curChar == 33) { if (kind > 7) kind = 7; } else if (curChar == 38) jjstateSet[jjnewStateCnt++] = 3; break; case 3: if (curChar == 38 && kind > 5) kind = 5; break; case 4: if (curChar == 38) jjstateSet[jjnewStateCnt++] = 3; break; case 12: if (curChar == 33 && kind > 7) kind = 7; break; case 13: if (curChar == 58) kind = 30; break; case 26: if ((0xfbffd4faffffd9ffL & l) == 0L) break; if (kind > 53) kind = 53; jjCheckNAdd(27); break; default : break; } } while(i != startsAt); } else if (curChar < 128) { long l = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: if ((0xd7ffffffffffffffL & l) != 0L) { if (kind > 53) kind = 53; jjCheckNAdd(27); } if ((0x400000004000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 0; break; case 18: if ((0xd7ffffffffffffffL & l) != 0L) { if (kind > 53) kind = 53; jjCheckNAdd(27); } if ((0x20000000200L & l) != 0L) jjstateSet[jjnewStateCnt++] = 17; break; case 2: if ((0xd7ffffffffffffffL & l) != 0L) { if (kind > 53) kind = 53; jjCheckNAdd(27); } if ((0x100000001000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 24; else if ((0x400000004L & l) != 0L) jjstateSet[jjnewStateCnt++] = 18; else if ((0x400000004000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 10; else if ((0x800000008000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 5; else if ((0x200000002L & l) != 0L) jjstateSet[jjnewStateCnt++] = 1; else if (curChar == 124) jjstateSet[jjnewStateCnt++] = 7; break; case 0: if ((0x1000000010L & l) != 0L && kind > 5) kind = 5; break; case 5: if ((0x4000000040000L & l) != 0L && kind > 6) kind = 6; break; case 6: if ((0x800000008000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 5; break; case 7: if (curChar == 124 && kind > 6) kind = 6; break; case 8: if (curChar == 124) jjstateSet[jjnewStateCnt++] = 7; break; case 9: if ((0x10000000100000L & l) != 0L && kind > 7) kind = 7; break; case 10: if ((0x800000008000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 9; break; case 11: if ((0x400000004000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 10; break; case 14: case 20: if ((0x4000000040000L & l) != 0L) jjCheckNAdd(13); break; case 15: if ((0x2000000020L & l) != 0L) jjstateSet[jjnewStateCnt++] = 14; break; case 16: if ((0x8000000080L & l) != 0L) jjstateSet[jjnewStateCnt++] = 15; break; case 17: if ((0x8000000080L & l) != 0L) jjstateSet[jjnewStateCnt++] = 16; break; case 19: if ((0x400000004L & l) != 0L) jjstateSet[jjnewStateCnt++] = 18; break; case 21: if ((0x2000000020L & l) != 0L) jjstateSet[jjnewStateCnt++] = 20; break; case 22: if ((0x8000000080L & l) != 0L) jjstateSet[jjnewStateCnt++] = 21; break; case 23: if ((0x4000000040000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 22; break; case 24: if ((0x200000002L & l) != 0L) jjstateSet[jjnewStateCnt++] = 23; break; case 25: if ((0x100000001000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 24; break; case 26: if ((0xd7ffffffffffffffL & l) == 0L) break; if (kind > 53) kind = 53; jjCheckNAdd(27); break; case 27: if ((0xd7ffffffffffffffL & l) == 0L) break; if (kind > 53) kind = 53; jjCheckNAdd(27); break; default : break; } } while(i != startsAt); } else { int hiByte = (int)(curChar >> 8); int i1 = hiByte >> 6; long l1 = 1L << (hiByte & 077); int i2 = (curChar & 0xff) >> 6; long l2 = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 1: case 27: if (!jjCanMove_0(hiByte, i1, i2, l1, l2)) break; if (kind > 53) kind = 53; jjCheckNAdd(27); break; case 18: if (!jjCanMove_0(hiByte, i1, i2, l1, l2)) break; if (kind > 53) kind = 53; jjCheckNAdd(27); break; case 2: if (!jjCanMove_0(hiByte, i1, i2, l1, l2)) break; if (kind > 53) kind = 53; jjCheckNAdd(27); break; default : break; } } while(i != startsAt); } if (kind != 0x7fffffff) { jjmatchedKind = kind; jjmatchedPos = curPos; kind = 0x7fffffff; } ++curPos; if ((i = jjnewStateCnt) == (startsAt = 28 - (jjnewStateCnt = startsAt))) return curPos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return curPos; } }}
6965 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6965/310be8d52869f0ee2c185cb657525fc655f30133/ZimbraQueryParserTokenManager.java/buggy/ZimbraServer/src/java/com/zimbra/cs/index/queryparser/ZimbraQueryParserTokenManager.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 3238, 727, 509, 10684, 7607, 50, 507, 67, 20, 12, 474, 787, 1119, 16, 509, 662, 1616, 15329, 282, 509, 8526, 1024, 7629, 31, 282, 509, 2542, 861, 273, 374, 31, 282, 10684, 2704, 1119, 11750,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 3238, 727, 509, 10684, 7607, 50, 507, 67, 20, 12, 474, 787, 1119, 16, 509, 662, 1616, 15329, 282, 509, 8526, 1024, 7629, 31, 282, 509, 2542, 861, 273, 374, 31, 282, 10684, 2704, 1119, 11750,...
public IReportRunnable openReportDesign( String report )
public IReportRunnable openReportDesign( String report, Map options )
public IReportRunnable openReportDesign( String report ) throws EngineException { return engine.openReportDesign( report ); }
46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/6750b617d962564415d786421fab385be3789fb1/ReportEngineService.java/buggy/viewer/org.eclipse.birt.report.viewer/birt/WEB-INF/classes/org/eclipse/birt/report/service/ReportEngineService.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 467, 4820, 20013, 1696, 4820, 15478, 12, 514, 2605, 262, 1082, 202, 15069, 10507, 503, 202, 95, 202, 202, 2463, 4073, 18, 3190, 4820, 15478, 12, 2605, 11272, 202, 97, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 467, 4820, 20013, 1696, 4820, 15478, 12, 514, 2605, 262, 1082, 202, 15069, 10507, 503, 202, 95, 202, 202, 2463, 4073, 18, 3190, 4820, 15478, 12, 2605, 11272, 202, 97, 2, -100, ...
ret = "namespace:uri="; for (int i = 0; i < fNamespaceList.length; i++) ret += fNamespaceList[i] + ",";
ret = "namespace:uri=" + fNamespaceList[0]; for (int i = 1; i < fNamespaceList.length; i++) ret += "," + fNamespaceList[i];
public String toString() { String ret = null; switch (fType) { case WILDCARD_ANY: ret = SchemaSymbols.ATTVAL_TWOPOUNDANY; break; case WILDCARD_OTHER: ret = SchemaSymbols.ATTVAL_TWOPOUNDOTHER + ":uri=" + fNamespaceList[0]; break; case WILDCARD_LIST: ret = "namespace:uri="; for (int i = 0; i < fNamespaceList.length; i++) ret += fNamespaceList[i] + ","; break; } return ret; }
4434 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4434/5bee80149c1cfdcd09a23cc970545d636b9f498c/XSWildcardDecl.java/buggy/src/org/apache/xerces/impl/v2/XSWildcardDecl.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 514, 1762, 1435, 288, 3639, 514, 325, 273, 446, 31, 3639, 1620, 261, 74, 559, 13, 288, 3639, 648, 678, 29067, 67, 15409, 30, 5411, 325, 273, 4611, 14821, 18, 789, 56, 2669, 67, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 514, 1762, 1435, 288, 3639, 514, 325, 273, 446, 31, 3639, 1620, 261, 74, 559, 13, 288, 3639, 648, 678, 29067, 67, 15409, 30, 5411, 325, 273, 4611, 14821, 18, 789, 56, 2669, 67, ...
plotTop = bo.getTop( ) + szTitle.getHeight( );
plotTop = bo.getTop( ); switch ( titleAnchor.getValue( ) ) { case Anchor.WEST : boLegend.setLeft( bo.getLeft( ) + szTitle.getWidth( ) ); plotLeft = bo.getLeft( ) + szTitle.getWidth( ); break; case Anchor.EAST : boTitle.setLeft( bo.getLeft( ) + bo.getWidth( ) - szTitle.getWidth( ) ); break; case Anchor.NORTH : case Anchor.NORTH_EAST : case Anchor.NORTH_WEST : plotTop = bo.getTop( ) + szTitle.getHeight( ); break; case Anchor.SOUTH : case Anchor.SOUTH_EAST : case Anchor.SOUTH_WEST : boLegend.setTop( boTitle.getTop( ) - szLegend.getHeight( ) ); break; }
private void doLayout_tmp( IDisplayServer xs, Chart cm, Bounds boFull, RunTimeContext rtc ) throws ChartException { final boolean isRightToLeft = rtc.isRightToLeft( ); Block bl = cm.getBlock( ); bl.setBounds( boFull ); Insets ins = bl.getInsets( ); Bounds bo = boFull.adjustedInstance( ins ); Legend lg = cm.getLegend( ); Plot p = cm.getPlot( ); TitleBlock tb = cm.getTitle( ); Size szTitle = ( !tb.isVisible( ) ) ? SizeImpl.create( 0, 0 ) : tb.getPreferredSize( xs, cm, rtc ); Bounds boPlot = p.getBounds( ); Bounds boLegend = lg.getBounds( ); // always layout title first. Bounds boTitle = tb.getBounds( ); boTitle.setLeft( bo.getLeft( ) ); boTitle.setWidth( bo.getWidth( ) ); boTitle.setTop( bo.getTop( ) ); boTitle.setHeight( szTitle.getHeight( ) ); Size szLegend = ( !lg.isVisible( ) ) ? SizeImpl.create( 0, 0 ) : lg.getPreferredSize( xs, cm, rtc ); if ( !lg.isSetPosition( ) ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, Messages.getString( "error.legend.position", //$NON-NLS-1$ ULocale.getDefault( ) ) ); } double plotWidthHint = -1, plotHeightHint = -1; if ( p.isSetWidthHint( ) ) { plotWidthHint = p.getWidthHint( ); } if ( p.isSetHeightHint( ) ) { plotHeightHint = p.getHeightHint( ); } double plotLeft, plotTop; // SETUP THE POSITION OF THE LEGEND AND THE PLOT Position po = lg.getPosition( ); // swap right/left if ( isRightToLeft ) { if ( po == Position.RIGHT_LITERAL ) { po = Position.LEFT_LITERAL; } else if ( po == Position.LEFT_LITERAL ) { po = Position.RIGHT_LITERAL; } } Anchor anchor = p.getAnchor( ); // swap west/east if ( isRightToLeft ) { switch ( anchor.getValue( ) ) { case Anchor.EAST : anchor = Anchor.WEST_LITERAL; break; case Anchor.NORTH_EAST : anchor = Anchor.NORTH_WEST_LITERAL; break; case Anchor.SOUTH_EAST : anchor = Anchor.SOUTH_WEST_LITERAL; break; case Anchor.WEST : anchor = Anchor.EAST_LITERAL; break; case Anchor.NORTH_WEST : anchor = Anchor.NORTH_EAST_LITERAL; break; case Anchor.SOUTH_WEST : anchor = Anchor.SOUTH_EAST_LITERAL; break; } } switch ( po.getValue( ) ) { case Position.INSIDE : boPlot.setWidth( plotWidthHint < 0 ? bo.getWidth( ) : plotWidthHint ); boPlot.setHeight( plotHeightHint < 0 ? ( bo.getHeight( ) - szTitle.getHeight( ) ) : plotHeightHint ); plotLeft = bo.getLeft( ); plotTop = bo.getTop( ) + szTitle.getHeight( ); // adjust left. switch ( anchor.getValue( ) ) { case Anchor.EAST : case Anchor.NORTH_EAST : case Anchor.SOUTH_EAST : plotLeft = plotLeft + bo.getWidth( ) - boPlot.getWidth( ); break; case Anchor.NORTH : case Anchor.SOUTH : plotLeft = plotLeft + ( bo.getWidth( ) - boPlot.getWidth( ) ) / 2; break; } // adjust top. switch ( anchor.getValue( ) ) { case Anchor.SOUTH : case Anchor.SOUTH_WEST : case Anchor.SOUTH_EAST : plotTop = plotTop + bo.getHeight( ) - szTitle.getHeight( ) - boPlot.getHeight( ); break; case Anchor.WEST : case Anchor.EAST : plotTop = plotTop + ( bo.getHeight( ) - szTitle.getHeight( ) - boPlot.getHeight( ) ) / 2; break; } boPlot.setLeft( plotLeft ); boPlot.setTop( plotTop ); boLegend.set( 0, 0, szLegend.getWidth( ), szLegend.getHeight( ) ); break; case Position.RIGHT : case Position.OUTSIDE : boLegend.setTop( bo.getTop( ) + szTitle.getHeight( ) ); boLegend.setLeft( bo.getLeft( ) + bo.getWidth( ) - szLegend.getWidth( ) ); boLegend.setWidth( szLegend.getWidth( ) ); boLegend.setHeight( bo.getHeight( ) - szTitle.getHeight( ) ); boPlot.setWidth( plotWidthHint < 0 ? ( bo.getWidth( ) - boLegend.getWidth( ) ) : plotWidthHint ); boPlot.setHeight( plotHeightHint < 0 ? ( bo.getHeight( ) - szTitle.getHeight( ) ) : plotHeightHint ); plotLeft = bo.getLeft( ); plotTop = bo.getTop( ) + szTitle.getHeight( ); // adjust left. switch ( anchor.getValue( ) ) { case Anchor.EAST : case Anchor.NORTH_EAST : case Anchor.SOUTH_EAST : plotLeft = plotLeft + bo.getWidth( ) - boLegend.getWidth( ) - boPlot.getWidth( ); break; case Anchor.NORTH : case Anchor.SOUTH : plotLeft = plotLeft + ( bo.getWidth( ) - boLegend.getWidth( ) - boPlot.getWidth( ) ) / 2; break; } // adjust top. switch ( anchor.getValue( ) ) { case Anchor.SOUTH : case Anchor.SOUTH_WEST : case Anchor.SOUTH_EAST : plotTop = plotTop + bo.getHeight( ) - szTitle.getHeight( ) - boPlot.getHeight( ); break; case Anchor.WEST : case Anchor.EAST : plotTop = plotTop + ( bo.getHeight( ) - szTitle.getHeight( ) - boPlot.getHeight( ) ) / 2; break; } boPlot.setLeft( plotLeft ); boPlot.setTop( plotTop ); break; case Position.LEFT : boLegend.setTop( bo.getTop( ) + szTitle.getHeight( ) ); boLegend.setLeft( bo.getLeft( ) ); boLegend.setWidth( szLegend.getWidth( ) ); boLegend.setHeight( bo.getHeight( ) - szTitle.getHeight( ) ); boPlot.setWidth( plotWidthHint < 0 ? ( bo.getWidth( ) - boLegend.getWidth( ) ) : plotWidthHint ); boPlot.setHeight( plotHeightHint < 0 ? ( bo.getHeight( ) - szTitle.getHeight( ) ) : plotHeightHint ); plotLeft = bo.getLeft( ) + szLegend.getWidth( ); plotTop = bo.getTop( ) + szTitle.getHeight( ); // adjust left. switch ( anchor.getValue( ) ) { case Anchor.EAST : case Anchor.NORTH_EAST : case Anchor.SOUTH_EAST : plotLeft = plotLeft + bo.getWidth( ) - boLegend.getWidth( ) - boPlot.getWidth( ); break; case Anchor.NORTH : case Anchor.SOUTH : plotLeft = plotLeft + ( bo.getWidth( ) - boLegend.getWidth( ) - boPlot.getWidth( ) ) / 2; break; } // adjust top. switch ( anchor.getValue( ) ) { case Anchor.SOUTH : case Anchor.SOUTH_WEST : case Anchor.SOUTH_EAST : plotTop = plotTop + bo.getHeight( ) - szTitle.getHeight( ) - boPlot.getHeight( ); break; case Anchor.WEST : case Anchor.EAST : plotTop = plotTop + ( bo.getHeight( ) - szTitle.getHeight( ) - boPlot.getHeight( ) ) / 2; break; } boPlot.setLeft( plotLeft ); boPlot.setTop( plotTop ); break; case Position.ABOVE : boLegend.setTop( bo.getTop( ) + szTitle.getHeight( ) ); boLegend.setLeft( bo.getLeft( ) ); boLegend.setWidth( bo.getWidth( ) ); boLegend.setHeight( szLegend.getHeight( ) ); boPlot.setWidth( plotWidthHint < 0 ? bo.getWidth( ) : plotWidthHint ); boPlot.setHeight( plotHeightHint < 0 ? ( bo.getHeight( ) - szTitle.getHeight( ) - boLegend.getHeight( ) ) : plotHeightHint ); plotLeft = bo.getLeft( ); plotTop = bo.getTop( ) + szTitle.getHeight( ) + boLegend.getHeight( ); // adjust left. switch ( anchor.getValue( ) ) { case Anchor.EAST : case Anchor.NORTH_EAST : case Anchor.SOUTH_EAST : plotLeft = plotLeft + bo.getWidth( ) - boPlot.getWidth( ); break; case Anchor.NORTH : case Anchor.SOUTH : plotLeft = plotLeft + ( bo.getWidth( ) - boPlot.getWidth( ) ) / 2; break; } // adjust top. switch ( anchor.getValue( ) ) { case Anchor.SOUTH : case Anchor.SOUTH_WEST : case Anchor.SOUTH_EAST : plotTop = plotTop + bo.getHeight( ) - szTitle.getHeight( ) - boLegend.getHeight( ) - boPlot.getHeight( ); break; case Anchor.WEST : case Anchor.EAST : plotTop = plotTop + ( bo.getHeight( ) - szTitle.getHeight( ) - boLegend.getHeight( ) - boPlot.getHeight( ) ) / 2; break; } boPlot.setLeft( plotLeft ); boPlot.setTop( plotTop ); break; case Position.BELOW : boLegend.setTop( bo.getTop( ) + bo.getHeight( ) - szLegend.getHeight( ) ); boLegend.setLeft( bo.getLeft( ) ); boLegend.setWidth( bo.getWidth( ) ); boLegend.setHeight( szLegend.getHeight( ) ); boPlot.setWidth( plotWidthHint < 0 ? bo.getWidth( ) : plotWidthHint ); boPlot.setHeight( plotHeightHint < 0 ? ( bo.getHeight( ) - boTitle.getHeight( ) - boLegend.getHeight( ) ) : plotHeightHint ); plotLeft = bo.getLeft( ); plotTop = bo.getTop( ) + szTitle.getHeight( ); // adjust left. switch ( anchor.getValue( ) ) { case Anchor.EAST : case Anchor.NORTH_EAST : case Anchor.SOUTH_EAST : plotLeft = plotLeft + bo.getWidth( ) - boPlot.getWidth( ); break; case Anchor.NORTH : case Anchor.SOUTH : plotLeft = plotLeft + ( bo.getWidth( ) - boPlot.getWidth( ) ) / 2; break; } // adjust top. switch ( anchor.getValue( ) ) { case Anchor.SOUTH : case Anchor.SOUTH_WEST : case Anchor.SOUTH_EAST : plotTop = plotTop + bo.getHeight( ) - szTitle.getHeight( ) - boLegend.getHeight( ) - boPlot.getHeight( ); break; case Anchor.WEST : case Anchor.EAST : plotTop = plotTop + ( bo.getHeight( ) - szTitle.getHeight( ) - boLegend.getHeight( ) - boPlot.getHeight( ) ) / 2; break; } boPlot.setLeft( plotLeft ); boPlot.setTop( plotTop ); break; } // layout custom blocks. for ( Iterator itr = bl.getChildren( ).iterator( ); itr.hasNext( ); ) { Block cbl = (Block) itr.next( ); if ( cbl != lg && cbl != p && cbl != tb ) { layoutBlock( xs, cm, bl.getBounds( ), bl.getInsets( ), cbl, rtc ); } } // layout custom legend blocks. for ( Iterator itr = lg.getChildren( ).iterator( ); itr.hasNext( ); ) { Block cbl = (Block) itr.next( ); layoutBlock( xs, cm, lg.getBounds( ), lg.getInsets( ), cbl, rtc ); } // layout custom title blocks. for ( Iterator itr = tb.getChildren( ).iterator( ); itr.hasNext( ); ) { Block cbl = (Block) itr.next( ); layoutBlock( xs, cm, tb.getBounds( ), tb.getInsets( ), cbl, rtc ); } // layout custom plot blocks. for ( Iterator itr = p.getChildren( ).iterator( ); itr.hasNext( ); ) { Block cbl = (Block) itr.next( ); layoutBlock( xs, cm, p.getBounds( ), p.getInsets( ), cbl, rtc ); } }
46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/e4d3fbd7ab05362cb40b7c0e0475462d1ec91834/LayoutManager.java/clean/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/internal/layout/LayoutManager.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 918, 741, 3744, 67, 5645, 12, 1599, 291, 1601, 2081, 9280, 16, 14804, 5003, 16, 20382, 800, 5080, 16, 1082, 202, 1997, 950, 1042, 436, 5111, 262, 1216, 14804, 503, 202, 95, 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, 1152, 918, 741, 3744, 67, 5645, 12, 1599, 291, 1601, 2081, 9280, 16, 14804, 5003, 16, 20382, 800, 5080, 16, 1082, 202, 1997, 950, 1042, 436, 5111, 262, 1216, 14804, 503, 202, 95, 2...
return mail;
return mail;
public Mail getMail() { return mail; }
47102 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47102/d4f817efab178e73e483e869f48c06a7985ceadf/SMTPHandler.java/buggy/sandbox/handlerapi2/src/java/org/apache/james/smtpserver/SMTPHandler.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 11542, 31991, 1435, 288, 565, 327, 4791, 31, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 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, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 11542, 31991, 1435, 288, 565, 327, 4791, 31, 565, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
readInputAsSAX(pipelineContext, INPUT_CONFIG, new XIncludeContentHandler(pipelineContext, contentHandler));
final TransformerURIResolver uriResolver = new TransformerURIResolver(XIncludeProcessor.this, pipelineContext, INPUT_CONFIG, false); readInputAsSAX(pipelineContext, INPUT_CONFIG, new XIncludeContentHandler(pipelineContext, contentHandler, uriResolver));
public ProcessorOutput createOutput(final String name) { ProcessorOutput output = new URIProcessorOutputImpl(getClass(), name, INPUT_CONFIG) { public void readImpl(final PipelineContext pipelineContext, final ContentHandler contentHandler) {// final ContentHandler debugContentHandler = new SAXDebuggerProcessor.DebugContentHandler(contentHandler); readInputAsSAX(pipelineContext, INPUT_CONFIG, new XIncludeContentHandler(pipelineContext, contentHandler)); } // TODO: implement helpers for URIProcessorOutputImpl }; addOutput(name, output); return output; }
52783 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52783/6c3097b221d9f8a89608fc34eee82d5df15e8fcb/XIncludeProcessor.java/clean/src/java/org/orbeon/oxf/processor/xinclude/XIncludeProcessor.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 15476, 1447, 752, 1447, 12, 6385, 514, 508, 13, 288, 3639, 15476, 1447, 876, 273, 394, 3699, 5164, 1447, 2828, 12, 588, 797, 9334, 508, 16, 12943, 67, 7203, 13, 288, 5411, 1071, 9...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 15476, 1447, 752, 1447, 12, 6385, 514, 508, 13, 288, 3639, 15476, 1447, 876, 273, 394, 3699, 5164, 1447, 2828, 12, 588, 797, 9334, 508, 16, 12943, 67, 7203, 13, 288, 5411, 1071, 9...
List<String> result = new ArrayList<String>(); BufferedReader br = new BufferedReader(new FileReader(file)); String line = br.readLine(); while (null != line) { result.add(line); line = br.readLine(); } return result; }
List<String> result= new ArrayList<String>(); BufferedReader br= new BufferedReader(new FileReader(file)); String line= br.readLine(); while(null != line) { result.add(line); line= br.readLine(); } return result; }
private List<String> fileToLines(File file) throws IOException { List<String> result = new ArrayList<String>(); BufferedReader br = new BufferedReader(new FileReader(file)); String line = br.readLine(); while (null != line) { result.add(line); line = br.readLine(); } return result; }
46166 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46166/75c0741cfb0fc75ef79c70ec78da0a1cd8144089/AnnotationTestConverter.java/buggy/src/main/org/testng/internal/AnnotationTestConverter.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 987, 32, 780, 34, 31044, 5763, 12, 812, 585, 13, 1216, 1860, 288, 202, 202, 682, 32, 780, 34, 563, 273, 394, 2407, 32, 780, 34, 5621, 202, 202, 17947, 2514, 5186, 273, 394,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 987, 32, 780, 34, 31044, 5763, 12, 812, 585, 13, 1216, 1860, 288, 202, 202, 682, 32, 780, 34, 563, 273, 394, 2407, 32, 780, 34, 5621, 202, 202, 17947, 2514, 5186, 273, 394,...
(XmlSchemaSequence) restrictionObj.particle, schema);
(XmlSchemaSequence) restrictionObj.particle, schema);
Element serializeComplexContentRestriction(Document doc, XmlSchemaComplexContentRestriction restrictionObj, XmlSchema schema) throws XmlSchemaSerializerException { Element restriction = createNewElement(doc, "restriction", schema.schema_ns_prefix, XmlSchema.SCHEMA_NS); if (restrictionObj.baseTypeName != null) { String baseTypeName = resolveQName(restrictionObj.baseTypeName, schema); restriction.setAttribute( "base", baseTypeName); } if (restrictionObj.id != null) restriction.setAttribute("id", restrictionObj.id); if (restrictionObj.annotation != null) { Element annotation = serializeAnnotation(doc, restrictionObj.annotation, schema); restriction.appendChild(annotation); } if (restrictionObj.particle instanceof XmlSchemaSequence) { Element sequenceParticle = serializeSequence(doc, (XmlSchemaSequence) restrictionObj.particle, schema); restriction.appendChild(sequenceParticle); } else if (restrictionObj.particle instanceof XmlSchemaChoice) { Element choiceParticle = serializeChoice(doc, (XmlSchemaChoice) restrictionObj.particle, schema); restriction.appendChild(choiceParticle); } else if (restrictionObj.particle instanceof XmlSchemaAll) { Element allParticle = serializeAll(doc, (XmlSchemaAll) restrictionObj.particle, schema); restriction.appendChild(allParticle); } else if (restrictionObj.particle instanceof XmlSchemaGroupRef) { Element groupRefParticle = serializeGroupRef(doc, (XmlSchemaGroupRef) restrictionObj.particle, schema); restriction.appendChild(groupRefParticle); } int attributesLength = restrictionObj.attributes.getCount(); for (int i = 0; i < attributesLength; i++) { XmlSchemaObject obj = restrictionObj.attributes.getItem(i); if (obj instanceof XmlSchemaAttribute) { Element attr = serializeAttribute(doc, (XmlSchemaAttribute) obj, schema); restriction.appendChild(attr); } else if (obj instanceof XmlSchemaAttribute) { Element attrGroup = serializeAttributeGroupRef(doc, (XmlSchemaAttributeGroupRef) obj, schema); restriction.appendChild(attrGroup); } } if (restrictionObj.anyAttribute != null) { Element anyAttribute = serializeAnyAttribute(doc, restrictionObj.anyAttribute, schema); restriction.appendChild(anyAttribute); } return restriction; }
58536 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58536/583d6c2db5f993d3085942269eca1b2ab8f3bc5f/XmlSchemaSerializer.java/buggy/src/org/apache/ws/commons/schema/XmlSchemaSerializer.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3010, 4472, 12795, 1350, 11670, 12, 2519, 997, 16, 4766, 9079, 5714, 3078, 12795, 1350, 11670, 9318, 2675, 16, 5714, 3078, 1963, 13, 5411, 1216, 5714, 3078, 6306, 503, 288, 3639, 3010, 9318...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3010, 4472, 12795, 1350, 11670, 12, 2519, 997, 16, 4766, 9079, 5714, 3078, 12795, 1350, 11670, 9318, 2675, 16, 5714, 3078, 1963, 13, 5411, 1216, 5714, 3078, 6306, 503, 288, 3639, 3010, 9318...
String[] schemas = transMeta.getClusterSchemaNames(); EnterSelectionDialog schemaDialog = new EnterSelectionDialog(shell, schemas, "Select a cluster schema", "Select the clustering schema to use: "); if (schemaDialog.open()==null || schemaDialog.getSelectionNr()<0) return; ClusterSchema clusterSchema = (ClusterSchema) transMeta.getClusterSchemas().get(schemaDialog.getSelectionNr()); String[] slaves = clusterSchema.getSlaveServerStrings(); EnterSelectionDialog slaveDialog = new EnterSelectionDialog(shell, slaves, "Select a slave server", "Select the desired slave server to send this transformation to: "); if (slaveDialog.open()==null || slaveDialog.getSelectionNr()<0) return; SlaveServer slaveServer = (SlaveServer) clusterSchema.getSlaveServers().get(slaveDialog.getSelectionNr());
SlaveServer slaveServer = executionConfiguration.getRemoteServer();
public void sendXMLToSlaveServer() { // Select a cluster schema... String[] schemas = transMeta.getClusterSchemaNames(); EnterSelectionDialog schemaDialog = new EnterSelectionDialog(shell, schemas, "Select a cluster schema", "Select the clustering schema to use: "); if (schemaDialog.open()==null || schemaDialog.getSelectionNr()<0) return; ClusterSchema clusterSchema = (ClusterSchema) transMeta.getClusterSchemas().get(schemaDialog.getSelectionNr()); // Now select the slave server... String[] slaves = clusterSchema.getSlaveServerStrings(); EnterSelectionDialog slaveDialog = new EnterSelectionDialog(shell, slaves, "Select a slave server", "Select the desired slave server to send this transformation to: "); if (slaveDialog.open()==null || slaveDialog.getSelectionNr()<0) return; SlaveServer slaveServer = (SlaveServer) clusterSchema.getSlaveServers().get(slaveDialog.getSelectionNr()); try { String reply = slaveServer.sendXML(transMeta.getXML(), AddTransServlet.CONTEXT_PATH); ShowBrowserDialog showBrowserDialog = new ShowBrowserDialog(shell, "Browser", reply); showBrowserDialog.open(); } catch (Exception e) { new ErrorDialog(shell, "Erro", "Error sending transformation to server", e); } }
9547 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9547/49a35ab9e0273ac366b7d409db1874d717bfdfaa/Spoon.java/clean/src/be/ibridge/kettle/spoon/Spoon.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1366, 4201, 774, 20302, 2081, 1435, 565, 288, 3639, 368, 6766, 279, 2855, 1963, 2777, 3639, 514, 8526, 12783, 273, 906, 2781, 18, 588, 3629, 3078, 1557, 5621, 3639, 15439, 6233, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1366, 4201, 774, 20302, 2081, 1435, 565, 288, 3639, 368, 6766, 279, 2855, 1963, 2777, 3639, 514, 8526, 12783, 273, 906, 2781, 18, 588, 3629, 3078, 1557, 5621, 3639, 15439, 6233, ...
case Token.NAMEINC : case Token.NAMEDEC :
case Icode_NAMEINC : case Icode_NAMEDEC :
private static void dumpICode(InterpreterData idata) { if (Token.printICode) { try { int iCodeLength = idata.itsICodeTop; byte iCode[] = idata.itsICode; String[] strings = idata.itsStringTable; out = new PrintWriter(new FileOutputStream("icode.txt", true)); out.println("ICode dump, for " + idata.itsName + ", length = " + iCodeLength); out.println("MaxStack = " + idata.itsMaxStack); for (int pc = 0; pc < iCodeLength; ) { out.flush(); out.print(" [" + pc + "] "); int token = iCode[pc] & 0xff; String tname = icodeToName(token); int old_pc = pc; ++pc; int icodeLength = icodeTokenLength(token); switch (token) { default: if (icodeLength != 1) Context.codeBug(); out.println(tname); break; case Icode_GOSUB : case Token.GOTO : case Token.IFEQ : case Token.IFNE : { int newPC = getTarget(iCode, pc); out.println(tname + " " + newPC); pc += 2; break; } case Icode_RETSUB : case Token.ENUMINIT : case Token.ENUMNEXT : case Token.VARINC : case Token.VARDEC : case Token.GETVAR : case Token.SETVAR : case Token.NEWTEMP : case Token.USETEMP : { int slot = (iCode[pc] & 0xFF); out.println(tname + " " + slot); pc++; break; } case Icode_CALLSPECIAL : { int callType = iCode[pc] & 0xFF; boolean isNew = (iCode[pc + 1] != 0); int line = getShort(iCode, pc+2); int count = getIndex(iCode, pc + 4); out.println(tname + " " + callType + " " + isNew + " " + count + " " + line); pc += 8; break; } case Token.REGEXP : { int i = getIndex(iCode, pc); Object regexp = idata.itsRegExpLiterals[i]; out.println(tname + " " + regexp); pc += 2; break; } case Token.CLOSURE : { int i = getIndex(iCode, pc); InterpreterData data2 = idata.itsNestedFunctions[i]; out.println(tname + " " + data2); pc += 2; break; } case Token.NEW : case Token.CALL : { int count = getIndex(iCode, pc + 2); String name = strings[getIndex(iCode, pc)]; out.println(tname + " " + count + " \"" + name + '"'); pc += 4; break; } case Icode_SHORTNUMBER : { int value = getShort(iCode, pc); out.println(tname + " " + value); pc += 2; break; } case Icode_INTNUMBER : { int value = getInt(iCode, pc); out.println(tname + " " + value); pc += 4; break; } case Token.NUMBER : { int index = getIndex(iCode, pc); double value = idata.itsDoubleTable[index]; out.println(tname + " " + value); pc += 2; break; } case Token.TYPEOFNAME : case Token.GETBASE : case Token.BINDNAME : case Token.SETNAME : case Token.NAME : case Token.NAMEINC : case Token.NAMEDEC : case Token.STRING : { String str = strings[getIndex(iCode, pc)]; out.println(tname + " \"" + str + '"'); pc += 2; break; } case Icode_LINE : { int line = getShort(iCode, pc); out.println(tname + " : " + line); pc += 2; break; } } if (old_pc + icodeLength != pc) Context.codeBug(); } int[] table = idata.itsExceptionTable; if (table != null) { out.println("Exception handlers: " +table.length / EXCEPTION_SLOT_SIZE); for (int i = 0; i != table.length; i += EXCEPTION_SLOT_SIZE) { int tryStart = table[i + EXCEPTION_TRY_START_SLOT]; int tryEnd = table[i + EXCEPTION_TRY_END_SLOT]; int catchStart = table[i + EXCEPTION_CATCH_SLOT]; int finallyStart = table[i + EXCEPTION_FINALLY_SLOT]; int withDepth = table[i + EXCEPTION_WITH_DEPTH_SLOT]; out.println(" "+tryStart+"\t "+tryEnd+"\t " +catchStart+"\t "+finallyStart +"\t "+withDepth); } } out.close(); } catch (IOException x) {} } }
51275 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51275/faf2a30c39fc508f2635416a94f9662c4ae41ad3/Interpreter.java/buggy/js/rhino/src/org/mozilla/javascript/Interpreter.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 760, 918, 4657, 45, 1085, 12, 30010, 751, 612, 396, 13, 288, 3639, 309, 261, 1345, 18, 1188, 45, 1085, 13, 288, 5411, 775, 288, 7734, 509, 277, 1085, 1782, 273, 612, 396, 18, 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, 760, 918, 4657, 45, 1085, 12, 30010, 751, 612, 396, 13, 288, 3639, 309, 261, 1345, 18, 1188, 45, 1085, 13, 288, 5411, 775, 288, 7734, 509, 277, 1085, 1782, 273, 612, 396, 18, 12...
iVisited.accept(_Payload);
_Payload.visitDefinedNode(iVisited);
public void visitDefinedNode(DefinedNode iVisited) { iVisited.accept(_Payload); }
46258 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46258/043fa4419ad506aa6f8843684eb8114b226fe4b5/DefaultIteratorVisitor.java/clean/org/jruby/nodes/visitor/DefaultIteratorVisitor.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 3757, 8116, 907, 12, 8116, 907, 277, 30019, 13, 288, 202, 202, 77, 30019, 18, 9436, 24899, 6110, 1769, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 3757, 8116, 907, 12, 8116, 907, 277, 30019, 13, 288, 202, 202, 77, 30019, 18, 9436, 24899, 6110, 1769, 202, 97, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
private void flushDeferredText(){
private void flushDeferredText() {
private void flushDeferredText(){ ApplicationManager.getApplication().assertIsDispatchThread(); synchronized(LOCK){ if (myOutputPaused) return; if (myDeferredOutput.length() == 0) return; } if (myEditor != null) { final String text = myDeferredOutput.substring(0, myDeferredOutput.length()); synchronized (LOCK) { if (USE_CYCLIC_BUFFER) { myDeferredOutput = new StringBuffer(Math.min(myDeferredOutput.length(), CYCLIC_BUFFER_SIZE)); } else { myDeferredOutput.setLength(0); } } final Document document = myEditor.getDocument(); final int oldLineCount = document.getLineCount(); final boolean isAtEndOfDocument = myEditor.getCaretModel().getOffset() == myEditor.getDocument().getTextLength(); ApplicationManager.getApplication().runWriteAction( new Runnable() { public void run() { CommandProcessor.getInstance().executeCommand(myProject, new Runnable() { public void run() { document.insertString(document.getTextLength(), text); } }, null, null); } } ); final int newLineCount = document.getLineCount(); if (oldLineCount < newLineCount){ myPsiDisposedCheck.performCheck(); highlightHyperlinks(oldLineCount - 1, newLineCount - 2); } if (isAtEndOfDocument) { myEditor.getCaretModel().moveToOffset(myEditor.getDocument().getTextLength()); myEditor.getSelectionModel().removeSelection(); myEditor.getScrollingModel().scrollToCaret(ScrollType.RELATIVE); } } }
17306 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17306/b2c98303d8266acfaa2462a108951e78cf7cbaa7/ConsoleViewImpl.java/buggy/execution/impl/com/intellij/execution/impl/ConsoleViewImpl.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 3238, 918, 3663, 16886, 1528, 1435, 288, 565, 4257, 1318, 18, 588, 3208, 7675, 11231, 2520, 5325, 3830, 5621, 565, 3852, 12, 6589, 15329, 1377, 309, 261, 4811, 1447, 28590, 13, 327, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 3238, 918, 3663, 16886, 1528, 1435, 288, 565, 4257, 1318, 18, 588, 3208, 7675, 11231, 2520, 5325, 3830, 5621, 565, 3852, 12, 6589, 15329, 1377, 309, 261, 4811, 1447, 28590, 13, 327, 31, 1...
this.jep = jep;
public RpEval(JEP jep) { this.jep = jep; this.opSet = jep.getOperatorSet(); }
54194 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54194/5d181473dd1ee3caca86484e98ff7c44ed644489/RpEval.java/buggy/src/org/lsmp/djep/rpe/RpEval.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 534, 84, 13904, 12, 46, 10541, 525, 881, 13, 288, 202, 202, 2211, 18, 78, 881, 273, 525, 881, 31, 202, 202, 2211, 18, 556, 694, 273, 525, 881, 18, 588, 5592, 694, 5621, 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, 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, 534, 84, 13904, 12, 46, 10541, 525, 881, 13, 288, 202, 202, 2211, 18, 78, 881, 273, 525, 881, 31, 202, 202, 2211, 18, 556, 694, 273, 525, 881, 18, 588, 5592, 694, 5621, 20...
public void startStreaming() throws RemoteException { MessageContext ctx = MessageContext.getCurrentContext ();
public void startStreaming(GSSCredential credential) throws RemoteException {
public void startStreaming() throws RemoteException { MessageContext ctx = MessageContext.getCurrentContext (); File outputFile = new File(localPath); SecContext secContext = (SecContext)ctx.getProperty ( org.globus.ogsa.impl.security.authentication.Constants.CONTEXT); if (secContext == null) { throw new RemoteException("Service must be accessed securely."); } GSSCredential cred = this.secContextSkeleton.getCredential(); if (cred == null) { // this should never happen since an instance cannot be created // without delegation. throw new RemoteException("Delegation not performed."); } _proxy = cred; out = openUrl(destinationURL); if(_outputFollower == null) { _outputFollower = new Tail(); _outputFollower.setLogger(_jobLogger); _outputFollower.start(); } try { _outputFollower.addFile(outputFile,out,offset); } catch(IOException e) { logger.error("Error streaming file", e); throw new RemoteException("Error in Streaming"); } }
8754 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8754/24fec91667fab55328daaf7471dfc6be09f462ad/FileStreamingImpl.java/clean/data_management/filestreaming/src/org/globus/ogsa/impl/base/gram/filestreaming/FileStreamingImpl.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 787, 15973, 1435, 1216, 18361, 288, 3639, 2350, 1042, 1103, 273, 2350, 1042, 18, 588, 3935, 1042, 261, 1769, 3639, 1387, 15047, 273, 394, 1387, 12, 3729, 743, 1769, 3639, 3232, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 15973, 1435, 1216, 18361, 288, 3639, 2350, 1042, 1103, 273, 2350, 1042, 18, 588, 3935, 1042, 261, 1769, 3639, 1387, 15047, 273, 394, 1387, 12, 3729, 743, 1769, 3639, 3232, ...
return this.identifier; }
return this.identifier; }
public GrailsDomainClassProperty getIdentifier() { return this.identifier; }
50129 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50129/58974951e3276884850340e13cf2bb066cb110b9/DefaultGrailsDomainClass.java/clean/src/commons/org/codehaus/groovy/grails/commons/DefaultGrailsDomainClass.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 10812, 14573, 3748, 797, 1396, 9650, 1435, 288, 202, 202, 2463, 333, 18, 5644, 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, ...
[ 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 10812, 14573, 3748, 797, 1396, 9650, 1435, 288, 202, 202, 2463, 333, 18, 5644, 31, 202, 97, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getAntParent(xmlTagChildChanged.getTag()).clearCaches();
final AntElement element = getAntParent(xmlTagChildChanged.getTag()); if (element != null) { element.clearCaches(); }
public void visitXmlTagChildChanged(final XmlTagChildChanged xmlTagChildChanged) { getAntParent(xmlTagChildChanged.getTag()).clearCaches(); }
56627 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56627/83746194a92e69be3c85839bbd3aa8624143da73/AntChangeVisitor.java/clean/plugins/ant/src/com/intellij/lang/ant/psi/changes/AntChangeVisitor.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 3757, 4432, 1805, 1763, 5033, 12, 6385, 5714, 1805, 1763, 5033, 2025, 1805, 1763, 5033, 13, 288, 565, 727, 18830, 1046, 930, 273, 4506, 496, 3054, 12, 2902, 1805, 1763, 5033, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 3757, 4432, 1805, 1763, 5033, 12, 6385, 5714, 1805, 1763, 5033, 2025, 1805, 1763, 5033, 13, 288, 565, 727, 18830, 1046, 930, 273, 4506, 496, 3054, 12, 2902, 1805, 1763, 5033, 1...
tag.setDateFormat("dd-MMM-yyyy HH:mm:ss");
String formatString = "dd-MMM-yyyy HH:mm:ss"; tag.setDateFormat(formatString); SimpleDateFormat sdf = new SimpleDateFormat(formatString); Calendar cal = Calendar.getInstance(); cal.set(2002, Calendar.FEBRUARY, 22, 12, 0, 0); String dateString = sdf.format(cal.getTime());
public void testGetLinkText() { NavigationTag tag = new NavigationTag(); assertEquals("02/22/2002 12:00:00", tag.getLinkText("log20020222120000.xml")); assertEquals("02/22/2002 12:00:00", tag.getLinkText("log200202221200.xml")); assertEquals("02/22/2002 12:00:00 (3.11)", tag.getLinkText("log20020222120000L3.11.xml")); tag.setDateFormat("dd-MMM-yyyy HH:mm:ss"); assertEquals("22-Feb-2002 12:00:00", tag.getLinkText("log20020222120000.xml")); assertEquals("22-Feb-2002 12:00:00 (3.11)", tag.getLinkText("log20020222120000L3.11.xml")); }
55334 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55334/e9fde9c6365907057c45608ac4c8c6b77681f1d9/NavigationTagTest.java/clean/reporting/jsp/test/net/sourceforge/cruisecontrol/taglib/NavigationTagTest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1842, 967, 2098, 1528, 1435, 288, 3639, 22924, 1805, 1047, 273, 394, 22924, 1805, 5621, 3639, 1815, 8867, 2932, 3103, 19, 3787, 19, 6976, 22, 2593, 30, 713, 30, 713, 3113, 1047...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 967, 2098, 1528, 1435, 288, 3639, 22924, 1805, 1047, 273, 394, 22924, 1805, 5621, 3639, 1815, 8867, 2932, 3103, 19, 3787, 19, 6976, 22, 2593, 30, 713, 30, 713, 3113, 1047...
return RepositoryLocationUtil.mapUrlToFileLocation(auLoc, urlStr);
return LockssRepositoryServiceImpl.mapUrlToFileLocation(auLoc, urlStr);
protected String getNodeLocation(CachedUrlSet cus) throws MalformedURLException { StringBuffer buffer = new StringBuffer(rootDir); if (!rootDir.endsWith(File.separator)) { buffer.append(File.separator); } buffer.append(HISTORY_ROOT_NAME); buffer.append(File.separator); String auLoc = RepositoryLocationUtil.mapAuToFileLocation(buffer.toString(), cus.getArchivalUnit()); String urlStr = (String)cus.getUrl(); if (AuUrl.isAuUrl(urlStr)) { return auLoc; } else { return RepositoryLocationUtil.mapUrlToFileLocation(auLoc, urlStr); } }
8150 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8150/1689897b8e97c2815afc30b0343e51df5eb40065/HistoryRepositoryImpl.java/clean/src/org/lockss/state/HistoryRepositoryImpl.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 4750, 514, 5973, 2735, 12, 9839, 1489, 694, 27964, 13, 1377, 1216, 20710, 288, 565, 6674, 1613, 273, 394, 6674, 12, 3085, 1621, 1769, 565, 309, 16051, 3085, 1621, 18, 5839, 1190, 12, 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, 282, 4750, 514, 5973, 2735, 12, 9839, 1489, 694, 27964, 13, 1377, 1216, 20710, 288, 565, 6674, 1613, 273, 394, 6674, 12, 3085, 1621, 1769, 565, 309, 16051, 3085, 1621, 18, 5839, 1190, 12, 812,...
rd.close();
private static Object findJarServiceProvider(String factoryId) throws ConfigurationError { SecuritySupport ss = SecuritySupport.getInstance(); String serviceId = "META-INF/services/" + factoryId; InputStream is = null; // First try the Context ClassLoader ClassLoader cl = findClassLoader(); is = ss.getResourceAsStream(cl, serviceId); // If no provider found then try the current ClassLoader if (is == null) { ClassLoader current = ObjectFactory.class.getClassLoader(); if (cl != current) { cl = current; is = ss.getResourceAsStream(cl, serviceId); } } if (is == null) { // No provider found return null; } if (DEBUG) debugPrintln("found jar resource=" + serviceId + " using ClassLoader: " + cl); // Read the service provider name in UTF-8 as specified in // the jar spec. Unfortunately this fails in Microsoft // VJ++, which does not implement the UTF-8 // encoding. Theoretically, we should simply let it fail in // that case, since the JVM is obviously broken if it // doesn't support such a basic standard. But since there // are still some users attempting to use VJ++ for // development, we have dropped in a fallback which makes a // second attempt using the platform's default encoding. In // VJ++ this is apparently ASCII, which is a subset of // UTF-8... and since the strings we'll be reading here are // also primarily limited to the 7-bit ASCII range (at // least, in English versions), this should work well // enough to keep us on the air until we're ready to // officially decommit from VJ++. [Edited comment from // jkesselm] BufferedReader rd; try { rd = new BufferedReader(new InputStreamReader(is, "UTF-8"), DEFAULT_LINE_LENGTH); } catch (java.io.UnsupportedEncodingException e) { rd = new BufferedReader(new InputStreamReader(is), DEFAULT_LINE_LENGTH); } String factoryClassName = null; try { // XXX Does not handle all possible input as specified by the // Jar Service Provider specification factoryClassName = rd.readLine(); rd.close(); } catch (IOException x) { // No provider found return null; } if (factoryClassName != null && ! "".equals(factoryClassName)) { if (DEBUG) debugPrintln("found in resource, value=" + factoryClassName); // Note: here we do not want to fall back to the current // ClassLoader because we want to avoid the case where the // resource file was found using one ClassLoader and the // provider class was instantiated using a different one. return newInstance(factoryClassName, cl, false); } // No provider found return null; }
1831 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1831/512b7cab1679b107cd82b15a1a6d560df9df249d/ObjectFactory.java/buggy/src/org/apache/xml/serialize/ObjectFactory.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 760, 1033, 1104, 10813, 16300, 12, 780, 3272, 548, 13, 3639, 1216, 27507, 565, 288, 3639, 6036, 6289, 5202, 273, 6036, 6289, 18, 588, 1442, 5621, 3639, 514, 17130, 273, 315, 19294, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1033, 1104, 10813, 16300, 12, 780, 3272, 548, 13, 3639, 1216, 27507, 565, 288, 3639, 6036, 6289, 5202, 273, 6036, 6289, 18, 588, 1442, 5621, 3639, 514, 17130, 273, 315, 19294, ...
public void createControl(Composite parent) { Composite container = new Composite(parent, SWT.FILL); GridLayout layout = new GridLayout(); container.setLayout(layout); layout.numColumns = 1; createReportPeriodGroup(container); Label spacer = new Label(container, SWT.NONE); spacer.setText(" "); createCategorySelectionGroup(container); setControl(container); numDays.setFocus(); }
51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/7a7a421c21acbc8fa6873e3df191ede088015df0/TaskPlannerWizardPage.java/clean/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasklist/planner/ui/TaskPlannerWizardPage.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 752, 3367, 12, 9400, 982, 13, 288, 202, 202, 9400, 1478, 273, 394, 14728, 12, 2938, 16, 348, 8588, 18, 29818, 1769, 202, 202, 6313, 3744, 3511, 273, 394, 7145, 3744, 5621...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 752, 3367, 12, 9400, 982, 13, 288, 202, 202, 9400, 1478, 273, 394, 14728, 12, 2938, 16, 348, 8588, 18, 29818, 1769, 202, 202, 6313, 3744, 3511, 273, 394, 7145, 3744, 5621...
glyphOffset = (float)(firstGlyphPosition.getX());
glyphOffset = (float)(firstGlyphPosition.getX()); currentPosition = (float)(firstGlyphPosition.getY() + startOffset);
protected void doPathLayout() { if (pathApplied) return; if (!spacingApplied) // This will layout the text if needed. adjustTextSpacing(); getGlyphAdvances(); // if doesn't have an attached text path, just return if (textPath == null) { // We applied the empty path (i.e. do nothing). pathApplied = true; return; } boolean horizontal = !isVertical(); boolean glyphOrientationAuto = isGlyphOrientationAuto(); int glyphOrientationAngle = 0; if (!glyphOrientationAuto) { glyphOrientationAngle = getGlyphOrientationAngle(); } float pathLength = textPath.lengthOfPath(); float startOffset = textPath.getStartOffset(); int numGlyphs = gv.getNumGlyphs(); // make sure all glyphs visible again, this maybe just a change in // offset so they may have been made invisible in a previous // pathLayout call for (int i = 0; i < numGlyphs; i++) { gv.setGlyphVisible(i, true); } // calculate the total length of the glyphs, this will become be // the length along the path that is used by the text float glyphsLength; if (horizontal) { glyphsLength = (float) gv.getLogicalBounds().getWidth(); } else { glyphsLength = (float) gv.getLogicalBounds().getHeight(); } // check that pathLength and glyphsLength are not 0 if (pathLength == 0f || glyphsLength == 0f) { // We applied the empty path. pathApplied = true; textPathAdvance = advance; return; } // the current start point of the character on the path float currentPosition; if (horizontal) { currentPosition = (float)offset.getX() + startOffset; } else { currentPosition = (float)offset.getY() + startOffset; } // calculate the offset of the first glyph the offset will be // 0 if the glyph is on the path (ie. not adjusted by a dy or // dx) Point2D firstGlyphPosition = gv.getGlyphPosition(0); float glyphOffset = 0; // offset perpendicular to path if (horizontal) { glyphOffset = (float)(firstGlyphPosition.getY()); } else { glyphOffset = (float)(firstGlyphPosition.getX()); } char ch = aci.first(); int start = aci.getBeginIndex(); int currentChar = 0; int lastGlyphDrawn = -1; float lastGlyphAdvance = 0; // iterate through the GlyphVector placing each glyph for (int i = 0; i < numGlyphs; i++) { Point2D currentGlyphPosition = gv.getGlyphPosition(i); // calculate the advance and offset for the next glyph, do it // now before we modify the current glyph position float glyphAdvance = 0; // along path float nextGlyphOffset = 0; // perpendicular to path eg dy or dx if (i < gv.getNumGlyphs()-1) { Point2D nextGlyphPosition = gv.getGlyphPosition(i+1); if (horizontal) { glyphAdvance = (float)(nextGlyphPosition.getX() - currentGlyphPosition.getX()); nextGlyphOffset = (float)(nextGlyphPosition.getY() - currentGlyphPosition.getY()); } else { glyphAdvance = (float)(nextGlyphPosition.getY() - currentGlyphPosition.getY()); nextGlyphOffset = (float)(nextGlyphPosition.getX() - currentGlyphPosition.getX()); } } else { // last glyph, use the glyph metrics GVTGlyphMetrics gm = gv.getGlyphMetrics(i); if (horizontal) { if ((glyphOrientationAngle == 0) || (glyphOrientationAngle == 180)) { glyphAdvance = gm.getHorizontalAdvance(); } else { // 90 || 270 glyphAdvance = gm.getVerticalAdvance(); } } else { if (glyphOrientationAuto) { if (isLatinChar(ch)) { glyphAdvance = gm.getHorizontalAdvance(); } else { glyphAdvance = gm.getVerticalAdvance(); } } else { if ((glyphOrientationAngle == 0) || (glyphOrientationAngle == 180)) { glyphAdvance = gm.getVerticalAdvance(); } else { // 90 || 270 glyphAdvance = gm.getHorizontalAdvance(); } } } } // calculate the center line position for the glyph Rectangle2D glyphBounds = gv.getGlyphOutline(i).getBounds2D(); float glyphWidth = (float) glyphBounds.getWidth(); float glyphHeight = (float) glyphBounds.getHeight(); float charMidPos; if (horizontal) { charMidPos = currentPosition + glyphWidth / 2f; } else { charMidPos = currentPosition + glyphHeight / 2f; } // Calculate the actual point to place the glyph around Point2D charMidPoint = textPath.pointAtLength(charMidPos); // Check if the glyph is actually on the path if (charMidPoint != null) { // Calculate the normal to the path (midline of glyph) float angle = textPath.angleAtLength(charMidPos); // Define the transform of the glyph AffineTransform glyphPathTransform = new AffineTransform(); // rotate midline of glyph to be normal to path if (horizontal) { glyphPathTransform.rotate(angle); } else { glyphPathTransform.rotate(angle-(Math.PI/2)); } // re-apply any offset eg from tspan, or spacing adjust if (horizontal) { glyphPathTransform.translate(0, glyphOffset); } else { glyphPathTransform.translate(glyphOffset, 0); } // translate glyph backwards so we rotate about the // center of the glyph if (horizontal) { if (glyphOrientationAngle == 270) { glyphPathTransform.translate(glyphWidth / 2f, 0f); } else { // 0 || 90 || 180 glyphPathTransform.translate(-glyphWidth / 2f, 0f); } } else { if (glyphOrientationAuto) { if (isLatinChar(ch)) { glyphPathTransform.translate(0f, -glyphHeight/2f); } else { glyphPathTransform.translate(0f, glyphHeight/2f); } } else { if (glyphOrientationAngle == 0) { glyphPathTransform.translate(0, glyphHeight / 2f); } else { // 90 || 180 || 270 glyphPathTransform.translate(0, -glyphHeight / 2f); } } } // set the new glyph position and transform AffineTransform glyphTransform = gv.getGlyphTransform(i); if (glyphTransform != null) { glyphPathTransform.concatenate(glyphTransform); } gv.setGlyphTransform(i, glyphPathTransform); gv.setGlyphPosition (i, charMidPoint); // keep track of the last glyph drawn to make calculating the // textPathAdvance value easier later lastGlyphDrawn = i; lastGlyphAdvance = glyphAdvance; } else { // not on path so don't render gv.setGlyphVisible(i, false); } currentPosition += glyphAdvance; glyphOffset += nextGlyphOffset; currentChar += gv.getCharacterCount(i,i); if (currentChar >= charMap.length) currentChar = charMap.length-1; ch = aci.setIndex(currentChar+start); } // store the position where a following glyph should be drawn, // note: this will only be used if the following text layout is not // on a text path if (lastGlyphDrawn > -1) { Point2D lastGlyphPos = gv.getGlyphPosition(lastGlyphDrawn); if (horizontal) { textPathAdvance = new Point2D.Double (lastGlyphPos.getX()+lastGlyphAdvance, lastGlyphPos.getY()); } else { textPathAdvance = new Point2D.Double (lastGlyphPos.getX(), lastGlyphPos.getY()+lastGlyphAdvance); } } else { textPathAdvance = new Point2D.Double(0,0); } // The default layout is junk now... layoutApplied = false; // The spacing stuff is junk now. spacingApplied = false; pathApplied = true; }
46680 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46680/50d9678412df39bd7a013ca39536708449f50f77/GlyphLayout.java/clean/sources/org/apache/batik/gvt/text/GlyphLayout.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 918, 741, 743, 3744, 1435, 288, 3639, 309, 261, 803, 16203, 13, 2398, 327, 31, 3639, 309, 16051, 14080, 16203, 13, 5411, 368, 1220, 903, 3511, 326, 977, 309, 3577, 18, 5411, 5765, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 918, 741, 743, 3744, 1435, 288, 3639, 309, 261, 803, 16203, 13, 2398, 327, 31, 3639, 309, 16051, 14080, 16203, 13, 5411, 368, 1220, 903, 3511, 326, 977, 309, 3577, 18, 5411, 5765, ...
for (int j = 0; j < availablePriorities.size(); j++) priorityCombos[i].add((String) availablePriorities.get(j));
for (int j = 0; j < availablePriorities.size(); j++) { priorityCombos[i].add((String) availablePriorities.get(j)); }
private void updateUI(int[] priorities, int[] directions) { ArrayList availablePriorities = new ArrayList(Arrays .asList(propertyText)); for (int i = 0; i < priorityCombos.length; i++) { priorityCombos[i].removeAll(); for (int j = 0; j < availablePriorities.size(); j++) priorityCombos[i].add((String) availablePriorities.get(j)); priorityCombos[i].select(priorityCombos[i] .indexOf(propertyText[priorities[i]])); availablePriorities.remove(propertyText[priorities[i]]); ascendingButtons[i] .setSelection(directions[priorities[i]] == TableSorter.ASCENDING); descendingButtons[i] .setSelection(directions[priorities[i]] == TableSorter.DESCENDING); } }
56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/e38d295ea613cf9f08aadb93a84a33d2e91abc5f/TableSortDialog.java/clean/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/TableSortDialog.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 1089, 5370, 12, 474, 8526, 26783, 16, 509, 8526, 18558, 13, 288, 3639, 2407, 2319, 25355, 1961, 273, 394, 2407, 12, 12726, 7734, 263, 345, 682, 12, 4468, 1528, 10019, 3639, 364...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1089, 5370, 12, 474, 8526, 26783, 16, 509, 8526, 18558, 13, 288, 3639, 2407, 2319, 25355, 1961, 273, 394, 2407, 12, 12726, 7734, 263, 345, 682, 12, 4468, 1528, 10019, 3639, 364...
return loadError; }
return loadError; }
public RubyClass getLoadError() { return loadError; }
47984 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47984/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyExceptions.java/buggy/org/jruby/runtime/RubyExceptions.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 19817, 797, 336, 2563, 668, 1435, 288, 202, 202, 2463, 1262, 668, 31, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 19817, 797, 336, 2563, 668, 1435, 288, 202, 202, 2463, 1262, 668, 31, 202, 97, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...