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 |
|---|---|---|---|---|---|---|
pcPrevBranch = pcJump; | 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 : { // indexReg: local to store return address Object value = stack[LOCAL_SHFT + indexReg]; 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 + indexReg]; } 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_IND_C0: indexReg = 0; continue Loop; case Icode_REG_IND_C1: indexReg = 1; continue Loop; case Icode_REG_IND_C2: indexReg = 2; continue Loop; case Icode_REG_IND_C3: indexReg = 3; 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 : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.getProp(lhs, stringReg, scope); continue Loop; } case Token.SETPROP : { 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.setProp(lhs, stringReg, 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 : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.postIncrDecr(lhs, stringReg, 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 : stack[LOCAL_SHFT + indexReg] = stack[stackTop]; sDbl[LOCAL_SHFT + indexReg] = sDbl[stackTop]; --stackTop; continue Loop; case Token.LOCAL_LOAD : ++stackTop; stack[stackTop] = stack[LOCAL_SHFT + indexReg]; sDbl[stackTop] = sDbl[LOCAL_SHFT + indexReg]; 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 : if (!useActivationVars) { stack[VAR_SHFT + indexReg] = stack[stackTop]; sDbl[VAR_SHFT + indexReg] = sDbl[stackTop]; } else { Object val = stack[stackTop]; if (val == DBL_MRK) val = doubleWrap(sDbl[stackTop]); activationPut(fnOrScript, scope, indexReg, val); } continue Loop; case Token.GETVAR : ++stackTop; if (!useActivationVars) { stack[stackTop] = stack[VAR_SHFT + indexReg]; sDbl[stackTop] = sDbl[VAR_SHFT + indexReg]; } else { stack[stackTop] = activationGet(fnOrScript, scope, indexReg); } continue Loop; case Icode_VARINC : case Icode_VARDEC : ++stackTop; if (!useActivationVars) { Object val = stack[VAR_SHFT + indexReg]; stack[stackTop] = val; double d; if (val == DBL_MRK) { d = sDbl[VAR_SHFT + indexReg]; sDbl[stackTop] = d; } else { d = ScriptRuntime.toNumber(val); } stack[VAR_SHFT + indexReg] = DBL_MRK; sDbl[VAR_SHFT + indexReg] = (op == Icode_VARINC) ? d + 1.0 : d - 1.0; } else { Object val = activationGet(fnOrScript, scope, indexReg); stack[stackTop] = val; double d = ScriptRuntime.toNumber(val); val = doubleWrap((op == Icode_VARINC) ? d + 1.0 : d - 1.0); activationPut(fnOrScript, scope, indexReg, val); } 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 : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); --stackTop; stack[LOCAL_SHFT + indexReg] = ScriptRuntime.enumInit(lhs, scope); continue Loop; } case Token.ENUM_NEXT : case Token.ENUM_ID : { Object val = stack[LOCAL_SHFT + indexReg]; ++stackTop; stack[stackTop] = (op == Token.ENUM_NEXT) ? (Object)ScriptRuntime.enumNext(val) : (Object)ScriptRuntime.enumId(val); 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; } | 12904 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12904/e2a31f83bc2789c24da1d4c13078eabab477433a/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... | |
boardGraph.drawLine(drawX + 21, drawY, drawX + 62, drawY); | boardGraph.drawLine(drawX + (int)(21*scale), drawY, drawX + (int)(62*scale), drawY); | private void drawHex(Coords c) { if (!game.board.contains(c)) { return; } final Hex hex = game.board.getHex(c); final Point hexLoc = getHexLocation(c); int level = hex.getElevation(); int depth = hex.depth(); // offset drawing point int drawX = hexLoc.x - boardRect.x; int drawY = hexLoc.y - boardRect.y; // draw picture boardGraph.drawImage(tileManager.baseFor(hex), drawX, drawY, this); if (tileManager.supersFor(hex) != null) { for (Iterator i = tileManager.supersFor(hex).iterator(); i.hasNext();) { boardGraph.drawImage((Image)i.next(), drawX, drawY, this); } } // draw hex number boardGraph.setColor(Settings.mapTextColor); boardGraph.setFont(FONT_HEXNUM); boardGraph.drawString(c.getBoardNum(), drawX + 30, drawY + 12); // level | depth boardGraph.setFont(FONT_ELEV); if (level != 0 && depth == 0) { boardGraph.drawString("LEVEL " + level, drawX + 24, drawY + 70); } else if (depth != 0 && level == 0) { boardGraph.drawString("DEPTH " + depth, drawX + 24, drawY + 70); } else if (level != 0 && depth != 0) { boardGraph.drawString("LEVEL " + level, drawX + 24, drawY + 60); boardGraph.drawString("DEPTH " + depth, drawX + 24, drawY + 70); } // draw elevation borders boardGraph.setColor(Color.black); if (drawElevationLine(c, 0)) { boardGraph.drawLine(drawX + 21, drawY, drawX + 62, drawY); } if (drawElevationLine(c, 1)) { boardGraph.drawLine(drawX + 62, drawY, drawX + 83, drawY + 35); } if (drawElevationLine(c, 2)) { boardGraph.drawLine(drawX + 83, drawY + 36, drawX + 62, drawY + 71); } if (drawElevationLine(c, 3)) { boardGraph.drawLine(drawX + 62, drawY + 71, drawX + 21, drawY + 71); } if (drawElevationLine(c, 4)) { boardGraph.drawLine(drawX + 21, drawY + 71, drawX, drawY + 36); } if (drawElevationLine(c, 5)) { boardGraph.drawLine(drawX, drawY + 35, drawX + 21, drawY); } } | 4135 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4135/51af4392d7a07684154e89f2bc446e485bca92a1/BoardView1.java/clean/megamek/src/megamek/client/ui/AWT/BoardView1.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
3724,
7037,
12,
13089,
276,
13,
288,
3639,
309,
16051,
13957,
18,
3752,
18,
12298,
12,
71,
3719,
288,
5411,
327,
31,
3639,
289,
3639,
727,
15734,
3827,
273,
7920,
18,
3752,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3724,
7037,
12,
13089,
276,
13,
288,
3639,
309,
16051,
13957,
18,
3752,
18,
12298,
12,
71,
3719,
288,
5411,
327,
31,
3639,
289,
3639,
727,
15734,
3827,
273,
7920,
18,
3752,
1... |
int _cnt1138=0; _loop1138: | int _cnt1142=0; _loop1142: | public final void defineframestate(AST _t) throws RecognitionException { AST defineframestate_AST_in = (_t == ASTNULL) ? null : (AST)_t; AST __t1127 = _t; AST tmp947_AST_in = (AST)_t; match(_t,DEFINE); _t = _t.getFirstChild(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case NEW: case SHARED: { def_shared(_t); _t = _retTree; break; } case FRAME: case PRIVATE: case PUBLIC: case PROTECTED: { break; } default: { throw new NoViableAltException(_t); } } } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case PRIVATE: case PUBLIC: case PROTECTED: { def_visib(_t); _t = _retTree; break; } case FRAME: { break; } default: { throw new NoViableAltException(_t); } } } AST tmp948_AST_in = (AST)_t; match(_t,FRAME); _t = _t.getNextSibling(); AST tmp949_AST_in = (AST)_t; match(_t,ID); _t = _t.getNextSibling(); { _loop1131: do { if (_t==null) _t=ASTNULL; if ((_t.getType()==Form_item)) { form_item(_t); _t = _retTree; } else { break _loop1131; } } while (true); } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case HEADER: { AST __t1133 = _t; AST tmp950_AST_in = (AST)_t; match(_t,HEADER); _t = _t.getFirstChild(); { int _cnt1135=0; _loop1135: do { if (_t==null) _t=ASTNULL; if ((_t.getType()==Form_item)) { display_item(_t); _t = _retTree; } else { if ( _cnt1135>=1 ) { break _loop1135; } else {throw new NoViableAltException(_t);} } _cnt1135++; } while (true); } _t = __t1133; _t = _t.getNextSibling(); break; } case BACKGROUND: { AST __t1136 = _t; AST tmp951_AST_in = (AST)_t; match(_t,BACKGROUND); _t = _t.getFirstChild(); { int _cnt1138=0; _loop1138: do { if (_t==null) _t=ASTNULL; if ((_t.getType()==Form_item)) { display_item(_t); _t = _retTree; } else { if ( _cnt1138>=1 ) { break _loop1138; } else {throw new NoViableAltException(_t);} } _cnt1138++; } while (true); } _t = __t1136; _t = _t.getNextSibling(); break; } case EOF: case PERIOD: case EXCEPT: case WITH: { break; } default: { throw new NoViableAltException(_t); } } } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case EXCEPT: { AST __t1140 = _t; AST tmp952_AST_in = (AST)_t; match(_t,EXCEPT); _t = _t.getFirstChild(); { _loop1142: do { if (_t==null) _t=ASTNULL; if ((_t.getType()==Field_ref)) { field(_t); _t = _retTree; } else { break _loop1142; } } while (true); } _t = __t1140; _t = _t.getNextSibling(); break; } case EOF: case PERIOD: case WITH: { break; } default: { throw new NoViableAltException(_t); } } } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case WITH: { framephrase(_t); _t = _retTree; break; } case EOF: case PERIOD: { break; } default: { throw new NoViableAltException(_t); } } } state_end(_t); _t = _retTree; _t = __t1127; _t = _t.getNextSibling(); _retTree = _t; } | 13952 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13952/daa15e07422d3491bbbb4d0060450c81983332a4/TreeParser03.java/clean/trunk/org.prorefactor.core/src/org/prorefactor/treeparser03/TreeParser03.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
4426,
74,
1940,
395,
340,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
4426,
74,
1940,
395,
340,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
4426,
74,
1940,
395,
340,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
4426,
74,
1940,
395,
340,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
... |
abstract void checkManifest() | abstract void checkManifest(MetsManifest manifest) | abstract void checkManifest() throws MetadataValidationException; | 52457 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52457/748804adc26317566de95cc497aca1def22e5f87/AbstractMetsSubmission.java/buggy/dspace/src/org/dspace/content/packager/AbstractMetsSubmission.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
8770,
918,
866,
9121,
12,
49,
2413,
9121,
5643,
13,
3639,
1216,
6912,
18146,
31,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
8770,
918,
866,
9121,
12,
49,
2413,
9121,
5643,
13,
3639,
1216,
6912,
18146,
31,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
this.xpath_comments = xpath_comments; | this.xpath_comments = path; | public void setXpathComments(Comments path) { this.xpath_comments = xpath_comments; } | 27800 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/27800/e1554ff183967d3c95c78e7f8a73d48be6ab77d7/CLDRDBSource.java/buggy/tools/java/org/unicode/cldr/web/CLDRDBSource.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
23733,
803,
9051,
12,
9051,
589,
13,
288,
3639,
333,
18,
18644,
67,
9231,
273,
589,
31,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
23733,
803,
9051,
12,
9051,
589,
13,
288,
3639,
333,
18,
18644,
67,
9231,
273,
589,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
table.complete(); | protected void write(Element element, int indent) throws IOException { switch(element.type()) { case Element.CHUNK: { Chunk chunk = (Chunk) element; // if the chunk contains an image, return the image representation try { Image image = chunk.getImage(); write(image, indent); return; } catch(NullPointerException npe) { // empty on purpose } if (chunk.isEmpty()) return; HashMap attributes = chunk.getAttributes(); // patch by Matt Benson 02/21/2002 if (chunk.font().isStandardFont() && attributes == null && !(hasMarkupAttributes(chunk))) { // end patch by Matt Benson 02/21/2002 addTabs(indent); write(HtmlEncoder.encode(chunk.content())); os.write(NEWLINE); return; } else { if (attributes != null && attributes.get(Chunk.NEWPAGE) != null) { return; } addTabs(indent); writeStart(HtmlTags.CHUNK); if (! chunk.font().isStandardFont()) { write(chunk.font()); } // patch by Matt Benson 02/21/2002 if (hasMarkupAttributes(chunk)) { writeMarkupAttributes((MarkupAttributes)chunk); }//end if this Element has MarkupAttributes // end patch by Matt Benson 02/21/2002 os.write(GT); if (attributes != null && attributes.get(Chunk.SUBSUPSCRIPT) != null) { if (((Float)attributes.get(Chunk.SUBSUPSCRIPT)).floatValue() > 0) { writeStart(HtmlTags.SUP); } else { writeStart(HtmlTags.SUB); } os.write(GT); } write(HtmlEncoder.encode(chunk.content())); if (attributes != null && attributes.get(Chunk.SUBSUPSCRIPT) != null) { os.write(LT); os.write(FORWARD); if (((Float)attributes.get(Chunk.SUBSUPSCRIPT)).floatValue() > 0) { write(HtmlTags.SUP); } else { write(HtmlTags.SUB); } os.write(GT); } writeEnd(HtmlTags.CHUNK); } return; } case Element.PHRASE: { Phrase phrase = (Phrase) element; addTabs(indent); writeStart(HtmlTags.PHRASE); write(phrase.font()); // patch by Matt Benson 02/21/2002 if (hasMarkupAttributes(phrase)) { writeMarkupAttributes((MarkupAttributes)phrase); }//end if this Element has MarkupAttributes // end patch by Matt Benson 02/21/2002 os.write(GT); os.write(NEWLINE); for (Iterator i = phrase.iterator(); i.hasNext(); ) { write((Element) i.next(), indent + 1); } addTabs(indent); writeEnd(HtmlTags.PHRASE); return; } case Element.ANCHOR: { Anchor anchor = (Anchor) element; if (!anchor.font().isStandardFont()) { addTabs(indent); writeStart(HtmlTags.PHRASE); write(anchor.font()); os.write(GT); os.write(NEWLINE); } addTabs(indent); writeStart(HtmlTags.ANCHOR); if (anchor.name() != null) { write(HtmlTags.NAME, anchor.name()); } if (anchor.reference() != null) { write(HtmlTags.REFERENCE, anchor.reference()); } // patch by Matt Benson 02/21/2002 if (hasMarkupAttributes(anchor)) { writeMarkupAttributes((MarkupAttributes)anchor); }//end if this Element has MarkupAttributes // end patch by Matt Benson 02/21/2002 os.write(GT); os.write(NEWLINE); for (Iterator i = anchor.iterator(); i.hasNext(); ) { write((Element) i.next(), indent + 1); } addTabs(indent); writeEnd(HtmlTags.ANCHOR); if (!anchor.font().isStandardFont()) { addTabs(indent); writeEnd(HtmlTags.PHRASE); } return; } case Element.PARAGRAPH: { Paragraph paragraph = (Paragraph) element; addTabs(indent); writeStart(HtmlTags.PARAGRAPH); String alignment = HtmlEncoder.getAlignment(paragraph.alignment()); if (!"".equals(alignment)) { write(HtmlTags.ALIGN, alignment); } os.write(GT); os.write(NEWLINE); if (!paragraph.font().isStandardFont() || hasMarkupAttributes(paragraph)) { addTabs(indent); writeStart(HtmlTags.PHRASE); if (!paragraph.font().isStandardFont()) { write(paragraph.font()); } // patch by Matt Benson 02/21/2002 if (hasMarkupAttributes(paragraph)) { writeMarkupAttributes((MarkupAttributes)paragraph); }//end if this Element has MarkupAttributes // end patch by Matt Benson 02/21/2002 os.write(GT); os.write(NEWLINE); } for (Iterator i = paragraph.iterator(); i.hasNext(); ) { write((Element) i.next(), indent + 1); } if (!paragraph.font().isStandardFont()) { addTabs(indent); writeEnd(HtmlTags.PHRASE); } addTabs(indent); writeEnd(HtmlTags.PARAGRAPH); return; } case Element.SECTION: case Element.CHAPTER: { Section section = (Section) element; addTabs(indent); writeStart(HtmlTags.DIV); // patch by Matt Benson 02/21/2002 if (hasMarkupAttributes(section)) { writeMarkupAttributes((MarkupAttributes)section); }//end if this Element has MarkupAttributes // end patch by Matt Benson 02/21/2002 writeSection(section, indent); writeEnd(HtmlTags.DIV); return; } case Element.LIST: { List list = (List) element; addTabs(indent); if (list.isNumbered()) { writeStart(HtmlTags.ORDEREDLIST); } else { writeStart(HtmlTags.UNORDEREDLIST); } // patch by Matt Benson 02/21/2002 if (hasMarkupAttributes(list)) { writeMarkupAttributes((MarkupAttributes)list); }//end if this Element has MarkupAttributes // end patch by Matt Benson 02/21/2002 os.write(GT); os.write(NEWLINE); for (Iterator i = list.getItems().iterator(); i.hasNext(); ) { write((Element) i.next(), indent + 1); } addTabs(indent); if (list.isNumbered()) { writeEnd(HtmlTags.ORDEREDLIST); } else { writeEnd(HtmlTags.UNORDEREDLIST); } return; } case Element.LISTITEM: { ListItem listItem = (ListItem) element; addTabs(indent); writeStart(HtmlTags.LISTITEM); // patch by Matt Benson 02/21/2002 if (hasMarkupAttributes(listItem)) { writeMarkupAttributes((MarkupAttributes)listItem); }//end if this Element has MarkupAttributes // end patch by Matt Benson 02/21/2002 os.write(GT); os.write(NEWLINE); if (!listItem.font().isStandardFont()) { addTabs(indent); writeStart(HtmlTags.PHRASE); write(listItem.font()); os.write(GT); os.write(NEWLINE); } for (Iterator i = listItem.iterator(); i.hasNext(); ) { write((Element) i.next(), indent + 1); } if (!listItem.font().isStandardFont()) { addTabs(indent); writeEnd(HtmlTags.PHRASE); } addTabs(indent); writeEnd(HtmlTags.LISTITEM); return; } case Element.CELL: { Cell cell = (Cell) element; addTabs(indent); if (cell.header()) { writeStart(HtmlTags.HEADERCELL); } else { writeStart(HtmlTags.CELL); } if (cell.borderWidth() != Rectangle.UNDEFINED) { write(HtmlTags.BORDERWIDTH, String.valueOf(cell.borderWidth())); } if (cell.borderColor() != null) { write(HtmlTags.BORDERCOLOR, HtmlEncoder.encode(cell.borderColor())); } if (cell.backgroundColor() != null) { write(HtmlTags.BACKGROUNDCOLOR, HtmlEncoder.encode(cell.backgroundColor())); } String alignment = HtmlEncoder.getAlignment(cell.horizontalAlignment()); if (!"".equals(alignment)) { write(HtmlTags.HORIZONTALALIGN, alignment); } alignment = HtmlEncoder.getAlignment(cell.verticalAlignment()); if (!"".equals(alignment)) { write(HtmlTags.VERTICALALIGN, alignment); } if (cell.cellWidth() != null) { write(HtmlTags.WIDTH, cell.cellWidth()); } if (cell.colspan() != 1) { write(HtmlTags.COLSPAN, String.valueOf(cell.colspan())); } if (cell.rowspan() != 1) { write(HtmlTags.ROWSPAN, String.valueOf(cell.rowspan())); } if (cell.noWrap()) { write(HtmlTags.NOWRAP, String.valueOf(true)); } // patch by Matt Benson 02/21/2002 if (hasMarkupAttributes(cell)) { writeMarkupAttributes((MarkupAttributes)cell); }//end if this Element has MarkupAttributes // end patch by Matt Benson 02/21/2002 os.write(GT); os.write(NEWLINE); if (cell.isEmpty()) { write(NBSP); } else { for (Iterator i = cell.getElements(); i.hasNext(); ) { write((Element) i.next(), indent + 1); } } addTabs(indent); if (cell.header()) { writeEnd(HtmlTags.HEADERCELL); } else { writeEnd(HtmlTags.CELL); } return; } case Element.ROW: { Row row = (Row) element; addTabs(indent); writeStart(HtmlTags.ROW); // patch by Matt Benson 02/21/2002 if (hasMarkupAttributes(row)) { writeMarkupAttributes((MarkupAttributes)row); }//end if this Element has MarkupAttributes // end patch by Matt Benson 02/21/2002 os.write(GT); os.write(NEWLINE); Element cell; for (int i = 0; i < row.columns(); i++) { if ((cell = (Element)row.getCell(i)) != null) { write(cell, indent + 1); } } addTabs(indent); writeEnd(HtmlTags.ROW); return; } case Element.TABLE: { Table table = (Table) element; addTabs(indent); writeStart(HtmlTags.TABLE); //write(HtmlTags.COLUMNS, String.valueOf(table.columns())); os.write(SPACE); write(HtmlTags.WIDTH); os.write(EQUALS); os.write(QUOTE); if (! "".equals(table.absWidth())){ write(table.absWidth()); } else{ write(String.valueOf(table.widthPercentage())); write("%"); } os.write(QUOTE); String alignment = HtmlEncoder.getAlignment(table.alignment()); if (!"".equals(alignment)) { write(HtmlTags.ALIGN, alignment); } write(HtmlTags.CELLPADDING, String.valueOf(table.cellpadding())); write(HtmlTags.CELLSPACING, String.valueOf(table.cellspacing())); if (table.borderWidth() != Rectangle.UNDEFINED) { write(HtmlTags.BORDERWIDTH, String.valueOf(table.borderWidth())); } if (table.borderColor() != null) { write(HtmlTags.BORDERCOLOR, HtmlEncoder.encode(table.borderColor())); } if (table.backgroundColor() != null) { write(HtmlTags.BACKGROUNDCOLOR, HtmlEncoder.encode(table.backgroundColor())); } // patch by Matt Benson 02/21/2002 if (hasMarkupAttributes(table)) { writeMarkupAttributes((MarkupAttributes)table); }//end if this Element has MarkupAttributes // end patch by Matt Benson 02/21/2002 os.write(GT); os.write(NEWLINE); Row row; for (Iterator iterator = table.iterator(); iterator.hasNext(); ) { row = (Row) iterator.next(); write(row, indent + 1); } addTabs(indent); writeEnd(HtmlTags.TABLE); return; } case Element.ANNOTATION: { Annotation annotation = (Annotation) element; writeComment(annotation.title() + ": " + annotation.content()); // patch by Matt Benson 02/21/2002 if (hasMarkupAttributes(annotation)) { os.write(BEGINCOMMENT); writeMarkupAttributes((MarkupAttributes)annotation); os.write(ENDCOMMENT); }//end if this Element has MarkupAttributes // end patch by Matt Benson 02/21/2002 return; } case Element.GIF: case Element.JPEG: case Element.PNG: { Image image = (Image) element; if (image.url() == null) { return; } addTabs(indent); writeStart(HtmlTags.IMAGE); String path = image.url().toString(); if (imagepath != null) { if (path.indexOf("/") > 0) { path = imagepath + path.substring(path.lastIndexOf("/") + 1); } else { path = imagepath + path; } } write(HtmlTags.URL, path); if ((image.alignment() & Image.LEFT) > 0) { write(HtmlTags.ALIGN, HtmlTags.ALIGN_LEFT); } else if ((image.alignment() & Image.RIGHT) > 0) { write(HtmlTags.ALIGN, HtmlTags.ALIGN_RIGHT); } else if ((image.alignment() & Image.MIDDLE) > 0) { write(HtmlTags.ALIGN, HtmlTags.ALIGN_MIDDLE); } if (image.alt() != null) { write(HtmlTags.ALT, image.alt()); } write(HtmlTags.PLAINWIDTH, String.valueOf(image.scaledWidth())); write(HtmlTags.PLAINHEIGHT, String.valueOf(image.scaledHeight())); // patch by Matt Benson 02/21/2002 if (hasMarkupAttributes(image)) { writeMarkupAttributes((MarkupAttributes)image); }//end if this Element has MarkupAttributes // end patch by Matt Benson 02/21/2002 writeEnd(); return; } default: return; } } | 6653 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6653/f84ed683039ce5edc11979da180a08a2f87b2945/HtmlWriter.java/buggy/src/com/lowagie/text/html/HtmlWriter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1014,
18,
6226,
5621,
1014,
18,
6226,
5621,
1014,
18,
6226,
5621,
1014,
18,
6226,
5621,
4750,
2121,
18,
6226,
5621,
918,
2121,
18,
6226,
5621,
1045,
12,
1046,
2121,
18,
6226,
5621,
930,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1014,
18,
6226,
5621,
1014,
18,
6226,
5621,
1014,
18,
6226,
5621,
1014,
18,
6226,
5621,
4750,
2121,
18,
6226,
5621,
918,
2121,
18,
6226,
5621,
1045,
12,
1046,
2121,
18,
6226,
5621,
930,
16,
... | |
prepStatementLookup.setMaxRows(1); | if (databaseMeta.supportsSetMaxRows()) { prepStatementLookup.setMaxRows(1); } | public boolean setDimLookup(String table, String keys[], String tk, String version, String extra[], String extraRename[], String datefrom, String dateto ) throws KettleDatabaseException { String sql; int i; /* * SELECT <tk>, <version>, ... * FROM <table> * WHERE key1=keys[1] * AND key2=keys[2] ... * AND <datefield> BETWEEN <datefrom> AND <dateto> * ; * */ sql = "SELECT "+databaseMeta.quoteField(tk)+", "+databaseMeta.quoteField(version); if (extra!=null) { for (i=0;i<extra.length;i++) { if (extra[i]!=null && extra[i].length()!=0) { sql+=", "+databaseMeta.quoteField(extra[i]); if (extraRename[i]!=null && extraRename[i].length()>0 && !extra[i].equals(extraRename[i])) { sql+=" AS "+databaseMeta.quoteField(extraRename[i]); } } } } sql+= " FROM "+databaseMeta.quoteField(table)+" WHERE "; for (i=0;i<keys.length;i++) { if (i!=0) sql += " AND "; sql += databaseMeta.quoteField(keys[i])+" = ? "; } sql += " AND ? >= "+databaseMeta.quoteField(datefrom)+" AND ? < "+databaseMeta.quoteField(dateto); try { log.logDetailed(toString(), "Dimension Lookup setting preparedStatement to ["+sql+"]"); prepStatementLookup=connection.prepareStatement(databaseMeta.stripCR(sql)); prepStatementLookup.setMaxRows(1); // alywas get only 1 line back! if (databaseMeta.getDatabaseType()==DatabaseMeta.TYPE_DATABASE_MYSQL) { prepStatementLookup.setFetchSize(0); // Make sure to DISABLE Streaming Result sets } log.logDetailed(toString(), "Finished preparing dimension lookup statement."); } catch(SQLException ex) { throw new KettleDatabaseException("Unable to prepare dimension lookup", ex); } return true; } | 58146 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58146/379515e1dfa20ac536569e3709226fe453498995/Database.java/buggy/kettle/src/be/ibridge/kettle/core/database/Database.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
444,
5225,
6609,
12,
780,
1014,
16,
20982,
202,
780,
1311,
63,
6487,
20982,
202,
780,
13030,
16,
20982,
202,
780,
1177,
16,
20982,
202,
780,
2870,
63,
6487,
4766,
514,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
444,
5225,
6609,
12,
780,
1014,
16,
20982,
202,
780,
1311,
63,
6487,
20982,
202,
780,
13030,
16,
20982,
202,
780,
1177,
16,
20982,
202,
780,
2870,
63,
6487,
4766,
514,
2... |
validateInput(); | private void initializeCheckedState() { if (workingSet == null) return; BusyIndicator.showWhile(getShell().getDisplay(), new Runnable() { public void run() { IAdaptable[] items = workingSet.getElements(); tree.setCheckedElements(items); for (int i = 0; i < items.length; i++) { IAdaptable item = items[i]; IContainer container = null; IResource resource = null; if (item instanceof IContainer) { container = (IContainer) item; } else { container = (IContainer) item.getAdapter(IContainer.class); } if (container != null) { setSubtreeChecked(container, true, true); } if (item instanceof IResource) { resource = (IResource) item; } else { resource = (IResource) item.getAdapter(IResource.class); } updateParentState(resource); } validateInput(); } }); } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/36c100055b0d8bb12f5c27807866645ab7087743/ResourceWorkingSetPage.java/clean/bundles/org.eclipse.ui/Eclipse UI/org/eclipse/ui/internal/dialogs/ResourceWorkingSetPage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
4046,
11454,
1119,
1435,
288,
202,
202,
430,
261,
20478,
694,
422,
446,
13,
1082,
202,
2463,
31,
202,
202,
29289,
13140,
18,
4500,
15151,
12,
588,
13220,
7675,
588,
4236,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4046,
11454,
1119,
1435,
288,
202,
202,
430,
261,
20478,
694,
422,
446,
13,
1082,
202,
2463,
31,
202,
202,
29289,
13140,
18,
4500,
15151,
12,
588,
13220,
7675,
588,
4236,
... | |
return null; } | return null; } | public Dimension preferredLayoutSize(Container parent) { return null; // TODO } // preferredLayoutSize() | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/0788b89b7368770a1157f825d60dd8c5a9df183e/ViewportLayout.java/clean/core/src/classpath/javax/javax/swing/ViewportLayout.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
13037,
9119,
3744,
1225,
12,
2170,
982,
13,
288,
202,
202,
2463,
446,
31,
368,
2660,
202,
97,
368,
9119,
3744,
1225,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
13037,
9119,
3744,
1225,
12,
2170,
982,
13,
288,
202,
202,
2463,
446,
31,
368,
2660,
202,
97,
368,
9119,
3744,
1225,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
assert(ex.getMessage(),false); | fail(ex.getMessage()); | public void testGetMetaData() { try { Connection con = JDBC2Tests.openDB(); DatabaseMetaData dbmd = con.getMetaData(); assert(dbmd!=null); JDBC2Tests.closeDB(con); } catch(SQLException ex) { assert(ex.getMessage(),false); } } /** * Test default capabilities */ public void testCapabilities() { try { Connection con = JDBC2Tests.openDB(); DatabaseMetaData dbmd = con.getMetaData(); assert(dbmd!=null); assert(dbmd.allProceduresAreCallable()==true); assert(dbmd.allTablesAreSelectable()==true); // not true all the time // This should always be false for postgresql (at least for 7.x) assert(!dbmd.isReadOnly()); // does the backend support this yet? The protocol does... assert(!dbmd.supportsMultipleResultSets()); // yes, as multiple backends can have transactions open assert(dbmd.supportsMultipleTransactions()); assert(dbmd.supportsMinimumSQLGrammar()); assert(!dbmd.supportsCoreSQLGrammar()); assert(!dbmd.supportsExtendedSQLGrammar()); assert(!dbmd.supportsANSI92EntryLevelSQL()); assert(!dbmd.supportsANSI92IntermediateSQL()); assert(!dbmd.supportsANSI92FullSQL()); assert(!dbmd.supportsIntegrityEnhancementFacility()); JDBC2Tests.closeDB(con); } catch(SQLException ex) { | 46312 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46312/3ef5bebb726704f440f14f6a72430a70f74db2dc/DatabaseMetaDataTest.java/clean/src/interfaces/jdbc/org/postgresql/test/jdbc2/DatabaseMetaDataTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1842,
967,
6998,
1435,
288,
565,
775,
288,
1377,
4050,
356,
273,
16364,
22,
14650,
18,
3190,
2290,
5621,
1377,
5130,
6998,
1319,
1264,
273,
356,
18,
588,
6998,
5621,
1377,
1815... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1842,
967,
6998,
1435,
288,
565,
775,
288,
1377,
4050,
356,
273,
16364,
22,
14650,
18,
3190,
2290,
5621,
1377,
5130,
6998,
1319,
1264,
273,
356,
18,
588,
6998,
5621,
1377,
1815... |
do | final int start = i; while (true) | public static Timestamp toTimestamp(String s, java.sql.ResultSet resultSet, String pgDataType) throws SQLException { AbstractJdbc1ResultSet rs = (AbstractJdbc1ResultSet)resultSet; if (s == null) return null; // We must be synchronized here incase more theads access the ResultSet // bad practice but possible. Anyhow this is to protect sbuf and // SimpleDateFormat objects synchronized (rs) { SimpleDateFormat df = null; if ( org.postgresql.Driver.logDebug ) org.postgresql.Driver.debug("the data from the DB is " + s); // If first time, create the buffer, otherwise clear it. if (rs.sbuf == null) rs.sbuf = new StringBuffer(32); else { rs.sbuf.setLength(0); } // Copy s into sbuf for parsing. rs.sbuf.append(s); int slen = s.length(); if (slen > 19) { // The len of the ISO string to the second value is 19 chars. If // greater then 19, there may be tz info and perhaps fractional // second info which we need to change to java to read it. // cut the copy to second value "2001-12-07 16:29:22" int i = 19; rs.sbuf.setLength(i); char c = s.charAt(i++); if (c == '.') { // Found a fractional value. Append up to 3 digits including // the leading '.' do { if (i < 24) rs.sbuf.append(c); c = s.charAt(i++); } while (i < slen && Character.isDigit(c)); // If there wasn't at least 3 digits we should add some zeros // to make up the 3 digits we tell java to expect. for (int j = i; j < 24; j++) rs.sbuf.append('0'); } else { // No fractional seconds, lets add some. rs.sbuf.append(".000"); } if (i < slen) { // prepend the GMT part and then add the remaining bit of // the string. rs.sbuf.append(" GMT"); rs.sbuf.append(c); rs.sbuf.append(s.substring(i, slen)); // Lastly, if the tz part doesn't specify the :MM part then // we add ":00" for java. if (slen - i < 5) rs.sbuf.append(":00"); // we'll use this dateformat string to parse the result. df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS z"); } else { // Just found fractional seconds but no timezone. //If timestamptz then we use GMT, else local timezone if (pgDataType.equals("timestamptz")) { rs.sbuf.append(" GMT"); df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS z"); } else { df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS"); } } } else if (slen == 19) { // No tz or fractional second info. //If timestamptz then we use GMT, else local timezone if (pgDataType.equals("timestamptz")) { rs.sbuf.append(" GMT"); df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss z"); } else { df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); } } else { if (slen == 8 && s.equals("infinity")) //java doesn't have a concept of postgres's infinity //so set to an arbitrary future date s = "9999-01-01"; if (slen == 9 && s.equals("-infinity")) //java doesn't have a concept of postgres's infinity //so set to an arbitrary old date s = "0001-01-01"; // We must just have a date. This case is // needed if this method is called on a date // column df = new SimpleDateFormat("yyyy-MM-dd"); } try { // All that's left is to parse the string and return the ts. if ( org.postgresql.Driver.logDebug ) org.postgresql.Driver.debug( "" + df.parse(rs.sbuf.toString()).getTime() ); return new Timestamp(df.parse(rs.sbuf.toString()).getTime()); } catch (ParseException e) { throw new PSQLException("postgresql.res.badtimestamp", new Integer(e.getErrorOffset()), s); } } } | 45454 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45454/feefc329bd64ee552d12c8e40bed76e3573c3fa4/AbstractJdbc1ResultSet.java/clean/src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1ResultSet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
8159,
358,
4921,
12,
780,
272,
16,
2252,
18,
4669,
18,
13198,
12168,
16,
514,
7184,
6273,
13,
202,
15069,
6483,
202,
95,
202,
202,
7469,
25316,
21,
13198,
3597,
273,
261,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
8159,
358,
4921,
12,
780,
272,
16,
2252,
18,
4669,
18,
13198,
12168,
16,
514,
7184,
6273,
13,
202,
15069,
6483,
202,
95,
202,
202,
7469,
25316,
21,
13198,
3597,
273,
261,... |
throw Kit.badTypeJS(y); | warnAboutNonJSObject(y); return false; | static boolean eqNumber(double x, Object y) { for (;;) { if (y == null) { return false; } else if (y instanceof Number) { return x == ((Number)y).doubleValue(); } else if (y instanceof String) { return x == toNumber(y); } else if (y instanceof Boolean) { return x == (((Boolean)y).booleanValue() ? 1.0 : +0.0); } else if (y instanceof Scriptable) { if (y == Undefined.instance) { return false; } if (y instanceof ScriptableObject) { Object xval = new Double(x); Boolean test = ((ScriptableObject)y).equivalentValues(xval); if (test != null) { return test.booleanValue(); } } y = toPrimitive(y); } else { throw Kit.badTypeJS(y); } } } | 47345 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47345/fb0c98a7e66723f1ae949f529f8d4abc7596ebae/ScriptRuntime.java/buggy/src/org/mozilla/javascript/ScriptRuntime.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
760,
1250,
7555,
1854,
12,
9056,
619,
16,
1033,
677,
13,
565,
288,
3639,
364,
261,
25708,
13,
288,
5411,
309,
261,
93,
422,
446,
13,
288,
7734,
327,
629,
31,
5411,
289,
469,
309,
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,
760,
1250,
7555,
1854,
12,
9056,
619,
16,
1033,
677,
13,
565,
288,
3639,
364,
261,
25708,
13,
288,
5411,
309,
261,
93,
422,
446,
13,
288,
7734,
327,
629,
31,
5411,
289,
469,
309,
261,... |
loop56: | loop57: | public PatternDescr lhs_and() throws RecognitionException { PatternDescr d; PatternDescr left = null; PatternDescr right = null; d = null; try { // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:849:17: (left= lhs_unary ( ('and'|'&&') opt_eol right= lhs_unary )* ) // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:849:17: left= lhs_unary ( ('and'|'&&') opt_eol right= lhs_unary )* { AndDescr and = null; following.push(FOLLOW_lhs_unary_in_lhs_and2349); left=lhs_unary(); following.pop(); d = left; // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:851:17: ( ('and'|'&&') opt_eol right= lhs_unary )* loop56: do { int alt56=2; int LA56_0 = input.LA(1); if ( (LA56_0>=52 && LA56_0<=53) ) { alt56=1; } switch (alt56) { case 1 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:851:19: ('and'|'&&') opt_eol right= lhs_unary { if ( (input.LA(1)>=52 && input.LA(1)<=53) ) { input.consume(); errorRecovery=false; } else { MismatchedSetException mse = new MismatchedSetException(null,input); recoverFromMismatchedSet(input,mse,FOLLOW_set_in_lhs_and2358); throw mse; } following.push(FOLLOW_opt_eol_in_lhs_and2363); opt_eol(); following.pop(); following.push(FOLLOW_lhs_unary_in_lhs_and2370); right=lhs_unary(); following.pop(); if ( and == null ) { and = new AndDescr(); and.addDescr( left ); d = and; } and.addDescr( right ); } break; default : break loop56; } } while (true); } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { } return d; } | 5490 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5490/31d63bcc9d3d8766c62d2c237554a38462a57456/RuleParser.java/buggy/drools-compiler/src/main/java/org/drools/lang/RuleParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
6830,
16198,
8499,
67,
464,
1435,
1216,
9539,
288,
6647,
6830,
16198,
302,
31,
3639,
6830,
16198,
2002,
273,
446,
31,
3639,
6830,
16198,
2145,
273,
446,
31,
540,
202,
202,
72,
273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
6830,
16198,
8499,
67,
464,
1435,
1216,
9539,
288,
6647,
6830,
16198,
302,
31,
3639,
6830,
16198,
2002,
273,
446,
31,
3639,
6830,
16198,
2145,
273,
446,
31,
540,
202,
202,
72,
273,
... |
if (pgStream.ReceiveIntegerR(4) != 5) throw new PSQLException("postgresql.con.setup"); | if (pgStream.ReceiveIntegerR(4) != 5) throw new PSQLException("postgresql.con.setup", PSQLState.CONNECTION_UNABLE_TO_CONNECT); | private void openConnectionV3(String p_host, int p_port, Properties p_info, String p_database, String p_url, Driver p_d, String p_password) throws SQLException { PGProtocolVersionMajor = 3; if (Driver.logDebug) Driver.debug("Using Protocol Version3"); // Now we need to construct and send an ssl startup packet try { if (useSSL) { if (Driver.logDebug) Driver.debug("Asking server if it supports ssl"); pgStream.SendInteger(8,4); pgStream.SendInteger(80877103,4); // now flush the ssl packets to the backend pgStream.flush(); // Now get the response from the backend, either an error message // or an authentication request int beresp = pgStream.ReceiveChar(); if (Driver.logDebug) Driver.debug("Server response was (S=Yes,N=No): "+(char)beresp); switch (beresp) { case 'E': // An error occured, so pass the error message to the // user. // // The most common one to be thrown here is: // "User authentication failed" // throw new PSQLException("postgresql.con.misc", pgStream.ReceiveString(encoding)); case 'N': // Server does not support ssl throw new PSQLException("postgresql.con.sslnotsupported"); case 'S': // Server supports ssl if (Driver.logDebug) Driver.debug("server does support ssl"); Driver.makeSSL(pgStream); break; default: throw new PSQLException("postgresql.con.sslfail"); } } } catch (IOException e) { throw new PSQLException("postgresql.con.failed", e); } // Now we need to construct and send a startup packet try { new StartupPacket(PGProtocolVersionMajor, PGProtocolVersionMinor, PG_USER, p_database).writeTo(pgStream); // now flush the startup packets to the backend pgStream.flush(); // Now get the response from the backend, either an error message // or an authentication request int areq = -1; // must have a value here do { int beresp = pgStream.ReceiveChar(); String salt = null; byte [] md5Salt = new byte[4]; switch (beresp) { case 'E': // An error occured, so pass the error message to the // user. // // The most common one to be thrown here is: // "User authentication failed" // int l_elen = pgStream.ReceiveIntegerR(4); if (l_elen > 30000) { //if the error length is > than 30000 we assume this is really a v2 protocol //server so try again with a v2 connection //need to create a new connection and try again try { pgStream = new PGStream(p_host, p_port); } catch (ConnectException cex) { // Added by Peter Mount <peter@retep.org.uk> // ConnectException is thrown when the connection cannot be made. // we trap this an return a more meaningful message for the end user throw new PSQLException ("postgresql.con.refused"); } catch (IOException e) { throw new PSQLException ("postgresql.con.failed", e); } openConnectionV2(p_host, p_port, p_info, p_database, p_url, p_d, p_password); return; } throw new PSQLException("postgresql.con.misc",encoding.decode(pgStream.Receive(l_elen-4))); case 'R': // Get the message length int l_msgLen = pgStream.ReceiveIntegerR(4); // Get the type of request areq = pgStream.ReceiveIntegerR(4); // Get the crypt password salt if there is one if (areq == AUTH_REQ_CRYPT) { byte[] rst = new byte[2]; rst[0] = (byte)pgStream.ReceiveChar(); rst[1] = (byte)pgStream.ReceiveChar(); salt = new String(rst, 0, 2); if (Driver.logDebug) Driver.debug("Crypt salt=" + salt); } // Or get the md5 password salt if there is one if (areq == AUTH_REQ_MD5) { md5Salt[0] = (byte)pgStream.ReceiveChar(); md5Salt[1] = (byte)pgStream.ReceiveChar(); md5Salt[2] = (byte)pgStream.ReceiveChar(); md5Salt[3] = (byte)pgStream.ReceiveChar(); salt = new String(md5Salt, 0, 4); if (Driver.logDebug) Driver.debug("MD5 salt=" + salt); } // now send the auth packet switch (areq) { case AUTH_REQ_OK: break; case AUTH_REQ_KRB4: if (Driver.logDebug) Driver.debug("postgresql: KRB4"); throw new PSQLException("postgresql.con.kerb4"); case AUTH_REQ_KRB5: if (Driver.logDebug) Driver.debug("postgresql: KRB5"); throw new PSQLException("postgresql.con.kerb5"); case AUTH_REQ_SCM: if (Driver.logDebug) Driver.debug("postgresql: SCM"); throw new PSQLException("postgresql.con.scm"); case AUTH_REQ_PASSWORD: if (Driver.logDebug) Driver.debug("postgresql: PASSWORD"); pgStream.SendChar('p'); pgStream.SendInteger(5 + p_password.length(), 4); pgStream.Send(p_password.getBytes()); pgStream.SendChar(0); pgStream.flush(); break; case AUTH_REQ_CRYPT: if (Driver.logDebug) Driver.debug("postgresql: CRYPT"); String crypted = UnixCrypt.crypt(salt, p_password); pgStream.SendChar('p'); pgStream.SendInteger(5 + crypted.length(), 4); pgStream.Send(crypted.getBytes()); pgStream.SendChar(0); pgStream.flush(); break; case AUTH_REQ_MD5: if (Driver.logDebug) Driver.debug("postgresql: MD5"); byte[] digest = MD5Digest.encode(PG_USER, p_password, md5Salt); pgStream.SendChar('p'); pgStream.SendInteger(5 + digest.length, 4); pgStream.Send(digest); pgStream.SendChar(0); pgStream.flush(); break; default: throw new PSQLException("postgresql.con.auth", new Integer(areq)); } break; default: throw new PSQLException("postgresql.con.authfail"); } } while (areq != AUTH_REQ_OK); } catch (IOException e) { throw new PSQLException("postgresql.con.failed", e); } int beresp; do { beresp = pgStream.ReceiveChar(); switch (beresp) { case 'Z': //ready for query break; case 'K': int l_msgLen = pgStream.ReceiveIntegerR(4); if (l_msgLen != 12) throw new PSQLException("postgresql.con.setup"); pid = pgStream.ReceiveIntegerR(4); ckey = pgStream.ReceiveIntegerR(4); break; case 'E': int l_elen = pgStream.ReceiveIntegerR(4); throw new PSQLException("postgresql.con.backend",encoding.decode(pgStream.Receive(l_elen-4))); case 'N': int l_nlen = pgStream.ReceiveIntegerR(4); addWarning(encoding.decode(pgStream.Receive(l_nlen-4))); break; case 'S': //TODO: handle parameter status messages int l_len = pgStream.ReceiveIntegerR(4); String l_pStatus = encoding.decode(pgStream.Receive(l_len-4)); if (Driver.logDebug) Driver.debug("ParameterStatus="+ l_pStatus); break; default: if (Driver.logDebug) Driver.debug("invalid state="+ (char)beresp); throw new PSQLException("postgresql.con.setup"); } } while (beresp != 'Z'); // read ReadyForQuery if (pgStream.ReceiveIntegerR(4) != 5) throw new PSQLException("postgresql.con.setup"); //TODO: handle transaction status char l_tStatus = (char)pgStream.ReceiveChar(); // "pg_encoding_to_char(1)" will return 'EUC_JP' for a backend compiled with multibyte, // otherwise it's hardcoded to 'SQL_ASCII'. // If the backend doesn't know about multibyte we can't assume anything about the encoding // used, so we denote this with 'UNKNOWN'. //Note: begining with 7.2 we should be using pg_client_encoding() which //is new in 7.2. However it isn't easy to conditionally call this new //function, since we don't yet have the information as to what server //version we are talking to. Thus we will continue to call //getdatabaseencoding() until we drop support for 7.1 and older versions //or until someone comes up with a conditional way to run one or //the other function depending on server version that doesn't require //two round trips to the server per connection final String encodingQuery = "case when pg_encoding_to_char(1) = 'SQL_ASCII' then 'UNKNOWN' else getdatabaseencoding() end"; // Set datestyle and fetch db encoding in a single call, to avoid making // more than one round trip to the backend during connection startup. BaseResultSet resultSet = execSQL("set datestyle to 'ISO'; select version(), " + encodingQuery + ";"); if (! resultSet.next()) { throw new PSQLException("postgresql.con.failed", "failed getting backend encoding"); } String version = resultSet.getString(1); dbVersionNumber = extractVersionNumber(version); String dbEncoding = resultSet.getString(2); encoding = Encoding.getEncoding(dbEncoding, p_info.getProperty("charSet")); //In 7.3 we are forced to do a second roundtrip to handle the case //where a database may not be running in autocommit mode //jdbc by default assumes autocommit is on until setAutoCommit(false) //is called. Therefore we need to ensure a new connection is //initialized to autocommit on. //We also set the client encoding so that the driver only needs //to deal with utf8. We can only do this in 7.3 because multibyte //support is now always included if (haveMinimumServerVersion("7.3")) { BaseResultSet acRset = //TODO: if protocol V3 we can set the client encoding in startup execSQL("set client_encoding = 'UNICODE'"); //set encoding to be unicode encoding = Encoding.getEncoding("UNICODE", null); } // Initialise object handling initObjectTypes(); // Mark the connection as ok, and cleanup PG_STATUS = CONNECTION_OK; } | 47288 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47288/0378a269f3ab3c44e67b14f96414b6ca95263263/AbstractJdbc1Connection.java/clean/src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1Connection.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
24982,
58,
23,
12,
780,
293,
67,
2564,
16,
509,
293,
67,
655,
16,
6183,
293,
67,
1376,
16,
514,
293,
67,
6231,
16,
514,
293,
67,
718,
16,
9396,
293,
67,
72,
16,
51... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
24982,
58,
23,
12,
780,
293,
67,
2564,
16,
509,
293,
67,
655,
16,
6183,
293,
67,
1376,
16,
514,
293,
67,
6231,
16,
514,
293,
67,
718,
16,
9396,
293,
67,
72,
16,
51... |
Logger.minor(this, "Probe request: "+id+" "+target+" "+best+" "+nearest+" "+htl+" "+counter); | Logger.minor(this, "Probe request: "+id+ ' ' +target+ ' ' +best+ ' ' +nearest+ ' ' +htl+ ' ' +counter); | private boolean handleProbeRequest(Message m, PeerNode src) { long id = m.getLong(DMT.UID); Long lid = new Long(id); double target = m.getDouble(DMT.TARGET_LOCATION); double best = m.getDouble(DMT.BEST_LOCATION); double nearest = m.getDouble(DMT.NEAREST_LOCATION); short htl = m.getShort(DMT.HTL); short counter = m.getShort(DMT.COUNTER); if(logMINOR) Logger.minor(this, "Probe request: "+id+" "+target+" "+best+" "+nearest+" "+htl+" "+counter); synchronized(recentProbeContexts) { if(recentProbeRequestIDs.contains(lid)) { // Reject: Loop Message reject = DMT.createFNPProbeRejected(id, target, nearest, best, counter, htl, DMT.PROBE_REJECTED_LOOP); try { src.sendAsync(reject, null, 0, null); } catch (NotConnectedException e) { Logger.error(this, "Not connected rejecting a Probe request from "+src); } return true; } else Logger.minor(this, "Probe request "+id+" not already present"); recentProbeRequestIDs.push(lid); while(recentProbeRequestIDs.size() > MAX_PROBE_IDS) { Object o = recentProbeRequestIDs.pop(); Logger.minor(this, "Probe request popped "+o); } } return innerHandleProbeRequest(src, id, lid, target, best, nearest, htl, counter, true, true, null); } | 56348 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56348/62fd59041864b4ed1f43adc676de6bfb5ea977f3/NodeDispatcher.java/buggy/src/freenet/node/NodeDispatcher.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
1250,
1640,
21042,
691,
12,
1079,
312,
16,
10669,
907,
1705,
13,
288,
202,
202,
5748,
612,
273,
312,
18,
588,
3708,
12,
40,
6152,
18,
3060,
1769,
202,
202,
3708,
328,
350,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
1250,
1640,
21042,
691,
12,
1079,
312,
16,
10669,
907,
1705,
13,
288,
202,
202,
5748,
612,
273,
312,
18,
588,
3708,
12,
40,
6152,
18,
3060,
1769,
202,
202,
3708,
328,
350,
... |
public void postSelectedEntries(User user, Map parameters, String proxyHost, int proxyPort, String location) { String entries[] = ArchiveViewerBean.getStrings(parameters, "localentry"); if ( (entries == null) || (entries.length <= 0) ) return; List uris = new ArrayList(entries.length); for (int i = 0; i < entries.length; i++) uris.add(new BlogURI(entries[i])); if ( (proxyPort > 0) && (proxyHost != null) && (proxyHost.trim().length() > 0) ) { _proxyPort = proxyPort; _proxyHost = proxyHost; } else { _proxyPort = -1; _proxyHost = null; } _remoteLocation = location; post(uris, user); | public void postSelectedEntries(User user, Map parameters) { postSelectedEntries(user, parameters, _proxyHost, _proxyPort, _remoteLocation); | public void postSelectedEntries(User user, Map parameters, String proxyHost, int proxyPort, String location) { String entries[] = ArchiveViewerBean.getStrings(parameters, "localentry"); if ( (entries == null) || (entries.length <= 0) ) return; List uris = new ArrayList(entries.length); for (int i = 0; i < entries.length; i++) uris.add(new BlogURI(entries[i])); if ( (proxyPort > 0) && (proxyHost != null) && (proxyHost.trim().length() > 0) ) { _proxyPort = proxyPort; _proxyHost = proxyHost; } else { _proxyPort = -1; _proxyHost = null; } _remoteLocation = location; post(uris, user); } | 3808 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3808/3286ca49c8233d7422b4aa0856bafab38d46a371/RemoteArchiveBean.java/buggy/apps/syndie/java/src/net/i2p/syndie/web/RemoteArchiveBean.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1603,
7416,
5400,
12,
1299,
729,
16,
1635,
1472,
16,
514,
2889,
2594,
16,
509,
2889,
2617,
16,
514,
2117,
13,
288,
3639,
514,
3222,
8526,
273,
13124,
18415,
3381,
18,
588,
79... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1603,
7416,
5400,
12,
1299,
729,
16,
1635,
1472,
16,
514,
2889,
2594,
16,
509,
2889,
2617,
16,
514,
2117,
13,
288,
3639,
514,
3222,
8526,
273,
13124,
18415,
3381,
18,
588,
79... |
newdoc.adoptNode(newdoc); | public Node cloneNode(boolean deep) { // clone node DocumentImpl newdoc = (DocumentImpl)super.cloneNode(deep); // REVISIT: What to do about identifiers that are cloned? -Ac //newdoc.identifiers = (Hashtable)identifiers.clone(); // WRONG! newdoc.identifiers = null; newdoc.iterators = null; newdoc.treeWalkers = null; newdoc.ranges = null; // experimental newdoc.allowGrammarAccess = allowGrammarAccess; newdoc.errorChecking = errorChecking; // make sure every cloned node is owned by this document // as opposed to the source document newdoc.adoptNode(newdoc); // return new document return newdoc; } // cloneNode(boolean):Node | 6373 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6373/6a8035157807dee36c23edeaf25be9ba699c3119/DocumentImpl.java/buggy/src/org/apache/xerces/dom/DocumentImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
2029,
3236,
907,
12,
6494,
4608,
13,
288,
3639,
368,
3236,
756,
3639,
4319,
2828,
394,
2434,
273,
261,
2519,
2828,
13,
9565,
18,
14056,
907,
12,
16589,
1769,
3639,
368,
2438,
26780,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3236,
907,
12,
6494,
4608,
13,
288,
3639,
368,
3236,
756,
3639,
4319,
2828,
394,
2434,
273,
261,
2519,
2828,
13,
9565,
18,
14056,
907,
12,
16589,
1769,
3639,
368,
2438,
26780,... | |
private void findAndStoreTestClasses(final File currentDirectory, final String packageprefix) throws IOException { String files[] = currentDirectory.list(); for(int i = 0;i < files.length;i++) { File file = new File(currentDirectory, files[i]); String fileBase = file.getName (); int idx = fileBase.indexOf(".class"); final int CLASS_EXTENSION_LENGTH = 6; if (idx != -1 && (fileBase.length() - idx) == CLASS_EXTENSION_LENGTH && fileBase.startsWith("Test")) { String fname = packageprefix + "." + fileBase.substring(0, idx); System.out.println("Processing: " + fname); classNameList.add(fname); } else if(file.isDirectory()) { if (packageprefix == null) findAndStoreTestClasses(file, fileBase); else findAndStoreTestClasses(file, packageprefix + "." + fileBase); } } } | 7166 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7166/5cee6094c7b77e3bcf6338f68456e6e531e781b7/TestAll.java/clean/modules/junit/src/TestAll.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3238,
6459,
4720,
1876,
2257,
4709,
4818,
12,
6385,
812,
2972,
2853,
16,
6862,
202,
6385,
780,
5610,
3239,
13,
15069,
14106,
95,
202,
780,
2354,
8526,
33,
2972,
2853,
18,
1098,
5621,
202,
1884... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3238,
6459,
4720,
1876,
2257,
4709,
4818,
12,
6385,
812,
2972,
2853,
16,
6862,
202,
6385,
780,
5610,
3239,
13,
15069,
14106,
95,
202,
780,
2354,
8526,
33,
2972,
2853,
18,
1098,
5621,
202,
1884... | ||
return null; | final double minx = getX(); final double miny = getY(); final double maxx = minx + getWidth(); final double maxy = miny + getHeight(); final double arcwidth = getArcWidth(); final double archeight = getArcHeight(); return new PathIterator() { /** We iterate clockwise around the rectangle, starting in the * upper left. This variable tracks our current point, which * can be on either side of a given corner. */ private int current = 0; /** Child path iterator, used for corners. */ private PathIterator corner; /** This is used when rendering the corners. We re-use the arc * for each corner. */ private Arc2D arc = new Arc2D.Double(); /** Temporary array used by getPoint. */ private double[] temp = new double[2]; public int getWindingRule() { return WIND_NON_ZERO; } public boolean isDone() { return current > 9; } private void getPoint(int val) { switch (val) { case 0: case 8: temp[0] = minx; temp[1] = miny + archeight; break; case 1: temp[0] = minx + arcwidth; temp[1] = miny; break; case 2: temp[0] = maxx - arcwidth; temp[1] = maxy; break; case 3: temp[0] = maxx; temp[1] = miny + archeight; break; case 4: temp[0] = maxx; temp[1] = maxy - archeight; break; case 5: temp[0] = maxx - arcwidth; temp[1] = maxy; break; case 6: temp[0] = minx + arcwidth; temp[1] = maxy; break; case 7: temp[0] = minx; temp[1] = maxy - archeight; break; } } public void next() { if (current >= 8) ++current; else if (corner != null) { corner.next(); if (corner.isDone()) { corner = null; ++current; } } else { getPoint(current); double x1 = temp[0]; double y1 = temp[1]; getPoint(current + 1); arc.setFrameFromDiagonal(x1, y1, temp[0], temp[1]); arc.setAngles(x1, y1, temp[0], temp[1]); corner = arc.getPathIterator(at); } } public int currentSegment(float[] coords) { if (corner != null) { int r = corner.currentSegment(coords); if (r == SEG_MOVETO) r = SEG_LINETO; return r; } if (current < 9) { getPoint(current); coords[0] = (float) temp[0]; coords[1] = (float) temp[1]; } else if (current == 9) return SEG_CLOSE; else throw new NoSuchElementException("rect iterator out of bounds"); if (at != null) at.transform(coords, 0, coords, 0, 1); return current == 0 ? SEG_MOVETO : SEG_LINETO; } public int currentSegment(double[] coords) { if (corner != null) { int r = corner.currentSegment(coords); if (r == SEG_MOVETO) r = SEG_LINETO; return r; } if (current < 9) { getPoint(current); coords[0] = temp[0]; coords[1] = temp[1]; } else if (current == 9) return SEG_CLOSE; else throw new NoSuchElementException("rect iterator out of bounds"); if (at != null) at.transform(coords, 0, coords, 0, 1); return current == 0 ? SEG_MOVETO : SEG_LINETO; } }; | public PathIterator getPathIterator(AffineTransform at) { // FIXME. return null; } | 1023 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1023/4767eeec55f01499eb1660bece01f63d2b94bf96/RoundRectangle2D.java/buggy/libjava/java/awt/geom/RoundRectangle2D.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2666,
3198,
4339,
3198,
12,
13785,
558,
4059,
622,
13,
225,
288,
565,
368,
9852,
18,
282,
727,
1645,
31407,
273,
6538,
5621,
727,
1645,
1131,
93,
273,
10448,
5621,
727,
1645,
943,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2666,
3198,
4339,
3198,
12,
13785,
558,
4059,
622,
13,
225,
288,
565,
368,
9852,
18,
282,
727,
1645,
31407,
273,
6538,
5621,
727,
1645,
1131,
93,
273,
10448,
5621,
727,
1645,
943,
... |
PropertyPagesRegistryReader reader = new PropertyPagesRegistryReader( this); reader.registerPropertyPages(Platform.getExtensionRegistry()); } | PropertyPagesRegistryReader reader = new PropertyPagesRegistryReader( this); reader.registerPropertyPages(Platform.getExtensionRegistry()); } | private void loadContributors() { PropertyPagesRegistryReader reader = new PropertyPagesRegistryReader( this); reader.registerPropertyPages(Platform.getExtensionRegistry()); } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/10e925c213b5da62f5bbe2015b160d88afd53703/PropertyPageContributorManager.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/PropertyPageContributorManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1262,
442,
665,
13595,
1435,
288,
3639,
4276,
5716,
4243,
2514,
2949,
273,
394,
4276,
5716,
4243,
2514,
12,
7734,
333,
1769,
3639,
2949,
18,
4861,
1396,
5716,
12,
8201,
18,
588... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1262,
442,
665,
13595,
1435,
288,
3639,
4276,
5716,
4243,
2514,
2949,
273,
394,
4276,
5716,
4243,
2514,
12,
7734,
333,
1769,
3639,
2949,
18,
4861,
1396,
5716,
12,
8201,
18,
588... |
dpi[i].choices = new String[] {"true","false"}; | dpi[i].choices = new String[] {"true", "false"}; | public DriverPropertyInfo[] getPropertyInfo(String url, Properties info) throws SQLException { DriverPropertyInfo[] dpi = new DriverPropertyInfo[] { new DriverPropertyInfo(Support.getMessage("prop.servertype"), null), new DriverPropertyInfo(Support.getMessage("prop.servername"), null), new DriverPropertyInfo(Support.getMessage("prop.portnumber"), null), new DriverPropertyInfo(Support.getMessage("prop.databasename"), null), new DriverPropertyInfo(Support.getMessage("prop.user"), null), new DriverPropertyInfo(Support.getMessage("prop.password"), null), new DriverPropertyInfo(Support.getMessage("prop.charset"), null), new DriverPropertyInfo(Support.getMessage("prop.tds"), null), new DriverPropertyInfo(Support.getMessage("prop.domain"), null), new DriverPropertyInfo(Support.getMessage("prop.instance"), null), new DriverPropertyInfo(Support.getMessage("prop.language"), null), new DriverPropertyInfo(Support.getMessage("prop.lastupdatecount"), null), new DriverPropertyInfo(Support.getMessage("prop.useunicode"), null), new DriverPropertyInfo(Support.getMessage("prop.macaddress"), null), new DriverPropertyInfo(Support.getMessage("prop.packetsize"), null), new DriverPropertyInfo(Support.getMessage("prop.preparesql"), null) }; if (info == null) { info = new Properties(); } else { info = parseURL(url, info); if (info == null) { throw new SQLException( Support.getMessage("error.driver.badurl", url), "08001"); } } for (int i = 0; i < dpi.length; i++) { String name = dpi[i].name; String value = info.getProperty(name); if (value != null) { dpi[i].value = value; } if (name.equals(Support.getMessage("prop.servertype"))) { dpi[i].description = Support.getMessage("prop.desc.servertype"); dpi[i].required = true; dpi[i].choices = new String[] { String.valueOf(TdsCore.SQLSERVER), String.valueOf(TdsCore.SYBASE) }; if (dpi[i].value == null) { dpi[i].value = dpi[i].choices[0]; // TdsCore.SQLSERVER } } else if (name.equals(Support.getMessage("prop.servername"))) { dpi[i].description = Support.getMessage("prop.desc.servername"); dpi[i].required = true; } else if (name.equals(Support.getMessage("prop.portnumber"))) { dpi[i].description = Support.getMessage("prop.desc.portnumber"); if (dpi[i].value == null) { if (String.valueOf(TdsCore.SYBASE).equalsIgnoreCase( String.valueOf(info.get(Support.getMessage("prop.servertype"))))) { dpi[i].value = Integer.toString(TdsCore.DEFAULT_SYBASE_PORT); } else { dpi[i].value = Integer.toString(TdsCore.DEFAULT_SQLSERVER_PORT); } } } else if (name.equals(Support.getMessage("prop.databasename"))) { dpi[i].description = Support.getMessage("prop.desc.databasename"); if (dpi[i].value == null) { dpi[i].value = "master"; } } else if (name.equals(Support.getMessage("prop.user"))) { dpi[i].description = Support.getMessage("prop.desc.user"); } else if (name.equals(Support.getMessage("prop.password"))) { dpi[i].description = Support.getMessage("prop.desc.password"); } else if (name.equals(Support.getMessage("prop.charset"))) { dpi[i].description = Support.getMessage("prop.desc.charset"); } else if (name.equals(Support.getMessage("prop.language"))) { dpi[i].description = Support.getMessage("prop.desc.language"); } else if (name.equals(Support.getMessage("prop.tds"))) { dpi[i].description = Support.getMessage("prop.desc.tds"); dpi[i].choices = new String[] { "4.2", "5.0", "7.0", "8.0" }; if (dpi[i].value == null) { dpi[i].value = dpi[i].choices[2]; // TdsCore.TDS70 } } else if (name.equals(Support.getMessage("prop.domain"))) { dpi[i].description = Support.getMessage("prop.desc.domain"); } else if (name.equals(Support.getMessage("prop.instance"))) { dpi[i].description = Support.getMessage("prop.desc.instance"); } else if (name.equals(Support.getMessage("prop.lastupdatecount"))) { dpi[i].description = Support.getMessage("prop.desc.lastupdatecount"); dpi[i].choices = new String[] {"true","false"}; if (dpi[i].value == null) { dpi[i].value = dpi[i].choices[1]; // false } } else if (name.equals(Support.getMessage("prop.useunicode"))) { dpi[i].description = Support.getMessage("prop.desc.useunicode"); dpi[i].choices = new String[] {"true","false"}; if (dpi[i].value == null) { dpi[i].value = dpi[i].choices[0]; // true } } else if (name.equals(Support.getMessage("prop.macaddress"))) { dpi[i].description = Support.getMessage("prop.desc.macaddress"); } else if (name.equals(Support.getMessage("prop.packetsize"))) { dpi[i].description = Support.getMessage("prop.desc.packetsize"); if (dpi[i].value == null) { dpi[i].value = "512"; } } else if (name.equals(Support.getMessage("prop.preparesql"))) { dpi[i].description = Support.getMessage("prop.desc.preparesql"); dpi[i].choices = new String[] {"true","false"}; if (dpi[i].value == null) { dpi[i].value = dpi[i].choices[0]; // true } } } return dpi; } | 2029 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2029/f4ca02561623734f948ac817af46e63b233d7b9b/Driver.java/buggy/src/main/net/sourceforge/jtds/jdbc/Driver.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
9396,
1396,
966,
8526,
3911,
966,
12,
780,
880,
16,
6183,
1123,
13,
5411,
1216,
6483,
288,
3639,
9396,
1396,
966,
8526,
16361,
273,
394,
9396,
1396,
966,
8526,
288,
5411,
394,
9396,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
9396,
1396,
966,
8526,
3911,
966,
12,
780,
880,
16,
6183,
1123,
13,
5411,
1216,
6483,
288,
3639,
9396,
1396,
966,
8526,
16361,
273,
394,
9396,
1396,
966,
8526,
288,
5411,
394,
9396,... |
public static ManagedCommandline createCcmCommand(String ccmExe, String sessionName, File sessionFile) { // If no executable name was provided, use the default if (ccmExe == null) { ccmExe = CCM_EXE; } // Attempt to get the appropriate CM Synergy session String sessionID = null; if (sessionName != null) { try { sessionID = getSessionID(sessionName, sessionFile); if (sessionID == null) { LOG.error("Could not find a session ID for CM Synergy session named \"" + sessionName + "\". Attempting to use the default (current) session."); } } catch (CruiseControlException e) { LOG.error("Failed to look up CM Synergy session named \"" + sessionName + "\". Attempting to use the default (current) session.", e); } } // Create a managed command line ManagedCommandline command = new ManagedCommandline(ccmExe); // If we were able to find a CM Synergy session ID, use it if (sessionID != null) { command.setVariable(CCM_SESSION_VAR, sessionID); } return command; } | 55334 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55334/7d4ef99b224eadd1cebb5bf337a5a151059005f2/CMSynergy.java/clean/main/src/net/sourceforge/cruisecontrol/sourcecontrols/CMSynergy.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
10024,
2189,
1369,
752,
39,
7670,
2189,
12,
780,
4946,
81,
424,
73,
16,
5411,
514,
1339,
461,
16,
1387,
1339,
812,
13,
288,
7734,
368,
971,
1158,
9070,
508,
1703,
2112,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
10024,
2189,
1369,
752,
39,
7670,
2189,
12,
780,
4946,
81,
424,
73,
16,
5411,
514,
1339,
461,
16,
1387,
1339,
812,
13,
288,
7734,
368,
971,
1158,
9070,
508,
1703,
2112,
16,
... | ||
if(index<0) index=rows.size()+index; if (index > rows.size()) | int internalIndex; if (index==0) throw new SQLException("Cannot move to index of 0"); if (index<0) if (index>=-rows.size()) internalIndex=rows.size()+index; else { beforeFirst(); return false; } if (index<=rows.size()) internalIndex = index-1; else { afterLast(); | public boolean absolute(int index) throws SQLException { // Peter: Added because negative indices read from the end of the // ResultSet if(index<0) index=rows.size()+index; if (index > rows.size()) return false; current_row=index; this_row = (byte [][])rows.elementAt(index); return true; } | 11803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11803/d3ef753686384256c0a1439b3afb023bd96589ff/ResultSet.java/buggy/src/interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
4967,
12,
474,
770,
13,
1216,
6483,
565,
288,
202,
759,
453,
847,
30,
25808,
2724,
6092,
4295,
855,
628,
326,
679,
434,
326,
202,
759,
10842,
202,
430,
12,
1615,
32,
20,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
4967,
12,
474,
770,
13,
1216,
6483,
565,
288,
202,
759,
453,
847,
30,
25808,
2724,
6092,
4295,
855,
628,
326,
679,
434,
326,
202,
759,
10842,
202,
430,
12,
1615,
32,
20,
1... |
public Hashtable<String,JavaInterpreter> getDebugInterpreters() { return _debugInterpreters; } | Hashtable<String,InterpreterData> getDebugInterpreters() { return _debugInterpreters; } | public Hashtable<String,JavaInterpreter> getDebugInterpreters() { return _debugInterpreters; } | 11192 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11192/781f0d0cc2beb96bc72b49283dde3e8cd187c6ba/InterpreterJVM.java/buggy/drjava/src/edu/rice/cs/drjava/model/repl/newjvm/InterpreterJVM.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
18559,
32,
780,
16,
5852,
30010,
34,
29264,
2465,
1484,
5432,
1435,
288,
565,
327,
389,
4148,
2465,
1484,
5432,
31,
225,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
18559,
32,
780,
16,
5852,
30010,
34,
29264,
2465,
1484,
5432,
1435,
288,
565,
327,
389,
4148,
2465,
1484,
5432,
31,
225,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
drawableHelper.init(GLJPanel.this); | updater.init(GLJPanel.this); | public void run() { drawableHelper.init(GLJPanel.this); } | 48257 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48257/8da5bfa2d72282bfdcd2889a70a93a4072221a1c/GLJPanel.java/buggy/src/net/java/games/jogl/GLJPanel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1086,
1435,
288,
1377,
7760,
18,
2738,
12,
11261,
46,
5537,
18,
2211,
1769,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1086,
1435,
288,
1377,
7760,
18,
2738,
12,
11261,
46,
5537,
18,
2211,
1769,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Iterator e = ownedWindows.iterator(); while(e.hasNext()) { Window w = (Window)(((Reference) e.next()).get()); if (w != null) { if (w.isVisible()) w.getPeer().setVisible(true); } else e.remove(); } validate(); super.show(); toFront(); | validate(); if (visible) toFront(); else { super.show(); Iterator e = ownedWindows.iterator(); while (e.hasNext()) { Window w = (Window) (((Reference) e.next()).get()); if (w != null) { if (w.isVisible()) w.getPeer().setVisible(true); } else e.remove(); } } KeyboardFocusManager manager = KeyboardFocusManager.getCurrentKeyboardFocusManager(); manager.setGlobalFocusedWindow(this); | public void show() { synchronized (getTreeLock()) { if (parent != null && !parent.isDisplayable()) parent.addNotify(); if (peer == null) addNotify(); // Show visible owned windows. Iterator e = ownedWindows.iterator(); while(e.hasNext()) { Window w = (Window)(((Reference) e.next()).get()); if (w != null) { if (w.isVisible()) w.getPeer().setVisible(true); } else // Remove null weak reference from ownedWindows. // Unfortunately this can't be done in the Window's // finalize method because there is no way to guarantee // synchronous access to ownedWindows there. e.remove(); } validate(); super.show(); toFront(); KeyboardFocusManager manager = KeyboardFocusManager.getCurrentKeyboardFocusManager (); manager.setGlobalFocusedWindow (this); if (!shown) { FocusTraversalPolicy policy = getFocusTraversalPolicy (); Component initialFocusOwner = null; if (policy != null) initialFocusOwner = policy.getInitialComponent (this); if (initialFocusOwner != null) initialFocusOwner.requestFocusInWindow (); shown = true; } } } | 45713 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45713/3878be593002f301580025b16c264e41f364beae/Window.java/clean/libraries/javalib/external/classpath/java/awt/Window.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
2405,
1435,
225,
288,
565,
3852,
261,
588,
2471,
2531,
10756,
565,
288,
565,
309,
261,
2938,
480,
446,
597,
401,
2938,
18,
291,
4236,
429,
10756,
1377,
982,
18,
1289,
9168,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
2405,
1435,
225,
288,
565,
3852,
261,
588,
2471,
2531,
10756,
565,
288,
565,
309,
261,
2938,
480,
446,
597,
401,
2938,
18,
291,
4236,
429,
10756,
1377,
982,
18,
1289,
9168,
5... |
final Type componentType, | final Class componentClass, | private void generateComponentProperties(final LwComponent lwComponent, final Type componentType, final GeneratorAdapter generator, final int componentLocal) throws CodeGenerationException { final Class componentClass = getComponentClass(lwComponent.getComponentClassName(), myLoader); // introspected properties final LwIntrospectedProperty[] introspectedProperties = lwComponent.getAssignedIntrospectedProperties(); for (int i = 0; i < introspectedProperties.length; i++) { final LwIntrospectedProperty property = introspectedProperties[i]; if (property instanceof LwIntroComponentProperty) { continue; } final String propertyClass = property.getPropertyClassName(); final PropertyCodeGenerator propGen = (PropertyCodeGenerator) myPropertyCodeGenerators.get(propertyClass); if (propGen != null && propGen.generateCustomSetValue(lwComponent, componentClass, property, generator, componentLocal)) { continue; } generator.loadLocal(componentLocal); Object value = lwComponent.getPropertyValue(property); Type setterArgType; if (propertyClass.equals(Integer.class.getName())) { generator.push(((Integer) value).intValue()); setterArgType = Type.INT_TYPE; } else if (propertyClass.equals(Boolean.class.getName())) { generator.push(((Boolean) value).booleanValue()); setterArgType = Type.BOOLEAN_TYPE; } else if (propertyClass.equals(Double.class.getName())) { generator.push(((Double) value).doubleValue()); setterArgType = Type.DOUBLE_TYPE; } else { if (propGen == null) { continue; } propGen.generatePushValue(generator, value); setterArgType = getSetterArgType(property); } generator.invokeVirtual(componentType, new Method(property.getWriteMethodName(), Type.VOID_TYPE, new Type[] { setterArgType } )); } } | 56598 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56598/0a8c7f6f897798de90c99991927c43760777d651/AsmCodeGenerator.java/clean/UIDesignerCore/src/com/intellij/uiDesigner/compiler/AsmCodeGenerator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
2103,
1841,
2297,
12,
6385,
511,
91,
1841,
14589,
1841,
16,
4766,
2398,
727,
1659,
1794,
797,
16,
4766,
2398,
727,
10159,
4216,
4456,
16,
4766,
2398,
727,
509,
1794,
2042,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
2103,
1841,
2297,
12,
6385,
511,
91,
1841,
14589,
1841,
16,
4766,
2398,
727,
1659,
1794,
797,
16,
4766,
2398,
727,
10159,
4216,
4456,
16,
4766,
2398,
727,
509,
1794,
2042,
13,
... |
mockInvocationMatcher.invokedInvocation.setExpected(exampleInvocation); | mockInvocationMatcher.invokedInvocation.setExpected(exampleInvocation); | public void testMatchesInvocationBeforeCallingStub() throws Throwable { MockInvocationMatcher mockInvocationMatcher = new MockInvocationMatcher(); invocationMocker.addMatcher(mockInvocationMatcher); mockInvocationMatcher.invokedInvocation.setExpected(exampleInvocation); invocationMocker.invoke(exampleInvocation); Verifier.verifyObject(mockInvocationMatcher); } | 54028 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54028/c26c57f3ac4851e6bc9c5df8515ac73f4045eebf/InvocationMockerTest.java/clean/jmock/core/src/test/jmock/core/InvocationMockerTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
6869,
9267,
4649,
19677,
11974,
1435,
1216,
4206,
288,
202,
202,
9865,
9267,
6286,
5416,
9267,
6286,
273,
394,
7867,
9267,
6286,
5621,
202,
202,
5768,
4431,
49,
6203,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6869,
9267,
4649,
19677,
11974,
1435,
1216,
4206,
288,
202,
202,
9865,
9267,
6286,
5416,
9267,
6286,
273,
394,
7867,
9267,
6286,
5621,
202,
202,
5768,
4431,
49,
6203,
... |
AST tmp1912_AST_in = (AST)_t; | AST tmp1911_AST_in = (AST)_t; | public final void widgetlist(AST _t) throws RecognitionException { AST widgetlist_AST_in = (_t == ASTNULL) ? null : (AST)_t; gwidget(_t); _t = _retTree; { _loop327: do { if (_t==null) _t=ASTNULL; if ((_t.getType()==COMMA)) { AST tmp1912_AST_in = (AST)_t; match(_t,COMMA); _t = _t.getNextSibling(); gwidget(_t); _t = _retTree; } else { break _loop327; } } while (true); } _retTree = _t; } | 13952 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13952/041a16c78289f1c3ae5e575d3edc5e893a658e50/JPTreeParser.java/buggy/trunk/org.prorefactor.core/src/org/prorefactor/treeparserbase/JPTreeParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
3604,
1098,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
3604,
1098,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
13,
692,
446,
294,
261,
9053... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
3604,
1098,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
3604,
1098,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
13,
692,
446,
294,
261,
9053... |
public AccessibleRole getAccessibleRole() { | public AccessibleRole getAccessibleRole() { | public AccessibleRole getAccessibleRole() { return AccessibleRole.COLOR_CHOOSER; } // getAccessibleRole() | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/50dc6879c9be89f646fdff68c58f785e3dc0b90e/JColorChooser.java/clean/core/src/classpath/javax/javax/swing/JColorChooser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
5016,
1523,
2996,
336,
10451,
2996,
1435,
288,
1082,
202,
2463,
5016,
1523,
2996,
18,
10989,
67,
22213,
51,
2123,
31,
202,
202,
97,
368,
336,
10451,
2996,
1435,
2,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3196,
202,
482,
5016,
1523,
2996,
336,
10451,
2996,
1435,
288,
1082,
202,
2463,
5016,
1523,
2996,
18,
10989,
67,
22213,
51,
2123,
31,
202,
202,
97,
368,
336,
10451,
2996,
1435,
2,
-100,
-100,
... |
getMessageUI().setBusy(false); | getMessageUI().setBusy(false); | public void actionPerformed(ActionEvent e) { if (getMessageUI() != null) getMessageUI().setBusy(true); FolderDisplayUI fw = getFolderDisplayUI(); if (fw != null) fw.setBusy(true);; openWindowAsNew(true); if (fw != null) fw.setBusy(false); if (getMessageUI() != null) getMessageUI().setBusy(false); } | 967 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/967/55c2ef8139608f0f93fb72272ca8300eb9ac663e/MessageProxy.java/buggy/src/net/suberic/pooka/gui/MessageProxy.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
26100,
12,
1803,
1133,
425,
13,
288,
1377,
309,
261,
24906,
5370,
1435,
480,
446,
13,
202,
24906,
5370,
7675,
542,
29289,
12,
3767,
1769,
1377,
12623,
4236,
5370,
7600,
273,
29... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
26100,
12,
1803,
1133,
425,
13,
288,
1377,
309,
261,
24906,
5370,
1435,
480,
446,
13,
202,
24906,
5370,
7675,
542,
29289,
12,
3767,
1769,
1377,
12623,
4236,
5370,
7600,
273,
29... |
} } | } } | public Vector getAllGroupsOfUser(String username) throws CmsException { //System.out.println("PL/SQL: getAllGroupsOfUser"); com.opencms.file.oracleplsql.CmsQueries cq = (com.opencms.file.oracleplsql.CmsQueries) m_cq; CmsUser user = readUser(username, 0); CmsGroup group; Vector groups = new Vector(); CallableStatement statement = null; Connection con = null; ResultSet res = null; try { // get all all groups of the user statement = con.prepareCall(cq.C_PLSQL_GROUPS_GETGROUPSOFUSER); statement.registerOutParameter(1, oracle.jdbc.driver.OracleTypes.CURSOR); statement.setInt(2, user.getId()); statement.execute(); res = (ResultSet) statement.getObject(1); while (res.next()) { group = new CmsGroup(res.getInt(m_cq.C_GROUPS_GROUP_ID), res.getInt(m_cq.C_GROUPS_PARENT_GROUP_ID), res.getString(m_cq.C_GROUPS_GROUP_NAME), res.getString(m_cq.C_GROUPS_GROUP_DESCRIPTION), res.getInt(m_cq.C_GROUPS_GROUP_FLAGS)); groups.addElement(group); } } catch (SQLException sqlexc) { CmsException cmsException = getCmsException("[" + this.getClass().getName() + "] ", sqlexc); throw cmsException; } catch (Exception e) { throw new CmsException("[" + this.getClass().getName() + "]", e); } finally { if (res != null) { try { res.close(); } catch (SQLException se) { } } if (statement != null) { try { statement.close(); } catch (SQLException exc) { } } if (con != null) { try { con.close(); } catch (SQLException e){ } } } return groups;} | 8585 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8585/2650e41d0ec3cf443ac9d32172a68296418865b7/CmsDbAccess.java/clean/src/com/opencms/file/oracleplsql/CmsDbAccess.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
5589,
5514,
3621,
951,
1299,
12,
780,
2718,
13,
1216,
11228,
288,
202,
759,
3163,
18,
659,
18,
8222,
2932,
6253,
19,
3997,
30,
5514,
3621,
951,
1299,
8863,
202,
832,
18,
556,
14645,
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,
1071,
5589,
5514,
3621,
951,
1299,
12,
780,
2718,
13,
1216,
11228,
288,
202,
759,
3163,
18,
659,
18,
8222,
2932,
6253,
19,
3997,
30,
5514,
3621,
951,
1299,
8863,
202,
832,
18,
556,
14645,
18... |
WebAppDConfigBean contextBean = (WebAppDConfigBean) configRoot.getDConfigBean(deployable.getChildBean("/web-app")[0]); | WebAppDConfigBean contextBean = (WebAppDConfigBean) configRoot.getDConfigBean(deployable.getChildBean(configRoot.getXpaths()[0])[0]); | public void testConfigSaveRestore() throws Exception { WebDeployable deployable = new WebDeployable(classLoader.getResource("deployables/war1/")); WARConfiguration config = new WARConfiguration(deployable); DConfigBeanRoot configRoot = config.getDConfigBeanRoot(deployable.getDDBeanRoot()); WebAppDConfigBean contextBean = (WebAppDConfigBean) configRoot.getDConfigBean(deployable.getChildBean("/web-app")[0]); contextBean.setContextRoot("/test"); contextBean.setContextPriorityClassLoader(true); checkContents(((WebAppDConfigRoot)configRoot).getWebAppDocument()); ByteArrayOutputStream baos = new ByteArrayOutputStream(); config.save(baos); byte[] bytes = baos.toByteArray(); String output = new String(bytes); System.out.println(output); config = new WARConfiguration(deployable); configRoot = config.getDConfigBeanRoot(deployable.getDDBeanRoot()); contextBean = (WebAppDConfigBean) configRoot.getDConfigBean(deployable.getChildBean("/web-app")[0]); assertEquals("", contextBean.getContextRoot()); config.restore(new ByteArrayInputStream(baos.toByteArray())); configRoot = config.getDConfigBeanRoot(deployable.getDDBeanRoot()); checkContents(((WebAppDConfigRoot)configRoot).getWebAppDocument()); contextBean = (WebAppDConfigBean) configRoot.getDConfigBean(deployable.getChildBean("/web-app")[0]); assertEquals("/test", contextBean.getContextRoot()); assertEquals(true, contextBean.getContextPriorityClassLoader()); } | 12474 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12474/0604d81423a56815a4057b2f63aa8318c4618fe7/WARConfigurationFactoryTest.java/clean/modules/jetty/src/test/org/apache/geronimo/jetty/deployment/WARConfigurationFactoryTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
809,
4755,
10874,
1435,
1216,
1185,
288,
3639,
2999,
10015,
429,
7286,
429,
273,
394,
2999,
10015,
429,
12,
1106,
2886,
18,
588,
1420,
2932,
12411,
1538,
19,
905,
21,
489... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
809,
4755,
10874,
1435,
1216,
1185,
288,
3639,
2999,
10015,
429,
7286,
429,
273,
394,
2999,
10015,
429,
12,
1106,
2886,
18,
588,
1420,
2932,
12411,
1538,
19,
905,
21,
489... |
setLayoutManager(new ToolbarLayout()); setBorder(new LineBorder(ColorConstants.black,1)); incomingConnectionAnchor = new ChopboxAnchor(this); outgoingConnectionAnchor = new ChopboxAnchor(this); memberFigure=new ContainedWithMembersFigure(identifier,imageName); figuresPanel=memberFigure.getPaneFigure(); if(attributtes!=null){ int size=attributtes.length; attributeLabel= new Label[size]; for(int i=0;i<size;i++){ attributeLabel[i]= new Label(attributtes[i]); attributeLabel[i].setFont(CCMConstants.font1); attributeLabel[i].setLabelAlignment(PositionConstants.CENTER); figuresPanel.add(attributeLabel[i]); } } Dimension mDim = memberFigure.getSize(); add(memberFigure); } | setLayoutManager(new ToolbarLayout()); setBorder(new LineBorder(ColorConstants.black,1)); incomingConnectionAnchor = new ChopboxAnchor(this); outgoingConnectionAnchor = new ChopboxAnchor(this); memberFigure=new ContainedWithMembersFigure(identifier,imageName); if(attributtes!=null){ int size=attributtes.length; attributeLabel= new Label[size]; for(int i=0;i<size;i++){ attributeLabel[i]= new Label(attributtes[i],new Image(null, CCMEditorPlugin.class.getResourceAsStream(ProjectResources.MEMBER_S))) ; attributeLabel[i].setFont(CCMConstants.font1); attributeLabel[i].setLabelAlignment(PositionConstants.LEFT); figuresPanel.add(attributeLabel[i]); } } Dimension mDim = memberFigure.getSize(); add(memberFigure); add(figuresPanel); } | public ContainerFigureWithAttribute (String identifier,String imageName,String[]attributtes){ // The classlabel with <@img><varname>: <classname> and the font specified above setLayoutManager(new ToolbarLayout()); setBorder(new LineBorder(ColorConstants.black,1)); //setBackgroundColor(classColor); //setOpaque(true); incomingConnectionAnchor = new ChopboxAnchor(this); outgoingConnectionAnchor = new ChopboxAnchor(this); memberFigure=new ContainedWithMembersFigure(identifier,imageName); //identifierLabel = new Label(identifier,new Image(null, // CCMEditorPlugin.class.getResourceAsStream(imageName))); //identifierLabel.setFont(CCMConstants.font); //identifierLabel.setLabelAlignment(PositionConstants.CENTER); //classFigure.add(identifierLabel); figuresPanel=memberFigure.getPaneFigure(); if(attributtes!=null){ int size=attributtes.length; attributeLabel= new Label[size]; for(int i=0;i<size;i++){ attributeLabel[i]= new Label(attributtes[i]); attributeLabel[i].setFont(CCMConstants.font1); attributeLabel[i].setLabelAlignment(PositionConstants.CENTER); figuresPanel.add(attributeLabel[i]); } } Dimension mDim = memberFigure.getSize(); add(memberFigure); } | 11120 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11120/6b30e419c238d4bc3e4778a67a8555eeba17fa4a/ContainerFigureWithAttribute.java/buggy/trunk/qedomodeller/CCMEditor/src/ccm/figures/ContainerFigureWithAttribute.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
4039,
42,
15906,
1190,
1499,
261,
780,
2756,
16,
780,
29842,
16,
780,
8526,
14588,
322,
1078,
15329,
202,
202,
759,
1021,
667,
1925,
598,
411,
36,
6081,
4438,
1401,
529,
28593,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4039,
42,
15906,
1190,
1499,
261,
780,
2756,
16,
780,
29842,
16,
780,
8526,
14588,
322,
1078,
15329,
202,
202,
759,
1021,
667,
1925,
598,
411,
36,
6081,
4438,
1401,
529,
28593,
... |
sb.append( ( String ) it.next() ); if ( it.hasNext() ) | if ( isFirst ) { isFirst = false; } else | private String buildErrorMessage( String username, String password, int passwordLength, int categoryCount, int tokenSize ) { List violations = new ArrayList(); if ( !isValidPasswordLength( password, passwordLength ) ) { violations.add( "length too short" ); } if ( !isValidCategoryCount( password, categoryCount ) ) { violations.add( "insufficient character mix" ); } if ( !isValidUsernameSubstring( username, password, tokenSize ) ) { violations.add( "contains portions of username" ); } StringBuffer sb = new StringBuffer( "Password violates policy: " ); Iterator it = violations.iterator(); while ( it.hasNext() ) { sb.append( ( String ) it.next() ); if ( it.hasNext() ) { sb.append( ", " ); } } return sb.toString(); } | 10677 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10677/b806b7ccc6fb7b31a9d1fa24a5f2e3aca4a6d354/CheckPasswordPolicy.java/buggy/protocol-changepw/src/main/java/org/apache/directory/server/changepw/service/CheckPasswordPolicy.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
514,
1361,
14935,
12,
514,
2718,
16,
514,
2201,
16,
509,
2201,
1782,
16,
509,
3150,
1380,
16,
3639,
509,
1147,
1225,
262,
565,
288,
3639,
987,
18971,
273,
394,
2407,
5621,
3639,
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,
514,
1361,
14935,
12,
514,
2718,
16,
514,
2201,
16,
509,
2201,
1782,
16,
509,
3150,
1380,
16,
3639,
509,
1147,
1225,
262,
565,
288,
3639,
987,
18971,
273,
394,
2407,
5621,
3639,
3... |
.getId(), handler)); } else { final Expression enabledWhenExpression = new LegacySelectionEnablerWrapper( enabler); handlerActivations.add(handlerService.activateHandler(command .getId(), handler, enabledWhenExpression)); | .getId(), handler, activeWhenExpression)); | private static final void convertActionToHandler( final IConfigurationElement element, final String actionId, final ParameterizedCommand command, final CommandManager commandManager, final IHandlerService handlerService, final BindingManager bindingManager, final CommandImageManager commandImageManager, final String style) { // Read the class attribute. final String classString = readOptional(element, ATTRIBUTE_CLASS); if (classString == null) { return; } final IHandler handler = new ActionDelegateHandlerProxy(element, ATTRIBUTE_CLASS, actionId, command, commandManager, bindingManager, commandImageManager, style); // Read the enablesFor attribute, and enablement and selection elements. SelectionEnabler enabler = null; if (element.getAttribute(ATTRIBUTE_ENABLES_FOR) != null) { enabler = new SelectionEnabler(element); } else { IConfigurationElement[] kids = element .getChildren(ELEMENT_ENABLEMENT); if (kids.length > 0) enabler = new SelectionEnabler(element); } // Activate the handler. if (enabler == null) { handlerActivations.add(handlerService.activateHandler(command .getId(), handler)); } else { final Expression enabledWhenExpression = new LegacySelectionEnablerWrapper( enabler); handlerActivations.add(handlerService.activateHandler(command .getId(), handler, enabledWhenExpression)); } } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/9ccb2ff1434beac530178ae6cb85b1a627f56bfc/LegacyActionPersistence.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/LegacyActionPersistence.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
760,
727,
918,
1765,
1803,
774,
1503,
12,
1082,
202,
6385,
467,
1750,
1046,
930,
16,
727,
514,
1301,
548,
16,
1082,
202,
6385,
30125,
2189,
1296,
16,
1082,
202,
6385,
3498,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
760,
727,
918,
1765,
1803,
774,
1503,
12,
1082,
202,
6385,
467,
1750,
1046,
930,
16,
727,
514,
1301,
548,
16,
1082,
202,
6385,
30125,
2189,
1296,
16,
1082,
202,
6385,
3498,
1... |
IToolBarManager fileToolBar = new ToolBarManager(coolBar .getStyle()); | IToolBarManager fileToolBar = actionBarConfigurer.createToolBarManager(); | protected void fillCoolBar(ICoolBarManager coolBar) { { // Set up the context Menu IMenuManager popUpMenu = new MenuManager(); popUpMenu.add(new ActionContributionItem(lockToolBarAction)); popUpMenu.add(new ActionContributionItem(editActionSetAction)); coolBar.setContextMenuManager(popUpMenu); } coolBar.add(new GroupMarker(IIDEActionConstants.GROUP_FILE)); { // File Group IToolBarManager fileToolBar = new ToolBarManager(coolBar .getStyle()); fileToolBar.add(new Separator(IWorkbenchActionConstants.NEW_GROUP)); fileToolBar.add(newWizardDropDownAction); fileToolBar.add(new GroupMarker(IWorkbenchActionConstants.NEW_EXT)); fileToolBar.add(new GroupMarker( IWorkbenchActionConstants.SAVE_GROUP)); fileToolBar.add(saveAction); fileToolBar .add(new GroupMarker(IWorkbenchActionConstants.SAVE_EXT)); fileToolBar.add(printAction); fileToolBar .add(new GroupMarker(IWorkbenchActionConstants.PRINT_EXT)); fileToolBar .add(new Separator(IWorkbenchActionConstants.BUILD_GROUP)); fileToolBar .add(new GroupMarker(IWorkbenchActionConstants.BUILD_EXT)); fileToolBar.add(new Separator( IWorkbenchActionConstants.MB_ADDITIONS)); // Add to the cool bar manager coolBar.add(new ToolBarContributionItem(fileToolBar, IWorkbenchActionConstants.TOOLBAR_FILE)); } coolBar.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS)); coolBar.add(new GroupMarker(IIDEActionConstants.GROUP_NAV)); { // Navigate group IToolBarManager navToolBar = new ToolBarManager(coolBar .getStyle()); navToolBar.add(new Separator( IWorkbenchActionConstants.HISTORY_GROUP)); navToolBar .add(new GroupMarker(IWorkbenchActionConstants.GROUP_APP)); navToolBar.add(backwardHistoryAction); navToolBar.add(forwardHistoryAction); navToolBar.add(new Separator(IWorkbenchActionConstants.PIN_GROUP)); navToolBar.add(pinEditorContributionItem); // Add to the cool bar manager coolBar.add(new ToolBarContributionItem(navToolBar, IWorkbenchActionConstants.TOOLBAR_NAVIGATE)); } coolBar.add(new GroupMarker(IWorkbenchActionConstants.GROUP_EDITOR)); coolBar.add(new GroupMarker(IWorkbenchActionConstants.GROUP_HELP)); { // Help group IToolBarManager helpToolBar = new ToolBarManager(coolBar .getStyle()); helpToolBar.add(new Separator(IWorkbenchActionConstants.GROUP_HELP));// helpToolBar.add(searchComboItem); // Add the group for applications to contribute helpToolBar.add(new GroupMarker(IWorkbenchActionConstants.GROUP_APP)); // Add to the cool bar manager coolBar.add(new ToolBarContributionItem(helpToolBar, IWorkbenchActionConstants.TOOLBAR_HELP)); } } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/54532dbf350a8597a32c3325d699ca741a40ef83/WorkbenchActionBuilder.java/clean/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/WorkbenchActionBuilder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
3636,
39,
1371,
5190,
12,
2871,
1371,
5190,
1318,
27367,
5190,
13,
288,
3639,
288,
368,
1000,
731,
326,
819,
9809,
5411,
467,
4599,
1318,
1843,
1211,
4599,
273,
394,
9809,
1318... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3636,
39,
1371,
5190,
12,
2871,
1371,
5190,
1318,
27367,
5190,
13,
288,
3639,
288,
368,
1000,
731,
326,
819,
9809,
5411,
467,
4599,
1318,
1843,
1211,
4599,
273,
394,
9809,
1318... |
pc = finallyStack[tryStackTop]; | pc = finallyStack[tryStackTop - 1]; | public static Object interpret(InterpreterData theData) throws JavaScriptException { Object lhs; Object[] stack = new Object[theData.itsMaxStack]; int stackTop = -1; byte[] iCode = theData.itsICode; int pc = 0; int iCodeLength = theData.itsICodeTop; Object[] local = null; // used for newtemp/usetemp etc. if (theData.itsMaxLocals > 0) local = new Object[theData.itsMaxLocals]; Object[] vars = null; int i = theData.itsVariableTable.size(); if (i > 0) { vars = new Object[i]; for (i = 0; i < theData.itsVariableTable.getParameterCount(); i++) { if (i >= theData.itsInArgs.length) vars[i] = Undefined.instance; else vars[i] = theData.itsInArgs[i]; } for ( ; i < vars.length; i++) vars[i] = Undefined.instance; } Context cx = theData.itsCX; Scriptable scope = theData.itsScope; if (theData.itsNestedFunctions != null) { for (i = 0; i < theData.itsNestedFunctions.length; i++) createFunctionObject(theData.itsNestedFunctions[i], scope); } Object id; Object rhs; int count; int slot; String name = null; Object[] outArgs; int lIntValue; long lLongValue; int rIntValue; int[] catchStack = null; int[] finallyStack = null; Scriptable[] scopeStack = null; int tryStackTop = 0; if (theData.itsMaxTryDepth > 0) { catchStack = new int[theData.itsMaxTryDepth]; finallyStack = new int[theData.itsMaxTryDepth]; scopeStack = new Scriptable[theData.itsMaxTryDepth]; } /* Save the security domain. Must restore upon normal exit. * If we exit the interpreter loop by throwing an exception, * set cx.interpreterSecurityDomain to null, and require the * catching function to restore it. */ Object savedSecurityDomain = cx.interpreterSecurityDomain; cx.interpreterSecurityDomain = theData.securityDomain; Object result = Undefined.instance; while (pc < iCodeLength) { try { switch ((int)(iCode[pc] & 0xff)) { case TokenStream.ENDTRY : tryStackTop--; break; case TokenStream.TRY : i = getTarget(iCode, pc + 1); if (i == pc) i = 0; catchStack[tryStackTop] = i; i = getTarget(iCode, pc + 3); if (i == (pc + 2)) i = 0; finallyStack[tryStackTop] = i; scopeStack[tryStackTop++] = scope; pc += 4; break; case TokenStream.GE : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.cmp_LEB(rhs, lhs); break; case TokenStream.LE : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.cmp_LEB(lhs, rhs); break; case TokenStream.GT : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.cmp_LTB(rhs, lhs); break; case TokenStream.LT : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.cmp_LTB(lhs, rhs); break; case TokenStream.IN : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = new Boolean(ScriptRuntime.in(lhs, rhs)); break; case TokenStream.INSTANCEOF : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = new Boolean(ScriptRuntime.instanceOf(lhs, rhs)); break; case TokenStream.EQ : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.eqB(rhs, lhs); break; case TokenStream.NE : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.neB(lhs, rhs); break; case TokenStream.SHEQ : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.seqB(lhs, rhs); break; case TokenStream.SHNE : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.sneB(lhs, rhs); break; case TokenStream.IFNE : if (!ScriptRuntime.toBoolean(stack[stackTop--])) { pc = getTarget(iCode, pc + 1); continue; } pc += 2; break; case TokenStream.IFEQ : if (ScriptRuntime.toBoolean(stack[stackTop--])) { pc = getTarget(iCode, pc + 1); continue; } pc += 2; break; case TokenStream.GOTO : pc = getTarget(iCode, pc + 1); continue; case TokenStream.GOSUB : stack[++stackTop] = new Integer(pc + 3); pc = getTarget(iCode, pc + 1); continue; case TokenStream.RETSUB : slot = (iCode[++pc] & 0xFF); pc = ((Integer)local[slot]).intValue(); continue; case TokenStream.POP : stackTop--; break; case TokenStream.DUP : stack[stackTop + 1] = stack[stackTop]; stackTop++; break; case TokenStream.POPV : result = stack[stackTop--]; break; case TokenStream.RETURN : result = stack[stackTop--]; pc = getTarget(iCode, pc + 1); break; case TokenStream.BITNOT : rIntValue = ScriptRuntime.toInt32(stack[stackTop]); stack[stackTop] = new Double(~rIntValue); break; case TokenStream.BITAND : rIntValue = ScriptRuntime.toInt32(stack[stackTop--]); lIntValue = ScriptRuntime.toInt32(stack[stackTop]); stack[stackTop] = new Double(lIntValue & rIntValue); break; case TokenStream.BITOR : rIntValue = ScriptRuntime.toInt32(stack[stackTop--]); lIntValue = ScriptRuntime.toInt32(stack[stackTop]); stack[stackTop] = new Double(lIntValue | rIntValue); break; case TokenStream.BITXOR : rIntValue = ScriptRuntime.toInt32(stack[stackTop--]); lIntValue = ScriptRuntime.toInt32(stack[stackTop]); stack[stackTop] = new Double(lIntValue ^ rIntValue); break; case TokenStream.LSH : rIntValue = ScriptRuntime.toInt32(stack[stackTop--]); lIntValue = ScriptRuntime.toInt32(stack[stackTop]); stack[stackTop] = new Double(lIntValue << rIntValue); break; case TokenStream.RSH : rIntValue = ScriptRuntime.toInt32(stack[stackTop--]); lIntValue = ScriptRuntime.toInt32(stack[stackTop]); stack[stackTop] = new Double(lIntValue >> rIntValue); break; case TokenStream.URSH : rIntValue = (ScriptRuntime.toInt32(stack[stackTop--]) & 0x1F); lLongValue = ScriptRuntime.toUint32(stack[stackTop]); stack[stackTop] = new Double(lLongValue >>> rIntValue); break; case TokenStream.ADD : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.add(lhs, rhs); break; case TokenStream.SUB : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = new Double(ScriptRuntime.toNumber(lhs) - ScriptRuntime.toNumber(rhs)); break; case TokenStream.NEG : rhs = stack[stackTop]; stack[stackTop] = new Double(-ScriptRuntime.toNumber(rhs)); break; case TokenStream.POS : rhs = stack[stackTop]; stack[stackTop] = new Double(ScriptRuntime.toNumber(rhs)); break; case TokenStream.MUL : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = new Double(ScriptRuntime.toNumber(lhs) * ScriptRuntime.toNumber(rhs)); break; case TokenStream.DIV : rhs = stack[stackTop--]; lhs = stack[stackTop]; // Detect the divide by zero or let Java do it ? stack[stackTop] = new Double(ScriptRuntime.toNumber(lhs) / ScriptRuntime.toNumber(rhs)); break; case TokenStream.MOD : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = new Double(ScriptRuntime.toNumber(lhs) % ScriptRuntime.toNumber(rhs)); break; case TokenStream.BINDNAME : stack[++stackTop] = ScriptRuntime.bind(scope, getString(theData.itsStringTable, iCode, pc + 1)); pc += 2; break; case TokenStream.GETBASE : stack[++stackTop] = ScriptRuntime.getBase(scope, getString(theData.itsStringTable, iCode, pc + 1)); pc += 2; break; case TokenStream.SETNAME : rhs = stack[stackTop--]; lhs = stack[stackTop]; // what about class cast exception here ? stack[stackTop] = ScriptRuntime.setName((Scriptable)lhs, rhs, scope, getString(theData.itsStringTable, iCode, pc + 1)); pc += 2; break; case TokenStream.DELPROP : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.delete(lhs, rhs); break; case TokenStream.GETPROP : name = (String)stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.getProp(lhs, name, scope); break; case TokenStream.SETPROP : rhs = stack[stackTop--]; name = (String)stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.setProp(lhs, name, rhs, scope); break; case TokenStream.GETELEM : id = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.getElem(lhs, id, scope); break; case TokenStream.SETELEM : rhs = stack[stackTop--]; id = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.setElem(lhs, id, rhs, scope); break; case TokenStream.PROPINC : name = (String)stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.postIncrement(lhs, name, scope); break; case TokenStream.PROPDEC : name = (String)stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.postDecrement(lhs, name, scope); break; case TokenStream.ELEMINC : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.postIncrementElem(lhs, rhs, scope); break; case TokenStream.ELEMDEC : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.postDecrementElem(lhs, rhs, scope); break; case TokenStream.GETTHIS : lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.getThis((Scriptable)lhs); break; case TokenStream.NEWTEMP : lhs = stack[stackTop]; slot = (iCode[++pc] & 0xFF); local[slot] = lhs; break; case TokenStream.USETEMP : slot = (iCode[++pc] & 0xFF); stack[++stackTop] = local[slot]; break; case TokenStream.CALLSPECIAL : i = (iCode[pc + 1] << 8) | (iCode[pc + 2] & 0xFF); name = getString(theData.itsStringTable, iCode, pc + 3); count = (iCode[pc + 5] << 8) | (iCode[pc + 6] & 0xFF); outArgs = new Object[count]; for (i = count - 1; i >= 0; i--) outArgs[i] = stack[stackTop--]; rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.callSpecial( cx, lhs, rhs, outArgs, theData.itsThisObj, scope, name, i); pc += 6; break; case TokenStream.CALL : count = (iCode[pc + 1] << 8) | (iCode[pc + 2] & 0xFF); outArgs = new Object[count]; for (i = count - 1; i >= 0; i--) outArgs[i] = stack[stackTop--]; rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.call(cx, lhs, rhs, outArgs); pc += 2; break; case TokenStream.NEW : count = (iCode[pc + 1] << 8) | (iCode[pc + 2] & 0xFF); outArgs = new Object[count]; for (i = count - 1; i >= 0; i--) outArgs[i] = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.newObject(cx, lhs, outArgs, scope); pc += 2; break; case TokenStream.TYPEOF : lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.typeof(lhs); break; case TokenStream.TYPEOFNAME : name = getString(theData.itsStringTable, iCode, pc + 1); stack[++stackTop] = ScriptRuntime.typeofName(scope, name); pc += 2; break; case TokenStream.STRING : stack[++stackTop] = getString(theData.itsStringTable, iCode, pc + 1); pc += 2; break; case TokenStream.NUMBER : stack[++stackTop] = getNumber(theData.itsNumberTable, iCode, pc + 1); pc += 2; break; case TokenStream.NAME : stack[++stackTop] = ScriptRuntime.name(scope, getString(theData.itsStringTable, iCode, pc + 1)); pc += 2; break; case TokenStream.NAMEINC : stack[++stackTop] = ScriptRuntime.postIncrement(scope, getString(theData.itsStringTable, iCode, pc + 1)); pc += 2; break; case TokenStream.NAMEDEC : stack[++stackTop] = ScriptRuntime.postDecrement(scope, getString(theData.itsStringTable, iCode, pc + 1)); pc += 2; break; case TokenStream.SETVAR : lhs = stack[stackTop]; slot = (iCode[++pc] & 0xFF); vars[slot] = lhs; break; case TokenStream.GETVAR : slot = (iCode[++pc] & 0xFF); stack[++stackTop] = vars[slot]; break; case TokenStream.VARINC : slot = (iCode[++pc] & 0xFF); stack[++stackTop] = vars[slot]; vars[slot] = ScriptRuntime.postIncrement(vars[slot]); break; case TokenStream.VARDEC : slot = (iCode[++pc] & 0xFF); stack[++stackTop] = vars[slot]; vars[slot] = ScriptRuntime.postDecrement(vars[slot]); break; case TokenStream.ZERO : stack[++stackTop] = zero; break; case TokenStream.ONE : stack[++stackTop] = one; break; case TokenStream.NULL : stack[++stackTop] = null; break; case TokenStream.THIS : stack[++stackTop] = theData.itsThisObj; break; case TokenStream.FALSE : stack[++stackTop] = Boolean.FALSE; break; case TokenStream.TRUE : stack[++stackTop] = Boolean.TRUE; break; case TokenStream.UNDEFINED : stack[++stackTop] = Undefined.instance; break; case TokenStream.THROW : cx.interpreterSecurityDomain = null; throw new JavaScriptException(stack[stackTop--]); case TokenStream.JTHROW : cx.interpreterSecurityDomain = null; lhs = stack[stackTop--]; if (lhs instanceof JavaScriptException) throw (JavaScriptException)lhs; else throw (RuntimeException)lhs; case TokenStream.ENTERWITH : lhs = stack[stackTop--]; scope = ScriptRuntime.enterWith(lhs, scope); break; case TokenStream.LEAVEWITH : scope = ScriptRuntime.leaveWith(scope); break; case TokenStream.NEWSCOPE : stack[++stackTop] = ScriptRuntime.newScope(); break; case TokenStream.ENUMINIT : slot = (iCode[++pc] & 0xFF); lhs = stack[stackTop--]; local[slot] = ScriptRuntime.initEnum(lhs, scope); break; case TokenStream.ENUMNEXT : slot = (iCode[++pc] & 0xFF); stack[++stackTop] = ScriptRuntime.nextEnum((Enumeration)local[slot]); break; case TokenStream.GETPROTO : lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.getProto(lhs, scope); break; case TokenStream.GETPARENT : lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.getParent(lhs); break; case TokenStream.GETSCOPEPARENT : lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.getParent(lhs, scope); break; case TokenStream.SETPROTO : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.setProto(lhs, rhs, scope); break; case TokenStream.SETPARENT : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.setParent(lhs, rhs, scope); break; case TokenStream.SCOPE : stack[++stackTop] = scope; break; case TokenStream.CLOSURE : i = (iCode[pc + 1] << 8) | (iCode[pc + 2] & 0xFF); stack[++stackTop] = new NativeClosure(cx, scope, theData.itsNestedFunctions[i]); pc += 2; break; case TokenStream.OBJECT : i = (iCode[pc + 1] << 8) | (iCode[pc + 2] & 0xFF); stack[++stackTop] = theData.itsRegExpLiterals[i]; pc += 2; break; case TokenStream.LINE : i = (iCode[pc + 1] << 8) | (iCode[pc + 2] & 0xFF); cx.interpreterLine = i; pc += 2; break; case TokenStream.SOURCEFILE : cx.interpreterSourceFile = theData.itsSourceFile; break; default : dumpICode(theData); throw new RuntimeException("Unknown icode : " + (iCode[pc] & 0xff) + " @ pc : " + pc); } pc++; } catch (EcmaError ee) { // an offical ECMA error object, // handle as if it were a JavaScriptException stackTop = 0; cx.interpreterSecurityDomain = null; if (tryStackTop > 0) { pc = catchStack[--tryStackTop]; scope = scopeStack[tryStackTop]; if (pc == 0) { pc = finallyStack[tryStackTop]; if (pc == 0) throw ee; stack[0] = ee.getErrorObject(); } else stack[0] = ee.getErrorObject(); } else throw ee; // We caught an exception; restore this function's // security domain. cx.interpreterSecurityDomain = theData.securityDomain; } catch (JavaScriptException jsx) { stackTop = 0; cx.interpreterSecurityDomain = null; if (tryStackTop > 0) { pc = catchStack[--tryStackTop]; scope = scopeStack[tryStackTop]; if (pc == 0) { pc = finallyStack[tryStackTop]; if (pc == 0) throw jsx; stack[0] = jsx; } else stack[0] = ScriptRuntime.unwrapJavaScriptException(jsx); } else throw jsx; // We caught an exception; restore this function's // security domain. cx.interpreterSecurityDomain = theData.securityDomain; } /* debug only, will be going soon catch (ArrayIndexOutOfBoundsException oob) { System.out.println("OOB @ " + pc + " " + oob + " in " + theData.itsName + " " + oob.getMessage()); throw oob; } */ catch (RuntimeException jx) { cx.interpreterSecurityDomain = null; if (tryStackTop > 0) { stackTop = 0; stack[0] = jx; pc = finallyStack[--tryStackTop]; scope = scopeStack[tryStackTop]; if (pc == 0) throw jx; } else throw jx; // We caught an exception; restore this function's // security domain. cx.interpreterSecurityDomain = theData.securityDomain; } } cx.interpreterSecurityDomain = savedSecurityDomain; return result; } | 54155 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54155/32feff141e5ccc7b1b5e5423d181b6baf24616a0/Interpreter.java/clean/js/rhino/org/mozilla/javascript/Interpreter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1033,
10634,
12,
30010,
751,
326,
751,
13,
3639,
1216,
11905,
503,
565,
288,
3639,
1033,
8499,
31,
3639,
1033,
8526,
2110,
273,
394,
1033,
63,
5787,
751,
18,
1282,
2747,
2624,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1033,
10634,
12,
30010,
751,
326,
751,
13,
3639,
1216,
11905,
503,
565,
288,
3639,
1033,
8499,
31,
3639,
1033,
8526,
2110,
273,
394,
1033,
63,
5787,
751,
18,
1282,
2747,
2624,
... |
try { setOnmousemove((String) evalAttr("onmousemove", getOnmousemoveExpr(), String.class)); } catch (NullAttributeException ex) { } | if ((string = EvalHelper.evalString("onmousedown", getOnmousedownExpr(), this, pageContext)) != null) setOnmousedown(string); | private void evaluateExpressions() throws JspException { try { setAccesskey((String) evalAttr("accesskey", getAccesskeyExpr(), String.class)); } catch (NullAttributeException ex) { } try { setAlt((String) evalAttr("alt", getAltExpr(), String.class)); } catch (NullAttributeException ex) { } try { setAltKey((String) evalAttr("altKey", getAltKeyExpr(), String.class)); } catch (NullAttributeException ex) { } try { setDisabled(((Boolean) evalAttr("disabled", getDisabledExpr(), Boolean.class)). booleanValue()); } catch (NullAttributeException ex) { } try { setOnblur((String) evalAttr("onblur", getOnblurExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOnchange((String) evalAttr("onchange", getOnchangeExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOnclick((String) evalAttr("onclick", getOnclickExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOndblclick((String) evalAttr("ondblclick", getOndblclickExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOnfocus((String) evalAttr("onfocus", getOnfocusExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOnkeydown((String) evalAttr("onkeydown", getOnkeydownExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOnkeypress((String) evalAttr("onkeypress", getOnkeypressExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOnkeyup((String) evalAttr("onkeyup", getOnkeyupExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOnmousedown((String) evalAttr("onmousedown", getOnmousedownExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOnmousemove((String) evalAttr("onmousemove", getOnmousemoveExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOnmouseout((String) evalAttr("onmouseout", getOnmouseoutExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOnmouseover((String) evalAttr("onmouseover", getOnmouseoverExpr(), String.class)); } catch (NullAttributeException ex) { } try { setOnmouseup((String) evalAttr("onmouseup", getOnmouseupExpr(), String.class)); } catch (NullAttributeException ex) { } try { setProperty((String) evalAttr("property", getPropertyExpr(), String.class)); } catch (NullAttributeException ex) { } try { setStyle((String) evalAttr("style", getStyleExpr(), String.class)); } catch (NullAttributeException ex) { } try { setStyleClass((String) evalAttr("styleClass", getStyleClassExpr(), String.class)); } catch (NullAttributeException ex) { } try { setStyleId((String) evalAttr("styleId", getStyleIdExpr(), String.class)); } catch (NullAttributeException ex) { } try { setTabindex((String) evalAttr("tabindex", getTabindexExpr(), String.class)); } catch (NullAttributeException ex) { } try { setTitle((String) evalAttr("title", getTitleExpr(), String.class)); } catch (NullAttributeException ex) { } try { setTitleKey((String) evalAttr("titleKey", getTitleKeyExpr(), String.class)); } catch (NullAttributeException ex) { } try { setValue((String) evalAttr("value", getValueExpr(), String.class)); } catch (NullAttributeException ex) { } } | 54704 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54704/022bd23c954cf673e53731849d562b3c295473f1/ELCancelTag.java/clean/contrib/struts-el/src/share/org/apache/strutsel/taglib/html/ELCancelTag.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
5956,
8927,
1435,
1216,
27485,
288,
3639,
775,
288,
5411,
444,
1862,
856,
12443,
780,
13,
5302,
3843,
2932,
3860,
856,
3113,
21909,
856,
4742,
9334,
4766,
6647,
514,
18,
1106,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5956,
8927,
1435,
1216,
27485,
288,
3639,
775,
288,
5411,
444,
1862,
856,
12443,
780,
13,
5302,
3843,
2932,
3860,
856,
3113,
21909,
856,
4742,
9334,
4766,
6647,
514,
18,
1106,
... |
IContext context = contextProvider.getContext(getViewer().getControl()); PlatformUI.getWorkbench().getHelpSystem() .displayHelp(context); } | IContext context = contextProvider.getContext(getViewer() .getControl()); PlatformUI.getWorkbench().getHelpSystem().displayHelp(context); } | public void helpRequested(HelpEvent e) { IContext context = contextProvider.getContext(getViewer().getControl()); PlatformUI.getWorkbench().getHelpSystem() .displayHelp(context); } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/1ceb585b9b16047c6c580984b0c9962c41a22ba6/MarkerView.java/clean/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerView.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
918,
2809,
11244,
12,
6696,
1133,
425,
13,
288,
2398,
202,
45,
1042,
819,
273,
819,
2249,
18,
29120,
12,
588,
18415,
7675,
588,
3367,
10663,
7734,
11810,
5370,
18,
588,
2421,
22144... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
918,
2809,
11244,
12,
6696,
1133,
425,
13,
288,
2398,
202,
45,
1042,
819,
273,
819,
2249,
18,
29120,
12,
588,
18415,
7675,
588,
3367,
10663,
7734,
11810,
5370,
18,
588,
2421,
22144... |
P2PService remoteService, int numberOfNodes, P2PNodeLookup lookup, String vnName, String jobId, boolean underloadedOnly) { | P2PService remoteService, int numberOfNodes, P2PNodeLookup lookup, String vnName, String jobId) { boolean broadcast; if (uuid != null) { logger.debug("AskingNode message received with #" + uuid); ttl--; try { broadcast = broadcaster(ttl, uuid, remoteService); } catch (P2POldMessageException e) { return; } } else { broadcast = true; } | public void askingNode(int ttl, UniversalUniqueID uuid, P2PService remoteService, int numberOfNodes, P2PNodeLookup lookup, String vnName, String jobId, boolean underloadedOnly) { if (!underloadedOnly || !amIUnderloaded(0)) return; this.askingNode(ttl,uuid,remoteService,numberOfNodes,lookup,vnName,jobId); } | 58694 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58694/0aad9a60aca347dacfc0f0039dbbb1671d89cbc5/P2PService.java/buggy/src/org/objectweb/proactive/p2p/service/P2PService.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
29288,
907,
12,
474,
6337,
16,
27705,
31118,
3822,
16,
5411,
453,
22,
52,
1179,
2632,
1179,
16,
509,
7922,
3205,
16,
453,
22,
52,
907,
6609,
3689,
16,
5411,
514,
21732,
461,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
29288,
907,
12,
474,
6337,
16,
27705,
31118,
3822,
16,
5411,
453,
22,
52,
1179,
2632,
1179,
16,
509,
7922,
3205,
16,
453,
22,
52,
907,
6609,
3689,
16,
5411,
514,
21732,
461,
... |
Vector2d lengthStep = new Vector2d(p2); lengthStep.sub(p1); | Vector2d lengthStep = new Vector2d(point2); lengthStep.sub(point1); | public void paintDashedWedgeBond(org.openscience.cdk.interfaces.IBond bond, Color bondColor, Graphics2D graphics) { graphics.setColor(bondColor); double bondLength = GeometryTools.getLength2D(bond, r2dm.getRenderingCoordinates()); int numberOfLines = (int) (bondLength / 4.0); // this value should be made customizable double wedgeWidth = r2dm.getBondWidth() * 2.0; // this value should be made customazible double widthStep = wedgeWidth / (double) numberOfLines; Point2d p1 = r2dm.getRenderingCoordinate(bond.getAtom(0)); Point2d p2 = r2dm.getRenderingCoordinate(bond.getAtom(1)); if (bond.getStereo() == CDKConstants.STEREO_BOND_DOWN_INV) { // draw the wedge bond the other way around p1 = r2dm.getRenderingCoordinate(bond.getAtom(1)); p2 = r2dm.getRenderingCoordinate(bond.getAtom(0)); } Vector2d lengthStep = new Vector2d(p2); lengthStep.sub(p1); lengthStep.scale(1.0 / numberOfLines); Vector2d p = GeometryTools.calculatePerpendicularUnitVector(p1, p2); Point2d currentPoint = new Point2d(p1); Point2d q1 = new Point2d(); Point2d q2 = new Point2d(); for (int i = 0; i <= numberOfLines; ++i) { Vector2d offset = new Vector2d(p); offset.scale(i * widthStep); q1.add(currentPoint, offset); q2.sub(currentPoint, offset); int[] lineCoords = {(int) q1.x, (int) q1.y, (int) q2.x, (int) q2.y}; lineCoords = getScreenCoordinates(lineCoords); graphics.drawLine(lineCoords[0], lineCoords[1], lineCoords[2], lineCoords[3]); currentPoint.add(lengthStep); } } | 1306 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1306/91efafae4baed78674b47d82c8ce604ad8155aa7/AbstractRenderer2D.java/clean/src/org/openscience/cdk/renderer/AbstractRenderer2D.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
12574,
40,
13912,
59,
7126,
9807,
12,
3341,
18,
20346,
71,
6254,
18,
71,
2883,
18,
15898,
18,
45,
9807,
8427,
16,
5563,
8427,
2957,
16,
16830,
22,
40,
17313,
13,
202,
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,
225,
202,
482,
918,
12574,
40,
13912,
59,
7126,
9807,
12,
3341,
18,
20346,
71,
6254,
18,
71,
2883,
18,
15898,
18,
45,
9807,
8427,
16,
5563,
8427,
2957,
16,
16830,
22,
40,
17313,
13,
202,
9... |
return version; | return m_directive.getVersion(); | public String getVersion() { if( null == m_directive ) { return getStandardVersion(); } String version = m_directive.getVersion(); if( ResourceDirective.ANONYMOUS.equals( getClassifier() ) ) { return version; } if( null == version ) { if( null != m_parent ) { return m_parent.getVersion(); } else { return getStandardVersion(); } } else { return version; } } | 10984 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10984/b6dc58f960db96f1221f8a4b176662dcbb999e2a/DefaultResource.java/buggy/trunk/main/depot/library/src/main/net/dpml/library/impl/DefaultResource.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
8343,
1435,
565,
288,
3639,
309,
12,
446,
422,
312,
67,
22347,
262,
3639,
288,
5411,
327,
336,
8336,
1444,
5621,
3639,
289,
3639,
514,
1177,
273,
312,
67,
22347,
18,
588,
144... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8343,
1435,
565,
288,
3639,
309,
12,
446,
422,
312,
67,
22347,
262,
3639,
288,
5411,
327,
336,
8336,
1444,
5621,
3639,
289,
3639,
514,
1177,
273,
312,
67,
22347,
18,
588,
144... |
void setArguments(Object[] args) throws IllegalArgumentException { if(args.length != argumentsRequired) throw new IllegalArgumentException("Method expression '"+this.type+"' requires " + argumentsRequired + " arguments"); GrailsDomainClass dc = application.getGrailsDomainClass(targetClass.getName()); GrailsDomainClassProperty prop = dc.getPropertyByName(propertyName); if(prop == null) throw new IllegalArgumentException("Property "+propertyName+" doesn't exist for method expression '"+this.type+"'"); for (int i = 0; i < args.length; i++) { if(args[i] == null) throw new IllegalArgumentException("Argument " + args[0] + " cannot be null"); // convert GStrings to strings if(prop.getType() == String.class && (args[i] instanceof GString)) { args[i] = args[i].toString(); } else if(!prop.getType().isAssignableFrom( args[i].getClass() ) && !(ClassUtils.isMatchBetweenPrimativeAndWrapperTypes(prop.getType(), args[i].getClass()))) throw new IllegalArgumentException("Argument " + args[0] + " does not match property '"+propertyName+"' of type " + prop.getType()); } this.arguments = args; } | 28089 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/28089/eb420a51890989f6ca7f281725a19ebec728f77c/AbstractClausedStaticPersistentMethod.java/buggy/src/persistence/org/codehaus/groovy/grails/orm/hibernate/metaclass/AbstractClausedStaticPersistentMethod.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
6459,
31657,
12,
921,
8526,
833,
13,
1082,
202,
15069,
2754,
288,
1082,
202,
430,
12,
1968,
18,
2469,
480,
1775,
3705,
13,
9506,
202,
12849,
394,
2754,
2932,
1305,
2652,
2119,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6459,
31657,
12,
921,
8526,
833,
13,
1082,
202,
15069,
2754,
288,
1082,
202,
430,
12,
1968,
18,
2469,
480,
1775,
3705,
13,
9506,
202,
12849,
394,
2754,
2932,
1305,
2652,
2119,
15,
... | ||
fCurrentNode = fCurrentNode.getParentNode(); fCurrentCDATASection = null; | if (fCurrentCDATASection !=null) { fCurrentNode = fCurrentNode.getParentNode(); fCurrentCDATASection = null; } | public void endCDATA() throws XNIException { fInCDATASection = false; if (!fDeferNodeExpansion) { fCurrentNode = fCurrentNode.getParentNode(); fCurrentCDATASection = null; } else { fCurrentNodeIndex = fDeferredDocumentImpl.getParentNode(fCurrentNodeIndex, false); fCurrentCDATASectionIndex = -1; } } // endCDATA() | 4434 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4434/13a0812cdd131a00ae7e816132ba9417a742bb82/AbstractDOMParser.java/clean/src/org/apache/xerces/parsers/AbstractDOMParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
679,
18375,
1435,
1216,
1139,
50,
45,
503,
288,
3639,
284,
382,
10160,
789,
3033,
794,
273,
629,
31,
3639,
309,
16051,
74,
758,
586,
907,
2966,
12162,
13,
288,
5411,
284,
393... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
679,
18375,
1435,
1216,
1139,
50,
45,
503,
288,
3639,
284,
382,
10160,
789,
3033,
794,
273,
629,
31,
3639,
309,
16051,
74,
758,
586,
907,
2966,
12162,
13,
288,
5411,
284,
393... |
} | } | public synchronized void removeItemListener(ItemListener listener) { item_listeners = AWTEventMulticaster.remove(item_listeners, listener); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b5af1a0dd02ba16d1f4f4556ab34fa51c2db060d/Checkbox.java/clean/core/src/classpath/java/java/awt/Checkbox.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3852,
918,
29178,
2223,
12,
1180,
2223,
2991,
13,
288,
202,
202,
1726,
67,
16072,
273,
432,
8588,
1133,
5049,
335,
2440,
18,
4479,
12,
1726,
67,
16072,
16,
2991,
1769,
202,
97... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3852,
918,
29178,
2223,
12,
1180,
2223,
2991,
13,
288,
202,
202,
1726,
67,
16072,
273,
432,
8588,
1133,
5049,
335,
2440,
18,
4479,
12,
1726,
67,
16072,
16,
2991,
1769,
202,
97... |
String dir = "/nfs/infdbs/WissProj/CorrelationClustering/DependencyDerivator/experiments/synthetic/"; | String dir = "p:/nfs/infdbs/WissProj/CorrelationClustering/DependencyDerivator/experiments/synthetic/geraden/"; Matrix point = centroid(3); double[][] b = new double[3][1]; b[0][0] = 1; b[1][0] = 0; b[2][0] = 0; Matrix basis = new Matrix(b); PrintStream outStream = new PrintStream(new FileOutputStream(dir + "g11.txt")); generateCorrelation(1000, point, basis, true, outStream, true); outStream.flush(); outStream.close(); /* | public static void main(String[] args) { try { String dir = "/nfs/infdbs/WissProj/CorrelationClustering/DependencyDerivator/experiments/synthetic/"; for (int dim = 30; dim <= 50; dim += 5) { System.out.println(""); System.out.println(""); System.out.println("dim " + dim); int corrDim = RANDOM.nextInt(dim - 1) + 1; Matrix point = centroid(dim); Matrix basis = correlationBasis(dim, corrDim); System.out.println("basis " + basis); boolean jitter = true; PrintStream outStream = new PrintStream(new FileOutputStream(dir + "dim_" + dim + "_" + corrDim + "c.txt")); generateCorrelation(1000, point, basis, jitter, outStream, true); outStream.flush(); outStream.close(); } } catch (Exception e) { e.printStackTrace(); } } | 5508 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5508/546e2e13310440bf13851d46fb4a5ac577beb797/CorrelationGenerator.java/clean/src/de/lmu/ifi/dbs/data/synthetic/CorrelationGenerator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
918,
2774,
12,
780,
8526,
833,
13,
288,
565,
775,
288,
1377,
514,
1577,
273,
315,
84,
27824,
82,
2556,
19,
10625,
23475,
19,
59,
1054,
626,
78,
19,
31685,
3629,
310,
19,
77... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
918,
2774,
12,
780,
8526,
833,
13,
288,
565,
775,
288,
1377,
514,
1577,
273,
315,
84,
27824,
82,
2556,
19,
10625,
23475,
19,
59,
1054,
626,
78,
19,
31685,
3629,
310,
19,
77... |
txtDefinition.setToolTipText( query.getDefinition( ) ); | txtDefinition.setToolTipText( getTooltipForDataText( query.getDefinition( ) ) ); | public Composite createArea( Composite parent ) { cmpTop = new Composite( parent, SWT.NONE ); { GridLayout glContent = new GridLayout( ); glContent.numColumns = 4; glContent.marginHeight = 0; glContent.marginWidth = 0; glContent.horizontalSpacing = 0; cmpTop.setLayout( glContent ); GridData gd = new GridData( GridData.HORIZONTAL_ALIGN_FILL ); cmpTop.setLayoutData( gd ); } if ( description != null ) { new Label( cmpTop, SWT.NONE ).setText( description ); } txtDefinition = new Text( cmpTop, SWT.BORDER | SWT.SINGLE ); { GridData gdTXTDefinition = new GridData( GridData.FILL_HORIZONTAL ); gdTXTDefinition.widthHint = 50; txtDefinition.setLayoutData( gdTXTDefinition ); if ( query != null && query.getDefinition( ) != null ) { txtDefinition.setText( query.getDefinition( ) ); txtDefinition.setToolTipText( query.getDefinition( ) ); } txtDefinition.addModifyListener( this ); txtDefinition.addFocusListener( this ); // Listener for handling dropping of custom table header DropTarget target = new DropTarget( txtDefinition, DND.DROP_COPY ); Transfer[] types = new Transfer[]{ SimpleTextTransfer.getInstance( ) }; target.setTransfer( types ); // Add drop support target.addDropListener( new DataTextDropListener( txtDefinition ) ); // Add color manager DataDefinitionTextManager.getInstance( ) .addDataDefinitionText( txtDefinition ); } btnBuilder = new Button( cmpTop, SWT.PUSH ); GridData gdBTNBuilder = new GridData( ); gdBTNBuilder.heightHint = 20; gdBTNBuilder.widthHint = 20; btnBuilder.setLayoutData( gdBTNBuilder ); btnBuilder.setImage( UIHelper.getImage( "icons/obj16/expressionbuilder.gif" ) ); //$NON-NLS-1$ btnBuilder.addSelectionListener( this ); btnBuilder.setToolTipText( Messages.getString( "DataDefinitionComposite.Tooltip.InvokeExpressionBuilder" ) ); //$NON-NLS-1$ btnBuilder.getImage( ).setBackground( btnBuilder.getBackground( ) ); if ( serviceprovider == null ) { btnBuilder.setEnabled( false ); } btnFormatEditor = new Button( cmpTop, SWT.PUSH ); GridData gdBTNFormatEditor = new GridData( ); gdBTNFormatEditor.heightHint = 20; gdBTNFormatEditor.widthHint = 20; btnFormatEditor.setLayoutData( gdBTNFormatEditor ); btnFormatEditor.setImage( UIHelper.getImage( "icons/obj16/formatbuilder.gif" ) ); //$NON-NLS-1$ btnFormatEditor.addSelectionListener( this ); btnFormatEditor.setToolTipText( Messages.getString( "Shared.Tooltip.FormatSpecifier" ) ); //$NON-NLS-1$ btnFormatEditor.getImage( ) .setBackground( btnFormatEditor.getBackground( ) ); return cmpTop; } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/ac26365eb54b9a10e69498a213cb6f605f15760b/BaseDataDefinitionComponent.java/buggy/chart/org.eclipse.birt.chart.ui.extension/src/org/eclipse/birt/chart/ui/swt/wizard/data/BaseDataDefinitionComponent.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
14728,
752,
5484,
12,
14728,
982,
262,
202,
95,
202,
202,
9625,
3401,
273,
394,
14728,
12,
982,
16,
348,
8588,
18,
9826,
11272,
202,
202,
95,
1082,
202,
6313,
3744,
5118,
1350... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
14728,
752,
5484,
12,
14728,
982,
262,
202,
95,
202,
202,
9625,
3401,
273,
394,
14728,
12,
982,
16,
348,
8588,
18,
9826,
11272,
202,
202,
95,
1082,
202,
6313,
3744,
5118,
1350... |
else if (color == "Brown") | else if (color.equals("Brown")) | public String getShortColor() { if (color == "Black") { return new String("Bk"); } else if (color == "Blue") { return new String("Bl"); } else if (color == "Brown") { return new String("Br"); } else if (color == "Gold") { return new String("Gd"); } else if (color == "Green") { return new String("Gr"); } else if (color == "Red") { return new String("Rd"); } else { return new String("XX"); } } | 51862 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51862/5dd2d6d9beae6289719f63e8ae13bd15a70f8240/Player.java/clean/Colossus/Player.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
13157,
2957,
1435,
565,
288,
3639,
309,
261,
3266,
422,
315,
13155,
7923,
3639,
288,
5411,
327,
394,
514,
2932,
38,
79,
8863,
3639,
289,
3639,
469,
309,
261,
3266,
422,
315,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
13157,
2957,
1435,
565,
288,
3639,
309,
261,
3266,
422,
315,
13155,
7923,
3639,
288,
5411,
327,
394,
514,
2932,
38,
79,
8863,
3639,
289,
3639,
469,
309,
261,
3266,
422,
315,
... |
ArrayList new11() | ArrayList new11() /* reduce AAstrparenstringentry4StringEntry */ | ArrayList new11() { ArrayList nodeList = new ArrayList(); ArrayList nodeArrayList8 = (ArrayList) pop(); ArrayList nodeArrayList7 = (ArrayList) pop(); ArrayList nodeArrayList6 = (ArrayList) pop(); ArrayList nodeArrayList5 = (ArrayList) pop(); ArrayList nodeArrayList4 = (ArrayList) pop(); ArrayList nodeArrayList3 = (ArrayList) pop(); ArrayList nodeArrayList2 = (ArrayList) pop(); ArrayList nodeArrayList1 = (ArrayList) pop(); PStringEntry pstringentryNode1; { TIdentifier tidentifierNode2; TStringLiteral tstringliteralNode3; tidentifierNode2 = (TIdentifier)nodeArrayList3.get(0); tstringliteralNode3 = (TStringLiteral)nodeArrayList6.get(0); pstringentryNode1 = new AStrparenStringEntry(tidentifierNode2, tstringliteralNode3); } nodeList.add(pstringentryNode1); return nodeList; } | 50059 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50059/a343b73e05abe516d42c4d6672f63a8325be4a98/Parser.java/clean/sub/source/net/sourceforge/texlipse/bibparser/parser/Parser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
2407,
394,
2499,
1435,
1748,
5459,
27343,
701,
13012,
1080,
4099,
24,
780,
1622,
1195,
565,
288,
3639,
2407,
10198,
273,
394,
2407,
5621,
3639,
2407,
756,
19558,
28,
273,
261,
19558,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
2407,
394,
2499,
1435,
1748,
5459,
27343,
701,
13012,
1080,
4099,
24,
780,
1622,
1195,
565,
288,
3639,
2407,
10198,
273,
394,
2407,
5621,
3639,
2407,
756,
19558,
28,
273,
261,
19558,
13,
... |
sql += " AND p.proname LIKE '"+escapeQuotes(procedureNamePattern.toLowerCase())+"' "; | sql += " AND p.proname LIKE '"+escapeQuotes(procedureNamePattern)+"' "; | public java.sql.ResultSet getProcedures(String catalog, String schemaPattern, String procedureNamePattern) throws SQLException { String sql; if (connection.haveMinimumServerVersion("7.3")) { sql = "SELECT NULL AS PROCEDURE_CAT, n.nspname AS PROCEDURE_SCHEM, p.proname AS PROCEDURE_NAME, NULL, NULL, NULL, d.description AS REMARKS, "+java.sql.DatabaseMetaData.procedureReturnsResult+" AS PROCEDURE_TYPE "+ " FROM pg_catalog.pg_namespace n, pg_catalog.pg_proc p "+ " LEFT JOIN pg_catalog.pg_description d ON (p.oid=d.objoid) "+ " LEFT JOIN pg_catalog.pg_class c ON (d.classoid=c.oid AND c.relname='pg_proc') "+ " LEFT JOIN pg_catalog.pg_namespace pn ON (c.relnamespace=pn.oid AND pn.nspname='pg_catalog') "+ " WHERE p.pronamespace=n.oid "; if (schemaPattern != null && !"".equals(schemaPattern)) { sql += " AND n.nspname LIKE '"+escapeQuotes(schemaPattern.toLowerCase())+"' "; } if (procedureNamePattern != null) { sql += " AND p.proname LIKE '"+escapeQuotes(procedureNamePattern.toLowerCase())+"' "; } sql += " ORDER BY PROCEDURE_SCHEM, PROCEDURE_NAME "; } else if (connection.haveMinimumServerVersion("7.1")) { sql = "SELECT NULL AS PROCEDURE_CAT, NULL AS PROCEDURE_SCHEM, p.proname AS PROCEDURE_NAME, NULL, NULL, NULL, d.description AS REMARKS, "+java.sql.DatabaseMetaData.procedureReturnsResult+" AS PROCEDURE_TYPE "+ " FROM pg_proc p "+ " LEFT JOIN pg_description d ON (p.oid=d.objoid) "+ " LEFT JOIN pg_class c ON (d.classoid=c.oid AND c.relname='pg_proc') "; if (procedureNamePattern != null) { sql += " WHERE p.proname LIKE '"+escapeQuotes(procedureNamePattern.toLowerCase())+"' "; } sql += " ORDER BY PROCEDURE_NAME "; } else { sql = "SELECT NULL AS PROCEDURE_CAT, NULL AS PROCEDURE_SCHEM, p.proname AS PROCEDURE_NAME, NULL, NULL, NULL, NULL AS REMARKS, "+java.sql.DatabaseMetaData.procedureReturnsResult+" AS PROCEDURE_TYPE "+ " FROM pg_proc p "; if (procedureNamePattern != null) { sql += " WHERE p.proname LIKE '"+escapeQuotes(procedureNamePattern.toLowerCase())+"' "; } sql += " ORDER BY PROCEDURE_NAME "; } return connection.createStatement().executeQuery(sql); } | 46409 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46409/fdf6b4ff936167388fc18276cbcf88c54dd0d3b7/AbstractJdbc1DatabaseMetaData.java/buggy/src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1DatabaseMetaData.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2252,
18,
4669,
18,
13198,
3570,
23382,
12,
780,
6222,
16,
514,
1963,
3234,
16,
514,
12131,
461,
3234,
13,
1216,
6483,
202,
95,
202,
202,
780,
1847,
31,
202,
202,
430,
261,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2252,
18,
4669,
18,
13198,
3570,
23382,
12,
780,
6222,
16,
514,
1963,
3234,
16,
514,
12131,
461,
3234,
13,
1216,
6483,
202,
95,
202,
202,
780,
1847,
31,
202,
202,
430,
261,
... |
FrontEndTest fet = new FrontEndTest(argv[0], argv[1], argv[2]); | String testName = argv[0]; String propertiesFile = argv[1]; String audioFileName = argv[2]; FrontEndTest fet = new FrontEndTest (testName, propertiesFile, audioFileName); | public static void main(String[] argv) { if (argv.length < 3) { System.out.println ("Usage: java testClass <testName> " + "<propertiesFile> <audiofilename>"); } try { FrontEndTest fet = new FrontEndTest(argv[0], argv[1], argv[2]); // create the processors Preemphasizer preemphasizer = new Preemphasizer(argv[0]); Windower hammingWindow = new Windower(argv[0]); SpectrumAnalyzer spectrumAnalyzer = new SpectrumAnalyzer(argv[0]); MelFilterbank melFilterbank = new MelFilterbank(argv[0]); MelCepstrumProducer melCepstrum = new MelCepstrumProducer(argv[0]); CepstralMeanNormalizer cmn = new CepstralMeanNormalizer(argv[0]); FeatureExtractor featureExtractor = new FeatureExtractor(argv[0]); // add the processors FrontEnd fe = fet.getFrontEnd(); fe.addProcessor(preemphasizer); fe.addProcessor(hammingWindow); fe.addProcessor(spectrumAnalyzer); fe.addProcessor(melFilterbank); fe.addProcessor(melCepstrum); fe.addProcessor(cmn); fe.addProcessor(featureExtractor); fet.run(); } catch (Exception e) { e.printStackTrace(); } } | 8350 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8350/16762ddb8d2623f810cdedcdb523a37c3453e250/FeatureExtractorTest.java/clean/tests/frontend/FeatureExtractorTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
2774,
12,
780,
8526,
5261,
13,
288,
202,
430,
261,
19485,
18,
2469,
411,
890,
13,
288,
202,
565,
2332,
18,
659,
18,
8222,
7734,
7566,
5357,
30,
2252,
1842,
797,
411,
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,
760,
918,
2774,
12,
780,
8526,
5261,
13,
288,
202,
430,
261,
19485,
18,
2469,
411,
890,
13,
288,
202,
565,
2332,
18,
659,
18,
8222,
7734,
7566,
5357,
30,
2252,
1842,
797,
411,
3... |
new ImgPacksPanelAutomationHelper().makeXMLData(idata, panelRoot); | new ImgPacksPanelAutomationHelper().makeXMLData(idata, panelRoot); | public void makeXMLData(XMLElement panelRoot) { new ImgPacksPanelAutomationHelper().makeXMLData(idata, panelRoot); } | 54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/ImgPacksPanel.java/buggy/src/lib/com/izforge/izpack/panels/ImgPacksPanel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1221,
4201,
751,
12,
15223,
6594,
2375,
13,
225,
288,
202,
202,
2704,
2221,
75,
4420,
87,
5537,
28589,
2276,
7675,
6540,
4201,
751,
12,
350,
396,
16,
6594,
2375,
1769,
225,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1221,
4201,
751,
12,
15223,
6594,
2375,
13,
225,
288,
202,
202,
2704,
2221,
75,
4420,
87,
5537,
28589,
2276,
7675,
6540,
4201,
751,
12,
350,
396,
16,
6594,
2375,
1769,
225,
2... |
if (peer != null) { peer = Toolkit.getDefaultToolkit ().createMenu (this); } super.addNotify (); | public void addNotify() { // FIXME } | 25337 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/25337/708062224a502c41561e122dcde5accf23f77ad9/Menu.java/clean/libjava/java/awt/Menu.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
309,
261,
12210,
480,
446,
13,
288,
282,
4261,
273,
13288,
8691,
18,
588,
1868,
6364,
8691,
1832,
18,
2640,
4599,
261,
2211,
1769,
289,
2240,
18,
1289,
9168,
261,
1769,
309,
261,
12210,
480,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
309,
261,
12210,
480,
446,
13,
288,
282,
4261,
273,
13288,
8691,
18,
588,
1868,
6364,
8691,
1832,
18,
2640,
4599,
261,
2211,
1769,
289,
2240,
18,
1289,
9168,
261,
1769,
309,
261,
12210,
480,
... | |
while(true) { | while(running) { | private void startProcessingThreads() { m_upProcessingThread=new Thread(new Runnable() { public void run() { Event event=null; while(true) { try { event=(Event) m_upQueue.take(); m_upLatch.passThrough(); handleUp(event); } catch(InterruptedException ex) { //this is ok. } } } }); m_upProcessingThread.setName("MessageDispatcher up processing thread"); m_upProcessingThread.setDaemon(true); m_upProcessingThread.start(); } | 48949 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48949/1bd159bb5d7d3b87054612afddf93098a12e6a3b/MessageDispatcher.java/buggy/src/org/jgroups/blocks/MessageDispatcher.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
3238,
918,
787,
7798,
13233,
1435,
288,
5411,
312,
67,
416,
7798,
3830,
33,
2704,
4884,
12,
2704,
10254,
1435,
288,
7734,
1071,
918,
1086,
1435,
288,
10792,
2587,
871,
33,
2011,
31,
10792... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
3238,
918,
787,
7798,
13233,
1435,
288,
5411,
312,
67,
416,
7798,
3830,
33,
2704,
4884,
12,
2704,
10254,
1435,
288,
7734,
1071,
918,
1086,
1435,
288,
10792,
2587,
871,
33,
2011,
31,
10792... |
void chtype( CmsObject cms, CmsSecurityManager securityManager, CmsResource resource, int type ) throws CmsException; | void chtype(CmsObject cms, CmsSecurityManager securityManager, CmsResource resource, int type) throws CmsException; | void chtype( CmsObject cms, CmsSecurityManager securityManager, CmsResource resource, int type ) throws CmsException; | 51784 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51784/c7083871cfaaede3aa187a175b34be606d8431f2/I_CmsResourceType.java/buggy/src/org/opencms/file/types/I_CmsResourceType.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
462,
723,
12,
3639,
14371,
6166,
16,
540,
2149,
4368,
1318,
4373,
1318,
16,
540,
7630,
1058,
16,
540,
509,
618,
565,
262,
1216,
11228,
31,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
462,
723,
12,
3639,
14371,
6166,
16,
540,
2149,
4368,
1318,
4373,
1318,
16,
540,
7630,
1058,
16,
540,
509,
618,
565,
262,
1216,
11228,
31,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
return new OMTextImpl(handler, optimized); | return new OMTextImpl(handler, optimized, OMAbstractFactory.getOMFactory()); | public static OMText getOriginalText(boolean optimized) { File file = new File("modules/integration/itest-resources/mtom/mtom.bin"); DataHandler handler = new DataHandler(new FileDataSource(file));// return new OMTextImpl(handler, optimized); } | 49300 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49300/46a014bae8b3bdea6efef1d984a295027545ce0c/BodyElements.java/clean/modules/integration/src/test/interop/util/BodyElements.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
28839,
1528,
18354,
1528,
12,
6494,
15411,
13,
288,
3639,
1387,
585,
273,
394,
1387,
2932,
6400,
19,
27667,
19,
305,
395,
17,
4683,
19,
1010,
362,
19,
1010,
362,
18,
4757,
88... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
28839,
1528,
18354,
1528,
12,
6494,
15411,
13,
288,
3639,
1387,
585,
273,
394,
1387,
2932,
6400,
19,
27667,
19,
305,
395,
17,
4683,
19,
1010,
362,
19,
1010,
362,
18,
4757,
88... |
public void setDebug(PrintStream debug) { _debug = debug; | public void setDebug(PrintStream debugRequest, PrintStream debugResponse) { _debugRequest = debugRequest; _debugResponse = debugResponse; | public void setDebug(PrintStream debug) { _debug = debug; } | 31053 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/31053/0cfb3707952159a028fdb79787b9e77ff58dcbca/URLFetcher.java/buggy/src/org/owasp/webscarab/httpclient/URLFetcher.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
444,
2829,
12,
5108,
1228,
1198,
13,
288,
3639,
389,
4148,
273,
1198,
31,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
444,
2829,
12,
5108,
1228,
1198,
13,
288,
3639,
389,
4148,
273,
1198,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
{ this.controls = (PoissonControls)controls; setContent(h,true); revalidate(); } | { this.controls = (PoissonControls)controls; setContent(h,true); revalidate(); } | public void applyControls(ViewerControls controls) { this.controls = (PoissonControls)controls; setContent(h,true); revalidate(); } | 51753 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51753/a8180f07023cad376642253d7b4038e118572cff/PoissonClassifier.java/clean/src/edu/cmu/minorthird/classify/algorithms/linear/PoissonClassifier.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
2230,
16795,
12,
18415,
16795,
11022,
13,
3639,
288,
5411,
333,
18,
24350,
273,
261,
52,
19606,
816,
16795,
13,
24350,
31,
5411,
10651,
12,
76,
16,
3767,
1769,
5411,
283,
5662,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
2230,
16795,
12,
18415,
16795,
11022,
13,
3639,
288,
5411,
333,
18,
24350,
273,
261,
52,
19606,
816,
16795,
13,
24350,
31,
5411,
10651,
12,
76,
16,
3767,
1769,
5411,
283,
5662,... |
in.mark(10); | spos = in.getFilePointer(); | protected void initFile(String id) throws FormatException, IOException { super.initFile(id); in = new DataInputStream( new BufferedInputStream(new FileInputStream(id), 4096)); fileLength = in.available(); offsets = new Vector(); byte[] list = new byte[4]; String listString; type = readStringBytes(); size = DataTools.read4SignedBytes(in, little); fcc = readStringBytes(); if (type.equals("RIFF")) { bigChunkSize = size; if (!fcc.equals("AVI ")) { whine("Sorry, AVI RIFF format not found."); } } else { whine("Not an AVI file"); } in.mark(200); while (in.read(list) == 4) { in.reset(); listString = new String(list); if (listString.equals("JUNK")) { type = readStringBytes(); size = DataTools.read4SignedBytes(in, little); if (type.equals("JUNK")) { in.skipBytes(size); } } else if (listString.equals("LIST")) { in.mark(100); type = readStringBytes(); size = DataTools.read4SignedBytes(in, little); fcc = readStringBytes(); in.reset(); if (fcc.equals("hdrl")) { type = readStringBytes(); size = DataTools.read4SignedBytes(in, little); fcc = readStringBytes(); if (type.equals("LIST")) { if (fcc.equals("hdrl")) { type = readStringBytes(); size = DataTools.read4SignedBytes(in, little); if (type.equals("avih")) { in.mark(200); dwMicroSecPerFrame = DataTools.read4SignedBytes(in, little); dwMaxBytesPerSec = DataTools.read4SignedBytes(in, little); dwReserved1 = DataTools.read4SignedBytes(in, little); dwFlags = DataTools.read4SignedBytes(in, little); dwTotalFrames = DataTools.read4SignedBytes(in, little); dwInitialFrames = DataTools.read4SignedBytes(in, little); dwStreams = DataTools.read4SignedBytes(in, little); dwSuggestedBufferSize = DataTools.read4SignedBytes(in, little); dwWidth = DataTools.read4SignedBytes(in, little); dwHeight = DataTools.read4SignedBytes(in, little); dwScale = DataTools.read4SignedBytes(in, little); dwRate = DataTools.read4SignedBytes(in, little); dwStart = DataTools.read4SignedBytes(in, little); dwLength = DataTools.read4SignedBytes(in, little); metadata.put("Microseconds per frame", new Integer(dwMicroSecPerFrame)); metadata.put("Max. bytes per second", new Integer(dwMaxBytesPerSec)); metadata.put("Total frames", new Integer(dwTotalFrames)); metadata.put("Initial frames", new Integer(dwInitialFrames)); metadata.put("Frame width", new Integer(dwWidth)); metadata.put("Frame height", new Integer(dwHeight)); metadata.put("Scale factor", new Integer(dwScale)); metadata.put("Frame rate", new Integer(dwRate)); metadata.put("Start time", new Integer(dwStart)); metadata.put("Length", new Integer(dwLength)); in.reset(); in.skipBytes(size); } } } } else if (fcc.equals("strl")) { long startPos = fileLength - in.available(); long streamSize = size; type = readStringBytes(); size = DataTools.read4SignedBytes(in, little); fcc = readStringBytes(); if (type.equals("LIST")) { if (fcc.equals("strl")) { type = readStringBytes(); size = DataTools.read4SignedBytes(in, little); if (type.equals("strh")) { in.mark(200); String fccStreamTypeOld = fccStreamType; fccStreamType = readStringBytes(); if (!fccStreamType.equals("vids")) { fccStreamType = fccStreamTypeOld; } fccStreamHandler = readStringBytes(); dwStreamFlags = DataTools.read4SignedBytes(in, little); dwStreamReserved1 = DataTools.read4SignedBytes(in, little); dwStreamInitialFrames = DataTools.read4SignedBytes(in, little); dwStreamScale = DataTools.read4SignedBytes(in, little); dwStreamRate = DataTools.read4SignedBytes(in, little); dwStreamStart = DataTools.read4SignedBytes(in, little); dwStreamLength = DataTools.read4SignedBytes(in, little); dwStreamSuggestedBufferSize = DataTools.read4SignedBytes(in, little); dwStreamQuality = DataTools.read4SignedBytes(in, little); dwStreamSampleSize = DataTools.read4SignedBytes(in, little); metadata.put("Stream quality", new Integer(dwStreamQuality)); metadata.put("Stream sample size", new Integer(dwStreamSampleSize)); in.reset(); in.skipBytes(size); } type = readStringBytes(); size = DataTools.read4SignedBytes(in, little); if (type.equals("strf")) { in.mark(300); bmpSize = DataTools.read4SignedBytes(in, little); bmpWidth = DataTools.read4SignedBytes(in, little); bmpHeight = DataTools.read4SignedBytes(in, little); bmpPlanes = DataTools.read2SignedBytes(in, little); bmpBitsPerPixel = DataTools.read2SignedBytes(in, little); bmpCompression = DataTools.read4SignedBytes(in, little); bmpSizeOfBitmap = DataTools.read4SignedBytes(in, little); bmpHorzResolution = DataTools.read4SignedBytes(in, little); bmpVertResolution = DataTools.read4SignedBytes(in, little); bmpColorsUsed = DataTools.read4SignedBytes(in, little); bmpColorsImportant = DataTools.read4SignedBytes(in, little); bmpTopDown = (bmpHeight < 0); bmpNoOfPixels = bmpWidth * bmpHeight; metadata.put("Bitmap compression value", new Integer(bmpCompression)); metadata.put("Horizontal resolution", new Integer(bmpHorzResolution)); metadata.put("Vertical resolution", new Integer(bmpVertResolution)); metadata.put("Number of colors used", new Integer(bmpColorsUsed)); metadata.put("Bits per pixel", new Integer(bmpBitsPerPixel)); // scan line is padded with zeros to be a multiple of 4 bytes int npad = bmpWidth % 4; if (npad > 0) npad = 4 - npad; bmpScanLineSize = (bmpWidth + npad) * (bmpBitsPerPixel / 8); if (bmpSizeOfBitmap != 0) { bmpActualSize = bmpSizeOfBitmap; } else { // a value of 0 doesn't mean 0 -- it means we have // to calculate it bmpActualSize = bmpScanLineSize * bmpHeight; } if (bmpColorsUsed != 0) { bmpActualColorsUsed = bmpColorsUsed; } else { // a value of 0 means we determine this based on the // bits per pixel if (bmpBitsPerPixel < 16) { bmpActualColorsUsed = 1 << bmpBitsPerPixel; } else { // no palette bmpActualColorsUsed = 0; } } if (bmpCompression != 0) { whine("Sorry, compressed AVI files not supported."); } if (!(bmpBitsPerPixel == 8 || bmpBitsPerPixel == 24 || bmpBitsPerPixel == 32)) { whine("Sorry, " + bmpBitsPerPixel + " bits per pixel not " + "supported"); } if (bmpActualColorsUsed != 0) { // read the palette pr = new byte[bmpColorsUsed]; pg = new byte[bmpColorsUsed]; pb = new byte[bmpColorsUsed]; for (int i=0; i<bmpColorsUsed; i++) { pb[i] = (byte) in.read(); pg[i] = (byte) in.read(); pr[i] = (byte) in.read(); in.read(); } } in.reset(); in.skipBytes(size); } } in.mark(100); type = readStringBytes(); size = DataTools.read4SignedBytes(in, little); if (type.equals("strd")) { in.skipBytes(size); } else { in.reset(); } in.mark(100); type = readStringBytes(); size = DataTools.read4SignedBytes(in, little); if (type.equals("strn")) { in.skipBytes(size); } else { in.reset(); } } in = new DataInputStream( new BufferedInputStream(new FileInputStream(id), 4096)); in.skipBytes((int) (startPos + 8 + streamSize)); } else if (fcc.equals("movi")) { type = readStringBytes(); size = DataTools.read4SignedBytes(in, little); fcc = readStringBytes(); if (type.equals("LIST")) { if (fcc.equals("movi")) { in.mark(100); type = readStringBytes(); size = DataTools.read4SignedBytes(in, little); fcc = readStringBytes(); if (!(type.equals("LIST") && fcc.equals("rec "))) { in.reset(); } in.mark(10); type = readStringBytes(); size = DataTools.read4SignedBytes(in, little); while (type.substring(2).equals("db") || type.substring(2).equals("dc") || type.substring(2).equals("wb")) { if (type.substring(2).equals("db") || type.substring(2).equals("dc")) { offsets.add(new Long(fileLength - in.available())); in.skipBytes(bmpHeight * bmpScanLineSize); } in.mark(10); type = readStringBytes(); size = DataTools.read4SignedBytes(in, little); if (type.equals("JUNK")) { in.skipBytes(size); in.mark(10); type = readStringBytes(); size = DataTools.read4SignedBytes(in, little); } } in.reset(); } } } else { // skipping unknown block in.skipBytes(8 + size); } } else { // skipping unknown block type = readStringBytes(); size = DataTools.read4SignedBytes(in, little); in.skipBytes(size); } in.mark(200); } numImages = offsets.size(); initOMEMetadata(); in = new DataInputStream( new BufferedInputStream(new FileInputStream(id), 4096)); } | 11426 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11426/a4d6fe10f79636baabec0b085328df83170bca33/AVIReader.java/clean/loci/formats/AVIReader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
918,
1208,
812,
12,
780,
612,
13,
1216,
4077,
503,
16,
1860,
288,
565,
2240,
18,
2738,
812,
12,
350,
1769,
565,
316,
273,
394,
29382,
12,
1377,
394,
24742,
12,
2704,
11907,
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,
2240,
18,
2738,
812,
12,
350,
1769,
565,
316,
273,
394,
29382,
12,
1377,
394,
24742,
12,
2704,
11907,
12,
... |
Object attribute = finalConstructor.newInstance(args); if (p != null) { p.setProjectReference(attribute); } m.invoke(parent, new Object[] {attribute}); } catch (InstantiationException ie) { throw new BuildException(ie); | public void set(Project p, Object parent, String value) throws InvocationTargetException, IllegalAccessException, BuildException { try { Object[] args; if (finalIncludeProject) { args = new Object[] {p, value}; } else { args = new Object[] {value}; } Object attribute = finalConstructor.newInstance(args); if (p != null) { p.setProjectReference(attribute); } m.invoke(parent, new Object[] {attribute}); } catch (InstantiationException ie) { throw new BuildException(ie); } } | 506 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/506/476678d4a660bd6077ae4a8389cc29f42fbde0c9/IntrospectionHelper.java/clean/src/main/org/apache/tools/ant/IntrospectionHelper.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1171,
1071,
918,
444,
12,
4109,
293,
16,
1033,
982,
16,
514,
460,
13,
13491,
1216,
15342,
16,
11900,
16,
18463,
288,
10792,
775,
288,
13491,
1033,
8526,
833,
31,
13491,
309,
261,
6385,
8752,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1171,
1071,
918,
444,
12,
4109,
293,
16,
1033,
982,
16,
514,
460,
13,
13491,
1216,
15342,
16,
11900,
16,
18463,
288,
10792,
775,
288,
13491,
1033,
8526,
833,
31,
13491,
309,
261,
6385,
8752,
... | |
int columnCount = resultSet.getMetaData().getColumnCount(); | int columnCount = getResultSet().getMetaData().getColumnCount(); | protected int normalizeIndex(int index) throws SQLException { if (index < 0) { int columnCount = resultSet.getMetaData().getColumnCount(); do { index += columnCount; } while (index < 0); } return index + 1; } | 6462 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6462/c7f166c8667836098e1b5d24208dcf93c2f4669c/GroovyResultSet.java/buggy/src/main/groovy/sql/GroovyResultSet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
509,
3883,
1016,
12,
474,
770,
13,
1216,
6483,
288,
3639,
309,
261,
1615,
411,
374,
13,
288,
5411,
509,
22429,
273,
8601,
694,
7675,
588,
6998,
7675,
588,
1494,
1380,
5621,
5411,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
509,
3883,
1016,
12,
474,
770,
13,
1216,
6483,
288,
3639,
309,
261,
1615,
411,
374,
13,
288,
5411,
509,
22429,
273,
8601,
694,
7675,
588,
6998,
7675,
588,
1494,
1380,
5621,
5411,
... |
if (jj_3R_158()) return true; | if (jj_scan_token(ABSTRACT)) return true; | final private boolean jj_3R_155() { if (jj_3R_158()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } | 45569 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45569/83d81b076b32acdf3f82077c7f4c2a2e160aa32f/JavaParser.java/buggy/pmd/src/net/sourceforge/pmd/ast/JavaParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
3238,
1250,
10684,
67,
23,
54,
67,
23643,
1435,
288,
565,
309,
261,
78,
78,
67,
9871,
67,
2316,
12,
26756,
3719,
327,
638,
31,
565,
309,
261,
78,
78,
67,
11821,
422,
374,
597,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
3238,
1250,
10684,
67,
23,
54,
67,
23643,
1435,
288,
565,
309,
261,
78,
78,
67,
9871,
67,
2316,
12,
26756,
3719,
327,
638,
31,
565,
309,
261,
78,
78,
67,
11821,
422,
374,
597,
... |
.getRoot( ).findMember( containerName ); | .getRoot( ) .findMember( containerName ); | private void doFinish( IPath containerName, String fileName, InputStream stream, IProgressMonitor monitor ) throws CoreException { // create a sample file monitor.beginTask( CREATING + fileName, 2 ); IResource resource = (IContainer) ResourcesPlugin.getWorkspace( ) .getRoot( ).findMember( containerName ); IContainer container = null; if ( resource == null || !resource.exists( ) || !( resource instanceof IContainer ) ) { // create folder if not exist IFolder folder = createFolderHandle( containerName ); UIUtil.createFolder( folder, monitor ); container = folder; } else { container = (IContainer) resource; } final IFile file = container.getFile( new Path( fileName ) ); try { if ( file.exists( ) ) { file.setContents( stream, true, true, monitor ); } else { file.create( stream, true, monitor ); } stream.close( ); } catch ( Exception e ) { } monitor.worked( 1 ); monitor.setTaskName( OPENING_FILE_FOR_EDITING ); getShell( ).getDisplay( ).asyncExec( new Runnable( ) { public void run( ) { IWorkbench workbench = PlatformUI.getWorkbench( ); IWorkbenchWindow window = workbench.getActiveWorkbenchWindow( ); IWorkbenchPage page = window.getActivePage( ); try { IEditorPart editorPart = IDE.openEditor( page, file, true ); ModuleHandle model = SessionHandleAdapter.getInstance( ).getReportDesignHandle( ); if(ReportPlugin.getDefault( ).getEnableCommentPreference( )){ model.setStringProperty( ModuleHandle.COMMENTS_PROP, ReportPlugin.getDefault( ).getCommentPreference( ) ); } setReportSettings( model ); editorPart.doSave( null ); BasicNewProjectResourceWizard .updatePerspective( getConfigElement( ) ); } catch ( Exception e ) { ExceptionHandler.handle( e ); } } } ); monitor.worked( 1 ); } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/c2f71090207d1bcbb531f96e601e6521105dee00/NewTemplateWizard.java/clean/UI/org.eclipse.birt.report.designer.ui.ide/src/org/eclipse/birt/report/designer/ui/ide/wizards/NewTemplateWizard.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
741,
11641,
12,
467,
743,
20408,
16,
514,
3968,
16,
1082,
202,
4348,
1407,
16,
467,
5491,
7187,
6438,
262,
1216,
30015,
202,
95,
202,
202,
759,
752,
279,
3296,
585,
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,
741,
11641,
12,
467,
743,
20408,
16,
514,
3968,
16,
1082,
202,
4348,
1407,
16,
467,
5491,
7187,
6438,
262,
1216,
30015,
202,
95,
202,
202,
759,
752,
279,
3296,
585,
202,... |
throw new RuntimeException("Not implemented yet."); | return _update.saveAndReturnObject(arg0); | public IObject createDataObject(IObject arg0, Map arg1) { // TODO Auto-generated method stub //return null; throw new RuntimeException("Not implemented yet."); } | 13273 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13273/0aa4af63b981e511b5fb82621bc6293945ca0d64/PojosImpl.java/buggy/components/server/src/ome/logic/PojosImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
467,
921,
752,
21881,
12,
45,
921,
1501,
20,
16,
1635,
1501,
21,
13,
565,
288,
3639,
368,
2660,
8064,
17,
11168,
707,
7168,
3639,
368,
2463,
446,
31,
1377,
327,
389,
2725,
18,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
467,
921,
752,
21881,
12,
45,
921,
1501,
20,
16,
1635,
1501,
21,
13,
565,
288,
3639,
368,
2660,
8064,
17,
11168,
707,
7168,
3639,
368,
2463,
446,
31,
1377,
327,
389,
2725,
18,
5... |
IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(); openEditor(input, TaskListPreferenceConstants.CATEGORY_EDITOR_ID, page); } | IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(); openEditor(editorInput, TaskListPreferenceConstants.TASK_EDITOR_ID, page); } | public void run() { IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(); openEditor(input, TaskListPreferenceConstants.CATEGORY_EDITOR_ID, page); } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/0abef28ff5f7774111407f13bb6ecadd0c5e772b/TaskUiUtil.java/buggy/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasklist/ui/TaskUiUtil.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
482,
918,
1086,
1435,
288,
9506,
202,
45,
2421,
22144,
1964,
1363,
273,
11810,
5370,
18,
588,
2421,
22144,
7675,
588,
3896,
2421,
22144,
3829,
7675,
588,
3896,
1964,
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,
1875,
202,
482,
918,
1086,
1435,
288,
9506,
202,
45,
2421,
22144,
1964,
1363,
273,
11810,
5370,
18,
588,
2421,
22144,
7675,
588,
3896,
2421,
22144,
3829,
7675,
588,
3896,
1964,
5621,
9506,
202,
... |
} else { Utilities.showMessage("could not delete jar"); | public void check() { _currentDirectory = System.getProperty("user.dir"); if(!_currentDirectory.endsWith(File.separator)) _currentDirectory += File.separator; boolean delete = _settings.getDeleteOldJAR(); if(_settings.getDeleteOldJAR()) { String oldJARName = _settings.getOldJARName(); File oldCharFile = new File(_currentDirectory, oldJARName); if(oldCharFile.delete()) { _settings.setDeleteOldJAR(false); _settings.setOldJARName(""); } else { Utilities.showMessage("could not delete jar"); } } boolean checkAgain; checkAgain = _settings.getCheckAgain(); if (!checkAgain) return; ByteReader br; String latest = ""; try { // open the http connection, and grab // the file with the version number in it. URL url = new URL("http", "www.limewire.com", "/version.txt"); URLConnection conn = url.openConnection(); conn.connect(); //The try-catch below works around JDK bug 4091706. InputStream input = conn.getInputStream(); br = new ByteReader(input); } catch(Exception e) { return; } // read in the version number while (true) { String str = " "; try { str = br.readLine(); // this should get us the version number if (str != null) { latest = str; } } catch (Exception e) { br.close(); return; } //EOF? if (str==null || str.equals("")) break; } String current = _settings.getCurrentVersion(); int version = compare(current, latest); if (version == -1) { // the current version is not the newest String lastChecked; lastChecked = _settings.getLastVersionChecked(); checkAgain = _settings.getCheckAgain(); // if( (checkAgain == false) && // (compare(lastChecked, latest) == 0)) { if( (compare(lastChecked, latest) == 0) ) { // dont ask } else { // otherwise ask... _newVersion = latest; askUpdate(current, latest); } } br.close(); } | 5134 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5134/8ff431aa872161cc635278537b0e6e9198949bf2/VersionUpdate.java/buggy/components/gnutella-core/src/main/java/com/limegroup/gnutella/VersionUpdate.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
866,
1435,
225,
202,
95,
202,
202,
67,
2972,
2853,
273,
2332,
18,
588,
1396,
2932,
1355,
18,
1214,
8863,
202,
202,
430,
12,
5,
67,
2972,
2853,
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,
225,
202,
482,
918,
866,
1435,
225,
202,
95,
202,
202,
67,
2972,
2853,
273,
2332,
18,
588,
1396,
2932,
1355,
18,
1214,
8863,
202,
202,
430,
12,
5,
67,
2972,
2853,
18,
5839,
1190,
12,
812,
... | |
return new SqlTable(); | return null; | public Object newInstance( Object parent ) { return new SqlTable(); } | 3614 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3614/f21979d3e63f8be8d1ac204f745c2944078dbf5f/ClassMappingDescriptor.java/buggy/trunk/castor-2002/castor/src/main/org/exolab/castor/mapping/xml/ClassMappingDescriptor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
1033,
5984,
12,
1033,
982,
262,
288,
7734,
327,
446,
31,
5411,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
1033,
5984,
12,
1033,
982,
262,
288,
7734,
327,
446,
31,
5411,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
skipWhitespace (); dataBufferAppend (readNmtoken (isNames)); skipWhitespace (); while (!tryRead (')')) { require ('|'); dataBufferAppend ('|'); skipWhitespace (); dataBufferAppend (readNmtoken (isNames)); skipWhitespace (); } dataBufferAppend (')'); } | skipWhitespace(); dataBufferAppend(readNmtoken(isNames)); skipWhitespace(); while (!tryRead(')')) { require('|'); dataBufferAppend('|'); skipWhitespace(); dataBufferAppend(readNmtoken (isNames)); skipWhitespace(); } dataBufferAppend(')'); } | private void parseEnumeration (boolean isNames) throws Exception { dataBufferAppend ('('); // Read the first token. skipWhitespace (); dataBufferAppend (readNmtoken (isNames)); // Read the remaining tokens. skipWhitespace (); while (!tryRead (')')) { require ('|'); dataBufferAppend ('|'); skipWhitespace (); dataBufferAppend (readNmtoken (isNames)); skipWhitespace (); } dataBufferAppend (')'); } | 13625 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13625/7fb7568e63c3fe14af521de4699cb37898923ca7/XmlParser.java/clean/libjava/gnu/xml/aelfred2/XmlParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1109,
21847,
261,
6494,
353,
1557,
13,
565,
1216,
1185,
565,
288,
202,
892,
1892,
5736,
7707,
2668,
1769,
202,
759,
2720,
326,
1122,
1147,
18,
202,
7457,
9431,
261,
1769,
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,
377,
3238,
918,
1109,
21847,
261,
6494,
353,
1557,
13,
565,
1216,
1185,
565,
288,
202,
892,
1892,
5736,
7707,
2668,
1769,
202,
759,
2720,
326,
1122,
1147,
18,
202,
7457,
9431,
261,
1769,
202,
... |
PrintStream err = System.err; PrintStream out = System.out; PrintStream logstr = new PrintStream(new LogOutputStream(getRmic(), Project.MSG_WARN)); | public boolean execute() throws BuildException { getRmic().log("Using WebLogic rmic", Project.MSG_VERBOSE); Commandline cmd = setupRmicCommand(new String[] {"-noexit"}); PrintStream err = System.err; PrintStream out = System.out; PrintStream logstr = new PrintStream(new LogOutputStream(getRmic(), Project.MSG_WARN)); try { System.setOut(logstr); System.setErr(logstr); // Create an instance of the rmic Class c = Class.forName("weblogic.rmic"); Method doRmic = c.getMethod("main", new Class [] { String[].class }); doRmic.invoke(null, new Object[] { }); return true; } catch (ClassNotFoundException ex) { throw new BuildException("Cannot use WebLogic rmic, as it is not available"+ " A common solution is to set the environment variable"+ " CLASSPATH.", getRmic().getLocation() ); } catch (Exception ex) { if (ex instanceof BuildException) { throw (BuildException) ex; } else { throw new BuildException("Error starting WebLogic rmic: ", ex, getRmic().getLocation()); } } finally { System.setErr(err); System.setOut(out); logstr.close(); } } | 506 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/506/059ad359164e376960bc91ee4bce1e47abb3ef45/WLRmic.java/buggy/src/main/org/apache/tools/ant/taskdefs/rmic/WLRmic.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
1836,
1435,
1216,
18463,
288,
3639,
4170,
27593,
7675,
1330,
2932,
7736,
2999,
20556,
6692,
335,
3113,
5420,
18,
11210,
67,
21900,
1769,
3639,
3498,
1369,
1797,
273,
3875,
54,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
1836,
1435,
1216,
18463,
288,
3639,
4170,
27593,
7675,
1330,
2932,
7736,
2999,
20556,
6692,
335,
3113,
5420,
18,
11210,
67,
21900,
1769,
3639,
3498,
1369,
1797,
273,
3875,
54,
2... | |
Graphics g, int dx, int dy) { final Shape oldClip = g.getClip(); try { final Component[] comps = awtContainer.getComponents(); final int cnt = comps.length; for (int i = 0; i < cnt; i++) { final Component child = comps[i]; if (child.isVisible() && child.isLightweight()) { final int x = child.getX() - dx; final int y = child.getY() - dy; final int width = child.getWidth(); final int height = child.getHeight(); g.setClip(x, y, width, height); g.translate(x, y); try { child.paint(g); } finally { g.translate(-x, -y); } } } } finally { g.setClip(oldClip); } } | Graphics g, int dx, int dy) { final Shape oldClip = g.getClip(); try { final Component[] comps = awtContainer.getComponents(); final int cnt = comps.length; for (int i = 0; i < cnt; i++) { final Component child = comps[i]; if (child.isVisible() && child.isLightweight()) { final int x = child.getX() - dx; final int y = child.getY() - dy; final int width = child.getWidth(); final int height = child.getHeight(); g.setClip(x, y, width, height); g.translate(x, y); try { child.paint(g); } finally { g.translate(-x, -y); } } } } finally { g.setClip(oldClip); } } | public static void paintLightWeightChildren(Container awtContainer, Graphics g, int dx, int dy) { final Shape oldClip = g.getClip(); try { final Component[] comps = awtContainer.getComponents(); final int cnt = comps.length; for (int i = 0; i < cnt; i++) { final Component child = comps[i]; if (child.isVisible() && child.isLightweight()) { final int x = child.getX() - dx; final int y = child.getY() - dy; final int width = child.getWidth(); final int height = child.getHeight(); g.setClip(x, y, width, height); g.translate(x, y); try { child.paint(g); } finally { g.translate(-x, -y); } } } } finally { g.setClip(oldClip); } } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/3fecc4797b433a10203c51309b9d8626f7783895/SwingToolkit.java/buggy/gui/src/awt/org/jnode/awt/swingpeers/SwingToolkit.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
12574,
12128,
6544,
4212,
12,
2170,
8237,
2170,
16,
5411,
16830,
314,
16,
509,
6633,
16,
509,
7732,
13,
288,
3639,
727,
12383,
1592,
15339,
273,
314,
18,
588,
15339,
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,
377,
1071,
760,
918,
12574,
12128,
6544,
4212,
12,
2170,
8237,
2170,
16,
5411,
16830,
314,
16,
509,
6633,
16,
509,
7732,
13,
288,
3639,
727,
12383,
1592,
15339,
273,
314,
18,
588,
15339,
5621,... |
classpathDownButtonActionPerformed(evt); } | addClasspathEntryButtonActionPerformed(evt); } | public void actionPerformed(java.awt.event.ActionEvent evt) { classpathDownButtonActionPerformed(evt); } | 10715 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10715/64cddd7d81812ff3724537a9d1db98a9686cd756/FindBugsFrame.java/clean/findbugs/src/java/edu/umd/cs/findbugs/gui/FindBugsFrame.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
482,
918,
26100,
12,
6290,
18,
2219,
88,
18,
2575,
18,
1803,
1133,
6324,
13,
288,
9506,
202,
26302,
4164,
3616,
19449,
12,
73,
11734,
1769,
1082,
202,
97,
2,
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,
1875,
202,
482,
918,
26100,
12,
6290,
18,
2219,
88,
18,
2575,
18,
1803,
1133,
6324,
13,
288,
9506,
202,
26302,
4164,
3616,
19449,
12,
73,
11734,
1769,
1082,
202,
97,
2,
-100,
-100,
-100,
-10... |
Iterator<BugLeafNode> filteredIter = filteredSet.iterator(); | protected void updateCommentsFromNonLeafInformationFromSwingThread(BugAspects theAspects) { if (theAspects == null) return; BugSet filteredSet = theAspects.getMatchingBugs(BugSet.getMainBugSet()); Iterator<BugLeafNode> filteredIter = filteredSet.iterator(); boolean allSame = true; int first = -1; String comments = null; for (BugLeafNode nextNode : filteredSet) { int designationIndex = designationKeys.indexOf(nextNode.getBug() .getNonnullUserDesignation().getDesignationKey()); String commentsOnThisBug = nextNode.getBug().getAnnotationText(); if (first == -1) { first = designationIndex; comments = commentsOnThisBug; } else { if (designationIndex != first || !commentsOnThisBug.equals(comments)) allSame = false; } } ; if (allSame) { designationComboBox.setSelectedIndex(first); userCommentsText.setText(comments); } else { designationComboBox.setSelectedIndex(0); userCommentsText.setText(""); } changed = false; // setUserCommentInputEnableFromSwingThread(true); } | 7352 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7352/0c20c13dac67aeb66e59e3178956a3c43440f616/CommentsArea.java/clean/findbugs/src/java5/edu/umd/cs/findbugs/gui2/CommentsArea.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
1089,
9051,
1265,
3989,
9858,
5369,
1265,
6050,
310,
3830,
12,
19865,
17468,
87,
326,
17468,
87,
13,
288,
202,
202,
430,
261,
5787,
17468,
87,
422,
446,
13,
1082,
202,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
1089,
9051,
1265,
3989,
9858,
5369,
1265,
6050,
310,
3830,
12,
19865,
17468,
87,
326,
17468,
87,
13,
288,
202,
202,
430,
261,
5787,
17468,
87,
422,
446,
13,
1082,
202,
2... | |
} catch (IOException th) {} | } catch (IOException th) { DebugLog.error(th); } | public int getFileRevisions(String path, long sRevision, long eRevision, ISVNFileRevisionHandler handler) throws SVNException { Long srev = getRevisionObject(sRevision); Long erev = getRevisionObject(eRevision); int count = 0; try { openConnection(); Object[] buffer = new Object[] { "get-file-revs", getRepositoryPath(path), srev, erev }; write("(w(s(n)(n)))", buffer); authenticate(); while (true) { SVNFileRevision fileRevision = null; try { read("(SN(*P)(*Z))", buffer); count++; } catch (SVNException e) { read("x", buffer); return count; } String name = null; if (handler != null) { name = (String) buffer[0]; long revision = SVNReader.getLong(buffer, 1); Map properties = SVNReader.getMap(buffer, 2); Map propertiesDelta = SVNReader.getMap(buffer, 3); if (name != null) { fileRevision = new SVNFileRevision(name, revision, properties, propertiesDelta); } buffer[2] = null; buffer[3] = null; } if (handler != null && fileRevision != null) { handler.hanldeFileRevision(fileRevision); fileRevision = null; } SVNDiffWindowBuilder builder = SVNDiffWindowBuilder.newInstance(); while (true) { byte[] line = (byte[]) read("?W?B", buffer)[1]; if (line == null) { // may be failure read("[]", buffer); break; } else if (line.length == 0) { // empty line, delta end. break; } builder.accept(line, 0); SVNDiffWindow window = builder.getDiffWindow(); if (window != null) { builder.reset(1); OutputStream os = handler.handleDiffWindow(name == null ? path : name, window); long length = window.getNewDataLength(); while (length > 0) { byte[] contents = (byte[]) myConnection.read("B", null)[0]; length -= contents.length; try { if (os != null) { os.write(contents); } } catch (IOException th) {} } try { os.close(); } catch (IOException th) {} } } handler.hanldeDiffWindowClosed(name == null ? path : name); } } finally { closeConnection(); } } | 2776 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2776/31b7e7a8a993a9acc320a287ca40f72e36fc87c5/SVNRepositoryImpl.java/buggy/javasvn/src/org/tmatesoft/svn/core/internal/io/svn/SVNRepositoryImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
6034,
21208,
12,
780,
589,
16,
1525,
272,
7939,
16,
1525,
425,
7939,
16,
4437,
58,
50,
812,
7939,
1503,
1838,
13,
1216,
29537,
50,
503,
288,
3639,
3407,
272,
9083,
273,
26911... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6034,
21208,
12,
780,
589,
16,
1525,
272,
7939,
16,
1525,
425,
7939,
16,
4437,
58,
50,
812,
7939,
1503,
1838,
13,
1216,
29537,
50,
503,
288,
3639,
3407,
272,
9083,
273,
26911... |
Dimension dimension = getDimensionArg(evaluator, args, 0, true); return dimension.getUniqueName(); | Member member = getMemberArg(evaluator, args, 0, true); return member.getName(); | public Object evaluate(Evaluator evaluator, Exp[] args) { Dimension dimension = getDimensionArg(evaluator, args, 0, true); return dimension.getUniqueName(); } | 37907 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/37907/8ce2540c398f87f14f1a0a792bb7fcaef78a148a/BuiltinFunTable.java/buggy/src/main/mondrian/olap/fun/BuiltinFunTable.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
1033,
5956,
12,
15876,
18256,
16,
7784,
8526,
833,
13,
288,
7734,
13037,
4968,
273,
20283,
4117,
12,
14168,
639,
16,
833,
16,
374,
16,
638,
1769,
7734,
327,
4968,
18,
588,
6303,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2398,
1071,
1033,
5956,
12,
15876,
18256,
16,
7784,
8526,
833,
13,
288,
7734,
13037,
4968,
273,
20283,
4117,
12,
14168,
639,
16,
833,
16,
374,
16,
638,
1769,
7734,
327,
4968,
18,
588,
6303,
... |
} | } | public SimpleJob() { } | 55677 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55677/51ce7552fa3eb48cf96a05bff5bca6616477f94b/SimpleJob.java/clean/examples/src/java/org/quartz/examples/example3/SimpleJob.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
4477,
2278,
1435,
288,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
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,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
4477,
2278,
1435,
288,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
bytes[0] = (byte)0x3f; | bytes[0] = (byte)0x7f; | private void testEnc( int size, int privateValueSize, BigInteger g, BigInteger p) { ElGamalParameters dhParams = new ElGamalParameters(p, g, privateValueSize); ElGamalKeyGenerationParameters params = new ElGamalKeyGenerationParameters(new SecureRandom(), dhParams); ElGamalKeyPairGenerator kpGen = new ElGamalKeyPairGenerator(); kpGen.init(params); // // generate pair // AsymmetricCipherKeyPair pair = kpGen.generateKeyPair(); ElGamalPublicKeyParameters pu = (ElGamalPublicKeyParameters)pair.getPublic(); ElGamalPrivateKeyParameters pv = (ElGamalPrivateKeyParameters)pair.getPrivate(); checkKeySize(privateValueSize, pv); ElGamalEngine e = new ElGamalEngine(); e.init(true, pu); if (e.getOutputBlockSize() != size / 4) { fail(size + " getOutputBlockSize() on encryption failed."); } String message = "This is a test"; byte[] pText = message.getBytes(); byte[] cText = e.processBlock(pText, 0, pText.length); e.init(false, pv); if (e.getOutputBlockSize() != (size / 8) - 1) { fail(size + " getOutputBlockSize() on decryption failed."); } pText = e.processBlock(cText, 0, cText.length); if (!message.equals(new String(pText))) { fail(size + " bit test failed"); } e.init(true, pu); byte[] bytes = new byte[e.getInputBlockSize() + 2]; try { e.processBlock(bytes, 0, bytes.length); fail("out of range block not detected"); } catch (DataLengthException ex) { // expected } try { bytes[0] = (byte)0xff; e.processBlock(bytes, 0, bytes.length - 1); fail("out of range block not detected"); } catch (DataLengthException ex) { // expected } try { bytes[0] = (byte)0x3f; e.processBlock(bytes, 0, bytes.length - 1); } catch (DataLengthException ex) { fail("in range block failed"); } } | 53000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/53000/3ca42ab27d213981744b5f869db48496e0245af6/ElGamalTest.java/buggy/crypto/test/src/org/bouncycastle/crypto/test/ElGamalTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1842,
4280,
12,
3639,
509,
540,
963,
16,
3639,
509,
540,
3238,
620,
1225,
16,
3639,
10246,
225,
314,
16,
3639,
10246,
225,
293,
13,
565,
288,
3639,
10426,
43,
301,
287,
2402,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1842,
4280,
12,
3639,
509,
540,
963,
16,
3639,
509,
540,
3238,
620,
1225,
16,
3639,
10246,
225,
314,
16,
3639,
10246,
225,
293,
13,
565,
288,
3639,
10426,
43,
301,
287,
2402,... |
if (runtime.getRubyClass().isSingleton()) { singletonClass = (MetaClass)threadContext.popClass(); | if (containingClass.isSingleton()) { singletonClass = (MetaClass) threadContext.popClass(); | public void visitDefnNode(DefnNode iVisited) { RubyModule containingClass = threadContext.getRubyClass(); if (containingClass == null) { throw new TypeError(runtime, "No class to add method."); } String name = iVisited.getName(); if (containingClass == runtime.getClasses().getObjectClass() && name.equals("initialize")) { runtime.getWarnings().warn("redefining Object#initialize may cause infinite loop"); } Visibility visibility = threadContext.getCurrentVisibility(); if (name.equals("initialize") || visibility.isModuleFunction()) { visibility = Visibility.PRIVATE; } else if (visibility.isPublic() && containingClass == runtime.getClasses().getObjectClass()) { visibility = iVisited.getVisibility(); } MetaClass singletonClass = null; // if defining in a singleton, pop it and use visitDefs-style definition below if (runtime.getRubyClass().isSingleton()) { singletonClass = (MetaClass)threadContext.popClass(); containingClass = threadContext.getRubyClass(); } DefaultMethod newMethod = new DefaultMethod(iVisited.getBodyNode(), (ArgsNode) iVisited.getArgsNode(), visibility, threadContext.getRubyClass()); iVisited.getBodyNode().accept(new CreateJumpTargetVisitor(newMethod)); containingClass.addMethod(name, newMethod); if (threadContext.getCurrentVisibility().isModuleFunction()) { containingClass.getSingletonClass().addMethod(name, new WrapperCallable(newMethod, Visibility.PUBLIC)); containingClass.callMethod("singleton_method_added", runtime.newSymbol(name)); } if (singletonClass != null) { threadContext.pushClass(singletonClass); singletonClass.addMethod(iVisited.getName(), newMethod); // FIXME: need to call someone's singleton_method_added (receiver is lost at this point)! //.callMethod("singleton_method_added", runtime.toSymbol(iVisited.getName())); } else { containingClass.callMethod("method_added", runtime.newSymbol(name)); } } | 46258 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46258/94499f739863f7ae6ae84bc6d48e9c07463792d2/EvaluateVisitor.java/buggy/src/org/jruby/evaluator/EvaluateVisitor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
3757,
3262,
82,
907,
12,
3262,
82,
907,
277,
30019,
13,
288,
3639,
19817,
3120,
4191,
797,
273,
2650,
1042,
18,
588,
54,
10340,
797,
5621,
3639,
309,
261,
1213,
3280,
797,
42... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3757,
3262,
82,
907,
12,
3262,
82,
907,
277,
30019,
13,
288,
3639,
19817,
3120,
4191,
797,
273,
2650,
1042,
18,
588,
54,
10340,
797,
5621,
3639,
309,
261,
1213,
3280,
797,
42... |
BlockTransmitter.setHardBandwidthLimit(val); | String msg = "Switching listenPort on the fly not yet supported!"; Logger.error(this, msg); throw new InvalidConfigValueException(msg); | public void set(int val) throws InvalidConfigValueException { BlockTransmitter.setHardBandwidthLimit(val); } | 49933 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49933/0e73e63698410905555b43e69172b80870e39ae5/Node.java/clean/src/freenet/node/Node.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4405,
202,
482,
918,
444,
12,
474,
1244,
13,
1216,
1962,
809,
9738,
288,
25083,
202,
1768,
1429,
1938,
387,
18,
542,
29601,
24621,
3039,
12,
1125,
1769,
6862,
202,
97,
2,
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,
4405,
202,
482,
918,
444,
12,
474,
1244,
13,
1216,
1962,
809,
9738,
288,
25083,
202,
1768,
1429,
1938,
387,
18,
542,
29601,
24621,
3039,
12,
1125,
1769,
6862,
202,
97,
2,
-100,
-100,
-100,
-... |
if (DEBUG_ATTR_NORMALIZATION) { System.out.println("** valueL: \"" + fStringBuffer.toString() + "\""); } } } while (c != quote); | } c = fEntityScanner.scanLiteral(quote, value); if (entityDepth == fEntityDepth) { fStringBuffer2.append(value); } normalizeWhitespace(value); } while (c != quote || entityDepth != fEntityDepth); | protected void scanAttributeValue(XMLString value, XMLString nonNormalizedValue, String atName, XMLAttributes attributes, int attrIndex, boolean checkEntities) throws IOException, XNIException { // quote int quote = fEntityScanner.peekChar(); if (quote != '\'' && quote != '"') { reportFatalError("OpenQuoteExpected", new Object[]{atName}); } fEntityScanner.scanChar(); int entityDepth = fEntityDepth; int c = fEntityScanner.scanLiteral(quote, value); if (DEBUG_ATTR_NORMALIZATION) { System.out.println("** scanLiteral -> \"" + value.toString() + "\""); } fStringBuffer2.clear(); fStringBuffer2.append(value); normalizeWhitespace(value); if (DEBUG_ATTR_NORMALIZATION) { System.out.println("** normalizeWhitespace -> \"" + value.toString() + "\""); } if (c != quote) { fScanningAttribute = true; fStringBuffer.clear(); do { fStringBuffer.append(value); if (DEBUG_ATTR_NORMALIZATION) { System.out.println("** value2: \"" + fStringBuffer.toString() + "\""); } if (c == '&') { fEntityScanner.skipChar('&'); if (entityDepth == fEntityDepth) { fStringBuffer2.append('&'); } if (fEntityScanner.skipChar('#')) { if (entityDepth == fEntityDepth) { fStringBuffer2.append('#'); } int ch = scanCharReferenceValue(fStringBuffer, fStringBuffer2); if (ch != -1) { if (DEBUG_ATTR_NORMALIZATION) { System.out.println("** value3: \"" + fStringBuffer.toString() + "\""); } } } else { String entityName = fEntityScanner.scanName(); if (entityName == null) { reportFatalError("NameRequiredInReference", null); } else if (entityDepth == fEntityDepth) { fStringBuffer2.append(entityName); } if (!fEntityScanner.skipChar(';')) { reportFatalError("SemicolonRequiredInReference", new Object []{entityName}); } else if (entityDepth == fEntityDepth) { fStringBuffer2.append(';'); } if (entityName == fAmpSymbol) { fStringBuffer.append('&'); if (DEBUG_ATTR_NORMALIZATION) { System.out.println("** value5: \"" + fStringBuffer.toString() + "\""); } } else if (entityName == fAposSymbol) { fStringBuffer.append('\''); if (DEBUG_ATTR_NORMALIZATION) { System.out.println("** value7: \"" + fStringBuffer.toString() + "\""); } } else if (entityName == fLtSymbol) { fStringBuffer.append('<'); if (DEBUG_ATTR_NORMALIZATION) { System.out.println("** value9: \"" + fStringBuffer.toString() + "\""); } } else if (entityName == fGtSymbol) { fStringBuffer.append('>'); if (DEBUG_ATTR_NORMALIZATION) { System.out.println("** valueB: \"" + fStringBuffer.toString() + "\""); } } else if (entityName == fQuotSymbol) { fStringBuffer.append('"'); if (DEBUG_ATTR_NORMALIZATION) { System.out.println("** valueD: \"" + fStringBuffer.toString() + "\""); } } else { if (fEntityManager.isExternalEntity(entityName)) { reportFatalError("ReferenceToExternalEntity", new Object[] { entityName }); } else { if (!fEntityManager.isDeclaredEntity(entityName)) { //WFC & VC: Entity Declared if (checkEntities) { if (fValidation) { fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN, "EntityNotDeclared", new Object[]{entityName}, XMLErrorReporter.SEVERITY_ERROR); } } else { reportFatalError("EntityNotDeclared", new Object[]{entityName}); } } fEntityManager.startEntity(entityName, true); } } } } else if (c == '<') { reportFatalError("LessthanInAttValue", new Object[] { null, atName }); } else if (c == '%' || c == ']') { fEntityScanner.scanChar(); fStringBuffer.append((char)c); if (entityDepth == fEntityDepth) { fStringBuffer2.append((char)c); } if (DEBUG_ATTR_NORMALIZATION) { System.out.println("** valueF: \"" + fStringBuffer.toString() + "\""); } } else if (c == '\r') { // This happens when parsing the entity replacement text of // an entity which had a character reference in its // literal entity value. The character is normalized to // #x20 and collapsed per the normal rules. fEntityScanner.scanChar(); fStringBuffer.append(' '); fStringBuffer.append((char)c); if (entityDepth == fEntityDepth) { fStringBuffer2.append((char)c); } if (DEBUG_ATTR_NORMALIZATION) { System.out.println("** valueG: \"" + fStringBuffer.toString() + "\""); } } else if (c != -1 && XMLChar.isHighSurrogate(c)) { if (scanSurrogates(fStringBuffer3)) { fStringBuffer.append(fStringBuffer3); if (entityDepth == fEntityDepth) { fStringBuffer2.append(fStringBuffer3); } if (DEBUG_ATTR_NORMALIZATION) { System.out.println("** valueI: \"" + fStringBuffer.toString() + "\""); } } } else if (c != -1 && XMLChar.isInvalid(c)) { reportFatalError("InvalidCharInAttValue", new Object[] {Integer.toString(c, 16)}); fEntityScanner.scanChar(); } // the following is to handle quotes we get from entities // which we must not confused with the end quote while (true) { c = fEntityScanner.scanLiteral(quote, value); if (DEBUG_ATTR_NORMALIZATION) { System.out.println("scanLiteral -> \"" + value.toString() + "\""); } //fStringBuffer2.append(value); normalizeWhitespace(value); if (DEBUG_ATTR_NORMALIZATION) { System.out.println("normalizeWhitespace -> \"" + value.toString() + "\""); } // this is: !(c == quote && entityDepth != fEntityDepth) if (c != quote || entityDepth == fEntityDepth) { break; } fStringBuffer.append(value); if (DEBUG_ATTR_NORMALIZATION) { System.out.println("** valueK: \"" + fStringBuffer.toString() + "\""); } fEntityScanner.scanChar(); fStringBuffer.append((char)c); if (entityDepth == fEntityDepth) { fStringBuffer2.append((char)c); } if (DEBUG_ATTR_NORMALIZATION) { System.out.println("** valueL: \"" + fStringBuffer.toString() + "\""); } } } while (c != quote); fStringBuffer.append(value); fStringBuffer2.append(value); if (DEBUG_ATTR_NORMALIZATION) { System.out.println("** valueN: \"" + fStringBuffer.toString() + "\""); } value.setValues(fStringBuffer); fScanningAttribute = false; } nonNormalizedValue.setValues(fStringBuffer2); // quote int cquote = fEntityScanner.scanChar(); if (cquote != quote) { reportFatalError("CloseQuoteExpected", new Object[]{atName}); } } // scanAttributeValue() | 6373 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6373/d232928ed1c7b1c17bc36e300363a1de0b52f503/XMLScanner.java/buggy/src/org/apache/xerces/impl/XMLScanner.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
4135,
14942,
12,
4201,
780,
460,
16,
4766,
4202,
3167,
780,
1661,
15577,
620,
16,
4766,
1377,
514,
622,
461,
16,
4766,
1377,
3167,
2498,
1677,
16,
509,
1604,
1016,
16,
4766,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
4135,
14942,
12,
4201,
780,
460,
16,
4766,
4202,
3167,
780,
1661,
15577,
620,
16,
4766,
1377,
514,
622,
461,
16,
4766,
1377,
3167,
2498,
1677,
16,
509,
1604,
1016,
16,
4766,
... |
public String getAsText() { return val != null ? val.toString() : "null"; } | public String getAsText() { return value != null ? value.toString() : "null"; } | public String getAsText() { return val != null ? val.toString() : "null"; } | 47947 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47947/87a016ae8f12d2e636b9b4ea006f53fb137713e8/PropertyEditorSupport.java/buggy/java/beans/PropertyEditorSupport.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
13122,
1528,
1435,
288,
202,
202,
2463,
1244,
480,
446,
692,
1244,
18,
10492,
1435,
294,
315,
2011,
14432,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
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,
514,
13122,
1528,
1435,
288,
202,
202,
2463,
1244,
480,
446,
692,
1244,
18,
10492,
1435,
294,
315,
2011,
14432,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
public Object clone() { | public Object clone() throws CloneNotSupportedException { | public Object clone() { Object clone = null; try { clone = super.clone(); } catch (Exception exception) { logger.error("Could not clone DebugAtom: " + exception.getMessage(), exception); logger.debug(exception); } return clone; } | 45167 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45167/2b55a607674535cd8492e3539d8f3dce16fc3b92/DebugAtomParity.java/buggy/src/org/openscience/cdk/debug/DebugAtomParity.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1033,
3236,
1435,
1216,
12758,
25482,
288,
3639,
1033,
3236,
273,
446,
31,
3639,
775,
288,
540,
202,
14056,
273,
2240,
18,
14056,
5621,
3639,
289,
1044,
261,
503,
1520,
13,
288,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1033,
3236,
1435,
1216,
12758,
25482,
288,
3639,
1033,
3236,
273,
446,
31,
3639,
775,
288,
540,
202,
14056,
273,
2240,
18,
14056,
5621,
3639,
289,
1044,
261,
503,
1520,
13,
288,... |
item.requestSender.sendAsync(m); | try { item.requestSender.sendAsync(m); } catch (NotConnectedException e) { Logger.minor(this, "Lost connection forwarding SwapRejected "+uid+" to "+item.requestSender); } | public boolean handleSwapRejected(Message m) { long uid = m.getLong(DMT.UID); Long luid = new Long(uid); RecentlyForwardedItem item = (RecentlyForwardedItem) recentlyForwardedIDs.get(luid); if(item == null) return false; if(item.requestSender == null) return false; if(m.getSource() != item.routedTo) { Logger.error(this, "Unmatched swapreply "+uid+" from wrong source: From "+m.getSource()+ " should be "+item.routedTo+" to "+item.requestSender); return true; } recentlyForwardedIDs.remove(luid); item.lastMessageTime = System.currentTimeMillis(); Logger.minor(this, "Forwarding SwapRejected "+uid+" from "+m.getSource()+" to "+item.requestSender); // Returning to source - use incomingID m.set(DMT.UID, item.incomingID); item.requestSender.sendAsync(m); return true; } | 50619 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50619/db3bc8d8624526da4116ed2c6e8583678d958aa9/LocationManager.java/buggy/src/freenet/node/LocationManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
1640,
12521,
19902,
12,
1079,
312,
13,
288,
3639,
1525,
4555,
273,
312,
18,
588,
3708,
12,
40,
6152,
18,
3060,
1769,
3639,
3407,
328,
1911,
273,
394,
3407,
12,
1911,
1769,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
1640,
12521,
19902,
12,
1079,
312,
13,
288,
3639,
1525,
4555,
273,
312,
18,
588,
3708,
12,
40,
6152,
18,
3060,
1769,
3639,
3407,
328,
1911,
273,
394,
3407,
12,
1911,
1769,
3... |
if (!responseExpected) { closeHandlers(ch); | if (!responseExpected) { if (messageType == RequestOrResponse.REQUEST) { if (direction == Direction.INBOUND) { closeHandlersServer(ch); } else { closeHandlersClient(ch); } } else { if (direction == Direction.INBOUND) { closeHandlersClient(ch); } else { closeHandlersServer(ch); } } | private boolean internalCallHandlers(Direction direction, RequestOrResponse messageType, ContextHolder ch, boolean responseExpected) { // set outbound property ch.getLMC().put(MessageContext.MESSAGE_OUTBOUND_PROPERTY, (direction == Direction.OUTBOUND)); // if there is as soap message context, set roles if (ch.getSMC() != null) { ((SOAPMessageContextImpl) ch.getSMC()).setRoles(getRoles()); } // call handlers if (direction == Direction.OUTBOUND) { if (callLogicalHandlers(ch, direction, messageType, responseExpected) == false) { return false; } if (callProtocolHandlers(ch, direction, messageType, responseExpected) == false) { return false; } } else { if (callProtocolHandlers(ch, direction, messageType, responseExpected) == false) { return false; } if (callLogicalHandlers(ch, direction, messageType, responseExpected) == false) { return false; } } /* * Close if MEP finished. Server code responsible for closing * handlers if it determines that an incoming request is a * one way message. */ if (!responseExpected) { closeHandlers(ch); } return true; } | 9667 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9667/6509ab3fb8bbe54639b360dda964b0533675e731/HandlerChainCaller.java/buggy/jaxws-ri/rt/src/com/sun/xml/ws/handler/HandlerChainCaller.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1250,
2713,
1477,
6919,
12,
8212,
4068,
16,
3639,
1567,
1162,
1064,
22402,
16,
3639,
1772,
6064,
462,
16,
3639,
1250,
766,
6861,
13,
288,
3639,
368,
444,
11663,
1272,
3639,
462,
18,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1250,
2713,
1477,
6919,
12,
8212,
4068,
16,
3639,
1567,
1162,
1064,
22402,
16,
3639,
1772,
6064,
462,
16,
3639,
1250,
766,
6861,
13,
288,
3639,
368,
444,
11663,
1272,
3639,
462,
18,... |
iVisited.accept(_Payload); | _Payload.visitGVarNode(iVisited); | public void visitGVarNode(GVarNode iVisited) { iVisited.accept(_Payload); } | 47273 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47273/043fa4419ad506aa6f8843684eb8114b226fe4b5/DefaultIteratorVisitor.java/clean/org/jruby/nodes/visitor/DefaultIteratorVisitor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
3757,
43,
1537,
907,
12,
43,
1537,
907,
277,
30019,
13,
288,
202,
202,
77,
30019,
18,
9436,
24899,
6110,
1769,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
3757,
43,
1537,
907,
12,
43,
1537,
907,
277,
30019,
13,
288,
202,
202,
77,
30019,
18,
9436,
24899,
6110,
1769,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
public void flushPending() | public void flushPending() throws org.xml.sax.SAXException | public void flushPending() { try { if (m_needToCallStartDocument) { startDocumentInternal(); m_needToCallStartDocument = false; } } catch (SAXException e) { // can we do anything useful here, // or should this method throw a SAXException? } } | 2723 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2723/8f42c64a8584c478e37048e084dcae8bce63ecdc/ToTextStream.java/clean/src/org/apache/xml/serializer/ToTextStream.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
3663,
8579,
1435,
1216,
2358,
18,
2902,
18,
87,
651,
18,
55,
2501,
503,
565,
288,
3639,
775,
3639,
288,
5411,
309,
261,
81,
67,
14891,
774,
1477,
1685,
2519,
13,
5411,
288,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
3663,
8579,
1435,
1216,
2358,
18,
2902,
18,
87,
651,
18,
55,
2501,
503,
565,
288,
3639,
775,
3639,
288,
5411,
309,
261,
81,
67,
14891,
774,
1477,
1685,
2519,
13,
5411,
288,
... |
setDatasets( new HashSet( i.eachLinkedDataset( block ))); setAllPixels( new HashSet( i.collectPixels( block ))); setAnnotations( new HashSet( i.collectAnnotations( block ))); | setDatasets( makeSet( i.sizeOfDatasetLinks(), i.eachLinkedDataset( block ))); setAllPixels( makeSet( i.sizeOfPixels(), i.collectPixels( block ))); setAnnotations( makeSet( i.sizeOfAnnotations(), i.collectAnnotations( block ))); | public void copy(IObject model, ModelMapper mapper) { if (model instanceof Image) { Image i = (Image) model; super.copy(model,mapper); // Details if (i.getDetails() != null){ Details d = i.getDetails(); this.setCreated(mapper.event2timestamp(d.getCreationEvent())); this.setInserted(mapper.event2timestamp(d.getUpdateEvent()));//TODO this.setOwner((ExperimenterData) mapper.findTarget(d.getOwner())); if ( d.getCounts() != null ) { Object annotationCount = d.getCounts().get( Image.ANNOTATIONS ); if ( annotationCount instanceof Integer ) this.setAnnotationCount( (Integer) annotationCount ); Object classificationCount = d.getCounts().get( Image.CATEGORYLINKS ); if ( classificationCount instanceof Integer ) this.setClassificationCount( (Integer) classificationCount ); } } // Fields this.setName(i.getName()); this.setDescription(i.getDescription()); this.setDefaultPixels((PixelsData)mapper.findTarget(i.getDefaultPixels())); // Collections MapperBlock block = new MapperBlock( mapper ); setDatasets( new HashSet( i.eachLinkedDataset( block ))); setAllPixels( new HashSet( i.collectPixels( block ))); setAnnotations( new HashSet( i.collectAnnotations( block ))); } else { throw new IllegalArgumentException("ImageData copies only from Image"); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9638b50efec05ce0b3d19bbef1c149c757b964aa/ImageData.java/clean/components/shoola-adapter/src/pojos/ImageData.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1610,
12,
45,
921,
938,
16,
3164,
4597,
5815,
13,
288,
377,
202,
430,
261,
2284,
1276,
3421,
13,
288,
1082,
202,
2040,
277,
273,
261,
2040,
13,
938,
31,
5411,
2240,
18,
353... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1610,
12,
45,
921,
938,
16,
3164,
4597,
5815,
13,
288,
377,
202,
430,
261,
2284,
1276,
3421,
13,
288,
1082,
202,
2040,
277,
273,
261,
2040,
13,
938,
31,
5411,
2240,
18,
353... |
public Query ModifyQuery(Engine engine, List filters, Query query) throws InvalidQueryException { Connection conn; | public Query ModifyQuery(Engine engine, List filters, Query query) throws InvalidQueryException { Connection conn = null; | public Query ModifyQuery(Engine engine, List filters, Query query) throws InvalidQueryException { Connection conn; try { conn = query.getDataSource().getConnection(); } catch (SQLException e1) { throw new InvalidQueryException("Recieved SQLException "+e1.getMessage(), e1); } Query newQuery = new Query(query); String sql, filterName, filterCondition, filterValue; PreparedStatement ps; Filter chrFilter; // must get species focus, and chromosome. If a chromosome filter has not been set, then throw an exception String species, focus, chrvalue, lookupTable; // species can be parsed from the beginning of the first starBase String starBase = newQuery.getStarBases()[0]; StringTokenizer sbtokens = new StringTokenizer(starBase, "_"); species = sbtokens.nextToken(); String tmp = sbtokens.nextToken(); //focus is snp if tmp ends with snp if (tmp.endsWith("snp")) focus = "snp"; else focus = "gene"; filterName = focus+"_chrom_start"; if (species == null || species.equals("")) throw new InvalidQueryException("Species is required for a Band Filter, check the MartConfiguration for the correct starBases for this DatasetView."); lookupTable = species+"_karyotype_lookup"; chrFilter = newQuery.getFilterByName(CHRNAME); if (chrFilter == null) throw new InvalidQueryException("Band Filters require a Chromosome Filter to have been added to the Query."); chrvalue = chrFilter.getValue(); for (int i = 0, n = filters.size(); i < n; i++) { Filter element = (Filter) filters.get(i); newQuery.removeFilter(element); String field = element.getField(); String band_value = element.getValue(); if (field.equals(START_FIELD)) { sql = "SELECT chr_start FROM "+lookupTable+" WHERE chr_name = ? AND band = ?"; filterCondition = ">="; } else if (field.equals(END_FIELD)){ sql = "SELECT chr_end FROM "+lookupTable+" WHERE chr_name = ? AND band = ?"; filterCondition = "<="; } else throw new InvalidQueryException("Recieved invalid field for BandFilterHandler " + field + "\n"); try { logger.info("sql = " + sql + "\nparameter 1 = " + chrvalue + " parameter2 = " + band_value + "\n"); ps = conn.prepareStatement(sql); ps.setString(1, chrvalue); ps.setString(2, band_value); ResultSet rs = ps.executeQuery(); rs.next(); // will only be one result filterValue = rs.getString(1); logger.info("Recieved " + filterValue + " from sql\n"); } catch (SQLException e) { throw new InvalidQueryException("Recieved SQLException "+e.getMessage(), e); } if (filterValue != null && filterValue.length() > 0) { Filter posFilter = new BasicFilter(filterName, filterCondition, filterValue); newQuery.addFilter(posFilter); } else throw new InvalidQueryException("Did not recieve a filterValue for Band Filter " + band_value + ", Band may not be on chromosome " + chrvalue + "\n"); } return newQuery; } | 2000 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2000/5d29c858564d7e4e6ede04a12954508a6284b018/BandFilterHandler.java/buggy/src/java/org/ensembl/mart/lib/BandFilterHandler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2770,
9518,
1138,
12,
4410,
4073,
16,
987,
3415,
16,
2770,
843,
13,
1216,
1962,
1138,
503,
288,
202,
202,
1952,
1487,
31,
202,
202,
698,
288,
1082,
202,
4646,
273,
843,
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,
2770,
9518,
1138,
12,
4410,
4073,
16,
987,
3415,
16,
2770,
843,
13,
1216,
1962,
1138,
503,
288,
202,
202,
1952,
1487,
31,
202,
202,
698,
288,
1082,
202,
4646,
273,
843,
18,
... |
SourceLineAnnotation annotation = new SourceLineAnnotation(className, startLine, endLine); | SourceLineAnnotation annotation = new SourceLineAnnotation(className, sourceFile, startLine, endLine); | public XMLConvertible fromElement(Element element) throws DocumentException { try { String className = element.attributeValue("classname"); int startLine = Integer.parseInt(element.attributeValue("start")); int endLine = Integer.parseInt(element.attributeValue("end")); SourceLineAnnotation annotation = new SourceLineAnnotation(className, startLine, endLine); String role = element.attributeValue("role"); if (role != null) annotation.setDescription(role); return annotation; } catch (NumberFormatException e) { throw new DocumentException("Invalid attribute value: " + e.toString()); } } | 7352 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7352/26d4f6af88d660e3e41bd1837217176c038dba87/SourceLineAnnotation.java/buggy/findbugs/src/java/edu/umd/cs/findbugs/SourceLineAnnotation.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
3167,
2723,
1523,
628,
1046,
12,
1046,
930,
13,
1216,
4319,
503,
288,
1082,
202,
698,
288,
9506,
202,
780,
2658,
273,
930,
18,
4589,
620,
2932,
18340,
8863,
9506,
202,
474,
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,
3196,
202,
482,
3167,
2723,
1523,
628,
1046,
12,
1046,
930,
13,
1216,
4319,
503,
288,
1082,
202,
698,
288,
9506,
202,
780,
2658,
273,
930,
18,
4589,
620,
2932,
18340,
8863,
9506,
202,
474,
2... |
SumX = optInTimePeriod * (optInTimePeriod - 1) * 0.5; SumXSqr = optInTimePeriod * (optInTimePeriod - 1) * (2 * optInTimePeriod - 1) / 6; Divisor = SumX * SumX - optInTimePeriod * SumXSqr; | public TA_RetCode LINEARREG_ANGLE(int startIdx, int endIdx, double inReal[], int optInTimePeriod, MInteger outBegIdx, MInteger outNbElement, double outReal[]) { int outIdx; int today, lookbackTotal; double SumX, SumXY, SumY, SumXSqr, Divisor; double m; int i; double tempValue1; if (startIdx < 0) return TA_RetCode.TA_OUT_OF_RANGE_START_INDEX; if ((endIdx < 0) || (endIdx < startIdx)) return TA_RetCode.TA_OUT_OF_RANGE_END_INDEX; if ((int) optInTimePeriod == (Integer.MIN_VALUE )) optInTimePeriod = 14; else if (((int) optInTimePeriod < 2) || ((int) optInTimePeriod > 100000)) return TA_RetCode.TA_BAD_PARAM; lookbackTotal = LINEARREG_ANGLE_Lookback(optInTimePeriod); if (startIdx < lookbackTotal) startIdx = lookbackTotal; if (startIdx > endIdx) { outBegIdx.value = 0; outNbElement.value = 0; return TA_RetCode.TA_SUCCESS; } outIdx = 0; today = startIdx; SumX = optInTimePeriod * (optInTimePeriod - 1) * 0.5; SumXSqr = optInTimePeriod * (optInTimePeriod - 1) * (2 * optInTimePeriod - 1) / 6; Divisor = SumX * SumX - optInTimePeriod * SumXSqr; while (today <= endIdx) { SumXY = 0; SumY = 0; for (i = optInTimePeriod; i-- != 0;) { SumY += tempValue1 = inReal[today - i]; SumXY += (double) i * tempValue1; } m = (optInTimePeriod * SumXY - SumX * SumY) / Divisor; outReal[outIdx++] = m * (180.0 / 3.14159265358979323846); today++; } outBegIdx.value = startIdx; outNbElement.value = outIdx; return TA_RetCode.TA_SUCCESS; } | 7231 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7231/5df8081f2a7211016256c0f481213a987e02947a/Core.java/clean/ta-lib/java/src/TA/Lib/Core.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
399,
37,
67,
7055,
1085,
14340,
985,
5937,
67,
30978,
12,
474,
27108,
16,
509,
679,
4223,
16,
1082,
202,
9056,
316,
6955,
63,
6487,
509,
2153,
382,
26540,
16,
490,
4522,
596,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
399,
37,
67,
7055,
1085,
14340,
985,
5937,
67,
30978,
12,
474,
27108,
16,
509,
679,
4223,
16,
1082,
202,
9056,
316,
6955,
63,
6487,
509,
2153,
382,
26540,
16,
490,
4522,
596,
... | |
public TA_RetCode ADX( int startIdx, int endIdx, double inHigh[], double inLow[], double inClose[], int optInTimePeriod, MInteger outBegIdx, MInteger outNbElement, double outReal[] ){ int today, lookbackTotal, outIdx; double prevHigh, prevLow, prevClose; double prevMinusDM, prevPlusDM, prevTR; double tempReal, tempReal2, diffP, diffM; double minusDI, plusDI, sumDX, prevADX; int i; if( startIdx < 0 ) return TA_RetCode. TA_OUT_OF_RANGE_START_INDEX; if( (endIdx < 0) || (endIdx < startIdx)) return TA_RetCode. TA_OUT_OF_RANGE_END_INDEX; if( (int)optInTimePeriod == ( Integer.MIN_VALUE ) ) optInTimePeriod = 14; else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) return TA_RetCode. TA_BAD_PARAM; if( optInTimePeriod > 1 ) lookbackTotal = (2*optInTimePeriod) + (this.unstablePeriod[TA_FuncUnstId.TA_FUNC_UNST_ADX.ordinal()]) - 1; else lookbackTotal = 2; if( startIdx < lookbackTotal ) startIdx = lookbackTotal; if( startIdx > endIdx ) { outBegIdx.value = 0 ; outNbElement.value = 0 ; return TA_RetCode. TA_SUCCESS; } outIdx = 0; outBegIdx.value = today = startIdx; prevMinusDM = 0.0; prevPlusDM = 0.0; prevTR = 0.0; today = startIdx - lookbackTotal; prevHigh = inHigh[today]; prevLow = inLow[today]; prevClose = inClose[today]; i = optInTimePeriod-1; while( i-- > 0 ) { today++; tempReal = inHigh[today]; diffP = tempReal-prevHigh; prevHigh = tempReal; tempReal = inLow[today]; diffM = prevLow-tempReal; prevLow = tempReal; if( (diffM > 0) && (diffP < diffM) ) { prevMinusDM += diffM; } else if( (diffP > 0) && (diffP > diffM) ) { prevPlusDM += diffP; } { tempReal = prevHigh-prevLow; tempReal2 = Math.abs (prevHigh-prevClose); if( tempReal2 > tempReal ) tempReal = tempReal2; tempReal2 = Math.abs (prevLow-prevClose); if( tempReal2 > tempReal ) tempReal = tempReal2; } ; prevTR += tempReal; prevClose = inClose[today]; } sumDX = 0.0; i = optInTimePeriod; while( i-- > 0 ) { today++; tempReal = inHigh[today]; diffP = tempReal-prevHigh; prevHigh = tempReal; tempReal = inLow[today]; diffM = prevLow-tempReal; prevLow = tempReal; prevMinusDM -= prevMinusDM/optInTimePeriod; prevPlusDM -= prevPlusDM/optInTimePeriod; if( (diffM > 0) && (diffP < diffM) ) { prevMinusDM += diffM; } else if( (diffP > 0) && (diffP > diffM) ) { prevPlusDM += diffP; } { tempReal = prevHigh-prevLow; tempReal2 = Math.abs (prevHigh-prevClose); if( tempReal2 > tempReal ) tempReal = tempReal2; tempReal2 = Math.abs (prevLow-prevClose); if( tempReal2 > tempReal ) tempReal = tempReal2; } ; prevTR = prevTR - (prevTR/optInTimePeriod) + tempReal; prevClose = inClose[today]; if( ! (((-0.00000001)<prevTR)&&(prevTR<0.00000001)) ) { minusDI = (100.0*(prevMinusDM/prevTR)) ; plusDI = (100.0*(prevPlusDM/prevTR)) ; tempReal = minusDI+plusDI; if( ! (((-0.00000001)<prevTR)&&(prevTR<0.00000001)) ) sumDX += (100.0 * ( Math.abs (minusDI-plusDI)/tempReal)) ; } } prevADX = (sumDX / optInTimePeriod) ; i = (this.unstablePeriod[TA_FuncUnstId.TA_FUNC_UNST_ADX.ordinal()]) ; while( i-- > 0 ) { today++; tempReal = inHigh[today]; diffP = tempReal-prevHigh; prevHigh = tempReal; tempReal = inLow[today]; diffM = prevLow-tempReal; prevLow = tempReal; prevMinusDM -= prevMinusDM/optInTimePeriod; prevPlusDM -= prevPlusDM/optInTimePeriod; if( (diffM > 0) && (diffP < diffM) ) { prevMinusDM += diffM; } else if( (diffP > 0) && (diffP > diffM) ) { prevPlusDM += diffP; } { tempReal = prevHigh-prevLow; tempReal2 = Math.abs (prevHigh-prevClose); if( tempReal2 > tempReal ) tempReal = tempReal2; tempReal2 = Math.abs (prevLow-prevClose); if( tempReal2 > tempReal ) tempReal = tempReal2; } ; prevTR = prevTR - (prevTR/optInTimePeriod) + tempReal; prevClose = inClose[today]; if( prevTR != 0.0 ) { minusDI = (100.0*(prevMinusDM/prevTR)) ; plusDI = (100.0*(prevPlusDM/prevTR)) ; tempReal = minusDI+plusDI; if( tempReal != 0.0 ) { tempReal = (100.0*( Math.abs (minusDI-plusDI)/tempReal)) ; prevADX = (((prevADX*(optInTimePeriod-1))+tempReal)/optInTimePeriod) ; } } } outReal[0] = prevADX; outIdx = 1; while( today < endIdx ) { today++; tempReal = inHigh[today]; diffP = tempReal-prevHigh; prevHigh = tempReal; tempReal = inLow[today]; diffM = prevLow-tempReal; prevLow = tempReal; prevMinusDM -= prevMinusDM/optInTimePeriod; prevPlusDM -= prevPlusDM/optInTimePeriod; if( (diffM > 0) && (diffP < diffM) ) { prevMinusDM += diffM; } else if( (diffP > 0) && (diffP > diffM) ) { prevPlusDM += diffP; } { tempReal = prevHigh-prevLow; tempReal2 = Math.abs (prevHigh-prevClose); if( tempReal2 > tempReal ) tempReal = tempReal2; tempReal2 = Math.abs (prevLow-prevClose); if( tempReal2 > tempReal ) tempReal = tempReal2; } ; prevTR = prevTR - (prevTR/optInTimePeriod) + tempReal; prevClose = inClose[today]; if( prevTR != 0.0 ) { minusDI = (100.0*(prevMinusDM/prevTR)) ; plusDI = (100.0*(prevPlusDM/prevTR)) ; tempReal = minusDI+plusDI; if( tempReal != 0.0 ) { tempReal = (100.0*( Math.abs (minusDI-plusDI)/tempReal)) ; prevADX = (((prevADX*(optInTimePeriod-1))+tempReal)/optInTimePeriod) ; } } outReal[outIdx++] = prevADX; } outNbElement.value = outIdx; return TA_RetCode. TA_SUCCESS;} | 51465 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51465/1a230e9b7099cbd2b7e9eb1294130ca009bfedf4/Core.java/buggy/trunk/ta-lib/java/src/TA/Lib/Core.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
9833,
67,
7055,
1085,
1880,
60,
12,
474,
1937,
4223,
16,
474,
409,
4223,
16,
9056,
267,
8573,
63,
6487,
9056,
267,
10520,
63,
6487,
9056,
267,
4605,
63,
6487,
474,
3838,
382,
26540,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
9833,
67,
7055,
1085,
1880,
60,
12,
474,
1937,
4223,
16,
474,
409,
4223,
16,
9056,
267,
8573,
63,
6487,
9056,
267,
10520,
63,
6487,
9056,
267,
4605,
63,
6487,
474,
3838,
382,
26540,
16... | ||
return message.replace('\u0002', '\n').replace('\u0003', '\r'); | return message.replace(LINE_SEP_DELIMITER_1, '\n').replace(LINE_SEP_DELIMITER_2, '\r'); | public static String replaceNewLineReplacer(String message) { if(null == message) { return message; } return message.replace('\u0002', '\n').replace('\u0003', '\r'); } | 50994 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50994/c70a9debafb066e6124205609109e49078e16d94/MessageHelper.java/buggy/src/main/org/testng/remote/strprotocol/MessageHelper.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
514,
1453,
31453,
30060,
12,
780,
883,
13,
288,
565,
309,
12,
2011,
422,
883,
13,
288,
1377,
327,
883,
31,
565,
289,
3639,
327,
883,
18,
2079,
12,
5997,
67,
28610,
67,
1972... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
514,
1453,
31453,
30060,
12,
780,
883,
13,
288,
565,
309,
12,
2011,
422,
883,
13,
288,
1377,
327,
883,
31,
565,
289,
3639,
327,
883,
18,
2079,
12,
5997,
67,
28610,
67,
1972... |
Object parent=null; if( parentWrapper!=null ) { parent=parentWrapper.getProxy(); } | public void onStartElement(String uri, String tag, String qname, Attributes attrs, AntXmlContext context) throws SAXParseException { RuntimeConfigurable parentWrapper=context.currentWrapper(); RuntimeConfigurable wrapper=null; /* UnknownElement is used for tasks and data types - with delayed eval */ UnknownElement task= new UnknownElement(qname); task.setProject(context.getProject()); //XXX task.setTaskType(qname); task.setTaskName(qname); Location location=new Location(context.locator.getSystemId(), context.locator.getLineNumber(), context.locator.getColumnNumber()); task.setLocation(location); task.setOwningTarget(context.currentTarget); context.configureId(task, attrs); Object parent=null; if( parentWrapper!=null ) { parent=parentWrapper.getProxy(); } if( parent != null ) { // Nested element ((UnknownElement)parent).addChild( task ); } else { // Task included in a target ( including the default one ). context.currentTarget.addTask( task ); } // container.addTask(task); // This is a nop in UE: task.init(); wrapper=new RuntimeConfigurable( task, task.getTaskName()); wrapper.setAttributes2(attrs); if (parentWrapper != null) { parentWrapper.addChild(wrapper); } context.pushWrapper( wrapper ); } | 639 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/639/594d2dd6c891e638a4a9ce006a8167594b0cabf6/ProjectHelper2.java/clean/src/main/org/apache/tools/ant/helper/ProjectHelper2.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
603,
1685,
1046,
12,
780,
2003,
16,
514,
1047,
16,
514,
12621,
16,
4766,
282,
9055,
3422,
16,
4766,
282,
18830,
4432,
1042,
819,
13,
5411,
1216,
10168,
13047,
3639,
288,
5411,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
603,
1685,
1046,
12,
780,
2003,
16,
514,
1047,
16,
514,
12621,
16,
4766,
282,
9055,
3422,
16,
4766,
282,
18830,
4432,
1042,
819,
13,
5411,
1216,
10168,
13047,
3639,
288,
5411,
... | |
return next.getForUpdate(); | return next.getForUpdate(DummyManagedObject.class); | public DummyManagedObject getNextForUpdate() { if (next == null) { return null; } else { return next.getForUpdate(); } } | 55380 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55380/468fd904132fe7f543e7cd90eed49c63132c4835/DummyManagedObject.java/buggy/test/server/j2se/com/sun/sgs/test/util/DummyManagedObject.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
28622,
10055,
921,
6927,
28431,
1435,
288,
202,
430,
261,
4285,
422,
446,
13,
288,
202,
565,
327,
446,
31,
202,
97,
469,
288,
202,
565,
327,
1024,
18,
588,
28431,
5621,
202,
97,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
28622,
10055,
921,
6927,
28431,
1435,
288,
202,
430,
261,
4285,
422,
446,
13,
288,
202,
565,
327,
446,
31,
202,
97,
469,
288,
202,
565,
327,
1024,
18,
588,
28431,
5621,
202,
97,
... |
valBuilder1.setToolTipText( Messages .getString( "HighlightRuleBuilderDialog.tooltip.ExpBuilder" ) ); | valBuilder1.setToolTipText( Messages.getString( "HighlightRuleBuilderDialog.tooltip.ExpBuilder" ) ); | protected Control createContents( Composite parent ) { GridData gdata; GridLayout glayout; createTitleArea( parent ); Composite composite = new Composite( parent, 0 ); glayout = new GridLayout( ); glayout.marginHeight = 0; glayout.marginWidth = 0; glayout.verticalSpacing = 0; composite.setLayout( glayout ); composite.setLayoutData( new GridData( GridData.FILL_BOTH ) ); applyDialogFont( composite ); initializeDialogUnits( composite ); Composite innerParent = (Composite) createDialogArea( composite ); createButtonBar( composite ); Label lb = new Label( innerParent, SWT.NONE ); lb.setText( Messages .getString( "HighlightRuleBuilderDialog.text.Condition" ) ); //$NON-NLS-1$ Composite condition = new Composite( innerParent, SWT.NONE ); condition.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) ); glayout = new GridLayout( 5, false ); condition.setLayout( glayout ); expression = new Combo( condition, SWT.NONE ); gdata = new GridData( ); gdata.widthHint = 100; expression.setLayoutData( gdata ); fillExpression( expression ); expression.addSelectionListener( new SelectionAdapter( ) { public void widgetSelected( SelectionEvent e ) { if ( expression.getText( ).equals( VALUE_OF_THIS_DATA_ITEM ) && designHandle instanceof DataItemHandle ) { expression .setText( DEUtil .getColumnExpression( ( (DataItemHandle) designHandle ) .getResultSetColumn( ) ) ); } updateButtons( ); } } ); expression.addModifyListener( new ModifyListener( ) { public void modifyText( ModifyEvent e ) { updateButtons( ); } } ); Button expBuilder = new Button( condition, SWT.PUSH ); expBuilder.setText( "..." ); //$NON-NLS-1$ gdata = new GridData( ); gdata.heightHint = 20; gdata.widthHint = 20; expBuilder.setLayoutData( gdata ); expBuilder.setToolTipText( Messages .getString( "HighlightRuleBuilderDialog.tooltip.ExpBuilder" ) ); //$NON-NLS-1$ expBuilder.addSelectionListener( new SelectionAdapter( ) { public void widgetSelected( SelectionEvent e ) { editValue( expression ); } } ); operator = new Combo( condition, SWT.READ_ONLY ); for ( int i = 0; i < OPERATOR.length; i++ ) { operator.add( OPERATOR[i][0] ); } operator.addSelectionListener( new SelectionAdapter( ) { public void widgetSelected( SelectionEvent e ) { String value = getValueForOperator( operator.getText( ) ); int vv = determineValueVisible( value ); if ( vv == 0 ) { value1.setVisible( false ); value2.setVisible( false ); valBuilder1.setVisible( false ); valBuilder2.setVisible( false ); andLable.setVisible( false ); } else if ( vv == 1 ) { value1.setVisible( true ); valBuilder1.setVisible( true ); value2.setVisible( false ); valBuilder2.setVisible( false ); andLable.setVisible( false ); } else if ( vv == 2 ) { value1.setVisible( true ); value2.setVisible( true ); valBuilder1.setVisible( true ); valBuilder2.setVisible( true ); andLable.setVisible( true ); } updateButtons( ); } } ); value1 = createText( condition ); value1.addModifyListener( new ModifyListener( ) { public void modifyText( ModifyEvent e ) { updateButtons( ); } } ); valBuilder1 = new Button( condition, SWT.PUSH ); valBuilder1.setText( "..." ); //$NON-NLS-1$ gdata = new GridData( ); gdata.heightHint = 20; gdata.widthHint = 20; valBuilder1.setLayoutData( gdata ); valBuilder1.setToolTipText( Messages .getString( "HighlightRuleBuilderDialog.tooltip.ExpBuilder" ) ); //$NON-NLS-1$ valBuilder1.addSelectionListener( new SelectionAdapter( ) { public void widgetSelected( SelectionEvent e ) { editValue( value1 ); } } ); createDummy( condition, 3 ); andLable = new Label( condition, SWT.NONE ); andLable.setText( Messages .getString( "HighlightRuleBuilderDialog.text.AND" ) ); //$NON-NLS-1$ andLable.setVisible( false ); createDummy( condition, 1 ); createDummy( condition, 3 ); value2 = createText( condition ); value2.addModifyListener( new ModifyListener( ) { public void modifyText( ModifyEvent e ) { updateButtons( ); } } ); value2.setVisible( false ); valBuilder2 = new Button( condition, SWT.PUSH ); valBuilder2.setText( "..." ); //$NON-NLS-1$ gdata = new GridData( ); gdata.heightHint = 20; gdata.widthHint = 20; valBuilder2.setLayoutData( gdata ); valBuilder2.setToolTipText( Messages .getString( "HighlightRuleBuilderDialog.tooltip.ExpBuilder" ) ); //$NON-NLS-1$ valBuilder2.addSelectionListener( new SelectionAdapter( ) { public void widgetSelected( SelectionEvent e ) { editValue( value2 ); } } ); valBuilder2.setVisible( false ); if ( operator.getItemCount( ) > 0 ) { operator.select( 0 ); } lb = new Label( innerParent, SWT.NONE ); lb.setText( Messages .getString( "HighlightRuleBuilderDialog.text.Format" ) ); //$NON-NLS-1$ Composite format = new Composite( innerParent, SWT.NONE ); format.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) ); glayout = new GridLayout( 7, false ); format.setLayout( glayout ); lb = new Label( format, 0 ); lb .setText( Messages .getString( "HighlightRuleBuilderDialog.text.Font" ) ); //$NON-NLS-1$ lb = new Label( format, 0 ); lb .setText( Messages .getString( "HighlightRuleBuilderDialog.text.Size" ) ); //$NON-NLS-1$ lb = new Label( format, 0 ); lb.setText( Messages .getString( "HighlightRuleBuilderDialog.text.Color" ) ); //$NON-NLS-1$ createDummy( format, 4 ); font = new Combo( format, SWT.READ_ONLY ); gdata = new GridData( ); gdata.widthHint = 100; font.setLayoutData( gdata ); IChoiceSet fontSet = ChoiceSetFactory.getElementChoiceSet( ReportDesignConstants.STYLE_ELEMENT, StyleHandle.FONT_FAMILY_PROP ); font.setData( fontSet ); font.setItems( ChoiceSetFactory.getDisplayNamefromChoiceSet( fontSet, new AlphabeticallyComparator( ) ) ); if ( SYSTEM_FONT_LIST != null && SYSTEM_FONT_LIST.length > 0 ) { for ( int i = 0; i < SYSTEM_FONT_LIST.length; i++ ) { font.add( SYSTEM_FONT_LIST[i] ); } } font.add( DEFAULT_CHOICE, 0 ); font.addSelectionListener( new SelectionAdapter( ) { public void widgetSelected( SelectionEvent e ) { updatePreview( ); } } ); if ( font.getItemCount( ) > 0 ) { font.select( 0 ); } size = new FontSizeBuilder( format, SWT.None ); if ( designHandle != null ) { size.setDefaultUnit( designHandle.getPropertyHandle( StyleHandle.FONT_SIZE_PROP ).getDefaultUnit( ) ); } gdata = new GridData( ); gdata.widthHint = 120; size.setLayoutData( gdata ); size.setFontSizeValue( null ); size.addListener( SWT.Modify, new Listener( ) { public void handleEvent( Event event ) { updatePreview( ); } } ); color = new ColorBuilder( format, 0 ); gdata = new GridData( ); gdata.widthHint = 50; color.setLayoutData( gdata ); color.setChoiceSet( ChoiceSetFactory.getElementChoiceSet( ReportDesignConstants.STYLE_ELEMENT, StyleHandle.COLOR_PROP ) ); color.setRGB( null ); color.addListener( SWT.Modify, new Listener( ) { public void handleEvent( Event event ) { previewLabel.setForeground( ColorManager.getColor( color .getRGB( ) ) ); previewLabel.redraw( ); } } ); Composite fstyle = new Composite( format, 0 ); gdata = new GridData( ); gdata.horizontalSpan = 4; fstyle.setLayoutData( gdata ); fstyle.setLayout( new GridLayout( 4, false ) ); bold = createToggleButton( fstyle ); bold.setImage( ReportPlatformUIImages .getImage( AttributeConstant.FONT_WIDTH ) ); bold.addSelectionListener( new SelectionAdapter( ) { public void widgetSelected( SelectionEvent e ) { isBoldChanged = true; updatePreview( ); } } ); bold.setToolTipText(Messages .getString("HighlightRuleBuilderDialog.tooltip.Bold")); italic = createToggleButton( fstyle ); italic.setImage( ReportPlatformUIImages .getImage( AttributeConstant.FONT_STYLE ) ); italic.addSelectionListener( new SelectionAdapter( ) { public void widgetSelected( SelectionEvent e ) { isItalicChanged = true; updatePreview( ); } } ); italic.setToolTipText(Messages .getString("HighlightRuleBuilderDialog.tooltip.Italic")); underline = createToggleButton( fstyle ); underline.setImage( ReportPlatformUIImages .getImage( AttributeConstant.TEXT_UNDERLINE ) ); underline.addSelectionListener( new SelectionAdapter( ) { public void widgetSelected( SelectionEvent e ) { isUnderlineChanged = true; previewLabel.setUnderline( underline.getSelection( ) ); previewLabel.redraw( ); } } ); underline.setToolTipText(Messages .getString("HighlightRuleBuilderDialog.tooltip.Underline")); linethrough = createToggleButton( fstyle ); linethrough.setImage( ReportPlatformUIImages .getImage( AttributeConstant.TEXT_LINE_THROUGH ) ); linethrough.addSelectionListener( new SelectionAdapter( ) { public void widgetSelected( SelectionEvent e ) { isLinethroughChanged = true; previewLabel.setLinethrough( linethrough.getSelection( ) ); previewLabel.redraw( ); } } ); linethrough .setToolTipText(Messages .getString("HighlightRuleBuilderDialog.tooltip.Text_Line_Through")); Composite back = new Composite( innerParent, SWT.NONE ); back.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) ); glayout = new GridLayout( 1, false ); back.setLayout( glayout ); lb = new Label( back, 0 ); lb .setText( Messages .getString( "HighlightRuleBuilderDialog.text.BackgroundColor" ) ); //$NON-NLS-1$ backColor = new ColorBuilder( back, 0 ); gdata = new GridData( ); gdata.widthHint = 50; backColor.setLayoutData( gdata ); backColor.setChoiceSet( ChoiceSetFactory.getElementChoiceSet( ReportDesignConstants.STYLE_ELEMENT, StyleHandle.BACKGROUND_COLOR_PROP ) ); backColor.setRGB( null ); backColor.addListener( SWT.Modify, new Listener( ) { public void handleEvent( Event event ) { previewLabel.setBackground( ColorManager.getColor( backColor .getRGB( ) ) ); previewLabel.redraw( ); } } ); Composite preview = new Composite( innerParent, SWT.NONE ); glayout = new GridLayout( ); preview.setLayout( glayout ); gdata = new GridData( GridData.FILL_BOTH ); preview.setLayoutData( gdata ); lb = new Label( preview, SWT.NONE ); lb.setText( Messages .getString( "HighlightRuleBuilderDialog.text.Preview" ) ); //$NON-NLS-1$ Composite previewPane = new Composite( preview, SWT.BORDER ); glayout = new GridLayout( ); glayout.marginWidth = 0; glayout.marginHeight = 0; previewPane.setLayout( glayout ); gdata = new GridData( GridData.FILL_BOTH ); gdata.heightHint = 60; previewPane.setLayoutData( gdata ); previewLabel = new PreviewLabel( previewPane, 0 ); previewLabel.setText( Messages .getString( "HighlightRuleBuilderDialog.text.PreviewContent" ) ); //$NON-NLS-1$ gdata = new GridData( GridData.FILL_BOTH ); previewLabel.setLayoutData( gdata ); updatePreview( ); lb = new Label( innerParent, SWT.SEPARATOR | SWT.HORIZONTAL ); lb.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) ); syncViewProperties( ); updatePreview( ); updateButtons( ); return composite; } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/1cbdabafb0e6f5e8a50eeb05f5cc3d2a2fff1551/HighlightRuleBuilder.java/buggy/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/ui/dialogs/HighlightRuleBuilder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
8888,
752,
6323,
12,
14728,
982,
262,
202,
95,
202,
202,
6313,
751,
314,
892,
31,
202,
202,
6313,
3744,
5118,
2012,
31,
202,
202,
2640,
4247,
5484,
12,
982,
11272,
202,
202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
8888,
752,
6323,
12,
14728,
982,
262,
202,
95,
202,
202,
6313,
751,
314,
892,
31,
202,
202,
6313,
3744,
5118,
2012,
31,
202,
202,
2640,
4247,
5484,
12,
982,
11272,
202,
202,
... |
private static void showVersion() { System.out.print("ruby "); System.out.print(Constants.RUBY_VERSION); System.out.print(" ("); System.out.print(Constants.COMPILE_DATE); System.out.print(") ["); System.out.print("java"); System.out.println("]"); | private void showVersion() { out.print("ruby "); out.print(Constants.RUBY_VERSION); out.print(" ("); out.print(Constants.COMPILE_DATE); out.print(") ["); out.print("java"); out.println("]"); | private static void showVersion() { System.out.print("ruby "); System.out.print(Constants.RUBY_VERSION); System.out.print(" ("); System.out.print(Constants.COMPILE_DATE); System.out.print(") ["); System.out.print("java"); System.out.println("]"); } | 47134 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47134/b4a189a27604d62c317938f16a124fb9dab1e94a/Main.java/clean/src/org/jruby/Main.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
918,
2405,
1444,
1435,
288,
3639,
2332,
18,
659,
18,
1188,
2932,
27768,
315,
1769,
3639,
2332,
18,
659,
18,
1188,
12,
2918,
18,
54,
3457,
61,
67,
5757,
1769,
3639,
2332,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
918,
2405,
1444,
1435,
288,
3639,
2332,
18,
659,
18,
1188,
2932,
27768,
315,
1769,
3639,
2332,
18,
659,
18,
1188,
12,
2918,
18,
54,
3457,
61,
67,
5757,
1769,
3639,
2332,
18,
... |
lVar = (OptLocalVariable) vars.getVariable(child.getString()); | lVar = OptLocalVariable.get(vars, child.getString()); | private void visitIncDec(Node node, boolean isInc) { Node child = node.getFirstChild(); if (node.getIntProp(Node.ISNUMBER_PROP, -1) != -1) { OptLocalVariable lVar = (OptLocalVariable)(child.getProp(Node.VARIABLE_PROP)); if (lVar.getJRegister() == -1) lVar.assignJRegister(getNewWordPairLocal()); dload(lVar.getJRegister()); addByteCode(ByteCode.DUP2); push(1.0); addByteCode((isInc) ? ByteCode.DADD : ByteCode.DSUB); dstore(lVar.getJRegister()); } else { OptLocalVariable lVar = (OptLocalVariable)(child.getProp(Node.VARIABLE_PROP)); String routine = (isInc) ? "postIncrement" : "postDecrement"; if (hasVarsInRegs && child.getType() == TokenStream.GETVAR) { if (lVar == null) lVar = (OptLocalVariable) vars.getVariable(child.getString()); if (lVar.getJRegister() == -1) lVar.assignJRegister(getNewWordLocal()); aload(lVar.getJRegister()); addByteCode(ByteCode.DUP); addScriptRuntimeInvoke(routine, "(Ljava/lang/Object;)", "Ljava/lang/Object;"); astore(lVar.getJRegister()); } else { if (child.getType() == TokenStream.GETPROP) { Node getPropChild = child.getFirstChild(); generateCodeFromNode(getPropChild, node, -1, -1); generateCodeFromNode(getPropChild.getNextSibling(), node, -1, -1); aload(variableObjectLocal); addScriptRuntimeInvoke(routine, "(Ljava/lang/Object;Ljava/lang/String;" + "Lorg/mozilla/javascript/Scriptable;)", "Ljava/lang/Object;"); } else { if (child.getType() == TokenStream.GETELEM) { routine += "Elem"; Node getPropChild = child.getFirstChild(); generateCodeFromNode(getPropChild, node, -1, -1); generateCodeFromNode(getPropChild.getNextSibling(), node, -1, -1); aload(variableObjectLocal); addScriptRuntimeInvoke(routine, "(Ljava/lang/Object;Ljava/lang/Object;" + "Lorg/mozilla/javascript/Scriptable;)", "Ljava/lang/Object;"); } else { aload(variableObjectLocal); push(child.getString()); // push name addScriptRuntimeInvoke(routine, "(Lorg/mozilla/javascript/Scriptable;Ljava/lang/String;)", "Ljava/lang/Object;"); } } } } } | 51996 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51996/e497d2b898e781a5052344191ab878cd469f3f53/Codegen.java/clean/js/rhino/src/org/mozilla/javascript/optimizer/Codegen.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
3757,
14559,
1799,
12,
907,
756,
16,
1250,
8048,
71,
13,
565,
288,
3639,
2029,
1151,
273,
756,
18,
588,
3759,
1763,
5621,
3639,
309,
261,
2159,
18,
588,
1702,
4658,
12,
907,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
14559,
1799,
12,
907,
756,
16,
1250,
8048,
71,
13,
565,
288,
3639,
2029,
1151,
273,
756,
18,
588,
3759,
1763,
5621,
3639,
309,
261,
2159,
18,
588,
1702,
4658,
12,
907,
... |
String outRate = _context.router().getConfigSetting(ConfigNetHelper.PROP_OUTBOUND_KBPS); | String outBurstRate = _context.router().getConfigSetting(ConfigNetHelper.PROP_OUTBOUND_BURST_KBPS); | private void updateRates() { boolean updated = false; if ( (_inboundRate != null) && (_inboundRate.length() > 0) ) { _context.router().setConfigSetting(ConfigNetHelper.PROP_INBOUND_KBPS, _inboundRate); updated = true; } if ( (_outboundRate != null) && (_outboundRate.length() > 0) ) { _context.router().setConfigSetting(ConfigNetHelper.PROP_OUTBOUND_KBPS, _outboundRate); updated = true; } String inRate = _context.router().getConfigSetting(ConfigNetHelper.PROP_INBOUND_KBPS); if (_inboundBurst != null) { int rateKBps = 0; int burstSeconds = 0; try { rateKBps = Integer.parseInt(inRate); burstSeconds = Integer.parseInt(_inboundBurst); } catch (NumberFormatException nfe) { // ignore } if ( (rateKBps > 0) && (burstSeconds > 0) ) { int kb = rateKBps * burstSeconds; _context.router().setConfigSetting(ConfigNetHelper.PROP_INBOUND_BURST, "" + kb); updated = true; } } String outRate = _context.router().getConfigSetting(ConfigNetHelper.PROP_OUTBOUND_KBPS); if (_outboundBurst != null) { int rateKBps = 0; int burstSeconds = 0; try { rateKBps = Integer.parseInt(outRate); burstSeconds = Integer.parseInt(_outboundBurst); } catch (NumberFormatException nfe) { // ignore } if ( (rateKBps > 0) && (burstSeconds > 0) ) { int kb = rateKBps * burstSeconds; _context.router().setConfigSetting(ConfigNetHelper.PROP_OUTBOUND_BURST, "" + kb); updated = true; } } if (updated) addFormNotice("Updated bandwidth limits"); } | 27437 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/27437/a8ecd32b45f5e68ac3be2a5c95f667f1c40146f4/ConfigNetHandler.java/clean/apps/routerconsole/java/src/net/i2p/router/web/ConfigNetHandler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1089,
20836,
1435,
288,
3639,
1250,
3526,
273,
629,
31,
3639,
309,
261,
261,
67,
267,
3653,
4727,
480,
446,
13,
597,
261,
67,
267,
3653,
4727,
18,
2469,
1435,
405,
374,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1089,
20836,
1435,
288,
3639,
1250,
3526,
273,
629,
31,
3639,
309,
261,
261,
67,
267,
3653,
4727,
480,
446,
13,
597,
261,
67,
267,
3653,
4727,
18,
2469,
1435,
405,
374,
13,
... |
public void paintComponent(Graphics g) { int numstate; JState current, endState; Object[] states; LinkedList<JState> currentList; ListIterator<JState> currentTarget; Point startLoc, endLoc; numstate = getComponentCountInLayer(STATE_LAYER); states = getComponentsInLayer(STATE_LAYER); for (int i = 0 ; i < numstate ; i++ ) { current = (JState)states[i]; | public void paintComponent(Graphics gr) { int numstate; JState current, endState; Object[] states; LinkedList<JState> currentList; ListIterator<JState> currentTarget; Point startLoc, endLoc; Graphics2D g = (Graphics2D)gr; numstate = getComponentCountInLayer(STATE_LAYER); states = getComponentsInLayer(STATE_LAYER); for (int i = 0 ; i < numstate ; i++ ) { current = (JState)states[i]; | public void paintComponent(Graphics g) { int numstate; JState current, endState; Object[] states; LinkedList<JState> currentList; ListIterator<JState> currentTarget; Point startLoc, endLoc; numstate = getComponentCountInLayer(STATE_LAYER); states = getComponentsInLayer(STATE_LAYER); for (int i = 0 ; i < numstate ; i++ ) { current = (JState)states[i]; current.setTransDrawn(false); } // wir holen uns bereits hier die Farben aus dem Optionsobjekt // um unntigen Methodenaufruf-Overhead in drawTransitions zu vermeiden charColour = VFSAGUI.options.getCharCol(); lineColour = VFSAGUI.options.getLineCol(); for (int i = 0 ; i < numstate ; i++ ) { current = (JState)states[i]; drawTransitions(current, g); current.setTransDrawn(true); } } | 11750 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11750/36ae550a98e77afb5a18157cf7613b9c6bfb13aa/AutWindow.java/buggy/src/gui/AutWindow.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
12574,
1841,
12,
17558,
314,
13,
288,
202,
474,
818,
2019,
31,
202,
46,
1119,
783,
16,
679,
1119,
31,
202,
921,
8526,
5493,
31,
202,
13174,
682,
32,
46,
1119,
34,
783,
682,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12574,
1841,
12,
17558,
314,
13,
288,
202,
474,
818,
2019,
31,
202,
46,
1119,
783,
16,
679,
1119,
31,
202,
921,
8526,
5493,
31,
202,
13174,
682,
32,
46,
1119,
34,
783,
682,... |
recv.getRuntime().getRuntime().setTraceFunction((RubyProc) trace_func); | public static IRubyObject set_trace_func(IRubyObject recv, IRubyObject trace_func) { if (trace_func.isNil()) { recv.getRuntime().getRuntime().setTraceFunction(null); } else if (!(trace_func instanceof RubyProc)) { throw new TypeError(recv.getRuntime(), "trace_func needs to be Proc."); } recv.getRuntime().getRuntime().setTraceFunction((RubyProc) trace_func); return trace_func; } | 45753 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45753/7b41d102019836c9a5ec6884b2d9b9380f9853a7/KernelModule.java/buggy/org/jruby/KernelModule.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
15908,
10340,
921,
444,
67,
5129,
67,
644,
12,
7937,
10340,
921,
10665,
16,
15908,
10340,
921,
2606,
67,
644,
13,
288,
3639,
309,
261,
5129,
67,
644,
18,
291,
12616,
10756,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
15908,
10340,
921,
444,
67,
5129,
67,
644,
12,
7937,
10340,
921,
10665,
16,
15908,
10340,
921,
2606,
67,
644,
13,
288,
3639,
309,
261,
5129,
67,
644,
18,
291,
12616,
10756,
2... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.