rem stringlengths 1 226k | add stringlengths 0 227k | context stringlengths 6 326k | meta stringlengths 143 403 | input_ids listlengths 256 256 | attention_mask listlengths 256 256 | labels listlengths 128 128 |
|---|---|---|---|---|---|---|
for (int i = 0; i < references.length; i++) | for (int i = 0; i < references.length; i++) { | private void doOpenWithReferences(IProject project, IProgressMonitor monitor) throws CoreException { if (!project.exists() || project.isOpen()) return; project.open(new SubProgressMonitor(monitor, 1000)); IProject[] references = project.getReferencedProjects(); for (int i = 0; i < references.length; i++) doOpenWithReferences(references[i], monitor); } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/e38d295ea613cf9f08aadb93a84a33d2e91abc5f/OpenResourceAction.java/clean/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/OpenResourceAction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
1152,
918,
741,
3678,
1190,
8221,
12,
45,
4109,
1984,
16,
6862,
202,
45,
5491,
7187,
6438,
13,
1216,
30015,
288,
9506,
202,
430,
16051,
4406,
18,
1808,
1435,
747,
1984,
18,
291,
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,
1875,
202,
1152,
918,
741,
3678,
1190,
8221,
12,
45,
4109,
1984,
16,
6862,
202,
45,
5491,
7187,
6438,
13,
1216,
30015,
288,
9506,
202,
430,
16051,
4406,
18,
1808,
1435,
747,
1984,
18,
291,
3... |
public void start() throws FetchException { | public synchronized void start() throws FetchException { | public void start() throws FetchException { try { currentState = SingleFileFetcher.create(this, this, new ClientMetadata(), uri, ctx, actx, ctx.maxNonSplitfileRetries, 0, false, null, true, returnBucket); if(currentState != null) currentState.schedule(); } catch (MalformedURLException e) { throw new FetchException(FetchException.INVALID_URI, e); } } | 50619 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50619/a6a9cc01004d94d4bdefc0b76c0bdb1962187369/ClientGetter.java/clean/src/freenet/client/async/ClientGetter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
787,
1435,
1216,
8065,
503,
288,
202,
202,
698,
288,
1082,
202,
2972,
1119,
273,
10326,
812,
16855,
18,
2640,
12,
2211,
16,
333,
16,
394,
2445,
2277,
9334,
6862,
202,
165... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
787,
1435,
1216,
8065,
503,
288,
202,
202,
698,
288,
1082,
202,
2972,
1119,
273,
10326,
812,
16855,
18,
2640,
12,
2211,
16,
333,
16,
394,
2445,
2277,
9334,
6862,
202,
165... |
slaveServer = new SlaveServer("http: | public void clear() { setID(-1L); databases = new ArrayList(); steps = new ArrayList(); hops = new ArrayList(); notes = new ArrayList(); dependencies = new ArrayList(); partitionSchemas = new ArrayList(); name = null; filename = null; readStep = null; writeStep = null; inputStep = null; outputStep = null; updateStep = null; logTable = null; logConnection = null; sizeRowset = Const.ROWS_IN_ROWSET; sleepTimeEmpty = Const.SLEEP_EMPTY_NANOS; sleepTimeFull = Const.SLEEP_FULL_NANOS; maxDateConnection = null; maxDateTable = null; maxDateField = null; maxDateOffset = 0.0; maxDateDifference = 0.0; undo = new ArrayList(); max_undo = Const.MAX_UNDO; undo_position = -1; counters = new Hashtable(); resultRows = null; clearUndo(); clearChanged(); useBatchId = true; // Make this one the default from now on... logfieldUsed = false; // Don't use the log-field by default... modifiedUser = "-"; //$NON-NLS-1$ modifiedDate = new Value("modified_date", new Date()); //$NON-NLS-1$ // LOAD THE DATABASE CACHE! dbCache = DBCache.getInstance(); directoryTree = new RepositoryDirectory(); // Default directory: root directory = directoryTree; resultRows = new ArrayList(); resultFiles = new ArrayList(); feedbackShown = true; feedbackSize = Const.ROWS_UPDATE; // setInternalKettleVariables(); Don't clear the internal variables for ad-hoc transformations, it's ruines the previews } | 9547 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9547/7990f71cb7a895462621752012cc61e327c00fba/TransMeta.java/clean/src/be/ibridge/kettle/trans/TransMeta.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
11735,
2081,
273,
394,
9708,
836,
2081,
2932,
2505,
30,
11735,
2081,
273,
394,
9708,
836,
2081,
2932,
2505,
30,
11735,
2081,
273,
394,
9708,
836,
2081,
2932,
2505,
30,
11735,
2081,
273,
394,
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,
11735,
2081,
273,
394,
9708,
836,
2081,
2932,
2505,
30,
11735,
2081,
273,
394,
9708,
836,
2081,
2932,
2505,
30,
11735,
2081,
273,
394,
9708,
836,
2081,
2932,
2505,
30,
11735,
2081,
273,
394,
9... | |
tag.put("checked", "checked"); | if (uuid.equals(input[i])) { tag.put("checked", "checked"); } | protected void onComponentTag(final ComponentTag tag) { // Default handling for component tag super.onComponentTag(tag); // must be attached to <input type="checkbox" .../> tag checkComponentTag(tag, "input"); checkComponentTagAttribute(tag, "type", "checkbox"); CheckGroup group = (CheckGroup)findParent(CheckGroup.class); String path = getPath(); if (group == null) { throw new WicketRuntimeException( "Check component [" + path + "] cannot find its parent CheckGroup. All Check components must be a child of or below in the hierarchy of a CheckGroup component."); } String relativePath = path.substring(group.getPath().length() + 1); // assign name and value tag.put("name", group.getInputName()); tag.put("value", relativePath); // check if the model collection of the group contains the model object. // if it does check the check box. Collection collection = (Collection)group.getModelObject(); // check for npe in group's model object if (collection == null) { throw new WicketRuntimeException( "CheckGroup [" + group.getPath() + "] contains a null model object, must be an object of type java.util.Collection"); } if (group.hasRawInput()) { String rawInput = group.getRawInput(); if (rawInput != null && rawInput.indexOf(relativePath) != -1) { tag.put("checked", "checked"); } } else if (collection.contains(getModelObject())) { tag.put("checked", "checked"); } if (group.wantOnSelectionChangedNotifications()) { // url that points to this components IOnChangeListener method final CharSequence url = group.urlFor(IOnChangeListener.INTERFACE); Form form = (Form)group.findParent(Form.class); if (form != null) { tag.put("onclick", form.getJsForInterfaceUrl(url)); } else { // NOTE: do not encode the url as that would give invalid // JavaScript tag.put("onclick", "window.location.href='" + url + "&" + group.getInputName() + "=' + this.value;"); } } if (!isActionAuthorized(ENABLE) || !isEnabled() || !group.isEnabled()) { tag.put(ATTR_DISABLED, ATTR_DISABLED); } } | 46434 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46434/e3fa48d0793cd702937bc7ddf5cfc1267fc9de59/Check.java/clean/wicket/src/main/java/wicket/markup/html/form/Check.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
603,
1841,
1805,
12,
6385,
5435,
1805,
1047,
13,
202,
95,
202,
202,
759,
2989,
5057,
364,
1794,
1047,
202,
202,
9565,
18,
265,
1841,
1805,
12,
2692,
1769,
202,
202,
759,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
603,
1841,
1805,
12,
6385,
5435,
1805,
1047,
13,
202,
95,
202,
202,
759,
2989,
5057,
364,
1794,
1047,
202,
202,
9565,
18,
265,
1841,
1805,
12,
2692,
1769,
202,
202,
759,... |
/* else if(bmsg.getWhat() == BufferUpdate.SAVED) { maybeReloadDirectory(MiscUtilities.getParentOfPath( bmsg.getBuffer().getPath())); } */ | public void handleMessage(EBMessage msg) { if(msg instanceof PropertiesChanged) propertiesChanged(); else if(msg instanceof BufferUpdate) { BufferUpdate bmsg = (BufferUpdate)msg; if(bmsg.getWhat() == BufferUpdate.CREATED || bmsg.getWhat() == BufferUpdate.CLOSED) browserView.updateFileView(); // hacked BufferIORequest to send VFSUpdates in case // two stage save is off now... /* else if(bmsg.getWhat() == BufferUpdate.SAVED) { maybeReloadDirectory(MiscUtilities.getParentOfPath( bmsg.getBuffer().getPath())); } */ } else if(msg instanceof PluginUpdate) { PluginUpdate pmsg = (PluginUpdate)msg; if(pmsg.getWhat() == PluginUpdate.LOADED || pmsg.getWhat() == PluginUpdate.UNLOADED) { plugins.updatePopupMenu(); } } else if(msg instanceof VFSUpdate) { maybeReloadDirectory(((VFSUpdate)msg).getPath()); } } //}}} | 8690 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8690/f01bed666b849058464ee055f4009058c66ec946/VFSBrowser.java/buggy/org/gjt/sp/jedit/browser/VFSBrowser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1640,
1079,
12,
29258,
1079,
1234,
13,
202,
95,
202,
202,
430,
12,
3576,
1276,
6183,
5033,
13,
1082,
202,
4738,
5033,
5621,
202,
202,
12107,
309,
12,
3576,
1276,
3525,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1640,
1079,
12,
29258,
1079,
1234,
13,
202,
95,
202,
202,
430,
12,
3576,
1276,
6183,
5033,
13,
1082,
202,
4738,
5033,
5621,
202,
202,
12107,
309,
12,
3576,
1276,
3525,
18... | |
public static void generateGlueCodeForJNIMethod(VM_Assembler asm, VM_Method mth) { int offset; asm.emitSTAddrU(FP,-JNI_GLUE_FRAME_SIZE,FP); // buy the glue frame // we may need to save CR in the previous frame also if CR will be used // CR is to be saved at FP+4 in the previous frame // Here we check if this is a JNI function that takes the vararg in the ... style // This includes CallStatic<type>Method, Call<type>Method, CallNonVirtual<type>Method // For these calls, the vararg starts at the 4th or 5th argument (GPR 6 or 7) // So, we save the GPR 6-10 and FPR 1-3 in a volatile register save area // in the glue stack frame so that the JNI function can later repackage the arguments // based on the parameter types of target method to be invoked. // (For long argument lists, the additional arguments, have been saved in // the spill area of the OS caller, and will be retrieved from there.) // // If we are compiling such a JNI Function, then emit the code to store // GPR 4-10 and FPR 1-6 into the volatile save area. String mthName = mth.getName().toString(); if ((mthName.startsWith("Call") && mthName.endsWith("Method")) || mthName.equals("NewObject")) { //-#if RVM_WITH_POWEROPEN_ABI offset = STACKFRAME_HEADER_SIZE + 3*BYTES_IN_STACKSLOT; // skip over slots for GPR 3-5 for (int i = 6; i <= 10; i++ ) { asm.emitSTAddr(i, offset, FP); offset+=BYTES_IN_ADDRESS; } // store FPRs 1-3 in first 3 slots of volatile FPR save area for (int i = 1; i <= 3; i++) { asm.emitSTFD (i, offset, FP); offset+=BYTES_IN_DOUBLE; } //-#elif RVM_WITH_SVR4_ABI || RVM_WITH_MACH_O_ABI // save all parameter registers offset = STACKFRAME_HEADER_SIZE + 0; for (int i=FIRST_OS_PARAMETER_GPR; i<=LAST_OS_PARAMETER_GPR; i++) { asm.emitSTAddr(i, offset, FP); offset += BYTES_IN_ADDRESS; } for (int i =FIRST_OS_PARAMETER_FPR; i<=LAST_OS_PARAMETER_FPR; i++) { asm.emitSTFD(i, offset, FP); offset += BYTES_IN_DOUBLE; } //-#endif } else { //-#if RVM_WITH_SVR4_ABI || RVM_WITH_MACH_O_ABI // adjust register contents (following SVR4 ABI) for normal JNI functions // especially dealing with long, spills // number of parameters of normal JNI functions should fix in // r3 - r12, f1 - f15, + 24 words, convertParametersFromSVR4ToJava(asm, mth); //-#endif } // Save AIX non-volatile GPRs that will not be saved and restored by RVM. // offset = STACKFRAME_HEADER_SIZE + JNI_GLUE_SAVED_VOL_SIZE; // skip 20 word volatile reg save area for (int i = FIRST_RVM_RESERVED_NV_GPR; i <=LAST_RVM_RESERVED_NV_GPR; i++) { asm.emitSTAddr(i, offset, FP); offset += BYTES_IN_ADDRESS; } // set the method ID for the glue frame // and save the return address in the previous frame // asm.emitLVAL(S0, INVISIBLE_METHOD_ID); asm.emitMFLR(REGISTER_ZERO); asm.emitSTW (S0, STACKFRAME_METHOD_ID_OFFSET, FP); asm.emitSTAddr(REGISTER_ZERO, JNI_GLUE_FRAME_SIZE + STACKFRAME_NEXT_INSTRUCTION_OFFSET, FP); // Attempt to change the vpStatus of the current Processor to IN_JAVA // // on entry T0 = JNIEnv* which is an interior pointer to this thread's VM_JNIEnvironment. // We first adjust this in place to be a pointer to a VM_JNIEnvironment and then use // it to acquire PROCESSOR_REGISTER (and JTOC on OSX/Linux). // // AIX non volatile gprs 13-16 have been saved & are available (also gprs 11-13 can be used). // S0=13, S1=14, TI=15, PROCESSOR_REGISTER=16 are available (&have labels) for changing state. // we leave the passed arguments untouched, unless we are blocked and have to call sysVirtualProcessorYield // Map from JNIEnv* to VM_JNIEnvironment. // Must do this outside the loop as we need to do it exactly once. asm.emitADDI (T0, -VM_Entrypoints.JNIExternalFunctionsField.getOffset(), T0); int retryLoop = asm.getMachineCodeIndex(); // acquire Jikes RVM PROCESSOR_REGISTER (and JTOC OSX/Linux only). asm.emitLAddr(PROCESSOR_REGISTER, VM_Entrypoints.JNIEnvSavedPRField.getOffset(), T0); //-#if RVM_WITH_SVR4_ABI || RVM_WITH_MACH_O_ABI // on AIX JTOC is part of AIX Linkage triplet and this already set by our caller. // Thus, we only need this load on non-AIX platforms asm.emitLAddr(JTOC, VM_Entrypoints.JNIEnvSavedJTOCField.getOffset(), T0); //-#endif asm.emitLVAL (S1, VM_Entrypoints.vpStatusField.getOffset()); asm.emitLWARX (S0, S1, PROCESSOR_REGISTER); // get status for processor asm.emitCMPI (S0, VM_Processor.BLOCKED_IN_NATIVE); // check if GC in progress, blocked in native mode VM_ForwardReference frBlocked = asm.emitForwardBC(EQ); asm.emitLVAL (S0, VM_Processor.IN_JAVA); // S0 <- new state value asm.emitSTWCXr(S0, S1, PROCESSOR_REGISTER); // attempt to change state to IN_JAVA asm.emitBC (NE, retryLoop); // br if failure -retry lwarx by jumping to label0 VM_ForwardReference frInJava = asm.emitForwardB(); // branch around code to call sysYield // branch to here if blocked in native, call sysVirtualProcessorYield (pthread yield) // must save volatile gprs & fprs before the call and restore after // frBlocked.resolve(asm); offset = STACKFRAME_HEADER_SIZE; // save volatile GPRS 3-10 for (int i = FIRST_OS_PARAMETER_GPR; i <= LAST_OS_PARAMETER_GPR; i++) { asm.emitSTAddr(i, offset, FP); offset+=BYTES_IN_ADDRESS; } // save volatile FPRS 1-6 for (int i = FIRST_OS_PARAMETER_FPR; i <= LAST_OS_VARARG_PARAMETER_FPR; i++) { asm.emitSTFD (i, offset, FP); offset+=BYTES_IN_DOUBLE; } asm.emitLAddr(S1, VM_Entrypoints.the_boot_recordField.getOffset(), JTOC); // get boot record address asm.emitMR (PROCESSOR_REGISTER, JTOC); // save JTOC so we can restore below asm.emitLAddr(JTOC, VM_Entrypoints.sysTOCField.getOffset(), S1); // load TOC for syscalls from bootrecord asm.emitLAddr(KLUDGE_TI_REG, VM_Entrypoints.sysVirtualProcessorYieldIPField.getOffset(), S1); // load addr of function asm.emitMTLR (KLUDGE_TI_REG); asm.emitBCLRL(); // call sysVirtualProcessorYield in sys.C asm.emitMR (JTOC, PROCESSOR_REGISTER); // restore JTOC // restore the saved volatile GPRs 3-10 and FPRs 1-6 offset = STACKFRAME_HEADER_SIZE; // restore volatile GPRS 3-10 for (int i = FIRST_OS_PARAMETER_GPR; i <= LAST_OS_PARAMETER_GPR; i++) { asm.emitLAddr (i, offset, FP); offset+=BYTES_IN_ADDRESS; } // restore volatile FPRS 1-6 for (int i = FIRST_OS_PARAMETER_FPR; i <= LAST_OS_VARARG_PARAMETER_FPR; i++) { asm.emitLFD (i, offset, FP); offset+=BYTES_IN_DOUBLE; } asm.emitB (retryLoop); // br back to label0 to try lwarx again // NOW_IN_JAVA: // JTOC, and PR are all as Jikes RVM expects them; // params are where the Jikes RVM calling conventions expects them. // frInJava.resolve(asm); // get pointer to top java frame from JNIEnv, compute offset from current // frame pointer (offset to avoid more interior pointers) and save offset // in this glue frame // asm.emitLAddr (S0, VM_Entrypoints.JNITopJavaFPField.getOffset(), T0); // get addr of top java frame from JNIEnv asm.emitSUBFC (S0, FP, S0); // S0 <- offset from current FP // AIX -4, LINUX - 8 asm.emitSTW(S0, JNI_GLUE_FRAME_SIZE + JNI_GLUE_OFFSET_TO_PREV_JFRAME, FP); // store offset at end of glue frame // BRANCH TO THE PROLOG FOR THE JNI FUNCTION VM_ForwardReference frNormalPrologue = asm.emitForwardBL(); // relative branch and link past the following epilog, to the normal prolog of the method // the normal epilog of the method will return to the epilog here to pop the glue stack frame // RETURN TO HERE FROM EPILOG OF JNI FUNCTION // CAUTION: START OF EPILOG OF GLUE CODE // The section of code from here to "END OF EPILOG OF GLUE CODE" is nestled between // the glue code prolog and the real body of the JNI method. // T0 & T1 (R3 & R4) or F1 contain the return value from the function - DO NOT USE // assume: JTOC and PROCESSOR_REG are valid, and all RVM non-volatile // GPRs and FPRs have been restored. Our processor state will be IN_JAVA. // establish T2 -> current thread's VM_JNIEnvironment, from activeThread field // of current processor asm.emitLAddr(T2, VM_Entrypoints.activeThreadField.getOffset(), PROCESSOR_REGISTER); // T2 <- activeThread of PR asm.emitLAddr(T2, VM_Entrypoints.jniEnvField.getOffset(), T2); // T2 <- JNIEnvironment // before returning to C, set pointer to top java frame in JNIEnv, using offset // saved in this glue frame during transition from C to Java. GC will use this saved // frame pointer if it is necessary to do GC with a processors active thread // stuck (and blocked) in native C, ie. GC starts scanning the threads stack at that frame. // AIX -4, LINUX -8 asm.emitLInt (T3, JNI_GLUE_FRAME_SIZE + JNI_GLUE_OFFSET_TO_PREV_JFRAME, FP); // load offset from FP to top java frame asm.emitADD (T3, FP, T3); // T3 <- address of top java frame asm.emitSTAddr(T3, VM_Entrypoints.JNITopJavaFPField.getOffset(), T2); // store TopJavaFP back into JNIEnv // check to see if this frame address is the sentinel since there // may be no further Java frame below asm.emitCMPAddrI(T3, VM_Constants.STACKFRAME_SENTINEL_FP.toInt()); VM_ForwardReference fr4 = asm.emitForwardBC(EQ); asm.emitLAddr(S0, 0, T3); // get fp for caller of prev J to C transition frame fr4.resolve(asm); // store current PR into VM_JNIEnvironment; we may have switched PRs while in Java mode. asm.emitSTAddr(PROCESSOR_REGISTER, VM_Entrypoints.JNIEnvSavedPRField.getOffset(), T2); // change the state of the VP to IN_NATIVE. // asm.emitLVAL (S0, VM_Processor.IN_NATIVE); asm.emitSTW (S0, VM_Entrypoints.vpStatusField.getOffset(), PROCESSOR_REGISTER); // Restore those AIX nonvolatile registers saved in the prolog above // Here we only save & restore ONLY those registers not restored by RVM // offset = STACKFRAME_HEADER_SIZE + JNI_GLUE_SAVED_VOL_SIZE; // skip 20 word volatile reg save area for (int i = FIRST_RVM_RESERVED_NV_GPR; i <=LAST_RVM_RESERVED_NV_GPR; i++) { asm.emitLAddr (i, offset, FP); // 4 instructions offset += BYTES_IN_ADDRESS; } // pop frame asm.emitADDI(FP, JNI_GLUE_FRAME_SIZE, FP); // load return address & return to caller // T0 & T1 (or F1) should still contain the return value // asm.emitLAddr(T2, STACKFRAME_NEXT_INSTRUCTION_OFFSET, FP); asm.emitMTLR(T2); asm.emitBCLR (); // branch always, through link register // END OF EPILOG OF GLUE CODE; rest of method generated by VM_Compiler from bytecodes of method in VM_JNIFunctions frNormalPrologue.resolve(asm); } | 5245 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5245/b910a39ad6845b8a14a18f9fcf248a47452b8dc8/VM_JNICompiler.java/buggy/rvm/src/vm/arch/powerPC/jni/VM_JNICompiler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
918,
2103,
21308,
344,
1085,
1290,
46,
50,
45,
1305,
12,
7397,
67,
1463,
5747,
749,
20415,
16,
8251,
67,
1305,
312,
451,
13,
288,
565,
509,
1384,
31,
565,
20415,
18,
18356,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2103,
21308,
344,
1085,
1290,
46,
50,
45,
1305,
12,
7397,
67,
1463,
5747,
749,
20415,
16,
8251,
67,
1305,
312,
451,
13,
288,
565,
509,
1384,
31,
565,
20415,
18,
18356,
... | ||
return astFactory.createExpression( scope, IASTExpression.Kind.PRIMARY_STRING_LITERAL, null, null, null, null, null, t.getImage(), null ); | return astFactory.createExpression( scope, IASTExpression.Kind.PRIMARY_STRING_LITERAL, null, null, null, null, t.getImage(), null ); | protected IASTExpression primaryExpression( IASTScope scope ) throws Backtrack { IToken t = null; switch (LT(1)) { // TO DO: we need more literals... case IToken.tINTEGER : t = consume(); try { return astFactory.createExpression( scope, IASTExpression.Kind.PRIMARY_INTEGER_LITERAL, null, null, null, null, null, t.getImage(), null); } catch (ASTSemanticException e1) { failParse(); throw backtrack; } case IToken.tFLOATINGPT : t = consume(); try { return astFactory.createExpression( scope, IASTExpression.Kind.PRIMARY_FLOAT_LITERAL, null, null, null, null, null, t.getImage(), null); } catch (ASTSemanticException e2) { failParse(); throw backtrack; } case IToken.tSTRING : case IToken.tLSTRING : t = consume(); try { return astFactory.createExpression( scope, IASTExpression.Kind.PRIMARY_STRING_LITERAL, null, null, null, null, null, t.getImage(), null ); } catch (ASTSemanticException e5) { failParse(); throw backtrack; } case IToken.t_false : case IToken.t_true : t = consume(); try { return astFactory.createExpression( scope, IASTExpression.Kind.PRIMARY_BOOLEAN_LITERAL, null, null, null, null, null, t.getImage(), null); } catch (ASTSemanticException e3) { failParse(); throw backtrack; } case IToken.tCHAR : case IToken.tLCHAR : t = consume(); try { return astFactory.createExpression( scope, IASTExpression.Kind.PRIMARY_CHAR_LITERAL, null, null, null, null, null, t.getImage(), null); } catch (ASTSemanticException e4) { failParse(); throw backtrack; } case IToken.t_this : consume(IToken.t_this); try { return astFactory.createExpression( scope, IASTExpression.Kind.PRIMARY_THIS, null, null, null, null, null, "", null); } catch (ASTSemanticException e7) { failParse(); throw backtrack; } case IToken.tLPAREN : consume(); IASTExpression lhs = expression(scope); consume(IToken.tRPAREN); try { return astFactory.createExpression( scope, IASTExpression.Kind.PRIMARY_BRACKETED_EXPRESSION, lhs, null, null, null, null, "", null); } catch (ASTSemanticException e6) { failParse(); throw backtrack; } case IToken.tIDENTIFIER : ITokenDuple duple = name(); //TODO should be an ID Expression really try { return astFactory.createExpression( scope, IASTExpression.Kind.ID_EXPRESSION, null, null, null, null, duple, "", null); } catch (ASTSemanticException e8) { failParse(); throw backtrack; } default : try { return astFactory.createExpression( scope, IASTExpression.Kind.PRIMARY_EMPTY, null, null, null, null, null, "", null); } catch (ASTSemanticException e) { failParse(); throw backtrack; } } } | 54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/1c6c93560ac2cfe6f78ff5b297c43b796774d32c/Parser.java/clean/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/Parser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
467,
9053,
2300,
3354,
2300,
12,
467,
9053,
3876,
2146,
262,
3639,
1216,
4297,
4101,
565,
288,
3639,
467,
1345,
268,
273,
446,
31,
3639,
1620,
261,
12050,
12,
21,
3719,
3639,
288,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
467,
9053,
2300,
3354,
2300,
12,
467,
9053,
3876,
2146,
262,
3639,
1216,
4297,
4101,
565,
288,
3639,
467,
1345,
268,
273,
446,
31,
3639,
1620,
261,
12050,
12,
21,
3719,
3639,
288,
... |
if (OpenCms.getLog(this).isInfoEnabled()) { OpenCms.getLog(this).info(e); | if (OpenCms.getLog(this).isErrorEnabled()) { OpenCms.getLog(this).error(e); | public String getDialogUri(String resource, CmsJspActionElement jsp) { try { CmsResource res = jsp.getCmsObject().readResource(resource, CmsResourceFilter.ALL); if (res.getTypeId() == CmsResourceTypeXmlPage.C_RESOURCE_TYPE_ID) { if (C_TEMPLATE_ONE.equals(jsp.property("template", resource))) { // display special property dialog for xmlpage types with "template one" as template return C_MODULE_PATH + "dialogs/property.jsp"; } return C_PATH_WORKPLACE + "editors/dialogs/property.jsp"; } if (res.isFolder()) { if (!res.getRootPath().startsWith(I_CmsConstants.VFS_FOLDER_SYSTEM)) { // display special property dialog for folders. excluse system folders return C_MODULE_PATH + "dialogs/property.jsp"; } return C_PATH_WORKPLACE + "editors/dialogs/property.jsp"; } String resTypeName = OpenCms.getResourceManager().getResourceType(res.getTypeId()).getTypeName(); CmsExplorerTypeSettings settings = OpenCms.getWorkplaceManager().getExplorerTypeSetting(resTypeName); if (settings.isPropertiesEnabled()) { // special properties for this type enabled, display customized dialog return URI_PROPERTY_CUSTOM_DIALOG; } } catch (CmsException e) { // should usually never happen if (OpenCms.getLog(this).isInfoEnabled()) { OpenCms.getLog(this).info(e); } } return URI_PROPERTY_DIALOG; } | 51784 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51784/fe7a7853a2990ea8bcd0a22e1f82dccdacc86150/CmsPropertyTemplateOne.java/clean/src-modules/org/opencms/frontend/templateone/CmsPropertyTemplateOne.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
31774,
3006,
12,
780,
1058,
16,
31108,
1803,
1046,
22535,
13,
288,
3639,
775,
288,
5411,
7630,
400,
273,
22535,
18,
588,
4747,
921,
7675,
896,
1420,
12,
3146,
16,
21082,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
31774,
3006,
12,
780,
1058,
16,
31108,
1803,
1046,
22535,
13,
288,
3639,
775,
288,
5411,
7630,
400,
273,
22535,
18,
588,
4747,
921,
7675,
896,
1420,
12,
3146,
16,
21082,
18,
... |
if (abc.main.Debug.v().cleanupAfterAdviceWeave) | public void weaveAdvice() { PointcutCodeGen pg = new PointcutCodeGen(); GenStaticJoinPoints gsjp = new GenStaticJoinPoints(); for( Iterator clIt = abc.main.Main.v().getAbcExtension().getGlobalAspectInfo().getWeavableClasses().iterator(); clIt.hasNext(); ) { final AbcClass cl = (AbcClass) clIt.next(); final SootClass scl = cl.getSootClass(); debug("--------- STARTING WEAVING OF CLASS >>>>> " + scl.getName()); // PASS 1 --------- (no init or preinit)-------------------- // generate the Static Join Points gsjp.genStaticJoinPoints(scl); // print out advice info for debugging if (abc.main.Debug.v().printAdviceInfo) PrintAdviceInfo.printAdviceInfo(scl); // pass one of weaver, pg.weaveInAspectsPass(scl, 1); // PASS 2 ----------- (handle init and preinit) ------------- // then do the weaving pg.weaveInAspectsPass(scl, 2); debug("--------- FINISHED WEAVING OF CLASS >>>>> " + scl.getName() + "\n"); } // each class // around advice applying to around advice (adviceexecution) is woven in last pg.weaveInAroundAdviceExecutionsPass(); //if (false) for( Iterator clIt = abc.main.Main.v().getAbcExtension().getGlobalAspectInfo().getWeavableClasses().iterator(); clIt.hasNext(); ) { final AbcClass cl = (AbcClass) clIt.next(); for( Iterator mIt = cl.getSootClass().getMethods().iterator(); mIt.hasNext(); ) { final SootMethod m = (SootMethod) mIt.next(); if( !m.hasActiveBody() ) continue; Body b = m.getActiveBody(); CopyPropagator.v().transform(b); ConstantPropagatorAndFolder.v().transform(b); DeadAssignmentEliminator.v().transform(b); UnusedLocalEliminator.v().transform(b); } } AbcTimer.mark("Weaving advice"); abc.main.Main.phaseDebug("Weaving advice"); } // method weave | 236 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/236/33dad3b9ca2d7e9f8d19d009b752dbb2aa395773/Weaver.java/clean/aop/abc/src/abc/weaving/weaver/Weaver.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
309,
261,
18947,
18,
5254,
18,
2829,
18,
90,
7675,
16732,
4436,
1871,
633,
3218,
836,
13,
309,
261,
18947,
18,
5254,
18,
2829,
18,
90,
7675,
16732,
4436,
1871,
633,
3218,
836,
13,
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,
309,
261,
18947,
18,
5254,
18,
2829,
18,
90,
7675,
16732,
4436,
1871,
633,
3218,
836,
13,
309,
261,
18947,
18,
5254,
18,
2829,
18,
90,
7675,
16732,
4436,
1871,
633,
3218,
836,
13,
309,
261,
... | |
componentsByDomain.put(subdomain, externalComponent); components.put(component, externalComponent); | componentsByDomain.remove(subdomain); components.remove(component); | public void addComponent(String subdomain, Component component) throws ComponentException { if (componentsByDomain.containsKey(subdomain)) { if (componentsByDomain.get(subdomain).getComponent() == component) { // Do nothing since the component has already been registered return; } else { throw new IllegalArgumentException("Subdomain already in use by another component"); } } // Find the proper secret key to connect as the subdomain. String secretKey = secretKeys.get(subdomain); if (secretKey == null) { secretKey = defaultSecretKey; } // Create a wrapping ExternalComponent on the component ExternalComponent externalComponent = new ExternalComponent(component, this); try { // Register the new component componentsByDomain.put(subdomain, externalComponent); components.put(component, externalComponent); // Ask the ExternalComponent to connect with the remote server externalComponent.connect(host, port, SocketFactory.getDefault(), subdomain); } catch (ComponentException e) { // Unregister the new component componentsByDomain.put(subdomain, externalComponent); components.put(component, externalComponent); // Re-throw the exception throw e; } // Initialize the component JID componentJID = new JID(null, externalComponent.getDomain(), null); externalComponent.initialize(componentJID, this); // Asl the external component to start processing incoming packets externalComponent.start(); } | 8076 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8076/61d1b1adf6b0236d58ac96a7bb5583cfbe132a4e/ExternalComponentManager.java/clean/source/java/org/jivesoftware/whack/ExternalComponentManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
15218,
12,
780,
16242,
16,
5435,
1794,
13,
1216,
5435,
503,
288,
3639,
309,
261,
8119,
858,
3748,
18,
12298,
653,
12,
30449,
3719,
288,
5411,
309,
261,
8119,
858,
3748,
18,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
15218,
12,
780,
16242,
16,
5435,
1794,
13,
1216,
5435,
503,
288,
3639,
309,
261,
8119,
858,
3748,
18,
12298,
653,
12,
30449,
3719,
288,
5411,
309,
261,
8119,
858,
3748,
18,
5... |
ByteArrayOutputStream os = new ByteArrayOutputStream(); InputStream in = new FileInputStream(args[1]); | os = new ByteArrayOutputStream(); in = new FileInputStream(args[1]); | public static void main(String[] args) { if (args.length != 3) { System.out.println("Usage: HexStrToBin enc/dec <infileName> <outfilename>"); System.exit(1); } try { ByteArrayOutputStream os = new ByteArrayOutputStream(); InputStream in = new FileInputStream(args[1]); int len = 0; byte[] buf = new byte[1024]; while ((len = in.read(buf)) > 0) { os.write(buf, 0, len); } in.close(); os.close(); byte[] data = null; if (args[0].equals("dec")) { data = decode(os.toString()); } else { String strData = encode(os.toByteArray()); data = strData.getBytes(); } FileOutputStream fos = new FileOutputStream(args[2]); fos.write(data); fos.close(); } catch (Exception e) { e.printStackTrace(); } } | 4109 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4109/31d6aba7523c1171d3298c2d2f27b963fa299bfc/Hex.java/buggy/src/java/se/anatom/ejbca/util/Hex.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
2774,
12,
780,
8526,
833,
13,
288,
3639,
309,
261,
1968,
18,
2469,
480,
890,
13,
288,
5411,
2332,
18,
659,
18,
8222,
2932,
5357,
30,
15734,
1585,
774,
9913,
2446,
19,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
2774,
12,
780,
8526,
833,
13,
288,
3639,
309,
261,
1968,
18,
2469,
480,
890,
13,
288,
5411,
2332,
18,
659,
18,
8222,
2932,
5357,
30,
15734,
1585,
774,
9913,
2446,
19,
... |
private void _addHighlight(int from, int to) throws BadLocationException { _matchHighlight = getHighlighter().addHighlight(from, to, _highlightPainter); } | private void _addHighlight(int from, int to) throws BadLocationException { _matchHighlight = getHighlighter().addHighlight(from, to, _highlightPainter); } | private void _addHighlight(int from, int to) throws BadLocationException { _matchHighlight = getHighlighter().addHighlight(from, to, _highlightPainter); } | 11192 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11192/e325016b29b8dde8e3ba0908ae34d55edb22c64f/DefinitionsPane.java/buggy/drjava/src/edu/rice/cs/drjava/ui/DefinitionsPane.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
389,
1289,
16205,
12,
474,
628,
16,
509,
358,
13,
1216,
202,
202,
6434,
2735,
503,
288,
202,
202,
67,
1916,
16205,
273,
4405,
202,
588,
8573,
23624,
7675,
1289,
16205,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
389,
1289,
16205,
12,
474,
628,
16,
509,
358,
13,
1216,
202,
202,
6434,
2735,
503,
288,
202,
202,
67,
1916,
16205,
273,
4405,
202,
588,
8573,
23624,
7675,
1289,
16205,
1... |
assertEquals("caaaaatcttctagtttttttttagaaaggatacaccaagtagacgattgtttactttac" + "acgccggaaatgaaaaccgcaatggtgctcaaggcaaaagacgttatccgccgtggctgt" + "ctggaatacgacgtcagcgccaccgacatcaccagctcgtttatggctatccgcaagacc" + "atgaccagcagcggacgcagcgccacctatgaggccagccgcagcgaggaagccagccac" + "gccgacctcgcctgggcgaccatgcacgccctgttaaatgagccactcaccgccggtatc" + "agcaccccgctgacatccaccattctggagttttacaccgccagcggcccgaaaatggag" + "gcattcacctttggtgagccggtgccggtactcgaccgccgtgacattctggattacgtc" + "gagtgcatcagtaacggcagatggtatgagccaccggtcagctttaccggtctggcaaaa" + "agcctgcgggctgccgtgcatcacagctcgccgatttacgtcaaacgcaatattctggcc" + "tcgacatttatcccgcatccatggctttcccagcaggatttcagccgctttgtgctggat" + "tttctggtgttcggtaatgcgtttctggaaaagcgttacagcaccaccggtaaggtcatc" + "agactggaaacctcaccggcaaaatatacccgccgtggcgtggaagaggatgtttactgg" + "tgggtgccgtccttcaacgagccgacagccttcgcgcccggctccgtgtttcacctgctg" + "gagccggatattaatcaggagctgtacggcctgccggaatatctcagcgcccttaactct" + "gcctggc", resTranscript0.getSequence().getResidues()); | String expectedResidues0 = expectedExonSequence1 + expectedExonSequence2 + expectedExonSequence3; assertEquals(expectedResidues0, resTranscript0.getSequence().getResidues()); | public void checkTranscriptSequences() throws Exception { osw.flushObjectById(); ObjectStore os = osw.getObjectStore(); Transcript resTranscript0 = (Transcript) os.getObjectById(storedTranscripts[0].getId()); assertEquals("caaaaatcttctagtttttttttagaaaggatacaccaagtagacgattgtttactttac" + "acgccggaaatgaaaaccgcaatggtgctcaaggcaaaagacgttatccgccgtggctgt" + "ctggaatacgacgtcagcgccaccgacatcaccagctcgtttatggctatccgcaagacc" + "atgaccagcagcggacgcagcgccacctatgaggccagccgcagcgaggaagccagccac" + "gccgacctcgcctgggcgaccatgcacgccctgttaaatgagccactcaccgccggtatc" + "agcaccccgctgacatccaccattctggagttttacaccgccagcggcccgaaaatggag" + "gcattcacctttggtgagccggtgccggtactcgaccgccgtgacattctggattacgtc" + "gagtgcatcagtaacggcagatggtatgagccaccggtcagctttaccggtctggcaaaa" + "agcctgcgggctgccgtgcatcacagctcgccgatttacgtcaaacgcaatattctggcc" + "tcgacatttatcccgcatccatggctttcccagcaggatttcagccgctttgtgctggat" + "tttctggtgttcggtaatgcgtttctggaaaagcgttacagcaccaccggtaaggtcatc" + "agactggaaacctcaccggcaaaatatacccgccgtggcgtggaagaggatgtttactgg" + "tgggtgccgtccttcaacgagccgacagccttcgcgcccggctccgtgtttcacctgctg" + "gagccggatattaatcaggagctgtacggcctgccggaatatctcagcgcccttaactct" + "gcctggc", resTranscript0.getSequence().getResidues()); Transcript resTranscript1 = (Transcript) os.getObjectById(storedTranscripts[1].getId()); assertEquals("cggggaaagcactgcgcgctgacggtggtgctgattgtattttttcagcgtctcagcgcg" + "tcgtgacggcacttagtctgcccgttgaggcgttgtgtgtctgcggggtgttttgtgcgg" + "tggtgagcgtgaaggggatgcggtgcgcgtccagcaggtcagcggcgctggcttttttga" + "tattaaaaaaatcgtccttcgtcgccacttcactgagggggataattttaatgccgtcgg" + "ctttcccctgtggggca", resTranscript1.getSequence().getResidues()); } | 29158 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/29158/cc67e167d61396f7d90ae94b352e7d3c6ca07a00/TransferSequencesTest.java/clean/flymine/model/genomic/src/test/org/flymine/postprocess/TransferSequencesTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
866,
1429,
9118,
21710,
1435,
1216,
1185,
288,
3639,
1140,
91,
18,
11330,
921,
5132,
5621,
3639,
1033,
2257,
1140,
273,
1140,
91,
18,
588,
921,
2257,
5621,
3639,
2604,
9118,
40... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
866,
1429,
9118,
21710,
1435,
1216,
1185,
288,
3639,
1140,
91,
18,
11330,
921,
5132,
5621,
3639,
1033,
2257,
1140,
273,
1140,
91,
18,
588,
921,
2257,
5621,
3639,
2604,
9118,
40... |
final String errorString = (String)iter.next(); | final String errorString = (String)iter.next(); | private void checkErrorMessage(String basePDLName, Collection errorKeywords, Collection failures) throws Exception { s_log.info("Checking bad pdl: " + basePDLName); try { MetadataRoot r = MetadataRoot.getMetadataRoot(); PDL pdl = getPDL(basePDLName); pdl.generateMetadata(r); if (true) { s_log.info(basePDLName + " AST dump:"); System.out.print(pdl.getAST()); } } catch (Throwable e) { //s_log.info(basePDLName + " error " + e.getMessage()); String s = e.toString(); Iterator iter = errorKeywords.iterator(); while(iter.hasNext()) { final String errorString = (String)iter.next(); if (s.indexOf(errorString) < 0) { failures.add("error message for " + basePDLName + " does not contain \"" + errorString + "\"; error message:\n" + s); } } return; } // This can't be in the try clause because then it would // be caught. failures.add("no exception for " + basePDLName); } | 12196 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12196/558097820abc0198518796cedde797658cda9a5e/PDLTest.java/buggy/archive/core-platform/test/src/com/arsdigita/persistence/pdl/PDLTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
866,
14935,
12,
780,
1026,
52,
8914,
461,
16,
3639,
2200,
555,
14149,
16,
3639,
2200,
11720,
13,
565,
1216,
1185,
565,
288,
3639,
272,
67,
1330,
18,
1376,
2932,
14294,
5570,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
866,
14935,
12,
780,
1026,
52,
8914,
461,
16,
3639,
2200,
555,
14149,
16,
3639,
2200,
11720,
13,
565,
1216,
1185,
565,
288,
3639,
272,
67,
1330,
18,
1376,
2932,
14294,
5570,
... |
public RectangleAnimation(Composite whereToDraw, Rectangle start, Rectangle end, int duration) { super(WorkbenchMessages.getString("RectangleAnimation.Animating_Rectangle")); this.duration = duration; this.start = start; this.end = end; setSystem(true); String platform = SWT.getPlatform(); if (!"win32".equals(platform)) { return; } this.canvas = new Canvas(whereToDraw, SWT.NO_BACKGROUND); canvas.setBounds(whereToDraw.getClientArea()); canvas.addPaintListener(new PaintListener() { public void paintControl(PaintEvent event) { draw(event.gc); } }); canvas.moveAbove(null); | public RectangleAnimation(Shell parentShell, Rectangle start, Rectangle end) { this(parentShell, start, end, 400); | public RectangleAnimation(Composite whereToDraw, Rectangle start, Rectangle end, int duration) { super(WorkbenchMessages.getString("RectangleAnimation.Animating_Rectangle")); //$NON-NLS-1$ this.duration = duration; this.start = start; this.end = end; setSystem(true); // Determine if we're on a platform where animations look ugly. // If so, we indicate this by setting canvas=null, in which case this job does nothing. String platform = SWT.getPlatform(); if (!"win32".equals(platform)) { //$NON-NLS-1$ return; } this.canvas = new Canvas(whereToDraw, SWT.NO_BACKGROUND); canvas.setBounds(whereToDraw.getClientArea()); canvas.addPaintListener(new PaintListener() { public void paintControl(PaintEvent event) { draw(event.gc); } }); canvas.moveAbove(null); } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/2b1161e241896a70e75a2b2503368dfadba68dbd/RectangleAnimation.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/RectangleAnimation.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
13264,
10816,
12,
9400,
1625,
774,
6493,
16,
13264,
787,
16,
13264,
679,
16,
509,
3734,
13,
288,
202,
202,
9565,
12,
2421,
22144,
5058,
18,
588,
780,
2932,
19463,
10816,
18,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
13264,
10816,
12,
9400,
1625,
774,
6493,
16,
13264,
787,
16,
13264,
679,
16,
509,
3734,
13,
288,
202,
202,
9565,
12,
2421,
22144,
5058,
18,
588,
780,
2932,
19463,
10816,
18,
2... |
return null; | return AbstractIndexer.bestFunctionPrefix( _limitTo, simpleName, _matchMode, _caseSensitive ); | public char[] indexEntryPrefix() { // TODO Auto-generated method stub return null; } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/7a408c3e1d654808f080fcb472cdcf92f1938829/FunctionDeclarationPattern.java/buggy/core/org.eclipse.cdt.core/search/org/eclipse/cdt/internal/core/search/matching/FunctionDeclarationPattern.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1149,
8526,
770,
1622,
2244,
1435,
288,
202,
202,
759,
2660,
8064,
17,
11168,
707,
7168,
202,
202,
2463,
446,
31,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1149,
8526,
770,
1622,
2244,
1435,
288,
202,
202,
759,
2660,
8064,
17,
11168,
707,
7168,
202,
202,
2463,
446,
31,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
{ return createInsetsAdapter(); } | { return createInsetsAdapter(); } | public Object caseInsets(Insets object) { return createInsetsAdapter(); } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/e5c78f0e8317166d02fa384e14c3dd7aa1796f2c/AttributeAdapterFactory.java/buggy/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/model/attribute/util/AttributeAdapterFactory.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
1033,
648,
382,
4424,
12,
382,
4424,
733,
13,
5411,
288,
7734,
327,
752,
382,
4424,
4216,
5621,
5411,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
648,
382,
4424,
12,
382,
4424,
733,
13,
5411,
288,
7734,
327,
752,
382,
4424,
4216,
5621,
5411,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
dX1 -= ( bTicksLeft ? TICK_SIZE : 0 ) + dYAxisLabelsThickness; | dX1 -= ( bTicksLeft ? TICK_SIZE : 0 ) + Math.max( dYAxisLabelsThickness, dDecorationThickness[0] ); | protected final double adjustHorizontal( double dBlockX, double dBlockWidth, AllAxes aax ) throws ChartException, IllegalArgumentException { final OneAxis axPH = aax.areAxesSwapped( ) ? aax.getPrimaryOrthogonal( ) : aax.getPrimaryBase( ); final OneAxis axPV = aax.areAxesSwapped( ) ? aax.getPrimaryBase( ) : aax.getPrimaryOrthogonal( ); final AutoScale scX = axPH.getScale( ); final AutoScale scY = axPV.getScale( ); final int iXLabelLocation = axPH.getLabelPosition( ); final int iYLabelLocation = axPV.getLabelPosition( ); final int iYTitleLocation = axPV.getTitlePosition( ); final Label laXAxisLabels = axPH.getLabel( ); final Label laYAxisLabels = axPV.getLabel( ); final Label laYAxisTitle = axPV.getTitle( ); final int iYTickStyle = axPV.getCombinedTickStyle( ); final IntersectionValue iv = axPV.getIntersectionValue( ); // COMPUTE THE THICKNESS OF THE AXIS INCLUDING AXIS LABEL BOUNDS AND // AXIS-PLOT SPACING final boolean bTicksLeft = ( iYTickStyle & TICK_LEFT ) == TICK_LEFT; final boolean bTicksRight = ( iYTickStyle & TICK_RIGHT ) == TICK_RIGHT; final double dAppliedYAxisPlotSpacing = ( iv.iType == IntersectionValue.MAX || iv.iType == IntersectionValue.MIN ) ? dYAxisPlotSpacing : 0; // UPDATE Y-AXIS ENDPOINTS DUE TO AXIS LABEL SHIFTS double dStart = scY.getStart( ), dEnd = scY.getEnd( ); scY.computeTicks( ids, laYAxisLabels, iYLabelLocation, VERTICAL, dStart, dEnd, true, aax ); if ( !scY.isStepFixed( ) ) { final Object[] oaMinMax = scY.getMinMax( ); while ( !scY.checkFit( ids, laYAxisLabels, iYLabelLocation ) ) { if ( !scY.zoomOut( ) ) { break; } scY.updateAxisMinMax( oaMinMax[0], oaMinMax[1] ); int tickCount = scY.computeTicks( ids, laYAxisLabels, iYLabelLocation, VERTICAL, dStart, dEnd, true, aax ); if ( scY.getUnit( ) != null && asInteger( scY.getUnit( ) ) == Calendar.YEAR && tickCount <= 3 ) { break; } } } double dYAxisLabelsThickness = scY.computeAxisLabelThickness( ids, axPV.getLabel( ), VERTICAL ); double dYAxisTitleThickness = 0; if ( laYAxisTitle.isVisible( ) ) { final String sPreviousValue = laYAxisTitle.getCaption( ).getValue( ); laYAxisTitle.getCaption( ) .setValue( rtc.externalizedMessage( sPreviousValue ) ); try { dYAxisTitleThickness = computeBox( ids, iYTitleLocation, laYAxisTitle, 0, 0 ).getWidth( ); } catch ( IllegalArgumentException uiex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, uiex ); } finally { laYAxisTitle.getCaption( ).setValue( sPreviousValue ); } } double dX = getLocation( scX, iv ), dX1 = dX, dX2 = dX; // COMPUTE VALUES FOR x1, x, x2 // x = HORIZONTAL LOCATION OF Y-AXIS ALONG PLOT // x1 = LEFT EDGE OF Y-AXIS BAND (DUE TO AXIS LABELS, TITLE, TICKS & // SPACING) // x2 = RIGHT EDGE OF Y-AXIS BAND (DUE TO AXIS LABELS, TITLE, TICKS & // SPACING) if ( iv.iType == IntersectionValue.MIN ) { if ( scX.getDirection( ) == BACKWARD ) { // switch if scale is backward. dX = getLocation( scX, IntersectionValue.MAX_VALUE ); } dX -= dAppliedYAxisPlotSpacing; dX1 = dX; dX2 = dX; if ( bTicksLeft ) { dX1 -= TICK_SIZE; } if ( iYLabelLocation == LEFT ) { dX1 -= dYAxisLabelsThickness; dX2 += Math.max( // IF LABELS ARE LEFT, THEN RIGHT SPACING IS // MAX(RT_TICK_SIZE, HORZ_SPACING) bTicksRight ? TICK_SIZE : 0, dAppliedYAxisPlotSpacing ); } else if ( iYLabelLocation == RIGHT ) { // IF LABELS ARE RIGHT, THEN RIGHT SPACING IS // MAX(RT_TICK_SIZE+AXIS_LBL_THCKNESS, HORZ_SPACING) dX2 += Math.max( ( bTicksRight ? TICK_SIZE : 0 ) + dYAxisLabelsThickness, dAppliedYAxisPlotSpacing ); } if ( iYTitleLocation == LEFT ) { dX1 -= dYAxisTitleThickness; } else if ( iYTitleLocation == RIGHT ) { dX2 += dYAxisTitleThickness; } // ENSURE THAT WE DON'T GO BEHIND THE LEFT PLOT BLOCK EDGE if ( dX1 < dBlockX ) { final double dDelta = ( dBlockX - dX1 ); dX1 = dBlockX; dX += dDelta; dX2 += dDelta; } final double dDeltaX1 = dX - dX1; final double dDeltaX2 = dX2 - dX; // COMPUTE THE Y-AXIS BAND THICKNESS AND ADJUST X2 FOR LABELS BELOW if ( iYLabelLocation == RIGHT ) { // Y-AXIS BAND IS (x1 -> (x+AxisPlotSpacing)) dX2 = ( dX + dAppliedYAxisPlotSpacing ); } dYAxisLabelsThickness = dX2 - dX1; // REUSE VARIABLE // CHECK IF X-AXIS THICKNESS REQUIRES A PLOT HEIGHT RESIZE AT THE // UPPER END scX.computeAxisStartEndShifts( ids, laXAxisLabels, HORIZONTAL, iXLabelLocation, aax ); boolean startEndChanged = false; if ( scX.getDirection( ) == BACKWARD ) { if ( dYAxisLabelsThickness > scX.getEndShift( ) ) { // REDUCE scX's STARTPOINT TO FIT THE Y-AXIS ON THE LEFT dEnd = dX2; startEndChanged = true; } else { dEnd = scX.getEnd( ); } dStart = scX.getStart( ); } else { if ( dYAxisLabelsThickness > scX.getStartShift( ) ) { // REDUCE scX's STARTPOINT TO FIT THE Y-AXIS ON THE LEFT dStart = dX2; startEndChanged = true; } else { dStart = scX.getStart( ); } dEnd = scX.getEnd( ); } scX.resetShifts( ); // LOOP THAT AUTO-RESIZES Y-AXIS AND RE-COMPUTES Y-AXIS LABELS // IF OVERLAPS OCCUR scX.setEndPoints( dStart, dEnd ); if ( scX.getDirection( ) == BACKWARD ) { scX.computeTicks( ids, laXAxisLabels, iXLabelLocation, HORIZONTAL, dStart, dEnd, true, !startEndChanged, aax ); } else { scX.computeTicks( ids, laXAxisLabels, iXLabelLocation, HORIZONTAL, dStart, dEnd, !startEndChanged, true, aax ); } if ( !scX.isStepFixed( ) ) { final Object[] oaMinMax = scX.getMinMax( ); while ( !scX.checkFit( ids, laXAxisLabels, iXLabelLocation ) ) { if ( !scX.zoomOut( ) ) { break; } scX.updateAxisMinMax( oaMinMax[0], oaMinMax[1] ); int tickCount; if ( scX.getDirection( ) == BACKWARD ) { tickCount = scX.computeTicks( ids, laXAxisLabels, iXLabelLocation, HORIZONTAL, dStart, dEnd, true, !startEndChanged, aax ); } else { tickCount = scX.computeTicks( ids, laXAxisLabels, iXLabelLocation, HORIZONTAL, dStart, dEnd, !startEndChanged, true, aax ); } if ( scX.getUnit( ) != null && asInteger( scX.getUnit( ) ) == Calendar.YEAR && tickCount <= 3 ) { break; } } } // MOVE THE Y-AXIS TO THE LEFT EDGE OF THE PLOT IF SLACK SPACE // EXISTS OR SCALE IS RECOMPUTED if ( scX.getDirection( ) == BACKWARD ) { if ( dYAxisLabelsThickness < scX.getEndShift( ) ) { dX = scX.getEnd( ) - ( dX2 - dX ); } } else { if ( dYAxisLabelsThickness < scX.getStartShift( ) ) { dX = scX.getStart( ) - ( dX2 - dX ); } } dX -= insCA.getLeft( ); dX2 = dX + dDeltaX2; dX1 = dX - dDeltaX1; axPV.setTitleCoordinate( ( iYTitleLocation == LEFT ) ? dX1 - 1 : dX2 + 1 - dYAxisTitleThickness ); } else if ( iv.iType == IntersectionValue.MAX ) { if ( scX.getDirection( ) == BACKWARD ) { // switch if scale is backward. dX = getLocation( scX, IntersectionValue.MIN_VALUE ); } dX += dAppliedYAxisPlotSpacing; dX1 = dX; dX2 = dX; if ( bTicksRight ) { dX2 += TICK_SIZE; } if ( iYLabelLocation == RIGHT ) { dX2 += dYAxisLabelsThickness; dX1 -= Math.max( bTicksLeft ? TICK_SIZE : 0, dAppliedYAxisPlotSpacing ); } else if ( iYLabelLocation == LEFT ) { dX1 -= Math.max( ( bTicksLeft ? TICK_SIZE : 0 ) + dYAxisLabelsThickness, dAppliedYAxisPlotSpacing ); } if ( iYTitleLocation == RIGHT ) { dX2 += dYAxisTitleThickness; } else if ( iYTitleLocation == LEFT ) { dX1 -= dYAxisTitleThickness; } // ENSURE THAT WE DON'T GO AHEAD OF THE RIGHT PLOT BLOCK EDGE if ( dX2 > dBlockX + dBlockWidth ) { final double dDelta = dX2 - ( dBlockX + dBlockWidth ); dX2 = dBlockX + dBlockWidth; dX -= dDelta; dX1 -= dDelta; } final double dDeltaX1 = dX - dX1; final double dDeltaX2 = dX2 - dX; // COMPUTE THE Y-AXIS BAND THICKNESS AND ADJUST X1 IF Y-AXIS LABELS // ARE ON THE LEFT if ( iYLabelLocation == LEFT ) { // Y-AXIS BAND IS ((x-AxisPlotSpacing) -> x2) dX1 = ( dX - dAppliedYAxisPlotSpacing ); } dYAxisLabelsThickness = dX2 - dX1; // REUSE VARIABLE // CHECK IF X-AXIS THICKNESS REQUIRES A PLOT HEIGHT RESIZE AT THE // UPPER END scX.computeAxisStartEndShifts( ids, laXAxisLabels, HORIZONTAL, iXLabelLocation, aax ); boolean startEndChanged = false; if ( scX.getDirection( ) == BACKWARD ) { if ( dYAxisLabelsThickness > scX.getStartShift( ) ) { // REDUCE scX's ENDPOINT TO FIT THE Y-AXIS ON THE RIGHT dStart = dX1; startEndChanged = true; } else { dStart = scX.getStart( ); } dEnd = scX.getEnd( ); } else { if ( dYAxisLabelsThickness > scX.getEndShift( ) ) { // REDUCE scX's ENDPOINT TO FIT THE Y-AXIS ON THE RIGHT dEnd = dX1; startEndChanged = true; } else { dEnd = scX.getEnd( ); } dStart = scX.getStart( ); } scX.resetShifts( ); // LOOP THAT AUTO-RESIZES Y-AXIS AND RE-COMPUTES Y-AXIS LABELS // IF OVERLAPS OCCUR scX.setEndPoints( dStart, dEnd ); if ( scX.getDirection( ) == BACKWARD ) { scX.computeTicks( ids, laXAxisLabels, iXLabelLocation, HORIZONTAL, dStart, dEnd, !startEndChanged, true, aax ); } else { scX.computeTicks( ids, laXAxisLabels, iXLabelLocation, HORIZONTAL, dStart, dEnd, true, !startEndChanged, aax ); } if ( !scX.isStepFixed( ) ) { final Object[] oaMinMax = scX.getMinMax( ); while ( !scX.checkFit( ids, laXAxisLabels, iXLabelLocation ) ) { if ( !scX.zoomOut( ) ) { break; } scX.updateAxisMinMax( oaMinMax[0], oaMinMax[1] ); int tickCount; if ( scX.getDirection( ) == BACKWARD ) { tickCount = scX.computeTicks( ids, laXAxisLabels, iXLabelLocation, HORIZONTAL, dStart, dEnd, !startEndChanged, true, aax ); } else { tickCount = scX.computeTicks( ids, laXAxisLabels, iXLabelLocation, HORIZONTAL, dStart, dEnd, true, !startEndChanged, aax ); } if ( scX.getUnit( ) != null && asInteger( scX.getUnit( ) ) == Calendar.YEAR && tickCount <= 3 ) { break; } } } // MOVE THE Y-AXIS TO THE LEFT EDGE OF THE PLOT IF SLACK SPACE // EXISTS OR SCALE IS RECOMPUTED if ( scX.getDirection( ) == BACKWARD ) { if ( dYAxisLabelsThickness < scX.getStartShift( ) ) { dX = scX.getStart( ) - ( dX1 - dX ); } } else { if ( dYAxisLabelsThickness < scX.getEndShift( ) ) { dX = scX.getEnd( ) - ( dX1 - dX ); } } dX += insCA.getRight( ); dX2 = dX + dDeltaX2; dX1 = dX - dDeltaX1; axPV.setTitleCoordinate( ( iYTitleLocation == LEFT ) ? dX1 - 1 : dX2 + 1 - dYAxisTitleThickness ); } else { double dDeltaX1 = 0, dDeltaX2 = 0; if ( iYTitleLocation == RIGHT ) { dX2 += dYAxisTitleThickness; } else if ( iYTitleLocation == LEFT ) { dX1 -= dYAxisTitleThickness; } if ( iYLabelLocation == LEFT ) { dX1 -= ( bTicksLeft ? TICK_SIZE : 0 ) + dYAxisLabelsThickness; dX2 += ( bTicksRight ? TICK_SIZE : 0 ); dDeltaX1 = dX - dX1; dDeltaX2 = dX2 - dX; // CHECK IF LEFT EDGE OF Y-AXIS BAND GOES BEHIND THE PLOT LEFT // EDGE if ( dX1 < dBlockX ) { final Object[] oaMinMax = scX.getMinMax( ); boolean bForceBreak = false; // A LOOP THAT ITERATIVELY ATTEMPTS TO ADJUST THE LEFT EDGE // OF THE Y-AXIS LABELS WITH THE LEFT EDGE OF THE PLOT // AND/OR // ENSURE THAT THE START POINT OF THE X-AXIS SCALE IS // SUITABLY POSITIONED do { // CANCEL OUT THE ENDPOINT LABEL SHIFT COMPUTATIONS FROM // THE X-AXIS scX.setEndPoints( scX.getStart( ) - scX.getStartShift( ), scX.getEnd( ) + scX.getEndShift( ) ); // RESTORE scX.resetShifts( ); // APPLY THE AXIS REDUCTION FORMULA W.R.T. X-AXIS // STARTPOINT double[] da = scX.getEndPoints( ); double dT_RI = dBlockX - dX1; // THRESHOLD - // REQUESTEDINTERSECTION if ( scX.getDirection( ) == BACKWARD ) { double dAMin_AMax = da[0] - da[1]; double dAMax_RI = Math.abs( da[0] - dX ); double dDelta = ( dT_RI / dAMax_RI ) * dAMin_AMax; dEnd = da[1] + dDelta; dStart = da[0]; if ( dEnd < dBlockX ) { dEnd = dBlockX; bForceBreak = true; } } else { double dAMin_AMax = da[1] - da[0]; double dAMax_RI = Math.abs( da[1] - dX ); double dDelta = ( dT_RI / dAMax_RI ) * dAMin_AMax; dStart = da[0] + dDelta; dEnd = da[1]; if ( dStart < dBlockX ) { dStart = dBlockX; bForceBreak = true; } } // LOOP THAT AUTO-RESIZES Y-AXIS AND RE-COMPUTES Y-AXIS // LABELS IF OVERLAPS OCCUR scX.setEndPoints( dStart, dEnd ); scX.computeTicks( ids, laXAxisLabels, iXLabelLocation, HORIZONTAL, dStart, dEnd, true, aax ); while ( !scX.checkFit( ids, laXAxisLabels, iXLabelLocation ) ) { if ( !scX.zoomOut( ) ) { bForceBreak = true; break; } scX.updateAxisMinMax( oaMinMax[0], oaMinMax[1] ); int tickCount = scX.computeTicks( ids, laXAxisLabels, iXLabelLocation, HORIZONTAL, dStart, dEnd, true, aax ); if ( scX.getUnit( ) != null && asInteger( scX.getUnit( ) ) == Calendar.YEAR && tickCount <= 3 ) { bForceBreak = true; break; } } dX = getLocation( scX, iv ); dX1 = dX - dDeltaX1; // RE-CALCULATE X-AXIS BAND LEFT // EDGE } while ( Math.abs( dX1 - dBlockX ) > 1 && !bForceBreak ); } else { // LOOP THAT AUTO-RESIZES Y-AXIS AND RE-COMPUTES Y-AXIS // LABELS IF OVERLAPS OCCUR dStart = scX.getStart( ); dEnd = scX.getEnd( ); scX.setEndPoints( dStart, dEnd ); scX.computeTicks( ids, laXAxisLabels, iXLabelLocation, HORIZONTAL, dStart, dEnd, true, aax ); if ( !scX.isStepFixed( ) ) { final Object[] oaMinMax = scX.getMinMax( ); while ( !scX.checkFit( ids, laXAxisLabels, iXLabelLocation ) ) { if ( !scX.zoomOut( ) ) { break; } scX.updateAxisMinMax( oaMinMax[0], oaMinMax[1] ); int tickCount = scX.computeTicks( ids, laXAxisLabels, iXLabelLocation, HORIZONTAL, dStart, dEnd, true, aax ); if ( scX.getUnit( ) != null && asInteger( scX.getUnit( ) ) == Calendar.YEAR && tickCount <= 3 ) { break; } } } dX = getLocation( scX, iv ); } dX1 = dX - dDeltaX1; dX2 = dX + dDeltaX2; } else if ( iYLabelLocation == RIGHT ) { dX2 += ( bTicksRight ? TICK_SIZE : 0 ) + dYAxisLabelsThickness; dX1 -= ( bTicksLeft ? TICK_SIZE : 0 ); dDeltaX1 = dX - dX1; dDeltaX2 = dX2 - dX; // CHECK IF RIGHT EDGE OF Y-AXIS BAND GOES BEHIND THE PLOT RIGHT // EDGE if ( dX2 > dBlockX + dBlockWidth ) { final Object[] oaMinMax = scX.getMinMax( ); boolean bForceBreak = false; // A LOOP THAT ITERATIVELY ATTEMPTS TO ADJUST THE RIGHT EDGE // OF THE Y-AXIS LABELS WITH THE RIGHT EDGE OF THE PLOT // AND/OR // ENSURE THAT THE START POINT OF THE X-AXIS SCALE IS // SUITABLY POSITIONED do { // CANCEL OUT THE ENDPOINT LABEL SHIFT COMPUTATIONS FROM // THE X-AXIS scX.setEndPoints( scX.getStart( ) - scX.getStartShift( ), scX.getEnd( ) + scX.getEndShift( ) ); // RESTORE scX.resetShifts( ); // APPLY THE AXIS REDUCTION FORMULA W.R.T. X-AXIS // ENDPOINT double[] da = scX.getEndPoints( ); double dT_RI = dX2 - ( dBlockX + dBlockWidth ); // THRESHOLD // - // REQUESTEDINTERSECTION if ( scX.getDirection( ) == BACKWARD ) { double dAMin_AMax = da[0] - da[1]; double dAMin_RI = Math.abs( dX - da[1] ); double dDelta = Math.abs( dT_RI / dAMin_RI ) * dAMin_AMax; dStart = da[0] - dDelta; dEnd = da[1]; if ( dStart > dBlockX + dBlockWidth ) { dStart = dBlockX + dBlockWidth; bForceBreak = true; } } else { double dAMin_AMax = da[1] - da[0]; double dAMin_RI = Math.abs( dX - da[0] ); double dDelta = ( dT_RI / dAMin_RI ) * dAMin_AMax; dEnd = da[1] - dDelta; dStart = da[0]; if ( dEnd > dBlockX + dBlockWidth ) { dEnd = dBlockX + dBlockWidth; bForceBreak = true; } } // LOOP THAT AUTO-RESIZES Y-AXIS AND RE-COMPUTES Y-AXIS // LABELS IF OVERLAPS OCCUR scX.setEndPoints( dStart, dEnd ); scX.computeTicks( ids, laXAxisLabels, iXLabelLocation, HORIZONTAL, dStart, dEnd, true, aax ); if ( !scX.isStepFixed( ) ) { while ( !scX.checkFit( ids, laXAxisLabels, iXLabelLocation ) ) { if ( !scX.zoomOut( ) ) { bForceBreak = true; break; } scX.updateAxisMinMax( oaMinMax[0], oaMinMax[1] ); int tickCount = scX.computeTicks( ids, laXAxisLabels, iXLabelLocation, HORIZONTAL, dStart, dEnd, true, aax ); if ( scX.getUnit( ) != null && asInteger( scX.getUnit( ) ) == Calendar.YEAR && tickCount <= 3 ) { bForceBreak = true; break; } } } dX = getLocation( scX, iv ); dX2 = dX + dDeltaX2; // RE-CALCULATE X-AXIS BAND // RIGHT // EDGE } while ( Math.abs( dX2 - ( dBlockX + dBlockWidth ) ) > 1 && !bForceBreak ); } else { // LOOP THAT AUTO-RESIZES Y-AXIS AND RE-COMPUTES Y-AXIS // LABELS IF OVERLAPS OCCUR dStart = scX.getStart( ); dEnd = scX.getEnd( ); scX.setEndPoints( dStart, dEnd ); scX.computeTicks( ids, laXAxisLabels, iXLabelLocation, HORIZONTAL, dStart, dEnd, true, aax ); if ( !scX.isStepFixed( ) ) { final Object[] oaMinMax = scX.getMinMax( ); while ( !scX.checkFit( ids, laXAxisLabels, iXLabelLocation ) ) { if ( !scX.zoomOut( ) ) { break; } scX.updateAxisMinMax( oaMinMax[0], oaMinMax[1] ); int tickCount = scX.computeTicks( ids, laXAxisLabels, iXLabelLocation, HORIZONTAL, dStart, dEnd, true, aax ); if ( scX.getUnit( ) != null && asInteger( scX.getUnit( ) ) == Calendar.YEAR && tickCount <= 3 ) { break; } } } dX = getLocation( scX, iv ); } dX2 = dX + dDeltaX2; dX1 = dX - dDeltaX1; } axPV.setTitleCoordinate( ( iYTitleLocation == LEFT ) ? dX1 - 1 : dX2 + 1 - dYAxisTitleThickness ); } return dX; } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/20bb7679d106e8105100c095c900612d5a37a46d/PlotWithAxes.java/buggy/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/computation/withaxes/PlotWithAxes.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
727,
1645,
5765,
14457,
12,
1645,
302,
1768,
60,
16,
1082,
202,
9056,
302,
1768,
2384,
16,
4826,
26494,
279,
651,
262,
1216,
14804,
503,
16,
1082,
202,
31237,
202,
95,
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,
727,
1645,
5765,
14457,
12,
1645,
302,
1768,
60,
16,
1082,
202,
9056,
302,
1768,
2384,
16,
4826,
26494,
279,
651,
262,
1216,
14804,
503,
16,
1082,
202,
31237,
202,
95,
202,
2... |
Game.UNIT_IN_RETREAT); | Entity.REMOVE_IN_RETREAT); | private void resolveDfaAttack(DfaAttackAction daa, int lastEntityId) { final Entity ae = game.getEntity(daa.getEntityId()); final Targetable target = game.getTarget(daa.getTargetType(), daa.getTargetId()); Entity te = null; if (target != null && target.getTargetType() == Targetable.TYPE_ENTITY) { te = (Entity)target; } // Which building takes the damage? Building bldg = game.board.getBuildingAt( daa.getTargetPos() ); // is the attacker dead? because that sure messes up the calculations if (ae == null) { return; } final int direction = ae.getFacing(); if (lastEntityId != daa.getEntityId()) { phaseReport.append("\nPhysical attacks for " ).append( ae.getDisplayName() ).append( "\n"); } // entity isn't charging any more ae.setDisplacementAttack(null); // should we even bother? if (target == null || (target.getTargetType() == Targetable.TYPE_ENTITY && (te.isDestroyed() || te.isDoomed() || te.crew.isDead()))) { phaseReport.append(" Death from above deals no damage as the target has been destroyed.\n"); if (ae.isProne()) { // attacker prone during weapons phase doEntityFall(ae, daa.getTargetPos(), 2, 3, Compute.getBasePilotingRoll(game, ae.getId())); } else { // same effect as successful DFA doEntityDisplacement(ae, ae.getPosition(), daa.getTargetPos(), new PilotingRollData(ae.getId(), 4, "executed death from above")); } return; } phaseReport.append(" Attempting death from above on " ).append( target.getDisplayName()); // target still in the same position? if ( !target.getPosition().equals(daa.getTargetPos()) ) { phaseReport.append(" but the target has moved.\n"); return; } // compute to-hit ToHitData toHit = Compute.toHitDfa(game, daa); // hack: if the attacker's prone, or incapacitated, fudge the roll int roll; if (ae.isProne() || !ae.isActive()) { roll = -12; phaseReport.append(" but the attacker is prone or incapacitated : "); } else if (toHit.getValue() == ToHitData.IMPOSSIBLE) { roll = -12; phaseReport.append(" but the attack is impossible (" ).append( toHit.getDesc() ).append( ") : "); } else if (toHit.getValue() == ToHitData.AUTOMATIC_SUCCESS) { phaseReport.append(", the DFA is an automatic hit (" ).append( toHit.getDesc() ).append( "), "); roll = Integer.MAX_VALUE; } else { // roll roll = Compute.d6(2); phaseReport.append("; needs " ).append( toHit.getValue() ).append( ", "); phaseReport.append("rolls " ).append( roll ).append( " : "); } // do we hit? if (roll < toHit.getValue()) { Coords dest = te.getPosition(); Coords targetDest = Compute.getPreferredDisplacement(game, te.getId(), dest, direction); phaseReport.append("misses.\n"); if (targetDest != null) { // attacker falls into destination hex phaseReport.append(ae.getDisplayName() ).append( " falls into hex " ).append( dest.getBoardNum() ).append( ".\n"); doEntityFall(ae, dest, 2, 3, Compute.getBasePilotingRoll(game, ae.getId())); // move target to preferred hex doEntityDisplacement(te, dest, targetDest, null); } else { // attacker destroyed phaseReport.append(destroyEntity(ae, "impossible displacement", false)); } return; } // we hit... // Can't DFA a target inside of a building. int damage = Compute.getDfaDamageFor(ae); int damageTaken = Compute.getDfaDamageTakenBy(ae); phaseReport.append("hits."); // Targeting a building. if ( target.getTargetType() == Targetable.TYPE_BUILDING ) { // The building takes the full brunt of the attack. phaseReport.append( "\n " ) .append( damageBuilding( bldg, damage ) ) .append( "\n" ); // Damage any infantry in the hex. this.damageInfantryIn( bldg, damage ); } // Target isn't building. else { phaseReport.append("\n Defender takes " ).append( damage ).append( " damage" ).append( toHit.getTableDesc() ).append( "."); while (damage > 0) { int cluster = Math.min(5, damage); HitData hit = te.rollHitLocation(toHit.getHitTable(), toHit.getSideTable()); phaseReport.append(damageEntity(te, hit, cluster)); damage -= cluster; } } phaseReport.append("\n Attacker takes " ).append( damageTaken ).append( " damage."); while (damageTaken > 0) { int cluster = Math.min(5, damageTaken); HitData hit = ae.rollHitLocation(ToHitData.HIT_KICK, toHit.SIDE_FRONT); phaseReport.append(damageEntity(ae, hit, cluster)); damageTaken -= cluster; } phaseReport.append("\n"); // That's it for target buildings. // TODO: where do I put the attacker?!? if ( target.getTargetType() == Targetable.TYPE_BUILDING ) { return; } // Target entities are pushed away or destroyed. Coords dest = te.getPosition(); Coords targetDest = Compute.getValidDisplacement(game, te.getId(), dest, direction); if (game.getOptions().booleanOption("push_off_board") && !game.board.contains(dest.translated(direction))) { game.removeEntity(te.getId(), Game.UNIT_IN_RETREAT); send(createRemoveEntityPacket(te.getId(), Game.UNIT_IN_RETREAT)); phaseReport.append("\n*** " ).append( te.getDisplayName() ).append( " target has been forced from the field. ***\n"); } else { if (targetDest != null) { doEntityDisplacement(te, dest, targetDest, new PilotingRollData(te.getId(), 2, "hit by death from above")); } else { // ack! automatic death! phaseReport.append(destroyEntity(te, "impossible displacement", false)); } } // HACK: to avoid automatic falls, displace from dest to dest doEntityDisplacement(ae, dest, dest, new PilotingRollData(ae.getId(), 4, "executed death from above")); } | 4135 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4135/7b156cd8b6cf94abce0d471a11632786a780a2ac/Server.java/clean/megamek/src/megamek/server/Server.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
2245,
40,
507,
3075,
484,
12,
40,
507,
3075,
484,
1803,
5248,
69,
16,
509,
1142,
18029,
13,
288,
3639,
727,
3887,
14221,
273,
7920,
18,
588,
1943,
12,
2414,
69,
18,
588,
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,
918,
2245,
40,
507,
3075,
484,
12,
40,
507,
3075,
484,
1803,
5248,
69,
16,
509,
1142,
18029,
13,
288,
3639,
727,
3887,
14221,
273,
7920,
18,
588,
1943,
12,
2414,
69,
18,
588,
18... |
LaterInvocator.leaveModal(ProgressIndicatorBase.this); | doExitModality(); | public void run() { LaterInvocator.leaveModal(ProgressIndicatorBase.this); } | 17306 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17306/c177b16e8fadce8e8c13a717beccc94a7858519e/ProgressIndicatorBase.java/buggy/ui/impl/com/intellij/openapi/progress/util/ProgressIndicatorBase.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
918,
1086,
1435,
288,
2868,
741,
6767,
1739,
7919,
5621,
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,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
918,
1086,
1435,
288,
2868,
741,
6767,
1739,
7919,
5621,
5411,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
if ( async ) { | if (async) { | public static void main(String[] args) throws Exception { System.out.println("Usage java org.apache.james.testing.Main <testconfigfile>"); File testconfFile = new File(args[0]); DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder(); Configuration alltestconf = builder.buildFromFile(testconfFile); Configuration[] testconf = alltestconf.getChildren("test"); TestSuite alltests = new TestSuite(); for ( int i = 0 ; i < testconf.length ; i++ ) { Configuration conf = testconf[i]; String clsname = conf.getAttribute("class"); String name = conf.getAttribute("name"); int repetition = conf.getAttributeAsInteger("repetition"); boolean async = conf.getAttributeAsBoolean("async"); Class clazz = Class.forName(clsname); Constructor cstr = clazz.getConstructor(new Class[] { String.class }); Test test = (Test)cstr.newInstance(new Object[] {name}); if ( test instanceof Configurable ) { ((Configurable)test).configure(conf); } if (repetition > 1) { test = new RepeatedTest(test,repetition); } if ( async ) { TestSuite ts = new ActiveTestSuite(); ts.addTest(test); test = ts; } alltests.addTest(test); } TestRunner.run(alltests); } | 47102 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47102/bbbef603ffaae5369ab44517117636ee561d3b72/Main.java/buggy/tests/src/java/org/apache/james/testing/Main.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
2774,
12,
780,
8526,
833,
13,
1216,
1185,
288,
3639,
2332,
18,
659,
18,
8222,
2932,
5357,
2252,
2358,
18,
19211,
18,
78,
753,
18,
3813,
310,
18,
6376,
411,
3813,
1425,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
2774,
12,
780,
8526,
833,
13,
1216,
1185,
288,
3639,
2332,
18,
659,
18,
8222,
2932,
5357,
2252,
2358,
18,
19211,
18,
78,
753,
18,
3813,
310,
18,
6376,
411,
3813,
1425,
... |
public String getVolumeSetIdentifier() { return volumeSetIdentifier; } | public String getVolumeSetIdentifier() { return volumeSetIdentifier; } | public String getVolumeSetIdentifier() { return volumeSetIdentifier; } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/aa324658a8e5c25a895787936a31595462ad8442/VolumeDescriptor.java/buggy/fs/src/fs/org/jnode/fs/iso9660/VolumeDescriptor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
336,
4545,
694,
3004,
1435,
202,
95,
202,
202,
2463,
3940,
694,
3004,
31,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
336,
4545,
694,
3004,
1435,
202,
95,
202,
202,
2463,
3940,
694,
3004,
31,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
public boolean keepConnection() { | public boolean keepConnection(SVNRepository repository) { | public boolean keepConnection() { return false; } | 5695 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5695/f1ee3a99fba995e9050cc58f5e26f058076e96ed/ISVNSession.java/clean/javasvn/src/org/tmatesoft/svn/core/io/ISVNSession.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
1250,
3455,
1952,
12,
23927,
50,
3305,
3352,
13,
288,
5411,
327,
629,
31,
3639,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
1250,
3455,
1952,
12,
23927,
50,
3305,
3352,
13,
288,
5411,
327,
629,
31,
3639,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
try { Class.forName("org.postgresql.Driver"); return java.sql.DriverManager.getConnection(getURL(), getUser(), getPassword()); } catch (ClassNotFoundException ex) { TestCase.fail(ex.getMessage()); } catch (SQLException ex) { TestCase.fail(ex.getMessage()); } return null; | return openDB(new Properties()); | public static java.sql.Connection openDB() { try { Class.forName("org.postgresql.Driver"); return java.sql.DriverManager.getConnection(getURL(), getUser(), getPassword()); } catch (ClassNotFoundException ex) { TestCase.fail(ex.getMessage()); } catch (SQLException ex) { TestCase.fail(ex.getMessage()); } return null; } | 49504 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49504/b4ed1edb57113c0de4ea881d9688a23b3396d13b/TestUtil.java/clean/src/interfaces/jdbc/org/postgresql/test/TestUtil.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
2252,
18,
4669,
18,
1952,
1696,
2290,
1435,
202,
95,
202,
202,
698,
202,
202,
95,
1082,
202,
797,
18,
1884,
461,
2932,
3341,
18,
2767,
24330,
18,
4668,
8863,
1082,
202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
2252,
18,
4669,
18,
1952,
1696,
2290,
1435,
202,
95,
202,
202,
698,
202,
202,
95,
1082,
202,
797,
18,
1884,
461,
2932,
3341,
18,
2767,
24330,
18,
4668,
8863,
1082,
202,
... |
_logger.debug("Creating class loader"); | _logger.debug("Creating class loader"); | protected ClassLoader prepareVM(String classname, String[] args) { nodeName = parseNodename(args); ClassLoader cl = null; /* Setting up policy & security manager if there is a policy and security manager then override the set setPolicy & setSecurityManager methods. */ try { /* Set the Java policy for use by the security manager */ _logger.debug("Setting policy"); setPolicy(); /* Set the Java security manager */ if (_logger.isDebugEnabled()) { _logger.debug("Setting security manager"); } setSecurityManager(); /* Create a log file to report JAR file verification failures. This is only used when a secure class loader is set. */ if (_logger.isDebugEnabled()) { _logger.debug("Creating Jar verification log"); } createJarVerificationLog(); /* Create the class loader. Load JAR files securely if * a secure class loader is used. */ if (_logger.isDebugEnabled()) { _logger.debug("Creating class loader"); } cl = super.prepareVM(classname, args); if (_logger.isDebugEnabled()) { _logger.debug("Class Loader:" + cl.getClass().getName()); } /* Load cryptographic providers */ CryptoProviderLoader.getInstance().loadCryptoProviders(cl); } catch (Exception e) { _logger.warn("Failed to launch "+classname, e); } return cl; } | 13819 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13819/1692292974c413c27f3434206c80e4fc515bd58b/BaseBootstrapper.java/clean/securebootstrapper/src/org/cougaar/core/security/securebootstrap/BaseBootstrapper.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
9403,
2911,
7397,
12,
780,
7479,
16,
514,
8526,
833,
13,
288,
565,
7553,
273,
1109,
50,
369,
1069,
12,
1968,
1769,
565,
9403,
927,
273,
446,
31,
565,
1748,
1377,
13274,
731,
225,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
9403,
2911,
7397,
12,
780,
7479,
16,
514,
8526,
833,
13,
288,
565,
7553,
273,
1109,
50,
369,
1069,
12,
1968,
1769,
565,
9403,
927,
273,
446,
31,
565,
1748,
1377,
13274,
731,
225,
... |
public String getMessage(String code, Object[] args) { return messagesource.getMessage(code, args, localegetter == null ? Locale .getDefault() : localegetter.get()); | public String getMessage(String[] codes, Object[] args) { DefaultMessageSourceResolvable dmsr = new DefaultMessageSourceResolvable( codes, args); Locale locale = localegetter == null ? Locale.getDefault() : localegetter.get(); try { return messagesource.getMessage(dmsr, locale); } catch (Exception nsme) { Logger.log.warn("Failed to look up message " + codes[0] + ", falling back to default", nsme); try { if (defaultmessagekey != null) { return messagesource.getMessage(defaultmessagekey, null, locale); } } catch (Exception nsme2) { } } return defaultmessage; | public String getMessage(String code, Object[] args) { return messagesource.getMessage(code, args, localegetter == null ? Locale .getDefault() : localegetter.get()); } | 48218 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48218/9c8c1ef95b985c15f4195e2a747db862bcf88afb/SpringMessageLocator.java/clean/src/uk/org/ponder/springutil/SpringMessageLocator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
514,
2381,
12,
780,
981,
16,
1033,
8526,
833,
13,
288,
565,
327,
2743,
552,
18,
24906,
12,
710,
16,
833,
16,
2573,
11990,
422,
446,
692,
6458,
3639,
263,
588,
1868,
1435,
3639,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
514,
2381,
12,
780,
981,
16,
1033,
8526,
833,
13,
288,
565,
327,
2743,
552,
18,
24906,
12,
710,
16,
833,
16,
2573,
11990,
422,
446,
692,
6458,
3639,
263,
588,
1868,
1435,
3639,
... |
public static ResultUnitAssociation readByOid(Integer oid) { | public final static ResultUnitAssociation readByOid(Integer oid) { | public static ResultUnitAssociation readByOid(Integer oid) { final ResultUnitAssociation association = RootDomainObject.getInstance().readResultUnitAssociationByOID(oid); if (association==null) { throw new DomainException("error.researcher.ResultUnitAssociation.null"); } return association; } | 2645 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2645/f7abe00b5548b12caf61a615516273677cbc5915/ResultUnitAssociation.java/buggy/src/net/sourceforge/fenixedu/domain/research/result/ResultUnitAssociation.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
3438,
2802,
7174,
855,
858,
19105,
12,
4522,
7764,
13,
288,
202,
6385,
3438,
2802,
7174,
6384,
273,
7450,
3748,
921,
18,
588,
1442,
7675,
896,
1253,
2802,
7174,
858,
12945,
12,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
3438,
2802,
7174,
855,
858,
19105,
12,
4522,
7764,
13,
288,
202,
6385,
3438,
2802,
7174,
6384,
273,
7450,
3748,
921,
18,
588,
1442,
7675,
896,
1253,
2802,
7174,
858,
12945,
12,... |
saveStructureViewState(); | storeState(); | public void dispose() { LOG.assertTrue(EventQueue.isDispatchThread(), Thread.currentThread().getName()); saveStructureViewState(); if (myAbstractTreeBuilder != null) { myAbstractTreeBuilder.dispose(); myAbstractTreeBuilder = null; } myFileEditor = null; myAutoScrollFromSourceHandler.dispose(); } | 56598 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56598/a9e359ba28413282c647b0e8080e7d385596e279/StructureViewComponent.java/buggy/source/com/intellij/ide/structureView/newStructureView/StructureViewComponent.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
15825,
1435,
288,
565,
2018,
18,
11231,
5510,
12,
1133,
3183,
18,
291,
5325,
3830,
9334,
4884,
18,
2972,
3830,
7675,
17994,
10663,
282,
1707,
1119,
5621,
282,
309,
261,
4811,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
15825,
1435,
288,
565,
2018,
18,
11231,
5510,
12,
1133,
3183,
18,
291,
5325,
3830,
9334,
4884,
18,
2972,
3830,
7675,
17994,
10663,
282,
1707,
1119,
5621,
282,
309,
261,
4811,
7... |
if (lock != null) lock.release(); | if (lock != null) lock.release(); | public final boolean isMember(Address node) { if (Assert.VERIFY_ASSERTIONS) Assert._assert(isNode(node)); boolean result = false; if (lock != null) lock.acquire(); Address cur = head; while (!cur.isZero()) { if (cur.EQ(node)) { result = true; break; } cur = cur.loadAddress(NEXT_OFFSET); } if (lock != null) lock.release(); return result; } | 5245 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5245/4c66aa27cec27f8dd5902baec018ff86d7f49ee2/DoublyLinkedList.java/buggy/MMTk/src/org/mmtk/utility/DoublyLinkedList.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
727,
1250,
353,
4419,
12,
1887,
756,
13,
288,
565,
309,
261,
8213,
18,
23756,
67,
8423,
11539,
1146,
55,
13,
5452,
6315,
11231,
12,
291,
907,
12,
2159,
10019,
565,
1250,
563,
273,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
727,
1250,
353,
4419,
12,
1887,
756,
13,
288,
565,
309,
261,
8213,
18,
23756,
67,
8423,
11539,
1146,
55,
13,
5452,
6315,
11231,
12,
291,
907,
12,
2159,
10019,
565,
1250,
563,
273,... |
while (li.hasNext()) { if ((layer = (MapLayer)li.next()) != null) { float opacity = layer.getOpacity(); if (layer.isVisible() && opacity > 0.0f) { if (opacity < 1.0f) { g2d.setComposite(AlphaComposite.getInstance( AlphaComposite.SRC_ATOP, opacity)); } else { g2d.setComposite(AlphaComposite.SrcOver); } if (layer instanceof TileLayer) { paintLayer(g2d, (TileLayer)layer, currentZoom); } else if (layer instanceof ObjectGroup) { paintLayer(g2d, (ObjectGroup)layer, currentZoom); } } } } | paintSubMap(myMap, g2d, 1.0f); | public void paintComponent(Graphics g) { Graphics2D g2d = (Graphics2D)g.create(); TiledConfiguration conf = TiledConfiguration.getInstance(); double currentZoom = zoom; Iterator li = myMap.getLayers(); MapLayer layer; Rectangle clip = g2d.getClipBounds(); g2d.setStroke(new BasicStroke(2.0f)); // Do an initial fill with the background color try { String colorString = conf.getValue("tiled.background.color"); g2d.setColor(Color.decode(colorString)); } catch (NumberFormatException e) { g2d.setColor(new Color(64, 64, 64)); } g2d.fillRect(clip.x, clip.y, clip.width, clip.height); while (li.hasNext()) { if ((layer = (MapLayer)li.next()) != null) { float opacity = layer.getOpacity(); if (layer.isVisible() && opacity > 0.0f) { if (opacity < 1.0f) { g2d.setComposite(AlphaComposite.getInstance( AlphaComposite.SRC_ATOP, opacity)); } else { g2d.setComposite(AlphaComposite.SrcOver); } if (layer instanceof TileLayer) { paintLayer(g2d, (TileLayer)layer, currentZoom); } else if (layer instanceof ObjectGroup) { paintLayer(g2d, (ObjectGroup)layer, currentZoom); } } } } if (!getMode(PF_NOSPECIAL)) { li = myMap.getLayersSpecial(); while (li.hasNext()) { layer = (MapLayer) li.next(); if (layer.isVisible()) { if (layer instanceof SelectionLayer) { g2d.setComposite(AlphaComposite.getInstance( AlphaComposite.SRC_ATOP, 0.3f)); g2d.setColor( ((SelectionLayer)layer).getHighlightColor()); } paintLayer(g2d, (TileLayer)layer, currentZoom); } } } // Grid color (also used for coordinates) try { String colorString = conf.getValue("tiled.grid.color"); g2d.setColor(Color.decode(colorString)); } catch (NumberFormatException e) { g2d.setColor(Color.black); } if (getMode(PF_GRIDMODE)) { // Grid opacity int opacity = conf.getIntValue("tiled.grid.opacity", 255); if (opacity < 255) { g2d.setComposite(AlphaComposite.getInstance( AlphaComposite.SRC_ATOP, (float)opacity / 255.0f)); } else { g2d.setComposite(AlphaComposite.SrcOver); } // Configure grid antialiasing if (conf.keyHasValue("tiled.grid.antialias", 1)) { g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); } else { g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF); } g2d.setStroke(new BasicStroke()); paintGrid(g2d, currentZoom); } if (getMode(PF_COORDINATES)) { g2d.setComposite(AlphaComposite.SrcOver); paintCoordinates(g2d, zoom); } } | 6621 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6621/11c639cba9326b8dbe4e7446bc856544b84589b1/MapView.java/clean/tiled/view/MapView.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
12574,
1841,
12,
17558,
314,
13,
288,
3639,
16830,
22,
40,
314,
22,
72,
273,
261,
17558,
22,
40,
13,
75,
18,
2640,
5621,
3639,
399,
1411,
1750,
2195,
273,
399,
1411,
1750,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3639,
16830,
22,
40,
314,
22,
72,
273,
261,
17558,
22,
40,
13,
75,
18,
2640,
5621,
3639,
399,
1411,
1750,
2195,
273,
399,
1411,
1750,
... |
public void printCharacterEntityReference(char[] code) throws IOException { | public void printCharacterEntityReference (char[] code, boolean first, boolean preceedingSpace) throws IOException { if ((prettyPrinter.getFormat()) && (xmlSpace.get(0) != Boolean.TRUE)) { if (first) { printNewline(); printString(margin.toString()); } else if (preceedingSpace) { int endCol = column + code.length + 3; if (endCol > prettyPrinter.getDocumentWidth()){ printNewline(); printString(margin.toString()); } else { printCharacter(' '); } } } | public void printCharacterEntityReference(char[] code) throws IOException { printString("&#"); printCharacters(code); printCharacter(';'); } | 45946 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45946/bebad01b866f19c096ef5f10f2a9ca11827bbe45/OutputManager.java/buggy/sources/org/apache/batik/transcoder/svg2svg/OutputManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1172,
7069,
1943,
2404,
261,
3001,
8526,
981,
16,
1250,
1122,
16,
1250,
675,
5288,
310,
3819,
13,
1216,
1860,
288,
309,
14015,
19073,
12149,
18,
588,
1630,
10756,
597,
261,
290... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1172,
7069,
1943,
2404,
261,
3001,
8526,
981,
16,
1250,
1122,
16,
1250,
675,
5288,
310,
3819,
13,
1216,
1860,
288,
309,
14015,
19073,
12149,
18,
588,
1630,
10756,
597,
261,
290... |
public NamingException (String msg) | public NamingException () | public NamingException (String msg) { super(msg); } | 25337 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/25337/daca25b853b52ea5035f6979a325fe030df38870/NamingException.java/buggy/libjava/javax/naming/NamingException.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
26890,
1832,
225,
288,
565,
2240,
12,
3576,
1769,
225,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
26890,
1832,
225,
288,
565,
2240,
12,
3576,
1769,
225,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Logger.normal(this, "My exponent: "+myExponent.toHexString()+", my exponential: "+myExponential.toHexString()+", peer's exponential: "+peerExponential.toHexString()); | public synchronized BlockCipher getCipher() { lastUsedTime = System.currentTimeMillis(); if(cipher != null) return cipher; // Calculate key NativeBigInteger sharedSecret = (NativeBigInteger) peerExponential.modPow(myExponent, group.getP()); MessageDigest md; try { md = MessageDigest.getInstance("SHA-256"); } catch (NoSuchAlgorithmException e) { throw new Error(e); } byte[] digest = md.digest(sharedSecret.toByteArray()); Logger.normal(this, "My exponent: "+myExponent.toHexString()+", my exponential: "+myExponential.toHexString()+", peer's exponential: "+peerExponential.toHexString()); Logger.normal(this, "Key="+HexUtil.bytesToHex(digest)); try { cipher = new Rijndael(256, 256); } catch (UnsupportedCipherException e1) { throw new Error(e1); } cipher.initialize(digest); return cipher; } | 46731 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46731/4701aa9e21c30017ca88796ba43ef53f3e7172a5/DiffieHellmanContext.java/buggy/src/freenet/crypt/DiffieHellmanContext.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3852,
3914,
13896,
1927,
4337,
1435,
288,
3639,
1142,
6668,
950,
273,
2332,
18,
2972,
28512,
5621,
3639,
309,
12,
17094,
480,
446,
13,
327,
5867,
31,
3639,
368,
9029,
498,
3639,
167... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3852,
3914,
13896,
1927,
4337,
1435,
288,
3639,
1142,
6668,
950,
273,
2332,
18,
2972,
28512,
5621,
3639,
309,
12,
17094,
480,
446,
13,
327,
5867,
31,
3639,
368,
9029,
498,
3639,
167... | |
public Object getPreviousValue(); | Object getPreviousValue(); | public Object getPreviousValue(); | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/61b8e27fab61a8487622d1793b61aa19c130c7ab/SpinnerModel.java/clean/core/src/classpath/javax/javax/swing/SpinnerModel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1033,
17225,
620,
5621,
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,
0,
0,
0,
0,
... | [
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,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1033,
17225,
620,
5621,
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,
-100,
-100,
... |
return new TableBandState( element, TableItem.HEADER_SLOT ); | return new TableBandState( element, IListingElementModel.HEADER_SLOT ); | public AbstractParseState startElement( String tagName ) { if ( tagName.equalsIgnoreCase( DesignSchemaConstants.COLUMN_TAG ) ) return new TableColumnState( handler, element, TableItem.COLUMN_SLOT ); if ( tagName.equalsIgnoreCase( DesignSchemaConstants.HEADER_TAG ) ) return new TableBandState( element, TableItem.HEADER_SLOT ); if ( tagName.equalsIgnoreCase( DesignSchemaConstants.GROUP_TAG ) ) return new TableGroupState( handler, element, TableItem.GROUP_SLOT ); if ( tagName.equalsIgnoreCase( DesignSchemaConstants.DETAIL_TAG ) ) return new TableBandState( element, TableItem.DETAIL_SLOT ); if ( tagName.equalsIgnoreCase( DesignSchemaConstants.FOOTER_TAG ) ) return new TableBandState( element, TableItem.FOOTER_SLOT ); return super.startElement( tagName ); } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/d802c33711e0d111551ae23575895cd060f085b6/TableItemState.java/buggy/model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/parser/TableItemState.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
4115,
3201,
1119,
13591,
12,
514,
7196,
262,
202,
95,
202,
202,
430,
261,
7196,
18,
14963,
5556,
12,
29703,
3078,
2918,
18,
11009,
67,
7927,
262,
262,
1082,
202,
2463,
394,
35... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
4115,
3201,
1119,
13591,
12,
514,
7196,
262,
202,
95,
202,
202,
430,
261,
7196,
18,
14963,
5556,
12,
29703,
3078,
2918,
18,
11009,
67,
7927,
262,
262,
1082,
202,
2463,
394,
35... |
ds.wait(); } catch (InterruptedException ie) { | jobQueueSynchro.wait(); } catch (InterruptedException ie) { | public void run() { while (true) { // Load input data to input queue synchronized (ds) { if (jobQueue.isEmpty()) { jobQueue = genePattern.getWaitingJobs(); } if (jobQueue.isEmpty()) { try { ds.wait(); } catch (InterruptedException ie) { } } } Object o = null; if (!jobQueue.isEmpty()) { o = jobQueue.remove(0); } if (o == null) { continue; } try { onJobProcessFrameWork(o); } catch (Exception ex) { log.error(ex); } } } | 57344 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57344/95a2eab1fe8529b27fcb7c023d56a4f951f94f07/AnalysisTask.java/buggy/src/org/genepattern/server/AnalysisTask.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1086,
1435,
288,
3639,
1323,
261,
3767,
13,
288,
5411,
368,
4444,
810,
501,
358,
810,
2389,
5411,
3852,
261,
2377,
13,
288,
7734,
309,
261,
4688,
3183,
18,
291,
1921,
10756,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1086,
1435,
288,
3639,
1323,
261,
3767,
13,
288,
5411,
368,
4444,
810,
501,
358,
810,
2389,
5411,
3852,
261,
2377,
13,
288,
7734,
309,
261,
4688,
3183,
18,
291,
1921,
10756,
... |
{ return org.tigris.gef.util.Localizer.localize(bundle, key); } | { return org.tigris.gef.util.Localizer.localize(bundle, key); } | public static String localize(String bundle, String key) { return org.tigris.gef.util.Localizer.localize(bundle, key); } | 7166 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7166/7d618d723423d7f54e532038a97b965f2056183e/Argo.java/clean/src_new/org/argouml/application/api/Argo.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
514,
26407,
12,
780,
3440,
16,
514,
498,
13,
202,
95,
202,
202,
2463,
2358,
18,
88,
2757,
291,
18,
908,
74,
18,
1367,
18,
2042,
1824,
18,
3729,
554,
12,
9991,
16,
498... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
514,
26407,
12,
780,
3440,
16,
514,
498,
13,
202,
95,
202,
202,
2463,
2358,
18,
88,
2757,
291,
18,
908,
74,
18,
1367,
18,
2042,
1824,
18,
3729,
554,
12,
9991,
16,
498... |
} else if (buildAllAction != null && found) { | } else if (buildAllAction != null && found && !enabled) { | public void run() { Shell shell = window.getShell(); if (isDisposed || shell == null || shell.isDisposed()) return; IWorkspace workspace = ResourcesPlugin.getWorkspace(); IProject[] projects = workspace.getRoot().getProjects(); boolean enabled = BuildUtilities.isEnabled(projects, IncrementalProjectBuilder.INCREMENTAL_BUILD); //update menu bar actions in project menu buildAllAction.setEnabled(enabled); buildProjectAction.setEnabled(enabled); toggleAutoBuildAction.setChecked(workspace.isAutoBuilding()); cleanAction.setEnabled(BuildUtilities.isEnabled(projects, IncrementalProjectBuilder.CLEAN_BUILD)); //update the cool bar build button ICoolBarManager coolBarManager = actionBarConfigurer .getCoolBarManager(); IContributionItem cbItem = coolBarManager .find(IWorkbenchActionConstants.TOOLBAR_FILE); if (!(cbItem instanceof ToolBarContributionItem)) { // This should not happen IDEWorkbenchPlugin.log("File toolbar contribution item is missing"); //$NON-NLS-1$ return; } ToolBarContributionItem toolBarItem = (ToolBarContributionItem) cbItem; IToolBarManager toolBarManager = toolBarItem.getToolBarManager(); if (toolBarManager == null) { // error if this happens, file toolbar assumed to always exist IDEWorkbenchPlugin.log("File toolbar is missing"); //$NON-NLS-1$ return; } //add the build button if build actions are enabled, and remove it otherwise boolean found = toolBarManager.find(buildAllAction.getId()) != null; if (enabled && !found) { toolBarManager.appendToGroup(IWorkbenchActionConstants.BUILD_GROUP, buildAllAction); toolBarManager.update(false); toolBarItem.update(ICoolBarManager.SIZE); } else if (buildAllAction != null && found) { toolBarManager.remove(buildAllAction.getId()); toolBarManager.update(false); toolBarItem.update(ICoolBarManager.SIZE); } } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/506669469fa5924c6033fa21a80040a0678d268c/WorkbenchActionBuilder.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/WorkbenchActionBuilder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
918,
1086,
1435,
288,
7734,
19433,
5972,
273,
2742,
18,
588,
13220,
5621,
7734,
309,
261,
291,
1669,
7423,
747,
5972,
422,
446,
747,
5972,
18,
291,
1669,
7423,
10756,
1171,
202,
24... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
918,
1086,
1435,
288,
7734,
19433,
5972,
273,
2742,
18,
588,
13220,
5621,
7734,
309,
261,
291,
1669,
7423,
747,
5972,
422,
446,
747,
5972,
18,
291,
1669,
7423,
10756,
1171,
202,
24... |
PrivateForum pf = prtMsgManager.initializePrivateMessageArea(area); | PrivateForum pf = prtMsgManager.initializePrivateMessageArea(area); pf = prtMsgManager.initializationHelper(pf); | public void initializePrivateMessageArea() { /** get area per request */ area = prtMsgManager.getPrivateMessageArea(); if (getPvtAreaEnabled() || isInstructor()){ PrivateForum pf = prtMsgManager.initializePrivateMessageArea(area); pvtTopics = pf.getTopics(); Collections.sort(pvtTopics, PrivateTopicImpl.TITLE_COMPARATOR); forum=pf; activatePvtMsg = (Boolean.TRUE.equals(area.getEnabled())) ? "yes" : "no"; forwardPvtMsg = (Boolean.TRUE.equals(pf.getAutoForward())) ? "yes" : "no"; forwardPvtMsgEmail = pf.getAutoForwardEmail(); } //add a error message for instructor and private area is not enabled if(isInstructor() && !getPvtAreaEnabled()) { setErrorMessage("The Private Message Area is not turned on for this course. To turn on the Private Message area for this course, click Settings from the Private Message Area bar.") ; } } | 48936 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48936/64a863c65a0bfa0b3ab40fc3e3c7c5c08d053c3f/PrivateMessagesTool.java/clean/messageforums-app/src/java/org/sakaiproject/tool/messageforums/PrivateMessagesTool.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
4046,
6014,
1079,
5484,
1435,
225,
288,
9079,
1783,
336,
5091,
1534,
590,
1195,
565,
5091,
273,
20976,
3332,
1318,
18,
588,
6014,
1079,
5484,
5621,
7734,
309,
261,
588,
27615,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4046,
6014,
1079,
5484,
1435,
225,
288,
9079,
1783,
336,
5091,
1534,
590,
1195,
565,
5091,
273,
20976,
3332,
1318,
18,
588,
6014,
1079,
5484,
5621,
7734,
309,
261,
588,
27615,
... |
add(openComposite); | add(endedComposite); | public void closeOperation(boolean operationOK, boolean addToHistory, int mode) { if (DEBUG_OPERATION_HISTORY_UNEXPECTED) { if (openComposite == null) { System.out .print("OPERATIONHISTORY >>> Attempted to close operation when none was open "); //$NON-NLS-1$ System.out.println(); return; } } if (openComposite != null) { if (DEBUG_OPERATION_HISTORY_OPENOPERATION) { System.out.print("OPERATIONHISTORY >>> Closing operation "); //$NON-NLS-1$ System.out.print(openComposite); System.out.println(); } // any mode other than EXECUTE was triggered by a request to undo or // redo something already in the history, so undo and redo // notification will occur at // the end of that sequence. if (operationOK) { if (mode == EXECUTE) notifyDone(openComposite); if (addToHistory) add(openComposite); } else { if (mode == EXECUTE) notifyNotOK(openComposite); } openComposite = null; } } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/6ed55bf13812d560205c1b00eb562c4b4f631565/DefaultOperationHistory.java/buggy/bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/operations/DefaultOperationHistory.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1746,
2988,
12,
6494,
1674,
3141,
16,
1250,
9604,
5623,
16,
1082,
202,
474,
1965,
13,
288,
202,
202,
430,
261,
9394,
67,
22040,
67,
31746,
67,
2124,
27409,
13,
288,
1082,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1746,
2988,
12,
6494,
1674,
3141,
16,
1250,
9604,
5623,
16,
1082,
202,
474,
1965,
13,
288,
202,
202,
430,
261,
9394,
67,
22040,
67,
31746,
67,
2124,
27409,
13,
288,
1082,... |
messageValues[0] = jobInfo.getJob().getName(); messageValues[1] = taskName; messageValues[2] = String.valueOf(getPercentDone()); | messageValues[0] = String.valueOf(getPercentDone()); messageValues[1] = jobInfo.getJob().getName(); messageValues[2] = taskName; | String getDisplayString() { if(totalWork == IProgressMonitor.UNKNOWN) return unknownProgress(); if (taskName == null) { return getDisplayStringWithoutTask(); } else { String[] messageValues = new String[3]; messageValues[0] = jobInfo.getJob().getName(); messageValues[1] = taskName; messageValues[2] = String.valueOf(getPercentDone()); return ProgressMessages.format("JobInfo.DoneMessage", messageValues); //$NON-NLS-1$ } } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/6cd187439cd4cc7af0a6f1e5f6fa64b6a461996c/TaskInfo.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/TaskInfo.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
780,
13854,
780,
1435,
288,
9506,
202,
430,
12,
4963,
2421,
422,
467,
5491,
7187,
18,
14737,
13,
1082,
202,
2463,
5917,
5491,
5621,
9506,
202,
430,
261,
4146,
461,
422,
446,
13,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
780,
13854,
780,
1435,
288,
9506,
202,
430,
12,
4963,
2421,
422,
467,
5491,
7187,
18,
14737,
13,
1082,
202,
2463,
5917,
5491,
5621,
9506,
202,
430,
261,
4146,
461,
422,
446,
13,
28... |
String logFileName = "megameklog.txt"; if (PreferenceManager.getClientPreferences().stampFilenames()) { logFileName = StringUtil.addDateTimeStamp(logFileName); } for (int i = 0; i < args.length; i++) { if (args[i].equals("-testdice")) { TestDice.testDice(); return; } else if (args[i].equals("-dedicated")) { String savegameFileName = null; i++; if (i >= args.length || args[i].startsWith("-")) { i--; } else { savegameFileName = args[i]; } | String logFileName = DEFAULT_LOG_FILE_NAME; | public static void main(String[] args) { int usePort = 2346; String logFileName = "megameklog.txt"; //$NON-NLS-1$ if (PreferenceManager.getClientPreferences().stampFilenames()) { logFileName = StringUtil.addDateTimeStamp(logFileName); } for (int i = 0; i < args.length; i++) { if (args[i].equals("-testdice")) { //$NON-NLS-1$ TestDice.testDice(); return; } else if (args[i].equals("-dedicated")) { //$NON-NLS-1$ // Next argument may be the savegame file's name. String savegameFileName = null; i++; if (i >= args.length || args[i].startsWith("-")) { //$NON-NLS-1$ // no filename -- bump the argument processing back up i--; } else { savegameFileName = args[i]; } // Next argument may be "-port <number>" i++; if (i<args.length) { if (args[i].equals("-port")) { //$NON-NLS-1$ i++; if (i<args.length) { usePort = Integer.decode(args[i]).intValue(); } else { i--; usePort = PreferenceManager.getClientPreferences().getLastServerPort(); } } else { i--; usePort = PreferenceManager.getClientPreferences().getLastServerPort(); } } // kick off a RNG check megamek.common.Compute.d6(); // start server Server dedicated = new Server(PreferenceManager.getClientPreferences().getLastServerPass(), usePort); // load game options from xml file if available dedicated.getGame().getOptions().loadOptions(null); if (null != savegameFileName) { dedicated.loadGame(new File(savegameFileName)); } return; } else if (args[i].equals("-log")) { //$NON-NLS-1$ // Next argument is the log file's name. i++; if (i >= args.length || args[i].equals("none") || args[i].equals("off")) { //$NON-NLS-1$ //$NON-NLS-2$ logFileName = null; } else { logFileName = args[i]; } } else if (args[i].equals("-testxml")) { //$NON-NLS-1$ // Next argument is the log file's name. i++; if (i >= args.length) { System.err.println("The '-testxml' flag requires a file name."); //$NON-NLS-1$ } else { new TinyXMLTest("xml", args[i]); //$NON-NLS-1$ } return; } } // Redirect output to logfiles, unless turned off. if (logFileName != null) { try { System.out.println("Redirecting output to " + logFileName); //$NON-NLS-1$ String sLogDir = PreferenceManager.getClientPreferences().getLogDirectory(); File logDir = new File(sLogDir); if (!logDir.exists()) { logDir.mkdir(); } PrintStream ps = new PrintStream(new BufferedOutputStream(new FileOutputStream(sLogDir + File.separator + logFileName), 64)); System.setOut(ps); System.setErr(ps); } catch (Exception e) { System.err.println("Unable to redirect output to " + logFileName); //$NON-NLS-1$ e.printStackTrace(); } } // End log-to-file new MegaMek(); } | 3464 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3464/15f3f809843b267f4de3e5b3ca28b1e9b8292edb/MegaMek.java/clean/megamek/src/megamek/MegaMek.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
2774,
12,
780,
8526,
833,
13,
288,
3639,
509,
999,
2617,
273,
576,
5026,
26,
31,
3639,
514,
613,
4771,
273,
315,
81,
1332,
339,
79,
1330,
18,
5830,
14432,
4329,
3993,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
2774,
12,
780,
8526,
833,
13,
288,
3639,
509,
999,
2617,
273,
576,
5026,
26,
31,
3639,
514,
613,
4771,
273,
315,
81,
1332,
339,
79,
1330,
18,
5830,
14432,
4329,
3993,
... |
98}; | 98}; | protected OMElement createEnvelope() { OMFactory fac = OMAbstractFactory.getOMFactory(); OMNamespace omNs = fac.createOMNamespace("http://localhost/my", "my"); OMElement rpcWrapEle = fac.createOMElement("echoOMElement", omNs); OMElement data = fac.createOMElement("data", omNs); expectedByteArray = new byte[]{13, 56, 65, 32, 12, 12, 7, -3, -2, -1, 98}; for (int i = 0; i < 4; i++) { OMElement subData = fac.createOMElement("subData", omNs); DataHandler dataHandler = new DataHandler("Thilina","text/plain"); //new ByteArrayDataSource(expectedByteArray)); textData = new OMTextImpl(dataHandler, true); subData.addChild(textData); data.addChild(subData); } rpcWrapEle.addChild(data); return rpcWrapEle; } | 49300 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49300/f7e4970b93b85f829dd6abff3c1a80a00ee1ce67/EchoRawMTOMLoadTest.java/clean/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMLoadTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
531,
12310,
752,
10862,
1435,
288,
3639,
28839,
1733,
5853,
273,
531,
5535,
3336,
1733,
18,
588,
1872,
1733,
5621,
3639,
28839,
3402,
8068,
10386,
273,
5853,
18,
2640,
1872,
3402,
293... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
531,
12310,
752,
10862,
1435,
288,
3639,
28839,
1733,
5853,
273,
531,
5535,
3336,
1733,
18,
588,
1872,
1733,
5621,
3639,
28839,
3402,
8068,
10386,
273,
5853,
18,
2640,
1872,
3402,
293... |
SendMessageDirectJob j = new SendMessageDirectJob(_context, msg, _block.getRouter(), _priority); _context.jobQueue().addJob(j); | SendMessageDirectJob j = new SendMessageDirectJob(getContext(), msg, _block.getRouter(), _priority); getContext().jobQueue().addJob(j); | protected void send(I2NPMessage msg) { _log.info("Sending reply with " + _message.getClass().getName() + " in a sourceRouteeplyMessage to " + _block.getRouter().toBase64()); SendMessageDirectJob j = new SendMessageDirectJob(_context, msg, _block.getRouter(), _priority); _context.jobQueue().addJob(j); } | 45677 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45677/e737e5c9507ed0d463dc9e45a8f63657f466b177/SendReplyMessageJob.java/clean/router/java/src/net/i2p/router/message/SendReplyMessageJob.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
1366,
12,
45,
22,
23430,
1079,
1234,
13,
288,
3639,
389,
1330,
18,
1376,
2932,
16322,
4332,
598,
315,
397,
389,
2150,
18,
588,
797,
7675,
17994,
1435,
397,
315,
316,
279,
108... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
1366,
12,
45,
22,
23430,
1079,
1234,
13,
288,
3639,
389,
1330,
18,
1376,
2932,
16322,
4332,
598,
315,
397,
389,
2150,
18,
588,
797,
7675,
17994,
1435,
397,
315,
316,
279,
108... |
public void testDefaultFailoverMap() throws Exception { { JBossConnectionFactory factory = (JBossConnectionFactory )ic[0].lookup("/ConnectionFactory"); ClusteredClientConnectionFactoryDelegate delegate = (ClusteredClientConnectionFactoryDelegate)factory.getDelegate(); assertEquals(3, ServerManagement.getServer(0).getNodeIDView().size()); ClientConnectionFactoryDelegate[] delegates = delegate.getDelegates(); ClientConnectionFactoryDelegate cf1 = delegate.getDelegates()[0]; ClientConnectionFactoryDelegate cf2 = delegate.getDelegates()[1]; ClientConnectionFactoryDelegate cf3 = delegate.getDelegates()[2]; //The order here depends on the order the servers were started in //If any servers get stopped and then started then the order will change log.info("cf1 serverid=" + cf1.getServerID()); log.info("cf2 serverid=" + cf2.getServerID()); log.info("cf3 serverid=" + cf3.getServerID()); assertEquals(0, cf1.getServerID()); assertEquals(1, cf2.getServerID()); assertEquals(2, cf3.getServerID()); Map failoverMap = delegate.getFailoverMap(); assertEquals(3, delegates.length); assertEquals(3, failoverMap.size()); // Default failover policy just chooses the node to the right assertEquals(cf2.getServerID(), ((Integer)failoverMap.get(new Integer(cf1.getServerID()))).intValue()); assertEquals(cf3.getServerID(), ((Integer)failoverMap.get(new Integer(cf2.getServerID()))).intValue()); assertEquals(cf1.getServerID(), ((Integer)failoverMap.get(new Integer(cf3.getServerID()))).intValue()); } //Now cleanly stop one of the servers log.info("************** STOPPING SERVER 0"); ServerManagement.stop(0); log.info("server stopped"); assertEquals(2, ServerManagement.getServer(1).getNodeIDView().size()); { //Lookup another connection factory JBossConnectionFactory factory = (JBossConnectionFactory )ic[1].lookup("/ConnectionFactory"); log.info("Got connection factory"); ClusteredClientConnectionFactoryDelegate delegate = (ClusteredClientConnectionFactoryDelegate)factory.getDelegate(); ClientConnectionFactoryDelegate[] delegates = delegate.getDelegates(); Map failoverMap = delegate.getFailoverMap(); log.info("Got failover map"); assertEquals(2, delegates.length); ClientConnectionFactoryDelegate cf1 = delegate.getDelegates()[0]; ClientConnectionFactoryDelegate cf2 = delegate.getDelegates()[1]; //Order here depends on order servers were started in log.info("cf1 serverid=" + cf1.getServerID()); log.info("cf2 serverid=" + cf2.getServerID()); assertEquals(1, cf1.getServerID()); assertEquals(2, cf2.getServerID()); assertEquals(2, failoverMap.size()); assertEquals(cf2.getServerID(), ((Integer)failoverMap.get(new Integer(cf1.getServerID()))).intValue()); assertEquals(cf1.getServerID(), ((Integer)failoverMap.get(new Integer(cf2.getServerID()))).intValue()); } //Cleanly stop another server log.info("Server 1 is started: " + ServerManagement.getServer(1).isServerPeerStarted()); ServerManagement.stop(1); assertEquals(1, ServerManagement.getServer(2).getNodeIDView().size()); { //Lookup another connection factory JBossConnectionFactory factory = (JBossConnectionFactory )ic[2].lookup("/ConnectionFactory"); ClusteredClientConnectionFactoryDelegate delegate = (ClusteredClientConnectionFactoryDelegate)factory.getDelegate(); ClientConnectionFactoryDelegate[] delegates = delegate.getDelegates(); Map failoverMap = delegate.getFailoverMap(); assertEquals(1, delegates.length); ClientConnectionFactoryDelegate cf1 = delegate.getDelegates()[0]; assertEquals(2, cf1.getServerID()); assertEquals(1, failoverMap.size()); assertEquals(cf1.getServerID(), ((Integer)failoverMap.get(new Integer(cf1.getServerID()))).intValue()); } //Restart server 0 ServerManagement.start("all", 0); { JBossConnectionFactory factory = (JBossConnectionFactory )ic[0].lookup("/ConnectionFactory"); log.info("Got connection factory"); ClusteredClientConnectionFactoryDelegate delegate = (ClusteredClientConnectionFactoryDelegate)factory.getDelegate(); ClientConnectionFactoryDelegate[] delegates = delegate.getDelegates(); Map failoverMap = delegate.getFailoverMap(); log.info("Got failover map"); assertEquals(2, delegates.length); ClientConnectionFactoryDelegate cf1 = delegate.getDelegates()[0]; ClientConnectionFactoryDelegate cf2 = delegate.getDelegates()[1]; log.info("cf1 serverid=" + cf1.getServerID()); log.info("cf2 serverid=" + cf2.getServerID()); assertEquals(0, cf1.getServerID()); assertEquals(2, cf2.getServerID()); assertEquals(2, failoverMap.size()); assertEquals(cf2.getServerID(), ((Integer)failoverMap.get(new Integer(cf1.getServerID()))).intValue()); assertEquals(cf1.getServerID(), ((Integer)failoverMap.get(new Integer(cf2.getServerID()))).intValue()); } //Restart server 1 ServerManagement.start("all", 1); { JBossConnectionFactory factory = (JBossConnectionFactory )ic[1].lookup("/ConnectionFactory"); log.info("Got connection factory"); ClusteredClientConnectionFactoryDelegate delegate = (ClusteredClientConnectionFactoryDelegate)factory.getDelegate(); ClientConnectionFactoryDelegate[] delegates = delegate.getDelegates(); Map failoverMap = delegate.getFailoverMap(); log.info("Got failover map"); assertEquals(3, delegates.length); ClientConnectionFactoryDelegate cf1 = delegate.getDelegates()[0]; ClientConnectionFactoryDelegate cf2 = delegate.getDelegates()[1]; ClientConnectionFactoryDelegate cf3 = delegate.getDelegates()[2]; log.info("cf1 serverid=" + cf1.getServerID()); log.info("cf2 serverid=" + cf2.getServerID()); log.info("cf3 serverid=" + cf3.getServerID()); assertEquals(0, cf1.getServerID()); assertEquals(1, cf2.getServerID()); assertEquals(2, cf3.getServerID()); assertEquals(3, failoverMap.size()); assertEquals(cf2.getServerID(), ((Integer)failoverMap.get(new Integer(cf1.getServerID()))).intValue()); assertEquals(cf3.getServerID(), ((Integer)failoverMap.get(new Integer(cf2.getServerID()))).intValue()); assertEquals(cf1.getServerID(), ((Integer)failoverMap.get(new Integer(cf3.getServerID()))).intValue()); } } | 3806 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3806/549f137ad1e8828bb44cb18fa8a4e7ce3f825a1e/HATest.java/buggy/tests/src/org/jboss/test/messaging/jms/clustering/HATest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
1071,
918,
1842,
1868,
26329,
863,
1435,
1216,
1185,
282,
288,
6647,
288,
540,
804,
38,
8464,
18749,
3272,
273,
225,
261,
8877,
8464,
18749,
262,
335,
63,
20,
8009,
8664,
2932,
19,
18749,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
1071,
918,
1842,
1868,
26329,
863,
1435,
1216,
1185,
282,
288,
6647,
288,
540,
804,
38,
8464,
18749,
3272,
273,
225,
261,
8877,
8464,
18749,
262,
335,
63,
20,
8009,
8664,
2932,
19,
18749,... | ||
float[] feature = score.getFeature().getFeatureData(); | float[] feature = ((FloatData) score.getData()).getValues(); | private void accumulateMean(int senone, TrainerScore score) { if (senone == TrainerAcousticModel.ALL_MODELS) { for (int i = 0; i < senonePool.size(); i++) { accumulateMean(i, score); } } else { GaussianMixture gaussian = (GaussianMixture) senonePool.get(senone); MixtureComponent[] mix = gaussian.getMixtureComponents(); for (int i = 0; i < mix.length; i++) { float[] mean = mix[i].getMean(); // int indexMean = meansPool.indexOf(mean); Integer indexInMap = (Integer) indexMap.get(mean); int indexMean = indexInMap.intValue(); assert indexMean >= 0; assert indexMean == senone; Buffer buffer = (Buffer) meansBufferPool.get(indexMean); float[] feature = score.getFeature().getFeatureData(); double[] data = new double[feature.length]; float prob = score.getComponentGamma()[i]; prob -= currentLogLikelihood; double dprob = logMath.logToLinear(prob); // prob = (float) logMath.logToLinear(prob); for (int j = 0; j < data.length; j++) { data[j] = feature[j] * dprob; } buffer.accumulate(data, dprob); } } } | 8321 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8321/292c05f9235a4c8e014073d071c7352aadfe47de/HMMPoolManager.java/clean/sphinx4/edu/cmu/sphinx/knowledge/acoustic/tiedstate/trainer/HMMPoolManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
21757,
15312,
12,
474,
28901,
476,
16,
2197,
14522,
7295,
4462,
13,
288,
202,
430,
261,
87,
275,
476,
422,
2197,
14522,
37,
2894,
641,
335,
1488,
18,
4685,
67,
17391,
55,
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,
21757,
15312,
12,
474,
28901,
476,
16,
2197,
14522,
7295,
4462,
13,
288,
202,
430,
261,
87,
275,
476,
422,
2197,
14522,
37,
2894,
641,
335,
1488,
18,
4685,
67,
17391,
55,
13,... |
DataTracker dataTracker = new DataTracker(db, maxSize, commitSize); | DataTracker newDataTracker = new DataTracker(db, maxSize, commitSize); | public static IntegrationWriterDataTrackingImpl getInstance(Properties props) throws ObjectStoreException { String writerAlias = props.getProperty("osw"); if (writerAlias == null) { throw new ObjectStoreException(props.getProperty("alias") + " does not have an osw" + " alias specified (check properties file)"); } String trackerMaxSizeString = props.getProperty("datatrackerMaxSize"); String trackerCommitSizeString = props.getProperty("datatrackerCommitSize"); if (trackerMaxSizeString == null) { throw new ObjectStoreException(props.getProperty("alias") + " does not have a" + " datatracker maximum size specified (check properties file)"); } if (trackerCommitSizeString == null) { throw new ObjectStoreException(props.getProperty("alias") + " does not have a" + " datatracker commit size specified (check properties file)"); } ObjectStoreWriter writer = ObjectStoreWriterFactory.getObjectStoreWriter(writerAlias); try { int maxSize = Integer.parseInt(trackerMaxSizeString); int commitSize = Integer.parseInt(trackerCommitSizeString); Database db = ((ObjectStoreWriterInterMineImpl) writer).getDatabase(); DataTracker dataTracker = new DataTracker(db, maxSize, commitSize); return new IntegrationWriterDataTrackingImpl(writer, dataTracker); } catch (Exception e) { IllegalArgumentException e2 = new IllegalArgumentException("Problem instantiating" + " IntegrationWriterDataTrackingImpl " + props.getProperty("alias")); e2.initCause(e); throw e2; } } | 7196 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7196/ca277c62d4614d8e9f5486e3abb7e4dffa688a63/IntegrationWriterDataTrackingImpl.java/clean/intermine/src/java/org/intermine/dataloader/IntegrationWriterDataTrackingImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
22936,
2289,
751,
12642,
2828,
3694,
12,
2297,
3458,
13,
5411,
1216,
1033,
21151,
288,
3639,
514,
2633,
2936,
273,
3458,
18,
588,
1396,
2932,
538,
91,
8863,
3639,
309,
261,
629... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
22936,
2289,
751,
12642,
2828,
3694,
12,
2297,
3458,
13,
5411,
1216,
1033,
21151,
288,
3639,
514,
2633,
2936,
273,
3458,
18,
588,
1396,
2932,
538,
91,
8863,
3639,
309,
261,
629... |
TypesHelper helper = new TypesHelper(xsdSchema); String aPrefix = helper.getPrefix(element.getAttribute(XSDConstants.TARGETNAMESPACE_ATTRIBUTE), false); if (aPrefix != null && aPrefix.length() > 0) { prefixText.setText(aPrefix); } else | if (element != null) | public void refresh() { if (doRefresh) { // hack...open bug against properties if (prefixText.isDisposed() || targetNamespaceText.isDisposed()) { return; } if (prefixText.isFocusControl() || targetNamespaceText.isFocusControl()) { return; } setListenerEnabled(false); Element element = xsdSchema.getElement(); // Handle prefixText TypesHelper helper = new TypesHelper(xsdSchema); String aPrefix = helper.getPrefix(element.getAttribute(XSDConstants.TARGETNAMESPACE_ATTRIBUTE), false); if (aPrefix != null && aPrefix.length() > 0) { prefixText.setText(aPrefix); } else { prefixText.setText(""); //$NON-NLS-1$ } // Handle TargetNamespaceText String tns = element.getAttribute(XSDConstants.TARGETNAMESPACE_ATTRIBUTE); if (tns != null && tns.length() > 0) { targetNamespaceText.setText(tns); } else { targetNamespaceText.setText(""); //$NON-NLS-1$ } errorText.setText(""); setListenerEnabled(true); } } | 13989 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13989/60a9bf55997bc01dab30b516a1a046ff1ee6469c/NamespaceSection.java/clean/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/properties/section/NamespaceSection.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
918,
4460,
1435,
202,
202,
95,
1377,
309,
261,
2896,
8323,
13,
1377,
288,
3639,
368,
11769,
2777,
3190,
7934,
5314,
1790,
3639,
309,
261,
3239,
1528,
18,
291,
1669,
7423,
1435,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
918,
4460,
1435,
202,
202,
95,
1377,
309,
261,
2896,
8323,
13,
1377,
288,
3639,
368,
11769,
2777,
3190,
7934,
5314,
1790,
3639,
309,
261,
3239,
1528,
18,
291,
1669,
7423,
1435,... |
if (!ensureTargetIsValid(new File(getDestinationValue()))) return false; | if (!ensureTargetIsValid(new File(getDestinationValue()))) { return false; } | public boolean finish() { List resourcesToExport = getWhiteCheckedResources(); if (!ensureTargetIsValid(new File(getDestinationValue()))) return false; //Save dirty editors if possible but do not stop if not all are saved saveDirtyEditors(); // about to invoke the operation so save our state saveWidgetValues(); return executeExportOperation(new FileSystemExportOperation(null, resourcesToExport, getDestinationValue(), this)); } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/e38d295ea613cf9f08aadb93a84a33d2e91abc5f/WizardFileSystemResourceExportPage1.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/WizardFileSystemResourceExportPage1.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
4076,
1435,
288,
3639,
987,
2703,
774,
6144,
273,
336,
13407,
11454,
3805,
5621,
3639,
309,
16051,
15735,
2326,
20536,
12,
2704,
1387,
12,
588,
5683,
620,
1435,
20349,
5411,
327... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
4076,
1435,
288,
3639,
987,
2703,
774,
6144,
273,
336,
13407,
11454,
3805,
5621,
3639,
309,
16051,
15735,
2326,
20536,
12,
2704,
1387,
12,
588,
5683,
620,
1435,
20349,
5411,
327... |
{ String s = getString(columnIndex); DateFormat df = DateFormat.getDateInstance(); if (s != null) { try { java.sql.Date d = (java.sql.Date)df.parse(s); return new Timestamp(d.getTime()); } catch (ParseException e) { throw new SQLException("Bad Timestamp Format: " + s); } } return null; } | { String s = getString(columnIndex); DateFormat df = DateFormat.getDateInstance(); if (s != null) { try { java.sql.Date d = (java.sql.Date)df.parse(s); return new Timestamp(d.getTime()); } catch (ParseException e) { throw new SQLException("Bad Timestamp Format: " + s); } } return null; } | public Timestamp getTimestamp(int columnIndex) throws SQLException { String s = getString(columnIndex); DateFormat df = DateFormat.getDateInstance(); if (s != null) { try { java.sql.Date d = (java.sql.Date)df.parse(s); return new Timestamp(d.getTime()); } catch (ParseException e) { throw new SQLException("Bad Timestamp Format: " + s); } } return null; // SQL NULL } | 45454 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45454/6a061da272f04e1463864065f87f1f3fd61d6162/ResultSet.java/buggy/src/interfaces/jdbc/postgresql/ResultSet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
8159,
11940,
12,
474,
14882,
13,
1216,
6483,
202,
95,
202,
202,
780,
272,
273,
4997,
12,
2827,
1016,
1769,
202,
202,
11878,
3013,
273,
18371,
18,
588,
1626,
1442,
5621,
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,
482,
8159,
11940,
12,
474,
14882,
13,
1216,
6483,
202,
95,
202,
202,
780,
272,
273,
4997,
12,
2827,
1016,
1769,
202,
202,
11878,
3013,
273,
18371,
18,
588,
1626,
1442,
5621,
202,
2... |
Vector filterMethods = new Vector(); Class cdClass = getContentDefinitionClass(); try { filterMethods = (Vector)cdClass.getMethod("getFilterMethods", new Class[] { CmsObject.class }).invoke(null, new Object[] { cms }); } catch(InvocationTargetException ite) { if(A_OpenCms.isLogging()) { A_OpenCms.log(C_OPENCMS_INFO, getClassName() + ": Backoffice getContentHead: InvocationTargetException!"); } } catch(NoSuchMethodException nsm) { if(A_OpenCms.isLogging()) { A_OpenCms.log(C_OPENCMS_INFO, getClassName() + ": Backoffice getContentHead: Requested method was not found!"); } } catch(Exception e) { if(A_OpenCms.isLogging()) { A_OpenCms.log(C_OPENCMS_INFO, getClassName() + ": Backoffice getContentHead: Problem occured with your filter methods!"); } } return filterMethods; } | Vector filterMethods = new Vector(); Class cdClass = getContentDefinitionClass(); try { filterMethods = (Vector) cdClass.getMethod("getFilterMethods", new Class[] {CmsObject.class}).invoke(null, new Object[] {cms}); } catch (InvocationTargetException ite) { if (A_OpenCms.isLogging()) { A_OpenCms.log(C_OPENCMS_INFO, getClassName() + ": Backoffice getContentHead: InvocationTargetException!"); } } catch (NoSuchMethodException nsm) { if (A_OpenCms.isLogging()) { A_OpenCms.log(C_OPENCMS_INFO, getClassName() + ": Backoffice getContentHead: Requested method was not found!"); } } catch (Exception e) { if (A_OpenCms.isLogging()) { A_OpenCms.log(C_OPENCMS_INFO, getClassName() + ": Backoffice getContentHead: Problem occured with your filter methods!"); } } return filterMethods; } | private Vector getFilterMethods(CmsObject cms) { Vector filterMethods = new Vector(); Class cdClass = getContentDefinitionClass(); try { filterMethods = (Vector)cdClass.getMethod("getFilterMethods", new Class[] { CmsObject.class }).invoke(null, new Object[] { cms }); } catch(InvocationTargetException ite) { //error occured while applying the filter if(A_OpenCms.isLogging()) { A_OpenCms.log(C_OPENCMS_INFO, getClassName() + ": Backoffice getContentHead: InvocationTargetException!"); } } catch(NoSuchMethodException nsm) { if(A_OpenCms.isLogging()) { A_OpenCms.log(C_OPENCMS_INFO, getClassName() + ": Backoffice getContentHead: Requested method was not found!"); } } catch(Exception e) { if(A_OpenCms.isLogging()) { A_OpenCms.log(C_OPENCMS_INFO, getClassName() + ": Backoffice getContentHead: Problem occured with your filter methods!"); } } return filterMethods; } | 51784 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51784/14d8b5bd357d9dd5036f4099d10dbf7e8c9400a7/A_Backoffice.java/buggy/src/com/opencms/defaults/A_Backoffice.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
5589,
12267,
4712,
12,
4747,
921,
6166,
13,
288,
3639,
5589,
1034,
4712,
273,
394,
5589,
5621,
3639,
1659,
7976,
797,
273,
5154,
1852,
797,
5621,
3639,
775,
288,
5411,
1034,
4712,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
5589,
12267,
4712,
12,
4747,
921,
6166,
13,
288,
3639,
5589,
1034,
4712,
273,
394,
5589,
5621,
3639,
1659,
7976,
797,
273,
5154,
1852,
797,
5621,
3639,
775,
288,
5411,
1034,
4712,
2... |
super(params); | if (! compatibility) { set("openid.ns", OPENID2_NS); setClaimed(claimedId); } set("openid.mode", MODE_IDRES); setIdentity(delegate); setReturnTo(returnTo); setNonce(nonce); if (invalidateHandle != null) setInvalidateHandle(invalidateHandle); setHandle(assoc.getHandle()); setSigned(signList); setSignature(assoc.sign(getSignedText())); | public AuthSuccess(ParameterList params) throws MessageException { super(params); } | 51216 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51216/039a03d7f0655e85bd0927b5df9bf1d8ca038941/AuthSuccess.java/buggy/src/net/openid/message/AuthSuccess.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3123,
4510,
12,
1662,
682,
859,
13,
1216,
2350,
503,
565,
288,
3639,
309,
16051,
8926,
13,
288,
444,
2932,
20619,
18,
2387,
3113,
11919,
734,
22,
67,
3156,
1769,
444,
9762,
329,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3123,
4510,
12,
1662,
682,
859,
13,
1216,
2350,
503,
565,
288,
3639,
309,
16051,
8926,
13,
288,
444,
2932,
20619,
18,
2387,
3113,
11919,
734,
22,
67,
3156,
1769,
444,
9762,
329,
1... |
if (tool.isHeaderFile(ext)) { return true; | try { switch (tool.getNatureFilter()) { case ITool.FILTER_C: if (project.hasNature(CProjectNature.C_NATURE_ID) && !project.hasNature(CCProjectNature.CC_NATURE_ID)) { return tool.isHeaderFile(ext); } break; case ITool.FILTER_CC: if (project.hasNature(CCProjectNature.CC_NATURE_ID)) { return tool.isHeaderFile(ext); } break; case ITool.FILTER_BOTH: return tool.isHeaderFile(ext); } } catch (CoreException e) { continue; | public boolean isHeaderFile(String ext) { // Check to see if there is a rule to build a file with this extension IConfiguration config = getDefaultConfiguration(getDefaultTarget()); ITool[] tools = config.getTools(); for (int index = 0; index < tools.length; index++) { ITool tool = tools[index]; if (tool.isHeaderFile(ext)) { return true; } } return false; } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/cc6084024dd2af4d5b3c4287f5e9fbae20d84a2a/ManagedBuildInfo.java/buggy/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ManagedBuildInfo.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
353,
1864,
812,
12,
780,
1110,
13,
288,
202,
202,
759,
2073,
358,
2621,
309,
1915,
353,
279,
1720,
358,
1361,
279,
585,
598,
333,
2710,
202,
202,
45,
1750,
642,
273,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
353,
1864,
812,
12,
780,
1110,
13,
288,
202,
202,
759,
2073,
358,
2621,
309,
1915,
353,
279,
1720,
358,
1361,
279,
585,
598,
333,
2710,
202,
202,
45,
1750,
642,
273,
4... |
final String methodName = returnCheckSpecification.getMethodName(); final String className = returnCheckSpecification.getClassName(); | final String methodName = returnCheckSpecification.getMethodName(); final String className = returnCheckSpecification.getClassName(); | private void formatCallCheckString(){ final StringBuffer buffer = new StringBuffer(); synchronized(lock){ boolean first=true; for(ReturnCheckSpecification returnCheckSpecification : callsToCheck){ if(first){ first = false; } else{ buffer.append(','); } final String methodName = returnCheckSpecification.getMethodName(); final String className = returnCheckSpecification.getClassName(); buffer.append(className); buffer.append(','); buffer.append(methodName); } } callCheckString = buffer.toString(); } | 56598 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56598/0c22d3bce35a1ee7d70c329328f649614cf6f21a/IgnoreResultOfCallInspection.java/buggy/plugins/InspectionGadgets/src/com/siyeh/ig/bugs/IgnoreResultOfCallInspection.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
740,
1477,
1564,
780,
1435,
95,
3639,
727,
6674,
1613,
273,
394,
6674,
5621,
3639,
3852,
12,
739,
15329,
5411,
1250,
1122,
33,
3767,
31,
5411,
364,
12,
990,
1564,
8615,
327,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
740,
1477,
1564,
780,
1435,
95,
3639,
727,
6674,
1613,
273,
394,
6674,
5621,
3639,
3852,
12,
739,
15329,
5411,
1250,
1122,
33,
3767,
31,
5411,
364,
12,
990,
1564,
8615,
327,
... |
IDEWorkbenchPlugin .log(MessageFormat .format( "Exception in {0}.getNewFolder(): {1}", new Object[] { getClass().getName(), e.getTargetException() })); | IDEWorkbenchPlugin.log(getClass(), "createNewFolder()", e.getTargetException()); | public IFolder createNewFolder() { if (newFolder != null) return newFolder; // create the new folder and cache it if successful final IPath containerPath = resourceGroup.getContainerFullPath(); IPath newFolderPath = containerPath.append(resourceGroup.getResource()); final IFolder newFolderHandle = createFolderHandle(newFolderPath); createLinkTarget(); WorkspaceModifyOperation op = new WorkspaceModifyOperation(null) { public void execute(IProgressMonitor monitor) throws CoreException { try { monitor .beginTask( IDEWorkbenchMessages .getString("WizardNewFolderCreationPage.progress"), 2000); //$NON-NLS-1$ ContainerGenerator generator = new ContainerGenerator( containerPath); generator.generateContainer(new SubProgressMonitor(monitor, 1000)); createFolder(newFolderHandle, new SubProgressMonitor( monitor, 1000)); } finally { monitor.done(); } } }; try { getContainer().run(true, true, op); } catch (InterruptedException e) { return null; } catch (InvocationTargetException e) { if (e.getTargetException() instanceof CoreException) { ErrorDialog .openError( getContainer().getShell(), // Was Utilities.getFocusShell() IDEWorkbenchMessages .getString("WizardNewFolderCreationPage.errorTitle"), //$NON-NLS-1$ null, // no special message ((CoreException) e.getTargetException()) .getStatus()); } else { // CoreExceptions are handled above, but unexpected runtime exceptions and errors may still occur. IDEWorkbenchPlugin .log(MessageFormat .format( "Exception in {0}.getNewFolder(): {1}", new Object[] { getClass().getName(), e.getTargetException() }));//$NON-NLS-1$ MessageDialog .openError( getContainer().getShell(), IDEWorkbenchMessages .getString("WizardNewFolderCreationPage.internalErrorTitle"), IDEWorkbenchMessages.format("WizardNewFolder.internalError", new Object[] { e.getTargetException().getMessage() })); //$NON-NLS-2$ //$NON-NLS-1$ } return null; // ie.- one of the steps resulted in a core exception } newFolder = newFolderHandle; return newFolder; } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/f7c29fb6bdb652f1a858b5e3535c58d788ab85d9/WizardNewFolderMainPage.java/clean/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/WizardNewFolderMainPage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
467,
3899,
15291,
3899,
1435,
288,
3639,
309,
261,
2704,
3899,
480,
446,
13,
5411,
327,
394,
3899,
31,
3639,
368,
752,
326,
394,
3009,
471,
1247,
518,
309,
6873,
3639,
727,
467,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
467,
3899,
15291,
3899,
1435,
288,
3639,
309,
261,
2704,
3899,
480,
446,
13,
5411,
327,
394,
3899,
31,
3639,
368,
752,
326,
394,
3009,
471,
1247,
518,
309,
6873,
3639,
727,
467,
7... |
eventTypes.add(new Integer(ERROR)); | eventTypes.add(ERROR); | public void error (SAXParseException e) throws SAXException { if(buffering) { eventTypes.add(new Integer(ERROR)); eventArguments.add(e); } else if (errorHandler != null) { errorHandler.error(e); } } | 1895 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1895/5bd8136256b7a06c2a8f66363fbe38b5e9e9f206/SAX2BufferImpl.java/buggy/source/org/jasig/portal/utils/SAX2BufferImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
555,
261,
55,
2501,
13047,
425,
13,
1216,
14366,
565,
288,
3639,
309,
12,
4106,
310,
13,
288,
5411,
871,
2016,
18,
1289,
12,
3589,
1769,
5411,
871,
4628,
18,
1289,
12,
73,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
555,
261,
55,
2501,
13047,
425,
13,
1216,
14366,
565,
288,
3639,
309,
12,
4106,
310,
13,
288,
5411,
871,
2016,
18,
1289,
12,
3589,
1769,
5411,
871,
4628,
18,
1289,
12,
73,
... |
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { if(oldInput != null && !oldInput.equals(newInput)) | public void inputChanged(Viewer aViewer, Object oldInput, Object newInput) { if (oldInput != null && !oldInput.equals(newInput)) | public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { if(oldInput != null && !oldInput.equals(newInput)) rootElements.clear(); } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/187a6e5e9526ea47a03a969d7ddb741178d2527d/TestContentProvider.java/buggy/tests/org.eclipse.ui.tests.navigator/src/org/eclipse/ui/tests/navigator/extension/TestContentProvider.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
810,
5033,
12,
18415,
14157,
16,
1033,
1592,
1210,
16,
1033,
394,
1210,
13,
288,
3196,
202,
430,
12,
1673,
1210,
480,
446,
597,
401,
1673,
1210,
18,
14963,
12,
2704,
1210... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
225,
202,
482,
918,
810,
5033,
12,
18415,
14157,
16,
1033,
1592,
1210,
16,
1033,
394,
1210,
13,
288,
3196,
202,
430,
12,
1673,
1210,
480,
446,
597,
401,
1673,
1210,
18,
14963,
12,
2704,
1210... |
return getRuby().getNil(); } | return getRuby().getNil(); } | public RubyObject m_attr_writer(RubyObject[] args) { for (int i = 0; i < args.length; i++) { addAttribute(((RubySymbol) args[i]).toId(), false, true, true); } return getRuby().getNil(); } | 1060 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1060/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
19817,
921,
312,
67,
1747,
67,
6299,
12,
54,
10340,
921,
8526,
833,
13,
288,
202,
202,
1884,
261,
474,
277,
273,
374,
31,
277,
411,
833,
18,
2469,
31,
277,
27245,
288,
1082,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
19817,
921,
312,
67,
1747,
67,
6299,
12,
54,
10340,
921,
8526,
833,
13,
288,
202,
202,
1884,
261,
474,
277,
273,
374,
31,
277,
411,
833,
18,
2469,
31,
277,
27245,
288,
1082,... |
public org.quickfix.field.SymbolSfx getSymbolSfx() throws FieldNotFound { org.quickfix.field.SymbolSfx value = new org.quickfix.field.SymbolSfx(); | public quickfix.field.SymbolSfx getSymbolSfx() throws FieldNotFound { quickfix.field.SymbolSfx value = new quickfix.field.SymbolSfx(); | public org.quickfix.field.SymbolSfx getSymbolSfx() throws FieldNotFound { org.quickfix.field.SymbolSfx value = new org.quickfix.field.SymbolSfx(); getField(value); return value; } | 5926 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5926/fecc27f98261270772ff182a1d4dfd94b5daa73d/MassQuoteAcknowledgement.java/buggy/src/java/src/quickfix/fix44/MassQuoteAcknowledgement.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
5335,
55,
19595,
18712,
55,
19595,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
5335,
55,
19595,
460,
273,
394,
2358,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
5335,
55,
19595,
18712,
55,
19595,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
5335,
55,
19595,
460,
273,
394,
2358,
... |
String flag = req.readAtom(); | String flag = req.readATOM(); | private boolean executeRequest(ImapRequest req, ImapSession session) throws IOException, ImapException { if (session != null && session.isIdle()) return doIDLE(null, IDLE_STOP, req.readAtom().equals("DONE") && req.eof()); String tag = req.readTag(); boolean byUID = false; req.skipSpace(); String command = mLastCommand = req.readAtom(); do { switch (command.charAt(0)) { case 'A': if (command.equals("AUTHENTICATE")) { req.skipSpace(); String mechanism = req.readAtom(); byte[] response = null; if (req.peekChar() == ' ') { req.skipSpace(); response = req.readBase64(true); } checkEOF(tag, req); return doAUTHENTICATE(tag, mechanism, response); } else if (command.equals("APPEND")) { List<String> flags = null; Date date = null; req.skipSpace(); String folder = req.readFolder(); req.skipSpace(); if (req.peekChar() == '(') { flags = req.readFlags(); req.skipSpace(); } if (req.peekChar() == '"') { date = req.readDate(mTimeFormat); req.skipSpace(); } if (req.peekChar() == 'c' || req.peekChar() == 'C') { List<Object> parts = new LinkedList<Object>(); req.skipAtom("CATENATE"); req.skipSpace(); req.skipChar('('); while (req.peekChar() != ')') { if (!parts.isEmpty()) req.skipSpace(); String type = req.readAtom(); req.skipSpace(); if (type.equals("TEXT")) parts.add(req.readLiteral()); else if (type.equals("URL")) parts.add(new ImapURL(tag, mSession, req.readAstring())); else throw new ImapParseException(tag, "unknown CATENATE cat-part: " + type); } req.skipChar(')'); checkEOF(tag, req); return doCATENATE(tag, folder, flags, date, parts); } else { byte[] content = req.readLiteral8(); checkEOF(tag, req); return doAPPEND(tag, folder, flags, date, content); } } break; case 'C': if (command.equals("CAPABILITY")) { checkEOF(tag, req); return doCAPABILITY(tag); } else if (command.equals("COPY")) { req.skipSpace(); String sequence = req.readSequence(); req.skipSpace(); String folder = req.readFolder(); checkEOF(tag, req); return doCOPY(tag, sequence, folder, byUID); } else if (command.equals("CLOSE")) { checkEOF(tag, req); return doCLOSE(tag); } else if (command.equals("CREATE")) { req.skipSpace(); String folder = req.readFolder(); checkEOF(tag, req); return doCREATE(tag, folder); } else if (command.equals("CHECK")) { checkEOF(tag, req); return doCHECK(tag); } break; case 'D': if (command.equals("DELETE")) { req.skipSpace(); String folder = req.readFolder(); checkEOF(tag, req); return doDELETE(tag, folder); } break; case 'E': if (command.equals("EXPUNGE")) { String sequence = null; if (byUID) { req.skipSpace(); sequence = req.readSequence(); } checkEOF(tag, req); return doEXPUNGE(tag, byUID, sequence); } else if (command.equals("EXAMINE")) { req.skipSpace(); String folder = req.readFolder(); checkEOF(tag, req); return doEXAMINE(tag, folder); } break; case 'F': if (command.equals("FETCH")) { List<ImapPartSpecifier> parts = new ArrayList<ImapPartSpecifier>(); req.skipSpace(); String sequence = req.readSequence(); req.skipSpace(); int attributes = req.readFetch(parts); checkEOF(tag, req); return doFETCH(tag, sequence, attributes, parts, byUID); } break; case 'G': if (command.equals("GETQUOTA")) { req.skipSpace(); String qroot = req.readAstring(); checkEOF(tag, req); return doGETQUOTA(tag, qroot); } else if (command.equals("GETQUOTAROOT")) { req.skipSpace(); String path = req.readFolder(); checkEOF(tag, req); return doGETQUOTAROOT(tag, path); } break; case 'I': if (command.equals("ID")) { req.skipSpace(); Map<String, String> params = req.readParameters(true); checkEOF(tag, req); return doID(tag, params); } else if (command.equals("IDLE")) { checkEOF(tag, req); return doIDLE(tag, IDLE_START, true); } break; case 'L': if (command.equals("LOGIN")) { req.skipSpace(); String user = req.readAstring(); req.skipSpace(); String pass = req.readAstring(); checkEOF(tag, req); return doLOGIN(tag, user, pass); } else if (command.equals("LOGOUT")) { checkEOF(tag, req); return doLOGOUT(tag); } else if (command.equals("LIST")) { req.skipSpace(); String base = req.readEscapedFolder(); req.skipSpace(); String pattern = req.readFolderPattern(); checkEOF(tag, req); return doLIST(tag, base, pattern); } else if (command.equals("LSUB")) { req.skipSpace(); String base = req.readEscapedFolder(); req.skipSpace(); String pattern = req.readFolderPattern(); checkEOF(tag, req); return doLSUB(tag, base, pattern); } break; case 'N': if (command.equals("NOOP")) { checkEOF(tag, req); return doNOOP(tag); } else if (command.equals("NAMESPACE")) { checkEOF(tag, req); return doNAMESPACE(tag); } break; case 'R': if (command.equals("RENAME")) { req.skipSpace(); String folder = req.readFolder(); req.skipSpace(); String name = req.readFolder(); checkEOF(tag, req); return doRENAME(tag, folder, name); } break; case 'S': if (command.equals("STORE")) { byte operation = STORE_REPLACE; boolean silent = false; req.skipSpace(); String sequence = req.readSequence(); req.skipSpace(); switch (req.peekChar()) { case '+': req.skipChar('+'); operation = STORE_ADD; break; case '-': req.skipChar('-'); operation = STORE_REMOVE; break; } String cmd = req.readAtom(); if (cmd.equals("FLAGS.SILENT")) silent = true; else if (!cmd.equals("FLAGS")) throw new ImapParseException(tag, "invalid store-att-flags"); req.skipSpace(); List<String> flags = req.readFlags(); checkEOF(tag, req); return doSTORE(tag, sequence, flags, operation, silent, byUID); } else if (command.equals("SEARCH")) { Integer options = null; TreeMap<Integer, Object> insertions = new TreeMap<Integer, Object>(); req.skipSpace(); if ("RETURN".equals(req.peekAtom())) { options = 0; req.skipAtom("RETURN"); req.skipSpace(); req.skipChar('('); while (req.peekChar() != ')') { if (options != 0) req.skipSpace(); String option = req.readAtom(); if (option.equals("MIN")) options |= RETURN_MIN; else if (option.equals("MAX")) options |= RETURN_MAX; else if (option.equals("ALL")) options |= RETURN_ALL; else if (option.equals("COUNT")) options |= RETURN_COUNT; else if (option.equals("SAVE")) options |= RETURN_SAVE; else throw new ImapParseException(tag, "unknown RETURN option \"" + option + '"'); } req.skipChar(')'); req.skipSpace(); if (options == 0) options = RETURN_ALL; } String search = req.readSearch(insertions); checkEOF(tag, req); return doSEARCH(tag, search, insertions, byUID, options); } else if (command.equals("SELECT")) { req.skipSpace(); String folder = req.readFolder(); checkEOF(tag, req); return doSELECT(tag, folder); } else if (command.equals("STARTTLS")) { checkEOF(tag, req); return doSTARTTLS(tag); } else if (command.equals("STATUS")) { int status = 0; req.skipSpace(); String folder = req.readFolder(); req.skipSpace(); req.skipChar('('); while (req.peekChar() != ')') { if (status != 0) req.skipSpace(); String flag = req.readAtom(); if (flag.equals("MESSAGES")) status |= STATUS_MESSAGES; else if (flag.equals("RECENT")) status |= STATUS_RECENT; else if (flag.equals("UIDNEXT")) status |= STATUS_UIDNEXT; else if (flag.equals("UIDVALIDITY")) status |= STATUS_UIDVALIDITY; else if (flag.equals("UNSEEN")) status |= STATUS_UNSEEN; else throw new ImapParseException(tag, "unknown STATUS attribute \"" + flag + '"'); } req.skipChar(')'); checkEOF(tag, req); return doSTATUS(tag, folder, status); } else if (command.equals("SUBSCRIBE")) { req.skipSpace(); String folder = req.readFolder(); checkEOF(tag, req); return doSUBSCRIBE(tag, folder); } else if (command.equals("SETQUOTA")) { Map<String, String> limits = new HashMap<String, String>(); req.skipSpace(); String qroot = req.readAstring(); req.skipSpace(); req.skipChar('('); while (req.peekChar() != ')') { String resource = req.readAtom(); req.skipSpace(); limits.put(resource, req.readNumber()); } req.skipChar(')'); checkEOF(tag, req); return doSETQUOTA(tag, qroot, limits); } break; case 'U': if (command.equals("UID")) { req.skipSpace(); command = req.readAtom(); if (!command.equals("FETCH") && !command.equals("SEARCH") && !command.equals("COPY") && !command.equals("STORE") && !command.equals("EXPUNGE")) throw new ImapParseException(tag, "command not permitted with UID"); byUID = true; continue; } else if (command.equals("UNSUBSCRIBE")) { req.skipSpace(); String folder = req.readFolder(); checkEOF(tag, req); return doUNSUBSCRIBE(tag, folder); } else if (command.equals("UNSELECT")) { checkEOF(tag, req); return doUNSELECT(tag); } break; } } while (byUID); throw new ImapParseException(tag, "command not implemented"); } | 6965 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6965/c0e5cc9943be1b3fd0220b5c4ee7f7259d1454e0/ImapHandler.java/clean/ZimbraServer/src/java/com/zimbra/cs/imap/ImapHandler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1250,
1836,
691,
12,
20827,
691,
1111,
16,
467,
1458,
2157,
1339,
13,
1216,
1860,
16,
467,
1458,
503,
288,
3639,
309,
261,
3184,
480,
446,
597,
1339,
18,
291,
13834,
10756,
5411,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1250,
1836,
691,
12,
20827,
691,
1111,
16,
467,
1458,
2157,
1339,
13,
1216,
1860,
16,
467,
1458,
503,
288,
3639,
309,
261,
3184,
480,
446,
597,
1339,
18,
291,
13834,
10756,
5411,
... |
throw ExceptionFactory.makeMessageException(Messages.getMessage("MethodNotImplemented", "MessageImpl.getAsSOAPMessage()")); | try { OMElement element = xmlPart.getAsOMElement(); ByteArrayOutputStream outStream = new ByteArrayOutputStream(); element.serialize(outStream); ByteArrayInputStream inStream = new ByteArrayInputStream(outStream .toByteArray()); MessageFactory mf = MessageFactory.newInstance(); MimeHeaders defaultHeader = new MimeHeaders(); defaultHeader.addHeader("Content-type", "text/xml; charset=UTF-8"); SOAPMessage soapMessage = mf.createMessage(defaultHeader, inStream); return soapMessage; } catch (Exception e) { throw ExceptionFactory.makeMessageException(e); } | public SOAPMessage getAsSOAPMessage() throws MessageException { // TODO Missing implementation throw ExceptionFactory.makeMessageException(Messages.getMessage("MethodNotImplemented", "MessageImpl.getAsSOAPMessage()")); } | 49300 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49300/036a12e3edc92b5f14a8982bfa9b60a3318021e5/MessageImpl.java/buggy/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/MessageImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
16434,
1079,
13122,
27952,
1079,
1435,
1216,
2350,
503,
288,
202,
202,
759,
2660,
10230,
4471,
202,
202,
12849,
1185,
1733,
18,
6540,
31270,
12,
5058,
18,
24906,
2932,
1305,
1248,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
16434,
1079,
13122,
27952,
1079,
1435,
1216,
2350,
503,
288,
202,
202,
759,
2660,
10230,
4471,
202,
202,
12849,
1185,
1733,
18,
6540,
31270,
12,
5058,
18,
24906,
2932,
1305,
1248,... |
_uri = argument(0); if (_uri instanceof LiteralExpr) { LiteralExpr expr = (LiteralExpr)_uri; if (expr.getValue().equals(EMPTYSTRING)) { Stylesheet stylesheet = getStylesheet(); if (stylesheet == null) { ErrorMsg msg = new ErrorMsg(ErrorMsg.ILLEGAL_ARG_ERR, this); throw new TypeCheckError(msg); } _uri = new LiteralExpr(stylesheet.getSystemId(), EMPTYSTRING); } } | _arg1 = argument(0); | public Type typeCheck(SymbolTable stable) throws TypeCheckError { // At least one argument - two at most final int ac = argumentCount(); if ((ac < 1) || (ac > 2)) { ErrorMsg msg = new ErrorMsg(ErrorMsg.ILLEGAL_ARG_ERR, this); throw new TypeCheckError(msg); } // Parse the first argument - the document URI _uri = argument(0); if (_uri instanceof LiteralExpr) { LiteralExpr expr = (LiteralExpr)_uri; if (expr.getValue().equals(EMPTYSTRING)) { Stylesheet stylesheet = getStylesheet(); if (stylesheet == null) { ErrorMsg msg = new ErrorMsg(ErrorMsg.ILLEGAL_ARG_ERR, this); throw new TypeCheckError(msg); } _uri = new LiteralExpr(stylesheet.getSystemId(), EMPTYSTRING); } } _uriType = _uri.typeCheck(stable); if ((_uriType != Type.NodeSet) && (_uriType != Type.String)) { _uri = new CastExpr(_uri, Type.String); } // Parse the second argument - the document URI base if (ac == 2) { _base = argument(1); final Type baseType = _base.typeCheck(stable); if (baseType.identicalTo(Type.Node)) { _base = new CastExpr(_base, Type.NodeSet); } else if (baseType.identicalTo(Type.NodeSet)) { // falls through } else { ErrorMsg msg = new ErrorMsg(ErrorMsg.DOCUMENT_ARG_ERR, this); throw new TypeCheckError(msg); } } return _type = Type.NodeSet; } | 46591 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46591/90690d28d7a287fb496550daf58cc79f422d8099/DocumentCall.java/clean/src/org/apache/xalan/xsltc/compiler/DocumentCall.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1412,
618,
1564,
12,
5335,
1388,
14114,
13,
1216,
1412,
1564,
668,
288,
202,
759,
2380,
4520,
1245,
1237,
300,
2795,
622,
4486,
202,
6385,
509,
1721,
273,
1237,
1380,
5621,
202,
430... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1412,
618,
1564,
12,
5335,
1388,
14114,
13,
1216,
1412,
1564,
668,
288,
202,
759,
2380,
4520,
1245,
1237,
300,
2795,
622,
4486,
202,
6385,
509,
1721,
273,
1237,
1380,
5621,
202,
430... |
jj_la1[28] = jj_gen; | jj_la1[27] = jj_gen; | final public void VariableDeclaratorId() throws ParseException { /*@bgen(jjtree) VariableDeclaratorId */ ASTVariableDeclaratorId jjtn000 = new ASTVariableDeclaratorId(this, JJTVARIABLEDECLARATORID); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000);String s = null; Token t = null; try { t = jj_consume_token(IDENTIFIER); s = t.image; label_12: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACKET: ; break; default: jj_la1[28] = jj_gen; break label_12; } jj_consume_token(LBRACKET); jj_consume_token(RBRACKET); } jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; jjtn000.setImage( s ); } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } } | 45569 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45569/e4e1467181b67cfd9bbbd764d319d740024b0993/JavaParser.java/buggy/pmd/src/net/sourceforge/pmd/ast/JavaParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
1071,
918,
7110,
31419,
548,
1435,
1216,
10616,
288,
1748,
36,
70,
4507,
12,
78,
78,
3413,
13,
7110,
31419,
548,
1195,
225,
9183,
3092,
31419,
548,
10684,
5088,
3784,
273,
394,
9183,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
1071,
918,
7110,
31419,
548,
1435,
1216,
10616,
288,
1748,
36,
70,
4507,
12,
78,
78,
3413,
13,
7110,
31419,
548,
1195,
225,
9183,
3092,
31419,
548,
10684,
5088,
3784,
273,
394,
9183,... |
try { position++; bCodeStream[classFileOffset++] = OPC_invokespecial; } catch (IndexOutOfBoundsException e) { resizeByteArray(OPC_invokespecial); | if (classFileOffset + 2 >= bCodeStream.length) { resizeByteArray(); | public void invokeNoClassDefFoundErrorStringConstructor() { // invokespecial: java.lang.NoClassDefFoundError.<init>(Ljava.lang.String;)V if (DEBUG) System.out.println(position + "\t\tinvokespecial: java.lang.NoClassDefFoundError.<init>(Ljava.lang.String;)V"); //$NON-NLS-1$ countLabels = 0; try { position++; bCodeStream[classFileOffset++] = OPC_invokespecial; } catch (IndexOutOfBoundsException e) { resizeByteArray(OPC_invokespecial); } writeUnsignedShort(constantPool.literalIndexForJavaLangNoClassDefFoundErrorStringConstructor()); stackDepth -= 2;} | 10698 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10698/3a562aaf09f9f323b583086b80b4683378886606/CodeStream.java/buggy/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
918,
4356,
2279,
797,
3262,
2043,
668,
780,
6293,
1435,
288,
202,
759,
18058,
705,
649,
30,
2252,
18,
4936,
18,
2279,
797,
3262,
2043,
668,
22782,
2738,
34,
12,
21159,
18,
4936,
18,
78... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
918,
4356,
2279,
797,
3262,
2043,
668,
780,
6293,
1435,
288,
202,
759,
18058,
705,
649,
30,
2252,
18,
4936,
18,
2279,
797,
3262,
2043,
668,
22782,
2738,
34,
12,
21159,
18,
4936,
18,
78... |
if (rubyClass.getSuperClass().getRealClass() != superClass) { return false; | if (superClass != null) { if (rubyClass.getSuperClass().getRealClass() != superClass) { return false; } | private boolean matchingClassExists(String className, RubyClass superClass) { if (! isConstantDefined(className)) { return false; } IRubyObject type = getConstant(className); if (! (type instanceof RubyClass)) { throw new TypeError(runtime, className + " is not a class"); } RubyClass rubyClass = (RubyClass) type; if (rubyClass.getSuperClass().getRealClass() != superClass) { return false; } if (runtime.getSafeLevel() >= 4) { throw new SecurityError(runtime, "extending class prohibited"); } return true; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/fe00c45012a36b20ff7faeacd9acb6883e4b0af1/EvaluateVisitor.java/clean/src/org/jruby/evaluator/EvaluateVisitor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1250,
3607,
797,
4002,
12,
780,
2658,
16,
19817,
797,
18846,
13,
288,
3639,
309,
16051,
353,
6902,
8116,
12,
12434,
3719,
288,
5411,
327,
629,
31,
3639,
289,
3639,
15908,
10340,
921... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1250,
3607,
797,
4002,
12,
780,
2658,
16,
19817,
797,
18846,
13,
288,
3639,
309,
16051,
353,
6902,
8116,
12,
12434,
3719,
288,
5411,
327,
629,
31,
3639,
289,
3639,
15908,
10340,
921... |
private DnDAction getDnDActionForPlatformAction(int platformAction) { | private static DnDAction getDnDActionForPlatformAction(int platformAction) { | private DnDAction getDnDActionForPlatformAction(int platformAction) { DnDAction action = null; switch (platformAction) { case DnDConstants.ACTION_COPY : action = DnDAction.ADD; break; case DnDConstants.ACTION_MOVE : action = DnDAction.MOVE; break; case DnDConstants.ACTION_LINK: action = DnDAction.BIND; break; default: break; } return action; } | 12814 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12814/aeb687a5339fb81ab4009be6dbac22d02f4bd915/DnDManagerImpl.java/clean/source/com/intellij/ide/dnd/DnDManagerImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
760,
463,
82,
40,
1803,
2343,
82,
40,
1803,
1290,
8201,
1803,
12,
474,
4072,
1803,
13,
288,
565,
463,
82,
40,
1803,
1301,
273,
446,
31,
565,
1620,
261,
9898,
1803,
13,
288,
1377... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
760,
463,
82,
40,
1803,
2343,
82,
40,
1803,
1290,
8201,
1803,
12,
474,
4072,
1803,
13,
288,
565,
463,
82,
40,
1803,
1301,
273,
446,
31,
565,
1620,
261,
9898,
1803,
13,
288,
1377... |
insertTextDocumentImages( textDocument, user ); | insertTextDocumentImages( textDocument ); | void updateTextDocumentImages( TextDocumentDomainObject textDocument, UserDomainObject user ) { deleteTextDocumentImages( textDocument ); insertTextDocumentImages( textDocument, user ); } | 8781 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8781/3b0fe7c2d4b2d004a5a425682d8a6461277e633a/DocumentStoringVisitor.java/buggy/server/src/imcode/server/document/DocumentStoringVisitor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
1089,
1528,
2519,
8946,
12,
3867,
2519,
3748,
921,
977,
2519,
16,
2177,
3748,
921,
729,
262,
288,
3639,
1430,
1528,
2519,
8946,
12,
977,
2519,
11272,
3639,
2243,
1528,
2519,
8946,
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,
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,
1089,
1528,
2519,
8946,
12,
3867,
2519,
3748,
921,
977,
2519,
16,
2177,
3748,
921,
729,
262,
288,
3639,
1430,
1528,
2519,
8946,
12,
977,
2519,
11272,
3639,
2243,
1528,
2519,
8946,
12... |
ByteArrayOutputStream bos = new ByteArrayOutputStream (); | ByteArrayOutputStream bos = new ByteArrayOutputStream(); | public boolean next () throws IOException { if (eof) return false; // read header header = new Hashtable (); String line; while (true) { line = readLine (); if (line == null || line.equals ("")) break; int cut = line.indexOf (':'); if (cut == -1) throw new IOException ("colon missing in multipart header line: "+line); header.put (line.substring (0, cut).trim ().toLowerCase (), line.substring (cut+1).trim ()); System.out.println ("key: '"+line.substring (0, cut).trim ().toLowerCase () + "' value: '" + line.substring (cut+1).trim ()); } System.out.println ("cte-head: "+ getHeader ("Content-Transfer-Encoding")); String contentType = getHeader ("Content-Type"); if ("base64".equals (getHeader ("Content-Transfer-Encoding"))) { ByteArrayOutputStream bos = new ByteArrayOutputStream (); while (true) { line = readLine (); if (line == null) throw new IOException ("Unexpected EOF"); if (line.startsWith (boundary)) break; Base64.decode (line, bos); } data = bos.toByteArray (); } else { ByteArrayOutputStream bos = new ByteArrayOutputStream (); String deli = "\r\n" + boundary; int match = 0; while (true) { int i = is.read (); if (i >= 32 && i <= 127) System.out.print ((char) i); else System.out.print ("#"+i+";"); if (i == -1) throw new RuntimeException ("Unexpected EOF"); if (((char) i) == deli.charAt (match)) { match++; if (match == deli.length ()) break; } else { if (match > 0) { for (int j = 0; j < match; j++) bos.write ((byte) deli.charAt (j)); match = ((char) i == deli.charAt (0)) ? 1 : 0; } bos.write ((byte) i); } } data = bos.toByteArray (); line = readLine (); // read crlf and possibly remaining -- } if (line.endsWith ("--")) eof = true; return true; } | 4841 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4841/cce2b605c6b4e455bee4bf39b7ca197f897bfbfa/Decoder.java/clean/src/org/kobjects/mime/Decoder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
1024,
1832,
1216,
1860,
288,
3639,
309,
261,
9339,
13,
327,
629,
31,
202,
759,
855,
1446,
225,
202,
3374,
273,
394,
18559,
261,
1769,
3639,
514,
980,
31,
202,
17523,
261,
37... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
1024,
1832,
1216,
1860,
288,
3639,
309,
261,
9339,
13,
327,
629,
31,
202,
759,
855,
1446,
225,
202,
3374,
273,
394,
18559,
261,
1769,
3639,
514,
980,
31,
202,
17523,
261,
37... |
de = ( CompositeSequence ) compositeSequenceDao.create( de ); ad.getCompositeSequences().add( de ); | reporter = ( Reporter ) reporterDao.create( reporter ); ad.getReporters().add( reporter ); CompositeSequence compositeSequence = CompositeSequence.Factory.newInstance(); if ( randomNames ) { compositeSequence.setName( RandomStringUtils.randomNumeric( RANDOM_STRING_LENGTH ) + "_test" ); } else { compositeSequence.setName( "probe_" + i ); } compositeSequence.getComponentReporters().add( reporter ); compositeSequence = ( CompositeSequence ) compositeSequenceDao.create( compositeSequence ); ad.getCompositeSequences().add( compositeSequence ); | protected ArrayDesign getTestPersistentArrayDesign( int numCompositeSequences, boolean randomNames ) { ArrayDesign ad = ArrayDesign.Factory.newInstance(); ad.setName( RandomStringUtils.randomAlphabetic( RANDOM_STRING_LENGTH ) ); for ( int i = 0; i < numCompositeSequences; i++ ) { CompositeSequence de = CompositeSequence.Factory.newInstance(); if ( randomNames ) { de.setName( RandomStringUtils.randomNumeric( RANDOM_STRING_LENGTH ) + "_test" ); } else { de.setName( i + "_at" ); } de = ( CompositeSequence ) compositeSequenceDao.create( de ); ad.getCompositeSequences().add( de ); } // use service to get acl ArrayDesignService arrayDesignService = ( ArrayDesignService ) this.getBean( "arrayDesignService" ); ad = arrayDesignService.create( ad ); for ( CompositeSequence cs : ad.getCompositeSequences() ) { cs.setArrayDesign( ad ); } flushSession(); return ad; } | 4335 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4335/1222b5051b43c0b81d63144bfc6770b731b19db7/BaseTransactionalSpringContextTest.java/clean/gemma-testing/src/main/java/ubic/gemma/testing/BaseTransactionalSpringContextTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
1510,
15478,
29384,
11906,
1076,
15478,
12,
509,
818,
9400,
21710,
16,
1250,
2744,
1557,
262,
288,
3639,
1510,
15478,
1261,
273,
1510,
15478,
18,
1733,
18,
2704,
1442,
5621,
3639,
126... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
1510,
15478,
29384,
11906,
1076,
15478,
12,
509,
818,
9400,
21710,
16,
1250,
2744,
1557,
262,
288,
3639,
1510,
15478,
1261,
273,
1510,
15478,
18,
1733,
18,
2704,
1442,
5621,
3639,
126... |
public PatternDescr lhs_or() throws RecognitionException { PatternDescr d; PatternDescr left = null; PatternDescr right = null; d = null; try { // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:891:17: (left= lhs_and ( ('or'|'||') opt_eol right= lhs_and )* ) // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:891:17: left= lhs_and ( ('or'|'||') opt_eol right= lhs_and )* { OrDescr or = null; following.push(FOLLOW_lhs_and_in_lhs_or2453); left=lhs_and(); following.pop(); d = left; // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:893:17: ( ('or'|'||') opt_eol right= lhs_and )* loop58: do { int alt58=2; int LA58_0 = input.LA(1); if ( (LA58_0>=41 && LA58_0<=42) ) { alt58=1; } switch (alt58) { case 1 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:893:19: ('or'|'||') opt_eol right= lhs_and { if ( (input.LA(1)>=41 && input.LA(1)<=42) ) { input.consume(); errorRecovery=false; } else { MismatchedSetException mse = new MismatchedSetException(null,input); recoverFromMismatchedSet(input,mse,FOLLOW_set_in_lhs_or2462); throw mse; } following.push(FOLLOW_opt_eol_in_lhs_or2467); opt_eol(); following.pop(); following.push(FOLLOW_lhs_and_in_lhs_or2474); right=lhs_and(); following.pop(); if ( or == null ) { or = new OrDescr(); or.addDescr( left ); d = or; } or.addDescr( right ); } break; default : break loop58; } } 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/cb210a30853642e270a3bba6ce570409f6046852/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,
280,
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,
280,
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 (fSkipValidationDepth >= 0) return; int count = fMatcherStack.getMatcherCount(); for (int i = 0; i < count; i++) { XPathMatcher matcher = fMatcherStack.getMatcherAt(i); matcher.characters(text); } | public void ignorableWhitespace(XMLString text) throws XNIException { // call handlers if (fDocumentHandler != null) { fDocumentHandler.ignorableWhitespace(text); } if (fSkipValidationDepth >= 0) return; // call all active identity constraints int count = fMatcherStack.getMatcherCount(); for (int i = 0; i < count; i++) { XPathMatcher matcher = fMatcherStack.getMatcherAt(i); matcher.characters(text); } } // ignorableWhitespace(XMLString) | 6373 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6373/eeb7517c4cc4197def51b4bc9aa28ba7210e59dd/XMLSchemaValidator.java/buggy/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
9750,
15514,
9431,
12,
4201,
780,
977,
13,
1216,
1139,
50,
45,
503,
288,
3639,
368,
745,
4919,
3639,
309,
261,
74,
2519,
1503,
480,
446,
13,
288,
5411,
284,
2519,
1503,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
9750,
15514,
9431,
12,
4201,
780,
977,
13,
1216,
1139,
50,
45,
503,
288,
3639,
368,
745,
4919,
3639,
309,
261,
74,
2519,
1503,
480,
446,
13,
288,
5411,
284,
2519,
1503,
18,
... | |
msg.set(NODE_TO_NODE_MESSAGE_DATA, data); | msg.set(NODE_TO_NODE_MESSAGE_DATA, new ShortBuffer(data)); | public static final Message createNodeToNodeMessage(int type, String data) { Message msg = new Message(nodeToNodeTextMessage); msg.set(NODE_TO_NODE_MESSAGE_TYPE, type); msg.set(NODE_TO_NODE_MESSAGE_DATA, data); return msg; } | 50619 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50619/ad0bf740a058caf02fdf4de184f13067e0275d43/DMT.java/clean/src/freenet/io/comm/DMT.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
727,
2350,
24584,
31403,
1079,
12,
474,
618,
16,
514,
501,
13,
288,
202,
202,
1079,
1234,
273,
394,
2350,
12,
2159,
31403,
1528,
1079,
1769,
202,
202,
3576,
18,
542,
12,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
727,
2350,
24584,
31403,
1079,
12,
474,
618,
16,
514,
501,
13,
288,
202,
202,
1079,
1234,
273,
394,
2350,
12,
2159,
31403,
1528,
1079,
1769,
202,
202,
3576,
18,
542,
12,
... |
if ((sx1 > width1) || (sx2 < 0) || | if ((sx1 > width1) || (sx2 < 0) || | protected void flat_image(PImage image, int sx1, int sy1) { int ix1 = 0; int iy1 = 0; int ix2 = image.width; int iy2 = image.height; if (image_mode == CENTER) { sx1 -= image.width / 2; sy1 -= image.height / 2; } int sx2 = sx1 + image.width; int sy2 = sy1 + image.height; // don't draw if completely offscreen // (without this check, ArrayIndexOutOfBoundsException) if ((sx1 > width1) || (sx2 < 0) || (sy1 > height1) || (sy2 < 0)) return; if (sx1 < 0) { // off left edge ix1 -= sx1; sx1 = 0; } if (sy1 < 0) { // off top edge iy1 -= sy1; sy1 = 0; } if (sx2 > width) { // off right edge ix2 -= sx2 - width; sx2 = width; } if (sy2 > height) { // off bottom edge iy2 -= sy2 - height; sy2 = height; } int source = iy1 * image.width + ix1; int target = sy1 * width; if (image.format == RGBA) { for (int y = sy1; y < sy2; y++) { int tx = 0; for (int x = sx1; x < sx2; x++) { pixels[target + x] = _blend(pixels[target + x], image.pixels[source + tx], image.pixels[source + tx++] >>> 24); } source += image.width; target += width; } } else if (image.format == ALPHA) { for (int y = sy1; y < sy2; y++) { int tx = 0; for (int x = sx1; x < sx2; x++) { pixels[target + x] = _blend(pixels[target + x], fill, image.pixels[source + tx++]); } source += image.width; target += width; } } else if (image.format == RGB) { target += sx1; int tw = sx2 - sx1; for (int y = sy1; y < sy2; y++) { System.arraycopy(image.pixels, source, pixels, target, tw); // should set z coordinate in here // or maybe not, since dims=0, meaning no relevant z source += image.width; target += width; } } } | 8833 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8833/d877999f6e97d3c619ae60b800d586ac00acf618/PGraphics.java/clean/core/PGraphics.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
918,
3569,
67,
2730,
12,
1102,
81,
410,
1316,
16,
509,
13280,
21,
16,
509,
1393,
21,
13,
288,
565,
509,
8288,
21,
273,
374,
31,
565,
509,
23466,
21,
273,
374,
31,
565,
509,
82... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
918,
3569,
67,
2730,
12,
1102,
81,
410,
1316,
16,
509,
13280,
21,
16,
509,
1393,
21,
13,
288,
565,
509,
8288,
21,
273,
374,
31,
565,
509,
23466,
21,
273,
374,
31,
565,
509,
82... |
eDynamicUnset( eFeature ); | super.eUnset( featureID ); | public void eUnset( EStructuralFeature eFeature ) { switch ( eDerivedStructuralFeatureID( eFeature ) ) { case AttributePackage.EMBEDDED_IMAGE__TYPE : unsetType( ); return; case AttributePackage.EMBEDDED_IMAGE__URL : setURL( URL_EDEFAULT ); return; case AttributePackage.EMBEDDED_IMAGE__DATA : setData( DATA_EDEFAULT ); return; } eDynamicUnset( eFeature ); } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/036e8c78765730b146e5854b9d6c397a296fed86/EmbeddedImageImpl.java/clean/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/model/attribute/impl/EmbeddedImageImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
19698,
12,
512,
14372,
4595,
425,
4595,
262,
202,
95,
202,
202,
9610,
261,
425,
21007,
14372,
4595,
734,
12,
425,
4595,
262,
262,
202,
202,
95,
1082,
202,
3593,
3601,
226... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
19698,
12,
512,
14372,
4595,
425,
4595,
262,
202,
95,
202,
202,
9610,
261,
425,
21007,
14372,
4595,
734,
12,
425,
4595,
262,
262,
202,
202,
95,
1082,
202,
3593,
3601,
226... |
buf.append(className); | buf.append(sourceFile); | public String format(String key) { if (key.equals("")) { StringBuffer buf = new StringBuffer(); buf.append(className); buf.append(":["); if (startLine == endLine) { buf.append("line "); buf.append(startLine); } else { buf.append("lines "); buf.append(startLine); buf.append('-'); buf.append(endLine); } buf.append(']'); return buf.toString(); } else throw new IllegalStateException("Unknown format key " + key); } | 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,
225,
202,
482,
514,
740,
12,
780,
498,
13,
288,
202,
202,
430,
261,
856,
18,
14963,
2932,
6,
3719,
288,
1082,
202,
780,
1892,
1681,
273,
394,
6674,
5621,
1082,
202,
4385,
18,
6923,
12,
124... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
740,
12,
780,
498,
13,
288,
202,
202,
430,
261,
856,
18,
14963,
2932,
6,
3719,
288,
1082,
202,
780,
1892,
1681,
273,
394,
6674,
5621,
1082,
202,
4385,
18,
6923,
12,
124... |
methodClass.defineMethod("arity", arity); methodClass.defineMethod("[]", call); methodClass.defineMethod("call", call); | methodClass.defineMethod("arity", arity); methodClass.defineMethod("[]", call); methodClass.defineMethod("call", call); | public static RubyClass createMethodClass(Ruby ruby) { RubyCallbackMethod arity = new ReflectionCallbackMethod(RubyMethod.class, "arity"); RubyCallbackMethod call = new ReflectionCallbackMethod(RubyMethod.class, "call", true); RubyClass methodClass = ruby.defineClass("Method", ruby.getClasses().getObjectClass()); methodClass.defineMethod("arity", arity); methodClass.defineMethod("[]", call); methodClass.defineMethod("call", call); return methodClass; } | 1060 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1060/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyMethod.java/buggy/org/jruby/RubyMethod.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
19817,
797,
752,
1305,
797,
12,
54,
10340,
22155,
13,
288,
202,
202,
54,
10340,
2428,
1305,
19353,
273,
1082,
202,
2704,
5685,
2428,
1305,
12,
54,
10340,
1305,
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,
225,
202,
482,
760,
19817,
797,
752,
1305,
797,
12,
54,
10340,
22155,
13,
288,
202,
202,
54,
10340,
2428,
1305,
19353,
273,
1082,
202,
2704,
5685,
2428,
1305,
12,
54,
10340,
1305,
18,
1106,
... |
JavassistUtils.resolve( new Class[]{Method.class, Object.class, Object[].class} ), ctClass ); | JavassistUtils.resolve( new Class[]{ Method.class, Object.class, Object[].class } ), ctClass ); | private static Class createInvocationClass( ClassLoader classLoader, Method interfaceMethod ) throws CannotCompileException { Class invocationClass; final CtClass ctClass = JavassistUtils.createClass( getSimpleName( interfaceMethod.getDeclaringClass() ) + "_" + interfaceMethod.getName() + "_invocation", JavassistInvocation.class ); final CtConstructor constructor = new CtConstructor( JavassistUtils.resolve( new Class[]{Method.class, Object.class, Object[].class} ), ctClass ); constructor.setBody( "{\n\tsuper($$);\n}" ); ctClass.addConstructor( constructor ); final CtMethod proceedMethod = new CtMethod( JavassistUtils.resolve( Object.class ), "proceed", JavassistUtils.resolve( new Class[0] ), ctClass ); final Class[] argumentTypes = interfaceMethod.getParameterTypes(); final StringBuffer proceedBody = new StringBuffer( "{\n" ); if( !Void.TYPE.equals( interfaceMethod.getReturnType() ) ) { proceedBody.append( "\treturn " ); } else { proceedBody.append( "\t" ); } proceedBody.append( "( (" ); proceedBody.append( ProxyUtils.getJavaClassName( interfaceMethod.getDeclaringClass() ) ); proceedBody.append( " )target )." ); proceedBody.append( interfaceMethod.getName() ); proceedBody.append( "(" ); for( int i = 0; i < argumentTypes.length; ++i ) { proceedBody.append( "(" ); proceedBody.append( ProxyUtils.getJavaClassName( argumentTypes[i] ) ); proceedBody.append( ")arguments[" ); proceedBody.append( i ); proceedBody.append( "]" ); if( i != argumentTypes.length - 1 ) { proceedBody.append( ", " ); } } proceedBody.append( ");\n" ); if( Void.TYPE.equals( interfaceMethod.getReturnType() ) ) { proceedBody.append( "\treturn null;\n" ); } proceedBody.append( "}" ); proceedMethod.setBody( proceedBody.toString() ); ctClass.addMethod( proceedMethod ); invocationClass = ctClass.toClass( classLoader ); return invocationClass; } | 51801 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51801/75e082134851dcb68c682f420405550d7f057522/JavassistInvocation.java/clean/src/java/org/apache/commons/proxy/factory/javassist/JavassistInvocation.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
1659,
752,
9267,
797,
12,
9403,
11138,
16,
2985,
1560,
1305,
262,
5411,
1216,
14143,
9937,
503,
565,
288,
3639,
1659,
9495,
797,
31,
3639,
727,
30714,
797,
5691,
797,
273,
804,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1659,
752,
9267,
797,
12,
9403,
11138,
16,
2985,
1560,
1305,
262,
5411,
1216,
14143,
9937,
503,
565,
288,
3639,
1659,
9495,
797,
31,
3639,
727,
30714,
797,
5691,
797,
273,
804,... |
public void drawLine (int x1, int y1, int x2, int y2) | public void drawLine(int x1, int y1, int x2, int y2) | public void drawLine (int x1, int y1, int x2, int y2) { int xp[] = new int[2]; int yp[] = new int[2]; xp[0] = x1; xp[1] = x2; yp[0] = y1; yp[1] = y2; doPolygon (xp, yp, 2, false, false); } | 47947 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47947/b23a69766b998a4a095a0e59631aa072d973a7fe/GdkGraphics2D.java/clean/gnu/java/awt/peer/gtk/GdkGraphics2D.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
30732,
12,
474,
619,
21,
16,
509,
677,
21,
16,
509,
619,
22,
16,
509,
677,
22,
13,
225,
288,
565,
509,
13681,
8526,
273,
394,
509,
63,
22,
15533,
565,
509,
29647,
8526,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
30732,
12,
474,
619,
21,
16,
509,
677,
21,
16,
509,
619,
22,
16,
509,
677,
22,
13,
225,
288,
565,
509,
13681,
8526,
273,
394,
509,
63,
22,
15533,
565,
509,
29647,
8526,
2... |
getBody().run(context, output); | invokeBody(output); | public void doTag(XMLOutput output) throws Exception { // force project to be lazily constructed getProject().setDefaultGoalName( this.defaultGoalName ); org.apache.tools.ant.Project antProject = AntTagLibrary.getProject( context ); // allow access to Ant methods via the project class context.setVariable( "project", antProject ); getBody().run(context, output); } | 51800 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51800/0d5aec147baa5b0b5399591c7e9dd775bb22bcb4/ProjectTag.java/clean/src/java/org/apache/commons/jelly/tags/werkz/ProjectTag.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
741,
1805,
12,
4201,
1447,
876,
13,
1216,
1185,
288,
9079,
368,
2944,
1984,
358,
506,
25047,
15688,
7734,
11080,
7675,
542,
1868,
27716,
461,
12,
333,
18,
1886,
27716,
461,
112... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
741,
1805,
12,
4201,
1447,
876,
13,
1216,
1185,
288,
9079,
368,
2944,
1984,
358,
506,
25047,
15688,
7734,
11080,
7675,
542,
1868,
27716,
461,
12,
333,
18,
1886,
27716,
461,
112... |
private TextSpanLayout getOffsetAdjustedTextLayout( AttributedCharacterIterator aci, FontRenderContext frc) { TextSpanLayout layout = getTextLayoutFactory().createTextLayout(aci, new Point2D.Float(0f, 0f), new java.awt.font.FontRenderContext( new AffineTransform(), true, true)); TextNode.Anchor anchor = (TextNode.Anchor) aci.getAttribute( GVTAttributedCharacterIterator.TextAttribute.ANCHOR_TYPE); int anchorType = TextNode.Anchor.ANCHOR_START; if (anchor != null) anchorType = anchor.getType(); Point2D advance = layout.getAdvance2D(); float dx = 0f; float dy = 0f; switch(anchorType){ case TextNode.Anchor.ANCHOR_MIDDLE: dx = (float) (-advance.getX()/2d); dy = (float) (-advance.getY()/2d); break; case TextNode.Anchor.ANCHOR_END: dx = (float) (-advance.getX()); dy = (float) (-advance.getY()); break; default: // leave untouched } Point2D offset = layout.getOffset(); if (layout.isVertical()) { layout.setOffset(new Point2D.Float( (float) offset.getX(), (float) offset.getY()+dy)); } else { layout.setOffset(new Point2D.Float( (float) offset.getX()+dx, (float) offset.getY())); } return layout; } | 45946 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45946/722077ac2ba94a100164f684d159431c68c5e607/BasicTextPainter.java/buggy/sources/org/apache/batik/gvt/renderer/BasicTextPainter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
3867,
6952,
3744,
13386,
10952,
329,
1528,
3744,
12,
5397,
2380,
11050,
7069,
3198,
1721,
77,
16,
10063,
3420,
1042,
284,
1310,
13,
288,
3639,
3867,
6952,
3744,
3511,
273,
6701,
3744,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3867,
6952,
3744,
13386,
10952,
329,
1528,
3744,
12,
5397,
2380,
11050,
7069,
3198,
1721,
77,
16,
10063,
3420,
1042,
284,
1310,
13,
288,
3639,
3867,
6952,
3744,
3511,
273,
6701,
3744,... | ||
Context context = checkContext(); | Context context = getContext(); | private void removeBindingInternal(String name, boolean serviceBinding) { try { if (name == null) { throw new NullPointerException("The name must not be null"); } Context context = checkContext(); try { context.removeBinding(getInternalName(name, serviceBinding)); } catch (NameNotBoundException e) { throw new NameNotBoundException( "Name '" + name + "' is not bound"); } if (logger.isLoggable(Level.FINEST)) { logger.log( Level.FINEST, "{0} name:{1} returns", serviceBinding ? "removeServiceBinding" : "removeBinding", name); } } catch (RuntimeException e) { if (logger.isLoggable(Level.FINEST)) { logger.logThrow( Level.FINEST, "{0} name:{1} throws", e, serviceBinding ? "removeServiceBinding" : "removeBinding", name); } throw e; } } | 48631 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48631/51014428559746a71eea60ff89c4bc5babf778c1/DataServiceImpl.java/clean/src/server/j2se/com/sun/sgs/impl/service/data/DataServiceImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1206,
5250,
3061,
12,
780,
508,
16,
1250,
1156,
5250,
13,
288,
202,
698,
288,
202,
565,
309,
261,
529,
422,
446,
13,
288,
202,
202,
12849,
394,
10108,
2932,
1986,
508,
1297,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1206,
5250,
3061,
12,
780,
508,
16,
1250,
1156,
5250,
13,
288,
202,
698,
288,
202,
565,
309,
261,
529,
422,
446,
13,
288,
202,
202,
12849,
394,
10108,
2932,
1986,
508,
1297,
... |
protected void initSettings() { IDialogSettings settings = getDialogSettings(); if (settings.get(SETTINGS_SAVED) == null) { // Set default values taskListCheckBox.setSelection(true); taskActivationHistoryCheckBox.setSelection(true); taskContextsCheckBox.setSelection(true); sourceDirText.setText(""); overwriteCheckBox.setSelection(true); importFromFolderGroup.setEnabled(true); importViaFolderButton.setSelection(true); } else { // Retrieve previous values from the dialog settings taskListCheckBox.setSelection(settings.getBoolean(TASKLIST_SETTING)); taskActivationHistoryCheckBox.setSelection(settings.getBoolean(ACTIVATION_HISTORY_SETTING)); taskContextsCheckBox.setSelection(settings.getBoolean(CONTEXTS_SETTING)); importViaFolderButton.setSelection(settings.getBoolean(IMPORT_METHOD_SETTING)); importViaZipButton.setSelection(!importViaFolderButton.getSelection()); importFromFolderGroup.setEnabled(importViaFolderButton.getSelection()); importFromZipGroup.setEnabled(importViaZipButton.getSelection()); browseButton.setEnabled(importFromFolderGroup.isEnabled()); browseButtonZip.setEnabled(importFromZipGroup.isEnabled()); String directory = settings.get(SOURCE_DIR_SETTING); if (directory != null) { sourceDirText.setText(settings.get(SOURCE_DIR_SETTING)); } String zipFile = settings.get(SOURCE_ZIP_SETTING); if (zipFile != null) { sourceZipText.setText(settings.get(SOURCE_ZIP_SETTING)); } overwriteCheckBox.setSelection(settings.getBoolean(OVERWRITE_SETTING)); } } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/30c86c135cbd0421b86b3df78f8f1e01efff1b79/TaskDataImportWizardPage.java/clean/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasklist/ui/wizards/TaskDataImportWizardPage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
1208,
2628,
1435,
288,
202,
202,
734,
3529,
2628,
1947,
273,
31774,
2628,
5621,
202,
202,
430,
261,
4272,
18,
588,
12,
19428,
67,
5233,
12135,
13,
422,
446,
13,
288,
108... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1208,
2628,
1435,
288,
202,
202,
734,
3529,
2628,
1947,
273,
31774,
2628,
5621,
202,
202,
430,
261,
4272,
18,
588,
12,
19428,
67,
5233,
12135,
13,
422,
446,
13,
288,
108... | ||
MIR_Load.setOffset(inst, IC(frameSize - offset - 256)); | if ( frameIsRequired()) MIR_Load.setOffset(inst, IC(frameSize - offset - 256)); else MIR_Load.setOffset(inst, IC(-offset - 256)); | void cleanUpAndInsertEpilogue() { OPT_PhysicalRegisterSet phys = ir.regpool.getPhysicalRegisterSet(); OPT_Instruction inst = ir.firstInstructionInCodeOrder().nextInstructionInCodeOrder(); for (; inst != null; inst = inst.nextInstructionInCodeOrder()) { switch (inst.getOpcode()) { case PPC_MOVE_opcode: case PPC_FMR_opcode: // remove frivolous moves if (MIR_Move.getResult(inst).register.number == MIR_Move.getValue(inst).register.number) inst = inst.remove(); break; case PPC_BLR_opcode: if (frameIsRequired()) insertEpilogue(inst); break; case PPC_LFS_opcode: case PPC_LFD_opcode: case PPC_LInt_opcode: case PPC_LWZ_opcode: case PPC_LAddr_opcode: // the following to handle spilled parameters // SJF: this is ugly. clean it up someday. if (MIR_Load.getAddress(inst).register == ir.regpool.getPhysicalRegisterSet().getFP()) { OPT_Operand one = MIR_Load.getOffset(inst); if (one instanceof OPT_IntConstantOperand) { int offset = ((OPT_IntConstantOperand) one).value; if (offset <= -256) { MIR_Load.setOffset(inst, IC(frameSize - offset - 256)); } } } default: break; } } } | 5245 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5245/e91a0c0d12128840b0bc19690813b65cca3ae137/OPT_StackManager.java/clean/rvm/src/vm/arch/powerPC/compilers/optimizing/regalloc/OPT_StackManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
918,
26384,
1876,
4600,
18918,
21947,
344,
1435,
288,
565,
16456,
67,
18136,
3996,
694,
24758,
273,
9482,
18,
1574,
6011,
18,
588,
18136,
3996,
694,
5621,
565,
16456,
67,
11983,
1804,
273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
918,
26384,
1876,
4600,
18918,
21947,
344,
1435,
288,
565,
16456,
67,
18136,
3996,
694,
24758,
273,
9482,
18,
1574,
6011,
18,
588,
18136,
3996,
694,
5621,
565,
16456,
67,
11983,
1804,
273,
... |
if (piece.isBlack) | if (!piece.isBlack) | protected void unexecute () { if (Log.debug) { Log.debug(DEBUG, "unexecuting move: " + this); Log.debug2(DEBUG, board); } board.setEnPassantFile(prevEnPassantFile); //castling if (piece.isKing() && piece.moveCount == 1) { Square rook_orig, rook_dest; //long if (dest.file == 3) { //c-file rook_orig = board.getSquare(1,orig.rank); //a-file rook_dest = board.getSquare(4,orig.rank); //d-file rook_orig.piece = rook_dest.piece; rook_dest.piece = null; rook_orig.piece.orig = rook_orig; rook_orig.piece.moveCount--; } //short else if (dest.file == 7) { //g-file rook_orig = board.getSquare(8,orig.rank); //h-file rook_dest = board.getSquare(6,orig.rank); //f-file rook_orig.piece = rook_dest.piece; rook_dest.piece = null; rook_orig.piece.orig = rook_orig; rook_orig.piece.moveCount--; } } //pawn promotion (use same function to reverse the promotion) if (piece.isPawn() && Pawn.isPromotionSquare(dest, piece.isBlack)) { board.promote(promotion, piece); } dest.piece.moveCount--; orig.piece = dest.piece; piece.orig = orig; dest.piece = null; if (casualty != null) { casualty.setCaptured(false); casualty.orig.piece = casualty; //put piece on board } //50MoveRule if (piece.isPawn() || casualty != null) board.plyCount50 = prevPlyCount50; else board.plyCount50--; //set board to alternate who moves flag board.isBlackMove = piece.isBlack; board.lastMove = (ChessMove) prev; //move number if (piece.isBlack) board.moveNumber--; executed = false; board.staleLegalDests = true; //broadcast changes in the model board.fireBoardEvent(BoardEvent.UNMOVE); if (Log.debug) { Log.debug(DEBUG, "unexecute successful"); Log.debug2(DEBUG, board); } } | 2285 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2285/e2ef29e2c8c8581ae7e41e5d7b4c9e143cce251b/ChessMove.java/clean/ictk/src/ictk/boardgame/chess/ChessMove.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
4750,
918,
640,
8837,
1832,
288,
540,
309,
261,
1343,
18,
4148,
13,
288,
202,
565,
1827,
18,
4148,
12,
9394,
16,
315,
318,
4177,
8490,
3635,
30,
315,
397,
333,
1769,
202,
565,
1827,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
4750,
918,
640,
8837,
1832,
288,
540,
309,
261,
1343,
18,
4148,
13,
288,
202,
565,
1827,
18,
4148,
12,
9394,
16,
315,
318,
4177,
8490,
3635,
30,
315,
397,
333,
1769,
202,
565,
1827,
1... |
public void init(int i) { add(new Beamform(i, numChannels)); add(new BeamFirFilter(mfSize, numPostDec2, 1)); add(new Magnitude()); add(new Detector(i, numPostDec2, targetBeam, targetSamplePostDec, cfarThreshold)); } | public void init() { add(new Beamform(i+k, numChannels)); add(new BeamFirFilter(mfSize, numPostDec2, 1)); add(new Magnitude()); add(new Detector(i+k, numPostDec2, targetBeam, targetSamplePostDec, cfarThreshold)); } | public void init(int i) { add(new Beamform(i, numChannels)); // Need to replace this fir with //fft -> elWiseMult -> ifft add(new BeamFirFilter(mfSize, numPostDec2, 1)); add(new Magnitude()); // with a more sophisticated detector, we need // someplace to store the data until we can find // the targets... add(new Detector(i, numPostDec2, targetBeam, targetSamplePostDec, cfarThreshold)); } | 47772 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47772/bac6e051d071e3af9abc59969a0fa4eb9e188670/BeamFormer.java/buggy/streams/apps/benchmarks/beamformer/streamit/BeamFormer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
482,
918,
1208,
12,
474,
277,
13,
288,
9506,
225,
527,
12,
2704,
605,
3820,
687,
12,
77,
16,
9944,
282,
818,
10585,
10019,
9506,
225,
368,
12324,
358,
1453,
333,
284,
481,
598,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1208,
12,
474,
277,
13,
288,
9506,
225,
527,
12,
2704,
605,
3820,
687,
12,
77,
16,
9944,
282,
818,
10585,
10019,
9506,
225,
368,
12324,
358,
1453,
333,
284,
481,
598,
... |
List hints = new ArrayList(); | List<String> hints = new ArrayList<String>(); | protected List getHints() { List hints = new ArrayList(); hints.add( "There are no hints defined." ); return hints; } | 47703 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47703/e5b3b00b0f724a9834bcadb34453e906f7c0d25b/LessonAdapter.java/buggy/ webgoat/main/project/JavaSource/org/owasp/webgoat/lessons/LessonAdapter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
987,
336,
13368,
1435,
202,
95,
202,
202,
682,
13442,
273,
394,
2407,
5621,
202,
202,
24598,
18,
1289,
12,
315,
9828,
854,
1158,
13442,
2553,
1199,
11272,
202,
202,
2463,
13442... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
225,
202,
1117,
987,
336,
13368,
1435,
202,
95,
202,
202,
682,
13442,
273,
394,
2407,
5621,
202,
202,
24598,
18,
1289,
12,
315,
9828,
854,
1158,
13442,
2553,
1199,
11272,
202,
202,
2463,
13442... |
if ( bMinSliceDefined && bMinSliceApplied ) | if ( bMinSliceApplied ) | public final Size compute( IDisplayServer xs, Chart cm, SeriesDefinition[] seda, RunTimeContext rtc ) throws ChartException { // THREE CASES: // 1. ALL SERIES IN ONE ARRAYLIST // 2. ONE SERIES PER ARRAYLIST // 3. ALL OTHERS Legend lg = cm.getLegend( ); if ( !lg.isSetOrientation( ) ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, "exception.legend.orientation.horzvert", //$NON-NLS-1$ ResourceBundle.getBundle( Messages.ENGINE, xs.getLocale( ) ) ); } if ( !lg.isSetDirection( ) ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, "exception.legend.direction.tblr", //$NON-NLS-1$ ResourceBundle.getBundle( Messages.ENGINE, xs.getLocale( ) ) ); } // INITIALIZATION OF VARS USED IN FOLLOWING LOOPS Orientation orientation = lg.getOrientation( ); Direction direction = lg.getDirection( ); double maxWrappingSize = lg.getWrappingSize( ); Label la = LabelImpl.create( ); la.setCaption( (Text) EcoreUtil.copy( lg.getText( ) ) ); ClientArea ca = lg.getClientArea( ); LineAttributes lia = ca.getOutline( ); double dSeparatorThickness = lia.getThickness( ); double dWidth = 0, dHeight = 0; la.getCaption( ).setValue( "X" ); //$NON-NLS-1$ final ITextMetrics itm = xs.getTextMetrics( la ); double dItemHeight = itm.getFullHeight( ); Series se; ArrayList al; double dScale = xs.getDpiResolution( ) / 72d; Insets insCA = ca.getInsets( ).scaledInstance( dScale ); final boolean bPaletteByCategory = ( cm.getLegend( ) .getItemType( ) .getValue( ) == LegendItemType.CATEGORIES ); Series seBase; // Get available maximum block width/height. Block bl = cm.getBlock( ); Bounds boFull = bl.getBounds( ).scaledInstance( dScale ); Insets ins = bl.getInsets( ).scaledInstance( dScale ); Insets lgIns = lg.getInsets( ).scaledInstance( dScale ); double dAvailableWidth = boFull.getWidth( ) - ins.getLeft( ) - ins.getRight( ) - lgIns.getLeft( ) - lgIns.getRight( ); double dAvailableHeight = boFull.getHeight( ) - ins.getTop( ) - ins.getBottom( ) - lgIns.getTop( ) - lgIns.getBottom( ) - cm.getTitle( ) .getBounds( ) .scaledInstance( dScale ) .getHeight( ); // Calculate if minSlice applicable. boolean bMinSliceDefined = false; double dMinSlice = 0; boolean bPercentageMinSlice = false; String sMinSliceLabel = null; boolean bMinSliceApplied = false; if ( cm instanceof ChartWithoutAxes ) { bMinSliceDefined = ( (ChartWithoutAxes) cm ).isSetMinSlice( ); dMinSlice = ( (ChartWithoutAxes) cm ).getMinSlice( ); bPercentageMinSlice = ( (ChartWithoutAxes) cm ).isMinSlicePercent( ); sMinSliceLabel = ( (ChartWithoutAxes) cm ).getMinSliceLabel( ); if ( sMinSliceLabel == null || sMinSliceLabel.length( ) == 0 ) { sMinSliceLabel = IConstants.UNDEFINED_STRING; } else { sMinSliceLabel = rtc.externalizedMessage( sMinSliceLabel ); } } // calculate if need an extra legend item when minSlice defined. if ( bMinSliceDefined && bPaletteByCategory && cm instanceof ChartWithoutAxes ) { if ( !( (ChartWithoutAxes) cm ).getSeriesDefinitions( ).isEmpty( ) ) { // OK TO ASSUME THAT 1 BASE SERIES DEFINITION EXISTS SeriesDefinition sdBase = (SeriesDefinition) ( (ChartWithoutAxes) cm ).getSeriesDefinitions( ) .get( 0 ); SeriesDefinition[] sdOrtho = (SeriesDefinition[]) sdBase.getSeriesDefinitions( ) .toArray( ); DataSetIterator dsiOrtho = null; double dCurrentMinSlice = 0; for ( int i = 0; i < sdOrtho.length && !bMinSliceApplied; i++ ) { try { dsiOrtho = new DataSetIterator( ( (Series) sdOrtho[i].getRunTimeSeries( ) .get( 0 ) ).getDataSet( ) ); } catch ( Exception ex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, ex ); } // TODO Check dataSet type, throw exception or ignore?. if ( bPercentageMinSlice ) { double total = 0; while ( dsiOrtho.hasNext( ) ) { Object obj = dsiOrtho.next( ); if ( obj instanceof Number ) { total += ( (Number) obj ).doubleValue( ); } } dsiOrtho.reset( ); dCurrentMinSlice = total * dMinSlice / 100d; } else { dCurrentMinSlice = dMinSlice; } while ( dsiOrtho.hasNext( ) ) { Object obj = dsiOrtho.next( ); if ( obj instanceof Number ) { double val = ( (Number) obj ).doubleValue( ); if ( val < dCurrentMinSlice ) { bMinSliceApplied = true; break; } } } } } } // COMPUTATIONS HERE MUST BE IN SYNC WITH THE ACTUAL RENDERER if ( orientation.getValue( ) == Orientation.VERTICAL ) { double dW, dMaxW = 0; double dFullHeight = 0, dExtraWidth = 0, dDeltaHeight; if ( bPaletteByCategory ) { SeriesDefinition sdBase = null; if ( cm instanceof ChartWithAxes ) { final Axis axPrimaryBase = ( (ChartWithAxes) cm ).getBaseAxes( )[0]; // ONLY // SUPPORT // 1 // BASE // AXIS // FOR // NOW if ( axPrimaryBase.getSeriesDefinitions( ).isEmpty( ) ) { return SizeImpl.create( 0, 0 ); } sdBase = (SeriesDefinition) axPrimaryBase.getSeriesDefinitions( ) .get( 0 ); // OK TO ASSUME THAT 1 BASE SERIES // DEFINITION EXISTS } else if ( cm instanceof ChartWithoutAxes ) { if ( ( (ChartWithoutAxes) cm ).getSeriesDefinitions( ) .isEmpty( ) ) { return SizeImpl.create( 0, 0 ); } sdBase = (SeriesDefinition) ( (ChartWithoutAxes) cm ).getSeriesDefinitions( ) .get( 0 ); // OK TO ASSUME THAT 1 BASE SERIES // DEFINITION EXISTS } seBase = (Series) sdBase.getRunTimeSeries( ).get( 0 ); // OK TO // ASSUME // THAT 1 // BASE // RUNTIME // SERIES // EXISTS DataSetIterator dsiBase = null; try { dsiBase = new DataSetIterator( seBase.getDataSet( ) ); } catch ( Exception ex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, ex ); } FormatSpecifier fs = null; if ( sdBase != null ) { fs = sdBase.getFormatSpecifier( ); } while ( dsiBase.hasNext( ) ) { // TODO filter the not-used legend. Object obj = dsiBase.next( ); String lgtext = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, Locale.getDefault( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } la.getCaption( ).setValue( lgtext ); itm.reuse( la, maxWrappingSize ); dDeltaHeight = insCA.getTop( ) + itm.getFullHeight( ) + insCA.getBottom( ); if ( dHeight + dDeltaHeight > dAvailableHeight ) { dExtraWidth += dWidth + insCA.getLeft( ) + insCA.getRight( ) + ( 3 * dItemHeight ) / 2 + dHorizontalSpacing; dWidth = itm.getFullWidth( ); dFullHeight = Math.max( dFullHeight, dHeight ); dHeight = dDeltaHeight; } else { dWidth = Math.max( itm.getFullWidth( ), dWidth ); dHeight += dDeltaHeight; } } // compute the extra MinSlice legend item if applicable. if ( bMinSliceDefined && bMinSliceApplied ) { la.getCaption( ).setValue( sMinSliceLabel ); itm.reuse( la, maxWrappingSize ); dDeltaHeight = insCA.getTop( ) + itm.getFullHeight( ) + insCA.getBottom( ); if ( dHeight + dDeltaHeight > dAvailableHeight ) { dExtraWidth += dWidth + insCA.getLeft( ) + insCA.getRight( ) + ( 3 * dItemHeight ) / 2 + dHorizontalSpacing; dWidth = itm.getFullWidth( ); dFullHeight = Math.max( dFullHeight, dHeight ); dHeight = dDeltaHeight; } else { dWidth = Math.max( itm.getFullWidth( ), dWidth ); dHeight += dDeltaHeight; } } dWidth += insCA.getLeft( ) + ( 3 * dItemHeight ) / 2 + dHorizontalSpacing + insCA.getRight( ) + dExtraWidth; dHeight = Math.max( dFullHeight, dHeight ); } else if ( direction.getValue( ) == Direction.TOP_BOTTOM ) // (VERTICAL // => // TB) { dSeparatorThickness += dVerticalSpacing; for ( int j = 0; j < seda.length; j++ ) { al = seda[j].getRunTimeSeries( ); FormatSpecifier fs = seda[j].getFormatSpecifier( ); for ( int i = 0; i < al.size( ); i++ ) { se = (Series) al.get( i ); Object obj = se.getSeriesIdentifier( ); String lgtext = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, Locale.getDefault( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } la.getCaption( ).setValue( lgtext ); itm.reuse( la, maxWrappingSize ); dW = itm.getFullWidth( ); dDeltaHeight = insCA.getTop( ) + itm.getFullHeight( ) + insCA.getBottom( ); if ( lg.isShowValue( ) ) { DataSetIterator dsiBase = null; try { dsiBase = new DataSetIterator( se.getDataSet( ) ); } catch ( Exception ex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, ex ); } // Use first value for each series. if ( dsiBase.hasNext( ) ) { obj = dsiBase.next( ); String valueText = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, Locale.getDefault( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } Label seLabel = (Label) EcoreUtil.copy( se.getLabel( ) ); seLabel.getCaption( ).setValue( valueText ); itm.reuse( seLabel ); dW = Math.max( dW, itm.getFullWidth( ) ); dDeltaHeight += itm.getFullHeight( ) + 2; } } if ( dHeight + dDeltaHeight > dAvailableHeight ) { dExtraWidth += dMaxW + insCA.getLeft( ) + insCA.getRight( ) + ( 3 * dItemHeight ) / 2 + dHorizontalSpacing; dMaxW = dW; dFullHeight = Math.max( dFullHeight, dHeight ); dHeight = dDeltaHeight; } else { dMaxW = Math.max( dW, dMaxW ); dHeight += dDeltaHeight; } } // SETUP HORIZONTAL SEPARATOR SPACING if ( j < seda.length - 1 ) { dHeight += dSeparatorThickness; } } // LEFT INSETS + LEGEND ITEM WIDTH + HORIZONTAL SPACING + MAX // ITEM WIDTH + RIGHT INSETS dWidth = insCA.getLeft( ) + ( 3 * dItemHeight ) / 2 + dHorizontalSpacing + dMaxW + insCA.getRight( ) + dExtraWidth; dHeight = Math.max( dFullHeight, dHeight ); } else if ( direction.getValue( ) == Direction.LEFT_RIGHT ) // (VERTICAL // => // LR) { dSeparatorThickness += dHorizontalSpacing; for ( int j = 0; j < seda.length; j++ ) { al = seda[j].getRunTimeSeries( ); FormatSpecifier fs = seda[j].getFormatSpecifier( ); for ( int i = 0; i < al.size( ); i++ ) { se = (Series) al.get( i ); Object obj = se.getSeriesIdentifier( ); String lgtext = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, Locale.getDefault( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } la.getCaption( ).setValue( lgtext ); itm.reuse( la, maxWrappingSize ); dW = itm.getFullWidth( ); dDeltaHeight = insCA.getTop( ) + itm.getFullHeight( ) + insCA.getBottom( ); if ( lg.isShowValue( ) ) { DataSetIterator dsiBase = null; try { dsiBase = new DataSetIterator( se.getDataSet( ) ); } catch ( Exception ex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, ex ); } // Use first value for each series. if ( dsiBase.hasNext( ) ) { obj = dsiBase.next( ); String valueText = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, Locale.getDefault( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } Label seLabel = (Label) EcoreUtil.copy( se.getLabel( ) ); seLabel.getCaption( ).setValue( valueText ); itm.reuse( seLabel ); dW = Math.max( dW, itm.getFullWidth( ) ); dDeltaHeight += itm.getFullHeight( ) + 2; } } if ( dHeight + dDeltaHeight > dAvailableHeight ) { dExtraWidth += dMaxW + insCA.getLeft( ) + insCA.getRight( ) + ( 3 * dItemHeight ) / 2 + dHorizontalSpacing; dMaxW = dW; dFullHeight = Math.max( dFullHeight, dHeight ); dHeight = dDeltaHeight; } else { dMaxW = Math.max( dW, dMaxW ); dHeight += dDeltaHeight; } } dExtraWidth += dMaxW + insCA.getLeft( ) + insCA.getRight( ) + ( 3 * dItemHeight ) / 2 + dHorizontalSpacing; dMaxW = 0; dFullHeight = Math.max( dFullHeight, dHeight ); dHeight = 0; // SETUP VERTICAL SEPARATOR SPACING if ( j < seda.length - 1 ) { dExtraWidth += dSeparatorThickness; } } // LEFT INSETS + LEGEND ITEM WIDTH + HORIZONTAL SPACING + // MAX ITEM WIDTH + RIGHT INSETS dWidth += insCA.getLeft( ) + ( 3 * dItemHeight / 2 ) + dHorizontalSpacing + insCA.getRight( ) + dExtraWidth; dHeight = Math.max( dFullHeight, dHeight ); } else { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, "exception.illegal.rendering.direction", //$NON-NLS-1$ new Object[]{ direction.getName( ) }, ResourceBundle.getBundle( Messages.ENGINE, xs.getLocale( ) ) ); } } else if ( orientation.getValue( ) == Orientation.HORIZONTAL ) { double dH, dMaxH = 0; double dFullWidth = 0, dExtraHeight = 0, dDeltaWidth; if ( bPaletteByCategory ) { SeriesDefinition sdBase = null; if ( cm instanceof ChartWithAxes ) { final Axis axPrimaryBase = ( (ChartWithAxes) cm ).getBaseAxes( )[0]; // ONLY // SUPPORT // 1 // BASE // AXIS // FOR // NOW if ( axPrimaryBase.getSeriesDefinitions( ).isEmpty( ) ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, "exception.base.axis.no.series.definitions", //$NON-NLS-1$ ResourceBundle.getBundle( Messages.ENGINE, xs.getLocale( ) ) ); } sdBase = (SeriesDefinition) axPrimaryBase.getSeriesDefinitions( ) .get( 0 ); // OK TO ASSUME // THAT 1 BASE // SERIES // DEFINITION // EXISTS } else if ( cm instanceof ChartWithoutAxes ) { if ( ( (ChartWithoutAxes) cm ).getSeriesDefinitions( ) .isEmpty( ) ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, "exception.base.axis.no.series.definitions", //$NON-NLS-1$ ResourceBundle.getBundle( Messages.ENGINE, xs.getLocale( ) ) ); } sdBase = (SeriesDefinition) ( (ChartWithoutAxes) cm ).getSeriesDefinitions( ) .get( 0 ); // OK TO ASSUME // THAT 1 BASE // SERIES // DEFINITION // EXISTS } seBase = (Series) sdBase.getRunTimeSeries( ).get( 0 ); // OK TO // ASSUME // THAT 1 // BASE // RUNTIME // SERIES // EXISTS DataSetIterator dsiBase = null; try { dsiBase = new DataSetIterator( seBase.getDataSet( ) ); } catch ( Exception ex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, ex ); } FormatSpecifier fs = null; if ( sdBase != null ) { fs = sdBase.getFormatSpecifier( ); } while ( dsiBase.hasNext( ) ) { // TODO filter the not-used legend. Object obj = dsiBase.next( ); String lgtext = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, Locale.getDefault( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } la.getCaption( ).setValue( lgtext ); itm.reuse( la, maxWrappingSize ); dDeltaWidth = insCA.getLeft( ) + itm.getFullWidth( ) + ( 3 * dItemHeight ) / 2 + insCA.getRight( ); if ( dWidth + dDeltaWidth > dAvailableWidth ) { dExtraHeight += dHeight + insCA.getTop( ) + insCA.getBottom( ) + dVerticalSpacing; dHeight = itm.getFullHeight( ); dFullWidth = Math.max( dFullWidth, dWidth ); dWidth = dDeltaWidth; } else { dHeight = Math.max( itm.getFullHeight( ), dHeight ); dWidth += dDeltaWidth; } } // compute the extra MinSlice legend item if applicable. if ( bMinSliceDefined && bMinSliceApplied ) { la.getCaption( ).setValue( sMinSliceLabel ); itm.reuse( la, maxWrappingSize ); dDeltaWidth = insCA.getLeft( ) + itm.getFullWidth( ) + ( 3 * dItemHeight ) / 2 + insCA.getRight( ); if ( dWidth + dDeltaWidth > dAvailableWidth ) { dExtraHeight += dHeight + insCA.getTop( ) + insCA.getBottom( ) + dVerticalSpacing; dHeight = itm.getFullHeight( ); dFullWidth = Math.max( dFullWidth, dWidth ); dWidth = dDeltaWidth; } else { dHeight = Math.max( itm.getFullHeight( ), dHeight ); dWidth += dDeltaWidth; } } dHeight += dExtraHeight + insCA.getTop( ) + insCA.getBottom( ) + dVerticalSpacing; dWidth = Math.max( dWidth, dFullWidth ); } else if ( direction.getValue( ) == Direction.TOP_BOTTOM ) // (HORIZONTAL // => // TB) { dSeparatorThickness += dVerticalSpacing; for ( int j = 0; j < seda.length; j++ ) { dWidth = 0; al = seda[j].getRunTimeSeries( ); FormatSpecifier fs = seda[j].getFormatSpecifier( ); for ( int i = 0; i < al.size( ); i++ ) { se = (Series) al.get( i ); Object obj = se.getSeriesIdentifier( ); String lgtext = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, Locale.getDefault( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } la.getCaption( ).setValue( lgtext ); itm.reuse( la, maxWrappingSize ); dH = itm.getFullHeight( ); dDeltaWidth = insCA.getLeft( ) + ( 3 * dItemHeight ) / 2 + itm.getFullWidth( ) + insCA.getRight( ); if ( lg.isShowValue( ) ) { DataSetIterator dsiBase = null; try { dsiBase = new DataSetIterator( se.getDataSet( ) ); } catch ( Exception ex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, ex ); } // Use first value for each series. if ( dsiBase.hasNext( ) ) { obj = dsiBase.next( ); String valueText = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, Locale.getDefault( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } Label seLabel = (Label) EcoreUtil.copy( se.getLabel( ) ); seLabel.getCaption( ).setValue( valueText ); itm.reuse( seLabel ); dH += itm.getFullHeight( ) + 2; dDeltaWidth = Math.max( dDeltaWidth, itm.getFullWidth( ) ); } } if ( dWidth + dDeltaWidth > dAvailableWidth ) { dExtraHeight += dMaxH + insCA.getTop( ) + insCA.getBottom( ) + dVerticalSpacing; dMaxH = dH; dFullWidth = Math.max( dFullWidth, dWidth ); dWidth = dDeltaWidth; } else { dMaxH = Math.max( dH, dMaxH ); dWidth += dDeltaWidth; } } dExtraHeight += dMaxH + insCA.getTop( ) + insCA.getBottom( ) + dVerticalSpacing; dMaxH = 0; dFullWidth = Math.max( dFullWidth, dWidth ); dWidth = 0; // SETUP HORIZONTAL SEPARATOR SPACING if ( j < seda.length - 1 ) { dHeight += dSeparatorThickness; } } dHeight += insCA.getTop( ) + dVerticalSpacing + insCA.getBottom( ) + dExtraHeight; dWidth = Math.max( dFullWidth, dWidth ); } else if ( direction.getValue( ) == Direction.LEFT_RIGHT ) // (HORIZONTAL // => // LR) { dSeparatorThickness += dHorizontalSpacing; for ( int j = 0; j < seda.length; j++ ) { al = seda[j].getRunTimeSeries( ); FormatSpecifier fs = seda[j].getFormatSpecifier( ); for ( int i = 0; i < al.size( ); i++ ) { se = (Series) al.get( i ); Object obj = se.getSeriesIdentifier( ); String lgtext = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, Locale.getDefault( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } la.getCaption( ).setValue( lgtext ); itm.reuse( la, maxWrappingSize ); dH = itm.getFullHeight( ); dDeltaWidth = insCA.getLeft( ) + ( 3 * dItemHeight ) / 2 + itm.getFullWidth( ) + insCA.getRight( ); if ( lg.isShowValue( ) ) { DataSetIterator dsiBase = null; try { dsiBase = new DataSetIterator( se.getDataSet( ) ); } catch ( Exception ex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, ex ); } // Use first value for each series. if ( dsiBase.hasNext( ) ) { obj = dsiBase.next( ); String valueText = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, Locale.getDefault( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } Label seLabel = (Label) EcoreUtil.copy( se.getLabel( ) ); seLabel.getCaption( ).setValue( valueText ); itm.reuse( seLabel ); dH += itm.getFullHeight( ) + 2; dDeltaWidth = Math.max( dDeltaWidth, itm.getFullWidth( ) ); } } if ( dWidth + dDeltaWidth > dAvailableWidth ) { dExtraHeight += dMaxH + insCA.getTop( ) + insCA.getBottom( ) + dVerticalSpacing; dMaxH = dH; dFullWidth = Math.max( dFullWidth, dWidth ); dWidth = dDeltaWidth; } else { dMaxH = Math.max( dH, dMaxH ); dWidth += dDeltaWidth; } } // SETUP VERTICAL SEPARATOR SPACING if ( j < seda.length - 1 ) { dWidth += dSeparatorThickness; } } dHeight += insCA.getTop( ) + dVerticalSpacing + insCA.getBottom( ) + dMaxH + dExtraHeight; dWidth = Math.max( dFullWidth, dWidth ); } else { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, "exception.illegal.rendering.direction", //$NON-NLS-1$ new Object[]{ direction }, ResourceBundle.getBundle( Messages.ENGINE, xs.getLocale( ) ) ); } } else { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, "exception.illegal.rendering.orientation", //$NON-NLS-1$ new Object[]{ orientation }, ResourceBundle.getBundle( Messages.ENGINE, xs.getLocale( ) ) ); } // consider legend title size. Label lgTitle = lg.getTitle( ); if ( lgTitle != null && lgTitle.isSetVisible( ) && lgTitle.isVisible( ) ) { BoundingBox bb = null; try { bb = Methods.computeBox( xs, IConstants.ABOVE, lgTitle, 0, 0 ); } catch ( IllegalArgumentException uiex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, uiex ); } switch ( lg.getTitlePosition( ).getValue( ) ) { case Position.ABOVE : case Position.BELOW : dHeight += bb.getHeight( ); dWidth = Math.max( dWidth, bb.getWidth( ) ); break; case Position.LEFT : case Position.RIGHT : dWidth += bb.getWidth( ); dHeight = Math.max( dHeight, bb.getHeight( ) ); break; } } itm.dispose( ); // DISPOSE RESOURCE AFTER USE if ( rtc != null ) { LegendItemLayoutHints lilh = new LegendItemLayoutHints( ); lilh.set( SizeImpl.create( dWidth, dHeight ) ); rtc.setLegendItemLayoutHints( lilh ); } sz = SizeImpl.create( dWidth, dHeight ); return sz; } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/ad38cf76f1d641ada210d2a5b0551677d4e55a71/LegendBuilder.java/buggy/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/computation/LegendBuilder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
6321,
3671,
12,
1599,
291,
1601,
2081,
9280,
16,
14804,
5003,
16,
1082,
202,
6485,
1852,
8526,
24336,
69,
16,
1939,
950,
1042,
436,
5111,
262,
1216,
14804,
503,
202,
95,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6321,
3671,
12,
1599,
291,
1601,
2081,
9280,
16,
14804,
5003,
16,
1082,
202,
6485,
1852,
8526,
24336,
69,
16,
1939,
950,
1042,
436,
5111,
262,
1216,
14804,
503,
202,
95,
... |
if (result != null) { if (result instanceof Element || result instanceof Document) { Node node = (Node) result; DOMGenerator domGenerator = new DOMGenerator(node); ProcessorOutput domOutput = domGenerator.createOutput(OUTPUT_DATA); domOutput.read(context, new ForwardingContentHandler(contentHandler) { public void startDocument() { } | if ( result == null ) continue; final String strVal; if ( result instanceof org.dom4j.Element || result instanceof org.dom4j.Document ) { final org.dom4j.Element elt = result instanceof org.dom4j.Element ? ( org.dom4j.Element )result : ( ( org.dom4j.Document )result ).getRootElement(); final String sid = Dom4jUtils.makeSystemId( elt ); final DOMGenerator domGenerator = new DOMGenerator ( elt, "xpath result doc", DOMGenerator.ZeroValidity, sid ); final ProcessorOutput domOutput = domGenerator.createOutput( OUTPUT_DATA ); domOutput.read(context, new ForwardingContentHandler(contentHandler) { public void startDocument() { } | public void readImpl(org.orbeon.oxf.pipeline.api.PipelineContext context, ContentHandler contentHandler) { Config config = (Config) readCacheInputAsObject(context, getInputByName(INPUT_CONFIG), new CacheableInputReader() { public Object read(final org.orbeon.oxf.pipeline.api.PipelineContext context, final ProcessorInput input) { Document config = readInputAsDOM4J(context, INPUT_CONFIG); // Get declared namespaces Map namespaces = new HashMap(); for (Iterator i = config.getRootElement().selectNodes("/config/namespace").iterator(); i.hasNext();) { Element namespaceElement = (Element) i.next(); namespaces.put(namespaceElement.attributeValue("prefix"), namespaceElement.attributeValue("uri")); } // Create xpath object (Jaxen)// XPath xpath = XPathCache.createCacheXPath(context, (String) config.selectObject("string(/config/xpath)"));// xpath.setNamespaceContext(new SimpleNamespaceContext(namespaces));// xpath.setFunctionContext(new OXFFunctionContext());// return xpath; return new Config(namespaces, (String) config.selectObject("string(/config/xpath)")); } });// List results = xpath.selectNodes(readCacheInputAsDOM4J(context, INPUT_DATA)); DocumentWrapper wrapper = new DocumentWrapper(readCacheInputAsDOM4J(context, INPUT_DATA), null); PooledXPathExpression xpath = null; try { xpath = XPathCache.getXPathExpression(context, wrapper, config.getExpression(), config.getNamespaces()); List results = xpath.evaluate(); contentHandler.startDocument(); // WARNING: Here we break the rule that processors must output valid XML documents, because // we potentially output several root nodes. This works because the XPathProcessor is always // connected to an aggregator, which adds a new root node. for (Iterator i = results.iterator(); i.hasNext();) { Object result = i.next(); if (result != null) { if (result instanceof Element || result instanceof Document) { Node node = (Node) result; DOMGenerator domGenerator = new DOMGenerator(node); ProcessorOutput domOutput = domGenerator.createOutput(OUTPUT_DATA); domOutput.read(context, new ForwardingContentHandler(contentHandler) { public void startDocument() { } public void endDocument() { } }); } else if (result instanceof String) { String stringValue = (String) result; contentHandler.characters(stringValue.toCharArray(), 0, stringValue.length()); } else if (result instanceof Double) { String stringValue = XMLUtils.removeScientificNotation(((Double) result).doubleValue()); contentHandler.characters(stringValue.toCharArray(), 0, stringValue.length()); } else { String message = "Unsupported type returned by XPath expression: " + (result == null ? "null" : result.getClass().getName()); throw new ValidationException(message, locationData); } } } contentHandler.endDocument(); }catch (XPathException xpe) { throw new OXFException(xpe); } catch (SAXException e) { throw new ValidationException(e, locationData); }finally{ if(xpath != null) xpath.returnToPool(); } } | 57229 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57229/558be30a09b76fdcd48f89d08b1308f894e34fcb/XPathProcessor.java/clean/src/java/org/orbeon/oxf/processor/transformer/XPathProcessor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
918,
855,
2828,
12,
3341,
18,
280,
2196,
265,
18,
2409,
74,
18,
14511,
18,
2425,
18,
8798,
1042,
819,
16,
3697,
1503,
913,
1503,
13,
288,
9079,
1903,
642,
273,
261,
809,
13,
85... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
918,
855,
2828,
12,
3341,
18,
280,
2196,
265,
18,
2409,
74,
18,
14511,
18,
2425,
18,
8798,
1042,
819,
16,
3697,
1503,
913,
1503,
13,
288,
9079,
1903,
642,
273,
261,
809,
13,
85... |
public void startDocument() { | public void startDocument() throws SAXException { | public void startDocument() { mDocument = new Document(); } | 1514 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1514/7d7e290d340adbb36187056fb2a2c3cd7bbcaa77/XMLDocumentHandlerSAX.java/buggy/sandbox/contributions/XML-Indexing-Demo/src/java/org/apache/lucenesandbox/xmlindexingdemo/XMLDocumentHandlerSAX.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
787,
2519,
1435,
1216,
14366,
288,
565,
312,
2519,
273,
394,
4319,
5621,
225,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
787,
2519,
1435,
1216,
14366,
288,
565,
312,
2519,
273,
394,
4319,
5621,
225,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
FieldTable result = new FieldTable(); | FieldTable result = FieldTableFactory.newFieldTable(); | public void testKeyEnumeration() { FieldTable result = new FieldTable(); result.put("one", 1L); result.put("two", 2L); result.put("three", 3L); result.put("four", 4L); result.put("five", 5L); Iterator iterator = result.keySet().iterator(); try { assertTrue("one".equals(iterator.next())); assertTrue("two".equals(iterator.next())); assertTrue("three".equals(iterator.next())); assertTrue("four".equals(iterator.next())); assertTrue("five".equals(iterator.next())); } catch (NoSuchElementException e) { fail("All elements should be found."); } } | 45585 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45585/2e4d9c40a39cb0a89cfaae57a3aaca97ce133fbc/FieldTableKeyEnumeratorTest.java/buggy/qpid/java/client/src/test/java/org/apache/qpid/test/unit/basic/FieldTableKeyEnumeratorTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
653,
21847,
1435,
565,
288,
3639,
2286,
1388,
563,
273,
2286,
1388,
1733,
18,
2704,
974,
1388,
5621,
3639,
563,
18,
458,
2932,
476,
3113,
404,
48,
1769,
3639,
563,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
653,
21847,
1435,
565,
288,
3639,
2286,
1388,
563,
273,
2286,
1388,
1733,
18,
2704,
974,
1388,
5621,
3639,
563,
18,
458,
2932,
476,
3113,
404,
48,
1769,
3639,
563,
18,
... |
Map<Object, Object> m = getMap(); | Map<AnalysisLocal<T>, T> m = getMap(); | public void remove() { Map<Object, Object> m = getMap(); m.remove(this); } | 10715 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10715/d3d8e80793491a30b8151a4f7df75f6bb82a3f59/AnalysisLocal.java/buggy/findbugs/src/java/edu/umd/cs/findbugs/AnalysisLocal.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
225,
918,
225,
1206,
1435,
288,
202,
202,
863,
32,
921,
16,
1033,
34,
312,
273,
15489,
5621,
202,
202,
81,
18,
4479,
12,
2211,
1769,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
225,
918,
225,
1206,
1435,
288,
202,
202,
863,
32,
921,
16,
1033,
34,
312,
273,
15489,
5621,
202,
202,
81,
18,
4479,
12,
2211,
1769,
202,
97,
2,
-100,
-100,
-100,
-100,
-100... |
encryptedHeader = mps.protectHeader(rawData, source, destination); | try { encryptedHeader = mps.protectHeader(rawData, source, destination); } catch (Exception e) { e.printStackTrace(); Assert.assertTrue("Exception while trying to encrypt header", false); } | public void testHeaderEncryption() { // Create a test header String header = "Source:foo - Target:bar"; byte[] rawData = header.getBytes(); MessageAddress source = new MessageAddress("foo"); MessageAddress destination = new MessageAddress("bar"); byte[] encryptedHeader = null; byte[] decryptedHeader = null; // Encrypt header encryptedHeader = mps.protectHeader(rawData, source, destination); Assert.assertNotNull("Encrypted Header is null", encryptedHeader); // Decrypt header decryptedHeader = mps.unprotectHeader(encryptedHeader, source, destination); String newHeader = new String (decryptedHeader); Assert.assertNotNull("Deccrypted Header is null", decryptedHeader); // Original header and (encrypted then decrypted) header should be equal. Assert.assertEquals(header, newHeader); // Original header and encrypted header should be different // (but of course that does not guarantee that encryption is done properly) boolean isDifferent = !header.equals(new String(encryptedHeader)); Assert.assertTrue(isDifferent); System.out.println("Header before encryption: " + header); //System.out.println("Header after encryption: " + new String(encryptedHeader)); System.out.println("Header after encryption/decryption: " + newHeader); } | 12869 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12869/d293fe3e5ebdb257a29487cc4600f66f408b45f5/MessageProtectionServiceTest.java/clean/securityservices/regress/test/org/cougaar/core/security/crypto/MessageProtectionServiceTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1842,
1864,
7894,
1435,
288,
565,
368,
1788,
279,
1842,
1446,
565,
514,
1446,
273,
315,
1830,
30,
11351,
300,
5916,
30,
3215,
14432,
565,
1160,
8526,
16503,
273,
1446,
18,
588,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1842,
1864,
7894,
1435,
288,
565,
368,
1788,
279,
1842,
1446,
565,
514,
1446,
273,
315,
1830,
30,
11351,
300,
5916,
30,
3215,
14432,
565,
1160,
8526,
16503,
273,
1446,
18,
588,... |
else { moduleHandle.includeLibrary( DEUtil.getRelativedPath( moduleHandle.getFileName( ), libraryHandle.getFileName( ) ), defaultName ); ExceptionHandler.openMessageBox( MSG_DIALOG_TITLE, MessageFormat.format( MSG_DIALOG_MSG, new String[]{ libraryHandle.getFileName( ) } ), SWT.ICON_INFORMATION ); return true; } | moduleHandle.includeLibrary( DEUtil.getRelativedPath( moduleHandle.getFileName( ), libraryHandle.getFileName( ) ), defaultName ); ExceptionHandler.openMessageBox( MSG_DIALOG_TITLE, MessageFormat.format( MSG_DIALOG_MSG, new String[]{ libraryHandle.getFileName( ) } ), SWT.ICON_INFORMATION ); return true; | public static boolean includeLibrary( ModuleHandle moduleHandle, LibraryHandle libraryHandle ) throws DesignFileException, SemanticException { if ( moduleHandle!=libraryHandle && !moduleHandle.isInclude( libraryHandle ) ) { String defaultName = new File( libraryHandle.getFileName( ) ).getName( ) .split( File.separator + "." )[0]; if ( SessionHandleAdapter.getInstance( ) .getReportDesignHandle( ) .getLibrary( defaultName ) != null ) { ImportLibraryDialog dialog = new ImportLibraryDialog( defaultName ); if ( dialog.open( ) == Dialog.OK ) { moduleHandle.includeLibrary( DEUtil.getRelativedPath( moduleHandle.getFileName( ), libraryHandle.getFileName( ) ), (String) dialog.getResult( ) ); ExceptionHandler.openMessageBox( MSG_DIALOG_TITLE, MessageFormat.format( MSG_DIALOG_MSG, new String[]{ libraryHandle.getFileName( ) } ), SWT.ICON_INFORMATION ); return true; } return false; } else { moduleHandle.includeLibrary( DEUtil.getRelativedPath( moduleHandle.getFileName( ), libraryHandle.getFileName( ) ), defaultName ); ExceptionHandler.openMessageBox( MSG_DIALOG_TITLE, MessageFormat.format( MSG_DIALOG_MSG, new String[]{ libraryHandle.getFileName( ) } ), SWT.ICON_INFORMATION ); return true; } } return true; } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/a11c61344fea2c7dd935e6c4bd0e49a1b90c426e/UIUtil.java/buggy/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/util/UIUtil.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
1250,
2341,
9313,
12,
5924,
3259,
1605,
3259,
16,
1082,
202,
9313,
3259,
5313,
3259,
262,
1216,
29703,
812,
503,
16,
1082,
202,
13185,
9941,
503,
202,
95,
202,
202,
430,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
1250,
2341,
9313,
12,
5924,
3259,
1605,
3259,
16,
1082,
202,
9313,
3259,
5313,
3259,
262,
1216,
29703,
812,
503,
16,
1082,
202,
13185,
9941,
503,
202,
95,
202,
202,
430,
... |
boolean isDefaultPageEncoding) throws JasperException { | boolean isDefaultPageEncoding, boolean isBomPresent) throws JasperException { | public static Node.Nodes parse(ParserController pc, JspReader reader, Node parent, boolean isTagFile, boolean directivesOnly, URL jarFileUrl, String pageEnc, String jspConfigPageEnc, boolean isDefaultPageEncoding) throws JasperException { Parser parser = new Parser(pc, reader, isTagFile, directivesOnly, jarFileUrl); Node.Root root = new Node.Root(reader.mark(), parent, false); root.setPageEncoding(pageEnc); root.setJspConfigPageEncoding(jspConfigPageEnc); root.setIsDefaultPageEncoding(isDefaultPageEncoding); if (directivesOnly) { parser.parseTagFileDirectives(root); return new Node.Nodes(root); } // For the Top level page, add inlcude-prelude and include-coda PageInfo pageInfo = pc.getCompiler().getPageInfo(); if (parent == null) { parser.addInclude(root, pageInfo.getIncludePrelude()); } while (reader.hasMoreInput()) { parser.parseElements(root); } if (parent == null) { parser.addInclude(root, pageInfo.getIncludeCoda()); } Node.Nodes page = new Node.Nodes(root); return page; } | 15905 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15905/7e55d59e7a32637ca63b2cec65835a56dd760a98/Parser.java/clean/java/org/apache/jasper/compiler/Parser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
2029,
18,
3205,
1109,
12,
2678,
2933,
6125,
16,
19300,
2514,
2949,
16,
5411,
2029,
982,
16,
1250,
353,
1805,
812,
16,
1250,
13877,
3386,
16,
5411,
1976,
22588,
1489,
16,
514,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2029,
18,
3205,
1109,
12,
2678,
2933,
6125,
16,
19300,
2514,
2949,
16,
5411,
2029,
982,
16,
1250,
353,
1805,
812,
16,
1250,
13877,
3386,
16,
5411,
1976,
22588,
1489,
16,
514,
... |
public boolean isOperationVisible() { return _operVec.isDisplayed(); } | public boolean isOperationVisible() { return _operVec.isDisplayed(); } | public boolean isOperationVisible() { return _operVec.isDisplayed(); } | 7166 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7166/81987ae96ab1399b8d43a27c69be7d7a4c0b7b89/FigClass.java/clean/src_new/org/argouml/uml/diagram/static_structure/ui/FigClass.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1250,
353,
2988,
6207,
1435,
288,
327,
389,
4063,
12991,
18,
291,
4236,
329,
5621,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1250,
353,
2988,
6207,
1435,
288,
327,
389,
4063,
12991,
18,
291,
4236,
329,
5621,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
locatorImpl.setSystemId(e.getSystemId()); | locatorImpl.setSystemId(e.getExpandedSystemId()); | public void parse(String systemId) throws SAXException, IOException { // parse document XMLInputSource source = new XMLInputSource(null, systemId, null); try { parse(source); } // wrap XNI exceptions as SAX exceptions catch (XMLParseException e) { Exception ex = e.getException(); if (ex == null) { // must be a parser exception; mine it for locator info and throw // a SAXParseException LocatorImpl locatorImpl = new LocatorImpl(); locatorImpl.setPublicId(e.getPublicId()); locatorImpl.setSystemId(e.getSystemId()); locatorImpl.setLineNumber(e.getLineNumber()); locatorImpl.setColumnNumber(e.getColumnNumber()); throw new SAXParseException(e.getMessage(), locatorImpl); } if (ex instanceof SAXException) { // why did we create an XMLParseException? throw (SAXException)ex; } if (ex instanceof IOException) { throw (IOException)ex; } throw new SAXException(ex); } catch (XNIException e) { Exception ex = e.getException(); if (ex == null) { throw new SAXException(e.getMessage()); } if (ex instanceof SAXException) { throw (SAXException)ex; } if (ex instanceof IOException) { throw (IOException)ex; } throw new SAXException(ex); } // close stream opened by the parser finally { try { Reader reader = source.getCharacterStream(); if (reader != null) { reader.close(); } else { InputStream is = source.getByteStream(); if (is != null) { is.close(); } } } catch (IOException e) { // ignore } } } // parse(String) | 1831 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1831/bda39ebfdde5204af457e868d6a2908461900e9f/AbstractSAXParser.java/buggy/src/org/apache/xerces/parsers/AbstractSAXParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1109,
12,
780,
30083,
13,
1216,
14366,
16,
1860,
288,
3639,
368,
1109,
1668,
3639,
3167,
1210,
1830,
1084,
273,
394,
3167,
1210,
1830,
12,
2011,
16,
30083,
16,
446,
1769,
3639,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1109,
12,
780,
30083,
13,
1216,
14366,
16,
1860,
288,
3639,
368,
1109,
1668,
3639,
3167,
1210,
1830,
1084,
273,
394,
3167,
1210,
1830,
12,
2011,
16,
30083,
16,
446,
1769,
3639,... |
allocate(nrargs); | nrargs = 0; | public void setDefault() { int i; int nrargs; database = null; nrargs = 0; allocate(nrargs); for (i=0;i<nrargs;i++) { argument [i]="arg"+i; //$NON-NLS-1$ argumentDirection [i]="IN"; //$NON-NLS-1$ argumentType[i]=Value.VALUE_TYPE_NUMBER; } resultName = "result"; //$NON-NLS-1$ resultType = Value.VALUE_TYPE_NUMBER; } | 9547 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9547/3813bb349b7f599dec545d693a38e0bf9749c3c1/DBProcMeta.java/clean/src/be/ibridge/kettle/trans/step/dbproc/DBProcMeta.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
9277,
1435,
202,
95,
202,
202,
474,
277,
31,
202,
202,
474,
9884,
1968,
31,
9506,
202,
6231,
273,
446,
31,
202,
202,
11611,
1968,
565,
273,
374,
31,
202,
202,
16247,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
9277,
1435,
202,
95,
202,
202,
474,
277,
31,
202,
202,
474,
9884,
1968,
31,
9506,
202,
6231,
273,
446,
31,
202,
202,
11611,
1968,
565,
273,
374,
31,
202,
202,
16247,
12... |
protected void assertContains(int expected, int[] array) { | protected void assertContains(char expected, char[] array) { | protected void assertContains(int expected, int[] array) { for (int i = 0; i < array.length; ++i) { if (array[i] == expected) { return; } } StringBuffer message = new StringBuffer(); message.append(expected + " not in {"); for (int i = 0; i < array.length; ++i) { message.append("'" + array[i] + "'"); if (i < (array.length - 1)) { message.append(", "); } } message.append(" }"); fail(message.toString()); } | 6462 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6462/1fc892515bece739b5ec210547694b980de442cf/GroovyTestCase.java/buggy/src/main/groovy/util/GroovyTestCase.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
1815,
10846,
12,
3001,
2665,
16,
1149,
8526,
526,
13,
288,
3639,
364,
261,
474,
277,
273,
374,
31,
277,
411,
526,
18,
2469,
31,
965,
77,
13,
288,
5411,
309,
261,
1126,
63,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
1815,
10846,
12,
3001,
2665,
16,
1149,
8526,
526,
13,
288,
3639,
364,
261,
474,
277,
273,
374,
31,
277,
411,
526,
18,
2469,
31,
965,
77,
13,
288,
5411,
309,
261,
1126,
63,
... |
int maxWidth = doubleBufferMaximumSize.width; int maxHeight = doubleBufferMaximumSize.height; return comp.createVolatileImage(Math.min(maxWidth, proposedWidth), Math.min(maxHeight, proposedHeight)); | Component root = getRoot(comp); Image buffer = (Image) offscreenBuffers.get(root); if (buffer == null || buffer.getWidth(null) < proposedWidth || buffer.getHeight(null) < proposedHeight || !(buffer instanceof VolatileImage)) { int width = Math.max(proposedWidth, root.getWidth()); width = Math.min(doubleBufferMaximumSize.width, width); int height = Math.max(proposedHeight, root.getHeight()); height = Math.min(doubleBufferMaximumSize.height, height); buffer = root.createVolatileImage(width, height); if (buffer != null) offscreenBuffers.put(root, buffer); } return buffer; | public Image getVolatileOffscreenBuffer(Component comp, int proposedWidth, int proposedHeight) { int maxWidth = doubleBufferMaximumSize.width; int maxHeight = doubleBufferMaximumSize.height; return comp.createVolatileImage(Math.min(maxWidth, proposedWidth), Math.min(maxHeight, proposedHeight)); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/53983e95556bf4b775130b06570aa2ea08d85628/RepaintManager.java/buggy/core/src/classpath/javax/javax/swing/RepaintManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
3421,
11031,
355,
20295,
7210,
9252,
1892,
12,
1841,
1161,
16,
509,
20084,
2384,
16,
4766,
1850,
509,
20084,
2686,
13,
225,
288,
565,
509,
17681,
273,
1645,
1892,
13528,
1225,
18,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
3421,
11031,
355,
20295,
7210,
9252,
1892,
12,
1841,
1161,
16,
509,
20084,
2384,
16,
4766,
1850,
509,
20084,
2686,
13,
225,
288,
565,
509,
17681,
273,
1645,
1892,
13528,
1225,
18,
2... |
if (hb.isProcessed() || !hb.getMustUnderstand()) { | if (headerBlock.isProcessed() || !headerBlock.getMustUnderstand()) { | private void checkMustUnderstand(MessageContext msgContext) throws AxisFault { if (!msgContext.isHeaderPresent()) { return; } SOAPEnvelope se = msgContext.getEnvelope(); if (se.getHeader() == null) { return; } Iterator hbs = se.getHeader().examineAllHeaderBlocks(); while (hbs.hasNext()) { SOAPHeaderBlock hb = (SOAPHeaderBlock) hbs.next(); // if this header block has been processed or mustUnderstand isn't // turned on then its cool if (hb.isProcessed() || !hb.getMustUnderstand()) { continue; } // if this header block is not targetted to me then its not my // problem. Currently this code only supports the "next" role; we // need to fix this to allow the engine/service to be in one or more // additional roles and then to check that any headers targetted for // that role too have been dealt with. String role = hb.getRole(); String prefix = se.getNamespace().getPrefix(); if (!msgContext.isSOAP11()) { // if must understand and soap 1.2 the Role should be NEXT , if it is null we considerr // it to be NEXT if (prefix == null || "".equals(prefix)) { prefix = SOAPConstants.SOAPFAULT_NAMESPACE_PREFIX; } if (role != null) { if (!SOAP12Constants.SOAP_ROLE_NEXT.equals(role)) { throw new AxisFault(Messages.getMessage( "mustunderstandfaild", prefix, SOAP12Constants.FAULT_CODE_MUST_UNDERSTAND)); } } else { throw new AxisFault(Messages.getMessage( "mustunderstandfaild", prefix, SOAP12Constants.FAULT_CODE_MUST_UNDERSTAND)); } } else { // if must understand and soap 1.1 the actor should be NEXT , if it is null we considerr // it to be NEXT if ((role != null) && !SOAP11Constants.SOAP_ACTOR_NEXT.equals(role)) { throw new AxisFault(Messages.getMessage( "mustunderstandfaild", prefix, SOAP12Constants.FAULT_CODE_MUST_UNDERSTAND)); } } } } | 49300 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49300/66aeed666bb41a48d1fabc0c431ffb9a522c191b/AxisEngine.java/clean/modules/core/src/org/apache/axis2/engine/AxisEngine.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
866,
10136,
14655,
10145,
12,
1079,
1042,
1234,
1042,
13,
1216,
15509,
7083,
288,
3639,
309,
16051,
3576,
1042,
18,
291,
1864,
6351,
10756,
288,
5411,
327,
31,
3639,
289,
3639,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
866,
10136,
14655,
10145,
12,
1079,
1042,
1234,
1042,
13,
1216,
15509,
7083,
288,
3639,
309,
16051,
3576,
1042,
18,
291,
1864,
6351,
10756,
288,
5411,
327,
31,
3639,
289,
3639,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.